At http://bazaar.launchpad.net/~ndb-connectors/ndb-connectors/ndbjmerge
------------------------------------------------------------
revno: 236
revision-id: mtaylor@stripped
parent: mtaylor@stripped
committer: Monty Taylor <mtaylor@stripped>
branch nick: ndbjmerge
timestamp: Tue 2007-11-06 10:31:46 -0800
message:
Fixed configure to work with or without libndbhelper.
modified:
acinclude.m4 acinclude.m4-20070228020914-u2pk759xg7thauwf-8
=== modified file 'acinclude.m4'
--- a/acinclude.m4 2007-11-05 18:12:57 +0000
+++ b/acinclude.m4 2007-11-06 18:31:46 +0000
@@ -154,15 +154,13 @@
[with_mysql=$withval],
[with_mysql=mysql_config])
- AS_IF([test -x $with_mysql -a -f $with_mysql],
- [ac_chk_mysql_config=$with_mysql],
- [AS_IF([test -x $with_mysql/bin/mysql_config -a -f $with_mysql/bin/mysql_config],
- [ac_chk_mysql_config=$with_mysql/bin/mysql_config])])
+ AS_IF([test -f $with_mysql -a -x $with_mysql],
+ [MYSQL_CONFIG=$with_mysql],
+ [AS_IF([test -f $with_mysql/bin/mysql_config -a -x $with_mysql/bin/mysql_config],
+ [MYSQL_CONFIG=$with_mysql/bin/mysql_config])])
AS_IF([test "x$with_mysql" = "xmysql_config"],
- [ac_chk_mysql_config=$with_mysql])
-
- AC_CHECK_PROGS(MYSQL_CONFIG,$ac_chk_mysql_config)
+ AC_CHECK_PROGS(MYSQL_CONFIG,[$with_mysql]))
AS_IF([test "x$MYSQL_CONFIG" = "x"],
AC_MSG_ERROR([MySQL not found]))
@@ -189,18 +187,22 @@
CXXFLAGS="$CXXFLAGS $ADDFLAGS $ADDIFLAGS"
MYSQL_INCLUDES="$IBASE $ADDIFLAGS"
- LDFLAGS="$LDFLAGS "`$MYSQL_CONFIG --libs_r`" -lndbclient -lndbhelper"
+ LDFLAGS="$LDFLAGS "`$MYSQL_CONFIG --libs_r`
+ AC_CHECK_LIB([ndbclient],[ndb_init])
+ AC_CHECK_LIB([ndbhelper],[decimal2longlong],,
+ [AC_CHECK_LIB([mysys],[decimal2longlong])
+ AC_CHECK_LIB([mystrings],[my_str_free])])
+
AC_MSG_CHECKING(for NdbApi headers)
AC_TRY_LINK([#include <NdbApi.hpp>], [int attr=NdbTransaction::Commit; ],
[ndbapi_found="yes"])
AS_IF([test "$ndbapi_found" = "yes"],
- [AC_MSG_RESULT("found")],
+ [AC_MSG_RESULT(found)],
[AC_MSG_ERROR([Couldn't find NdbApi.h!])])
- #LDFLAGS="$LDFLAGS "`$MYSQL_CONFIG --libs_r`" -lndbclient"
MYSQL_MAJOR_VERSION=`$MYSQL_CONFIG --version | sed -e 's/\.//g' -e 's/-//g' -e
's/[A-Za-z]//g' | cut -c1-2`
case "$MYSQL_MAJOR_VERSION" in
@@ -215,8 +217,6 @@
AC_SUBST(MYSQL_MAJOR_VERSION)
AC_SUBST(MYSQL_CONFIG)
- AC_MSG_RESULT($MYSQL_CONFIG)
-
])
| Thread |
|---|
| • Rev 236: Fixed configure to work with or without libndbhelper. in http://bazaar.launchpad.net/~ndb-connectors/ndb-connectors/ndbjmerge | Monty Taylor | 6 Nov |