You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@singa.apache.org by wa...@apache.org on 2015/06/15 06:22:15 UTC
[3/3] incubator-singa git commit: add zookeeper check in configure
script
add zookeeper check in configure script
Project: http://git-wip-us.apache.org/repos/asf/incubator-singa/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-singa/commit/f13e3a75
Tree: http://git-wip-us.apache.org/repos/asf/incubator-singa/tree/f13e3a75
Diff: http://git-wip-us.apache.org/repos/asf/incubator-singa/diff/f13e3a75
Branch: refs/heads/master
Commit: f13e3a75b24e1192544cc1d7bc4bd07c9eb23167
Parents: 56fe4b8
Author: xiezl <xi...@comp.nus.edu.sg>
Authored: Wed May 27 20:41:40 2015 +0800
Committer: wang sheng <wa...@gmail.com>
Committed: Mon Jun 15 12:20:49 2015 +0800
----------------------------------------------------------------------
config.h.in | 3 +++
configure | 74 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
configure.ac | 3 +++
3 files changed, 80 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/f13e3a75/config.h.in
----------------------------------------------------------------------
diff --git a/config.h.in b/config.h.in
index 800fa92..94da3c8 100644
--- a/config.h.in
+++ b/config.h.in
@@ -30,6 +30,9 @@
/* Define to 1 if you have the `protobuf' library (-lprotobuf). */
#undef HAVE_LIBPROTOBUF
+/* Define to 1 if you have the `zookeeper_mt' library (-lzookeeper_mt). */
+#undef HAVE_LIBZOOKEEPER_MT
+
/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
to 0 otherwise. */
#undef HAVE_MALLOC
http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/f13e3a75/configure
----------------------------------------------------------------------
diff --git a/configure b/configure
index 7a99f5c..6eb812b 100755
--- a/configure
+++ b/configure
@@ -19603,6 +19603,80 @@ echo "$as_me: error: unable to find mdb_env_create() function" >&2;}
fi
+echo "$as_me:$LINENO: checking for main in -lzookeeper_mt" >&5
+echo $ECHO_N "checking for main in -lzookeeper_mt... $ECHO_C" >&6
+if test "${ac_cv_lib_zookeeper_mt_main+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lzookeeper_mt $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+
+int
+main ()
+{
+main ();
+ ;
+ 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_zookeeper_mt_main=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_zookeeper_mt_main=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_zookeeper_mt_main" >&5
+echo "${ECHO_T}$ac_cv_lib_zookeeper_mt_main" >&6
+if test $ac_cv_lib_zookeeper_mt_main = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBZOOKEEPER_MT 1
+_ACEOF
+
+ LIBS="-lzookeeper_mt $LIBS"
+
+else
+
+ { { echo "$as_me:$LINENO: error: unable to find zookeeper" >&5
+echo "$as_me: error: unable to find zookeeper" >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+
+
# Checks for header files.
echo "$as_me:$LINENO: checking for ANSI C header files" >&5
echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/f13e3a75/configure.ac
----------------------------------------------------------------------
diff --git a/configure.ac b/configure.ac
index 200df7f..ddae503 100644
--- a/configure.ac
+++ b/configure.ac
@@ -47,6 +47,9 @@ AC_CHECK_LIB([opencv_core], [main], [], [
AC_SEARCH_LIBS([mdb_env_create], [lmdb], [], [
AC_MSG_ERROR([unable to find mdb_env_create() function])
])
+AC_CHECK_LIB([zookeeper_mt], [main], [], [
+ AC_MSG_ERROR([unable to find zookeeper])
+ ])
# Checks for header files.
AC_HEADER_STDC