[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Can't call AC_PROG_CXX conditionally
From: |
Ralf Corsepius |
Subject: |
Re: Can't call AC_PROG_CXX conditionally |
Date: |
18 Nov 2002 17:05:03 +0100 |
Am Mon, 2002-11-18 um 14.16 schrieb Andreas Schwab:
> 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.
Cf. http://sources.redhat.com/ml/bug-automake/2002/msg02064.html
> $ 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.