1 diff --recursive -u misc/build/postgresql-9.1.1/configure misc/build/postgresql-9.1.1.patched/configure
2 --- misc/build/postgresql-9.1.1/configure 2011-09-22 23:57:57.000000000 +0200
3 +++ misc/build/postgresql-9.1.1.patched/configure 2012-02-03 11:50:07.000000000 +0100
22 --with-pam build with PAM support
23 --with-ldap build with LDAP support
24 + --with-mozldap build with Mozilla LDAP support
25 --with-bonjour build with Bonjour support
26 --with-openssl build with OpenSSL support
27 --with-selinux build with SELinux support
28 @@ -5432,6 +5435,42 @@
29 $as_echo "$with_ldap" >&6; }
32 +{ $as_echo "$as_me:$LINENO: checking whether to use Mozilla C SDK for LDAP support" >&5
33 +$as_echo_n "checking whether to use Mozilla C SDK for LDAP support... " >&6; }
37 +# Check whether --with-mozldap was given.
38 +if test "${with_mozldap+set}" = set; then
39 + withval=$with_mozldap;
43 +cat >>confdefs.h <<\_ACEOF
44 +#define USE_MOZLDAP 1
52 + { { $as_echo "$as_me:$LINENO: error: no argument expected for --with-mozldap option" >&5
53 +$as_echo "$as_me: error: no argument expected for --with-mozldap option" >&2;}
54 + { (exit 1); exit 1; }; }
64 +{ $as_echo "$as_me:$LINENO: result: $with_mozldap" >&5
65 +$as_echo "$with_mozldap" >&6; }
71 @@ -8533,11 +8572,11 @@
72 *** Not using spinlocks will cause poor performance." >&2;}
75 -if test "$with_gssapi" = yes ; then
76 +if test "$with_krb5" = yes ; then
77 if test "$PORTNAME" != "win32"; then
78 - { $as_echo "$as_me:$LINENO: checking for library containing gss_init_sec_context" >&5
79 -$as_echo_n "checking for library containing gss_init_sec_context... " >&6; }
80 -if test "${ac_cv_search_gss_init_sec_context+set}" = set; then
81 + { $as_echo "$as_me:$LINENO: checking for library containing com_err" >&5
82 +$as_echo_n "checking for library containing com_err... " >&6; }
83 +if test "${ac_cv_search_com_err+set}" = set; then
84 $as_echo_n "(cached) " >&6
86 ac_func_search_save_LIBS=$LIBS
87 @@ -8554,16 +8593,16 @@
91 -char gss_init_sec_context ();
96 -return gss_init_sec_context ();
102 -for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'; do
103 +for ac_lib in '' com_err 'com_err -lssl -lcrypto' krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'; do
104 if test -z "$ac_lib"; then
105 ac_res="none required"
107 @@ -8591,7 +8630,7 @@
108 test "$cross_compiling" = yes ||
109 $as_test_x conftest$ac_exeext
111 - ac_cv_search_gss_init_sec_context=$ac_res
112 + ac_cv_search_com_err=$ac_res
114 $as_echo "$as_me: failed program was:" >&5
115 sed 's/^/| /' conftest.$ac_ext >&5
116 @@ -8602,40 +8641,33 @@
118 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
120 - if test "${ac_cv_search_gss_init_sec_context+set}" = set; then
121 + if test "${ac_cv_search_com_err+set}" = set; then
125 -if test "${ac_cv_search_gss_init_sec_context+set}" = set; then
126 +if test "${ac_cv_search_com_err+set}" = set; then
129 - ac_cv_search_gss_init_sec_context=no
130 + ac_cv_search_com_err=no
133 LIBS=$ac_func_search_save_LIBS
135 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_gss_init_sec_context" >&5
136 -$as_echo "$ac_cv_search_gss_init_sec_context" >&6; }
137 -ac_res=$ac_cv_search_gss_init_sec_context
138 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_com_err" >&5
139 +$as_echo "$ac_cv_search_com_err" >&6; }
140 +ac_res=$ac_cv_search_com_err
141 if test "$ac_res" != no; then
142 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
145 - { { $as_echo "$as_me:$LINENO: error: could not find function 'gss_init_sec_context' required for GSSAPI" >&5
146 -$as_echo "$as_me: error: could not find function 'gss_init_sec_context' required for GSSAPI" >&2;}
147 + { { $as_echo "$as_me:$LINENO: error: could not find function 'com_err' required for Kerberos 5" >&5
148 +$as_echo "$as_me: error: could not find function 'com_err' required for Kerberos 5" >&2;}
149 { (exit 1); exit 1; }; }
153 - LIBS="$LIBS -lgssapi32"
157 -if test "$with_krb5" = yes ; then
158 - if test "$PORTNAME" != "win32"; then
159 - { $as_echo "$as_me:$LINENO: checking for library containing com_err" >&5
160 -$as_echo_n "checking for library containing com_err... " >&6; }
161 -if test "${ac_cv_search_com_err+set}" = set; then
162 + { $as_echo "$as_me:$LINENO: checking for library containing krb5_sendauth" >&5
163 +$as_echo_n "checking for library containing krb5_sendauth... " >&6; }
164 +if test "${ac_cv_search_krb5_sendauth+set}" = set; then
165 $as_echo_n "(cached) " >&6
167 ac_func_search_save_LIBS=$LIBS
168 @@ -8652,16 +8684,16 @@
173 +char krb5_sendauth ();
178 +return krb5_sendauth ();
183 -for ac_lib in '' krb5 'krb5 -lcrypto -ldes -lasn1 -lroken' com_err 'com_err -lssl -lcrypto'; do
184 +for ac_lib in '' krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'; do
185 if test -z "$ac_lib"; then
186 ac_res="none required"
188 @@ -8689,7 +8721,7 @@
189 test "$cross_compiling" = yes ||
190 $as_test_x conftest$ac_exeext
192 - ac_cv_search_com_err=$ac_res
193 + ac_cv_search_krb5_sendauth=$ac_res
195 $as_echo "$as_me: failed program was:" >&5
196 sed 's/^/| /' conftest.$ac_ext >&5
197 @@ -8700,33 +8732,34 @@
199 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
201 - if test "${ac_cv_search_com_err+set}" = set; then
202 + if test "${ac_cv_search_krb5_sendauth+set}" = set; then
206 -if test "${ac_cv_search_com_err+set}" = set; then
207 +if test "${ac_cv_search_krb5_sendauth+set}" = set; then
210 - ac_cv_search_com_err=no
211 + ac_cv_search_krb5_sendauth=no
214 LIBS=$ac_func_search_save_LIBS
216 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_com_err" >&5
217 -$as_echo "$ac_cv_search_com_err" >&6; }
218 -ac_res=$ac_cv_search_com_err
219 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_krb5_sendauth" >&5
220 +$as_echo "$ac_cv_search_krb5_sendauth" >&6; }
221 +ac_res=$ac_cv_search_krb5_sendauth
222 if test "$ac_res" != no; then
223 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
226 - { { $as_echo "$as_me:$LINENO: error: could not find function 'com_err' required for Kerberos 5" >&5
227 -$as_echo "$as_me: error: could not find function 'com_err' required for Kerberos 5" >&2;}
228 + { { $as_echo "$as_me:$LINENO: error: could not find function 'krb5_sendauth' required for Kerberos 5" >&5
229 +$as_echo "$as_me: error: could not find function 'krb5_sendauth' required for Kerberos 5" >&2;}
230 { (exit 1); exit 1; }; }
233 - { $as_echo "$as_me:$LINENO: checking for library containing krb5_sendauth" >&5
234 -$as_echo_n "checking for library containing krb5_sendauth... " >&6; }
235 -if test "${ac_cv_search_krb5_sendauth+set}" = set; then
237 + { $as_echo "$as_me:$LINENO: checking for library containing com_err" >&5
238 +$as_echo_n "checking for library containing com_err... " >&6; }
239 +if test "${ac_cv_search_com_err+set}" = set; then
240 $as_echo_n "(cached) " >&6
242 ac_func_search_save_LIBS=$LIBS
243 @@ -8743,16 +8776,16 @@
247 -char krb5_sendauth ();
252 -return krb5_sendauth ();
258 -for ac_lib in '' krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'; do
259 +for ac_lib in '' 'comerr32 -lkrb5_32'; do
260 if test -z "$ac_lib"; then
261 ac_res="none required"
263 @@ -8780,7 +8813,7 @@
264 test "$cross_compiling" = yes ||
265 $as_test_x conftest$ac_exeext
267 - ac_cv_search_krb5_sendauth=$ac_res
268 + ac_cv_search_com_err=$ac_res
270 $as_echo "$as_me: failed program was:" >&5
271 sed 's/^/| /' conftest.$ac_ext >&5
272 @@ -8791,34 +8824,38 @@
274 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
276 - if test "${ac_cv_search_krb5_sendauth+set}" = set; then
277 + if test "${ac_cv_search_com_err+set}" = set; then
281 -if test "${ac_cv_search_krb5_sendauth+set}" = set; then
282 +if test "${ac_cv_search_com_err+set}" = set; then
285 - ac_cv_search_krb5_sendauth=no
286 + ac_cv_search_com_err=no
289 LIBS=$ac_func_search_save_LIBS
291 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_krb5_sendauth" >&5
292 -$as_echo "$ac_cv_search_krb5_sendauth" >&6; }
293 -ac_res=$ac_cv_search_krb5_sendauth
294 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_com_err" >&5
295 +$as_echo "$ac_cv_search_com_err" >&6; }
296 +ac_res=$ac_cv_search_com_err
297 if test "$ac_res" != no; then
298 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
301 - { { $as_echo "$as_me:$LINENO: error: could not find function 'krb5_sendauth' required for Kerberos 5" >&5
302 -$as_echo "$as_me: error: could not find function 'krb5_sendauth' required for Kerberos 5" >&2;}
303 + { { $as_echo "$as_me:$LINENO: error: could not find function 'com_err' required for Kerberos 5" >&5
304 +$as_echo "$as_me: error: could not find function 'com_err' required for Kerberos 5" >&2;}
305 { (exit 1); exit 1; }; }
309 - { $as_echo "$as_me:$LINENO: checking for library containing com_err" >&5
310 -$as_echo_n "checking for library containing com_err... " >&6; }
311 -if test "${ac_cv_search_com_err+set}" = set; then
315 +if test "$with_gssapi" = yes ; then
316 + if test "$PORTNAME" != "win32"; then
317 + { $as_echo "$as_me:$LINENO: checking for library containing gss_init_sec_context" >&5
318 +$as_echo_n "checking for library containing gss_init_sec_context... " >&6; }
319 +if test "${ac_cv_search_gss_init_sec_context+set}" = set; then
320 $as_echo_n "(cached) " >&6
322 ac_func_search_save_LIBS=$LIBS
323 @@ -8835,16 +8872,16 @@
328 +char gss_init_sec_context ();
333 +return gss_init_sec_context ();
338 -for ac_lib in '' 'comerr32 -lkrb5_32'; do
339 +for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'; do
340 if test -z "$ac_lib"; then
341 ac_res="none required"
343 @@ -8872,7 +8909,7 @@
344 test "$cross_compiling" = yes ||
345 $as_test_x conftest$ac_exeext
347 - ac_cv_search_com_err=$ac_res
348 + ac_cv_search_gss_init_sec_context=$ac_res
350 $as_echo "$as_me: failed program was:" >&5
351 sed 's/^/| /' conftest.$ac_ext >&5
352 @@ -8883,30 +8920,32 @@
354 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
356 - if test "${ac_cv_search_com_err+set}" = set; then
357 + if test "${ac_cv_search_gss_init_sec_context+set}" = set; then
361 -if test "${ac_cv_search_com_err+set}" = set; then
362 +if test "${ac_cv_search_gss_init_sec_context+set}" = set; then
365 - ac_cv_search_com_err=no
366 + ac_cv_search_gss_init_sec_context=no
369 LIBS=$ac_func_search_save_LIBS
371 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_com_err" >&5
372 -$as_echo "$ac_cv_search_com_err" >&6; }
373 -ac_res=$ac_cv_search_com_err
374 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_gss_init_sec_context" >&5
375 +$as_echo "$ac_cv_search_gss_init_sec_context" >&6; }
376 +ac_res=$ac_cv_search_gss_init_sec_context
377 if test "$ac_res" != no; then
378 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
381 - { { $as_echo "$as_me:$LINENO: error: could not find function 'com_err' required for Kerberos 5" >&5
382 -$as_echo "$as_me: error: could not find function 'com_err' required for Kerberos 5" >&2;}
383 + { { $as_echo "$as_me:$LINENO: error: could not find function 'gss_init_sec_context' required for GSSAPI" >&5
384 +$as_echo "$as_me: error: could not find function 'gss_init_sec_context' required for GSSAPI" >&2;}
385 { (exit 1); exit 1; }; }
389 + LIBS="$LIBS -lgssapi32"
393 @@ -13584,7 +13623,7 @@
396 if test "$with_ldap" = yes ; then
397 - if test "$PORTNAME" != "win32"; then
398 + if test "$PORTNAME" != "win32" || test "$with_mozldap" = "yes"; then
400 for ac_header in ldap.h
402 @@ -13809,6 +13848,11 @@
407 +cat >>confdefs.h <<\_ACEOF
408 +#define USE_MICROSOFT_LDAP 1
414 @@ -23348,7 +23392,99 @@
415 # We can test for libldap_r only after we know PTHREAD_LIBS
416 if test "$with_ldap" = yes ; then
418 - if test "$PORTNAME" != "win32"; then
419 + if test "$with_mozldap" = "yes"; then
420 + if test "$PORTNAME" != "win32"; then
423 + mozlibname=nsldap32v50
426 +as_ac_Lib=`$as_echo "ac_cv_lib_$mozlibname''_ldap_bind" | $as_tr_sh`
427 +{ $as_echo "$as_me:$LINENO: checking for ldap_bind in -l$mozlibname" >&5
428 +$as_echo_n "checking for ldap_bind in -l$mozlibname... " >&6; }
429 +if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then
430 + $as_echo_n "(cached) " >&6
432 + ac_check_lib_save_LIBS=$LIBS
433 +LIBS="-l$mozlibname $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
434 +cat >conftest.$ac_ext <<_ACEOF
437 +cat confdefs.h >>conftest.$ac_ext
438 +cat >>conftest.$ac_ext <<_ACEOF
439 +/* end confdefs.h. */
441 +/* Override any GCC internal prototype to avoid an error.
442 + Use char because int might match the return type of a GCC
443 + builtin and then its argument prototype would still apply. */
451 +return ldap_bind ();
456 +rm -f conftest.$ac_objext conftest$ac_exeext
457 +if { (ac_try="$ac_link"
459 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
460 + *) ac_try_echo=$ac_try;;
462 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
463 +$as_echo "$ac_try_echo") >&5
464 + (eval "$ac_link") 2>conftest.er1
466 + grep -v '^ *+' conftest.er1 >conftest.err
468 + cat conftest.err >&5
469 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
470 + (exit $ac_status); } && {
471 + test -z "$ac_c_werror_flag" ||
472 + test ! -s conftest.err
473 + } && test -s conftest$ac_exeext && {
474 + test "$cross_compiling" = yes ||
475 + $as_test_x conftest$ac_exeext
477 + eval "$as_ac_Lib=yes"
479 + $as_echo "$as_me: failed program was:" >&5
480 +sed 's/^/| /' conftest.$ac_ext >&5
482 + eval "$as_ac_Lib=no"
485 +rm -rf conftest.dSYM
486 +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
487 + conftest$ac_exeext conftest.$ac_ext
488 +LIBS=$ac_check_lib_save_LIBS
490 +ac_res=`eval 'as_val=${'$as_ac_Lib'}
491 + $as_echo "$as_val"'`
492 + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
493 +$as_echo "$ac_res" >&6; }
494 +as_val=`eval 'as_val=${'$as_ac_Lib'}
495 + $as_echo "$as_val"'`
496 + if test "x$as_val" = x""yes; then
497 + cat >>confdefs.h <<_ACEOF
498 +#define `$as_echo "HAVE_LIB$mozlibname" | $as_tr_cpp` 1
501 + LIBS="-l$mozlibname $LIBS"
504 + { { $as_echo "$as_me:$LINENO: error: library \"$mozlibname\" is required for Mozilla LDAP" >&5
505 +$as_echo "$as_me: error: library \"$mozlibname\" is required for Mozilla LDAP" >&2;}
506 + { (exit 1); exit 1; }; }
509 + LDAP_LIBS_FE="-l$mozlibname $EXTRA_LDAP_LIBS"
510 + LDAP_LIBS_BE="-l$mozlibname $EXTRA_LDAP_LIBS"
511 + elif test "$PORTNAME" != "win32"; then
513 { $as_echo "$as_me:$LINENO: checking for ldap_bind in -lldap" >&5
514 $as_echo_n "checking for ldap_bind in -lldap... " >&6; }
515 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
516 --- misc/build/postgresql-9.1.1/src/include/pg_config.h.in 2011-09-22 23:57:57.000000000 +0200
517 +++ misc/build/postgresql-9.1.1.patched/src/include/pg_config.h.in 2012-02-03 11:50:07.000000000 +0100
522 +/* Defined when using Microsof LDAP */
523 +#undef USE_MICROSOFT_LDAP
525 +/* Define to 1 to use the Mozilla LDAP C SDK instead of platform default
526 + (OpenLDAP or Microsoft LDAP). (--with-mozldap) */
529 /* Define to select named POSIX semaphores. */
530 #undef USE_NAMED_POSIX_SEMAPHORES