Allow MinGW builds to use standardly-named OpenSSL libraries.

In the Fedora variant of MinGW, the openssl libraries have their normal
names, not libeay32 and libssleay32.  Adjust configure probes to allow
that, per bug #6486.

Tomasz Ostrowski
This commit is contained in:
Tom Lane 2012-02-23 15:05:17 -05:00
parent 602dd1eeaa
commit 630fa6f308
4 changed files with 68 additions and 56 deletions

108
configure vendored
View File

@ -9132,14 +9132,12 @@ $as_echo "$as_me: error: library 'ssl' is required for OpenSSL" >&2;}
fi fi
else else
{ $as_echo "$as_me:$LINENO: checking for library containing CRYPTO_new_ex_data" >&5
{ $as_echo "$as_me:$LINENO: checking for CRYPTO_new_ex_data in -leay32" >&5 $as_echo_n "checking for library containing CRYPTO_new_ex_data... " >&6; }
$as_echo_n "checking for CRYPTO_new_ex_data in -leay32... " >&6; } if test "${ac_cv_search_CRYPTO_new_ex_data+set}" = set; then
if test "${ac_cv_lib_eay32_CRYPTO_new_ex_data+set}" = set; then
$as_echo_n "(cached) " >&6 $as_echo_n "(cached) " >&6
else else
ac_check_lib_save_LIBS=$LIBS ac_func_search_save_LIBS=$LIBS
LIBS="-leay32 $LIBS"
cat >conftest.$ac_ext <<_ACEOF cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */ /* confdefs.h. */
_ACEOF _ACEOF
@ -9162,7 +9160,14 @@ return CRYPTO_new_ex_data ();
return 0; return 0;
} }
_ACEOF _ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext for ac_lib in '' eay32 crypto; do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link" if { (ac_try="$ac_link"
case "(($ac_try" in case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@ -9183,42 +9188,47 @@ $as_echo "$ac_try_echo") >&5
test "$cross_compiling" = yes || test "$cross_compiling" = yes ||
$as_test_x conftest$ac_exeext $as_test_x conftest$ac_exeext
}; then }; then
ac_cv_lib_eay32_CRYPTO_new_ex_data=yes ac_cv_search_CRYPTO_new_ex_data=$ac_res
else else
$as_echo "$as_me: failed program was:" >&5 $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5 sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_eay32_CRYPTO_new_ex_data=no
fi fi
rm -rf conftest.dSYM rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext conftest$ac_exeext
LIBS=$ac_check_lib_save_LIBS if test "${ac_cv_search_CRYPTO_new_ex_data+set}" = set; then
break
fi fi
{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_eay32_CRYPTO_new_ex_data" >&5 done
$as_echo "$ac_cv_lib_eay32_CRYPTO_new_ex_data" >&6; } if test "${ac_cv_search_CRYPTO_new_ex_data+set}" = set; then
if test "x$ac_cv_lib_eay32_CRYPTO_new_ex_data" = x""yes; then :
cat >>confdefs.h <<_ACEOF else
#define HAVE_LIBEAY32 1 ac_cv_search_CRYPTO_new_ex_data=no
_ACEOF fi
rm conftest.$ac_ext
LIBS="-leay32 $LIBS" LIBS=$ac_func_search_save_LIBS
fi
{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_CRYPTO_new_ex_data" >&5
$as_echo "$ac_cv_search_CRYPTO_new_ex_data" >&6; }
ac_res=$ac_cv_search_CRYPTO_new_ex_data
if test "$ac_res" != no; then
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
else else
{ { $as_echo "$as_me:$LINENO: error: library 'eay32' is required for OpenSSL" >&5 { { $as_echo "$as_me:$LINENO: error: library 'eay32' or 'crypto' is required for OpenSSL" >&5
$as_echo "$as_me: error: library 'eay32' is required for OpenSSL" >&2;} $as_echo "$as_me: error: library 'eay32' or 'crypto' is required for OpenSSL" >&2;}
{ (exit 1); exit 1; }; } { (exit 1); exit 1; }; }
fi fi
{ $as_echo "$as_me:$LINENO: checking for library containing SSL_library_init" >&5
{ $as_echo "$as_me:$LINENO: checking for SSL_library_init in -lssleay32" >&5 $as_echo_n "checking for library containing SSL_library_init... " >&6; }
$as_echo_n "checking for SSL_library_init in -lssleay32... " >&6; } if test "${ac_cv_search_SSL_library_init+set}" = set; then
if test "${ac_cv_lib_ssleay32_SSL_library_init+set}" = set; then
$as_echo_n "(cached) " >&6 $as_echo_n "(cached) " >&6
else else
ac_check_lib_save_LIBS=$LIBS ac_func_search_save_LIBS=$LIBS
LIBS="-lssleay32 $LIBS"
cat >conftest.$ac_ext <<_ACEOF cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */ /* confdefs.h. */
_ACEOF _ACEOF
@ -9241,7 +9251,14 @@ return SSL_library_init ();
return 0; return 0;
} }
_ACEOF _ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext for ac_lib in '' ssleay32 ssl; do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link" if { (ac_try="$ac_link"
case "(($ac_try" in case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@ -9262,31 +9279,38 @@ $as_echo "$ac_try_echo") >&5
test "$cross_compiling" = yes || test "$cross_compiling" = yes ||
$as_test_x conftest$ac_exeext $as_test_x conftest$ac_exeext
}; then }; then
ac_cv_lib_ssleay32_SSL_library_init=yes ac_cv_search_SSL_library_init=$ac_res
else else
$as_echo "$as_me: failed program was:" >&5 $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5 sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_ssleay32_SSL_library_init=no
fi fi
rm -rf conftest.dSYM rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext conftest$ac_exeext
LIBS=$ac_check_lib_save_LIBS if test "${ac_cv_search_SSL_library_init+set}" = set; then
break
fi fi
{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ssleay32_SSL_library_init" >&5 done
$as_echo "$ac_cv_lib_ssleay32_SSL_library_init" >&6; } if test "${ac_cv_search_SSL_library_init+set}" = set; then
if test "x$ac_cv_lib_ssleay32_SSL_library_init" = x""yes; then :
cat >>confdefs.h <<_ACEOF else
#define HAVE_LIBSSLEAY32 1 ac_cv_search_SSL_library_init=no
_ACEOF fi
rm conftest.$ac_ext
LIBS="-lssleay32 $LIBS" LIBS=$ac_func_search_save_LIBS
fi
{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_SSL_library_init" >&5
$as_echo "$ac_cv_search_SSL_library_init" >&6; }
ac_res=$ac_cv_search_SSL_library_init
if test "$ac_res" != no; then
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
else else
{ { $as_echo "$as_me:$LINENO: error: library 'ssleay32' is required for OpenSSL" >&5 { { $as_echo "$as_me:$LINENO: error: library 'ssleay32' or 'ssl' is required for OpenSSL" >&5
$as_echo "$as_me: error: library 'ssleay32' is required for OpenSSL" >&2;} $as_echo "$as_me: error: library 'ssleay32' or 'ssl' is required for OpenSSL" >&2;}
{ (exit 1); exit 1; }; } { (exit 1); exit 1; }; }
fi fi

View File

@ -947,8 +947,8 @@ if test "$with_openssl" = yes ; then
AC_CHECK_LIB(crypto, CRYPTO_new_ex_data, [], [AC_MSG_ERROR([library 'crypto' is required for OpenSSL])]) AC_CHECK_LIB(crypto, CRYPTO_new_ex_data, [], [AC_MSG_ERROR([library 'crypto' is required for OpenSSL])])
AC_CHECK_LIB(ssl, SSL_library_init, [], [AC_MSG_ERROR([library 'ssl' is required for OpenSSL])]) AC_CHECK_LIB(ssl, SSL_library_init, [], [AC_MSG_ERROR([library 'ssl' is required for OpenSSL])])
else else
AC_CHECK_LIB(eay32, CRYPTO_new_ex_data, [], [AC_MSG_ERROR([library 'eay32' is required for OpenSSL])]) AC_SEARCH_LIBS(CRYPTO_new_ex_data, eay32 crypto, [], [AC_MSG_ERROR([library 'eay32' or 'crypto' is required for OpenSSL])])
AC_CHECK_LIB(ssleay32, SSL_library_init, [], [AC_MSG_ERROR([library 'ssleay32' is required for OpenSSL])]) AC_SEARCH_LIBS(SSL_library_init, ssleay32 ssl, [], [AC_MSG_ERROR([library 'ssleay32' or 'ssl' is required for OpenSSL])])
fi fi
fi fi

View File

@ -290,9 +290,6 @@
/* Define to 1 if you have the `crypto' library (-lcrypto). */ /* Define to 1 if you have the `crypto' library (-lcrypto). */
#undef HAVE_LIBCRYPTO #undef HAVE_LIBCRYPTO
/* Define to 1 if you have the `eay32' library (-leay32). */
#undef HAVE_LIBEAY32
/* Define to 1 if you have the `ldap' library (-lldap). */ /* Define to 1 if you have the `ldap' library (-lldap). */
#undef HAVE_LIBLDAP #undef HAVE_LIBLDAP
@ -314,9 +311,6 @@
/* Define to 1 if you have the `ssl' library (-lssl). */ /* Define to 1 if you have the `ssl' library (-lssl). */
#undef HAVE_LIBSSL #undef HAVE_LIBSSL
/* Define to 1 if you have the `ssleay32' library (-lssleay32). */
#undef HAVE_LIBSSLEAY32
/* Define to 1 if you have the `wldap32' library (-lwldap32). */ /* Define to 1 if you have the `wldap32' library (-lwldap32). */
#undef HAVE_LIBWLDAP32 #undef HAVE_LIBWLDAP32

View File

@ -214,9 +214,6 @@
/* Define to 1 if you have the `crypto' library (-lcrypto). */ /* Define to 1 if you have the `crypto' library (-lcrypto). */
/* #undef HAVE_LIBCRYPTO */ /* #undef HAVE_LIBCRYPTO */
/* Define to 1 if you have the `eay32' library (-leay32). */
/* #undef HAVE_LIBEAY32 */
/* Define to 1 if you have the `ldap' library (-lldap). */ /* Define to 1 if you have the `ldap' library (-lldap). */
/* #undef HAVE_LIBLDAP */ /* #undef HAVE_LIBLDAP */
@ -229,9 +226,6 @@
/* Define to 1 if you have the `ssl' library (-lssl). */ /* Define to 1 if you have the `ssl' library (-lssl). */
/* #undef HAVE_LIBSSL */ /* #undef HAVE_LIBSSL */
/* Define to 1 if you have the `ssleay32' library (-lssleay32). */
/* #undef HAVE_LIBSSLEAY32 */
/* Define to 1 if you have the `wldap32' library (-lwldap32). */ /* Define to 1 if you have the `wldap32' library (-lwldap32). */
/* #undef HAVE_LIBWLDAP32 */ /* #undef HAVE_LIBWLDAP32 */