]> granicus.if.org Git - libnl/commitdiff
Updated configure.in to make sure bison and lex are installed.
authorRichard Marshall <rgm@linux.com>
Tue, 20 Nov 2012 04:20:22 +0000 (20:20 -0800)
committerRichard Marshall <rgm@linux.com>
Tue, 20 Nov 2012 04:33:26 +0000 (20:33 -0800)
Fixes issue #7

configure.in

index 9a190c2754f9818d964b70e52f442754388bdb34..a06bee190c259dc353183eb9d57661ac3689c3e3 100644 (file)
@@ -68,7 +68,7 @@ AM_PROG_CC_C_O
 AC_PROG_INSTALL
 AM_PROG_LIBTOOL
 AM_PROG_LEX
-AC_PROG_YACC
+AC_CHECK_PROGS(YACC, 'bison -y')
 
 AC_C_CONST
 AC_C_INLINE
@@ -118,6 +118,19 @@ python/netlink/route/Makefile
 include/netlink/version.h
 ])
 
+ac_errcount=0
+if test -z "$YACC"; then
+    AC_MSG_WARN(bison not found. Please install before continuing.)
+    ac_errcount=$((ac_errcount + 1))
+fi
+if test -z "$LEXLIB"; then
+    AC_MSG_WARN(flex or lex not found. Please install before continuing.)
+    ac_errcount=$((ac_errcount + 1))
+fi
+if test $ac_errcount -gt 0; then
+    AC_MSG_ERROR(Required packages are missing. Please install them and rerun ./configure)
+fi
+
 AC_OUTPUT
 
 echo "-------------------------------------------------------------------------------"