diff --git a/config.h.in b/config.h.in index 800fa92010..94da3c81a8 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 diff --git a/configure b/configure index 7a99f5c5a8..6eb812bcb6 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 diff --git a/configure.ac b/configure.ac index 200df7f0a5..ddae50372a 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