Version 3.6.0.4, tag libreoffice-3.6.0.4
[LibreOffice.git] / postgresql / postgresql-9.1.1-autoreconf.patch
blobce91c51ff53fb0fcc46236dbfa6a5a4d505d31b2
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
4 @@ -718,6 +718,7 @@
5 with_selinux
6 with_openssl
7 with_bonjour
8 +with_mozldap
9 with_ldap
10 with_pam
11 krb_srvtab
12 @@ -836,6 +837,7 @@
13 with_krb_srvnam
14 with_pam
15 with_ldap
16 +with_mozldap
17 with_bonjour
18 with_openssl
19 with_selinux
20 @@ -1533,6 +1535,7 @@
21 [postgres]
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;
40 + case $withval in
41 + yes)
43 +cat >>confdefs.h <<\_ACEOF
44 +#define USE_MOZLDAP 1
45 +_ACEOF
47 + ;;
48 + no)
49 + :
50 + ;;
51 + *)
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; }; }
55 + ;;
56 + esac
58 +else
59 + with_mozldap=no
61 +fi
64 +{ $as_echo "$as_me:$LINENO: result: $with_mozldap" >&5
65 +$as_echo "$with_mozldap" >&6; }
70 # Bonjour
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
85 else
86 ac_func_search_save_LIBS=$LIBS
87 @@ -8554,16 +8593,16 @@
88 #ifdef __cplusplus
89 extern "C"
90 #endif
91 -char gss_init_sec_context ();
92 +char com_err ();
93 int
94 main ()
96 -return gss_init_sec_context ();
97 +return com_err ();
99 return 0;
101 _ACEOF
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"
106 else
107 @@ -8591,7 +8630,7 @@
108 test "$cross_compiling" = yes ||
109 $as_test_x conftest$ac_exeext
110 }; then
111 - ac_cv_search_gss_init_sec_context=$ac_res
112 + ac_cv_search_com_err=$ac_res
113 else
114 $as_echo "$as_me: failed program was:" >&5
115 sed 's/^/| /' conftest.$ac_ext >&5
116 @@ -8602,40 +8641,33 @@
117 rm -rf conftest.dSYM
118 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
119 conftest$ac_exeext
120 - if test "${ac_cv_search_gss_init_sec_context+set}" = set; then
121 + if test "${ac_cv_search_com_err+set}" = set; then
122 break
124 done
125 -if test "${ac_cv_search_gss_init_sec_context+set}" = set; then
126 +if test "${ac_cv_search_com_err+set}" = set; then
128 else
129 - ac_cv_search_gss_init_sec_context=no
130 + ac_cv_search_com_err=no
132 rm conftest.$ac_ext
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"
144 else
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; }; }
152 - else
153 - LIBS="$LIBS -lgssapi32"
154 - fi
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
166 else
167 ac_func_search_save_LIBS=$LIBS
168 @@ -8652,16 +8684,16 @@
169 #ifdef __cplusplus
170 extern "C"
171 #endif
172 -char com_err ();
173 +char krb5_sendauth ();
175 main ()
177 -return com_err ();
178 +return krb5_sendauth ();
180 return 0;
182 _ACEOF
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"
187 else
188 @@ -8689,7 +8721,7 @@
189 test "$cross_compiling" = yes ||
190 $as_test_x conftest$ac_exeext
191 }; then
192 - ac_cv_search_com_err=$ac_res
193 + ac_cv_search_krb5_sendauth=$ac_res
194 else
195 $as_echo "$as_me: failed program was:" >&5
196 sed 's/^/| /' conftest.$ac_ext >&5
197 @@ -8700,33 +8732,34 @@
198 rm -rf conftest.dSYM
199 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
200 conftest$ac_exeext
201 - if test "${ac_cv_search_com_err+set}" = set; then
202 + if test "${ac_cv_search_krb5_sendauth+set}" = set; then
203 break
205 done
206 -if test "${ac_cv_search_com_err+set}" = set; then
207 +if test "${ac_cv_search_krb5_sendauth+set}" = set; then
209 else
210 - ac_cv_search_com_err=no
211 + ac_cv_search_krb5_sendauth=no
213 rm conftest.$ac_ext
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"
225 else
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
236 + else
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
241 else
242 ac_func_search_save_LIBS=$LIBS
243 @@ -8743,16 +8776,16 @@
244 #ifdef __cplusplus
245 extern "C"
246 #endif
247 -char krb5_sendauth ();
248 +char com_err ();
250 main ()
252 -return krb5_sendauth ();
253 +return com_err ();
255 return 0;
257 _ACEOF
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"
262 else
263 @@ -8780,7 +8813,7 @@
264 test "$cross_compiling" = yes ||
265 $as_test_x conftest$ac_exeext
266 }; then
267 - ac_cv_search_krb5_sendauth=$ac_res
268 + ac_cv_search_com_err=$ac_res
269 else
270 $as_echo "$as_me: failed program was:" >&5
271 sed 's/^/| /' conftest.$ac_ext >&5
272 @@ -8791,34 +8824,38 @@
273 rm -rf conftest.dSYM
274 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
275 conftest$ac_exeext
276 - if test "${ac_cv_search_krb5_sendauth+set}" = set; then
277 + if test "${ac_cv_search_com_err+set}" = set; then
278 break
280 done
281 -if test "${ac_cv_search_krb5_sendauth+set}" = set; then
282 +if test "${ac_cv_search_com_err+set}" = set; then
284 else
285 - ac_cv_search_krb5_sendauth=no
286 + ac_cv_search_com_err=no
288 rm conftest.$ac_ext
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"
300 else
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; }; }
308 - else
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
312 + fi
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
321 else
322 ac_func_search_save_LIBS=$LIBS
323 @@ -8835,16 +8872,16 @@
324 #ifdef __cplusplus
325 extern "C"
326 #endif
327 -char com_err ();
328 +char gss_init_sec_context ();
330 main ()
332 -return com_err ();
333 +return gss_init_sec_context ();
335 return 0;
337 _ACEOF
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"
342 else
343 @@ -8872,7 +8909,7 @@
344 test "$cross_compiling" = yes ||
345 $as_test_x conftest$ac_exeext
346 }; then
347 - ac_cv_search_com_err=$ac_res
348 + ac_cv_search_gss_init_sec_context=$ac_res
349 else
350 $as_echo "$as_me: failed program was:" >&5
351 sed 's/^/| /' conftest.$ac_ext >&5
352 @@ -8883,30 +8920,32 @@
353 rm -rf conftest.dSYM
354 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
355 conftest$ac_exeext
356 - if test "${ac_cv_search_com_err+set}" = set; then
357 + if test "${ac_cv_search_gss_init_sec_context+set}" = set; then
358 break
360 done
361 -if test "${ac_cv_search_com_err+set}" = set; then
362 +if test "${ac_cv_search_gss_init_sec_context+set}" = set; then
364 else
365 - ac_cv_search_com_err=no
366 + ac_cv_search_gss_init_sec_context=no
368 rm conftest.$ac_ext
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"
380 else
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; }; }
388 + else
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 @@
404 done
407 +cat >>confdefs.h <<\_ACEOF
408 +#define USE_MICROSOFT_LDAP 1
409 +_ACEOF
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
417 _LIBS="$LIBS"
418 - if test "$PORTNAME" != "win32"; then
419 + if test "$with_mozldap" = "yes"; then
420 + if test "$PORTNAME" != "win32"; then
421 + mozlibname=ldap50
422 + else
423 + mozlibname=nsldap32v50
424 + fi
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
431 +else
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
435 +/* confdefs.h. */
436 +_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. */
444 +#ifdef __cplusplus
445 +extern "C"
446 +#endif
447 +char ldap_bind ();
448 +int
449 +main ()
451 +return ldap_bind ();
453 + return 0;
455 +_ACEOF
456 +rm -f conftest.$ac_objext conftest$ac_exeext
457 +if { (ac_try="$ac_link"
458 +case "(($ac_try" in
459 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
460 + *) ac_try_echo=$ac_try;;
461 +esac
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
465 + ac_status=$?
466 + grep -v '^ *+' conftest.er1 >conftest.err
467 + rm -f conftest.er1
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
476 + }; then
477 + eval "$as_ac_Lib=yes"
478 +else
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
499 +_ACEOF
501 + LIBS="-l$mozlibname $LIBS"
503 +else
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
518 @@ -785,6 +785,13 @@
519 (--with-libxslt) */
520 #undef USE_LIBXSLT
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) */
527 +#undef USE_MOZLDAP
529 /* Define to select named POSIX semaphores. */
530 #undef USE_NAMED_POSIX_SEMAPHORES