Date: Thursday, March 22, 2007 @ 19:12:27
Author: marc
Path: /cvsroot/carob/libmysequoia
Modified: configure.ac (1.42 -> 1.43)
Now actually using the new SEQUOIA_AC_MYSQL_VERSION_ID_AT_LEAST
instead of grepping/awking
--------------+
configure.ac | 37 ++++++++++++++++++++++---------------
1 files changed, 22 insertions(+), 15 deletions(-)
Index: libmysequoia/configure.ac
diff -u libmysequoia/configure.ac:1.42 libmysequoia/configure.ac:1.43
--- libmysequoia/configure.ac:1.42 Thu Mar 22 17:17:30 2007
+++ libmysequoia/configure.ac Thu Mar 22 19:12:27 2007
@@ -162,7 +162,7 @@
AC_DEFUN([SEQUOIA_AC_MYSQL_VERSION_ID_AT_LEAST],
- [ AC_MSG_CHECKING([[for MYSQL_VERSION_ID at least]] $1)
+ [ AC_MSG_CHECKING([[if MYSQL_VERSION_ID is at least]] $1)
AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include "mysql/mysql_version.h"
]],
[[return !(MYSQL_VERSION_ID >= ]] $1 [[ ); ]])],
@@ -175,26 +175,33 @@
])
-AC_MSG_CHECKING([for MySQL version])
-mysql_version=`grep MYSQL_VERSION_ID $mysql_header_dir/mysql_version.h | awk
'{printf $3;}'`
-if test $mysql_version -ge 50000
-then
- major_version=15
-elif test $mysql_version -ge 40100
-then
- major_version=14
-elif test $mysql_version -ge 40000
-then
- major_version=12
-else
- AC_MSG_ERROR([Unknow MySQL version.])
+SEQUOIA_AC_MYSQL_VERSION_ID_AT_LEAST(50000)
+if test x"$sequoia_ac_mysql_at_least" = xyes
+then major_version=15
+fi
+
+if test x"$sequoia_ac_mysql_at_least" = xno; then
+ SEQUOIA_AC_MYSQL_VERSION_ID_AT_LEAST(40100)
+ if test x"$sequoia_ac_mysql_at_least" = xyes
+ then major_version=14; fi
+fi
+
+if test x"$sequoia_ac_mysql_at_least" = xno; then
+ SEQUOIA_AC_MYSQL_VERSION_ID_AT_LEAST(40000)
+ if test x"$sequoia_ac_mysql_at_least" = xyes
+ then major_version=12; fi
+fi
+
+if test x"$sequoia_ac_mysql_at_least" = xno
+then AC_MSG_ERROR([[MYSQL_VERSION_ID too old (< 40000)]])
fi
-AC_MSG_RESULT([$mysql_version])
# See the libtool docs for information on how to do shared lib versions.
SHARED_LIB_VERSION=$major_version:0:0
AC_SUBST(SHARED_LIB_VERSION)
+AC_MSG_NOTICE([[Compiling libmysequoia $major_version.0.0]])
+
# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([stdlib.h string.h])
_______________________________________________
Carob-commits mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/carob-commits