Changeset: d69d4014b645 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d69d4014b645
Modified Files:
        configure.ag
        sql/server/Makefile.ag
Branch: default
Log Message:

configure: try to work around old bison versions

Ubuntu unfortunately still ships old 2.4.1, and they will do as well in
their upcoming new release.  This version uses defines without checking
if they are defined.  A warning triggered by gcc's -Wundef.  Simply
disable this warning when bison is too old.  As soon as Ubuntu upgrades
their bison, we can undo this hack, since we won't hit this problem any
more in our nightly testing.

For what is worth, don't overwrite users YFLAGS, but set AM_YFLAGS
instead.


diffs (35 lines):

diff --git a/configure.ag b/configure.ag
--- a/configure.ag
+++ b/configure.ag
@@ -1391,9 +1391,17 @@ AC_SUBST(RUBYGEM)
 AM_CONDITIONAL(HAVE_RUBYGEM, test x"$have_rubygem" != xno -a 
x"$have_rubygem_dir" != xno)
 
 AC_PROG_YACC
-AC_DEFINE(YYENABLE_NLS, 0, [Needed to compile bison-generated code.])
 case "$YACC" in
-       bison*)  YACC="$YACC"  ;;
+       bison*)
+               # Ubuntu still comes with an ancient bison that uses defines
+               # without checking if they are defined.  This triggers a warning
+               # from gcc with -Wundef.  If we have a bison < 2.4.3, then
+               # disable the warning.
+               BISON_VER=`$YACC --version | head -n1 | sed -e 's/^.* //'`
+               if test MONETDB_VERSION_TO_NUMBER(echo $BISON_VER) -lt 
MONETDB_VERSION_TO_NUMBER(echo 2.4.3); then
+                       X_CFLAGS="`echo ${X_CFLAGS} | sed -e 's/-Wundef//g'`"
+               fi
+       ;;
        *)
                if test "x$enable_sql" = xyes; then
                        AC_MSG_ERROR([MonetDB/SQL requires bison])
diff --git a/sql/server/Makefile.ag b/sql/server/Makefile.ag
--- a/sql/server/Makefile.ag
+++ b/sql/server/Makefile.ag
@@ -23,7 +23,7 @@ INCLUDES = ../include ../common ../stora
                   ../../common/stream \
                   ../../gdk
 
-YFLAGS = -d -p sql
+AM_YFLAGS = -d -p sql
 
 lib_sqlserver = {
        NOINST
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to