pgpool2.git / summary / log / commit / refs

commit    b7f4e9eba1eee6ab116d9997e54570baa6564590
Author:   Tatsuo Ishii <ishii at sraoss.co.jp>
Date:     Wed Nov 18 06:45:23 2009 +0000

    Add -lcrypt for linking commnad. Certain distribution ships libpq without
    linking to libcrypt by some reasons which I don't know.


config.h.in | 3 +++ configure | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ configure.in | 1 + 3 files changed, 72 insertions(+) diff --git a/config.h.in b/config.h.in index 7d2f7ac58..2f6614f74 100644 --- a/config.h.in +++ b/config.h.in @@ -45,6 +45,9 @@ /* Define to 1 if you have the `compat' library (-lcompat). */ #undef HAVE_LIBCOMPAT +/* Define to 1 if you have the `crypt' library (-lcrypt). */ +#undef HAVE_LIBCRYPT + /* Define to 1 if you have the `gen' library (-lgen). */ #undef HAVE_LIBGEN diff --git a/configure b/configure index 7a0062f6f..7c1fef35b 100755 --- a/configure +++ b/configure @@ -19911,6 +19911,74 @@ _ACEOF fi +echo "$as_me:$LINENO: checking for main in -lcrypt" >&5 +echo $ECHO_N "checking for main in -lcrypt... $ECHO_C" >&6 +if test "${ac_cv_lib_crypt_main+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcrypt $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_crypt_main=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_crypt_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_crypt_main" >&5 +echo "${ECHO_T}$ac_cv_lib_crypt_main" >&6 +if test $ac_cv_lib_crypt_main = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBCRYPT 1 +_ACEOF + + LIBS="-lcrypt $LIBS" + +fi + + echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 if test "${ac_cv_header_stdc+set}" = set; then diff --git a/configure.in b/configure.in index 287acb9e2..bfca4772b 100644 --- a/configure.in +++ b/configure.in @@ -60,6 +60,7 @@ AC_CHECK_LIB(BSD, main) AC_CHECK_LIB(gen, main) AC_CHECK_LIB(PW, main) AC_CHECK_LIB(resolv, main) +AC_CHECK_LIB(crypt, main) dnl Checks for header files. AC_HEADER_STDC [parent: 5e8d2f2c9c49]