summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorTom Lane2009-06-10 21:24:11 +0000
committerTom Lane2009-06-10 21:24:11 +0000
commitcb10e3af3a51bd7001547a5dc0034c398b87d44a (patch)
tree31b9cb9dbccc55c8eb1c83c2b0159d60dd948c1a /configure.in
parent14180f9214933169d287e537dfabb0e9286896a2 (diff)
Support Kerberos on platforms where libcom_err depends on OpenSSL, as
reportedly is true on OpenBSD. Also support OpenBSD's spelling of -Wl,--as-needed. Per Simon Bertrang.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in22
1 files changed, 13 insertions, 9 deletions
diff --git a/configure.in b/configure.in
index 7d4157bba8a..1ded4d0d932 100644
--- a/configure.in
+++ b/configure.in
@@ -1,5 +1,5 @@
dnl Process this file with autoconf to produce a configure script.
-dnl $PostgreSQL: pgsql/configure.in,v 1.597 2009/05/19 22:32:41 petere Exp $
+dnl $PostgreSQL: pgsql/configure.in,v 1.598 2009/06/10 21:24:10 tgl Exp $
dnl
dnl Developers, please strive to achieve this order:
dnl
@@ -913,7 +913,8 @@ fi
if test "$with_krb5" = yes ; then
if test "$PORTNAME" != "win32"; then
- AC_SEARCH_LIBS(com_err, [krb5 'krb5 -lcrypto -ldes -lasn1 -lroken' com_err], [],
+ AC_SEARCH_LIBS(com_err, [krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'
+ com_err 'com_err -lssl -lcrypto'], [],
[AC_MSG_ERROR([could not find function 'com_err' required for Kerberos 5])])
AC_SEARCH_LIBS(krb5_sendauth, [krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'], [],
[AC_MSG_ERROR([could not find function 'krb5_sendauth' required for Kerberos 5])])
@@ -1777,9 +1778,10 @@ AC_MSG_WARN([*** skipping thread test on Win32])
fi
fi
-# If compiler will take -Wl,--as-needed then add that to LDFLAGS.
-# This is much easier than trying to filter LIBS to the minimum for each
-# executable. (Note that shared library links won't use this switch, though.)
+# If compiler will take -Wl,--as-needed (or various platform-specific
+# spellings thereof) then add that to LDFLAGS. This is much easier than
+# trying to filter LIBS to the minimum for each executable.
+# (Note that shared library links won't use this switch, though.)
# On (at least) some Red-Hat-derived systems, this switch breaks linking to
# libreadline; therefore we postpone testing it until we know what library
# dependencies readline has. The test code will try to link with $LIBS.
@@ -1788,11 +1790,13 @@ if test "$with_readline" = yes; then
else
link_test_func=exit
fi
-if test "$PORTNAME" != "darwin"; then
- PGAC_PROG_CC_LDFLAGS_OPT([-Wl,--as-needed], $link_test_func)
-else
- # On Darwin it's spelled -Wl,-dead_strip_dylibs, but don't try that elsewhere
+
+if test "$PORTNAME" = "darwin"; then
PGAC_PROG_CC_LDFLAGS_OPT([-Wl,-dead_strip_dylibs], $link_test_func)
+elif test "$PORTNAME" = "openbsd"; then
+ PGAC_PROG_CC_LDFLAGS_OPT([-Wl,-Bdynamic], $link_test_func)
+else
+ PGAC_PROG_CC_LDFLAGS_OPT([-Wl,--as-needed], $link_test_func)
fi