From: Jan Nieuwenhuizen <janneke@gnu.org>
Date: Sun, 8 Jun 2003 12:36:11 +0000 (+0000)
Subject: * configure.in: Add unsupported check for g++ >= 3.3.
X-Git-Tag: release/1.6.11~5
X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=31881f192fe4cf7bd8eb89eecd008c220f759360;p=lilypond.git

* configure.in: Add unsupported check for g++ >= 3.3.

* stepmake/aclocal.m4 (STEPMAKE_CHECK_VERSION_UNSUPPORTED): New
function (backport.)
---

diff --git a/ChangeLog b/ChangeLog
index 827a0f2c0e..ba2087f061 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2003-06-08  Jan Nieuwenhuizen  <janneke@gnu.org>
+
+	* configure.in: Add unsupported check for g++ >= 3.3.
+
+	* stepmake/aclocal.m4 (STEPMAKE_CHECK_VERSION_UNSUPPORTED): New
+	function (backport.)
+
 2003-05-23  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
 
 	* scripts/ly2dvi.py (extra_init): add compat2 to latexoptions. 
diff --git a/configure.in b/configure.in
index 8162b5b0d4..feee8747cb 100644
--- a/configure.in
+++ b/configure.in
@@ -19,6 +19,7 @@ STEPMAKE_COMPILE
 STEPMAKE_GCC(REQUIRED, 2.8)
 STEPMAKE_CXX(REQUIRED)
 STEPMAKE_GXX(REQUIRED, 2.95)
+STEPMAKE_CHECK_VERSION_UNSUPPORTED(CXX, UNSUPPORTED, 3.3)
 STEPMAKE_CXXTEMPLATE
 STEPMAKE_LIB(REQUIRED)
 STEPMAKE_BISON(REQUIRED, 1.25)
diff --git a/stepmake/aclocal.m4 b/stepmake/aclocal.m4
index e510fdace9..30ce1ce9a5 100644
--- a/stepmake/aclocal.m4
+++ b/stepmake/aclocal.m4
@@ -93,7 +93,23 @@ AC_DEFUN(STEPMAKE_CHECK_VERSION, [
     req=`STEPMAKE_NUMERIC_VERSION($3)`
     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
+])
+
+# Check version of program ($1)
+# If version is greater than or equals unsupported ($3),
+# add entry to unsupported list ($2, 'UNSUPPORTED')
+AC_DEFUN(STEPMAKE_CHECK_VERSION_UNSUPPORTED, [
+    r="`eval echo '$'"$1"`"
+    AC_MSG_CHECKING("$r version")
+    exe=`STEPMAKE_GET_EXECUTABLE($r)`
+    ver=`STEPMAKE_GET_VERSION($exe)`
+    num=`STEPMAKE_NUMERIC_VERSION($ver)`
+    sup=`STEPMAKE_NUMERIC_VERSION($3)`
+    AC_MSG_RESULT("$ver")
+    if test "$num" -ge "$sup"; then
+	STEPMAKE_ADD_ENTRY($2, "$r < $3 (installed: $ver)")
     fi
 ])
 
@@ -280,13 +296,18 @@ AC_DEFUN(STEPMAKE_END, [
         echo "ERROR: Please install required programs: $REQUIRED"
     fi
     
-    if test -n "$OPTIONAL$REQUIRED"; then
+    if test -n "$UNSUPPORTED"; then
+	echo
+        echo "ERROR: Please use older version of programs: $UNSUPPORTED"
+    fi
+    
+    if test -n "$OPTIONAL$REQUIRED$UNSUPPORTED"; then
 	echo
 	echo "See INSTALL.txt for more information on how to build $PACKAGE_NAME"
 	echo "Remove config.cache before rerunning ./configure"
     fi
     
-    if test -n "$REQUIRED"; then
+    if test -n "$REQUIRED$UNSUPPORTED"; then
 	rm -f $srcdir/GNUmakefile
         exit 1
     fi
@@ -676,9 +697,10 @@ AC_DEFUN(STEPMAKE_KPATHSEA, [
 	AC_CHECK_LIB(kpathsea, kpse_find_file)
 	AC_CHECK_FUNCS(kpse_find_file,,kpathsea_b=no)
 	if test "$kpathsea_b" = "no"; then
-	    warn='kpathsea (libkpathsea-dev or kpathsea-devel package)
+	    warn='kpathsea (libkpathsea-dev, kpathsea-devel or tetex-devel
+   package).
    Else, please specify the location of your kpathsea using
-   --with-kpathea-include and --with-kpathsea-lib options.  You should
+   --with-kpathsea-include and --with-kpathsea-lib options.  You should
    install kpathsea; see INSTALL.txt.  Rerun ./configure
    --without-kpathsea only if kpathsea is not available for your
    platform.'