bug-autoconf
[Top][All Lists]
Advanced

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

AC_LIBOBJS and ac_objext


From: Alexandre Duret-Lutz
Subject: AC_LIBOBJS and ac_objext
Date: Sun, 07 Sep 2003 16:17:48 +0200
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3 (gnu/linux)

I've just been bitten by this: calling AC_LIBOBJ before
AC_PROG_CC cause LIBOBJS to be misdefined.  Here is an example

~/tmp % cat configure.ac
AC_INIT(a,b)
AC_LIBOBJ([two])
AC_PROG_CC
AC_OUTPUT
echo $LIB@&address@hidden
~/tmp % autoconf
~/tmp % ./configure
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
configure: creating ./config.status
two.$U.o

I was obviously expecting `two$U.o'.  Swapping the calls to
AC_PROG_CC and AC_LIBOBJ does the trick, however I think it
would be nice that Autoconf catches this error.  Either
AC_LIBOBJ has to require something, or it should refuse to be
called before $ac_objext has been defined.
-- 
Alexandre Duret-Lutz





reply via email to

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