1 --- misc/build/postgresql-9.1.1/configure 2011-09-22 23:57:57.000000000 +0200
2 +++ misc/build/postgresql-9.1.1.patched/configure 2012-02-03 11:50:07.000000000 +0100
13 --with-pam build with PAM support
14 --with-ldap build with LDAP support
15 + --with-mozldap build with Mozilla LDAP support
16 --with-bonjour build with Bonjour support
17 --with-openssl build with OpenSSL support
18 --with-selinux build with SELinux support
19 @@ -5412,6 +5414,42 @@
23 +{ $as_echo "$as_me:$LINENO: checking whether to use Mozilla C SDK for LDAP support" >&5
24 +$as_echo_n "checking whether to use Mozilla C SDK for LDAP support... " >&6; }
28 +# Check whether --with-mozldap was given.
29 +if test "${with_mozldap+set}" = set; then
30 + withval=$with_mozldap;
34 +cat >>confdefs.h <<\_ACEOF
35 +#define USE_MOZLDAP 1
43 + { { $as_echo "$as_me:$LINENO: error: no argument expected for --with-mozldap option" >&5
44 +$as_echo "$as_me: error: no argument expected for --with-mozldap option" >&2;}
45 + { (exit 1); exit 1; }; }
55 +{ $as_echo "$as_me:$LINENO: result: $with_mozldap" >&5
56 +$as_echo "$with_mozldap" >&6; }
61 # Kerberos configuration parameters
62 @@ -8627,11 +8665,11 @@
63 *** Not using spinlocks will cause poor performance." >&2;}
66 -if test "$with_gssapi" = yes ; then
67 +if test "$with_krb5" = yes ; then
68 if test "$PORTNAME" != "win32"; then
69 - { $as_echo "$as_me:$LINENO: checking for library containing gss_init_sec_context" >&5
70 -$as_echo_n "checking for library containing gss_init_sec_context... " >&6; }
71 -if test "${ac_cv_search_gss_init_sec_context+set}" = set; then
72 + { $as_echo "$as_me:$LINENO: checking for library containing com_err" >&5
73 +$as_echo_n "checking for library containing com_err... " >&6; }
74 +if test "${ac_cv_search_com_err+set}" = set; then
75 $as_echo_n "(cached) " >&6
77 ac_func_search_save_LIBS=$LIBS
78 @@ -8648,16 +8686,16 @@
82 -char gss_init_sec_context ();
87 -return gss_init_sec_context ();
93 -for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'; do
94 +for ac_lib in '' com_err 'com_err -lssl -lcrypto' krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'; do
95 if test -z "$ac_lib"; then
96 ac_res="none required"
99 test "$cross_compiling" = yes ||
100 $as_test_x conftest$ac_exeext
102 - ac_cv_search_gss_init_sec_context=$ac_res
103 + ac_cv_search_com_err=$ac_res
105 $as_echo "$as_me: failed program was:" >&5
106 sed 's/^/| /' conftest.$ac_ext >&5
107 @@ -8696,40 +8734,33 @@
109 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
111 - if test "${ac_cv_search_gss_init_sec_context+set}" = set; then
112 + if test "${ac_cv_search_com_err+set}" = set; then
116 -if test "${ac_cv_search_gss_init_sec_context+set}" = set; then
117 +if test "${ac_cv_search_com_err+set}" = set; then
120 - ac_cv_search_gss_init_sec_context=no
121 + ac_cv_search_com_err=no
124 LIBS=$ac_func_search_save_LIBS
126 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_gss_init_sec_context" >&5
127 -$as_echo "$ac_cv_search_gss_init_sec_context" >&6; }
128 -ac_res=$ac_cv_search_gss_init_sec_context
129 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_com_err" >&5
130 +$as_echo "$ac_cv_search_com_err" >&6; }
131 +ac_res=$ac_cv_search_com_err
132 if test "$ac_res" != no; then
133 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
136 - { { $as_echo "$as_me:$LINENO: error: could not find function 'gss_init_sec_context' required for GSSAPI" >&5
137 -$as_echo "$as_me: error: could not find function 'gss_init_sec_context' required for GSSAPI" >&2;}
138 + { { $as_echo "$as_me:$LINENO: error: could not find function 'com_err' required for Kerberos 5" >&5
139 +$as_echo "$as_me: error: could not find function 'com_err' required for Kerberos 5" >&2;}
140 { (exit 1); exit 1; }; }
144 - LIBS="$LIBS -lgssapi32"
148 -if test "$with_krb5" = yes ; then
149 - if test "$PORTNAME" != "win32"; then
150 - { $as_echo "$as_me:$LINENO: checking for library containing com_err" >&5
151 -$as_echo_n "checking for library containing com_err... " >&6; }
152 -if test "${ac_cv_search_com_err+set}" = set; then
153 + { $as_echo "$as_me:$LINENO: checking for library containing krb5_sendauth" >&5
154 +$as_echo_n "checking for library containing krb5_sendauth... " >&6; }
155 +if test "${ac_cv_search_krb5_sendauth+set}" = set; then
156 $as_echo_n "(cached) " >&6
158 ac_func_search_save_LIBS=$LIBS
159 @@ -8746,16 +8777,16 @@
164 +char krb5_sendauth ();
169 +return krb5_sendauth ();
174 -for ac_lib in '' krb5 'krb5 -lcrypto -ldes -lasn1 -lroken' com_err 'com_err -lssl -lcrypto'; do
175 +for ac_lib in '' krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'; do
176 if test -z "$ac_lib"; then
177 ac_res="none required"
179 @@ -8783,7 +8814,7 @@
180 test "$cross_compiling" = yes ||
181 $as_test_x conftest$ac_exeext
183 - ac_cv_search_com_err=$ac_res
184 + ac_cv_search_krb5_sendauth=$ac_res
186 $as_echo "$as_me: failed program was:" >&5
187 sed 's/^/| /' conftest.$ac_ext >&5
188 @@ -8794,33 +8825,34 @@
190 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
192 - if test "${ac_cv_search_com_err+set}" = set; then
193 + if test "${ac_cv_search_krb5_sendauth+set}" = set; then
197 -if test "${ac_cv_search_com_err+set}" = set; then
198 +if test "${ac_cv_search_krb5_sendauth+set}" = set; then
201 - ac_cv_search_com_err=no
202 + ac_cv_search_krb5_sendauth=no
205 LIBS=$ac_func_search_save_LIBS
207 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_com_err" >&5
208 -$as_echo "$ac_cv_search_com_err" >&6; }
209 -ac_res=$ac_cv_search_com_err
210 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_krb5_sendauth" >&5
211 +$as_echo "$ac_cv_search_krb5_sendauth" >&6; }
212 +ac_res=$ac_cv_search_krb5_sendauth
213 if test "$ac_res" != no; then
214 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
217 - { { $as_echo "$as_me:$LINENO: error: could not find function 'com_err' required for Kerberos 5" >&5
218 -$as_echo "$as_me: error: could not find function 'com_err' required for Kerberos 5" >&2;}
219 + { { $as_echo "$as_me:$LINENO: error: could not find function 'krb5_sendauth' required for Kerberos 5" >&5
220 +$as_echo "$as_me: error: could not find function 'krb5_sendauth' required for Kerberos 5" >&2;}
221 { (exit 1); exit 1; }; }
224 - { $as_echo "$as_me:$LINENO: checking for library containing krb5_sendauth" >&5
225 -$as_echo_n "checking for library containing krb5_sendauth... " >&6; }
226 -if test "${ac_cv_search_krb5_sendauth+set}" = set; then
228 + { $as_echo "$as_me:$LINENO: checking for library containing com_err" >&5
229 +$as_echo_n "checking for library containing com_err... " >&6; }
230 +if test "${ac_cv_search_com_err+set}" = set; then
231 $as_echo_n "(cached) " >&6
233 ac_func_search_save_LIBS=$LIBS
234 @@ -8837,16 +8869,16 @@
238 -char krb5_sendauth ();
243 -return krb5_sendauth ();
249 -for ac_lib in '' krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'; do
250 +for ac_lib in '' 'comerr32 -lkrb5_32'; do
251 if test -z "$ac_lib"; then
252 ac_res="none required"
254 @@ -8874,7 +8906,7 @@
255 test "$cross_compiling" = yes ||
256 $as_test_x conftest$ac_exeext
258 - ac_cv_search_krb5_sendauth=$ac_res
259 + ac_cv_search_com_err=$ac_res
261 $as_echo "$as_me: failed program was:" >&5
262 sed 's/^/| /' conftest.$ac_ext >&5
263 @@ -8885,34 +8917,38 @@
265 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
267 - if test "${ac_cv_search_krb5_sendauth+set}" = set; then
268 + if test "${ac_cv_search_com_err+set}" = set; then
272 -if test "${ac_cv_search_krb5_sendauth+set}" = set; then
273 +if test "${ac_cv_search_com_err+set}" = set; then
276 - ac_cv_search_krb5_sendauth=no
277 + ac_cv_search_com_err=no
280 LIBS=$ac_func_search_save_LIBS
282 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_krb5_sendauth" >&5
283 -$as_echo "$ac_cv_search_krb5_sendauth" >&6; }
284 -ac_res=$ac_cv_search_krb5_sendauth
285 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_com_err" >&5
286 +$as_echo "$ac_cv_search_com_err" >&6; }
287 +ac_res=$ac_cv_search_com_err
288 if test "$ac_res" != no; then
289 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
292 - { { $as_echo "$as_me:$LINENO: error: could not find function 'krb5_sendauth' required for Kerberos 5" >&5
293 -$as_echo "$as_me: error: could not find function 'krb5_sendauth' required for Kerberos 5" >&2;}
294 + { { $as_echo "$as_me:$LINENO: error: could not find function 'com_err' required for Kerberos 5" >&5
295 +$as_echo "$as_me: error: could not find function 'com_err' required for Kerberos 5" >&2;}
296 { (exit 1); exit 1; }; }
300 - { $as_echo "$as_me:$LINENO: checking for library containing com_err" >&5
301 -$as_echo_n "checking for library containing com_err... " >&6; }
302 -if test "${ac_cv_search_com_err+set}" = set; then
306 +if test "$with_gssapi" = yes ; then
307 + if test "$PORTNAME" != "win32"; then
308 + { $as_echo "$as_me:$LINENO: checking for library containing gss_init_sec_context" >&5
309 +$as_echo_n "checking for library containing gss_init_sec_context... " >&6; }
310 +if test "${ac_cv_search_gss_init_sec_context+set}" = set; then
311 $as_echo_n "(cached) " >&6
313 ac_func_search_save_LIBS=$LIBS
314 @@ -8929,16 +8965,16 @@
319 +char gss_init_sec_context ();
324 +return gss_init_sec_context ();
329 -for ac_lib in '' 'comerr32 -lkrb5_32'; do
330 +for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'; do
331 if test -z "$ac_lib"; then
332 ac_res="none required"
334 @@ -8966,7 +9002,7 @@
335 test "$cross_compiling" = yes ||
336 $as_test_x conftest$ac_exeext
338 - ac_cv_search_com_err=$ac_res
339 + ac_cv_search_gss_init_sec_context=$ac_res
341 $as_echo "$as_me: failed program was:" >&5
342 sed 's/^/| /' conftest.$ac_ext >&5
343 @@ -8977,30 +9013,32 @@
345 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
347 - if test "${ac_cv_search_com_err+set}" = set; then
348 + if test "${ac_cv_search_gss_init_sec_context+set}" = set; then
352 -if test "${ac_cv_search_com_err+set}" = set; then
353 +if test "${ac_cv_search_gss_init_sec_context+set}" = set; then
356 - ac_cv_search_com_err=no
357 + ac_cv_search_gss_init_sec_context=no
360 LIBS=$ac_func_search_save_LIBS
362 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_com_err" >&5
363 -$as_echo "$ac_cv_search_com_err" >&6; }
364 -ac_res=$ac_cv_search_com_err
365 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_gss_init_sec_context" >&5
366 +$as_echo "$ac_cv_search_gss_init_sec_context" >&6; }
367 +ac_res=$ac_cv_search_gss_init_sec_context
368 if test "$ac_res" != no; then
369 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
372 - { { $as_echo "$as_me:$LINENO: error: could not find function 'com_err' required for Kerberos 5" >&5
373 -$as_echo "$as_me: error: could not find function 'com_err' required for Kerberos 5" >&2;}
374 + { { $as_echo "$as_me:$LINENO: error: could not find function 'gss_init_sec_context' required for GSSAPI" >&5
375 +$as_echo "$as_me: error: could not find function 'gss_init_sec_context' required for GSSAPI" >&2;}
376 { (exit 1); exit 1; }; }
380 + LIBS="$LIBS -lgssapi32"
384 @@ -13598,7 +13636,7 @@
387 if test "$with_ldap" = yes ; then
388 - if test "$PORTNAME" != "win32"; then
389 + if test "$PORTNAME" != "win32" || test "$with_mozldap" = "yes"; then
391 for ac_header in ldap.h
393 @@ -13823,6 +13861,11 @@
398 +cat >>confdefs.h <<\_ACEOF
399 +#define USE_MICROSOFT_LDAP 1
405 @@ -23483,7 +23526,99 @@
406 # We can test for libldap_r only after we know PTHREAD_LIBS
407 if test "$with_ldap" = yes ; then
409 + if test "$with_mozldap" = "yes"; then
410 if test "$PORTNAME" != "win32"; then
413 + mozlibname=nsldap32v50
416 +as_ac_Lib=`$as_echo "ac_cv_lib_$mozlibname''_ldap_bind" | $as_tr_sh`
417 +{ $as_echo "$as_me:$LINENO: checking for ldap_bind in -l$mozlibname" >&5
418 +$as_echo_n "checking for ldap_bind in -l$mozlibname... " >&6; }
419 +if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then
420 + $as_echo_n "(cached) " >&6
422 + ac_check_lib_save_LIBS=$LIBS
423 +LIBS="-l$mozlibname $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
424 +cat >conftest.$ac_ext <<_ACEOF
427 +cat confdefs.h >>conftest.$ac_ext
428 +cat >>conftest.$ac_ext <<_ACEOF
429 +/* end confdefs.h. */
431 +/* Override any GCC internal prototype to avoid an error.
432 + Use char because int might match the return type of a GCC
433 + builtin and then its argument prototype would still apply. */
441 +return ldap_bind ();
446 +rm -f conftest.$ac_objext conftest$ac_exeext
447 +if { (ac_try="$ac_link"
449 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
450 + *) ac_try_echo=$ac_try;;
452 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
453 +$as_echo "$ac_try_echo") >&5
454 + (eval "$ac_link") 2>conftest.er1
456 + grep -v '^ *+' conftest.er1 >conftest.err
458 + cat conftest.err >&5
459 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
460 + (exit $ac_status); } && {
461 + test -z "$ac_c_werror_flag" ||
462 + test ! -s conftest.err
463 + } && test -s conftest$ac_exeext && {
464 + test "$cross_compiling" = yes ||
465 + $as_test_x conftest$ac_exeext
467 + eval "$as_ac_Lib=yes"
469 + $as_echo "$as_me: failed program was:" >&5
470 +sed 's/^/| /' conftest.$ac_ext >&5
472 + eval "$as_ac_Lib=no"
475 +rm -rf conftest.dSYM
476 +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
477 + conftest$ac_exeext conftest.$ac_ext
478 +LIBS=$ac_check_lib_save_LIBS
480 +ac_res=`eval 'as_val=${'$as_ac_Lib'}
481 + $as_echo "$as_val"'`
482 + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
483 +$as_echo "$ac_res" >&6; }
484 +as_val=`eval 'as_val=${'$as_ac_Lib'}
485 + $as_echo "$as_val"'`
486 + if test "x$as_val" = x""yes; then
487 + cat >>confdefs.h <<_ACEOF
488 +#define `$as_echo "HAVE_LIB$mozlibname" | $as_tr_cpp` 1
491 + LIBS="-l$mozlibname $LIBS"
494 + { { $as_echo "$as_me:$LINENO: error: library \"$mozlibname\" is required for Mozilla LDAP" >&5
495 +$as_echo "$as_me: error: library \"$mozlibname\" is required for Mozilla LDAP" >&2;}
496 + { (exit 1); exit 1; }; }
499 + LDAP_LIBS_FE="-l$mozlibname $EXTRA_LDAP_LIBS"
500 + LDAP_LIBS_BE="-l$mozlibname $EXTRA_LDAP_LIBS"
501 + elif test "$PORTNAME" != "win32"; then
503 { $as_echo "$as_me:$LINENO: checking for ldap_bind in -lldap" >&5
504 $as_echo_n "checking for ldap_bind in -lldap... " >&6; }
505 --- misc/build/postgresql-9.1.1/src/include/pg_config.h.in 2011-09-22 23:57:57.000000000 +0200
506 +++ misc/build/postgresql-9.1.1.patched/src/include/pg_config.h.in 2012-02-03 11:50:07.000000000 +0100
511 +/* Defined when using Microsof LDAP */
512 +#undef USE_MICROSOFT_LDAP
514 +/* Define to 1 to use the Mozilla LDAP C SDK instead of platform default
515 + (OpenLDAP or Microsoft LDAP). (--with-mozldap) */
518 /* Define to select named POSIX semaphores. */
519 #undef USE_NAMED_POSIX_SEMAPHORES