diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2012-02-03 10:55:28 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-02-03 10:55:28 +0100 |
commit | c16027de8423cdb6b33ce5f5f9e13fdc25b9dbeb (patch) | |
tree | dfb02078f72a97744847f6bc2d3dd164c380ab2d /postgresql | |
parent | 064990eb8849a8c1eda8960fafb31f28ac114a5e (diff) |
Fix order in which postgresql searches for libs
...so that it does not miss any required libs due to picking up others first
that indirectly provide the required symbols; that would break our
libpq-flags.mk which should contain all the required libs when linking in the
static libpq.a.
Diffstat (limited to 'postgresql')
-rw-r--r-- | postgresql/makefile.mk | 8 | ||||
-rw-r--r-- | postgresql/postgresql-9.1.1-configure.patch | 362 |
2 files changed, 369 insertions, 1 deletions
diff --git a/postgresql/makefile.mk b/postgresql/makefile.mk index 0c2e3beed7cc..44b7e6f6d0ba 100644 --- a/postgresql/makefile.mk +++ b/postgresql/makefile.mk @@ -41,7 +41,13 @@ TARFILE_MD5=061a9f17323117c9358ed60f33ecff78 PATCH_FILES=\ postgresql-moz-ldap.patch \ $(TARFILE_NAME)-libreoffice.patch \ - $(TARFILE_NAME)-autoreconf.patch + $(TARFILE_NAME)-autoreconf.patch \ + postgresql-9.1.1-configure.patch +# postgresql-9.1.1-configure.patch: move check for with_krb5 before with_gssapi, +# so that LIBS does not already contain -lgssapi_krb5 (which links against +# -lkrb5) when looking for symbols from -lkrb5, and within with_krb5, move +# com_err before krb5, so that looking with symbol com_err does not erroneously +# pick -lkrb5 (which links against -lcom_err) instead of -lcom_err .IF "$(SYSTEM_POSTGRESQL)" == "YES" @all: diff --git a/postgresql/postgresql-9.1.1-configure.patch b/postgresql/postgresql-9.1.1-configure.patch new file mode 100644 index 000000000000..6fcec5a7ce6d --- /dev/null +++ b/postgresql/postgresql-9.1.1-configure.patch @@ -0,0 +1,362 @@ +--- misc/postgresql-9.1.1/configure 2012-02-03 10:19:18.695680048 +0100 ++++ misc/build/postgresql-9.1.1/configure 2012-02-03 10:17:27.545617462 +0100 +@@ -8572,11 +8572,11 @@ + *** Not using spinlocks will cause poor performance." >&2;} + fi + +-if test "$with_gssapi" = yes ; then ++if test "$with_krb5" = yes ; then + if test "$PORTNAME" != "win32"; then +- { $as_echo "$as_me:$LINENO: checking for library containing gss_init_sec_context" >&5 +-$as_echo_n "checking for library containing gss_init_sec_context... " >&6; } +-if test "${ac_cv_search_gss_init_sec_context+set}" = set; then ++ { $as_echo "$as_me:$LINENO: checking for library containing com_err" >&5 ++$as_echo_n "checking for library containing com_err... " >&6; } ++if test "${ac_cv_search_com_err+set}" = set; then + $as_echo_n "(cached) " >&6 + else + ac_func_search_save_LIBS=$LIBS +@@ -8593,16 +8593,16 @@ + #ifdef __cplusplus + extern "C" + #endif +-char gss_init_sec_context (); ++char com_err (); + int + main () + { +-return gss_init_sec_context (); ++return com_err (); + ; + return 0; + } + _ACEOF +-for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'; do ++for ac_lib in '' com_err 'com_err -lssl -lcrypto' krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'; do + if test -z "$ac_lib"; then + ac_res="none required" + else +@@ -8630,7 +8630,7 @@ + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then +- ac_cv_search_gss_init_sec_context=$ac_res ++ ac_cv_search_com_err=$ac_res + else + $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 +@@ -8641,40 +8641,33 @@ + rm -rf conftest.dSYM + rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext +- if test "${ac_cv_search_gss_init_sec_context+set}" = set; then ++ if test "${ac_cv_search_com_err+set}" = set; then + break + fi + done +-if test "${ac_cv_search_gss_init_sec_context+set}" = set; then ++if test "${ac_cv_search_com_err+set}" = set; then + : + else +- ac_cv_search_gss_init_sec_context=no ++ ac_cv_search_com_err=no + fi + rm conftest.$ac_ext + LIBS=$ac_func_search_save_LIBS + fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_gss_init_sec_context" >&5 +-$as_echo "$ac_cv_search_gss_init_sec_context" >&6; } +-ac_res=$ac_cv_search_gss_init_sec_context ++{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_com_err" >&5 ++$as_echo "$ac_cv_search_com_err" >&6; } ++ac_res=$ac_cv_search_com_err + if test "$ac_res" != no; then + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + + else +- { { $as_echo "$as_me:$LINENO: error: could not find function 'gss_init_sec_context' required for GSSAPI" >&5 +-$as_echo "$as_me: error: could not find function 'gss_init_sec_context' required for GSSAPI" >&2;} ++ { { $as_echo "$as_me:$LINENO: error: could not find function 'com_err' required for Kerberos 5" >&5 ++$as_echo "$as_me: error: could not find function 'com_err' required for Kerberos 5" >&2;} + { (exit 1); exit 1; }; } + fi + +- else +- LIBS="$LIBS -lgssapi32" +- fi +-fi +- +-if test "$with_krb5" = yes ; then +- if test "$PORTNAME" != "win32"; then +- { $as_echo "$as_me:$LINENO: checking for library containing com_err" >&5 +-$as_echo_n "checking for library containing com_err... " >&6; } +-if test "${ac_cv_search_com_err+set}" = set; then ++ { $as_echo "$as_me:$LINENO: checking for library containing krb5_sendauth" >&5 ++$as_echo_n "checking for library containing krb5_sendauth... " >&6; } ++if test "${ac_cv_search_krb5_sendauth+set}" = set; then + $as_echo_n "(cached) " >&6 + else + ac_func_search_save_LIBS=$LIBS +@@ -8691,16 +8684,16 @@ + #ifdef __cplusplus + extern "C" + #endif +-char com_err (); ++char krb5_sendauth (); + int + main () + { +-return com_err (); ++return krb5_sendauth (); + ; + return 0; + } + _ACEOF +-for ac_lib in '' krb5 'krb5 -lcrypto -ldes -lasn1 -lroken' com_err 'com_err -lssl -lcrypto'; do ++for ac_lib in '' krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'; do + if test -z "$ac_lib"; then + ac_res="none required" + else +@@ -8728,7 +8721,7 @@ + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then +- ac_cv_search_com_err=$ac_res ++ ac_cv_search_krb5_sendauth=$ac_res + else + $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 +@@ -8739,33 +8732,34 @@ + rm -rf conftest.dSYM + rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext +- if test "${ac_cv_search_com_err+set}" = set; then ++ if test "${ac_cv_search_krb5_sendauth+set}" = set; then + break + fi + done +-if test "${ac_cv_search_com_err+set}" = set; then ++if test "${ac_cv_search_krb5_sendauth+set}" = set; then + : + else +- ac_cv_search_com_err=no ++ ac_cv_search_krb5_sendauth=no + fi + rm conftest.$ac_ext + LIBS=$ac_func_search_save_LIBS + fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_com_err" >&5 +-$as_echo "$ac_cv_search_com_err" >&6; } +-ac_res=$ac_cv_search_com_err ++{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_krb5_sendauth" >&5 ++$as_echo "$ac_cv_search_krb5_sendauth" >&6; } ++ac_res=$ac_cv_search_krb5_sendauth + if test "$ac_res" != no; then + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + + else +- { { $as_echo "$as_me:$LINENO: error: could not find function 'com_err' required for Kerberos 5" >&5 +-$as_echo "$as_me: error: could not find function 'com_err' required for Kerberos 5" >&2;} ++ { { $as_echo "$as_me:$LINENO: error: could not find function 'krb5_sendauth' required for Kerberos 5" >&5 ++$as_echo "$as_me: error: could not find function 'krb5_sendauth' required for Kerberos 5" >&2;} + { (exit 1); exit 1; }; } + fi + +- { $as_echo "$as_me:$LINENO: checking for library containing krb5_sendauth" >&5 +-$as_echo_n "checking for library containing krb5_sendauth... " >&6; } +-if test "${ac_cv_search_krb5_sendauth+set}" = set; then ++ else ++ { $as_echo "$as_me:$LINENO: checking for library containing com_err" >&5 ++$as_echo_n "checking for library containing com_err... " >&6; } ++if test "${ac_cv_search_com_err+set}" = set; then + $as_echo_n "(cached) " >&6 + else + ac_func_search_save_LIBS=$LIBS +@@ -8782,16 +8776,16 @@ + #ifdef __cplusplus + extern "C" + #endif +-char krb5_sendauth (); ++char com_err (); + int + main () + { +-return krb5_sendauth (); ++return com_err (); + ; + return 0; + } + _ACEOF +-for ac_lib in '' krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'; do ++for ac_lib in '' 'comerr32 -lkrb5_32'; do + if test -z "$ac_lib"; then + ac_res="none required" + else +@@ -8819,7 +8813,7 @@ + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then +- ac_cv_search_krb5_sendauth=$ac_res ++ ac_cv_search_com_err=$ac_res + else + $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 +@@ -8830,34 +8824,38 @@ + rm -rf conftest.dSYM + rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext +- if test "${ac_cv_search_krb5_sendauth+set}" = set; then ++ if test "${ac_cv_search_com_err+set}" = set; then + break + fi + done +-if test "${ac_cv_search_krb5_sendauth+set}" = set; then ++if test "${ac_cv_search_com_err+set}" = set; then + : + else +- ac_cv_search_krb5_sendauth=no ++ ac_cv_search_com_err=no + fi + rm conftest.$ac_ext + LIBS=$ac_func_search_save_LIBS + fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_krb5_sendauth" >&5 +-$as_echo "$ac_cv_search_krb5_sendauth" >&6; } +-ac_res=$ac_cv_search_krb5_sendauth ++{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_com_err" >&5 ++$as_echo "$ac_cv_search_com_err" >&6; } ++ac_res=$ac_cv_search_com_err + if test "$ac_res" != no; then + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + + else +- { { $as_echo "$as_me:$LINENO: error: could not find function 'krb5_sendauth' required for Kerberos 5" >&5 +-$as_echo "$as_me: error: could not find function 'krb5_sendauth' required for Kerberos 5" >&2;} ++ { { $as_echo "$as_me:$LINENO: error: could not find function 'com_err' required for Kerberos 5" >&5 ++$as_echo "$as_me: error: could not find function 'com_err' required for Kerberos 5" >&2;} + { (exit 1); exit 1; }; } + fi + +- else +- { $as_echo "$as_me:$LINENO: checking for library containing com_err" >&5 +-$as_echo_n "checking for library containing com_err... " >&6; } +-if test "${ac_cv_search_com_err+set}" = set; then ++ fi ++fi ++ ++if test "$with_gssapi" = yes ; then ++ if test "$PORTNAME" != "win32"; then ++ { $as_echo "$as_me:$LINENO: checking for library containing gss_init_sec_context" >&5 ++$as_echo_n "checking for library containing gss_init_sec_context... " >&6; } ++if test "${ac_cv_search_gss_init_sec_context+set}" = set; then + $as_echo_n "(cached) " >&6 + else + ac_func_search_save_LIBS=$LIBS +@@ -8874,16 +8872,16 @@ + #ifdef __cplusplus + extern "C" + #endif +-char com_err (); ++char gss_init_sec_context (); + int + main () + { +-return com_err (); ++return gss_init_sec_context (); + ; + return 0; + } + _ACEOF +-for ac_lib in '' 'comerr32 -lkrb5_32'; do ++for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'; do + if test -z "$ac_lib"; then + ac_res="none required" + else +@@ -8911,7 +8909,7 @@ + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then +- ac_cv_search_com_err=$ac_res ++ ac_cv_search_gss_init_sec_context=$ac_res + else + $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 +@@ -8922,30 +8920,32 @@ + rm -rf conftest.dSYM + rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext +- if test "${ac_cv_search_com_err+set}" = set; then ++ if test "${ac_cv_search_gss_init_sec_context+set}" = set; then + break + fi + done +-if test "${ac_cv_search_com_err+set}" = set; then ++if test "${ac_cv_search_gss_init_sec_context+set}" = set; then + : + else +- ac_cv_search_com_err=no ++ ac_cv_search_gss_init_sec_context=no + fi + rm conftest.$ac_ext + LIBS=$ac_func_search_save_LIBS + fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_com_err" >&5 +-$as_echo "$ac_cv_search_com_err" >&6; } +-ac_res=$ac_cv_search_com_err ++{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_gss_init_sec_context" >&5 ++$as_echo "$ac_cv_search_gss_init_sec_context" >&6; } ++ac_res=$ac_cv_search_gss_init_sec_context + if test "$ac_res" != no; then + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + + else +- { { $as_echo "$as_me:$LINENO: error: could not find function 'com_err' required for Kerberos 5" >&5 +-$as_echo "$as_me: error: could not find function 'com_err' required for Kerberos 5" >&2;} ++ { { $as_echo "$as_me:$LINENO: error: could not find function 'gss_init_sec_context' required for GSSAPI" >&5 ++$as_echo "$as_me: error: could not find function 'gss_init_sec_context' required for GSSAPI" >&2;} + { (exit 1); exit 1; }; } + fi + ++ else ++ LIBS="$LIBS -lgssapi32" + fi + fi + +--- misc/postgresql-9.1.1/configure.in 2012-02-03 10:19:18.685618318 +0100 ++++ misc/build/postgresql-9.1.1/configure.in 2012-02-03 10:18:52.624617826 +0100 +@@ -925,18 +925,9 @@ + *** Not using spinlocks will cause poor performance.]) + fi + +-if test "$with_gssapi" = yes ; then +- if test "$PORTNAME" != "win32"; then +- AC_SEARCH_LIBS(gss_init_sec_context, [gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'], [], +- [AC_MSG_ERROR([could not find function 'gss_init_sec_context' required for GSSAPI])]) +- else +- LIBS="$LIBS -lgssapi32" +- fi +-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 'com_err -lssl -lcrypto'], [], ++ AC_SEARCH_LIBS(com_err, [com_err 'com_err -lssl -lcrypto' krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'], [], + [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])]) +@@ -946,6 +937,15 @@ + fi + fi + ++if test "$with_gssapi" = yes ; then ++ if test "$PORTNAME" != "win32"; then ++ AC_SEARCH_LIBS(gss_init_sec_context, [gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'], [], ++ [AC_MSG_ERROR([could not find function 'gss_init_sec_context' required for GSSAPI])]) ++ else ++ LIBS="$LIBS -lgssapi32" ++ fi ++fi ++ + if test "$with_openssl" = yes ; then + dnl Order matters! + if test "$PORTNAME" != "win32"; then |