# Get version string from executable ($1)
AC_DEFUN(STEPMAKE_GET_VERSION, [
- "$1" --version 2>&1 | grep -v '^$' | head -1 | awk '{print $NF}'
+ ## "$1" --version 2>&1 | grep -v '^$' | head -1 | awk '{print $NF}'
+ ##
+ ## ARG.
+ ## Workaround for broken Debian gcc version string:
+ ## gcc (GCC) 3.1.1 20020606 (Debian prerelease)
+ ##
+ ## Assume, and hunt for, dotted version multiplet.
+ changequote(<<, >>)dnl
+ "$1" --version 2>&1 | grep '[0-9]\.[0-9]' | head -1 | \
+ sed -e 's/.*[^-.0-9]\([0-9][0-9]*\.[0-9][.0-9]*\).*/\1/'
+ changequote([, ])dnl
])
-# Calculate numeric version from version string ($1)
+# Calculate simplistic numeric version from version string ($1)
+# As yet, we have no need for something more elaborate.
AC_DEFUN(STEPMAKE_NUMERIC_VERSION, [
echo "$1" | awk -F. '
{
- if ([$]3) {last = [$]3}
- else {last =0}
+ if ([$]3) {three = [$]3}
+ else {three = 0}
}
- {printf "%s%s%s\n",[$]1*100, [$]2*10,last}'
+ {printf "%s%s%s\n", [$]1*100, [$]2*10, three}'
])
])
AC_DEFUN(STEPMAKE_CXX, [
- AC_LANG([C++])
+ AC_LANG_CPLUSPLUS
AC_PROG_CXX
STEPMAKE_OPTIONAL_REQUIRED(CXX, c++, $1)
AC_SUBST(OPTIONAL)
AC_SUBST(REQUIRED)
- AC_CONFIG_FILES([$CONFIGFILE.make:config.make.in])
-AC_OUTPUT
+ AC_OUTPUT($CONFIGFILE.make:config.make.in)
if test -n "$OPTIONAL"; then
# AC_PROG_LEX
# urg: automake 1.3: hope this doesn't break 1.2 ac_cv_pro_lex_root hack...
- # AC_PROG_LEX()
+ # AC_DECL_YYTEXT
# ugh, ugh
ac_cv_prog_lex_root=lex.yy
STEPMAKE_PROGS(FLEX, flex, $1)
AC_DEFUN(STEPMAKE_FLEXLEXER, [
- AC_CHECK_HEADERS([FlexLexer.h],[true],[false])
+ AC_HAVE_HEADERS(FlexLexer.h, true, false)
if test $? -ne 0; then
warn='FlexLexer.h (flex package)'
STEPMAKE_ADD_ENTRY($1, $warn)
changequote(<<, >>)dnl
GUILE_MAJOR_VERSION=`expr $guile_version : '\([0-9]*\)'`
GUILE_MINOR_VERSION=`expr $guile_version : '[0-9]*\.\([0-9]*\)'`
+ GUILE_PATCH_LEVEL=`expr $guile_version : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
changequote([, ])dnl
STEPMAKE_GUILE_FLAGS
AC_DEFINE_UNQUOTED(GUILE_MAJOR_VERSION, $GUILE_MAJOR_VERSION)
AC_DEFINE_UNQUOTED(GUILE_MINOR_VERSION, $GUILE_MINOR_VERSION)
+ AC_DEFINE_UNQUOTED(GUILE_PATCH_LEVEL, $GUILE_PATCH_LEVEL)
])
[kpathsea_b=$with_kpathsea])
if test "$kpathsea_b" != "no"; then
- AC_CHECK_HEADERS([kpathsea/kpathsea.h])
+ AC_HAVE_HEADERS(kpathsea/kpathsea.h)
AC_CHECK_LIB(kpathsea, kpse_find_file)
- 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.]))
+ 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.))
fi
AC_MSG_CHECKING(whether to use kpathsea)
if test "$kpathsea_b" != no; then
AC_DEFUN(STEPMAKE_PYTHON_DEVEL, [
- 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])
+ 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)
if test -z "$PYTHON_HEADER"; then
warn='python.h (python-devel, python-dev or libpython-dev package)'
STEPMAKE_ADD_ENTRY($1, $warn)