automake
[Top][All Lists]
Advanced

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

AM_CONDITIONAL error


From: Volker Boerchers
Subject: AM_CONDITIONAL error
Date: Fri, 7 May 2004 12:11:23 +0200 (CEST)

Hi,

i experienced an error in witch AM_CONDITIONAL is involved. My
configure.in contains the following lines

 AC_ARG_ENABLE(swig-python,
  [  --disable-swig-python      do not build python swig modules],
  enable_swig_python=$enableval, enable_swig_python=yes)
 ...
 AM_CONDITIONAL([SWIG_PYTHON], [test x$enable_swig_python = xyes])

After updating my swig installation (www.swig.org) the following error 
occured (I'm using automake 1.5 and 1.7.6, autoconf 2.52 and 2.57):

  $ ./configure 
  checking for a BSD-compatible install... /opt/sfw/bin/ginstall -c
  checking whether build environment is sane... yes
  checking for gawk... gawk
  checking whether make sets $(MAKE)... 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... gcc
  checking for library containing strerror... none required
  ./configure: line 2901: syntax error near unexpected token `"(c'
  ./configure: line 2901: `  echo $ECHO_N "(cached) $ECHO_C" >&6'

  $ head -2901 configure | tail -8
  if test -z "${SWIG_PYTHON_TRUE}" && test -z "${SWIG_PYTHON_FALSE}"; then
    { { echo "$as_me:$LINENO: error: conditional \"
          # Extract the first word of "swig", so it can be a program name with 
args.
  set dummy swig; ac_word=$2
  echo "$as_me:$LINENO: checking for $ac_word" >&5
  echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
  if test "${ac_cv_path_SWIG+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6

It took a long time until I realized what went wrong: swig installs a
m4 file that defines a macro 'SWIG_PYTHON' too. So actually the
problem is not really an automake problem...

Is there a way to get warnings in such a nameing clash or at least
some 'trace' information from autoconf/automake? What else could be
done?

Attached you find a complete example. (Do a make in subdirectory hello/)

Volker
-- 
Volker Börchers
TECON Systems AG

Attachment: autoconf-problem.tgz
Description: GNU Unix tar archive


reply via email to

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