bug-autoconf
[Top][All Lists]
Advanced

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

external AC_CONFIG_AUX_DIR broken?


From: Jan Nieuwenhuizen
Subject: external AC_CONFIG_AUX_DIR broken?
Date: Mon, 17 Jun 2002 16:22:33 +0200
User-agent: Gnus/5.090006 (Oort Gnus v0.06) Emacs/21.2 (i386-debian-linux-gnu)

Hi,

I'm trying to upgrade LilyPond's configure process from autoconf 2.13,
but I'm having great difficulties to get AC_CONFIG_AUX_DIR to work.

It seems that autoconf 2.53 does not check for AC_CONFIG_AUX_DIR
macros in aclocal.m4, like 2.13 did.

I've updated aclocal.m4 and configure.in using autoupdate, and all
seems fine, until configure is run:

    15:48:48 address@hidden:~/cvs/lilypond
    $ ./autogen.sh 
    WARNING: I am going to run `configure' with no arguments.
    If you wish to pass any to it, please specify them on the
    `./autogen.sh' command line.

    processing ./stepmake
    Running autoconf ...
    processing .
    Running autoconf ...
    Running ./configure ...
    configure: error: cannot run 

It turns out, that the ': cannot run' wants to run $ac_config_sub
before that variable is assigned to.  Once fixed, the same goes for
$ac_config_guess.

I've struggled for several hours to hunt down and fix this error, but
I'm getting to the point where I find myself including most of the
external macros file (aclocal.m4) into configure.in, and am getting
ever more weird errors.  When I copy the AC_CONFIG_AUX_DIR, $srcdir
and $builddir logic into configure.in (which is not what you want to
do), most seems to work, but in the end the wrong values for $srcdir
and $builddir get substituted in configure's output, so that --srcdir
configuration breaks.

As you can see in the diff below, not very much has changed.

Any help much appreciated.

Greetings,
Jan.

    http://lilypond.org/~jan/ac/lilypond-1.5.61.jcn1.tar.gz  # autoconf 2.13
    http://lilypond.org/~jan/ac/lilypond-1.5.61.jcn2.tar.gz  # autoconf 2.53
    http://lilypond.org/~jan/ac/lilypond-1.5.61.jcn1-1.5.61.jcn2.diff.gz
    
    
Generated by address@hidden,
>From = lilypond-1.5.61.jcn1, To = lilypond-1.5.61.jcn2

usage 

    cd lilypond-source-dir; patch -E -p1 < lilypond-1.5.61.jcn1-1.5.61.jcn2.diff

Patches do not contain automatically generated files 
or (urg) empty directories, 
i.e., you should rerun autoconf, configure

diff -purN ../lilypond-1.5.61.jcn1/VERSION ./VERSION
--- ../lilypond-1.5.61.jcn1/VERSION     Sun Jun 16 23:19:16 2002
+++ ./VERSION   Mon Jun 17 15:47:05 2002
@@ -2,7 +2,7 @@ PACKAGE_NAME=LilyPond
 MAJOR_VERSION=1
 MINOR_VERSION=5
 PATCH_LEVEL=61
-MY_PATCH_LEVEL=jcn1
+MY_PATCH_LEVEL=jcn2
 
 # use the above to send patches: MY_PATCH_LEVEL is always empty for a
 # released version.
diff -purN ../lilypond-1.5.61.jcn1/aclocal.m4 ./aclocal.m4
--- ../lilypond-1.5.61.jcn1/aclocal.m4  Mon Jun 17 15:06:05 2002
+++ ./aclocal.m4        Mon Jun 17 15:47:08 2002
@@ -196,7 +196,7 @@ AC_DEFUN(STEPMAKE_COMPILE, [
 ])
 
 AC_DEFUN(STEPMAKE_CXX, [
-    AC_LANG_CPLUSPLUS
+    AC_LANG([C++])
     AC_PROG_CXX
     STEPMAKE_OPTIONAL_REQUIRED(CXX, c++, $1)
 
@@ -251,7 +251,8 @@ AC_DEFUN(STEPMAKE_END, [
     AC_SUBST(OPTIONAL)
     AC_SUBST(REQUIRED)
     
-    AC_OUTPUT($CONFIGFILE.make:config.make.in)
+    AC_CONFIG_FILES([$CONFIGFILE.make:config.make.in])
+AC_OUTPUT
 
     
     if test -n "$OPTIONAL"; then
@@ -294,7 +295,7 @@ AC_DEFUN(STEPMAKE_FLEX, [
     # AC_PROG_LEX
     # urg: automake 1.3: hope this doesn't break 1.2 ac_cv_pro_lex_root hack...
 
-    # AC_DECL_YYTEXT
+    # AC_PROG_LEX()
     # ugh, ugh
     ac_cv_prog_lex_root=lex.yy
     STEPMAKE_PROGS(FLEX, flex, $1)
@@ -302,7 +303,7 @@ AC_DEFUN(STEPMAKE_FLEX, [
 
 
 AC_DEFUN(STEPMAKE_FLEXLEXER, [
-    AC_HAVE_HEADERS(FlexLexer.h, true, false)
+    AC_CHECK_HEADERS([FlexLexer.h],[true],[false])
     if test $? -ne 0; then
        warn='FlexLexer.h (flex package)'
        STEPMAKE_ADD_ENTRY($1, $warn)
@@ -621,9 +622,9 @@ AC_DEFUN(STEPMAKE_KPATHSEA, [
     [kpathsea_b=$with_kpathsea])
 
     if test "$kpathsea_b" != "no"; then        
-       AC_HAVE_HEADERS(kpathsea/kpathsea.h)
+       AC_CHECK_HEADERS([kpathsea/kpathsea.h])
        AC_CHECK_LIB(kpathsea, kpse_find_file)
-       AC_CHECK_FUNCS(kpse_find_file,, AC_ERROR(Cannot find kpathsea 
functions.  You should install kpathsea; see INSTALL.txt.  Rerun ./configure 
--without-kpathsea only if kpathsea is not available for your platform.))
+       AC_CHECK_FUNCS(kpse_find_file,, AC_MSG_ERROR([Cannot find kpathsea 
functions.  You should install kpathsea; see INSTALL.txt.  Rerun ./configure 
--without-kpathsea only if kpathsea is not available for your platform.]))
     fi
     AC_MSG_CHECKING(whether to use kpathsea)
     if test "$kpathsea_b" != no; then
@@ -773,7 +774,7 @@ AC_DEFUN(STEPMAKE_PERL, [
 
 
 AC_DEFUN(STEPMAKE_PYTHON_DEVEL, [
-    AC_HAVE_HEADERS(python2.2/Python.h python2.1/Python.h python2.0/Python.h 
python2/Python.h python/Python.h python1.5/Python.h Python.h, PYTHON_HEADER=yes)
+    AC_CHECK_HEADERS([python2.2/Python.h python2.1/Python.h python2.0/Python.h 
python2/Python.h python/Python.h python1.5/Python.h 
Python.h],[PYTHON_HEADER=yes])
     if test -z "$PYTHON_HEADER"; then
        warn='python.h (python-devel, python-dev or libpython-dev package)'
        STEPMAKE_ADD_ENTRY($1, $warn)
diff -purN ../lilypond-1.5.61.jcn1/autogen.sh ./autogen.sh
--- ../lilypond-1.5.61.jcn1/autogen.sh  Mon Jun 17 15:08:32 2002
+++ ./autogen.sh        Mon Jun 17 15:47:11 2002
@@ -6,23 +6,23 @@
 
 srcdir=`dirname $0`
 
-# Be paranoid: check for autoconf < 2.50
+# Be paranoid: check for autoconf >= 2.50
 # Some setups have both autoconf 2.13 and 2.50 available through
 # a wrapper script: /usr/bin/autoconf.
-# This wrapper may correctly autoselect autoconf 2.13, but it
+# This wrapper may correctly autoselect autoconf 2.50, but it
 # advertises itself as autoconf 2.13.
 # If you have such a setup, invoke this script as:
 #   autoconf=autoconf ./autogen.sh
-for i in autoconf autoconf2.13 false; do
+for i in in autoconf autoconf2.50 false; do
   version=`$i --version 2>/dev/null | head -1 | awk '{print $NF}' | awk -F. 
'{print $1 * 100 + $2}'`
-  if test "0$version" -lt 250; then
+  if test "0$version" -ge 250; then
     autoconf=$i
     break
   fi
 done
 
 if test -z "$autoconf"; then
-    echo "ERROR: Please install autoconf 2.13"
+    echo "ERROR: Please install autoconf 2.50 or newer"
     exit 1
 fi
 
diff -purN ../lilypond-1.5.61.jcn1/configure.in ./configure.in
--- ../lilypond-1.5.61.jcn1/configure.in        Mon Jun 17 15:06:03 2002
+++ ./configure.in      Mon Jun 17 15:45:55 2002
@@ -2,7 +2,8 @@ dnl configure.in   -*-shell-script-*-
 dnl Process this file with autoconf to produce a configure script. 
 
 # Bootstrap the init proces.  List a file identifies your package.
-AC_INIT(make/lilypond.lsm.in)
+AC_INIT
+AC_CONFIG_SRCDIR([make/lilypond.lsm.in])
 AC_CONFIG_HEADER($CONFIGFILE.h:config.hh.in)
 
 # Bootstrap StepMake configure
@@ -35,8 +36,8 @@ STEPMAKE_MAKEINFO(REQUIRED)
 STEPMAKE_PYTHON_DEVEL(REQUIRED)
 
 
-# AC_HAVE_HEADERS(limits.h malloc.h string.h unistd.h values.h)
-AC_HAVE_HEADERS(assert.h sys/stat.h)
+# AC_CHECK_HEADERS([limits.h malloc.h string.h unistd.h values.h])
+AC_CHECK_HEADERS([assert.h sys/stat.h])
 AC_HEADER_STAT
 
 AC_FUNC_MEMCMP
diff -purN ../lilypond-1.5.61.jcn1/stepmake/aclocal.m4 ./stepmake/aclocal.m4
--- ../lilypond-1.5.61.jcn1/stepmake/aclocal.m4 Mon Jun 17 15:05:54 2002
+++ ./stepmake/aclocal.m4       Mon Jun 17 15:45:57 2002
@@ -193,7 +193,7 @@ AC_DEFUN(STEPMAKE_COMPILE, [
 ])
 
 AC_DEFUN(STEPMAKE_CXX, [
-    AC_LANG_CPLUSPLUS
+    AC_LANG([C++])
     AC_PROG_CXX
     STEPMAKE_OPTIONAL_REQUIRED(CXX, c++, $1)
 
@@ -248,7 +248,8 @@ AC_DEFUN(STEPMAKE_END, [
     AC_SUBST(OPTIONAL)
     AC_SUBST(REQUIRED)
     
-    AC_OUTPUT($CONFIGFILE.make:config.make.in)
+    AC_CONFIG_FILES([$CONFIGFILE.make:config.make.in])
+AC_OUTPUT
 
     
     if test -n "$OPTIONAL"; then
@@ -291,7 +292,7 @@ AC_DEFUN(STEPMAKE_FLEX, [
     # AC_PROG_LEX
     # urg: automake 1.3: hope this doesn't break 1.2 ac_cv_pro_lex_root hack...
 
-    # AC_DECL_YYTEXT
+    # AC_PROG_LEX()
     # ugh, ugh
     ac_cv_prog_lex_root=lex.yy
     STEPMAKE_PROGS(FLEX, flex, $1)
@@ -299,7 +300,7 @@ AC_DEFUN(STEPMAKE_FLEX, [
 
 
 AC_DEFUN(STEPMAKE_FLEXLEXER, [
-    AC_HAVE_HEADERS(FlexLexer.h, true, false)
+    AC_CHECK_HEADERS([FlexLexer.h],[true],[false])
     if test $? -ne 0; then
        warn='FlexLexer.h (flex package)'
        STEPMAKE_ADD_ENTRY($1, $warn)
@@ -618,9 +619,9 @@ AC_DEFUN(STEPMAKE_KPATHSEA, [
     [kpathsea_b=$with_kpathsea])
 
     if test "$kpathsea_b" != "no"; then        
-       AC_HAVE_HEADERS(kpathsea/kpathsea.h)
+       AC_CHECK_HEADERS([kpathsea/kpathsea.h])
        AC_CHECK_LIB(kpathsea, kpse_find_file)
-       AC_CHECK_FUNCS(kpse_find_file,, AC_ERROR(Cannot find kpathsea 
functions.  You should install kpathsea; see INSTALL.txt.  Rerun ./configure 
--without-kpathsea only if kpathsea is not available for your platform.))
+       AC_CHECK_FUNCS(kpse_find_file,, AC_MSG_ERROR([Cannot find kpathsea 
functions.  You should install kpathsea; see INSTALL.txt.  Rerun ./configure 
--without-kpathsea only if kpathsea is not available for your platform.]))
     fi
     AC_MSG_CHECKING(whether to use kpathsea)
     if test "$kpathsea_b" != no; then
@@ -770,7 +771,7 @@ AC_DEFUN(STEPMAKE_PERL, [
 
 
 AC_DEFUN(STEPMAKE_PYTHON_DEVEL, [
-    AC_HAVE_HEADERS(python2.2/Python.h python2.1/Python.h python2.0/Python.h 
python2/Python.h python/Python.h python1.5/Python.h Python.h, PYTHON_HEADER=yes)
+    AC_CHECK_HEADERS([python2.2/Python.h python2.1/Python.h python2.0/Python.h 
python2/Python.h python/Python.h python1.5/Python.h 
Python.h],[PYTHON_HEADER=yes])
     if test -z "$PYTHON_HEADER"; then
        warn='python.h (python-devel, python-dev or libpython-dev package)'
        STEPMAKE_ADD_ENTRY($1, $warn)
diff -purN ../lilypond-1.5.61.jcn1/stepmake/autogen.sh ./stepmake/autogen.sh
--- ../lilypond-1.5.61.jcn1/stepmake/autogen.sh Mon Jun 17 15:08:24 2002
+++ ./stepmake/autogen.sh       Mon Jun 17 15:46:57 2002
@@ -3,23 +3,23 @@
 
 srcdir=`dirname $0`
 
-# Be paranoid: check for autoconf < 2.50
+# Be paranoid: check for autoconf >= 2.50
 # Some setups have both autoconf 2.13 and 2.50 available through
 # a wrapper script: /usr/bin/autoconf.
-# This wrapper may correctly autoselect autoconf 2.13, but it
+# This wrapper may correctly autoselect autoconf 2.50, but it
 # advertises itself as autoconf 2.13.
 # If you have such a setup, invoke this script as:
 #   autoconf=autoconf ./autogen.sh
-for i in autoconf autoconf2.13 false; do
+for i in in autoconf autoconf2.50 false; do
   version=`$i --version 2>/dev/null | head -1 | awk '{print $NF}' | awk -F. 
'{print $1 * 100 + $2}'`
-  if test "0$version" -lt 250; then
+  if test "0$version" -ge 250; then
     autoconf=$i
     break
   fi
 done
 
 if test -z "$autoconf"; then
-    echo "ERROR: Please install autoconf 2.13"
+    echo "ERROR: Please install autoconf 2.50 or newer"
     exit 1
 fi
 
diff -purN ../lilypond-1.5.61.jcn1/stepmake/configure.in ./stepmake/configure.in
--- ../lilypond-1.5.61.jcn1/stepmake/configure.in       Mon Jun 17 15:05:59 2002
+++ ./stepmake/configure.in     Mon Jun 17 15:45:57 2002
@@ -2,7 +2,8 @@ dnl configure.in   -*-shell-script-*-
 dnl Process this file with autoconf to produce a configure script. 
 
 # Bootstrap the init proces.  List a file identifies your package.
-AC_INIT(make/stepmake.lsm.in)
+AC_INIT
+AC_CONFIG_SRCDIR([make/stepmake.lsm.in])
 AC_CONFIG_HEADER($CONFIGFILE.h:config.hh.in)
 
 # Bootstrap StepMake configure
@@ -13,7 +14,7 @@ STEPMAKE_INIT
 
 # Uncomment the configuration options your package needs.
 # STEPMAKE_COMPILE
-# AC_HAVE_HEADERS(limits.h malloc.h string.h unistd.h values.h)
+# AC_CHECK_HEADERS([limits.h malloc.h string.h unistd.h values.h])
 # STEPMAKE_CXX
 # STEPMAKE_GXX
 # STEPMAKE_CXXTEMPLATE

-- 
Jan Nieuwenhuizen <address@hidden> | GNU LilyPond - The music typesetter
http://www.xs4all.nl/~jantien       | http://www.lilypond.org




reply via email to

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