Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitcb10e3a

Browse files
committed
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.
1 parent14180f9 commitcb10e3a

File tree

2 files changed

+89
-21
lines changed

2 files changed

+89
-21
lines changed

‎configure

Lines changed: 76 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8252,7 +8252,8 @@ return com_err ();
82528252
return 0;
82538253
}
82548254
_ACEOF
8255-
for ac_lib in '' krb5 'krb5 -lcrypto -ldes -lasn1 -lroken' com_err; do
8255+
for ac_lib in '' krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'
8256+
com_err 'com_err -lssl -lcrypto'; do
82568257
if test -z "$ac_lib"; then
82578258
ac_res="none required"
82588259
else
@@ -27133,9 +27134,10 @@ echo "$as_me: WARNING: *** skipping thread test on Win32" >&2;}
2713327134
fi
2713427135
fi
2713527136

27136-
# If compiler will take -Wl,--as-needed then add that to LDFLAGS.
27137-
# This is much easier than trying to filter LIBS to the minimum for each
27138-
# executable. (Note that shared library links won't use this switch, though.)
27137+
# If compiler will take -Wl,--as-needed (or various platform-specific
27138+
# spellings thereof) then add that to LDFLAGS. This is much easier than
27139+
# trying to filter LIBS to the minimum for each executable.
27140+
# (Note that shared library links won't use this switch, though.)
2713927141
# On (at least) some Red-Hat-derived systems, this switch breaks linking to
2714027142
# libreadline; therefore we postpone testing it until we know what library
2714127143
# dependencies readline has. The test code will try to link with $LIBS.
@@ -27144,11 +27146,12 @@ if test "$with_readline" = yes; then
2714427146
else
2714527147
link_test_func=exit
2714627148
fi
27147-
if test "$PORTNAME" != "darwin"; then
27148-
{ echo "$as_me:$LINENO: checking if $CC supports -Wl,--as-needed" >&5
27149-
echo $ECHO_N "checking if $CC supports -Wl,--as-needed... $ECHO_C" >&6; }
27149+
27150+
if test "$PORTNAME" = "darwin"; then
27151+
{ echo "$as_me:$LINENO: checking if $CC supports -Wl,-dead_strip_dylibs" >&5
27152+
echo $ECHO_N "checking if $CC supports -Wl,-dead_strip_dylibs... $ECHO_C" >&6; }
2715027153
pgac_save_LDFLAGS=$LDFLAGS
27151-
LDFLAGS="$pgac_save_LDFLAGS -Wl,--as-needed"
27154+
LDFLAGS="$pgac_save_LDFLAGS -Wl,-dead_strip_dylibs"
2715227155
if test "$cross_compiling" = yes; then
2715327156
LDFLAGS="$pgac_save_LDFLAGS"
2715427157
{ echo "$as_me:$LINENO: result: assuming no" >&5
@@ -27206,12 +27209,73 @@ fi
2720627209

2720727210

2720827211

27212+
elif test "$PORTNAME" = "openbsd"; then
27213+
{ echo "$as_me:$LINENO: checking if $CC supports -Wl,-Bdynamic" >&5
27214+
echo $ECHO_N "checking if $CC supports -Wl,-Bdynamic... $ECHO_C" >&6; }
27215+
pgac_save_LDFLAGS=$LDFLAGS
27216+
LDFLAGS="$pgac_save_LDFLAGS -Wl,-Bdynamic"
27217+
if test "$cross_compiling" = yes; then
27218+
LDFLAGS="$pgac_save_LDFLAGS"
27219+
{ echo "$as_me:$LINENO: result: assuming no" >&5
27220+
echo "${ECHO_T}assuming no" >&6; }
2720927221
else
27210-
# On Darwin it's spelled -Wl,-dead_strip_dylibs, but don't try that elsewhere
27211-
{ echo "$as_me:$LINENO: checking if $CC supports -Wl,-dead_strip_dylibs" >&5
27212-
echo $ECHO_N "checking if $CC supports -Wl,-dead_strip_dylibs... $ECHO_C" >&6; }
27222+
cat >conftest.$ac_ext <<_ACEOF
27223+
/* confdefs.h. */
27224+
_ACEOF
27225+
cat confdefs.h >>conftest.$ac_ext
27226+
cat >>conftest.$ac_ext <<_ACEOF
27227+
/* end confdefs.h. */
27228+
extern void $link_test_func (); void (*fptr) () = $link_test_func;
27229+
int
27230+
main ()
27231+
{
27232+
27233+
;
27234+
return 0;
27235+
}
27236+
_ACEOF
27237+
rm -f conftest$ac_exeext
27238+
if { (ac_try="$ac_link"
27239+
case "(($ac_try" in
27240+
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27241+
*) ac_try_echo=$ac_try;;
27242+
esac
27243+
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27244+
(eval "$ac_link") 2>&5
27245+
ac_status=$?
27246+
echo "$as_me:$LINENO: \$? = $ac_status" >&5
27247+
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
27248+
{ (case "(($ac_try" in
27249+
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27250+
*) ac_try_echo=$ac_try;;
27251+
esac
27252+
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27253+
(eval "$ac_try") 2>&5
27254+
ac_status=$?
27255+
echo "$as_me:$LINENO: \$? = $ac_status" >&5
27256+
(exit $ac_status); }; }; then
27257+
{ echo "$as_me:$LINENO: result: yes" >&5
27258+
echo "${ECHO_T}yes" >&6; }
27259+
else
27260+
echo "$as_me: program exited with status $ac_status" >&5
27261+
echo "$as_me: failed program was:" >&5
27262+
sed 's/^/| /' conftest.$ac_ext >&5
27263+
27264+
( exit $ac_status )
27265+
LDFLAGS="$pgac_save_LDFLAGS"
27266+
{ echo "$as_me:$LINENO: result: no" >&5
27267+
echo "${ECHO_T}no" >&6; }
27268+
fi
27269+
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
27270+
fi
27271+
27272+
27273+
27274+
else
27275+
{ echo "$as_me:$LINENO: checking if $CC supports -Wl,--as-needed" >&5
27276+
echo $ECHO_N "checking if $CC supports -Wl,--as-needed... $ECHO_C" >&6; }
2721327277
pgac_save_LDFLAGS=$LDFLAGS
27214-
LDFLAGS="$pgac_save_LDFLAGS -Wl,-dead_strip_dylibs"
27278+
LDFLAGS="$pgac_save_LDFLAGS -Wl,--as-needed"
2721527279
if test "$cross_compiling" = yes; then
2721627280
LDFLAGS="$pgac_save_LDFLAGS"
2721727281
{ echo "$as_me:$LINENO: result: assuming no" >&5

‎configure.in

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
dnl Process this file with autoconf to produce a configure script.
2-
dnl $PostgreSQL: pgsql/configure.in,v 1.597 2009/05/19 22:32:41 petere Exp $
2+
dnl $PostgreSQL: pgsql/configure.in,v 1.598 2009/06/10 21:24:10 tgl Exp $
33
dnl
44
dnl Developers, please strive to achieve this order:
55
dnl
@@ -913,7 +913,8 @@ fi
913913

914914
if test "$with_krb5" = yes ; then
915915
if test "$PORTNAME" != "win32"; then
916-
AC_SEARCH_LIBS(com_err, [krb5 'krb5 -lcrypto -ldes -lasn1 -lroken' com_err], [],
916+
AC_SEARCH_LIBS(com_err, [krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'
917+
com_err 'com_err -lssl -lcrypto'], [],
917918
[AC_MSG_ERROR([could not find function 'com_err' required for Kerberos 5])])
918919
AC_SEARCH_LIBS(krb5_sendauth, [krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'], [],
919920
[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])
17771778
fi
17781779
fi
17791780

1780-
# If compiler will take -Wl,--as-needed then add that to LDFLAGS.
1781-
# This is much easier than trying to filter LIBS to the minimum for each
1782-
# executable. (Note that shared library links won't use this switch, though.)
1781+
# If compiler will take -Wl,--as-needed (or various platform-specific
1782+
# spellings thereof) then add that to LDFLAGS. This is much easier than
1783+
# trying to filter LIBS to the minimum for each executable.
1784+
# (Note that shared library links won't use this switch, though.)
17831785
# On (at least) some Red-Hat-derived systems, this switch breaks linking to
17841786
# libreadline; therefore we postpone testing it until we know what library
17851787
# dependencies readline has. The test code will try to link with $LIBS.
@@ -1788,11 +1790,13 @@ if test "$with_readline" = yes; then
17881790
else
17891791
link_test_func=exit
17901792
fi
1791-
if test "$PORTNAME" != "darwin"; then
1792-
PGAC_PROG_CC_LDFLAGS_OPT([-Wl,--as-needed], $link_test_func)
1793-
else
1794-
# On Darwin it's spelled -Wl,-dead_strip_dylibs, but don't try that elsewhere
1793+
1794+
if test "$PORTNAME" = "darwin"; then
17951795
PGAC_PROG_CC_LDFLAGS_OPT([-Wl,-dead_strip_dylibs], $link_test_func)
1796+
elif test "$PORTNAME" = "openbsd"; then
1797+
PGAC_PROG_CC_LDFLAGS_OPT([-Wl,-Bdynamic], $link_test_func)
1798+
else
1799+
PGAC_PROG_CC_LDFLAGS_OPT([-Wl,--as-needed], $link_test_func)
17961800
fi
17971801

17981802

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp