libtool
[Top][All Lists]
Advanced

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

AC_PROG_LIBTOOL sets CFLAGS


From: Thien-Thi Nguyen
Subject: AC_PROG_LIBTOOL sets CFLAGS
Date: Tue, 21 Aug 2007 21:49:19 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux)

according to my reading of info nodes:

 (libtool) AC_PROG_LIBTOOL
 (automake) Flag Variables Ordering

the shell variable CFLAGS should have no value after AC_PROG_LIBTOOL.
i.e., i should expect the configure.ac fragment:

 echo "CFLAGS: $CFLAGS"
 AC_PROG_LIBTOOL
 echo "CFLAGS: $CFLAGS"

to create a configure that outputs "CFLAGS: " both before and after
whatever code is generated as the expansion of AC_PROG_LIBTOOL.

is my interpretation correct?  presently, i see that before, CFLAGS is
indeed empty, while after, it has the value "-g -O2" (compiler is gcc),
using libtool 1.5.22, autoconf 2.60, automake 1.9.6.

to see for yourself, try:

$ mkdir /tmp/z
$ cd /tmp/z
$ cat > configure.ac <<EOF
AC_INIT([foo],[0],[ttn])
AM_INIT_AUTOMAKE
echo "CFLAGS: $CFLAGS"
AC_PROG_LIBTOOL
echo "CFLAGS: $CFLAGS"
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
EOF
$ touch NEWS README AUTHORS ChangeLog Makefile.am
$ autoreconf -is
$ ./configure

i suppose the "-g -O2" is good to have *somewhere*, which would lead,
presuming the observed behavior is undesirable and will be fixed in some
future libtool, to the follow on question: if not CFLAGS, then where?

thi




reply via email to

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