autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Nesting m4 macros


From: Matthias Wichtlhuber
Subject: Re: Nesting m4 macros
Date: Mon, 06 Sep 2010 15:32:22 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; de; rv:1.9.2.8) Gecko/20100802 Lightning/1.0b2 Thunderbird/3.1.2

Hi,

first let me thank you for your answer.

It seems to me that you are *greatly* misunderstanding how autoconf
works.  Have you read any tutorial about the autotools?  If not, I
suggest this:<http://www.lrde.epita.fr/~adl/autotools.html>, which
I find it very clear, and which helped me a lot in the past.

It's even worse, I have no understanding of the whole build process under *nix. I'm a Windows developer porting some C code.

You are absolutely right. No macros in the configuration script. To be honest, I have been working with autotools for three days now and all those files and tools are still very confusing. My main source is the autoconf manual.

However, it seems to work now, but the next problem is in sight: Some of my sources should only be compiled conditionally. To achieve this, I define a conditional in my configure.ac.

AM_CONDITIONAL([WANT_CUDA], [true])

or

AM_CONDITIONAL([WANT_CUDA], [false]).

In my Makefile.am I use the following code:

include $(top_srcdir)/Makefile.inc

noinst_LTLIBRARIES = libcudaHDR.la

libcudaHDR_la_SOURCES =
if WANT_CUDA then
libcudaHDR_la_SOURCES += cudaImageDataHandle.cpp deviceManager.cpp ...

Configuration works fine, but when running make bails out with :

Making all in cudaHDR
make[2]: Entering directory `/moca/src/cudaHDR'
Makefile:492: *** missing separator.  Stop.
make[2]: Leaving directory `/moca/src/cudaHDR'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/moca/src'
make: *** [all-recursive] Error 1

Thanks in advance,

Matthias

P.S.: I will do my homework now and have a look at the tutorials ;)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]