Build Fix -- compatibility issue with newer autoconf
[sxemacs] / m4 / sxe-bldchain-progs.m4
index c7f9cdb..3bb5f35 100644 (file)
@@ -12,12 +12,25 @@ AC_DEFUN([SXE_PROG_MAKEINFO], [dnl
                # This should be a good enough error message even in complement
                # to the libtool missing
                AC_MSG_ERROR([
-Could not find the makeinfo program. Check your PATH or install the texinfo package. 
+Could not find the makeinfo program. Check your PATH or install the texinfo package.
 For more details see the INSTALL and PROBLEMS files.
 SXEmacs generates the documentation during the build process.])
                exit 1
        fi
+       SXE_MSG_CHECKING([makeinfo version])
+        makeinfo_ver=`eval "$MAKEINFO" --version 2> /dev/null | head -n 1`
+       SXE_MSG_RESULT([${makeinfo_ver}])
+       AC_DEFINE_UNQUOTED(MAKEINFO_VERSION, "${makeinfo_ver}",
+                         [the makeinfo command version])
+        case `echo "$makeinfo_ver" | $SED -e 's/^.* \([[0-9.]]*\).*/\1/'`  in
+           [[1234]].*)
+               AC_MSG_ERROR([
+Your makeinfo program is too old. Please install 5.x or later.])
+               exit 1
+           ;;
+        esac
        AC_SUBST(MAKEINFO)
+       AC_SUBST(MAKEINFO_VERSION)
 ])dnl SXE_PROG_MAKEINFO
 
 
@@ -57,7 +70,7 @@ AC_DEFUN([SXE_PROG_BISON], [
                SXE_MSG_CHECKING([if bison is recent enough])
                sxe_cv_feat_bison_version="$(${BISON} --version | head -n1)"
                case "$sxe_cv_feat_bison_version" in
-               *\ 1.875 | *\ 2.*)
+               *\ 2.7* | *\ 3.*)
                        ;;
                *)
                        have_bison="no"
@@ -118,8 +131,8 @@ AC_DEFUN([SXE_CHECK_BUILDCHAIN], [dnl
        SXE_CHECK_AUTOTOOLS
        SXE_CHECK_USER_VARS
 
-dnl    dnl Soon ...
-dnl    dnl m4_ifdef([LT_INIT], [LT_INIT], [AC_PROG_LIBTOOL])
+dnl    dnl Soon ...
+dnl    dnl m4_ifdef([LT_INIT], [LT_INIT], [AC_PROG_LIBTOOL])
        AC_PROG_RANLIB
        SXE_PROG_AR
        SXE_PROG_MAKEINFO