autoconf
[Top][All Lists]
Advanced

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

Re: Can't repeat build.


From: Dan Smithers
Subject: Re: Can't repeat build.
Date: Fri, 23 Jan 2009 14:22:18 +0000
User-agent: Thunderbird 2.0.0.19 (X11/20090105)

Hi Ralph,

thanks for the help.
> 
>>>> Also, I am a bit confused about when to use $(srcdir) and $(top_builddir).
>>> Well, imagine instead of
>>>   cd build
>>>   ../configure
>>>
>>> I would do
>>>
>>>   mkdir /dev/shm/build
>>>   cd /dev/shm/build
>>>   /path/to/configure <options>
>> I think that this is pretty much what I do - except that I have build in
>> the top source directory.
> 
> Yes, but if you change that habit (just for testing) then you will see
> when you need to use $(srcdir) and when you need to use $(top_builddir).

good point.

>>>> bin_PROGRAM=exec
>>>> exec_SOURCES=exec.c
>>>> exec_LDADD=$(top_builddir)/../libname/src/.libs -lname
>>> Please replace this line with
>>>   exec_LDADD=$(top_builddir)/../libname/src/libname.la
>>>
>>> but I do wonder: $(top_builddir)/.. points outside of the build tree.
>>> Is that an error or on purpose?
>> It points to a neighbouring tree set up by autotools.
> 
> Ah, ok.  So you require that users of your packages also need this
> same setup.

At the moment I am the main user of the packages.

>> # Checks for typedefs, structures, and compiler characteristics.
>> AC_HEADER_STDBOOL
>> AC_C_CONST
> 
> I don't think anybody uses a compiler that needs AC_C_CONST any more.
> You can safely drop this.  Likewise for AC_C_VOLATILE.
> 
>> AC_C_VOLATILE
> 
>> BOOSTDIR=[/vol/build/boost_1_37_0]
> 
> For eventual other users of your package, this should not be hard-coded
> but made configurable.

I think that it can be overridden in the call to
<path_to configure>/configure BOOSTDIR=<new boost location>

>> components/Makefile.am
>> ======================
>>
>> AUX_DIST = $(ac_aux_dir)/config.guess \
>>      $(ac_aux_dir)/config.sub \
>>      $(ac_aux_dir)/install-sh \
>>      $(ac_aux_dir)/ltconfig \
>>      $(ac_aux_dir)/ltmain.sh \
>>      $(ac_aux_dir)/mdate-sh \
>>      $(ac_aux_dir)/missing \
>>      $(ac_aux_dir)/mkinstalldirs
> 
> FWIW, I don't think $(ac_aux_dir) is defined automatically by
> Autoconf/Automake.

Hmm, I'll check that.

>> SUBDIRS= libag astranet
>>
>> EXTRA_DIST= bootstrap.sh
>>
>> MAINTAINERCLEANFILES=Makefile.in configure $(AUX_DIST)
> 
> 
>> # set default path prefix
>> AC_PREFIX_DEFAULT([/opt/astraguard/])
> 
> Please omit the trailing slash here.
> 
>> BOOSTDIR=[/vol/build/boost_1_37_0]
>> AC_SUBST([BOOSTDIR])
> 
> 
>> components/astranet/src/Makefile.am
>> ===================================
>>
>> AM_CPPFLAGS=-I$(BOOSTDIR)/include -I$(srcdir)/../../libag/include
>> AM_CFLAGS=-Wall -Werror
>> AM_CXXFLAGS=$(AM_CFLAGS)
>>
>> bin_PROGRAMS=alms
>> alms_SOURCES=neighbours.cpp alms.cpp
>>
>> alms_LDADD= -L$(BOOSTDIR)/lib -lboost_regex
>> -L$(top_builddir)/../libag/src -lagthread -lagmessage -laglogger -lagcomms
> 
> If some of those are uninstalled libtool libraries, they should be
> specified as relative/path/to/libagmessage.la here


Ahh, what I really want to do is to be able to install the libraries,
but also use local versions for development.

>> AM_CFLAGS=-Wall -Werror
>> AM_CXXFLAGS=$(AM_CFLAGS)
> 
> Those aren't portable to non-GCC, but I guess you knew that; and they
> are overridable by CFLAGS and CXXFLAGS.

Yes thanks, when I use other compilers then I set them explicitly. E.g.

configure CC=icc CXX=icc CFLAGS=<icc C compiler flags>
CPPFLAGS=<Preprocessor flags> CXXFLAGS=<icc C++ compiler flags>




reply via email to

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