#! /bin/sh
-# From configure.in OpenLDAP: pkg/ldap/configure.in,v 1.665 2008/08/30 10:43:58 ando Exp .
+# From configure.in OpenLDAP: pkg/ldap/configure.in,v 1.666 2008/08/30 22:18:08 hyc Exp .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.59.
#
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"
+ echo "$as_me:$LINENO: checking for NdbApi.hpp" >&5
+echo $ECHO_N "checking for NdbApi.hpp... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <NdbApi.hpp>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ { { echo "$as_me:$LINENO: error: could not locate NdbApi headers" >&5
+echo "$as_me: error: could not locate NdbApi headers" >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+rm -f conftest.err conftest.$ac_ext
+ 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"
+
+echo "$as_me:$LINENO: checking for ndb_init in -lndbclient" >&5
+echo $ECHO_N "checking for ndb_init in -lndbclient... $ECHO_C" >&6
+if test "${ac_cv_lib_ndbclient_ndb_init+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lndbclient -lstdc++ $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char ndb_init ();
+int
+main ()
+{
+ndb_init ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_ndbclient_ndb_init=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_ndbclient_ndb_init=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_ndbclient_ndb_init" >&5
+echo "${ECHO_T}$ac_cv_lib_ndbclient_ndb_init" >&6
+if test $ac_cv_lib_ndbclient_ndb_init = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBNDBCLIENT 1
+_ACEOF
+
+ LIBS="-lndbclient $LIBS"
+
+else
+
+ { { echo "$as_me:$LINENO: error: could not locate ndbclient library" >&5
+echo "$as_me: error: could not locate ndbclient library" >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+
+ LIBS="$save_LIBS"
+ LDFLAGS="$save_LDFLAGS"
if test "$ol_enable_ndb" = yes ; then
SLAPD_LIBS="$SLAPD_LIBS \$(SLAPD_NDB_LIBS)"