Skip to content

Commit

Permalink
add zookeeper check in configure script
Browse files Browse the repository at this point in the history
  • Loading branch information
xiezl authored and wangsheng1001 committed Jun 15, 2015
1 parent 56fe4b8 commit f13e3a7
Show file tree
Hide file tree
Showing 3 changed files with 80 additions and 0 deletions.
3 changes: 3 additions & 0 deletions config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
74 changes: 74 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f13e3a7

Please sign in to comment.