[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
autoconf generates buggy configure
From: |
Charles Wilson |
Subject: |
autoconf generates buggy configure |
Date: |
Sun, 19 May 2002 19:37:32 -0400 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.4) Gecko/20011019 Netscape6/6.2 |
On cygwin, using autoconf-2.53, 2.53a, and 2.52.
I've been working with cvs-1.11.2, and had to muck with the configure.in
and acinclude.m4 files to make the whole package ac-2.5x compliant.
Unfortunately, I ended up with a buggy configure script -- but before
you dismiss this as user-error or a buggy-configure.in:
when I say buggy, I mean
1) text from inside an AC_HELP_STRING() macro was NOT placed in the
help section. Instead, it was just willy-nilly put into the script
itself. Since help text is not, in general, valid shell script, this
caused errors. Other AC_HELP_STRING()'s behaved as expected.
2) case statements were completely hosed (no closing ')' on the match
strings, a random 'fi' just dropped in between the match string and the
execution clause, ...
3) if statements not closed: 'fi' or 'else' ommitted...
Again, this is true for ac-2.53, ac-2.53a, and ac-2.52. To verify,
download this file:
http://www.neuro.gatech.edu/users/cwilson/cygutils/testing/cvs/cvs-1.11.2-1-src.tar.bz2
unpack it, and then run the script:
./cvs-1.11.2-1.sh prep
Which unpacks the "real" cvs-1.11.2 tarball, and applies the patch.
This patch contains my updates to the autotool input files, but also the
result of running the autotools -- and then *fixing* the buggy configure
script. So, save that (working, non-buggy) configure somewhere, and
re-run autoconf. Be amazed...
If I understand correctly, autoconf should never generate buggy scripts.
It should either (1) report an error, or (2) generate a syntactically
valid script.
Can anyone explain what's going on here?
Thanks,
Chuck
Here are the changes I had to make to the output configure script, to
get a working version:
--- cvs-1.11.2-orig/configure 2002-05-19 06:46:53.000000000 -0400
+++ cvs-1.11.2/configure 2002-05-19 06:16:46.000000000 -0400
@@ -848,6 +848,8 @@
--disable-dependency-tracking Speeds up one-time builds
--enable-dependency-tracking Do not reject slow dependency extractors
--enable-encryption enable encryption support
+ --enable-client include code for running as a remote client
+ (default)
--enable-server include code for running as a server (default)
Optional Packages:
@@ -6037,6 +6039,7 @@
#define HAVE_GETSPNAM 1
_ACEOF
+fi
echo "$as_me:$LINENO: checking whether utime accepts a null argument" >&5
echo $ECHO_N "checking whether utime accepts a null argument...
$ECHO_C" >&6
@@ -6307,9 +6310,7 @@
# So? What about this header?
case $ac_header_compiler:$ac_header_preproc in
- yes:no
-fi
-
+ yes:no )
{ echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the
compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected
by the preprocessor!" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the
preprocessor's result" >&5
@@ -9124,18 +9125,14 @@
:
else
LIBOBJS="$LIBOBJS hostname.$ac_objext"
+fi
-
- --enable-client include code for running as a remote client
- (default)
# Check whether --enable-client or --disable-client was given.
if test "${enable_client+set}" = set; then
enableval="$enable_client"
case "${enableval}" in
- yes
-fi
- client=yes;;
+ yes) client=yes;;
no) client=no;;
*) { { echo "$as_me:$LINENO: error: bad value ${enableval} for
client option" >&5
echo "$as_me: error: bad value ${enableval} for client option" >&2;}
@@ -9529,9 +9526,7 @@
# So? What about this header?
case $ac_header_compiler:$ac_header_preproc in
- yes:no
-fi
-
+ yes:no )
{ echo "$as_me:$LINENO: WARNING: gdbm.h: accepted by the compiler,
rejected by the preprocessor!" >&5
echo "$as_me: WARNING: gdbm.h: accepted by the compiler, rejected by
the preprocessor!" >&2;}
{ echo "$as_me:$LINENO: WARNING: gdbm.h: proceeding with the
preprocessor's result" >&5
@@ -9566,13 +9561,12 @@
echo "$as_me: error: cannot find gdbm.h" >&2;}
{ (exit 1); exit 1; }; }
fi
-
-,
+ else
{ { echo "$as_me:$LINENO: error: cannot find libgdbm" >&5
echo "$as_me: error: cannot find libgdbm" >&2;}
- { (exit 1); exit 1; }; })
+ { (exit 1); exit 1; }; }
fi
-
+fi
fi # cygwin
test -f src/options.h && (
- autoconf generates buggy configure,
Charles Wilson <=