From: Howard Chu Date: Sun, 31 Aug 2008 00:18:08 +0000 (+0000) Subject: ITS#5672 add checks for NDB headers and libraries X-Git-Tag: ACLCHECK_0~1400 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=e6fb0b0ce400d96600cfb9e4454bbeb95caf7681;p=openldap ITS#5672 add checks for NDB headers and libraries --- diff --git a/configure.in b/configure.in index d6e7b004e2..90bd03bec5 100644 --- a/configure.in +++ b/configure.in @@ -1982,6 +1982,8 @@ fi dnl ---------------------------------------------------------------- dnl MySQL NDBapi +dnl Note: uses C++, but we don't want to add C++ test overhead to +dnl the rest of the libtool machinery. ol_link_ndb=no if test $ol_enable_ndb != no ; then AC_CHECK_PROG(MYSQL,mysql_config,yes) @@ -1992,8 +1994,27 @@ if test $ol_enable_ndb != no ; then SQL_INC=`mysql_config --include` SLAPD_NDB_INCS="$SQL_INC $SQL_INC/storage/ndb $SQL_INC/storage/ndb/ndbapi" + save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$SLAPD_NDB_INCS" + AC_MSG_CHECKING(for NdbApi.hpp) + AC_PREPROC_IFELSE( + [AC_LANG_SOURCE([[#include ]])], + AC_MSG_RESULT(yes), + AC_MSG_ERROR([could not locate NdbApi headers]) + ) + CPPFLAGS="$save_CPPFLAGS" + SQL_LIB=`mysql_config --libs_r` - SLAPD_NDB_LIBS="$SQL_LIB -lndbclient -lmysys -lmystrings -lstdc++" + SLAPD_NDB_LIBS="$SQL_LIB -lndbclient -lstdc++" + + save_LDFLAGS="$LDFLAGS" + save_LIBS="$LIBS" + LDFLAGS="$SQL_LIB" + AC_CHECK_LIB(ndbclient,ndb_init,[],[ + AC_MSG_ERROR([could not locate ndbclient library]) + ],[-lstdc++]) + LIBS="$save_LIBS" + LDFLAGS="$save_LDFLAGS" if test "$ol_enable_ndb" = yes ; then SLAPD_LIBS="$SLAPD_LIBS \$(SLAPD_NDB_LIBS)"