bug-automake
[Top][All Lists]
Advanced

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

Can't call AC_PROG_CXX conditionally


From: Andreas Schwab
Subject: Can't call AC_PROG_CXX conditionally
Date: Mon, 18 Nov 2002 14:16:47 +0100
User-agent: Gnus/5.090007 (Oort Gnus v0.07) Emacs/21.3.50 (ia64-suse-linux)

When AC_PROG_CXX is used conditionally then the generated configure script
complains that conditional "am__fastdepCXX" was never defined when
AC_PROG_CXX is not actually called.  In a real-world example this would
depend on some --enable or --with option.

$ cat >configure.in <<EOF
AC_INIT(foo, 1.0)
AM_INIT_AUTOMAKE
AC_PROG_INSTALL
AC_PROG_MAKE_SET
AC_CONFIG_FILES(Makefile)
AC_PROG_CC
if false; then
  AC_PROG_CXX
fi
AC_OUTPUT
EOF
$ touch Makefile.am AUTHORS ChangeLog NEWS README
$ autoreconf --force --install
configure.in: installing `./install-sh'
configure.in: installing `./mkinstalldirs'
configure.in: installing `./missing'
Makefile.am: installing `./COPYING'
Makefile.am: installing `./INSTALL'
$ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking whether make sets $(MAKE)... (cached) yes
checking for gcc... gcc
checking for C compiler default output... 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
checking for style of include used by make... GNU
checking dependency style of gcc... none
configure: error: conditional "am__fastdepCXX" was never defined.
Usually this means the macro was only invoked conditionally.

Andreas.

-- 
Andreas Schwab, SuSE Labs, address@hidden
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 N├╝rnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




reply via email to

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