OSSP CVS Repository

ossp - Difference in ossp-pkg/l2/aclocal.m4 versions 1.11 and 1.12
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/l2/aclocal.m4 1.11 -> 1.12

--- aclocal.m4   2002/03/14 15:29:23     1.11
+++ aclocal.m4   2002/07/25 07:54:51     1.12
@@ -336,3 +336,72 @@
 fi
 ])
 
+dnl ##
+dnl ##  Check for GNU Bison and GNU Flex
+dnl ##
+dnl ##  configure.in:
+dnl ##      AC_CHECK_BISON(BISON, 1.30, [1.3[0-9]|1.[4-9]])
+dnl ##      AC_CHECK_FLEX(FLEX, 2.5.6, [2.5.[6-9]|2.5.1[0-9]|2.[6-9].*])
+dnl ##
+dnl ##  Makefile.in:
+dnl ##      BISON = @BISON@
+dnl ##      FLEX  = @FLEX@
+dnl ##
+
+AC_DEFUN(AC_CHECK_BISON,[dnl
+if test ".$enable_maintainer" = .yes; then
+    bison_version=""
+    for prog in bison bison-beta bison-alpha bison-snap; do
+        AC_PATH_PROG($1, $prog, NA) 
+        if test ".$$1" != .NA; then
+            bison_version=`($$1 --version | head -1 | sed -e 's;^[[^0-9]]*\([[0-9]][[0-9.]]*\).*;\1;') 2>/dev/null`
+            case "$bison_version" in
+                $3 ) break ;;
+                * ) $1="NA"; unset ac_cv_path_$1 ;;
+            esac
+        else
+            unset ac_cv_path_$1
+        fi
+    done
+    if test ".$$1" = .NA; then
+        if test ".$bison_version" != .; then
+            AC_ERROR([found GNU Bison version $bison_version; require version >= $2])
+        else
+            AC_ERROR([require GNU Bison version >= $2])
+        fi
+    fi
+else
+    dnl # disable the use of the tools, but still allow manual override
+    test ".$$1" = . && $1=true
+    AC_PATH_PROG($1, bison, true)
+fi
+])
+
+AC_DEFUN(AC_CHECK_FLEX,[dnl
+if test ".$enable_maintainer" = .yes; then
+    flex_version=""
+    for prog in flex flex-beta flex-alpha flex-snap; do
+        AC_PATH_PROG($1, $prog, NA) 
+        if test ".$$1" != .NA; then
+            flex_version=`($$1 --version | head -1 | sed -e 's;^[[^0-9]]*\([[0-9]][[0-9.]]*\).*;\1;') 2>/dev/null`
+            case "$flex_version" in
+                $3 ) break ;;
+                * ) $1="NA"; unset ac_cv_path_$1 ;;
+            esac
+        else
+            unset ac_cv_path_$1
+        fi
+    done
+    if test ".$$1" = .NA; then
+        if test ".$flex_version" != .; then
+            AC_ERROR([found GNU Flex version $flex_version; require version >= $2])
+        else
+            AC_ERROR([require GNU Flex version >= $2])
+        fi
+    fi
+else
+    test ".$$1" = . && $1=true
+    AC_PATH_PROG($1, flex, true)
+fi
+])
+

CVSTrac 2.0.1