]> granicus.if.org Git - postgresql/blob - configure
Add -wnet to SP invocations
[postgresql] / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69 for PostgreSQL 11devel.
4 #
5 # Report bugs to <pgsql-bugs@postgresql.org>.
6 #
7 #
8 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
9 #
10 #
11 # This configure script is free software; the Free Software Foundation
12 # gives unlimited permission to copy, distribute and modify it.
13 #
14 # Copyright (c) 1996-2017, PostgreSQL Global Development Group
15 ## -------------------- ##
16 ## M4sh Initialization. ##
17 ## -------------------- ##
18
19 # Be more Bourne compatible
20 DUALCASE=1; export DUALCASE # for MKS sh
21 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
22   emulate sh
23   NULLCMD=:
24   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
25   # is contrary to our usage.  Disable this feature.
26   alias -g '${1+"$@"}'='"$@"'
27   setopt NO_GLOB_SUBST
28 else
29   case `(set -o) 2>/dev/null` in #(
30   *posix*) :
31     set -o posix ;; #(
32   *) :
33      ;;
34 esac
35 fi
36
37
38 as_nl='
39 '
40 export as_nl
41 # Printing a long string crashes Solaris 7 /usr/bin/printf.
42 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
43 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
44 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
45 # Prefer a ksh shell builtin over an external printf program on Solaris,
46 # but without wasting forks for bash or zsh.
47 if test -z "$BASH_VERSION$ZSH_VERSION" \
48     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
49   as_echo='print -r --'
50   as_echo_n='print -rn --'
51 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
52   as_echo='printf %s\n'
53   as_echo_n='printf %s'
54 else
55   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
56     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
57     as_echo_n='/usr/ucb/echo -n'
58   else
59     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
60     as_echo_n_body='eval
61       arg=$1;
62       case $arg in #(
63       *"$as_nl"*)
64         expr "X$arg" : "X\\(.*\\)$as_nl";
65         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66       esac;
67       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
68     '
69     export as_echo_n_body
70     as_echo_n='sh -c $as_echo_n_body as_echo'
71   fi
72   export as_echo_body
73   as_echo='sh -c $as_echo_body as_echo'
74 fi
75
76 # The user is always right.
77 if test "${PATH_SEPARATOR+set}" != set; then
78   PATH_SEPARATOR=:
79   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
80     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
81       PATH_SEPARATOR=';'
82   }
83 fi
84
85
86 # IFS
87 # We need space, tab and new line, in precisely that order.  Quoting is
88 # there to prevent editors from complaining about space-tab.
89 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
90 # splitting by setting IFS to empty value.)
91 IFS=" ""        $as_nl"
92
93 # Find who we are.  Look in the path if we contain no directory separator.
94 as_myself=
95 case $0 in #((
96   *[\\/]* ) as_myself=$0 ;;
97   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
98 for as_dir in $PATH
99 do
100   IFS=$as_save_IFS
101   test -z "$as_dir" && as_dir=.
102     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
103   done
104 IFS=$as_save_IFS
105
106      ;;
107 esac
108 # We did not find ourselves, most probably we were run as `sh COMMAND'
109 # in which case we are not to be found in the path.
110 if test "x$as_myself" = x; then
111   as_myself=$0
112 fi
113 if test ! -f "$as_myself"; then
114   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
115   exit 1
116 fi
117
118 # Unset variables that we do not need and which cause bugs (e.g. in
119 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
120 # suppresses any "Segmentation fault" message there.  '((' could
121 # trigger a bug in pdksh 5.2.14.
122 for as_var in BASH_ENV ENV MAIL MAILPATH
123 do eval test x\${$as_var+set} = xset \
124   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
125 done
126 PS1='$ '
127 PS2='> '
128 PS4='+ '
129
130 # NLS nuisances.
131 LC_ALL=C
132 export LC_ALL
133 LANGUAGE=C
134 export LANGUAGE
135
136 # CDPATH.
137 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
138
139 # Use a proper internal environment variable to ensure we don't fall
140   # into an infinite loop, continuously re-executing ourselves.
141   if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
142     _as_can_reexec=no; export _as_can_reexec;
143     # We cannot yet assume a decent shell, so we have to provide a
144 # neutralization value for shells without unset; and this also
145 # works around shells that cannot unset nonexistent variables.
146 # Preserve -v and -x to the replacement shell.
147 BASH_ENV=/dev/null
148 ENV=/dev/null
149 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
150 case $- in # ((((
151   *v*x* | *x*v* ) as_opts=-vx ;;
152   *v* ) as_opts=-v ;;
153   *x* ) as_opts=-x ;;
154   * ) as_opts= ;;
155 esac
156 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
157 # Admittedly, this is quite paranoid, since all the known shells bail
158 # out after a failed `exec'.
159 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
160 as_fn_exit 255
161   fi
162   # We don't want this to propagate to other subprocesses.
163           { _as_can_reexec=; unset _as_can_reexec;}
164 if test "x$CONFIG_SHELL" = x; then
165   as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
166   emulate sh
167   NULLCMD=:
168   # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
169   # is contrary to our usage.  Disable this feature.
170   alias -g '\${1+\"\$@\"}'='\"\$@\"'
171   setopt NO_GLOB_SUBST
172 else
173   case \`(set -o) 2>/dev/null\` in #(
174   *posix*) :
175     set -o posix ;; #(
176   *) :
177      ;;
178 esac
179 fi
180 "
181   as_required="as_fn_return () { (exit \$1); }
182 as_fn_success () { as_fn_return 0; }
183 as_fn_failure () { as_fn_return 1; }
184 as_fn_ret_success () { return 0; }
185 as_fn_ret_failure () { return 1; }
186
187 exitcode=0
188 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
189 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
190 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
191 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
192 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
193
194 else
195   exitcode=1; echo positional parameters were not saved.
196 fi
197 test x\$exitcode = x0 || exit 1
198 test -x / || exit 1"
199   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
200   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
201   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
202   test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
203 test \$(( 1 + 1 )) = 2 || exit 1"
204   if (eval "$as_required") 2>/dev/null; then :
205   as_have_required=yes
206 else
207   as_have_required=no
208 fi
209   if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
210
211 else
212   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
213 as_found=false
214 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
215 do
216   IFS=$as_save_IFS
217   test -z "$as_dir" && as_dir=.
218   as_found=:
219   case $as_dir in #(
220          /*)
221            for as_base in sh bash ksh sh5; do
222              # Try only shells that exist, to save several forks.
223              as_shell=$as_dir/$as_base
224              if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
225                     { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
226   CONFIG_SHELL=$as_shell as_have_required=yes
227                    if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
228   break 2
229 fi
230 fi
231            done;;
232        esac
233   as_found=false
234 done
235 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
236               { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
237   CONFIG_SHELL=$SHELL as_have_required=yes
238 fi; }
239 IFS=$as_save_IFS
240
241
242       if test "x$CONFIG_SHELL" != x; then :
243   export CONFIG_SHELL
244              # We cannot yet assume a decent shell, so we have to provide a
245 # neutralization value for shells without unset; and this also
246 # works around shells that cannot unset nonexistent variables.
247 # Preserve -v and -x to the replacement shell.
248 BASH_ENV=/dev/null
249 ENV=/dev/null
250 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
251 case $- in # ((((
252   *v*x* | *x*v* ) as_opts=-vx ;;
253   *v* ) as_opts=-v ;;
254   *x* ) as_opts=-x ;;
255   * ) as_opts= ;;
256 esac
257 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
258 # Admittedly, this is quite paranoid, since all the known shells bail
259 # out after a failed `exec'.
260 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
261 exit 255
262 fi
263
264     if test x$as_have_required = xno; then :
265   $as_echo "$0: This script requires a shell more modern than all"
266   $as_echo "$0: the shells that I found on your system."
267   if test x${ZSH_VERSION+set} = xset ; then
268     $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
269     $as_echo "$0: be upgraded to zsh 4.3.4 or later."
270   else
271     $as_echo "$0: Please tell bug-autoconf@gnu.org and
272 $0: pgsql-bugs@postgresql.org about your system, including
273 $0: any error possibly output before this message. Then
274 $0: install a modern shell, or manually run the script
275 $0: under such a shell if you do have one."
276   fi
277   exit 1
278 fi
279 fi
280 fi
281 SHELL=${CONFIG_SHELL-/bin/sh}
282 export SHELL
283 # Unset more variables known to interfere with behavior of common tools.
284 CLICOLOR_FORCE= GREP_OPTIONS=
285 unset CLICOLOR_FORCE GREP_OPTIONS
286
287 ## --------------------- ##
288 ## M4sh Shell Functions. ##
289 ## --------------------- ##
290 # as_fn_unset VAR
291 # ---------------
292 # Portably unset VAR.
293 as_fn_unset ()
294 {
295   { eval $1=; unset $1;}
296 }
297 as_unset=as_fn_unset
298
299 # as_fn_set_status STATUS
300 # -----------------------
301 # Set $? to STATUS, without forking.
302 as_fn_set_status ()
303 {
304   return $1
305 } # as_fn_set_status
306
307 # as_fn_exit STATUS
308 # -----------------
309 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
310 as_fn_exit ()
311 {
312   set +e
313   as_fn_set_status $1
314   exit $1
315 } # as_fn_exit
316
317 # as_fn_mkdir_p
318 # -------------
319 # Create "$as_dir" as a directory, including parents if necessary.
320 as_fn_mkdir_p ()
321 {
322
323   case $as_dir in #(
324   -*) as_dir=./$as_dir;;
325   esac
326   test -d "$as_dir" || eval $as_mkdir_p || {
327     as_dirs=
328     while :; do
329       case $as_dir in #(
330       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
331       *) as_qdir=$as_dir;;
332       esac
333       as_dirs="'$as_qdir' $as_dirs"
334       as_dir=`$as_dirname -- "$as_dir" ||
335 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
336          X"$as_dir" : 'X\(//\)[^/]' \| \
337          X"$as_dir" : 'X\(//\)$' \| \
338          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
339 $as_echo X"$as_dir" |
340     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
341             s//\1/
342             q
343           }
344           /^X\(\/\/\)[^/].*/{
345             s//\1/
346             q
347           }
348           /^X\(\/\/\)$/{
349             s//\1/
350             q
351           }
352           /^X\(\/\).*/{
353             s//\1/
354             q
355           }
356           s/.*/./; q'`
357       test -d "$as_dir" && break
358     done
359     test -z "$as_dirs" || eval "mkdir $as_dirs"
360   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
361
362
363 } # as_fn_mkdir_p
364
365 # as_fn_executable_p FILE
366 # -----------------------
367 # Test if FILE is an executable regular file.
368 as_fn_executable_p ()
369 {
370   test -f "$1" && test -x "$1"
371 } # as_fn_executable_p
372 # as_fn_append VAR VALUE
373 # ----------------------
374 # Append the text in VALUE to the end of the definition contained in VAR. Take
375 # advantage of any shell optimizations that allow amortized linear growth over
376 # repeated appends, instead of the typical quadratic growth present in naive
377 # implementations.
378 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
379   eval 'as_fn_append ()
380   {
381     eval $1+=\$2
382   }'
383 else
384   as_fn_append ()
385   {
386     eval $1=\$$1\$2
387   }
388 fi # as_fn_append
389
390 # as_fn_arith ARG...
391 # ------------------
392 # Perform arithmetic evaluation on the ARGs, and store the result in the
393 # global $as_val. Take advantage of shells that can avoid forks. The arguments
394 # must be portable across $(()) and expr.
395 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
396   eval 'as_fn_arith ()
397   {
398     as_val=$(( $* ))
399   }'
400 else
401   as_fn_arith ()
402   {
403     as_val=`expr "$@" || test $? -eq 1`
404   }
405 fi # as_fn_arith
406
407
408 # as_fn_error STATUS ERROR [LINENO LOG_FD]
409 # ----------------------------------------
410 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
411 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
412 # script with STATUS, using 1 if that was 0.
413 as_fn_error ()
414 {
415   as_status=$1; test $as_status -eq 0 && as_status=1
416   if test "$4"; then
417     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
418     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
419   fi
420   $as_echo "$as_me: error: $2" >&2
421   as_fn_exit $as_status
422 } # as_fn_error
423
424 if expr a : '\(a\)' >/dev/null 2>&1 &&
425    test "X`expr 00001 : '.*\(...\)'`" = X001; then
426   as_expr=expr
427 else
428   as_expr=false
429 fi
430
431 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
432   as_basename=basename
433 else
434   as_basename=false
435 fi
436
437 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
438   as_dirname=dirname
439 else
440   as_dirname=false
441 fi
442
443 as_me=`$as_basename -- "$0" ||
444 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
445          X"$0" : 'X\(//\)$' \| \
446          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
447 $as_echo X/"$0" |
448     sed '/^.*\/\([^/][^/]*\)\/*$/{
449             s//\1/
450             q
451           }
452           /^X\/\(\/\/\)$/{
453             s//\1/
454             q
455           }
456           /^X\/\(\/\).*/{
457             s//\1/
458             q
459           }
460           s/.*/./; q'`
461
462 # Avoid depending upon Character Ranges.
463 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
464 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
465 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
466 as_cr_digits='0123456789'
467 as_cr_alnum=$as_cr_Letters$as_cr_digits
468
469
470   as_lineno_1=$LINENO as_lineno_1a=$LINENO
471   as_lineno_2=$LINENO as_lineno_2a=$LINENO
472   eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
473   test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
474   # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
475   sed -n '
476     p
477     /[$]LINENO/=
478   ' <$as_myself |
479     sed '
480       s/[$]LINENO.*/&-/
481       t lineno
482       b
483       :lineno
484       N
485       :loop
486       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
487       t loop
488       s/-\n.*//
489     ' >$as_me.lineno &&
490   chmod +x "$as_me.lineno" ||
491     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
492
493   # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
494   # already done that, so ensure we don't try to do so again and fall
495   # in an infinite loop.  This has already happened in practice.
496   _as_can_reexec=no; export _as_can_reexec
497   # Don't try to exec as it changes $[0], causing all sort of problems
498   # (the dirname of $[0] is not the place where we might find the
499   # original and so on.  Autoconf is especially sensitive to this).
500   . "./$as_me.lineno"
501   # Exit status is that of the last command.
502   exit
503 }
504
505 ECHO_C= ECHO_N= ECHO_T=
506 case `echo -n x` in #(((((
507 -n*)
508   case `echo 'xy\c'` in
509   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
510   xy)  ECHO_C='\c';;
511   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
512        ECHO_T=' ';;
513   esac;;
514 *)
515   ECHO_N='-n';;
516 esac
517
518 rm -f conf$$ conf$$.exe conf$$.file
519 if test -d conf$$.dir; then
520   rm -f conf$$.dir/conf$$.file
521 else
522   rm -f conf$$.dir
523   mkdir conf$$.dir 2>/dev/null
524 fi
525 if (echo >conf$$.file) 2>/dev/null; then
526   if ln -s conf$$.file conf$$ 2>/dev/null; then
527     as_ln_s='ln -s'
528     # ... but there are two gotchas:
529     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
530     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
531     # In both cases, we have to default to `cp -pR'.
532     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
533       as_ln_s='cp -pR'
534   elif ln conf$$.file conf$$ 2>/dev/null; then
535     as_ln_s=ln
536   else
537     as_ln_s='cp -pR'
538   fi
539 else
540   as_ln_s='cp -pR'
541 fi
542 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
543 rmdir conf$$.dir 2>/dev/null
544
545 if mkdir -p . 2>/dev/null; then
546   as_mkdir_p='mkdir -p "$as_dir"'
547 else
548   test -d ./-p && rmdir ./-p
549   as_mkdir_p=false
550 fi
551
552 as_test_x='test -x'
553 as_executable_p=as_fn_executable_p
554
555 # Sed expression to map a string onto a valid CPP name.
556 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
557
558 # Sed expression to map a string onto a valid variable name.
559 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
560
561
562 test -n "$DJDIR" || exec 7<&0 </dev/null
563 exec 6>&1
564
565 # Name of the host.
566 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
567 # so uname gets run too.
568 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
569
570 #
571 # Initializations.
572 #
573 ac_default_prefix=/usr/local
574 ac_clean_files=
575 ac_config_libobj_dir=.
576 LIBOBJS=
577 cross_compiling=no
578 subdirs=
579 MFLAGS=
580 MAKEFLAGS=
581
582 # Identity of this package.
583 PACKAGE_NAME='PostgreSQL'
584 PACKAGE_TARNAME='postgresql'
585 PACKAGE_VERSION='11devel'
586 PACKAGE_STRING='PostgreSQL 11devel'
587 PACKAGE_BUGREPORT='pgsql-bugs@postgresql.org'
588 PACKAGE_URL=''
589
590 ac_unique_file="src/backend/access/common/heaptuple.c"
591 ac_default_prefix=/usr/local/pgsql
592 # Factoring default headers for most tests.
593 ac_includes_default="\
594 #include <stdio.h>
595 #ifdef HAVE_SYS_TYPES_H
596 # include <sys/types.h>
597 #endif
598 #ifdef HAVE_SYS_STAT_H
599 # include <sys/stat.h>
600 #endif
601 #ifdef STDC_HEADERS
602 # include <stdlib.h>
603 # include <stddef.h>
604 #else
605 # ifdef HAVE_STDLIB_H
606 #  include <stdlib.h>
607 # endif
608 #endif
609 #ifdef HAVE_STRING_H
610 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
611 #  include <memory.h>
612 # endif
613 # include <string.h>
614 #endif
615 #ifdef HAVE_STRINGS_H
616 # include <strings.h>
617 #endif
618 #ifdef HAVE_INTTYPES_H
619 # include <inttypes.h>
620 #endif
621 #ifdef HAVE_STDINT_H
622 # include <stdint.h>
623 #endif
624 #ifdef HAVE_UNISTD_H
625 # include <unistd.h>
626 #endif"
627
628 ac_subst_vars='LTLIBOBJS
629 vpath_build
630 PG_VERSION_NUM
631 PROVE
632 FOP
633 OSX
634 XSLTPROC
635 XMLLINT
636 DBTOEPUB
637 have_docbook
638 NSGMLS
639 TCL_SHLIB_LD_LIBS
640 TCL_SHARED_BUILD
641 TCL_LIB_SPEC
642 TCL_LIBS
643 TCL_INCLUDE_SPEC
644 TCL_CONFIG_SH
645 TCLSH
646 XGETTEXT
647 MSGMERGE
648 MSGFMT_FLAGS
649 MSGFMT
650 PG_CRC32C_OBJS
651 CFLAGS_SSE42
652 have_win32_dbghelp
653 HAVE_IPV6
654 LIBOBJS
655 UUID_LIBS
656 LDAP_LIBS_BE
657 LDAP_LIBS_FE
658 PTHREAD_CFLAGS
659 PTHREAD_LIBS
660 PTHREAD_CC
661 ax_pthread_config
662 ZIC
663 python_additional_libs
664 python_libspec
665 python_libdir
666 python_includespec
667 python_version
668 python_majorversion
669 PYTHON
670 perl_embed_ldflags
671 perl_embed_ccflags
672 perl_useshrplib
673 perl_privlibexp
674 perl_archlibexp
675 PERL
676 FLEXFLAGS
677 FLEX
678 BISONFLAGS
679 BISON
680 MKDIR_P
681 AWK
682 LN_S
683 TAR
684 install_bin
685 INSTALL_DATA
686 INSTALL_SCRIPT
687 INSTALL_PROGRAM
688 WINDRES
689 DLLWRAP
690 DLLTOOL
691 AR
692 STRIP_SHARED_LIB
693 STRIP_STATIC_LIB
694 STRIP
695 RANLIB
696 with_gnu_ld
697 LD
698 LDFLAGS_SL
699 LDFLAGS_EX
700 ELF_SYS
701 EGREP
702 GREP
703 with_zlib
704 with_system_tzdata
705 with_libxslt
706 with_libxml
707 XML2_CONFIG
708 UUID_EXTRA_OBJS
709 with_uuid
710 with_systemd
711 with_selinux
712 with_openssl
713 krb_srvtab
714 with_python
715 with_perl
716 with_tcl
717 ICU_LIBS
718 ICU_CFLAGS
719 PKG_CONFIG_LIBDIR
720 PKG_CONFIG_PATH
721 PKG_CONFIG
722 with_icu
723 enable_thread_safety
724 INCLUDES
725 autodepend
726 TAS
727 GCC
728 CPP
729 CFLAGS_VECTOR
730 SUN_STUDIO_CC
731 OBJEXT
732 EXEEXT
733 ac_ct_CC
734 CPPFLAGS
735 LDFLAGS
736 CFLAGS
737 CC
738 enable_tap_tests
739 enable_dtrace
740 DTRACEFLAGS
741 DTRACE
742 enable_coverage
743 GENHTML
744 LCOV
745 GCOV
746 enable_debug
747 enable_strong_random
748 enable_rpath
749 default_port
750 WANTED_LANGUAGES
751 enable_nls
752 PORTNAME
753 host_os
754 host_vendor
755 host_cpu
756 host
757 build_os
758 build_vendor
759 build_cpu
760 build
761 PG_MAJORVERSION
762 configure_args
763 target_alias
764 host_alias
765 build_alias
766 LIBS
767 ECHO_T
768 ECHO_N
769 ECHO_C
770 DEFS
771 mandir
772 localedir
773 libdir
774 psdir
775 pdfdir
776 dvidir
777 htmldir
778 infodir
779 docdir
780 oldincludedir
781 includedir
782 localstatedir
783 sharedstatedir
784 sysconfdir
785 datadir
786 datarootdir
787 libexecdir
788 sbindir
789 bindir
790 program_transform_name
791 prefix
792 exec_prefix
793 PACKAGE_URL
794 PACKAGE_BUGREPORT
795 PACKAGE_STRING
796 PACKAGE_VERSION
797 PACKAGE_TARNAME
798 PACKAGE_NAME
799 PATH_SEPARATOR
800 SHELL'
801 ac_subst_files=''
802 ac_user_opts='
803 enable_option_checking
804 with_extra_version
805 with_template
806 with_includes
807 with_libraries
808 with_libs
809 enable_integer_datetimes
810 enable_nls
811 with_pgport
812 enable_rpath
813 enable_spinlocks
814 enable_atomics
815 enable_strong_random
816 enable_debug
817 enable_profiling
818 enable_coverage
819 enable_dtrace
820 enable_tap_tests
821 with_blocksize
822 with_segsize
823 with_wal_blocksize
824 with_CC
825 enable_depend
826 enable_cassert
827 enable_thread_safety
828 with_icu
829 with_tcl
830 with_tclconfig
831 with_perl
832 with_python
833 with_gssapi
834 with_krb_srvnam
835 with_pam
836 with_bsd_auth
837 with_ldap
838 with_bonjour
839 with_openssl
840 with_selinux
841 with_systemd
842 with_readline
843 with_libedit_preferred
844 with_uuid
845 with_ossp_uuid
846 with_libxml
847 with_libxslt
848 with_system_tzdata
849 with_zlib
850 with_gnu_ld
851 enable_largefile
852 enable_float4_byval
853 enable_float8_byval
854 '
855       ac_precious_vars='build_alias
856 host_alias
857 target_alias
858 CC
859 CFLAGS
860 LDFLAGS
861 LIBS
862 CPPFLAGS
863 CPP
864 PKG_CONFIG
865 PKG_CONFIG_PATH
866 PKG_CONFIG_LIBDIR
867 ICU_CFLAGS
868 ICU_LIBS
869 LDFLAGS_EX
870 LDFLAGS_SL'
871
872
873 # Initialize some variables set by options.
874 ac_init_help=
875 ac_init_version=false
876 ac_unrecognized_opts=
877 ac_unrecognized_sep=
878 # The variables have the same names as the options, with
879 # dashes changed to underlines.
880 cache_file=/dev/null
881 exec_prefix=NONE
882 no_create=
883 no_recursion=
884 prefix=NONE
885 program_prefix=NONE
886 program_suffix=NONE
887 program_transform_name=s,x,x,
888 silent=
889 site=
890 srcdir=
891 verbose=
892 x_includes=NONE
893 x_libraries=NONE
894
895 # Installation directory options.
896 # These are left unexpanded so users can "make install exec_prefix=/foo"
897 # and all the variables that are supposed to be based on exec_prefix
898 # by default will actually change.
899 # Use braces instead of parens because sh, perl, etc. also accept them.
900 # (The list follows the same order as the GNU Coding Standards.)
901 bindir='${exec_prefix}/bin'
902 sbindir='${exec_prefix}/sbin'
903 libexecdir='${exec_prefix}/libexec'
904 datarootdir='${prefix}/share'
905 datadir='${datarootdir}'
906 sysconfdir='${prefix}/etc'
907 sharedstatedir='${prefix}/com'
908 localstatedir='${prefix}/var'
909 includedir='${prefix}/include'
910 oldincludedir='/usr/include'
911 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
912 infodir='${datarootdir}/info'
913 htmldir='${docdir}'
914 dvidir='${docdir}'
915 pdfdir='${docdir}'
916 psdir='${docdir}'
917 libdir='${exec_prefix}/lib'
918 localedir='${datarootdir}/locale'
919 mandir='${datarootdir}/man'
920
921 ac_prev=
922 ac_dashdash=
923 for ac_option
924 do
925   # If the previous option needs an argument, assign it.
926   if test -n "$ac_prev"; then
927     eval $ac_prev=\$ac_option
928     ac_prev=
929     continue
930   fi
931
932   case $ac_option in
933   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
934   *=)   ac_optarg= ;;
935   *)    ac_optarg=yes ;;
936   esac
937
938   # Accept the important Cygnus configure options, so we can diagnose typos.
939
940   case $ac_dashdash$ac_option in
941   --)
942     ac_dashdash=yes ;;
943
944   -bindir | --bindir | --bindi | --bind | --bin | --bi)
945     ac_prev=bindir ;;
946   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
947     bindir=$ac_optarg ;;
948
949   -build | --build | --buil | --bui | --bu)
950     ac_prev=build_alias ;;
951   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
952     build_alias=$ac_optarg ;;
953
954   -cache-file | --cache-file | --cache-fil | --cache-fi \
955   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
956     ac_prev=cache_file ;;
957   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
958   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
959     cache_file=$ac_optarg ;;
960
961   --config-cache | -C)
962     cache_file=config.cache ;;
963
964   -datadir | --datadir | --datadi | --datad)
965     ac_prev=datadir ;;
966   -datadir=* | --datadir=* | --datadi=* | --datad=*)
967     datadir=$ac_optarg ;;
968
969   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
970   | --dataroo | --dataro | --datar)
971     ac_prev=datarootdir ;;
972   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
973   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
974     datarootdir=$ac_optarg ;;
975
976   -disable-* | --disable-*)
977     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
978     # Reject names that are not valid shell variable names.
979     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
980       as_fn_error $? "invalid feature name: $ac_useropt"
981     ac_useropt_orig=$ac_useropt
982     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
983     case $ac_user_opts in
984       *"
985 "enable_$ac_useropt"
986 "*) ;;
987       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
988          ac_unrecognized_sep=', ';;
989     esac
990     eval enable_$ac_useropt=no ;;
991
992   -docdir | --docdir | --docdi | --doc | --do)
993     ac_prev=docdir ;;
994   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
995     docdir=$ac_optarg ;;
996
997   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
998     ac_prev=dvidir ;;
999   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1000     dvidir=$ac_optarg ;;
1001
1002   -enable-* | --enable-*)
1003     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1004     # Reject names that are not valid shell variable names.
1005     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1006       as_fn_error $? "invalid feature name: $ac_useropt"
1007     ac_useropt_orig=$ac_useropt
1008     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1009     case $ac_user_opts in
1010       *"
1011 "enable_$ac_useropt"
1012 "*) ;;
1013       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1014          ac_unrecognized_sep=', ';;
1015     esac
1016     eval enable_$ac_useropt=\$ac_optarg ;;
1017
1018   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1019   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1020   | --exec | --exe | --ex)
1021     ac_prev=exec_prefix ;;
1022   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1023   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1024   | --exec=* | --exe=* | --ex=*)
1025     exec_prefix=$ac_optarg ;;
1026
1027   -gas | --gas | --ga | --g)
1028     # Obsolete; use --with-gas.
1029     with_gas=yes ;;
1030
1031   -help | --help | --hel | --he | -h)
1032     ac_init_help=long ;;
1033   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1034     ac_init_help=recursive ;;
1035   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1036     ac_init_help=short ;;
1037
1038   -host | --host | --hos | --ho)
1039     ac_prev=host_alias ;;
1040   -host=* | --host=* | --hos=* | --ho=*)
1041     host_alias=$ac_optarg ;;
1042
1043   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1044     ac_prev=htmldir ;;
1045   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1046   | --ht=*)
1047     htmldir=$ac_optarg ;;
1048
1049   -includedir | --includedir | --includedi | --included | --include \
1050   | --includ | --inclu | --incl | --inc)
1051     ac_prev=includedir ;;
1052   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1053   | --includ=* | --inclu=* | --incl=* | --inc=*)
1054     includedir=$ac_optarg ;;
1055
1056   -infodir | --infodir | --infodi | --infod | --info | --inf)
1057     ac_prev=infodir ;;
1058   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1059     infodir=$ac_optarg ;;
1060
1061   -libdir | --libdir | --libdi | --libd)
1062     ac_prev=libdir ;;
1063   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1064     libdir=$ac_optarg ;;
1065
1066   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1067   | --libexe | --libex | --libe)
1068     ac_prev=libexecdir ;;
1069   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1070   | --libexe=* | --libex=* | --libe=*)
1071     libexecdir=$ac_optarg ;;
1072
1073   -localedir | --localedir | --localedi | --localed | --locale)
1074     ac_prev=localedir ;;
1075   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1076     localedir=$ac_optarg ;;
1077
1078   -localstatedir | --localstatedir | --localstatedi | --localstated \
1079   | --localstate | --localstat | --localsta | --localst | --locals)
1080     ac_prev=localstatedir ;;
1081   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1082   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1083     localstatedir=$ac_optarg ;;
1084
1085   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1086     ac_prev=mandir ;;
1087   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1088     mandir=$ac_optarg ;;
1089
1090   -nfp | --nfp | --nf)
1091     # Obsolete; use --without-fp.
1092     with_fp=no ;;
1093
1094   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1095   | --no-cr | --no-c | -n)
1096     no_create=yes ;;
1097
1098   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1099   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1100     no_recursion=yes ;;
1101
1102   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1103   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1104   | --oldin | --oldi | --old | --ol | --o)
1105     ac_prev=oldincludedir ;;
1106   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1107   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1108   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1109     oldincludedir=$ac_optarg ;;
1110
1111   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1112     ac_prev=prefix ;;
1113   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1114     prefix=$ac_optarg ;;
1115
1116   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1117   | --program-pre | --program-pr | --program-p)
1118     ac_prev=program_prefix ;;
1119   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1120   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1121     program_prefix=$ac_optarg ;;
1122
1123   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1124   | --program-suf | --program-su | --program-s)
1125     ac_prev=program_suffix ;;
1126   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1127   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1128     program_suffix=$ac_optarg ;;
1129
1130   -program-transform-name | --program-transform-name \
1131   | --program-transform-nam | --program-transform-na \
1132   | --program-transform-n | --program-transform- \
1133   | --program-transform | --program-transfor \
1134   | --program-transfo | --program-transf \
1135   | --program-trans | --program-tran \
1136   | --progr-tra | --program-tr | --program-t)
1137     ac_prev=program_transform_name ;;
1138   -program-transform-name=* | --program-transform-name=* \
1139   | --program-transform-nam=* | --program-transform-na=* \
1140   | --program-transform-n=* | --program-transform-=* \
1141   | --program-transform=* | --program-transfor=* \
1142   | --program-transfo=* | --program-transf=* \
1143   | --program-trans=* | --program-tran=* \
1144   | --progr-tra=* | --program-tr=* | --program-t=*)
1145     program_transform_name=$ac_optarg ;;
1146
1147   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1148     ac_prev=pdfdir ;;
1149   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1150     pdfdir=$ac_optarg ;;
1151
1152   -psdir | --psdir | --psdi | --psd | --ps)
1153     ac_prev=psdir ;;
1154   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1155     psdir=$ac_optarg ;;
1156
1157   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1158   | -silent | --silent | --silen | --sile | --sil)
1159     silent=yes ;;
1160
1161   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1162     ac_prev=sbindir ;;
1163   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1164   | --sbi=* | --sb=*)
1165     sbindir=$ac_optarg ;;
1166
1167   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1168   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1169   | --sharedst | --shareds | --shared | --share | --shar \
1170   | --sha | --sh)
1171     ac_prev=sharedstatedir ;;
1172   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1173   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1174   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1175   | --sha=* | --sh=*)
1176     sharedstatedir=$ac_optarg ;;
1177
1178   -site | --site | --sit)
1179     ac_prev=site ;;
1180   -site=* | --site=* | --sit=*)
1181     site=$ac_optarg ;;
1182
1183   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1184     ac_prev=srcdir ;;
1185   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1186     srcdir=$ac_optarg ;;
1187
1188   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1189   | --syscon | --sysco | --sysc | --sys | --sy)
1190     ac_prev=sysconfdir ;;
1191   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1192   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1193     sysconfdir=$ac_optarg ;;
1194
1195   -target | --target | --targe | --targ | --tar | --ta | --t)
1196     ac_prev=target_alias ;;
1197   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1198     target_alias=$ac_optarg ;;
1199
1200   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1201     verbose=yes ;;
1202
1203   -version | --version | --versio | --versi | --vers | -V)
1204     ac_init_version=: ;;
1205
1206   -with-* | --with-*)
1207     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1208     # Reject names that are not valid shell variable names.
1209     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1210       as_fn_error $? "invalid package name: $ac_useropt"
1211     ac_useropt_orig=$ac_useropt
1212     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1213     case $ac_user_opts in
1214       *"
1215 "with_$ac_useropt"
1216 "*) ;;
1217       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1218          ac_unrecognized_sep=', ';;
1219     esac
1220     eval with_$ac_useropt=\$ac_optarg ;;
1221
1222   -without-* | --without-*)
1223     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1224     # Reject names that are not valid shell variable names.
1225     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1226       as_fn_error $? "invalid package name: $ac_useropt"
1227     ac_useropt_orig=$ac_useropt
1228     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1229     case $ac_user_opts in
1230       *"
1231 "with_$ac_useropt"
1232 "*) ;;
1233       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1234          ac_unrecognized_sep=', ';;
1235     esac
1236     eval with_$ac_useropt=no ;;
1237
1238   --x)
1239     # Obsolete; use --with-x.
1240     with_x=yes ;;
1241
1242   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1243   | --x-incl | --x-inc | --x-in | --x-i)
1244     ac_prev=x_includes ;;
1245   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1246   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1247     x_includes=$ac_optarg ;;
1248
1249   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1250   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1251     ac_prev=x_libraries ;;
1252   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1253   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1254     x_libraries=$ac_optarg ;;
1255
1256   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1257 Try \`$0 --help' for more information"
1258     ;;
1259
1260   *=*)
1261     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1262     # Reject names that are not valid shell variable names.
1263     case $ac_envvar in #(
1264       '' | [0-9]* | *[!_$as_cr_alnum]* )
1265       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1266     esac
1267     eval $ac_envvar=\$ac_optarg
1268     export $ac_envvar ;;
1269
1270   *)
1271     # FIXME: should be removed in autoconf 3.0.
1272     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1273     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1274       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1275     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1276     ;;
1277
1278   esac
1279 done
1280
1281 if test -n "$ac_prev"; then
1282   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1283   as_fn_error $? "missing argument to $ac_option"
1284 fi
1285
1286 if test -n "$ac_unrecognized_opts"; then
1287   case $enable_option_checking in
1288     no) ;;
1289     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1290     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1291   esac
1292 fi
1293
1294 # Check all directory arguments for consistency.
1295 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1296                 datadir sysconfdir sharedstatedir localstatedir includedir \
1297                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1298                 libdir localedir mandir
1299 do
1300   eval ac_val=\$$ac_var
1301   # Remove trailing slashes.
1302   case $ac_val in
1303     */ )
1304       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1305       eval $ac_var=\$ac_val;;
1306   esac
1307   # Be sure to have absolute directory names.
1308   case $ac_val in
1309     [\\/$]* | ?:[\\/]* )  continue;;
1310     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1311   esac
1312   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1313 done
1314
1315 # There might be people who depend on the old broken behavior: `$host'
1316 # used to hold the argument of --host etc.
1317 # FIXME: To remove some day.
1318 build=$build_alias
1319 host=$host_alias
1320 target=$target_alias
1321
1322 # FIXME: To remove some day.
1323 if test "x$host_alias" != x; then
1324   if test "x$build_alias" = x; then
1325     cross_compiling=maybe
1326   elif test "x$build_alias" != "x$host_alias"; then
1327     cross_compiling=yes
1328   fi
1329 fi
1330
1331 ac_tool_prefix=
1332 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1333
1334 test "$silent" = yes && exec 6>/dev/null
1335
1336
1337 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1338 ac_ls_di=`ls -di .` &&
1339 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1340   as_fn_error $? "working directory cannot be determined"
1341 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1342   as_fn_error $? "pwd does not report name of working directory"
1343
1344
1345 # Find the source files, if location was not specified.
1346 if test -z "$srcdir"; then
1347   ac_srcdir_defaulted=yes
1348   # Try the directory containing this script, then the parent directory.
1349   ac_confdir=`$as_dirname -- "$as_myself" ||
1350 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1351          X"$as_myself" : 'X\(//\)[^/]' \| \
1352          X"$as_myself" : 'X\(//\)$' \| \
1353          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1354 $as_echo X"$as_myself" |
1355     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1356             s//\1/
1357             q
1358           }
1359           /^X\(\/\/\)[^/].*/{
1360             s//\1/
1361             q
1362           }
1363           /^X\(\/\/\)$/{
1364             s//\1/
1365             q
1366           }
1367           /^X\(\/\).*/{
1368             s//\1/
1369             q
1370           }
1371           s/.*/./; q'`
1372   srcdir=$ac_confdir
1373   if test ! -r "$srcdir/$ac_unique_file"; then
1374     srcdir=..
1375   fi
1376 else
1377   ac_srcdir_defaulted=no
1378 fi
1379 if test ! -r "$srcdir/$ac_unique_file"; then
1380   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1381   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1382 fi
1383 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1384 ac_abs_confdir=`(
1385         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1386         pwd)`
1387 # When building in place, set srcdir=.
1388 if test "$ac_abs_confdir" = "$ac_pwd"; then
1389   srcdir=.
1390 fi
1391 # Remove unnecessary trailing slashes from srcdir.
1392 # Double slashes in file names in object file debugging info
1393 # mess up M-x gdb in Emacs.
1394 case $srcdir in
1395 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1396 esac
1397 for ac_var in $ac_precious_vars; do
1398   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1399   eval ac_env_${ac_var}_value=\$${ac_var}
1400   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1401   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1402 done
1403
1404 #
1405 # Report the --help message.
1406 #
1407 if test "$ac_init_help" = "long"; then
1408   # Omit some internal or obsolete options to make the list less imposing.
1409   # This message is too long to be a string in the A/UX 3.1 sh.
1410   cat <<_ACEOF
1411 \`configure' configures PostgreSQL 11devel to adapt to many kinds of systems.
1412
1413 Usage: $0 [OPTION]... [VAR=VALUE]...
1414
1415 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1416 VAR=VALUE.  See below for descriptions of some of the useful variables.
1417
1418 Defaults for the options are specified in brackets.
1419
1420 Configuration:
1421   -h, --help              display this help and exit
1422       --help=short        display options specific to this package
1423       --help=recursive    display the short help of all the included packages
1424   -V, --version           display version information and exit
1425   -q, --quiet, --silent   do not print \`checking ...' messages
1426       --cache-file=FILE   cache test results in FILE [disabled]
1427   -C, --config-cache      alias for \`--cache-file=config.cache'
1428   -n, --no-create         do not create output files
1429       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1430
1431 Installation directories:
1432   --prefix=PREFIX         install architecture-independent files in PREFIX
1433                           [$ac_default_prefix]
1434   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1435                           [PREFIX]
1436
1437 By default, \`make install' will install all the files in
1438 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1439 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1440 for instance \`--prefix=\$HOME'.
1441
1442 For better control, use the options below.
1443
1444 Fine tuning of the installation directories:
1445   --bindir=DIR            user executables [EPREFIX/bin]
1446   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1447   --libexecdir=DIR        program executables [EPREFIX/libexec]
1448   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1449   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1450   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1451   --libdir=DIR            object code libraries [EPREFIX/lib]
1452   --includedir=DIR        C header files [PREFIX/include]
1453   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1454   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1455   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1456   --infodir=DIR           info documentation [DATAROOTDIR/info]
1457   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1458   --mandir=DIR            man documentation [DATAROOTDIR/man]
1459   --docdir=DIR            documentation root [DATAROOTDIR/doc/postgresql]
1460   --htmldir=DIR           html documentation [DOCDIR]
1461   --dvidir=DIR            dvi documentation [DOCDIR]
1462   --pdfdir=DIR            pdf documentation [DOCDIR]
1463   --psdir=DIR             ps documentation [DOCDIR]
1464 _ACEOF
1465
1466   cat <<\_ACEOF
1467
1468 System types:
1469   --build=BUILD     configure for building on BUILD [guessed]
1470   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1471 _ACEOF
1472 fi
1473
1474 if test -n "$ac_init_help"; then
1475   case $ac_init_help in
1476      short | recursive ) echo "Configuration of PostgreSQL 11devel:";;
1477    esac
1478   cat <<\_ACEOF
1479
1480 Optional Features:
1481   --disable-option-checking  ignore unrecognized --enable/--with options
1482   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1483   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1484   --disable-integer-datetimes
1485                           obsolete option, no longer supported
1486   --enable-nls[=LANGUAGES]
1487                           enable Native Language Support
1488   --disable-rpath         do not embed shared library search path in
1489                           executables
1490   --disable-spinlocks     do not use spinlocks
1491   --disable-atomics       do not use atomic operations
1492   --disable-strong-random do not use a strong random number source
1493   --enable-debug          build with debugging symbols (-g)
1494   --enable-profiling      build with profiling enabled
1495   --enable-coverage       build with coverage testing instrumentation
1496   --enable-dtrace         build with DTrace support
1497   --enable-tap-tests      enable TAP tests (requires Perl and IPC::Run)
1498   --enable-depend         turn on automatic dependency tracking
1499   --enable-cassert        enable assertion checks (for debugging)
1500   --disable-thread-safety disable thread-safety in client libraries
1501   --disable-largefile     omit support for large files
1502   --disable-float4-byval  disable float4 passed by value
1503   --disable-float8-byval  disable float8 passed by value
1504
1505 Optional Packages:
1506   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1507   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1508   --with-extra-version=STRING
1509                           append STRING to version
1510   --with-template=NAME    override operating system template
1511   --with-includes=DIRS    look for additional header files in DIRS
1512   --with-libraries=DIRS   look for additional libraries in DIRS
1513   --with-libs=DIRS        alternative spelling of --with-libraries
1514   --with-pgport=PORTNUM   set default port number [5432]
1515   --with-blocksize=BLOCKSIZE
1516                           set table block size in kB [8]
1517   --with-segsize=SEGSIZE  set table segment size in GB [1]
1518   --with-wal-blocksize=BLOCKSIZE
1519                           set WAL block size in kB [8]
1520   --with-CC=CMD           set compiler (deprecated)
1521   --with-icu              build with ICU support
1522   --with-tcl              build Tcl modules (PL/Tcl)
1523   --with-tclconfig=DIR    tclConfig.sh is in DIR
1524   --with-perl             build Perl modules (PL/Perl)
1525   --with-python           build Python modules (PL/Python)
1526   --with-gssapi           build with GSSAPI support
1527   --with-krb-srvnam=NAME  default service principal name in Kerberos (GSSAPI)
1528                           [postgres]
1529   --with-pam              build with PAM support
1530   --with-bsd-auth         build with BSD Authentication support
1531   --with-ldap             build with LDAP support
1532   --with-bonjour          build with Bonjour support
1533   --with-openssl          build with OpenSSL support
1534   --with-selinux          build with SELinux support
1535   --with-systemd          build with systemd support
1536   --without-readline      do not use GNU Readline nor BSD Libedit for editing
1537   --with-libedit-preferred
1538                           prefer BSD Libedit over GNU Readline
1539   --with-uuid=LIB         build contrib/uuid-ossp using LIB (bsd,e2fs,ossp)
1540   --with-ossp-uuid        obsolete spelling of --with-uuid=ossp
1541   --with-libxml           build with XML support
1542   --with-libxslt          use XSLT support when building contrib/xml2
1543   --with-system-tzdata=DIR
1544                           use system time zone data in DIR
1545   --without-zlib          do not use Zlib
1546   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1547
1548 Some influential environment variables:
1549   CC          C compiler command
1550   CFLAGS      C compiler flags
1551   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1552               nonstandard directory <lib dir>
1553   LIBS        libraries to pass to the linker, e.g. -l<library>
1554   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1555               you have headers in a nonstandard directory <include dir>
1556   CPP         C preprocessor
1557   PKG_CONFIG  path to pkg-config utility
1558   PKG_CONFIG_PATH
1559               directories to add to pkg-config's search path
1560   PKG_CONFIG_LIBDIR
1561               path overriding pkg-config's built-in search path
1562   ICU_CFLAGS  C compiler flags for ICU, overriding pkg-config
1563   ICU_LIBS    linker flags for ICU, overriding pkg-config
1564   LDFLAGS_EX  extra linker flags for linking executables only
1565   LDFLAGS_SL  extra linker flags for linking shared libraries only
1566
1567 Use these variables to override the choices made by `configure' or to help
1568 it to find libraries and programs with nonstandard names/locations.
1569
1570 Report bugs to <pgsql-bugs@postgresql.org>.
1571 _ACEOF
1572 ac_status=$?
1573 fi
1574
1575 if test "$ac_init_help" = "recursive"; then
1576   # If there are subdirs, report their specific --help.
1577   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1578     test -d "$ac_dir" ||
1579       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1580       continue
1581     ac_builddir=.
1582
1583 case "$ac_dir" in
1584 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1585 *)
1586   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1587   # A ".." for each directory in $ac_dir_suffix.
1588   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1589   case $ac_top_builddir_sub in
1590   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1591   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1592   esac ;;
1593 esac
1594 ac_abs_top_builddir=$ac_pwd
1595 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1596 # for backward compatibility:
1597 ac_top_builddir=$ac_top_build_prefix
1598
1599 case $srcdir in
1600   .)  # We are building in place.
1601     ac_srcdir=.
1602     ac_top_srcdir=$ac_top_builddir_sub
1603     ac_abs_top_srcdir=$ac_pwd ;;
1604   [\\/]* | ?:[\\/]* )  # Absolute name.
1605     ac_srcdir=$srcdir$ac_dir_suffix;
1606     ac_top_srcdir=$srcdir
1607     ac_abs_top_srcdir=$srcdir ;;
1608   *) # Relative name.
1609     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1610     ac_top_srcdir=$ac_top_build_prefix$srcdir
1611     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1612 esac
1613 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1614
1615     cd "$ac_dir" || { ac_status=$?; continue; }
1616     # Check for guested configure.
1617     if test -f "$ac_srcdir/configure.gnu"; then
1618       echo &&
1619       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1620     elif test -f "$ac_srcdir/configure"; then
1621       echo &&
1622       $SHELL "$ac_srcdir/configure" --help=recursive
1623     else
1624       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1625     fi || ac_status=$?
1626     cd "$ac_pwd" || { ac_status=$?; break; }
1627   done
1628 fi
1629
1630 test -n "$ac_init_help" && exit $ac_status
1631 if $ac_init_version; then
1632   cat <<\_ACEOF
1633 PostgreSQL configure 11devel
1634 generated by GNU Autoconf 2.69
1635
1636 Copyright (C) 2012 Free Software Foundation, Inc.
1637 This configure script is free software; the Free Software Foundation
1638 gives unlimited permission to copy, distribute and modify it.
1639
1640 Copyright (c) 1996-2017, PostgreSQL Global Development Group
1641 _ACEOF
1642   exit
1643 fi
1644
1645 ## ------------------------ ##
1646 ## Autoconf initialization. ##
1647 ## ------------------------ ##
1648
1649 # ac_fn_c_try_compile LINENO
1650 # --------------------------
1651 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1652 ac_fn_c_try_compile ()
1653 {
1654   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1655   rm -f conftest.$ac_objext
1656   if { { ac_try="$ac_compile"
1657 case "(($ac_try" in
1658   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1659   *) ac_try_echo=$ac_try;;
1660 esac
1661 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1662 $as_echo "$ac_try_echo"; } >&5
1663   (eval "$ac_compile") 2>conftest.err
1664   ac_status=$?
1665   if test -s conftest.err; then
1666     grep -v '^ *+' conftest.err >conftest.er1
1667     cat conftest.er1 >&5
1668     mv -f conftest.er1 conftest.err
1669   fi
1670   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1671   test $ac_status = 0; } && {
1672          test -z "$ac_c_werror_flag" ||
1673          test ! -s conftest.err
1674        } && test -s conftest.$ac_objext; then :
1675   ac_retval=0
1676 else
1677   $as_echo "$as_me: failed program was:" >&5
1678 sed 's/^/| /' conftest.$ac_ext >&5
1679
1680         ac_retval=1
1681 fi
1682   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1683   as_fn_set_status $ac_retval
1684
1685 } # ac_fn_c_try_compile
1686
1687 # ac_fn_c_try_link LINENO
1688 # -----------------------
1689 # Try to link conftest.$ac_ext, and return whether this succeeded.
1690 ac_fn_c_try_link ()
1691 {
1692   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1693   rm -f conftest.$ac_objext conftest$ac_exeext
1694   if { { ac_try="$ac_link"
1695 case "(($ac_try" in
1696   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1697   *) ac_try_echo=$ac_try;;
1698 esac
1699 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1700 $as_echo "$ac_try_echo"; } >&5
1701   (eval "$ac_link") 2>conftest.err
1702   ac_status=$?
1703   if test -s conftest.err; then
1704     grep -v '^ *+' conftest.err >conftest.er1
1705     cat conftest.er1 >&5
1706     mv -f conftest.er1 conftest.err
1707   fi
1708   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1709   test $ac_status = 0; } && {
1710          test -z "$ac_c_werror_flag" ||
1711          test ! -s conftest.err
1712        } && test -s conftest$ac_exeext && {
1713          test "$cross_compiling" = yes ||
1714          test -x conftest$ac_exeext
1715        }; then :
1716   ac_retval=0
1717 else
1718   $as_echo "$as_me: failed program was:" >&5
1719 sed 's/^/| /' conftest.$ac_ext >&5
1720
1721         ac_retval=1
1722 fi
1723   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1724   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1725   # interfere with the next link command; also delete a directory that is
1726   # left behind by Apple's compiler.  We do this before executing the actions.
1727   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1728   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1729   as_fn_set_status $ac_retval
1730
1731 } # ac_fn_c_try_link
1732
1733 # ac_fn_c_try_cpp LINENO
1734 # ----------------------
1735 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1736 ac_fn_c_try_cpp ()
1737 {
1738   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1739   if { { ac_try="$ac_cpp conftest.$ac_ext"
1740 case "(($ac_try" in
1741   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1742   *) ac_try_echo=$ac_try;;
1743 esac
1744 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1745 $as_echo "$ac_try_echo"; } >&5
1746   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1747   ac_status=$?
1748   if test -s conftest.err; then
1749     grep -v '^ *+' conftest.err >conftest.er1
1750     cat conftest.er1 >&5
1751     mv -f conftest.er1 conftest.err
1752   fi
1753   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1754   test $ac_status = 0; } > conftest.i && {
1755          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1756          test ! -s conftest.err
1757        }; then :
1758   ac_retval=0
1759 else
1760   $as_echo "$as_me: failed program was:" >&5
1761 sed 's/^/| /' conftest.$ac_ext >&5
1762
1763     ac_retval=1
1764 fi
1765   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1766   as_fn_set_status $ac_retval
1767
1768 } # ac_fn_c_try_cpp
1769
1770 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1771 # -------------------------------------------------------
1772 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1773 # the include files in INCLUDES and setting the cache variable VAR
1774 # accordingly.
1775 ac_fn_c_check_header_mongrel ()
1776 {
1777   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1778   if eval \${$3+:} false; then :
1779   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1780 $as_echo_n "checking for $2... " >&6; }
1781 if eval \${$3+:} false; then :
1782   $as_echo_n "(cached) " >&6
1783 fi
1784 eval ac_res=\$$3
1785                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1786 $as_echo "$ac_res" >&6; }
1787 else
1788   # Is the header compilable?
1789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1790 $as_echo_n "checking $2 usability... " >&6; }
1791 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1792 /* end confdefs.h.  */
1793 $4
1794 #include <$2>
1795 _ACEOF
1796 if ac_fn_c_try_compile "$LINENO"; then :
1797   ac_header_compiler=yes
1798 else
1799   ac_header_compiler=no
1800 fi
1801 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1803 $as_echo "$ac_header_compiler" >&6; }
1804
1805 # Is the header present?
1806 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1807 $as_echo_n "checking $2 presence... " >&6; }
1808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1809 /* end confdefs.h.  */
1810 #include <$2>
1811 _ACEOF
1812 if ac_fn_c_try_cpp "$LINENO"; then :
1813   ac_header_preproc=yes
1814 else
1815   ac_header_preproc=no
1816 fi
1817 rm -f conftest.err conftest.i conftest.$ac_ext
1818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1819 $as_echo "$ac_header_preproc" >&6; }
1820
1821 # So?  What about this header?
1822 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1823   yes:no: )
1824     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1825 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1826     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1827 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1828     ;;
1829   no:yes:* )
1830     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1831 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1832     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1833 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1834     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1835 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1836     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1837 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1838     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1839 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1840 ( $as_echo "## ---------------------------------------- ##
1841 ## Report this to pgsql-bugs@postgresql.org ##
1842 ## ---------------------------------------- ##"
1843      ) | sed "s/^/$as_me: WARNING:     /" >&2
1844     ;;
1845 esac
1846   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1847 $as_echo_n "checking for $2... " >&6; }
1848 if eval \${$3+:} false; then :
1849   $as_echo_n "(cached) " >&6
1850 else
1851   eval "$3=\$ac_header_compiler"
1852 fi
1853 eval ac_res=\$$3
1854                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1855 $as_echo "$ac_res" >&6; }
1856 fi
1857   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1858
1859 } # ac_fn_c_check_header_mongrel
1860
1861 # ac_fn_c_try_run LINENO
1862 # ----------------------
1863 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1864 # that executables *can* be run.
1865 ac_fn_c_try_run ()
1866 {
1867   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1868   if { { ac_try="$ac_link"
1869 case "(($ac_try" in
1870   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1871   *) ac_try_echo=$ac_try;;
1872 esac
1873 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1874 $as_echo "$ac_try_echo"; } >&5
1875   (eval "$ac_link") 2>&5
1876   ac_status=$?
1877   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1878   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1879   { { case "(($ac_try" in
1880   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1881   *) ac_try_echo=$ac_try;;
1882 esac
1883 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1884 $as_echo "$ac_try_echo"; } >&5
1885   (eval "$ac_try") 2>&5
1886   ac_status=$?
1887   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1888   test $ac_status = 0; }; }; then :
1889   ac_retval=0
1890 else
1891   $as_echo "$as_me: program exited with status $ac_status" >&5
1892        $as_echo "$as_me: failed program was:" >&5
1893 sed 's/^/| /' conftest.$ac_ext >&5
1894
1895        ac_retval=$ac_status
1896 fi
1897   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1898   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1899   as_fn_set_status $ac_retval
1900
1901 } # ac_fn_c_try_run
1902
1903 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1904 # -------------------------------------------------------
1905 # Tests whether HEADER exists and can be compiled using the include files in
1906 # INCLUDES, setting the cache variable VAR accordingly.
1907 ac_fn_c_check_header_compile ()
1908 {
1909   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1910   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1911 $as_echo_n "checking for $2... " >&6; }
1912 if eval \${$3+:} false; then :
1913   $as_echo_n "(cached) " >&6
1914 else
1915   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1916 /* end confdefs.h.  */
1917 $4
1918 #include <$2>
1919 _ACEOF
1920 if ac_fn_c_try_compile "$LINENO"; then :
1921   eval "$3=yes"
1922 else
1923   eval "$3=no"
1924 fi
1925 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1926 fi
1927 eval ac_res=\$$3
1928                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1929 $as_echo "$ac_res" >&6; }
1930   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1931
1932 } # ac_fn_c_check_header_compile
1933
1934 # ac_fn_c_check_func LINENO FUNC VAR
1935 # ----------------------------------
1936 # Tests whether FUNC exists, setting the cache variable VAR accordingly
1937 ac_fn_c_check_func ()
1938 {
1939   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1940   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1941 $as_echo_n "checking for $2... " >&6; }
1942 if eval \${$3+:} false; then :
1943   $as_echo_n "(cached) " >&6
1944 else
1945   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1946 /* end confdefs.h.  */
1947 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1948    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
1949 #define $2 innocuous_$2
1950
1951 /* System header to define __stub macros and hopefully few prototypes,
1952     which can conflict with char $2 (); below.
1953     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1954     <limits.h> exists even on freestanding compilers.  */
1955
1956 #ifdef __STDC__
1957 # include <limits.h>
1958 #else
1959 # include <assert.h>
1960 #endif
1961
1962 #undef $2
1963
1964 /* Override any GCC internal prototype to avoid an error.
1965    Use char because int might match the return type of a GCC
1966    builtin and then its argument prototype would still apply.  */
1967 #ifdef __cplusplus
1968 extern "C"
1969 #endif
1970 char $2 ();
1971 /* The GNU C library defines this for functions which it implements
1972     to always fail with ENOSYS.  Some functions are actually named
1973     something starting with __ and the normal name is an alias.  */
1974 #if defined __stub_$2 || defined __stub___$2
1975 choke me
1976 #endif
1977
1978 int
1979 main ()
1980 {
1981 return $2 ();
1982   ;
1983   return 0;
1984 }
1985 _ACEOF
1986 if ac_fn_c_try_link "$LINENO"; then :
1987   eval "$3=yes"
1988 else
1989   eval "$3=no"
1990 fi
1991 rm -f core conftest.err conftest.$ac_objext \
1992     conftest$ac_exeext conftest.$ac_ext
1993 fi
1994 eval ac_res=\$$3
1995                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1996 $as_echo "$ac_res" >&6; }
1997   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1998
1999 } # ac_fn_c_check_func
2000
2001 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2002 # ----------------------------------------------------
2003 # Tries to find if the field MEMBER exists in type AGGR, after including
2004 # INCLUDES, setting cache variable VAR accordingly.
2005 ac_fn_c_check_member ()
2006 {
2007   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2008   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2009 $as_echo_n "checking for $2.$3... " >&6; }
2010 if eval \${$4+:} false; then :
2011   $as_echo_n "(cached) " >&6
2012 else
2013   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2014 /* end confdefs.h.  */
2015 $5
2016 int
2017 main ()
2018 {
2019 static $2 ac_aggr;
2020 if (ac_aggr.$3)
2021 return 0;
2022   ;
2023   return 0;
2024 }
2025 _ACEOF
2026 if ac_fn_c_try_compile "$LINENO"; then :
2027   eval "$4=yes"
2028 else
2029   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2030 /* end confdefs.h.  */
2031 $5
2032 int
2033 main ()
2034 {
2035 static $2 ac_aggr;
2036 if (sizeof ac_aggr.$3)
2037 return 0;
2038   ;
2039   return 0;
2040 }
2041 _ACEOF
2042 if ac_fn_c_try_compile "$LINENO"; then :
2043   eval "$4=yes"
2044 else
2045   eval "$4=no"
2046 fi
2047 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2048 fi
2049 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2050 fi
2051 eval ac_res=\$$4
2052                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2053 $as_echo "$ac_res" >&6; }
2054   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2055
2056 } # ac_fn_c_check_member
2057
2058 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2059 # -------------------------------------------
2060 # Tests whether TYPE exists after having included INCLUDES, setting cache
2061 # variable VAR accordingly.
2062 ac_fn_c_check_type ()
2063 {
2064   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2065   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2066 $as_echo_n "checking for $2... " >&6; }
2067 if eval \${$3+:} false; then :
2068   $as_echo_n "(cached) " >&6
2069 else
2070   eval "$3=no"
2071   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2072 /* end confdefs.h.  */
2073 $4
2074 int
2075 main ()
2076 {
2077 if (sizeof ($2))
2078          return 0;
2079   ;
2080   return 0;
2081 }
2082 _ACEOF
2083 if ac_fn_c_try_compile "$LINENO"; then :
2084   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2085 /* end confdefs.h.  */
2086 $4
2087 int
2088 main ()
2089 {
2090 if (sizeof (($2)))
2091             return 0;
2092   ;
2093   return 0;
2094 }
2095 _ACEOF
2096 if ac_fn_c_try_compile "$LINENO"; then :
2097
2098 else
2099   eval "$3=yes"
2100 fi
2101 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2102 fi
2103 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2104 fi
2105 eval ac_res=\$$3
2106                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2107 $as_echo "$ac_res" >&6; }
2108   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2109
2110 } # ac_fn_c_check_type
2111
2112 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2113 # --------------------------------------------
2114 # Tries to find the compile-time value of EXPR in a program that includes
2115 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2116 # computed
2117 ac_fn_c_compute_int ()
2118 {
2119   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2120   if test "$cross_compiling" = yes; then
2121     # Depending upon the size, compute the lo and hi bounds.
2122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2123 /* end confdefs.h.  */
2124 $4
2125 int
2126 main ()
2127 {
2128 static int test_array [1 - 2 * !(($2) >= 0)];
2129 test_array [0] = 0;
2130 return test_array [0];
2131
2132   ;
2133   return 0;
2134 }
2135 _ACEOF
2136 if ac_fn_c_try_compile "$LINENO"; then :
2137   ac_lo=0 ac_mid=0
2138   while :; do
2139     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2140 /* end confdefs.h.  */
2141 $4
2142 int
2143 main ()
2144 {
2145 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2146 test_array [0] = 0;
2147 return test_array [0];
2148
2149   ;
2150   return 0;
2151 }
2152 _ACEOF
2153 if ac_fn_c_try_compile "$LINENO"; then :
2154   ac_hi=$ac_mid; break
2155 else
2156   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2157                         if test $ac_lo -le $ac_mid; then
2158                           ac_lo= ac_hi=
2159                           break
2160                         fi
2161                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2162 fi
2163 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2164   done
2165 else
2166   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2167 /* end confdefs.h.  */
2168 $4
2169 int
2170 main ()
2171 {
2172 static int test_array [1 - 2 * !(($2) < 0)];
2173 test_array [0] = 0;
2174 return test_array [0];
2175
2176   ;
2177   return 0;
2178 }
2179 _ACEOF
2180 if ac_fn_c_try_compile "$LINENO"; then :
2181   ac_hi=-1 ac_mid=-1
2182   while :; do
2183     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2184 /* end confdefs.h.  */
2185 $4
2186 int
2187 main ()
2188 {
2189 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2190 test_array [0] = 0;
2191 return test_array [0];
2192
2193   ;
2194   return 0;
2195 }
2196 _ACEOF
2197 if ac_fn_c_try_compile "$LINENO"; then :
2198   ac_lo=$ac_mid; break
2199 else
2200   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2201                         if test $ac_mid -le $ac_hi; then
2202                           ac_lo= ac_hi=
2203                           break
2204                         fi
2205                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2206 fi
2207 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2208   done
2209 else
2210   ac_lo= ac_hi=
2211 fi
2212 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2213 fi
2214 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2215 # Binary search between lo and hi bounds.
2216 while test "x$ac_lo" != "x$ac_hi"; do
2217   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2218   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2219 /* end confdefs.h.  */
2220 $4
2221 int
2222 main ()
2223 {
2224 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2225 test_array [0] = 0;
2226 return test_array [0];
2227
2228   ;
2229   return 0;
2230 }
2231 _ACEOF
2232 if ac_fn_c_try_compile "$LINENO"; then :
2233   ac_hi=$ac_mid
2234 else
2235   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2236 fi
2237 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2238 done
2239 case $ac_lo in #((
2240 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2241 '') ac_retval=1 ;;
2242 esac
2243   else
2244     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2245 /* end confdefs.h.  */
2246 $4
2247 static long int longval () { return $2; }
2248 static unsigned long int ulongval () { return $2; }
2249 #include <stdio.h>
2250 #include <stdlib.h>
2251 int
2252 main ()
2253 {
2254
2255   FILE *f = fopen ("conftest.val", "w");
2256   if (! f)
2257     return 1;
2258   if (($2) < 0)
2259     {
2260       long int i = longval ();
2261       if (i != ($2))
2262         return 1;
2263       fprintf (f, "%ld", i);
2264     }
2265   else
2266     {
2267       unsigned long int i = ulongval ();
2268       if (i != ($2))
2269         return 1;
2270       fprintf (f, "%lu", i);
2271     }
2272   /* Do not output a trailing newline, as this causes \r\n confusion
2273      on some platforms.  */
2274   return ferror (f) || fclose (f) != 0;
2275
2276   ;
2277   return 0;
2278 }
2279 _ACEOF
2280 if ac_fn_c_try_run "$LINENO"; then :
2281   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2282 else
2283   ac_retval=1
2284 fi
2285 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2286   conftest.$ac_objext conftest.beam conftest.$ac_ext
2287 rm -f conftest.val
2288
2289   fi
2290   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2291   as_fn_set_status $ac_retval
2292
2293 } # ac_fn_c_compute_int
2294
2295 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2296 # ---------------------------------------------
2297 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2298 # accordingly.
2299 ac_fn_c_check_decl ()
2300 {
2301   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2302   as_decl_name=`echo $2|sed 's/ *(.*//'`
2303   as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2304   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2305 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2306 if eval \${$3+:} false; then :
2307   $as_echo_n "(cached) " >&6
2308 else
2309   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2310 /* end confdefs.h.  */
2311 $4
2312 int
2313 main ()
2314 {
2315 #ifndef $as_decl_name
2316 #ifdef __cplusplus
2317   (void) $as_decl_use;
2318 #else
2319   (void) $as_decl_name;
2320 #endif
2321 #endif
2322
2323   ;
2324   return 0;
2325 }
2326 _ACEOF
2327 if ac_fn_c_try_compile "$LINENO"; then :
2328   eval "$3=yes"
2329 else
2330   eval "$3=no"
2331 fi
2332 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2333 fi
2334 eval ac_res=\$$3
2335                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2336 $as_echo "$ac_res" >&6; }
2337   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2338
2339 } # ac_fn_c_check_decl
2340 cat >config.log <<_ACEOF
2341 This file contains any messages produced by compilers while
2342 running configure, to aid debugging if configure makes a mistake.
2343
2344 It was created by PostgreSQL $as_me 11devel, which was
2345 generated by GNU Autoconf 2.69.  Invocation command line was
2346
2347   $ $0 $@
2348
2349 _ACEOF
2350 exec 5>>config.log
2351 {
2352 cat <<_ASUNAME
2353 ## --------- ##
2354 ## Platform. ##
2355 ## --------- ##
2356
2357 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2358 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2359 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2360 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2361 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2362
2363 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2364 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2365
2366 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2367 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2368 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2369 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2370 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2371 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2372 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2373
2374 _ASUNAME
2375
2376 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2377 for as_dir in $PATH
2378 do
2379   IFS=$as_save_IFS
2380   test -z "$as_dir" && as_dir=.
2381     $as_echo "PATH: $as_dir"
2382   done
2383 IFS=$as_save_IFS
2384
2385 } >&5
2386
2387 cat >&5 <<_ACEOF
2388
2389
2390 ## ----------- ##
2391 ## Core tests. ##
2392 ## ----------- ##
2393
2394 _ACEOF
2395
2396
2397 # Keep a trace of the command line.
2398 # Strip out --no-create and --no-recursion so they do not pile up.
2399 # Strip out --silent because we don't want to record it for future runs.
2400 # Also quote any args containing shell meta-characters.
2401 # Make two passes to allow for proper duplicate-argument suppression.
2402 ac_configure_args=
2403 ac_configure_args0=
2404 ac_configure_args1=
2405 ac_must_keep_next=false
2406 for ac_pass in 1 2
2407 do
2408   for ac_arg
2409   do
2410     case $ac_arg in
2411     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2412     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2413     | -silent | --silent | --silen | --sile | --sil)
2414       continue ;;
2415     *\'*)
2416       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2417     esac
2418     case $ac_pass in
2419     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2420     2)
2421       as_fn_append ac_configure_args1 " '$ac_arg'"
2422       if test $ac_must_keep_next = true; then
2423         ac_must_keep_next=false # Got value, back to normal.
2424       else
2425         case $ac_arg in
2426           *=* | --config-cache | -C | -disable-* | --disable-* \
2427           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2428           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2429           | -with-* | --with-* | -without-* | --without-* | --x)
2430             case "$ac_configure_args0 " in
2431               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2432             esac
2433             ;;
2434           -* ) ac_must_keep_next=true ;;
2435         esac
2436       fi
2437       as_fn_append ac_configure_args " '$ac_arg'"
2438       ;;
2439     esac
2440   done
2441 done
2442 { ac_configure_args0=; unset ac_configure_args0;}
2443 { ac_configure_args1=; unset ac_configure_args1;}
2444
2445 # When interrupted or exit'd, cleanup temporary files, and complete
2446 # config.log.  We remove comments because anyway the quotes in there
2447 # would cause problems or look ugly.
2448 # WARNING: Use '\'' to represent an apostrophe within the trap.
2449 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2450 trap 'exit_status=$?
2451   # Save into config.log some information that might help in debugging.
2452   {
2453     echo
2454
2455     $as_echo "## ---------------- ##
2456 ## Cache variables. ##
2457 ## ---------------- ##"
2458     echo
2459     # The following way of writing the cache mishandles newlines in values,
2460 (
2461   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2462     eval ac_val=\$$ac_var
2463     case $ac_val in #(
2464     *${as_nl}*)
2465       case $ac_var in #(
2466       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2467 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2468       esac
2469       case $ac_var in #(
2470       _ | IFS | as_nl) ;; #(
2471       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2472       *) { eval $ac_var=; unset $ac_var;} ;;
2473       esac ;;
2474     esac
2475   done
2476   (set) 2>&1 |
2477     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2478     *${as_nl}ac_space=\ *)
2479       sed -n \
2480         "s/'\''/'\''\\\\'\'''\''/g;
2481           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2482       ;; #(
2483     *)
2484       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2485       ;;
2486     esac |
2487     sort
2488 )
2489     echo
2490
2491     $as_echo "## ----------------- ##
2492 ## Output variables. ##
2493 ## ----------------- ##"
2494     echo
2495     for ac_var in $ac_subst_vars
2496     do
2497       eval ac_val=\$$ac_var
2498       case $ac_val in
2499       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2500       esac
2501       $as_echo "$ac_var='\''$ac_val'\''"
2502     done | sort
2503     echo
2504
2505     if test -n "$ac_subst_files"; then
2506       $as_echo "## ------------------- ##
2507 ## File substitutions. ##
2508 ## ------------------- ##"
2509       echo
2510       for ac_var in $ac_subst_files
2511       do
2512         eval ac_val=\$$ac_var
2513         case $ac_val in
2514         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2515         esac
2516         $as_echo "$ac_var='\''$ac_val'\''"
2517       done | sort
2518       echo
2519     fi
2520
2521     if test -s confdefs.h; then
2522       $as_echo "## ----------- ##
2523 ## confdefs.h. ##
2524 ## ----------- ##"
2525       echo
2526       cat confdefs.h
2527       echo
2528     fi
2529     test "$ac_signal" != 0 &&
2530       $as_echo "$as_me: caught signal $ac_signal"
2531     $as_echo "$as_me: exit $exit_status"
2532   } >&5
2533   rm -f core *.core core.conftest.* &&
2534     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2535     exit $exit_status
2536 ' 0
2537 for ac_signal in 1 2 13 15; do
2538   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2539 done
2540 ac_signal=0
2541
2542 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2543 rm -f -r conftest* confdefs.h
2544
2545 $as_echo "/* confdefs.h */" > confdefs.h
2546
2547 # Predefined preprocessor variables.
2548
2549 cat >>confdefs.h <<_ACEOF
2550 #define PACKAGE_NAME "$PACKAGE_NAME"
2551 _ACEOF
2552
2553 cat >>confdefs.h <<_ACEOF
2554 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2555 _ACEOF
2556
2557 cat >>confdefs.h <<_ACEOF
2558 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2559 _ACEOF
2560
2561 cat >>confdefs.h <<_ACEOF
2562 #define PACKAGE_STRING "$PACKAGE_STRING"
2563 _ACEOF
2564
2565 cat >>confdefs.h <<_ACEOF
2566 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2567 _ACEOF
2568
2569 cat >>confdefs.h <<_ACEOF
2570 #define PACKAGE_URL "$PACKAGE_URL"
2571 _ACEOF
2572
2573
2574 # Let the site file select an alternate cache file if it wants to.
2575 # Prefer an explicitly selected file to automatically selected ones.
2576 ac_site_file1=NONE
2577 ac_site_file2=NONE
2578 if test -n "$CONFIG_SITE"; then
2579   # We do not want a PATH search for config.site.
2580   case $CONFIG_SITE in #((
2581     -*)  ac_site_file1=./$CONFIG_SITE;;
2582     */*) ac_site_file1=$CONFIG_SITE;;
2583     *)   ac_site_file1=./$CONFIG_SITE;;
2584   esac
2585 elif test "x$prefix" != xNONE; then
2586   ac_site_file1=$prefix/share/config.site
2587   ac_site_file2=$prefix/etc/config.site
2588 else
2589   ac_site_file1=$ac_default_prefix/share/config.site
2590   ac_site_file2=$ac_default_prefix/etc/config.site
2591 fi
2592 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2593 do
2594   test "x$ac_site_file" = xNONE && continue
2595   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2596     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2597 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2598     sed 's/^/| /' "$ac_site_file" >&5
2599     . "$ac_site_file" \
2600       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2601 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2602 as_fn_error $? "failed to load site script $ac_site_file
2603 See \`config.log' for more details" "$LINENO" 5; }
2604   fi
2605 done
2606
2607 if test -r "$cache_file"; then
2608   # Some versions of bash will fail to source /dev/null (special files
2609   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2610   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2611     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2612 $as_echo "$as_me: loading cache $cache_file" >&6;}
2613     case $cache_file in
2614       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2615       *)                      . "./$cache_file";;
2616     esac
2617   fi
2618 else
2619   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2620 $as_echo "$as_me: creating cache $cache_file" >&6;}
2621   >$cache_file
2622 fi
2623
2624 # Check that the precious variables saved in the cache have kept the same
2625 # value.
2626 ac_cache_corrupted=false
2627 for ac_var in $ac_precious_vars; do
2628   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2629   eval ac_new_set=\$ac_env_${ac_var}_set
2630   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2631   eval ac_new_val=\$ac_env_${ac_var}_value
2632   case $ac_old_set,$ac_new_set in
2633     set,)
2634       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2635 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2636       ac_cache_corrupted=: ;;
2637     ,set)
2638       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2639 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2640       ac_cache_corrupted=: ;;
2641     ,);;
2642     *)
2643       if test "x$ac_old_val" != "x$ac_new_val"; then
2644         # differences in whitespace do not lead to failure.
2645         ac_old_val_w=`echo x $ac_old_val`
2646         ac_new_val_w=`echo x $ac_new_val`
2647         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2648           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2649 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2650           ac_cache_corrupted=:
2651         else
2652           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2653 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2654           eval $ac_var=\$ac_old_val
2655         fi
2656         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2657 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2658         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2659 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2660       fi;;
2661   esac
2662   # Pass precious variables to config.status.
2663   if test "$ac_new_set" = set; then
2664     case $ac_new_val in
2665     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2666     *) ac_arg=$ac_var=$ac_new_val ;;
2667     esac
2668     case " $ac_configure_args " in
2669       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2670       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2671     esac
2672   fi
2673 done
2674 if $ac_cache_corrupted; then
2675   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2676 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2677   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2678 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2679   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2680 fi
2681 ## -------------------- ##
2682 ## Main body of script. ##
2683 ## -------------------- ##
2684
2685 ac_ext=c
2686 ac_cpp='$CPP $CPPFLAGS'
2687 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2688 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2689 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2690
2691
2692
2693
2694
2695
2696 ac_aux_dir=
2697 for ac_dir in config "$srcdir"/config; do
2698   if test -f "$ac_dir/install-sh"; then
2699     ac_aux_dir=$ac_dir
2700     ac_install_sh="$ac_aux_dir/install-sh -c"
2701     break
2702   elif test -f "$ac_dir/install.sh"; then
2703     ac_aux_dir=$ac_dir
2704     ac_install_sh="$ac_aux_dir/install.sh -c"
2705     break
2706   elif test -f "$ac_dir/shtool"; then
2707     ac_aux_dir=$ac_dir
2708     ac_install_sh="$ac_aux_dir/shtool install -c"
2709     break
2710   fi
2711 done
2712 if test -z "$ac_aux_dir"; then
2713   as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5
2714 fi
2715
2716 # These three variables are undocumented and unsupported,
2717 # and are intended to be withdrawn in a future Autoconf release.
2718 # They can cause serious problems if a builder's source tree is in a directory
2719 # whose full name contains unusual characters.
2720 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2721 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2722 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2723
2724
2725
2726 configure_args=$ac_configure_args
2727
2728
2729 PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\)'`
2730
2731
2732 cat >>confdefs.h <<_ACEOF
2733 #define PG_MAJORVERSION "$PG_MAJORVERSION"
2734 _ACEOF
2735
2736
2737
2738
2739
2740 # Check whether --with-extra-version was given.
2741 if test "${with_extra_version+set}" = set; then :
2742   withval=$with_extra_version;
2743   case $withval in
2744     yes)
2745       as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2746       ;;
2747     no)
2748       as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2749       ;;
2750     *)
2751       PG_VERSION="$PACKAGE_VERSION$withval"
2752       ;;
2753   esac
2754
2755 else
2756   PG_VERSION="$PACKAGE_VERSION"
2757 fi
2758
2759
2760
2761 cat >>confdefs.h <<_ACEOF
2762 #define PG_VERSION "$PG_VERSION"
2763 _ACEOF
2764
2765
2766 # Make sure we can run config.sub.
2767 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2768   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2769
2770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2771 $as_echo_n "checking build system type... " >&6; }
2772 if ${ac_cv_build+:} false; then :
2773   $as_echo_n "(cached) " >&6
2774 else
2775   ac_build_alias=$build_alias
2776 test "x$ac_build_alias" = x &&
2777   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2778 test "x$ac_build_alias" = x &&
2779   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2780 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2781   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2782
2783 fi
2784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2785 $as_echo "$ac_cv_build" >&6; }
2786 case $ac_cv_build in
2787 *-*-*) ;;
2788 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2789 esac
2790 build=$ac_cv_build
2791 ac_save_IFS=$IFS; IFS='-'
2792 set x $ac_cv_build
2793 shift
2794 build_cpu=$1
2795 build_vendor=$2
2796 shift; shift
2797 # Remember, the first character of IFS is used to create $*,
2798 # except with old shells:
2799 build_os=$*
2800 IFS=$ac_save_IFS
2801 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2802
2803
2804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2805 $as_echo_n "checking host system type... " >&6; }
2806 if ${ac_cv_host+:} false; then :
2807   $as_echo_n "(cached) " >&6
2808 else
2809   if test "x$host_alias" = x; then
2810   ac_cv_host=$ac_cv_build
2811 else
2812   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2813     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2814 fi
2815
2816 fi
2817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2818 $as_echo "$ac_cv_host" >&6; }
2819 case $ac_cv_host in
2820 *-*-*) ;;
2821 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2822 esac
2823 host=$ac_cv_host
2824 ac_save_IFS=$IFS; IFS='-'
2825 set x $ac_cv_host
2826 shift
2827 host_cpu=$1
2828 host_vendor=$2
2829 shift; shift
2830 # Remember, the first character of IFS is used to create $*,
2831 # except with old shells:
2832 host_os=$*
2833 IFS=$ac_save_IFS
2834 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2835
2836
2837
2838 template=
2839 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which template to use" >&5
2840 $as_echo_n "checking which template to use... " >&6; }
2841
2842
2843
2844
2845 # Check whether --with-template was given.
2846 if test "${with_template+set}" = set; then :
2847   withval=$with_template;
2848   case $withval in
2849     yes)
2850       as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2851       ;;
2852     no)
2853       as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2854       ;;
2855     *)
2856
2857   case $withval in
2858     list)   echo; ls "$srcdir/src/template"; exit;;
2859     *)      if test -f "$srcdir/src/template/$with_template" ; then
2860               template=$withval
2861             else
2862               as_fn_error $? "'$withval' is not a valid template name. Use 'list' for a list." "$LINENO" 5
2863             fi;;
2864   esac
2865
2866       ;;
2867   esac
2868
2869 else
2870
2871 # --with-template not given
2872
2873 case $host_os in
2874      aix*) template=aix ;;
2875   cygwin*) template=cygwin ;;
2876   darwin*) template=darwin ;;
2877 dragonfly*) template=netbsd ;;
2878  freebsd*) template=freebsd ;;
2879     hpux*) template=hpux ;;
2880  linux*|gnu*|k*bsd*-gnu)
2881            template=linux ;;
2882    mingw*) template=win32 ;;
2883   netbsd*) template=netbsd ;;
2884  openbsd*) template=openbsd ;;
2885  solaris*) template=solaris ;;
2886 esac
2887
2888   if test x"$template" = x"" ; then
2889     as_fn_error $? "
2890 *******************************************************************
2891 PostgreSQL has apparently not been ported to your platform yet.
2892 To try a manual configuration, look into the src/template directory
2893 for a similar platform and use the '--with-template=' option.
2894
2895 Please also contact <pgsql-bugs@postgresql.org> to see about
2896 rectifying this.  Include the above 'checking host system type...'
2897 line.
2898 *******************************************************************
2899 " "$LINENO" 5
2900   fi
2901
2902
2903 fi
2904
2905
2906
2907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $template" >&5
2908 $as_echo "$template" >&6; }
2909
2910 PORTNAME=$template
2911
2912
2913 # Initialize default assumption that we do not need separate assembly code
2914 # for TAS (test-and-set).  This can be overridden by the template file
2915 # when it's executed.
2916 need_tas=no
2917 tas_file=dummy.s
2918
2919
2920
2921 ##
2922 ## Command line options
2923 ##
2924
2925 #
2926 # Add non-standard directories to the include path
2927 #
2928
2929
2930
2931 # Check whether --with-includes was given.
2932 if test "${with_includes+set}" = set; then :
2933   withval=$with_includes;
2934   case $withval in
2935     yes)
2936       as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
2937       ;;
2938     no)
2939       as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
2940       ;;
2941     *)
2942
2943       ;;
2944   esac
2945
2946 fi
2947
2948
2949
2950
2951 #
2952 # Add non-standard directories to the library search path
2953 #
2954
2955
2956
2957 # Check whether --with-libraries was given.
2958 if test "${with_libraries+set}" = set; then :
2959   withval=$with_libraries;
2960   case $withval in
2961     yes)
2962       as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
2963       ;;
2964     no)
2965       as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
2966       ;;
2967     *)
2968       LIBRARY_DIRS=$withval
2969       ;;
2970   esac
2971
2972 fi
2973
2974
2975
2976
2977
2978
2979 # Check whether --with-libs was given.
2980 if test "${with_libs+set}" = set; then :
2981   withval=$with_libs;
2982   case $withval in
2983     yes)
2984       as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
2985       ;;
2986     no)
2987       as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
2988       ;;
2989     *)
2990       LIBRARY_DIRS=$withval
2991       ;;
2992   esac
2993
2994 fi
2995
2996
2997
2998
2999 #
3000 # 64-bit integer date/time storage is now the only option, but to avoid
3001 # unnecessary breakage of build scripts, continue to accept an explicit
3002 # "--enable-integer-datetimes" switch.
3003 #
3004
3005
3006 # Check whether --enable-integer-datetimes was given.
3007 if test "${enable_integer_datetimes+set}" = set; then :
3008   enableval=$enable_integer_datetimes;
3009   case $enableval in
3010     yes)
3011       :
3012       ;;
3013     no)
3014       as_fn_error $? "--disable-integer-datetimes is no longer supported" "$LINENO" 5
3015       ;;
3016     *)
3017       as_fn_error $? "no argument expected for --enable-integer-datetimes option" "$LINENO" 5
3018       ;;
3019   esac
3020
3021 else
3022   enable_integer_datetimes=yes
3023
3024 fi
3025
3026
3027
3028
3029 #
3030 # NLS
3031 #
3032 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is wanted" >&5
3033 $as_echo_n "checking whether NLS is wanted... " >&6; }
3034
3035
3036 # Check whether --enable-nls was given.
3037 if test "${enable_nls+set}" = set; then :
3038   enableval=$enable_nls;
3039   case $enableval in
3040     yes)
3041       :
3042       ;;
3043     no)
3044       :
3045       ;;
3046     *)
3047       enable_nls=yes
3048 WANTED_LANGUAGES=$enableval
3049       ;;
3050   esac
3051
3052 else
3053   enable_nls=no
3054 fi
3055
3056
3057
3058 if test "$enable_nls" = yes; then
3059
3060 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
3061
3062 fi
3063
3064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_nls" >&5
3065 $as_echo "$enable_nls" >&6; }
3066
3067
3068
3069 #
3070 # Default port number (--with-pgport), default 5432
3071 #
3072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default port number" >&5
3073 $as_echo_n "checking for default port number... " >&6; }
3074
3075
3076
3077 # Check whether --with-pgport was given.
3078 if test "${with_pgport+set}" = set; then :
3079   withval=$with_pgport;
3080   case $withval in
3081     yes)
3082       as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3083       ;;
3084     no)
3085       as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3086       ;;
3087     *)
3088       default_port=$withval
3089       ;;
3090   esac
3091
3092 else
3093   default_port=5432
3094 fi
3095
3096
3097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_port" >&5
3098 $as_echo "$default_port" >&6; }
3099 # Need both of these because some places want an integer and some a string
3100
3101 cat >>confdefs.h <<_ACEOF
3102 #define DEF_PGPORT ${default_port}
3103 _ACEOF
3104
3105
3106 cat >>confdefs.h <<_ACEOF
3107 #define DEF_PGPORT_STR "${default_port}"
3108 _ACEOF
3109
3110
3111
3112 # It's worth validating port; you can get very confusing errors otherwise
3113 if test x"$default_port" = x""; then
3114   as_fn_error $? "invalid --with-pgport specification: empty string" "$LINENO" 5
3115 elif test ! x`echo "$default_port" | sed -e 's/[0-9]*//'` = x""; then
3116   as_fn_error $? "invalid --with-pgport specification: must be a number" "$LINENO" 5
3117 elif test ! x`echo "$default_port" | sed -e 's/^0.//'` = x"$default_port"; then
3118   as_fn_error $? "invalid --with-pgport specification: must not have leading 0" "$LINENO" 5
3119 elif test "$default_port" -lt "1" -o "$default_port" -gt "65535"; then
3120   as_fn_error $? "invalid --with-pgport specification: must be between 1 and 65535" "$LINENO" 5
3121 fi
3122
3123 #
3124 # '-rpath'-like feature can be disabled
3125 #
3126
3127
3128 # Check whether --enable-rpath was given.
3129 if test "${enable_rpath+set}" = set; then :
3130   enableval=$enable_rpath;
3131   case $enableval in
3132     yes)
3133       :
3134       ;;
3135     no)
3136       :
3137       ;;
3138     *)
3139       as_fn_error $? "no argument expected for --enable-rpath option" "$LINENO" 5
3140       ;;
3141   esac
3142
3143 else
3144   enable_rpath=yes
3145
3146 fi
3147
3148
3149
3150
3151 #
3152 # Spinlocks
3153 #
3154
3155
3156 # Check whether --enable-spinlocks was given.
3157 if test "${enable_spinlocks+set}" = set; then :
3158   enableval=$enable_spinlocks;
3159   case $enableval in
3160     yes)
3161       :
3162       ;;
3163     no)
3164       :
3165       ;;
3166     *)
3167       as_fn_error $? "no argument expected for --enable-spinlocks option" "$LINENO" 5
3168       ;;
3169   esac
3170
3171 else
3172   enable_spinlocks=yes
3173
3174 fi
3175
3176
3177
3178 #
3179 # Atomic operations
3180 #
3181
3182
3183 # Check whether --enable-atomics was given.
3184 if test "${enable_atomics+set}" = set; then :
3185   enableval=$enable_atomics;
3186   case $enableval in
3187     yes)
3188       :
3189       ;;
3190     no)
3191       :
3192       ;;
3193     *)
3194       as_fn_error $? "no argument expected for --enable-atomics option" "$LINENO" 5
3195       ;;
3196   esac
3197
3198 else
3199   enable_atomics=yes
3200
3201 fi
3202
3203
3204
3205 #
3206 # Random number generation
3207 #
3208
3209
3210 # Check whether --enable-strong-random was given.
3211 if test "${enable_strong_random+set}" = set; then :
3212   enableval=$enable_strong_random;
3213   case $enableval in
3214     yes)
3215       :
3216       ;;
3217     no)
3218       :
3219       ;;
3220     *)
3221       as_fn_error $? "no argument expected for --enable-strong-random option" "$LINENO" 5
3222       ;;
3223   esac
3224
3225 else
3226   enable_strong_random=yes
3227
3228 fi
3229
3230
3231
3232
3233 #
3234 # --enable-debug adds -g to compiler flags
3235 #
3236
3237
3238 # Check whether --enable-debug was given.
3239 if test "${enable_debug+set}" = set; then :
3240   enableval=$enable_debug;
3241   case $enableval in
3242     yes)
3243       :
3244       ;;
3245     no)
3246       :
3247       ;;
3248     *)
3249       as_fn_error $? "no argument expected for --enable-debug option" "$LINENO" 5
3250       ;;
3251   esac
3252
3253 else
3254   enable_debug=no
3255
3256 fi
3257
3258
3259
3260
3261 #
3262 # --enable-profiling enables gcc profiling
3263 #
3264
3265
3266 # Check whether --enable-profiling was given.
3267 if test "${enable_profiling+set}" = set; then :
3268   enableval=$enable_profiling;
3269   case $enableval in
3270     yes)
3271       :
3272       ;;
3273     no)
3274       :
3275       ;;
3276     *)
3277       as_fn_error $? "no argument expected for --enable-profiling option" "$LINENO" 5
3278       ;;
3279   esac
3280
3281 else
3282   enable_profiling=no
3283
3284 fi
3285
3286
3287
3288 #
3289 # --enable-coverage enables generation of code coverage metrics with gcov
3290 #
3291
3292
3293 # Check whether --enable-coverage was given.
3294 if test "${enable_coverage+set}" = set; then :
3295   enableval=$enable_coverage;
3296   case $enableval in
3297     yes)
3298       if test -z "$GCOV"; then
3299   for ac_prog in gcov
3300 do
3301   # Extract the first word of "$ac_prog", so it can be a program name with args.
3302 set dummy $ac_prog; ac_word=$2
3303 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3304 $as_echo_n "checking for $ac_word... " >&6; }
3305 if ${ac_cv_path_GCOV+:} false; then :
3306   $as_echo_n "(cached) " >&6
3307 else
3308   case $GCOV in
3309   [\\/]* | ?:[\\/]*)
3310   ac_cv_path_GCOV="$GCOV" # Let the user override the test with a path.
3311   ;;
3312   *)
3313   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3314 for as_dir in $PATH
3315 do
3316   IFS=$as_save_IFS
3317   test -z "$as_dir" && as_dir=.
3318     for ac_exec_ext in '' $ac_executable_extensions; do
3319   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3320     ac_cv_path_GCOV="$as_dir/$ac_word$ac_exec_ext"
3321     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3322     break 2
3323   fi
3324 done
3325   done
3326 IFS=$as_save_IFS
3327
3328   ;;
3329 esac
3330 fi
3331 GCOV=$ac_cv_path_GCOV
3332 if test -n "$GCOV"; then
3333   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3334 $as_echo "$GCOV" >&6; }
3335 else
3336   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3337 $as_echo "no" >&6; }
3338 fi
3339
3340
3341   test -n "$GCOV" && break
3342 done
3343
3344 else
3345   # Report the value of GCOV in configure's output in all cases.
3346   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCOV" >&5
3347 $as_echo_n "checking for GCOV... " >&6; }
3348   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3349 $as_echo "$GCOV" >&6; }
3350 fi
3351
3352 if test -z "$GCOV"; then
3353   as_fn_error $? "gcov not found" "$LINENO" 5
3354 fi
3355 if test -z "$LCOV"; then
3356   for ac_prog in lcov
3357 do
3358   # Extract the first word of "$ac_prog", so it can be a program name with args.
3359 set dummy $ac_prog; ac_word=$2
3360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3361 $as_echo_n "checking for $ac_word... " >&6; }
3362 if ${ac_cv_path_LCOV+:} false; then :
3363   $as_echo_n "(cached) " >&6
3364 else
3365   case $LCOV in
3366   [\\/]* | ?:[\\/]*)
3367   ac_cv_path_LCOV="$LCOV" # Let the user override the test with a path.
3368   ;;
3369   *)
3370   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3371 for as_dir in $PATH
3372 do
3373   IFS=$as_save_IFS
3374   test -z "$as_dir" && as_dir=.
3375     for ac_exec_ext in '' $ac_executable_extensions; do
3376   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3377     ac_cv_path_LCOV="$as_dir/$ac_word$ac_exec_ext"
3378     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3379     break 2
3380   fi
3381 done
3382   done
3383 IFS=$as_save_IFS
3384
3385   ;;
3386 esac
3387 fi
3388 LCOV=$ac_cv_path_LCOV
3389 if test -n "$LCOV"; then
3390   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3391 $as_echo "$LCOV" >&6; }
3392 else
3393   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3394 $as_echo "no" >&6; }
3395 fi
3396
3397
3398   test -n "$LCOV" && break
3399 done
3400
3401 else
3402   # Report the value of LCOV in configure's output in all cases.
3403   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCOV" >&5
3404 $as_echo_n "checking for LCOV... " >&6; }
3405   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3406 $as_echo "$LCOV" >&6; }
3407 fi
3408
3409 if test -z "$LCOV"; then
3410   as_fn_error $? "lcov not found" "$LINENO" 5
3411 fi
3412 if test -z "$GENHTML"; then
3413   for ac_prog in genhtml
3414 do
3415   # Extract the first word of "$ac_prog", so it can be a program name with args.
3416 set dummy $ac_prog; ac_word=$2
3417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3418 $as_echo_n "checking for $ac_word... " >&6; }
3419 if ${ac_cv_path_GENHTML+:} false; then :
3420   $as_echo_n "(cached) " >&6
3421 else
3422   case $GENHTML in
3423   [\\/]* | ?:[\\/]*)
3424   ac_cv_path_GENHTML="$GENHTML" # Let the user override the test with a path.
3425   ;;
3426   *)
3427   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3428 for as_dir in $PATH
3429 do
3430   IFS=$as_save_IFS
3431   test -z "$as_dir" && as_dir=.
3432     for ac_exec_ext in '' $ac_executable_extensions; do
3433   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3434     ac_cv_path_GENHTML="$as_dir/$ac_word$ac_exec_ext"
3435     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3436     break 2
3437   fi
3438 done
3439   done
3440 IFS=$as_save_IFS
3441
3442   ;;
3443 esac
3444 fi
3445 GENHTML=$ac_cv_path_GENHTML
3446 if test -n "$GENHTML"; then
3447   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3448 $as_echo "$GENHTML" >&6; }
3449 else
3450   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3451 $as_echo "no" >&6; }
3452 fi
3453
3454
3455   test -n "$GENHTML" && break
3456 done
3457
3458 else
3459   # Report the value of GENHTML in configure's output in all cases.
3460   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GENHTML" >&5
3461 $as_echo_n "checking for GENHTML... " >&6; }
3462   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3463 $as_echo "$GENHTML" >&6; }
3464 fi
3465
3466 if test -z "$GENHTML"; then
3467   as_fn_error $? "genhtml not found" "$LINENO" 5
3468 fi
3469       ;;
3470     no)
3471       :
3472       ;;
3473     *)
3474       as_fn_error $? "no argument expected for --enable-coverage option" "$LINENO" 5
3475       ;;
3476   esac
3477
3478 else
3479   enable_coverage=no
3480
3481 fi
3482
3483
3484
3485
3486 #
3487 # DTrace
3488 #
3489
3490
3491 # Check whether --enable-dtrace was given.
3492 if test "${enable_dtrace+set}" = set; then :
3493   enableval=$enable_dtrace;
3494   case $enableval in
3495     yes)
3496       if test -z "$DTRACE"; then
3497   for ac_prog in dtrace
3498 do
3499   # Extract the first word of "$ac_prog", so it can be a program name with args.
3500 set dummy $ac_prog; ac_word=$2
3501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3502 $as_echo_n "checking for $ac_word... " >&6; }
3503 if ${ac_cv_path_DTRACE+:} false; then :
3504   $as_echo_n "(cached) " >&6
3505 else
3506   case $DTRACE in
3507   [\\/]* | ?:[\\/]*)
3508   ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
3509   ;;
3510   *)
3511   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3512 for as_dir in $PATH
3513 do
3514   IFS=$as_save_IFS
3515   test -z "$as_dir" && as_dir=.
3516     for ac_exec_ext in '' $ac_executable_extensions; do
3517   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3518     ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
3519     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3520     break 2
3521   fi
3522 done
3523   done
3524 IFS=$as_save_IFS
3525
3526   ;;
3527 esac
3528 fi
3529 DTRACE=$ac_cv_path_DTRACE
3530 if test -n "$DTRACE"; then
3531   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3532 $as_echo "$DTRACE" >&6; }
3533 else
3534   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3535 $as_echo "no" >&6; }
3536 fi
3537
3538
3539   test -n "$DTRACE" && break
3540 done
3541
3542 else
3543   # Report the value of DTRACE in configure's output in all cases.
3544   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
3545 $as_echo_n "checking for DTRACE... " >&6; }
3546   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3547 $as_echo "$DTRACE" >&6; }
3548 fi
3549
3550 if test -z "$DTRACE"; then
3551   as_fn_error $? "dtrace not found" "$LINENO" 5
3552 fi
3553
3554       ;;
3555     no)
3556       :
3557       ;;
3558     *)
3559       as_fn_error $? "no argument expected for --enable-dtrace option" "$LINENO" 5
3560       ;;
3561   esac
3562
3563 else
3564   enable_dtrace=no
3565
3566 fi
3567
3568
3569
3570
3571 #
3572 # TAP tests
3573 #
3574
3575
3576 # Check whether --enable-tap-tests was given.
3577 if test "${enable_tap_tests+set}" = set; then :
3578   enableval=$enable_tap_tests;
3579   case $enableval in
3580     yes)
3581       :
3582       ;;
3583     no)
3584       :
3585       ;;
3586     *)
3587       as_fn_error $? "no argument expected for --enable-tap-tests option" "$LINENO" 5
3588       ;;
3589   esac
3590
3591 else
3592   enable_tap_tests=no
3593
3594 fi
3595
3596
3597
3598
3599 #
3600 # Block size
3601 #
3602 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for block size" >&5
3603 $as_echo_n "checking for block size... " >&6; }
3604
3605
3606
3607 # Check whether --with-blocksize was given.
3608 if test "${with_blocksize+set}" = set; then :
3609   withval=$with_blocksize;
3610   case $withval in
3611     yes)
3612       as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3613       ;;
3614     no)
3615       as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3616       ;;
3617     *)
3618       blocksize=$withval
3619       ;;
3620   esac
3621
3622 else
3623   blocksize=8
3624 fi
3625
3626
3627 case ${blocksize} in
3628   1) BLCKSZ=1024;;
3629   2) BLCKSZ=2048;;
3630   4) BLCKSZ=4096;;
3631   8) BLCKSZ=8192;;
3632  16) BLCKSZ=16384;;
3633  32) BLCKSZ=32768;;
3634   *) as_fn_error $? "Invalid block size. Allowed values are 1,2,4,8,16,32." "$LINENO" 5
3635 esac
3636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${blocksize}kB" >&5
3637 $as_echo "${blocksize}kB" >&6; }
3638
3639
3640 cat >>confdefs.h <<_ACEOF
3641 #define BLCKSZ ${BLCKSZ}
3642 _ACEOF
3643
3644
3645 #
3646 # Relation segment size
3647 #
3648 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for segment size" >&5
3649 $as_echo_n "checking for segment size... " >&6; }
3650
3651
3652
3653 # Check whether --with-segsize was given.
3654 if test "${with_segsize+set}" = set; then :
3655   withval=$with_segsize;
3656   case $withval in
3657     yes)
3658       as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3659       ;;
3660     no)
3661       as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3662       ;;
3663     *)
3664       segsize=$withval
3665       ;;
3666   esac
3667
3668 else
3669   segsize=1
3670 fi
3671
3672
3673 # this expression is set up to avoid unnecessary integer overflow
3674 # blocksize is already guaranteed to be a factor of 1024
3675 RELSEG_SIZE=`expr '(' 1024 / ${blocksize} ')' '*' ${segsize} '*' 1024`
3676 test $? -eq 0 || exit 1
3677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${segsize}GB" >&5
3678 $as_echo "${segsize}GB" >&6; }
3679
3680
3681 cat >>confdefs.h <<_ACEOF
3682 #define RELSEG_SIZE ${RELSEG_SIZE}
3683 _ACEOF
3684
3685
3686 #
3687 # WAL block size
3688 #
3689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAL block size" >&5
3690 $as_echo_n "checking for WAL block size... " >&6; }
3691
3692
3693
3694 # Check whether --with-wal-blocksize was given.
3695 if test "${with_wal_blocksize+set}" = set; then :
3696   withval=$with_wal_blocksize;
3697   case $withval in
3698     yes)
3699       as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3700       ;;
3701     no)
3702       as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3703       ;;
3704     *)
3705       wal_blocksize=$withval
3706       ;;
3707   esac
3708
3709 else
3710   wal_blocksize=8
3711 fi
3712
3713
3714 case ${wal_blocksize} in
3715   1) XLOG_BLCKSZ=1024;;
3716   2) XLOG_BLCKSZ=2048;;
3717   4) XLOG_BLCKSZ=4096;;
3718   8) XLOG_BLCKSZ=8192;;
3719  16) XLOG_BLCKSZ=16384;;
3720  32) XLOG_BLCKSZ=32768;;
3721  64) XLOG_BLCKSZ=65536;;
3722   *) as_fn_error $? "Invalid WAL block size. Allowed values are 1,2,4,8,16,32,64." "$LINENO" 5
3723 esac
3724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${wal_blocksize}kB" >&5
3725 $as_echo "${wal_blocksize}kB" >&6; }
3726
3727
3728 cat >>confdefs.h <<_ACEOF
3729 #define XLOG_BLCKSZ ${XLOG_BLCKSZ}
3730 _ACEOF
3731
3732
3733 #
3734 # C compiler
3735 #
3736
3737 # For historical reasons you can also use --with-CC to specify the C compiler
3738 # to use, although the standard way to do this is to set the CC environment
3739 # variable.
3740
3741
3742
3743 # Check whether --with-CC was given.
3744 if test "${with_CC+set}" = set; then :
3745   withval=$with_CC;
3746   case $withval in
3747     yes)
3748       as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3749       ;;
3750     no)
3751       as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3752       ;;
3753     *)
3754       CC=$with_CC
3755       ;;
3756   esac
3757
3758 fi
3759
3760
3761
3762 case $template in
3763   aix) pgac_cc_list="gcc xlc";;
3764     *) pgac_cc_list="gcc cc";;
3765 esac
3766
3767 ac_ext=c
3768 ac_cpp='$CPP $CPPFLAGS'
3769 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3770 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3771 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3772 if test -n "$ac_tool_prefix"; then
3773   for ac_prog in $pgac_cc_list
3774   do
3775     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3776 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3778 $as_echo_n "checking for $ac_word... " >&6; }
3779 if ${ac_cv_prog_CC+:} false; then :
3780   $as_echo_n "(cached) " >&6
3781 else
3782   if test -n "$CC"; then
3783   ac_cv_prog_CC="$CC" # Let the user override the test.
3784 else
3785 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3786 for as_dir in $PATH
3787 do
3788   IFS=$as_save_IFS
3789   test -z "$as_dir" && as_dir=.
3790     for ac_exec_ext in '' $ac_executable_extensions; do
3791   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3792     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3793     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3794     break 2
3795   fi
3796 done
3797   done
3798 IFS=$as_save_IFS
3799
3800 fi
3801 fi
3802 CC=$ac_cv_prog_CC
3803 if test -n "$CC"; then
3804   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3805 $as_echo "$CC" >&6; }
3806 else
3807   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3808 $as_echo "no" >&6; }
3809 fi
3810
3811
3812     test -n "$CC" && break
3813   done
3814 fi
3815 if test -z "$CC"; then
3816   ac_ct_CC=$CC
3817   for ac_prog in $pgac_cc_list
3818 do
3819   # Extract the first word of "$ac_prog", so it can be a program name with args.
3820 set dummy $ac_prog; ac_word=$2
3821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3822 $as_echo_n "checking for $ac_word... " >&6; }
3823 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3824   $as_echo_n "(cached) " >&6
3825 else
3826   if test -n "$ac_ct_CC"; then
3827   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3828 else
3829 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3830 for as_dir in $PATH
3831 do
3832   IFS=$as_save_IFS
3833   test -z "$as_dir" && as_dir=.
3834     for ac_exec_ext in '' $ac_executable_extensions; do
3835   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3836     ac_cv_prog_ac_ct_CC="$ac_prog"
3837     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3838     break 2
3839   fi
3840 done
3841   done
3842 IFS=$as_save_IFS
3843
3844 fi
3845 fi
3846 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3847 if test -n "$ac_ct_CC"; then
3848   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3849 $as_echo "$ac_ct_CC" >&6; }
3850 else
3851   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3852 $as_echo "no" >&6; }
3853 fi
3854
3855
3856   test -n "$ac_ct_CC" && break
3857 done
3858
3859   if test "x$ac_ct_CC" = x; then
3860     CC=""
3861   else
3862     case $cross_compiling:$ac_tool_warned in
3863 yes:)
3864 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3865 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3866 ac_tool_warned=yes ;;
3867 esac
3868     CC=$ac_ct_CC
3869   fi
3870 fi
3871
3872
3873 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3874 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3875 as_fn_error $? "no acceptable C compiler found in \$PATH
3876 See \`config.log' for more details" "$LINENO" 5; }
3877
3878 # Provide some information about the compiler.
3879 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3880 set X $ac_compile
3881 ac_compiler=$2
3882 for ac_option in --version -v -V -qversion; do
3883   { { ac_try="$ac_compiler $ac_option >&5"
3884 case "(($ac_try" in
3885   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3886   *) ac_try_echo=$ac_try;;
3887 esac
3888 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3889 $as_echo "$ac_try_echo"; } >&5
3890   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3891   ac_status=$?
3892   if test -s conftest.err; then
3893     sed '10a\
3894 ... rest of stderr output deleted ...
3895          10q' conftest.err >conftest.er1
3896     cat conftest.er1 >&5
3897   fi
3898   rm -f conftest.er1 conftest.err
3899   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3900   test $ac_status = 0; }
3901 done
3902
3903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3904 /* end confdefs.h.  */
3905
3906 int
3907 main ()
3908 {
3909
3910   ;
3911   return 0;
3912 }
3913 _ACEOF
3914 ac_clean_files_save=$ac_clean_files
3915 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3916 # Try to create an executable without -o first, disregard a.out.
3917 # It will help us diagnose broken compilers, and finding out an intuition
3918 # of exeext.
3919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3920 $as_echo_n "checking whether the C compiler works... " >&6; }
3921 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3922
3923 # The possible output files:
3924 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3925
3926 ac_rmfiles=
3927 for ac_file in $ac_files
3928 do
3929   case $ac_file in
3930     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3931     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3932   esac
3933 done
3934 rm -f $ac_rmfiles
3935
3936 if { { ac_try="$ac_link_default"
3937 case "(($ac_try" in
3938   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3939   *) ac_try_echo=$ac_try;;
3940 esac
3941 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3942 $as_echo "$ac_try_echo"; } >&5
3943   (eval "$ac_link_default") 2>&5
3944   ac_status=$?
3945   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3946   test $ac_status = 0; }; then :
3947   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3948 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3949 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
3950 # so that the user can short-circuit this test for compilers unknown to
3951 # Autoconf.
3952 for ac_file in $ac_files ''
3953 do
3954   test -f "$ac_file" || continue
3955   case $ac_file in
3956     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3957         ;;
3958     [ab].out )
3959         # We found the default executable, but exeext='' is most
3960         # certainly right.
3961         break;;
3962     *.* )
3963         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3964         then :; else
3965            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3966         fi
3967         # We set ac_cv_exeext here because the later test for it is not
3968         # safe: cross compilers may not add the suffix if given an `-o'
3969         # argument, so we may need to know it at that point already.
3970         # Even if this section looks crufty: it has the advantage of
3971         # actually working.
3972         break;;
3973     * )
3974         break;;
3975   esac
3976 done
3977 test "$ac_cv_exeext" = no && ac_cv_exeext=
3978
3979 else
3980   ac_file=''
3981 fi
3982 if test -z "$ac_file"; then :
3983   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3984 $as_echo "no" >&6; }
3985 $as_echo "$as_me: failed program was:" >&5
3986 sed 's/^/| /' conftest.$ac_ext >&5
3987
3988 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3989 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3990 as_fn_error 77 "C compiler cannot create executables
3991 See \`config.log' for more details" "$LINENO" 5; }
3992 else
3993   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3994 $as_echo "yes" >&6; }
3995 fi
3996 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3997 $as_echo_n "checking for C compiler default output file name... " >&6; }
3998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3999 $as_echo "$ac_file" >&6; }
4000 ac_exeext=$ac_cv_exeext
4001
4002 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4003 ac_clean_files=$ac_clean_files_save
4004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4005 $as_echo_n "checking for suffix of executables... " >&6; }
4006 if { { ac_try="$ac_link"
4007 case "(($ac_try" in
4008   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4009   *) ac_try_echo=$ac_try;;
4010 esac
4011 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4012 $as_echo "$ac_try_echo"; } >&5
4013   (eval "$ac_link") 2>&5
4014   ac_status=$?
4015   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4016   test $ac_status = 0; }; then :
4017   # If both `conftest.exe' and `conftest' are `present' (well, observable)
4018 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
4019 # work properly (i.e., refer to `conftest.exe'), while it won't with
4020 # `rm'.
4021 for ac_file in conftest.exe conftest conftest.*; do
4022   test -f "$ac_file" || continue
4023   case $ac_file in
4024     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4025     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4026           break;;
4027     * ) break;;
4028   esac
4029 done
4030 else
4031   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4032 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4033 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4034 See \`config.log' for more details" "$LINENO" 5; }
4035 fi
4036 rm -f conftest conftest$ac_cv_exeext
4037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4038 $as_echo "$ac_cv_exeext" >&6; }
4039
4040 rm -f conftest.$ac_ext
4041 EXEEXT=$ac_cv_exeext
4042 ac_exeext=$EXEEXT
4043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4044 /* end confdefs.h.  */
4045 #include <stdio.h>
4046 int
4047 main ()
4048 {
4049 FILE *f = fopen ("conftest.out", "w");
4050  return ferror (f) || fclose (f) != 0;
4051
4052   ;
4053   return 0;
4054 }
4055 _ACEOF
4056 ac_clean_files="$ac_clean_files conftest.out"
4057 # Check that the compiler produces executables we can run.  If not, either
4058 # the compiler is broken, or we cross compile.
4059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4060 $as_echo_n "checking whether we are cross compiling... " >&6; }
4061 if test "$cross_compiling" != yes; then
4062   { { ac_try="$ac_link"
4063 case "(($ac_try" in
4064   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4065   *) ac_try_echo=$ac_try;;
4066 esac
4067 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4068 $as_echo "$ac_try_echo"; } >&5
4069   (eval "$ac_link") 2>&5
4070   ac_status=$?
4071   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4072   test $ac_status = 0; }
4073   if { ac_try='./conftest$ac_cv_exeext'
4074   { { case "(($ac_try" in
4075   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4076   *) ac_try_echo=$ac_try;;
4077 esac
4078 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4079 $as_echo "$ac_try_echo"; } >&5
4080   (eval "$ac_try") 2>&5
4081   ac_status=$?
4082   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4083   test $ac_status = 0; }; }; then
4084     cross_compiling=no
4085   else
4086     if test "$cross_compiling" = maybe; then
4087         cross_compiling=yes
4088     else
4089         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4090 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4091 as_fn_error $? "cannot run C compiled programs.
4092 If you meant to cross compile, use \`--host'.
4093 See \`config.log' for more details" "$LINENO" 5; }
4094     fi
4095   fi
4096 fi
4097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4098 $as_echo "$cross_compiling" >&6; }
4099
4100 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4101 ac_clean_files=$ac_clean_files_save
4102 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4103 $as_echo_n "checking for suffix of object files... " >&6; }
4104 if ${ac_cv_objext+:} false; then :
4105   $as_echo_n "(cached) " >&6
4106 else
4107   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4108 /* end confdefs.h.  */
4109
4110 int
4111 main ()
4112 {
4113
4114   ;
4115   return 0;
4116 }
4117 _ACEOF
4118 rm -f conftest.o conftest.obj
4119 if { { ac_try="$ac_compile"
4120 case "(($ac_try" in
4121   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4122   *) ac_try_echo=$ac_try;;
4123 esac
4124 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4125 $as_echo "$ac_try_echo"; } >&5
4126   (eval "$ac_compile") 2>&5
4127   ac_status=$?
4128   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4129   test $ac_status = 0; }; then :
4130   for ac_file in conftest.o conftest.obj conftest.*; do
4131   test -f "$ac_file" || continue;
4132   case $ac_file in
4133     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4134     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4135        break;;
4136   esac
4137 done
4138 else
4139   $as_echo "$as_me: failed program was:" >&5
4140 sed 's/^/| /' conftest.$ac_ext >&5
4141
4142 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4143 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4144 as_fn_error $? "cannot compute suffix of object files: cannot compile
4145 See \`config.log' for more details" "$LINENO" 5; }
4146 fi
4147 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4148 fi
4149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4150 $as_echo "$ac_cv_objext" >&6; }
4151 OBJEXT=$ac_cv_objext
4152 ac_objext=$OBJEXT
4153 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4154 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4155 if ${ac_cv_c_compiler_gnu+:} false; then :
4156   $as_echo_n "(cached) " >&6
4157 else
4158   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4159 /* end confdefs.h.  */
4160
4161 int
4162 main ()
4163 {
4164 #ifndef __GNUC__
4165        choke me
4166 #endif
4167
4168   ;
4169   return 0;
4170 }
4171 _ACEOF
4172 if ac_fn_c_try_compile "$LINENO"; then :
4173   ac_compiler_gnu=yes
4174 else
4175   ac_compiler_gnu=no
4176 fi
4177 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4178 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4179
4180 fi
4181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4182 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4183 if test $ac_compiler_gnu = yes; then
4184   GCC=yes
4185 else
4186   GCC=
4187 fi
4188 ac_test_CFLAGS=${CFLAGS+set}
4189 ac_save_CFLAGS=$CFLAGS
4190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4191 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4192 if ${ac_cv_prog_cc_g+:} false; then :
4193   $as_echo_n "(cached) " >&6
4194 else
4195   ac_save_c_werror_flag=$ac_c_werror_flag
4196    ac_c_werror_flag=yes
4197    ac_cv_prog_cc_g=no
4198    CFLAGS="-g"
4199    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4200 /* end confdefs.h.  */
4201
4202 int
4203 main ()
4204 {
4205
4206   ;
4207   return 0;
4208 }
4209 _ACEOF
4210 if ac_fn_c_try_compile "$LINENO"; then :
4211   ac_cv_prog_cc_g=yes
4212 else
4213   CFLAGS=""
4214       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4215 /* end confdefs.h.  */
4216
4217 int
4218 main ()
4219 {
4220
4221   ;
4222   return 0;
4223 }
4224 _ACEOF
4225 if ac_fn_c_try_compile "$LINENO"; then :
4226
4227 else
4228   ac_c_werror_flag=$ac_save_c_werror_flag
4229          CFLAGS="-g"
4230          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4231 /* end confdefs.h.  */
4232
4233 int
4234 main ()
4235 {
4236
4237   ;
4238   return 0;
4239 }
4240 _ACEOF
4241 if ac_fn_c_try_compile "$LINENO"; then :
4242   ac_cv_prog_cc_g=yes
4243 fi
4244 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4245 fi
4246 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4247 fi
4248 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4249    ac_c_werror_flag=$ac_save_c_werror_flag
4250 fi
4251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4252 $as_echo "$ac_cv_prog_cc_g" >&6; }
4253 if test "$ac_test_CFLAGS" = set; then
4254   CFLAGS=$ac_save_CFLAGS
4255 elif test $ac_cv_prog_cc_g = yes; then
4256   if test "$GCC" = yes; then
4257     CFLAGS="-g -O2"
4258   else
4259     CFLAGS="-g"
4260   fi
4261 else
4262   if test "$GCC" = yes; then
4263     CFLAGS="-O2"
4264   else
4265     CFLAGS=
4266   fi
4267 fi
4268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4269 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4270 if ${ac_cv_prog_cc_c89+:} false; then :
4271   $as_echo_n "(cached) " >&6
4272 else
4273   ac_cv_prog_cc_c89=no
4274 ac_save_CC=$CC
4275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4276 /* end confdefs.h.  */
4277 #include <stdarg.h>
4278 #include <stdio.h>
4279 struct stat;
4280 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4281 struct buf { int x; };
4282 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4283 static char *e (p, i)
4284      char **p;
4285      int i;
4286 {
4287   return p[i];
4288 }
4289 static char *f (char * (*g) (char **, int), char **p, ...)
4290 {
4291   char *s;
4292   va_list v;
4293   va_start (v,p);
4294   s = g (p, va_arg (v,int));
4295   va_end (v);
4296   return s;
4297 }
4298
4299 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
4300    function prototypes and stuff, but not '\xHH' hex character constants.
4301    These don't provoke an error unfortunately, instead are silently treated
4302    as 'x'.  The following induces an error, until -std is added to get
4303    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
4304    array size at least.  It's necessary to write '\x00'==0 to get something
4305    that's true only with -std.  */
4306 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4307
4308 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4309    inside strings and character constants.  */
4310 #define FOO(x) 'x'
4311 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4312
4313 int test (int i, double x);
4314 struct s1 {int (*f) (int a);};
4315 struct s2 {int (*f) (double a);};
4316 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4317 int argc;
4318 char **argv;
4319 int
4320 main ()
4321 {
4322 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4323   ;
4324   return 0;
4325 }
4326 _ACEOF
4327 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4328         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4329 do
4330   CC="$ac_save_CC $ac_arg"
4331   if ac_fn_c_try_compile "$LINENO"; then :
4332   ac_cv_prog_cc_c89=$ac_arg
4333 fi
4334 rm -f core conftest.err conftest.$ac_objext
4335   test "x$ac_cv_prog_cc_c89" != "xno" && break
4336 done
4337 rm -f conftest.$ac_ext
4338 CC=$ac_save_CC
4339
4340 fi
4341 # AC_CACHE_VAL
4342 case "x$ac_cv_prog_cc_c89" in
4343   x)
4344     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4345 $as_echo "none needed" >&6; } ;;
4346   xno)
4347     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4348 $as_echo "unsupported" >&6; } ;;
4349   *)
4350     CC="$CC $ac_cv_prog_cc_c89"
4351     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4352 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4353 esac
4354 if test "x$ac_cv_prog_cc_c89" != xno; then :
4355
4356 fi
4357
4358 ac_ext=c
4359 ac_cpp='$CPP $CPPFLAGS'
4360 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4361 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4362 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4363
4364
4365 # Check if it's Intel's compiler, which (usually) pretends to be gcc,
4366 # but has idiosyncrasies of its own.  We assume icc will define
4367 # __INTEL_COMPILER regardless of CFLAGS.
4368
4369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4370 /* end confdefs.h.  */
4371
4372 int
4373 main ()
4374 {
4375 #ifndef __INTEL_COMPILER
4376 choke me
4377 #endif
4378   ;
4379   return 0;
4380 }
4381 _ACEOF
4382 if ac_fn_c_try_compile "$LINENO"; then :
4383   ICC=yes
4384 else
4385   ICC=no
4386 fi
4387 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4388
4389 # Check if it's Sun Studio compiler. We assume that
4390 # __SUNPRO_C will be defined for Sun Studio compilers
4391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4392 /* end confdefs.h.  */
4393
4394 int
4395 main ()
4396 {
4397 #ifndef __SUNPRO_C
4398 choke me
4399 #endif
4400   ;
4401   return 0;
4402 }
4403 _ACEOF
4404 if ac_fn_c_try_compile "$LINENO"; then :
4405   SUN_STUDIO_CC=yes
4406 else
4407   SUN_STUDIO_CC=no
4408 fi
4409 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4410
4411
4412
4413 unset CFLAGS
4414
4415 #
4416 # Read the template
4417 #
4418 . "$srcdir/src/template/$template" || exit
4419
4420 # CFLAGS are selected so:
4421 # If the user specifies something in the environment, that is used.
4422 # else:  If the template file set something, that is used.
4423 # else:  If coverage was enabled, don't set anything.
4424 # else:  If the compiler is GCC, then we use -O2.
4425 # else:  If the compiler is something else, then we use -O, unless debugging.
4426
4427 if test "$ac_env_CFLAGS_set" = set; then
4428   CFLAGS=$ac_env_CFLAGS_value
4429 elif test "${CFLAGS+set}" = set; then
4430   : # (keep what template set)
4431 elif test "$enable_coverage" = yes; then
4432   : # no optimization by default
4433 elif test "$GCC" = yes; then
4434   CFLAGS="-O2"
4435 else
4436   # if the user selected debug mode, don't use -O
4437   if test "$enable_debug" != yes; then
4438     CFLAGS="-O"
4439   fi
4440 fi
4441
4442 # CFLAGS we determined above will be added back at the end
4443 user_CFLAGS=$CFLAGS
4444 CFLAGS=""
4445
4446 # set CFLAGS_VECTOR from the environment, if available
4447 if test "$ac_env_CFLAGS_VECTOR_set" = set; then
4448   CFLAGS_VECTOR=$ac_env_CFLAGS_VECTOR_value
4449 fi
4450
4451 # Some versions of GCC support some additional useful warning flags.
4452 # Check whether they are supported, and add them to CFLAGS if so.
4453 # ICC pretends to be GCC but it's lying; it doesn't support these flags,
4454 # but has its own.  Also check other compiler-specific flags here.
4455
4456 if test "$GCC" = yes -a "$ICC" = no; then
4457   CFLAGS="-Wall -Wmissing-prototypes -Wpointer-arith"
4458   # These work in some but not all gcc versions
4459   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wdeclaration-after-statement" >&5
4460 $as_echo_n "checking whether $CC supports -Wdeclaration-after-statement... " >&6; }
4461 if ${pgac_cv_prog_cc_cflags__Wdeclaration_after_statement+:} false; then :
4462   $as_echo_n "(cached) " >&6
4463 else
4464   pgac_save_CFLAGS=$CFLAGS
4465 CFLAGS="$pgac_save_CFLAGS -Wdeclaration-after-statement"
4466 ac_save_c_werror_flag=$ac_c_werror_flag
4467 ac_c_werror_flag=yes
4468 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4469 /* end confdefs.h.  */
4470
4471 int
4472 main ()
4473 {
4474
4475   ;
4476   return 0;
4477 }
4478 _ACEOF
4479 if ac_fn_c_try_compile "$LINENO"; then :
4480   pgac_cv_prog_cc_cflags__Wdeclaration_after_statement=yes
4481 else
4482   pgac_cv_prog_cc_cflags__Wdeclaration_after_statement=no
4483 fi
4484 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4485 ac_c_werror_flag=$ac_save_c_werror_flag
4486 CFLAGS="$pgac_save_CFLAGS"
4487 fi
4488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" >&5
4489 $as_echo "$pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" >&6; }
4490 if test x"$pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" = x"yes"; then
4491   CFLAGS="$CFLAGS -Wdeclaration-after-statement"
4492 fi
4493
4494   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wendif-labels" >&5
4495 $as_echo_n "checking whether $CC supports -Wendif-labels... " >&6; }
4496 if ${pgac_cv_prog_cc_cflags__Wendif_labels+:} false; then :
4497   $as_echo_n "(cached) " >&6
4498 else
4499   pgac_save_CFLAGS=$CFLAGS
4500 CFLAGS="$pgac_save_CFLAGS -Wendif-labels"
4501 ac_save_c_werror_flag=$ac_c_werror_flag
4502 ac_c_werror_flag=yes
4503 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4504 /* end confdefs.h.  */
4505
4506 int
4507 main ()
4508 {
4509
4510   ;
4511   return 0;
4512 }
4513 _ACEOF
4514 if ac_fn_c_try_compile "$LINENO"; then :
4515   pgac_cv_prog_cc_cflags__Wendif_labels=yes
4516 else
4517   pgac_cv_prog_cc_cflags__Wendif_labels=no
4518 fi
4519 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4520 ac_c_werror_flag=$ac_save_c_werror_flag
4521 CFLAGS="$pgac_save_CFLAGS"
4522 fi
4523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wendif_labels" >&5
4524 $as_echo "$pgac_cv_prog_cc_cflags__Wendif_labels" >&6; }
4525 if test x"$pgac_cv_prog_cc_cflags__Wendif_labels" = x"yes"; then
4526   CFLAGS="$CFLAGS -Wendif-labels"
4527 fi
4528
4529   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wmissing-format-attribute" >&5
4530 $as_echo_n "checking whether $CC supports -Wmissing-format-attribute... " >&6; }
4531 if ${pgac_cv_prog_cc_cflags__Wmissing_format_attribute+:} false; then :
4532   $as_echo_n "(cached) " >&6
4533 else
4534   pgac_save_CFLAGS=$CFLAGS
4535 CFLAGS="$pgac_save_CFLAGS -Wmissing-format-attribute"
4536 ac_save_c_werror_flag=$ac_c_werror_flag
4537 ac_c_werror_flag=yes
4538 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4539 /* end confdefs.h.  */
4540
4541 int
4542 main ()
4543 {
4544
4545   ;
4546   return 0;
4547 }
4548 _ACEOF
4549 if ac_fn_c_try_compile "$LINENO"; then :
4550   pgac_cv_prog_cc_cflags__Wmissing_format_attribute=yes
4551 else
4552   pgac_cv_prog_cc_cflags__Wmissing_format_attribute=no
4553 fi
4554 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4555 ac_c_werror_flag=$ac_save_c_werror_flag
4556 CFLAGS="$pgac_save_CFLAGS"
4557 fi
4558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wmissing_format_attribute" >&5
4559 $as_echo "$pgac_cv_prog_cc_cflags__Wmissing_format_attribute" >&6; }
4560 if test x"$pgac_cv_prog_cc_cflags__Wmissing_format_attribute" = x"yes"; then
4561   CFLAGS="$CFLAGS -Wmissing-format-attribute"
4562 fi
4563
4564   # This was included in -Wall/-Wformat in older GCC versions
4565   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wformat-security" >&5
4566 $as_echo_n "checking whether $CC supports -Wformat-security... " >&6; }
4567 if ${pgac_cv_prog_cc_cflags__Wformat_security+:} false; then :
4568   $as_echo_n "(cached) " >&6
4569 else
4570   pgac_save_CFLAGS=$CFLAGS
4571 CFLAGS="$pgac_save_CFLAGS -Wformat-security"
4572 ac_save_c_werror_flag=$ac_c_werror_flag
4573 ac_c_werror_flag=yes
4574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4575 /* end confdefs.h.  */
4576
4577 int
4578 main ()
4579 {
4580
4581   ;
4582   return 0;
4583 }
4584 _ACEOF
4585 if ac_fn_c_try_compile "$LINENO"; then :
4586   pgac_cv_prog_cc_cflags__Wformat_security=yes
4587 else
4588   pgac_cv_prog_cc_cflags__Wformat_security=no
4589 fi
4590 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4591 ac_c_werror_flag=$ac_save_c_werror_flag
4592 CFLAGS="$pgac_save_CFLAGS"
4593 fi
4594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wformat_security" >&5
4595 $as_echo "$pgac_cv_prog_cc_cflags__Wformat_security" >&6; }
4596 if test x"$pgac_cv_prog_cc_cflags__Wformat_security" = x"yes"; then
4597   CFLAGS="$CFLAGS -Wformat-security"
4598 fi
4599
4600   # Disable strict-aliasing rules; needed for gcc 3.3+
4601   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fno-strict-aliasing" >&5
4602 $as_echo_n "checking whether $CC supports -fno-strict-aliasing... " >&6; }
4603 if ${pgac_cv_prog_cc_cflags__fno_strict_aliasing+:} false; then :
4604   $as_echo_n "(cached) " >&6
4605 else
4606   pgac_save_CFLAGS=$CFLAGS
4607 CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing"
4608 ac_save_c_werror_flag=$ac_c_werror_flag
4609 ac_c_werror_flag=yes
4610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4611 /* end confdefs.h.  */
4612
4613 int
4614 main ()
4615 {
4616
4617   ;
4618   return 0;
4619 }
4620 _ACEOF
4621 if ac_fn_c_try_compile "$LINENO"; then :
4622   pgac_cv_prog_cc_cflags__fno_strict_aliasing=yes
4623 else
4624   pgac_cv_prog_cc_cflags__fno_strict_aliasing=no
4625 fi
4626 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4627 ac_c_werror_flag=$ac_save_c_werror_flag
4628 CFLAGS="$pgac_save_CFLAGS"
4629 fi
4630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&5
4631 $as_echo "$pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&6; }
4632 if test x"$pgac_cv_prog_cc_cflags__fno_strict_aliasing" = x"yes"; then
4633   CFLAGS="$CFLAGS -fno-strict-aliasing"
4634 fi
4635
4636   # Disable optimizations that assume no overflow; needed for gcc 4.3+
4637   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fwrapv" >&5
4638 $as_echo_n "checking whether $CC supports -fwrapv... " >&6; }
4639 if ${pgac_cv_prog_cc_cflags__fwrapv+:} false; then :
4640   $as_echo_n "(cached) " >&6
4641 else
4642   pgac_save_CFLAGS=$CFLAGS
4643 CFLAGS="$pgac_save_CFLAGS -fwrapv"
4644 ac_save_c_werror_flag=$ac_c_werror_flag
4645 ac_c_werror_flag=yes
4646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4647 /* end confdefs.h.  */
4648
4649 int
4650 main ()
4651 {
4652
4653   ;
4654   return 0;
4655 }
4656 _ACEOF
4657 if ac_fn_c_try_compile "$LINENO"; then :
4658   pgac_cv_prog_cc_cflags__fwrapv=yes
4659 else
4660   pgac_cv_prog_cc_cflags__fwrapv=no
4661 fi
4662 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4663 ac_c_werror_flag=$ac_save_c_werror_flag
4664 CFLAGS="$pgac_save_CFLAGS"
4665 fi
4666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fwrapv" >&5
4667 $as_echo "$pgac_cv_prog_cc_cflags__fwrapv" >&6; }
4668 if test x"$pgac_cv_prog_cc_cflags__fwrapv" = x"yes"; then
4669   CFLAGS="$CFLAGS -fwrapv"
4670 fi
4671
4672   # Disable FP optimizations that cause various errors on gcc 4.5+ or maybe 4.6+
4673   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fexcess-precision=standard" >&5
4674 $as_echo_n "checking whether $CC supports -fexcess-precision=standard... " >&6; }
4675 if ${pgac_cv_prog_cc_cflags__fexcess_precision_standard+:} false; then :
4676   $as_echo_n "(cached) " >&6
4677 else
4678   pgac_save_CFLAGS=$CFLAGS
4679 CFLAGS="$pgac_save_CFLAGS -fexcess-precision=standard"
4680 ac_save_c_werror_flag=$ac_c_werror_flag
4681 ac_c_werror_flag=yes
4682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4683 /* end confdefs.h.  */
4684
4685 int
4686 main ()
4687 {
4688
4689   ;
4690   return 0;
4691 }
4692 _ACEOF
4693 if ac_fn_c_try_compile "$LINENO"; then :
4694   pgac_cv_prog_cc_cflags__fexcess_precision_standard=yes
4695 else
4696   pgac_cv_prog_cc_cflags__fexcess_precision_standard=no
4697 fi
4698 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4699 ac_c_werror_flag=$ac_save_c_werror_flag
4700 CFLAGS="$pgac_save_CFLAGS"
4701 fi
4702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fexcess_precision_standard" >&5
4703 $as_echo "$pgac_cv_prog_cc_cflags__fexcess_precision_standard" >&6; }
4704 if test x"$pgac_cv_prog_cc_cflags__fexcess_precision_standard" = x"yes"; then
4705   CFLAGS="$CFLAGS -fexcess-precision=standard"
4706 fi
4707
4708   # Optimization flags for specific files that benefit from vectorization
4709   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -funroll-loops" >&5
4710 $as_echo_n "checking whether $CC supports -funroll-loops... " >&6; }
4711 if ${pgac_cv_prog_cc_cflags__funroll_loops+:} false; then :
4712   $as_echo_n "(cached) " >&6
4713 else
4714   pgac_save_CFLAGS=$CFLAGS
4715 CFLAGS="$pgac_save_CFLAGS -funroll-loops"
4716 ac_save_c_werror_flag=$ac_c_werror_flag
4717 ac_c_werror_flag=yes
4718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4719 /* end confdefs.h.  */
4720
4721 int
4722 main ()
4723 {
4724
4725   ;
4726   return 0;
4727 }
4728 _ACEOF
4729 if ac_fn_c_try_compile "$LINENO"; then :
4730   pgac_cv_prog_cc_cflags__funroll_loops=yes
4731 else
4732   pgac_cv_prog_cc_cflags__funroll_loops=no
4733 fi
4734 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4735 ac_c_werror_flag=$ac_save_c_werror_flag
4736 CFLAGS="$pgac_save_CFLAGS"
4737 fi
4738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__funroll_loops" >&5
4739 $as_echo "$pgac_cv_prog_cc_cflags__funroll_loops" >&6; }
4740 if test x"$pgac_cv_prog_cc_cflags__funroll_loops" = x"yes"; then
4741   CFLAGS_VECTOR="${CFLAGS_VECTOR} -funroll-loops"
4742 fi
4743
4744   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -ftree-vectorize" >&5
4745 $as_echo_n "checking whether $CC supports -ftree-vectorize... " >&6; }
4746 if ${pgac_cv_prog_cc_cflags__ftree_vectorize+:} false; then :
4747   $as_echo_n "(cached) " >&6
4748 else
4749   pgac_save_CFLAGS=$CFLAGS
4750 CFLAGS="$pgac_save_CFLAGS -ftree-vectorize"
4751 ac_save_c_werror_flag=$ac_c_werror_flag
4752 ac_c_werror_flag=yes
4753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4754 /* end confdefs.h.  */
4755
4756 int
4757 main ()
4758 {
4759
4760   ;
4761   return 0;
4762 }
4763 _ACEOF
4764 if ac_fn_c_try_compile "$LINENO"; then :
4765   pgac_cv_prog_cc_cflags__ftree_vectorize=yes
4766 else
4767   pgac_cv_prog_cc_cflags__ftree_vectorize=no
4768 fi
4769 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4770 ac_c_werror_flag=$ac_save_c_werror_flag
4771 CFLAGS="$pgac_save_CFLAGS"
4772 fi
4773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__ftree_vectorize" >&5
4774 $as_echo "$pgac_cv_prog_cc_cflags__ftree_vectorize" >&6; }
4775 if test x"$pgac_cv_prog_cc_cflags__ftree_vectorize" = x"yes"; then
4776   CFLAGS_VECTOR="${CFLAGS_VECTOR} -ftree-vectorize"
4777 fi
4778
4779   # We want to suppress clang's unhelpful unused-command-line-argument warnings
4780   # but gcc won't complain about unrecognized -Wno-foo switches, so we have to
4781   # test for the positive form and if that works, add the negative form
4782   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wunused-command-line-argument" >&5
4783 $as_echo_n "checking whether $CC supports -Wunused-command-line-argument... " >&6; }
4784 if ${pgac_cv_prog_cc_cflags__Wunused_command_line_argument+:} false; then :
4785   $as_echo_n "(cached) " >&6
4786 else
4787   pgac_save_CFLAGS=$CFLAGS
4788 CFLAGS="$pgac_save_CFLAGS -Wunused-command-line-argument"
4789 ac_save_c_werror_flag=$ac_c_werror_flag
4790 ac_c_werror_flag=yes
4791 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4792 /* end confdefs.h.  */
4793
4794 int
4795 main ()
4796 {
4797
4798   ;
4799   return 0;
4800 }
4801 _ACEOF
4802 if ac_fn_c_try_compile "$LINENO"; then :
4803   pgac_cv_prog_cc_cflags__Wunused_command_line_argument=yes
4804 else
4805   pgac_cv_prog_cc_cflags__Wunused_command_line_argument=no
4806 fi
4807 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4808 ac_c_werror_flag=$ac_save_c_werror_flag
4809 CFLAGS="$pgac_save_CFLAGS"
4810 fi
4811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wunused_command_line_argument" >&5
4812 $as_echo "$pgac_cv_prog_cc_cflags__Wunused_command_line_argument" >&6; }
4813 if test x"$pgac_cv_prog_cc_cflags__Wunused_command_line_argument" = x"yes"; then
4814   NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
4815 fi
4816
4817   if test -n "$NOT_THE_CFLAGS"; then
4818     CFLAGS="$CFLAGS -Wno-unused-command-line-argument"
4819   fi
4820 elif test "$ICC" = yes; then
4821   # Intel's compiler has a bug/misoptimization in checking for
4822   # division by NAN (NaN == 0), -mp1 fixes it, so add it to the CFLAGS.
4823   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -mp1" >&5
4824 $as_echo_n "checking whether $CC supports -mp1... " >&6; }
4825 if ${pgac_cv_prog_cc_cflags__mp1+:} false; then :
4826   $as_echo_n "(cached) " >&6
4827 else
4828   pgac_save_CFLAGS=$CFLAGS
4829 CFLAGS="$pgac_save_CFLAGS -mp1"
4830 ac_save_c_werror_flag=$ac_c_werror_flag
4831 ac_c_werror_flag=yes
4832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4833 /* end confdefs.h.  */
4834
4835 int
4836 main ()
4837 {
4838
4839   ;
4840   return 0;
4841 }
4842 _ACEOF
4843 if ac_fn_c_try_compile "$LINENO"; then :
4844   pgac_cv_prog_cc_cflags__mp1=yes
4845 else
4846   pgac_cv_prog_cc_cflags__mp1=no
4847 fi
4848 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4849 ac_c_werror_flag=$ac_save_c_werror_flag
4850 CFLAGS="$pgac_save_CFLAGS"
4851 fi
4852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__mp1" >&5
4853 $as_echo "$pgac_cv_prog_cc_cflags__mp1" >&6; }
4854 if test x"$pgac_cv_prog_cc_cflags__mp1" = x"yes"; then
4855   CFLAGS="$CFLAGS -mp1"
4856 fi
4857
4858   # Make sure strict aliasing is off (though this is said to be the default)
4859   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fno-strict-aliasing" >&5
4860 $as_echo_n "checking whether $CC supports -fno-strict-aliasing... " >&6; }
4861 if ${pgac_cv_prog_cc_cflags__fno_strict_aliasing+:} false; then :
4862   $as_echo_n "(cached) " >&6
4863 else
4864   pgac_save_CFLAGS=$CFLAGS
4865 CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing"
4866 ac_save_c_werror_flag=$ac_c_werror_flag
4867 ac_c_werror_flag=yes
4868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4869 /* end confdefs.h.  */
4870
4871 int
4872 main ()
4873 {
4874
4875   ;
4876   return 0;
4877 }
4878 _ACEOF
4879 if ac_fn_c_try_compile "$LINENO"; then :
4880   pgac_cv_prog_cc_cflags__fno_strict_aliasing=yes
4881 else
4882   pgac_cv_prog_cc_cflags__fno_strict_aliasing=no
4883 fi
4884 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4885 ac_c_werror_flag=$ac_save_c_werror_flag
4886 CFLAGS="$pgac_save_CFLAGS"
4887 fi
4888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&5
4889 $as_echo "$pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&6; }
4890 if test x"$pgac_cv_prog_cc_cflags__fno_strict_aliasing" = x"yes"; then
4891   CFLAGS="$CFLAGS -fno-strict-aliasing"
4892 fi
4893
4894 elif test "$PORTNAME" = "aix"; then
4895   # AIX's xlc has to have strict aliasing turned off too
4896   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -qnoansialias" >&5
4897 $as_echo_n "checking whether $CC supports -qnoansialias... " >&6; }
4898 if ${pgac_cv_prog_cc_cflags__qnoansialias+:} false; then :
4899   $as_echo_n "(cached) " >&6
4900 else
4901   pgac_save_CFLAGS=$CFLAGS
4902 CFLAGS="$pgac_save_CFLAGS -qnoansialias"
4903 ac_save_c_werror_flag=$ac_c_werror_flag
4904 ac_c_werror_flag=yes
4905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4906 /* end confdefs.h.  */
4907
4908 int
4909 main ()
4910 {
4911
4912   ;
4913   return 0;
4914 }
4915 _ACEOF
4916 if ac_fn_c_try_compile "$LINENO"; then :
4917   pgac_cv_prog_cc_cflags__qnoansialias=yes
4918 else
4919   pgac_cv_prog_cc_cflags__qnoansialias=no
4920 fi
4921 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4922 ac_c_werror_flag=$ac_save_c_werror_flag
4923 CFLAGS="$pgac_save_CFLAGS"
4924 fi
4925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__qnoansialias" >&5
4926 $as_echo "$pgac_cv_prog_cc_cflags__qnoansialias" >&6; }
4927 if test x"$pgac_cv_prog_cc_cflags__qnoansialias" = x"yes"; then
4928   CFLAGS="$CFLAGS -qnoansialias"
4929 fi
4930
4931   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -qlonglong" >&5
4932 $as_echo_n "checking whether $CC supports -qlonglong... " >&6; }
4933 if ${pgac_cv_prog_cc_cflags__qlonglong+:} false; then :
4934   $as_echo_n "(cached) " >&6
4935 else
4936   pgac_save_CFLAGS=$CFLAGS
4937 CFLAGS="$pgac_save_CFLAGS -qlonglong"
4938 ac_save_c_werror_flag=$ac_c_werror_flag
4939 ac_c_werror_flag=yes
4940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4941 /* end confdefs.h.  */
4942
4943 int
4944 main ()
4945 {
4946
4947   ;
4948   return 0;
4949 }
4950 _ACEOF
4951 if ac_fn_c_try_compile "$LINENO"; then :
4952   pgac_cv_prog_cc_cflags__qlonglong=yes
4953 else
4954   pgac_cv_prog_cc_cflags__qlonglong=no
4955 fi
4956 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4957 ac_c_werror_flag=$ac_save_c_werror_flag
4958 CFLAGS="$pgac_save_CFLAGS"
4959 fi
4960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__qlonglong" >&5
4961 $as_echo "$pgac_cv_prog_cc_cflags__qlonglong" >&6; }
4962 if test x"$pgac_cv_prog_cc_cflags__qlonglong" = x"yes"; then
4963   CFLAGS="$CFLAGS -qlonglong"
4964 fi
4965
4966 elif test "$PORTNAME" = "hpux"; then
4967   # On some versions of HP-UX, libm functions do not set errno by default.
4968   # Fix that by using +Olibmerrno if the compiler recognizes it.
4969   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports +Olibmerrno" >&5
4970 $as_echo_n "checking whether $CC supports +Olibmerrno... " >&6; }
4971 if ${pgac_cv_prog_cc_cflags_pOlibmerrno+:} false; then :
4972   $as_echo_n "(cached) " >&6
4973 else
4974   pgac_save_CFLAGS=$CFLAGS
4975 CFLAGS="$pgac_save_CFLAGS +Olibmerrno"
4976 ac_save_c_werror_flag=$ac_c_werror_flag
4977 ac_c_werror_flag=yes
4978 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4979 /* end confdefs.h.  */
4980
4981 int
4982 main ()
4983 {
4984
4985   ;
4986   return 0;
4987 }
4988 _ACEOF
4989 if ac_fn_c_try_compile "$LINENO"; then :
4990   pgac_cv_prog_cc_cflags_pOlibmerrno=yes
4991 else
4992   pgac_cv_prog_cc_cflags_pOlibmerrno=no
4993 fi
4994 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4995 ac_c_werror_flag=$ac_save_c_werror_flag
4996 CFLAGS="$pgac_save_CFLAGS"
4997 fi
4998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags_pOlibmerrno" >&5
4999 $as_echo "$pgac_cv_prog_cc_cflags_pOlibmerrno" >&6; }
5000 if test x"$pgac_cv_prog_cc_cflags_pOlibmerrno" = x"yes"; then
5001   CFLAGS="$CFLAGS +Olibmerrno"
5002 fi
5003
5004 fi
5005
5006 CFLAGS_VECTOR=$CFLAGS_VECTOR
5007
5008
5009 # supply -g if --enable-debug
5010 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
5011   CFLAGS="$CFLAGS -g"
5012 fi
5013
5014 # enable code coverage if --enable-coverage
5015 if test "$enable_coverage" = yes; then
5016   if test "$GCC" = yes; then
5017     CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
5018   else
5019     as_fn_error $? "--enable-coverage is supported only when using GCC" "$LINENO" 5
5020   fi
5021 fi
5022
5023 # enable profiling if --enable-profiling
5024 if test "$enable_profiling" = yes && test "$ac_cv_prog_cc_g" = yes; then
5025   if test "$GCC" = yes; then
5026
5027 $as_echo "#define PROFILE_PID_DIR 1" >>confdefs.h
5028
5029     CFLAGS="$CFLAGS -pg $PLATFORM_PROFILE_FLAGS"
5030   else
5031     as_fn_error $? "--enable-profiling is supported only when using GCC" "$LINENO" 5
5032   fi
5033 fi
5034
5035 # We already have this in Makefile.win32, but configure needs it too
5036 if test "$PORTNAME" = "win32"; then
5037   CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32 -DEXEC_BACKEND"
5038 fi
5039
5040 # Now that we're done automatically adding stuff to CFLAGS, put back the
5041 # user-specified flags (if any) at the end.  This lets users override
5042 # the automatic additions.
5043 CFLAGS="$CFLAGS $user_CFLAGS"
5044
5045 # Check if the compiler still works with the final flag settings
5046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler still works" >&5
5047 $as_echo_n "checking whether the C compiler still works... " >&6; }
5048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5049 /* end confdefs.h.  */
5050
5051 int
5052 main ()
5053 {
5054 return 0;
5055   ;
5056   return 0;
5057 }
5058 _ACEOF
5059 if ac_fn_c_try_link "$LINENO"; then :
5060   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5061 $as_echo "yes" >&6; }
5062 else
5063   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5064 $as_echo "no" >&6; }
5065    as_fn_error $? "cannot proceed" "$LINENO" 5
5066 fi
5067 rm -f core conftest.err conftest.$ac_objext \
5068     conftest$ac_exeext conftest.$ac_ext
5069
5070 # Defend against gcc -ffast-math
5071 if test "$GCC" = yes; then
5072 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5073 /* end confdefs.h.  */
5074
5075 int
5076 main ()
5077 {
5078 #ifdef __FAST_MATH__
5079 choke me
5080 #endif
5081   ;
5082   return 0;
5083 }
5084 _ACEOF
5085 if ac_fn_c_try_compile "$LINENO"; then :
5086
5087 else
5088   as_fn_error $? "do not put -ffast-math in CFLAGS" "$LINENO" 5
5089 fi
5090 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5091 fi
5092
5093 ac_ext=c
5094 ac_cpp='$CPP $CPPFLAGS'
5095 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5096 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5097 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5098 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5099 $as_echo_n "checking how to run the C preprocessor... " >&6; }
5100 # On Suns, sometimes $CPP names a directory.
5101 if test -n "$CPP" && test -d "$CPP"; then
5102   CPP=
5103 fi
5104 if test -z "$CPP"; then
5105   if ${ac_cv_prog_CPP+:} false; then :
5106   $as_echo_n "(cached) " >&6
5107 else
5108       # Double quotes because CPP needs to be expanded
5109     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
5110     do
5111       ac_preproc_ok=false
5112 for ac_c_preproc_warn_flag in '' yes
5113 do
5114   # Use a header file that comes with gcc, so configuring glibc
5115   # with a fresh cross-compiler works.
5116   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5117   # <limits.h> exists even on freestanding compilers.
5118   # On the NeXT, cc -E runs the code through the compiler's parser,
5119   # not just through cpp. "Syntax error" is here to catch this case.
5120   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5121 /* end confdefs.h.  */
5122 #ifdef __STDC__
5123 # include <limits.h>
5124 #else
5125 # include <assert.h>
5126 #endif
5127                      Syntax error
5128 _ACEOF
5129 if ac_fn_c_try_cpp "$LINENO"; then :
5130
5131 else
5132   # Broken: fails on valid input.
5133 continue
5134 fi
5135 rm -f conftest.err conftest.i conftest.$ac_ext
5136
5137   # OK, works on sane cases.  Now check whether nonexistent headers
5138   # can be detected and how.
5139   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5140 /* end confdefs.h.  */
5141 #include <ac_nonexistent.h>
5142 _ACEOF
5143 if ac_fn_c_try_cpp "$LINENO"; then :
5144   # Broken: success on invalid input.
5145 continue
5146 else
5147   # Passes both tests.
5148 ac_preproc_ok=:
5149 break
5150 fi
5151 rm -f conftest.err conftest.i conftest.$ac_ext
5152
5153 done
5154 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5155 rm -f conftest.i conftest.err conftest.$ac_ext
5156 if $ac_preproc_ok; then :
5157   break
5158 fi
5159
5160     done
5161     ac_cv_prog_CPP=$CPP
5162
5163 fi
5164   CPP=$ac_cv_prog_CPP
5165 else
5166   ac_cv_prog_CPP=$CPP
5167 fi
5168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5169 $as_echo "$CPP" >&6; }
5170 ac_preproc_ok=false
5171 for ac_c_preproc_warn_flag in '' yes
5172 do
5173   # Use a header file that comes with gcc, so configuring glibc
5174   # with a fresh cross-compiler works.
5175   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5176   # <limits.h> exists even on freestanding compilers.
5177   # On the NeXT, cc -E runs the code through the compiler's parser,
5178   # not just through cpp. "Syntax error" is here to catch this case.
5179   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5180 /* end confdefs.h.  */
5181 #ifdef __STDC__
5182 # include <limits.h>
5183 #else
5184 # include <assert.h>
5185 #endif
5186                      Syntax error
5187 _ACEOF
5188 if ac_fn_c_try_cpp "$LINENO"; then :
5189
5190 else
5191   # Broken: fails on valid input.
5192 continue
5193 fi
5194 rm -f conftest.err conftest.i conftest.$ac_ext
5195
5196   # OK, works on sane cases.  Now check whether nonexistent headers
5197   # can be detected and how.
5198   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5199 /* end confdefs.h.  */
5200 #include <ac_nonexistent.h>
5201 _ACEOF
5202 if ac_fn_c_try_cpp "$LINENO"; then :
5203   # Broken: success on invalid input.
5204 continue
5205 else
5206   # Passes both tests.
5207 ac_preproc_ok=:
5208 break
5209 fi
5210 rm -f conftest.err conftest.i conftest.$ac_ext
5211
5212 done
5213 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5214 rm -f conftest.i conftest.err conftest.$ac_ext
5215 if $ac_preproc_ok; then :
5216
5217 else
5218   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5219 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5220 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
5221 See \`config.log' for more details" "$LINENO" 5; }
5222 fi
5223
5224 ac_ext=c
5225 ac_cpp='$CPP $CPPFLAGS'
5226 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5227 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5228 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5229
5230
5231
5232
5233 #
5234 # Set up TAS assembly code if needed; the template file has now had its
5235 # chance to request this.
5236 #
5237 ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
5238
5239
5240 if test "$need_tas" = yes ; then
5241   TAS=tas.o
5242 else
5243   TAS=""
5244 fi
5245
5246
5247
5248 #
5249 # Automatic dependency tracking
5250 #
5251
5252
5253 # Check whether --enable-depend was given.
5254 if test "${enable_depend+set}" = set; then :
5255   enableval=$enable_depend;
5256   case $enableval in
5257     yes)
5258       autodepend=yes
5259       ;;
5260     no)
5261       :
5262       ;;
5263     *)
5264       as_fn_error $? "no argument expected for --enable-depend option" "$LINENO" 5
5265       ;;
5266   esac
5267
5268 else
5269   enable_depend=no
5270
5271 fi
5272
5273
5274
5275
5276
5277 #
5278 # Enable assert checks
5279 #
5280
5281
5282 # Check whether --enable-cassert was given.
5283 if test "${enable_cassert+set}" = set; then :
5284   enableval=$enable_cassert;
5285   case $enableval in
5286     yes)
5287
5288 $as_echo "#define USE_ASSERT_CHECKING 1" >>confdefs.h
5289
5290       ;;
5291     no)
5292       :
5293       ;;
5294     *)
5295       as_fn_error $? "no argument expected for --enable-cassert option" "$LINENO" 5
5296       ;;
5297   esac
5298
5299 else
5300   enable_cassert=no
5301
5302 fi
5303
5304
5305
5306
5307 #
5308 # Include directories
5309 #
5310 ac_save_IFS=$IFS
5311 IFS="${IFS}${PATH_SEPARATOR}"
5312 # SRCH_INC comes from the template file
5313 for dir in $with_includes $SRCH_INC; do
5314   if test -d "$dir"; then
5315     INCLUDES="$INCLUDES -I$dir"
5316   else
5317     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Include directory $dir does not exist." >&5
5318 $as_echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
5319   fi
5320 done
5321 IFS=$ac_save_IFS
5322
5323
5324
5325 #
5326 # Library directories
5327 #
5328 ac_save_IFS=$IFS
5329 IFS="${IFS}${PATH_SEPARATOR}"
5330 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
5331 for dir in $LIBRARY_DIRS $SRCH_LIB; do
5332   if test -d "$dir"; then
5333     LIBDIRS="$LIBDIRS -L$dir"
5334   else
5335     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Library directory $dir does not exist." >&5
5336 $as_echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
5337   fi
5338 done
5339 IFS=$ac_save_IFS
5340
5341 #
5342 # Enable thread-safe client libraries
5343 #
5344 { $as_echo "$as_me:${as_lineno-$LINENO}: checking allow thread-safe client libraries" >&5
5345 $as_echo_n "checking allow thread-safe client libraries... " >&6; }
5346
5347
5348 # Check whether --enable-thread-safety was given.
5349 if test "${enable_thread_safety+set}" = set; then :
5350   enableval=$enable_thread_safety;
5351   case $enableval in
5352     yes)
5353       :
5354       ;;
5355     no)
5356       :
5357       ;;
5358     *)
5359       as_fn_error $? "no argument expected for --enable-thread-safety option" "$LINENO" 5
5360       ;;
5361   esac
5362
5363 else
5364   enable_thread_safety=yes
5365
5366 fi
5367
5368
5369 if test "$enable_thread_safety" = yes; then
5370
5371 $as_echo "#define ENABLE_THREAD_SAFETY 1" >>confdefs.h
5372
5373 fi
5374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_thread_safety" >&5
5375 $as_echo "$enable_thread_safety" >&6; }
5376
5377
5378 #
5379 # ICU
5380 #
5381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with ICU support" >&5
5382 $as_echo_n "checking whether to build with ICU support... " >&6; }
5383
5384
5385
5386 # Check whether --with-icu was given.
5387 if test "${with_icu+set}" = set; then :
5388   withval=$with_icu;
5389   case $withval in
5390     yes)
5391
5392 $as_echo "#define USE_ICU 1" >>confdefs.h
5393
5394       ;;
5395     no)
5396       :
5397       ;;
5398     *)
5399       as_fn_error $? "no argument expected for --with-icu option" "$LINENO" 5
5400       ;;
5401   esac
5402
5403 else
5404   with_icu=no
5405
5406 fi
5407
5408
5409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icu" >&5
5410 $as_echo "$with_icu" >&6; }
5411
5412
5413 if test "$with_icu" = yes; then
5414
5415
5416
5417
5418
5419
5420
5421 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
5422         if test -n "$ac_tool_prefix"; then
5423   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
5424 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
5425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5426 $as_echo_n "checking for $ac_word... " >&6; }
5427 if ${ac_cv_path_PKG_CONFIG+:} false; then :
5428   $as_echo_n "(cached) " >&6
5429 else
5430   case $PKG_CONFIG in
5431   [\\/]* | ?:[\\/]*)
5432   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
5433   ;;
5434   *)
5435   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5436 for as_dir in $PATH
5437 do
5438   IFS=$as_save_IFS
5439   test -z "$as_dir" && as_dir=.
5440     for ac_exec_ext in '' $ac_executable_extensions; do
5441   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5442     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
5443     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5444     break 2
5445   fi
5446 done
5447   done
5448 IFS=$as_save_IFS
5449
5450   ;;
5451 esac
5452 fi
5453 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
5454 if test -n "$PKG_CONFIG"; then
5455   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
5456 $as_echo "$PKG_CONFIG" >&6; }
5457 else
5458   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5459 $as_echo "no" >&6; }
5460 fi
5461
5462
5463 fi
5464 if test -z "$ac_cv_path_PKG_CONFIG"; then
5465   ac_pt_PKG_CONFIG=$PKG_CONFIG
5466   # Extract the first word of "pkg-config", so it can be a program name with args.
5467 set dummy pkg-config; ac_word=$2
5468 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5469 $as_echo_n "checking for $ac_word... " >&6; }
5470 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
5471   $as_echo_n "(cached) " >&6
5472 else
5473   case $ac_pt_PKG_CONFIG in
5474   [\\/]* | ?:[\\/]*)
5475   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
5476   ;;
5477   *)
5478   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5479 for as_dir in $PATH
5480 do
5481   IFS=$as_save_IFS
5482   test -z "$as_dir" && as_dir=.
5483     for ac_exec_ext in '' $ac_executable_extensions; do
5484   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5485     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
5486     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5487     break 2
5488   fi
5489 done
5490   done
5491 IFS=$as_save_IFS
5492
5493   ;;
5494 esac
5495 fi
5496 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
5497 if test -n "$ac_pt_PKG_CONFIG"; then
5498   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
5499 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
5500 else
5501   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5502 $as_echo "no" >&6; }
5503 fi
5504
5505   if test "x$ac_pt_PKG_CONFIG" = x; then
5506     PKG_CONFIG=""
5507   else
5508     case $cross_compiling:$ac_tool_warned in
5509 yes:)
5510 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5511 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5512 ac_tool_warned=yes ;;
5513 esac
5514     PKG_CONFIG=$ac_pt_PKG_CONFIG
5515   fi
5516 else
5517   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
5518 fi
5519
5520 fi
5521 if test -n "$PKG_CONFIG"; then
5522         _pkg_min_version=0.9.0
5523         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
5524 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
5525         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
5526                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5527 $as_echo "yes" >&6; }
5528         else
5529                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5530 $as_echo "no" >&6; }
5531                 PKG_CONFIG=""
5532         fi
5533 fi
5534
5535 pkg_failed=no
5536 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icu-uc icu-i18n" >&5
5537 $as_echo_n "checking for icu-uc icu-i18n... " >&6; }
5538
5539 if test -n "$ICU_CFLAGS"; then
5540     pkg_cv_ICU_CFLAGS="$ICU_CFLAGS"
5541  elif test -n "$PKG_CONFIG"; then
5542     if test -n "$PKG_CONFIG" && \
5543     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
5544   ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
5545   ac_status=$?
5546   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5547   test $ac_status = 0; }; then
5548   pkg_cv_ICU_CFLAGS=`$PKG_CONFIG --cflags "icu-uc icu-i18n" 2>/dev/null`
5549                       test "x$?" != "x0" && pkg_failed=yes
5550 else
5551   pkg_failed=yes
5552 fi
5553  else
5554     pkg_failed=untried
5555 fi
5556 if test -n "$ICU_LIBS"; then
5557     pkg_cv_ICU_LIBS="$ICU_LIBS"
5558  elif test -n "$PKG_CONFIG"; then
5559     if test -n "$PKG_CONFIG" && \
5560     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
5561   ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
5562   ac_status=$?
5563   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5564   test $ac_status = 0; }; then
5565   pkg_cv_ICU_LIBS=`$PKG_CONFIG --libs "icu-uc icu-i18n" 2>/dev/null`
5566                       test "x$?" != "x0" && pkg_failed=yes
5567 else
5568   pkg_failed=yes
5569 fi
5570  else
5571     pkg_failed=untried
5572 fi
5573
5574
5575
5576 if test $pkg_failed = yes; then
5577         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5578 $as_echo "no" >&6; }
5579
5580 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
5581         _pkg_short_errors_supported=yes
5582 else
5583         _pkg_short_errors_supported=no
5584 fi
5585         if test $_pkg_short_errors_supported = yes; then
5586                 ICU_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
5587         else
5588                 ICU_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
5589         fi
5590         # Put the nasty error message in config.log where it belongs
5591         echo "$ICU_PKG_ERRORS" >&5
5592
5593         as_fn_error $? "Package requirements (icu-uc icu-i18n) were not met:
5594
5595 $ICU_PKG_ERRORS
5596
5597 Consider adjusting the PKG_CONFIG_PATH environment variable if you
5598 installed software in a non-standard prefix.
5599
5600 Alternatively, you may set the environment variables ICU_CFLAGS
5601 and ICU_LIBS to avoid the need to call pkg-config.
5602 See the pkg-config man page for more details." "$LINENO" 5
5603 elif test $pkg_failed = untried; then
5604         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5605 $as_echo "no" >&6; }
5606         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5607 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5608 as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
5609 is in your PATH or set the PKG_CONFIG environment variable to the full
5610 path to pkg-config.
5611
5612 Alternatively, you may set the environment variables ICU_CFLAGS
5613 and ICU_LIBS to avoid the need to call pkg-config.
5614 See the pkg-config man page for more details.
5615
5616 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
5617 See \`config.log' for more details" "$LINENO" 5; }
5618 else
5619         ICU_CFLAGS=$pkg_cv_ICU_CFLAGS
5620         ICU_LIBS=$pkg_cv_ICU_LIBS
5621         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5622 $as_echo "yes" >&6; }
5623
5624 fi
5625 fi
5626
5627 #
5628 # Optionally build Tcl modules (PL/Tcl)
5629 #
5630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Tcl" >&5
5631 $as_echo_n "checking whether to build with Tcl... " >&6; }
5632
5633
5634
5635 # Check whether --with-tcl was given.
5636 if test "${with_tcl+set}" = set; then :
5637   withval=$with_tcl;
5638   case $withval in
5639     yes)
5640       :
5641       ;;
5642     no)
5643       :
5644       ;;
5645     *)
5646       as_fn_error $? "no argument expected for --with-tcl option" "$LINENO" 5
5647       ;;
5648   esac
5649
5650 else
5651   with_tcl=no
5652
5653 fi
5654
5655
5656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcl" >&5
5657 $as_echo "$with_tcl" >&6; }
5658
5659
5660 # We see if the path to the Tcl/Tk configuration scripts is specified.
5661 # This will override the use of tclsh to find the paths to search.
5662
5663
5664
5665
5666 # Check whether --with-tclconfig was given.
5667 if test "${with_tclconfig+set}" = set; then :
5668   withval=$with_tclconfig;
5669   case $withval in
5670     yes)
5671       as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
5672       ;;
5673     no)
5674       as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
5675       ;;
5676     *)
5677
5678       ;;
5679   esac
5680
5681 fi
5682
5683
5684
5685 #
5686 # Optionally build Perl modules (PL/Perl)
5687 #
5688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Perl modules" >&5
5689 $as_echo_n "checking whether to build Perl modules... " >&6; }
5690
5691
5692
5693 # Check whether --with-perl was given.
5694 if test "${with_perl+set}" = set; then :
5695   withval=$with_perl;
5696   case $withval in
5697     yes)
5698       :
5699       ;;
5700     no)
5701       :
5702       ;;
5703     *)
5704       as_fn_error $? "no argument expected for --with-perl option" "$LINENO" 5
5705       ;;
5706   esac
5707
5708 else
5709   with_perl=no
5710
5711 fi
5712
5713
5714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_perl" >&5
5715 $as_echo "$with_perl" >&6; }
5716
5717
5718 #
5719 # Optionally build Python modules (PL/Python)
5720 #
5721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Python modules" >&5
5722 $as_echo_n "checking whether to build Python modules... " >&6; }
5723
5724
5725
5726 # Check whether --with-python was given.
5727 if test "${with_python+set}" = set; then :
5728   withval=$with_python;
5729   case $withval in
5730     yes)
5731       :
5732       ;;
5733     no)
5734       :
5735       ;;
5736     *)
5737       as_fn_error $? "no argument expected for --with-python option" "$LINENO" 5
5738       ;;
5739   esac
5740
5741 else
5742   with_python=no
5743
5744 fi
5745
5746
5747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
5748 $as_echo "$with_python" >&6; }
5749
5750
5751 #
5752 # GSSAPI
5753 #
5754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with GSSAPI support" >&5
5755 $as_echo_n "checking whether to build with GSSAPI support... " >&6; }
5756
5757
5758
5759 # Check whether --with-gssapi was given.
5760 if test "${with_gssapi+set}" = set; then :
5761   withval=$with_gssapi;
5762   case $withval in
5763     yes)
5764
5765
5766 $as_echo "#define ENABLE_GSS 1" >>confdefs.h
5767
5768   krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
5769
5770       ;;
5771     no)
5772       :
5773       ;;
5774     *)
5775       as_fn_error $? "no argument expected for --with-gssapi option" "$LINENO" 5
5776       ;;
5777   esac
5778
5779 else
5780   with_gssapi=no
5781
5782 fi
5783
5784
5785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_gssapi" >&5
5786 $as_echo "$with_gssapi" >&6; }
5787
5788
5789
5790
5791
5792 #
5793 # Kerberos configuration parameters
5794 #
5795
5796
5797
5798 # Check whether --with-krb-srvnam was given.
5799 if test "${with_krb_srvnam+set}" = set; then :
5800   withval=$with_krb_srvnam;
5801   case $withval in
5802     yes)
5803       as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
5804       ;;
5805     no)
5806       as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
5807       ;;
5808     *)
5809
5810       ;;
5811   esac
5812
5813 else
5814   with_krb_srvnam="postgres"
5815 fi
5816
5817
5818
5819 cat >>confdefs.h <<_ACEOF
5820 #define PG_KRB_SRVNAM "$with_krb_srvnam"
5821 _ACEOF
5822
5823
5824
5825 #
5826 # PAM
5827 #
5828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with PAM support" >&5
5829 $as_echo_n "checking whether to build with PAM support... " >&6; }
5830
5831
5832
5833 # Check whether --with-pam was given.
5834 if test "${with_pam+set}" = set; then :
5835   withval=$with_pam;
5836   case $withval in
5837     yes)
5838
5839 $as_echo "#define USE_PAM 1" >>confdefs.h
5840
5841       ;;
5842     no)
5843       :
5844       ;;
5845     *)
5846       as_fn_error $? "no argument expected for --with-pam option" "$LINENO" 5
5847       ;;
5848   esac
5849
5850 else
5851   with_pam=no
5852
5853 fi
5854
5855
5856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pam" >&5
5857 $as_echo "$with_pam" >&6; }
5858
5859
5860 #
5861 # BSD AUTH
5862 #
5863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with BSD Authentication support" >&5
5864 $as_echo_n "checking whether to build with BSD Authentication support... " >&6; }
5865
5866
5867
5868 # Check whether --with-bsd-auth was given.
5869 if test "${with_bsd_auth+set}" = set; then :
5870   withval=$with_bsd_auth;
5871   case $withval in
5872     yes)
5873
5874 $as_echo "#define USE_BSD_AUTH 1" >>confdefs.h
5875
5876       ;;
5877     no)
5878       :
5879       ;;
5880     *)
5881       as_fn_error $? "no argument expected for --with-bsd-auth option" "$LINENO" 5
5882       ;;
5883   esac
5884
5885 else
5886   with_bsd_auth=no
5887
5888 fi
5889
5890
5891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bsd_auth" >&5
5892 $as_echo "$with_bsd_auth" >&6; }
5893
5894
5895 #
5896 # LDAP
5897 #
5898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LDAP support" >&5
5899 $as_echo_n "checking whether to build with LDAP support... " >&6; }
5900
5901
5902
5903 # Check whether --with-ldap was given.
5904 if test "${with_ldap+set}" = set; then :
5905   withval=$with_ldap;
5906   case $withval in
5907     yes)
5908
5909 $as_echo "#define USE_LDAP 1" >>confdefs.h
5910
5911       ;;
5912     no)
5913       :
5914       ;;
5915     *)
5916       as_fn_error $? "no argument expected for --with-ldap option" "$LINENO" 5
5917       ;;
5918   esac
5919
5920 else
5921   with_ldap=no
5922
5923 fi
5924
5925
5926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_ldap" >&5
5927 $as_echo "$with_ldap" >&6; }
5928
5929
5930 #
5931 # Bonjour
5932 #
5933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Bonjour support" >&5
5934 $as_echo_n "checking whether to build with Bonjour support... " >&6; }
5935
5936
5937
5938 # Check whether --with-bonjour was given.
5939 if test "${with_bonjour+set}" = set; then :
5940   withval=$with_bonjour;
5941   case $withval in
5942     yes)
5943
5944 $as_echo "#define USE_BONJOUR 1" >>confdefs.h
5945
5946       ;;
5947     no)
5948       :
5949       ;;
5950     *)
5951       as_fn_error $? "no argument expected for --with-bonjour option" "$LINENO" 5
5952       ;;
5953   esac
5954
5955 else
5956   with_bonjour=no
5957
5958 fi
5959
5960
5961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bonjour" >&5
5962 $as_echo "$with_bonjour" >&6; }
5963
5964
5965 #
5966 # OpenSSL
5967 #
5968 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with OpenSSL support" >&5
5969 $as_echo_n "checking whether to build with OpenSSL support... " >&6; }
5970
5971
5972
5973 # Check whether --with-openssl was given.
5974 if test "${with_openssl+set}" = set; then :
5975   withval=$with_openssl;
5976   case $withval in
5977     yes)
5978
5979 $as_echo "#define USE_OPENSSL 1" >>confdefs.h
5980
5981       ;;
5982     no)
5983       :
5984       ;;
5985     *)
5986       as_fn_error $? "no argument expected for --with-openssl option" "$LINENO" 5
5987       ;;
5988   esac
5989
5990 else
5991   with_openssl=no
5992
5993 fi
5994
5995
5996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_openssl" >&5
5997 $as_echo "$with_openssl" >&6; }
5998
5999
6000 #
6001 # SELinux
6002 #
6003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with SELinux support" >&5
6004 $as_echo_n "checking whether to build with SELinux support... " >&6; }
6005
6006
6007
6008 # Check whether --with-selinux was given.
6009 if test "${with_selinux+set}" = set; then :
6010   withval=$with_selinux;
6011   case $withval in
6012     yes)
6013       :
6014       ;;
6015     no)
6016       :
6017       ;;
6018     *)
6019       as_fn_error $? "no argument expected for --with-selinux option" "$LINENO" 5
6020       ;;
6021   esac
6022
6023 else
6024   with_selinux=no
6025
6026 fi
6027
6028
6029
6030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_selinux" >&5
6031 $as_echo "$with_selinux" >&6; }
6032
6033 #
6034 # Systemd
6035 #
6036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with systemd support" >&5
6037 $as_echo_n "checking whether to build with systemd support... " >&6; }
6038
6039
6040
6041 # Check whether --with-systemd was given.
6042 if test "${with_systemd+set}" = set; then :
6043   withval=$with_systemd;
6044   case $withval in
6045     yes)
6046
6047 $as_echo "#define USE_SYSTEMD 1" >>confdefs.h
6048
6049       ;;
6050     no)
6051       :
6052       ;;
6053     *)
6054       as_fn_error $? "no argument expected for --with-systemd option" "$LINENO" 5
6055       ;;
6056   esac
6057
6058 else
6059   with_systemd=no
6060
6061 fi
6062
6063
6064
6065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_systemd" >&5
6066 $as_echo "$with_systemd" >&6; }
6067
6068 #
6069 # Readline
6070 #
6071
6072
6073
6074 # Check whether --with-readline was given.
6075 if test "${with_readline+set}" = set; then :
6076   withval=$with_readline;
6077   case $withval in
6078     yes)
6079       :
6080       ;;
6081     no)
6082       :
6083       ;;
6084     *)
6085       as_fn_error $? "no argument expected for --with-readline option" "$LINENO" 5
6086       ;;
6087   esac
6088
6089 else
6090   with_readline=yes
6091
6092 fi
6093
6094
6095 # readline on MinGW has problems with backslashes in psql and other bugs.
6096 # This is particularly a problem with non-US code pages.
6097 # Therefore disable its use until we understand the cause. 2004-07-20
6098 if test "$PORTNAME" = "win32"; then
6099   if test "$with_readline" = yes; then
6100     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Readline does not work on MinGW --- disabling" >&5
6101 $as_echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
6102     with_readline=no
6103   fi
6104 fi
6105
6106
6107 #
6108 # Prefer libedit
6109 #
6110
6111
6112
6113 # Check whether --with-libedit-preferred was given.
6114 if test "${with_libedit_preferred+set}" = set; then :
6115   withval=$with_libedit_preferred;
6116   case $withval in
6117     yes)
6118       :
6119       ;;
6120     no)
6121       :
6122       ;;
6123     *)
6124       as_fn_error $? "no argument expected for --with-libedit-preferred option" "$LINENO" 5
6125       ;;
6126   esac
6127
6128 else
6129   with_libedit_preferred=no
6130
6131 fi
6132
6133
6134
6135
6136 #
6137 # UUID library
6138 #
6139 # There are at least three UUID libraries in common use: the FreeBSD/NetBSD
6140 # library, the e2fsprogs libuuid (now part of util-linux-ng), and the OSSP
6141 # UUID library.  More than one of these might be present on a given platform,
6142 # so we make the user say which one she wants.
6143 #
6144
6145
6146
6147 # Check whether --with-uuid was given.
6148 if test "${with_uuid+set}" = set; then :
6149   withval=$with_uuid;
6150   case $withval in
6151     yes)
6152       as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
6153       ;;
6154     no)
6155       as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
6156       ;;
6157     *)
6158
6159       ;;
6160   esac
6161
6162 fi
6163
6164
6165 if test x"$with_uuid" = x"" ; then
6166   with_uuid=no
6167 fi
6168
6169
6170
6171 # Check whether --with-ossp-uuid was given.
6172 if test "${with_ossp_uuid+set}" = set; then :
6173   withval=$with_ossp_uuid;
6174   case $withval in
6175     yes)
6176       :
6177       ;;
6178     no)
6179       :
6180       ;;
6181     *)
6182       as_fn_error $? "no argument expected for --with-ossp-uuid option" "$LINENO" 5
6183       ;;
6184   esac
6185
6186 else
6187   with_ossp_uuid=no
6188
6189 fi
6190
6191
6192 if test "$with_ossp_uuid" = yes ; then
6193   with_uuid=ossp
6194 fi
6195
6196 if test "$with_uuid" = bsd ; then
6197
6198 $as_echo "#define HAVE_UUID_BSD 1" >>confdefs.h
6199
6200   UUID_EXTRA_OBJS="md5.o sha1.o"
6201 elif test "$with_uuid" = e2fs ; then
6202
6203 $as_echo "#define HAVE_UUID_E2FS 1" >>confdefs.h
6204
6205   UUID_EXTRA_OBJS="md5.o sha1.o"
6206 elif test "$with_uuid" = ossp ; then
6207
6208 $as_echo "#define HAVE_UUID_OSSP 1" >>confdefs.h
6209
6210   UUID_EXTRA_OBJS=""
6211 elif test "$with_uuid" = no ; then
6212   UUID_EXTRA_OBJS=""
6213 else
6214   as_fn_error $? "--with-uuid must specify one of bsd, e2fs, or ossp" "$LINENO" 5
6215 fi
6216
6217
6218
6219
6220 #
6221 # XML
6222 #
6223
6224
6225
6226 # Check whether --with-libxml was given.
6227 if test "${with_libxml+set}" = set; then :
6228   withval=$with_libxml;
6229   case $withval in
6230     yes)
6231
6232 $as_echo "#define USE_LIBXML 1" >>confdefs.h
6233
6234       ;;
6235     no)
6236       :
6237       ;;
6238     *)
6239       as_fn_error $? "no argument expected for --with-libxml option" "$LINENO" 5
6240       ;;
6241   esac
6242
6243 else
6244   with_libxml=no
6245
6246 fi
6247
6248
6249
6250 if test "$with_libxml" = yes ; then
6251   if test -z "$XML2_CONFIG"; then
6252   for ac_prog in xml2-config
6253 do
6254   # Extract the first word of "$ac_prog", so it can be a program name with args.
6255 set dummy $ac_prog; ac_word=$2
6256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6257 $as_echo_n "checking for $ac_word... " >&6; }
6258 if ${ac_cv_path_XML2_CONFIG+:} false; then :
6259   $as_echo_n "(cached) " >&6
6260 else
6261   case $XML2_CONFIG in
6262   [\\/]* | ?:[\\/]*)
6263   ac_cv_path_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test with a path.
6264   ;;
6265   *)
6266   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6267 for as_dir in $PATH
6268 do
6269   IFS=$as_save_IFS
6270   test -z "$as_dir" && as_dir=.
6271     for ac_exec_ext in '' $ac_executable_extensions; do
6272   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6273     ac_cv_path_XML2_CONFIG="$as_dir/$ac_word$ac_exec_ext"
6274     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6275     break 2
6276   fi
6277 done
6278   done
6279 IFS=$as_save_IFS
6280
6281   ;;
6282 esac
6283 fi
6284 XML2_CONFIG=$ac_cv_path_XML2_CONFIG
6285 if test -n "$XML2_CONFIG"; then
6286   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
6287 $as_echo "$XML2_CONFIG" >&6; }
6288 else
6289   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6290 $as_echo "no" >&6; }
6291 fi
6292
6293
6294   test -n "$XML2_CONFIG" && break
6295 done
6296
6297 else
6298   # Report the value of XML2_CONFIG in configure's output in all cases.
6299   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML2_CONFIG" >&5
6300 $as_echo_n "checking for XML2_CONFIG... " >&6; }
6301   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
6302 $as_echo "$XML2_CONFIG" >&6; }
6303 fi
6304
6305   if test -n "$XML2_CONFIG"; then
6306     for pgac_option in `$XML2_CONFIG --cflags`; do
6307       case $pgac_option in
6308         -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
6309       esac
6310     done
6311     for pgac_option in `$XML2_CONFIG --libs`; do
6312       case $pgac_option in
6313         -L*) LDFLAGS="$LDFLAGS $pgac_option";;
6314       esac
6315     done
6316   fi
6317 fi
6318
6319
6320
6321 #
6322 # XSLT
6323 #
6324
6325
6326
6327 # Check whether --with-libxslt was given.
6328 if test "${with_libxslt+set}" = set; then :
6329   withval=$with_libxslt;
6330   case $withval in
6331     yes)
6332
6333 $as_echo "#define USE_LIBXSLT 1" >>confdefs.h
6334
6335       ;;
6336     no)
6337       :
6338       ;;
6339     *)
6340       as_fn_error $? "no argument expected for --with-libxslt option" "$LINENO" 5
6341       ;;
6342   esac
6343
6344 else
6345   with_libxslt=no
6346
6347 fi
6348
6349
6350
6351
6352
6353
6354 #
6355 # tzdata
6356 #
6357
6358
6359
6360 # Check whether --with-system-tzdata was given.
6361 if test "${with_system_tzdata+set}" = set; then :
6362   withval=$with_system_tzdata;
6363   case $withval in
6364     yes)
6365       as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
6366       ;;
6367     no)
6368       as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
6369       ;;
6370     *)
6371
6372       ;;
6373   esac
6374
6375 fi
6376
6377
6378
6379
6380 #
6381 # Zlib
6382 #
6383
6384
6385
6386 # Check whether --with-zlib was given.
6387 if test "${with_zlib+set}" = set; then :
6388   withval=$with_zlib;
6389   case $withval in
6390     yes)
6391       :
6392       ;;
6393     no)
6394       :
6395       ;;
6396     *)
6397       as_fn_error $? "no argument expected for --with-zlib option" "$LINENO" 5
6398       ;;
6399   esac
6400
6401 else
6402   with_zlib=yes
6403
6404 fi
6405
6406
6407
6408
6409 #
6410 # Elf
6411 #
6412
6413 # Assume system is ELF if it predefines __ELF__ as 1,
6414 # otherwise believe host_os based default.
6415 case $host_os in
6416     freebsd1*|freebsd2*) elf=no;;
6417     freebsd3*|freebsd4*) elf=yes;;
6418 esac
6419
6420
6421 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6422 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6423 if ${ac_cv_path_GREP+:} false; then :
6424   $as_echo_n "(cached) " >&6
6425 else
6426   if test -z "$GREP"; then
6427   ac_path_GREP_found=false
6428   # Loop through the user's path and test for each of PROGNAME-LIST
6429   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6430 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6431 do
6432   IFS=$as_save_IFS
6433   test -z "$as_dir" && as_dir=.
6434     for ac_prog in grep ggrep; do
6435     for ac_exec_ext in '' $ac_executable_extensions; do
6436       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6437       as_fn_executable_p "$ac_path_GREP" || continue
6438 # Check for GNU ac_path_GREP and select it if it is found.
6439   # Check for GNU $ac_path_GREP
6440 case `"$ac_path_GREP" --version 2>&1` in
6441 *GNU*)
6442   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6443 *)
6444   ac_count=0
6445   $as_echo_n 0123456789 >"conftest.in"
6446   while :
6447   do
6448     cat "conftest.in" "conftest.in" >"conftest.tmp"
6449     mv "conftest.tmp" "conftest.in"
6450     cp "conftest.in" "conftest.nl"
6451     $as_echo 'GREP' >> "conftest.nl"
6452     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6453     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6454     as_fn_arith $ac_count + 1 && ac_count=$as_val
6455     if test $ac_count -gt ${ac_path_GREP_max-0}; then
6456       # Best one so far, save it but keep looking for a better one
6457       ac_cv_path_GREP="$ac_path_GREP"
6458       ac_path_GREP_max=$ac_count
6459     fi
6460     # 10*(2^10) chars as input seems more than enough
6461     test $ac_count -gt 10 && break
6462   done
6463   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6464 esac
6465
6466       $ac_path_GREP_found && break 3
6467     done
6468   done
6469   done
6470 IFS=$as_save_IFS
6471   if test -z "$ac_cv_path_GREP"; then
6472     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6473   fi
6474 else
6475   ac_cv_path_GREP=$GREP
6476 fi
6477
6478 fi
6479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6480 $as_echo "$ac_cv_path_GREP" >&6; }
6481  GREP="$ac_cv_path_GREP"
6482
6483
6484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6485 $as_echo_n "checking for egrep... " >&6; }
6486 if ${ac_cv_path_EGREP+:} false; then :
6487   $as_echo_n "(cached) " >&6
6488 else
6489   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6490    then ac_cv_path_EGREP="$GREP -E"
6491    else
6492      if test -z "$EGREP"; then
6493   ac_path_EGREP_found=false
6494   # Loop through the user's path and test for each of PROGNAME-LIST
6495   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6496 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6497 do
6498   IFS=$as_save_IFS
6499   test -z "$as_dir" && as_dir=.
6500     for ac_prog in egrep; do
6501     for ac_exec_ext in '' $ac_executable_extensions; do
6502       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6503       as_fn_executable_p "$ac_path_EGREP" || continue
6504 # Check for GNU ac_path_EGREP and select it if it is found.
6505   # Check for GNU $ac_path_EGREP
6506 case `"$ac_path_EGREP" --version 2>&1` in
6507 *GNU*)
6508   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6509 *)
6510   ac_count=0
6511   $as_echo_n 0123456789 >"conftest.in"
6512   while :
6513   do
6514     cat "conftest.in" "conftest.in" >"conftest.tmp"
6515     mv "conftest.tmp" "conftest.in"
6516     cp "conftest.in" "conftest.nl"
6517     $as_echo 'EGREP' >> "conftest.nl"
6518     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6519     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6520     as_fn_arith $ac_count + 1 && ac_count=$as_val
6521     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6522       # Best one so far, save it but keep looking for a better one
6523       ac_cv_path_EGREP="$ac_path_EGREP"
6524       ac_path_EGREP_max=$ac_count
6525     fi
6526     # 10*(2^10) chars as input seems more than enough
6527     test $ac_count -gt 10 && break
6528   done
6529   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6530 esac
6531
6532       $ac_path_EGREP_found && break 3
6533     done
6534   done
6535   done
6536 IFS=$as_save_IFS
6537   if test -z "$ac_cv_path_EGREP"; then
6538     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6539   fi
6540 else
6541   ac_cv_path_EGREP=$EGREP
6542 fi
6543
6544    fi
6545 fi
6546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6547 $as_echo "$ac_cv_path_EGREP" >&6; }
6548  EGREP="$ac_cv_path_EGREP"
6549
6550
6551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6552 /* end confdefs.h.  */
6553 #if __ELF__
6554   yes
6555 #endif
6556
6557 _ACEOF
6558 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6559   $EGREP "yes" >/dev/null 2>&1; then :
6560   ELF_SYS=true
6561 else
6562   if test "X$elf" = "Xyes" ; then
6563   ELF_SYS=true
6564 else
6565   ELF_SYS=
6566 fi
6567 fi
6568 rm -f conftest*
6569
6570
6571
6572 #
6573 # Assignments
6574 #
6575
6576 CPPFLAGS="$CPPFLAGS $INCLUDES"
6577 LDFLAGS="$LDFLAGS $LIBDIRS"
6578
6579
6580
6581
6582
6583 # Check whether --with-gnu-ld was given.
6584 if test "${with_gnu_ld+set}" = set; then :
6585   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
6586 else
6587   with_gnu_ld=no
6588 fi
6589
6590 ac_prog=ld
6591 if test "$GCC" = yes; then
6592   # Check if gcc -print-prog-name=ld gives a path.
6593   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
6594 $as_echo_n "checking for ld used by GCC... " >&6; }
6595   case $host in
6596   *-*-mingw*)
6597     # gcc leaves a trailing carriage return which upsets mingw
6598     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
6599   *)
6600     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
6601   esac
6602   case "$ac_prog" in
6603     # Accept absolute paths.
6604     [\\/]* | [A-Za-z]:[\\/]*)
6605       re_direlt='/[^/][^/]*/\.\./'
6606       # Canonicalize the path of ld
6607       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
6608       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
6609         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
6610       done
6611       test -z "$LD" && LD="$ac_prog"
6612       ;;
6613   "")
6614     # If it fails, then pretend we aren't using GCC.
6615     ac_prog=ld
6616     ;;
6617   *)
6618     # If it is relative, then search for the first ld in PATH.
6619     with_gnu_ld=unknown
6620     ;;
6621   esac
6622 elif test "$with_gnu_ld" = yes; then
6623   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
6624 $as_echo_n "checking for GNU ld... " >&6; }
6625 else
6626   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
6627 $as_echo_n "checking for non-GNU ld... " >&6; }
6628 fi
6629 if ${ac_cv_path_LD+:} false; then :
6630   $as_echo_n "(cached) " >&6
6631 else
6632   if test -z "$LD"; then
6633   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
6634   for ac_dir in $PATH; do
6635     test -z "$ac_dir" && ac_dir=.
6636     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
6637       ac_cv_path_LD="$ac_dir/$ac_prog"
6638       # Check to see if the program is GNU ld.  I'd rather use --version,
6639       # but apparently some GNU ld's only accept -v.
6640       # Break only if it was the GNU/non-GNU ld that we prefer.
6641       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
6642         test "$with_gnu_ld" != no && break
6643       else
6644         test "$with_gnu_ld" != yes && break
6645       fi
6646     fi
6647   done
6648   IFS="$ac_save_ifs"
6649 else
6650   ac_cv_path_LD="$LD" # Let the user override the test with a path.
6651 fi
6652 fi
6653
6654 LD="$ac_cv_path_LD"
6655 if test -n "$LD"; then
6656   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
6657 $as_echo "$LD" >&6; }
6658 else
6659   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6660 $as_echo "no" >&6; }
6661 fi
6662 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
6663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
6664 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
6665 if ${ac_cv_prog_gnu_ld+:} false; then :
6666   $as_echo_n "(cached) " >&6
6667 else
6668   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
6669 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
6670   ac_cv_prog_gnu_ld=yes
6671 else
6672   ac_cv_prog_gnu_ld=no
6673 fi
6674 fi
6675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gnu_ld" >&5
6676 $as_echo "$ac_cv_prog_gnu_ld" >&6; }
6677 with_gnu_ld=$ac_cv_prog_gnu_ld
6678
6679
6680
6681
6682 if test -n "$ac_tool_prefix"; then
6683   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6684 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6686 $as_echo_n "checking for $ac_word... " >&6; }
6687 if ${ac_cv_prog_RANLIB+:} false; then :
6688   $as_echo_n "(cached) " >&6
6689 else
6690   if test -n "$RANLIB"; then
6691   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6692 else
6693 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6694 for as_dir in $PATH
6695 do
6696   IFS=$as_save_IFS
6697   test -z "$as_dir" && as_dir=.
6698     for ac_exec_ext in '' $ac_executable_extensions; do
6699   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6700     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6701     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6702     break 2
6703   fi
6704 done
6705   done
6706 IFS=$as_save_IFS
6707
6708 fi
6709 fi
6710 RANLIB=$ac_cv_prog_RANLIB
6711 if test -n "$RANLIB"; then
6712   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6713 $as_echo "$RANLIB" >&6; }
6714 else
6715   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6716 $as_echo "no" >&6; }
6717 fi
6718
6719
6720 fi
6721 if test -z "$ac_cv_prog_RANLIB"; then
6722   ac_ct_RANLIB=$RANLIB
6723   # Extract the first word of "ranlib", so it can be a program name with args.
6724 set dummy ranlib; ac_word=$2
6725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6726 $as_echo_n "checking for $ac_word... " >&6; }
6727 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
6728   $as_echo_n "(cached) " >&6
6729 else
6730   if test -n "$ac_ct_RANLIB"; then
6731   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6732 else
6733 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6734 for as_dir in $PATH
6735 do
6736   IFS=$as_save_IFS
6737   test -z "$as_dir" && as_dir=.
6738     for ac_exec_ext in '' $ac_executable_extensions; do
6739   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6740     ac_cv_prog_ac_ct_RANLIB="ranlib"
6741     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6742     break 2
6743   fi
6744 done
6745   done
6746 IFS=$as_save_IFS
6747
6748 fi
6749 fi
6750 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6751 if test -n "$ac_ct_RANLIB"; then
6752   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6753 $as_echo "$ac_ct_RANLIB" >&6; }
6754 else
6755   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6756 $as_echo "no" >&6; }
6757 fi
6758
6759   if test "x$ac_ct_RANLIB" = x; then
6760     RANLIB=":"
6761   else
6762     case $cross_compiling:$ac_tool_warned in
6763 yes:)
6764 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6765 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6766 ac_tool_warned=yes ;;
6767 esac
6768     RANLIB=$ac_ct_RANLIB
6769   fi
6770 else
6771   RANLIB="$ac_cv_prog_RANLIB"
6772 fi
6773
6774
6775   if test -n "$ac_tool_prefix"; then
6776   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
6777 set dummy ${ac_tool_prefix}strip; ac_word=$2
6778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6779 $as_echo_n "checking for $ac_word... " >&6; }
6780 if ${ac_cv_prog_STRIP+:} false; then :
6781   $as_echo_n "(cached) " >&6
6782 else
6783   if test -n "$STRIP"; then
6784   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
6785 else
6786 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6787 for as_dir in $PATH
6788 do
6789   IFS=$as_save_IFS
6790   test -z "$as_dir" && as_dir=.
6791     for ac_exec_ext in '' $ac_executable_extensions; do
6792   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6793     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
6794     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6795     break 2
6796   fi
6797 done
6798   done
6799 IFS=$as_save_IFS
6800
6801 fi
6802 fi
6803 STRIP=$ac_cv_prog_STRIP
6804 if test -n "$STRIP"; then
6805   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
6806 $as_echo "$STRIP" >&6; }
6807 else
6808   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6809 $as_echo "no" >&6; }
6810 fi
6811
6812
6813 fi
6814 if test -z "$ac_cv_prog_STRIP"; then
6815   ac_ct_STRIP=$STRIP
6816   # Extract the first word of "strip", so it can be a program name with args.
6817 set dummy strip; ac_word=$2
6818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6819 $as_echo_n "checking for $ac_word... " >&6; }
6820 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
6821   $as_echo_n "(cached) " >&6
6822 else
6823   if test -n "$ac_ct_STRIP"; then
6824   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
6825 else
6826 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6827 for as_dir in $PATH
6828 do
6829   IFS=$as_save_IFS
6830   test -z "$as_dir" && as_dir=.
6831     for ac_exec_ext in '' $ac_executable_extensions; do
6832   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6833     ac_cv_prog_ac_ct_STRIP="strip"
6834     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6835     break 2
6836   fi
6837 done
6838   done
6839 IFS=$as_save_IFS
6840
6841 fi
6842 fi
6843 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
6844 if test -n "$ac_ct_STRIP"; then
6845   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
6846 $as_echo "$ac_ct_STRIP" >&6; }
6847 else
6848   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6849 $as_echo "no" >&6; }
6850 fi
6851
6852   if test "x$ac_ct_STRIP" = x; then
6853     STRIP=":"
6854   else
6855     case $cross_compiling:$ac_tool_warned in
6856 yes:)
6857 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6858 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6859 ac_tool_warned=yes ;;
6860 esac
6861     STRIP=$ac_ct_STRIP
6862   fi
6863 else
6864   STRIP="$ac_cv_prog_STRIP"
6865 fi
6866
6867
6868   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is possible to strip libraries" >&5
6869 $as_echo_n "checking whether it is possible to strip libraries... " >&6; }
6870   if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
6871     STRIP_STATIC_LIB="$STRIP -x"
6872     STRIP_SHARED_LIB="$STRIP --strip-unneeded"
6873     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6874 $as_echo "yes" >&6; }
6875   else
6876     case $host_os in
6877       darwin*)
6878         STRIP="$STRIP -x"
6879         STRIP_STATIC_LIB=$STRIP
6880         STRIP_SHARED_LIB=$STRIP
6881         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6882 $as_echo "yes" >&6; }
6883         ;;
6884       *)
6885         STRIP_STATIC_LIB=:
6886         STRIP_SHARED_LIB=:
6887         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6888 $as_echo "no" >&6; }
6889         ;;
6890     esac
6891   fi
6892
6893
6894
6895 if test -n "$ac_tool_prefix"; then
6896   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6897 set dummy ${ac_tool_prefix}ar; ac_word=$2
6898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6899 $as_echo_n "checking for $ac_word... " >&6; }
6900 if ${ac_cv_prog_AR+:} false; then :
6901   $as_echo_n "(cached) " >&6
6902 else
6903   if test -n "$AR"; then
6904   ac_cv_prog_AR="$AR" # Let the user override the test.
6905 else
6906 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6907 for as_dir in $PATH
6908 do
6909   IFS=$as_save_IFS
6910   test -z "$as_dir" && as_dir=.
6911     for ac_exec_ext in '' $ac_executable_extensions; do
6912   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6913     ac_cv_prog_AR="${ac_tool_prefix}ar"
6914     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6915     break 2
6916   fi
6917 done
6918   done
6919 IFS=$as_save_IFS
6920
6921 fi
6922 fi
6923 AR=$ac_cv_prog_AR
6924 if test -n "$AR"; then
6925   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6926 $as_echo "$AR" >&6; }
6927 else
6928   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6929 $as_echo "no" >&6; }
6930 fi
6931
6932
6933 fi
6934 if test -z "$ac_cv_prog_AR"; then
6935   ac_ct_AR=$AR
6936   # Extract the first word of "ar", so it can be a program name with args.
6937 set dummy ar; ac_word=$2
6938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6939 $as_echo_n "checking for $ac_word... " >&6; }
6940 if ${ac_cv_prog_ac_ct_AR+:} false; then :
6941   $as_echo_n "(cached) " >&6
6942 else
6943   if test -n "$ac_ct_AR"; then
6944   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6945 else
6946 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6947 for as_dir in $PATH
6948 do
6949   IFS=$as_save_IFS
6950   test -z "$as_dir" && as_dir=.
6951     for ac_exec_ext in '' $ac_executable_extensions; do
6952   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6953     ac_cv_prog_ac_ct_AR="ar"
6954     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6955     break 2
6956   fi
6957 done
6958   done
6959 IFS=$as_save_IFS
6960
6961 fi
6962 fi
6963 ac_ct_AR=$ac_cv_prog_ac_ct_AR
6964 if test -n "$ac_ct_AR"; then
6965   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6966 $as_echo "$ac_ct_AR" >&6; }
6967 else
6968   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6969 $as_echo "no" >&6; }
6970 fi
6971
6972   if test "x$ac_ct_AR" = x; then
6973     AR="ar"
6974   else
6975     case $cross_compiling:$ac_tool_warned in
6976 yes:)
6977 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6978 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6979 ac_tool_warned=yes ;;
6980 esac
6981     AR=$ac_ct_AR
6982   fi
6983 else
6984   AR="$ac_cv_prog_AR"
6985 fi
6986
6987 if test "$PORTNAME" = "win32"; then
6988   if test -n "$ac_tool_prefix"; then
6989   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
6990 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
6991 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6992 $as_echo_n "checking for $ac_word... " >&6; }
6993 if ${ac_cv_prog_DLLTOOL+:} false; then :
6994   $as_echo_n "(cached) " >&6
6995 else
6996   if test -n "$DLLTOOL"; then
6997   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
6998 else
6999 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7000 for as_dir in $PATH
7001 do
7002   IFS=$as_save_IFS
7003   test -z "$as_dir" && as_dir=.
7004     for ac_exec_ext in '' $ac_executable_extensions; do
7005   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7006     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
7007     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7008     break 2
7009   fi
7010 done
7011   done
7012 IFS=$as_save_IFS
7013
7014 fi
7015 fi
7016 DLLTOOL=$ac_cv_prog_DLLTOOL
7017 if test -n "$DLLTOOL"; then
7018   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
7019 $as_echo "$DLLTOOL" >&6; }
7020 else
7021   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7022 $as_echo "no" >&6; }
7023 fi
7024
7025
7026 fi
7027 if test -z "$ac_cv_prog_DLLTOOL"; then
7028   ac_ct_DLLTOOL=$DLLTOOL
7029   # Extract the first word of "dlltool", so it can be a program name with args.
7030 set dummy dlltool; ac_word=$2
7031 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7032 $as_echo_n "checking for $ac_word... " >&6; }
7033 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
7034   $as_echo_n "(cached) " >&6
7035 else
7036   if test -n "$ac_ct_DLLTOOL"; then
7037   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
7038 else
7039 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7040 for as_dir in $PATH
7041 do
7042   IFS=$as_save_IFS
7043   test -z "$as_dir" && as_dir=.
7044     for ac_exec_ext in '' $ac_executable_extensions; do
7045   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7046     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
7047     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7048     break 2
7049   fi
7050 done
7051   done
7052 IFS=$as_save_IFS
7053
7054 fi
7055 fi
7056 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
7057 if test -n "$ac_ct_DLLTOOL"; then
7058   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
7059 $as_echo "$ac_ct_DLLTOOL" >&6; }
7060 else
7061   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7062 $as_echo "no" >&6; }
7063 fi
7064
7065   if test "x$ac_ct_DLLTOOL" = x; then
7066     DLLTOOL="dlltool"
7067   else
7068     case $cross_compiling:$ac_tool_warned in
7069 yes:)
7070 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7071 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7072 ac_tool_warned=yes ;;
7073 esac
7074     DLLTOOL=$ac_ct_DLLTOOL
7075   fi
7076 else
7077   DLLTOOL="$ac_cv_prog_DLLTOOL"
7078 fi
7079
7080   if test -n "$ac_tool_prefix"; then
7081   # Extract the first word of "${ac_tool_prefix}dllwrap", so it can be a program name with args.
7082 set dummy ${ac_tool_prefix}dllwrap; ac_word=$2
7083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7084 $as_echo_n "checking for $ac_word... " >&6; }
7085 if ${ac_cv_prog_DLLWRAP+:} false; then :
7086   $as_echo_n "(cached) " >&6
7087 else
7088   if test -n "$DLLWRAP"; then
7089   ac_cv_prog_DLLWRAP="$DLLWRAP" # Let the user override the test.
7090 else
7091 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7092 for as_dir in $PATH
7093 do
7094   IFS=$as_save_IFS
7095   test -z "$as_dir" && as_dir=.
7096     for ac_exec_ext in '' $ac_executable_extensions; do
7097   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7098     ac_cv_prog_DLLWRAP="${ac_tool_prefix}dllwrap"
7099     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7100     break 2
7101   fi
7102 done
7103   done
7104 IFS=$as_save_IFS
7105
7106 fi
7107 fi
7108 DLLWRAP=$ac_cv_prog_DLLWRAP
7109 if test -n "$DLLWRAP"; then
7110   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLWRAP" >&5
7111 $as_echo "$DLLWRAP" >&6; }
7112 else
7113   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7114 $as_echo "no" >&6; }
7115 fi
7116
7117
7118 fi
7119 if test -z "$ac_cv_prog_DLLWRAP"; then
7120   ac_ct_DLLWRAP=$DLLWRAP
7121   # Extract the first word of "dllwrap", so it can be a program name with args.
7122 set dummy dllwrap; ac_word=$2
7123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7124 $as_echo_n "checking for $ac_word... " >&6; }
7125 if ${ac_cv_prog_ac_ct_DLLWRAP+:} false; then :
7126   $as_echo_n "(cached) " >&6
7127 else
7128   if test -n "$ac_ct_DLLWRAP"; then
7129   ac_cv_prog_ac_ct_DLLWRAP="$ac_ct_DLLWRAP" # Let the user override the test.
7130 else
7131 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7132 for as_dir in $PATH
7133 do
7134   IFS=$as_save_IFS
7135   test -z "$as_dir" && as_dir=.
7136     for ac_exec_ext in '' $ac_executable_extensions; do
7137   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7138     ac_cv_prog_ac_ct_DLLWRAP="dllwrap"
7139     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7140     break 2
7141   fi
7142 done
7143   done
7144 IFS=$as_save_IFS
7145
7146 fi
7147 fi
7148 ac_ct_DLLWRAP=$ac_cv_prog_ac_ct_DLLWRAP
7149 if test -n "$ac_ct_DLLWRAP"; then
7150   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLWRAP" >&5
7151 $as_echo "$ac_ct_DLLWRAP" >&6; }
7152 else
7153   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7154 $as_echo "no" >&6; }
7155 fi
7156
7157   if test "x$ac_ct_DLLWRAP" = x; then
7158     DLLWRAP="dllwrap"
7159   else
7160     case $cross_compiling:$ac_tool_warned in
7161 yes:)
7162 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7163 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7164 ac_tool_warned=yes ;;
7165 esac
7166     DLLWRAP=$ac_ct_DLLWRAP
7167   fi
7168 else
7169   DLLWRAP="$ac_cv_prog_DLLWRAP"
7170 fi
7171
7172   if test -n "$ac_tool_prefix"; then
7173   # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
7174 set dummy ${ac_tool_prefix}windres; ac_word=$2
7175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7176 $as_echo_n "checking for $ac_word... " >&6; }
7177 if ${ac_cv_prog_WINDRES+:} false; then :
7178   $as_echo_n "(cached) " >&6
7179 else
7180   if test -n "$WINDRES"; then
7181   ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
7182 else
7183 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7184 for as_dir in $PATH
7185 do
7186   IFS=$as_save_IFS
7187   test -z "$as_dir" && as_dir=.
7188     for ac_exec_ext in '' $ac_executable_extensions; do
7189   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7190     ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
7191     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7192     break 2
7193   fi
7194 done
7195   done
7196 IFS=$as_save_IFS
7197
7198 fi
7199 fi
7200 WINDRES=$ac_cv_prog_WINDRES
7201 if test -n "$WINDRES"; then
7202   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
7203 $as_echo "$WINDRES" >&6; }
7204 else
7205   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7206 $as_echo "no" >&6; }
7207 fi
7208
7209
7210 fi
7211 if test -z "$ac_cv_prog_WINDRES"; then
7212   ac_ct_WINDRES=$WINDRES
7213   # Extract the first word of "windres", so it can be a program name with args.
7214 set dummy windres; ac_word=$2
7215 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7216 $as_echo_n "checking for $ac_word... " >&6; }
7217 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
7218   $as_echo_n "(cached) " >&6
7219 else
7220   if test -n "$ac_ct_WINDRES"; then
7221   ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
7222 else
7223 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7224 for as_dir in $PATH
7225 do
7226   IFS=$as_save_IFS
7227   test -z "$as_dir" && as_dir=.
7228     for ac_exec_ext in '' $ac_executable_extensions; do
7229   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7230     ac_cv_prog_ac_ct_WINDRES="windres"
7231     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7232     break 2
7233   fi
7234 done
7235   done
7236 IFS=$as_save_IFS
7237
7238 fi
7239 fi
7240 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
7241 if test -n "$ac_ct_WINDRES"; then
7242   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
7243 $as_echo "$ac_ct_WINDRES" >&6; }
7244 else
7245   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7246 $as_echo "no" >&6; }
7247 fi
7248
7249   if test "x$ac_ct_WINDRES" = x; then
7250     WINDRES="windres"
7251   else
7252     case $cross_compiling:$ac_tool_warned in
7253 yes:)
7254 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7255 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7256 ac_tool_warned=yes ;;
7257 esac
7258     WINDRES=$ac_ct_WINDRES
7259   fi
7260 else
7261   WINDRES="$ac_cv_prog_WINDRES"
7262 fi
7263
7264 fi
7265
7266 # Find a good install program.  We prefer a C program (faster),
7267 # so one script is as good as another.  But avoid the broken or
7268 # incompatible versions:
7269 # SysV /etc/install, /usr/sbin/install
7270 # SunOS /usr/etc/install
7271 # IRIX /sbin/install
7272 # AIX /bin/install
7273 # AmigaOS /C/install, which installs bootblocks on floppy discs
7274 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
7275 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
7276 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7277 # OS/2's system install, which has a completely different semantic
7278 # ./install, which can be erroneously created by make from ./install.sh.
7279 # Reject install programs that cannot install multiple files.
7280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
7281 $as_echo_n "checking for a BSD-compatible install... " >&6; }
7282 if test -z "$INSTALL"; then
7283 if ${ac_cv_path_install+:} false; then :
7284   $as_echo_n "(cached) " >&6
7285 else
7286   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7287 for as_dir in $PATH
7288 do
7289   IFS=$as_save_IFS
7290   test -z "$as_dir" && as_dir=.
7291     # Account for people who put trailing slashes in PATH elements.
7292 case $as_dir/ in #((
7293   ./ | .// | /[cC]/* | \
7294   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
7295   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
7296   /usr/ucb/* ) ;;
7297   *)
7298     # OSF1 and SCO ODT 3.0 have their own names for install.
7299     # Don't use installbsd from OSF since it installs stuff as root
7300     # by default.
7301     for ac_prog in ginstall scoinst install; do
7302       for ac_exec_ext in '' $ac_executable_extensions; do
7303         if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
7304           if test $ac_prog = install &&
7305             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7306             # AIX install.  It has an incompatible calling convention.
7307             :
7308           elif test $ac_prog = install &&
7309             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7310             # program-specific install script used by HP pwplus--don't use.
7311             :
7312           else
7313             rm -rf conftest.one conftest.two conftest.dir
7314             echo one > conftest.one
7315             echo two > conftest.two
7316             mkdir conftest.dir
7317             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
7318               test -s conftest.one && test -s conftest.two &&
7319               test -s conftest.dir/conftest.one &&
7320               test -s conftest.dir/conftest.two
7321             then
7322               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
7323               break 3
7324             fi
7325           fi
7326         fi
7327       done
7328     done
7329     ;;
7330 esac
7331
7332   done
7333 IFS=$as_save_IFS
7334
7335 rm -rf conftest.one conftest.two conftest.dir
7336
7337 fi
7338   if test "${ac_cv_path_install+set}" = set; then
7339     INSTALL=$ac_cv_path_install
7340   else
7341     # As a last resort, use the slow shell script.  Don't cache a
7342     # value for INSTALL within a source directory, because that will
7343     # break other packages using the cache if that directory is
7344     # removed, or if the value is a relative name.
7345     INSTALL=$ac_install_sh
7346   fi
7347 fi
7348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
7349 $as_echo "$INSTALL" >&6; }
7350
7351 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7352 # It thinks the first close brace ends the variable substitution.
7353 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7354
7355 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
7356
7357 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
7358
7359 # When Autoconf chooses install-sh as install program it tries to generate
7360 # a relative path to it in each makefile where it substitutes it. This clashes
7361 # with our Makefile.global concept. This workaround helps.
7362 case $INSTALL in
7363   *install-sh*) install_bin='';;
7364   *) install_bin=$INSTALL;;
7365 esac
7366
7367
7368 if test -z "$TAR"; then
7369   for ac_prog in tar
7370 do
7371   # Extract the first word of "$ac_prog", so it can be a program name with args.
7372 set dummy $ac_prog; ac_word=$2
7373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7374 $as_echo_n "checking for $ac_word... " >&6; }
7375 if ${ac_cv_path_TAR+:} false; then :
7376   $as_echo_n "(cached) " >&6
7377 else
7378   case $TAR in
7379   [\\/]* | ?:[\\/]*)
7380   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
7381   ;;
7382   *)
7383   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7384 for as_dir in $PATH
7385 do
7386   IFS=$as_save_IFS
7387   test -z "$as_dir" && as_dir=.
7388     for ac_exec_ext in '' $ac_executable_extensions; do
7389   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7390     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
7391     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7392     break 2
7393   fi
7394 done
7395   done
7396 IFS=$as_save_IFS
7397
7398   ;;
7399 esac
7400 fi
7401 TAR=$ac_cv_path_TAR
7402 if test -n "$TAR"; then
7403   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
7404 $as_echo "$TAR" >&6; }
7405 else
7406   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7407 $as_echo "no" >&6; }
7408 fi
7409
7410
7411   test -n "$TAR" && break
7412 done
7413
7414 else
7415   # Report the value of TAR in configure's output in all cases.
7416   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
7417 $as_echo_n "checking for TAR... " >&6; }
7418   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
7419 $as_echo "$TAR" >&6; }
7420 fi
7421
7422 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7423 $as_echo_n "checking whether ln -s works... " >&6; }
7424 LN_S=$as_ln_s
7425 if test "$LN_S" = "ln -s"; then
7426   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7427 $as_echo "yes" >&6; }
7428 else
7429   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7430 $as_echo "no, using $LN_S" >&6; }
7431 fi
7432
7433 for ac_prog in gawk mawk nawk awk
7434 do
7435   # Extract the first word of "$ac_prog", so it can be a program name with args.
7436 set dummy $ac_prog; ac_word=$2
7437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7438 $as_echo_n "checking for $ac_word... " >&6; }
7439 if ${ac_cv_prog_AWK+:} false; then :
7440   $as_echo_n "(cached) " >&6
7441 else
7442   if test -n "$AWK"; then
7443   ac_cv_prog_AWK="$AWK" # Let the user override the test.
7444 else
7445 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7446 for as_dir in $PATH
7447 do
7448   IFS=$as_save_IFS
7449   test -z "$as_dir" && as_dir=.
7450     for ac_exec_ext in '' $ac_executable_extensions; do
7451   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7452     ac_cv_prog_AWK="$ac_prog"
7453     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7454     break 2
7455   fi
7456 done
7457   done
7458 IFS=$as_save_IFS
7459
7460 fi
7461 fi
7462 AWK=$ac_cv_prog_AWK
7463 if test -n "$AWK"; then
7464   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7465 $as_echo "$AWK" >&6; }
7466 else
7467   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7468 $as_echo "no" >&6; }
7469 fi
7470
7471
7472   test -n "$AWK" && break
7473 done
7474
7475 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
7476 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
7477 if test -z "$MKDIR_P"; then
7478   if ${ac_cv_path_mkdir+:} false; then :
7479   $as_echo_n "(cached) " >&6
7480 else
7481   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7482 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
7483 do
7484   IFS=$as_save_IFS
7485   test -z "$as_dir" && as_dir=.
7486     for ac_prog in mkdir gmkdir; do
7487          for ac_exec_ext in '' $ac_executable_extensions; do
7488            as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
7489            case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
7490              'mkdir (GNU coreutils) '* | \
7491              'mkdir (coreutils) '* | \
7492              'mkdir (fileutils) '4.1*)
7493                ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
7494                break 3;;
7495            esac
7496          done
7497        done
7498   done
7499 IFS=$as_save_IFS
7500
7501 fi
7502
7503   test -d ./--version && rmdir ./--version
7504   if test "${ac_cv_path_mkdir+set}" = set; then
7505     MKDIR_P="$ac_cv_path_mkdir -p"
7506   else
7507     # As a last resort, use the slow shell script.  Don't cache a
7508     # value for MKDIR_P within a source directory, because that will
7509     # break other packages using the cache if that directory is
7510     # removed, or if the value is a relative name.
7511     MKDIR_P="$ac_install_sh -d"
7512   fi
7513 fi
7514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
7515 $as_echo "$MKDIR_P" >&6; }
7516
7517 # When Autoconf chooses install-sh as mkdir -p program it tries to generate
7518 # a relative path to it in each makefile where it substitutes it. This clashes
7519 # with our Makefile.global concept. This workaround helps.
7520 case $MKDIR_P in
7521   *install-sh*) MKDIR_P='\${SHELL} \${top_srcdir}/config/install-sh -c -d';;
7522 esac
7523
7524 if test -z "$BISON"; then
7525   for ac_prog in bison
7526 do
7527   # Extract the first word of "$ac_prog", so it can be a program name with args.
7528 set dummy $ac_prog; ac_word=$2
7529 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7530 $as_echo_n "checking for $ac_word... " >&6; }
7531 if ${ac_cv_path_BISON+:} false; then :
7532   $as_echo_n "(cached) " >&6
7533 else
7534   case $BISON in
7535   [\\/]* | ?:[\\/]*)
7536   ac_cv_path_BISON="$BISON" # Let the user override the test with a path.
7537   ;;
7538   *)
7539   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7540 for as_dir in $PATH
7541 do
7542   IFS=$as_save_IFS
7543   test -z "$as_dir" && as_dir=.
7544     for ac_exec_ext in '' $ac_executable_extensions; do
7545   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7546     ac_cv_path_BISON="$as_dir/$ac_word$ac_exec_ext"
7547     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7548     break 2
7549   fi
7550 done
7551   done
7552 IFS=$as_save_IFS
7553
7554   ;;
7555 esac
7556 fi
7557 BISON=$ac_cv_path_BISON
7558 if test -n "$BISON"; then
7559   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
7560 $as_echo "$BISON" >&6; }
7561 else
7562   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7563 $as_echo "no" >&6; }
7564 fi
7565
7566
7567   test -n "$BISON" && break
7568 done
7569
7570 else
7571   # Report the value of BISON in configure's output in all cases.
7572   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BISON" >&5
7573 $as_echo_n "checking for BISON... " >&6; }
7574   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
7575 $as_echo "$BISON" >&6; }
7576 fi
7577
7578
7579 if test "$BISON"; then
7580   pgac_bison_version=`$BISON --version 2>/dev/null | sed q`
7581   { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_bison_version" >&5
7582 $as_echo "$as_me: using $pgac_bison_version" >&6;}
7583   if echo "$pgac_bison_version" | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'
7584   then
7585     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7586 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
7587 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&5
7588 $as_echo "$as_me: WARNING:
7589 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
7590 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&2;}
7591     BISON=""
7592   fi
7593   # Bison >=3.0 issues warnings about %name-prefix="base_yy", instead
7594   # of the now preferred %name-prefix "base_yy", but the latter
7595   # doesn't work with Bison 2.3 or less.  So for now we silence the
7596   # deprecation warnings.
7597   if echo "$pgac_bison_version" | $AWK '{ if ($4 >= 3) exit 0; else exit 1;}'
7598   then
7599     BISONFLAGS="$BISONFLAGS -Wno-deprecated"
7600   fi
7601 fi
7602
7603 if test -z "$BISON"; then
7604   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7605 *** Without Bison you will not be able to build PostgreSQL from Git nor
7606 *** change any of the parser definition files.  You can obtain Bison from
7607 *** a GNU mirror site.  (If you are using the official distribution of
7608 *** PostgreSQL then you do not need to worry about this, because the Bison
7609 *** output is pre-generated.)" >&5
7610 $as_echo "$as_me: WARNING:
7611 *** Without Bison you will not be able to build PostgreSQL from Git nor
7612 *** change any of the parser definition files.  You can obtain Bison from
7613 *** a GNU mirror site.  (If you are using the official distribution of
7614 *** PostgreSQL then you do not need to worry about this, because the Bison
7615 *** output is pre-generated.)" >&2;}
7616 fi
7617 # We don't need AC_SUBST(BISON) because PGAC_PATH_PROGS did it
7618
7619
7620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flex" >&5
7621 $as_echo_n "checking for flex... " >&6; }
7622 if ${pgac_cv_path_flex+:} false; then :
7623   $as_echo_n "(cached) " >&6
7624 else
7625   # Let the user override the test
7626 if test -n "$FLEX"; then
7627   pgac_cv_path_flex=$FLEX
7628 else
7629   pgac_save_IFS=$IFS
7630   IFS=$PATH_SEPARATOR
7631   for pgac_dir in $PATH; do
7632     IFS=$pgac_save_IFS
7633     if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
7634       pgac_dir=`pwd`
7635     fi
7636     for pgac_prog in flex lex; do
7637       pgac_candidate="$pgac_dir/$pgac_prog"
7638       if test -f "$pgac_candidate" \
7639         && $pgac_candidate --version </dev/null >/dev/null 2>&1
7640       then
7641         echo '%%'  > conftest.l
7642         if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
7643           pgac_flex_version=`$pgac_candidate --version 2>/dev/null`
7644           if echo "$pgac_flex_version" | sed 's/[.a-z]/ /g' | $AWK '{ if ($1 == 2 && ($2 > 5 || ($2 == 5 && $3 >= 31))) exit 0; else exit 1;}'
7645           then
7646             pgac_cv_path_flex=$pgac_candidate
7647             break 2
7648           else
7649             { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7650 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
7651 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&5
7652 $as_echo "$as_me: WARNING:
7653 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
7654 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&2;}
7655           fi
7656         fi
7657       fi
7658     done
7659   done
7660   rm -f conftest.l lex.yy.c
7661   : ${pgac_cv_path_flex=no}
7662 fi
7663
7664 fi
7665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_path_flex" >&5
7666 $as_echo "$pgac_cv_path_flex" >&6; }
7667 if test x"$pgac_cv_path_flex" = x"no"; then
7668   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7669 *** Without Flex you will not be able to build PostgreSQL from Git nor
7670 *** change any of the scanner definition files.  You can obtain Flex from
7671 *** a GNU mirror site.  (If you are using the official distribution of
7672 *** PostgreSQL then you do not need to worry about this because the Flex
7673 *** output is pre-generated.)" >&5
7674 $as_echo "$as_me: WARNING:
7675 *** Without Flex you will not be able to build PostgreSQL from Git nor
7676 *** change any of the scanner definition files.  You can obtain Flex from
7677 *** a GNU mirror site.  (If you are using the official distribution of
7678 *** PostgreSQL then you do not need to worry about this because the Flex
7679 *** output is pre-generated.)" >&2;}
7680
7681   FLEX=
7682 else
7683   FLEX=$pgac_cv_path_flex
7684   pgac_flex_version=`$FLEX --version 2>/dev/null`
7685   { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_flex_version" >&5
7686 $as_echo "$as_me: using $pgac_flex_version" >&6;}
7687 fi
7688
7689
7690
7691
7692
7693 if test -z "$PERL"; then
7694   for ac_prog in perl
7695 do
7696   # Extract the first word of "$ac_prog", so it can be a program name with args.
7697 set dummy $ac_prog; ac_word=$2
7698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7699 $as_echo_n "checking for $ac_word... " >&6; }
7700 if ${ac_cv_path_PERL+:} false; then :
7701   $as_echo_n "(cached) " >&6
7702 else
7703   case $PERL in
7704   [\\/]* | ?:[\\/]*)
7705   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
7706   ;;
7707   *)
7708   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7709 for as_dir in $PATH
7710 do
7711   IFS=$as_save_IFS
7712   test -z "$as_dir" && as_dir=.
7713     for ac_exec_ext in '' $ac_executable_extensions; do
7714   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7715     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
7716     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7717     break 2
7718   fi
7719 done
7720   done
7721 IFS=$as_save_IFS
7722
7723   ;;
7724 esac
7725 fi
7726 PERL=$ac_cv_path_PERL
7727 if test -n "$PERL"; then
7728   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
7729 $as_echo "$PERL" >&6; }
7730 else
7731   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7732 $as_echo "no" >&6; }
7733 fi
7734
7735
7736   test -n "$PERL" && break
7737 done
7738
7739 else
7740   # Report the value of PERL in configure's output in all cases.
7741   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PERL" >&5
7742 $as_echo_n "checking for PERL... " >&6; }
7743   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
7744 $as_echo "$PERL" >&6; }
7745 fi
7746
7747
7748 if test "$PERL"; then
7749   pgac_perl_version=`$PERL -v 2>/dev/null | sed -n 's/This is perl.*v[a-z ]*\([0-9]\.[0-9][0-9.]*\).*$/\1/p'`
7750   { $as_echo "$as_me:${as_lineno-$LINENO}: using perl $pgac_perl_version" >&5
7751 $as_echo "$as_me: using perl $pgac_perl_version" >&6;}
7752   if echo "$pgac_perl_version" | sed 's/[.a-z_]/ /g' | \
7753     $AWK '{ if ($1 == 5 && $2 >= 8) exit 1; else exit 0;}'
7754   then
7755     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7756 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
7757 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&5
7758 $as_echo "$as_me: WARNING:
7759 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
7760 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&2;}
7761     PERL=""
7762   fi
7763 fi
7764
7765 if test -z "$PERL"; then
7766   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7767 *** Without Perl you will not be able to build PostgreSQL from Git.
7768 *** You can obtain Perl from any CPAN mirror site.
7769 *** (If you are using the official distribution of PostgreSQL then you do not
7770 *** need to worry about this, because the Perl output is pre-generated.)" >&5
7771 $as_echo "$as_me: WARNING:
7772 *** Without Perl you will not be able to build PostgreSQL from Git.
7773 *** You can obtain Perl from any CPAN mirror site.
7774 *** (If you are using the official distribution of PostgreSQL then you do not
7775 *** need to worry about this, because the Perl output is pre-generated.)" >&2;}
7776 fi
7777
7778 if test "$with_perl" = yes; then
7779   if test -z "$PERL"; then
7780     as_fn_error $? "Perl not found" "$LINENO" 5
7781   fi
7782
7783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl archlibexp" >&5
7784 $as_echo_n "checking for Perl archlibexp... " >&6; }
7785 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
7786 test "$PORTNAME" = "win32" && perl_archlibexp=`echo $perl_archlibexp | sed 's,\\\\,/,g'`
7787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_archlibexp" >&5
7788 $as_echo "$perl_archlibexp" >&6; }
7789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl privlibexp" >&5
7790 $as_echo_n "checking for Perl privlibexp... " >&6; }
7791 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
7792 test "$PORTNAME" = "win32" && perl_privlibexp=`echo $perl_privlibexp | sed 's,\\\\,/,g'`
7793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_privlibexp" >&5
7794 $as_echo "$perl_privlibexp" >&6; }
7795 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl useshrplib" >&5
7796 $as_echo_n "checking for Perl useshrplib... " >&6; }
7797 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
7798 test "$PORTNAME" = "win32" && perl_useshrplib=`echo $perl_useshrplib | sed 's,\\\\,/,g'`
7799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_useshrplib" >&5
7800 $as_echo "$perl_useshrplib" >&6; }
7801   if test "$perl_useshrplib" != yes && test "$perl_useshrplib" != true; then
7802     as_fn_error $? "cannot build PL/Perl because libperl is not a shared library
7803 You might have to rebuild your Perl installation.  Refer to the
7804 documentation for details.  Use --without-perl to disable building
7805 PL/Perl." "$LINENO" 5
7806   fi
7807
7808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS recommended by Perl" >&5
7809 $as_echo_n "checking for CFLAGS recommended by Perl... " >&6; }
7810 perl_ccflags=`$PERL -MConfig -e 'print $Config{ccflags}'`
7811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_ccflags" >&5
7812 $as_echo "$perl_ccflags" >&6; }
7813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS to compile embedded Perl" >&5
7814 $as_echo_n "checking for CFLAGS to compile embedded Perl... " >&6; }
7815 perl_embed_ccflags=`$PERL -MConfig -e 'foreach $f (split(" ",$Config{ccflags})) {print $f, " " if ($f =~ /^-D[^_]/ || $f =~ /^-D_USE_32BIT_TIME_T/)}'`
7816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ccflags" >&5
7817 $as_echo "$perl_embed_ccflags" >&6; }
7818
7819
7820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flags to link embedded Perl" >&5
7821 $as_echo_n "checking for flags to link embedded Perl... " >&6; }
7822 if test "$PORTNAME" = "win32" ; then
7823 perl_lib=`basename $perl_archlibexp/CORE/perl[5-9]*.lib .lib`
7824 test -e "$perl_archlibexp/CORE/$perl_lib.lib" && perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
7825 else
7826 pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
7827 pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
7828 perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%" -e "s/ -arch [-a-zA-Z0-9_]*//g"`
7829 fi
7830 if test -z "$perl_embed_ldflags" ; then
7831         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7832 $as_echo "no" >&6; }
7833         as_fn_error $? "could not determine flags for linking embedded Perl.
7834 This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not
7835 installed." "$LINENO" 5
7836 else
7837         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ldflags" >&5
7838 $as_echo "$perl_embed_ldflags" >&6; }
7839 fi
7840
7841 fi
7842
7843 if test "$with_python" = yes; then
7844   if test -z "$PYTHON"; then
7845   for ac_prog in python
7846 do
7847   # Extract the first word of "$ac_prog", so it can be a program name with args.
7848 set dummy $ac_prog; ac_word=$2
7849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7850 $as_echo_n "checking for $ac_word... " >&6; }
7851 if ${ac_cv_path_PYTHON+:} false; then :
7852   $as_echo_n "(cached) " >&6
7853 else
7854   case $PYTHON in
7855   [\\/]* | ?:[\\/]*)
7856   ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
7857   ;;
7858   *)
7859   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7860 for as_dir in $PATH
7861 do
7862   IFS=$as_save_IFS
7863   test -z "$as_dir" && as_dir=.
7864     for ac_exec_ext in '' $ac_executable_extensions; do
7865   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7866     ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
7867     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7868     break 2
7869   fi
7870 done
7871   done
7872 IFS=$as_save_IFS
7873
7874   ;;
7875 esac
7876 fi
7877 PYTHON=$ac_cv_path_PYTHON
7878 if test -n "$PYTHON"; then
7879   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
7880 $as_echo "$PYTHON" >&6; }
7881 else
7882   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7883 $as_echo "no" >&6; }
7884 fi
7885
7886
7887   test -n "$PYTHON" && break
7888 done
7889
7890 else
7891   # Report the value of PYTHON in configure's output in all cases.
7892   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PYTHON" >&5
7893 $as_echo_n "checking for PYTHON... " >&6; }
7894   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
7895 $as_echo "$PYTHON" >&6; }
7896 fi
7897
7898 if test x"$PYTHON" = x""; then
7899   as_fn_error $? "Python not found" "$LINENO" 5
7900 fi
7901
7902
7903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python distutils module" >&5
7904 $as_echo_n "checking for Python distutils module... " >&6; }
7905 if "${PYTHON}" -c 'import distutils' 2>&5
7906 then
7907     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7908 $as_echo "yes" >&6; }
7909 else
7910     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7911 $as_echo "no" >&6; }
7912     as_fn_error $? "distutils module not found" "$LINENO" 5
7913 fi
7914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python configuration directory" >&5
7915 $as_echo_n "checking Python configuration directory... " >&6; }
7916 python_majorversion=`${PYTHON} -c "import sys; print(sys.version[0])"`
7917 python_minorversion=`${PYTHON} -c "import sys; print(sys.version[2])"`
7918 python_version=`${PYTHON} -c "import sys; print(sys.version[:3])"`
7919 python_configdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBPL'))))"`
7920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_configdir" >&5
7921 $as_echo "$python_configdir" >&6; }
7922
7923 # Reject unsupported Python versions as soon as practical.
7924 if test "$python_majorversion" -lt 3 -a "$python_minorversion" -lt 4; then
7925   as_fn_error $? "Python version $python_version is too old (version 2.4 or later is required)" "$LINENO" 5
7926 fi
7927
7928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python include directories" >&5
7929 $as_echo_n "checking Python include directories... " >&6; }
7930 python_includespec=`${PYTHON} -c "
7931 import distutils.sysconfig
7932 a = '-I' + distutils.sysconfig.get_python_inc(False)
7933 b = '-I' + distutils.sysconfig.get_python_inc(True)
7934 if a == b:
7935     print(a)
7936 else:
7937     print(a + ' ' + b)"`
7938 if test "$PORTNAME" = win32 ; then
7939     python_includespec=`echo $python_includespec | sed 's,[\],/,g'`
7940 fi
7941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_includespec" >&5
7942 $as_echo "$python_includespec" >&6; }
7943
7944
7945
7946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link an embedded Python application" >&5
7947 $as_echo_n "checking how to link an embedded Python application... " >&6; }
7948
7949 python_libdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBDIR'))))"`
7950 python_ldlibrary=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDLIBRARY'))))"`
7951
7952 # If LDLIBRARY exists and has a shlib extension, use it verbatim.
7953 ldlibrary=`echo "${python_ldlibrary}" | sed -e 's/\.so$//' -e 's/\.dll$//' -e 's/\.dylib$//' -e 's/\.sl$//'`
7954 if test -e "${python_libdir}/${python_ldlibrary}" -a x"${python_ldlibrary}" != x"${ldlibrary}"
7955 then
7956         ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
7957         found_shlib=1
7958 else
7959         # Otherwise, guess the base name of the shlib.
7960         # LDVERSION was added in Python 3.2, before that use VERSION,
7961         # or failing that, $python_version from _PGAC_CHECK_PYTHON_DIRS.
7962         python_ldversion=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDVERSION'))))"`
7963         if test x"${python_ldversion}" != x""; then
7964                 ldlibrary="python${python_ldversion}"
7965         else
7966                 python_version_var=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('VERSION'))))"`
7967                 if test x"${python_version_var}" != x""; then
7968                         ldlibrary="python${python_version_var}"
7969                 else
7970                         ldlibrary="python${python_version}"
7971                 fi
7972         fi
7973         # Search for a likely-looking file.
7974         found_shlib=0
7975         for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
7976         do
7977                 # We don't know the platform DLSUFFIX here, so check 'em all.
7978                 for e in .so .dll .dylib .sl; do
7979                         if test -e "$d/lib${ldlibrary}$e"; then
7980                                 python_libdir="$d"
7981                                 found_shlib=1
7982                                 break 2
7983                         fi
7984                 done
7985         done
7986         # Some platforms (OpenBSD) require us to accept a bare versioned shlib
7987         # (".so.n.n") as well. However, check this only after failing to find
7988         # ".so" anywhere, because yet other platforms (Debian) put the .so
7989         # symlink in a different directory from the underlying versioned shlib.
7990         if test "$found_shlib" != 1; then
7991                 for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
7992                 do
7993                         for f in "$d/lib${ldlibrary}.so."* ; do
7994                                 if test -e "$f"; then
7995                                         python_libdir="$d"
7996                                         found_shlib=1
7997                                         break 2
7998                                 fi
7999                         done
8000                 done
8001         fi
8002         # As usual, Windows has its own ideas.  Possible default library
8003         # locations include c:/Windows/System32 and (for Cygwin) /usr/bin,
8004         # and the "lib" prefix might not be there.
8005         if test "$found_shlib" != 1 -a \( "$PORTNAME" = win32 -o "$PORTNAME" = cygwin \); then
8006                 for d in "${python_libdir}" "${python_configdir}" c:/Windows/System32 /usr/bin
8007                 do
8008                         for f in "$d/lib${ldlibrary}.dll" "$d/${ldlibrary}.dll" ; do
8009                                 if test -e "$f"; then
8010                                         python_libdir="$d"
8011                                         found_shlib=1
8012                                         break 2
8013                                 fi
8014                         done
8015                 done
8016         fi
8017 fi
8018 if test "$found_shlib" != 1; then
8019         as_fn_error $? "could not find shared library for Python
8020 You might have to rebuild your Python installation.  Refer to the
8021 documentation for details.  Use --without-python to disable building
8022 PL/Python." "$LINENO" 5
8023 fi
8024 python_libspec="-L${python_libdir} -l${ldlibrary}"
8025
8026 python_additional_libs=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBS','LIBC','LIBM','BASEMODLIBS'))))"`
8027
8028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_libspec} ${python_additional_libs}" >&5
8029 $as_echo "${python_libspec} ${python_additional_libs}" >&6; }
8030
8031
8032
8033 fi
8034
8035 if test "$cross_compiling" = yes && test -z "$with_system_tzdata"; then
8036   if test -z "$ZIC"; then
8037   for ac_prog in zic
8038 do
8039   # Extract the first word of "$ac_prog", so it can be a program name with args.
8040 set dummy $ac_prog; ac_word=$2
8041 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8042 $as_echo_n "checking for $ac_word... " >&6; }
8043 if ${ac_cv_path_ZIC+:} false; then :
8044   $as_echo_n "(cached) " >&6
8045 else
8046   case $ZIC in
8047   [\\/]* | ?:[\\/]*)
8048   ac_cv_path_ZIC="$ZIC" # Let the user override the test with a path.
8049   ;;
8050   *)
8051   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8052 for as_dir in $PATH
8053 do
8054   IFS=$as_save_IFS
8055   test -z "$as_dir" && as_dir=.
8056     for ac_exec_ext in '' $ac_executable_extensions; do
8057   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8058     ac_cv_path_ZIC="$as_dir/$ac_word$ac_exec_ext"
8059     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8060     break 2
8061   fi
8062 done
8063   done
8064 IFS=$as_save_IFS
8065
8066   ;;
8067 esac
8068 fi
8069 ZIC=$ac_cv_path_ZIC
8070 if test -n "$ZIC"; then
8071   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
8072 $as_echo "$ZIC" >&6; }
8073 else
8074   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8075 $as_echo "no" >&6; }
8076 fi
8077
8078
8079   test -n "$ZIC" && break
8080 done
8081
8082 else
8083   # Report the value of ZIC in configure's output in all cases.
8084   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIC" >&5
8085 $as_echo_n "checking for ZIC... " >&6; }
8086   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
8087 $as_echo "$ZIC" >&6; }
8088 fi
8089
8090   if test -z "$ZIC"; then
8091     as_fn_error $? "
8092 When cross-compiling, either use the option --with-system-tzdata to use
8093 existing time-zone data, or set the environment variable ZIC to a zic
8094 program to use during the build." "$LINENO" 5
8095   fi
8096 fi
8097
8098 #
8099 # Pthreads
8100 #
8101 # For each platform, we need to know about any special compile and link
8102 # libraries, and whether the normal C function names are thread-safe.
8103 # See the comment at the top of src/port/thread.c for more information.
8104 # WIN32 doesn't need the pthread tests;  it always uses threads
8105 #
8106 # These tests are run before the library-tests, because linking with the
8107 # other libraries can pull in the pthread functions as a side-effect.  We
8108 # want to use the -pthread or similar flags directly, and not rely on
8109 # the side-effects of linking with some other library.
8110 #
8111 # note: We have to use AS_IF here rather than plain if. The AC_CHECK_HEADER
8112 # invocation below is the first one in the script, and autoconf generates
8113 # additional code for that, which must not be inside the if-block. AS_IF
8114 # knows how to do that.
8115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
8116 $as_echo_n "checking for ANSI C header files... " >&6; }
8117 if ${ac_cv_header_stdc+:} false; then :
8118   $as_echo_n "(cached) " >&6
8119 else
8120   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8121 /* end confdefs.h.  */
8122 #include <stdlib.h>
8123 #include <stdarg.h>
8124 #include <string.h>
8125 #include <float.h>
8126
8127 int
8128 main ()
8129 {
8130
8131   ;
8132   return 0;
8133 }
8134 _ACEOF
8135 if ac_fn_c_try_compile "$LINENO"; then :
8136   ac_cv_header_stdc=yes
8137 else
8138   ac_cv_header_stdc=no
8139 fi
8140 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8141
8142 if test $ac_cv_header_stdc = yes; then
8143   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8144   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8145 /* end confdefs.h.  */
8146 #include <string.h>
8147
8148 _ACEOF
8149 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8150   $EGREP "memchr" >/dev/null 2>&1; then :
8151
8152 else
8153   ac_cv_header_stdc=no
8154 fi
8155 rm -f conftest*
8156
8157 fi
8158
8159 if test $ac_cv_header_stdc = yes; then
8160   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8161   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8162 /* end confdefs.h.  */
8163 #include <stdlib.h>
8164
8165 _ACEOF
8166 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8167   $EGREP "free" >/dev/null 2>&1; then :
8168
8169 else
8170   ac_cv_header_stdc=no
8171 fi
8172 rm -f conftest*
8173
8174 fi
8175
8176 if test $ac_cv_header_stdc = yes; then
8177   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8178   if test "$cross_compiling" = yes; then :
8179   :
8180 else
8181   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8182 /* end confdefs.h.  */
8183 #include <ctype.h>
8184 #include <stdlib.h>
8185 #if ((' ' & 0x0FF) == 0x020)
8186 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8187 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8188 #else
8189 # define ISLOWER(c) \
8190                    (('a' <= (c) && (c) <= 'i') \
8191                      || ('j' <= (c) && (c) <= 'r') \
8192                      || ('s' <= (c) && (c) <= 'z'))
8193 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8194 #endif
8195
8196 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8197 int
8198 main ()
8199 {
8200   int i;
8201   for (i = 0; i < 256; i++)
8202     if (XOR (islower (i), ISLOWER (i))
8203         || toupper (i) != TOUPPER (i))
8204       return 2;
8205   return 0;
8206 }
8207 _ACEOF
8208 if ac_fn_c_try_run "$LINENO"; then :
8209
8210 else
8211   ac_cv_header_stdc=no
8212 fi
8213 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8214   conftest.$ac_objext conftest.beam conftest.$ac_ext
8215 fi
8216
8217 fi
8218 fi
8219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
8220 $as_echo "$ac_cv_header_stdc" >&6; }
8221 if test $ac_cv_header_stdc = yes; then
8222
8223 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
8224
8225 fi
8226
8227 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
8228 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
8229                   inttypes.h stdint.h unistd.h
8230 do :
8231   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8232 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
8233 "
8234 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8235   cat >>confdefs.h <<_ACEOF
8236 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8237 _ACEOF
8238
8239 fi
8240
8241 done
8242
8243
8244 if test "$enable_thread_safety" = yes -a "$PORTNAME" != "win32"; then :
8245    # then
8246
8247
8248
8249 ac_ext=c
8250 ac_cpp='$CPP $CPPFLAGS'
8251 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8252 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8253 ac_compiler_gnu=$ac_cv_c_compiler_gnu
8254
8255 ax_pthread_ok=no
8256
8257 # We used to check for pthread.h first, but this fails if pthread.h
8258 # requires special compiler flags (e.g. on Tru64 or Sequent).
8259 # It gets checked for in the link test anyway.
8260
8261 # First of all, check if the user has set any of the PTHREAD_LIBS,
8262 # etcetera environment variables, and if threads linking works using
8263 # them:
8264 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
8265         save_CFLAGS="$CFLAGS"
8266         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
8267         save_LIBS="$LIBS"
8268         LIBS="$PTHREAD_LIBS $LIBS"
8269         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
8270 $as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
8271         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8272 /* end confdefs.h.  */
8273
8274 /* Override any GCC internal prototype to avoid an error.
8275    Use char because int might match the return type of a GCC
8276    builtin and then its argument prototype would still apply.  */
8277 #ifdef __cplusplus
8278 extern "C"
8279 #endif
8280 char pthread_join ();
8281 int
8282 main ()
8283 {
8284 return pthread_join ();
8285   ;
8286   return 0;
8287 }
8288 _ACEOF
8289 if ac_fn_c_try_link "$LINENO"; then :
8290   ax_pthread_ok=yes
8291 fi
8292 rm -f core conftest.err conftest.$ac_objext \
8293     conftest$ac_exeext conftest.$ac_ext
8294         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
8295 $as_echo "$ax_pthread_ok" >&6; }
8296         if test x"$ax_pthread_ok" = xno; then
8297                 PTHREAD_LIBS=""
8298                 PTHREAD_CFLAGS=""
8299         fi
8300         LIBS="$save_LIBS"
8301         CFLAGS="$save_CFLAGS"
8302 fi
8303
8304 # We must check for the threads library under a number of different
8305 # names; the ordering is very important because some systems
8306 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
8307 # libraries is broken (non-POSIX).
8308
8309 # Create a list of thread flags to try.  Items starting with a "-" are
8310 # C compiler flags, and other items are library names, except for "none"
8311 # which indicates that we try without any flags at all, and "pthread-config"
8312 # which is a program returning the flags for the Pth emulation library.
8313
8314 ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mt -mthreads pthread --thread-safe pthread-config"
8315
8316 # The ordering *is* (sometimes) important.  Some notes on the
8317 # individual items follow:
8318
8319 # pthreads: AIX (must check this before -lpthread)
8320 # none: in case threads are in libc; should be tried before -Kthread and
8321 #       other compiler flags to prevent continual compiler warnings
8322 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
8323 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
8324 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
8325 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
8326 # -pthreads: Solaris/gcc
8327 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
8328 #      doesn't hurt to check since this sometimes defines pthreads and
8329 #      -D_REENTRANT too), HP C (must be checked before -lpthread, which
8330 #      is present but should not be used directly)
8331 # -mthreads: Mingw32/gcc, Lynx/gcc
8332 # pthread: Linux, etcetera
8333 # --thread-safe: KAI C++
8334 # pthread-config: use pthread-config program (for GNU Pth library)
8335
8336 case $host_os in
8337
8338         hpux*)
8339
8340         # From the cc(1) man page: "[-mt] Sets various -D flags to enable
8341         # multi-threading and also sets -lpthread."
8342
8343         ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
8344         ;;
8345
8346         openedition*)
8347
8348         # IBM z/OS requires a feature-test macro to be defined in order to
8349         # enable POSIX threads at all, so give the user a hint if this is
8350         # not set. (We don't define these ourselves, as they can affect
8351         # other portions of the system API in unpredictable ways.)
8352
8353         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8354 /* end confdefs.h.  */
8355
8356 #            if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
8357              AX_PTHREAD_ZOS_MISSING
8358 #            endif
8359
8360 _ACEOF
8361 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8362   $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
8363   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
8364 $as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
8365 fi
8366 rm -f conftest*
8367
8368         ;;
8369
8370         solaris*)
8371
8372         # Newer versions of Solaris require the "-mt -lpthread" pair, and we
8373         # check that first.  On some older versions, libc contains stubbed
8374         # (non-functional) versions of the pthreads routines, so link-based
8375         # tests will erroneously succeed.  (We need to link with -pthreads/-mt/
8376         # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
8377         # a function called by this macro, so we could check for that, but
8378         # who knows whether they'll stub that too in a future libc.)  So
8379         # we'll look for -pthreads and -lpthread shortly thereafter.
8380
8381         ax_pthread_flags="-mt,pthread -pthreads -pthread pthread $ax_pthread_flags"
8382         ;;
8383 esac
8384
8385 # Older versions of Clang only give a warning instead of an error for an
8386 # unrecognized option, unless we specify -Werror. (We throw in some extra
8387 # Clang warning flags for good measure.)
8388
8389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler needs certain flags to reject unknown flags" >&5
8390 $as_echo_n "checking if compiler needs certain flags to reject unknown flags... " >&6; }
8391 if ${ax_cv_PTHREAD_REJECT_UNKNOWN+:} false; then :
8392   $as_echo_n "(cached) " >&6
8393 else
8394   ax_cv_PTHREAD_REJECT_UNKNOWN=unknown
8395      save_CFLAGS="$CFLAGS"
8396      ax_pthread_extra_flags="-Wunknown-warning-option -Wunused-command-line-argument"
8397      CFLAGS="$CFLAGS $ax_pthread_extra_flags -Wfoobaz -foobaz"
8398      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8399 /* end confdefs.h.  */
8400 int foo(void);
8401 int
8402 main ()
8403 {
8404 foo()
8405   ;
8406   return 0;
8407 }
8408 _ACEOF
8409 if ac_fn_c_try_compile "$LINENO"; then :
8410   ax_cv_PTHREAD_REJECT_UNKNOWN="-Werror $ax_pthread_extra_flags"
8411 else
8412   ax_cv_PTHREAD_REJECT_UNKNOWN=no
8413 fi
8414 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8415      CFLAGS="$save_CFLAGS"
8416
8417 fi
8418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_REJECT_UNKNOWN" >&5
8419 $as_echo "$ax_cv_PTHREAD_REJECT_UNKNOWN" >&6; }
8420 ax_pthread_extra_flags=
8421 if test "x$ax_cv_PTHREAD_REJECT_UNKNOWN" != "xno"; then :
8422   ax_pthread_extra_flags="$ax_cv_PTHREAD_REJECT_UNKNOWN"
8423 fi
8424
8425 if test x"$ax_pthread_ok" = xno; then
8426 for flag in $ax_pthread_flags; do
8427
8428         case $flag in
8429                 none)
8430                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
8431 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
8432                 ;;
8433
8434                 -mt,pthread)
8435                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
8436 $as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
8437                 PTHREAD_CFLAGS="-mt"
8438                 PTHREAD_LIBS="-lpthread"
8439                 ;;
8440
8441                 -*)
8442                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5
8443 $as_echo_n "checking whether pthreads work with $flag... " >&6; }
8444                 PTHREAD_CFLAGS="$flag"
8445                 ;;
8446
8447                 pthread-config)
8448                 # Extract the first word of "pthread-config", so it can be a program name with args.
8449 set dummy pthread-config; ac_word=$2
8450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8451 $as_echo_n "checking for $ac_word... " >&6; }
8452 if ${ac_cv_prog_ax_pthread_config+:} false; then :
8453   $as_echo_n "(cached) " >&6
8454 else
8455   if test -n "$ax_pthread_config"; then
8456   ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
8457 else
8458 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8459 for as_dir in $PATH
8460 do
8461   IFS=$as_save_IFS
8462   test -z "$as_dir" && as_dir=.
8463     for ac_exec_ext in '' $ac_executable_extensions; do
8464   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8465     ac_cv_prog_ax_pthread_config="yes"
8466     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8467     break 2
8468   fi
8469 done
8470   done
8471 IFS=$as_save_IFS
8472
8473   test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
8474 fi
8475 fi
8476 ax_pthread_config=$ac_cv_prog_ax_pthread_config
8477 if test -n "$ax_pthread_config"; then
8478   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
8479 $as_echo "$ax_pthread_config" >&6; }
8480 else
8481   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8482 $as_echo "no" >&6; }
8483 fi
8484
8485
8486                 if test x"$ax_pthread_config" = xno; then continue; fi
8487                 PTHREAD_CFLAGS="`pthread-config --cflags`"
8488                 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
8489                 ;;
8490
8491                 *)
8492                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5
8493 $as_echo_n "checking for the pthreads library -l$flag... " >&6; }
8494                 PTHREAD_LIBS="-l$flag"
8495                 ;;
8496         esac
8497
8498         save_LIBS="$LIBS"
8499         save_CFLAGS="$CFLAGS"
8500         LIBS="$PTHREAD_LIBS $LIBS"
8501         CFLAGS="$CFLAGS $PTHREAD_CFLAGS $ax_pthread_extra_flags"
8502
8503         # Check for various functions.  We must include pthread.h,
8504         # since some functions may be macros.  (On the Sequent, we
8505         # need a special flag -Kthread to make this header compile.)
8506         # We check for pthread_join because it is in -lpthread on IRIX
8507         # while pthread_create is in libc.  We check for pthread_attr_init
8508         # due to DEC craziness with -lpthreads.  We check for
8509         # pthread_cleanup_push because it is one of the few pthread
8510         # functions on Solaris that doesn't have a non-functional libc stub.
8511         # We try pthread_create on general principles.
8512         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8513 /* end confdefs.h.  */
8514 #include <pthread.h>
8515                         static void routine(void *a) { a = 0; }
8516                         static void *start_routine(void *a) { return a; }
8517 int
8518 main ()
8519 {
8520 pthread_t th; pthread_attr_t attr;
8521                         pthread_create(&th, 0, start_routine, 0);
8522                         pthread_join(th, 0);
8523                         pthread_attr_init(&attr);
8524                         pthread_cleanup_push(routine, 0);
8525                         pthread_cleanup_pop(0) /* ; */
8526   ;
8527   return 0;
8528 }
8529 _ACEOF
8530 if ac_fn_c_try_link "$LINENO"; then :
8531   ax_pthread_ok=yes
8532 fi
8533 rm -f core conftest.err conftest.$ac_objext \
8534     conftest$ac_exeext conftest.$ac_ext
8535
8536         LIBS="$save_LIBS"
8537         CFLAGS="$save_CFLAGS"
8538
8539         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
8540 $as_echo "$ax_pthread_ok" >&6; }
8541         if test "x$ax_pthread_ok" = xyes; then
8542                 break;
8543         fi
8544
8545         PTHREAD_LIBS=""
8546         PTHREAD_CFLAGS=""
8547 done
8548 fi
8549
8550 # Various other checks:
8551 if test "x$ax_pthread_ok" = xyes; then
8552         save_LIBS="$LIBS"
8553         LIBS="$PTHREAD_LIBS $LIBS"
8554         save_CFLAGS="$CFLAGS"
8555         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
8556
8557         # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
8558         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
8559 $as_echo_n "checking for joinable pthread attribute... " >&6; }
8560 if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
8561   $as_echo_n "(cached) " >&6
8562 else
8563   ax_cv_PTHREAD_JOINABLE_ATTR=unknown
8564              for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
8565                  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8566 /* end confdefs.h.  */
8567 #include <pthread.h>
8568 int
8569 main ()
8570 {
8571 int attr = $attr; return attr /* ; */
8572   ;
8573   return 0;
8574 }
8575 _ACEOF
8576 if ac_fn_c_try_link "$LINENO"; then :
8577   ax_cv_PTHREAD_JOINABLE_ATTR=$attr; break
8578 fi
8579 rm -f core conftest.err conftest.$ac_objext \
8580     conftest$ac_exeext conftest.$ac_ext
8581              done
8582
8583 fi
8584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
8585 $as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
8586         if test "$ax_cv_PTHREAD_JOINABLE_ATTR" != unknown && \
8587                test "$ax_cv_PTHREAD_JOINABLE_ATTR" != PTHREAD_CREATE_JOINABLE; then :
8588
8589 cat >>confdefs.h <<_ACEOF
8590 #define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
8591 _ACEOF
8592
8593 fi
8594
8595         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5
8596 $as_echo_n "checking if more special flags are required for pthreads... " >&6; }
8597 if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
8598   $as_echo_n "(cached) " >&6
8599 else
8600   ax_cv_PTHREAD_SPECIAL_FLAGS=no
8601              ax_pthread_special_flags_added=no
8602              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8603 /* end confdefs.h.  */
8604
8605 #                 if !defined(_REENTRANT) && !defined(_THREAD_SAFE)
8606                   AX_PTHREAD_NEED_SPECIAL_FLAG
8607 #                 endif
8608
8609 _ACEOF
8610 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8611   $EGREP "AX_PTHREAD_NEED_SPECIAL_FLAG" >/dev/null 2>&1; then :
8612   case $host_os in
8613                   aix* | freebsd*)
8614                   ax_cv_PTHREAD_SPECIAL_FLAGS="-D_THREAD_SAFE"
8615                   ;;
8616                   darwin* | hpux* | osf* | solaris*)
8617                   ax_cv_PTHREAD_SPECIAL_FLAGS="-D_REENTRANT"
8618                   ;;
8619                   esac
8620
8621 fi
8622 rm -f conftest*
8623
8624
8625 fi
8626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
8627 $as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
8628         if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
8629                test "x$ax_pthread_special_flags_added" != "xyes"; then :
8630   PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
8631                ax_pthread_special_flags_added=yes
8632 fi
8633
8634         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
8635 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
8636 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
8637   $as_echo_n "(cached) " >&6
8638 else
8639   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8640 /* end confdefs.h.  */
8641 #include <pthread.h>
8642 int
8643 main ()
8644 {
8645 int i = PTHREAD_PRIO_INHERIT;
8646   ;
8647   return 0;
8648 }
8649 _ACEOF
8650 if ac_fn_c_try_link "$LINENO"; then :
8651   ax_cv_PTHREAD_PRIO_INHERIT=yes
8652 else
8653   ax_cv_PTHREAD_PRIO_INHERIT=no
8654 fi
8655 rm -f core conftest.err conftest.$ac_objext \
8656     conftest$ac_exeext conftest.$ac_ext
8657
8658 fi
8659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
8660 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
8661         if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"; then :
8662
8663 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
8664
8665 fi
8666
8667         LIBS="$save_LIBS"
8668         CFLAGS="$save_CFLAGS"
8669
8670         # More AIX lossage: compile with *_r variant
8671         if test "x$GCC" != xyes; then
8672             case $host_os in
8673                 aix*)
8674                 case "x/$CC" in #(
8675   x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
8676     #handle absolute path differently from PATH based program lookup
8677                    case "x$CC" in #(
8678   x/*) :
8679     if as_fn_executable_p ${CC}_r; then :
8680   PTHREAD_CC="${CC}_r"
8681 fi ;; #(
8682   *) :
8683     for ac_prog in ${CC}_r
8684 do
8685   # Extract the first word of "$ac_prog", so it can be a program name with args.
8686 set dummy $ac_prog; ac_word=$2
8687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8688 $as_echo_n "checking for $ac_word... " >&6; }
8689 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
8690   $as_echo_n "(cached) " >&6
8691 else
8692   if test -n "$PTHREAD_CC"; then
8693   ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
8694 else
8695 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8696 for as_dir in $PATH
8697 do
8698   IFS=$as_save_IFS
8699   test -z "$as_dir" && as_dir=.
8700     for ac_exec_ext in '' $ac_executable_extensions; do
8701   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8702     ac_cv_prog_PTHREAD_CC="$ac_prog"
8703     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8704     break 2
8705   fi
8706 done
8707   done
8708 IFS=$as_save_IFS
8709
8710 fi
8711 fi
8712 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
8713 if test -n "$PTHREAD_CC"; then
8714   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
8715 $as_echo "$PTHREAD_CC" >&6; }
8716 else
8717   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8718 $as_echo "no" >&6; }
8719 fi
8720
8721
8722   test -n "$PTHREAD_CC" && break
8723 done
8724 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
8725  ;;
8726 esac ;; #(
8727   *) :
8728      ;;
8729 esac
8730                 ;;
8731             esac
8732         fi
8733 fi
8734
8735 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
8736
8737
8738
8739
8740
8741 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
8742 if test x"$ax_pthread_ok" = xyes; then
8743
8744 $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
8745
8746         :
8747 else
8748         ax_pthread_ok=no
8749
8750 fi
8751 ac_ext=c
8752 ac_cpp='$CPP $CPPFLAGS'
8753 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8754 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8755 ac_compiler_gnu=$ac_cv_c_compiler_gnu
8756
8757         # set thread flags
8758
8759 # Some platforms use these, so just define them.  They can't hurt if they
8760 # are not supported.  For example, on Solaris -D_POSIX_PTHREAD_SEMANTICS
8761 # enables 5-arg getpwuid_r, among other things.
8762 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
8763
8764 # Check for *_r functions
8765 _CFLAGS="$CFLAGS"
8766 _LIBS="$LIBS"
8767 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
8768 LIBS="$LIBS $PTHREAD_LIBS"
8769
8770 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
8771 if test "x$ac_cv_header_pthread_h" = xyes; then :
8772
8773 else
8774   as_fn_error $? "
8775 pthread.h not found;  use --disable-thread-safety to disable thread safety" "$LINENO" 5
8776 fi
8777
8778
8779
8780 for ac_func in strerror_r getpwuid_r gethostbyname_r
8781 do :
8782   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8783 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8784 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
8785   cat >>confdefs.h <<_ACEOF
8786 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
8787 _ACEOF
8788
8789 fi
8790 done
8791
8792
8793 # Do test here with the proper thread flags
8794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns int" >&5
8795 $as_echo_n "checking whether strerror_r returns int... " >&6; }
8796 if ${pgac_cv_func_strerror_r_int+:} false; then :
8797   $as_echo_n "(cached) " >&6
8798 else
8799   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8800 /* end confdefs.h.  */
8801 #include <string.h>
8802 int
8803 main ()
8804 {
8805 #ifndef _AIX
8806 int strerror_r(int, char *, size_t);
8807 #else
8808 /* Older AIX has 'int' for the third argument so we don't test the args. */
8809 int strerror_r();
8810 #endif
8811   ;
8812   return 0;
8813 }
8814 _ACEOF
8815 if ac_fn_c_try_compile "$LINENO"; then :
8816   pgac_cv_func_strerror_r_int=yes
8817 else
8818   pgac_cv_func_strerror_r_int=no
8819 fi
8820 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8821 fi
8822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_strerror_r_int" >&5
8823 $as_echo "$pgac_cv_func_strerror_r_int" >&6; }
8824 if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
8825
8826 $as_echo "#define STRERROR_R_INT 1" >>confdefs.h
8827
8828 fi
8829
8830
8831 CFLAGS="$_CFLAGS"
8832 LIBS="$_LIBS"
8833
8834
8835 else
8836    # else
8837 # do not use values from template file
8838 PTHREAD_CFLAGS=
8839 PTHREAD_LIBS=
8840
8841 fi # fi
8842
8843
8844
8845
8846
8847 ##
8848 ## Libraries
8849 ##
8850 ## Most libraries are included only if they demonstrably provide a function
8851 ## we need, but libm is an exception: always include it, because there are
8852 ## too many compilers that play cute optimization games that will break
8853 ## probes for standard functions such as pow().
8854 ##
8855
8856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
8857 $as_echo_n "checking for main in -lm... " >&6; }
8858 if ${ac_cv_lib_m_main+:} false; then :
8859   $as_echo_n "(cached) " >&6
8860 else
8861   ac_check_lib_save_LIBS=$LIBS
8862 LIBS="-lm  $LIBS"
8863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8864 /* end confdefs.h.  */
8865
8866
8867 int
8868 main ()
8869 {
8870 return main ();
8871   ;
8872   return 0;
8873 }
8874 _ACEOF
8875 if ac_fn_c_try_link "$LINENO"; then :
8876   ac_cv_lib_m_main=yes
8877 else
8878   ac_cv_lib_m_main=no
8879 fi
8880 rm -f core conftest.err conftest.$ac_objext \
8881     conftest$ac_exeext conftest.$ac_ext
8882 LIBS=$ac_check_lib_save_LIBS
8883 fi
8884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
8885 $as_echo "$ac_cv_lib_m_main" >&6; }
8886 if test "x$ac_cv_lib_m_main" = xyes; then :
8887   cat >>confdefs.h <<_ACEOF
8888 #define HAVE_LIBM 1
8889 _ACEOF
8890
8891   LIBS="-lm $LIBS"
8892
8893 fi
8894
8895 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setproctitle" >&5
8896 $as_echo_n "checking for library containing setproctitle... " >&6; }
8897 if ${ac_cv_search_setproctitle+:} false; then :
8898   $as_echo_n "(cached) " >&6
8899 else
8900   ac_func_search_save_LIBS=$LIBS
8901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8902 /* end confdefs.h.  */
8903
8904 /* Override any GCC internal prototype to avoid an error.
8905    Use char because int might match the return type of a GCC
8906    builtin and then its argument prototype would still apply.  */
8907 #ifdef __cplusplus
8908 extern "C"
8909 #endif
8910 char setproctitle ();
8911 int
8912 main ()
8913 {
8914 return setproctitle ();
8915   ;
8916   return 0;
8917 }
8918 _ACEOF
8919 for ac_lib in '' util; do
8920   if test -z "$ac_lib"; then
8921     ac_res="none required"
8922   else
8923     ac_res=-l$ac_lib
8924     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8925   fi
8926   if ac_fn_c_try_link "$LINENO"; then :
8927   ac_cv_search_setproctitle=$ac_res
8928 fi
8929 rm -f core conftest.err conftest.$ac_objext \
8930     conftest$ac_exeext
8931   if ${ac_cv_search_setproctitle+:} false; then :
8932   break
8933 fi
8934 done
8935 if ${ac_cv_search_setproctitle+:} false; then :
8936
8937 else
8938   ac_cv_search_setproctitle=no
8939 fi
8940 rm conftest.$ac_ext
8941 LIBS=$ac_func_search_save_LIBS
8942 fi
8943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setproctitle" >&5
8944 $as_echo "$ac_cv_search_setproctitle" >&6; }
8945 ac_res=$ac_cv_search_setproctitle
8946 if test "$ac_res" != no; then :
8947   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8948
8949 fi
8950
8951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
8952 $as_echo_n "checking for library containing dlopen... " >&6; }
8953 if ${ac_cv_search_dlopen+:} false; then :
8954   $as_echo_n "(cached) " >&6
8955 else
8956   ac_func_search_save_LIBS=$LIBS
8957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8958 /* end confdefs.h.  */
8959
8960 /* Override any GCC internal prototype to avoid an error.
8961    Use char because int might match the return type of a GCC
8962    builtin and then its argument prototype would still apply.  */
8963 #ifdef __cplusplus
8964 extern "C"
8965 #endif
8966 char dlopen ();
8967 int
8968 main ()
8969 {
8970 return dlopen ();
8971   ;
8972   return 0;
8973 }
8974 _ACEOF
8975 for ac_lib in '' dl; do
8976   if test -z "$ac_lib"; then
8977     ac_res="none required"
8978   else
8979     ac_res=-l$ac_lib
8980     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8981   fi
8982   if ac_fn_c_try_link "$LINENO"; then :
8983   ac_cv_search_dlopen=$ac_res
8984 fi
8985 rm -f core conftest.err conftest.$ac_objext \
8986     conftest$ac_exeext
8987   if ${ac_cv_search_dlopen+:} false; then :
8988   break
8989 fi
8990 done
8991 if ${ac_cv_search_dlopen+:} false; then :
8992
8993 else
8994   ac_cv_search_dlopen=no
8995 fi
8996 rm conftest.$ac_ext
8997 LIBS=$ac_func_search_save_LIBS
8998 fi
8999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
9000 $as_echo "$ac_cv_search_dlopen" >&6; }
9001 ac_res=$ac_cv_search_dlopen
9002 if test "$ac_res" != no; then :
9003   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9004
9005 fi
9006
9007 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
9008 $as_echo_n "checking for library containing socket... " >&6; }
9009 if ${ac_cv_search_socket+:} false; then :
9010   $as_echo_n "(cached) " >&6
9011 else
9012   ac_func_search_save_LIBS=$LIBS
9013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9014 /* end confdefs.h.  */
9015
9016 /* Override any GCC internal prototype to avoid an error.
9017    Use char because int might match the return type of a GCC
9018    builtin and then its argument prototype would still apply.  */
9019 #ifdef __cplusplus
9020 extern "C"
9021 #endif
9022 char socket ();
9023 int
9024 main ()
9025 {
9026 return socket ();
9027   ;
9028   return 0;
9029 }
9030 _ACEOF
9031 for ac_lib in '' socket ws2_32; do
9032   if test -z "$ac_lib"; then
9033     ac_res="none required"
9034   else
9035     ac_res=-l$ac_lib
9036     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9037   fi
9038   if ac_fn_c_try_link "$LINENO"; then :
9039   ac_cv_search_socket=$ac_res
9040 fi
9041 rm -f core conftest.err conftest.$ac_objext \
9042     conftest$ac_exeext
9043   if ${ac_cv_search_socket+:} false; then :
9044   break
9045 fi
9046 done
9047 if ${ac_cv_search_socket+:} false; then :
9048
9049 else
9050   ac_cv_search_socket=no
9051 fi
9052 rm conftest.$ac_ext
9053 LIBS=$ac_func_search_save_LIBS
9054 fi
9055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
9056 $as_echo "$ac_cv_search_socket" >&6; }
9057 ac_res=$ac_cv_search_socket
9058 if test "$ac_res" != no; then :
9059   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9060
9061 fi
9062
9063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shl_load" >&5
9064 $as_echo_n "checking for library containing shl_load... " >&6; }
9065 if ${ac_cv_search_shl_load+:} false; then :
9066   $as_echo_n "(cached) " >&6
9067 else
9068   ac_func_search_save_LIBS=$LIBS
9069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9070 /* end confdefs.h.  */
9071
9072 /* Override any GCC internal prototype to avoid an error.
9073    Use char because int might match the return type of a GCC
9074    builtin and then its argument prototype would still apply.  */
9075 #ifdef __cplusplus
9076 extern "C"
9077 #endif
9078 char shl_load ();
9079 int
9080 main ()
9081 {
9082 return shl_load ();
9083   ;
9084   return 0;
9085 }
9086 _ACEOF
9087 for ac_lib in '' dld; do
9088   if test -z "$ac_lib"; then
9089     ac_res="none required"
9090   else
9091     ac_res=-l$ac_lib
9092     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9093   fi
9094   if ac_fn_c_try_link "$LINENO"; then :
9095   ac_cv_search_shl_load=$ac_res
9096 fi
9097 rm -f core conftest.err conftest.$ac_objext \
9098     conftest$ac_exeext
9099   if ${ac_cv_search_shl_load+:} false; then :
9100   break
9101 fi
9102 done
9103 if ${ac_cv_search_shl_load+:} false; then :
9104
9105 else
9106   ac_cv_search_shl_load=no
9107 fi
9108 rm conftest.$ac_ext
9109 LIBS=$ac_func_search_save_LIBS
9110 fi
9111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shl_load" >&5
9112 $as_echo "$ac_cv_search_shl_load" >&6; }
9113 ac_res=$ac_cv_search_shl_load
9114 if test "$ac_res" != no; then :
9115   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9116
9117 fi
9118
9119 # We only use libld in port/dynloader/aix.c
9120 case $host_os in
9121      aix*)
9122         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing ldopen" >&5
9123 $as_echo_n "checking for library containing ldopen... " >&6; }
9124 if ${ac_cv_search_ldopen+:} false; then :
9125   $as_echo_n "(cached) " >&6
9126 else
9127   ac_func_search_save_LIBS=$LIBS
9128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9129 /* end confdefs.h.  */
9130
9131 /* Override any GCC internal prototype to avoid an error.
9132    Use char because int might match the return type of a GCC
9133    builtin and then its argument prototype would still apply.  */
9134 #ifdef __cplusplus
9135 extern "C"
9136 #endif
9137 char ldopen ();
9138 int
9139 main ()
9140 {
9141 return ldopen ();
9142   ;
9143   return 0;
9144 }
9145 _ACEOF
9146 for ac_lib in '' ld; do
9147   if test -z "$ac_lib"; then
9148     ac_res="none required"
9149   else
9150     ac_res=-l$ac_lib
9151     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9152   fi
9153   if ac_fn_c_try_link "$LINENO"; then :
9154   ac_cv_search_ldopen=$ac_res
9155 fi
9156 rm -f core conftest.err conftest.$ac_objext \
9157     conftest$ac_exeext
9158   if ${ac_cv_search_ldopen+:} false; then :
9159   break
9160 fi
9161 done
9162 if ${ac_cv_search_ldopen+:} false; then :
9163
9164 else
9165   ac_cv_search_ldopen=no
9166 fi
9167 rm conftest.$ac_ext
9168 LIBS=$ac_func_search_save_LIBS
9169 fi
9170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_ldopen" >&5
9171 $as_echo "$ac_cv_search_ldopen" >&6; }
9172 ac_res=$ac_cv_search_ldopen
9173 if test "$ac_res" != no; then :
9174   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9175
9176 fi
9177
9178         ;;
9179 esac
9180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getopt_long" >&5
9181 $as_echo_n "checking for library containing getopt_long... " >&6; }
9182 if ${ac_cv_search_getopt_long+:} false; then :
9183   $as_echo_n "(cached) " >&6
9184 else
9185   ac_func_search_save_LIBS=$LIBS
9186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9187 /* end confdefs.h.  */
9188
9189 /* Override any GCC internal prototype to avoid an error.
9190    Use char because int might match the return type of a GCC
9191    builtin and then its argument prototype would still apply.  */
9192 #ifdef __cplusplus
9193 extern "C"
9194 #endif
9195 char getopt_long ();
9196 int
9197 main ()
9198 {
9199 return getopt_long ();
9200   ;
9201   return 0;
9202 }
9203 _ACEOF
9204 for ac_lib in '' getopt gnugetopt; do
9205   if test -z "$ac_lib"; then
9206     ac_res="none required"
9207   else
9208     ac_res=-l$ac_lib
9209     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9210   fi
9211   if ac_fn_c_try_link "$LINENO"; then :
9212   ac_cv_search_getopt_long=$ac_res
9213 fi
9214 rm -f core conftest.err conftest.$ac_objext \
9215     conftest$ac_exeext
9216   if ${ac_cv_search_getopt_long+:} false; then :
9217   break
9218 fi
9219 done
9220 if ${ac_cv_search_getopt_long+:} false; then :
9221
9222 else
9223   ac_cv_search_getopt_long=no
9224 fi
9225 rm conftest.$ac_ext
9226 LIBS=$ac_func_search_save_LIBS
9227 fi
9228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getopt_long" >&5
9229 $as_echo "$ac_cv_search_getopt_long" >&6; }
9230 ac_res=$ac_cv_search_getopt_long
9231 if test "$ac_res" != no; then :
9232   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9233
9234 fi
9235
9236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
9237 $as_echo_n "checking for library containing crypt... " >&6; }
9238 if ${ac_cv_search_crypt+:} false; then :
9239   $as_echo_n "(cached) " >&6
9240 else
9241   ac_func_search_save_LIBS=$LIBS
9242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9243 /* end confdefs.h.  */
9244
9245 /* Override any GCC internal prototype to avoid an error.
9246    Use char because int might match the return type of a GCC
9247    builtin and then its argument prototype would still apply.  */
9248 #ifdef __cplusplus
9249 extern "C"
9250 #endif
9251 char crypt ();
9252 int
9253 main ()
9254 {
9255 return crypt ();
9256   ;
9257   return 0;
9258 }
9259 _ACEOF
9260 for ac_lib in '' crypt; do
9261   if test -z "$ac_lib"; then
9262     ac_res="none required"
9263   else
9264     ac_res=-l$ac_lib
9265     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9266   fi
9267   if ac_fn_c_try_link "$LINENO"; then :
9268   ac_cv_search_crypt=$ac_res
9269 fi
9270 rm -f core conftest.err conftest.$ac_objext \
9271     conftest$ac_exeext
9272   if ${ac_cv_search_crypt+:} false; then :
9273   break
9274 fi
9275 done
9276 if ${ac_cv_search_crypt+:} false; then :
9277
9278 else
9279   ac_cv_search_crypt=no
9280 fi
9281 rm conftest.$ac_ext
9282 LIBS=$ac_func_search_save_LIBS
9283 fi
9284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
9285 $as_echo "$ac_cv_search_crypt" >&6; }
9286 ac_res=$ac_cv_search_crypt
9287 if test "$ac_res" != no; then :
9288   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9289
9290 fi
9291
9292 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
9293 $as_echo_n "checking for library containing shm_open... " >&6; }
9294 if ${ac_cv_search_shm_open+:} false; then :
9295   $as_echo_n "(cached) " >&6
9296 else
9297   ac_func_search_save_LIBS=$LIBS
9298 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9299 /* end confdefs.h.  */
9300
9301 /* Override any GCC internal prototype to avoid an error.
9302    Use char because int might match the return type of a GCC
9303    builtin and then its argument prototype would still apply.  */
9304 #ifdef __cplusplus
9305 extern "C"
9306 #endif
9307 char shm_open ();
9308 int
9309 main ()
9310 {
9311 return shm_open ();
9312   ;
9313   return 0;
9314 }
9315 _ACEOF
9316 for ac_lib in '' rt; do
9317   if test -z "$ac_lib"; then
9318     ac_res="none required"
9319   else
9320     ac_res=-l$ac_lib
9321     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9322   fi
9323   if ac_fn_c_try_link "$LINENO"; then :
9324   ac_cv_search_shm_open=$ac_res
9325 fi
9326 rm -f core conftest.err conftest.$ac_objext \
9327     conftest$ac_exeext
9328   if ${ac_cv_search_shm_open+:} false; then :
9329   break
9330 fi
9331 done
9332 if ${ac_cv_search_shm_open+:} false; then :
9333
9334 else
9335   ac_cv_search_shm_open=no
9336 fi
9337 rm conftest.$ac_ext
9338 LIBS=$ac_func_search_save_LIBS
9339 fi
9340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
9341 $as_echo "$ac_cv_search_shm_open" >&6; }
9342 ac_res=$ac_cv_search_shm_open
9343 if test "$ac_res" != no; then :
9344   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9345
9346 fi
9347
9348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_unlink" >&5
9349 $as_echo_n "checking for library containing shm_unlink... " >&6; }
9350 if ${ac_cv_search_shm_unlink+:} false; then :
9351   $as_echo_n "(cached) " >&6
9352 else
9353   ac_func_search_save_LIBS=$LIBS
9354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9355 /* end confdefs.h.  */
9356
9357 /* Override any GCC internal prototype to avoid an error.
9358    Use char because int might match the return type of a GCC
9359    builtin and then its argument prototype would still apply.  */
9360 #ifdef __cplusplus
9361 extern "C"
9362 #endif
9363 char shm_unlink ();
9364 int
9365 main ()
9366 {
9367 return shm_unlink ();
9368   ;
9369   return 0;
9370 }
9371 _ACEOF
9372 for ac_lib in '' rt; do
9373   if test -z "$ac_lib"; then
9374     ac_res="none required"
9375   else
9376     ac_res=-l$ac_lib
9377     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9378   fi
9379   if ac_fn_c_try_link "$LINENO"; then :
9380   ac_cv_search_shm_unlink=$ac_res
9381 fi
9382 rm -f core conftest.err conftest.$ac_objext \
9383     conftest$ac_exeext
9384   if ${ac_cv_search_shm_unlink+:} false; then :
9385   break
9386 fi
9387 done
9388 if ${ac_cv_search_shm_unlink+:} false; then :
9389
9390 else
9391   ac_cv_search_shm_unlink=no
9392 fi
9393 rm conftest.$ac_ext
9394 LIBS=$ac_func_search_save_LIBS
9395 fi
9396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_unlink" >&5
9397 $as_echo "$ac_cv_search_shm_unlink" >&6; }
9398 ac_res=$ac_cv_search_shm_unlink
9399 if test "$ac_res" != no; then :
9400   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9401
9402 fi
9403
9404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
9405 $as_echo_n "checking for library containing clock_gettime... " >&6; }
9406 if ${ac_cv_search_clock_gettime+:} false; then :
9407   $as_echo_n "(cached) " >&6
9408 else
9409   ac_func_search_save_LIBS=$LIBS
9410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9411 /* end confdefs.h.  */
9412
9413 /* Override any GCC internal prototype to avoid an error.
9414    Use char because int might match the return type of a GCC
9415    builtin and then its argument prototype would still apply.  */
9416 #ifdef __cplusplus
9417 extern "C"
9418 #endif
9419 char clock_gettime ();
9420 int
9421 main ()
9422 {
9423 return clock_gettime ();
9424   ;
9425   return 0;
9426 }
9427 _ACEOF
9428 for ac_lib in '' rt posix4; do
9429   if test -z "$ac_lib"; then
9430     ac_res="none required"
9431   else
9432     ac_res=-l$ac_lib
9433     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9434   fi
9435   if ac_fn_c_try_link "$LINENO"; then :
9436   ac_cv_search_clock_gettime=$ac_res
9437 fi
9438 rm -f core conftest.err conftest.$ac_objext \
9439     conftest$ac_exeext
9440   if ${ac_cv_search_clock_gettime+:} false; then :
9441   break
9442 fi
9443 done
9444 if ${ac_cv_search_clock_gettime+:} false; then :
9445
9446 else
9447   ac_cv_search_clock_gettime=no
9448 fi
9449 rm conftest.$ac_ext
9450 LIBS=$ac_func_search_save_LIBS
9451 fi
9452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
9453 $as_echo "$ac_cv_search_clock_gettime" >&6; }
9454 ac_res=$ac_cv_search_clock_gettime
9455 if test "$ac_res" != no; then :
9456   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9457
9458 fi
9459
9460 # Solaris:
9461 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5
9462 $as_echo_n "checking for library containing fdatasync... " >&6; }
9463 if ${ac_cv_search_fdatasync+:} false; then :
9464   $as_echo_n "(cached) " >&6
9465 else
9466   ac_func_search_save_LIBS=$LIBS
9467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9468 /* end confdefs.h.  */
9469
9470 /* Override any GCC internal prototype to avoid an error.
9471    Use char because int might match the return type of a GCC
9472    builtin and then its argument prototype would still apply.  */
9473 #ifdef __cplusplus
9474 extern "C"
9475 #endif
9476 char fdatasync ();
9477 int
9478 main ()
9479 {
9480 return fdatasync ();
9481   ;
9482   return 0;
9483 }
9484 _ACEOF
9485 for ac_lib in '' rt posix4; do
9486   if test -z "$ac_lib"; then
9487     ac_res="none required"
9488   else
9489     ac_res=-l$ac_lib
9490     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9491   fi
9492   if ac_fn_c_try_link "$LINENO"; then :
9493   ac_cv_search_fdatasync=$ac_res
9494 fi
9495 rm -f core conftest.err conftest.$ac_objext \
9496     conftest$ac_exeext
9497   if ${ac_cv_search_fdatasync+:} false; then :
9498   break
9499 fi
9500 done
9501 if ${ac_cv_search_fdatasync+:} false; then :
9502
9503 else
9504   ac_cv_search_fdatasync=no
9505 fi
9506 rm conftest.$ac_ext
9507 LIBS=$ac_func_search_save_LIBS
9508 fi
9509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5
9510 $as_echo "$ac_cv_search_fdatasync" >&6; }
9511 ac_res=$ac_cv_search_fdatasync
9512 if test "$ac_res" != no; then :
9513   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9514
9515 fi
9516
9517 # Required for thread_test.c on Solaris
9518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sched_yield" >&5
9519 $as_echo_n "checking for library containing sched_yield... " >&6; }
9520 if ${ac_cv_search_sched_yield+:} false; then :
9521   $as_echo_n "(cached) " >&6
9522 else
9523   ac_func_search_save_LIBS=$LIBS
9524 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9525 /* end confdefs.h.  */
9526
9527 /* Override any GCC internal prototype to avoid an error.
9528    Use char because int might match the return type of a GCC
9529    builtin and then its argument prototype would still apply.  */
9530 #ifdef __cplusplus
9531 extern "C"
9532 #endif
9533 char sched_yield ();
9534 int
9535 main ()
9536 {
9537 return sched_yield ();
9538   ;
9539   return 0;
9540 }
9541 _ACEOF
9542 for ac_lib in '' rt; do
9543   if test -z "$ac_lib"; then
9544     ac_res="none required"
9545   else
9546     ac_res=-l$ac_lib
9547     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9548   fi
9549   if ac_fn_c_try_link "$LINENO"; then :
9550   ac_cv_search_sched_yield=$ac_res
9551 fi
9552 rm -f core conftest.err conftest.$ac_objext \
9553     conftest$ac_exeext
9554   if ${ac_cv_search_sched_yield+:} false; then :
9555   break
9556 fi
9557 done
9558 if ${ac_cv_search_sched_yield+:} false; then :
9559
9560 else
9561   ac_cv_search_sched_yield=no
9562 fi
9563 rm conftest.$ac_ext
9564 LIBS=$ac_func_search_save_LIBS
9565 fi
9566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sched_yield" >&5
9567 $as_echo "$ac_cv_search_sched_yield" >&6; }
9568 ac_res=$ac_cv_search_sched_yield
9569 if test "$ac_res" != no; then :
9570   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9571
9572 fi
9573
9574 # Required for thread_test.c on Solaris 2.5:
9575 # Other ports use it too (HP-UX) so test unconditionally
9576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname_r" >&5
9577 $as_echo_n "checking for library containing gethostbyname_r... " >&6; }
9578 if ${ac_cv_search_gethostbyname_r+:} false; then :
9579   $as_echo_n "(cached) " >&6
9580 else
9581   ac_func_search_save_LIBS=$LIBS
9582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9583 /* end confdefs.h.  */
9584
9585 /* Override any GCC internal prototype to avoid an error.
9586    Use char because int might match the return type of a GCC
9587    builtin and then its argument prototype would still apply.  */
9588 #ifdef __cplusplus
9589 extern "C"
9590 #endif
9591 char gethostbyname_r ();
9592 int
9593 main ()
9594 {
9595 return gethostbyname_r ();
9596   ;
9597   return 0;
9598 }
9599 _ACEOF
9600 for ac_lib in '' nsl; do
9601   if test -z "$ac_lib"; then
9602     ac_res="none required"
9603   else
9604     ac_res=-l$ac_lib
9605     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9606   fi
9607   if ac_fn_c_try_link "$LINENO"; then :
9608   ac_cv_search_gethostbyname_r=$ac_res
9609 fi
9610 rm -f core conftest.err conftest.$ac_objext \
9611     conftest$ac_exeext
9612   if ${ac_cv_search_gethostbyname_r+:} false; then :
9613   break
9614 fi
9615 done
9616 if ${ac_cv_search_gethostbyname_r+:} false; then :
9617
9618 else
9619   ac_cv_search_gethostbyname_r=no
9620 fi
9621 rm conftest.$ac_ext
9622 LIBS=$ac_func_search_save_LIBS
9623 fi
9624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname_r" >&5
9625 $as_echo "$ac_cv_search_gethostbyname_r" >&6; }
9626 ac_res=$ac_cv_search_gethostbyname_r
9627 if test "$ac_res" != no; then :
9628   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9629
9630 fi
9631
9632 # Cygwin:
9633 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shmget" >&5
9634 $as_echo_n "checking for library containing shmget... " >&6; }
9635 if ${ac_cv_search_shmget+:} false; then :
9636   $as_echo_n "(cached) " >&6
9637 else
9638   ac_func_search_save_LIBS=$LIBS
9639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9640 /* end confdefs.h.  */
9641
9642 /* Override any GCC internal prototype to avoid an error.
9643    Use char because int might match the return type of a GCC
9644    builtin and then its argument prototype would still apply.  */
9645 #ifdef __cplusplus
9646 extern "C"
9647 #endif
9648 char shmget ();
9649 int
9650 main ()
9651 {
9652 return shmget ();
9653   ;
9654   return 0;
9655 }
9656 _ACEOF
9657 for ac_lib in '' cygipc; do
9658   if test -z "$ac_lib"; then
9659     ac_res="none required"
9660   else
9661     ac_res=-l$ac_lib
9662     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9663   fi
9664   if ac_fn_c_try_link "$LINENO"; then :
9665   ac_cv_search_shmget=$ac_res
9666 fi
9667 rm -f core conftest.err conftest.$ac_objext \
9668     conftest$ac_exeext
9669   if ${ac_cv_search_shmget+:} false; then :
9670   break
9671 fi
9672 done
9673 if ${ac_cv_search_shmget+:} false; then :
9674
9675 else
9676   ac_cv_search_shmget=no
9677 fi
9678 rm conftest.$ac_ext
9679 LIBS=$ac_func_search_save_LIBS
9680 fi
9681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shmget" >&5
9682 $as_echo "$ac_cv_search_shmget" >&6; }
9683 ac_res=$ac_cv_search_shmget
9684 if test "$ac_res" != no; then :
9685   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9686
9687 fi
9688
9689
9690 if test "$with_readline" = yes; then
9691
9692
9693 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing readline" >&5
9694 $as_echo_n "checking for library containing readline... " >&6; }
9695 if ${pgac_cv_check_readline+:} false; then :
9696   $as_echo_n "(cached) " >&6
9697 else
9698   pgac_cv_check_readline=no
9699 pgac_save_LIBS=$LIBS
9700 if test x"$with_libedit_preferred" != x"yes"
9701 then    READLINE_ORDER="-lreadline -ledit"
9702 else    READLINE_ORDER="-ledit -lreadline"
9703 fi
9704 for pgac_rllib in $READLINE_ORDER ; do
9705   for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
9706     LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
9707     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9708 /* end confdefs.h.  */
9709
9710 /* Override any GCC internal prototype to avoid an error.
9711    Use char because int might match the return type of a GCC
9712    builtin and then its argument prototype would still apply.  */
9713 #ifdef __cplusplus
9714 extern "C"
9715 #endif
9716 char readline ();
9717 int
9718 main ()
9719 {
9720 return readline ();
9721   ;
9722   return 0;
9723 }
9724 _ACEOF
9725 if ac_fn_c_try_link "$LINENO"; then :
9726
9727       # Older NetBSD, OpenBSD, and Irix have a broken linker that does not
9728       # recognize dependent libraries; assume curses is needed if we didn't
9729       # find any dependency.
9730       case $host_os in
9731         netbsd* | openbsd* | irix*)
9732           if test x"$pgac_lib" = x"" ; then
9733             pgac_lib=" -lcurses"
9734           fi ;;
9735       esac
9736
9737       pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
9738       break
9739
9740 fi
9741 rm -f core conftest.err conftest.$ac_objext \
9742     conftest$ac_exeext conftest.$ac_ext
9743   done
9744   if test "$pgac_cv_check_readline" != no ; then
9745     break
9746   fi
9747 done
9748 LIBS=$pgac_save_LIBS
9749
9750 fi
9751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_readline" >&5
9752 $as_echo "$pgac_cv_check_readline" >&6; }
9753 if test "$pgac_cv_check_readline" != no ; then
9754   LIBS="$pgac_cv_check_readline $LIBS"
9755
9756 $as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
9757
9758 fi
9759
9760
9761   if test x"$pgac_cv_check_readline" = x"no"; then
9762     as_fn_error $? "readline library not found
9763 If you have readline already installed, see config.log for details on the
9764 failure.  It is possible the compiler isn't looking in the proper directory.
9765 Use --without-readline to disable readline support." "$LINENO" 5
9766   fi
9767 fi
9768
9769 if test "$with_zlib" = yes; then
9770   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5
9771 $as_echo_n "checking for inflate in -lz... " >&6; }
9772 if ${ac_cv_lib_z_inflate+:} false; then :
9773   $as_echo_n "(cached) " >&6
9774 else
9775   ac_check_lib_save_LIBS=$LIBS
9776 LIBS="-lz  $LIBS"
9777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9778 /* end confdefs.h.  */
9779
9780 /* Override any GCC internal prototype to avoid an error.
9781    Use char because int might match the return type of a GCC
9782    builtin and then its argument prototype would still apply.  */
9783 #ifdef __cplusplus
9784 extern "C"
9785 #endif
9786 char inflate ();
9787 int
9788 main ()
9789 {
9790 return inflate ();
9791   ;
9792   return 0;
9793 }
9794 _ACEOF
9795 if ac_fn_c_try_link "$LINENO"; then :
9796   ac_cv_lib_z_inflate=yes
9797 else
9798   ac_cv_lib_z_inflate=no
9799 fi
9800 rm -f core conftest.err conftest.$ac_objext \
9801     conftest$ac_exeext conftest.$ac_ext
9802 LIBS=$ac_check_lib_save_LIBS
9803 fi
9804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5
9805 $as_echo "$ac_cv_lib_z_inflate" >&6; }
9806 if test "x$ac_cv_lib_z_inflate" = xyes; then :
9807   cat >>confdefs.h <<_ACEOF
9808 #define HAVE_LIBZ 1
9809 _ACEOF
9810
9811   LIBS="-lz $LIBS"
9812
9813 else
9814   as_fn_error $? "zlib library not found
9815 If you have zlib already installed, see config.log for details on the
9816 failure.  It is possible the compiler isn't looking in the proper directory.
9817 Use --without-zlib to disable zlib support." "$LINENO" 5
9818 fi
9819
9820 fi
9821
9822 if test "$enable_spinlocks" = yes; then
9823
9824 $as_echo "#define HAVE_SPINLOCKS 1" >>confdefs.h
9825
9826 else
9827   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9828 *** Not using spinlocks will cause poor performance." >&5
9829 $as_echo "$as_me: WARNING:
9830 *** Not using spinlocks will cause poor performance." >&2;}
9831 fi
9832
9833 if test "$enable_atomics" = yes; then
9834
9835 $as_echo "#define HAVE_ATOMICS 1" >>confdefs.h
9836
9837 else
9838   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9839 *** Not using atomic operations will cause poor performance." >&5
9840 $as_echo "$as_me: WARNING:
9841 *** Not using atomic operations will cause poor performance." >&2;}
9842 fi
9843
9844 if test "$with_gssapi" = yes ; then
9845   if test "$PORTNAME" != "win32"; then
9846     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gss_init_sec_context" >&5
9847 $as_echo_n "checking for library containing gss_init_sec_context... " >&6; }
9848 if ${ac_cv_search_gss_init_sec_context+:} false; then :
9849   $as_echo_n "(cached) " >&6
9850 else
9851   ac_func_search_save_LIBS=$LIBS
9852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9853 /* end confdefs.h.  */
9854
9855 /* Override any GCC internal prototype to avoid an error.
9856    Use char because int might match the return type of a GCC
9857    builtin and then its argument prototype would still apply.  */
9858 #ifdef __cplusplus
9859 extern "C"
9860 #endif
9861 char gss_init_sec_context ();
9862 int
9863 main ()
9864 {
9865 return gss_init_sec_context ();
9866   ;
9867   return 0;
9868 }
9869 _ACEOF
9870 for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'; do
9871   if test -z "$ac_lib"; then
9872     ac_res="none required"
9873   else
9874     ac_res=-l$ac_lib
9875     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9876   fi
9877   if ac_fn_c_try_link "$LINENO"; then :
9878   ac_cv_search_gss_init_sec_context=$ac_res
9879 fi
9880 rm -f core conftest.err conftest.$ac_objext \
9881     conftest$ac_exeext
9882   if ${ac_cv_search_gss_init_sec_context+:} false; then :
9883   break
9884 fi
9885 done
9886 if ${ac_cv_search_gss_init_sec_context+:} false; then :
9887
9888 else
9889   ac_cv_search_gss_init_sec_context=no
9890 fi
9891 rm conftest.$ac_ext
9892 LIBS=$ac_func_search_save_LIBS
9893 fi
9894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gss_init_sec_context" >&5
9895 $as_echo "$ac_cv_search_gss_init_sec_context" >&6; }
9896 ac_res=$ac_cv_search_gss_init_sec_context
9897 if test "$ac_res" != no; then :
9898   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9899
9900 else
9901   as_fn_error $? "could not find function 'gss_init_sec_context' required for GSSAPI" "$LINENO" 5
9902 fi
9903
9904   else
9905     LIBS="$LIBS -lgssapi32"
9906   fi
9907 fi
9908
9909 if test "$with_openssl" = yes ; then
9910     if test "$PORTNAME" != "win32"; then
9911      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_new_ex_data in -lcrypto" >&5
9912 $as_echo_n "checking for CRYPTO_new_ex_data in -lcrypto... " >&6; }
9913 if ${ac_cv_lib_crypto_CRYPTO_new_ex_data+:} false; then :
9914   $as_echo_n "(cached) " >&6
9915 else
9916   ac_check_lib_save_LIBS=$LIBS
9917 LIBS="-lcrypto  $LIBS"
9918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9919 /* end confdefs.h.  */
9920
9921 /* Override any GCC internal prototype to avoid an error.
9922    Use char because int might match the return type of a GCC
9923    builtin and then its argument prototype would still apply.  */
9924 #ifdef __cplusplus
9925 extern "C"
9926 #endif
9927 char CRYPTO_new_ex_data ();
9928 int
9929 main ()
9930 {
9931 return CRYPTO_new_ex_data ();
9932   ;
9933   return 0;
9934 }
9935 _ACEOF
9936 if ac_fn_c_try_link "$LINENO"; then :
9937   ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
9938 else
9939   ac_cv_lib_crypto_CRYPTO_new_ex_data=no
9940 fi
9941 rm -f core conftest.err conftest.$ac_objext \
9942     conftest$ac_exeext conftest.$ac_ext
9943 LIBS=$ac_check_lib_save_LIBS
9944 fi
9945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
9946 $as_echo "$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6; }
9947 if test "x$ac_cv_lib_crypto_CRYPTO_new_ex_data" = xyes; then :
9948   cat >>confdefs.h <<_ACEOF
9949 #define HAVE_LIBCRYPTO 1
9950 _ACEOF
9951
9952   LIBS="-lcrypto $LIBS"
9953
9954 else
9955   as_fn_error $? "library 'crypto' is required for OpenSSL" "$LINENO" 5
9956 fi
9957
9958      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl" >&5
9959 $as_echo_n "checking for SSL_new in -lssl... " >&6; }
9960 if ${ac_cv_lib_ssl_SSL_new+:} false; then :
9961   $as_echo_n "(cached) " >&6
9962 else
9963   ac_check_lib_save_LIBS=$LIBS
9964 LIBS="-lssl  $LIBS"
9965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9966 /* end confdefs.h.  */
9967
9968 /* Override any GCC internal prototype to avoid an error.
9969    Use char because int might match the return type of a GCC
9970    builtin and then its argument prototype would still apply.  */
9971 #ifdef __cplusplus
9972 extern "C"
9973 #endif
9974 char SSL_new ();
9975 int
9976 main ()
9977 {
9978 return SSL_new ();
9979   ;
9980   return 0;
9981 }
9982 _ACEOF
9983 if ac_fn_c_try_link "$LINENO"; then :
9984   ac_cv_lib_ssl_SSL_new=yes
9985 else
9986   ac_cv_lib_ssl_SSL_new=no
9987 fi
9988 rm -f core conftest.err conftest.$ac_objext \
9989     conftest$ac_exeext conftest.$ac_ext
9990 LIBS=$ac_check_lib_save_LIBS
9991 fi
9992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_new" >&5
9993 $as_echo "$ac_cv_lib_ssl_SSL_new" >&6; }
9994 if test "x$ac_cv_lib_ssl_SSL_new" = xyes; then :
9995   cat >>confdefs.h <<_ACEOF
9996 #define HAVE_LIBSSL 1
9997 _ACEOF
9998
9999   LIBS="-lssl $LIBS"
10000
10001 else
10002   as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5
10003 fi
10004
10005   else
10006      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing CRYPTO_new_ex_data" >&5
10007 $as_echo_n "checking for library containing CRYPTO_new_ex_data... " >&6; }
10008 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
10009   $as_echo_n "(cached) " >&6
10010 else
10011   ac_func_search_save_LIBS=$LIBS
10012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10013 /* end confdefs.h.  */
10014
10015 /* Override any GCC internal prototype to avoid an error.
10016    Use char because int might match the return type of a GCC
10017    builtin and then its argument prototype would still apply.  */
10018 #ifdef __cplusplus
10019 extern "C"
10020 #endif
10021 char CRYPTO_new_ex_data ();
10022 int
10023 main ()
10024 {
10025 return CRYPTO_new_ex_data ();
10026   ;
10027   return 0;
10028 }
10029 _ACEOF
10030 for ac_lib in '' eay32 crypto; do
10031   if test -z "$ac_lib"; then
10032     ac_res="none required"
10033   else
10034     ac_res=-l$ac_lib
10035     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10036   fi
10037   if ac_fn_c_try_link "$LINENO"; then :
10038   ac_cv_search_CRYPTO_new_ex_data=$ac_res
10039 fi
10040 rm -f core conftest.err conftest.$ac_objext \
10041     conftest$ac_exeext
10042   if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
10043   break
10044 fi
10045 done
10046 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
10047
10048 else
10049   ac_cv_search_CRYPTO_new_ex_data=no
10050 fi
10051 rm conftest.$ac_ext
10052 LIBS=$ac_func_search_save_LIBS
10053 fi
10054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_CRYPTO_new_ex_data" >&5
10055 $as_echo "$ac_cv_search_CRYPTO_new_ex_data" >&6; }
10056 ac_res=$ac_cv_search_CRYPTO_new_ex_data
10057 if test "$ac_res" != no; then :
10058   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10059
10060 else
10061   as_fn_error $? "library 'eay32' or 'crypto' is required for OpenSSL" "$LINENO" 5
10062 fi
10063
10064      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_new" >&5
10065 $as_echo_n "checking for library containing SSL_new... " >&6; }
10066 if ${ac_cv_search_SSL_new+:} false; then :
10067   $as_echo_n "(cached) " >&6
10068 else
10069   ac_func_search_save_LIBS=$LIBS
10070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10071 /* end confdefs.h.  */
10072
10073 /* Override any GCC internal prototype to avoid an error.
10074    Use char because int might match the return type of a GCC
10075    builtin and then its argument prototype would still apply.  */
10076 #ifdef __cplusplus
10077 extern "C"
10078 #endif
10079 char SSL_new ();
10080 int
10081 main ()
10082 {
10083 return SSL_new ();
10084   ;
10085   return 0;
10086 }
10087 _ACEOF
10088 for ac_lib in '' ssleay32 ssl; do
10089   if test -z "$ac_lib"; then
10090     ac_res="none required"
10091   else
10092     ac_res=-l$ac_lib
10093     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10094   fi
10095   if ac_fn_c_try_link "$LINENO"; then :
10096   ac_cv_search_SSL_new=$ac_res
10097 fi
10098 rm -f core conftest.err conftest.$ac_objext \
10099     conftest$ac_exeext
10100   if ${ac_cv_search_SSL_new+:} false; then :
10101   break
10102 fi
10103 done
10104 if ${ac_cv_search_SSL_new+:} false; then :
10105
10106 else
10107   ac_cv_search_SSL_new=no
10108 fi
10109 rm conftest.$ac_ext
10110 LIBS=$ac_func_search_save_LIBS
10111 fi
10112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_new" >&5
10113 $as_echo "$ac_cv_search_SSL_new" >&6; }
10114 ac_res=$ac_cv_search_SSL_new
10115 if test "$ac_res" != no; then :
10116   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10117
10118 else
10119   as_fn_error $? "library 'ssleay32' or 'ssl' is required for OpenSSL" "$LINENO" 5
10120 fi
10121
10122   fi
10123   for ac_func in SSL_get_current_compression
10124 do :
10125   ac_fn_c_check_func "$LINENO" "SSL_get_current_compression" "ac_cv_func_SSL_get_current_compression"
10126 if test "x$ac_cv_func_SSL_get_current_compression" = xyes; then :
10127   cat >>confdefs.h <<_ACEOF
10128 #define HAVE_SSL_GET_CURRENT_COMPRESSION 1
10129 _ACEOF
10130
10131 fi
10132 done
10133
10134   # Functions introduced in OpenSSL 1.1.0. We used to check for
10135   # OPENSSL_VERSION_NUMBER, but that didn't work with 1.1.0, because LibreSSL
10136   # defines OPENSSL_VERSION_NUMBER to claim version 2.0.0, even though it
10137   # doesn't have these OpenSSL 1.1.0 functions. So check for individual
10138   # functions.
10139   for ac_func in OPENSSL_init_ssl BIO_get_data BIO_meth_new ASN1_STRING_get0_data RAND_OpenSSL
10140 do :
10141   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10142 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10143 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
10144   cat >>confdefs.h <<_ACEOF
10145 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10146 _ACEOF
10147
10148 fi
10149 done
10150
10151   # OpenSSL versions before 1.1.0 required setting callback functions, for
10152   # thread-safety. In 1.1.0, it's no longer required, and CRYPTO_lock()
10153   # function was removed.
10154   for ac_func in CRYPTO_lock
10155 do :
10156   ac_fn_c_check_func "$LINENO" "CRYPTO_lock" "ac_cv_func_CRYPTO_lock"
10157 if test "x$ac_cv_func_CRYPTO_lock" = xyes; then :
10158   cat >>confdefs.h <<_ACEOF
10159 #define HAVE_CRYPTO_LOCK 1
10160 _ACEOF
10161
10162 fi
10163 done
10164
10165 fi
10166
10167 if test "$with_pam" = yes ; then
10168   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_start in -lpam" >&5
10169 $as_echo_n "checking for pam_start in -lpam... " >&6; }
10170 if ${ac_cv_lib_pam_pam_start+:} false; then :
10171   $as_echo_n "(cached) " >&6
10172 else
10173   ac_check_lib_save_LIBS=$LIBS
10174 LIBS="-lpam  $LIBS"
10175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10176 /* end confdefs.h.  */
10177
10178 /* Override any GCC internal prototype to avoid an error.
10179    Use char because int might match the return type of a GCC
10180    builtin and then its argument prototype would still apply.  */
10181 #ifdef __cplusplus
10182 extern "C"
10183 #endif
10184 char pam_start ();
10185 int
10186 main ()
10187 {
10188 return pam_start ();
10189   ;
10190   return 0;
10191 }
10192 _ACEOF
10193 if ac_fn_c_try_link "$LINENO"; then :
10194   ac_cv_lib_pam_pam_start=yes
10195 else
10196   ac_cv_lib_pam_pam_start=no
10197 fi
10198 rm -f core conftest.err conftest.$ac_objext \
10199     conftest$ac_exeext conftest.$ac_ext
10200 LIBS=$ac_check_lib_save_LIBS
10201 fi
10202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_start" >&5
10203 $as_echo "$ac_cv_lib_pam_pam_start" >&6; }
10204 if test "x$ac_cv_lib_pam_pam_start" = xyes; then :
10205   cat >>confdefs.h <<_ACEOF
10206 #define HAVE_LIBPAM 1
10207 _ACEOF
10208
10209   LIBS="-lpam $LIBS"
10210
10211 else
10212   as_fn_error $? "library 'pam' is required for PAM" "$LINENO" 5
10213 fi
10214
10215 fi
10216
10217 if test "$with_libxml" = yes ; then
10218   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlSaveToBuffer in -lxml2" >&5
10219 $as_echo_n "checking for xmlSaveToBuffer in -lxml2... " >&6; }
10220 if ${ac_cv_lib_xml2_xmlSaveToBuffer+:} false; then :
10221   $as_echo_n "(cached) " >&6
10222 else
10223   ac_check_lib_save_LIBS=$LIBS
10224 LIBS="-lxml2  $LIBS"
10225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10226 /* end confdefs.h.  */
10227
10228 /* Override any GCC internal prototype to avoid an error.
10229    Use char because int might match the return type of a GCC
10230    builtin and then its argument prototype would still apply.  */
10231 #ifdef __cplusplus
10232 extern "C"
10233 #endif
10234 char xmlSaveToBuffer ();
10235 int
10236 main ()
10237 {
10238 return xmlSaveToBuffer ();
10239   ;
10240   return 0;
10241 }
10242 _ACEOF
10243 if ac_fn_c_try_link "$LINENO"; then :
10244   ac_cv_lib_xml2_xmlSaveToBuffer=yes
10245 else
10246   ac_cv_lib_xml2_xmlSaveToBuffer=no
10247 fi
10248 rm -f core conftest.err conftest.$ac_objext \
10249     conftest$ac_exeext conftest.$ac_ext
10250 LIBS=$ac_check_lib_save_LIBS
10251 fi
10252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlSaveToBuffer" >&5
10253 $as_echo "$ac_cv_lib_xml2_xmlSaveToBuffer" >&6; }
10254 if test "x$ac_cv_lib_xml2_xmlSaveToBuffer" = xyes; then :
10255   cat >>confdefs.h <<_ACEOF
10256 #define HAVE_LIBXML2 1
10257 _ACEOF
10258
10259   LIBS="-lxml2 $LIBS"
10260
10261 else
10262   as_fn_error $? "library 'xml2' (version >= 2.6.23) is required for XML support" "$LINENO" 5
10263 fi
10264
10265 fi
10266
10267 if test "$with_libxslt" = yes ; then
10268   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xsltCleanupGlobals in -lxslt" >&5
10269 $as_echo_n "checking for xsltCleanupGlobals in -lxslt... " >&6; }
10270 if ${ac_cv_lib_xslt_xsltCleanupGlobals+:} false; then :
10271   $as_echo_n "(cached) " >&6
10272 else
10273   ac_check_lib_save_LIBS=$LIBS
10274 LIBS="-lxslt  $LIBS"
10275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10276 /* end confdefs.h.  */
10277
10278 /* Override any GCC internal prototype to avoid an error.
10279    Use char because int might match the return type of a GCC
10280    builtin and then its argument prototype would still apply.  */
10281 #ifdef __cplusplus
10282 extern "C"
10283 #endif
10284 char xsltCleanupGlobals ();
10285 int
10286 main ()
10287 {
10288 return xsltCleanupGlobals ();
10289   ;
10290   return 0;
10291 }
10292 _ACEOF
10293 if ac_fn_c_try_link "$LINENO"; then :
10294   ac_cv_lib_xslt_xsltCleanupGlobals=yes
10295 else
10296   ac_cv_lib_xslt_xsltCleanupGlobals=no
10297 fi
10298 rm -f core conftest.err conftest.$ac_objext \
10299     conftest$ac_exeext conftest.$ac_ext
10300 LIBS=$ac_check_lib_save_LIBS
10301 fi
10302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xslt_xsltCleanupGlobals" >&5
10303 $as_echo "$ac_cv_lib_xslt_xsltCleanupGlobals" >&6; }
10304 if test "x$ac_cv_lib_xslt_xsltCleanupGlobals" = xyes; then :
10305   cat >>confdefs.h <<_ACEOF
10306 #define HAVE_LIBXSLT 1
10307 _ACEOF
10308
10309   LIBS="-lxslt $LIBS"
10310
10311 else
10312   as_fn_error $? "library 'xslt' is required for XSLT support" "$LINENO" 5
10313 fi
10314
10315 fi
10316
10317 # Note: We can test for libldap_r only after we know PTHREAD_LIBS
10318 if test "$with_ldap" = yes ; then
10319   _LIBS="$LIBS"
10320   if test "$PORTNAME" != "win32"; then
10321     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap" >&5
10322 $as_echo_n "checking for ldap_bind in -lldap... " >&6; }
10323 if ${ac_cv_lib_ldap_ldap_bind+:} false; then :
10324   $as_echo_n "(cached) " >&6
10325 else
10326   ac_check_lib_save_LIBS=$LIBS
10327 LIBS="-lldap $EXTRA_LDAP_LIBS $LIBS"
10328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10329 /* end confdefs.h.  */
10330
10331 /* Override any GCC internal prototype to avoid an error.
10332    Use char because int might match the return type of a GCC
10333    builtin and then its argument prototype would still apply.  */
10334 #ifdef __cplusplus
10335 extern "C"
10336 #endif
10337 char ldap_bind ();
10338 int
10339 main ()
10340 {
10341 return ldap_bind ();
10342   ;
10343   return 0;
10344 }
10345 _ACEOF
10346 if ac_fn_c_try_link "$LINENO"; then :
10347   ac_cv_lib_ldap_ldap_bind=yes
10348 else
10349   ac_cv_lib_ldap_ldap_bind=no
10350 fi
10351 rm -f core conftest.err conftest.$ac_objext \
10352     conftest$ac_exeext conftest.$ac_ext
10353 LIBS=$ac_check_lib_save_LIBS
10354 fi
10355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_ldap_bind" >&5
10356 $as_echo "$ac_cv_lib_ldap_ldap_bind" >&6; }
10357 if test "x$ac_cv_lib_ldap_ldap_bind" = xyes; then :
10358   cat >>confdefs.h <<_ACEOF
10359 #define HAVE_LIBLDAP 1
10360 _ACEOF
10361
10362   LIBS="-lldap $LIBS"
10363
10364 else
10365   as_fn_error $? "library 'ldap' is required for LDAP" "$LINENO" 5
10366 fi
10367
10368     LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
10369     if test "$enable_thread_safety" = yes; then
10370       # on some platforms ldap_r fails to link without PTHREAD_LIBS
10371       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_simple_bind in -lldap_r" >&5
10372 $as_echo_n "checking for ldap_simple_bind in -lldap_r... " >&6; }
10373 if ${ac_cv_lib_ldap_r_ldap_simple_bind+:} false; then :
10374   $as_echo_n "(cached) " >&6
10375 else
10376   ac_check_lib_save_LIBS=$LIBS
10377 LIBS="-lldap_r $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
10378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10379 /* end confdefs.h.  */
10380
10381 /* Override any GCC internal prototype to avoid an error.
10382    Use char because int might match the return type of a GCC
10383    builtin and then its argument prototype would still apply.  */
10384 #ifdef __cplusplus
10385 extern "C"
10386 #endif
10387 char ldap_simple_bind ();
10388 int
10389 main ()
10390 {
10391 return ldap_simple_bind ();
10392   ;
10393   return 0;
10394 }
10395 _ACEOF
10396 if ac_fn_c_try_link "$LINENO"; then :
10397   ac_cv_lib_ldap_r_ldap_simple_bind=yes
10398 else
10399   ac_cv_lib_ldap_r_ldap_simple_bind=no
10400 fi
10401 rm -f core conftest.err conftest.$ac_objext \
10402     conftest$ac_exeext conftest.$ac_ext
10403 LIBS=$ac_check_lib_save_LIBS
10404 fi
10405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_r_ldap_simple_bind" >&5
10406 $as_echo "$ac_cv_lib_ldap_r_ldap_simple_bind" >&6; }
10407 if test "x$ac_cv_lib_ldap_r_ldap_simple_bind" = xyes; then :
10408   cat >>confdefs.h <<_ACEOF
10409 #define HAVE_LIBLDAP_R 1
10410 _ACEOF
10411
10412   LIBS="-lldap_r $LIBS"
10413
10414 else
10415   as_fn_error $? "library 'ldap_r' is required for LDAP" "$LINENO" 5
10416 fi
10417
10418       LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
10419     else
10420       LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
10421     fi
10422   else
10423     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lwldap32" >&5
10424 $as_echo_n "checking for ldap_bind in -lwldap32... " >&6; }
10425 if ${ac_cv_lib_wldap32_ldap_bind+:} false; then :
10426   $as_echo_n "(cached) " >&6
10427 else
10428   ac_check_lib_save_LIBS=$LIBS
10429 LIBS="-lwldap32  $LIBS"
10430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10431 /* end confdefs.h.  */
10432
10433 /* Override any GCC internal prototype to avoid an error.
10434    Use char because int might match the return type of a GCC
10435    builtin and then its argument prototype would still apply.  */
10436 #ifdef __cplusplus
10437 extern "C"
10438 #endif
10439 char ldap_bind ();
10440 int
10441 main ()
10442 {
10443 return ldap_bind ();
10444   ;
10445   return 0;
10446 }
10447 _ACEOF
10448 if ac_fn_c_try_link "$LINENO"; then :
10449   ac_cv_lib_wldap32_ldap_bind=yes
10450 else
10451   ac_cv_lib_wldap32_ldap_bind=no
10452 fi
10453 rm -f core conftest.err conftest.$ac_objext \
10454     conftest$ac_exeext conftest.$ac_ext
10455 LIBS=$ac_check_lib_save_LIBS
10456 fi
10457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wldap32_ldap_bind" >&5
10458 $as_echo "$ac_cv_lib_wldap32_ldap_bind" >&6; }
10459 if test "x$ac_cv_lib_wldap32_ldap_bind" = xyes; then :
10460   cat >>confdefs.h <<_ACEOF
10461 #define HAVE_LIBWLDAP32 1
10462 _ACEOF
10463
10464   LIBS="-lwldap32 $LIBS"
10465
10466 else
10467   as_fn_error $? "library 'wldap32' is required for LDAP" "$LINENO" 5
10468 fi
10469
10470     LDAP_LIBS_FE="-lwldap32"
10471     LDAP_LIBS_BE="-lwldap32"
10472   fi
10473   LIBS="$_LIBS"
10474 fi
10475
10476
10477
10478 # for contrib/sepgsql
10479 if test "$with_selinux" = yes; then
10480   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_compute_create_name in -lselinux" >&5
10481 $as_echo_n "checking for security_compute_create_name in -lselinux... " >&6; }
10482 if ${ac_cv_lib_selinux_security_compute_create_name+:} false; then :
10483   $as_echo_n "(cached) " >&6
10484 else
10485   ac_check_lib_save_LIBS=$LIBS
10486 LIBS="-lselinux  $LIBS"
10487 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10488 /* end confdefs.h.  */
10489
10490 /* Override any GCC internal prototype to avoid an error.
10491    Use char because int might match the return type of a GCC
10492    builtin and then its argument prototype would still apply.  */
10493 #ifdef __cplusplus
10494 extern "C"
10495 #endif
10496 char security_compute_create_name ();
10497 int
10498 main ()
10499 {
10500 return security_compute_create_name ();
10501   ;
10502   return 0;
10503 }
10504 _ACEOF
10505 if ac_fn_c_try_link "$LINENO"; then :
10506   ac_cv_lib_selinux_security_compute_create_name=yes
10507 else
10508   ac_cv_lib_selinux_security_compute_create_name=no
10509 fi
10510 rm -f core conftest.err conftest.$ac_objext \
10511     conftest$ac_exeext conftest.$ac_ext
10512 LIBS=$ac_check_lib_save_LIBS
10513 fi
10514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_compute_create_name" >&5
10515 $as_echo "$ac_cv_lib_selinux_security_compute_create_name" >&6; }
10516 if test "x$ac_cv_lib_selinux_security_compute_create_name" = xyes; then :
10517   cat >>confdefs.h <<_ACEOF
10518 #define HAVE_LIBSELINUX 1
10519 _ACEOF
10520
10521   LIBS="-lselinux $LIBS"
10522
10523 else
10524   as_fn_error $? "library 'libselinux', version 2.1.10 or newer, is required for SELinux support" "$LINENO" 5
10525 fi
10526
10527 fi
10528
10529 # for contrib/uuid-ossp
10530 if test "$with_uuid" = bsd ; then
10531   # On BSD, the UUID functions are in libc
10532   ac_fn_c_check_func "$LINENO" "uuid_to_string" "ac_cv_func_uuid_to_string"
10533 if test "x$ac_cv_func_uuid_to_string" = xyes; then :
10534   UUID_LIBS=""
10535 else
10536   as_fn_error $? "BSD UUID functions are not present" "$LINENO" 5
10537 fi
10538
10539 elif test "$with_uuid" = e2fs ; then
10540   # On macOS, the UUID functions are in libc
10541   ac_fn_c_check_func "$LINENO" "uuid_generate" "ac_cv_func_uuid_generate"
10542 if test "x$ac_cv_func_uuid_generate" = xyes; then :
10543   UUID_LIBS=""
10544 else
10545   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5
10546 $as_echo_n "checking for uuid_generate in -luuid... " >&6; }
10547 if ${ac_cv_lib_uuid_uuid_generate+:} false; then :
10548   $as_echo_n "(cached) " >&6
10549 else
10550   ac_check_lib_save_LIBS=$LIBS
10551 LIBS="-luuid  $LIBS"
10552 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10553 /* end confdefs.h.  */
10554
10555 /* Override any GCC internal prototype to avoid an error.
10556    Use char because int might match the return type of a GCC
10557    builtin and then its argument prototype would still apply.  */
10558 #ifdef __cplusplus
10559 extern "C"
10560 #endif
10561 char uuid_generate ();
10562 int
10563 main ()
10564 {
10565 return uuid_generate ();
10566   ;
10567   return 0;
10568 }
10569 _ACEOF
10570 if ac_fn_c_try_link "$LINENO"; then :
10571   ac_cv_lib_uuid_uuid_generate=yes
10572 else
10573   ac_cv_lib_uuid_uuid_generate=no
10574 fi
10575 rm -f core conftest.err conftest.$ac_objext \
10576     conftest$ac_exeext conftest.$ac_ext
10577 LIBS=$ac_check_lib_save_LIBS
10578 fi
10579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate" >&5
10580 $as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; }
10581 if test "x$ac_cv_lib_uuid_uuid_generate" = xyes; then :
10582   UUID_LIBS="-luuid"
10583 else
10584   as_fn_error $? "library 'uuid' is required for E2FS UUID" "$LINENO" 5
10585 fi
10586
10587 fi
10588
10589 elif test "$with_uuid" = ossp ; then
10590   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -lossp-uuid" >&5
10591 $as_echo_n "checking for uuid_export in -lossp-uuid... " >&6; }
10592 if ${ac_cv_lib_ossp_uuid_uuid_export+:} false; then :
10593   $as_echo_n "(cached) " >&6
10594 else
10595   ac_check_lib_save_LIBS=$LIBS
10596 LIBS="-lossp-uuid  $LIBS"
10597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10598 /* end confdefs.h.  */
10599
10600 /* Override any GCC internal prototype to avoid an error.
10601    Use char because int might match the return type of a GCC
10602    builtin and then its argument prototype would still apply.  */
10603 #ifdef __cplusplus
10604 extern "C"
10605 #endif
10606 char uuid_export ();
10607 int
10608 main ()
10609 {
10610 return uuid_export ();
10611   ;
10612   return 0;
10613 }
10614 _ACEOF
10615 if ac_fn_c_try_link "$LINENO"; then :
10616   ac_cv_lib_ossp_uuid_uuid_export=yes
10617 else
10618   ac_cv_lib_ossp_uuid_uuid_export=no
10619 fi
10620 rm -f core conftest.err conftest.$ac_objext \
10621     conftest$ac_exeext conftest.$ac_ext
10622 LIBS=$ac_check_lib_save_LIBS
10623 fi
10624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossp_uuid_uuid_export" >&5
10625 $as_echo "$ac_cv_lib_ossp_uuid_uuid_export" >&6; }
10626 if test "x$ac_cv_lib_ossp_uuid_uuid_export" = xyes; then :
10627   UUID_LIBS="-lossp-uuid"
10628 else
10629   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -luuid" >&5
10630 $as_echo_n "checking for uuid_export in -luuid... " >&6; }
10631 if ${ac_cv_lib_uuid_uuid_export+:} false; then :
10632   $as_echo_n "(cached) " >&6
10633 else
10634   ac_check_lib_save_LIBS=$LIBS
10635 LIBS="-luuid  $LIBS"
10636 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10637 /* end confdefs.h.  */
10638
10639 /* Override any GCC internal prototype to avoid an error.
10640    Use char because int might match the return type of a GCC
10641    builtin and then its argument prototype would still apply.  */
10642 #ifdef __cplusplus
10643 extern "C"
10644 #endif
10645 char uuid_export ();
10646 int
10647 main ()
10648 {
10649 return uuid_export ();
10650   ;
10651   return 0;
10652 }
10653 _ACEOF
10654 if ac_fn_c_try_link "$LINENO"; then :
10655   ac_cv_lib_uuid_uuid_export=yes
10656 else
10657   ac_cv_lib_uuid_uuid_export=no
10658 fi
10659 rm -f core conftest.err conftest.$ac_objext \
10660     conftest$ac_exeext conftest.$ac_ext
10661 LIBS=$ac_check_lib_save_LIBS
10662 fi
10663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_export" >&5
10664 $as_echo "$ac_cv_lib_uuid_uuid_export" >&6; }
10665 if test "x$ac_cv_lib_uuid_uuid_export" = xyes; then :
10666   UUID_LIBS="-luuid"
10667 else
10668   as_fn_error $? "library 'ossp-uuid' or 'uuid' is required for OSSP UUID" "$LINENO" 5
10669 fi
10670
10671 fi
10672
10673 fi
10674
10675
10676
10677 ##
10678 ## Header files
10679 ##
10680
10681 for ac_header in atomic.h crypt.h dld.h fp_class.h getopt.h ieeefp.h ifaddrs.h langinfo.h mbarrier.h poll.h sys/epoll.h sys/ipc.h sys/pstat.h sys/resource.h sys/select.h sys/sem.h sys/shm.h sys/sockio.h sys/tas.h sys/un.h termios.h ucred.h utime.h wchar.h wctype.h
10682 do :
10683   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10684 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
10685 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
10686   cat >>confdefs.h <<_ACEOF
10687 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10688 _ACEOF
10689
10690 fi
10691
10692 done
10693
10694
10695 # On BSD, test for net/if.h will fail unless sys/socket.h
10696 # is included first.
10697 for ac_header in net/if.h
10698 do :
10699   ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
10700 #include <sys/socket.h>
10701
10702 "
10703 if test "x$ac_cv_header_net_if_h" = xyes; then :
10704   cat >>confdefs.h <<_ACEOF
10705 #define HAVE_NET_IF_H 1
10706 _ACEOF
10707
10708 fi
10709
10710 done
10711
10712
10713 # On OpenBSD, test for sys/ucred.h will fail unless sys/param.h
10714 # is included first.
10715 for ac_header in sys/ucred.h
10716 do :
10717   ac_fn_c_check_header_compile "$LINENO" "sys/ucred.h" "ac_cv_header_sys_ucred_h" "$ac_includes_default
10718 #include <sys/param.h>
10719
10720 "
10721 if test "x$ac_cv_header_sys_ucred_h" = xyes; then :
10722   cat >>confdefs.h <<_ACEOF
10723 #define HAVE_SYS_UCRED_H 1
10724 _ACEOF
10725
10726 fi
10727
10728 done
10729
10730
10731 # At least on IRIX, test for netinet/tcp.h will fail unless
10732 # netinet/in.h is included first.
10733 for ac_header in netinet/tcp.h
10734 do :
10735   ac_fn_c_check_header_compile "$LINENO" "netinet/tcp.h" "ac_cv_header_netinet_tcp_h" "$ac_includes_default
10736 #include <netinet/in.h>
10737
10738 "
10739 if test "x$ac_cv_header_netinet_tcp_h" = xyes; then :
10740   cat >>confdefs.h <<_ACEOF
10741 #define HAVE_NETINET_TCP_H 1
10742 _ACEOF
10743
10744 fi
10745
10746 done
10747
10748
10749 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
10750   for ac_header in readline/readline.h
10751 do :
10752   ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
10753 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
10754   cat >>confdefs.h <<_ACEOF
10755 #define HAVE_READLINE_READLINE_H 1
10756 _ACEOF
10757
10758 else
10759   for ac_header in readline.h
10760 do :
10761   ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
10762 if test "x$ac_cv_header_readline_h" = xyes; then :
10763   cat >>confdefs.h <<_ACEOF
10764 #define HAVE_READLINE_H 1
10765 _ACEOF
10766
10767 else
10768   as_fn_error $? "readline header not found
10769 If you have readline already installed, see config.log for details on the
10770 failure.  It is possible the compiler isn't looking in the proper directory.
10771 Use --without-readline to disable readline support." "$LINENO" 5
10772 fi
10773
10774 done
10775
10776 fi
10777
10778 done
10779
10780   for ac_header in readline/history.h
10781 do :
10782   ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
10783 if test "x$ac_cv_header_readline_history_h" = xyes; then :
10784   cat >>confdefs.h <<_ACEOF
10785 #define HAVE_READLINE_HISTORY_H 1
10786 _ACEOF
10787
10788 else
10789   for ac_header in history.h
10790 do :
10791   ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
10792 if test "x$ac_cv_header_history_h" = xyes; then :
10793   cat >>confdefs.h <<_ACEOF
10794 #define HAVE_HISTORY_H 1
10795 _ACEOF
10796
10797 else
10798   as_fn_error $? "history header not found
10799 If you have readline already installed, see config.log for details on the
10800 failure.  It is possible the compiler isn't looking in the proper directory.
10801 Use --without-readline to disable readline support." "$LINENO" 5
10802 fi
10803
10804 done
10805
10806 fi
10807
10808 done
10809
10810 fi
10811
10812 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
10813 # Some installations of libedit usurp /usr/include/readline/, which seems
10814 # bad practice, since in combined installations readline will have its headers
10815 # there.  We might have to resort to AC_EGREP checks to make sure we found
10816 # the proper header...
10817   for ac_header in editline/readline.h
10818 do :
10819   ac_fn_c_check_header_mongrel "$LINENO" "editline/readline.h" "ac_cv_header_editline_readline_h" "$ac_includes_default"
10820 if test "x$ac_cv_header_editline_readline_h" = xyes; then :
10821   cat >>confdefs.h <<_ACEOF
10822 #define HAVE_EDITLINE_READLINE_H 1
10823 _ACEOF
10824
10825 else
10826   for ac_header in readline.h
10827 do :
10828   ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
10829 if test "x$ac_cv_header_readline_h" = xyes; then :
10830   cat >>confdefs.h <<_ACEOF
10831 #define HAVE_READLINE_H 1
10832 _ACEOF
10833
10834 else
10835   for ac_header in readline/readline.h
10836 do :
10837   ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
10838 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
10839   cat >>confdefs.h <<_ACEOF
10840 #define HAVE_READLINE_READLINE_H 1
10841 _ACEOF
10842
10843 else
10844   as_fn_error $? "readline header not found
10845 If you have libedit already installed, see config.log for details on the
10846 failure.  It is possible the compiler isn't looking in the proper directory.
10847 Use --without-readline to disable libedit support." "$LINENO" 5
10848 fi
10849
10850 done
10851
10852 fi
10853
10854 done
10855
10856 fi
10857
10858 done
10859
10860 # Note: in a libedit installation, history.h is sometimes a dummy, and may
10861 # not be there at all.  Hence, don't complain if not found.  We must check
10862 # though, since in yet other versions it is an independent header.
10863   for ac_header in editline/history.h
10864 do :
10865   ac_fn_c_check_header_mongrel "$LINENO" "editline/history.h" "ac_cv_header_editline_history_h" "$ac_includes_default"
10866 if test "x$ac_cv_header_editline_history_h" = xyes; then :
10867   cat >>confdefs.h <<_ACEOF
10868 #define HAVE_EDITLINE_HISTORY_H 1
10869 _ACEOF
10870
10871 else
10872   for ac_header in history.h
10873 do :
10874   ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
10875 if test "x$ac_cv_header_history_h" = xyes; then :
10876   cat >>confdefs.h <<_ACEOF
10877 #define HAVE_HISTORY_H 1
10878 _ACEOF
10879
10880 else
10881   for ac_header in readline/history.h
10882 do :
10883   ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
10884 if test "x$ac_cv_header_readline_history_h" = xyes; then :
10885   cat >>confdefs.h <<_ACEOF
10886 #define HAVE_READLINE_HISTORY_H 1
10887 _ACEOF
10888
10889 fi
10890
10891 done
10892
10893 fi
10894
10895 done
10896
10897 fi
10898
10899 done
10900
10901 fi
10902
10903 if test "$with_zlib" = yes; then
10904   ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
10905 if test "x$ac_cv_header_zlib_h" = xyes; then :
10906
10907 else
10908   as_fn_error $? "zlib header not found
10909 If you have zlib already installed, see config.log for details on the
10910 failure.  It is possible the compiler isn't looking in the proper directory.
10911 Use --without-zlib to disable zlib support." "$LINENO" 5
10912 fi
10913
10914
10915 fi
10916
10917 if test "$with_gssapi" = yes ; then
10918   for ac_header in gssapi/gssapi.h
10919 do :
10920   ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi.h" "ac_cv_header_gssapi_gssapi_h" "$ac_includes_default"
10921 if test "x$ac_cv_header_gssapi_gssapi_h" = xyes; then :
10922   cat >>confdefs.h <<_ACEOF
10923 #define HAVE_GSSAPI_GSSAPI_H 1
10924 _ACEOF
10925
10926 else
10927   for ac_header in gssapi.h
10928 do :
10929   ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
10930 if test "x$ac_cv_header_gssapi_h" = xyes; then :
10931   cat >>confdefs.h <<_ACEOF
10932 #define HAVE_GSSAPI_H 1
10933 _ACEOF
10934
10935 else
10936   as_fn_error $? "gssapi.h header file is required for GSSAPI" "$LINENO" 5
10937 fi
10938
10939 done
10940
10941 fi
10942
10943 done
10944
10945 fi
10946
10947 if test "$with_openssl" = yes ; then
10948   ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
10949 if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
10950
10951 else
10952   as_fn_error $? "header file <openssl/ssl.h> is required for OpenSSL" "$LINENO" 5
10953 fi
10954
10955
10956   ac_fn_c_check_header_mongrel "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default"
10957 if test "x$ac_cv_header_openssl_err_h" = xyes; then :
10958
10959 else
10960   as_fn_error $? "header file <openssl/err.h> is required for OpenSSL" "$LINENO" 5
10961 fi
10962
10963
10964 fi
10965
10966 if test "$with_pam" = yes ; then
10967   for ac_header in security/pam_appl.h
10968 do :
10969   ac_fn_c_check_header_mongrel "$LINENO" "security/pam_appl.h" "ac_cv_header_security_pam_appl_h" "$ac_includes_default"
10970 if test "x$ac_cv_header_security_pam_appl_h" = xyes; then :
10971   cat >>confdefs.h <<_ACEOF
10972 #define HAVE_SECURITY_PAM_APPL_H 1
10973 _ACEOF
10974
10975 else
10976   for ac_header in pam/pam_appl.h
10977 do :
10978   ac_fn_c_check_header_mongrel "$LINENO" "pam/pam_appl.h" "ac_cv_header_pam_pam_appl_h" "$ac_includes_default"
10979 if test "x$ac_cv_header_pam_pam_appl_h" = xyes; then :
10980   cat >>confdefs.h <<_ACEOF
10981 #define HAVE_PAM_PAM_APPL_H 1
10982 _ACEOF
10983
10984 else
10985   as_fn_error $? "header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." "$LINENO" 5
10986 fi
10987
10988 done
10989
10990 fi
10991
10992 done
10993
10994 fi
10995
10996 if test "$with_bsd_auth" = yes ; then
10997   ac_fn_c_check_header_mongrel "$LINENO" "bsd_auth.h" "ac_cv_header_bsd_auth_h" "$ac_includes_default"
10998 if test "x$ac_cv_header_bsd_auth_h" = xyes; then :
10999
11000 else
11001   as_fn_error $? "header file <bsd_auth.h> is required for BSD Authentication support" "$LINENO" 5
11002 fi
11003
11004
11005 fi
11006
11007 if test "$with_systemd" = yes ; then
11008   ac_fn_c_check_header_mongrel "$LINENO" "systemd/sd-daemon.h" "ac_cv_header_systemd_sd_daemon_h" "$ac_includes_default"
11009 if test "x$ac_cv_header_systemd_sd_daemon_h" = xyes; then :
11010
11011 else
11012   as_fn_error $? "header file <systemd/sd-daemon.h> is required for systemd support" "$LINENO" 5
11013 fi
11014
11015
11016 fi
11017
11018 if test "$with_libxml" = yes ; then
11019   ac_fn_c_check_header_mongrel "$LINENO" "libxml/parser.h" "ac_cv_header_libxml_parser_h" "$ac_includes_default"
11020 if test "x$ac_cv_header_libxml_parser_h" = xyes; then :
11021
11022 else
11023   as_fn_error $? "header file <libxml/parser.h> is required for XML support" "$LINENO" 5
11024 fi
11025
11026
11027 fi
11028
11029 if test "$with_libxslt" = yes ; then
11030   ac_fn_c_check_header_mongrel "$LINENO" "libxslt/xslt.h" "ac_cv_header_libxslt_xslt_h" "$ac_includes_default"
11031 if test "x$ac_cv_header_libxslt_xslt_h" = xyes; then :
11032
11033 else
11034   as_fn_error $? "header file <libxslt/xslt.h> is required for XSLT support" "$LINENO" 5
11035 fi
11036
11037
11038 fi
11039
11040 if test "$with_ldap" = yes ; then
11041   if test "$PORTNAME" != "win32"; then
11042      for ac_header in ldap.h
11043 do :
11044   ac_fn_c_check_header_mongrel "$LINENO" "ldap.h" "ac_cv_header_ldap_h" "$ac_includes_default"
11045 if test "x$ac_cv_header_ldap_h" = xyes; then :
11046   cat >>confdefs.h <<_ACEOF
11047 #define HAVE_LDAP_H 1
11048 _ACEOF
11049
11050 else
11051   as_fn_error $? "header file <ldap.h> is required for LDAP" "$LINENO" 5
11052 fi
11053
11054 done
11055
11056      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compatible LDAP implementation" >&5
11057 $as_echo_n "checking for compatible LDAP implementation... " >&6; }
11058 if ${pgac_cv_ldap_safe+:} false; then :
11059   $as_echo_n "(cached) " >&6
11060 else
11061   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11062 /* end confdefs.h.  */
11063 #include <ldap.h>
11064 #if !defined(LDAP_VENDOR_VERSION) || \
11065      (defined(LDAP_API_FEATURE_X_OPENLDAP) && \
11066       LDAP_VENDOR_VERSION >= 20424 && LDAP_VENDOR_VERSION <= 20431)
11067 choke me
11068 #endif
11069 int
11070 main ()
11071 {
11072
11073   ;
11074   return 0;
11075 }
11076 _ACEOF
11077 if ac_fn_c_try_compile "$LINENO"; then :
11078   pgac_cv_ldap_safe=yes
11079 else
11080   pgac_cv_ldap_safe=no
11081 fi
11082 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11083 fi
11084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_ldap_safe" >&5
11085 $as_echo "$pgac_cv_ldap_safe" >&6; }
11086
11087 if test "$pgac_cv_ldap_safe" != yes; then
11088   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
11089 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
11090 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
11091 *** also uses LDAP will crash on exit." >&5
11092 $as_echo "$as_me: WARNING:
11093 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
11094 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
11095 *** also uses LDAP will crash on exit." >&2;}
11096 fi
11097   else
11098      for ac_header in winldap.h
11099 do :
11100   ac_fn_c_check_header_compile "$LINENO" "winldap.h" "ac_cv_header_winldap_h" "$ac_includes_default
11101 #include <windows.h>
11102
11103 "
11104 if test "x$ac_cv_header_winldap_h" = xyes; then :
11105   cat >>confdefs.h <<_ACEOF
11106 #define HAVE_WINLDAP_H 1
11107 _ACEOF
11108
11109 else
11110   as_fn_error $? "header file <winldap.h> is required for LDAP" "$LINENO" 5
11111 fi
11112
11113 done
11114
11115   fi
11116 fi
11117
11118 if test "$with_bonjour" = yes ; then
11119   ac_fn_c_check_header_mongrel "$LINENO" "dns_sd.h" "ac_cv_header_dns_sd_h" "$ac_includes_default"
11120 if test "x$ac_cv_header_dns_sd_h" = xyes; then :
11121
11122 else
11123   as_fn_error $? "header file <dns_sd.h> is required for Bonjour" "$LINENO" 5
11124 fi
11125
11126
11127 fi
11128
11129 # for contrib/uuid-ossp
11130 if test "$with_uuid" = bsd ; then
11131   for ac_header in uuid.h
11132 do :
11133   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
11134 if test "x$ac_cv_header_uuid_h" = xyes; then :
11135   cat >>confdefs.h <<_ACEOF
11136 #define HAVE_UUID_H 1
11137 _ACEOF
11138  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11139 /* end confdefs.h.  */
11140 #include <uuid.h>
11141
11142 _ACEOF
11143 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11144   $EGREP "uuid_to_string" >/dev/null 2>&1; then :
11145
11146 else
11147   as_fn_error $? "header file <uuid.h> does not match BSD UUID library" "$LINENO" 5
11148 fi
11149 rm -f conftest*
11150
11151 else
11152   as_fn_error $? "header file <uuid.h> is required for BSD UUID" "$LINENO" 5
11153 fi
11154
11155 done
11156
11157 elif test "$with_uuid" = e2fs ; then
11158   for ac_header in uuid/uuid.h
11159 do :
11160   ac_fn_c_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
11161 if test "x$ac_cv_header_uuid_uuid_h" = xyes; then :
11162   cat >>confdefs.h <<_ACEOF
11163 #define HAVE_UUID_UUID_H 1
11164 _ACEOF
11165  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11166 /* end confdefs.h.  */
11167 #include <uuid/uuid.h>
11168
11169 _ACEOF
11170 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11171   $EGREP "uuid_generate" >/dev/null 2>&1; then :
11172
11173 else
11174   as_fn_error $? "header file <uuid/uuid.h> does not match E2FS UUID library" "$LINENO" 5
11175 fi
11176 rm -f conftest*
11177
11178 else
11179   for ac_header in uuid.h
11180 do :
11181   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
11182 if test "x$ac_cv_header_uuid_h" = xyes; then :
11183   cat >>confdefs.h <<_ACEOF
11184 #define HAVE_UUID_H 1
11185 _ACEOF
11186  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11187 /* end confdefs.h.  */
11188 #include <uuid.h>
11189
11190 _ACEOF
11191 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11192   $EGREP "uuid_generate" >/dev/null 2>&1; then :
11193
11194 else
11195   as_fn_error $? "header file <uuid.h> does not match E2FS UUID library" "$LINENO" 5
11196 fi
11197 rm -f conftest*
11198
11199 else
11200   as_fn_error $? "header file <uuid/uuid.h> or <uuid.h> is required for E2FS UUID" "$LINENO" 5
11201 fi
11202
11203 done
11204
11205 fi
11206
11207 done
11208
11209 elif test "$with_uuid" = ossp ; then
11210   for ac_header in ossp/uuid.h
11211 do :
11212   ac_fn_c_check_header_mongrel "$LINENO" "ossp/uuid.h" "ac_cv_header_ossp_uuid_h" "$ac_includes_default"
11213 if test "x$ac_cv_header_ossp_uuid_h" = xyes; then :
11214   cat >>confdefs.h <<_ACEOF
11215 #define HAVE_OSSP_UUID_H 1
11216 _ACEOF
11217  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11218 /* end confdefs.h.  */
11219 #include <ossp/uuid.h>
11220
11221 _ACEOF
11222 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11223   $EGREP "uuid_export" >/dev/null 2>&1; then :
11224
11225 else
11226   as_fn_error $? "header file <ossp/uuid.h> does not match OSSP UUID library" "$LINENO" 5
11227 fi
11228 rm -f conftest*
11229
11230 else
11231   for ac_header in uuid.h
11232 do :
11233   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
11234 if test "x$ac_cv_header_uuid_h" = xyes; then :
11235   cat >>confdefs.h <<_ACEOF
11236 #define HAVE_UUID_H 1
11237 _ACEOF
11238  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11239 /* end confdefs.h.  */
11240 #include <uuid.h>
11241
11242 _ACEOF
11243 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11244   $EGREP "uuid_export" >/dev/null 2>&1; then :
11245
11246 else
11247   as_fn_error $? "header file <uuid.h> does not match OSSP UUID library" "$LINENO" 5
11248 fi
11249 rm -f conftest*
11250
11251 else
11252   as_fn_error $? "header file <ossp/uuid.h> or <uuid.h> is required for OSSP UUID" "$LINENO" 5
11253 fi
11254
11255 done
11256
11257 fi
11258
11259 done
11260
11261 fi
11262
11263 if test "$PORTNAME" = "win32" ; then
11264    for ac_header in crtdefs.h
11265 do :
11266   ac_fn_c_check_header_mongrel "$LINENO" "crtdefs.h" "ac_cv_header_crtdefs_h" "$ac_includes_default"
11267 if test "x$ac_cv_header_crtdefs_h" = xyes; then :
11268   cat >>confdefs.h <<_ACEOF
11269 #define HAVE_CRTDEFS_H 1
11270 _ACEOF
11271
11272 fi
11273
11274 done
11275
11276 fi
11277
11278 ##
11279 ## Types, structures, compiler characteristics
11280 ##
11281
11282   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
11283 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
11284 if ${ac_cv_c_bigendian+:} false; then :
11285   $as_echo_n "(cached) " >&6
11286 else
11287   ac_cv_c_bigendian=unknown
11288     # See if we're dealing with a universal compiler.
11289     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11290 /* end confdefs.h.  */
11291 #ifndef __APPLE_CC__
11292                not a universal capable compiler
11293              #endif
11294              typedef int dummy;
11295
11296 _ACEOF
11297 if ac_fn_c_try_compile "$LINENO"; then :
11298
11299         # Check for potential -arch flags.  It is not universal unless
11300         # there are at least two -arch flags with different values.
11301         ac_arch=
11302         ac_prev=
11303         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
11304          if test -n "$ac_prev"; then
11305            case $ac_word in
11306              i?86 | x86_64 | ppc | ppc64)
11307                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
11308                  ac_arch=$ac_word
11309                else
11310                  ac_cv_c_bigendian=universal
11311                  break
11312                fi
11313                ;;
11314            esac
11315            ac_prev=
11316          elif test "x$ac_word" = "x-arch"; then
11317            ac_prev=arch
11318          fi
11319        done
11320 fi
11321 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11322     if test $ac_cv_c_bigendian = unknown; then
11323       # See if sys/param.h defines the BYTE_ORDER macro.
11324       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11325 /* end confdefs.h.  */
11326 #include <sys/types.h>
11327              #include <sys/param.h>
11328
11329 int
11330 main ()
11331 {
11332 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
11333                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
11334                      && LITTLE_ENDIAN)
11335               bogus endian macros
11336              #endif
11337
11338   ;
11339   return 0;
11340 }
11341 _ACEOF
11342 if ac_fn_c_try_compile "$LINENO"; then :
11343   # It does; now see whether it defined to BIG_ENDIAN or not.
11344          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11345 /* end confdefs.h.  */
11346 #include <sys/types.h>
11347                 #include <sys/param.h>
11348
11349 int
11350 main ()
11351 {
11352 #if BYTE_ORDER != BIG_ENDIAN
11353                  not big endian
11354                 #endif
11355
11356   ;
11357   return 0;
11358 }
11359 _ACEOF
11360 if ac_fn_c_try_compile "$LINENO"; then :
11361   ac_cv_c_bigendian=yes
11362 else
11363   ac_cv_c_bigendian=no
11364 fi
11365 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11366 fi
11367 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11368     fi
11369     if test $ac_cv_c_bigendian = unknown; then
11370       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
11371       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11372 /* end confdefs.h.  */
11373 #include <limits.h>
11374
11375 int
11376 main ()
11377 {
11378 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
11379               bogus endian macros
11380              #endif
11381
11382   ;
11383   return 0;
11384 }
11385 _ACEOF
11386 if ac_fn_c_try_compile "$LINENO"; then :
11387   # It does; now see whether it defined to _BIG_ENDIAN or not.
11388          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11389 /* end confdefs.h.  */
11390 #include <limits.h>
11391
11392 int
11393 main ()
11394 {
11395 #ifndef _BIG_ENDIAN
11396                  not big endian
11397                 #endif
11398
11399   ;
11400   return 0;
11401 }
11402 _ACEOF
11403 if ac_fn_c_try_compile "$LINENO"; then :
11404   ac_cv_c_bigendian=yes
11405 else
11406   ac_cv_c_bigendian=no
11407 fi
11408 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11409 fi
11410 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11411     fi
11412     if test $ac_cv_c_bigendian = unknown; then
11413       # Compile a test program.
11414       if test "$cross_compiling" = yes; then :
11415   # Try to guess by grepping values from an object file.
11416          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11417 /* end confdefs.h.  */
11418 short int ascii_mm[] =
11419                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
11420                 short int ascii_ii[] =
11421                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
11422                 int use_ascii (int i) {
11423                   return ascii_mm[i] + ascii_ii[i];
11424                 }
11425                 short int ebcdic_ii[] =
11426                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
11427                 short int ebcdic_mm[] =
11428                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
11429                 int use_ebcdic (int i) {
11430                   return ebcdic_mm[i] + ebcdic_ii[i];
11431                 }
11432                 extern int foo;
11433
11434 int
11435 main ()
11436 {
11437 return use_ascii (foo) == use_ebcdic (foo);
11438   ;
11439   return 0;
11440 }
11441 _ACEOF
11442 if ac_fn_c_try_compile "$LINENO"; then :
11443   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
11444               ac_cv_c_bigendian=yes
11445             fi
11446             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
11447               if test "$ac_cv_c_bigendian" = unknown; then
11448                 ac_cv_c_bigendian=no
11449               else
11450                 # finding both strings is unlikely to happen, but who knows?
11451                 ac_cv_c_bigendian=unknown
11452               fi
11453             fi
11454 fi
11455 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11456 else
11457   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11458 /* end confdefs.h.  */
11459 $ac_includes_default
11460 int
11461 main ()
11462 {
11463
11464              /* Are we little or big endian?  From Harbison&Steele.  */
11465              union
11466              {
11467                long int l;
11468                char c[sizeof (long int)];
11469              } u;
11470              u.l = 1;
11471              return u.c[sizeof (long int) - 1] == 1;
11472
11473   ;
11474   return 0;
11475 }
11476 _ACEOF
11477 if ac_fn_c_try_run "$LINENO"; then :
11478   ac_cv_c_bigendian=no
11479 else
11480   ac_cv_c_bigendian=yes
11481 fi
11482 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11483   conftest.$ac_objext conftest.beam conftest.$ac_ext
11484 fi
11485
11486     fi
11487 fi
11488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
11489 $as_echo "$ac_cv_c_bigendian" >&6; }
11490  case $ac_cv_c_bigendian in #(
11491    yes)
11492      $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
11493 ;; #(
11494    no)
11495       ;; #(
11496    universal)
11497
11498 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
11499
11500      ;; #(
11501    *)
11502      as_fn_error $? "unknown endianness
11503  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
11504  esac
11505
11506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
11507 $as_echo_n "checking for inline... " >&6; }
11508 if ${ac_cv_c_inline+:} false; then :
11509   $as_echo_n "(cached) " >&6
11510 else
11511   ac_cv_c_inline=no
11512 for ac_kw in inline __inline__ __inline; do
11513   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11514 /* end confdefs.h.  */
11515 #ifndef __cplusplus
11516 typedef int foo_t;
11517 static $ac_kw foo_t static_foo () {return 0; }
11518 $ac_kw foo_t foo () {return 0; }
11519 #endif
11520
11521 _ACEOF
11522 if ac_fn_c_try_compile "$LINENO"; then :
11523   ac_cv_c_inline=$ac_kw
11524 fi
11525 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11526   test "$ac_cv_c_inline" != no && break
11527 done
11528
11529 fi
11530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
11531 $as_echo "$ac_cv_c_inline" >&6; }
11532
11533 case $ac_cv_c_inline in
11534   inline | yes) ;;
11535   *)
11536     case $ac_cv_c_inline in
11537       no) ac_val=;;
11538       *) ac_val=$ac_cv_c_inline;;
11539     esac
11540     cat >>confdefs.h <<_ACEOF
11541 #ifndef __cplusplus
11542 #define inline $ac_val
11543 #endif
11544 _ACEOF
11545     ;;
11546 esac
11547
11548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for printf format archetype" >&5
11549 $as_echo_n "checking for printf format archetype... " >&6; }
11550 if ${pgac_cv_printf_archetype+:} false; then :
11551   $as_echo_n "(cached) " >&6
11552 else
11553   ac_save_c_werror_flag=$ac_c_werror_flag
11554 ac_c_werror_flag=yes
11555 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11556 /* end confdefs.h.  */
11557 extern int
11558 pgac_write(int ignore, const char *fmt,...)
11559 __attribute__((format(gnu_printf, 2, 3)));
11560 int
11561 main ()
11562 {
11563
11564   ;
11565   return 0;
11566 }
11567 _ACEOF
11568 if ac_fn_c_try_compile "$LINENO"; then :
11569   pgac_cv_printf_archetype=gnu_printf
11570 else
11571   pgac_cv_printf_archetype=printf
11572 fi
11573 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11574 ac_c_werror_flag=$ac_save_c_werror_flag
11575 fi
11576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_printf_archetype" >&5
11577 $as_echo "$pgac_cv_printf_archetype" >&6; }
11578
11579 cat >>confdefs.h <<_ACEOF
11580 #define PG_PRINTF_ATTRIBUTE $pgac_cv_printf_archetype
11581 _ACEOF
11582
11583
11584
11585   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array members" >&5
11586 $as_echo_n "checking for flexible array members... " >&6; }
11587 if ${ac_cv_c_flexmember+:} false; then :
11588   $as_echo_n "(cached) " >&6
11589 else
11590   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11591 /* end confdefs.h.  */
11592 #include <stdlib.h>
11593             #include <stdio.h>
11594             #include <stddef.h>
11595             struct s { int n; double d[]; };
11596 int
11597 main ()
11598 {
11599 int m = getchar ();
11600             struct s *p = malloc (offsetof (struct s, d)
11601                                   + m * sizeof (double));
11602             p->d[0] = 0.0;
11603             return p->d != (double *) NULL;
11604   ;
11605   return 0;
11606 }
11607 _ACEOF
11608 if ac_fn_c_try_compile "$LINENO"; then :
11609   ac_cv_c_flexmember=yes
11610 else
11611   ac_cv_c_flexmember=no
11612 fi
11613 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11614 fi
11615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
11616 $as_echo "$ac_cv_c_flexmember" >&6; }
11617   if test $ac_cv_c_flexmember = yes; then
11618
11619 $as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
11620
11621   else
11622     $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
11623
11624   fi
11625
11626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signed types" >&5
11627 $as_echo_n "checking for signed types... " >&6; }
11628 if ${pgac_cv_c_signed+:} false; then :
11629   $as_echo_n "(cached) " >&6
11630 else
11631   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11632 /* end confdefs.h.  */
11633
11634 int
11635 main ()
11636 {
11637 signed char c; signed short s; signed int i;
11638   ;
11639   return 0;
11640 }
11641 _ACEOF
11642 if ac_fn_c_try_compile "$LINENO"; then :
11643   pgac_cv_c_signed=yes
11644 else
11645   pgac_cv_c_signed=no
11646 fi
11647 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11648 fi
11649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_signed" >&5
11650 $as_echo "$pgac_cv_c_signed" >&6; }
11651 if test x"$pgac_cv_c_signed" = xno ; then
11652
11653 $as_echo "#define signed /**/" >>confdefs.h
11654
11655 fi
11656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __func__" >&5
11657 $as_echo_n "checking for __func__... " >&6; }
11658 if ${pgac_cv_funcname_func_support+:} false; then :
11659   $as_echo_n "(cached) " >&6
11660 else
11661   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11662 /* end confdefs.h.  */
11663 #include <stdio.h>
11664 int
11665 main ()
11666 {
11667 printf("%s\n", __func__);
11668   ;
11669   return 0;
11670 }
11671 _ACEOF
11672 if ac_fn_c_try_compile "$LINENO"; then :
11673   pgac_cv_funcname_func_support=yes
11674 else
11675   pgac_cv_funcname_func_support=no
11676 fi
11677 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11678 fi
11679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_func_support" >&5
11680 $as_echo "$pgac_cv_funcname_func_support" >&6; }
11681 if test x"$pgac_cv_funcname_func_support" = xyes ; then
11682
11683 $as_echo "#define HAVE_FUNCNAME__FUNC 1" >>confdefs.h
11684
11685 else
11686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __FUNCTION__" >&5
11687 $as_echo_n "checking for __FUNCTION__... " >&6; }
11688 if ${pgac_cv_funcname_function_support+:} false; then :
11689   $as_echo_n "(cached) " >&6
11690 else
11691   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11692 /* end confdefs.h.  */
11693 #include <stdio.h>
11694 int
11695 main ()
11696 {
11697 printf("%s\n", __FUNCTION__);
11698   ;
11699   return 0;
11700 }
11701 _ACEOF
11702 if ac_fn_c_try_compile "$LINENO"; then :
11703   pgac_cv_funcname_function_support=yes
11704 else
11705   pgac_cv_funcname_function_support=no
11706 fi
11707 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11708 fi
11709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_function_support" >&5
11710 $as_echo "$pgac_cv_funcname_function_support" >&6; }
11711 if test x"$pgac_cv_funcname_function_support" = xyes ; then
11712
11713 $as_echo "#define HAVE_FUNCNAME__FUNCTION 1" >>confdefs.h
11714
11715 fi
11716 fi
11717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Static_assert" >&5
11718 $as_echo_n "checking for _Static_assert... " >&6; }
11719 if ${pgac_cv__static_assert+:} false; then :
11720   $as_echo_n "(cached) " >&6
11721 else
11722   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11723 /* end confdefs.h.  */
11724
11725 int
11726 main ()
11727 {
11728 ({ _Static_assert(1, "foo"); })
11729   ;
11730   return 0;
11731 }
11732 _ACEOF
11733 if ac_fn_c_try_link "$LINENO"; then :
11734   pgac_cv__static_assert=yes
11735 else
11736   pgac_cv__static_assert=no
11737 fi
11738 rm -f core conftest.err conftest.$ac_objext \
11739     conftest$ac_exeext conftest.$ac_ext
11740 fi
11741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__static_assert" >&5
11742 $as_echo "$pgac_cv__static_assert" >&6; }
11743 if test x"$pgac_cv__static_assert" = xyes ; then
11744
11745 $as_echo "#define HAVE__STATIC_ASSERT 1" >>confdefs.h
11746
11747 fi
11748 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeof" >&5
11749 $as_echo_n "checking for typeof... " >&6; }
11750 if ${pgac_cv_c_typeof+:} false; then :
11751   $as_echo_n "(cached) " >&6
11752 else
11753   pgac_cv_c_typeof=no
11754 for pgac_kw in typeof __typeof__ decltype; do
11755   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11756 /* end confdefs.h.  */
11757
11758 int
11759 main ()
11760 {
11761 int x = 0;
11762 $pgac_kw(x) y;
11763 y = x;
11764 return y;
11765   ;
11766   return 0;
11767 }
11768 _ACEOF
11769 if ac_fn_c_try_compile "$LINENO"; then :
11770   pgac_cv_c_typeof=$pgac_kw
11771 fi
11772 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11773   test "$pgac_cv_c_typeof" != no && break
11774 done
11775 fi
11776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_typeof" >&5
11777 $as_echo "$pgac_cv_c_typeof" >&6; }
11778 if test "$pgac_cv_c_typeof" != no; then
11779
11780 $as_echo "#define HAVE_TYPEOF 1" >>confdefs.h
11781
11782   if test "$pgac_cv_c_typeof" != typeof; then
11783
11784 cat >>confdefs.h <<_ACEOF
11785 #define typeof $pgac_cv_c_typeof
11786 _ACEOF
11787
11788   fi
11789 fi
11790 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_types_compatible_p" >&5
11791 $as_echo_n "checking for __builtin_types_compatible_p... " >&6; }
11792 if ${pgac_cv__types_compatible+:} false; then :
11793   $as_echo_n "(cached) " >&6
11794 else
11795   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11796 /* end confdefs.h.  */
11797
11798 int
11799 main ()
11800 {
11801  int x; static int y[__builtin_types_compatible_p(__typeof__(x), int)];
11802   ;
11803   return 0;
11804 }
11805 _ACEOF
11806 if ac_fn_c_try_compile "$LINENO"; then :
11807   pgac_cv__types_compatible=yes
11808 else
11809   pgac_cv__types_compatible=no
11810 fi
11811 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11812 fi
11813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__types_compatible" >&5
11814 $as_echo "$pgac_cv__types_compatible" >&6; }
11815 if test x"$pgac_cv__types_compatible" = xyes ; then
11816
11817 $as_echo "#define HAVE__BUILTIN_TYPES_COMPATIBLE_P 1" >>confdefs.h
11818
11819 fi
11820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap16" >&5
11821 $as_echo_n "checking for __builtin_bswap16... " >&6; }
11822 if ${pgac_cv__builtin_bswap16+:} false; then :
11823   $as_echo_n "(cached) " >&6
11824 else
11825   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11826 /* end confdefs.h.  */
11827 static unsigned long int x = __builtin_bswap16(0xaabb);
11828
11829 _ACEOF
11830 if ac_fn_c_try_compile "$LINENO"; then :
11831   pgac_cv__builtin_bswap16=yes
11832 else
11833   pgac_cv__builtin_bswap16=no
11834 fi
11835 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11836 fi
11837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap16" >&5
11838 $as_echo "$pgac_cv__builtin_bswap16" >&6; }
11839 if test x"$pgac_cv__builtin_bswap16" = xyes ; then
11840
11841 $as_echo "#define HAVE__BUILTIN_BSWAP16 1" >>confdefs.h
11842
11843 fi
11844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap32" >&5
11845 $as_echo_n "checking for __builtin_bswap32... " >&6; }
11846 if ${pgac_cv__builtin_bswap32+:} false; then :
11847   $as_echo_n "(cached) " >&6
11848 else
11849   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11850 /* end confdefs.h.  */
11851 static unsigned long int x = __builtin_bswap32(0xaabbccdd);
11852
11853 _ACEOF
11854 if ac_fn_c_try_compile "$LINENO"; then :
11855   pgac_cv__builtin_bswap32=yes
11856 else
11857   pgac_cv__builtin_bswap32=no
11858 fi
11859 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11860 fi
11861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap32" >&5
11862 $as_echo "$pgac_cv__builtin_bswap32" >&6; }
11863 if test x"$pgac_cv__builtin_bswap32" = xyes ; then
11864
11865 $as_echo "#define HAVE__BUILTIN_BSWAP32 1" >>confdefs.h
11866
11867 fi
11868 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap64" >&5
11869 $as_echo_n "checking for __builtin_bswap64... " >&6; }
11870 if ${pgac_cv__builtin_bswap64+:} false; then :
11871   $as_echo_n "(cached) " >&6
11872 else
11873   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11874 /* end confdefs.h.  */
11875 static unsigned long int x = __builtin_bswap64(0xaabbccddeeff0011);
11876
11877 _ACEOF
11878 if ac_fn_c_try_compile "$LINENO"; then :
11879   pgac_cv__builtin_bswap64=yes
11880 else
11881   pgac_cv__builtin_bswap64=no
11882 fi
11883 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11884 fi
11885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap64" >&5
11886 $as_echo "$pgac_cv__builtin_bswap64" >&6; }
11887 if test x"$pgac_cv__builtin_bswap64" = xyes ; then
11888
11889 $as_echo "#define HAVE__BUILTIN_BSWAP64 1" >>confdefs.h
11890
11891 fi
11892 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_constant_p" >&5
11893 $as_echo_n "checking for __builtin_constant_p... " >&6; }
11894 if ${pgac_cv__builtin_constant_p+:} false; then :
11895   $as_echo_n "(cached) " >&6
11896 else
11897   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11898 /* end confdefs.h.  */
11899 static int x; static int y[__builtin_constant_p(x) ? x : 1];
11900
11901 _ACEOF
11902 if ac_fn_c_try_compile "$LINENO"; then :
11903   pgac_cv__builtin_constant_p=yes
11904 else
11905   pgac_cv__builtin_constant_p=no
11906 fi
11907 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11908 fi
11909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_constant_p" >&5
11910 $as_echo "$pgac_cv__builtin_constant_p" >&6; }
11911 if test x"$pgac_cv__builtin_constant_p" = xyes ; then
11912
11913 $as_echo "#define HAVE__BUILTIN_CONSTANT_P 1" >>confdefs.h
11914
11915 fi
11916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unreachable" >&5
11917 $as_echo_n "checking for __builtin_unreachable... " >&6; }
11918 if ${pgac_cv__builtin_unreachable+:} false; then :
11919   $as_echo_n "(cached) " >&6
11920 else
11921   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11922 /* end confdefs.h.  */
11923
11924 int
11925 main ()
11926 {
11927 __builtin_unreachable();
11928   ;
11929   return 0;
11930 }
11931 _ACEOF
11932 if ac_fn_c_try_link "$LINENO"; then :
11933   pgac_cv__builtin_unreachable=yes
11934 else
11935   pgac_cv__builtin_unreachable=no
11936 fi
11937 rm -f core conftest.err conftest.$ac_objext \
11938     conftest$ac_exeext conftest.$ac_ext
11939 fi
11940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_unreachable" >&5
11941 $as_echo "$pgac_cv__builtin_unreachable" >&6; }
11942 if test x"$pgac_cv__builtin_unreachable" = xyes ; then
11943
11944 $as_echo "#define HAVE__BUILTIN_UNREACHABLE 1" >>confdefs.h
11945
11946 fi
11947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for computed goto support" >&5
11948 $as_echo_n "checking for computed goto support... " >&6; }
11949 if ${pgac_cv_computed_goto+:} false; then :
11950   $as_echo_n "(cached) " >&6
11951 else
11952   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11953 /* end confdefs.h.  */
11954
11955 int
11956 main ()
11957 {
11958 void *labeladdrs[] = {&&my_label};
11959   goto *labeladdrs[0];
11960   my_label:
11961   return 1;
11962
11963   ;
11964   return 0;
11965 }
11966 _ACEOF
11967 if ac_fn_c_try_compile "$LINENO"; then :
11968   pgac_cv_computed_goto=yes
11969 else
11970   pgac_cv_computed_goto=no
11971 fi
11972 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11973 fi
11974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_computed_goto" >&5
11975 $as_echo "$pgac_cv_computed_goto" >&6; }
11976 if test x"$pgac_cv_computed_goto" = xyes ; then
11977
11978 $as_echo "#define HAVE_COMPUTED_GOTO 1" >>confdefs.h
11979
11980 fi
11981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __VA_ARGS__" >&5
11982 $as_echo_n "checking for __VA_ARGS__... " >&6; }
11983 if ${pgac_cv__va_args+:} false; then :
11984   $as_echo_n "(cached) " >&6
11985 else
11986   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11987 /* end confdefs.h.  */
11988 #include <stdio.h>
11989 int
11990 main ()
11991 {
11992 #define debug(...) fprintf(stderr, __VA_ARGS__)
11993 debug("%s", "blarg");
11994
11995   ;
11996   return 0;
11997 }
11998 _ACEOF
11999 if ac_fn_c_try_compile "$LINENO"; then :
12000   pgac_cv__va_args=yes
12001 else
12002   pgac_cv__va_args=no
12003 fi
12004 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12005 fi
12006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__va_args" >&5
12007 $as_echo "$pgac_cv__va_args" >&6; }
12008 if test x"$pgac_cv__va_args" = xyes ; then
12009
12010 $as_echo "#define HAVE__VA_ARGS 1" >>confdefs.h
12011
12012 fi
12013 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12014 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
12015 if ${ac_cv_struct_tm+:} false; then :
12016   $as_echo_n "(cached) " >&6
12017 else
12018   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12019 /* end confdefs.h.  */
12020 #include <sys/types.h>
12021 #include <time.h>
12022
12023 int
12024 main ()
12025 {
12026 struct tm tm;
12027                                      int *p = &tm.tm_sec;
12028                                      return !p;
12029   ;
12030   return 0;
12031 }
12032 _ACEOF
12033 if ac_fn_c_try_compile "$LINENO"; then :
12034   ac_cv_struct_tm=time.h
12035 else
12036   ac_cv_struct_tm=sys/time.h
12037 fi
12038 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12039 fi
12040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12041 $as_echo "$ac_cv_struct_tm" >&6; }
12042 if test $ac_cv_struct_tm = sys/time.h; then
12043
12044 $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
12045
12046 fi
12047
12048 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
12049 #include <$ac_cv_struct_tm>
12050
12051 "
12052 if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
12053
12054 cat >>confdefs.h <<_ACEOF
12055 #define HAVE_STRUCT_TM_TM_ZONE 1
12056 _ACEOF
12057
12058
12059 fi
12060
12061 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12062
12063 $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
12064
12065 fi
12066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12067 $as_echo_n "checking for tzname... " >&6; }
12068 if ${ac_cv_var_tzname+:} false; then :
12069   $as_echo_n "(cached) " >&6
12070 else
12071   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12072 /* end confdefs.h.  */
12073 #include <stdlib.h>
12074 #include <time.h>
12075 #ifndef tzname /* For SGI.  */
12076 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
12077 #endif
12078
12079 int
12080 main ()
12081 {
12082 atoi(*tzname);
12083   ;
12084   return 0;
12085 }
12086 _ACEOF
12087 if ac_fn_c_try_link "$LINENO"; then :
12088   ac_cv_var_tzname=yes
12089 else
12090   ac_cv_var_tzname=no
12091 fi
12092 rm -f core conftest.err conftest.$ac_objext \
12093     conftest$ac_exeext conftest.$ac_ext
12094 fi
12095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12096 $as_echo "$ac_cv_var_tzname" >&6; }
12097 if test $ac_cv_var_tzname = yes; then
12098
12099 $as_echo "#define HAVE_TZNAME 1" >>confdefs.h
12100
12101 fi
12102
12103 ac_fn_c_check_type "$LINENO" "union semun" "ac_cv_type_union_semun" "#include <sys/types.h>
12104 #ifdef HAVE_SYS_IPC_H
12105 #include <sys/ipc.h>
12106 #endif
12107 #ifdef HAVE_SYS_SEM_H
12108 #include <sys/sem.h>
12109 #endif
12110 "
12111 if test "x$ac_cv_type_union_semun" = xyes; then :
12112
12113 cat >>confdefs.h <<_ACEOF
12114 #define HAVE_UNION_SEMUN 1
12115 _ACEOF
12116
12117
12118 fi
12119
12120 ac_fn_c_check_type "$LINENO" "struct sockaddr_un" "ac_cv_type_struct_sockaddr_un" "#include <sys/types.h>
12121 #ifdef HAVE_SYS_UN_H
12122 #include <sys/un.h>
12123 #endif
12124
12125 "
12126 if test "x$ac_cv_type_struct_sockaddr_un" = xyes; then :
12127
12128 $as_echo "#define HAVE_UNIX_SOCKETS 1" >>confdefs.h
12129
12130 fi
12131
12132 ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "#include <sys/types.h>
12133 #include <sys/socket.h>
12134
12135 "
12136 if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
12137
12138 cat >>confdefs.h <<_ACEOF
12139 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
12140 _ACEOF
12141
12142
12143 fi
12144
12145 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
12146 #include <sys/socket.h>
12147
12148 "
12149 if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then :
12150
12151 cat >>confdefs.h <<_ACEOF
12152 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
12153 _ACEOF
12154
12155
12156 fi
12157 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_family" "ac_cv_member_struct_sockaddr_storage___ss_family" "#include <sys/types.h>
12158 #include <sys/socket.h>
12159
12160 "
12161 if test "x$ac_cv_member_struct_sockaddr_storage___ss_family" = xyes; then :
12162
12163 cat >>confdefs.h <<_ACEOF
12164 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1
12165 _ACEOF
12166
12167
12168 fi
12169 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_len" "ac_cv_member_struct_sockaddr_storage_ss_len" "#include <sys/types.h>
12170 #include <sys/socket.h>
12171
12172 "
12173 if test "x$ac_cv_member_struct_sockaddr_storage_ss_len" = xyes; then :
12174
12175 cat >>confdefs.h <<_ACEOF
12176 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1
12177 _ACEOF
12178
12179
12180 fi
12181 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_len" "ac_cv_member_struct_sockaddr_storage___ss_len" "#include <sys/types.h>
12182 #include <sys/socket.h>
12183
12184 "
12185 if test "x$ac_cv_member_struct_sockaddr_storage___ss_len" = xyes; then :
12186
12187 cat >>confdefs.h <<_ACEOF
12188 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN 1
12189 _ACEOF
12190
12191
12192 fi
12193 ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/types.h>
12194 #include <sys/socket.h>
12195
12196 "
12197 if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
12198
12199 cat >>confdefs.h <<_ACEOF
12200 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
12201 _ACEOF
12202
12203
12204 fi
12205
12206 ac_fn_c_check_type "$LINENO" "struct addrinfo" "ac_cv_type_struct_addrinfo" "#include <sys/types.h>
12207 #include <sys/socket.h>
12208 #include <netdb.h>
12209
12210 "
12211 if test "x$ac_cv_type_struct_addrinfo" = xyes; then :
12212
12213 cat >>confdefs.h <<_ACEOF
12214 #define HAVE_STRUCT_ADDRINFO 1
12215 _ACEOF
12216
12217
12218 fi
12219
12220
12221   ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
12222 if test "x$ac_cv_type_intptr_t" = xyes; then :
12223
12224 $as_echo "#define HAVE_INTPTR_T 1" >>confdefs.h
12225
12226 else
12227   for ac_type in 'int' 'long int' 'long long int'; do
12228        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12229 /* end confdefs.h.  */
12230 $ac_includes_default
12231 int
12232 main ()
12233 {
12234 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
12235 test_array [0] = 0;
12236 return test_array [0];
12237
12238   ;
12239   return 0;
12240 }
12241 _ACEOF
12242 if ac_fn_c_try_compile "$LINENO"; then :
12243
12244 cat >>confdefs.h <<_ACEOF
12245 #define intptr_t $ac_type
12246 _ACEOF
12247
12248           ac_type=
12249 fi
12250 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12251        test -z "$ac_type" && break
12252      done
12253 fi
12254
12255
12256
12257   ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
12258 if test "x$ac_cv_type_uintptr_t" = xyes; then :
12259
12260 $as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h
12261
12262 else
12263   for ac_type in 'unsigned int' 'unsigned long int' \
12264         'unsigned long long int'; do
12265        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12266 /* end confdefs.h.  */
12267 $ac_includes_default
12268 int
12269 main ()
12270 {
12271 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
12272 test_array [0] = 0;
12273 return test_array [0];
12274
12275   ;
12276   return 0;
12277 }
12278 _ACEOF
12279 if ac_fn_c_try_compile "$LINENO"; then :
12280
12281 cat >>confdefs.h <<_ACEOF
12282 #define uintptr_t $ac_type
12283 _ACEOF
12284
12285           ac_type=
12286 fi
12287 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12288        test -z "$ac_type" && break
12289      done
12290 fi
12291
12292
12293
12294   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
12295 $as_echo_n "checking for unsigned long long int... " >&6; }
12296 if ${ac_cv_type_unsigned_long_long_int+:} false; then :
12297   $as_echo_n "(cached) " >&6
12298 else
12299   ac_cv_type_unsigned_long_long_int=yes
12300      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
12301        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12302 /* end confdefs.h.  */
12303
12304   /* For now, do not test the preprocessor; as of 2007 there are too many
12305          implementations with broken preprocessors.  Perhaps this can
12306          be revisited in 2012.  In the meantime, code should not expect
12307          #if to work with literals wider than 32 bits.  */
12308       /* Test literals.  */
12309       long long int ll = 9223372036854775807ll;
12310       long long int nll = -9223372036854775807LL;
12311       unsigned long long int ull = 18446744073709551615ULL;
12312       /* Test constant expressions.   */
12313       typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
12314                      ? 1 : -1)];
12315       typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
12316                      ? 1 : -1)];
12317       int i = 63;
12318 int
12319 main ()
12320 {
12321 /* Test availability of runtime routines for shift and division.  */
12322       long long int llmax = 9223372036854775807ll;
12323       unsigned long long int ullmax = 18446744073709551615ull;
12324       return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
12325               | (llmax / ll) | (llmax % ll)
12326               | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
12327               | (ullmax / ull) | (ullmax % ull));
12328   ;
12329   return 0;
12330 }
12331
12332 _ACEOF
12333 if ac_fn_c_try_link "$LINENO"; then :
12334
12335 else
12336   ac_cv_type_unsigned_long_long_int=no
12337 fi
12338 rm -f core conftest.err conftest.$ac_objext \
12339     conftest$ac_exeext conftest.$ac_ext
12340      fi
12341 fi
12342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
12343 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
12344   if test $ac_cv_type_unsigned_long_long_int = yes; then
12345
12346 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
12347
12348   fi
12349
12350
12351
12352   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
12353 $as_echo_n "checking for long long int... " >&6; }
12354 if ${ac_cv_type_long_long_int+:} false; then :
12355   $as_echo_n "(cached) " >&6
12356 else
12357   ac_cv_type_long_long_int=yes
12358       if test "x${ac_cv_prog_cc_c99-no}" = xno; then
12359         ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
12360         if test $ac_cv_type_long_long_int = yes; then
12361                                   if test "$cross_compiling" = yes; then :
12362   :
12363 else
12364   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12365 /* end confdefs.h.  */
12366 #include <limits.h>
12367                  #ifndef LLONG_MAX
12368                  # define HALF \
12369                           (1LL << (sizeof (long long int) * CHAR_BIT - 2))
12370                  # define LLONG_MAX (HALF - 1 + HALF)
12371                  #endif
12372 int
12373 main ()
12374 {
12375 long long int n = 1;
12376                  int i;
12377                  for (i = 0; ; i++)
12378                    {
12379                      long long int m = n << i;
12380                      if (m >> i != n)
12381                        return 1;
12382                      if (LLONG_MAX / 2 < m)
12383                        break;
12384                    }
12385                  return 0;
12386   ;
12387   return 0;
12388 }
12389 _ACEOF
12390 if ac_fn_c_try_run "$LINENO"; then :
12391
12392 else
12393   ac_cv_type_long_long_int=no
12394 fi
12395 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12396   conftest.$ac_objext conftest.beam conftest.$ac_ext
12397 fi
12398
12399         fi
12400       fi
12401 fi
12402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
12403 $as_echo "$ac_cv_type_long_long_int" >&6; }
12404   if test $ac_cv_type_long_long_int = yes; then
12405
12406 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
12407
12408   fi
12409
12410
12411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for locale_t" >&5
12412 $as_echo_n "checking for locale_t... " >&6; }
12413 if ${pgac_cv_type_locale_t+:} false; then :
12414   $as_echo_n "(cached) " >&6
12415 else
12416   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12417 /* end confdefs.h.  */
12418 #include <locale.h>
12419 locale_t x;
12420 int
12421 main ()
12422 {
12423
12424   ;
12425   return 0;
12426 }
12427 _ACEOF
12428 if ac_fn_c_try_compile "$LINENO"; then :
12429   pgac_cv_type_locale_t=yes
12430 else
12431   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12432 /* end confdefs.h.  */
12433 #include <xlocale.h>
12434 locale_t x;
12435 int
12436 main ()
12437 {
12438
12439   ;
12440   return 0;
12441 }
12442 _ACEOF
12443 if ac_fn_c_try_compile "$LINENO"; then :
12444   pgac_cv_type_locale_t='yes (in xlocale.h)'
12445 else
12446   pgac_cv_type_locale_t=no
12447 fi
12448 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12449 fi
12450 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12451 fi
12452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_locale_t" >&5
12453 $as_echo "$pgac_cv_type_locale_t" >&6; }
12454 if test "$pgac_cv_type_locale_t" != no; then
12455
12456 $as_echo "#define HAVE_LOCALE_T 1" >>confdefs.h
12457
12458 fi
12459 if test "$pgac_cv_type_locale_t" = 'yes (in xlocale.h)'; then
12460
12461 $as_echo "#define LOCALE_T_IN_XLOCALE 1" >>confdefs.h
12462
12463 fi
12464
12465 # MSVC doesn't cope well with defining restrict to __restrict, the
12466 # spelling it understands, because it conflicts with
12467 # __declspec(restrict). Therefore we define pg_restrict to the
12468 # appropriate definition, which presumably won't conflict.
12469 #
12470 # Allow platforms with buggy compilers to force restrict to not be
12471 # used by setting $FORCE_DISABLE_RESTRICT=yes in the relevant
12472 # template.
12473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
12474 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
12475 if ${ac_cv_c_restrict+:} false; then :
12476   $as_echo_n "(cached) " >&6
12477 else
12478   ac_cv_c_restrict=no
12479    # The order here caters to the fact that C++ does not require restrict.
12480    for ac_kw in __restrict __restrict__ _Restrict restrict; do
12481      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12482 /* end confdefs.h.  */
12483 typedef int * int_ptr;
12484         int foo (int_ptr $ac_kw ip) {
12485         return ip[0];
12486        }
12487 int
12488 main ()
12489 {
12490 int s[1];
12491         int * $ac_kw t = s;
12492         t[0] = 0;
12493         return foo(t)
12494   ;
12495   return 0;
12496 }
12497 _ACEOF
12498 if ac_fn_c_try_compile "$LINENO"; then :
12499   ac_cv_c_restrict=$ac_kw
12500 fi
12501 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12502      test "$ac_cv_c_restrict" != no && break
12503    done
12504
12505 fi
12506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
12507 $as_echo "$ac_cv_c_restrict" >&6; }
12508
12509  case $ac_cv_c_restrict in
12510    restrict) ;;
12511    no) $as_echo "#define restrict /**/" >>confdefs.h
12512  ;;
12513    *)  cat >>confdefs.h <<_ACEOF
12514 #define restrict $ac_cv_c_restrict
12515 _ACEOF
12516  ;;
12517  esac
12518
12519 if test "$ac_cv_c_restrict" = "no" -o "x$FORCE_DISABLE_RESTRICT" = "xyes"; then
12520   pg_restrict=""
12521 else
12522   pg_restrict="$ac_cv_c_restrict"
12523 fi
12524
12525 cat >>confdefs.h <<_ACEOF
12526 #define pg_restrict $pg_restrict
12527 _ACEOF
12528
12529
12530 ac_fn_c_check_type "$LINENO" "struct cmsgcred" "ac_cv_type_struct_cmsgcred" "#include <sys/socket.h>
12531 #include <sys/param.h>
12532 #ifdef HAVE_SYS_UCRED_H
12533 #include <sys/ucred.h>
12534 #endif
12535 "
12536 if test "x$ac_cv_type_struct_cmsgcred" = xyes; then :
12537
12538 cat >>confdefs.h <<_ACEOF
12539 #define HAVE_STRUCT_CMSGCRED 1
12540 _ACEOF
12541
12542
12543 fi
12544
12545
12546 ac_fn_c_check_type "$LINENO" "struct option" "ac_cv_type_struct_option" "#ifdef HAVE_GETOPT_H
12547 #include <getopt.h>
12548 #endif
12549 "
12550 if test "x$ac_cv_type_struct_option" = xyes; then :
12551
12552 cat >>confdefs.h <<_ACEOF
12553 #define HAVE_STRUCT_OPTION 1
12554 _ACEOF
12555
12556
12557 fi
12558
12559
12560 if test "$with_zlib" = yes; then
12561   # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
12562   # did not).  While we could work around the lack of z_streamp, it
12563   # seems unwise to encourage people to use such old zlib versions...
12564   ac_fn_c_check_type "$LINENO" "z_streamp" "ac_cv_type_z_streamp" "#include <zlib.h>
12565 "
12566 if test "x$ac_cv_type_z_streamp" = xyes; then :
12567
12568 else
12569   as_fn_error $? "zlib version is too old
12570 Use --without-zlib to disable zlib support." "$LINENO" 5
12571 fi
12572
12573 fi
12574
12575 # On PPC, check if assembler supports LWARX instruction's mutex hint bit
12576 case $host_cpu in
12577   ppc*|powerpc*)
12578     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports lwarx hint bit" >&5
12579 $as_echo_n "checking whether assembler supports lwarx hint bit... " >&6; }
12580     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12581 /* end confdefs.h.  */
12582
12583 int
12584 main ()
12585 {
12586 int a = 0; int *p = &a; int r;
12587          __asm__ __volatile__ (" lwarx %0,0,%1,1\n" : "=&r"(r) : "r"(p));
12588   ;
12589   return 0;
12590 }
12591 _ACEOF
12592 if ac_fn_c_try_compile "$LINENO"; then :
12593   pgac_cv_have_ppc_mutex_hint=yes
12594 else
12595   pgac_cv_have_ppc_mutex_hint=no
12596 fi
12597 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12598     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_ppc_mutex_hint" >&5
12599 $as_echo "$pgac_cv_have_ppc_mutex_hint" >&6; }
12600     if test x"$pgac_cv_have_ppc_mutex_hint" = xyes ; then
12601
12602 $as_echo "#define HAVE_PPC_LWARX_MUTEX_HINT 1" >>confdefs.h
12603
12604     fi
12605   ;;
12606 esac
12607
12608 # Check largefile support.  You might think this is a system service not a
12609 # compiler characteristic, but you'd be wrong.  We must check this before
12610 # probing existence of related functions such as fseeko, since the largefile
12611 # defines can affect what is generated for that.
12612 if test "$PORTNAME" != "win32"; then
12613    # Check whether --enable-largefile was given.
12614 if test "${enable_largefile+set}" = set; then :
12615   enableval=$enable_largefile;
12616 fi
12617
12618 if test "$enable_largefile" != no; then
12619
12620   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
12621 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
12622 if ${ac_cv_sys_largefile_CC+:} false; then :
12623   $as_echo_n "(cached) " >&6
12624 else
12625   ac_cv_sys_largefile_CC=no
12626      if test "$GCC" != yes; then
12627        ac_save_CC=$CC
12628        while :; do
12629          # IRIX 6.2 and later do not support large files by default,
12630          # so use the C compiler's -n32 option if that helps.
12631          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12632 /* end confdefs.h.  */
12633 #include <sys/types.h>
12634  /* Check that off_t can represent 2**63 - 1 correctly.
12635     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12636     since some C++ compilers masquerading as C compilers
12637     incorrectly reject 9223372036854775807.  */
12638 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12639   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12640                        && LARGE_OFF_T % 2147483647 == 1)
12641                       ? 1 : -1];
12642 int
12643 main ()
12644 {
12645
12646   ;
12647   return 0;
12648 }
12649 _ACEOF
12650          if ac_fn_c_try_compile "$LINENO"; then :
12651   break
12652 fi
12653 rm -f core conftest.err conftest.$ac_objext
12654          CC="$CC -n32"
12655          if ac_fn_c_try_compile "$LINENO"; then :
12656   ac_cv_sys_largefile_CC=' -n32'; break
12657 fi
12658 rm -f core conftest.err conftest.$ac_objext
12659          break
12660        done
12661        CC=$ac_save_CC
12662        rm -f conftest.$ac_ext
12663     fi
12664 fi
12665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
12666 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
12667   if test "$ac_cv_sys_largefile_CC" != no; then
12668     CC=$CC$ac_cv_sys_largefile_CC
12669   fi
12670
12671   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
12672 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
12673 if ${ac_cv_sys_file_offset_bits+:} false; then :
12674   $as_echo_n "(cached) " >&6
12675 else
12676   while :; do
12677   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12678 /* end confdefs.h.  */
12679 #include <sys/types.h>
12680  /* Check that off_t can represent 2**63 - 1 correctly.
12681     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12682     since some C++ compilers masquerading as C compilers
12683     incorrectly reject 9223372036854775807.  */
12684 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12685   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12686                        && LARGE_OFF_T % 2147483647 == 1)
12687                       ? 1 : -1];
12688 int
12689 main ()
12690 {
12691
12692   ;
12693   return 0;
12694 }
12695 _ACEOF
12696 if ac_fn_c_try_compile "$LINENO"; then :
12697   ac_cv_sys_file_offset_bits=no; break
12698 fi
12699 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12700   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12701 /* end confdefs.h.  */
12702 #define _FILE_OFFSET_BITS 64
12703 #include <sys/types.h>
12704  /* Check that off_t can represent 2**63 - 1 correctly.
12705     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12706     since some C++ compilers masquerading as C compilers
12707     incorrectly reject 9223372036854775807.  */
12708 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12709   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12710                        && LARGE_OFF_T % 2147483647 == 1)
12711                       ? 1 : -1];
12712 int
12713 main ()
12714 {
12715
12716   ;
12717   return 0;
12718 }
12719 _ACEOF
12720 if ac_fn_c_try_compile "$LINENO"; then :
12721   ac_cv_sys_file_offset_bits=64; break
12722 fi
12723 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12724   ac_cv_sys_file_offset_bits=unknown
12725   break
12726 done
12727 fi
12728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
12729 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
12730 case $ac_cv_sys_file_offset_bits in #(
12731   no | unknown) ;;
12732   *)
12733 cat >>confdefs.h <<_ACEOF
12734 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
12735 _ACEOF
12736 ;;
12737 esac
12738 rm -rf conftest*
12739   if test $ac_cv_sys_file_offset_bits = unknown; then
12740     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
12741 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
12742 if ${ac_cv_sys_large_files+:} false; then :
12743   $as_echo_n "(cached) " >&6
12744 else
12745   while :; do
12746   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12747 /* end confdefs.h.  */
12748 #include <sys/types.h>
12749  /* Check that off_t can represent 2**63 - 1 correctly.
12750     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12751     since some C++ compilers masquerading as C compilers
12752     incorrectly reject 9223372036854775807.  */
12753 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12754   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12755                        && LARGE_OFF_T % 2147483647 == 1)
12756                       ? 1 : -1];
12757 int
12758 main ()
12759 {
12760
12761   ;
12762   return 0;
12763 }
12764 _ACEOF
12765 if ac_fn_c_try_compile "$LINENO"; then :
12766   ac_cv_sys_large_files=no; break
12767 fi
12768 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12769   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12770 /* end confdefs.h.  */
12771 #define _LARGE_FILES 1
12772 #include <sys/types.h>
12773  /* Check that off_t can represent 2**63 - 1 correctly.
12774     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12775     since some C++ compilers masquerading as C compilers
12776     incorrectly reject 9223372036854775807.  */
12777 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12778   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12779                        && LARGE_OFF_T % 2147483647 == 1)
12780                       ? 1 : -1];
12781 int
12782 main ()
12783 {
12784
12785   ;
12786   return 0;
12787 }
12788 _ACEOF
12789 if ac_fn_c_try_compile "$LINENO"; then :
12790   ac_cv_sys_large_files=1; break
12791 fi
12792 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12793   ac_cv_sys_large_files=unknown
12794   break
12795 done
12796 fi
12797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
12798 $as_echo "$ac_cv_sys_large_files" >&6; }
12799 case $ac_cv_sys_large_files in #(
12800   no | unknown) ;;
12801   *)
12802 cat >>confdefs.h <<_ACEOF
12803 #define _LARGE_FILES $ac_cv_sys_large_files
12804 _ACEOF
12805 ;;
12806 esac
12807 rm -rf conftest*
12808   fi
12809
12810
12811 fi
12812
12813
12814 fi
12815
12816 # Check for largefile support (must be after AC_SYS_LARGEFILE)
12817 # The cast to long int works around a bug in the HP C Compiler
12818 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12819 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12820 # This bug is HP SR number 8606223364.
12821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
12822 $as_echo_n "checking size of off_t... " >&6; }
12823 if ${ac_cv_sizeof_off_t+:} false; then :
12824   $as_echo_n "(cached) " >&6
12825 else
12826   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t"        "$ac_includes_default"; then :
12827
12828 else
12829   if test "$ac_cv_type_off_t" = yes; then
12830      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12831 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12832 as_fn_error 77 "cannot compute sizeof (off_t)
12833 See \`config.log' for more details" "$LINENO" 5; }
12834    else
12835      ac_cv_sizeof_off_t=0
12836    fi
12837 fi
12838
12839 fi
12840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
12841 $as_echo "$ac_cv_sizeof_off_t" >&6; }
12842
12843
12844
12845 cat >>confdefs.h <<_ACEOF
12846 #define SIZEOF_OFF_T $ac_cv_sizeof_off_t
12847 _ACEOF
12848
12849
12850
12851 # If we don't have largefile support, can't handle segsize >= 2GB.
12852 if test "$ac_cv_sizeof_off_t" -lt 8 -a "$segsize" != "1"; then
12853    as_fn_error $? "Large file support is not enabled. Segment size cannot be larger than 1GB." "$LINENO" 5
12854 fi
12855
12856
12857 ##
12858 ## Functions, global variables
12859 ##
12860
12861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int timezone" >&5
12862 $as_echo_n "checking for int timezone... " >&6; }
12863 if ${pgac_cv_var_int_timezone+:} false; then :
12864   $as_echo_n "(cached) " >&6
12865 else
12866   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12867 /* end confdefs.h.  */
12868 #include <time.h>
12869 int res;
12870 int
12871 main ()
12872 {
12873 #ifndef __CYGWIN__
12874 res = timezone / 60;
12875 #else
12876 res = _timezone / 60;
12877 #endif
12878   ;
12879   return 0;
12880 }
12881 _ACEOF
12882 if ac_fn_c_try_link "$LINENO"; then :
12883   pgac_cv_var_int_timezone=yes
12884 else
12885   pgac_cv_var_int_timezone=no
12886 fi
12887 rm -f core conftest.err conftest.$ac_objext \
12888     conftest$ac_exeext conftest.$ac_ext
12889 fi
12890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_timezone" >&5
12891 $as_echo "$pgac_cv_var_int_timezone" >&6; }
12892 if test x"$pgac_cv_var_int_timezone" = xyes ; then
12893
12894 $as_echo "#define HAVE_INT_TIMEZONE 1" >>confdefs.h
12895
12896 fi
12897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for accept()" >&5
12898 $as_echo_n "checking types of arguments for accept()... " >&6; }
12899  if ${ac_cv_func_accept_return+:} false; then :
12900   $as_echo_n "(cached) " >&6
12901 else
12902    if ${ac_cv_func_accept_arg1+:} false; then :
12903   $as_echo_n "(cached) " >&6
12904 else
12905     if ${ac_cv_func_accept_arg2+:} false; then :
12906   $as_echo_n "(cached) " >&6
12907 else
12908      if ${ac_cv_func_accept_arg3+:} false; then :
12909   $as_echo_n "(cached) " >&6
12910 else
12911       for ac_cv_func_accept_return in 'int' 'unsigned int PASCAL' 'SOCKET WSAAPI'; do
12912       for ac_cv_func_accept_arg1 in 'int' 'unsigned int' 'SOCKET'; do
12913        for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
12914         for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
12915          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12916 /* end confdefs.h.  */
12917 #include <sys/types.h>
12918 #include <sys/socket.h>
12919 extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
12920 _ACEOF
12921 if ac_fn_c_try_compile "$LINENO"; then :
12922   ac_not_found=no; break 4
12923 else
12924   ac_not_found=yes
12925 fi
12926 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12927        done
12928       done
12929      done
12930     done
12931     if test "$ac_not_found" = yes; then
12932       as_fn_error $? "could not determine argument types" "$LINENO" 5
12933     fi
12934     if test "$ac_cv_func_accept_arg3" = "void"; then
12935       ac_cv_func_accept_arg3=int
12936     fi
12937
12938 fi
12939
12940 fi
12941
12942 fi
12943
12944 fi
12945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&5
12946 $as_echo "$ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&6; }
12947
12948 cat >>confdefs.h <<_ACEOF
12949 #define ACCEPT_TYPE_RETURN $ac_cv_func_accept_return
12950 _ACEOF
12951
12952
12953 cat >>confdefs.h <<_ACEOF
12954 #define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
12955 _ACEOF
12956
12957
12958 cat >>confdefs.h <<_ACEOF
12959 #define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
12960 _ACEOF
12961
12962
12963 cat >>confdefs.h <<_ACEOF
12964 #define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
12965 _ACEOF
12966
12967
12968 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday takes only one argument" >&5
12969 $as_echo_n "checking whether gettimeofday takes only one argument... " >&6; }
12970 if ${pgac_cv_func_gettimeofday_1arg+:} false; then :
12971   $as_echo_n "(cached) " >&6
12972 else
12973   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12974 /* end confdefs.h.  */
12975 #include <sys/time.h>
12976 int
12977 main ()
12978 {
12979 struct timeval *tp;
12980 struct timezone *tzp;
12981 gettimeofday(tp,tzp);
12982   ;
12983   return 0;
12984 }
12985 _ACEOF
12986 if ac_fn_c_try_compile "$LINENO"; then :
12987   pgac_cv_func_gettimeofday_1arg=no
12988 else
12989   pgac_cv_func_gettimeofday_1arg=yes
12990 fi
12991 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12992 fi
12993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_gettimeofday_1arg" >&5
12994 $as_echo "$pgac_cv_func_gettimeofday_1arg" >&6; }
12995 if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
12996
12997 $as_echo "#define GETTIMEOFDAY_1ARG 1" >>confdefs.h
12998
12999 fi
13000
13001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wcstombs_l declaration" >&5
13002 $as_echo_n "checking for wcstombs_l declaration... " >&6; }
13003 if ${pgac_cv_func_wcstombs_l+:} false; then :
13004   $as_echo_n "(cached) " >&6
13005 else
13006   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13007 /* end confdefs.h.  */
13008 #include <stdlib.h>
13009 #include <locale.h>
13010 int
13011 main ()
13012 {
13013 #ifndef wcstombs_l
13014 (void) wcstombs_l;
13015 #endif
13016   ;
13017   return 0;
13018 }
13019 _ACEOF
13020 if ac_fn_c_try_compile "$LINENO"; then :
13021   pgac_cv_func_wcstombs_l='yes'
13022 else
13023   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13024 /* end confdefs.h.  */
13025 #include <stdlib.h>
13026 #include <locale.h>
13027 #include <xlocale.h>
13028 int
13029 main ()
13030 {
13031 #ifndef wcstombs_l
13032 (void) wcstombs_l;
13033 #endif
13034   ;
13035   return 0;
13036 }
13037 _ACEOF
13038 if ac_fn_c_try_compile "$LINENO"; then :
13039   pgac_cv_func_wcstombs_l='yes (in xlocale.h)'
13040 else
13041   pgac_cv_func_wcstombs_l='no'
13042 fi
13043 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13044 fi
13045 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13046 fi
13047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_wcstombs_l" >&5
13048 $as_echo "$pgac_cv_func_wcstombs_l" >&6; }
13049 if test "$pgac_cv_func_wcstombs_l" = 'yes (in xlocale.h)'; then
13050
13051 $as_echo "#define WCSTOMBS_L_IN_XLOCALE 1" >>confdefs.h
13052
13053 fi
13054
13055 # Some versions of libedit contain strlcpy(), setproctitle(), and other
13056 # symbols that that library has no business exposing to the world.  Pending
13057 # acquisition of a clue by those developers, ignore libedit (including its
13058 # possible alias of libreadline) while checking for everything else.
13059 LIBS_including_readline="$LIBS"
13060 LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
13061
13062 for ac_func in cbrt clock_gettime dlopen fdatasync getifaddrs getpeerucred getrlimit mbstowcs_l memmove poll posix_fallocate pstat pthread_is_threaded_np readlink setproctitle setsid shm_open symlink sync_file_range utime utimes wcstombs_l
13063 do :
13064   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13065 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13066 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13067   cat >>confdefs.h <<_ACEOF
13068 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13069 _ACEOF
13070
13071 fi
13072 done
13073
13074
13075 ac_fn_c_check_func "$LINENO" "fseeko" "ac_cv_func_fseeko"
13076 if test "x$ac_cv_func_fseeko" = xyes; then :
13077   $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
13078
13079 else
13080   case " $LIBOBJS " in
13081   *" fseeko.$ac_objext "* ) ;;
13082   *) LIBOBJS="$LIBOBJS fseeko.$ac_objext"
13083  ;;
13084 esac
13085
13086 fi
13087
13088
13089 case $host_os in
13090         # NetBSD uses a custom fseeko/ftello built on fsetpos/fgetpos
13091         # Mingw uses macros to access Win32 API calls
13092         netbsd*|mingw*)
13093
13094 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
13095
13096                 ac_cv_func_fseeko=yes;;
13097         *)
13098                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
13099 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
13100 if ${ac_cv_sys_largefile_source+:} false; then :
13101   $as_echo_n "(cached) " >&6
13102 else
13103   while :; do
13104   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13105 /* end confdefs.h.  */
13106 #include <sys/types.h> /* for off_t */
13107      #include <stdio.h>
13108 int
13109 main ()
13110 {
13111 int (*fp) (FILE *, off_t, int) = fseeko;
13112      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
13113   ;
13114   return 0;
13115 }
13116 _ACEOF
13117 if ac_fn_c_try_link "$LINENO"; then :
13118   ac_cv_sys_largefile_source=no; break
13119 fi
13120 rm -f core conftest.err conftest.$ac_objext \
13121     conftest$ac_exeext conftest.$ac_ext
13122   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13123 /* end confdefs.h.  */
13124 #define _LARGEFILE_SOURCE 1
13125 #include <sys/types.h> /* for off_t */
13126      #include <stdio.h>
13127 int
13128 main ()
13129 {
13130 int (*fp) (FILE *, off_t, int) = fseeko;
13131      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
13132   ;
13133   return 0;
13134 }
13135 _ACEOF
13136 if ac_fn_c_try_link "$LINENO"; then :
13137   ac_cv_sys_largefile_source=1; break
13138 fi
13139 rm -f core conftest.err conftest.$ac_objext \
13140     conftest$ac_exeext conftest.$ac_ext
13141   ac_cv_sys_largefile_source=unknown
13142   break
13143 done
13144 fi
13145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
13146 $as_echo "$ac_cv_sys_largefile_source" >&6; }
13147 case $ac_cv_sys_largefile_source in #(
13148   no | unknown) ;;
13149   *)
13150 cat >>confdefs.h <<_ACEOF
13151 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
13152 _ACEOF
13153 ;;
13154 esac
13155 rm -rf conftest*
13156
13157 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
13158 # in glibc 2.1.3, but that breaks too many other things.
13159 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
13160 if test $ac_cv_sys_largefile_source != unknown; then
13161
13162 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
13163
13164 fi
13165 ;;
13166 esac
13167
13168 # posix_fadvise() is a no-op on Solaris, so don't incur function overhead
13169 # by calling it, 2009-04-02
13170 # http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/posix_fadvise.c
13171 if test "$PORTNAME" != "solaris"; then
13172 for ac_func in posix_fadvise
13173 do :
13174   ac_fn_c_check_func "$LINENO" "posix_fadvise" "ac_cv_func_posix_fadvise"
13175 if test "x$ac_cv_func_posix_fadvise" = xyes; then :
13176   cat >>confdefs.h <<_ACEOF
13177 #define HAVE_POSIX_FADVISE 1
13178 _ACEOF
13179
13180 fi
13181 done
13182
13183 ac_fn_c_check_decl "$LINENO" "posix_fadvise" "ac_cv_have_decl_posix_fadvise" "#include <fcntl.h>
13184 "
13185 if test "x$ac_cv_have_decl_posix_fadvise" = xyes; then :
13186   ac_have_decl=1
13187 else
13188   ac_have_decl=0
13189 fi
13190
13191 cat >>confdefs.h <<_ACEOF
13192 #define HAVE_DECL_POSIX_FADVISE $ac_have_decl
13193 _ACEOF
13194
13195 fi
13196
13197 ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "#include <unistd.h>
13198 "
13199 if test "x$ac_cv_have_decl_fdatasync" = xyes; then :
13200   ac_have_decl=1
13201 else
13202   ac_have_decl=0
13203 fi
13204
13205 cat >>confdefs.h <<_ACEOF
13206 #define HAVE_DECL_FDATASYNC $ac_have_decl
13207 _ACEOF
13208
13209 ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
13210 if test "x$ac_cv_have_decl_strlcat" = xyes; then :
13211   ac_have_decl=1
13212 else
13213   ac_have_decl=0
13214 fi
13215
13216 cat >>confdefs.h <<_ACEOF
13217 #define HAVE_DECL_STRLCAT $ac_have_decl
13218 _ACEOF
13219 ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
13220 if test "x$ac_cv_have_decl_strlcpy" = xyes; then :
13221   ac_have_decl=1
13222 else
13223   ac_have_decl=0
13224 fi
13225
13226 cat >>confdefs.h <<_ACEOF
13227 #define HAVE_DECL_STRLCPY $ac_have_decl
13228 _ACEOF
13229 ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
13230 if test "x$ac_cv_have_decl_strnlen" = xyes; then :
13231   ac_have_decl=1
13232 else
13233   ac_have_decl=0
13234 fi
13235
13236 cat >>confdefs.h <<_ACEOF
13237 #define HAVE_DECL_STRNLEN $ac_have_decl
13238 _ACEOF
13239
13240 # This is probably only present on macOS, but may as well check always
13241 ac_fn_c_check_decl "$LINENO" "F_FULLFSYNC" "ac_cv_have_decl_F_FULLFSYNC" "#include <fcntl.h>
13242 "
13243 if test "x$ac_cv_have_decl_F_FULLFSYNC" = xyes; then :
13244   ac_have_decl=1
13245 else
13246   ac_have_decl=0
13247 fi
13248
13249 cat >>confdefs.h <<_ACEOF
13250 #define HAVE_DECL_F_FULLFSYNC $ac_have_decl
13251 _ACEOF
13252
13253
13254 HAVE_IPV6=no
13255 ac_fn_c_check_type "$LINENO" "struct sockaddr_in6" "ac_cv_type_struct_sockaddr_in6" "$ac_includes_default
13256 #include <netinet/in.h>
13257 "
13258 if test "x$ac_cv_type_struct_sockaddr_in6" = xyes; then :
13259
13260 $as_echo "#define HAVE_IPV6 1" >>confdefs.h
13261
13262          HAVE_IPV6=yes
13263 fi
13264
13265
13266
13267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PS_STRINGS" >&5
13268 $as_echo_n "checking for PS_STRINGS... " >&6; }
13269 if ${pgac_cv_var_PS_STRINGS+:} false; then :
13270   $as_echo_n "(cached) " >&6
13271 else
13272   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13273 /* end confdefs.h.  */
13274 #include <machine/vmparam.h>
13275 #include <sys/exec.h>
13276
13277 int
13278 main ()
13279 {
13280 PS_STRINGS->ps_nargvstr = 1;
13281 PS_STRINGS->ps_argvstr = "foo";
13282   ;
13283   return 0;
13284 }
13285 _ACEOF
13286 if ac_fn_c_try_link "$LINENO"; then :
13287   pgac_cv_var_PS_STRINGS=yes
13288 else
13289   pgac_cv_var_PS_STRINGS=no
13290 fi
13291 rm -f core conftest.err conftest.$ac_objext \
13292     conftest$ac_exeext conftest.$ac_ext
13293 fi
13294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_PS_STRINGS" >&5
13295 $as_echo "$pgac_cv_var_PS_STRINGS" >&6; }
13296 if test "$pgac_cv_var_PS_STRINGS" = yes ; then
13297
13298 $as_echo "#define HAVE_PS_STRINGS 1" >>confdefs.h
13299
13300 fi
13301
13302
13303 # We use our snprintf.c emulation if either snprintf() or vsnprintf()
13304 # is missing.  Yes, there are machines that have only one.  We may
13305 # also decide to use snprintf.c if snprintf() is present but does not
13306 # have all the features we need --- see below.
13307
13308 if test "$PORTNAME" = "win32"; then
13309   # Win32 gets snprintf.c built unconditionally.
13310   #
13311   # To properly translate all NLS languages strings, we must support the
13312   # *printf() %$ format, which allows *printf() arguments to be selected
13313   # by position in the translated string.
13314   #
13315   # libintl versions < 0.13 use the native *printf() functions, and Win32
13316   # *printf() doesn't understand %$, so we must use our /port versions,
13317   # which do understand %$. libintl versions >= 0.13 include their own
13318   # *printf versions on Win32.  The libintl 0.13 release note text is:
13319   #
13320   #   C format strings with positions, as they arise when a translator
13321   #   needs to reorder a sentence, are now supported on all platforms.
13322   #   On those few platforms (NetBSD and Woe32) for which the native
13323   #   printf()/fprintf()/... functions don't support such format
13324   #   strings, replacements are provided through <libintl.h>.
13325   #
13326   # We could use libintl >= 0.13's *printf() if we were sure that we had
13327   # a litint >= 0.13 at runtime, but seeing that there is no clean way
13328   # to guarantee that, it is best to just use our own, so we are sure to
13329   # get %$ support. In include/port.h we disable the *printf() macros
13330   # that might have been defined by libintl.
13331   #
13332   # We do this unconditionally whether NLS is used or not so we are sure
13333   # that all Win32 libraries and binaries behave the same.
13334   pgac_need_repl_snprintf=yes
13335 else
13336   pgac_need_repl_snprintf=no
13337   for ac_func in snprintf
13338 do :
13339   ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
13340 if test "x$ac_cv_func_snprintf" = xyes; then :
13341   cat >>confdefs.h <<_ACEOF
13342 #define HAVE_SNPRINTF 1
13343 _ACEOF
13344
13345 else
13346   pgac_need_repl_snprintf=yes
13347 fi
13348 done
13349
13350   for ac_func in vsnprintf
13351 do :
13352   ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
13353 if test "x$ac_cv_func_vsnprintf" = xyes; then :
13354   cat >>confdefs.h <<_ACEOF
13355 #define HAVE_VSNPRINTF 1
13356 _ACEOF
13357
13358 else
13359   pgac_need_repl_snprintf=yes
13360 fi
13361 done
13362
13363 fi
13364
13365
13366 # Check whether <stdio.h> declares snprintf() and vsnprintf(); if not,
13367 # include/c.h will provide declarations.  Note this is a separate test
13368 # from whether the functions exist in the C library --- there are
13369 # systems that have the functions but don't bother to declare them :-(
13370
13371 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
13372 if test "x$ac_cv_have_decl_snprintf" = xyes; then :
13373   ac_have_decl=1
13374 else
13375   ac_have_decl=0
13376 fi
13377
13378 cat >>confdefs.h <<_ACEOF
13379 #define HAVE_DECL_SNPRINTF $ac_have_decl
13380 _ACEOF
13381 ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
13382 if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
13383   ac_have_decl=1
13384 else
13385   ac_have_decl=0
13386 fi
13387
13388 cat >>confdefs.h <<_ACEOF
13389 #define HAVE_DECL_VSNPRINTF $ac_have_decl
13390 _ACEOF
13391
13392
13393
13394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for isinf" >&5
13395 $as_echo_n "checking for isinf... " >&6; }
13396 if ${ac_cv_func_isinf+:} false; then :
13397   $as_echo_n "(cached) " >&6
13398 else
13399   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13400 /* end confdefs.h.  */
13401
13402 #include <math.h>
13403 double glob_double;
13404
13405 int
13406 main ()
13407 {
13408 return isinf(glob_double) ? 0 : 1;
13409   ;
13410   return 0;
13411 }
13412 _ACEOF
13413 if ac_fn_c_try_link "$LINENO"; then :
13414   ac_cv_func_isinf=yes
13415 else
13416   ac_cv_func_isinf=no
13417 fi
13418 rm -f core conftest.err conftest.$ac_objext \
13419     conftest$ac_exeext conftest.$ac_ext
13420 fi
13421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_isinf" >&5
13422 $as_echo "$ac_cv_func_isinf" >&6; }
13423
13424 if test $ac_cv_func_isinf = yes ; then
13425
13426 $as_echo "#define HAVE_ISINF 1" >>confdefs.h
13427
13428 else
13429   case " $LIBOBJS " in
13430   *" isinf.$ac_objext "* ) ;;
13431   *) LIBOBJS="$LIBOBJS isinf.$ac_objext"
13432  ;;
13433 esac
13434
13435   # Look for a way to implement a substitute for isinf()
13436   for ac_func in fpclass fp_class fp_class_d class
13437 do :
13438   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13439 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13440 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13441   cat >>confdefs.h <<_ACEOF
13442 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13443 _ACEOF
13444  break
13445 fi
13446 done
13447
13448 fi
13449
13450 ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt"
13451 if test "x$ac_cv_func_crypt" = xyes; then :
13452   $as_echo "#define HAVE_CRYPT 1" >>confdefs.h
13453
13454 else
13455   case " $LIBOBJS " in
13456   *" crypt.$ac_objext "* ) ;;
13457   *) LIBOBJS="$LIBOBJS crypt.$ac_objext"
13458  ;;
13459 esac
13460
13461 fi
13462
13463 ac_fn_c_check_func "$LINENO" "fls" "ac_cv_func_fls"
13464 if test "x$ac_cv_func_fls" = xyes; then :
13465   $as_echo "#define HAVE_FLS 1" >>confdefs.h
13466
13467 else
13468   case " $LIBOBJS " in
13469   *" fls.$ac_objext "* ) ;;
13470   *) LIBOBJS="$LIBOBJS fls.$ac_objext"
13471  ;;
13472 esac
13473
13474 fi
13475
13476 ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt"
13477 if test "x$ac_cv_func_getopt" = xyes; then :
13478   $as_echo "#define HAVE_GETOPT 1" >>confdefs.h
13479
13480 else
13481   case " $LIBOBJS " in
13482   *" getopt.$ac_objext "* ) ;;
13483   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
13484  ;;
13485 esac
13486
13487 fi
13488
13489 ac_fn_c_check_func "$LINENO" "getrusage" "ac_cv_func_getrusage"
13490 if test "x$ac_cv_func_getrusage" = xyes; then :
13491   $as_echo "#define HAVE_GETRUSAGE 1" >>confdefs.h
13492
13493 else
13494   case " $LIBOBJS " in
13495   *" getrusage.$ac_objext "* ) ;;
13496   *) LIBOBJS="$LIBOBJS getrusage.$ac_objext"
13497  ;;
13498 esac
13499
13500 fi
13501
13502 ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
13503 if test "x$ac_cv_func_inet_aton" = xyes; then :
13504   $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
13505
13506 else
13507   case " $LIBOBJS " in
13508   *" inet_aton.$ac_objext "* ) ;;
13509   *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
13510  ;;
13511 esac
13512
13513 fi
13514
13515 ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
13516 if test "x$ac_cv_func_mkdtemp" = xyes; then :
13517   $as_echo "#define HAVE_MKDTEMP 1" >>confdefs.h
13518
13519 else
13520   case " $LIBOBJS " in
13521   *" mkdtemp.$ac_objext "* ) ;;
13522   *) LIBOBJS="$LIBOBJS mkdtemp.$ac_objext"
13523  ;;
13524 esac
13525
13526 fi
13527
13528 ac_fn_c_check_func "$LINENO" "random" "ac_cv_func_random"
13529 if test "x$ac_cv_func_random" = xyes; then :
13530   $as_echo "#define HAVE_RANDOM 1" >>confdefs.h
13531
13532 else
13533   case " $LIBOBJS " in
13534   *" random.$ac_objext "* ) ;;
13535   *) LIBOBJS="$LIBOBJS random.$ac_objext"
13536  ;;
13537 esac
13538
13539 fi
13540
13541 ac_fn_c_check_func "$LINENO" "rint" "ac_cv_func_rint"
13542 if test "x$ac_cv_func_rint" = xyes; then :
13543   $as_echo "#define HAVE_RINT 1" >>confdefs.h
13544
13545 else
13546   case " $LIBOBJS " in
13547   *" rint.$ac_objext "* ) ;;
13548   *) LIBOBJS="$LIBOBJS rint.$ac_objext"
13549  ;;
13550 esac
13551
13552 fi
13553
13554 ac_fn_c_check_func "$LINENO" "srandom" "ac_cv_func_srandom"
13555 if test "x$ac_cv_func_srandom" = xyes; then :
13556   $as_echo "#define HAVE_SRANDOM 1" >>confdefs.h
13557
13558 else
13559   case " $LIBOBJS " in
13560   *" srandom.$ac_objext "* ) ;;
13561   *) LIBOBJS="$LIBOBJS srandom.$ac_objext"
13562  ;;
13563 esac
13564
13565 fi
13566
13567 ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror"
13568 if test "x$ac_cv_func_strerror" = xyes; then :
13569   $as_echo "#define HAVE_STRERROR 1" >>confdefs.h
13570
13571 else
13572   case " $LIBOBJS " in
13573   *" strerror.$ac_objext "* ) ;;
13574   *) LIBOBJS="$LIBOBJS strerror.$ac_objext"
13575  ;;
13576 esac
13577
13578 fi
13579
13580 ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
13581 if test "x$ac_cv_func_strlcat" = xyes; then :
13582   $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
13583
13584 else
13585   case " $LIBOBJS " in
13586   *" strlcat.$ac_objext "* ) ;;
13587   *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
13588  ;;
13589 esac
13590
13591 fi
13592
13593 ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
13594 if test "x$ac_cv_func_strlcpy" = xyes; then :
13595   $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
13596
13597 else
13598   case " $LIBOBJS " in
13599   *" strlcpy.$ac_objext "* ) ;;
13600   *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
13601  ;;
13602 esac
13603
13604 fi
13605
13606 ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
13607 if test "x$ac_cv_func_strnlen" = xyes; then :
13608   $as_echo "#define HAVE_STRNLEN 1" >>confdefs.h
13609
13610 else
13611   case " $LIBOBJS " in
13612   *" strnlen.$ac_objext "* ) ;;
13613   *) LIBOBJS="$LIBOBJS strnlen.$ac_objext"
13614  ;;
13615 esac
13616
13617 fi
13618
13619
13620
13621 case $host_os in
13622
13623         # Windows uses a specialised env handler
13624         # and doesn't need a replacement getpeereid because it doesn't use
13625         # Unix sockets.
13626         mingw*)
13627
13628 $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
13629
13630
13631 $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
13632
13633                 ac_cv_func_unsetenv=yes
13634                 ac_cv_func_getpeereid=yes;;
13635         *)
13636                 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
13637 if test "x$ac_cv_func_unsetenv" = xyes; then :
13638   $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
13639
13640 else
13641   case " $LIBOBJS " in
13642   *" unsetenv.$ac_objext "* ) ;;
13643   *) LIBOBJS="$LIBOBJS unsetenv.$ac_objext"
13644  ;;
13645 esac
13646
13647 fi
13648
13649 ac_fn_c_check_func "$LINENO" "getpeereid" "ac_cv_func_getpeereid"
13650 if test "x$ac_cv_func_getpeereid" = xyes; then :
13651   $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
13652
13653 else
13654   case " $LIBOBJS " in
13655   *" getpeereid.$ac_objext "* ) ;;
13656   *) LIBOBJS="$LIBOBJS getpeereid.$ac_objext"
13657  ;;
13658 esac
13659
13660 fi
13661
13662
13663                 ;;
13664 esac
13665
13666 # System's version of getaddrinfo(), if any, may be used only if we found
13667 # a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
13668 # We use only our own getaddrinfo.c on Windows, but it's time to revisit that.
13669 if test x"$ac_cv_type_struct_addrinfo" = xyes && \
13670    test "$PORTNAME" != "win32"; then
13671   ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo"
13672 if test "x$ac_cv_func_getaddrinfo" = xyes; then :
13673   $as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
13674
13675 else
13676   case " $LIBOBJS " in
13677   *" getaddrinfo.$ac_objext "* ) ;;
13678   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
13679  ;;
13680 esac
13681
13682 fi
13683
13684
13685 else
13686   case " $LIBOBJS " in
13687   *" getaddrinfo.$ac_objext "* ) ;;
13688   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
13689  ;;
13690 esac
13691
13692 fi
13693
13694 # Similarly, use system's getopt_long() only if system provides struct option.
13695 if test x"$ac_cv_type_struct_option" = xyes ; then
13696   ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long"
13697 if test "x$ac_cv_func_getopt_long" = xyes; then :
13698   $as_echo "#define HAVE_GETOPT_LONG 1" >>confdefs.h
13699
13700 else
13701   case " $LIBOBJS " in
13702   *" getopt_long.$ac_objext "* ) ;;
13703   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
13704  ;;
13705 esac
13706
13707 fi
13708
13709
13710 else
13711   case " $LIBOBJS " in
13712   *" getopt_long.$ac_objext "* ) ;;
13713   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
13714  ;;
13715 esac
13716
13717 fi
13718
13719 # Solaris' getopt() doesn't do what we want for long options, so always use
13720 # our version on that platform.
13721 if test "$PORTNAME" = "solaris"; then
13722   case " $LIBOBJS " in
13723   *" getopt.$ac_objext "* ) ;;
13724   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
13725  ;;
13726 esac
13727
13728 fi
13729
13730 # mingw has adopted a GNU-centric interpretation of optind/optreset,
13731 # so always use our version on Windows.
13732 if test "$PORTNAME" = "win32"; then
13733   case " $LIBOBJS " in
13734   *" getopt.$ac_objext "* ) ;;
13735   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
13736  ;;
13737 esac
13738
13739   case " $LIBOBJS " in
13740   *" getopt_long.$ac_objext "* ) ;;
13741   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
13742  ;;
13743 esac
13744
13745 fi
13746
13747 # Win32 (really MinGW) support
13748 if test "$PORTNAME" = "win32"; then
13749   ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
13750 if test "x$ac_cv_func_gettimeofday" = xyes; then :
13751   $as_echo "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
13752
13753 else
13754   case " $LIBOBJS " in
13755   *" gettimeofday.$ac_objext "* ) ;;
13756   *) LIBOBJS="$LIBOBJS gettimeofday.$ac_objext"
13757  ;;
13758 esac
13759
13760 fi
13761
13762
13763   case " $LIBOBJS " in
13764   *" dirmod.$ac_objext "* ) ;;
13765   *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
13766  ;;
13767 esac
13768
13769   case " $LIBOBJS " in
13770   *" kill.$ac_objext "* ) ;;
13771   *) LIBOBJS="$LIBOBJS kill.$ac_objext"
13772  ;;
13773 esac
13774
13775   case " $LIBOBJS " in
13776   *" open.$ac_objext "* ) ;;
13777   *) LIBOBJS="$LIBOBJS open.$ac_objext"
13778  ;;
13779 esac
13780
13781   case " $LIBOBJS " in
13782   *" system.$ac_objext "* ) ;;
13783   *) LIBOBJS="$LIBOBJS system.$ac_objext"
13784  ;;
13785 esac
13786
13787   case " $LIBOBJS " in
13788   *" win32env.$ac_objext "* ) ;;
13789   *) LIBOBJS="$LIBOBJS win32env.$ac_objext"
13790  ;;
13791 esac
13792
13793   case " $LIBOBJS " in
13794   *" win32error.$ac_objext "* ) ;;
13795   *) LIBOBJS="$LIBOBJS win32error.$ac_objext"
13796  ;;
13797 esac
13798
13799   case " $LIBOBJS " in
13800   *" win32security.$ac_objext "* ) ;;
13801   *) LIBOBJS="$LIBOBJS win32security.$ac_objext"
13802  ;;
13803 esac
13804
13805   case " $LIBOBJS " in
13806   *" win32setlocale.$ac_objext "* ) ;;
13807   *) LIBOBJS="$LIBOBJS win32setlocale.$ac_objext"
13808  ;;
13809 esac
13810
13811
13812 $as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
13813
13814   ac_fn_c_check_type "$LINENO" "MINIDUMP_TYPE" "ac_cv_type_MINIDUMP_TYPE" "
13815 #define WIN32_LEAN_AND_MEAN
13816 #include <windows.h>
13817 #include <string.h>
13818 #include <dbghelp.h>
13819 "
13820 if test "x$ac_cv_type_MINIDUMP_TYPE" = xyes; then :
13821
13822 cat >>confdefs.h <<_ACEOF
13823 #define HAVE_MINIDUMP_TYPE 1
13824 _ACEOF
13825
13826 pgac_minidump_type=yes
13827 else
13828   pgac_minidump_type=no
13829 fi
13830
13831 fi
13832 if test x"$pgac_minidump_type" = x"yes" ; then
13833   have_win32_dbghelp=yes
13834
13835 else
13836   have_win32_dbghelp=no
13837
13838 fi
13839
13840 # Cygwin needs only a bit of that
13841 if test "$PORTNAME" = "cygwin"; then
13842   case " $LIBOBJS " in
13843   *" dirmod.$ac_objext "* ) ;;
13844   *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
13845  ;;
13846 esac
13847
13848 fi
13849
13850 ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "#include <signal.h>
13851 /* NetBSD declares sys_siglist in unistd.h.  */
13852 #ifdef HAVE_UNISTD_H
13853 # include <unistd.h>
13854 #endif
13855
13856 "
13857 if test "x$ac_cv_have_decl_sys_siglist" = xyes; then :
13858   ac_have_decl=1
13859 else
13860   ac_have_decl=0
13861 fi
13862
13863 cat >>confdefs.h <<_ACEOF
13864 #define HAVE_DECL_SYS_SIGLIST $ac_have_decl
13865 _ACEOF
13866
13867
13868 ac_fn_c_check_func "$LINENO" "syslog" "ac_cv_func_syslog"
13869 if test "x$ac_cv_func_syslog" = xyes; then :
13870   ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default"
13871 if test "x$ac_cv_header_syslog_h" = xyes; then :
13872
13873 $as_echo "#define HAVE_SYSLOG 1" >>confdefs.h
13874
13875 fi
13876
13877
13878 fi
13879
13880
13881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opterr" >&5
13882 $as_echo_n "checking for opterr... " >&6; }
13883 if ${pgac_cv_var_int_opterr+:} false; then :
13884   $as_echo_n "(cached) " >&6
13885 else
13886   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13887 /* end confdefs.h.  */
13888 #include <unistd.h>
13889 int
13890 main ()
13891 {
13892 extern int opterr; opterr = 1;
13893   ;
13894   return 0;
13895 }
13896 _ACEOF
13897 if ac_fn_c_try_link "$LINENO"; then :
13898   pgac_cv_var_int_opterr=yes
13899 else
13900   pgac_cv_var_int_opterr=no
13901 fi
13902 rm -f core conftest.err conftest.$ac_objext \
13903     conftest$ac_exeext conftest.$ac_ext
13904 fi
13905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_opterr" >&5
13906 $as_echo "$pgac_cv_var_int_opterr" >&6; }
13907 if test x"$pgac_cv_var_int_opterr" = x"yes"; then
13908
13909 $as_echo "#define HAVE_INT_OPTERR 1" >>confdefs.h
13910
13911 fi
13912
13913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for optreset" >&5
13914 $as_echo_n "checking for optreset... " >&6; }
13915 if ${pgac_cv_var_int_optreset+:} false; then :
13916   $as_echo_n "(cached) " >&6
13917 else
13918   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13919 /* end confdefs.h.  */
13920 #include <unistd.h>
13921 int
13922 main ()
13923 {
13924 extern int optreset; optreset = 1;
13925   ;
13926   return 0;
13927 }
13928 _ACEOF
13929 if ac_fn_c_try_link "$LINENO"; then :
13930   pgac_cv_var_int_optreset=yes
13931 else
13932   pgac_cv_var_int_optreset=no
13933 fi
13934 rm -f core conftest.err conftest.$ac_objext \
13935     conftest$ac_exeext conftest.$ac_ext
13936 fi
13937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_optreset" >&5
13938 $as_echo "$pgac_cv_var_int_optreset" >&6; }
13939 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
13940
13941 $as_echo "#define HAVE_INT_OPTRESET 1" >>confdefs.h
13942
13943 fi
13944
13945 for ac_func in strtoll strtoq
13946 do :
13947   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13948 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13949 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13950   cat >>confdefs.h <<_ACEOF
13951 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13952 _ACEOF
13953  break
13954 fi
13955 done
13956
13957 for ac_func in strtoull strtouq
13958 do :
13959   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13960 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13961 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13962   cat >>confdefs.h <<_ACEOF
13963 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13964 _ACEOF
13965  break
13966 fi
13967 done
13968
13969
13970 if test "$with_icu" = yes; then
13971   ac_save_CPPFLAGS=$CPPFLAGS
13972   CPPFLAGS="$ICU_CFLAGS $CPPFLAGS"
13973
13974   # Verify we have ICU's header files
13975   ac_fn_c_check_header_mongrel "$LINENO" "unicode/ucol.h" "ac_cv_header_unicode_ucol_h" "$ac_includes_default"
13976 if test "x$ac_cv_header_unicode_ucol_h" = xyes; then :
13977
13978 else
13979   as_fn_error $? "header file <unicode/ucol.h> is required for ICU" "$LINENO" 5
13980 fi
13981
13982
13983
13984   CPPFLAGS=$ac_save_CPPFLAGS
13985 fi
13986
13987 # Lastly, restore full LIBS list and check for readline/libedit symbols
13988 LIBS="$LIBS_including_readline"
13989
13990 if test "$with_readline" = yes; then
13991   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_append_character" >&5
13992 $as_echo_n "checking for rl_completion_append_character... " >&6; }
13993 if ${pgac_cv_var_rl_completion_append_character+:} false; then :
13994   $as_echo_n "(cached) " >&6
13995 else
13996   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13997 /* end confdefs.h.  */
13998 #include <stdio.h>
13999 #ifdef HAVE_READLINE_READLINE_H
14000 # include <readline/readline.h>
14001 #elif defined(HAVE_READLINE_H)
14002 # include <readline.h>
14003 #endif
14004
14005 int
14006 main ()
14007 {
14008 rl_completion_append_character = 'x';
14009   ;
14010   return 0;
14011 }
14012 _ACEOF
14013 if ac_fn_c_try_link "$LINENO"; then :
14014   pgac_cv_var_rl_completion_append_character=yes
14015 else
14016   pgac_cv_var_rl_completion_append_character=no
14017 fi
14018 rm -f core conftest.err conftest.$ac_objext \
14019     conftest$ac_exeext conftest.$ac_ext
14020 fi
14021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_completion_append_character" >&5
14022 $as_echo "$pgac_cv_var_rl_completion_append_character" >&6; }
14023 if test x"$pgac_cv_var_rl_completion_append_character" = x"yes"; then
14024
14025 $as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
14026
14027 fi
14028   for ac_func in rl_completion_matches rl_filename_completion_function rl_reset_screen_size
14029 do :
14030   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14031 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14032 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
14033   cat >>confdefs.h <<_ACEOF
14034 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14035 _ACEOF
14036
14037 fi
14038 done
14039
14040   for ac_func in append_history history_truncate_file
14041 do :
14042   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14043 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14044 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
14045   cat >>confdefs.h <<_ACEOF
14046 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14047 _ACEOF
14048
14049 fi
14050 done
14051
14052 fi
14053
14054
14055 # This test makes sure that run tests work at all.  Sometimes a shared
14056 # library is found by the linker, but the runtime linker can't find it.
14057 # This check should come after all modifications of compiler or linker
14058 # variables, and before any other run tests.
14059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking test program" >&5
14060 $as_echo_n "checking test program... " >&6; }
14061 if test "$cross_compiling" = yes; then :
14062   { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling" >&5
14063 $as_echo "cross-compiling" >&6; }
14064 else
14065   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14066 /* end confdefs.h.  */
14067 int main() { return 0; }
14068 _ACEOF
14069 if ac_fn_c_try_run "$LINENO"; then :
14070   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
14071 $as_echo "ok" >&6; }
14072 else
14073   { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
14074 $as_echo "failed" >&6; }
14075 as_fn_error $? "
14076 Could not execute a simple test program.  This may be a problem
14077 related to locating shared libraries.  Check the file 'config.log'
14078 for the exact reason." "$LINENO" 5
14079 fi
14080 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14081   conftest.$ac_objext conftest.beam conftest.$ac_ext
14082 fi
14083
14084
14085 # --------------------
14086 # Run tests below here
14087 # --------------------
14088
14089 # Force use of our snprintf if system's doesn't do arg control
14090 # See comment above at snprintf test for details.
14091 if test "$enable_nls" = yes -a "$pgac_need_repl_snprintf" = no; then
14092   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf supports argument control" >&5
14093 $as_echo_n "checking whether snprintf supports argument control... " >&6; }
14094 if ${pgac_cv_snprintf_arg_control+:} false; then :
14095   $as_echo_n "(cached) " >&6
14096 else
14097   if test "$cross_compiling" = yes; then :
14098   pgac_cv_snprintf_arg_control=cross
14099 else
14100   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14101 /* end confdefs.h.  */
14102 #include <stdio.h>
14103 #include <string.h>
14104
14105 int main()
14106 {
14107   char buf[100];
14108
14109   /* can it swap arguments? */
14110   snprintf(buf, 100, "%2\$d %1\$d", 3, 4);
14111   if (strcmp(buf, "4 3") != 0)
14112     return 1;
14113   return 0;
14114 }
14115 _ACEOF
14116 if ac_fn_c_try_run "$LINENO"; then :
14117   pgac_cv_snprintf_arg_control=yes
14118 else
14119   pgac_cv_snprintf_arg_control=no
14120 fi
14121 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14122   conftest.$ac_objext conftest.beam conftest.$ac_ext
14123 fi
14124
14125
14126 fi
14127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_arg_control" >&5
14128 $as_echo "$pgac_cv_snprintf_arg_control" >&6; }
14129
14130   if test $pgac_cv_snprintf_arg_control != yes ; then
14131     pgac_need_repl_snprintf=yes
14132   fi
14133 fi
14134
14135
14136
14137
14138 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long int is 64 bits" >&5
14139 $as_echo_n "checking whether long int is 64 bits... " >&6; }
14140 if ${pgac_cv_type_long_int_64+:} false; then :
14141   $as_echo_n "(cached) " >&6
14142 else
14143   if test "$cross_compiling" = yes; then :
14144   # If cross-compiling, check the size reported by the compiler and
14145 # trust that the arithmetic works.
14146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14147 /* end confdefs.h.  */
14148
14149 int
14150 main ()
14151 {
14152 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
14153 test_array [0] = 0;
14154 return test_array [0];
14155
14156   ;
14157   return 0;
14158 }
14159 _ACEOF
14160 if ac_fn_c_try_compile "$LINENO"; then :
14161   pgac_cv_type_long_int_64=yes
14162 else
14163   pgac_cv_type_long_int_64=no
14164 fi
14165 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14166 else
14167   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14168 /* end confdefs.h.  */
14169 typedef long int ac_int64;
14170
14171 /*
14172  * These are globals to discourage the compiler from folding all the
14173  * arithmetic tests down to compile-time constants.
14174  */
14175 ac_int64 a = 20000001;
14176 ac_int64 b = 40000005;
14177
14178 int does_int64_work()
14179 {
14180   ac_int64 c,d;
14181
14182   if (sizeof(ac_int64) != 8)
14183     return 0;                   /* definitely not the right size */
14184
14185   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
14186   c = a * b;
14187   d = (c + b) / b;
14188   if (d != a+1)
14189     return 0;
14190   return 1;
14191 }
14192
14193 int
14194 main() {
14195   return (! does_int64_work());
14196 }
14197 _ACEOF
14198 if ac_fn_c_try_run "$LINENO"; then :
14199   pgac_cv_type_long_int_64=yes
14200 else
14201   pgac_cv_type_long_int_64=no
14202 fi
14203 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14204   conftest.$ac_objext conftest.beam conftest.$ac_ext
14205 fi
14206
14207 fi
14208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_int_64" >&5
14209 $as_echo "$pgac_cv_type_long_int_64" >&6; }
14210
14211 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
14212 if test x"$pgac_cv_type_long_int_64" = xyes ; then
14213
14214 $as_echo "#define HAVE_LONG_INT_64 1" >>confdefs.h
14215
14216 fi
14217
14218
14219 if test x"$HAVE_LONG_INT_64" = x"yes" ; then
14220   pg_int64_type="long int"
14221 else
14222   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long long int is 64 bits" >&5
14223 $as_echo_n "checking whether long long int is 64 bits... " >&6; }
14224 if ${pgac_cv_type_long_long_int_64+:} false; then :
14225   $as_echo_n "(cached) " >&6
14226 else
14227   if test "$cross_compiling" = yes; then :
14228   # If cross-compiling, check the size reported by the compiler and
14229 # trust that the arithmetic works.
14230 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14231 /* end confdefs.h.  */
14232
14233 int
14234 main ()
14235 {
14236 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
14237 test_array [0] = 0;
14238 return test_array [0];
14239
14240   ;
14241   return 0;
14242 }
14243 _ACEOF
14244 if ac_fn_c_try_compile "$LINENO"; then :
14245   pgac_cv_type_long_long_int_64=yes
14246 else
14247   pgac_cv_type_long_long_int_64=no
14248 fi
14249 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14250 else
14251   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14252 /* end confdefs.h.  */
14253 typedef long long int ac_int64;
14254
14255 /*
14256  * These are globals to discourage the compiler from folding all the
14257  * arithmetic tests down to compile-time constants.
14258  */
14259 ac_int64 a = 20000001;
14260 ac_int64 b = 40000005;
14261
14262 int does_int64_work()
14263 {
14264   ac_int64 c,d;
14265
14266   if (sizeof(ac_int64) != 8)
14267     return 0;                   /* definitely not the right size */
14268
14269   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
14270   c = a * b;
14271   d = (c + b) / b;
14272   if (d != a+1)
14273     return 0;
14274   return 1;
14275 }
14276
14277 int
14278 main() {
14279   return (! does_int64_work());
14280 }
14281 _ACEOF
14282 if ac_fn_c_try_run "$LINENO"; then :
14283   pgac_cv_type_long_long_int_64=yes
14284 else
14285   pgac_cv_type_long_long_int_64=no
14286 fi
14287 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14288   conftest.$ac_objext conftest.beam conftest.$ac_ext
14289 fi
14290
14291 fi
14292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_long_int_64" >&5
14293 $as_echo "$pgac_cv_type_long_long_int_64" >&6; }
14294
14295 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
14296 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
14297
14298 $as_echo "#define HAVE_LONG_LONG_INT_64 1" >>confdefs.h
14299
14300 fi
14301
14302   if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
14303     pg_int64_type="long long int"
14304   else
14305     as_fn_error $? "Cannot find a working 64-bit integer type." "$LINENO" 5
14306   fi
14307 fi
14308
14309
14310 cat >>confdefs.h <<_ACEOF
14311 #define PG_INT64_TYPE $pg_int64_type
14312 _ACEOF
14313
14314
14315 # If we found "long int" is 64 bits, assume snprintf handles it.  If
14316 # we found we need to use "long long int", better check.  We cope with
14317 # snprintfs that use %lld, %qd, or %I64d as the format.  If none of these
14318 # work, fall back to our own snprintf emulation (which we know uses %lld).
14319
14320 if test "$HAVE_LONG_LONG_INT_64" = yes ; then
14321   if test $pgac_need_repl_snprintf = no; then
14322     { $as_echo "$as_me:${as_lineno-$LINENO}: checking snprintf length modifier for long long int" >&5
14323 $as_echo_n "checking snprintf length modifier for long long int... " >&6; }
14324 if ${pgac_cv_snprintf_long_long_int_modifier+:} false; then :
14325   $as_echo_n "(cached) " >&6
14326 else
14327   for pgac_modifier in 'll' 'q' 'I64'; do
14328 if test "$cross_compiling" = yes; then :
14329   pgac_cv_snprintf_long_long_int_modifier=cross; break
14330 else
14331   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14332 /* end confdefs.h.  */
14333 #include <stdio.h>
14334 #include <string.h>
14335 typedef long long int ac_int64;
14336 #define INT64_FORMAT "%${pgac_modifier}d"
14337
14338 ac_int64 a = 20000001;
14339 ac_int64 b = 40000005;
14340
14341 int does_int64_snprintf_work()
14342 {
14343   ac_int64 c;
14344   char buf[100];
14345
14346   if (sizeof(ac_int64) != 8)
14347     return 0;                   /* doesn't look like the right size */
14348
14349   c = a * b;
14350   snprintf(buf, 100, INT64_FORMAT, c);
14351   if (strcmp(buf, "800000140000005") != 0)
14352     return 0;                   /* either multiply or snprintf is busted */
14353   return 1;
14354 }
14355
14356 int
14357 main() {
14358   return (! does_int64_snprintf_work());
14359 }
14360 _ACEOF
14361 if ac_fn_c_try_run "$LINENO"; then :
14362   pgac_cv_snprintf_long_long_int_modifier=$pgac_modifier; break
14363 fi
14364 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14365   conftest.$ac_objext conftest.beam conftest.$ac_ext
14366 fi
14367
14368 done
14369 fi
14370
14371 LONG_LONG_INT_MODIFIER=''
14372
14373 case $pgac_cv_snprintf_long_long_int_modifier in
14374   cross) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot test (not on host machine)" >&5
14375 $as_echo "cannot test (not on host machine)" >&6; };;
14376   ?*)    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_long_long_int_modifier" >&5
14377 $as_echo "$pgac_cv_snprintf_long_long_int_modifier" >&6; }
14378          LONG_LONG_INT_MODIFIER=$pgac_cv_snprintf_long_long_int_modifier;;
14379   *)     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14380 $as_echo "none" >&6; };;
14381 esac
14382     if test "$LONG_LONG_INT_MODIFIER" = ""; then
14383       # Force usage of our own snprintf, since system snprintf is broken
14384       pgac_need_repl_snprintf=yes
14385       LONG_LONG_INT_MODIFIER='ll'
14386     fi
14387   else
14388     # Here if we previously decided we needed to use our own snprintf
14389     LONG_LONG_INT_MODIFIER='ll'
14390   fi
14391 else
14392   # Here if we are not using 'long long int' at all
14393   LONG_LONG_INT_MODIFIER='l'
14394 fi
14395
14396 INT64_MODIFIER="\"$LONG_LONG_INT_MODIFIER\""
14397
14398
14399 cat >>confdefs.h <<_ACEOF
14400 #define INT64_MODIFIER $INT64_MODIFIER
14401 _ACEOF
14402
14403
14404 # Also force use of our snprintf if the system's doesn't support the %z flag.
14405 if test "$pgac_need_repl_snprintf" = no; then
14406   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf supports the %z modifier" >&5
14407 $as_echo_n "checking whether snprintf supports the %z modifier... " >&6; }
14408 if ${pgac_cv_snprintf_size_t_support+:} false; then :
14409   $as_echo_n "(cached) " >&6
14410 else
14411   if test "$cross_compiling" = yes; then :
14412   pgac_cv_snprintf_size_t_support=cross
14413 else
14414   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14415 /* end confdefs.h.  */
14416 #include <stdio.h>
14417 #include <string.h>
14418
14419 int main()
14420 {
14421   char bufz[100];
14422   char buf64[100];
14423
14424   /*
14425    * Print the largest unsigned number fitting in a size_t using both %zu
14426    * and the previously-determined format for 64-bit integers.  Note that
14427    * we don't run this code unless we know snprintf handles 64-bit ints.
14428    */
14429   bufz[0] = '\0';  /* in case snprintf fails to emit anything */
14430   snprintf(bufz, sizeof(bufz), "%zu", ~((size_t) 0));
14431   snprintf(buf64, sizeof(buf64), "%" INT64_MODIFIER "u",
14432     (unsigned PG_INT64_TYPE) ~((size_t) 0));
14433   if (strcmp(bufz, buf64) != 0)
14434     return 1;
14435   return 0;
14436 }
14437 _ACEOF
14438 if ac_fn_c_try_run "$LINENO"; then :
14439   pgac_cv_snprintf_size_t_support=yes
14440 else
14441   pgac_cv_snprintf_size_t_support=no
14442 fi
14443 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14444   conftest.$ac_objext conftest.beam conftest.$ac_ext
14445 fi
14446
14447
14448 fi
14449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_size_t_support" >&5
14450 $as_echo "$pgac_cv_snprintf_size_t_support" >&6; }
14451
14452   if test "$pgac_cv_snprintf_size_t_support" != yes; then
14453     pgac_need_repl_snprintf=yes
14454   fi
14455 fi
14456
14457 # Now we have checked all the reasons to replace snprintf
14458 if test $pgac_need_repl_snprintf = yes; then
14459
14460 $as_echo "#define USE_REPL_SNPRINTF 1" >>confdefs.h
14461
14462   case " $LIBOBJS " in
14463   *" snprintf.$ac_objext "* ) ;;
14464   *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
14465  ;;
14466 esac
14467
14468 fi
14469
14470 # Check size of void *, size_t (enables tweaks for > 32bit address space)
14471 # The cast to long int works around a bug in the HP C Compiler
14472 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14473 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14474 # This bug is HP SR number 8606223364.
14475 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
14476 $as_echo_n "checking size of void *... " >&6; }
14477 if ${ac_cv_sizeof_void_p+:} false; then :
14478   $as_echo_n "(cached) " >&6
14479 else
14480   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p"        "$ac_includes_default"; then :
14481
14482 else
14483   if test "$ac_cv_type_void_p" = yes; then
14484      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14485 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14486 as_fn_error 77 "cannot compute sizeof (void *)
14487 See \`config.log' for more details" "$LINENO" 5; }
14488    else
14489      ac_cv_sizeof_void_p=0
14490    fi
14491 fi
14492
14493 fi
14494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
14495 $as_echo "$ac_cv_sizeof_void_p" >&6; }
14496
14497
14498
14499 cat >>confdefs.h <<_ACEOF
14500 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
14501 _ACEOF
14502
14503
14504 # The cast to long int works around a bug in the HP C Compiler
14505 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14506 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14507 # This bug is HP SR number 8606223364.
14508 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
14509 $as_echo_n "checking size of size_t... " >&6; }
14510 if ${ac_cv_sizeof_size_t+:} false; then :
14511   $as_echo_n "(cached) " >&6
14512 else
14513   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t"        "$ac_includes_default"; then :
14514
14515 else
14516   if test "$ac_cv_type_size_t" = yes; then
14517      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14518 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14519 as_fn_error 77 "cannot compute sizeof (size_t)
14520 See \`config.log' for more details" "$LINENO" 5; }
14521    else
14522      ac_cv_sizeof_size_t=0
14523    fi
14524 fi
14525
14526 fi
14527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
14528 $as_echo "$ac_cv_sizeof_size_t" >&6; }
14529
14530
14531
14532 cat >>confdefs.h <<_ACEOF
14533 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
14534 _ACEOF
14535
14536
14537 # The cast to long int works around a bug in the HP C Compiler
14538 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14539 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14540 # This bug is HP SR number 8606223364.
14541 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
14542 $as_echo_n "checking size of long... " >&6; }
14543 if ${ac_cv_sizeof_long+:} false; then :
14544   $as_echo_n "(cached) " >&6
14545 else
14546   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
14547
14548 else
14549   if test "$ac_cv_type_long" = yes; then
14550      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14551 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14552 as_fn_error 77 "cannot compute sizeof (long)
14553 See \`config.log' for more details" "$LINENO" 5; }
14554    else
14555      ac_cv_sizeof_long=0
14556    fi
14557 fi
14558
14559 fi
14560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
14561 $as_echo "$ac_cv_sizeof_long" >&6; }
14562
14563
14564
14565 cat >>confdefs.h <<_ACEOF
14566 #define SIZEOF_LONG $ac_cv_sizeof_long
14567 _ACEOF
14568
14569
14570
14571 # Decide whether float4 is passed by value: user-selectable, enabled by default
14572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float4 passed by value" >&5
14573 $as_echo_n "checking whether to build with float4 passed by value... " >&6; }
14574
14575
14576 # Check whether --enable-float4-byval was given.
14577 if test "${enable_float4_byval+set}" = set; then :
14578   enableval=$enable_float4_byval;
14579   case $enableval in
14580     yes)
14581
14582 $as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
14583
14584                float4passbyval=true
14585       ;;
14586     no)
14587       float4passbyval=false
14588       ;;
14589     *)
14590       as_fn_error $? "no argument expected for --enable-float4-byval option" "$LINENO" 5
14591       ;;
14592   esac
14593
14594 else
14595   enable_float4_byval=yes
14596
14597 $as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
14598
14599                float4passbyval=true
14600 fi
14601
14602
14603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float4_byval" >&5
14604 $as_echo "$enable_float4_byval" >&6; }
14605
14606 cat >>confdefs.h <<_ACEOF
14607 #define FLOAT4PASSBYVAL $float4passbyval
14608 _ACEOF
14609
14610
14611 # Decide whether float8 is passed by value.
14612 # Note: this setting also controls int8 and related types such as timestamp.
14613 # If sizeof(Datum) >= 8, this is user-selectable, enabled by default.
14614 # If not, trying to select it is an error.
14615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float8 passed by value" >&5
14616 $as_echo_n "checking whether to build with float8 passed by value... " >&6; }
14617 if test $ac_cv_sizeof_void_p -ge 8 ; then
14618
14619
14620 # Check whether --enable-float8-byval was given.
14621 if test "${enable_float8_byval+set}" = set; then :
14622   enableval=$enable_float8_byval;
14623   case $enableval in
14624     yes)
14625       :
14626       ;;
14627     no)
14628       :
14629       ;;
14630     *)
14631       as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
14632       ;;
14633   esac
14634
14635 else
14636   enable_float8_byval=yes
14637
14638 fi
14639
14640
14641 else
14642
14643
14644 # Check whether --enable-float8-byval was given.
14645 if test "${enable_float8_byval+set}" = set; then :
14646   enableval=$enable_float8_byval;
14647   case $enableval in
14648     yes)
14649       :
14650       ;;
14651     no)
14652       :
14653       ;;
14654     *)
14655       as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
14656       ;;
14657   esac
14658
14659 else
14660   enable_float8_byval=no
14661
14662 fi
14663
14664
14665   if test "$enable_float8_byval" = yes ; then
14666     as_fn_error $? "--enable-float8-byval is not supported on 32-bit platforms." "$LINENO" 5
14667   fi
14668 fi
14669 if test "$enable_float8_byval" = yes ; then
14670
14671 $as_echo "#define USE_FLOAT8_BYVAL 1" >>confdefs.h
14672
14673   float8passbyval=true
14674 else
14675   float8passbyval=false
14676 fi
14677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float8_byval" >&5
14678 $as_echo "$enable_float8_byval" >&6; }
14679
14680 cat >>confdefs.h <<_ACEOF
14681 #define FLOAT8PASSBYVAL $float8passbyval
14682 _ACEOF
14683
14684
14685 # Determine memory alignment requirements for the basic C data types.
14686
14687 # The cast to long int works around a bug in the HP C Compiler,
14688 # see AC_CHECK_SIZEOF for more information.
14689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of short" >&5
14690 $as_echo_n "checking alignment of short... " >&6; }
14691 if ${ac_cv_alignof_short+:} false; then :
14692   $as_echo_n "(cached) " >&6
14693 else
14694   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_short"        "$ac_includes_default
14695 #ifndef offsetof
14696 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
14697 #endif
14698 typedef struct { char x; short y; } ac__type_alignof_;"; then :
14699
14700 else
14701   if test "$ac_cv_type_short" = yes; then
14702      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14703 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14704 as_fn_error 77 "cannot compute alignment of short
14705 See \`config.log' for more details" "$LINENO" 5; }
14706    else
14707      ac_cv_alignof_short=0
14708    fi
14709 fi
14710
14711 fi
14712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_short" >&5
14713 $as_echo "$ac_cv_alignof_short" >&6; }
14714
14715
14716
14717 cat >>confdefs.h <<_ACEOF
14718 #define ALIGNOF_SHORT $ac_cv_alignof_short
14719 _ACEOF
14720
14721
14722 # The cast to long int works around a bug in the HP C Compiler,
14723 # see AC_CHECK_SIZEOF for more information.
14724 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of int" >&5
14725 $as_echo_n "checking alignment of int... " >&6; }
14726 if ${ac_cv_alignof_int+:} false; then :
14727   $as_echo_n "(cached) " >&6
14728 else
14729   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_int"        "$ac_includes_default
14730 #ifndef offsetof
14731 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
14732 #endif
14733 typedef struct { char x; int y; } ac__type_alignof_;"; then :
14734
14735 else
14736   if test "$ac_cv_type_int" = yes; then
14737      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14738 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14739 as_fn_error 77 "cannot compute alignment of int
14740 See \`config.log' for more details" "$LINENO" 5; }
14741    else
14742      ac_cv_alignof_int=0
14743    fi
14744 fi
14745
14746 fi
14747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_int" >&5
14748 $as_echo "$ac_cv_alignof_int" >&6; }
14749
14750
14751
14752 cat >>confdefs.h <<_ACEOF
14753 #define ALIGNOF_INT $ac_cv_alignof_int
14754 _ACEOF
14755
14756
14757 # The cast to long int works around a bug in the HP C Compiler,
14758 # see AC_CHECK_SIZEOF for more information.
14759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long" >&5
14760 $as_echo_n "checking alignment of long... " >&6; }
14761 if ${ac_cv_alignof_long+:} false; then :
14762   $as_echo_n "(cached) " >&6
14763 else
14764   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long"        "$ac_includes_default
14765 #ifndef offsetof
14766 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
14767 #endif
14768 typedef struct { char x; long y; } ac__type_alignof_;"; then :
14769
14770 else
14771   if test "$ac_cv_type_long" = yes; then
14772      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14773 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14774 as_fn_error 77 "cannot compute alignment of long
14775 See \`config.log' for more details" "$LINENO" 5; }
14776    else
14777      ac_cv_alignof_long=0
14778    fi
14779 fi
14780
14781 fi
14782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long" >&5
14783 $as_echo "$ac_cv_alignof_long" >&6; }
14784
14785
14786
14787 cat >>confdefs.h <<_ACEOF
14788 #define ALIGNOF_LONG $ac_cv_alignof_long
14789 _ACEOF
14790
14791
14792 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
14793   # The cast to long int works around a bug in the HP C Compiler,
14794 # see AC_CHECK_SIZEOF for more information.
14795 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long long int" >&5
14796 $as_echo_n "checking alignment of long long int... " >&6; }
14797 if ${ac_cv_alignof_long_long_int+:} false; then :
14798   $as_echo_n "(cached) " >&6
14799 else
14800   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long_long_int"        "$ac_includes_default
14801 #ifndef offsetof
14802 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
14803 #endif
14804 typedef struct { char x; long long int y; } ac__type_alignof_;"; then :
14805
14806 else
14807   if test "$ac_cv_type_long_long_int" = yes; then
14808      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14809 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14810 as_fn_error 77 "cannot compute alignment of long long int
14811 See \`config.log' for more details" "$LINENO" 5; }
14812    else
14813      ac_cv_alignof_long_long_int=0
14814    fi
14815 fi
14816
14817 fi
14818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long_long_int" >&5
14819 $as_echo "$ac_cv_alignof_long_long_int" >&6; }
14820
14821
14822
14823 cat >>confdefs.h <<_ACEOF
14824 #define ALIGNOF_LONG_LONG_INT $ac_cv_alignof_long_long_int
14825 _ACEOF
14826
14827
14828 fi
14829 # The cast to long int works around a bug in the HP C Compiler,
14830 # see AC_CHECK_SIZEOF for more information.
14831 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of double" >&5
14832 $as_echo_n "checking alignment of double... " >&6; }
14833 if ${ac_cv_alignof_double+:} false; then :
14834   $as_echo_n "(cached) " >&6
14835 else
14836   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_double"        "$ac_includes_default
14837 #ifndef offsetof
14838 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
14839 #endif
14840 typedef struct { char x; double y; } ac__type_alignof_;"; then :
14841
14842 else
14843   if test "$ac_cv_type_double" = yes; then
14844      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14845 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14846 as_fn_error 77 "cannot compute alignment of double
14847 See \`config.log' for more details" "$LINENO" 5; }
14848    else
14849      ac_cv_alignof_double=0
14850    fi
14851 fi
14852
14853 fi
14854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_double" >&5
14855 $as_echo "$ac_cv_alignof_double" >&6; }
14856
14857
14858
14859 cat >>confdefs.h <<_ACEOF
14860 #define ALIGNOF_DOUBLE $ac_cv_alignof_double
14861 _ACEOF
14862
14863
14864
14865 # Compute maximum alignment of any basic type.
14866 # We assume long's alignment is at least as strong as char, short, or int;
14867 # but we must check long long (if it exists) and double.
14868
14869 MAX_ALIGNOF=$ac_cv_alignof_long
14870 if test $MAX_ALIGNOF -lt $ac_cv_alignof_double ; then
14871   MAX_ALIGNOF=$ac_cv_alignof_double
14872 fi
14873 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $ac_cv_alignof_long_long_int ; then
14874   MAX_ALIGNOF="$ac_cv_alignof_long_long_int"
14875 fi
14876
14877 cat >>confdefs.h <<_ACEOF
14878 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
14879 _ACEOF
14880
14881
14882
14883 # Some platforms predefine the types int8, int16, etc.  Only check
14884 # a (hopefully) representative subset.
14885 ac_fn_c_check_type "$LINENO" "int8" "ac_cv_type_int8" "#include <stdio.h>
14886 "
14887 if test "x$ac_cv_type_int8" = xyes; then :
14888
14889 cat >>confdefs.h <<_ACEOF
14890 #define HAVE_INT8 1
14891 _ACEOF
14892
14893
14894 fi
14895 ac_fn_c_check_type "$LINENO" "uint8" "ac_cv_type_uint8" "#include <stdio.h>
14896 "
14897 if test "x$ac_cv_type_uint8" = xyes; then :
14898
14899 cat >>confdefs.h <<_ACEOF
14900 #define HAVE_UINT8 1
14901 _ACEOF
14902
14903
14904 fi
14905 ac_fn_c_check_type "$LINENO" "int64" "ac_cv_type_int64" "#include <stdio.h>
14906 "
14907 if test "x$ac_cv_type_int64" = xyes; then :
14908
14909 cat >>confdefs.h <<_ACEOF
14910 #define HAVE_INT64 1
14911 _ACEOF
14912
14913
14914 fi
14915 ac_fn_c_check_type "$LINENO" "uint64" "ac_cv_type_uint64" "#include <stdio.h>
14916 "
14917 if test "x$ac_cv_type_uint64" = xyes; then :
14918
14919 cat >>confdefs.h <<_ACEOF
14920 #define HAVE_UINT64 1
14921 _ACEOF
14922
14923
14924 fi
14925
14926
14927 # Check for extensions offering the integer scalar type __int128.
14928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128" >&5
14929 $as_echo_n "checking for __int128... " >&6; }
14930 if ${pgac_cv__128bit_int+:} false; then :
14931   $as_echo_n "(cached) " >&6
14932 else
14933   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14934 /* end confdefs.h.  */
14935
14936 /*
14937  * These are globals to discourage the compiler from folding all the
14938  * arithmetic tests down to compile-time constants.  We do not have
14939  * convenient support for 64bit literals at this point...
14940  */
14941 __int128 a = 48828125;
14942 __int128 b = 97656255;
14943
14944 int
14945 main ()
14946 {
14947
14948 __int128 c,d;
14949 a = (a << 12) + 1; /* 200000000001 */
14950 b = (b << 12) + 5; /* 400000000005 */
14951 /* use the most relevant arithmetic ops */
14952 c = a * b;
14953 d = (c + b) / b;
14954 /* return different values, to prevent optimizations */
14955 if (d != a+1)
14956   return 0;
14957 return 1;
14958
14959   ;
14960   return 0;
14961 }
14962 _ACEOF
14963 if ac_fn_c_try_link "$LINENO"; then :
14964   pgac_cv__128bit_int=yes
14965 else
14966   pgac_cv__128bit_int=no
14967 fi
14968 rm -f core conftest.err conftest.$ac_objext \
14969     conftest$ac_exeext conftest.$ac_ext
14970 fi
14971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int" >&5
14972 $as_echo "$pgac_cv__128bit_int" >&6; }
14973 if test x"$pgac_cv__128bit_int" = xyes ; then
14974
14975 $as_echo "#define PG_INT128_TYPE __int128" >>confdefs.h
14976
14977 fi
14978
14979 # Check for various atomic operations now that we have checked how to declare
14980 # 64bit integers.
14981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync char locking functions" >&5
14982 $as_echo_n "checking for builtin __sync char locking functions... " >&6; }
14983 if ${pgac_cv_gcc_sync_char_tas+:} false; then :
14984   $as_echo_n "(cached) " >&6
14985 else
14986   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14987 /* end confdefs.h.  */
14988
14989 int
14990 main ()
14991 {
14992 char lock = 0;
14993    __sync_lock_test_and_set(&lock, 1);
14994    __sync_lock_release(&lock);
14995   ;
14996   return 0;
14997 }
14998 _ACEOF
14999 if ac_fn_c_try_link "$LINENO"; then :
15000   pgac_cv_gcc_sync_char_tas="yes"
15001 else
15002   pgac_cv_gcc_sync_char_tas="no"
15003 fi
15004 rm -f core conftest.err conftest.$ac_objext \
15005     conftest$ac_exeext conftest.$ac_ext
15006 fi
15007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_char_tas" >&5
15008 $as_echo "$pgac_cv_gcc_sync_char_tas" >&6; }
15009 if test x"$pgac_cv_gcc_sync_char_tas" = x"yes"; then
15010
15011 $as_echo "#define HAVE_GCC__SYNC_CHAR_TAS 1" >>confdefs.h
15012
15013 fi
15014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 locking functions" >&5
15015 $as_echo_n "checking for builtin __sync int32 locking functions... " >&6; }
15016 if ${pgac_cv_gcc_sync_int32_tas+:} false; then :
15017   $as_echo_n "(cached) " >&6
15018 else
15019   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15020 /* end confdefs.h.  */
15021
15022 int
15023 main ()
15024 {
15025 int lock = 0;
15026    __sync_lock_test_and_set(&lock, 1);
15027    __sync_lock_release(&lock);
15028   ;
15029   return 0;
15030 }
15031 _ACEOF
15032 if ac_fn_c_try_link "$LINENO"; then :
15033   pgac_cv_gcc_sync_int32_tas="yes"
15034 else
15035   pgac_cv_gcc_sync_int32_tas="no"
15036 fi
15037 rm -f core conftest.err conftest.$ac_objext \
15038     conftest$ac_exeext conftest.$ac_ext
15039 fi
15040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_tas" >&5
15041 $as_echo "$pgac_cv_gcc_sync_int32_tas" >&6; }
15042 if test x"$pgac_cv_gcc_sync_int32_tas" = x"yes"; then
15043
15044 $as_echo "#define HAVE_GCC__SYNC_INT32_TAS 1" >>confdefs.h
15045
15046 fi
15047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 atomic operations" >&5
15048 $as_echo_n "checking for builtin __sync int32 atomic operations... " >&6; }
15049 if ${pgac_cv_gcc_sync_int32_cas+:} false; then :
15050   $as_echo_n "(cached) " >&6
15051 else
15052   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15053 /* end confdefs.h.  */
15054
15055 int
15056 main ()
15057 {
15058 int val = 0;
15059    __sync_val_compare_and_swap(&val, 0, 37);
15060   ;
15061   return 0;
15062 }
15063 _ACEOF
15064 if ac_fn_c_try_link "$LINENO"; then :
15065   pgac_cv_gcc_sync_int32_cas="yes"
15066 else
15067   pgac_cv_gcc_sync_int32_cas="no"
15068 fi
15069 rm -f core conftest.err conftest.$ac_objext \
15070     conftest$ac_exeext conftest.$ac_ext
15071 fi
15072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_cas" >&5
15073 $as_echo "$pgac_cv_gcc_sync_int32_cas" >&6; }
15074 if test x"$pgac_cv_gcc_sync_int32_cas" = x"yes"; then
15075
15076 $as_echo "#define HAVE_GCC__SYNC_INT32_CAS 1" >>confdefs.h
15077
15078 fi
15079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int64 atomic operations" >&5
15080 $as_echo_n "checking for builtin __sync int64 atomic operations... " >&6; }
15081 if ${pgac_cv_gcc_sync_int64_cas+:} false; then :
15082   $as_echo_n "(cached) " >&6
15083 else
15084   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15085 /* end confdefs.h.  */
15086
15087 int
15088 main ()
15089 {
15090 PG_INT64_TYPE lock = 0;
15091    __sync_val_compare_and_swap(&lock, 0, (PG_INT64_TYPE) 37);
15092   ;
15093   return 0;
15094 }
15095 _ACEOF
15096 if ac_fn_c_try_link "$LINENO"; then :
15097   pgac_cv_gcc_sync_int64_cas="yes"
15098 else
15099   pgac_cv_gcc_sync_int64_cas="no"
15100 fi
15101 rm -f core conftest.err conftest.$ac_objext \
15102     conftest$ac_exeext conftest.$ac_ext
15103 fi
15104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int64_cas" >&5
15105 $as_echo "$pgac_cv_gcc_sync_int64_cas" >&6; }
15106 if test x"$pgac_cv_gcc_sync_int64_cas" = x"yes"; then
15107
15108 $as_echo "#define HAVE_GCC__SYNC_INT64_CAS 1" >>confdefs.h
15109
15110 fi
15111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int32 atomic operations" >&5
15112 $as_echo_n "checking for builtin __atomic int32 atomic operations... " >&6; }
15113 if ${pgac_cv_gcc_atomic_int32_cas+:} false; then :
15114   $as_echo_n "(cached) " >&6
15115 else
15116   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15117 /* end confdefs.h.  */
15118
15119 int
15120 main ()
15121 {
15122 int val = 0;
15123    int expect = 0;
15124    __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
15125   ;
15126   return 0;
15127 }
15128 _ACEOF
15129 if ac_fn_c_try_link "$LINENO"; then :
15130   pgac_cv_gcc_atomic_int32_cas="yes"
15131 else
15132   pgac_cv_gcc_atomic_int32_cas="no"
15133 fi
15134 rm -f core conftest.err conftest.$ac_objext \
15135     conftest$ac_exeext conftest.$ac_ext
15136 fi
15137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int32_cas" >&5
15138 $as_echo "$pgac_cv_gcc_atomic_int32_cas" >&6; }
15139 if test x"$pgac_cv_gcc_atomic_int32_cas" = x"yes"; then
15140
15141 $as_echo "#define HAVE_GCC__ATOMIC_INT32_CAS 1" >>confdefs.h
15142
15143 fi
15144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int64 atomic operations" >&5
15145 $as_echo_n "checking for builtin __atomic int64 atomic operations... " >&6; }
15146 if ${pgac_cv_gcc_atomic_int64_cas+:} false; then :
15147   $as_echo_n "(cached) " >&6
15148 else
15149   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15150 /* end confdefs.h.  */
15151
15152 int
15153 main ()
15154 {
15155 PG_INT64_TYPE val = 0;
15156    PG_INT64_TYPE expect = 0;
15157    __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
15158   ;
15159   return 0;
15160 }
15161 _ACEOF
15162 if ac_fn_c_try_link "$LINENO"; then :
15163   pgac_cv_gcc_atomic_int64_cas="yes"
15164 else
15165   pgac_cv_gcc_atomic_int64_cas="no"
15166 fi
15167 rm -f core conftest.err conftest.$ac_objext \
15168     conftest$ac_exeext conftest.$ac_ext
15169 fi
15170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int64_cas" >&5
15171 $as_echo "$pgac_cv_gcc_atomic_int64_cas" >&6; }
15172 if test x"$pgac_cv_gcc_atomic_int64_cas" = x"yes"; then
15173
15174 $as_echo "#define HAVE_GCC__ATOMIC_INT64_CAS 1" >>confdefs.h
15175
15176 fi
15177
15178
15179 # Check for x86 cpuid instruction
15180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __get_cpuid" >&5
15181 $as_echo_n "checking for __get_cpuid... " >&6; }
15182 if ${pgac_cv__get_cpuid+:} false; then :
15183   $as_echo_n "(cached) " >&6
15184 else
15185   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15186 /* end confdefs.h.  */
15187 #include <cpuid.h>
15188 int
15189 main ()
15190 {
15191 unsigned int exx[4] = {0, 0, 0, 0};
15192   __get_cpuid(1, &exx[0], &exx[1], &exx[2], &exx[3]);
15193
15194   ;
15195   return 0;
15196 }
15197 _ACEOF
15198 if ac_fn_c_try_link "$LINENO"; then :
15199   pgac_cv__get_cpuid="yes"
15200 else
15201   pgac_cv__get_cpuid="no"
15202 fi
15203 rm -f core conftest.err conftest.$ac_objext \
15204     conftest$ac_exeext conftest.$ac_ext
15205 fi
15206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__get_cpuid" >&5
15207 $as_echo "$pgac_cv__get_cpuid" >&6; }
15208 if test x"$pgac_cv__get_cpuid" = x"yes"; then
15209
15210 $as_echo "#define HAVE__GET_CPUID 1" >>confdefs.h
15211
15212 fi
15213
15214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __cpuid" >&5
15215 $as_echo_n "checking for __cpuid... " >&6; }
15216 if ${pgac_cv__cpuid+:} false; then :
15217   $as_echo_n "(cached) " >&6
15218 else
15219   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15220 /* end confdefs.h.  */
15221 #include <intrin.h>
15222 int
15223 main ()
15224 {
15225 unsigned int exx[4] = {0, 0, 0, 0};
15226   __get_cpuid(exx[0], 1);
15227
15228   ;
15229   return 0;
15230 }
15231 _ACEOF
15232 if ac_fn_c_try_link "$LINENO"; then :
15233   pgac_cv__cpuid="yes"
15234 else
15235   pgac_cv__cpuid="no"
15236 fi
15237 rm -f core conftest.err conftest.$ac_objext \
15238     conftest$ac_exeext conftest.$ac_ext
15239 fi
15240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__cpuid" >&5
15241 $as_echo "$pgac_cv__cpuid" >&6; }
15242 if test x"$pgac_cv__cpuid" = x"yes"; then
15243
15244 $as_echo "#define HAVE__CPUID 1" >>confdefs.h
15245
15246 fi
15247
15248 # Check for Intel SSE 4.2 intrinsics to do CRC calculations.
15249 #
15250 # First check if the _mm_crc32_u8 and _mm_crc32_u64 intrinsics can be used
15251 # with the default compiler flags. If not, check if adding the -msse4.2
15252 # flag helps. CFLAGS_SSE42 is set to -msse4.2 if that's required.
15253 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=" >&5
15254 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=... " >&6; }
15255 if ${pgac_cv_sse42_crc32_intrinsics_+:} false; then :
15256   $as_echo_n "(cached) " >&6
15257 else
15258   pgac_save_CFLAGS=$CFLAGS
15259 CFLAGS="$pgac_save_CFLAGS "
15260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15261 /* end confdefs.h.  */
15262 #include <nmmintrin.h>
15263 int
15264 main ()
15265 {
15266 unsigned int crc = 0;
15267    crc = _mm_crc32_u8(crc, 0);
15268    crc = _mm_crc32_u32(crc, 0);
15269    /* return computed value, to prevent the above being optimized away */
15270    return crc == 0;
15271   ;
15272   return 0;
15273 }
15274 _ACEOF
15275 if ac_fn_c_try_link "$LINENO"; then :
15276   pgac_cv_sse42_crc32_intrinsics_=yes
15277 else
15278   pgac_cv_sse42_crc32_intrinsics_=no
15279 fi
15280 rm -f core conftest.err conftest.$ac_objext \
15281     conftest$ac_exeext conftest.$ac_ext
15282 CFLAGS="$pgac_save_CFLAGS"
15283 fi
15284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics_" >&5
15285 $as_echo "$pgac_cv_sse42_crc32_intrinsics_" >&6; }
15286 if test x"$pgac_cv_sse42_crc32_intrinsics_" = x"yes"; then
15287   CFLAGS_SSE42=""
15288   pgac_sse42_crc32_intrinsics=yes
15289 fi
15290
15291 if test x"$pgac_sse42_crc32_intrinsics" != x"yes"; then
15292   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2" >&5
15293 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2... " >&6; }
15294 if ${pgac_cv_sse42_crc32_intrinsics__msse4_2+:} false; then :
15295   $as_echo_n "(cached) " >&6
15296 else
15297   pgac_save_CFLAGS=$CFLAGS
15298 CFLAGS="$pgac_save_CFLAGS -msse4.2"
15299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15300 /* end confdefs.h.  */
15301 #include <nmmintrin.h>
15302 int
15303 main ()
15304 {
15305 unsigned int crc = 0;
15306    crc = _mm_crc32_u8(crc, 0);
15307    crc = _mm_crc32_u32(crc, 0);
15308    /* return computed value, to prevent the above being optimized away */
15309    return crc == 0;
15310   ;
15311   return 0;
15312 }
15313 _ACEOF
15314 if ac_fn_c_try_link "$LINENO"; then :
15315   pgac_cv_sse42_crc32_intrinsics__msse4_2=yes
15316 else
15317   pgac_cv_sse42_crc32_intrinsics__msse4_2=no
15318 fi
15319 rm -f core conftest.err conftest.$ac_objext \
15320     conftest$ac_exeext conftest.$ac_ext
15321 CFLAGS="$pgac_save_CFLAGS"
15322 fi
15323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics__msse4_2" >&5
15324 $as_echo "$pgac_cv_sse42_crc32_intrinsics__msse4_2" >&6; }
15325 if test x"$pgac_cv_sse42_crc32_intrinsics__msse4_2" = x"yes"; then
15326   CFLAGS_SSE42="-msse4.2"
15327   pgac_sse42_crc32_intrinsics=yes
15328 fi
15329
15330 fi
15331
15332
15333 # Are we targeting a processor that supports SSE 4.2? gcc, clang and icc all
15334 # define __SSE4_2__ in that case.
15335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15336 /* end confdefs.h.  */
15337
15338 int
15339 main ()
15340 {
15341
15342 #ifndef __SSE4_2__
15343 #error __SSE4_2__ not defined
15344 #endif
15345
15346   ;
15347   return 0;
15348 }
15349 _ACEOF
15350 if ac_fn_c_try_compile "$LINENO"; then :
15351   SSE4_2_TARGETED=1
15352 fi
15353 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15354
15355 # Select CRC-32C implementation.
15356 #
15357 # If we are targeting a processor that has SSE 4.2 instructions, we can use the
15358 # special CRC instructions for calculating CRC-32C. If we're not targeting such
15359 # a processor, but we can nevertheless produce code that uses the SSE
15360 # intrinsics, perhaps with some extra CFLAGS, compile both implementations and
15361 # select which one to use at runtime, depending on whether SSE 4.2 is supported
15362 # by the processor we're running on.
15363 #
15364 # You can override this logic by setting the appropriate USE_*_CRC32 flag to 1
15365 # in the template or configure command line.
15366 if test x"$USE_SSE42_CRC32C" = x"" && test x"$USE_SSE42_CRC32C_WITH_RUNTIME_CHECK" = x"" && test x"$USE_SLICING_BY_8_CRC32C" = x""; then
15367   if test x"$pgac_sse42_crc32_intrinsics" = x"yes" && test x"$SSE4_2_TARGETED" = x"1" ; then
15368     USE_SSE42_CRC32C=1
15369   else
15370     # the CPUID instruction is needed for the runtime check.
15371     if test x"$pgac_sse42_crc32_intrinsics" = x"yes" && (test x"$pgac_cv__get_cpuid" = x"yes" || test x"$pgac_cv__cpuid" = x"yes"); then
15372       USE_SSE42_CRC32C_WITH_RUNTIME_CHECK=1
15373     else
15374       # fall back to slicing-by-8 algorithm which doesn't require any special
15375       # CPU support.
15376       USE_SLICING_BY_8_CRC32C=1
15377     fi
15378   fi
15379 fi
15380
15381 # Set PG_CRC32C_OBJS appropriately depending on the selected implementation.
15382 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which CRC-32C implementation to use" >&5
15383 $as_echo_n "checking which CRC-32C implementation to use... " >&6; }
15384 if test x"$USE_SSE42_CRC32C" = x"1"; then
15385
15386 $as_echo "#define USE_SSE42_CRC32C 1" >>confdefs.h
15387
15388   PG_CRC32C_OBJS="pg_crc32c_sse42.o"
15389   { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2" >&5
15390 $as_echo "SSE 4.2" >&6; }
15391 else
15392   if test x"$USE_SSE42_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
15393
15394 $as_echo "#define USE_SSE42_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
15395
15396     PG_CRC32C_OBJS="pg_crc32c_sse42.o pg_crc32c_sb8.o pg_crc32c_choose.o"
15397     { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2 with runtime check" >&5
15398 $as_echo "SSE 4.2 with runtime check" >&6; }
15399   else
15400
15401 $as_echo "#define USE_SLICING_BY_8_CRC32C 1" >>confdefs.h
15402
15403     PG_CRC32C_OBJS="pg_crc32c_sb8.o"
15404     { $as_echo "$as_me:${as_lineno-$LINENO}: result: slicing-by-8" >&5
15405 $as_echo "slicing-by-8" >&6; }
15406   fi
15407 fi
15408
15409
15410
15411 # Select semaphore implementation type.
15412 if test "$PORTNAME" != "win32"; then
15413   if test x"$PREFERRED_SEMAPHORES" = x"NAMED_POSIX" ; then
15414     # Need sem_open for this
15415     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_open" >&5
15416 $as_echo_n "checking for library containing sem_open... " >&6; }
15417 if ${ac_cv_search_sem_open+:} false; then :
15418   $as_echo_n "(cached) " >&6
15419 else
15420   ac_func_search_save_LIBS=$LIBS
15421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15422 /* end confdefs.h.  */
15423
15424 /* Override any GCC internal prototype to avoid an error.
15425    Use char because int might match the return type of a GCC
15426    builtin and then its argument prototype would still apply.  */
15427 #ifdef __cplusplus
15428 extern "C"
15429 #endif
15430 char sem_open ();
15431 int
15432 main ()
15433 {
15434 return sem_open ();
15435   ;
15436   return 0;
15437 }
15438 _ACEOF
15439 for ac_lib in '' rt pthread; do
15440   if test -z "$ac_lib"; then
15441     ac_res="none required"
15442   else
15443     ac_res=-l$ac_lib
15444     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
15445   fi
15446   if ac_fn_c_try_link "$LINENO"; then :
15447   ac_cv_search_sem_open=$ac_res
15448 fi
15449 rm -f core conftest.err conftest.$ac_objext \
15450     conftest$ac_exeext
15451   if ${ac_cv_search_sem_open+:} false; then :
15452   break
15453 fi
15454 done
15455 if ${ac_cv_search_sem_open+:} false; then :
15456
15457 else
15458   ac_cv_search_sem_open=no
15459 fi
15460 rm conftest.$ac_ext
15461 LIBS=$ac_func_search_save_LIBS
15462 fi
15463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_open" >&5
15464 $as_echo "$ac_cv_search_sem_open" >&6; }
15465 ac_res=$ac_cv_search_sem_open
15466 if test "$ac_res" != no; then :
15467   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15468   USE_NAMED_POSIX_SEMAPHORES=1
15469 fi
15470
15471   fi
15472   if test x"$PREFERRED_SEMAPHORES" = x"UNNAMED_POSIX" ; then
15473     # Need sem_init for this
15474     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
15475 $as_echo_n "checking for library containing sem_init... " >&6; }
15476 if ${ac_cv_search_sem_init+:} false; then :
15477   $as_echo_n "(cached) " >&6
15478 else
15479   ac_func_search_save_LIBS=$LIBS
15480 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15481 /* end confdefs.h.  */
15482
15483 /* Override any GCC internal prototype to avoid an error.
15484    Use char because int might match the return type of a GCC
15485    builtin and then its argument prototype would still apply.  */
15486 #ifdef __cplusplus
15487 extern "C"
15488 #endif
15489 char sem_init ();
15490 int
15491 main ()
15492 {
15493 return sem_init ();
15494   ;
15495   return 0;
15496 }
15497 _ACEOF
15498 for ac_lib in '' rt pthread; do
15499   if test -z "$ac_lib"; then
15500     ac_res="none required"
15501   else
15502     ac_res=-l$ac_lib
15503     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
15504   fi
15505   if ac_fn_c_try_link "$LINENO"; then :
15506   ac_cv_search_sem_init=$ac_res
15507 fi
15508 rm -f core conftest.err conftest.$ac_objext \
15509     conftest$ac_exeext
15510   if ${ac_cv_search_sem_init+:} false; then :
15511   break
15512 fi
15513 done
15514 if ${ac_cv_search_sem_init+:} false; then :
15515
15516 else
15517   ac_cv_search_sem_init=no
15518 fi
15519 rm conftest.$ac_ext
15520 LIBS=$ac_func_search_save_LIBS
15521 fi
15522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
15523 $as_echo "$ac_cv_search_sem_init" >&6; }
15524 ac_res=$ac_cv_search_sem_init
15525 if test "$ac_res" != no; then :
15526   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15527   USE_UNNAMED_POSIX_SEMAPHORES=1
15528 fi
15529
15530   fi
15531   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which semaphore API to use" >&5
15532 $as_echo_n "checking which semaphore API to use... " >&6; }
15533   if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
15534
15535 $as_echo "#define USE_NAMED_POSIX_SEMAPHORES 1" >>confdefs.h
15536
15537     SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
15538     sematype="named POSIX"
15539   else
15540     if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
15541
15542 $as_echo "#define USE_UNNAMED_POSIX_SEMAPHORES 1" >>confdefs.h
15543
15544       SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
15545       sematype="unnamed POSIX"
15546     else
15547
15548 $as_echo "#define USE_SYSV_SEMAPHORES 1" >>confdefs.h
15549
15550       SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
15551       sematype="System V"
15552     fi
15553   fi
15554   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sematype" >&5
15555 $as_echo "$sematype" >&6; }
15556 else
15557
15558 $as_echo "#define USE_WIN32_SEMAPHORES 1" >>confdefs.h
15559
15560   SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
15561 fi
15562
15563
15564 # Select shared-memory implementation type.
15565 if test "$PORTNAME" != "win32"; then
15566
15567 $as_echo "#define USE_SYSV_SHARED_MEMORY 1" >>confdefs.h
15568
15569   SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
15570 else
15571
15572 $as_echo "#define USE_WIN32_SHARED_MEMORY 1" >>confdefs.h
15573
15574   SHMEM_IMPLEMENTATION="src/backend/port/win32_shmem.c"
15575 fi
15576
15577 # Select random number source
15578 #
15579 # You can override this logic by setting the appropriate USE_*RANDOM flag to 1
15580 # in the template or configure command line.
15581
15582 # If not selected manually, try to select a source automatically.
15583 if test "$enable_strong_random" = "yes" && test x"$USE_OPENSSL_RANDOM" = x"" && test x"$USE_WIN32_RANDOM" = x"" && test x"$USE_DEV_URANDOM" = x"" ; then
15584   if test x"$with_openssl" = x"yes" ; then
15585     USE_OPENSSL_RANDOM=1
15586   elif test "$PORTNAME" = "win32" ; then
15587     USE_WIN32_RANDOM=1
15588   else
15589     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/urandom" >&5
15590 $as_echo_n "checking for /dev/urandom... " >&6; }
15591 if ${ac_cv_file__dev_urandom+:} false; then :
15592   $as_echo_n "(cached) " >&6
15593 else
15594   test "$cross_compiling" = yes &&
15595   as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15596 if test -r "/dev/urandom"; then
15597   ac_cv_file__dev_urandom=yes
15598 else
15599   ac_cv_file__dev_urandom=no
15600 fi
15601 fi
15602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_urandom" >&5
15603 $as_echo "$ac_cv_file__dev_urandom" >&6; }
15604 if test "x$ac_cv_file__dev_urandom" = xyes; then :
15605
15606 fi
15607
15608
15609     if test x"$ac_cv_file__dev_urandom" = x"yes" ; then
15610       USE_DEV_URANDOM=1
15611     fi
15612   fi
15613 fi
15614
15615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which random number source to use" >&5
15616 $as_echo_n "checking which random number source to use... " >&6; }
15617 if test "$enable_strong_random" = yes ; then
15618   if test x"$USE_OPENSSL_RANDOM" = x"1" ; then
15619
15620 $as_echo "#define USE_OPENSSL_RANDOM 1" >>confdefs.h
15621
15622     { $as_echo "$as_me:${as_lineno-$LINENO}: result: OpenSSL" >&5
15623 $as_echo "OpenSSL" >&6; }
15624   elif test x"$USE_WIN32_RANDOM" = x"1" ; then
15625
15626 $as_echo "#define USE_WIN32_RANDOM 1" >>confdefs.h
15627
15628     { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows native" >&5
15629 $as_echo "Windows native" >&6; }
15630   elif test x"$USE_DEV_URANDOM" = x"1" ; then
15631
15632 $as_echo "#define USE_DEV_URANDOM 1" >>confdefs.h
15633
15634     { $as_echo "$as_me:${as_lineno-$LINENO}: result: /dev/urandom" >&5
15635 $as_echo "/dev/urandom" >&6; }
15636   else
15637     as_fn_error $? "
15638 no source of strong random numbers was found
15639 PostgreSQL can use OpenSSL or /dev/urandom as a source of random numbers,
15640 for authentication protocols. You can use --disable-strong-random to use a
15641 built-in pseudo random number generator, but that may be insecure." "$LINENO" 5
15642   fi
15643
15644 $as_echo "#define HAVE_STRONG_RANDOM 1" >>confdefs.h
15645
15646 else
15647     { $as_echo "$as_me:${as_lineno-$LINENO}: result: weak builtin PRNG" >&5
15648 $as_echo "weak builtin PRNG" >&6; }
15649     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
15650 *** Not using a strong random number source may be insecure." >&5
15651 $as_echo "$as_me: WARNING:
15652 *** Not using a strong random number source may be insecure." >&2;}
15653 fi
15654
15655 # If not set in template file, set bytes to use libc memset()
15656 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
15657   MEMSET_LOOP_LIMIT=1024
15658 fi
15659
15660 cat >>confdefs.h <<_ACEOF
15661 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
15662 _ACEOF
15663
15664
15665
15666 if test "$enable_nls" = yes ; then
15667
15668   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bind_textdomain_codeset" >&5
15669 $as_echo_n "checking for library containing bind_textdomain_codeset... " >&6; }
15670 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
15671   $as_echo_n "(cached) " >&6
15672 else
15673   ac_func_search_save_LIBS=$LIBS
15674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15675 /* end confdefs.h.  */
15676
15677 /* Override any GCC internal prototype to avoid an error.
15678    Use char because int might match the return type of a GCC
15679    builtin and then its argument prototype would still apply.  */
15680 #ifdef __cplusplus
15681 extern "C"
15682 #endif
15683 char bind_textdomain_codeset ();
15684 int
15685 main ()
15686 {
15687 return bind_textdomain_codeset ();
15688   ;
15689   return 0;
15690 }
15691 _ACEOF
15692 for ac_lib in '' intl; do
15693   if test -z "$ac_lib"; then
15694     ac_res="none required"
15695   else
15696     ac_res=-l$ac_lib
15697     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
15698   fi
15699   if ac_fn_c_try_link "$LINENO"; then :
15700   ac_cv_search_bind_textdomain_codeset=$ac_res
15701 fi
15702 rm -f core conftest.err conftest.$ac_objext \
15703     conftest$ac_exeext
15704   if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
15705   break
15706 fi
15707 done
15708 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
15709
15710 else
15711   ac_cv_search_bind_textdomain_codeset=no
15712 fi
15713 rm conftest.$ac_ext
15714 LIBS=$ac_func_search_save_LIBS
15715 fi
15716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bind_textdomain_codeset" >&5
15717 $as_echo "$ac_cv_search_bind_textdomain_codeset" >&6; }
15718 ac_res=$ac_cv_search_bind_textdomain_codeset
15719 if test "$ac_res" != no; then :
15720   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15721
15722 else
15723   as_fn_error $? "a gettext implementation is required for NLS" "$LINENO" 5
15724 fi
15725
15726   ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
15727 if test "x$ac_cv_header_libintl_h" = xyes; then :
15728
15729 else
15730   as_fn_error $? "header file <libintl.h> is required for NLS" "$LINENO" 5
15731 fi
15732
15733
15734   if test -z "$MSGFMT"; then
15735   for ac_prog in msgfmt
15736 do
15737   # Extract the first word of "$ac_prog", so it can be a program name with args.
15738 set dummy $ac_prog; ac_word=$2
15739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15740 $as_echo_n "checking for $ac_word... " >&6; }
15741 if ${ac_cv_path_MSGFMT+:} false; then :
15742   $as_echo_n "(cached) " >&6
15743 else
15744   case $MSGFMT in
15745   [\\/]* | ?:[\\/]*)
15746   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
15747   ;;
15748   *)
15749   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15750 for as_dir in $PATH
15751 do
15752   IFS=$as_save_IFS
15753   test -z "$as_dir" && as_dir=.
15754     for ac_exec_ext in '' $ac_executable_extensions; do
15755   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15756     ac_cv_path_MSGFMT="$as_dir/$ac_word$ac_exec_ext"
15757     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15758     break 2
15759   fi
15760 done
15761   done
15762 IFS=$as_save_IFS
15763
15764   ;;
15765 esac
15766 fi
15767 MSGFMT=$ac_cv_path_MSGFMT
15768 if test -n "$MSGFMT"; then
15769   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
15770 $as_echo "$MSGFMT" >&6; }
15771 else
15772   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15773 $as_echo "no" >&6; }
15774 fi
15775
15776
15777   test -n "$MSGFMT" && break
15778 done
15779
15780 else
15781   # Report the value of MSGFMT in configure's output in all cases.
15782   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGFMT" >&5
15783 $as_echo_n "checking for MSGFMT... " >&6; }
15784   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
15785 $as_echo "$MSGFMT" >&6; }
15786 fi
15787
15788   if test -z "$MSGFMT"; then
15789     as_fn_error $? "msgfmt is required for NLS" "$LINENO" 5
15790   fi
15791   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msgfmt flags" >&5
15792 $as_echo_n "checking for msgfmt flags... " >&6; }
15793 if ${pgac_cv_msgfmt_flags+:} false; then :
15794   $as_echo_n "(cached) " >&6
15795 else
15796   if test x"$MSGFMT" != x"" && "$MSGFMT" --version 2>&1 | grep "GNU" >/dev/null; then
15797     pgac_cv_msgfmt_flags=-c
15798 fi
15799 fi
15800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_msgfmt_flags" >&5
15801 $as_echo "$pgac_cv_msgfmt_flags" >&6; }
15802   MSGFMT_FLAGS=$pgac_cv_msgfmt_flags
15803
15804   if test -z "$MSGMERGE"; then
15805   for ac_prog in msgmerge
15806 do
15807   # Extract the first word of "$ac_prog", so it can be a program name with args.
15808 set dummy $ac_prog; ac_word=$2
15809 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15810 $as_echo_n "checking for $ac_word... " >&6; }
15811 if ${ac_cv_path_MSGMERGE+:} false; then :
15812   $as_echo_n "(cached) " >&6
15813 else
15814   case $MSGMERGE in
15815   [\\/]* | ?:[\\/]*)
15816   ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
15817   ;;
15818   *)
15819   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15820 for as_dir in $PATH
15821 do
15822   IFS=$as_save_IFS
15823   test -z "$as_dir" && as_dir=.
15824     for ac_exec_ext in '' $ac_executable_extensions; do
15825   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15826     ac_cv_path_MSGMERGE="$as_dir/$ac_word$ac_exec_ext"
15827     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15828     break 2
15829   fi
15830 done
15831   done
15832 IFS=$as_save_IFS
15833
15834   ;;
15835 esac
15836 fi
15837 MSGMERGE=$ac_cv_path_MSGMERGE
15838 if test -n "$MSGMERGE"; then
15839   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
15840 $as_echo "$MSGMERGE" >&6; }
15841 else
15842   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15843 $as_echo "no" >&6; }
15844 fi
15845
15846
15847   test -n "$MSGMERGE" && break
15848 done
15849
15850 else
15851   # Report the value of MSGMERGE in configure's output in all cases.
15852   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGMERGE" >&5
15853 $as_echo_n "checking for MSGMERGE... " >&6; }
15854   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
15855 $as_echo "$MSGMERGE" >&6; }
15856 fi
15857
15858   if test -z "$XGETTEXT"; then
15859   for ac_prog in xgettext
15860 do
15861   # Extract the first word of "$ac_prog", so it can be a program name with args.
15862 set dummy $ac_prog; ac_word=$2
15863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15864 $as_echo_n "checking for $ac_word... " >&6; }
15865 if ${ac_cv_path_XGETTEXT+:} false; then :
15866   $as_echo_n "(cached) " >&6
15867 else
15868   case $XGETTEXT in
15869   [\\/]* | ?:[\\/]*)
15870   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
15871   ;;
15872   *)
15873   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15874 for as_dir in $PATH
15875 do
15876   IFS=$as_save_IFS
15877   test -z "$as_dir" && as_dir=.
15878     for ac_exec_ext in '' $ac_executable_extensions; do
15879   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15880     ac_cv_path_XGETTEXT="$as_dir/$ac_word$ac_exec_ext"
15881     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15882     break 2
15883   fi
15884 done
15885   done
15886 IFS=$as_save_IFS
15887
15888   ;;
15889 esac
15890 fi
15891 XGETTEXT=$ac_cv_path_XGETTEXT
15892 if test -n "$XGETTEXT"; then
15893   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
15894 $as_echo "$XGETTEXT" >&6; }
15895 else
15896   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15897 $as_echo "no" >&6; }
15898 fi
15899
15900
15901   test -n "$XGETTEXT" && break
15902 done
15903
15904 else
15905   # Report the value of XGETTEXT in configure's output in all cases.
15906   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XGETTEXT" >&5
15907 $as_echo_n "checking for XGETTEXT... " >&6; }
15908   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
15909 $as_echo "$XGETTEXT" >&6; }
15910 fi
15911
15912
15913 fi
15914
15915 # Check for Tcl configuration script tclConfig.sh
15916 if test "$with_tcl" = yes; then
15917     if test -z "$TCLSH"; then
15918   for ac_prog in tclsh tcl tclsh8.6 tclsh86 tclsh8.5 tclsh85 tclsh8.4 tclsh84
15919 do
15920   # Extract the first word of "$ac_prog", so it can be a program name with args.
15921 set dummy $ac_prog; ac_word=$2
15922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15923 $as_echo_n "checking for $ac_word... " >&6; }
15924 if ${ac_cv_path_TCLSH+:} false; then :
15925   $as_echo_n "(cached) " >&6
15926 else
15927   case $TCLSH in
15928   [\\/]* | ?:[\\/]*)
15929   ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
15930   ;;
15931   *)
15932   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15933 for as_dir in $PATH
15934 do
15935   IFS=$as_save_IFS
15936   test -z "$as_dir" && as_dir=.
15937     for ac_exec_ext in '' $ac_executable_extensions; do
15938   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15939     ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
15940     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15941     break 2
15942   fi
15943 done
15944   done
15945 IFS=$as_save_IFS
15946
15947   ;;
15948 esac
15949 fi
15950 TCLSH=$ac_cv_path_TCLSH
15951 if test -n "$TCLSH"; then
15952   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
15953 $as_echo "$TCLSH" >&6; }
15954 else
15955   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15956 $as_echo "no" >&6; }
15957 fi
15958
15959
15960   test -n "$TCLSH" && break
15961 done
15962
15963 else
15964   # Report the value of TCLSH in configure's output in all cases.
15965   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TCLSH" >&5
15966 $as_echo_n "checking for TCLSH... " >&6; }
15967   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
15968 $as_echo "$TCLSH" >&6; }
15969 fi
15970
15971 if test x"$TCLSH" = x""; then
15972   as_fn_error $? "Tcl shell not found" "$LINENO" 5
15973 fi
15974
15975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclConfig.sh" >&5
15976 $as_echo_n "checking for tclConfig.sh... " >&6; }
15977 # Let user override test
15978 if test -z "$TCL_CONFIG_SH"; then
15979     pgac_test_dirs="$with_tclconfig"
15980
15981     set X $pgac_test_dirs; shift
15982     if test $# -eq 0; then
15983         test -z "$TCLSH" && as_fn_error $? "unable to locate tclConfig.sh because no Tcl shell was found" "$LINENO" 5
15984         set X `echo 'puts $auto_path' | $TCLSH`; shift
15985     fi
15986
15987     for pgac_dir do
15988         if test -r "$pgac_dir/tclConfig.sh"; then
15989             TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
15990             break
15991         fi
15992     done
15993 fi
15994
15995 if test -z "$TCL_CONFIG_SH"; then
15996     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15997 $as_echo "no" >&6; }
15998     as_fn_error $? "file 'tclConfig.sh' is required for Tcl" "$LINENO" 5
15999 else
16000     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCL_CONFIG_SH" >&5
16001 $as_echo "$TCL_CONFIG_SH" >&6; }
16002 fi
16003
16004
16005
16006     . "$TCL_CONFIG_SH"
16007 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
16008 eval TCL_LIBS=\"$TCL_LIBS\"
16009 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
16010 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
16011
16012         if test "$TCL_SHARED_BUILD" != 1; then
16013       as_fn_error $? "cannot build PL/Tcl because Tcl is not a shared library
16014 Use --without-tcl to disable building PL/Tcl." "$LINENO" 5
16015     fi
16016     # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
16017     ac_save_CPPFLAGS=$CPPFLAGS
16018     CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
16019     ac_fn_c_check_header_mongrel "$LINENO" "tcl.h" "ac_cv_header_tcl_h" "$ac_includes_default"
16020 if test "x$ac_cv_header_tcl_h" = xyes; then :
16021
16022 else
16023   as_fn_error $? "header file <tcl.h> is required for Tcl" "$LINENO" 5
16024 fi
16025
16026
16027     CPPFLAGS=$ac_save_CPPFLAGS
16028 fi
16029
16030 # check for <perl.h>
16031 if test "$with_perl" = yes; then
16032   ac_save_CPPFLAGS=$CPPFLAGS
16033   CPPFLAGS="$CPPFLAGS -I$perl_archlibexp/CORE"
16034   ac_fn_c_check_header_compile "$LINENO" "perl.h" "ac_cv_header_perl_h" "#include <EXTERN.h>
16035 "
16036 if test "x$ac_cv_header_perl_h" = xyes; then :
16037
16038 else
16039   as_fn_error $? "header file <perl.h> is required for Perl" "$LINENO" 5
16040 fi
16041
16042
16043   # While we're at it, check that we can link to libperl.
16044   # On most platforms, if perl.h is there then libperl.so will be too, but at
16045   # this writing Debian packages them separately.  There is no known reason to
16046   # waste cycles on separate probes for the Tcl or Python libraries, though.
16047   pgac_save_LIBS=$LIBS
16048   LIBS="$perl_embed_ldflags"
16049   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libperl" >&5
16050 $as_echo_n "checking for libperl... " >&6; }
16051   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16052 /* end confdefs.h.  */
16053
16054 #include <EXTERN.h>
16055 #include <perl.h>
16056
16057 int
16058 main ()
16059 {
16060 perl_alloc();
16061   ;
16062   return 0;
16063 }
16064 _ACEOF
16065 if ac_fn_c_try_link "$LINENO"; then :
16066   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16067 $as_echo "yes" >&6; }
16068 else
16069   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16070 $as_echo "no" >&6; }
16071      as_fn_error $? "libperl library is required for Perl" "$LINENO" 5
16072 fi
16073 rm -f core conftest.err conftest.$ac_objext \
16074     conftest$ac_exeext conftest.$ac_ext
16075   LIBS=$pgac_save_LIBS
16076   CPPFLAGS=$ac_save_CPPFLAGS
16077 fi
16078
16079 # check for <Python.h>
16080 if test "$with_python" = yes; then
16081   ac_save_CPPFLAGS=$CPPFLAGS
16082   CPPFLAGS="$python_includespec $CPPFLAGS"
16083   ac_fn_c_check_header_mongrel "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default"
16084 if test "x$ac_cv_header_Python_h" = xyes; then :
16085
16086 else
16087   as_fn_error $? "header file <Python.h> is required for Python" "$LINENO" 5
16088 fi
16089
16090
16091   CPPFLAGS=$ac_save_CPPFLAGS
16092 fi
16093
16094 #
16095 # Check for DocBook and tools
16096 #
16097 if test -z "$NSGMLS"; then
16098   for ac_prog in onsgmls nsgmls
16099 do
16100   # Extract the first word of "$ac_prog", so it can be a program name with args.
16101 set dummy $ac_prog; ac_word=$2
16102 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16103 $as_echo_n "checking for $ac_word... " >&6; }
16104 if ${ac_cv_path_NSGMLS+:} false; then :
16105   $as_echo_n "(cached) " >&6
16106 else
16107   case $NSGMLS in
16108   [\\/]* | ?:[\\/]*)
16109   ac_cv_path_NSGMLS="$NSGMLS" # Let the user override the test with a path.
16110   ;;
16111   *)
16112   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16113 for as_dir in $PATH
16114 do
16115   IFS=$as_save_IFS
16116   test -z "$as_dir" && as_dir=.
16117     for ac_exec_ext in '' $ac_executable_extensions; do
16118   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16119     ac_cv_path_NSGMLS="$as_dir/$ac_word$ac_exec_ext"
16120     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16121     break 2
16122   fi
16123 done
16124   done
16125 IFS=$as_save_IFS
16126
16127   ;;
16128 esac
16129 fi
16130 NSGMLS=$ac_cv_path_NSGMLS
16131 if test -n "$NSGMLS"; then
16132   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NSGMLS" >&5
16133 $as_echo "$NSGMLS" >&6; }
16134 else
16135   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16136 $as_echo "no" >&6; }
16137 fi
16138
16139
16140   test -n "$NSGMLS" && break
16141 done
16142
16143 else
16144   # Report the value of NSGMLS in configure's output in all cases.
16145   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NSGMLS" >&5
16146 $as_echo_n "checking for NSGMLS... " >&6; }
16147   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NSGMLS" >&5
16148 $as_echo "$NSGMLS" >&6; }
16149 fi
16150
16151
16152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DocBook V4.2" >&5
16153 $as_echo_n "checking for DocBook V4.2... " >&6; }
16154 if ${pgac_cv_check_docbook+:} false; then :
16155   $as_echo_n "(cached) " >&6
16156 else
16157   cat >conftest.sgml <<EOF
16158 <!doctype book PUBLIC "-//OASIS//DTD DocBook V4.2//EN">
16159 <book>
16160  <title>test</title>
16161  <chapter>
16162   <title>random</title>
16163    <sect1>
16164     <title>testsect</title>
16165     <para>text</para>
16166   </sect1>
16167  </chapter>
16168 </book>
16169 EOF
16170
16171 pgac_cv_check_docbook=no
16172
16173 if test -n "$NSGMLS"; then
16174   $NSGMLS -s conftest.sgml 1>&5 2>&1
16175   if test $? -eq 0; then
16176     pgac_cv_check_docbook=yes
16177   fi
16178 fi
16179 rm -f conftest.sgml
16180 fi
16181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_docbook" >&5
16182 $as_echo "$pgac_cv_check_docbook" >&6; }
16183
16184 have_docbook=$pgac_cv_check_docbook
16185
16186
16187 if test -z "$DBTOEPUB"; then
16188   for ac_prog in dbtoepub
16189 do
16190   # Extract the first word of "$ac_prog", so it can be a program name with args.
16191 set dummy $ac_prog; ac_word=$2
16192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16193 $as_echo_n "checking for $ac_word... " >&6; }
16194 if ${ac_cv_path_DBTOEPUB+:} false; then :
16195   $as_echo_n "(cached) " >&6
16196 else
16197   case $DBTOEPUB in
16198   [\\/]* | ?:[\\/]*)
16199   ac_cv_path_DBTOEPUB="$DBTOEPUB" # Let the user override the test with a path.
16200   ;;
16201   *)
16202   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16203 for as_dir in $PATH
16204 do
16205   IFS=$as_save_IFS
16206   test -z "$as_dir" && as_dir=.
16207     for ac_exec_ext in '' $ac_executable_extensions; do
16208   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16209     ac_cv_path_DBTOEPUB="$as_dir/$ac_word$ac_exec_ext"
16210     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16211     break 2
16212   fi
16213 done
16214   done
16215 IFS=$as_save_IFS
16216
16217   ;;
16218 esac
16219 fi
16220 DBTOEPUB=$ac_cv_path_DBTOEPUB
16221 if test -n "$DBTOEPUB"; then
16222   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
16223 $as_echo "$DBTOEPUB" >&6; }
16224 else
16225   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16226 $as_echo "no" >&6; }
16227 fi
16228
16229
16230   test -n "$DBTOEPUB" && break
16231 done
16232
16233 else
16234   # Report the value of DBTOEPUB in configure's output in all cases.
16235   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DBTOEPUB" >&5
16236 $as_echo_n "checking for DBTOEPUB... " >&6; }
16237   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
16238 $as_echo "$DBTOEPUB" >&6; }
16239 fi
16240
16241 if test -z "$XMLLINT"; then
16242   for ac_prog in xmllint
16243 do
16244   # Extract the first word of "$ac_prog", so it can be a program name with args.
16245 set dummy $ac_prog; ac_word=$2
16246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16247 $as_echo_n "checking for $ac_word... " >&6; }
16248 if ${ac_cv_path_XMLLINT+:} false; then :
16249   $as_echo_n "(cached) " >&6
16250 else
16251   case $XMLLINT in
16252   [\\/]* | ?:[\\/]*)
16253   ac_cv_path_XMLLINT="$XMLLINT" # Let the user override the test with a path.
16254   ;;
16255   *)
16256   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16257 for as_dir in $PATH
16258 do
16259   IFS=$as_save_IFS
16260   test -z "$as_dir" && as_dir=.
16261     for ac_exec_ext in '' $ac_executable_extensions; do
16262   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16263     ac_cv_path_XMLLINT="$as_dir/$ac_word$ac_exec_ext"
16264     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16265     break 2
16266   fi
16267 done
16268   done
16269 IFS=$as_save_IFS
16270
16271   ;;
16272 esac
16273 fi
16274 XMLLINT=$ac_cv_path_XMLLINT
16275 if test -n "$XMLLINT"; then
16276   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
16277 $as_echo "$XMLLINT" >&6; }
16278 else
16279   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16280 $as_echo "no" >&6; }
16281 fi
16282
16283
16284   test -n "$XMLLINT" && break
16285 done
16286
16287 else
16288   # Report the value of XMLLINT in configure's output in all cases.
16289   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XMLLINT" >&5
16290 $as_echo_n "checking for XMLLINT... " >&6; }
16291   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
16292 $as_echo "$XMLLINT" >&6; }
16293 fi
16294
16295 if test -z "$XSLTPROC"; then
16296   for ac_prog in xsltproc
16297 do
16298   # Extract the first word of "$ac_prog", so it can be a program name with args.
16299 set dummy $ac_prog; ac_word=$2
16300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16301 $as_echo_n "checking for $ac_word... " >&6; }
16302 if ${ac_cv_path_XSLTPROC+:} false; then :
16303   $as_echo_n "(cached) " >&6
16304 else
16305   case $XSLTPROC in
16306   [\\/]* | ?:[\\/]*)
16307   ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
16308   ;;
16309   *)
16310   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16311 for as_dir in $PATH
16312 do
16313   IFS=$as_save_IFS
16314   test -z "$as_dir" && as_dir=.
16315     for ac_exec_ext in '' $ac_executable_extensions; do
16316   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16317     ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
16318     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16319     break 2
16320   fi
16321 done
16322   done
16323 IFS=$as_save_IFS
16324
16325   ;;
16326 esac
16327 fi
16328 XSLTPROC=$ac_cv_path_XSLTPROC
16329 if test -n "$XSLTPROC"; then
16330   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
16331 $as_echo "$XSLTPROC" >&6; }
16332 else
16333   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16334 $as_echo "no" >&6; }
16335 fi
16336
16337
16338   test -n "$XSLTPROC" && break
16339 done
16340
16341 else
16342   # Report the value of XSLTPROC in configure's output in all cases.
16343   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XSLTPROC" >&5
16344 $as_echo_n "checking for XSLTPROC... " >&6; }
16345   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
16346 $as_echo "$XSLTPROC" >&6; }
16347 fi
16348
16349 if test -z "$OSX"; then
16350   for ac_prog in osx sgml2xml sx
16351 do
16352   # Extract the first word of "$ac_prog", so it can be a program name with args.
16353 set dummy $ac_prog; ac_word=$2
16354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16355 $as_echo_n "checking for $ac_word... " >&6; }
16356 if ${ac_cv_path_OSX+:} false; then :
16357   $as_echo_n "(cached) " >&6
16358 else
16359   case $OSX in
16360   [\\/]* | ?:[\\/]*)
16361   ac_cv_path_OSX="$OSX" # Let the user override the test with a path.
16362   ;;
16363   *)
16364   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16365 for as_dir in $PATH
16366 do
16367   IFS=$as_save_IFS
16368   test -z "$as_dir" && as_dir=.
16369     for ac_exec_ext in '' $ac_executable_extensions; do
16370   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16371     ac_cv_path_OSX="$as_dir/$ac_word$ac_exec_ext"
16372     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16373     break 2
16374   fi
16375 done
16376   done
16377 IFS=$as_save_IFS
16378
16379   ;;
16380 esac
16381 fi
16382 OSX=$ac_cv_path_OSX
16383 if test -n "$OSX"; then
16384   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OSX" >&5
16385 $as_echo "$OSX" >&6; }
16386 else
16387   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16388 $as_echo "no" >&6; }
16389 fi
16390
16391
16392   test -n "$OSX" && break
16393 done
16394
16395 else
16396   # Report the value of OSX in configure's output in all cases.
16397   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX" >&5
16398 $as_echo_n "checking for OSX... " >&6; }
16399   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OSX" >&5
16400 $as_echo "$OSX" >&6; }
16401 fi
16402
16403 if test -z "$FOP"; then
16404   for ac_prog in fop
16405 do
16406   # Extract the first word of "$ac_prog", so it can be a program name with args.
16407 set dummy $ac_prog; ac_word=$2
16408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16409 $as_echo_n "checking for $ac_word... " >&6; }
16410 if ${ac_cv_path_FOP+:} false; then :
16411   $as_echo_n "(cached) " >&6
16412 else
16413   case $FOP in
16414   [\\/]* | ?:[\\/]*)
16415   ac_cv_path_FOP="$FOP" # Let the user override the test with a path.
16416   ;;
16417   *)
16418   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16419 for as_dir in $PATH
16420 do
16421   IFS=$as_save_IFS
16422   test -z "$as_dir" && as_dir=.
16423     for ac_exec_ext in '' $ac_executable_extensions; do
16424   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16425     ac_cv_path_FOP="$as_dir/$ac_word$ac_exec_ext"
16426     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16427     break 2
16428   fi
16429 done
16430   done
16431 IFS=$as_save_IFS
16432
16433   ;;
16434 esac
16435 fi
16436 FOP=$ac_cv_path_FOP
16437 if test -n "$FOP"; then
16438   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
16439 $as_echo "$FOP" >&6; }
16440 else
16441   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16442 $as_echo "no" >&6; }
16443 fi
16444
16445
16446   test -n "$FOP" && break
16447 done
16448
16449 else
16450   # Report the value of FOP in configure's output in all cases.
16451   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FOP" >&5
16452 $as_echo_n "checking for FOP... " >&6; }
16453   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
16454 $as_echo "$FOP" >&6; }
16455 fi
16456
16457
16458 #
16459 # Check for test tools
16460 #
16461 if test "$enable_tap_tests" = yes; then
16462   # Check for necessary modules, unless user has specified the "prove" to use;
16463   # in that case it's her responsibility to have a working configuration.
16464   # (prove might be part of a different Perl installation than perl, eg on
16465   # MSys, so the result of AX_PROG_PERL_MODULES could be irrelevant anyway.)
16466   if test -z "$PROVE"; then
16467
16468
16469
16470
16471
16472
16473 # Make sure we have perl
16474 if test -z "$PERL"; then
16475 # Extract the first word of "perl", so it can be a program name with args.
16476 set dummy perl; ac_word=$2
16477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16478 $as_echo_n "checking for $ac_word... " >&6; }
16479 if ${ac_cv_prog_PERL+:} false; then :
16480   $as_echo_n "(cached) " >&6
16481 else
16482   if test -n "$PERL"; then
16483   ac_cv_prog_PERL="$PERL" # Let the user override the test.
16484 else
16485 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16486 for as_dir in $PATH
16487 do
16488   IFS=$as_save_IFS
16489   test -z "$as_dir" && as_dir=.
16490     for ac_exec_ext in '' $ac_executable_extensions; do
16491   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16492     ac_cv_prog_PERL="perl"
16493     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16494     break 2
16495   fi
16496 done
16497   done
16498 IFS=$as_save_IFS
16499
16500 fi
16501 fi
16502 PERL=$ac_cv_prog_PERL
16503 if test -n "$PERL"; then
16504   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
16505 $as_echo "$PERL" >&6; }
16506 else
16507   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16508 $as_echo "no" >&6; }
16509 fi
16510
16511
16512 fi
16513
16514 if test "x$PERL" != x; then
16515   ax_perl_modules_failed=0
16516   for ax_perl_module in 'IPC::Run' ; do
16517     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for perl module $ax_perl_module" >&5
16518 $as_echo_n "checking for perl module $ax_perl_module... " >&6; }
16519
16520     # Would be nice to log result here, but can't rely on autoconf internals
16521     $PERL -e "use $ax_perl_module; exit" > /dev/null 2>&1
16522     if test $? -ne 0; then
16523       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16524 $as_echo "no" >&6; };
16525       ax_perl_modules_failed=1
16526    else
16527       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16528 $as_echo "ok" >&6; };
16529     fi
16530   done
16531
16532   # Run optional shell commands
16533   if test "$ax_perl_modules_failed" = 0; then
16534     :
16535
16536   else
16537     :
16538     as_fn_error $? "Perl module IPC::Run is required to run TAP tests" "$LINENO" 5
16539   fi
16540 else
16541   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not find perl" >&5
16542 $as_echo "$as_me: WARNING: could not find perl" >&2;}
16543 fi
16544   fi
16545   # Now make sure we know where prove is
16546   if test -z "$PROVE"; then
16547   for ac_prog in prove
16548 do
16549   # Extract the first word of "$ac_prog", so it can be a program name with args.
16550 set dummy $ac_prog; ac_word=$2
16551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16552 $as_echo_n "checking for $ac_word... " >&6; }
16553 if ${ac_cv_path_PROVE+:} false; then :
16554   $as_echo_n "(cached) " >&6
16555 else
16556   case $PROVE in
16557   [\\/]* | ?:[\\/]*)
16558   ac_cv_path_PROVE="$PROVE" # Let the user override the test with a path.
16559   ;;
16560   *)
16561   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16562 for as_dir in $PATH
16563 do
16564   IFS=$as_save_IFS
16565   test -z "$as_dir" && as_dir=.
16566     for ac_exec_ext in '' $ac_executable_extensions; do
16567   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16568     ac_cv_path_PROVE="$as_dir/$ac_word$ac_exec_ext"
16569     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16570     break 2
16571   fi
16572 done
16573   done
16574 IFS=$as_save_IFS
16575
16576   ;;
16577 esac
16578 fi
16579 PROVE=$ac_cv_path_PROVE
16580 if test -n "$PROVE"; then
16581   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
16582 $as_echo "$PROVE" >&6; }
16583 else
16584   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16585 $as_echo "no" >&6; }
16586 fi
16587
16588
16589   test -n "$PROVE" && break
16590 done
16591
16592 else
16593   # Report the value of PROVE in configure's output in all cases.
16594   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PROVE" >&5
16595 $as_echo_n "checking for PROVE... " >&6; }
16596   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
16597 $as_echo "$PROVE" >&6; }
16598 fi
16599
16600   if test -z "$PROVE"; then
16601     as_fn_error $? "prove not found" "$LINENO" 5
16602   fi
16603 fi
16604
16605 # Thread testing
16606
16607 # We have to run the thread test near the end so we have all our symbols
16608 # defined.  Cross compiling throws a warning.
16609 #
16610 if test "$enable_thread_safety" = yes; then
16611 if test "$PORTNAME" != "win32"
16612 then
16613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking thread safety of required library functions" >&5
16614 $as_echo_n "checking thread safety of required library functions... " >&6; }
16615
16616 _CFLAGS="$CFLAGS"
16617 _LIBS="$LIBS"
16618 CFLAGS="$CFLAGS $PTHREAD_CFLAGS -DIN_CONFIGURE"
16619 LIBS="$LIBS $PTHREAD_LIBS"
16620 if test "$cross_compiling" = yes; then :
16621   { $as_echo "$as_me:${as_lineno-$LINENO}: result: maybe" >&5
16622 $as_echo "maybe" >&6; }
16623   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
16624 *** Skipping thread test program because of cross-compile build.
16625 *** Run the program in src/test/thread on the target machine.
16626 " >&5
16627 $as_echo "$as_me: WARNING:
16628 *** Skipping thread test program because of cross-compile build.
16629 *** Run the program in src/test/thread on the target machine.
16630 " >&2;}
16631 else
16632   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16633 /* end confdefs.h.  */
16634 #include "$srcdir/src/test/thread/thread_test.c"
16635 _ACEOF
16636 if ac_fn_c_try_run "$LINENO"; then :
16637   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16638 $as_echo "yes" >&6; }
16639 else
16640   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16641 $as_echo "no" >&6; }
16642   as_fn_error $? "thread test program failed
16643 This platform is not thread-safe.  Check the file 'config.log' or compile
16644 and run src/test/thread/thread_test for the exact reason.
16645 Use --disable-thread-safety to disable thread safety." "$LINENO" 5
16646 fi
16647 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16648   conftest.$ac_objext conftest.beam conftest.$ac_ext
16649 fi
16650
16651 CFLAGS="$_CFLAGS"
16652 LIBS="$_LIBS"
16653 else
16654 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** skipping thread test on Win32" >&5
16655 $as_echo "$as_me: WARNING: *** skipping thread test on Win32" >&2;}
16656 fi
16657 fi
16658
16659 # If compiler will take -Wl,--as-needed (or various platform-specific
16660 # spellings thereof) then add that to LDFLAGS.  This is much easier than
16661 # trying to filter LIBS to the minimum for each executable.
16662 # On (at least) some Red-Hat-derived systems, this switch breaks linking to
16663 # libreadline; therefore we postpone testing it until we know what library
16664 # dependencies readline has.  The test code will try to link with $LIBS.
16665 if test "$with_readline" = yes; then
16666   link_test_func=readline
16667 else
16668   link_test_func=exit
16669 fi
16670
16671 if test "$PORTNAME" = "darwin"; then
16672   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-dead_strip_dylibs" >&5
16673 $as_echo_n "checking whether $CC supports -Wl,-dead_strip_dylibs... " >&6; }
16674 if ${pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs+:} false; then :
16675   $as_echo_n "(cached) " >&6
16676 else
16677   pgac_save_LDFLAGS=$LDFLAGS
16678 LDFLAGS="$pgac_save_LDFLAGS -Wl,-dead_strip_dylibs"
16679 if test "$cross_compiling" = yes; then :
16680   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs="assuming no"
16681 else
16682   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16683 /* end confdefs.h.  */
16684 extern void $link_test_func (); void (*fptr) () = $link_test_func;
16685 int
16686 main ()
16687 {
16688
16689   ;
16690   return 0;
16691 }
16692 _ACEOF
16693 if ac_fn_c_try_run "$LINENO"; then :
16694   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=yes
16695 else
16696   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=no
16697 fi
16698 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16699   conftest.$ac_objext conftest.beam conftest.$ac_ext
16700 fi
16701
16702 LDFLAGS="$pgac_save_LDFLAGS"
16703 fi
16704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&5
16705 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&6; }
16706 if test x"$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" = x"yes"; then
16707   LDFLAGS="$LDFLAGS -Wl,-dead_strip_dylibs"
16708 fi
16709
16710 elif test "$PORTNAME" = "openbsd"; then
16711   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-Bdynamic" >&5
16712 $as_echo_n "checking whether $CC supports -Wl,-Bdynamic... " >&6; }
16713 if ${pgac_cv_prog_cc_ldflags__Wl__Bdynamic+:} false; then :
16714   $as_echo_n "(cached) " >&6
16715 else
16716   pgac_save_LDFLAGS=$LDFLAGS
16717 LDFLAGS="$pgac_save_LDFLAGS -Wl,-Bdynamic"
16718 if test "$cross_compiling" = yes; then :
16719   pgac_cv_prog_cc_ldflags__Wl__Bdynamic="assuming no"
16720 else
16721   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16722 /* end confdefs.h.  */
16723 extern void $link_test_func (); void (*fptr) () = $link_test_func;
16724 int
16725 main ()
16726 {
16727
16728   ;
16729   return 0;
16730 }
16731 _ACEOF
16732 if ac_fn_c_try_run "$LINENO"; then :
16733   pgac_cv_prog_cc_ldflags__Wl__Bdynamic=yes
16734 else
16735   pgac_cv_prog_cc_ldflags__Wl__Bdynamic=no
16736 fi
16737 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16738   conftest.$ac_objext conftest.beam conftest.$ac_ext
16739 fi
16740
16741 LDFLAGS="$pgac_save_LDFLAGS"
16742 fi
16743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&5
16744 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&6; }
16745 if test x"$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" = x"yes"; then
16746   LDFLAGS="$LDFLAGS -Wl,-Bdynamic"
16747 fi
16748
16749 else
16750   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,--as-needed" >&5
16751 $as_echo_n "checking whether $CC supports -Wl,--as-needed... " >&6; }
16752 if ${pgac_cv_prog_cc_ldflags__Wl___as_needed+:} false; then :
16753   $as_echo_n "(cached) " >&6
16754 else
16755   pgac_save_LDFLAGS=$LDFLAGS
16756 LDFLAGS="$pgac_save_LDFLAGS -Wl,--as-needed"
16757 if test "$cross_compiling" = yes; then :
16758   pgac_cv_prog_cc_ldflags__Wl___as_needed="assuming no"
16759 else
16760   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16761 /* end confdefs.h.  */
16762 extern void $link_test_func (); void (*fptr) () = $link_test_func;
16763 int
16764 main ()
16765 {
16766
16767   ;
16768   return 0;
16769 }
16770 _ACEOF
16771 if ac_fn_c_try_run "$LINENO"; then :
16772   pgac_cv_prog_cc_ldflags__Wl___as_needed=yes
16773 else
16774   pgac_cv_prog_cc_ldflags__Wl___as_needed=no
16775 fi
16776 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16777   conftest.$ac_objext conftest.beam conftest.$ac_ext
16778 fi
16779
16780 LDFLAGS="$pgac_save_LDFLAGS"
16781 fi
16782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl___as_needed" >&5
16783 $as_echo "$pgac_cv_prog_cc_ldflags__Wl___as_needed" >&6; }
16784 if test x"$pgac_cv_prog_cc_ldflags__Wl___as_needed" = x"yes"; then
16785   LDFLAGS="$LDFLAGS -Wl,--as-needed"
16786 fi
16787
16788 fi
16789
16790 # Create compiler version string
16791 if test x"$GCC" = x"yes" ; then
16792   cc_string=`${CC} --version | sed q`
16793   case $cc_string in [A-Za-z]*) ;; *) cc_string="GCC $cc_string";; esac
16794 elif test x"$SUN_STUDIO_CC" = x"yes" ; then
16795   cc_string=`${CC} -V 2>&1 | sed q`
16796 else
16797   cc_string=$CC
16798 fi
16799
16800
16801 cat >>confdefs.h <<_ACEOF
16802 #define PG_VERSION_STR "PostgreSQL $PG_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"
16803 _ACEOF
16804
16805
16806 # Supply a numeric version string for use by 3rd party add-ons
16807 # awk -F is a regex on some platforms, and not on others, so make "." a tab
16808 PG_VERSION_NUM="`echo "$PACKAGE_VERSION" | sed 's/[A-Za-z].*$//' |
16809 tr '.' '        ' |
16810 $AWK '{printf "%d%04d", $1, $2}'`"
16811
16812 cat >>confdefs.h <<_ACEOF
16813 #define PG_VERSION_NUM $PG_VERSION_NUM
16814 _ACEOF
16815
16816
16817
16818
16819 # Begin output steps
16820
16821 { $as_echo "$as_me:${as_lineno-$LINENO}: using compiler=$cc_string" >&5
16822 $as_echo "$as_me: using compiler=$cc_string" >&6;}
16823 { $as_echo "$as_me:${as_lineno-$LINENO}: using CFLAGS=$CFLAGS" >&5
16824 $as_echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
16825 { $as_echo "$as_me:${as_lineno-$LINENO}: using CPPFLAGS=$CPPFLAGS" >&5
16826 $as_echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
16827 { $as_echo "$as_me:${as_lineno-$LINENO}: using LDFLAGS=$LDFLAGS" >&5
16828 $as_echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
16829
16830 # prepare build tree if outside source tree
16831 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
16832 # Note 2: /bin/pwd might be better than shell's built-in at getting
16833 #         a symlink-free name.
16834 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
16835   vpath_build=no
16836 else
16837   vpath_build=yes
16838   if test "$no_create" != yes; then
16839     $as_echo_n "preparing build tree... " >&6
16840     pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
16841     $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
16842       || as_fn_error $? "failed" "$LINENO" 5
16843     { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16844 $as_echo "done" >&6; }
16845   fi
16846 fi
16847
16848
16849
16850 ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
16851
16852
16853 ac_config_links="$ac_config_links src/backend/port/dynloader.c:src/backend/port/dynloader/${template}.c src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION} src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION} src/include/dynloader.h:src/backend/port/dynloader/${template}.h src/include/pg_config_os.h:src/include/port/${template}.h src/Makefile.port:src/makefiles/Makefile.${template}"
16854
16855
16856 if test "$PORTNAME" = "win32"; then
16857 ac_config_commands="$ac_config_commands check_win32_symlinks"
16858
16859 fi
16860
16861 ac_config_headers="$ac_config_headers src/include/pg_config.h"
16862
16863
16864 ac_config_headers="$ac_config_headers src/include/pg_config_ext.h"
16865
16866
16867 ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
16868
16869
16870 cat >confcache <<\_ACEOF
16871 # This file is a shell script that caches the results of configure
16872 # tests run on this system so they can be shared between configure
16873 # scripts and configure runs, see configure's option --config-cache.
16874 # It is not useful on other systems.  If it contains results you don't
16875 # want to keep, you may remove or edit it.
16876 #
16877 # config.status only pays attention to the cache file if you give it
16878 # the --recheck option to rerun configure.
16879 #
16880 # `ac_cv_env_foo' variables (set or unset) will be overridden when
16881 # loading this file, other *unset* `ac_cv_foo' will be assigned the
16882 # following values.
16883
16884 _ACEOF
16885
16886 # The following way of writing the cache mishandles newlines in values,
16887 # but we know of no workaround that is simple, portable, and efficient.
16888 # So, we kill variables containing newlines.
16889 # Ultrix sh set writes to stderr and can't be redirected directly,
16890 # and sets the high bit in the cache file unless we assign to the vars.
16891 (
16892   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16893     eval ac_val=\$$ac_var
16894     case $ac_val in #(
16895     *${as_nl}*)
16896       case $ac_var in #(
16897       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16898 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
16899       esac
16900       case $ac_var in #(
16901       _ | IFS | as_nl) ;; #(
16902       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16903       *) { eval $ac_var=; unset $ac_var;} ;;
16904       esac ;;
16905     esac
16906   done
16907
16908   (set) 2>&1 |
16909     case $as_nl`(ac_space=' '; set) 2>&1` in #(
16910     *${as_nl}ac_space=\ *)
16911       # `set' does not quote correctly, so add quotes: double-quote
16912       # substitution turns \\\\ into \\, and sed turns \\ into \.
16913       sed -n \
16914         "s/'/'\\\\''/g;
16915           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
16916       ;; #(
16917     *)
16918       # `set' quotes correctly as required by POSIX, so do not add quotes.
16919       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
16920       ;;
16921     esac |
16922     sort
16923 ) |
16924   sed '
16925      /^ac_cv_env_/b end
16926      t clear
16927      :clear
16928      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16929      t end
16930      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16931      :end' >>confcache
16932 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16933   if test -w "$cache_file"; then
16934     if test "x$cache_file" != "x/dev/null"; then
16935       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16936 $as_echo "$as_me: updating cache $cache_file" >&6;}
16937       if test ! -f "$cache_file" || test -h "$cache_file"; then
16938         cat confcache >"$cache_file"
16939       else
16940         case $cache_file in #(
16941         */* | ?:*)
16942           mv -f confcache "$cache_file"$$ &&
16943           mv -f "$cache_file"$$ "$cache_file" ;; #(
16944         *)
16945           mv -f confcache "$cache_file" ;;
16946         esac
16947       fi
16948     fi
16949   else
16950     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16951 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
16952   fi
16953 fi
16954 rm -f confcache
16955
16956 test "x$prefix" = xNONE && prefix=$ac_default_prefix
16957 # Let make expand exec_prefix.
16958 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16959
16960 DEFS=-DHAVE_CONFIG_H
16961
16962 ac_libobjs=
16963 ac_ltlibobjs=
16964 U=
16965 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16966   # 1. Remove the extension, and $U if already installed.
16967   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
16968   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
16969   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
16970   #    will be set to the directory where LIBOBJS objects are built.
16971   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16972   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
16973 done
16974 LIBOBJS=$ac_libobjs
16975
16976 LTLIBOBJS=$ac_ltlibobjs
16977
16978
16979
16980
16981 : "${CONFIG_STATUS=./config.status}"
16982 ac_write_fail=0
16983 ac_clean_files_save=$ac_clean_files
16984 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
16985 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16986 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16987 as_write_fail=0
16988 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
16989 #! $SHELL
16990 # Generated by $as_me.
16991 # Run this file to recreate the current configuration.
16992 # Compiler output produced by configure, useful for debugging
16993 # configure, is in config.log if it exists.
16994
16995 debug=false
16996 ac_cs_recheck=false
16997 ac_cs_silent=false
16998
16999 SHELL=\${CONFIG_SHELL-$SHELL}
17000 export SHELL
17001 _ASEOF
17002 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17003 ## -------------------- ##
17004 ## M4sh Initialization. ##
17005 ## -------------------- ##
17006
17007 # Be more Bourne compatible
17008 DUALCASE=1; export DUALCASE # for MKS sh
17009 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
17010   emulate sh
17011   NULLCMD=:
17012   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
17013   # is contrary to our usage.  Disable this feature.
17014   alias -g '${1+"$@"}'='"$@"'
17015   setopt NO_GLOB_SUBST
17016 else
17017   case `(set -o) 2>/dev/null` in #(
17018   *posix*) :
17019     set -o posix ;; #(
17020   *) :
17021      ;;
17022 esac
17023 fi
17024
17025
17026 as_nl='
17027 '
17028 export as_nl
17029 # Printing a long string crashes Solaris 7 /usr/bin/printf.
17030 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17031 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17032 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17033 # Prefer a ksh shell builtin over an external printf program on Solaris,
17034 # but without wasting forks for bash or zsh.
17035 if test -z "$BASH_VERSION$ZSH_VERSION" \
17036     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17037   as_echo='print -r --'
17038   as_echo_n='print -rn --'
17039 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17040   as_echo='printf %s\n'
17041   as_echo_n='printf %s'
17042 else
17043   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17044     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17045     as_echo_n='/usr/ucb/echo -n'
17046   else
17047     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17048     as_echo_n_body='eval
17049       arg=$1;
17050       case $arg in #(
17051       *"$as_nl"*)
17052         expr "X$arg" : "X\\(.*\\)$as_nl";
17053         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17054       esac;
17055       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17056     '
17057     export as_echo_n_body
17058     as_echo_n='sh -c $as_echo_n_body as_echo'
17059   fi
17060   export as_echo_body
17061   as_echo='sh -c $as_echo_body as_echo'
17062 fi
17063
17064 # The user is always right.
17065 if test "${PATH_SEPARATOR+set}" != set; then
17066   PATH_SEPARATOR=:
17067   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17068     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17069       PATH_SEPARATOR=';'
17070   }
17071 fi
17072
17073
17074 # IFS
17075 # We need space, tab and new line, in precisely that order.  Quoting is
17076 # there to prevent editors from complaining about space-tab.
17077 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
17078 # splitting by setting IFS to empty value.)
17079 IFS=" ""        $as_nl"
17080
17081 # Find who we are.  Look in the path if we contain no directory separator.
17082 as_myself=
17083 case $0 in #((
17084   *[\\/]* ) as_myself=$0 ;;
17085   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17086 for as_dir in $PATH
17087 do
17088   IFS=$as_save_IFS
17089   test -z "$as_dir" && as_dir=.
17090     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17091   done
17092 IFS=$as_save_IFS
17093
17094      ;;
17095 esac
17096 # We did not find ourselves, most probably we were run as `sh COMMAND'
17097 # in which case we are not to be found in the path.
17098 if test "x$as_myself" = x; then
17099   as_myself=$0
17100 fi
17101 if test ! -f "$as_myself"; then
17102   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17103   exit 1
17104 fi
17105
17106 # Unset variables that we do not need and which cause bugs (e.g. in
17107 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
17108 # suppresses any "Segmentation fault" message there.  '((' could
17109 # trigger a bug in pdksh 5.2.14.
17110 for as_var in BASH_ENV ENV MAIL MAILPATH
17111 do eval test x\${$as_var+set} = xset \
17112   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
17113 done
17114 PS1='$ '
17115 PS2='> '
17116 PS4='+ '
17117
17118 # NLS nuisances.
17119 LC_ALL=C
17120 export LC_ALL
17121 LANGUAGE=C
17122 export LANGUAGE
17123
17124 # CDPATH.
17125 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17126
17127
17128 # as_fn_error STATUS ERROR [LINENO LOG_FD]
17129 # ----------------------------------------
17130 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17131 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
17132 # script with STATUS, using 1 if that was 0.
17133 as_fn_error ()
17134 {
17135   as_status=$1; test $as_status -eq 0 && as_status=1
17136   if test "$4"; then
17137     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17138     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
17139   fi
17140   $as_echo "$as_me: error: $2" >&2
17141   as_fn_exit $as_status
17142 } # as_fn_error
17143
17144
17145 # as_fn_set_status STATUS
17146 # -----------------------
17147 # Set $? to STATUS, without forking.
17148 as_fn_set_status ()
17149 {
17150   return $1
17151 } # as_fn_set_status
17152
17153 # as_fn_exit STATUS
17154 # -----------------
17155 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17156 as_fn_exit ()
17157 {
17158   set +e
17159   as_fn_set_status $1
17160   exit $1
17161 } # as_fn_exit
17162
17163 # as_fn_unset VAR
17164 # ---------------
17165 # Portably unset VAR.
17166 as_fn_unset ()
17167 {
17168   { eval $1=; unset $1;}
17169 }
17170 as_unset=as_fn_unset
17171 # as_fn_append VAR VALUE
17172 # ----------------------
17173 # Append the text in VALUE to the end of the definition contained in VAR. Take
17174 # advantage of any shell optimizations that allow amortized linear growth over
17175 # repeated appends, instead of the typical quadratic growth present in naive
17176 # implementations.
17177 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
17178   eval 'as_fn_append ()
17179   {
17180     eval $1+=\$2
17181   }'
17182 else
17183   as_fn_append ()
17184   {
17185     eval $1=\$$1\$2
17186   }
17187 fi # as_fn_append
17188
17189 # as_fn_arith ARG...
17190 # ------------------
17191 # Perform arithmetic evaluation on the ARGs, and store the result in the
17192 # global $as_val. Take advantage of shells that can avoid forks. The arguments
17193 # must be portable across $(()) and expr.
17194 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
17195   eval 'as_fn_arith ()
17196   {
17197     as_val=$(( $* ))
17198   }'
17199 else
17200   as_fn_arith ()
17201   {
17202     as_val=`expr "$@" || test $? -eq 1`
17203   }
17204 fi # as_fn_arith
17205
17206
17207 if expr a : '\(a\)' >/dev/null 2>&1 &&
17208    test "X`expr 00001 : '.*\(...\)'`" = X001; then
17209   as_expr=expr
17210 else
17211   as_expr=false
17212 fi
17213
17214 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17215   as_basename=basename
17216 else
17217   as_basename=false
17218 fi
17219
17220 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17221   as_dirname=dirname
17222 else
17223   as_dirname=false
17224 fi
17225
17226 as_me=`$as_basename -- "$0" ||
17227 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17228          X"$0" : 'X\(//\)$' \| \
17229          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
17230 $as_echo X/"$0" |
17231     sed '/^.*\/\([^/][^/]*\)\/*$/{
17232             s//\1/
17233             q
17234           }
17235           /^X\/\(\/\/\)$/{
17236             s//\1/
17237             q
17238           }
17239           /^X\/\(\/\).*/{
17240             s//\1/
17241             q
17242           }
17243           s/.*/./; q'`
17244
17245 # Avoid depending upon Character Ranges.
17246 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17247 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17248 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17249 as_cr_digits='0123456789'
17250 as_cr_alnum=$as_cr_Letters$as_cr_digits
17251
17252 ECHO_C= ECHO_N= ECHO_T=
17253 case `echo -n x` in #(((((
17254 -n*)
17255   case `echo 'xy\c'` in
17256   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
17257   xy)  ECHO_C='\c';;
17258   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
17259        ECHO_T=' ';;
17260   esac;;
17261 *)
17262   ECHO_N='-n';;
17263 esac
17264
17265 rm -f conf$$ conf$$.exe conf$$.file
17266 if test -d conf$$.dir; then
17267   rm -f conf$$.dir/conf$$.file
17268 else
17269   rm -f conf$$.dir
17270   mkdir conf$$.dir 2>/dev/null
17271 fi
17272 if (echo >conf$$.file) 2>/dev/null; then
17273   if ln -s conf$$.file conf$$ 2>/dev/null; then
17274     as_ln_s='ln -s'
17275     # ... but there are two gotchas:
17276     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17277     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
17278     # In both cases, we have to default to `cp -pR'.
17279     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
17280       as_ln_s='cp -pR'
17281   elif ln conf$$.file conf$$ 2>/dev/null; then
17282     as_ln_s=ln
17283   else
17284     as_ln_s='cp -pR'
17285   fi
17286 else
17287   as_ln_s='cp -pR'
17288 fi
17289 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17290 rmdir conf$$.dir 2>/dev/null
17291
17292
17293 # as_fn_mkdir_p
17294 # -------------
17295 # Create "$as_dir" as a directory, including parents if necessary.
17296 as_fn_mkdir_p ()
17297 {
17298
17299   case $as_dir in #(
17300   -*) as_dir=./$as_dir;;
17301   esac
17302   test -d "$as_dir" || eval $as_mkdir_p || {
17303     as_dirs=
17304     while :; do
17305       case $as_dir in #(
17306       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17307       *) as_qdir=$as_dir;;
17308       esac
17309       as_dirs="'$as_qdir' $as_dirs"
17310       as_dir=`$as_dirname -- "$as_dir" ||
17311 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17312          X"$as_dir" : 'X\(//\)[^/]' \| \
17313          X"$as_dir" : 'X\(//\)$' \| \
17314          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17315 $as_echo X"$as_dir" |
17316     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17317             s//\1/
17318             q
17319           }
17320           /^X\(\/\/\)[^/].*/{
17321             s//\1/
17322             q
17323           }
17324           /^X\(\/\/\)$/{
17325             s//\1/
17326             q
17327           }
17328           /^X\(\/\).*/{
17329             s//\1/
17330             q
17331           }
17332           s/.*/./; q'`
17333       test -d "$as_dir" && break
17334     done
17335     test -z "$as_dirs" || eval "mkdir $as_dirs"
17336   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
17337
17338
17339 } # as_fn_mkdir_p
17340 if mkdir -p . 2>/dev/null; then
17341   as_mkdir_p='mkdir -p "$as_dir"'
17342 else
17343   test -d ./-p && rmdir ./-p
17344   as_mkdir_p=false
17345 fi
17346
17347
17348 # as_fn_executable_p FILE
17349 # -----------------------
17350 # Test if FILE is an executable regular file.
17351 as_fn_executable_p ()
17352 {
17353   test -f "$1" && test -x "$1"
17354 } # as_fn_executable_p
17355 as_test_x='test -x'
17356 as_executable_p=as_fn_executable_p
17357
17358 # Sed expression to map a string onto a valid CPP name.
17359 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
17360
17361 # Sed expression to map a string onto a valid variable name.
17362 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
17363
17364
17365 exec 6>&1
17366 ## ----------------------------------- ##
17367 ## Main body of $CONFIG_STATUS script. ##
17368 ## ----------------------------------- ##
17369 _ASEOF
17370 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
17371
17372 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17373 # Save the log message, to keep $0 and so on meaningful, and to
17374 # report actual input values of CONFIG_FILES etc. instead of their
17375 # values after options handling.
17376 ac_log="
17377 This file was extended by PostgreSQL $as_me 11devel, which was
17378 generated by GNU Autoconf 2.69.  Invocation command line was
17379
17380   CONFIG_FILES    = $CONFIG_FILES
17381   CONFIG_HEADERS  = $CONFIG_HEADERS
17382   CONFIG_LINKS    = $CONFIG_LINKS
17383   CONFIG_COMMANDS = $CONFIG_COMMANDS
17384   $ $0 $@
17385
17386 on `(hostname || uname -n) 2>/dev/null | sed 1q`
17387 "
17388
17389 _ACEOF
17390
17391 case $ac_config_files in *"
17392 "*) set x $ac_config_files; shift; ac_config_files=$*;;
17393 esac
17394
17395 case $ac_config_headers in *"
17396 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17397 esac
17398
17399
17400 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17401 # Files that config.status was made for.
17402 config_files="$ac_config_files"
17403 config_headers="$ac_config_headers"
17404 config_links="$ac_config_links"
17405 config_commands="$ac_config_commands"
17406
17407 _ACEOF
17408
17409 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17410 ac_cs_usage="\
17411 \`$as_me' instantiates files and other configuration actions
17412 from templates according to the current configuration.  Unless the files
17413 and actions are specified as TAGs, all are instantiated by default.
17414
17415 Usage: $0 [OPTION]... [TAG]...
17416
17417   -h, --help       print this help, then exit
17418   -V, --version    print version number and configuration settings, then exit
17419       --config     print configuration, then exit
17420   -q, --quiet, --silent
17421                    do not print progress messages
17422   -d, --debug      don't remove temporary files
17423       --recheck    update $as_me by reconfiguring in the same conditions
17424       --file=FILE[:TEMPLATE]
17425                    instantiate the configuration file FILE
17426       --header=FILE[:TEMPLATE]
17427                    instantiate the configuration header FILE
17428
17429 Configuration files:
17430 $config_files
17431
17432 Configuration headers:
17433 $config_headers
17434
17435 Configuration links:
17436 $config_links
17437
17438 Configuration commands:
17439 $config_commands
17440
17441 Report bugs to <pgsql-bugs@postgresql.org>."
17442
17443 _ACEOF
17444 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17445 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
17446 ac_cs_version="\\
17447 PostgreSQL config.status 11devel
17448 configured by $0, generated by GNU Autoconf 2.69,
17449   with options \\"\$ac_cs_config\\"
17450
17451 Copyright (C) 2012 Free Software Foundation, Inc.
17452 This config.status script is free software; the Free Software Foundation
17453 gives unlimited permission to copy, distribute and modify it."
17454
17455 ac_pwd='$ac_pwd'
17456 srcdir='$srcdir'
17457 INSTALL='$INSTALL'
17458 MKDIR_P='$MKDIR_P'
17459 AWK='$AWK'
17460 test -n "\$AWK" || AWK=awk
17461 _ACEOF
17462
17463 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17464 # The default lists apply if the user does not specify any file.
17465 ac_need_defaults=:
17466 while test $# != 0
17467 do
17468   case $1 in
17469   --*=?*)
17470     ac_option=`expr "X$1" : 'X\([^=]*\)='`
17471     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
17472     ac_shift=:
17473     ;;
17474   --*=)
17475     ac_option=`expr "X$1" : 'X\([^=]*\)='`
17476     ac_optarg=
17477     ac_shift=:
17478     ;;
17479   *)
17480     ac_option=$1
17481     ac_optarg=$2
17482     ac_shift=shift
17483     ;;
17484   esac
17485
17486   case $ac_option in
17487   # Handling of the options.
17488   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17489     ac_cs_recheck=: ;;
17490   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
17491     $as_echo "$ac_cs_version"; exit ;;
17492   --config | --confi | --conf | --con | --co | --c )
17493     $as_echo "$ac_cs_config"; exit ;;
17494   --debug | --debu | --deb | --de | --d | -d )
17495     debug=: ;;
17496   --file | --fil | --fi | --f )
17497     $ac_shift
17498     case $ac_optarg in
17499     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17500     '') as_fn_error $? "missing file argument" ;;
17501     esac
17502     as_fn_append CONFIG_FILES " '$ac_optarg'"
17503     ac_need_defaults=false;;
17504   --header | --heade | --head | --hea )
17505     $ac_shift
17506     case $ac_optarg in
17507     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17508     esac
17509     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
17510     ac_need_defaults=false;;
17511   --he | --h)
17512     # Conflict between --help and --header
17513     as_fn_error $? "ambiguous option: \`$1'
17514 Try \`$0 --help' for more information.";;
17515   --help | --hel | -h )
17516     $as_echo "$ac_cs_usage"; exit ;;
17517   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17518   | -silent | --silent | --silen | --sile | --sil | --si | --s)
17519     ac_cs_silent=: ;;
17520
17521   # This is an error.
17522   -*) as_fn_error $? "unrecognized option: \`$1'
17523 Try \`$0 --help' for more information." ;;
17524
17525   *) as_fn_append ac_config_targets " $1"
17526      ac_need_defaults=false ;;
17527
17528   esac
17529   shift
17530 done
17531
17532 ac_configure_extra_args=
17533
17534 if $ac_cs_silent; then
17535   exec 6>/dev/null
17536   ac_configure_extra_args="$ac_configure_extra_args --silent"
17537 fi
17538
17539 _ACEOF
17540 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17541 if \$ac_cs_recheck; then
17542   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
17543   shift
17544   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17545   CONFIG_SHELL='$SHELL'
17546   export CONFIG_SHELL
17547   exec "\$@"
17548 fi
17549
17550 _ACEOF
17551 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17552 exec 5>>config.log
17553 {
17554   echo
17555   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17556 ## Running $as_me. ##
17557 _ASBOX
17558   $as_echo "$ac_log"
17559 } >&5
17560
17561 _ACEOF
17562 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17563 _ACEOF
17564
17565 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17566
17567 # Handling of arguments.
17568 for ac_config_target in $ac_config_targets
17569 do
17570   case $ac_config_target in
17571     "src/backend/port/tas.s") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
17572     "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
17573     "src/Makefile.global") CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
17574     "src/backend/port/dynloader.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/dynloader.c:src/backend/port/dynloader/${template}.c" ;;
17575     "src/backend/port/pg_sema.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
17576     "src/backend/port/pg_shmem.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
17577     "src/include/dynloader.h") CONFIG_LINKS="$CONFIG_LINKS src/include/dynloader.h:src/backend/port/dynloader/${template}.h" ;;
17578     "src/include/pg_config_os.h") CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
17579     "src/Makefile.port") CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
17580     "check_win32_symlinks") CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
17581     "src/include/pg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
17582     "src/include/pg_config_ext.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config_ext.h" ;;
17583     "src/interfaces/ecpg/include/ecpg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
17584
17585   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
17586   esac
17587 done
17588
17589
17590 # If the user did not use the arguments to specify the items to instantiate,
17591 # then the envvar interface is used.  Set only those that are not.
17592 # We use the long form for the default assignment because of an extremely
17593 # bizarre bug on SunOS 4.1.3.
17594 if $ac_need_defaults; then
17595   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17596   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17597   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
17598   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
17599 fi
17600
17601 # Have a temporary directory for convenience.  Make it in the build tree
17602 # simply because there is no reason against having it here, and in addition,
17603 # creating and moving files from /tmp can sometimes cause problems.
17604 # Hook for its removal unless debugging.
17605 # Note that there is a small window in which the directory will not be cleaned:
17606 # after its creation but before its name has been assigned to `$tmp'.
17607 $debug ||
17608 {
17609   tmp= ac_tmp=
17610   trap 'exit_status=$?
17611   : "${ac_tmp:=$tmp}"
17612   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
17613 ' 0
17614   trap 'as_fn_exit 1' 1 2 13 15
17615 }
17616 # Create a (secure) tmp directory for tmp files.
17617
17618 {
17619   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
17620   test -d "$tmp"
17621 }  ||
17622 {
17623   tmp=./conf$$-$RANDOM
17624   (umask 077 && mkdir "$tmp")
17625 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
17626 ac_tmp=$tmp
17627
17628 # Set up the scripts for CONFIG_FILES section.
17629 # No need to generate them if there are no CONFIG_FILES.
17630 # This happens for instance with `./config.status config.h'.
17631 if test -n "$CONFIG_FILES"; then
17632
17633
17634 ac_cr=`echo X | tr X '\015'`
17635 # On cygwin, bash can eat \r inside `` if the user requested igncr.
17636 # But we know of no other shell where ac_cr would be empty at this
17637 # point, so we can use a bashism as a fallback.
17638 if test "x$ac_cr" = x; then
17639   eval ac_cr=\$\'\\r\'
17640 fi
17641 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17642 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
17643   ac_cs_awk_cr='\\r'
17644 else
17645   ac_cs_awk_cr=$ac_cr
17646 fi
17647
17648 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
17649 _ACEOF
17650
17651
17652 {
17653   echo "cat >conf$$subs.awk <<_ACEOF" &&
17654   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17655   echo "_ACEOF"
17656 } >conf$$subs.sh ||
17657   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17658 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
17659 ac_delim='%!_!# '
17660 for ac_last_try in false false false false false :; do
17661   . ./conf$$subs.sh ||
17662     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17663
17664   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17665   if test $ac_delim_n = $ac_delim_num; then
17666     break
17667   elif $ac_last_try; then
17668     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17669   else
17670     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17671   fi
17672 done
17673 rm -f conf$$subs.sh
17674
17675 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17676 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
17677 _ACEOF
17678 sed -n '
17679 h
17680 s/^/S["/; s/!.*/"]=/
17681 p
17682 g
17683 s/^[^!]*!//
17684 :repl
17685 t repl
17686 s/'"$ac_delim"'$//
17687 t delim
17688 :nl
17689 h
17690 s/\(.\{148\}\)..*/\1/
17691 t more1
17692 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17693 p
17694 n
17695 b repl
17696 :more1
17697 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17698 p
17699 g
17700 s/.\{148\}//
17701 t nl
17702 :delim
17703 h
17704 s/\(.\{148\}\)..*/\1/
17705 t more2
17706 s/["\\]/\\&/g; s/^/"/; s/$/"/
17707 p
17708 b
17709 :more2
17710 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17711 p
17712 g
17713 s/.\{148\}//
17714 t delim
17715 ' <conf$$subs.awk | sed '
17716 /^[^""]/{
17717   N
17718   s/\n//
17719 }
17720 ' >>$CONFIG_STATUS || ac_write_fail=1
17721 rm -f conf$$subs.awk
17722 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17723 _ACAWK
17724 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
17725   for (key in S) S_is_set[key] = 1
17726   FS = "\a"
17727
17728 }
17729 {
17730   line = $ 0
17731   nfields = split(line, field, "@")
17732   substed = 0
17733   len = length(field[1])
17734   for (i = 2; i < nfields; i++) {
17735     key = field[i]
17736     keylen = length(key)
17737     if (S_is_set[key]) {
17738       value = S[key]
17739       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17740       len += length(value) + length(field[++i])
17741       substed = 1
17742     } else
17743       len += 1 + keylen
17744   }
17745
17746   print line
17747 }
17748
17749 _ACAWK
17750 _ACEOF
17751 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17752 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17753   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17754 else
17755   cat
17756 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
17757   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
17758 _ACEOF
17759
17760 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17761 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
17762 # trailing colons and then remove the whole line if VPATH becomes empty
17763 # (actually we leave an empty line to preserve line numbers).
17764 if test "x$srcdir" = x.; then
17765   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
17766 h
17767 s///
17768 s/^/:/
17769 s/[      ]*$/:/
17770 s/:\$(srcdir):/:/g
17771 s/:\${srcdir}:/:/g
17772 s/:@srcdir@:/:/g
17773 s/^:*//
17774 s/:*$//
17775 x
17776 s/\(=[   ]*\).*/\1/
17777 G
17778 s/\n//
17779 s/^[^=]*=[       ]*$//
17780 }'
17781 fi
17782
17783 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17784 fi # test -n "$CONFIG_FILES"
17785
17786 # Set up the scripts for CONFIG_HEADERS section.
17787 # No need to generate them if there are no CONFIG_HEADERS.
17788 # This happens for instance with `./config.status Makefile'.
17789 if test -n "$CONFIG_HEADERS"; then
17790 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
17791 BEGIN {
17792 _ACEOF
17793
17794 # Transform confdefs.h into an awk script `defines.awk', embedded as
17795 # here-document in config.status, that substitutes the proper values into
17796 # config.h.in to produce config.h.
17797
17798 # Create a delimiter string that does not exist in confdefs.h, to ease
17799 # handling of long lines.
17800 ac_delim='%!_!# '
17801 for ac_last_try in false false :; do
17802   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17803   if test -z "$ac_tt"; then
17804     break
17805   elif $ac_last_try; then
17806     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
17807   else
17808     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17809   fi
17810 done
17811
17812 # For the awk script, D is an array of macro values keyed by name,
17813 # likewise P contains macro parameters if any.  Preserve backslash
17814 # newline sequences.
17815
17816 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17817 sed -n '
17818 s/.\{148\}/&'"$ac_delim"'/g
17819 t rset
17820 :rset
17821 s/^[     ]*#[    ]*define[       ][      ]*/ /
17822 t def
17823 d
17824 :def
17825 s/\\$//
17826 t bsnl
17827 s/["\\]/\\&/g
17828 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
17829 D["\1"]=" \3"/p
17830 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
17831 d
17832 :bsnl
17833 s/["\\]/\\&/g
17834 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
17835 D["\1"]=" \3\\\\\\n"\\/p
17836 t cont
17837 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17838 t cont
17839 d
17840 :cont
17841 n
17842 s/.\{148\}/&'"$ac_delim"'/g
17843 t clear
17844 :clear
17845 s/\\$//
17846 t bsnlc
17847 s/["\\]/\\&/g; s/^/"/; s/$/"/p
17848 d
17849 :bsnlc
17850 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17851 b cont
17852 ' <confdefs.h | sed '
17853 s/'"$ac_delim"'/"\\\
17854 "/g' >>$CONFIG_STATUS || ac_write_fail=1
17855
17856 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17857   for (key in D) D_is_set[key] = 1
17858   FS = "\a"
17859 }
17860 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17861   line = \$ 0
17862   split(line, arg, " ")
17863   if (arg[1] == "#") {
17864     defundef = arg[2]
17865     mac1 = arg[3]
17866   } else {
17867     defundef = substr(arg[1], 2)
17868     mac1 = arg[2]
17869   }
17870   split(mac1, mac2, "(") #)
17871   macro = mac2[1]
17872   prefix = substr(line, 1, index(line, defundef) - 1)
17873   if (D_is_set[macro]) {
17874     # Preserve the white space surrounding the "#".
17875     print prefix "define", macro P[macro] D[macro]
17876     next
17877   } else {
17878     # Replace #undef with comments.  This is necessary, for example,
17879     # in the case of _POSIX_SOURCE, which is predefined and required
17880     # on some systems where configure will not decide to define it.
17881     if (defundef == "undef") {
17882       print "/*", prefix defundef, macro, "*/"
17883       next
17884     }
17885   }
17886 }
17887 { print }
17888 _ACAWK
17889 _ACEOF
17890 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17891   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
17892 fi # test -n "$CONFIG_HEADERS"
17893
17894
17895 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS  :L $CONFIG_LINKS  :C $CONFIG_COMMANDS"
17896 shift
17897 for ac_tag
17898 do
17899   case $ac_tag in
17900   :[FHLC]) ac_mode=$ac_tag; continue;;
17901   esac
17902   case $ac_mode$ac_tag in
17903   :[FHL]*:*);;
17904   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
17905   :[FH]-) ac_tag=-:-;;
17906   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17907   esac
17908   ac_save_IFS=$IFS
17909   IFS=:
17910   set x $ac_tag
17911   IFS=$ac_save_IFS
17912   shift
17913   ac_file=$1
17914   shift
17915
17916   case $ac_mode in
17917   :L) ac_source=$1;;
17918   :[FH])
17919     ac_file_inputs=
17920     for ac_f
17921     do
17922       case $ac_f in
17923       -) ac_f="$ac_tmp/stdin";;
17924       *) # Look for the file first in the build tree, then in the source tree
17925          # (if the path is not absolute).  The absolute path cannot be DOS-style,
17926          # because $ac_f cannot contain `:'.
17927          test -f "$ac_f" ||
17928            case $ac_f in
17929            [\\/$]*) false;;
17930            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17931            esac ||
17932            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
17933       esac
17934       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17935       as_fn_append ac_file_inputs " '$ac_f'"
17936     done
17937
17938     # Let's still pretend it is `configure' which instantiates (i.e., don't
17939     # use $as_me), people would be surprised to read:
17940     #    /* config.h.  Generated by config.status.  */
17941     configure_input='Generated from '`
17942           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17943         `' by configure.'
17944     if test x"$ac_file" != x-; then
17945       configure_input="$ac_file.  $configure_input"
17946       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17947 $as_echo "$as_me: creating $ac_file" >&6;}
17948     fi
17949     # Neutralize special characters interpreted by sed in replacement strings.
17950     case $configure_input in #(
17951     *\&* | *\|* | *\\* )
17952        ac_sed_conf_input=`$as_echo "$configure_input" |
17953        sed 's/[\\\\&|]/\\\\&/g'`;; #(
17954     *) ac_sed_conf_input=$configure_input;;
17955     esac
17956
17957     case $ac_tag in
17958     *:-:* | *:-) cat >"$ac_tmp/stdin" \
17959       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
17960     esac
17961     ;;
17962   esac
17963
17964   ac_dir=`$as_dirname -- "$ac_file" ||
17965 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17966          X"$ac_file" : 'X\(//\)[^/]' \| \
17967          X"$ac_file" : 'X\(//\)$' \| \
17968          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
17969 $as_echo X"$ac_file" |
17970     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17971             s//\1/
17972             q
17973           }
17974           /^X\(\/\/\)[^/].*/{
17975             s//\1/
17976             q
17977           }
17978           /^X\(\/\/\)$/{
17979             s//\1/
17980             q
17981           }
17982           /^X\(\/\).*/{
17983             s//\1/
17984             q
17985           }
17986           s/.*/./; q'`
17987   as_dir="$ac_dir"; as_fn_mkdir_p
17988   ac_builddir=.
17989
17990 case "$ac_dir" in
17991 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17992 *)
17993   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
17994   # A ".." for each directory in $ac_dir_suffix.
17995   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
17996   case $ac_top_builddir_sub in
17997   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17998   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17999   esac ;;
18000 esac
18001 ac_abs_top_builddir=$ac_pwd
18002 ac_abs_builddir=$ac_pwd$ac_dir_suffix
18003 # for backward compatibility:
18004 ac_top_builddir=$ac_top_build_prefix
18005
18006 case $srcdir in
18007   .)  # We are building in place.
18008     ac_srcdir=.
18009     ac_top_srcdir=$ac_top_builddir_sub
18010     ac_abs_top_srcdir=$ac_pwd ;;
18011   [\\/]* | ?:[\\/]* )  # Absolute name.
18012     ac_srcdir=$srcdir$ac_dir_suffix;
18013     ac_top_srcdir=$srcdir
18014     ac_abs_top_srcdir=$srcdir ;;
18015   *) # Relative name.
18016     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18017     ac_top_srcdir=$ac_top_build_prefix$srcdir
18018     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
18019 esac
18020 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
18021
18022
18023   case $ac_mode in
18024   :F)
18025   #
18026   # CONFIG_FILE
18027   #
18028
18029   case $INSTALL in
18030   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
18031   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
18032   esac
18033   ac_MKDIR_P=$MKDIR_P
18034   case $MKDIR_P in
18035   [\\/$]* | ?:[\\/]* ) ;;
18036   */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
18037   esac
18038 _ACEOF
18039
18040 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18041 # If the template does not know about datarootdir, expand it.
18042 # FIXME: This hack should be removed a few years after 2.60.
18043 ac_datarootdir_hack=; ac_datarootdir_seen=
18044 ac_sed_dataroot='
18045 /datarootdir/ {
18046   p
18047   q
18048 }
18049 /@datadir@/p
18050 /@docdir@/p
18051 /@infodir@/p
18052 /@localedir@/p
18053 /@mandir@/p'
18054 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
18055 *datarootdir*) ac_datarootdir_seen=yes;;
18056 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
18057   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18058 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
18059 _ACEOF
18060 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18061   ac_datarootdir_hack='
18062   s&@datadir@&$datadir&g
18063   s&@docdir@&$docdir&g
18064   s&@infodir@&$infodir&g
18065   s&@localedir@&$localedir&g
18066   s&@mandir@&$mandir&g
18067   s&\\\${datarootdir}&$datarootdir&g' ;;
18068 esac
18069 _ACEOF
18070
18071 # Neutralize VPATH when `$srcdir' = `.'.
18072 # Shell code in configure.ac might set extrasub.
18073 # FIXME: do we really want to maintain this feature?
18074 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18075 ac_sed_extra="$ac_vpsub
18076 $extrasub
18077 _ACEOF
18078 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18079 :t
18080 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
18081 s|@configure_input@|$ac_sed_conf_input|;t t
18082 s&@top_builddir@&$ac_top_builddir_sub&;t t
18083 s&@top_build_prefix@&$ac_top_build_prefix&;t t
18084 s&@srcdir@&$ac_srcdir&;t t
18085 s&@abs_srcdir@&$ac_abs_srcdir&;t t
18086 s&@top_srcdir@&$ac_top_srcdir&;t t
18087 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18088 s&@builddir@&$ac_builddir&;t t
18089 s&@abs_builddir@&$ac_abs_builddir&;t t
18090 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18091 s&@INSTALL@&$ac_INSTALL&;t t
18092 s&@MKDIR_P@&$ac_MKDIR_P&;t t
18093 $ac_datarootdir_hack
18094 "
18095 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
18096   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
18097
18098 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
18099   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
18100   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
18101       "$ac_tmp/out"`; test -z "$ac_out"; } &&
18102   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
18103 which seems to be undefined.  Please make sure it is defined" >&5
18104 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
18105 which seems to be undefined.  Please make sure it is defined" >&2;}
18106
18107   rm -f "$ac_tmp/stdin"
18108   case $ac_file in
18109   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
18110   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
18111   esac \
18112   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
18113  ;;
18114   :H)
18115   #
18116   # CONFIG_HEADER
18117   #
18118   if test x"$ac_file" != x-; then
18119     {
18120       $as_echo "/* $configure_input  */" \
18121       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
18122     } >"$ac_tmp/config.h" \
18123       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
18124     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
18125       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18126 $as_echo "$as_me: $ac_file is unchanged" >&6;}
18127     else
18128       rm -f "$ac_file"
18129       mv "$ac_tmp/config.h" "$ac_file" \
18130         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
18131     fi
18132   else
18133     $as_echo "/* $configure_input  */" \
18134       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
18135       || as_fn_error $? "could not create -" "$LINENO" 5
18136   fi
18137  ;;
18138   :L)
18139   #
18140   # CONFIG_LINK
18141   #
18142
18143   if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
18144     :
18145   else
18146     # Prefer the file from the source tree if names are identical.
18147     if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
18148       ac_source=$srcdir/$ac_source
18149     fi
18150
18151     { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
18152 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
18153
18154     if test ! -r "$ac_source"; then
18155       as_fn_error $? "$ac_source: file not found" "$LINENO" 5
18156     fi
18157     rm -f "$ac_file"
18158
18159     # Try a relative symlink, then a hard link, then a copy.
18160     case $ac_source in
18161     [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
18162         *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
18163     esac
18164     ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
18165       ln "$ac_source" "$ac_file" 2>/dev/null ||
18166       cp -p "$ac_source" "$ac_file" ||
18167       as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
18168   fi
18169  ;;
18170   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
18171 $as_echo "$as_me: executing $ac_file commands" >&6;}
18172  ;;
18173   esac
18174
18175
18176   case $ac_file$ac_mode in
18177     "check_win32_symlinks":C)
18178 # Links sometimes fail undetected on Mingw -
18179 # so here we detect it and warn the user
18180 for FILE in $CONFIG_LINKS
18181  do
18182         # test -e works for symlinks in the MinGW console
18183         test -e `expr "$FILE" : '\([^:]*\)'` || { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** link for $FILE -- please fix by hand" >&5
18184 $as_echo "$as_me: WARNING: *** link for $FILE -- please fix by hand" >&2;}
18185  done
18186  ;;
18187     "src/include/pg_config.h":H)
18188 # Update timestamp for pg_config.h (see Makefile.global)
18189 echo >src/include/stamp-h
18190  ;;
18191     "src/include/pg_config_ext.h":H)
18192 # Update timestamp for pg_config_ext.h (see Makefile.global)
18193 echo >src/include/stamp-ext-h
18194  ;;
18195     "src/interfaces/ecpg/include/ecpg_config.h":H) echo >src/interfaces/ecpg/include/stamp-h ;;
18196
18197   esac
18198 done # for ac_tag
18199
18200
18201 as_fn_exit 0
18202 _ACEOF
18203 ac_clean_files=$ac_clean_files_save
18204
18205 test $ac_write_fail = 0 ||
18206   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
18207
18208
18209 # configure is writing to config.log, and then calls config.status.
18210 # config.status does its own redirection, appending to config.log.
18211 # Unfortunately, on DOS this fails, as config.log is still kept open
18212 # by configure, so config.status won't be able to write to it; its
18213 # output is simply discarded.  So we exec the FD to /dev/null,
18214 # effectively closing config.log, so it can be properly (re)opened and
18215 # appended to by config.status.  When coming back to configure, we
18216 # need to make the FD available again.
18217 if test "$no_create" != yes; then
18218   ac_cs_success=:
18219   ac_config_status_args=
18220   test "$silent" = yes &&
18221     ac_config_status_args="$ac_config_status_args --quiet"
18222   exec 5>/dev/null
18223   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
18224   exec 5>>config.log
18225   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18226   # would make configure fail if this is the last instruction.
18227   $ac_cs_success || as_fn_exit 1
18228 fi
18229 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18230   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18231 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
18232 fi
18233