[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: usage of ac_check_header
From: |
Ralf Wildenhues |
Subject: |
Re: usage of ac_check_header |
Date: |
Wed, 25 Jul 2007 20:55:22 +0200 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
Hello Joao,
A couple of notes to the configure.ac you posted:
* Joao Miguel Ferreira wrote on Tue, Jul 24, 2007 at 11:44:28AM CEST:
> AC_INIT([libbabel],[0.4])
[...]
> #we need libtool; we need shared libraries;
> AM_PROG_LIBTOOL
> AC_PROG_LIBTOOL
> AC_ENABLE_SHARED
AM_PROG_LIBTOOL and AC_PROG_LIBTOOL are synonyms, so you can delete
AM_PROG_LIBTOOL. Moreover, AC_ENABLE_SHARED needs to go before
AC_PROG_LIBTOOL.
> #check for STDC headers in the system
[...]
> XTRAINCPATHS="-I/usr/include/libxml2/"
> CFLAGS="$CFLAGS $XTRAINCPATHS"
> CPPFLAGS="$CPPFLAGS $XTRAINCPATHS"
> #in fact these settings will end up in the Makefile
> #but they first allow for ./configure to find the libxml/xpath header
> #If libmxl/*.h were located at /usr/include/ none of this would be
> needed, would it ?! No. jmf.
Why don't you just let the user pass these flags? Anyway, Keith
addressed this already.
> #set some sanity flags... well... some compilers don't know them... "gcc
> sweet gcc"
> # additionally -Werror would be too optimistic, wouldn't it ?!...
> CFLAGS="$CFLAGS -Wshadow -Wunused -Wall -Werror"
[...]
I'd add the warning flags only if using GCC:
if test "$GCC" = yes; then
CFLAGS="$CFLAGS -Wshadow -Wunused -Wall -Werror"
fi
Other compilers will likely not understand them at all. FWIW, -Werror
is often too optimistic for portable code.
Hope that helps.
Cheers,
Ralf