Version 5.4.3.2, tag libreoffice-5.4.3.2
[LibreOffice.git] / external / postgresql / postgresql-9.2.1-autoreconf.patch
blob9cbf84f252c84842142f7807930a18c95e8fca3d
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
3 @@ -830,6 +830,7 @@
4 with_krb_srvnam
5 with_pam
6 with_ldap
7 +with_mozldap
8 with_bonjour
9 with_openssl
10 with_selinux
11 @@ -1527,6 +1528,7 @@
12 [postgres]
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;
31 + case $withval in
32 + yes)
34 +cat >>confdefs.h <<\_ACEOF
35 +#define USE_MOZLDAP 1
36 +_ACEOF
38 + ;;
39 + no)
40 + :
41 + ;;
42 + *)
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; }; }
46 + ;;
47 + esac
49 +else
50 + with_mozldap=no
52 +fi
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
76 else
77 ac_func_search_save_LIBS=$LIBS
78 @@ -8648,16 +8686,16 @@
79 #ifdef __cplusplus
80 extern "C"
81 #endif
82 -char gss_init_sec_context ();
83 +char com_err ();
84 int
85 main ()
87 -return gss_init_sec_context ();
88 +return com_err ();
90 return 0;
92 _ACEOF
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"
97 else
98 @@ -8685,7 +8723,7 @@
99 test "$cross_compiling" = yes ||
100 $as_test_x conftest$ac_exeext
101 }; then
102 - ac_cv_search_gss_init_sec_context=$ac_res
103 + ac_cv_search_com_err=$ac_res
104 else
105 $as_echo "$as_me: failed program was:" >&5
106 sed 's/^/| /' conftest.$ac_ext >&5
107 @@ -8696,40 +8734,33 @@
108 rm -rf conftest.dSYM
109 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
110 conftest$ac_exeext
111 - if test "${ac_cv_search_gss_init_sec_context+set}" = set; then
112 + if test "${ac_cv_search_com_err+set}" = set; then
113 break
115 done
116 -if test "${ac_cv_search_gss_init_sec_context+set}" = set; then
117 +if test "${ac_cv_search_com_err+set}" = set; then
119 else
120 - ac_cv_search_gss_init_sec_context=no
121 + ac_cv_search_com_err=no
123 rm conftest.$ac_ext
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"
135 else
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; }; }
143 - else
144 - LIBS="$LIBS -lgssapi32"
145 - fi
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
157 else
158 ac_func_search_save_LIBS=$LIBS
159 @@ -8746,16 +8777,16 @@
160 #ifdef __cplusplus
161 extern "C"
162 #endif
163 -char com_err ();
164 +char krb5_sendauth ();
166 main ()
168 -return com_err ();
169 +return krb5_sendauth ();
171 return 0;
173 _ACEOF
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"
178 else
179 @@ -8783,7 +8814,7 @@
180 test "$cross_compiling" = yes ||
181 $as_test_x conftest$ac_exeext
182 }; then
183 - ac_cv_search_com_err=$ac_res
184 + ac_cv_search_krb5_sendauth=$ac_res
185 else
186 $as_echo "$as_me: failed program was:" >&5
187 sed 's/^/| /' conftest.$ac_ext >&5
188 @@ -8794,33 +8825,34 @@
189 rm -rf conftest.dSYM
190 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
191 conftest$ac_exeext
192 - if test "${ac_cv_search_com_err+set}" = set; then
193 + if test "${ac_cv_search_krb5_sendauth+set}" = set; then
194 break
196 done
197 -if test "${ac_cv_search_com_err+set}" = set; then
198 +if test "${ac_cv_search_krb5_sendauth+set}" = set; then
200 else
201 - ac_cv_search_com_err=no
202 + ac_cv_search_krb5_sendauth=no
204 rm conftest.$ac_ext
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"
216 else
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
227 + else
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
232 else
233 ac_func_search_save_LIBS=$LIBS
234 @@ -8837,16 +8869,16 @@
235 #ifdef __cplusplus
236 extern "C"
237 #endif
238 -char krb5_sendauth ();
239 +char com_err ();
241 main ()
243 -return krb5_sendauth ();
244 +return com_err ();
246 return 0;
248 _ACEOF
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"
253 else
254 @@ -8874,7 +8906,7 @@
255 test "$cross_compiling" = yes ||
256 $as_test_x conftest$ac_exeext
257 }; then
258 - ac_cv_search_krb5_sendauth=$ac_res
259 + ac_cv_search_com_err=$ac_res
260 else
261 $as_echo "$as_me: failed program was:" >&5
262 sed 's/^/| /' conftest.$ac_ext >&5
263 @@ -8885,34 +8917,38 @@
264 rm -rf conftest.dSYM
265 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
266 conftest$ac_exeext
267 - if test "${ac_cv_search_krb5_sendauth+set}" = set; then
268 + if test "${ac_cv_search_com_err+set}" = set; then
269 break
271 done
272 -if test "${ac_cv_search_krb5_sendauth+set}" = set; then
273 +if test "${ac_cv_search_com_err+set}" = set; then
275 else
276 - ac_cv_search_krb5_sendauth=no
277 + ac_cv_search_com_err=no
279 rm conftest.$ac_ext
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"
291 else
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; }; }
299 - else
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
303 + fi
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
312 else
313 ac_func_search_save_LIBS=$LIBS
314 @@ -8929,16 +8965,16 @@
315 #ifdef __cplusplus
316 extern "C"
317 #endif
318 -char com_err ();
319 +char gss_init_sec_context ();
321 main ()
323 -return com_err ();
324 +return gss_init_sec_context ();
326 return 0;
328 _ACEOF
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"
333 else
334 @@ -8966,7 +9002,7 @@
335 test "$cross_compiling" = yes ||
336 $as_test_x conftest$ac_exeext
337 }; then
338 - ac_cv_search_com_err=$ac_res
339 + ac_cv_search_gss_init_sec_context=$ac_res
340 else
341 $as_echo "$as_me: failed program was:" >&5
342 sed 's/^/| /' conftest.$ac_ext >&5
343 @@ -8977,30 +9013,32 @@
344 rm -rf conftest.dSYM
345 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
346 conftest$ac_exeext
347 - if test "${ac_cv_search_com_err+set}" = set; then
348 + if test "${ac_cv_search_gss_init_sec_context+set}" = set; then
349 break
351 done
352 -if test "${ac_cv_search_com_err+set}" = set; then
353 +if test "${ac_cv_search_gss_init_sec_context+set}" = set; then
355 else
356 - ac_cv_search_com_err=no
357 + ac_cv_search_gss_init_sec_context=no
359 rm conftest.$ac_ext
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"
371 else
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; }; }
379 + else
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 @@
395 done
398 +cat >>confdefs.h <<\_ACEOF
399 +#define USE_MICROSOFT_LDAP 1
400 +_ACEOF
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
408 _LIBS="$LIBS"
409 + if test "$with_mozldap" = "yes"; then
410 if test "$PORTNAME" != "win32"; then
411 + mozlibname=ldap50
412 + else
413 + mozlibname=nsldap32v50
414 + fi
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
421 +else
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
425 +/* confdefs.h. */
426 +_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. */
434 +#ifdef __cplusplus
435 +extern "C"
436 +#endif
437 +char ldap_bind ();
438 +int
439 +main ()
441 +return ldap_bind ();
443 + return 0;
445 +_ACEOF
446 +rm -f conftest.$ac_objext conftest$ac_exeext
447 +if { (ac_try="$ac_link"
448 +case "(($ac_try" in
449 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
450 + *) ac_try_echo=$ac_try;;
451 +esac
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
455 + ac_status=$?
456 + grep -v '^ *+' conftest.er1 >conftest.err
457 + rm -f conftest.er1
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
466 + }; then
467 + eval "$as_ac_Lib=yes"
468 +else
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
489 +_ACEOF
491 + LIBS="-l$mozlibname $LIBS"
493 +else
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
507 @@ -758,6 +758,13 @@
508 (--with-libxslt) */
509 #undef USE_LIBXSLT
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) */
516 +#undef USE_MOZLDAP
518 /* Define to select named POSIX semaphores. */
519 #undef USE_NAMED_POSIX_SEMAPHORES