Hi,
the following patch does two things on OpenBSD:
1) Add missing libs to the krb5/com_err check that are required.
We have this in our ports tree since 7.4.3 but i can't find any
report about it, so here it finally is.
2) Prevent the use of -Wl,--as-needed in the readline case but use
-Wl,-Bdynamic instead. This became necessary with 8.4, otherwise
psql won't start because lazy binding fails.
The good news though is that i'm running 8.4beta2 successfully on
-current OpenBSD/amd64 with this.
Kind regards,
Simon
Index: configure.in
===================================================================
RCS file: /projects/cvsroot/pgsql/configure.in,v
retrieving revision 1.597
diff -u -p -r1.597 configure.in
--- configure.in 19 May 2009 22:32:41 -0000 1.597
+++ configure.in 10 Jun 2009 09:14:20 -0000
@@ -913,8 +913,13 @@ 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_MSG_ERROR([could not find function 'com_err' required for Kerberos 5])])
+ if test "$PORTNAME" = "openbsd"; then
+ AC_SEARCH_LIBS(com_err, [krb5 'krb5 -lcrypto -ldes -lasn1 -lroken' 'com_err -lssl -lcrypto'], [],
+ [AC_MSG_ERROR([could not find function 'com_err' required for Kerberos 5])])
+ else
+ AC_SEARCH_LIBS(com_err, [krb5 'krb5 -lcrypto -ldes -lasn1 -lroken' com_err], [],
+ [AC_MSG_ERROR([could not find function 'com_err' required for Kerberos 5])])
+ fi
AC_SEARCH_LIBS(krb5_sendauth, [krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'], [],
[AC_MSG_ERROR([could not find function 'krb5_sendauth' required for Kerberos 5])])
else
@@ -1788,7 +1793,9 @@ if test "$with_readline" = yes; then
else
link_test_func=exit
fi
-if test "$PORTNAME" != "darwin"; then
+if test "$PORTNAME" = "openbsd"; then
+ PGAC_PROG_CC_LDFLAGS_OPT([-Wl,-Bdynamic], $link_test_func)
+elif 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