From 8438b824fb221159742957c2eeab761effe73be4 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Sat, 16 Nov 2002 15:51:44 +0000 Subject: [PATCH] * GNUmakefile.in: config.h message fix. * autogen.sh: * aclocal.m4: Regenerate. * configure.in: * config.make.in: * stepmake/config.make.in: * stepmake/configure.in: * stepmake/autogen.sh: * stepmake/aclocal.m4: Update for autoconf 2.56. --- ChangeLog | 14 ++++++ GNUmakefile.in | 4 +- aclocal.m4 | 102 ++++++++++++++++++---------------------- autogen.sh | 14 +++--- config.make.in | 2 +- configure.in | 20 +++++--- stepmake/aclocal.m4 | 99 ++++++++++++++++++-------------------- stepmake/autogen.sh | 12 ++--- stepmake/config.make.in | 2 +- stepmake/configure.in | 16 +++++-- 10 files changed, 149 insertions(+), 136 deletions(-) diff --git a/ChangeLog b/ChangeLog index a9aa005ef3..26cebbed80 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2002-11-16 Jan Nieuwenhuizen + + * GNUmakefile.in: config.h message fix. + + * autogen.sh: + * aclocal.m4: Regenerate. + + * configure.in: + * config.make.in: + * stepmake/config.make.in: + * stepmake/configure.in: + * stepmake/autogen.sh: + * stepmake/aclocal.m4: Update for autoconf 2.56. + 2002-11-16 Heikki Junes * Documentation/topdocs/INSTALL.texi: instructions for an user how diff --git a/GNUmakefile.in b/GNUmakefile.in index fd2292d8aa..fb3ad034c9 100644 --- a/GNUmakefile.in +++ b/GNUmakefile.in @@ -170,8 +170,8 @@ $(config_h): configure.in aclocal.m4 # and they blindly run "cvs update; make". # @echo - @echo ' *** config.h is out of date' + @echo ' *** $(config_h) is out of date' @echo ' *** Remove it and rerun autogen:' - @echo ' rm config.h; ./autogen.sh' + @echo ' rm $(config_h); ./autogen.sh' @echo @false diff --git a/aclocal.m4 b/aclocal.m4 index 198b6ba44d..8f0d8a0605 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,7 +1,4 @@ dnl aclocal.m4 -*-shell-script-*- -dnl WARNING WARNING WARNING -dnl do not edit! this is aclocal.m4, generated from /users/hanwen/usr/src/lilypond/stepmake/aclocal.m4 -dnl aclocal.m4 -*-shell-script-*- dnl StepMake subroutines for configure.in @@ -88,15 +85,14 @@ AC_DEFUN(STEPMAKE_CHECK_SEARCH_RESULT, [ # add entry to missing-list ($2, one of 'OPTIONAL', 'REQUIRED'). AC_DEFUN(STEPMAKE_CHECK_VERSION, [ r="`eval echo '$'"$1"`" - AC_MSG_CHECKING("$r version") - #exe=`STEPMAKE_GET_EXECUTABLE($r)` + AC_MSG_CHECKING([$r version]) exe=`STEPMAKE_GET_EXECUTABLE($r)` ver=`STEPMAKE_GET_VERSION($exe)` num=`STEPMAKE_NUMERIC_VERSION($ver)` req=`STEPMAKE_NUMERIC_VERSION($3)` - AC_MSG_RESULT("$ver") + AC_MSG_RESULT([$ver]) if test "$num" -lt "$req"; then - STEPMAKE_ADD_ENTRY($2, "$r $3 (installed: $ver)") + STEPMAKE_ADD_ENTRY($2, ["$r $3 (installed: $ver)"]) fi ]) @@ -207,7 +203,7 @@ AC_DEFUN(STEPMAKE_COMPILE, [ ]) AC_DEFUN(STEPMAKE_CXX, [ - AC_LANG_CPLUSPLUS + AC_LANG([C++]) AC_PROG_CXX STEPMAKE_OPTIONAL_REQUIRED(CXX, c++, $1) @@ -225,12 +221,10 @@ AC_DEFUN(STEPMAKE_CXX, [ AC_DEFUN(STEPMAKE_CXXTEMPLATE, [ AC_CACHE_CHECK([whether explicit instantiation is needed], lily_cv_need_explicit_instantiation, - AC_TRY_LINK([ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ template struct foo { static int baz; }; template int foo::baz = 1; - ], [ return foo::baz; ], - lily_cv_need_explicit_instantiation=no, - lily_cv_need_explicit_instantiation=yes)) + ]], [[ return foo::baz; ]])],[lily_cv_need_explicit_instantiation=no],[lily_cv_need_explicit_instantiation=yes])) if test x"$lily_cv_need_explicit_instantiation"x = x"yes"x; then AC_DEFINE(NEED_EXPLICIT_INSTANTIATION) fi @@ -248,7 +242,7 @@ AC_DEFUN(STEPMAKE_DATADIR, [ package_datadir=$datadir/$package local_package_datadir=$package_datadir/$FULL_VERSION - build_package_datadir=$builddir/share/$package + build_package_datadir=$ugh_ugh_autoconf250_builddir/share/$package DATADIR=`echo ${datadir} | sed "s!\\\${prefix}!$presome!"` PACKAGE_DATADIR=`echo ${package_datadir} | sed "s!\\\${prefix}!$presome!"` @@ -259,10 +253,10 @@ AC_DEFUN(STEPMAKE_DATADIR, [ AC_SUBST(package_datadir) AC_SUBST(local_package_datadir) AC_SUBST(build_package_datadir) - AC_DEFINE_UNQUOTED(DATADIR, "${DATADIR}") - AC_DEFINE_UNQUOTED(PACKAGE_DATADIR, "${PACKAGE_DATADIR}") - AC_DEFINE_UNQUOTED(LOCAL_PACKAGE_DATADIR, "${LOCAL_PACKAGE_DATADIR}") - AC_DEFINE_UNQUOTED(BUILD_PACKAGE_DATADIR, "${BUILD_PACKAGE_DATADIR}") + AC_DEFINE_UNQUOTED(DATADIR, ["${DATADIR}"]) + AC_DEFINE_UNQUOTED(PACKAGE_DATADIR, ["${PACKAGE_DATADIR}"]) + AC_DEFINE_UNQUOTED(LOCAL_PACKAGE_DATADIR, ["${LOCAL_PACKAGE_DATADIR}"]) + AC_DEFINE_UNQUOTED(BUILD_PACKAGE_DATADIR, ["${BUILD_PACKAGE_DATADIR}"]) ]) @@ -270,7 +264,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 @@ -313,7 +308,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) @@ -321,7 +316,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) @@ -347,7 +342,7 @@ AC_DEFUN(STEPMAKE_GETTEXT, [ LOCALEDIR=`echo ${localedir} | sed "s!\\\${prefix}!$presome!"` AC_SUBST(localedir) - AC_DEFINE_UNQUOTED(LOCALEDIR, "${LOCALEDIR}") + AC_DEFINE_UNQUOTED(LOCALEDIR, ["${LOCALEDIR}"]) AC_CHECK_LIB(intl, gettext) AC_CHECK_FUNCS(gettext) ]) @@ -379,10 +374,10 @@ AC_DEFUN(STEPMAKE_GUILE, [ AC_DEFUN([STEPMAKE_GUILE_FLAGS], [ exe=`STEPMAKE_GET_EXECUTABLE($guile_config)` if test -x $exe; then - AC_MSG_CHECKING("guile compile flags") + AC_MSG_CHECKING([guile compile flags]) GUILE_CFLAGS="`$guile_config compile`" AC_MSG_RESULT($GUILE_CFLAGS) - AC_MSG_CHECKING("guile link flags") + AC_MSG_CHECKING([guile link flags]) GUILE_LDFLAGS="`$guile_config link`" AC_MSG_RESULT($GUILE_LDFLAGS) fi @@ -393,12 +388,12 @@ AC_DEFUN([STEPMAKE_GUILE_FLAGS], [ AC_DEFUN(STEPMAKE_GUILE_DEVEL, [ ## First, let's just see if we can find Guile at all. - AC_MSG_CHECKING("for guile-config") + AC_MSG_CHECKING([for guile-config]) for guile_config in guile-config $target-guile-config $build-guile-config; do - AC_MSG_RESULT("$guile_config") + AC_MSG_RESULT([$guile_config]) if ! $guile_config --version > /dev/null 2>&1 ; then - AC_MSG_WARN("cannot execute $guile_config") - AC_MSG_CHECKING("if we are cross compiling") + AC_MSG_WARN([cannot execute $guile_config]) + AC_MSG_CHECKING([if we are cross compiling]) GUILE_CONFIG='echo no guile-config' else GUILE_CONFIG=$guile_config @@ -443,6 +438,7 @@ AC_DEFUN(STEPMAKE_GXX, [ AC_DEFUN(STEPMAKE_INIT, [ + AC_PREREQ(2.50) . $srcdir/VERSION FULL_VERSION=$MAJOR_VERSION.$MINOR_VERSION.$PATCH_LEVEL if test x$MY_PATCH_LEVEL != x; then @@ -478,32 +474,33 @@ AC_DEFUN(STEPMAKE_INIT, [ AC_MSG_CHECKING(builddir) - builddir="`pwd`" - + ugh_ugh_autoconf250_builddir="`pwd`" + if test "$srcdir" = "."; then srcdir_build=yes else srcdir_build=no - package_builddir="`dirname $builddir`" + package_builddir="`dirname $ugh_ugh_autoconf250_builddir`" package_srcdir="`dirname $srcdir`" fi - AC_MSG_RESULT($builddir) + AC_MSG_RESULT($ugh_ugh_autoconf250_builddir) (cd stepmake 2>/dev/null || mkdir stepmake) (cd stepmake; rm -f bin; ln -s ../$srcdir/bin .) - AC_CONFIG_AUX_DIR(bin) +# only possible with autoconf < 2.50 -- hardcoded in configure.in +# AC_CONFIG_AUX_DIR(bin) stepmake=stepmake else AC_MSG_RESULT($PACKAGE) AC_MSG_CHECKING(builddir) - builddir="`pwd`" + ugh_ugh_autoconf250_builddir="`pwd`" if test "$srcdir" = "."; then srcdir_build=yes else srcdir_build=no fi - AC_MSG_RESULT($builddir) + AC_MSG_RESULT($ugh_ugh_autoconf250_builddir) AC_MSG_CHECKING(for stepmake) # Check for installed stepmake @@ -511,30 +508,23 @@ AC_DEFUN(STEPMAKE_INIT, [ AC_MSG_RESULT($stepmake) else stepmake="`cd $srcdir/stepmake; pwd`" - AC_MSG_RESULT($srcdir/stepmake ($datadir/stepmake not found)) + AC_MSG_RESULT([$srcdir/stepmake ($datadir/stepmake not found)]) fi - AC_CONFIG_AUX_DIR(\ - $HOME/usr/local/share/stepmake/bin\ - $HOME/usr/local/lib/stepmake/bin\ - $HOME/usr/share/stepmake/bin\ - $HOME/usr/lib/stepmake/bin\ - /usr/local/share/stepmake/bin\ - /usr/local/lib/stepmake/bin\ - /usr/share/stepmake/bin\ - /usr/lib/stepmake/bin\ - stepmake/bin\ - $srcdir/stepmake/bin\ - ) - fi - - AC_SUBST(builddir) +# only possible with autoconf < 2.50 -- hardcoded in configure.in +# AC_CONFIG_AUX_DIR(\ +# stepmake/bin\ +# $srcdir/stepmake/bin\ +# ) + fi + + AC_SUBST(ugh_ugh_autoconf250_builddir) AC_SUBST(stepmake) AC_SUBST(package) AC_SUBST(PACKAGE) AC_SUBST(PACKAGE_NAME) - AC_DEFINE_UNQUOTED(PACKAGE, "${PACKAGE_NAME}") - AC_DEFINE_UNQUOTED(TOPLEVEL_VERSION, "${FULL_VERSION}") + AC_DEFINE_UNQUOTED(PACKAGE, ["${PACKAGE_NAME}"]) + AC_DEFINE_UNQUOTED(TOPLEVEL_VERSION, ["${FULL_VERSION}"]) if test -z "$package_depth"; then package_depth="." @@ -612,8 +602,8 @@ AC_DEFUN(STEPMAKE_INIT, [ AC_SUBST(LN) AC_SUBST(LN_S) AC_SUBST(INSTALL) - AC_DEFINE_UNQUOTED(DIRSEP, '${DIRSEP}') - AC_DEFINE_UNQUOTED(PATHSEP, '${PATHSEP}') + AC_DEFINE_UNQUOTED(DIRSEP, ["${DIRSEP}"]) + AC_DEFINE_UNQUOTED(PATHSEP, ["${PATHSEP}"]) AC_SUBST(DIRSEP) AC_SUBST(PATHSEP) AC_SUBST(ROOTSEP) @@ -652,7 +642,7 @@ 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,,kpathsea_b=no) if test "$kpathsea_b" = "no"; then @@ -813,7 +803,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 --git a/autogen.sh b/autogen.sh index a9b37f531f..f70572727e 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,6 +1,6 @@ #!/bin/sh # WARNING WARNING WARNING -# do not edit! this is autogen.sh, generated from stepmake/autogen.sh +# do not edit! this is autogen.sh, generated from /home/fred/lily/stepmake/autogen.sh #!/bin/sh # Run this to generate configure and initial GNUmakefiles @@ -12,23 +12,23 @@ if [ stepmake/autogen.sh -nt autogen.sh ]; then exec ./autogen.sh fi -# Be paranoid: check for autoconf == 2.13 -# Some setups have both autoconf 2.13 and 2.50 available through +# Be paranoid: check for autoconf >= 2.50 +# Some setups have both autoconf 2.13 and 2.5x available through # a wrapper script: /usr/bin/autoconf. # This wrapper may incorrectly autoselect autoconf 2.50, but it # advertises itself as autoconf 2.13. # If you have such a setup, invoke this script as: -# autoconf=autoconf2.13 ./autogen.sh -for i in autoconf-2.13 autoconf2.13 autoconf false; do +# autoconf=autoconf2.50 ./autogen.sh +for i in autoconf2.50 autoconf-2.50 autoconf false; do version=`$i --version 2>/dev/null | head -1 | awk '{print $NF}' | awk -F. '{print $1 * 100 + $2}'` - if test "0$version" -eq 213; 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 --git a/config.make.in b/config.make.in index 342408694c..f49b025861 100644 --- a/config.make.in +++ b/config.make.in @@ -19,7 +19,7 @@ PACKAGE_NAME = @PACKAGE_NAME@ prefix = $(DESTDIR)@prefix@ exec_prefix = @exec_prefix@ -builddir = @builddir@ +builddir = @ugh_ugh_autoconf250_builddir@ build_lilypond_datadir = @build_package_datadir@ bindir = @bindir@ datadir = @datadir@ diff --git a/configure.in b/configure.in index c4f1a06d85..7acae1843d 100644 --- a/configure.in +++ b/configure.in @@ -1,13 +1,21 @@ 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_CONFIG_HEADER($CONFIGFILE.h:config.hh.in) +# Bootstrap the init proces. +AC_INIT # Bootstrap StepMake configure +# For user package: +AC_CONFIG_AUX_DIR([stepmake/bin]) +# For stepmake package: +# AC_CONFIG_AUX_DIR(bin) STEPMAKE_INIT +# List a file that identifies your package. +AC_CONFIG_SRCDIR([make/lilypond.lsm.in]) +# Move to aclocal.m4? +AC_CONFIG_HEADER([$CONFIGFILE.h:config.hh.in]) + # For all packages except the StepMake package itself AC_CONFIG_SUBDIRS(stepmake) @@ -35,12 +43,12 @@ STEPMAKE_MAKEINFO(REQUIRED) STEPMAKE_PYTHON_DEVEL(REQUIRED) -AC_HAVE_HEADERS(assert.h sys/stat.h sstream) +AC_CHECK_HEADERS([assert.h sys/stat.h sstream]) AC_HEADER_STAT AC_FUNC_MEMCMP AC_FUNC_VPRINTF -AC_CHECK_FUNCS(memmem snprintf vsnprintf gettext isinf) +AC_CHECK_FUNCS([memmem snprintf vsnprintf gettext isinf]) ## Optional tools for building documentation, website, extra fonts. @@ -77,5 +85,5 @@ Type: make$mc install to install LilyPond make$mc help to see all possible targets -Do not worry if ./Documentation or ./mutopia should not build. +Do not worry if ./Documentation should not build. EOF diff --git a/stepmake/aclocal.m4 b/stepmake/aclocal.m4 index 603ea8b49d..8f0d8a0605 100644 --- a/stepmake/aclocal.m4 +++ b/stepmake/aclocal.m4 @@ -85,15 +85,14 @@ AC_DEFUN(STEPMAKE_CHECK_SEARCH_RESULT, [ # add entry to missing-list ($2, one of 'OPTIONAL', 'REQUIRED'). AC_DEFUN(STEPMAKE_CHECK_VERSION, [ r="`eval echo '$'"$1"`" - AC_MSG_CHECKING("$r version") - #exe=`STEPMAKE_GET_EXECUTABLE($r)` + AC_MSG_CHECKING([$r version]) exe=`STEPMAKE_GET_EXECUTABLE($r)` ver=`STEPMAKE_GET_VERSION($exe)` num=`STEPMAKE_NUMERIC_VERSION($ver)` req=`STEPMAKE_NUMERIC_VERSION($3)` - AC_MSG_RESULT("$ver") + AC_MSG_RESULT([$ver]) if test "$num" -lt "$req"; then - STEPMAKE_ADD_ENTRY($2, "$r $3 (installed: $ver)") + STEPMAKE_ADD_ENTRY($2, ["$r $3 (installed: $ver)"]) fi ]) @@ -204,7 +203,7 @@ AC_DEFUN(STEPMAKE_COMPILE, [ ]) AC_DEFUN(STEPMAKE_CXX, [ - AC_LANG_CPLUSPLUS + AC_LANG([C++]) AC_PROG_CXX STEPMAKE_OPTIONAL_REQUIRED(CXX, c++, $1) @@ -222,12 +221,10 @@ AC_DEFUN(STEPMAKE_CXX, [ AC_DEFUN(STEPMAKE_CXXTEMPLATE, [ AC_CACHE_CHECK([whether explicit instantiation is needed], lily_cv_need_explicit_instantiation, - AC_TRY_LINK([ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ template struct foo { static int baz; }; template int foo::baz = 1; - ], [ return foo::baz; ], - lily_cv_need_explicit_instantiation=no, - lily_cv_need_explicit_instantiation=yes)) + ]], [[ return foo::baz; ]])],[lily_cv_need_explicit_instantiation=no],[lily_cv_need_explicit_instantiation=yes])) if test x"$lily_cv_need_explicit_instantiation"x = x"yes"x; then AC_DEFINE(NEED_EXPLICIT_INSTANTIATION) fi @@ -245,7 +242,7 @@ AC_DEFUN(STEPMAKE_DATADIR, [ package_datadir=$datadir/$package local_package_datadir=$package_datadir/$FULL_VERSION - build_package_datadir=$builddir/share/$package + build_package_datadir=$ugh_ugh_autoconf250_builddir/share/$package DATADIR=`echo ${datadir} | sed "s!\\\${prefix}!$presome!"` PACKAGE_DATADIR=`echo ${package_datadir} | sed "s!\\\${prefix}!$presome!"` @@ -256,10 +253,10 @@ AC_DEFUN(STEPMAKE_DATADIR, [ AC_SUBST(package_datadir) AC_SUBST(local_package_datadir) AC_SUBST(build_package_datadir) - AC_DEFINE_UNQUOTED(DATADIR, "${DATADIR}") - AC_DEFINE_UNQUOTED(PACKAGE_DATADIR, "${PACKAGE_DATADIR}") - AC_DEFINE_UNQUOTED(LOCAL_PACKAGE_DATADIR, "${LOCAL_PACKAGE_DATADIR}") - AC_DEFINE_UNQUOTED(BUILD_PACKAGE_DATADIR, "${BUILD_PACKAGE_DATADIR}") + AC_DEFINE_UNQUOTED(DATADIR, ["${DATADIR}"]) + AC_DEFINE_UNQUOTED(PACKAGE_DATADIR, ["${PACKAGE_DATADIR}"]) + AC_DEFINE_UNQUOTED(LOCAL_PACKAGE_DATADIR, ["${LOCAL_PACKAGE_DATADIR}"]) + AC_DEFINE_UNQUOTED(BUILD_PACKAGE_DATADIR, ["${BUILD_PACKAGE_DATADIR}"]) ]) @@ -267,7 +264,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 @@ -310,7 +308,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) @@ -318,7 +316,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) @@ -344,7 +342,7 @@ AC_DEFUN(STEPMAKE_GETTEXT, [ LOCALEDIR=`echo ${localedir} | sed "s!\\\${prefix}!$presome!"` AC_SUBST(localedir) - AC_DEFINE_UNQUOTED(LOCALEDIR, "${LOCALEDIR}") + AC_DEFINE_UNQUOTED(LOCALEDIR, ["${LOCALEDIR}"]) AC_CHECK_LIB(intl, gettext) AC_CHECK_FUNCS(gettext) ]) @@ -376,10 +374,10 @@ AC_DEFUN(STEPMAKE_GUILE, [ AC_DEFUN([STEPMAKE_GUILE_FLAGS], [ exe=`STEPMAKE_GET_EXECUTABLE($guile_config)` if test -x $exe; then - AC_MSG_CHECKING("guile compile flags") + AC_MSG_CHECKING([guile compile flags]) GUILE_CFLAGS="`$guile_config compile`" AC_MSG_RESULT($GUILE_CFLAGS) - AC_MSG_CHECKING("guile link flags") + AC_MSG_CHECKING([guile link flags]) GUILE_LDFLAGS="`$guile_config link`" AC_MSG_RESULT($GUILE_LDFLAGS) fi @@ -390,12 +388,12 @@ AC_DEFUN([STEPMAKE_GUILE_FLAGS], [ AC_DEFUN(STEPMAKE_GUILE_DEVEL, [ ## First, let's just see if we can find Guile at all. - AC_MSG_CHECKING("for guile-config") + AC_MSG_CHECKING([for guile-config]) for guile_config in guile-config $target-guile-config $build-guile-config; do - AC_MSG_RESULT("$guile_config") + AC_MSG_RESULT([$guile_config]) if ! $guile_config --version > /dev/null 2>&1 ; then - AC_MSG_WARN("cannot execute $guile_config") - AC_MSG_CHECKING("if we are cross compiling") + AC_MSG_WARN([cannot execute $guile_config]) + AC_MSG_CHECKING([if we are cross compiling]) GUILE_CONFIG='echo no guile-config' else GUILE_CONFIG=$guile_config @@ -440,6 +438,7 @@ AC_DEFUN(STEPMAKE_GXX, [ AC_DEFUN(STEPMAKE_INIT, [ + AC_PREREQ(2.50) . $srcdir/VERSION FULL_VERSION=$MAJOR_VERSION.$MINOR_VERSION.$PATCH_LEVEL if test x$MY_PATCH_LEVEL != x; then @@ -475,32 +474,33 @@ AC_DEFUN(STEPMAKE_INIT, [ AC_MSG_CHECKING(builddir) - builddir="`pwd`" - + ugh_ugh_autoconf250_builddir="`pwd`" + if test "$srcdir" = "."; then srcdir_build=yes else srcdir_build=no - package_builddir="`dirname $builddir`" + package_builddir="`dirname $ugh_ugh_autoconf250_builddir`" package_srcdir="`dirname $srcdir`" fi - AC_MSG_RESULT($builddir) + AC_MSG_RESULT($ugh_ugh_autoconf250_builddir) (cd stepmake 2>/dev/null || mkdir stepmake) (cd stepmake; rm -f bin; ln -s ../$srcdir/bin .) - AC_CONFIG_AUX_DIR(bin) +# only possible with autoconf < 2.50 -- hardcoded in configure.in +# AC_CONFIG_AUX_DIR(bin) stepmake=stepmake else AC_MSG_RESULT($PACKAGE) AC_MSG_CHECKING(builddir) - builddir="`pwd`" + ugh_ugh_autoconf250_builddir="`pwd`" if test "$srcdir" = "."; then srcdir_build=yes else srcdir_build=no fi - AC_MSG_RESULT($builddir) + AC_MSG_RESULT($ugh_ugh_autoconf250_builddir) AC_MSG_CHECKING(for stepmake) # Check for installed stepmake @@ -508,30 +508,23 @@ AC_DEFUN(STEPMAKE_INIT, [ AC_MSG_RESULT($stepmake) else stepmake="`cd $srcdir/stepmake; pwd`" - AC_MSG_RESULT($srcdir/stepmake ($datadir/stepmake not found)) + AC_MSG_RESULT([$srcdir/stepmake ($datadir/stepmake not found)]) fi - AC_CONFIG_AUX_DIR(\ - $HOME/usr/local/share/stepmake/bin\ - $HOME/usr/local/lib/stepmake/bin\ - $HOME/usr/share/stepmake/bin\ - $HOME/usr/lib/stepmake/bin\ - /usr/local/share/stepmake/bin\ - /usr/local/lib/stepmake/bin\ - /usr/share/stepmake/bin\ - /usr/lib/stepmake/bin\ - stepmake/bin\ - $srcdir/stepmake/bin\ - ) - fi - - AC_SUBST(builddir) +# only possible with autoconf < 2.50 -- hardcoded in configure.in +# AC_CONFIG_AUX_DIR(\ +# stepmake/bin\ +# $srcdir/stepmake/bin\ +# ) + fi + + AC_SUBST(ugh_ugh_autoconf250_builddir) AC_SUBST(stepmake) AC_SUBST(package) AC_SUBST(PACKAGE) AC_SUBST(PACKAGE_NAME) - AC_DEFINE_UNQUOTED(PACKAGE, "${PACKAGE_NAME}") - AC_DEFINE_UNQUOTED(TOPLEVEL_VERSION, "${FULL_VERSION}") + AC_DEFINE_UNQUOTED(PACKAGE, ["${PACKAGE_NAME}"]) + AC_DEFINE_UNQUOTED(TOPLEVEL_VERSION, ["${FULL_VERSION}"]) if test -z "$package_depth"; then package_depth="." @@ -609,8 +602,8 @@ AC_DEFUN(STEPMAKE_INIT, [ AC_SUBST(LN) AC_SUBST(LN_S) AC_SUBST(INSTALL) - AC_DEFINE_UNQUOTED(DIRSEP, '${DIRSEP}') - AC_DEFINE_UNQUOTED(PATHSEP, '${PATHSEP}') + AC_DEFINE_UNQUOTED(DIRSEP, ["${DIRSEP}"]) + AC_DEFINE_UNQUOTED(PATHSEP, ["${PATHSEP}"]) AC_SUBST(DIRSEP) AC_SUBST(PATHSEP) AC_SUBST(ROOTSEP) @@ -649,7 +642,7 @@ 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,,kpathsea_b=no) if test "$kpathsea_b" = "no"; then @@ -810,7 +803,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 --git a/stepmake/autogen.sh b/stepmake/autogen.sh index e3ee7da81d..36d6b4939f 100755 --- a/stepmake/autogen.sh +++ b/stepmake/autogen.sh @@ -9,23 +9,23 @@ if [ stepmake/autogen.sh -nt autogen.sh ]; then exec ./autogen.sh fi -# Be paranoid: check for autoconf == 2.13 -# Some setups have both autoconf 2.13 and 2.50 available through +# Be paranoid: check for autoconf >= 2.50 +# Some setups have both autoconf 2.13 and 2.5x available through # a wrapper script: /usr/bin/autoconf. # This wrapper may incorrectly autoselect autoconf 2.50, but it # advertises itself as autoconf 2.13. # If you have such a setup, invoke this script as: -# autoconf=autoconf2.13 ./autogen.sh -for i in autoconf-2.13 autoconf2.13 autoconf false; do +# autoconf=autoconf2.50 ./autogen.sh +for i in autoconf2.50 autoconf-2.50 autoconf false; do version=`$i --version 2>/dev/null | head -1 | awk '{print $NF}' | awk -F. '{print $1 * 100 + $2}'` - if test "0$version" -eq 213; 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 --git a/stepmake/config.make.in b/stepmake/config.make.in index 7fb382ef89..ebe7360661 100644 --- a/stepmake/config.make.in +++ b/stepmake/config.make.in @@ -21,7 +21,7 @@ CONFIGSUFFIX = @CONFIGSUFFIX@ MAKEINFO = @MAKEINFO@ ICFLAGS = @ICFLAGS@ ILDFLAGS = @ILDFLAGS@ -builddir = @builddir@ +builddir = @ugh_ugh_autoconf250_builddir@ libdir = @libdir@ prefix = @prefix@ srcdir = @srcdir@ diff --git a/stepmake/configure.in b/stepmake/configure.in index a1be8758f8..3900ffd9fd 100644 --- a/stepmake/configure.in +++ b/stepmake/configure.in @@ -1,13 +1,21 @@ 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_CONFIG_HEADER($CONFIGFILE.h:config.hh.in) +# Bootstrap the init proces. +AC_INIT # Bootstrap StepMake configure +# For user package: +# AC_CONFIG_AUX_DIR(stepmake/bin) +# For stepmake package: +AC_CONFIG_AUX_DIR(bin) STEPMAKE_INIT +# List a file that identifies your package. +AC_CONFIG_SRCDIR([make/stepmake.lsm.in]) +# Move to aclocal.m4? +AC_CONFIG_HEADER([$CONFIGFILE.h:config.hh.in]) + # For all packages except the StepMake package itself # AC_CONFIG_SUBDIRS(stepmake) @@ -15,7 +23,7 @@ CC=echo AC_SUBST(CC) # 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 -- 2.39.2