summaryrefslogtreecommitdiff
path: root/postgresql
diff options
context:
space:
mode:
authorLionel Elie Mamane <lionel@mamane.lu>2012-02-03 11:56:48 +0100
committerLionel Elie Mamane <lionel@mamane.lu>2012-02-03 11:58:19 +0100
commitd8b5d223877ea743f35424582284c15444e78a15 (patch)
treeb6d79b0c90871dfd026a41e32f124fe103853227 /postgresql
parenta71c878cd0b443a0d8473d8e4eb43d66f37ce2c0 (diff)
Also align our configure.in to the changes Change source file (configure.in), not only generated file (configure)
Diffstat (limited to 'postgresql')
-rw-r--r--postgresql/makefile.mk9
-rw-r--r--postgresql/postgresql-9.1.1-autoreconf.patch326
-rw-r--r--postgresql/postgresql-9.1.1-configure.patch362
-rw-r--r--postgresql/postgresql-libs-leak.patch39
4 files changed, 365 insertions, 371 deletions
diff --git a/postgresql/makefile.mk b/postgresql/makefile.mk
index 44b7e6f6d0ba..2d814bdeb798 100644
--- a/postgresql/makefile.mk
+++ b/postgresql/makefile.mk
@@ -40,14 +40,9 @@ TARFILE_NAME=postgresql-9.1.1
TARFILE_MD5=061a9f17323117c9358ed60f33ecff78
PATCH_FILES=\
postgresql-moz-ldap.patch \
+ postgresql-libs-leak.patch \
$(TARFILE_NAME)-libreoffice.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
+ $(TARFILE_NAME)-autoreconf.patch
.IF "$(SYSTEM_POSTGRESQL)" == "YES"
@all:
diff --git a/postgresql/postgresql-9.1.1-autoreconf.patch b/postgresql/postgresql-9.1.1-autoreconf.patch
index 24e294a534e5..ce91c51ff53f 100644
--- a/postgresql/postgresql-9.1.1-autoreconf.patch
+++ b/postgresql/postgresql-9.1.1-autoreconf.patch
@@ -1,6 +1,6 @@
diff --recursive -u misc/build/postgresql-9.1.1/configure misc/build/postgresql-9.1.1.patched/configure
--- misc/build/postgresql-9.1.1/configure 2011-09-22 23:57:57.000000000 +0200
-+++ misc/build/postgresql-9.1.1.patched/configure 2011-12-15 09:30:36.000000000 +0100
++++ misc/build/postgresql-9.1.1.patched/configure 2012-02-03 11:50:07.000000000 +0100
@@ -718,6 +718,7 @@
with_selinux
with_openssl
@@ -68,6 +68,328 @@ diff --recursive -u misc/build/postgresql-9.1.1/configure misc/build/postgresql-
#
# Bonjour
+@@ -8533,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
+@@ -8554,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
+@@ -8591,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
+@@ -8602,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
+@@ -8652,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
+@@ -8689,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
+@@ -8700,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
+@@ -8743,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
+@@ -8780,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
+@@ -8791,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
+@@ -8835,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
+@@ -8872,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
+@@ -8883,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
+
@@ -13584,7 +13623,7 @@
fi
@@ -192,7 +514,7 @@ diff --recursive -u misc/build/postgresql-9.1.1/configure misc/build/postgresql-
$as_echo_n "checking for ldap_bind in -lldap... " >&6; }
diff --recursive -u misc/build/postgresql-9.1.1/src/include/pg_config.h.in misc/build/postgresql-9.1.1.patched/src/include/pg_config.h.in
--- misc/build/postgresql-9.1.1/src/include/pg_config.h.in 2011-09-22 23:57:57.000000000 +0200
-+++ misc/build/postgresql-9.1.1.patched/src/include/pg_config.h.in 2011-12-15 09:30:37.000000000 +0100
++++ misc/build/postgresql-9.1.1.patched/src/include/pg_config.h.in 2012-02-03 11:50:07.000000000 +0100
@@ -785,6 +785,13 @@
(--with-libxslt) */
#undef USE_LIBXSLT
diff --git a/postgresql/postgresql-9.1.1-configure.patch b/postgresql/postgresql-9.1.1-configure.patch
deleted file mode 100644
index 6fcec5a7ce6d..000000000000
--- a/postgresql/postgresql-9.1.1-configure.patch
+++ /dev/null
@@ -1,362 +0,0 @@
---- 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
diff --git a/postgresql/postgresql-libs-leak.patch b/postgresql/postgresql-libs-leak.patch
new file mode 100644
index 000000000000..d568ccc95c01
--- /dev/null
+++ b/postgresql/postgresql-libs-leak.patch
@@ -0,0 +1,39 @@
+diff --recursive -u misc/build/postgresql-9.1.1/configure.in misc/build/postgresql-9.1.1.patched/configure.in
+--- misc/build/postgresql-9.1.1/configure.in 2011-09-22 23:57:57.000000000 +0200
++++ misc/build/postgresql-9.1.1.patched/configure.in 2012-02-03 11:42:45.000000000 +0100
+@@ -918,18 +918,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])])
+@@ -939,6 +930,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