autoconf
[Top][All Lists]
Advanced

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

Re: Qs: -pthread, make builds warns be errors, etc


From: Ralf Wildenhues
Subject: Re: Qs: -pthread, make builds warns be errors, etc
Date: Sun, 23 Apr 2006 07:57:39 +0200
User-agent: Mutt/1.5.11+cvs20060403

Hi Matt,

* Matt England wrote on Sun, Apr 23, 2006 at 06:27:15AM CEST:
> 
> * Portable threads compiler flag?

The Autoconf Macro Archive has ACX_PTHREAD.

> * Make compile/link-time warnings stop the ./configure execution?
> 
> I am experiencing warnings like this in my config.log:

> /usr/bin/ld: warning: libstdc++.so.6, needed by 
> /usr/lib/gcc-lib/i486-linux/3.3.5/../../../libpqxx.so, may conflict with 
> libstdc++.so.5
> /usr/bin/ld: warning: libssl.so.0.9.8, needed by 
> /usr/bin/../lib/libpq.so.4, may conflict with libssl.so.0.9.7
> 
> If I decide to do so, can I make the ./configure (via configure.ac) stop 
> its execution in the event of warnings?   I'm looking for an analogy to 
> 'g++ -Werror'.

Very difficult question.  Autoconf has AC_LANG_WERROR; be sure to read
its documentation though.  Many tests are written in a way to evoke
unnecessary warnings at times; often this is unavoidable.  The next
Autoconf release will have at least some more macros which will still
work right in presence of `-Wall -Werror'.

> * How can I determine diff Linux systems?

Honestly: I don't know.  If you're going to try to enumerate them, I'd
advise against them.  Last I know LWN lists more than 300, and some have
characteristics differing over versions.  So rather try to check for the
characteristics you are interested in than the distribution you're on.
(Also note, for example, that I do like to build software on one
distribution and still have some expectation that it will work fine on a
bunch of other ones which NFS-share the installation.)

> * When will latest autoconf docs generate html pages?

For 2.60, we'll definitely install HTML documentation.  Let me see
whether I can get enough motivation together to build it for 2.59..

> My autoconf scripts (which are mostly designed to test for availability of 
> third-party libraries on the build system):
> 
> * http://svn.cleversafe.org/dscore/trunk/configure.ac

If you use m4_include rather than sinclude, then autom4te will be able
to know the exact list of files that comprise its input.

> * 
> http://svn.cleversafe.org/dscore/trunk/common/misc/scripts-autoconf/configure.ac.core

Just a note:
  SOME_MACRO(  [arg1], [arg2] )

leading space in M4 macro arguments will be killed, but trailing won't.

> AC_CHECK_PROG( [MAKE_EXISTS], [make], [yes], [no], [$PATH] )
> if test $MAKE_EXISTS = no; then
>    AC_MSG_ERROR( ['make' program not found] )
> fi

AC_CHECK_PROG and similar macros allow the program to contain the name
plus arguments, so be sure to quote "$MAKE_EXISTS".  More generally,
Bourne shell quoting requires this quoting style:
  if test "$quote_variables" = no_need_to_quote_this; then ..

rather than the other way round (as long as the last arg doesn't contain
spaces or other active characters).

> LDFLAGS="$LDFLAGS -lxerces-c"

Libraries usually belong in $LIBS, for the benefit of static linking.

Cheers,
Ralf




reply via email to

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