]> granicus.if.org Git - postgresql/blob - configure
Allow ConditionVariable[PrepareTo]Sleep to auto-switch between CVs.
[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-2018, 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 XSLTPROC
634 DBTOEPUB
635 have_docbook
636 XMLLINT
637 TCL_SHLIB_LD_LIBS
638 TCL_SHARED_BUILD
639 TCL_LIB_SPEC
640 TCL_LIBS
641 TCL_INCLUDE_SPEC
642 TCL_CONFIG_SH
643 TCLSH
644 XGETTEXT
645 MSGMERGE
646 MSGFMT_FLAGS
647 MSGFMT
648 PG_CRC32C_OBJS
649 CFLAGS_SSE42
650 have_win32_dbghelp
651 HAVE_IPV6
652 LIBOBJS
653 UUID_LIBS
654 LDAP_LIBS_BE
655 LDAP_LIBS_FE
656 PTHREAD_CFLAGS
657 PTHREAD_LIBS
658 PTHREAD_CC
659 ax_pthread_config
660 ZIC
661 python_additional_libs
662 python_libspec
663 python_libdir
664 python_includespec
665 python_version
666 python_majorversion
667 PYTHON
668 perl_embed_ldflags
669 perl_embed_ccflags
670 perl_useshrplib
671 perl_privlibexp
672 perl_archlibexp
673 PERL
674 FLEXFLAGS
675 FLEX
676 BISONFLAGS
677 BISON
678 MKDIR_P
679 AWK
680 LN_S
681 TAR
682 install_bin
683 INSTALL_DATA
684 INSTALL_SCRIPT
685 INSTALL_PROGRAM
686 WINDRES
687 DLLWRAP
688 DLLTOOL
689 AR
690 STRIP_SHARED_LIB
691 STRIP_STATIC_LIB
692 STRIP
693 RANLIB
694 with_gnu_ld
695 LD
696 LDFLAGS_SL
697 LDFLAGS_EX
698 ELF_SYS
699 EGREP
700 GREP
701 with_zlib
702 with_system_tzdata
703 with_libxslt
704 with_libxml
705 XML2_CONFIG
706 UUID_EXTRA_OBJS
707 with_uuid
708 with_systemd
709 with_selinux
710 with_openssl
711 krb_srvtab
712 with_python
713 with_perl
714 with_tcl
715 ICU_LIBS
716 ICU_CFLAGS
717 PKG_CONFIG_LIBDIR
718 PKG_CONFIG_PATH
719 PKG_CONFIG
720 with_icu
721 enable_thread_safety
722 INCLUDES
723 autodepend
724 TAS
725 GCC
726 CPP
727 CFLAGS_VECTOR
728 SUN_STUDIO_CC
729 OBJEXT
730 EXEEXT
731 ac_ct_CC
732 CPPFLAGS
733 LDFLAGS
734 CFLAGS
735 CC
736 enable_tap_tests
737 enable_dtrace
738 DTRACEFLAGS
739 DTRACE
740 enable_coverage
741 GENHTML
742 LCOV
743 GCOV
744 enable_debug
745 enable_strong_random
746 enable_rpath
747 default_port
748 WANTED_LANGUAGES
749 enable_nls
750 PORTNAME
751 host_os
752 host_vendor
753 host_cpu
754 host
755 build_os
756 build_vendor
757 build_cpu
758 build
759 PG_MAJORVERSION
760 configure_args
761 target_alias
762 host_alias
763 build_alias
764 LIBS
765 ECHO_T
766 ECHO_N
767 ECHO_C
768 DEFS
769 mandir
770 localedir
771 libdir
772 psdir
773 pdfdir
774 dvidir
775 htmldir
776 infodir
777 docdir
778 oldincludedir
779 includedir
780 localstatedir
781 sharedstatedir
782 sysconfdir
783 datadir
784 datarootdir
785 libexecdir
786 sbindir
787 bindir
788 program_transform_name
789 prefix
790 exec_prefix
791 PACKAGE_URL
792 PACKAGE_BUGREPORT
793 PACKAGE_STRING
794 PACKAGE_VERSION
795 PACKAGE_TARNAME
796 PACKAGE_NAME
797 PATH_SEPARATOR
798 SHELL'
799 ac_subst_files=''
800 ac_user_opts='
801 enable_option_checking
802 with_extra_version
803 with_template
804 with_includes
805 with_libraries
806 with_libs
807 enable_integer_datetimes
808 enable_nls
809 with_pgport
810 enable_rpath
811 enable_spinlocks
812 enable_atomics
813 enable_strong_random
814 enable_debug
815 enable_profiling
816 enable_coverage
817 enable_dtrace
818 enable_tap_tests
819 with_blocksize
820 with_segsize
821 with_wal_blocksize
822 with_CC
823 enable_depend
824 enable_cassert
825 enable_thread_safety
826 with_icu
827 with_tcl
828 with_tclconfig
829 with_perl
830 with_python
831 with_gssapi
832 with_krb_srvnam
833 with_pam
834 with_bsd_auth
835 with_ldap
836 with_bonjour
837 with_openssl
838 with_selinux
839 with_systemd
840 with_readline
841 with_libedit_preferred
842 with_uuid
843 with_ossp_uuid
844 with_libxml
845 with_libxslt
846 with_system_tzdata
847 with_zlib
848 with_gnu_ld
849 enable_largefile
850 enable_float4_byval
851 enable_float8_byval
852 '
853       ac_precious_vars='build_alias
854 host_alias
855 target_alias
856 CC
857 CFLAGS
858 LDFLAGS
859 LIBS
860 CPPFLAGS
861 CPP
862 PKG_CONFIG
863 PKG_CONFIG_PATH
864 PKG_CONFIG_LIBDIR
865 ICU_CFLAGS
866 ICU_LIBS
867 LDFLAGS_EX
868 LDFLAGS_SL'
869
870
871 # Initialize some variables set by options.
872 ac_init_help=
873 ac_init_version=false
874 ac_unrecognized_opts=
875 ac_unrecognized_sep=
876 # The variables have the same names as the options, with
877 # dashes changed to underlines.
878 cache_file=/dev/null
879 exec_prefix=NONE
880 no_create=
881 no_recursion=
882 prefix=NONE
883 program_prefix=NONE
884 program_suffix=NONE
885 program_transform_name=s,x,x,
886 silent=
887 site=
888 srcdir=
889 verbose=
890 x_includes=NONE
891 x_libraries=NONE
892
893 # Installation directory options.
894 # These are left unexpanded so users can "make install exec_prefix=/foo"
895 # and all the variables that are supposed to be based on exec_prefix
896 # by default will actually change.
897 # Use braces instead of parens because sh, perl, etc. also accept them.
898 # (The list follows the same order as the GNU Coding Standards.)
899 bindir='${exec_prefix}/bin'
900 sbindir='${exec_prefix}/sbin'
901 libexecdir='${exec_prefix}/libexec'
902 datarootdir='${prefix}/share'
903 datadir='${datarootdir}'
904 sysconfdir='${prefix}/etc'
905 sharedstatedir='${prefix}/com'
906 localstatedir='${prefix}/var'
907 includedir='${prefix}/include'
908 oldincludedir='/usr/include'
909 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
910 infodir='${datarootdir}/info'
911 htmldir='${docdir}'
912 dvidir='${docdir}'
913 pdfdir='${docdir}'
914 psdir='${docdir}'
915 libdir='${exec_prefix}/lib'
916 localedir='${datarootdir}/locale'
917 mandir='${datarootdir}/man'
918
919 ac_prev=
920 ac_dashdash=
921 for ac_option
922 do
923   # If the previous option needs an argument, assign it.
924   if test -n "$ac_prev"; then
925     eval $ac_prev=\$ac_option
926     ac_prev=
927     continue
928   fi
929
930   case $ac_option in
931   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
932   *=)   ac_optarg= ;;
933   *)    ac_optarg=yes ;;
934   esac
935
936   # Accept the important Cygnus configure options, so we can diagnose typos.
937
938   case $ac_dashdash$ac_option in
939   --)
940     ac_dashdash=yes ;;
941
942   -bindir | --bindir | --bindi | --bind | --bin | --bi)
943     ac_prev=bindir ;;
944   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
945     bindir=$ac_optarg ;;
946
947   -build | --build | --buil | --bui | --bu)
948     ac_prev=build_alias ;;
949   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
950     build_alias=$ac_optarg ;;
951
952   -cache-file | --cache-file | --cache-fil | --cache-fi \
953   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
954     ac_prev=cache_file ;;
955   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
956   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
957     cache_file=$ac_optarg ;;
958
959   --config-cache | -C)
960     cache_file=config.cache ;;
961
962   -datadir | --datadir | --datadi | --datad)
963     ac_prev=datadir ;;
964   -datadir=* | --datadir=* | --datadi=* | --datad=*)
965     datadir=$ac_optarg ;;
966
967   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
968   | --dataroo | --dataro | --datar)
969     ac_prev=datarootdir ;;
970   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
971   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
972     datarootdir=$ac_optarg ;;
973
974   -disable-* | --disable-*)
975     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
976     # Reject names that are not valid shell variable names.
977     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
978       as_fn_error $? "invalid feature name: $ac_useropt"
979     ac_useropt_orig=$ac_useropt
980     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
981     case $ac_user_opts in
982       *"
983 "enable_$ac_useropt"
984 "*) ;;
985       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
986          ac_unrecognized_sep=', ';;
987     esac
988     eval enable_$ac_useropt=no ;;
989
990   -docdir | --docdir | --docdi | --doc | --do)
991     ac_prev=docdir ;;
992   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
993     docdir=$ac_optarg ;;
994
995   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
996     ac_prev=dvidir ;;
997   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
998     dvidir=$ac_optarg ;;
999
1000   -enable-* | --enable-*)
1001     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1002     # Reject names that are not valid shell variable names.
1003     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1004       as_fn_error $? "invalid feature name: $ac_useropt"
1005     ac_useropt_orig=$ac_useropt
1006     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1007     case $ac_user_opts in
1008       *"
1009 "enable_$ac_useropt"
1010 "*) ;;
1011       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1012          ac_unrecognized_sep=', ';;
1013     esac
1014     eval enable_$ac_useropt=\$ac_optarg ;;
1015
1016   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1017   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1018   | --exec | --exe | --ex)
1019     ac_prev=exec_prefix ;;
1020   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1021   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1022   | --exec=* | --exe=* | --ex=*)
1023     exec_prefix=$ac_optarg ;;
1024
1025   -gas | --gas | --ga | --g)
1026     # Obsolete; use --with-gas.
1027     with_gas=yes ;;
1028
1029   -help | --help | --hel | --he | -h)
1030     ac_init_help=long ;;
1031   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1032     ac_init_help=recursive ;;
1033   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1034     ac_init_help=short ;;
1035
1036   -host | --host | --hos | --ho)
1037     ac_prev=host_alias ;;
1038   -host=* | --host=* | --hos=* | --ho=*)
1039     host_alias=$ac_optarg ;;
1040
1041   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1042     ac_prev=htmldir ;;
1043   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1044   | --ht=*)
1045     htmldir=$ac_optarg ;;
1046
1047   -includedir | --includedir | --includedi | --included | --include \
1048   | --includ | --inclu | --incl | --inc)
1049     ac_prev=includedir ;;
1050   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1051   | --includ=* | --inclu=* | --incl=* | --inc=*)
1052     includedir=$ac_optarg ;;
1053
1054   -infodir | --infodir | --infodi | --infod | --info | --inf)
1055     ac_prev=infodir ;;
1056   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1057     infodir=$ac_optarg ;;
1058
1059   -libdir | --libdir | --libdi | --libd)
1060     ac_prev=libdir ;;
1061   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1062     libdir=$ac_optarg ;;
1063
1064   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1065   | --libexe | --libex | --libe)
1066     ac_prev=libexecdir ;;
1067   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1068   | --libexe=* | --libex=* | --libe=*)
1069     libexecdir=$ac_optarg ;;
1070
1071   -localedir | --localedir | --localedi | --localed | --locale)
1072     ac_prev=localedir ;;
1073   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1074     localedir=$ac_optarg ;;
1075
1076   -localstatedir | --localstatedir | --localstatedi | --localstated \
1077   | --localstate | --localstat | --localsta | --localst | --locals)
1078     ac_prev=localstatedir ;;
1079   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1080   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1081     localstatedir=$ac_optarg ;;
1082
1083   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1084     ac_prev=mandir ;;
1085   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1086     mandir=$ac_optarg ;;
1087
1088   -nfp | --nfp | --nf)
1089     # Obsolete; use --without-fp.
1090     with_fp=no ;;
1091
1092   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1093   | --no-cr | --no-c | -n)
1094     no_create=yes ;;
1095
1096   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1097   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1098     no_recursion=yes ;;
1099
1100   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1101   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1102   | --oldin | --oldi | --old | --ol | --o)
1103     ac_prev=oldincludedir ;;
1104   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1105   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1106   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1107     oldincludedir=$ac_optarg ;;
1108
1109   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1110     ac_prev=prefix ;;
1111   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1112     prefix=$ac_optarg ;;
1113
1114   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1115   | --program-pre | --program-pr | --program-p)
1116     ac_prev=program_prefix ;;
1117   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1118   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1119     program_prefix=$ac_optarg ;;
1120
1121   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1122   | --program-suf | --program-su | --program-s)
1123     ac_prev=program_suffix ;;
1124   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1125   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1126     program_suffix=$ac_optarg ;;
1127
1128   -program-transform-name | --program-transform-name \
1129   | --program-transform-nam | --program-transform-na \
1130   | --program-transform-n | --program-transform- \
1131   | --program-transform | --program-transfor \
1132   | --program-transfo | --program-transf \
1133   | --program-trans | --program-tran \
1134   | --progr-tra | --program-tr | --program-t)
1135     ac_prev=program_transform_name ;;
1136   -program-transform-name=* | --program-transform-name=* \
1137   | --program-transform-nam=* | --program-transform-na=* \
1138   | --program-transform-n=* | --program-transform-=* \
1139   | --program-transform=* | --program-transfor=* \
1140   | --program-transfo=* | --program-transf=* \
1141   | --program-trans=* | --program-tran=* \
1142   | --progr-tra=* | --program-tr=* | --program-t=*)
1143     program_transform_name=$ac_optarg ;;
1144
1145   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1146     ac_prev=pdfdir ;;
1147   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1148     pdfdir=$ac_optarg ;;
1149
1150   -psdir | --psdir | --psdi | --psd | --ps)
1151     ac_prev=psdir ;;
1152   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1153     psdir=$ac_optarg ;;
1154
1155   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1156   | -silent | --silent | --silen | --sile | --sil)
1157     silent=yes ;;
1158
1159   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1160     ac_prev=sbindir ;;
1161   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1162   | --sbi=* | --sb=*)
1163     sbindir=$ac_optarg ;;
1164
1165   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1166   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1167   | --sharedst | --shareds | --shared | --share | --shar \
1168   | --sha | --sh)
1169     ac_prev=sharedstatedir ;;
1170   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1171   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1172   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1173   | --sha=* | --sh=*)
1174     sharedstatedir=$ac_optarg ;;
1175
1176   -site | --site | --sit)
1177     ac_prev=site ;;
1178   -site=* | --site=* | --sit=*)
1179     site=$ac_optarg ;;
1180
1181   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1182     ac_prev=srcdir ;;
1183   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1184     srcdir=$ac_optarg ;;
1185
1186   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1187   | --syscon | --sysco | --sysc | --sys | --sy)
1188     ac_prev=sysconfdir ;;
1189   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1190   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1191     sysconfdir=$ac_optarg ;;
1192
1193   -target | --target | --targe | --targ | --tar | --ta | --t)
1194     ac_prev=target_alias ;;
1195   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1196     target_alias=$ac_optarg ;;
1197
1198   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1199     verbose=yes ;;
1200
1201   -version | --version | --versio | --versi | --vers | -V)
1202     ac_init_version=: ;;
1203
1204   -with-* | --with-*)
1205     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1206     # Reject names that are not valid shell variable names.
1207     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1208       as_fn_error $? "invalid package name: $ac_useropt"
1209     ac_useropt_orig=$ac_useropt
1210     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1211     case $ac_user_opts in
1212       *"
1213 "with_$ac_useropt"
1214 "*) ;;
1215       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1216          ac_unrecognized_sep=', ';;
1217     esac
1218     eval with_$ac_useropt=\$ac_optarg ;;
1219
1220   -without-* | --without-*)
1221     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1222     # Reject names that are not valid shell variable names.
1223     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1224       as_fn_error $? "invalid package name: $ac_useropt"
1225     ac_useropt_orig=$ac_useropt
1226     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1227     case $ac_user_opts in
1228       *"
1229 "with_$ac_useropt"
1230 "*) ;;
1231       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1232          ac_unrecognized_sep=', ';;
1233     esac
1234     eval with_$ac_useropt=no ;;
1235
1236   --x)
1237     # Obsolete; use --with-x.
1238     with_x=yes ;;
1239
1240   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1241   | --x-incl | --x-inc | --x-in | --x-i)
1242     ac_prev=x_includes ;;
1243   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1244   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1245     x_includes=$ac_optarg ;;
1246
1247   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1248   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1249     ac_prev=x_libraries ;;
1250   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1251   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1252     x_libraries=$ac_optarg ;;
1253
1254   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1255 Try \`$0 --help' for more information"
1256     ;;
1257
1258   *=*)
1259     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1260     # Reject names that are not valid shell variable names.
1261     case $ac_envvar in #(
1262       '' | [0-9]* | *[!_$as_cr_alnum]* )
1263       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1264     esac
1265     eval $ac_envvar=\$ac_optarg
1266     export $ac_envvar ;;
1267
1268   *)
1269     # FIXME: should be removed in autoconf 3.0.
1270     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1271     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1272       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1273     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1274     ;;
1275
1276   esac
1277 done
1278
1279 if test -n "$ac_prev"; then
1280   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1281   as_fn_error $? "missing argument to $ac_option"
1282 fi
1283
1284 if test -n "$ac_unrecognized_opts"; then
1285   case $enable_option_checking in
1286     no) ;;
1287     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1288     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1289   esac
1290 fi
1291
1292 # Check all directory arguments for consistency.
1293 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1294                 datadir sysconfdir sharedstatedir localstatedir includedir \
1295                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1296                 libdir localedir mandir
1297 do
1298   eval ac_val=\$$ac_var
1299   # Remove trailing slashes.
1300   case $ac_val in
1301     */ )
1302       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1303       eval $ac_var=\$ac_val;;
1304   esac
1305   # Be sure to have absolute directory names.
1306   case $ac_val in
1307     [\\/$]* | ?:[\\/]* )  continue;;
1308     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1309   esac
1310   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1311 done
1312
1313 # There might be people who depend on the old broken behavior: `$host'
1314 # used to hold the argument of --host etc.
1315 # FIXME: To remove some day.
1316 build=$build_alias
1317 host=$host_alias
1318 target=$target_alias
1319
1320 # FIXME: To remove some day.
1321 if test "x$host_alias" != x; then
1322   if test "x$build_alias" = x; then
1323     cross_compiling=maybe
1324   elif test "x$build_alias" != "x$host_alias"; then
1325     cross_compiling=yes
1326   fi
1327 fi
1328
1329 ac_tool_prefix=
1330 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1331
1332 test "$silent" = yes && exec 6>/dev/null
1333
1334
1335 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1336 ac_ls_di=`ls -di .` &&
1337 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1338   as_fn_error $? "working directory cannot be determined"
1339 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1340   as_fn_error $? "pwd does not report name of working directory"
1341
1342
1343 # Find the source files, if location was not specified.
1344 if test -z "$srcdir"; then
1345   ac_srcdir_defaulted=yes
1346   # Try the directory containing this script, then the parent directory.
1347   ac_confdir=`$as_dirname -- "$as_myself" ||
1348 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1349          X"$as_myself" : 'X\(//\)[^/]' \| \
1350          X"$as_myself" : 'X\(//\)$' \| \
1351          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1352 $as_echo X"$as_myself" |
1353     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1354             s//\1/
1355             q
1356           }
1357           /^X\(\/\/\)[^/].*/{
1358             s//\1/
1359             q
1360           }
1361           /^X\(\/\/\)$/{
1362             s//\1/
1363             q
1364           }
1365           /^X\(\/\).*/{
1366             s//\1/
1367             q
1368           }
1369           s/.*/./; q'`
1370   srcdir=$ac_confdir
1371   if test ! -r "$srcdir/$ac_unique_file"; then
1372     srcdir=..
1373   fi
1374 else
1375   ac_srcdir_defaulted=no
1376 fi
1377 if test ! -r "$srcdir/$ac_unique_file"; then
1378   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1379   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1380 fi
1381 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1382 ac_abs_confdir=`(
1383         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1384         pwd)`
1385 # When building in place, set srcdir=.
1386 if test "$ac_abs_confdir" = "$ac_pwd"; then
1387   srcdir=.
1388 fi
1389 # Remove unnecessary trailing slashes from srcdir.
1390 # Double slashes in file names in object file debugging info
1391 # mess up M-x gdb in Emacs.
1392 case $srcdir in
1393 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1394 esac
1395 for ac_var in $ac_precious_vars; do
1396   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1397   eval ac_env_${ac_var}_value=\$${ac_var}
1398   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1399   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1400 done
1401
1402 #
1403 # Report the --help message.
1404 #
1405 if test "$ac_init_help" = "long"; then
1406   # Omit some internal or obsolete options to make the list less imposing.
1407   # This message is too long to be a string in the A/UX 3.1 sh.
1408   cat <<_ACEOF
1409 \`configure' configures PostgreSQL 11devel to adapt to many kinds of systems.
1410
1411 Usage: $0 [OPTION]... [VAR=VALUE]...
1412
1413 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1414 VAR=VALUE.  See below for descriptions of some of the useful variables.
1415
1416 Defaults for the options are specified in brackets.
1417
1418 Configuration:
1419   -h, --help              display this help and exit
1420       --help=short        display options specific to this package
1421       --help=recursive    display the short help of all the included packages
1422   -V, --version           display version information and exit
1423   -q, --quiet, --silent   do not print \`checking ...' messages
1424       --cache-file=FILE   cache test results in FILE [disabled]
1425   -C, --config-cache      alias for \`--cache-file=config.cache'
1426   -n, --no-create         do not create output files
1427       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1428
1429 Installation directories:
1430   --prefix=PREFIX         install architecture-independent files in PREFIX
1431                           [$ac_default_prefix]
1432   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1433                           [PREFIX]
1434
1435 By default, \`make install' will install all the files in
1436 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1437 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1438 for instance \`--prefix=\$HOME'.
1439
1440 For better control, use the options below.
1441
1442 Fine tuning of the installation directories:
1443   --bindir=DIR            user executables [EPREFIX/bin]
1444   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1445   --libexecdir=DIR        program executables [EPREFIX/libexec]
1446   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1447   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1448   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1449   --libdir=DIR            object code libraries [EPREFIX/lib]
1450   --includedir=DIR        C header files [PREFIX/include]
1451   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1452   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1453   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1454   --infodir=DIR           info documentation [DATAROOTDIR/info]
1455   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1456   --mandir=DIR            man documentation [DATAROOTDIR/man]
1457   --docdir=DIR            documentation root [DATAROOTDIR/doc/postgresql]
1458   --htmldir=DIR           html documentation [DOCDIR]
1459   --dvidir=DIR            dvi documentation [DOCDIR]
1460   --pdfdir=DIR            pdf documentation [DOCDIR]
1461   --psdir=DIR             ps documentation [DOCDIR]
1462 _ACEOF
1463
1464   cat <<\_ACEOF
1465
1466 System types:
1467   --build=BUILD     configure for building on BUILD [guessed]
1468   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1469 _ACEOF
1470 fi
1471
1472 if test -n "$ac_init_help"; then
1473   case $ac_init_help in
1474      short | recursive ) echo "Configuration of PostgreSQL 11devel:";;
1475    esac
1476   cat <<\_ACEOF
1477
1478 Optional Features:
1479   --disable-option-checking  ignore unrecognized --enable/--with options
1480   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1481   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1482   --disable-integer-datetimes
1483                           obsolete option, no longer supported
1484   --enable-nls[=LANGUAGES]
1485                           enable Native Language Support
1486   --disable-rpath         do not embed shared library search path in
1487                           executables
1488   --disable-spinlocks     do not use spinlocks
1489   --disable-atomics       do not use atomic operations
1490   --disable-strong-random do not use a strong random number source
1491   --enable-debug          build with debugging symbols (-g)
1492   --enable-profiling      build with profiling enabled
1493   --enable-coverage       build with coverage testing instrumentation
1494   --enable-dtrace         build with DTrace support
1495   --enable-tap-tests      enable TAP tests (requires Perl and IPC::Run)
1496   --enable-depend         turn on automatic dependency tracking
1497   --enable-cassert        enable assertion checks (for debugging)
1498   --disable-thread-safety disable thread-safety in client libraries
1499   --disable-largefile     omit support for large files
1500   --disable-float4-byval  disable float4 passed by value
1501   --disable-float8-byval  disable float8 passed by value
1502
1503 Optional Packages:
1504   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1505   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1506   --with-extra-version=STRING
1507                           append STRING to version
1508   --with-template=NAME    override operating system template
1509   --with-includes=DIRS    look for additional header files in DIRS
1510   --with-libraries=DIRS   look for additional libraries in DIRS
1511   --with-libs=DIRS        alternative spelling of --with-libraries
1512   --with-pgport=PORTNUM   set default port number [5432]
1513   --with-blocksize=BLOCKSIZE
1514                           set table block size in kB [8]
1515   --with-segsize=SEGSIZE  set table segment size in GB [1]
1516   --with-wal-blocksize=BLOCKSIZE
1517                           set WAL block size in kB [8]
1518   --with-CC=CMD           set compiler (deprecated)
1519   --with-icu              build with ICU support
1520   --with-tcl              build Tcl modules (PL/Tcl)
1521   --with-tclconfig=DIR    tclConfig.sh is in DIR
1522   --with-perl             build Perl modules (PL/Perl)
1523   --with-python           build Python modules (PL/Python)
1524   --with-gssapi           build with GSSAPI support
1525   --with-krb-srvnam=NAME  default service principal name in Kerberos (GSSAPI)
1526                           [postgres]
1527   --with-pam              build with PAM support
1528   --with-bsd-auth         build with BSD Authentication support
1529   --with-ldap             build with LDAP support
1530   --with-bonjour          build with Bonjour support
1531   --with-openssl          build with OpenSSL support
1532   --with-selinux          build with SELinux support
1533   --with-systemd          build with systemd support
1534   --without-readline      do not use GNU Readline nor BSD Libedit for editing
1535   --with-libedit-preferred
1536                           prefer BSD Libedit over GNU Readline
1537   --with-uuid=LIB         build contrib/uuid-ossp using LIB (bsd,e2fs,ossp)
1538   --with-ossp-uuid        obsolete spelling of --with-uuid=ossp
1539   --with-libxml           build with XML support
1540   --with-libxslt          use XSLT support when building contrib/xml2
1541   --with-system-tzdata=DIR
1542                           use system time zone data in DIR
1543   --without-zlib          do not use Zlib
1544   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1545
1546 Some influential environment variables:
1547   CC          C compiler command
1548   CFLAGS      C compiler flags
1549   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1550               nonstandard directory <lib dir>
1551   LIBS        libraries to pass to the linker, e.g. -l<library>
1552   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1553               you have headers in a nonstandard directory <include dir>
1554   CPP         C preprocessor
1555   PKG_CONFIG  path to pkg-config utility
1556   PKG_CONFIG_PATH
1557               directories to add to pkg-config's search path
1558   PKG_CONFIG_LIBDIR
1559               path overriding pkg-config's built-in search path
1560   ICU_CFLAGS  C compiler flags for ICU, overriding pkg-config
1561   ICU_LIBS    linker flags for ICU, overriding pkg-config
1562   LDFLAGS_EX  extra linker flags for linking executables only
1563   LDFLAGS_SL  extra linker flags for linking shared libraries only
1564
1565 Use these variables to override the choices made by `configure' or to help
1566 it to find libraries and programs with nonstandard names/locations.
1567
1568 Report bugs to <pgsql-bugs@postgresql.org>.
1569 _ACEOF
1570 ac_status=$?
1571 fi
1572
1573 if test "$ac_init_help" = "recursive"; then
1574   # If there are subdirs, report their specific --help.
1575   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1576     test -d "$ac_dir" ||
1577       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1578       continue
1579     ac_builddir=.
1580
1581 case "$ac_dir" in
1582 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1583 *)
1584   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1585   # A ".." for each directory in $ac_dir_suffix.
1586   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1587   case $ac_top_builddir_sub in
1588   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1589   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1590   esac ;;
1591 esac
1592 ac_abs_top_builddir=$ac_pwd
1593 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1594 # for backward compatibility:
1595 ac_top_builddir=$ac_top_build_prefix
1596
1597 case $srcdir in
1598   .)  # We are building in place.
1599     ac_srcdir=.
1600     ac_top_srcdir=$ac_top_builddir_sub
1601     ac_abs_top_srcdir=$ac_pwd ;;
1602   [\\/]* | ?:[\\/]* )  # Absolute name.
1603     ac_srcdir=$srcdir$ac_dir_suffix;
1604     ac_top_srcdir=$srcdir
1605     ac_abs_top_srcdir=$srcdir ;;
1606   *) # Relative name.
1607     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1608     ac_top_srcdir=$ac_top_build_prefix$srcdir
1609     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1610 esac
1611 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1612
1613     cd "$ac_dir" || { ac_status=$?; continue; }
1614     # Check for guested configure.
1615     if test -f "$ac_srcdir/configure.gnu"; then
1616       echo &&
1617       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1618     elif test -f "$ac_srcdir/configure"; then
1619       echo &&
1620       $SHELL "$ac_srcdir/configure" --help=recursive
1621     else
1622       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1623     fi || ac_status=$?
1624     cd "$ac_pwd" || { ac_status=$?; break; }
1625   done
1626 fi
1627
1628 test -n "$ac_init_help" && exit $ac_status
1629 if $ac_init_version; then
1630   cat <<\_ACEOF
1631 PostgreSQL configure 11devel
1632 generated by GNU Autoconf 2.69
1633
1634 Copyright (C) 2012 Free Software Foundation, Inc.
1635 This configure script is free software; the Free Software Foundation
1636 gives unlimited permission to copy, distribute and modify it.
1637
1638 Copyright (c) 1996-2018, PostgreSQL Global Development Group
1639 _ACEOF
1640   exit
1641 fi
1642
1643 ## ------------------------ ##
1644 ## Autoconf initialization. ##
1645 ## ------------------------ ##
1646
1647 # ac_fn_c_try_compile LINENO
1648 # --------------------------
1649 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1650 ac_fn_c_try_compile ()
1651 {
1652   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1653   rm -f conftest.$ac_objext
1654   if { { ac_try="$ac_compile"
1655 case "(($ac_try" in
1656   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1657   *) ac_try_echo=$ac_try;;
1658 esac
1659 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1660 $as_echo "$ac_try_echo"; } >&5
1661   (eval "$ac_compile") 2>conftest.err
1662   ac_status=$?
1663   if test -s conftest.err; then
1664     grep -v '^ *+' conftest.err >conftest.er1
1665     cat conftest.er1 >&5
1666     mv -f conftest.er1 conftest.err
1667   fi
1668   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1669   test $ac_status = 0; } && {
1670          test -z "$ac_c_werror_flag" ||
1671          test ! -s conftest.err
1672        } && test -s conftest.$ac_objext; then :
1673   ac_retval=0
1674 else
1675   $as_echo "$as_me: failed program was:" >&5
1676 sed 's/^/| /' conftest.$ac_ext >&5
1677
1678         ac_retval=1
1679 fi
1680   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1681   as_fn_set_status $ac_retval
1682
1683 } # ac_fn_c_try_compile
1684
1685 # ac_fn_c_try_link LINENO
1686 # -----------------------
1687 # Try to link conftest.$ac_ext, and return whether this succeeded.
1688 ac_fn_c_try_link ()
1689 {
1690   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1691   rm -f conftest.$ac_objext conftest$ac_exeext
1692   if { { ac_try="$ac_link"
1693 case "(($ac_try" in
1694   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1695   *) ac_try_echo=$ac_try;;
1696 esac
1697 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1698 $as_echo "$ac_try_echo"; } >&5
1699   (eval "$ac_link") 2>conftest.err
1700   ac_status=$?
1701   if test -s conftest.err; then
1702     grep -v '^ *+' conftest.err >conftest.er1
1703     cat conftest.er1 >&5
1704     mv -f conftest.er1 conftest.err
1705   fi
1706   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1707   test $ac_status = 0; } && {
1708          test -z "$ac_c_werror_flag" ||
1709          test ! -s conftest.err
1710        } && test -s conftest$ac_exeext && {
1711          test "$cross_compiling" = yes ||
1712          test -x conftest$ac_exeext
1713        }; then :
1714   ac_retval=0
1715 else
1716   $as_echo "$as_me: failed program was:" >&5
1717 sed 's/^/| /' conftest.$ac_ext >&5
1718
1719         ac_retval=1
1720 fi
1721   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1722   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1723   # interfere with the next link command; also delete a directory that is
1724   # left behind by Apple's compiler.  We do this before executing the actions.
1725   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1726   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1727   as_fn_set_status $ac_retval
1728
1729 } # ac_fn_c_try_link
1730
1731 # ac_fn_c_try_cpp LINENO
1732 # ----------------------
1733 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1734 ac_fn_c_try_cpp ()
1735 {
1736   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1737   if { { ac_try="$ac_cpp conftest.$ac_ext"
1738 case "(($ac_try" in
1739   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1740   *) ac_try_echo=$ac_try;;
1741 esac
1742 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1743 $as_echo "$ac_try_echo"; } >&5
1744   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1745   ac_status=$?
1746   if test -s conftest.err; then
1747     grep -v '^ *+' conftest.err >conftest.er1
1748     cat conftest.er1 >&5
1749     mv -f conftest.er1 conftest.err
1750   fi
1751   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1752   test $ac_status = 0; } > conftest.i && {
1753          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1754          test ! -s conftest.err
1755        }; then :
1756   ac_retval=0
1757 else
1758   $as_echo "$as_me: failed program was:" >&5
1759 sed 's/^/| /' conftest.$ac_ext >&5
1760
1761     ac_retval=1
1762 fi
1763   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1764   as_fn_set_status $ac_retval
1765
1766 } # ac_fn_c_try_cpp
1767
1768 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1769 # -------------------------------------------------------
1770 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1771 # the include files in INCLUDES and setting the cache variable VAR
1772 # accordingly.
1773 ac_fn_c_check_header_mongrel ()
1774 {
1775   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1776   if eval \${$3+:} false; then :
1777   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1778 $as_echo_n "checking for $2... " >&6; }
1779 if eval \${$3+:} false; then :
1780   $as_echo_n "(cached) " >&6
1781 fi
1782 eval ac_res=\$$3
1783                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1784 $as_echo "$ac_res" >&6; }
1785 else
1786   # Is the header compilable?
1787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1788 $as_echo_n "checking $2 usability... " >&6; }
1789 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1790 /* end confdefs.h.  */
1791 $4
1792 #include <$2>
1793 _ACEOF
1794 if ac_fn_c_try_compile "$LINENO"; then :
1795   ac_header_compiler=yes
1796 else
1797   ac_header_compiler=no
1798 fi
1799 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1801 $as_echo "$ac_header_compiler" >&6; }
1802
1803 # Is the header present?
1804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1805 $as_echo_n "checking $2 presence... " >&6; }
1806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1807 /* end confdefs.h.  */
1808 #include <$2>
1809 _ACEOF
1810 if ac_fn_c_try_cpp "$LINENO"; then :
1811   ac_header_preproc=yes
1812 else
1813   ac_header_preproc=no
1814 fi
1815 rm -f conftest.err conftest.i conftest.$ac_ext
1816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1817 $as_echo "$ac_header_preproc" >&6; }
1818
1819 # So?  What about this header?
1820 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1821   yes:no: )
1822     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1823 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1824     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1825 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1826     ;;
1827   no:yes:* )
1828     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1829 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1830     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1831 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1832     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1833 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1834     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1835 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1836     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1837 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1838 ( $as_echo "## ---------------------------------------- ##
1839 ## Report this to pgsql-bugs@postgresql.org ##
1840 ## ---------------------------------------- ##"
1841      ) | sed "s/^/$as_me: WARNING:     /" >&2
1842     ;;
1843 esac
1844   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1845 $as_echo_n "checking for $2... " >&6; }
1846 if eval \${$3+:} false; then :
1847   $as_echo_n "(cached) " >&6
1848 else
1849   eval "$3=\$ac_header_compiler"
1850 fi
1851 eval ac_res=\$$3
1852                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1853 $as_echo "$ac_res" >&6; }
1854 fi
1855   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1856
1857 } # ac_fn_c_check_header_mongrel
1858
1859 # ac_fn_c_try_run LINENO
1860 # ----------------------
1861 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1862 # that executables *can* be run.
1863 ac_fn_c_try_run ()
1864 {
1865   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1866   if { { ac_try="$ac_link"
1867 case "(($ac_try" in
1868   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1869   *) ac_try_echo=$ac_try;;
1870 esac
1871 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1872 $as_echo "$ac_try_echo"; } >&5
1873   (eval "$ac_link") 2>&5
1874   ac_status=$?
1875   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1876   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1877   { { case "(($ac_try" in
1878   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1879   *) ac_try_echo=$ac_try;;
1880 esac
1881 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1882 $as_echo "$ac_try_echo"; } >&5
1883   (eval "$ac_try") 2>&5
1884   ac_status=$?
1885   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1886   test $ac_status = 0; }; }; then :
1887   ac_retval=0
1888 else
1889   $as_echo "$as_me: program exited with status $ac_status" >&5
1890        $as_echo "$as_me: failed program was:" >&5
1891 sed 's/^/| /' conftest.$ac_ext >&5
1892
1893        ac_retval=$ac_status
1894 fi
1895   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1896   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1897   as_fn_set_status $ac_retval
1898
1899 } # ac_fn_c_try_run
1900
1901 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1902 # -------------------------------------------------------
1903 # Tests whether HEADER exists and can be compiled using the include files in
1904 # INCLUDES, setting the cache variable VAR accordingly.
1905 ac_fn_c_check_header_compile ()
1906 {
1907   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1908   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1909 $as_echo_n "checking for $2... " >&6; }
1910 if eval \${$3+:} false; then :
1911   $as_echo_n "(cached) " >&6
1912 else
1913   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1914 /* end confdefs.h.  */
1915 $4
1916 #include <$2>
1917 _ACEOF
1918 if ac_fn_c_try_compile "$LINENO"; then :
1919   eval "$3=yes"
1920 else
1921   eval "$3=no"
1922 fi
1923 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1924 fi
1925 eval ac_res=\$$3
1926                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1927 $as_echo "$ac_res" >&6; }
1928   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1929
1930 } # ac_fn_c_check_header_compile
1931
1932 # ac_fn_c_check_func LINENO FUNC VAR
1933 # ----------------------------------
1934 # Tests whether FUNC exists, setting the cache variable VAR accordingly
1935 ac_fn_c_check_func ()
1936 {
1937   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1938   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1939 $as_echo_n "checking for $2... " >&6; }
1940 if eval \${$3+:} false; then :
1941   $as_echo_n "(cached) " >&6
1942 else
1943   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1944 /* end confdefs.h.  */
1945 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1946    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
1947 #define $2 innocuous_$2
1948
1949 /* System header to define __stub macros and hopefully few prototypes,
1950     which can conflict with char $2 (); below.
1951     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1952     <limits.h> exists even on freestanding compilers.  */
1953
1954 #ifdef __STDC__
1955 # include <limits.h>
1956 #else
1957 # include <assert.h>
1958 #endif
1959
1960 #undef $2
1961
1962 /* Override any GCC internal prototype to avoid an error.
1963    Use char because int might match the return type of a GCC
1964    builtin and then its argument prototype would still apply.  */
1965 #ifdef __cplusplus
1966 extern "C"
1967 #endif
1968 char $2 ();
1969 /* The GNU C library defines this for functions which it implements
1970     to always fail with ENOSYS.  Some functions are actually named
1971     something starting with __ and the normal name is an alias.  */
1972 #if defined __stub_$2 || defined __stub___$2
1973 choke me
1974 #endif
1975
1976 int
1977 main ()
1978 {
1979 return $2 ();
1980   ;
1981   return 0;
1982 }
1983 _ACEOF
1984 if ac_fn_c_try_link "$LINENO"; then :
1985   eval "$3=yes"
1986 else
1987   eval "$3=no"
1988 fi
1989 rm -f core conftest.err conftest.$ac_objext \
1990     conftest$ac_exeext conftest.$ac_ext
1991 fi
1992 eval ac_res=\$$3
1993                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1994 $as_echo "$ac_res" >&6; }
1995   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1996
1997 } # ac_fn_c_check_func
1998
1999 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2000 # ----------------------------------------------------
2001 # Tries to find if the field MEMBER exists in type AGGR, after including
2002 # INCLUDES, setting cache variable VAR accordingly.
2003 ac_fn_c_check_member ()
2004 {
2005   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2006   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2007 $as_echo_n "checking for $2.$3... " >&6; }
2008 if eval \${$4+:} false; then :
2009   $as_echo_n "(cached) " >&6
2010 else
2011   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2012 /* end confdefs.h.  */
2013 $5
2014 int
2015 main ()
2016 {
2017 static $2 ac_aggr;
2018 if (ac_aggr.$3)
2019 return 0;
2020   ;
2021   return 0;
2022 }
2023 _ACEOF
2024 if ac_fn_c_try_compile "$LINENO"; then :
2025   eval "$4=yes"
2026 else
2027   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2028 /* end confdefs.h.  */
2029 $5
2030 int
2031 main ()
2032 {
2033 static $2 ac_aggr;
2034 if (sizeof ac_aggr.$3)
2035 return 0;
2036   ;
2037   return 0;
2038 }
2039 _ACEOF
2040 if ac_fn_c_try_compile "$LINENO"; then :
2041   eval "$4=yes"
2042 else
2043   eval "$4=no"
2044 fi
2045 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2046 fi
2047 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2048 fi
2049 eval ac_res=\$$4
2050                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2051 $as_echo "$ac_res" >&6; }
2052   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2053
2054 } # ac_fn_c_check_member
2055
2056 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2057 # -------------------------------------------
2058 # Tests whether TYPE exists after having included INCLUDES, setting cache
2059 # variable VAR accordingly.
2060 ac_fn_c_check_type ()
2061 {
2062   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2063   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2064 $as_echo_n "checking for $2... " >&6; }
2065 if eval \${$3+:} false; then :
2066   $as_echo_n "(cached) " >&6
2067 else
2068   eval "$3=no"
2069   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2070 /* end confdefs.h.  */
2071 $4
2072 int
2073 main ()
2074 {
2075 if (sizeof ($2))
2076          return 0;
2077   ;
2078   return 0;
2079 }
2080 _ACEOF
2081 if ac_fn_c_try_compile "$LINENO"; then :
2082   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2083 /* end confdefs.h.  */
2084 $4
2085 int
2086 main ()
2087 {
2088 if (sizeof (($2)))
2089             return 0;
2090   ;
2091   return 0;
2092 }
2093 _ACEOF
2094 if ac_fn_c_try_compile "$LINENO"; then :
2095
2096 else
2097   eval "$3=yes"
2098 fi
2099 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2100 fi
2101 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2102 fi
2103 eval ac_res=\$$3
2104                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2105 $as_echo "$ac_res" >&6; }
2106   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2107
2108 } # ac_fn_c_check_type
2109
2110 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2111 # --------------------------------------------
2112 # Tries to find the compile-time value of EXPR in a program that includes
2113 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2114 # computed
2115 ac_fn_c_compute_int ()
2116 {
2117   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2118   if test "$cross_compiling" = yes; then
2119     # Depending upon the size, compute the lo and hi bounds.
2120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2121 /* end confdefs.h.  */
2122 $4
2123 int
2124 main ()
2125 {
2126 static int test_array [1 - 2 * !(($2) >= 0)];
2127 test_array [0] = 0;
2128 return test_array [0];
2129
2130   ;
2131   return 0;
2132 }
2133 _ACEOF
2134 if ac_fn_c_try_compile "$LINENO"; then :
2135   ac_lo=0 ac_mid=0
2136   while :; do
2137     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2138 /* end confdefs.h.  */
2139 $4
2140 int
2141 main ()
2142 {
2143 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2144 test_array [0] = 0;
2145 return test_array [0];
2146
2147   ;
2148   return 0;
2149 }
2150 _ACEOF
2151 if ac_fn_c_try_compile "$LINENO"; then :
2152   ac_hi=$ac_mid; break
2153 else
2154   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2155                         if test $ac_lo -le $ac_mid; then
2156                           ac_lo= ac_hi=
2157                           break
2158                         fi
2159                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2160 fi
2161 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2162   done
2163 else
2164   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2165 /* end confdefs.h.  */
2166 $4
2167 int
2168 main ()
2169 {
2170 static int test_array [1 - 2 * !(($2) < 0)];
2171 test_array [0] = 0;
2172 return test_array [0];
2173
2174   ;
2175   return 0;
2176 }
2177 _ACEOF
2178 if ac_fn_c_try_compile "$LINENO"; then :
2179   ac_hi=-1 ac_mid=-1
2180   while :; do
2181     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2182 /* end confdefs.h.  */
2183 $4
2184 int
2185 main ()
2186 {
2187 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2188 test_array [0] = 0;
2189 return test_array [0];
2190
2191   ;
2192   return 0;
2193 }
2194 _ACEOF
2195 if ac_fn_c_try_compile "$LINENO"; then :
2196   ac_lo=$ac_mid; break
2197 else
2198   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2199                         if test $ac_mid -le $ac_hi; then
2200                           ac_lo= ac_hi=
2201                           break
2202                         fi
2203                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2204 fi
2205 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2206   done
2207 else
2208   ac_lo= ac_hi=
2209 fi
2210 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2211 fi
2212 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2213 # Binary search between lo and hi bounds.
2214 while test "x$ac_lo" != "x$ac_hi"; do
2215   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2216   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2217 /* end confdefs.h.  */
2218 $4
2219 int
2220 main ()
2221 {
2222 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2223 test_array [0] = 0;
2224 return test_array [0];
2225
2226   ;
2227   return 0;
2228 }
2229 _ACEOF
2230 if ac_fn_c_try_compile "$LINENO"; then :
2231   ac_hi=$ac_mid
2232 else
2233   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2234 fi
2235 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2236 done
2237 case $ac_lo in #((
2238 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2239 '') ac_retval=1 ;;
2240 esac
2241   else
2242     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2243 /* end confdefs.h.  */
2244 $4
2245 static long int longval () { return $2; }
2246 static unsigned long int ulongval () { return $2; }
2247 #include <stdio.h>
2248 #include <stdlib.h>
2249 int
2250 main ()
2251 {
2252
2253   FILE *f = fopen ("conftest.val", "w");
2254   if (! f)
2255     return 1;
2256   if (($2) < 0)
2257     {
2258       long int i = longval ();
2259       if (i != ($2))
2260         return 1;
2261       fprintf (f, "%ld", i);
2262     }
2263   else
2264     {
2265       unsigned long int i = ulongval ();
2266       if (i != ($2))
2267         return 1;
2268       fprintf (f, "%lu", i);
2269     }
2270   /* Do not output a trailing newline, as this causes \r\n confusion
2271      on some platforms.  */
2272   return ferror (f) || fclose (f) != 0;
2273
2274   ;
2275   return 0;
2276 }
2277 _ACEOF
2278 if ac_fn_c_try_run "$LINENO"; then :
2279   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2280 else
2281   ac_retval=1
2282 fi
2283 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2284   conftest.$ac_objext conftest.beam conftest.$ac_ext
2285 rm -f conftest.val
2286
2287   fi
2288   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2289   as_fn_set_status $ac_retval
2290
2291 } # ac_fn_c_compute_int
2292
2293 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2294 # ---------------------------------------------
2295 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2296 # accordingly.
2297 ac_fn_c_check_decl ()
2298 {
2299   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2300   as_decl_name=`echo $2|sed 's/ *(.*//'`
2301   as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2302   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2303 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2304 if eval \${$3+:} false; then :
2305   $as_echo_n "(cached) " >&6
2306 else
2307   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2308 /* end confdefs.h.  */
2309 $4
2310 int
2311 main ()
2312 {
2313 #ifndef $as_decl_name
2314 #ifdef __cplusplus
2315   (void) $as_decl_use;
2316 #else
2317   (void) $as_decl_name;
2318 #endif
2319 #endif
2320
2321   ;
2322   return 0;
2323 }
2324 _ACEOF
2325 if ac_fn_c_try_compile "$LINENO"; then :
2326   eval "$3=yes"
2327 else
2328   eval "$3=no"
2329 fi
2330 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2331 fi
2332 eval ac_res=\$$3
2333                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2334 $as_echo "$ac_res" >&6; }
2335   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2336
2337 } # ac_fn_c_check_decl
2338 cat >config.log <<_ACEOF
2339 This file contains any messages produced by compilers while
2340 running configure, to aid debugging if configure makes a mistake.
2341
2342 It was created by PostgreSQL $as_me 11devel, which was
2343 generated by GNU Autoconf 2.69.  Invocation command line was
2344
2345   $ $0 $@
2346
2347 _ACEOF
2348 exec 5>>config.log
2349 {
2350 cat <<_ASUNAME
2351 ## --------- ##
2352 ## Platform. ##
2353 ## --------- ##
2354
2355 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2356 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2357 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2358 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2359 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2360
2361 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2362 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2363
2364 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2365 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2366 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2367 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2368 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2369 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2370 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2371
2372 _ASUNAME
2373
2374 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2375 for as_dir in $PATH
2376 do
2377   IFS=$as_save_IFS
2378   test -z "$as_dir" && as_dir=.
2379     $as_echo "PATH: $as_dir"
2380   done
2381 IFS=$as_save_IFS
2382
2383 } >&5
2384
2385 cat >&5 <<_ACEOF
2386
2387
2388 ## ----------- ##
2389 ## Core tests. ##
2390 ## ----------- ##
2391
2392 _ACEOF
2393
2394
2395 # Keep a trace of the command line.
2396 # Strip out --no-create and --no-recursion so they do not pile up.
2397 # Strip out --silent because we don't want to record it for future runs.
2398 # Also quote any args containing shell meta-characters.
2399 # Make two passes to allow for proper duplicate-argument suppression.
2400 ac_configure_args=
2401 ac_configure_args0=
2402 ac_configure_args1=
2403 ac_must_keep_next=false
2404 for ac_pass in 1 2
2405 do
2406   for ac_arg
2407   do
2408     case $ac_arg in
2409     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2410     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2411     | -silent | --silent | --silen | --sile | --sil)
2412       continue ;;
2413     *\'*)
2414       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2415     esac
2416     case $ac_pass in
2417     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2418     2)
2419       as_fn_append ac_configure_args1 " '$ac_arg'"
2420       if test $ac_must_keep_next = true; then
2421         ac_must_keep_next=false # Got value, back to normal.
2422       else
2423         case $ac_arg in
2424           *=* | --config-cache | -C | -disable-* | --disable-* \
2425           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2426           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2427           | -with-* | --with-* | -without-* | --without-* | --x)
2428             case "$ac_configure_args0 " in
2429               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2430             esac
2431             ;;
2432           -* ) ac_must_keep_next=true ;;
2433         esac
2434       fi
2435       as_fn_append ac_configure_args " '$ac_arg'"
2436       ;;
2437     esac
2438   done
2439 done
2440 { ac_configure_args0=; unset ac_configure_args0;}
2441 { ac_configure_args1=; unset ac_configure_args1;}
2442
2443 # When interrupted or exit'd, cleanup temporary files, and complete
2444 # config.log.  We remove comments because anyway the quotes in there
2445 # would cause problems or look ugly.
2446 # WARNING: Use '\'' to represent an apostrophe within the trap.
2447 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2448 trap 'exit_status=$?
2449   # Save into config.log some information that might help in debugging.
2450   {
2451     echo
2452
2453     $as_echo "## ---------------- ##
2454 ## Cache variables. ##
2455 ## ---------------- ##"
2456     echo
2457     # The following way of writing the cache mishandles newlines in values,
2458 (
2459   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2460     eval ac_val=\$$ac_var
2461     case $ac_val in #(
2462     *${as_nl}*)
2463       case $ac_var in #(
2464       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2465 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2466       esac
2467       case $ac_var in #(
2468       _ | IFS | as_nl) ;; #(
2469       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2470       *) { eval $ac_var=; unset $ac_var;} ;;
2471       esac ;;
2472     esac
2473   done
2474   (set) 2>&1 |
2475     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2476     *${as_nl}ac_space=\ *)
2477       sed -n \
2478         "s/'\''/'\''\\\\'\'''\''/g;
2479           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2480       ;; #(
2481     *)
2482       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2483       ;;
2484     esac |
2485     sort
2486 )
2487     echo
2488
2489     $as_echo "## ----------------- ##
2490 ## Output variables. ##
2491 ## ----------------- ##"
2492     echo
2493     for ac_var in $ac_subst_vars
2494     do
2495       eval ac_val=\$$ac_var
2496       case $ac_val in
2497       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2498       esac
2499       $as_echo "$ac_var='\''$ac_val'\''"
2500     done | sort
2501     echo
2502
2503     if test -n "$ac_subst_files"; then
2504       $as_echo "## ------------------- ##
2505 ## File substitutions. ##
2506 ## ------------------- ##"
2507       echo
2508       for ac_var in $ac_subst_files
2509       do
2510         eval ac_val=\$$ac_var
2511         case $ac_val in
2512         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2513         esac
2514         $as_echo "$ac_var='\''$ac_val'\''"
2515       done | sort
2516       echo
2517     fi
2518
2519     if test -s confdefs.h; then
2520       $as_echo "## ----------- ##
2521 ## confdefs.h. ##
2522 ## ----------- ##"
2523       echo
2524       cat confdefs.h
2525       echo
2526     fi
2527     test "$ac_signal" != 0 &&
2528       $as_echo "$as_me: caught signal $ac_signal"
2529     $as_echo "$as_me: exit $exit_status"
2530   } >&5
2531   rm -f core *.core core.conftest.* &&
2532     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2533     exit $exit_status
2534 ' 0
2535 for ac_signal in 1 2 13 15; do
2536   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2537 done
2538 ac_signal=0
2539
2540 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2541 rm -f -r conftest* confdefs.h
2542
2543 $as_echo "/* confdefs.h */" > confdefs.h
2544
2545 # Predefined preprocessor variables.
2546
2547 cat >>confdefs.h <<_ACEOF
2548 #define PACKAGE_NAME "$PACKAGE_NAME"
2549 _ACEOF
2550
2551 cat >>confdefs.h <<_ACEOF
2552 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2553 _ACEOF
2554
2555 cat >>confdefs.h <<_ACEOF
2556 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2557 _ACEOF
2558
2559 cat >>confdefs.h <<_ACEOF
2560 #define PACKAGE_STRING "$PACKAGE_STRING"
2561 _ACEOF
2562
2563 cat >>confdefs.h <<_ACEOF
2564 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2565 _ACEOF
2566
2567 cat >>confdefs.h <<_ACEOF
2568 #define PACKAGE_URL "$PACKAGE_URL"
2569 _ACEOF
2570
2571
2572 # Let the site file select an alternate cache file if it wants to.
2573 # Prefer an explicitly selected file to automatically selected ones.
2574 ac_site_file1=NONE
2575 ac_site_file2=NONE
2576 if test -n "$CONFIG_SITE"; then
2577   # We do not want a PATH search for config.site.
2578   case $CONFIG_SITE in #((
2579     -*)  ac_site_file1=./$CONFIG_SITE;;
2580     */*) ac_site_file1=$CONFIG_SITE;;
2581     *)   ac_site_file1=./$CONFIG_SITE;;
2582   esac
2583 elif test "x$prefix" != xNONE; then
2584   ac_site_file1=$prefix/share/config.site
2585   ac_site_file2=$prefix/etc/config.site
2586 else
2587   ac_site_file1=$ac_default_prefix/share/config.site
2588   ac_site_file2=$ac_default_prefix/etc/config.site
2589 fi
2590 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2591 do
2592   test "x$ac_site_file" = xNONE && continue
2593   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2594     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2595 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2596     sed 's/^/| /' "$ac_site_file" >&5
2597     . "$ac_site_file" \
2598       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2599 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2600 as_fn_error $? "failed to load site script $ac_site_file
2601 See \`config.log' for more details" "$LINENO" 5; }
2602   fi
2603 done
2604
2605 if test -r "$cache_file"; then
2606   # Some versions of bash will fail to source /dev/null (special files
2607   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2608   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2609     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2610 $as_echo "$as_me: loading cache $cache_file" >&6;}
2611     case $cache_file in
2612       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2613       *)                      . "./$cache_file";;
2614     esac
2615   fi
2616 else
2617   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2618 $as_echo "$as_me: creating cache $cache_file" >&6;}
2619   >$cache_file
2620 fi
2621
2622 # Check that the precious variables saved in the cache have kept the same
2623 # value.
2624 ac_cache_corrupted=false
2625 for ac_var in $ac_precious_vars; do
2626   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2627   eval ac_new_set=\$ac_env_${ac_var}_set
2628   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2629   eval ac_new_val=\$ac_env_${ac_var}_value
2630   case $ac_old_set,$ac_new_set in
2631     set,)
2632       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2633 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2634       ac_cache_corrupted=: ;;
2635     ,set)
2636       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2637 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2638       ac_cache_corrupted=: ;;
2639     ,);;
2640     *)
2641       if test "x$ac_old_val" != "x$ac_new_val"; then
2642         # differences in whitespace do not lead to failure.
2643         ac_old_val_w=`echo x $ac_old_val`
2644         ac_new_val_w=`echo x $ac_new_val`
2645         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2646           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2647 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2648           ac_cache_corrupted=:
2649         else
2650           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2651 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2652           eval $ac_var=\$ac_old_val
2653         fi
2654         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2655 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2656         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2657 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2658       fi;;
2659   esac
2660   # Pass precious variables to config.status.
2661   if test "$ac_new_set" = set; then
2662     case $ac_new_val in
2663     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2664     *) ac_arg=$ac_var=$ac_new_val ;;
2665     esac
2666     case " $ac_configure_args " in
2667       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2668       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2669     esac
2670   fi
2671 done
2672 if $ac_cache_corrupted; then
2673   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2674 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2675   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2676 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2677   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2678 fi
2679 ## -------------------- ##
2680 ## Main body of script. ##
2681 ## -------------------- ##
2682
2683 ac_ext=c
2684 ac_cpp='$CPP $CPPFLAGS'
2685 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2686 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2687 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2688
2689
2690
2691
2692
2693
2694 ac_aux_dir=
2695 for ac_dir in config "$srcdir"/config; do
2696   if test -f "$ac_dir/install-sh"; then
2697     ac_aux_dir=$ac_dir
2698     ac_install_sh="$ac_aux_dir/install-sh -c"
2699     break
2700   elif test -f "$ac_dir/install.sh"; then
2701     ac_aux_dir=$ac_dir
2702     ac_install_sh="$ac_aux_dir/install.sh -c"
2703     break
2704   elif test -f "$ac_dir/shtool"; then
2705     ac_aux_dir=$ac_dir
2706     ac_install_sh="$ac_aux_dir/shtool install -c"
2707     break
2708   fi
2709 done
2710 if test -z "$ac_aux_dir"; then
2711   as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5
2712 fi
2713
2714 # These three variables are undocumented and unsupported,
2715 # and are intended to be withdrawn in a future Autoconf release.
2716 # They can cause serious problems if a builder's source tree is in a directory
2717 # whose full name contains unusual characters.
2718 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2719 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2720 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2721
2722
2723
2724 configure_args=$ac_configure_args
2725
2726
2727 PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\)'`
2728
2729
2730 cat >>confdefs.h <<_ACEOF
2731 #define PG_MAJORVERSION "$PG_MAJORVERSION"
2732 _ACEOF
2733
2734
2735
2736
2737
2738 # Check whether --with-extra-version was given.
2739 if test "${with_extra_version+set}" = set; then :
2740   withval=$with_extra_version;
2741   case $withval in
2742     yes)
2743       as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2744       ;;
2745     no)
2746       as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2747       ;;
2748     *)
2749       PG_VERSION="$PACKAGE_VERSION$withval"
2750       ;;
2751   esac
2752
2753 else
2754   PG_VERSION="$PACKAGE_VERSION"
2755 fi
2756
2757
2758
2759 cat >>confdefs.h <<_ACEOF
2760 #define PG_VERSION "$PG_VERSION"
2761 _ACEOF
2762
2763
2764 # Make sure we can run config.sub.
2765 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2766   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2767
2768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2769 $as_echo_n "checking build system type... " >&6; }
2770 if ${ac_cv_build+:} false; then :
2771   $as_echo_n "(cached) " >&6
2772 else
2773   ac_build_alias=$build_alias
2774 test "x$ac_build_alias" = x &&
2775   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2776 test "x$ac_build_alias" = x &&
2777   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2778 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2779   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2780
2781 fi
2782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2783 $as_echo "$ac_cv_build" >&6; }
2784 case $ac_cv_build in
2785 *-*-*) ;;
2786 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2787 esac
2788 build=$ac_cv_build
2789 ac_save_IFS=$IFS; IFS='-'
2790 set x $ac_cv_build
2791 shift
2792 build_cpu=$1
2793 build_vendor=$2
2794 shift; shift
2795 # Remember, the first character of IFS is used to create $*,
2796 # except with old shells:
2797 build_os=$*
2798 IFS=$ac_save_IFS
2799 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2800
2801
2802 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2803 $as_echo_n "checking host system type... " >&6; }
2804 if ${ac_cv_host+:} false; then :
2805   $as_echo_n "(cached) " >&6
2806 else
2807   if test "x$host_alias" = x; then
2808   ac_cv_host=$ac_cv_build
2809 else
2810   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2811     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2812 fi
2813
2814 fi
2815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2816 $as_echo "$ac_cv_host" >&6; }
2817 case $ac_cv_host in
2818 *-*-*) ;;
2819 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2820 esac
2821 host=$ac_cv_host
2822 ac_save_IFS=$IFS; IFS='-'
2823 set x $ac_cv_host
2824 shift
2825 host_cpu=$1
2826 host_vendor=$2
2827 shift; shift
2828 # Remember, the first character of IFS is used to create $*,
2829 # except with old shells:
2830 host_os=$*
2831 IFS=$ac_save_IFS
2832 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2833
2834
2835
2836 template=
2837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which template to use" >&5
2838 $as_echo_n "checking which template to use... " >&6; }
2839
2840
2841
2842
2843 # Check whether --with-template was given.
2844 if test "${with_template+set}" = set; then :
2845   withval=$with_template;
2846   case $withval in
2847     yes)
2848       as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2849       ;;
2850     no)
2851       as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2852       ;;
2853     *)
2854
2855   case $withval in
2856     list)   echo; ls "$srcdir/src/template"; exit;;
2857     *)      if test -f "$srcdir/src/template/$with_template" ; then
2858               template=$withval
2859             else
2860               as_fn_error $? "'$withval' is not a valid template name. Use 'list' for a list." "$LINENO" 5
2861             fi;;
2862   esac
2863
2864       ;;
2865   esac
2866
2867 else
2868
2869 # --with-template not given
2870
2871 case $host_os in
2872      aix*) template=aix ;;
2873   cygwin*) template=cygwin ;;
2874   darwin*) template=darwin ;;
2875 dragonfly*) template=netbsd ;;
2876  freebsd*) template=freebsd ;;
2877     hpux*) template=hpux ;;
2878  linux*|gnu*|k*bsd*-gnu)
2879            template=linux ;;
2880    mingw*) template=win32 ;;
2881   netbsd*) template=netbsd ;;
2882  openbsd*) template=openbsd ;;
2883  solaris*) template=solaris ;;
2884 esac
2885
2886   if test x"$template" = x"" ; then
2887     as_fn_error $? "
2888 *******************************************************************
2889 PostgreSQL has apparently not been ported to your platform yet.
2890 To try a manual configuration, look into the src/template directory
2891 for a similar platform and use the '--with-template=' option.
2892
2893 Please also contact <pgsql-bugs@postgresql.org> to see about
2894 rectifying this.  Include the above 'checking host system type...'
2895 line.
2896 *******************************************************************
2897 " "$LINENO" 5
2898   fi
2899
2900
2901 fi
2902
2903
2904
2905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $template" >&5
2906 $as_echo "$template" >&6; }
2907
2908 PORTNAME=$template
2909
2910
2911 # Initialize default assumption that we do not need separate assembly code
2912 # for TAS (test-and-set).  This can be overridden by the template file
2913 # when it's executed.
2914 need_tas=no
2915 tas_file=dummy.s
2916
2917
2918
2919 ##
2920 ## Command line options
2921 ##
2922
2923 #
2924 # Add non-standard directories to the include path
2925 #
2926
2927
2928
2929 # Check whether --with-includes was given.
2930 if test "${with_includes+set}" = set; then :
2931   withval=$with_includes;
2932   case $withval in
2933     yes)
2934       as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
2935       ;;
2936     no)
2937       as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
2938       ;;
2939     *)
2940
2941       ;;
2942   esac
2943
2944 fi
2945
2946
2947
2948
2949 #
2950 # Add non-standard directories to the library search path
2951 #
2952
2953
2954
2955 # Check whether --with-libraries was given.
2956 if test "${with_libraries+set}" = set; then :
2957   withval=$with_libraries;
2958   case $withval in
2959     yes)
2960       as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
2961       ;;
2962     no)
2963       as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
2964       ;;
2965     *)
2966       LIBRARY_DIRS=$withval
2967       ;;
2968   esac
2969
2970 fi
2971
2972
2973
2974
2975
2976
2977 # Check whether --with-libs was given.
2978 if test "${with_libs+set}" = set; then :
2979   withval=$with_libs;
2980   case $withval in
2981     yes)
2982       as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
2983       ;;
2984     no)
2985       as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
2986       ;;
2987     *)
2988       LIBRARY_DIRS=$withval
2989       ;;
2990   esac
2991
2992 fi
2993
2994
2995
2996
2997 #
2998 # 64-bit integer date/time storage is now the only option, but to avoid
2999 # unnecessary breakage of build scripts, continue to accept an explicit
3000 # "--enable-integer-datetimes" switch.
3001 #
3002
3003
3004 # Check whether --enable-integer-datetimes was given.
3005 if test "${enable_integer_datetimes+set}" = set; then :
3006   enableval=$enable_integer_datetimes;
3007   case $enableval in
3008     yes)
3009       :
3010       ;;
3011     no)
3012       as_fn_error $? "--disable-integer-datetimes is no longer supported" "$LINENO" 5
3013       ;;
3014     *)
3015       as_fn_error $? "no argument expected for --enable-integer-datetimes option" "$LINENO" 5
3016       ;;
3017   esac
3018
3019 else
3020   enable_integer_datetimes=yes
3021
3022 fi
3023
3024
3025
3026
3027 #
3028 # NLS
3029 #
3030 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is wanted" >&5
3031 $as_echo_n "checking whether NLS is wanted... " >&6; }
3032
3033
3034 # Check whether --enable-nls was given.
3035 if test "${enable_nls+set}" = set; then :
3036   enableval=$enable_nls;
3037   case $enableval in
3038     yes)
3039       :
3040       ;;
3041     no)
3042       :
3043       ;;
3044     *)
3045       enable_nls=yes
3046 WANTED_LANGUAGES=$enableval
3047       ;;
3048   esac
3049
3050 else
3051   enable_nls=no
3052 fi
3053
3054
3055
3056 if test "$enable_nls" = yes; then
3057
3058 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
3059
3060 fi
3061
3062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_nls" >&5
3063 $as_echo "$enable_nls" >&6; }
3064
3065
3066
3067 #
3068 # Default port number (--with-pgport), default 5432
3069 #
3070 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default port number" >&5
3071 $as_echo_n "checking for default port number... " >&6; }
3072
3073
3074
3075 # Check whether --with-pgport was given.
3076 if test "${with_pgport+set}" = set; then :
3077   withval=$with_pgport;
3078   case $withval in
3079     yes)
3080       as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3081       ;;
3082     no)
3083       as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3084       ;;
3085     *)
3086       default_port=$withval
3087       ;;
3088   esac
3089
3090 else
3091   default_port=5432
3092 fi
3093
3094
3095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_port" >&5
3096 $as_echo "$default_port" >&6; }
3097 # Need both of these because some places want an integer and some a string
3098
3099 cat >>confdefs.h <<_ACEOF
3100 #define DEF_PGPORT ${default_port}
3101 _ACEOF
3102
3103
3104 cat >>confdefs.h <<_ACEOF
3105 #define DEF_PGPORT_STR "${default_port}"
3106 _ACEOF
3107
3108
3109
3110 # It's worth validating port; you can get very confusing errors otherwise
3111 if test x"$default_port" = x""; then
3112   as_fn_error $? "invalid --with-pgport specification: empty string" "$LINENO" 5
3113 elif test ! x`echo "$default_port" | sed -e 's/[0-9]*//'` = x""; then
3114   as_fn_error $? "invalid --with-pgport specification: must be a number" "$LINENO" 5
3115 elif test ! x`echo "$default_port" | sed -e 's/^0.//'` = x"$default_port"; then
3116   as_fn_error $? "invalid --with-pgport specification: must not have leading 0" "$LINENO" 5
3117 elif test "$default_port" -lt "1" -o "$default_port" -gt "65535"; then
3118   as_fn_error $? "invalid --with-pgport specification: must be between 1 and 65535" "$LINENO" 5
3119 fi
3120
3121 #
3122 # '-rpath'-like feature can be disabled
3123 #
3124
3125
3126 # Check whether --enable-rpath was given.
3127 if test "${enable_rpath+set}" = set; then :
3128   enableval=$enable_rpath;
3129   case $enableval in
3130     yes)
3131       :
3132       ;;
3133     no)
3134       :
3135       ;;
3136     *)
3137       as_fn_error $? "no argument expected for --enable-rpath option" "$LINENO" 5
3138       ;;
3139   esac
3140
3141 else
3142   enable_rpath=yes
3143
3144 fi
3145
3146
3147
3148
3149 #
3150 # Spinlocks
3151 #
3152
3153
3154 # Check whether --enable-spinlocks was given.
3155 if test "${enable_spinlocks+set}" = set; then :
3156   enableval=$enable_spinlocks;
3157   case $enableval in
3158     yes)
3159       :
3160       ;;
3161     no)
3162       :
3163       ;;
3164     *)
3165       as_fn_error $? "no argument expected for --enable-spinlocks option" "$LINENO" 5
3166       ;;
3167   esac
3168
3169 else
3170   enable_spinlocks=yes
3171
3172 fi
3173
3174
3175
3176 #
3177 # Atomic operations
3178 #
3179
3180
3181 # Check whether --enable-atomics was given.
3182 if test "${enable_atomics+set}" = set; then :
3183   enableval=$enable_atomics;
3184   case $enableval in
3185     yes)
3186       :
3187       ;;
3188     no)
3189       :
3190       ;;
3191     *)
3192       as_fn_error $? "no argument expected for --enable-atomics option" "$LINENO" 5
3193       ;;
3194   esac
3195
3196 else
3197   enable_atomics=yes
3198
3199 fi
3200
3201
3202
3203 #
3204 # Random number generation
3205 #
3206
3207
3208 # Check whether --enable-strong-random was given.
3209 if test "${enable_strong_random+set}" = set; then :
3210   enableval=$enable_strong_random;
3211   case $enableval in
3212     yes)
3213       :
3214       ;;
3215     no)
3216       :
3217       ;;
3218     *)
3219       as_fn_error $? "no argument expected for --enable-strong-random option" "$LINENO" 5
3220       ;;
3221   esac
3222
3223 else
3224   enable_strong_random=yes
3225
3226 fi
3227
3228
3229
3230
3231 #
3232 # --enable-debug adds -g to compiler flags
3233 #
3234
3235
3236 # Check whether --enable-debug was given.
3237 if test "${enable_debug+set}" = set; then :
3238   enableval=$enable_debug;
3239   case $enableval in
3240     yes)
3241       :
3242       ;;
3243     no)
3244       :
3245       ;;
3246     *)
3247       as_fn_error $? "no argument expected for --enable-debug option" "$LINENO" 5
3248       ;;
3249   esac
3250
3251 else
3252   enable_debug=no
3253
3254 fi
3255
3256
3257
3258
3259 #
3260 # --enable-profiling enables gcc profiling
3261 #
3262
3263
3264 # Check whether --enable-profiling was given.
3265 if test "${enable_profiling+set}" = set; then :
3266   enableval=$enable_profiling;
3267   case $enableval in
3268     yes)
3269       :
3270       ;;
3271     no)
3272       :
3273       ;;
3274     *)
3275       as_fn_error $? "no argument expected for --enable-profiling option" "$LINENO" 5
3276       ;;
3277   esac
3278
3279 else
3280   enable_profiling=no
3281
3282 fi
3283
3284
3285
3286 #
3287 # --enable-coverage enables generation of code coverage metrics with gcov
3288 #
3289
3290
3291 # Check whether --enable-coverage was given.
3292 if test "${enable_coverage+set}" = set; then :
3293   enableval=$enable_coverage;
3294   case $enableval in
3295     yes)
3296       if test -z "$GCOV"; then
3297   for ac_prog in gcov
3298 do
3299   # Extract the first word of "$ac_prog", so it can be a program name with args.
3300 set dummy $ac_prog; ac_word=$2
3301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3302 $as_echo_n "checking for $ac_word... " >&6; }
3303 if ${ac_cv_path_GCOV+:} false; then :
3304   $as_echo_n "(cached) " >&6
3305 else
3306   case $GCOV in
3307   [\\/]* | ?:[\\/]*)
3308   ac_cv_path_GCOV="$GCOV" # Let the user override the test with a path.
3309   ;;
3310   *)
3311   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3312 for as_dir in $PATH
3313 do
3314   IFS=$as_save_IFS
3315   test -z "$as_dir" && as_dir=.
3316     for ac_exec_ext in '' $ac_executable_extensions; do
3317   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3318     ac_cv_path_GCOV="$as_dir/$ac_word$ac_exec_ext"
3319     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3320     break 2
3321   fi
3322 done
3323   done
3324 IFS=$as_save_IFS
3325
3326   ;;
3327 esac
3328 fi
3329 GCOV=$ac_cv_path_GCOV
3330 if test -n "$GCOV"; then
3331   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3332 $as_echo "$GCOV" >&6; }
3333 else
3334   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3335 $as_echo "no" >&6; }
3336 fi
3337
3338
3339   test -n "$GCOV" && break
3340 done
3341
3342 else
3343   # Report the value of GCOV in configure's output in all cases.
3344   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCOV" >&5
3345 $as_echo_n "checking for GCOV... " >&6; }
3346   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3347 $as_echo "$GCOV" >&6; }
3348 fi
3349
3350 if test -z "$GCOV"; then
3351   as_fn_error $? "gcov not found" "$LINENO" 5
3352 fi
3353 if test -z "$LCOV"; then
3354   for ac_prog in lcov
3355 do
3356   # Extract the first word of "$ac_prog", so it can be a program name with args.
3357 set dummy $ac_prog; ac_word=$2
3358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3359 $as_echo_n "checking for $ac_word... " >&6; }
3360 if ${ac_cv_path_LCOV+:} false; then :
3361   $as_echo_n "(cached) " >&6
3362 else
3363   case $LCOV in
3364   [\\/]* | ?:[\\/]*)
3365   ac_cv_path_LCOV="$LCOV" # Let the user override the test with a path.
3366   ;;
3367   *)
3368   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3369 for as_dir in $PATH
3370 do
3371   IFS=$as_save_IFS
3372   test -z "$as_dir" && as_dir=.
3373     for ac_exec_ext in '' $ac_executable_extensions; do
3374   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3375     ac_cv_path_LCOV="$as_dir/$ac_word$ac_exec_ext"
3376     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3377     break 2
3378   fi
3379 done
3380   done
3381 IFS=$as_save_IFS
3382
3383   ;;
3384 esac
3385 fi
3386 LCOV=$ac_cv_path_LCOV
3387 if test -n "$LCOV"; then
3388   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3389 $as_echo "$LCOV" >&6; }
3390 else
3391   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3392 $as_echo "no" >&6; }
3393 fi
3394
3395
3396   test -n "$LCOV" && break
3397 done
3398
3399 else
3400   # Report the value of LCOV in configure's output in all cases.
3401   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCOV" >&5
3402 $as_echo_n "checking for LCOV... " >&6; }
3403   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3404 $as_echo "$LCOV" >&6; }
3405 fi
3406
3407 if test -z "$LCOV"; then
3408   as_fn_error $? "lcov not found" "$LINENO" 5
3409 fi
3410 if test -z "$GENHTML"; then
3411   for ac_prog in genhtml
3412 do
3413   # Extract the first word of "$ac_prog", so it can be a program name with args.
3414 set dummy $ac_prog; ac_word=$2
3415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3416 $as_echo_n "checking for $ac_word... " >&6; }
3417 if ${ac_cv_path_GENHTML+:} false; then :
3418   $as_echo_n "(cached) " >&6
3419 else
3420   case $GENHTML in
3421   [\\/]* | ?:[\\/]*)
3422   ac_cv_path_GENHTML="$GENHTML" # Let the user override the test with a path.
3423   ;;
3424   *)
3425   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3426 for as_dir in $PATH
3427 do
3428   IFS=$as_save_IFS
3429   test -z "$as_dir" && as_dir=.
3430     for ac_exec_ext in '' $ac_executable_extensions; do
3431   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3432     ac_cv_path_GENHTML="$as_dir/$ac_word$ac_exec_ext"
3433     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3434     break 2
3435   fi
3436 done
3437   done
3438 IFS=$as_save_IFS
3439
3440   ;;
3441 esac
3442 fi
3443 GENHTML=$ac_cv_path_GENHTML
3444 if test -n "$GENHTML"; then
3445   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3446 $as_echo "$GENHTML" >&6; }
3447 else
3448   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3449 $as_echo "no" >&6; }
3450 fi
3451
3452
3453   test -n "$GENHTML" && break
3454 done
3455
3456 else
3457   # Report the value of GENHTML in configure's output in all cases.
3458   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GENHTML" >&5
3459 $as_echo_n "checking for GENHTML... " >&6; }
3460   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3461 $as_echo "$GENHTML" >&6; }
3462 fi
3463
3464 if test -z "$GENHTML"; then
3465   as_fn_error $? "genhtml not found" "$LINENO" 5
3466 fi
3467       ;;
3468     no)
3469       :
3470       ;;
3471     *)
3472       as_fn_error $? "no argument expected for --enable-coverage option" "$LINENO" 5
3473       ;;
3474   esac
3475
3476 else
3477   enable_coverage=no
3478
3479 fi
3480
3481
3482
3483
3484 #
3485 # DTrace
3486 #
3487
3488
3489 # Check whether --enable-dtrace was given.
3490 if test "${enable_dtrace+set}" = set; then :
3491   enableval=$enable_dtrace;
3492   case $enableval in
3493     yes)
3494       if test -z "$DTRACE"; then
3495   for ac_prog in dtrace
3496 do
3497   # Extract the first word of "$ac_prog", so it can be a program name with args.
3498 set dummy $ac_prog; ac_word=$2
3499 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3500 $as_echo_n "checking for $ac_word... " >&6; }
3501 if ${ac_cv_path_DTRACE+:} false; then :
3502   $as_echo_n "(cached) " >&6
3503 else
3504   case $DTRACE in
3505   [\\/]* | ?:[\\/]*)
3506   ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
3507   ;;
3508   *)
3509   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3510 for as_dir in $PATH
3511 do
3512   IFS=$as_save_IFS
3513   test -z "$as_dir" && as_dir=.
3514     for ac_exec_ext in '' $ac_executable_extensions; do
3515   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3516     ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
3517     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3518     break 2
3519   fi
3520 done
3521   done
3522 IFS=$as_save_IFS
3523
3524   ;;
3525 esac
3526 fi
3527 DTRACE=$ac_cv_path_DTRACE
3528 if test -n "$DTRACE"; then
3529   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3530 $as_echo "$DTRACE" >&6; }
3531 else
3532   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3533 $as_echo "no" >&6; }
3534 fi
3535
3536
3537   test -n "$DTRACE" && break
3538 done
3539
3540 else
3541   # Report the value of DTRACE in configure's output in all cases.
3542   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
3543 $as_echo_n "checking for DTRACE... " >&6; }
3544   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3545 $as_echo "$DTRACE" >&6; }
3546 fi
3547
3548 if test -z "$DTRACE"; then
3549   as_fn_error $? "dtrace not found" "$LINENO" 5
3550 fi
3551
3552       ;;
3553     no)
3554       :
3555       ;;
3556     *)
3557       as_fn_error $? "no argument expected for --enable-dtrace option" "$LINENO" 5
3558       ;;
3559   esac
3560
3561 else
3562   enable_dtrace=no
3563
3564 fi
3565
3566
3567
3568
3569 #
3570 # TAP tests
3571 #
3572
3573
3574 # Check whether --enable-tap-tests was given.
3575 if test "${enable_tap_tests+set}" = set; then :
3576   enableval=$enable_tap_tests;
3577   case $enableval in
3578     yes)
3579       :
3580       ;;
3581     no)
3582       :
3583       ;;
3584     *)
3585       as_fn_error $? "no argument expected for --enable-tap-tests option" "$LINENO" 5
3586       ;;
3587   esac
3588
3589 else
3590   enable_tap_tests=no
3591
3592 fi
3593
3594
3595
3596
3597 #
3598 # Block size
3599 #
3600 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for block size" >&5
3601 $as_echo_n "checking for block size... " >&6; }
3602
3603
3604
3605 # Check whether --with-blocksize was given.
3606 if test "${with_blocksize+set}" = set; then :
3607   withval=$with_blocksize;
3608   case $withval in
3609     yes)
3610       as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3611       ;;
3612     no)
3613       as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3614       ;;
3615     *)
3616       blocksize=$withval
3617       ;;
3618   esac
3619
3620 else
3621   blocksize=8
3622 fi
3623
3624
3625 case ${blocksize} in
3626   1) BLCKSZ=1024;;
3627   2) BLCKSZ=2048;;
3628   4) BLCKSZ=4096;;
3629   8) BLCKSZ=8192;;
3630  16) BLCKSZ=16384;;
3631  32) BLCKSZ=32768;;
3632   *) as_fn_error $? "Invalid block size. Allowed values are 1,2,4,8,16,32." "$LINENO" 5
3633 esac
3634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${blocksize}kB" >&5
3635 $as_echo "${blocksize}kB" >&6; }
3636
3637
3638 cat >>confdefs.h <<_ACEOF
3639 #define BLCKSZ ${BLCKSZ}
3640 _ACEOF
3641
3642
3643 #
3644 # Relation segment size
3645 #
3646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for segment size" >&5
3647 $as_echo_n "checking for segment size... " >&6; }
3648
3649
3650
3651 # Check whether --with-segsize was given.
3652 if test "${with_segsize+set}" = set; then :
3653   withval=$with_segsize;
3654   case $withval in
3655     yes)
3656       as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3657       ;;
3658     no)
3659       as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3660       ;;
3661     *)
3662       segsize=$withval
3663       ;;
3664   esac
3665
3666 else
3667   segsize=1
3668 fi
3669
3670
3671 # this expression is set up to avoid unnecessary integer overflow
3672 # blocksize is already guaranteed to be a factor of 1024
3673 RELSEG_SIZE=`expr '(' 1024 / ${blocksize} ')' '*' ${segsize} '*' 1024`
3674 test $? -eq 0 || exit 1
3675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${segsize}GB" >&5
3676 $as_echo "${segsize}GB" >&6; }
3677
3678
3679 cat >>confdefs.h <<_ACEOF
3680 #define RELSEG_SIZE ${RELSEG_SIZE}
3681 _ACEOF
3682
3683
3684 #
3685 # WAL block size
3686 #
3687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAL block size" >&5
3688 $as_echo_n "checking for WAL block size... " >&6; }
3689
3690
3691
3692 # Check whether --with-wal-blocksize was given.
3693 if test "${with_wal_blocksize+set}" = set; then :
3694   withval=$with_wal_blocksize;
3695   case $withval in
3696     yes)
3697       as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3698       ;;
3699     no)
3700       as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3701       ;;
3702     *)
3703       wal_blocksize=$withval
3704       ;;
3705   esac
3706
3707 else
3708   wal_blocksize=8
3709 fi
3710
3711
3712 case ${wal_blocksize} in
3713   1) XLOG_BLCKSZ=1024;;
3714   2) XLOG_BLCKSZ=2048;;
3715   4) XLOG_BLCKSZ=4096;;
3716   8) XLOG_BLCKSZ=8192;;
3717  16) XLOG_BLCKSZ=16384;;
3718  32) XLOG_BLCKSZ=32768;;
3719  64) XLOG_BLCKSZ=65536;;
3720   *) as_fn_error $? "Invalid WAL block size. Allowed values are 1,2,4,8,16,32,64." "$LINENO" 5
3721 esac
3722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${wal_blocksize}kB" >&5
3723 $as_echo "${wal_blocksize}kB" >&6; }
3724
3725
3726 cat >>confdefs.h <<_ACEOF
3727 #define XLOG_BLCKSZ ${XLOG_BLCKSZ}
3728 _ACEOF
3729
3730
3731 #
3732 # C compiler
3733 #
3734
3735 # For historical reasons you can also use --with-CC to specify the C compiler
3736 # to use, although the standard way to do this is to set the CC environment
3737 # variable.
3738
3739
3740
3741 # Check whether --with-CC was given.
3742 if test "${with_CC+set}" = set; then :
3743   withval=$with_CC;
3744   case $withval in
3745     yes)
3746       as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3747       ;;
3748     no)
3749       as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3750       ;;
3751     *)
3752       CC=$with_CC
3753       ;;
3754   esac
3755
3756 fi
3757
3758
3759
3760 case $template in
3761   aix) pgac_cc_list="gcc xlc";;
3762     *) pgac_cc_list="gcc cc";;
3763 esac
3764
3765 ac_ext=c
3766 ac_cpp='$CPP $CPPFLAGS'
3767 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3768 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3769 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3770 if test -n "$ac_tool_prefix"; then
3771   for ac_prog in $pgac_cc_list
3772   do
3773     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3774 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3776 $as_echo_n "checking for $ac_word... " >&6; }
3777 if ${ac_cv_prog_CC+:} false; then :
3778   $as_echo_n "(cached) " >&6
3779 else
3780   if test -n "$CC"; then
3781   ac_cv_prog_CC="$CC" # Let the user override the test.
3782 else
3783 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3784 for as_dir in $PATH
3785 do
3786   IFS=$as_save_IFS
3787   test -z "$as_dir" && as_dir=.
3788     for ac_exec_ext in '' $ac_executable_extensions; do
3789   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3790     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3791     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3792     break 2
3793   fi
3794 done
3795   done
3796 IFS=$as_save_IFS
3797
3798 fi
3799 fi
3800 CC=$ac_cv_prog_CC
3801 if test -n "$CC"; then
3802   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3803 $as_echo "$CC" >&6; }
3804 else
3805   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3806 $as_echo "no" >&6; }
3807 fi
3808
3809
3810     test -n "$CC" && break
3811   done
3812 fi
3813 if test -z "$CC"; then
3814   ac_ct_CC=$CC
3815   for ac_prog in $pgac_cc_list
3816 do
3817   # Extract the first word of "$ac_prog", so it can be a program name with args.
3818 set dummy $ac_prog; ac_word=$2
3819 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3820 $as_echo_n "checking for $ac_word... " >&6; }
3821 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3822   $as_echo_n "(cached) " >&6
3823 else
3824   if test -n "$ac_ct_CC"; then
3825   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3826 else
3827 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3828 for as_dir in $PATH
3829 do
3830   IFS=$as_save_IFS
3831   test -z "$as_dir" && as_dir=.
3832     for ac_exec_ext in '' $ac_executable_extensions; do
3833   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3834     ac_cv_prog_ac_ct_CC="$ac_prog"
3835     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3836     break 2
3837   fi
3838 done
3839   done
3840 IFS=$as_save_IFS
3841
3842 fi
3843 fi
3844 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3845 if test -n "$ac_ct_CC"; then
3846   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3847 $as_echo "$ac_ct_CC" >&6; }
3848 else
3849   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3850 $as_echo "no" >&6; }
3851 fi
3852
3853
3854   test -n "$ac_ct_CC" && break
3855 done
3856
3857   if test "x$ac_ct_CC" = x; then
3858     CC=""
3859   else
3860     case $cross_compiling:$ac_tool_warned in
3861 yes:)
3862 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3863 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3864 ac_tool_warned=yes ;;
3865 esac
3866     CC=$ac_ct_CC
3867   fi
3868 fi
3869
3870
3871 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3872 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3873 as_fn_error $? "no acceptable C compiler found in \$PATH
3874 See \`config.log' for more details" "$LINENO" 5; }
3875
3876 # Provide some information about the compiler.
3877 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3878 set X $ac_compile
3879 ac_compiler=$2
3880 for ac_option in --version -v -V -qversion; do
3881   { { ac_try="$ac_compiler $ac_option >&5"
3882 case "(($ac_try" in
3883   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3884   *) ac_try_echo=$ac_try;;
3885 esac
3886 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3887 $as_echo "$ac_try_echo"; } >&5
3888   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3889   ac_status=$?
3890   if test -s conftest.err; then
3891     sed '10a\
3892 ... rest of stderr output deleted ...
3893          10q' conftest.err >conftest.er1
3894     cat conftest.er1 >&5
3895   fi
3896   rm -f conftest.er1 conftest.err
3897   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3898   test $ac_status = 0; }
3899 done
3900
3901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3902 /* end confdefs.h.  */
3903
3904 int
3905 main ()
3906 {
3907
3908   ;
3909   return 0;
3910 }
3911 _ACEOF
3912 ac_clean_files_save=$ac_clean_files
3913 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3914 # Try to create an executable without -o first, disregard a.out.
3915 # It will help us diagnose broken compilers, and finding out an intuition
3916 # of exeext.
3917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3918 $as_echo_n "checking whether the C compiler works... " >&6; }
3919 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3920
3921 # The possible output files:
3922 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3923
3924 ac_rmfiles=
3925 for ac_file in $ac_files
3926 do
3927   case $ac_file in
3928     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3929     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3930   esac
3931 done
3932 rm -f $ac_rmfiles
3933
3934 if { { ac_try="$ac_link_default"
3935 case "(($ac_try" in
3936   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3937   *) ac_try_echo=$ac_try;;
3938 esac
3939 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3940 $as_echo "$ac_try_echo"; } >&5
3941   (eval "$ac_link_default") 2>&5
3942   ac_status=$?
3943   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3944   test $ac_status = 0; }; then :
3945   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3946 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3947 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
3948 # so that the user can short-circuit this test for compilers unknown to
3949 # Autoconf.
3950 for ac_file in $ac_files ''
3951 do
3952   test -f "$ac_file" || continue
3953   case $ac_file in
3954     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3955         ;;
3956     [ab].out )
3957         # We found the default executable, but exeext='' is most
3958         # certainly right.
3959         break;;
3960     *.* )
3961         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3962         then :; else
3963            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3964         fi
3965         # We set ac_cv_exeext here because the later test for it is not
3966         # safe: cross compilers may not add the suffix if given an `-o'
3967         # argument, so we may need to know it at that point already.
3968         # Even if this section looks crufty: it has the advantage of
3969         # actually working.
3970         break;;
3971     * )
3972         break;;
3973   esac
3974 done
3975 test "$ac_cv_exeext" = no && ac_cv_exeext=
3976
3977 else
3978   ac_file=''
3979 fi
3980 if test -z "$ac_file"; then :
3981   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3982 $as_echo "no" >&6; }
3983 $as_echo "$as_me: failed program was:" >&5
3984 sed 's/^/| /' conftest.$ac_ext >&5
3985
3986 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3987 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3988 as_fn_error 77 "C compiler cannot create executables
3989 See \`config.log' for more details" "$LINENO" 5; }
3990 else
3991   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3992 $as_echo "yes" >&6; }
3993 fi
3994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3995 $as_echo_n "checking for C compiler default output file name... " >&6; }
3996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3997 $as_echo "$ac_file" >&6; }
3998 ac_exeext=$ac_cv_exeext
3999
4000 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4001 ac_clean_files=$ac_clean_files_save
4002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4003 $as_echo_n "checking for suffix of executables... " >&6; }
4004 if { { ac_try="$ac_link"
4005 case "(($ac_try" in
4006   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4007   *) ac_try_echo=$ac_try;;
4008 esac
4009 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4010 $as_echo "$ac_try_echo"; } >&5
4011   (eval "$ac_link") 2>&5
4012   ac_status=$?
4013   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4014   test $ac_status = 0; }; then :
4015   # If both `conftest.exe' and `conftest' are `present' (well, observable)
4016 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
4017 # work properly (i.e., refer to `conftest.exe'), while it won't with
4018 # `rm'.
4019 for ac_file in conftest.exe conftest conftest.*; do
4020   test -f "$ac_file" || continue
4021   case $ac_file in
4022     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4023     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4024           break;;
4025     * ) break;;
4026   esac
4027 done
4028 else
4029   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4030 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4031 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4032 See \`config.log' for more details" "$LINENO" 5; }
4033 fi
4034 rm -f conftest conftest$ac_cv_exeext
4035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4036 $as_echo "$ac_cv_exeext" >&6; }
4037
4038 rm -f conftest.$ac_ext
4039 EXEEXT=$ac_cv_exeext
4040 ac_exeext=$EXEEXT
4041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4042 /* end confdefs.h.  */
4043 #include <stdio.h>
4044 int
4045 main ()
4046 {
4047 FILE *f = fopen ("conftest.out", "w");
4048  return ferror (f) || fclose (f) != 0;
4049
4050   ;
4051   return 0;
4052 }
4053 _ACEOF
4054 ac_clean_files="$ac_clean_files conftest.out"
4055 # Check that the compiler produces executables we can run.  If not, either
4056 # the compiler is broken, or we cross compile.
4057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4058 $as_echo_n "checking whether we are cross compiling... " >&6; }
4059 if test "$cross_compiling" != yes; then
4060   { { ac_try="$ac_link"
4061 case "(($ac_try" in
4062   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4063   *) ac_try_echo=$ac_try;;
4064 esac
4065 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4066 $as_echo "$ac_try_echo"; } >&5
4067   (eval "$ac_link") 2>&5
4068   ac_status=$?
4069   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4070   test $ac_status = 0; }
4071   if { ac_try='./conftest$ac_cv_exeext'
4072   { { case "(($ac_try" in
4073   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4074   *) ac_try_echo=$ac_try;;
4075 esac
4076 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4077 $as_echo "$ac_try_echo"; } >&5
4078   (eval "$ac_try") 2>&5
4079   ac_status=$?
4080   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4081   test $ac_status = 0; }; }; then
4082     cross_compiling=no
4083   else
4084     if test "$cross_compiling" = maybe; then
4085         cross_compiling=yes
4086     else
4087         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4088 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4089 as_fn_error $? "cannot run C compiled programs.
4090 If you meant to cross compile, use \`--host'.
4091 See \`config.log' for more details" "$LINENO" 5; }
4092     fi
4093   fi
4094 fi
4095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4096 $as_echo "$cross_compiling" >&6; }
4097
4098 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4099 ac_clean_files=$ac_clean_files_save
4100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4101 $as_echo_n "checking for suffix of object files... " >&6; }
4102 if ${ac_cv_objext+:} false; then :
4103   $as_echo_n "(cached) " >&6
4104 else
4105   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4106 /* end confdefs.h.  */
4107
4108 int
4109 main ()
4110 {
4111
4112   ;
4113   return 0;
4114 }
4115 _ACEOF
4116 rm -f conftest.o conftest.obj
4117 if { { ac_try="$ac_compile"
4118 case "(($ac_try" in
4119   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4120   *) ac_try_echo=$ac_try;;
4121 esac
4122 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4123 $as_echo "$ac_try_echo"; } >&5
4124   (eval "$ac_compile") 2>&5
4125   ac_status=$?
4126   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4127   test $ac_status = 0; }; then :
4128   for ac_file in conftest.o conftest.obj conftest.*; do
4129   test -f "$ac_file" || continue;
4130   case $ac_file in
4131     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4132     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4133        break;;
4134   esac
4135 done
4136 else
4137   $as_echo "$as_me: failed program was:" >&5
4138 sed 's/^/| /' conftest.$ac_ext >&5
4139
4140 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4141 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4142 as_fn_error $? "cannot compute suffix of object files: cannot compile
4143 See \`config.log' for more details" "$LINENO" 5; }
4144 fi
4145 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4146 fi
4147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4148 $as_echo "$ac_cv_objext" >&6; }
4149 OBJEXT=$ac_cv_objext
4150 ac_objext=$OBJEXT
4151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4152 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4153 if ${ac_cv_c_compiler_gnu+:} false; then :
4154   $as_echo_n "(cached) " >&6
4155 else
4156   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4157 /* end confdefs.h.  */
4158
4159 int
4160 main ()
4161 {
4162 #ifndef __GNUC__
4163        choke me
4164 #endif
4165
4166   ;
4167   return 0;
4168 }
4169 _ACEOF
4170 if ac_fn_c_try_compile "$LINENO"; then :
4171   ac_compiler_gnu=yes
4172 else
4173   ac_compiler_gnu=no
4174 fi
4175 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4176 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4177
4178 fi
4179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4180 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4181 if test $ac_compiler_gnu = yes; then
4182   GCC=yes
4183 else
4184   GCC=
4185 fi
4186 ac_test_CFLAGS=${CFLAGS+set}
4187 ac_save_CFLAGS=$CFLAGS
4188 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4189 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4190 if ${ac_cv_prog_cc_g+:} false; then :
4191   $as_echo_n "(cached) " >&6
4192 else
4193   ac_save_c_werror_flag=$ac_c_werror_flag
4194    ac_c_werror_flag=yes
4195    ac_cv_prog_cc_g=no
4196    CFLAGS="-g"
4197    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4198 /* end confdefs.h.  */
4199
4200 int
4201 main ()
4202 {
4203
4204   ;
4205   return 0;
4206 }
4207 _ACEOF
4208 if ac_fn_c_try_compile "$LINENO"; then :
4209   ac_cv_prog_cc_g=yes
4210 else
4211   CFLAGS=""
4212       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4213 /* end confdefs.h.  */
4214
4215 int
4216 main ()
4217 {
4218
4219   ;
4220   return 0;
4221 }
4222 _ACEOF
4223 if ac_fn_c_try_compile "$LINENO"; then :
4224
4225 else
4226   ac_c_werror_flag=$ac_save_c_werror_flag
4227          CFLAGS="-g"
4228          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4229 /* end confdefs.h.  */
4230
4231 int
4232 main ()
4233 {
4234
4235   ;
4236   return 0;
4237 }
4238 _ACEOF
4239 if ac_fn_c_try_compile "$LINENO"; then :
4240   ac_cv_prog_cc_g=yes
4241 fi
4242 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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    ac_c_werror_flag=$ac_save_c_werror_flag
4248 fi
4249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4250 $as_echo "$ac_cv_prog_cc_g" >&6; }
4251 if test "$ac_test_CFLAGS" = set; then
4252   CFLAGS=$ac_save_CFLAGS
4253 elif test $ac_cv_prog_cc_g = yes; then
4254   if test "$GCC" = yes; then
4255     CFLAGS="-g -O2"
4256   else
4257     CFLAGS="-g"
4258   fi
4259 else
4260   if test "$GCC" = yes; then
4261     CFLAGS="-O2"
4262   else
4263     CFLAGS=
4264   fi
4265 fi
4266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4267 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4268 if ${ac_cv_prog_cc_c89+:} false; then :
4269   $as_echo_n "(cached) " >&6
4270 else
4271   ac_cv_prog_cc_c89=no
4272 ac_save_CC=$CC
4273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4274 /* end confdefs.h.  */
4275 #include <stdarg.h>
4276 #include <stdio.h>
4277 struct stat;
4278 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4279 struct buf { int x; };
4280 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4281 static char *e (p, i)
4282      char **p;
4283      int i;
4284 {
4285   return p[i];
4286 }
4287 static char *f (char * (*g) (char **, int), char **p, ...)
4288 {
4289   char *s;
4290   va_list v;
4291   va_start (v,p);
4292   s = g (p, va_arg (v,int));
4293   va_end (v);
4294   return s;
4295 }
4296
4297 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
4298    function prototypes and stuff, but not '\xHH' hex character constants.
4299    These don't provoke an error unfortunately, instead are silently treated
4300    as 'x'.  The following induces an error, until -std is added to get
4301    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
4302    array size at least.  It's necessary to write '\x00'==0 to get something
4303    that's true only with -std.  */
4304 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4305
4306 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4307    inside strings and character constants.  */
4308 #define FOO(x) 'x'
4309 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4310
4311 int test (int i, double x);
4312 struct s1 {int (*f) (int a);};
4313 struct s2 {int (*f) (double a);};
4314 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4315 int argc;
4316 char **argv;
4317 int
4318 main ()
4319 {
4320 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4321   ;
4322   return 0;
4323 }
4324 _ACEOF
4325 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4326         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4327 do
4328   CC="$ac_save_CC $ac_arg"
4329   if ac_fn_c_try_compile "$LINENO"; then :
4330   ac_cv_prog_cc_c89=$ac_arg
4331 fi
4332 rm -f core conftest.err conftest.$ac_objext
4333   test "x$ac_cv_prog_cc_c89" != "xno" && break
4334 done
4335 rm -f conftest.$ac_ext
4336 CC=$ac_save_CC
4337
4338 fi
4339 # AC_CACHE_VAL
4340 case "x$ac_cv_prog_cc_c89" in
4341   x)
4342     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4343 $as_echo "none needed" >&6; } ;;
4344   xno)
4345     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4346 $as_echo "unsupported" >&6; } ;;
4347   *)
4348     CC="$CC $ac_cv_prog_cc_c89"
4349     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4350 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4351 esac
4352 if test "x$ac_cv_prog_cc_c89" != xno; then :
4353
4354 fi
4355
4356 ac_ext=c
4357 ac_cpp='$CPP $CPPFLAGS'
4358 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4359 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4360 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4361
4362
4363 # Check if it's Intel's compiler, which (usually) pretends to be gcc,
4364 # but has idiosyncrasies of its own.  We assume icc will define
4365 # __INTEL_COMPILER regardless of CFLAGS.
4366
4367 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4368 /* end confdefs.h.  */
4369
4370 int
4371 main ()
4372 {
4373 #ifndef __INTEL_COMPILER
4374 choke me
4375 #endif
4376   ;
4377   return 0;
4378 }
4379 _ACEOF
4380 if ac_fn_c_try_compile "$LINENO"; then :
4381   ICC=yes
4382 else
4383   ICC=no
4384 fi
4385 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4386
4387 # Check if it's Sun Studio compiler. We assume that
4388 # __SUNPRO_C will be defined for Sun Studio compilers
4389 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4390 /* end confdefs.h.  */
4391
4392 int
4393 main ()
4394 {
4395 #ifndef __SUNPRO_C
4396 choke me
4397 #endif
4398   ;
4399   return 0;
4400 }
4401 _ACEOF
4402 if ac_fn_c_try_compile "$LINENO"; then :
4403   SUN_STUDIO_CC=yes
4404 else
4405   SUN_STUDIO_CC=no
4406 fi
4407 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4408
4409
4410
4411 unset CFLAGS
4412
4413 #
4414 # Read the template
4415 #
4416 . "$srcdir/src/template/$template" || exit
4417
4418 # CFLAGS are selected so:
4419 # If the user specifies something in the environment, that is used.
4420 # else:  If the template file set something, that is used.
4421 # else:  If coverage was enabled, don't set anything.
4422 # else:  If the compiler is GCC, then we use -O2.
4423 # else:  If the compiler is something else, then we use -O, unless debugging.
4424
4425 if test "$ac_env_CFLAGS_set" = set; then
4426   CFLAGS=$ac_env_CFLAGS_value
4427 elif test "${CFLAGS+set}" = set; then
4428   : # (keep what template set)
4429 elif test "$enable_coverage" = yes; then
4430   : # no optimization by default
4431 elif test "$GCC" = yes; then
4432   CFLAGS="-O2"
4433 else
4434   # if the user selected debug mode, don't use -O
4435   if test "$enable_debug" != yes; then
4436     CFLAGS="-O"
4437   fi
4438 fi
4439
4440 # CFLAGS we determined above will be added back at the end
4441 user_CFLAGS=$CFLAGS
4442 CFLAGS=""
4443
4444 # set CFLAGS_VECTOR from the environment, if available
4445 if test "$ac_env_CFLAGS_VECTOR_set" = set; then
4446   CFLAGS_VECTOR=$ac_env_CFLAGS_VECTOR_value
4447 fi
4448
4449 # Some versions of GCC support some additional useful warning flags.
4450 # Check whether they are supported, and add them to CFLAGS if so.
4451 # ICC pretends to be GCC but it's lying; it doesn't support these flags,
4452 # but has its own.  Also check other compiler-specific flags here.
4453
4454 if test "$GCC" = yes -a "$ICC" = no; then
4455   CFLAGS="-Wall -Wmissing-prototypes -Wpointer-arith"
4456   # These work in some but not all gcc versions
4457   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wdeclaration-after-statement" >&5
4458 $as_echo_n "checking whether $CC supports -Wdeclaration-after-statement... " >&6; }
4459 if ${pgac_cv_prog_cc_cflags__Wdeclaration_after_statement+:} false; then :
4460   $as_echo_n "(cached) " >&6
4461 else
4462   pgac_save_CFLAGS=$CFLAGS
4463 CFLAGS="$pgac_save_CFLAGS -Wdeclaration-after-statement"
4464 ac_save_c_werror_flag=$ac_c_werror_flag
4465 ac_c_werror_flag=yes
4466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4467 /* end confdefs.h.  */
4468
4469 int
4470 main ()
4471 {
4472
4473   ;
4474   return 0;
4475 }
4476 _ACEOF
4477 if ac_fn_c_try_compile "$LINENO"; then :
4478   pgac_cv_prog_cc_cflags__Wdeclaration_after_statement=yes
4479 else
4480   pgac_cv_prog_cc_cflags__Wdeclaration_after_statement=no
4481 fi
4482 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4483 ac_c_werror_flag=$ac_save_c_werror_flag
4484 CFLAGS="$pgac_save_CFLAGS"
4485 fi
4486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" >&5
4487 $as_echo "$pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" >&6; }
4488 if test x"$pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" = x"yes"; then
4489   CFLAGS="$CFLAGS -Wdeclaration-after-statement"
4490 fi
4491
4492   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wendif-labels" >&5
4493 $as_echo_n "checking whether $CC supports -Wendif-labels... " >&6; }
4494 if ${pgac_cv_prog_cc_cflags__Wendif_labels+:} false; then :
4495   $as_echo_n "(cached) " >&6
4496 else
4497   pgac_save_CFLAGS=$CFLAGS
4498 CFLAGS="$pgac_save_CFLAGS -Wendif-labels"
4499 ac_save_c_werror_flag=$ac_c_werror_flag
4500 ac_c_werror_flag=yes
4501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4502 /* end confdefs.h.  */
4503
4504 int
4505 main ()
4506 {
4507
4508   ;
4509   return 0;
4510 }
4511 _ACEOF
4512 if ac_fn_c_try_compile "$LINENO"; then :
4513   pgac_cv_prog_cc_cflags__Wendif_labels=yes
4514 else
4515   pgac_cv_prog_cc_cflags__Wendif_labels=no
4516 fi
4517 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4518 ac_c_werror_flag=$ac_save_c_werror_flag
4519 CFLAGS="$pgac_save_CFLAGS"
4520 fi
4521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wendif_labels" >&5
4522 $as_echo "$pgac_cv_prog_cc_cflags__Wendif_labels" >&6; }
4523 if test x"$pgac_cv_prog_cc_cflags__Wendif_labels" = x"yes"; then
4524   CFLAGS="$CFLAGS -Wendif-labels"
4525 fi
4526
4527   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wmissing-format-attribute" >&5
4528 $as_echo_n "checking whether $CC supports -Wmissing-format-attribute... " >&6; }
4529 if ${pgac_cv_prog_cc_cflags__Wmissing_format_attribute+:} false; then :
4530   $as_echo_n "(cached) " >&6
4531 else
4532   pgac_save_CFLAGS=$CFLAGS
4533 CFLAGS="$pgac_save_CFLAGS -Wmissing-format-attribute"
4534 ac_save_c_werror_flag=$ac_c_werror_flag
4535 ac_c_werror_flag=yes
4536 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4537 /* end confdefs.h.  */
4538
4539 int
4540 main ()
4541 {
4542
4543   ;
4544   return 0;
4545 }
4546 _ACEOF
4547 if ac_fn_c_try_compile "$LINENO"; then :
4548   pgac_cv_prog_cc_cflags__Wmissing_format_attribute=yes
4549 else
4550   pgac_cv_prog_cc_cflags__Wmissing_format_attribute=no
4551 fi
4552 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4553 ac_c_werror_flag=$ac_save_c_werror_flag
4554 CFLAGS="$pgac_save_CFLAGS"
4555 fi
4556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wmissing_format_attribute" >&5
4557 $as_echo "$pgac_cv_prog_cc_cflags__Wmissing_format_attribute" >&6; }
4558 if test x"$pgac_cv_prog_cc_cflags__Wmissing_format_attribute" = x"yes"; then
4559   CFLAGS="$CFLAGS -Wmissing-format-attribute"
4560 fi
4561
4562   # This was included in -Wall/-Wformat in older GCC versions
4563   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wformat-security" >&5
4564 $as_echo_n "checking whether $CC supports -Wformat-security... " >&6; }
4565 if ${pgac_cv_prog_cc_cflags__Wformat_security+:} false; then :
4566   $as_echo_n "(cached) " >&6
4567 else
4568   pgac_save_CFLAGS=$CFLAGS
4569 CFLAGS="$pgac_save_CFLAGS -Wformat-security"
4570 ac_save_c_werror_flag=$ac_c_werror_flag
4571 ac_c_werror_flag=yes
4572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4573 /* end confdefs.h.  */
4574
4575 int
4576 main ()
4577 {
4578
4579   ;
4580   return 0;
4581 }
4582 _ACEOF
4583 if ac_fn_c_try_compile "$LINENO"; then :
4584   pgac_cv_prog_cc_cflags__Wformat_security=yes
4585 else
4586   pgac_cv_prog_cc_cflags__Wformat_security=no
4587 fi
4588 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4589 ac_c_werror_flag=$ac_save_c_werror_flag
4590 CFLAGS="$pgac_save_CFLAGS"
4591 fi
4592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wformat_security" >&5
4593 $as_echo "$pgac_cv_prog_cc_cflags__Wformat_security" >&6; }
4594 if test x"$pgac_cv_prog_cc_cflags__Wformat_security" = x"yes"; then
4595   CFLAGS="$CFLAGS -Wformat-security"
4596 fi
4597
4598   # Disable strict-aliasing rules; needed for gcc 3.3+
4599   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fno-strict-aliasing" >&5
4600 $as_echo_n "checking whether $CC supports -fno-strict-aliasing... " >&6; }
4601 if ${pgac_cv_prog_cc_cflags__fno_strict_aliasing+:} false; then :
4602   $as_echo_n "(cached) " >&6
4603 else
4604   pgac_save_CFLAGS=$CFLAGS
4605 CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing"
4606 ac_save_c_werror_flag=$ac_c_werror_flag
4607 ac_c_werror_flag=yes
4608 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4609 /* end confdefs.h.  */
4610
4611 int
4612 main ()
4613 {
4614
4615   ;
4616   return 0;
4617 }
4618 _ACEOF
4619 if ac_fn_c_try_compile "$LINENO"; then :
4620   pgac_cv_prog_cc_cflags__fno_strict_aliasing=yes
4621 else
4622   pgac_cv_prog_cc_cflags__fno_strict_aliasing=no
4623 fi
4624 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4625 ac_c_werror_flag=$ac_save_c_werror_flag
4626 CFLAGS="$pgac_save_CFLAGS"
4627 fi
4628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&5
4629 $as_echo "$pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&6; }
4630 if test x"$pgac_cv_prog_cc_cflags__fno_strict_aliasing" = x"yes"; then
4631   CFLAGS="$CFLAGS -fno-strict-aliasing"
4632 fi
4633
4634   # Disable optimizations that assume no overflow; needed for gcc 4.3+
4635   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fwrapv" >&5
4636 $as_echo_n "checking whether $CC supports -fwrapv... " >&6; }
4637 if ${pgac_cv_prog_cc_cflags__fwrapv+:} false; then :
4638   $as_echo_n "(cached) " >&6
4639 else
4640   pgac_save_CFLAGS=$CFLAGS
4641 CFLAGS="$pgac_save_CFLAGS -fwrapv"
4642 ac_save_c_werror_flag=$ac_c_werror_flag
4643 ac_c_werror_flag=yes
4644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4645 /* end confdefs.h.  */
4646
4647 int
4648 main ()
4649 {
4650
4651   ;
4652   return 0;
4653 }
4654 _ACEOF
4655 if ac_fn_c_try_compile "$LINENO"; then :
4656   pgac_cv_prog_cc_cflags__fwrapv=yes
4657 else
4658   pgac_cv_prog_cc_cflags__fwrapv=no
4659 fi
4660 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4661 ac_c_werror_flag=$ac_save_c_werror_flag
4662 CFLAGS="$pgac_save_CFLAGS"
4663 fi
4664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fwrapv" >&5
4665 $as_echo "$pgac_cv_prog_cc_cflags__fwrapv" >&6; }
4666 if test x"$pgac_cv_prog_cc_cflags__fwrapv" = x"yes"; then
4667   CFLAGS="$CFLAGS -fwrapv"
4668 fi
4669
4670   # Disable FP optimizations that cause various errors on gcc 4.5+ or maybe 4.6+
4671   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fexcess-precision=standard" >&5
4672 $as_echo_n "checking whether $CC supports -fexcess-precision=standard... " >&6; }
4673 if ${pgac_cv_prog_cc_cflags__fexcess_precision_standard+:} false; then :
4674   $as_echo_n "(cached) " >&6
4675 else
4676   pgac_save_CFLAGS=$CFLAGS
4677 CFLAGS="$pgac_save_CFLAGS -fexcess-precision=standard"
4678 ac_save_c_werror_flag=$ac_c_werror_flag
4679 ac_c_werror_flag=yes
4680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4681 /* end confdefs.h.  */
4682
4683 int
4684 main ()
4685 {
4686
4687   ;
4688   return 0;
4689 }
4690 _ACEOF
4691 if ac_fn_c_try_compile "$LINENO"; then :
4692   pgac_cv_prog_cc_cflags__fexcess_precision_standard=yes
4693 else
4694   pgac_cv_prog_cc_cflags__fexcess_precision_standard=no
4695 fi
4696 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4697 ac_c_werror_flag=$ac_save_c_werror_flag
4698 CFLAGS="$pgac_save_CFLAGS"
4699 fi
4700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fexcess_precision_standard" >&5
4701 $as_echo "$pgac_cv_prog_cc_cflags__fexcess_precision_standard" >&6; }
4702 if test x"$pgac_cv_prog_cc_cflags__fexcess_precision_standard" = x"yes"; then
4703   CFLAGS="$CFLAGS -fexcess-precision=standard"
4704 fi
4705
4706   # Optimization flags for specific files that benefit from vectorization
4707   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -funroll-loops" >&5
4708 $as_echo_n "checking whether $CC supports -funroll-loops... " >&6; }
4709 if ${pgac_cv_prog_cc_cflags__funroll_loops+:} false; then :
4710   $as_echo_n "(cached) " >&6
4711 else
4712   pgac_save_CFLAGS=$CFLAGS
4713 CFLAGS="$pgac_save_CFLAGS -funroll-loops"
4714 ac_save_c_werror_flag=$ac_c_werror_flag
4715 ac_c_werror_flag=yes
4716 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4717 /* end confdefs.h.  */
4718
4719 int
4720 main ()
4721 {
4722
4723   ;
4724   return 0;
4725 }
4726 _ACEOF
4727 if ac_fn_c_try_compile "$LINENO"; then :
4728   pgac_cv_prog_cc_cflags__funroll_loops=yes
4729 else
4730   pgac_cv_prog_cc_cflags__funroll_loops=no
4731 fi
4732 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4733 ac_c_werror_flag=$ac_save_c_werror_flag
4734 CFLAGS="$pgac_save_CFLAGS"
4735 fi
4736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__funroll_loops" >&5
4737 $as_echo "$pgac_cv_prog_cc_cflags__funroll_loops" >&6; }
4738 if test x"$pgac_cv_prog_cc_cflags__funroll_loops" = x"yes"; then
4739   CFLAGS_VECTOR="${CFLAGS_VECTOR} -funroll-loops"
4740 fi
4741
4742   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -ftree-vectorize" >&5
4743 $as_echo_n "checking whether $CC supports -ftree-vectorize... " >&6; }
4744 if ${pgac_cv_prog_cc_cflags__ftree_vectorize+:} false; then :
4745   $as_echo_n "(cached) " >&6
4746 else
4747   pgac_save_CFLAGS=$CFLAGS
4748 CFLAGS="$pgac_save_CFLAGS -ftree-vectorize"
4749 ac_save_c_werror_flag=$ac_c_werror_flag
4750 ac_c_werror_flag=yes
4751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4752 /* end confdefs.h.  */
4753
4754 int
4755 main ()
4756 {
4757
4758   ;
4759   return 0;
4760 }
4761 _ACEOF
4762 if ac_fn_c_try_compile "$LINENO"; then :
4763   pgac_cv_prog_cc_cflags__ftree_vectorize=yes
4764 else
4765   pgac_cv_prog_cc_cflags__ftree_vectorize=no
4766 fi
4767 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4768 ac_c_werror_flag=$ac_save_c_werror_flag
4769 CFLAGS="$pgac_save_CFLAGS"
4770 fi
4771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__ftree_vectorize" >&5
4772 $as_echo "$pgac_cv_prog_cc_cflags__ftree_vectorize" >&6; }
4773 if test x"$pgac_cv_prog_cc_cflags__ftree_vectorize" = x"yes"; then
4774   CFLAGS_VECTOR="${CFLAGS_VECTOR} -ftree-vectorize"
4775 fi
4776
4777   # We want to suppress clang's unhelpful unused-command-line-argument warnings
4778   # but gcc won't complain about unrecognized -Wno-foo switches, so we have to
4779   # test for the positive form and if that works, add the negative form
4780   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wunused-command-line-argument" >&5
4781 $as_echo_n "checking whether $CC supports -Wunused-command-line-argument... " >&6; }
4782 if ${pgac_cv_prog_cc_cflags__Wunused_command_line_argument+:} false; then :
4783   $as_echo_n "(cached) " >&6
4784 else
4785   pgac_save_CFLAGS=$CFLAGS
4786 CFLAGS="$pgac_save_CFLAGS -Wunused-command-line-argument"
4787 ac_save_c_werror_flag=$ac_c_werror_flag
4788 ac_c_werror_flag=yes
4789 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4790 /* end confdefs.h.  */
4791
4792 int
4793 main ()
4794 {
4795
4796   ;
4797   return 0;
4798 }
4799 _ACEOF
4800 if ac_fn_c_try_compile "$LINENO"; then :
4801   pgac_cv_prog_cc_cflags__Wunused_command_line_argument=yes
4802 else
4803   pgac_cv_prog_cc_cflags__Wunused_command_line_argument=no
4804 fi
4805 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4806 ac_c_werror_flag=$ac_save_c_werror_flag
4807 CFLAGS="$pgac_save_CFLAGS"
4808 fi
4809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wunused_command_line_argument" >&5
4810 $as_echo "$pgac_cv_prog_cc_cflags__Wunused_command_line_argument" >&6; }
4811 if test x"$pgac_cv_prog_cc_cflags__Wunused_command_line_argument" = x"yes"; then
4812   NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
4813 fi
4814
4815   if test -n "$NOT_THE_CFLAGS"; then
4816     CFLAGS="$CFLAGS -Wno-unused-command-line-argument"
4817   fi
4818 elif test "$ICC" = yes; then
4819   # Intel's compiler has a bug/misoptimization in checking for
4820   # division by NAN (NaN == 0), -mp1 fixes it, so add it to the CFLAGS.
4821   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -mp1" >&5
4822 $as_echo_n "checking whether $CC supports -mp1... " >&6; }
4823 if ${pgac_cv_prog_cc_cflags__mp1+:} false; then :
4824   $as_echo_n "(cached) " >&6
4825 else
4826   pgac_save_CFLAGS=$CFLAGS
4827 CFLAGS="$pgac_save_CFLAGS -mp1"
4828 ac_save_c_werror_flag=$ac_c_werror_flag
4829 ac_c_werror_flag=yes
4830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4831 /* end confdefs.h.  */
4832
4833 int
4834 main ()
4835 {
4836
4837   ;
4838   return 0;
4839 }
4840 _ACEOF
4841 if ac_fn_c_try_compile "$LINENO"; then :
4842   pgac_cv_prog_cc_cflags__mp1=yes
4843 else
4844   pgac_cv_prog_cc_cflags__mp1=no
4845 fi
4846 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4847 ac_c_werror_flag=$ac_save_c_werror_flag
4848 CFLAGS="$pgac_save_CFLAGS"
4849 fi
4850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__mp1" >&5
4851 $as_echo "$pgac_cv_prog_cc_cflags__mp1" >&6; }
4852 if test x"$pgac_cv_prog_cc_cflags__mp1" = x"yes"; then
4853   CFLAGS="$CFLAGS -mp1"
4854 fi
4855
4856   # Make sure strict aliasing is off (though this is said to be the default)
4857   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fno-strict-aliasing" >&5
4858 $as_echo_n "checking whether $CC supports -fno-strict-aliasing... " >&6; }
4859 if ${pgac_cv_prog_cc_cflags__fno_strict_aliasing+:} false; then :
4860   $as_echo_n "(cached) " >&6
4861 else
4862   pgac_save_CFLAGS=$CFLAGS
4863 CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing"
4864 ac_save_c_werror_flag=$ac_c_werror_flag
4865 ac_c_werror_flag=yes
4866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4867 /* end confdefs.h.  */
4868
4869 int
4870 main ()
4871 {
4872
4873   ;
4874   return 0;
4875 }
4876 _ACEOF
4877 if ac_fn_c_try_compile "$LINENO"; then :
4878   pgac_cv_prog_cc_cflags__fno_strict_aliasing=yes
4879 else
4880   pgac_cv_prog_cc_cflags__fno_strict_aliasing=no
4881 fi
4882 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4883 ac_c_werror_flag=$ac_save_c_werror_flag
4884 CFLAGS="$pgac_save_CFLAGS"
4885 fi
4886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&5
4887 $as_echo "$pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&6; }
4888 if test x"$pgac_cv_prog_cc_cflags__fno_strict_aliasing" = x"yes"; then
4889   CFLAGS="$CFLAGS -fno-strict-aliasing"
4890 fi
4891
4892 elif test "$PORTNAME" = "aix"; then
4893   # AIX's xlc has to have strict aliasing turned off too
4894   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -qnoansialias" >&5
4895 $as_echo_n "checking whether $CC supports -qnoansialias... " >&6; }
4896 if ${pgac_cv_prog_cc_cflags__qnoansialias+:} false; then :
4897   $as_echo_n "(cached) " >&6
4898 else
4899   pgac_save_CFLAGS=$CFLAGS
4900 CFLAGS="$pgac_save_CFLAGS -qnoansialias"
4901 ac_save_c_werror_flag=$ac_c_werror_flag
4902 ac_c_werror_flag=yes
4903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4904 /* end confdefs.h.  */
4905
4906 int
4907 main ()
4908 {
4909
4910   ;
4911   return 0;
4912 }
4913 _ACEOF
4914 if ac_fn_c_try_compile "$LINENO"; then :
4915   pgac_cv_prog_cc_cflags__qnoansialias=yes
4916 else
4917   pgac_cv_prog_cc_cflags__qnoansialias=no
4918 fi
4919 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4920 ac_c_werror_flag=$ac_save_c_werror_flag
4921 CFLAGS="$pgac_save_CFLAGS"
4922 fi
4923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__qnoansialias" >&5
4924 $as_echo "$pgac_cv_prog_cc_cflags__qnoansialias" >&6; }
4925 if test x"$pgac_cv_prog_cc_cflags__qnoansialias" = x"yes"; then
4926   CFLAGS="$CFLAGS -qnoansialias"
4927 fi
4928
4929   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -qlonglong" >&5
4930 $as_echo_n "checking whether $CC supports -qlonglong... " >&6; }
4931 if ${pgac_cv_prog_cc_cflags__qlonglong+:} false; then :
4932   $as_echo_n "(cached) " >&6
4933 else
4934   pgac_save_CFLAGS=$CFLAGS
4935 CFLAGS="$pgac_save_CFLAGS -qlonglong"
4936 ac_save_c_werror_flag=$ac_c_werror_flag
4937 ac_c_werror_flag=yes
4938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4939 /* end confdefs.h.  */
4940
4941 int
4942 main ()
4943 {
4944
4945   ;
4946   return 0;
4947 }
4948 _ACEOF
4949 if ac_fn_c_try_compile "$LINENO"; then :
4950   pgac_cv_prog_cc_cflags__qlonglong=yes
4951 else
4952   pgac_cv_prog_cc_cflags__qlonglong=no
4953 fi
4954 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4955 ac_c_werror_flag=$ac_save_c_werror_flag
4956 CFLAGS="$pgac_save_CFLAGS"
4957 fi
4958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__qlonglong" >&5
4959 $as_echo "$pgac_cv_prog_cc_cflags__qlonglong" >&6; }
4960 if test x"$pgac_cv_prog_cc_cflags__qlonglong" = x"yes"; then
4961   CFLAGS="$CFLAGS -qlonglong"
4962 fi
4963
4964 elif test "$PORTNAME" = "hpux"; then
4965   # On some versions of HP-UX, libm functions do not set errno by default.
4966   # Fix that by using +Olibmerrno if the compiler recognizes it.
4967   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports +Olibmerrno" >&5
4968 $as_echo_n "checking whether $CC supports +Olibmerrno... " >&6; }
4969 if ${pgac_cv_prog_cc_cflags_pOlibmerrno+:} false; then :
4970   $as_echo_n "(cached) " >&6
4971 else
4972   pgac_save_CFLAGS=$CFLAGS
4973 CFLAGS="$pgac_save_CFLAGS +Olibmerrno"
4974 ac_save_c_werror_flag=$ac_c_werror_flag
4975 ac_c_werror_flag=yes
4976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4977 /* end confdefs.h.  */
4978
4979 int
4980 main ()
4981 {
4982
4983   ;
4984   return 0;
4985 }
4986 _ACEOF
4987 if ac_fn_c_try_compile "$LINENO"; then :
4988   pgac_cv_prog_cc_cflags_pOlibmerrno=yes
4989 else
4990   pgac_cv_prog_cc_cflags_pOlibmerrno=no
4991 fi
4992 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4993 ac_c_werror_flag=$ac_save_c_werror_flag
4994 CFLAGS="$pgac_save_CFLAGS"
4995 fi
4996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags_pOlibmerrno" >&5
4997 $as_echo "$pgac_cv_prog_cc_cflags_pOlibmerrno" >&6; }
4998 if test x"$pgac_cv_prog_cc_cflags_pOlibmerrno" = x"yes"; then
4999   CFLAGS="$CFLAGS +Olibmerrno"
5000 fi
5001
5002 fi
5003
5004 CFLAGS_VECTOR=$CFLAGS_VECTOR
5005
5006
5007 # supply -g if --enable-debug
5008 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
5009   CFLAGS="$CFLAGS -g"
5010 fi
5011
5012 # enable code coverage if --enable-coverage
5013 if test "$enable_coverage" = yes; then
5014   if test "$GCC" = yes; then
5015     CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
5016   else
5017     as_fn_error $? "--enable-coverage is supported only when using GCC" "$LINENO" 5
5018   fi
5019 fi
5020
5021 # enable profiling if --enable-profiling
5022 if test "$enable_profiling" = yes && test "$ac_cv_prog_cc_g" = yes; then
5023   if test "$GCC" = yes; then
5024
5025 $as_echo "#define PROFILE_PID_DIR 1" >>confdefs.h
5026
5027     CFLAGS="$CFLAGS -pg $PLATFORM_PROFILE_FLAGS"
5028   else
5029     as_fn_error $? "--enable-profiling is supported only when using GCC" "$LINENO" 5
5030   fi
5031 fi
5032
5033 # We already have this in Makefile.win32, but configure needs it too
5034 if test "$PORTNAME" = "win32"; then
5035   CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32 -DEXEC_BACKEND"
5036 fi
5037
5038 # Now that we're done automatically adding stuff to CFLAGS, put back the
5039 # user-specified flags (if any) at the end.  This lets users override
5040 # the automatic additions.
5041 CFLAGS="$CFLAGS $user_CFLAGS"
5042
5043 # Check if the compiler still works with the final flag settings
5044 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler still works" >&5
5045 $as_echo_n "checking whether the C compiler still works... " >&6; }
5046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5047 /* end confdefs.h.  */
5048
5049 int
5050 main ()
5051 {
5052 return 0;
5053   ;
5054   return 0;
5055 }
5056 _ACEOF
5057 if ac_fn_c_try_link "$LINENO"; then :
5058   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5059 $as_echo "yes" >&6; }
5060 else
5061   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5062 $as_echo "no" >&6; }
5063    as_fn_error $? "cannot proceed" "$LINENO" 5
5064 fi
5065 rm -f core conftest.err conftest.$ac_objext \
5066     conftest$ac_exeext conftest.$ac_ext
5067
5068 # Defend against gcc -ffast-math
5069 if test "$GCC" = yes; then
5070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5071 /* end confdefs.h.  */
5072
5073 int
5074 main ()
5075 {
5076 #ifdef __FAST_MATH__
5077 choke me
5078 #endif
5079   ;
5080   return 0;
5081 }
5082 _ACEOF
5083 if ac_fn_c_try_compile "$LINENO"; then :
5084
5085 else
5086   as_fn_error $? "do not put -ffast-math in CFLAGS" "$LINENO" 5
5087 fi
5088 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5089 fi
5090
5091 ac_ext=c
5092 ac_cpp='$CPP $CPPFLAGS'
5093 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5094 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5095 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5097 $as_echo_n "checking how to run the C preprocessor... " >&6; }
5098 # On Suns, sometimes $CPP names a directory.
5099 if test -n "$CPP" && test -d "$CPP"; then
5100   CPP=
5101 fi
5102 if test -z "$CPP"; then
5103   if ${ac_cv_prog_CPP+:} false; then :
5104   $as_echo_n "(cached) " >&6
5105 else
5106       # Double quotes because CPP needs to be expanded
5107     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
5108     do
5109       ac_preproc_ok=false
5110 for ac_c_preproc_warn_flag in '' yes
5111 do
5112   # Use a header file that comes with gcc, so configuring glibc
5113   # with a fresh cross-compiler works.
5114   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5115   # <limits.h> exists even on freestanding compilers.
5116   # On the NeXT, cc -E runs the code through the compiler's parser,
5117   # not just through cpp. "Syntax error" is here to catch this case.
5118   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5119 /* end confdefs.h.  */
5120 #ifdef __STDC__
5121 # include <limits.h>
5122 #else
5123 # include <assert.h>
5124 #endif
5125                      Syntax error
5126 _ACEOF
5127 if ac_fn_c_try_cpp "$LINENO"; then :
5128
5129 else
5130   # Broken: fails on valid input.
5131 continue
5132 fi
5133 rm -f conftest.err conftest.i conftest.$ac_ext
5134
5135   # OK, works on sane cases.  Now check whether nonexistent headers
5136   # can be detected and how.
5137   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5138 /* end confdefs.h.  */
5139 #include <ac_nonexistent.h>
5140 _ACEOF
5141 if ac_fn_c_try_cpp "$LINENO"; then :
5142   # Broken: success on invalid input.
5143 continue
5144 else
5145   # Passes both tests.
5146 ac_preproc_ok=:
5147 break
5148 fi
5149 rm -f conftest.err conftest.i conftest.$ac_ext
5150
5151 done
5152 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5153 rm -f conftest.i conftest.err conftest.$ac_ext
5154 if $ac_preproc_ok; then :
5155   break
5156 fi
5157
5158     done
5159     ac_cv_prog_CPP=$CPP
5160
5161 fi
5162   CPP=$ac_cv_prog_CPP
5163 else
5164   ac_cv_prog_CPP=$CPP
5165 fi
5166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5167 $as_echo "$CPP" >&6; }
5168 ac_preproc_ok=false
5169 for ac_c_preproc_warn_flag in '' yes
5170 do
5171   # Use a header file that comes with gcc, so configuring glibc
5172   # with a fresh cross-compiler works.
5173   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5174   # <limits.h> exists even on freestanding compilers.
5175   # On the NeXT, cc -E runs the code through the compiler's parser,
5176   # not just through cpp. "Syntax error" is here to catch this case.
5177   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5178 /* end confdefs.h.  */
5179 #ifdef __STDC__
5180 # include <limits.h>
5181 #else
5182 # include <assert.h>
5183 #endif
5184                      Syntax error
5185 _ACEOF
5186 if ac_fn_c_try_cpp "$LINENO"; then :
5187
5188 else
5189   # Broken: fails on valid input.
5190 continue
5191 fi
5192 rm -f conftest.err conftest.i conftest.$ac_ext
5193
5194   # OK, works on sane cases.  Now check whether nonexistent headers
5195   # can be detected and how.
5196   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5197 /* end confdefs.h.  */
5198 #include <ac_nonexistent.h>
5199 _ACEOF
5200 if ac_fn_c_try_cpp "$LINENO"; then :
5201   # Broken: success on invalid input.
5202 continue
5203 else
5204   # Passes both tests.
5205 ac_preproc_ok=:
5206 break
5207 fi
5208 rm -f conftest.err conftest.i conftest.$ac_ext
5209
5210 done
5211 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5212 rm -f conftest.i conftest.err conftest.$ac_ext
5213 if $ac_preproc_ok; then :
5214
5215 else
5216   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5217 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5218 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
5219 See \`config.log' for more details" "$LINENO" 5; }
5220 fi
5221
5222 ac_ext=c
5223 ac_cpp='$CPP $CPPFLAGS'
5224 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5225 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5226 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5227
5228
5229
5230
5231 #
5232 # Set up TAS assembly code if needed; the template file has now had its
5233 # chance to request this.
5234 #
5235 ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
5236
5237
5238 if test "$need_tas" = yes ; then
5239   TAS=tas.o
5240 else
5241   TAS=""
5242 fi
5243
5244
5245
5246 #
5247 # Automatic dependency tracking
5248 #
5249
5250
5251 # Check whether --enable-depend was given.
5252 if test "${enable_depend+set}" = set; then :
5253   enableval=$enable_depend;
5254   case $enableval in
5255     yes)
5256       autodepend=yes
5257       ;;
5258     no)
5259       :
5260       ;;
5261     *)
5262       as_fn_error $? "no argument expected for --enable-depend option" "$LINENO" 5
5263       ;;
5264   esac
5265
5266 else
5267   enable_depend=no
5268
5269 fi
5270
5271
5272
5273
5274
5275 #
5276 # Enable assert checks
5277 #
5278
5279
5280 # Check whether --enable-cassert was given.
5281 if test "${enable_cassert+set}" = set; then :
5282   enableval=$enable_cassert;
5283   case $enableval in
5284     yes)
5285
5286 $as_echo "#define USE_ASSERT_CHECKING 1" >>confdefs.h
5287
5288       ;;
5289     no)
5290       :
5291       ;;
5292     *)
5293       as_fn_error $? "no argument expected for --enable-cassert option" "$LINENO" 5
5294       ;;
5295   esac
5296
5297 else
5298   enable_cassert=no
5299
5300 fi
5301
5302
5303
5304
5305 #
5306 # Include directories
5307 #
5308 ac_save_IFS=$IFS
5309 IFS="${IFS}${PATH_SEPARATOR}"
5310 # SRCH_INC comes from the template file
5311 for dir in $with_includes $SRCH_INC; do
5312   if test -d "$dir"; then
5313     INCLUDES="$INCLUDES -I$dir"
5314   else
5315     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Include directory $dir does not exist." >&5
5316 $as_echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
5317   fi
5318 done
5319 IFS=$ac_save_IFS
5320
5321
5322
5323 #
5324 # Library directories
5325 #
5326 ac_save_IFS=$IFS
5327 IFS="${IFS}${PATH_SEPARATOR}"
5328 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
5329 for dir in $LIBRARY_DIRS $SRCH_LIB; do
5330   if test -d "$dir"; then
5331     LIBDIRS="$LIBDIRS -L$dir"
5332   else
5333     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Library directory $dir does not exist." >&5
5334 $as_echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
5335   fi
5336 done
5337 IFS=$ac_save_IFS
5338
5339 #
5340 # Enable thread-safe client libraries
5341 #
5342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking allow thread-safe client libraries" >&5
5343 $as_echo_n "checking allow thread-safe client libraries... " >&6; }
5344
5345
5346 # Check whether --enable-thread-safety was given.
5347 if test "${enable_thread_safety+set}" = set; then :
5348   enableval=$enable_thread_safety;
5349   case $enableval in
5350     yes)
5351       :
5352       ;;
5353     no)
5354       :
5355       ;;
5356     *)
5357       as_fn_error $? "no argument expected for --enable-thread-safety option" "$LINENO" 5
5358       ;;
5359   esac
5360
5361 else
5362   enable_thread_safety=yes
5363
5364 fi
5365
5366
5367 if test "$enable_thread_safety" = yes; then
5368
5369 $as_echo "#define ENABLE_THREAD_SAFETY 1" >>confdefs.h
5370
5371 fi
5372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_thread_safety" >&5
5373 $as_echo "$enable_thread_safety" >&6; }
5374
5375
5376 #
5377 # ICU
5378 #
5379 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with ICU support" >&5
5380 $as_echo_n "checking whether to build with ICU support... " >&6; }
5381
5382
5383
5384 # Check whether --with-icu was given.
5385 if test "${with_icu+set}" = set; then :
5386   withval=$with_icu;
5387   case $withval in
5388     yes)
5389
5390 $as_echo "#define USE_ICU 1" >>confdefs.h
5391
5392       ;;
5393     no)
5394       :
5395       ;;
5396     *)
5397       as_fn_error $? "no argument expected for --with-icu option" "$LINENO" 5
5398       ;;
5399   esac
5400
5401 else
5402   with_icu=no
5403
5404 fi
5405
5406
5407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icu" >&5
5408 $as_echo "$with_icu" >&6; }
5409
5410
5411 if test "$with_icu" = yes; then
5412
5413
5414
5415
5416
5417
5418
5419 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
5420         if test -n "$ac_tool_prefix"; then
5421   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
5422 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
5423 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5424 $as_echo_n "checking for $ac_word... " >&6; }
5425 if ${ac_cv_path_PKG_CONFIG+:} false; then :
5426   $as_echo_n "(cached) " >&6
5427 else
5428   case $PKG_CONFIG in
5429   [\\/]* | ?:[\\/]*)
5430   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
5431   ;;
5432   *)
5433   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5434 for as_dir in $PATH
5435 do
5436   IFS=$as_save_IFS
5437   test -z "$as_dir" && as_dir=.
5438     for ac_exec_ext in '' $ac_executable_extensions; do
5439   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5440     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
5441     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5442     break 2
5443   fi
5444 done
5445   done
5446 IFS=$as_save_IFS
5447
5448   ;;
5449 esac
5450 fi
5451 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
5452 if test -n "$PKG_CONFIG"; then
5453   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
5454 $as_echo "$PKG_CONFIG" >&6; }
5455 else
5456   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5457 $as_echo "no" >&6; }
5458 fi
5459
5460
5461 fi
5462 if test -z "$ac_cv_path_PKG_CONFIG"; then
5463   ac_pt_PKG_CONFIG=$PKG_CONFIG
5464   # Extract the first word of "pkg-config", so it can be a program name with args.
5465 set dummy pkg-config; ac_word=$2
5466 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5467 $as_echo_n "checking for $ac_word... " >&6; }
5468 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
5469   $as_echo_n "(cached) " >&6
5470 else
5471   case $ac_pt_PKG_CONFIG in
5472   [\\/]* | ?:[\\/]*)
5473   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
5474   ;;
5475   *)
5476   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5477 for as_dir in $PATH
5478 do
5479   IFS=$as_save_IFS
5480   test -z "$as_dir" && as_dir=.
5481     for ac_exec_ext in '' $ac_executable_extensions; do
5482   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5483     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
5484     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5485     break 2
5486   fi
5487 done
5488   done
5489 IFS=$as_save_IFS
5490
5491   ;;
5492 esac
5493 fi
5494 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
5495 if test -n "$ac_pt_PKG_CONFIG"; then
5496   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
5497 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
5498 else
5499   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5500 $as_echo "no" >&6; }
5501 fi
5502
5503   if test "x$ac_pt_PKG_CONFIG" = x; then
5504     PKG_CONFIG=""
5505   else
5506     case $cross_compiling:$ac_tool_warned in
5507 yes:)
5508 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5509 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5510 ac_tool_warned=yes ;;
5511 esac
5512     PKG_CONFIG=$ac_pt_PKG_CONFIG
5513   fi
5514 else
5515   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
5516 fi
5517
5518 fi
5519 if test -n "$PKG_CONFIG"; then
5520         _pkg_min_version=0.9.0
5521         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
5522 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
5523         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
5524                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5525 $as_echo "yes" >&6; }
5526         else
5527                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5528 $as_echo "no" >&6; }
5529                 PKG_CONFIG=""
5530         fi
5531 fi
5532
5533 pkg_failed=no
5534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icu-uc icu-i18n" >&5
5535 $as_echo_n "checking for icu-uc icu-i18n... " >&6; }
5536
5537 if test -n "$ICU_CFLAGS"; then
5538     pkg_cv_ICU_CFLAGS="$ICU_CFLAGS"
5539  elif test -n "$PKG_CONFIG"; then
5540     if test -n "$PKG_CONFIG" && \
5541     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
5542   ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
5543   ac_status=$?
5544   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5545   test $ac_status = 0; }; then
5546   pkg_cv_ICU_CFLAGS=`$PKG_CONFIG --cflags "icu-uc icu-i18n" 2>/dev/null`
5547                       test "x$?" != "x0" && pkg_failed=yes
5548 else
5549   pkg_failed=yes
5550 fi
5551  else
5552     pkg_failed=untried
5553 fi
5554 if test -n "$ICU_LIBS"; then
5555     pkg_cv_ICU_LIBS="$ICU_LIBS"
5556  elif test -n "$PKG_CONFIG"; then
5557     if test -n "$PKG_CONFIG" && \
5558     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
5559   ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
5560   ac_status=$?
5561   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5562   test $ac_status = 0; }; then
5563   pkg_cv_ICU_LIBS=`$PKG_CONFIG --libs "icu-uc icu-i18n" 2>/dev/null`
5564                       test "x$?" != "x0" && pkg_failed=yes
5565 else
5566   pkg_failed=yes
5567 fi
5568  else
5569     pkg_failed=untried
5570 fi
5571
5572
5573
5574 if test $pkg_failed = yes; then
5575         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5576 $as_echo "no" >&6; }
5577
5578 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
5579         _pkg_short_errors_supported=yes
5580 else
5581         _pkg_short_errors_supported=no
5582 fi
5583         if test $_pkg_short_errors_supported = yes; then
5584                 ICU_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
5585         else
5586                 ICU_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
5587         fi
5588         # Put the nasty error message in config.log where it belongs
5589         echo "$ICU_PKG_ERRORS" >&5
5590
5591         as_fn_error $? "Package requirements (icu-uc icu-i18n) were not met:
5592
5593 $ICU_PKG_ERRORS
5594
5595 Consider adjusting the PKG_CONFIG_PATH environment variable if you
5596 installed software in a non-standard prefix.
5597
5598 Alternatively, you may set the environment variables ICU_CFLAGS
5599 and ICU_LIBS to avoid the need to call pkg-config.
5600 See the pkg-config man page for more details." "$LINENO" 5
5601 elif test $pkg_failed = untried; then
5602         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5603 $as_echo "no" >&6; }
5604         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5605 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5606 as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
5607 is in your PATH or set the PKG_CONFIG environment variable to the full
5608 path to pkg-config.
5609
5610 Alternatively, you may set the environment variables ICU_CFLAGS
5611 and ICU_LIBS to avoid the need to call pkg-config.
5612 See the pkg-config man page for more details.
5613
5614 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
5615 See \`config.log' for more details" "$LINENO" 5; }
5616 else
5617         ICU_CFLAGS=$pkg_cv_ICU_CFLAGS
5618         ICU_LIBS=$pkg_cv_ICU_LIBS
5619         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5620 $as_echo "yes" >&6; }
5621
5622 fi
5623 fi
5624
5625 #
5626 # Optionally build Tcl modules (PL/Tcl)
5627 #
5628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Tcl" >&5
5629 $as_echo_n "checking whether to build with Tcl... " >&6; }
5630
5631
5632
5633 # Check whether --with-tcl was given.
5634 if test "${with_tcl+set}" = set; then :
5635   withval=$with_tcl;
5636   case $withval in
5637     yes)
5638       :
5639       ;;
5640     no)
5641       :
5642       ;;
5643     *)
5644       as_fn_error $? "no argument expected for --with-tcl option" "$LINENO" 5
5645       ;;
5646   esac
5647
5648 else
5649   with_tcl=no
5650
5651 fi
5652
5653
5654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcl" >&5
5655 $as_echo "$with_tcl" >&6; }
5656
5657
5658 # We see if the path to the Tcl/Tk configuration scripts is specified.
5659 # This will override the use of tclsh to find the paths to search.
5660
5661
5662
5663
5664 # Check whether --with-tclconfig was given.
5665 if test "${with_tclconfig+set}" = set; then :
5666   withval=$with_tclconfig;
5667   case $withval in
5668     yes)
5669       as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
5670       ;;
5671     no)
5672       as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
5673       ;;
5674     *)
5675
5676       ;;
5677   esac
5678
5679 fi
5680
5681
5682
5683 #
5684 # Optionally build Perl modules (PL/Perl)
5685 #
5686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Perl modules" >&5
5687 $as_echo_n "checking whether to build Perl modules... " >&6; }
5688
5689
5690
5691 # Check whether --with-perl was given.
5692 if test "${with_perl+set}" = set; then :
5693   withval=$with_perl;
5694   case $withval in
5695     yes)
5696       :
5697       ;;
5698     no)
5699       :
5700       ;;
5701     *)
5702       as_fn_error $? "no argument expected for --with-perl option" "$LINENO" 5
5703       ;;
5704   esac
5705
5706 else
5707   with_perl=no
5708
5709 fi
5710
5711
5712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_perl" >&5
5713 $as_echo "$with_perl" >&6; }
5714
5715
5716 #
5717 # Optionally build Python modules (PL/Python)
5718 #
5719 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Python modules" >&5
5720 $as_echo_n "checking whether to build Python modules... " >&6; }
5721
5722
5723
5724 # Check whether --with-python was given.
5725 if test "${with_python+set}" = set; then :
5726   withval=$with_python;
5727   case $withval in
5728     yes)
5729       :
5730       ;;
5731     no)
5732       :
5733       ;;
5734     *)
5735       as_fn_error $? "no argument expected for --with-python option" "$LINENO" 5
5736       ;;
5737   esac
5738
5739 else
5740   with_python=no
5741
5742 fi
5743
5744
5745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
5746 $as_echo "$with_python" >&6; }
5747
5748
5749 #
5750 # GSSAPI
5751 #
5752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with GSSAPI support" >&5
5753 $as_echo_n "checking whether to build with GSSAPI support... " >&6; }
5754
5755
5756
5757 # Check whether --with-gssapi was given.
5758 if test "${with_gssapi+set}" = set; then :
5759   withval=$with_gssapi;
5760   case $withval in
5761     yes)
5762
5763
5764 $as_echo "#define ENABLE_GSS 1" >>confdefs.h
5765
5766   krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
5767
5768       ;;
5769     no)
5770       :
5771       ;;
5772     *)
5773       as_fn_error $? "no argument expected for --with-gssapi option" "$LINENO" 5
5774       ;;
5775   esac
5776
5777 else
5778   with_gssapi=no
5779
5780 fi
5781
5782
5783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_gssapi" >&5
5784 $as_echo "$with_gssapi" >&6; }
5785
5786
5787
5788
5789
5790 #
5791 # Kerberos configuration parameters
5792 #
5793
5794
5795
5796 # Check whether --with-krb-srvnam was given.
5797 if test "${with_krb_srvnam+set}" = set; then :
5798   withval=$with_krb_srvnam;
5799   case $withval in
5800     yes)
5801       as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
5802       ;;
5803     no)
5804       as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
5805       ;;
5806     *)
5807
5808       ;;
5809   esac
5810
5811 else
5812   with_krb_srvnam="postgres"
5813 fi
5814
5815
5816
5817 cat >>confdefs.h <<_ACEOF
5818 #define PG_KRB_SRVNAM "$with_krb_srvnam"
5819 _ACEOF
5820
5821
5822
5823 #
5824 # PAM
5825 #
5826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with PAM support" >&5
5827 $as_echo_n "checking whether to build with PAM support... " >&6; }
5828
5829
5830
5831 # Check whether --with-pam was given.
5832 if test "${with_pam+set}" = set; then :
5833   withval=$with_pam;
5834   case $withval in
5835     yes)
5836
5837 $as_echo "#define USE_PAM 1" >>confdefs.h
5838
5839       ;;
5840     no)
5841       :
5842       ;;
5843     *)
5844       as_fn_error $? "no argument expected for --with-pam option" "$LINENO" 5
5845       ;;
5846   esac
5847
5848 else
5849   with_pam=no
5850
5851 fi
5852
5853
5854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pam" >&5
5855 $as_echo "$with_pam" >&6; }
5856
5857
5858 #
5859 # BSD AUTH
5860 #
5861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with BSD Authentication support" >&5
5862 $as_echo_n "checking whether to build with BSD Authentication support... " >&6; }
5863
5864
5865
5866 # Check whether --with-bsd-auth was given.
5867 if test "${with_bsd_auth+set}" = set; then :
5868   withval=$with_bsd_auth;
5869   case $withval in
5870     yes)
5871
5872 $as_echo "#define USE_BSD_AUTH 1" >>confdefs.h
5873
5874       ;;
5875     no)
5876       :
5877       ;;
5878     *)
5879       as_fn_error $? "no argument expected for --with-bsd-auth option" "$LINENO" 5
5880       ;;
5881   esac
5882
5883 else
5884   with_bsd_auth=no
5885
5886 fi
5887
5888
5889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bsd_auth" >&5
5890 $as_echo "$with_bsd_auth" >&6; }
5891
5892
5893 #
5894 # LDAP
5895 #
5896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LDAP support" >&5
5897 $as_echo_n "checking whether to build with LDAP support... " >&6; }
5898
5899
5900
5901 # Check whether --with-ldap was given.
5902 if test "${with_ldap+set}" = set; then :
5903   withval=$with_ldap;
5904   case $withval in
5905     yes)
5906
5907 $as_echo "#define USE_LDAP 1" >>confdefs.h
5908
5909       ;;
5910     no)
5911       :
5912       ;;
5913     *)
5914       as_fn_error $? "no argument expected for --with-ldap option" "$LINENO" 5
5915       ;;
5916   esac
5917
5918 else
5919   with_ldap=no
5920
5921 fi
5922
5923
5924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_ldap" >&5
5925 $as_echo "$with_ldap" >&6; }
5926
5927
5928 #
5929 # Bonjour
5930 #
5931 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Bonjour support" >&5
5932 $as_echo_n "checking whether to build with Bonjour support... " >&6; }
5933
5934
5935
5936 # Check whether --with-bonjour was given.
5937 if test "${with_bonjour+set}" = set; then :
5938   withval=$with_bonjour;
5939   case $withval in
5940     yes)
5941
5942 $as_echo "#define USE_BONJOUR 1" >>confdefs.h
5943
5944       ;;
5945     no)
5946       :
5947       ;;
5948     *)
5949       as_fn_error $? "no argument expected for --with-bonjour option" "$LINENO" 5
5950       ;;
5951   esac
5952
5953 else
5954   with_bonjour=no
5955
5956 fi
5957
5958
5959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bonjour" >&5
5960 $as_echo "$with_bonjour" >&6; }
5961
5962
5963 #
5964 # OpenSSL
5965 #
5966 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with OpenSSL support" >&5
5967 $as_echo_n "checking whether to build with OpenSSL support... " >&6; }
5968
5969
5970
5971 # Check whether --with-openssl was given.
5972 if test "${with_openssl+set}" = set; then :
5973   withval=$with_openssl;
5974   case $withval in
5975     yes)
5976
5977 $as_echo "#define USE_OPENSSL 1" >>confdefs.h
5978
5979       ;;
5980     no)
5981       :
5982       ;;
5983     *)
5984       as_fn_error $? "no argument expected for --with-openssl option" "$LINENO" 5
5985       ;;
5986   esac
5987
5988 else
5989   with_openssl=no
5990
5991 fi
5992
5993
5994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_openssl" >&5
5995 $as_echo "$with_openssl" >&6; }
5996
5997
5998 #
5999 # SELinux
6000 #
6001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with SELinux support" >&5
6002 $as_echo_n "checking whether to build with SELinux support... " >&6; }
6003
6004
6005
6006 # Check whether --with-selinux was given.
6007 if test "${with_selinux+set}" = set; then :
6008   withval=$with_selinux;
6009   case $withval in
6010     yes)
6011       :
6012       ;;
6013     no)
6014       :
6015       ;;
6016     *)
6017       as_fn_error $? "no argument expected for --with-selinux option" "$LINENO" 5
6018       ;;
6019   esac
6020
6021 else
6022   with_selinux=no
6023
6024 fi
6025
6026
6027
6028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_selinux" >&5
6029 $as_echo "$with_selinux" >&6; }
6030
6031 #
6032 # Systemd
6033 #
6034 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with systemd support" >&5
6035 $as_echo_n "checking whether to build with systemd support... " >&6; }
6036
6037
6038
6039 # Check whether --with-systemd was given.
6040 if test "${with_systemd+set}" = set; then :
6041   withval=$with_systemd;
6042   case $withval in
6043     yes)
6044
6045 $as_echo "#define USE_SYSTEMD 1" >>confdefs.h
6046
6047       ;;
6048     no)
6049       :
6050       ;;
6051     *)
6052       as_fn_error $? "no argument expected for --with-systemd option" "$LINENO" 5
6053       ;;
6054   esac
6055
6056 else
6057   with_systemd=no
6058
6059 fi
6060
6061
6062
6063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_systemd" >&5
6064 $as_echo "$with_systemd" >&6; }
6065
6066 #
6067 # Readline
6068 #
6069
6070
6071
6072 # Check whether --with-readline was given.
6073 if test "${with_readline+set}" = set; then :
6074   withval=$with_readline;
6075   case $withval in
6076     yes)
6077       :
6078       ;;
6079     no)
6080       :
6081       ;;
6082     *)
6083       as_fn_error $? "no argument expected for --with-readline option" "$LINENO" 5
6084       ;;
6085   esac
6086
6087 else
6088   with_readline=yes
6089
6090 fi
6091
6092
6093 # readline on MinGW has problems with backslashes in psql and other bugs.
6094 # This is particularly a problem with non-US code pages.
6095 # Therefore disable its use until we understand the cause. 2004-07-20
6096 if test "$PORTNAME" = "win32"; then
6097   if test "$with_readline" = yes; then
6098     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Readline does not work on MinGW --- disabling" >&5
6099 $as_echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
6100     with_readline=no
6101   fi
6102 fi
6103
6104
6105 #
6106 # Prefer libedit
6107 #
6108
6109
6110
6111 # Check whether --with-libedit-preferred was given.
6112 if test "${with_libedit_preferred+set}" = set; then :
6113   withval=$with_libedit_preferred;
6114   case $withval in
6115     yes)
6116       :
6117       ;;
6118     no)
6119       :
6120       ;;
6121     *)
6122       as_fn_error $? "no argument expected for --with-libedit-preferred option" "$LINENO" 5
6123       ;;
6124   esac
6125
6126 else
6127   with_libedit_preferred=no
6128
6129 fi
6130
6131
6132
6133
6134 #
6135 # UUID library
6136 #
6137 # There are at least three UUID libraries in common use: the FreeBSD/NetBSD
6138 # library, the e2fsprogs libuuid (now part of util-linux-ng), and the OSSP
6139 # UUID library.  More than one of these might be present on a given platform,
6140 # so we make the user say which one she wants.
6141 #
6142
6143
6144
6145 # Check whether --with-uuid was given.
6146 if test "${with_uuid+set}" = set; then :
6147   withval=$with_uuid;
6148   case $withval in
6149     yes)
6150       as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
6151       ;;
6152     no)
6153       as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
6154       ;;
6155     *)
6156
6157       ;;
6158   esac
6159
6160 fi
6161
6162
6163 if test x"$with_uuid" = x"" ; then
6164   with_uuid=no
6165 fi
6166
6167
6168
6169 # Check whether --with-ossp-uuid was given.
6170 if test "${with_ossp_uuid+set}" = set; then :
6171   withval=$with_ossp_uuid;
6172   case $withval in
6173     yes)
6174       :
6175       ;;
6176     no)
6177       :
6178       ;;
6179     *)
6180       as_fn_error $? "no argument expected for --with-ossp-uuid option" "$LINENO" 5
6181       ;;
6182   esac
6183
6184 else
6185   with_ossp_uuid=no
6186
6187 fi
6188
6189
6190 if test "$with_ossp_uuid" = yes ; then
6191   with_uuid=ossp
6192 fi
6193
6194 if test "$with_uuid" = bsd ; then
6195
6196 $as_echo "#define HAVE_UUID_BSD 1" >>confdefs.h
6197
6198   UUID_EXTRA_OBJS="md5.o sha1.o"
6199 elif test "$with_uuid" = e2fs ; then
6200
6201 $as_echo "#define HAVE_UUID_E2FS 1" >>confdefs.h
6202
6203   UUID_EXTRA_OBJS="md5.o sha1.o"
6204 elif test "$with_uuid" = ossp ; then
6205
6206 $as_echo "#define HAVE_UUID_OSSP 1" >>confdefs.h
6207
6208   UUID_EXTRA_OBJS=""
6209 elif test "$with_uuid" = no ; then
6210   UUID_EXTRA_OBJS=""
6211 else
6212   as_fn_error $? "--with-uuid must specify one of bsd, e2fs, or ossp" "$LINENO" 5
6213 fi
6214
6215
6216
6217
6218 #
6219 # XML
6220 #
6221
6222
6223
6224 # Check whether --with-libxml was given.
6225 if test "${with_libxml+set}" = set; then :
6226   withval=$with_libxml;
6227   case $withval in
6228     yes)
6229
6230 $as_echo "#define USE_LIBXML 1" >>confdefs.h
6231
6232       ;;
6233     no)
6234       :
6235       ;;
6236     *)
6237       as_fn_error $? "no argument expected for --with-libxml option" "$LINENO" 5
6238       ;;
6239   esac
6240
6241 else
6242   with_libxml=no
6243
6244 fi
6245
6246
6247
6248 if test "$with_libxml" = yes ; then
6249   if test -z "$XML2_CONFIG"; then
6250   for ac_prog in xml2-config
6251 do
6252   # Extract the first word of "$ac_prog", so it can be a program name with args.
6253 set dummy $ac_prog; ac_word=$2
6254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6255 $as_echo_n "checking for $ac_word... " >&6; }
6256 if ${ac_cv_path_XML2_CONFIG+:} false; then :
6257   $as_echo_n "(cached) " >&6
6258 else
6259   case $XML2_CONFIG in
6260   [\\/]* | ?:[\\/]*)
6261   ac_cv_path_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test with a path.
6262   ;;
6263   *)
6264   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6265 for as_dir in $PATH
6266 do
6267   IFS=$as_save_IFS
6268   test -z "$as_dir" && as_dir=.
6269     for ac_exec_ext in '' $ac_executable_extensions; do
6270   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6271     ac_cv_path_XML2_CONFIG="$as_dir/$ac_word$ac_exec_ext"
6272     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6273     break 2
6274   fi
6275 done
6276   done
6277 IFS=$as_save_IFS
6278
6279   ;;
6280 esac
6281 fi
6282 XML2_CONFIG=$ac_cv_path_XML2_CONFIG
6283 if test -n "$XML2_CONFIG"; then
6284   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
6285 $as_echo "$XML2_CONFIG" >&6; }
6286 else
6287   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6288 $as_echo "no" >&6; }
6289 fi
6290
6291
6292   test -n "$XML2_CONFIG" && break
6293 done
6294
6295 else
6296   # Report the value of XML2_CONFIG in configure's output in all cases.
6297   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML2_CONFIG" >&5
6298 $as_echo_n "checking for XML2_CONFIG... " >&6; }
6299   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
6300 $as_echo "$XML2_CONFIG" >&6; }
6301 fi
6302
6303   if test -n "$XML2_CONFIG"; then
6304     for pgac_option in `$XML2_CONFIG --cflags`; do
6305       case $pgac_option in
6306         -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
6307       esac
6308     done
6309     for pgac_option in `$XML2_CONFIG --libs`; do
6310       case $pgac_option in
6311         -L*) LDFLAGS="$LDFLAGS $pgac_option";;
6312       esac
6313     done
6314   fi
6315 fi
6316
6317
6318
6319 #
6320 # XSLT
6321 #
6322
6323
6324
6325 # Check whether --with-libxslt was given.
6326 if test "${with_libxslt+set}" = set; then :
6327   withval=$with_libxslt;
6328   case $withval in
6329     yes)
6330
6331 $as_echo "#define USE_LIBXSLT 1" >>confdefs.h
6332
6333       ;;
6334     no)
6335       :
6336       ;;
6337     *)
6338       as_fn_error $? "no argument expected for --with-libxslt option" "$LINENO" 5
6339       ;;
6340   esac
6341
6342 else
6343   with_libxslt=no
6344
6345 fi
6346
6347
6348
6349
6350
6351
6352 #
6353 # tzdata
6354 #
6355
6356
6357
6358 # Check whether --with-system-tzdata was given.
6359 if test "${with_system_tzdata+set}" = set; then :
6360   withval=$with_system_tzdata;
6361   case $withval in
6362     yes)
6363       as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
6364       ;;
6365     no)
6366       as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
6367       ;;
6368     *)
6369
6370       ;;
6371   esac
6372
6373 fi
6374
6375
6376
6377
6378 #
6379 # Zlib
6380 #
6381
6382
6383
6384 # Check whether --with-zlib was given.
6385 if test "${with_zlib+set}" = set; then :
6386   withval=$with_zlib;
6387   case $withval in
6388     yes)
6389       :
6390       ;;
6391     no)
6392       :
6393       ;;
6394     *)
6395       as_fn_error $? "no argument expected for --with-zlib option" "$LINENO" 5
6396       ;;
6397   esac
6398
6399 else
6400   with_zlib=yes
6401
6402 fi
6403
6404
6405
6406
6407 #
6408 # Elf
6409 #
6410
6411 # Assume system is ELF if it predefines __ELF__ as 1,
6412 # otherwise believe host_os based default.
6413 case $host_os in
6414     freebsd1*|freebsd2*) elf=no;;
6415     freebsd3*|freebsd4*) elf=yes;;
6416 esac
6417
6418
6419 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6420 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6421 if ${ac_cv_path_GREP+:} false; then :
6422   $as_echo_n "(cached) " >&6
6423 else
6424   if test -z "$GREP"; then
6425   ac_path_GREP_found=false
6426   # Loop through the user's path and test for each of PROGNAME-LIST
6427   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6428 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6429 do
6430   IFS=$as_save_IFS
6431   test -z "$as_dir" && as_dir=.
6432     for ac_prog in grep ggrep; do
6433     for ac_exec_ext in '' $ac_executable_extensions; do
6434       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6435       as_fn_executable_p "$ac_path_GREP" || continue
6436 # Check for GNU ac_path_GREP and select it if it is found.
6437   # Check for GNU $ac_path_GREP
6438 case `"$ac_path_GREP" --version 2>&1` in
6439 *GNU*)
6440   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6441 *)
6442   ac_count=0
6443   $as_echo_n 0123456789 >"conftest.in"
6444   while :
6445   do
6446     cat "conftest.in" "conftest.in" >"conftest.tmp"
6447     mv "conftest.tmp" "conftest.in"
6448     cp "conftest.in" "conftest.nl"
6449     $as_echo 'GREP' >> "conftest.nl"
6450     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6451     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6452     as_fn_arith $ac_count + 1 && ac_count=$as_val
6453     if test $ac_count -gt ${ac_path_GREP_max-0}; then
6454       # Best one so far, save it but keep looking for a better one
6455       ac_cv_path_GREP="$ac_path_GREP"
6456       ac_path_GREP_max=$ac_count
6457     fi
6458     # 10*(2^10) chars as input seems more than enough
6459     test $ac_count -gt 10 && break
6460   done
6461   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6462 esac
6463
6464       $ac_path_GREP_found && break 3
6465     done
6466   done
6467   done
6468 IFS=$as_save_IFS
6469   if test -z "$ac_cv_path_GREP"; then
6470     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6471   fi
6472 else
6473   ac_cv_path_GREP=$GREP
6474 fi
6475
6476 fi
6477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6478 $as_echo "$ac_cv_path_GREP" >&6; }
6479  GREP="$ac_cv_path_GREP"
6480
6481
6482 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6483 $as_echo_n "checking for egrep... " >&6; }
6484 if ${ac_cv_path_EGREP+:} false; then :
6485   $as_echo_n "(cached) " >&6
6486 else
6487   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6488    then ac_cv_path_EGREP="$GREP -E"
6489    else
6490      if test -z "$EGREP"; then
6491   ac_path_EGREP_found=false
6492   # Loop through the user's path and test for each of PROGNAME-LIST
6493   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6494 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6495 do
6496   IFS=$as_save_IFS
6497   test -z "$as_dir" && as_dir=.
6498     for ac_prog in egrep; do
6499     for ac_exec_ext in '' $ac_executable_extensions; do
6500       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6501       as_fn_executable_p "$ac_path_EGREP" || continue
6502 # Check for GNU ac_path_EGREP and select it if it is found.
6503   # Check for GNU $ac_path_EGREP
6504 case `"$ac_path_EGREP" --version 2>&1` in
6505 *GNU*)
6506   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6507 *)
6508   ac_count=0
6509   $as_echo_n 0123456789 >"conftest.in"
6510   while :
6511   do
6512     cat "conftest.in" "conftest.in" >"conftest.tmp"
6513     mv "conftest.tmp" "conftest.in"
6514     cp "conftest.in" "conftest.nl"
6515     $as_echo 'EGREP' >> "conftest.nl"
6516     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6517     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6518     as_fn_arith $ac_count + 1 && ac_count=$as_val
6519     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6520       # Best one so far, save it but keep looking for a better one
6521       ac_cv_path_EGREP="$ac_path_EGREP"
6522       ac_path_EGREP_max=$ac_count
6523     fi
6524     # 10*(2^10) chars as input seems more than enough
6525     test $ac_count -gt 10 && break
6526   done
6527   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6528 esac
6529
6530       $ac_path_EGREP_found && break 3
6531     done
6532   done
6533   done
6534 IFS=$as_save_IFS
6535   if test -z "$ac_cv_path_EGREP"; then
6536     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6537   fi
6538 else
6539   ac_cv_path_EGREP=$EGREP
6540 fi
6541
6542    fi
6543 fi
6544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6545 $as_echo "$ac_cv_path_EGREP" >&6; }
6546  EGREP="$ac_cv_path_EGREP"
6547
6548
6549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6550 /* end confdefs.h.  */
6551 #if __ELF__
6552   yes
6553 #endif
6554
6555 _ACEOF
6556 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6557   $EGREP "yes" >/dev/null 2>&1; then :
6558   ELF_SYS=true
6559 else
6560   if test "X$elf" = "Xyes" ; then
6561   ELF_SYS=true
6562 else
6563   ELF_SYS=
6564 fi
6565 fi
6566 rm -f conftest*
6567
6568
6569
6570 #
6571 # Assignments
6572 #
6573
6574 CPPFLAGS="$CPPFLAGS $INCLUDES"
6575 LDFLAGS="$LDFLAGS $LIBDIRS"
6576
6577
6578
6579
6580
6581 # Check whether --with-gnu-ld was given.
6582 if test "${with_gnu_ld+set}" = set; then :
6583   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
6584 else
6585   with_gnu_ld=no
6586 fi
6587
6588 ac_prog=ld
6589 if test "$GCC" = yes; then
6590   # Check if gcc -print-prog-name=ld gives a path.
6591   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
6592 $as_echo_n "checking for ld used by GCC... " >&6; }
6593   case $host in
6594   *-*-mingw*)
6595     # gcc leaves a trailing carriage return which upsets mingw
6596     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
6597   *)
6598     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
6599   esac
6600   case "$ac_prog" in
6601     # Accept absolute paths.
6602     [\\/]* | [A-Za-z]:[\\/]*)
6603       re_direlt='/[^/][^/]*/\.\./'
6604       # Canonicalize the path of ld
6605       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
6606       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
6607         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
6608       done
6609       test -z "$LD" && LD="$ac_prog"
6610       ;;
6611   "")
6612     # If it fails, then pretend we aren't using GCC.
6613     ac_prog=ld
6614     ;;
6615   *)
6616     # If it is relative, then search for the first ld in PATH.
6617     with_gnu_ld=unknown
6618     ;;
6619   esac
6620 elif test "$with_gnu_ld" = yes; then
6621   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
6622 $as_echo_n "checking for GNU ld... " >&6; }
6623 else
6624   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
6625 $as_echo_n "checking for non-GNU ld... " >&6; }
6626 fi
6627 if ${ac_cv_path_LD+:} false; then :
6628   $as_echo_n "(cached) " >&6
6629 else
6630   if test -z "$LD"; then
6631   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
6632   for ac_dir in $PATH; do
6633     test -z "$ac_dir" && ac_dir=.
6634     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
6635       ac_cv_path_LD="$ac_dir/$ac_prog"
6636       # Check to see if the program is GNU ld.  I'd rather use --version,
6637       # but apparently some GNU ld's only accept -v.
6638       # Break only if it was the GNU/non-GNU ld that we prefer.
6639       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
6640         test "$with_gnu_ld" != no && break
6641       else
6642         test "$with_gnu_ld" != yes && break
6643       fi
6644     fi
6645   done
6646   IFS="$ac_save_ifs"
6647 else
6648   ac_cv_path_LD="$LD" # Let the user override the test with a path.
6649 fi
6650 fi
6651
6652 LD="$ac_cv_path_LD"
6653 if test -n "$LD"; then
6654   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
6655 $as_echo "$LD" >&6; }
6656 else
6657   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6658 $as_echo "no" >&6; }
6659 fi
6660 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
6661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
6662 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
6663 if ${ac_cv_prog_gnu_ld+:} false; then :
6664   $as_echo_n "(cached) " >&6
6665 else
6666   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
6667 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
6668   ac_cv_prog_gnu_ld=yes
6669 else
6670   ac_cv_prog_gnu_ld=no
6671 fi
6672 fi
6673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gnu_ld" >&5
6674 $as_echo "$ac_cv_prog_gnu_ld" >&6; }
6675 with_gnu_ld=$ac_cv_prog_gnu_ld
6676
6677
6678
6679
6680 if test -n "$ac_tool_prefix"; then
6681   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6682 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6683 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6684 $as_echo_n "checking for $ac_word... " >&6; }
6685 if ${ac_cv_prog_RANLIB+:} false; then :
6686   $as_echo_n "(cached) " >&6
6687 else
6688   if test -n "$RANLIB"; then
6689   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6690 else
6691 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6692 for as_dir in $PATH
6693 do
6694   IFS=$as_save_IFS
6695   test -z "$as_dir" && as_dir=.
6696     for ac_exec_ext in '' $ac_executable_extensions; do
6697   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6698     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6699     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6700     break 2
6701   fi
6702 done
6703   done
6704 IFS=$as_save_IFS
6705
6706 fi
6707 fi
6708 RANLIB=$ac_cv_prog_RANLIB
6709 if test -n "$RANLIB"; then
6710   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6711 $as_echo "$RANLIB" >&6; }
6712 else
6713   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6714 $as_echo "no" >&6; }
6715 fi
6716
6717
6718 fi
6719 if test -z "$ac_cv_prog_RANLIB"; then
6720   ac_ct_RANLIB=$RANLIB
6721   # Extract the first word of "ranlib", so it can be a program name with args.
6722 set dummy ranlib; ac_word=$2
6723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6724 $as_echo_n "checking for $ac_word... " >&6; }
6725 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
6726   $as_echo_n "(cached) " >&6
6727 else
6728   if test -n "$ac_ct_RANLIB"; then
6729   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6730 else
6731 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6732 for as_dir in $PATH
6733 do
6734   IFS=$as_save_IFS
6735   test -z "$as_dir" && as_dir=.
6736     for ac_exec_ext in '' $ac_executable_extensions; do
6737   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6738     ac_cv_prog_ac_ct_RANLIB="ranlib"
6739     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6740     break 2
6741   fi
6742 done
6743   done
6744 IFS=$as_save_IFS
6745
6746 fi
6747 fi
6748 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6749 if test -n "$ac_ct_RANLIB"; then
6750   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6751 $as_echo "$ac_ct_RANLIB" >&6; }
6752 else
6753   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6754 $as_echo "no" >&6; }
6755 fi
6756
6757   if test "x$ac_ct_RANLIB" = x; then
6758     RANLIB=":"
6759   else
6760     case $cross_compiling:$ac_tool_warned in
6761 yes:)
6762 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6763 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6764 ac_tool_warned=yes ;;
6765 esac
6766     RANLIB=$ac_ct_RANLIB
6767   fi
6768 else
6769   RANLIB="$ac_cv_prog_RANLIB"
6770 fi
6771
6772
6773   if test -n "$ac_tool_prefix"; then
6774   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
6775 set dummy ${ac_tool_prefix}strip; ac_word=$2
6776 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6777 $as_echo_n "checking for $ac_word... " >&6; }
6778 if ${ac_cv_prog_STRIP+:} false; then :
6779   $as_echo_n "(cached) " >&6
6780 else
6781   if test -n "$STRIP"; then
6782   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
6783 else
6784 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6785 for as_dir in $PATH
6786 do
6787   IFS=$as_save_IFS
6788   test -z "$as_dir" && as_dir=.
6789     for ac_exec_ext in '' $ac_executable_extensions; do
6790   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6791     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
6792     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6793     break 2
6794   fi
6795 done
6796   done
6797 IFS=$as_save_IFS
6798
6799 fi
6800 fi
6801 STRIP=$ac_cv_prog_STRIP
6802 if test -n "$STRIP"; then
6803   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
6804 $as_echo "$STRIP" >&6; }
6805 else
6806   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6807 $as_echo "no" >&6; }
6808 fi
6809
6810
6811 fi
6812 if test -z "$ac_cv_prog_STRIP"; then
6813   ac_ct_STRIP=$STRIP
6814   # Extract the first word of "strip", so it can be a program name with args.
6815 set dummy strip; ac_word=$2
6816 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6817 $as_echo_n "checking for $ac_word... " >&6; }
6818 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
6819   $as_echo_n "(cached) " >&6
6820 else
6821   if test -n "$ac_ct_STRIP"; then
6822   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
6823 else
6824 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6825 for as_dir in $PATH
6826 do
6827   IFS=$as_save_IFS
6828   test -z "$as_dir" && as_dir=.
6829     for ac_exec_ext in '' $ac_executable_extensions; do
6830   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6831     ac_cv_prog_ac_ct_STRIP="strip"
6832     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6833     break 2
6834   fi
6835 done
6836   done
6837 IFS=$as_save_IFS
6838
6839 fi
6840 fi
6841 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
6842 if test -n "$ac_ct_STRIP"; then
6843   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
6844 $as_echo "$ac_ct_STRIP" >&6; }
6845 else
6846   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6847 $as_echo "no" >&6; }
6848 fi
6849
6850   if test "x$ac_ct_STRIP" = x; then
6851     STRIP=":"
6852   else
6853     case $cross_compiling:$ac_tool_warned in
6854 yes:)
6855 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6856 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6857 ac_tool_warned=yes ;;
6858 esac
6859     STRIP=$ac_ct_STRIP
6860   fi
6861 else
6862   STRIP="$ac_cv_prog_STRIP"
6863 fi
6864
6865
6866   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is possible to strip libraries" >&5
6867 $as_echo_n "checking whether it is possible to strip libraries... " >&6; }
6868   if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
6869     STRIP_STATIC_LIB="$STRIP -x"
6870     STRIP_SHARED_LIB="$STRIP --strip-unneeded"
6871     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6872 $as_echo "yes" >&6; }
6873   else
6874     case $host_os in
6875       darwin*)
6876         STRIP="$STRIP -x"
6877         STRIP_STATIC_LIB=$STRIP
6878         STRIP_SHARED_LIB=$STRIP
6879         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6880 $as_echo "yes" >&6; }
6881         ;;
6882       *)
6883         STRIP_STATIC_LIB=:
6884         STRIP_SHARED_LIB=:
6885         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6886 $as_echo "no" >&6; }
6887         ;;
6888     esac
6889   fi
6890
6891
6892
6893 if test -n "$ac_tool_prefix"; then
6894   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6895 set dummy ${ac_tool_prefix}ar; ac_word=$2
6896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6897 $as_echo_n "checking for $ac_word... " >&6; }
6898 if ${ac_cv_prog_AR+:} false; then :
6899   $as_echo_n "(cached) " >&6
6900 else
6901   if test -n "$AR"; then
6902   ac_cv_prog_AR="$AR" # Let the user override the test.
6903 else
6904 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6905 for as_dir in $PATH
6906 do
6907   IFS=$as_save_IFS
6908   test -z "$as_dir" && as_dir=.
6909     for ac_exec_ext in '' $ac_executable_extensions; do
6910   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6911     ac_cv_prog_AR="${ac_tool_prefix}ar"
6912     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6913     break 2
6914   fi
6915 done
6916   done
6917 IFS=$as_save_IFS
6918
6919 fi
6920 fi
6921 AR=$ac_cv_prog_AR
6922 if test -n "$AR"; then
6923   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6924 $as_echo "$AR" >&6; }
6925 else
6926   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6927 $as_echo "no" >&6; }
6928 fi
6929
6930
6931 fi
6932 if test -z "$ac_cv_prog_AR"; then
6933   ac_ct_AR=$AR
6934   # Extract the first word of "ar", so it can be a program name with args.
6935 set dummy ar; ac_word=$2
6936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6937 $as_echo_n "checking for $ac_word... " >&6; }
6938 if ${ac_cv_prog_ac_ct_AR+:} false; then :
6939   $as_echo_n "(cached) " >&6
6940 else
6941   if test -n "$ac_ct_AR"; then
6942   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6943 else
6944 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6945 for as_dir in $PATH
6946 do
6947   IFS=$as_save_IFS
6948   test -z "$as_dir" && as_dir=.
6949     for ac_exec_ext in '' $ac_executable_extensions; do
6950   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6951     ac_cv_prog_ac_ct_AR="ar"
6952     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6953     break 2
6954   fi
6955 done
6956   done
6957 IFS=$as_save_IFS
6958
6959 fi
6960 fi
6961 ac_ct_AR=$ac_cv_prog_ac_ct_AR
6962 if test -n "$ac_ct_AR"; then
6963   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6964 $as_echo "$ac_ct_AR" >&6; }
6965 else
6966   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6967 $as_echo "no" >&6; }
6968 fi
6969
6970   if test "x$ac_ct_AR" = x; then
6971     AR="ar"
6972   else
6973     case $cross_compiling:$ac_tool_warned in
6974 yes:)
6975 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6976 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6977 ac_tool_warned=yes ;;
6978 esac
6979     AR=$ac_ct_AR
6980   fi
6981 else
6982   AR="$ac_cv_prog_AR"
6983 fi
6984
6985 if test "$PORTNAME" = "win32"; then
6986   if test -n "$ac_tool_prefix"; then
6987   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
6988 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
6989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6990 $as_echo_n "checking for $ac_word... " >&6; }
6991 if ${ac_cv_prog_DLLTOOL+:} false; then :
6992   $as_echo_n "(cached) " >&6
6993 else
6994   if test -n "$DLLTOOL"; then
6995   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
6996 else
6997 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6998 for as_dir in $PATH
6999 do
7000   IFS=$as_save_IFS
7001   test -z "$as_dir" && as_dir=.
7002     for ac_exec_ext in '' $ac_executable_extensions; do
7003   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7004     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
7005     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7006     break 2
7007   fi
7008 done
7009   done
7010 IFS=$as_save_IFS
7011
7012 fi
7013 fi
7014 DLLTOOL=$ac_cv_prog_DLLTOOL
7015 if test -n "$DLLTOOL"; then
7016   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
7017 $as_echo "$DLLTOOL" >&6; }
7018 else
7019   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7020 $as_echo "no" >&6; }
7021 fi
7022
7023
7024 fi
7025 if test -z "$ac_cv_prog_DLLTOOL"; then
7026   ac_ct_DLLTOOL=$DLLTOOL
7027   # Extract the first word of "dlltool", so it can be a program name with args.
7028 set dummy dlltool; ac_word=$2
7029 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7030 $as_echo_n "checking for $ac_word... " >&6; }
7031 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
7032   $as_echo_n "(cached) " >&6
7033 else
7034   if test -n "$ac_ct_DLLTOOL"; then
7035   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
7036 else
7037 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7038 for as_dir in $PATH
7039 do
7040   IFS=$as_save_IFS
7041   test -z "$as_dir" && as_dir=.
7042     for ac_exec_ext in '' $ac_executable_extensions; do
7043   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7044     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
7045     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7046     break 2
7047   fi
7048 done
7049   done
7050 IFS=$as_save_IFS
7051
7052 fi
7053 fi
7054 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
7055 if test -n "$ac_ct_DLLTOOL"; then
7056   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
7057 $as_echo "$ac_ct_DLLTOOL" >&6; }
7058 else
7059   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7060 $as_echo "no" >&6; }
7061 fi
7062
7063   if test "x$ac_ct_DLLTOOL" = x; then
7064     DLLTOOL="dlltool"
7065   else
7066     case $cross_compiling:$ac_tool_warned in
7067 yes:)
7068 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7069 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7070 ac_tool_warned=yes ;;
7071 esac
7072     DLLTOOL=$ac_ct_DLLTOOL
7073   fi
7074 else
7075   DLLTOOL="$ac_cv_prog_DLLTOOL"
7076 fi
7077
7078   if test -n "$ac_tool_prefix"; then
7079   # Extract the first word of "${ac_tool_prefix}dllwrap", so it can be a program name with args.
7080 set dummy ${ac_tool_prefix}dllwrap; ac_word=$2
7081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7082 $as_echo_n "checking for $ac_word... " >&6; }
7083 if ${ac_cv_prog_DLLWRAP+:} false; then :
7084   $as_echo_n "(cached) " >&6
7085 else
7086   if test -n "$DLLWRAP"; then
7087   ac_cv_prog_DLLWRAP="$DLLWRAP" # Let the user override the test.
7088 else
7089 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7090 for as_dir in $PATH
7091 do
7092   IFS=$as_save_IFS
7093   test -z "$as_dir" && as_dir=.
7094     for ac_exec_ext in '' $ac_executable_extensions; do
7095   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7096     ac_cv_prog_DLLWRAP="${ac_tool_prefix}dllwrap"
7097     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7098     break 2
7099   fi
7100 done
7101   done
7102 IFS=$as_save_IFS
7103
7104 fi
7105 fi
7106 DLLWRAP=$ac_cv_prog_DLLWRAP
7107 if test -n "$DLLWRAP"; then
7108   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLWRAP" >&5
7109 $as_echo "$DLLWRAP" >&6; }
7110 else
7111   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7112 $as_echo "no" >&6; }
7113 fi
7114
7115
7116 fi
7117 if test -z "$ac_cv_prog_DLLWRAP"; then
7118   ac_ct_DLLWRAP=$DLLWRAP
7119   # Extract the first word of "dllwrap", so it can be a program name with args.
7120 set dummy dllwrap; ac_word=$2
7121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7122 $as_echo_n "checking for $ac_word... " >&6; }
7123 if ${ac_cv_prog_ac_ct_DLLWRAP+:} false; then :
7124   $as_echo_n "(cached) " >&6
7125 else
7126   if test -n "$ac_ct_DLLWRAP"; then
7127   ac_cv_prog_ac_ct_DLLWRAP="$ac_ct_DLLWRAP" # Let the user override the test.
7128 else
7129 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7130 for as_dir in $PATH
7131 do
7132   IFS=$as_save_IFS
7133   test -z "$as_dir" && as_dir=.
7134     for ac_exec_ext in '' $ac_executable_extensions; do
7135   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7136     ac_cv_prog_ac_ct_DLLWRAP="dllwrap"
7137     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7138     break 2
7139   fi
7140 done
7141   done
7142 IFS=$as_save_IFS
7143
7144 fi
7145 fi
7146 ac_ct_DLLWRAP=$ac_cv_prog_ac_ct_DLLWRAP
7147 if test -n "$ac_ct_DLLWRAP"; then
7148   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLWRAP" >&5
7149 $as_echo "$ac_ct_DLLWRAP" >&6; }
7150 else
7151   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7152 $as_echo "no" >&6; }
7153 fi
7154
7155   if test "x$ac_ct_DLLWRAP" = x; then
7156     DLLWRAP="dllwrap"
7157   else
7158     case $cross_compiling:$ac_tool_warned in
7159 yes:)
7160 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7161 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7162 ac_tool_warned=yes ;;
7163 esac
7164     DLLWRAP=$ac_ct_DLLWRAP
7165   fi
7166 else
7167   DLLWRAP="$ac_cv_prog_DLLWRAP"
7168 fi
7169
7170   if test -n "$ac_tool_prefix"; then
7171   # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
7172 set dummy ${ac_tool_prefix}windres; ac_word=$2
7173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7174 $as_echo_n "checking for $ac_word... " >&6; }
7175 if ${ac_cv_prog_WINDRES+:} false; then :
7176   $as_echo_n "(cached) " >&6
7177 else
7178   if test -n "$WINDRES"; then
7179   ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
7180 else
7181 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7182 for as_dir in $PATH
7183 do
7184   IFS=$as_save_IFS
7185   test -z "$as_dir" && as_dir=.
7186     for ac_exec_ext in '' $ac_executable_extensions; do
7187   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7188     ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
7189     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7190     break 2
7191   fi
7192 done
7193   done
7194 IFS=$as_save_IFS
7195
7196 fi
7197 fi
7198 WINDRES=$ac_cv_prog_WINDRES
7199 if test -n "$WINDRES"; then
7200   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
7201 $as_echo "$WINDRES" >&6; }
7202 else
7203   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7204 $as_echo "no" >&6; }
7205 fi
7206
7207
7208 fi
7209 if test -z "$ac_cv_prog_WINDRES"; then
7210   ac_ct_WINDRES=$WINDRES
7211   # Extract the first word of "windres", so it can be a program name with args.
7212 set dummy windres; ac_word=$2
7213 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7214 $as_echo_n "checking for $ac_word... " >&6; }
7215 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
7216   $as_echo_n "(cached) " >&6
7217 else
7218   if test -n "$ac_ct_WINDRES"; then
7219   ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
7220 else
7221 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7222 for as_dir in $PATH
7223 do
7224   IFS=$as_save_IFS
7225   test -z "$as_dir" && as_dir=.
7226     for ac_exec_ext in '' $ac_executable_extensions; do
7227   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7228     ac_cv_prog_ac_ct_WINDRES="windres"
7229     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7230     break 2
7231   fi
7232 done
7233   done
7234 IFS=$as_save_IFS
7235
7236 fi
7237 fi
7238 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
7239 if test -n "$ac_ct_WINDRES"; then
7240   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
7241 $as_echo "$ac_ct_WINDRES" >&6; }
7242 else
7243   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7244 $as_echo "no" >&6; }
7245 fi
7246
7247   if test "x$ac_ct_WINDRES" = x; then
7248     WINDRES="windres"
7249   else
7250     case $cross_compiling:$ac_tool_warned in
7251 yes:)
7252 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7253 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7254 ac_tool_warned=yes ;;
7255 esac
7256     WINDRES=$ac_ct_WINDRES
7257   fi
7258 else
7259   WINDRES="$ac_cv_prog_WINDRES"
7260 fi
7261
7262 fi
7263
7264 # Find a good install program.  We prefer a C program (faster),
7265 # so one script is as good as another.  But avoid the broken or
7266 # incompatible versions:
7267 # SysV /etc/install, /usr/sbin/install
7268 # SunOS /usr/etc/install
7269 # IRIX /sbin/install
7270 # AIX /bin/install
7271 # AmigaOS /C/install, which installs bootblocks on floppy discs
7272 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
7273 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
7274 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7275 # OS/2's system install, which has a completely different semantic
7276 # ./install, which can be erroneously created by make from ./install.sh.
7277 # Reject install programs that cannot install multiple files.
7278 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
7279 $as_echo_n "checking for a BSD-compatible install... " >&6; }
7280 if test -z "$INSTALL"; then
7281 if ${ac_cv_path_install+:} false; then :
7282   $as_echo_n "(cached) " >&6
7283 else
7284   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7285 for as_dir in $PATH
7286 do
7287   IFS=$as_save_IFS
7288   test -z "$as_dir" && as_dir=.
7289     # Account for people who put trailing slashes in PATH elements.
7290 case $as_dir/ in #((
7291   ./ | .// | /[cC]/* | \
7292   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
7293   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
7294   /usr/ucb/* ) ;;
7295   *)
7296     # OSF1 and SCO ODT 3.0 have their own names for install.
7297     # Don't use installbsd from OSF since it installs stuff as root
7298     # by default.
7299     for ac_prog in ginstall scoinst install; do
7300       for ac_exec_ext in '' $ac_executable_extensions; do
7301         if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
7302           if test $ac_prog = install &&
7303             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7304             # AIX install.  It has an incompatible calling convention.
7305             :
7306           elif test $ac_prog = install &&
7307             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7308             # program-specific install script used by HP pwplus--don't use.
7309             :
7310           else
7311             rm -rf conftest.one conftest.two conftest.dir
7312             echo one > conftest.one
7313             echo two > conftest.two
7314             mkdir conftest.dir
7315             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
7316               test -s conftest.one && test -s conftest.two &&
7317               test -s conftest.dir/conftest.one &&
7318               test -s conftest.dir/conftest.two
7319             then
7320               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
7321               break 3
7322             fi
7323           fi
7324         fi
7325       done
7326     done
7327     ;;
7328 esac
7329
7330   done
7331 IFS=$as_save_IFS
7332
7333 rm -rf conftest.one conftest.two conftest.dir
7334
7335 fi
7336   if test "${ac_cv_path_install+set}" = set; then
7337     INSTALL=$ac_cv_path_install
7338   else
7339     # As a last resort, use the slow shell script.  Don't cache a
7340     # value for INSTALL within a source directory, because that will
7341     # break other packages using the cache if that directory is
7342     # removed, or if the value is a relative name.
7343     INSTALL=$ac_install_sh
7344   fi
7345 fi
7346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
7347 $as_echo "$INSTALL" >&6; }
7348
7349 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7350 # It thinks the first close brace ends the variable substitution.
7351 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7352
7353 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
7354
7355 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
7356
7357 # When Autoconf chooses install-sh as install program it tries to generate
7358 # a relative path to it in each makefile where it substitutes it. This clashes
7359 # with our Makefile.global concept. This workaround helps.
7360 case $INSTALL in
7361   *install-sh*) install_bin='';;
7362   *) install_bin=$INSTALL;;
7363 esac
7364
7365
7366 if test -z "$TAR"; then
7367   for ac_prog in tar
7368 do
7369   # Extract the first word of "$ac_prog", so it can be a program name with args.
7370 set dummy $ac_prog; ac_word=$2
7371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7372 $as_echo_n "checking for $ac_word... " >&6; }
7373 if ${ac_cv_path_TAR+:} false; then :
7374   $as_echo_n "(cached) " >&6
7375 else
7376   case $TAR in
7377   [\\/]* | ?:[\\/]*)
7378   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
7379   ;;
7380   *)
7381   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7382 for as_dir in $PATH
7383 do
7384   IFS=$as_save_IFS
7385   test -z "$as_dir" && as_dir=.
7386     for ac_exec_ext in '' $ac_executable_extensions; do
7387   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7388     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
7389     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7390     break 2
7391   fi
7392 done
7393   done
7394 IFS=$as_save_IFS
7395
7396   ;;
7397 esac
7398 fi
7399 TAR=$ac_cv_path_TAR
7400 if test -n "$TAR"; then
7401   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
7402 $as_echo "$TAR" >&6; }
7403 else
7404   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7405 $as_echo "no" >&6; }
7406 fi
7407
7408
7409   test -n "$TAR" && break
7410 done
7411
7412 else
7413   # Report the value of TAR in configure's output in all cases.
7414   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
7415 $as_echo_n "checking for TAR... " >&6; }
7416   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
7417 $as_echo "$TAR" >&6; }
7418 fi
7419
7420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7421 $as_echo_n "checking whether ln -s works... " >&6; }
7422 LN_S=$as_ln_s
7423 if test "$LN_S" = "ln -s"; then
7424   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7425 $as_echo "yes" >&6; }
7426 else
7427   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7428 $as_echo "no, using $LN_S" >&6; }
7429 fi
7430
7431 for ac_prog in gawk mawk nawk awk
7432 do
7433   # Extract the first word of "$ac_prog", so it can be a program name with args.
7434 set dummy $ac_prog; ac_word=$2
7435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7436 $as_echo_n "checking for $ac_word... " >&6; }
7437 if ${ac_cv_prog_AWK+:} false; then :
7438   $as_echo_n "(cached) " >&6
7439 else
7440   if test -n "$AWK"; then
7441   ac_cv_prog_AWK="$AWK" # Let the user override the test.
7442 else
7443 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7444 for as_dir in $PATH
7445 do
7446   IFS=$as_save_IFS
7447   test -z "$as_dir" && as_dir=.
7448     for ac_exec_ext in '' $ac_executable_extensions; do
7449   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7450     ac_cv_prog_AWK="$ac_prog"
7451     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7452     break 2
7453   fi
7454 done
7455   done
7456 IFS=$as_save_IFS
7457
7458 fi
7459 fi
7460 AWK=$ac_cv_prog_AWK
7461 if test -n "$AWK"; then
7462   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7463 $as_echo "$AWK" >&6; }
7464 else
7465   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7466 $as_echo "no" >&6; }
7467 fi
7468
7469
7470   test -n "$AWK" && break
7471 done
7472
7473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
7474 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
7475 if test -z "$MKDIR_P"; then
7476   if ${ac_cv_path_mkdir+:} false; then :
7477   $as_echo_n "(cached) " >&6
7478 else
7479   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7480 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
7481 do
7482   IFS=$as_save_IFS
7483   test -z "$as_dir" && as_dir=.
7484     for ac_prog in mkdir gmkdir; do
7485          for ac_exec_ext in '' $ac_executable_extensions; do
7486            as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
7487            case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
7488              'mkdir (GNU coreutils) '* | \
7489              'mkdir (coreutils) '* | \
7490              'mkdir (fileutils) '4.1*)
7491                ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
7492                break 3;;
7493            esac
7494          done
7495        done
7496   done
7497 IFS=$as_save_IFS
7498
7499 fi
7500
7501   test -d ./--version && rmdir ./--version
7502   if test "${ac_cv_path_mkdir+set}" = set; then
7503     MKDIR_P="$ac_cv_path_mkdir -p"
7504   else
7505     # As a last resort, use the slow shell script.  Don't cache a
7506     # value for MKDIR_P within a source directory, because that will
7507     # break other packages using the cache if that directory is
7508     # removed, or if the value is a relative name.
7509     MKDIR_P="$ac_install_sh -d"
7510   fi
7511 fi
7512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
7513 $as_echo "$MKDIR_P" >&6; }
7514
7515 # When Autoconf chooses install-sh as mkdir -p program it tries to generate
7516 # a relative path to it in each makefile where it substitutes it. This clashes
7517 # with our Makefile.global concept. This workaround helps.
7518 case $MKDIR_P in
7519   *install-sh*) MKDIR_P='\${SHELL} \${top_srcdir}/config/install-sh -c -d';;
7520 esac
7521
7522 if test -z "$BISON"; then
7523   for ac_prog in bison
7524 do
7525   # Extract the first word of "$ac_prog", so it can be a program name with args.
7526 set dummy $ac_prog; ac_word=$2
7527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7528 $as_echo_n "checking for $ac_word... " >&6; }
7529 if ${ac_cv_path_BISON+:} false; then :
7530   $as_echo_n "(cached) " >&6
7531 else
7532   case $BISON in
7533   [\\/]* | ?:[\\/]*)
7534   ac_cv_path_BISON="$BISON" # Let the user override the test with a path.
7535   ;;
7536   *)
7537   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7538 for as_dir in $PATH
7539 do
7540   IFS=$as_save_IFS
7541   test -z "$as_dir" && as_dir=.
7542     for ac_exec_ext in '' $ac_executable_extensions; do
7543   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7544     ac_cv_path_BISON="$as_dir/$ac_word$ac_exec_ext"
7545     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7546     break 2
7547   fi
7548 done
7549   done
7550 IFS=$as_save_IFS
7551
7552   ;;
7553 esac
7554 fi
7555 BISON=$ac_cv_path_BISON
7556 if test -n "$BISON"; then
7557   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
7558 $as_echo "$BISON" >&6; }
7559 else
7560   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7561 $as_echo "no" >&6; }
7562 fi
7563
7564
7565   test -n "$BISON" && break
7566 done
7567
7568 else
7569   # Report the value of BISON in configure's output in all cases.
7570   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BISON" >&5
7571 $as_echo_n "checking for BISON... " >&6; }
7572   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
7573 $as_echo "$BISON" >&6; }
7574 fi
7575
7576
7577 if test "$BISON"; then
7578   pgac_bison_version=`$BISON --version 2>/dev/null | sed q`
7579   { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_bison_version" >&5
7580 $as_echo "$as_me: using $pgac_bison_version" >&6;}
7581   if echo "$pgac_bison_version" | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'
7582   then
7583     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7584 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
7585 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&5
7586 $as_echo "$as_me: WARNING:
7587 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
7588 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&2;}
7589     BISON=""
7590   fi
7591   # Bison >=3.0 issues warnings about %name-prefix="base_yy", instead
7592   # of the now preferred %name-prefix "base_yy", but the latter
7593   # doesn't work with Bison 2.3 or less.  So for now we silence the
7594   # deprecation warnings.
7595   if echo "$pgac_bison_version" | $AWK '{ if ($4 >= 3) exit 0; else exit 1;}'
7596   then
7597     BISONFLAGS="$BISONFLAGS -Wno-deprecated"
7598   fi
7599 fi
7600
7601 if test -z "$BISON"; then
7602   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7603 *** Without Bison you will not be able to build PostgreSQL from Git nor
7604 *** change any of the parser definition files.  You can obtain Bison from
7605 *** a GNU mirror site.  (If you are using the official distribution of
7606 *** PostgreSQL then you do not need to worry about this, because the Bison
7607 *** output is pre-generated.)" >&5
7608 $as_echo "$as_me: WARNING:
7609 *** Without Bison you will not be able to build PostgreSQL from Git nor
7610 *** change any of the parser definition files.  You can obtain Bison from
7611 *** a GNU mirror site.  (If you are using the official distribution of
7612 *** PostgreSQL then you do not need to worry about this, because the Bison
7613 *** output is pre-generated.)" >&2;}
7614 fi
7615 # We don't need AC_SUBST(BISON) because PGAC_PATH_PROGS did it
7616
7617
7618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flex" >&5
7619 $as_echo_n "checking for flex... " >&6; }
7620 if ${pgac_cv_path_flex+:} false; then :
7621   $as_echo_n "(cached) " >&6
7622 else
7623   # Let the user override the test
7624 if test -n "$FLEX"; then
7625   pgac_cv_path_flex=$FLEX
7626 else
7627   pgac_save_IFS=$IFS
7628   IFS=$PATH_SEPARATOR
7629   for pgac_dir in $PATH; do
7630     IFS=$pgac_save_IFS
7631     if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
7632       pgac_dir=`pwd`
7633     fi
7634     for pgac_prog in flex lex; do
7635       pgac_candidate="$pgac_dir/$pgac_prog"
7636       if test -f "$pgac_candidate" \
7637         && $pgac_candidate --version </dev/null >/dev/null 2>&1
7638       then
7639         echo '%%'  > conftest.l
7640         if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
7641           pgac_flex_version=`$pgac_candidate --version 2>/dev/null`
7642           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;}'
7643           then
7644             pgac_cv_path_flex=$pgac_candidate
7645             break 2
7646           else
7647             { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7648 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
7649 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&5
7650 $as_echo "$as_me: WARNING:
7651 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
7652 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&2;}
7653           fi
7654         fi
7655       fi
7656     done
7657   done
7658   rm -f conftest.l lex.yy.c
7659   : ${pgac_cv_path_flex=no}
7660 fi
7661
7662 fi
7663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_path_flex" >&5
7664 $as_echo "$pgac_cv_path_flex" >&6; }
7665 if test x"$pgac_cv_path_flex" = x"no"; then
7666   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7667 *** Without Flex you will not be able to build PostgreSQL from Git nor
7668 *** change any of the scanner definition files.  You can obtain Flex from
7669 *** a GNU mirror site.  (If you are using the official distribution of
7670 *** PostgreSQL then you do not need to worry about this because the Flex
7671 *** output is pre-generated.)" >&5
7672 $as_echo "$as_me: WARNING:
7673 *** Without Flex you will not be able to build PostgreSQL from Git nor
7674 *** change any of the scanner definition files.  You can obtain Flex from
7675 *** a GNU mirror site.  (If you are using the official distribution of
7676 *** PostgreSQL then you do not need to worry about this because the Flex
7677 *** output is pre-generated.)" >&2;}
7678
7679   FLEX=
7680 else
7681   FLEX=$pgac_cv_path_flex
7682   pgac_flex_version=`$FLEX --version 2>/dev/null`
7683   { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_flex_version" >&5
7684 $as_echo "$as_me: using $pgac_flex_version" >&6;}
7685 fi
7686
7687
7688
7689
7690
7691 if test -z "$PERL"; then
7692   for ac_prog in perl
7693 do
7694   # Extract the first word of "$ac_prog", so it can be a program name with args.
7695 set dummy $ac_prog; ac_word=$2
7696 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7697 $as_echo_n "checking for $ac_word... " >&6; }
7698 if ${ac_cv_path_PERL+:} false; then :
7699   $as_echo_n "(cached) " >&6
7700 else
7701   case $PERL in
7702   [\\/]* | ?:[\\/]*)
7703   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
7704   ;;
7705   *)
7706   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7707 for as_dir in $PATH
7708 do
7709   IFS=$as_save_IFS
7710   test -z "$as_dir" && as_dir=.
7711     for ac_exec_ext in '' $ac_executable_extensions; do
7712   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7713     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
7714     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7715     break 2
7716   fi
7717 done
7718   done
7719 IFS=$as_save_IFS
7720
7721   ;;
7722 esac
7723 fi
7724 PERL=$ac_cv_path_PERL
7725 if test -n "$PERL"; then
7726   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
7727 $as_echo "$PERL" >&6; }
7728 else
7729   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7730 $as_echo "no" >&6; }
7731 fi
7732
7733
7734   test -n "$PERL" && break
7735 done
7736
7737 else
7738   # Report the value of PERL in configure's output in all cases.
7739   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PERL" >&5
7740 $as_echo_n "checking for PERL... " >&6; }
7741   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
7742 $as_echo "$PERL" >&6; }
7743 fi
7744
7745
7746 if test "$PERL"; then
7747   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'`
7748   { $as_echo "$as_me:${as_lineno-$LINENO}: using perl $pgac_perl_version" >&5
7749 $as_echo "$as_me: using perl $pgac_perl_version" >&6;}
7750   if echo "$pgac_perl_version" | sed 's/[.a-z_]/ /g' | \
7751     $AWK '{ if ($1 == 5 && $2 >= 8) exit 1; else exit 0;}'
7752   then
7753     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7754 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
7755 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&5
7756 $as_echo "$as_me: WARNING:
7757 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
7758 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&2;}
7759     PERL=""
7760   fi
7761 fi
7762
7763 if test -z "$PERL"; then
7764   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7765 *** Without Perl you will not be able to build PostgreSQL from Git.
7766 *** You can obtain Perl from any CPAN mirror site.
7767 *** (If you are using the official distribution of PostgreSQL then you do not
7768 *** need to worry about this, because the Perl output is pre-generated.)" >&5
7769 $as_echo "$as_me: WARNING:
7770 *** Without Perl you will not be able to build PostgreSQL from Git.
7771 *** You can obtain Perl from any CPAN mirror site.
7772 *** (If you are using the official distribution of PostgreSQL then you do not
7773 *** need to worry about this, because the Perl output is pre-generated.)" >&2;}
7774 fi
7775
7776 if test "$with_perl" = yes; then
7777   if test -z "$PERL"; then
7778     as_fn_error $? "Perl not found" "$LINENO" 5
7779   fi
7780
7781 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl archlibexp" >&5
7782 $as_echo_n "checking for Perl archlibexp... " >&6; }
7783 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
7784 test "$PORTNAME" = "win32" && perl_archlibexp=`echo $perl_archlibexp | sed 's,\\\\,/,g'`
7785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_archlibexp" >&5
7786 $as_echo "$perl_archlibexp" >&6; }
7787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl privlibexp" >&5
7788 $as_echo_n "checking for Perl privlibexp... " >&6; }
7789 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
7790 test "$PORTNAME" = "win32" && perl_privlibexp=`echo $perl_privlibexp | sed 's,\\\\,/,g'`
7791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_privlibexp" >&5
7792 $as_echo "$perl_privlibexp" >&6; }
7793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl useshrplib" >&5
7794 $as_echo_n "checking for Perl useshrplib... " >&6; }
7795 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
7796 test "$PORTNAME" = "win32" && perl_useshrplib=`echo $perl_useshrplib | sed 's,\\\\,/,g'`
7797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_useshrplib" >&5
7798 $as_echo "$perl_useshrplib" >&6; }
7799   if test "$perl_useshrplib" != yes && test "$perl_useshrplib" != true; then
7800     as_fn_error $? "cannot build PL/Perl because libperl is not a shared library
7801 You might have to rebuild your Perl installation.  Refer to the
7802 documentation for details.  Use --without-perl to disable building
7803 PL/Perl." "$LINENO" 5
7804   fi
7805
7806 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS recommended by Perl" >&5
7807 $as_echo_n "checking for CFLAGS recommended by Perl... " >&6; }
7808 perl_ccflags=`$PERL -MConfig -e 'print $Config{ccflags}'`
7809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_ccflags" >&5
7810 $as_echo "$perl_ccflags" >&6; }
7811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS to compile embedded Perl" >&5
7812 $as_echo_n "checking for CFLAGS to compile embedded Perl... " >&6; }
7813 perl_embed_ccflags=`$PERL -MConfig -e 'foreach $f (split(" ",$Config{ccflags})) {print $f, " " if ($f =~ /^-D[^_]/ || $f =~ /^-D_USE_32BIT_TIME_T/)}'`
7814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ccflags" >&5
7815 $as_echo "$perl_embed_ccflags" >&6; }
7816
7817
7818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flags to link embedded Perl" >&5
7819 $as_echo_n "checking for flags to link embedded Perl... " >&6; }
7820 if test "$PORTNAME" = "win32" ; then
7821         perl_lib=`basename $perl_archlibexp/CORE/perl[5-9]*.lib .lib`
7822         if test -e "$perl_archlibexp/CORE/$perl_lib.lib"; then
7823                 perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
7824         else
7825                 perl_lib=`basename $perl_archlibexp/CORE/libperl[5-9]*.a .a | sed 's/^lib//'`
7826                 if test -e "$perl_archlibexp/CORE/lib$perl_lib.a"; then
7827                         perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
7828                 fi
7829         fi
7830 else
7831         pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
7832         pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
7833         perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%" -e "s/ -arch [-a-zA-Z0-9_]*//g"`
7834 fi
7835 if test -z "$perl_embed_ldflags" ; then
7836         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7837 $as_echo "no" >&6; }
7838         as_fn_error $? "could not determine flags for linking embedded Perl.
7839 This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not
7840 installed." "$LINENO" 5
7841 else
7842         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ldflags" >&5
7843 $as_echo "$perl_embed_ldflags" >&6; }
7844 fi
7845
7846 fi
7847
7848 if test "$with_python" = yes; then
7849   if test -z "$PYTHON"; then
7850   for ac_prog in python
7851 do
7852   # Extract the first word of "$ac_prog", so it can be a program name with args.
7853 set dummy $ac_prog; ac_word=$2
7854 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7855 $as_echo_n "checking for $ac_word... " >&6; }
7856 if ${ac_cv_path_PYTHON+:} false; then :
7857   $as_echo_n "(cached) " >&6
7858 else
7859   case $PYTHON in
7860   [\\/]* | ?:[\\/]*)
7861   ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
7862   ;;
7863   *)
7864   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7865 for as_dir in $PATH
7866 do
7867   IFS=$as_save_IFS
7868   test -z "$as_dir" && as_dir=.
7869     for ac_exec_ext in '' $ac_executable_extensions; do
7870   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7871     ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
7872     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7873     break 2
7874   fi
7875 done
7876   done
7877 IFS=$as_save_IFS
7878
7879   ;;
7880 esac
7881 fi
7882 PYTHON=$ac_cv_path_PYTHON
7883 if test -n "$PYTHON"; then
7884   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
7885 $as_echo "$PYTHON" >&6; }
7886 else
7887   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7888 $as_echo "no" >&6; }
7889 fi
7890
7891
7892   test -n "$PYTHON" && break
7893 done
7894
7895 else
7896   # Report the value of PYTHON in configure's output in all cases.
7897   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PYTHON" >&5
7898 $as_echo_n "checking for PYTHON... " >&6; }
7899   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
7900 $as_echo "$PYTHON" >&6; }
7901 fi
7902
7903 if test x"$PYTHON" = x""; then
7904   as_fn_error $? "Python not found" "$LINENO" 5
7905 fi
7906
7907
7908 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python distutils module" >&5
7909 $as_echo_n "checking for Python distutils module... " >&6; }
7910 if "${PYTHON}" -c 'import distutils' 2>&5
7911 then
7912     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7913 $as_echo "yes" >&6; }
7914 else
7915     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7916 $as_echo "no" >&6; }
7917     as_fn_error $? "distutils module not found" "$LINENO" 5
7918 fi
7919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python configuration directory" >&5
7920 $as_echo_n "checking Python configuration directory... " >&6; }
7921 python_majorversion=`${PYTHON} -c "import sys; print(sys.version[0])"`
7922 python_minorversion=`${PYTHON} -c "import sys; print(sys.version[2])"`
7923 python_version=`${PYTHON} -c "import sys; print(sys.version[:3])"`
7924 python_configdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBPL'))))"`
7925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_configdir" >&5
7926 $as_echo "$python_configdir" >&6; }
7927
7928 # Reject unsupported Python versions as soon as practical.
7929 if test "$python_majorversion" -lt 3 -a "$python_minorversion" -lt 4; then
7930   as_fn_error $? "Python version $python_version is too old (version 2.4 or later is required)" "$LINENO" 5
7931 fi
7932
7933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python include directories" >&5
7934 $as_echo_n "checking Python include directories... " >&6; }
7935 python_includespec=`${PYTHON} -c "
7936 import distutils.sysconfig
7937 a = '-I' + distutils.sysconfig.get_python_inc(False)
7938 b = '-I' + distutils.sysconfig.get_python_inc(True)
7939 if a == b:
7940     print(a)
7941 else:
7942     print(a + ' ' + b)"`
7943 if test "$PORTNAME" = win32 ; then
7944     python_includespec=`echo $python_includespec | sed 's,[\],/,g'`
7945 fi
7946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_includespec" >&5
7947 $as_echo "$python_includespec" >&6; }
7948
7949
7950
7951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link an embedded Python application" >&5
7952 $as_echo_n "checking how to link an embedded Python application... " >&6; }
7953
7954 python_libdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBDIR'))))"`
7955 python_ldlibrary=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDLIBRARY'))))"`
7956
7957 # If LDLIBRARY exists and has a shlib extension, use it verbatim.
7958 ldlibrary=`echo "${python_ldlibrary}" | sed -e 's/\.so$//' -e 's/\.dll$//' -e 's/\.dylib$//' -e 's/\.sl$//'`
7959 if test -e "${python_libdir}/${python_ldlibrary}" -a x"${python_ldlibrary}" != x"${ldlibrary}"
7960 then
7961         ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
7962         found_shlib=1
7963 else
7964         # Otherwise, guess the base name of the shlib.
7965         # LDVERSION was added in Python 3.2, before that use VERSION,
7966         # or failing that, $python_version from _PGAC_CHECK_PYTHON_DIRS.
7967         python_ldversion=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDVERSION'))))"`
7968         if test x"${python_ldversion}" != x""; then
7969                 ldlibrary="python${python_ldversion}"
7970         else
7971                 python_version_var=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('VERSION'))))"`
7972                 if test x"${python_version_var}" != x""; then
7973                         ldlibrary="python${python_version_var}"
7974                 else
7975                         ldlibrary="python${python_version}"
7976                 fi
7977         fi
7978         # Search for a likely-looking file.
7979         found_shlib=0
7980         for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
7981         do
7982                 # We don't know the platform DLSUFFIX here, so check 'em all.
7983                 for e in .so .dll .dylib .sl; do
7984                         if test -e "$d/lib${ldlibrary}$e"; then
7985                                 python_libdir="$d"
7986                                 found_shlib=1
7987                                 break 2
7988                         fi
7989                 done
7990         done
7991         # Some platforms (OpenBSD) require us to accept a bare versioned shlib
7992         # (".so.n.n") as well. However, check this only after failing to find
7993         # ".so" anywhere, because yet other platforms (Debian) put the .so
7994         # symlink in a different directory from the underlying versioned shlib.
7995         if test "$found_shlib" != 1; then
7996                 for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
7997                 do
7998                         for f in "$d/lib${ldlibrary}.so."* ; do
7999                                 if test -e "$f"; then
8000                                         python_libdir="$d"
8001                                         found_shlib=1
8002                                         break 2
8003                                 fi
8004                         done
8005                 done
8006         fi
8007         # As usual, Windows has its own ideas.  Possible default library
8008         # locations include c:/Windows/System32 and (for Cygwin) /usr/bin,
8009         # and the "lib" prefix might not be there.
8010         if test "$found_shlib" != 1 -a \( "$PORTNAME" = win32 -o "$PORTNAME" = cygwin \); then
8011                 for d in "${python_libdir}" "${python_configdir}" c:/Windows/System32 /usr/bin
8012                 do
8013                         for f in "$d/lib${ldlibrary}.dll" "$d/${ldlibrary}.dll" ; do
8014                                 if test -e "$f"; then
8015                                         python_libdir="$d"
8016                                         found_shlib=1
8017                                         break 2
8018                                 fi
8019                         done
8020                 done
8021         fi
8022 fi
8023 if test "$found_shlib" != 1; then
8024         as_fn_error $? "could not find shared library for Python
8025 You might have to rebuild your Python installation.  Refer to the
8026 documentation for details.  Use --without-python to disable building
8027 PL/Python." "$LINENO" 5
8028 fi
8029 python_libspec="-L${python_libdir} -l${ldlibrary}"
8030
8031 python_additional_libs=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBS','LIBC','LIBM','BASEMODLIBS'))))"`
8032
8033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_libspec} ${python_additional_libs}" >&5
8034 $as_echo "${python_libspec} ${python_additional_libs}" >&6; }
8035
8036
8037
8038 fi
8039
8040 if test "$cross_compiling" = yes && test -z "$with_system_tzdata"; then
8041   if test -z "$ZIC"; then
8042   for ac_prog in zic
8043 do
8044   # Extract the first word of "$ac_prog", so it can be a program name with args.
8045 set dummy $ac_prog; ac_word=$2
8046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8047 $as_echo_n "checking for $ac_word... " >&6; }
8048 if ${ac_cv_path_ZIC+:} false; then :
8049   $as_echo_n "(cached) " >&6
8050 else
8051   case $ZIC in
8052   [\\/]* | ?:[\\/]*)
8053   ac_cv_path_ZIC="$ZIC" # Let the user override the test with a path.
8054   ;;
8055   *)
8056   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8057 for as_dir in $PATH
8058 do
8059   IFS=$as_save_IFS
8060   test -z "$as_dir" && as_dir=.
8061     for ac_exec_ext in '' $ac_executable_extensions; do
8062   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8063     ac_cv_path_ZIC="$as_dir/$ac_word$ac_exec_ext"
8064     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8065     break 2
8066   fi
8067 done
8068   done
8069 IFS=$as_save_IFS
8070
8071   ;;
8072 esac
8073 fi
8074 ZIC=$ac_cv_path_ZIC
8075 if test -n "$ZIC"; then
8076   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
8077 $as_echo "$ZIC" >&6; }
8078 else
8079   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8080 $as_echo "no" >&6; }
8081 fi
8082
8083
8084   test -n "$ZIC" && break
8085 done
8086
8087 else
8088   # Report the value of ZIC in configure's output in all cases.
8089   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIC" >&5
8090 $as_echo_n "checking for ZIC... " >&6; }
8091   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
8092 $as_echo "$ZIC" >&6; }
8093 fi
8094
8095   if test -z "$ZIC"; then
8096     as_fn_error $? "
8097 When cross-compiling, either use the option --with-system-tzdata to use
8098 existing time-zone data, or set the environment variable ZIC to a zic
8099 program to use during the build." "$LINENO" 5
8100   fi
8101 fi
8102
8103 #
8104 # Pthreads
8105 #
8106 # For each platform, we need to know about any special compile and link
8107 # libraries, and whether the normal C function names are thread-safe.
8108 # See the comment at the top of src/port/thread.c for more information.
8109 # WIN32 doesn't need the pthread tests;  it always uses threads
8110 #
8111 # These tests are run before the library-tests, because linking with the
8112 # other libraries can pull in the pthread functions as a side-effect.  We
8113 # want to use the -pthread or similar flags directly, and not rely on
8114 # the side-effects of linking with some other library.
8115 #
8116 # note: We have to use AS_IF here rather than plain if. The AC_CHECK_HEADER
8117 # invocation below is the first one in the script, and autoconf generates
8118 # additional code for that, which must not be inside the if-block. AS_IF
8119 # knows how to do that.
8120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
8121 $as_echo_n "checking for ANSI C header files... " >&6; }
8122 if ${ac_cv_header_stdc+:} false; then :
8123   $as_echo_n "(cached) " >&6
8124 else
8125   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8126 /* end confdefs.h.  */
8127 #include <stdlib.h>
8128 #include <stdarg.h>
8129 #include <string.h>
8130 #include <float.h>
8131
8132 int
8133 main ()
8134 {
8135
8136   ;
8137   return 0;
8138 }
8139 _ACEOF
8140 if ac_fn_c_try_compile "$LINENO"; then :
8141   ac_cv_header_stdc=yes
8142 else
8143   ac_cv_header_stdc=no
8144 fi
8145 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8146
8147 if test $ac_cv_header_stdc = yes; then
8148   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8149   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8150 /* end confdefs.h.  */
8151 #include <string.h>
8152
8153 _ACEOF
8154 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8155   $EGREP "memchr" >/dev/null 2>&1; then :
8156
8157 else
8158   ac_cv_header_stdc=no
8159 fi
8160 rm -f conftest*
8161
8162 fi
8163
8164 if test $ac_cv_header_stdc = yes; then
8165   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8166   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8167 /* end confdefs.h.  */
8168 #include <stdlib.h>
8169
8170 _ACEOF
8171 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8172   $EGREP "free" >/dev/null 2>&1; then :
8173
8174 else
8175   ac_cv_header_stdc=no
8176 fi
8177 rm -f conftest*
8178
8179 fi
8180
8181 if test $ac_cv_header_stdc = yes; then
8182   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8183   if test "$cross_compiling" = yes; then :
8184   :
8185 else
8186   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8187 /* end confdefs.h.  */
8188 #include <ctype.h>
8189 #include <stdlib.h>
8190 #if ((' ' & 0x0FF) == 0x020)
8191 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8192 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8193 #else
8194 # define ISLOWER(c) \
8195                    (('a' <= (c) && (c) <= 'i') \
8196                      || ('j' <= (c) && (c) <= 'r') \
8197                      || ('s' <= (c) && (c) <= 'z'))
8198 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8199 #endif
8200
8201 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8202 int
8203 main ()
8204 {
8205   int i;
8206   for (i = 0; i < 256; i++)
8207     if (XOR (islower (i), ISLOWER (i))
8208         || toupper (i) != TOUPPER (i))
8209       return 2;
8210   return 0;
8211 }
8212 _ACEOF
8213 if ac_fn_c_try_run "$LINENO"; then :
8214
8215 else
8216   ac_cv_header_stdc=no
8217 fi
8218 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8219   conftest.$ac_objext conftest.beam conftest.$ac_ext
8220 fi
8221
8222 fi
8223 fi
8224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
8225 $as_echo "$ac_cv_header_stdc" >&6; }
8226 if test $ac_cv_header_stdc = yes; then
8227
8228 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
8229
8230 fi
8231
8232 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
8233 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
8234                   inttypes.h stdint.h unistd.h
8235 do :
8236   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8237 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
8238 "
8239 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8240   cat >>confdefs.h <<_ACEOF
8241 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8242 _ACEOF
8243
8244 fi
8245
8246 done
8247
8248
8249 if test "$enable_thread_safety" = yes -a "$PORTNAME" != "win32"; then :
8250    # then
8251
8252
8253
8254 ac_ext=c
8255 ac_cpp='$CPP $CPPFLAGS'
8256 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8257 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8258 ac_compiler_gnu=$ac_cv_c_compiler_gnu
8259
8260 ax_pthread_ok=no
8261
8262 # We used to check for pthread.h first, but this fails if pthread.h
8263 # requires special compiler flags (e.g. on Tru64 or Sequent).
8264 # It gets checked for in the link test anyway.
8265
8266 # First of all, check if the user has set any of the PTHREAD_LIBS,
8267 # etcetera environment variables, and if threads linking works using
8268 # them:
8269 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
8270         save_CFLAGS="$CFLAGS"
8271         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
8272         save_LIBS="$LIBS"
8273         LIBS="$PTHREAD_LIBS $LIBS"
8274         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
8275 $as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
8276         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8277 /* end confdefs.h.  */
8278
8279 /* Override any GCC internal prototype to avoid an error.
8280    Use char because int might match the return type of a GCC
8281    builtin and then its argument prototype would still apply.  */
8282 #ifdef __cplusplus
8283 extern "C"
8284 #endif
8285 char pthread_join ();
8286 int
8287 main ()
8288 {
8289 return pthread_join ();
8290   ;
8291   return 0;
8292 }
8293 _ACEOF
8294 if ac_fn_c_try_link "$LINENO"; then :
8295   ax_pthread_ok=yes
8296 fi
8297 rm -f core conftest.err conftest.$ac_objext \
8298     conftest$ac_exeext conftest.$ac_ext
8299         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
8300 $as_echo "$ax_pthread_ok" >&6; }
8301         if test x"$ax_pthread_ok" = xno; then
8302                 PTHREAD_LIBS=""
8303                 PTHREAD_CFLAGS=""
8304         fi
8305         LIBS="$save_LIBS"
8306         CFLAGS="$save_CFLAGS"
8307 fi
8308
8309 # We must check for the threads library under a number of different
8310 # names; the ordering is very important because some systems
8311 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
8312 # libraries is broken (non-POSIX).
8313
8314 # Create a list of thread flags to try.  Items starting with a "-" are
8315 # C compiler flags, and other items are library names, except for "none"
8316 # which indicates that we try without any flags at all, and "pthread-config"
8317 # which is a program returning the flags for the Pth emulation library.
8318
8319 ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mt -mthreads pthread --thread-safe pthread-config"
8320
8321 # The ordering *is* (sometimes) important.  Some notes on the
8322 # individual items follow:
8323
8324 # pthreads: AIX (must check this before -lpthread)
8325 # none: in case threads are in libc; should be tried before -Kthread and
8326 #       other compiler flags to prevent continual compiler warnings
8327 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
8328 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
8329 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
8330 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
8331 # -pthreads: Solaris/gcc
8332 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
8333 #      doesn't hurt to check since this sometimes defines pthreads and
8334 #      -D_REENTRANT too), HP C (must be checked before -lpthread, which
8335 #      is present but should not be used directly)
8336 # -mthreads: Mingw32/gcc, Lynx/gcc
8337 # pthread: Linux, etcetera
8338 # --thread-safe: KAI C++
8339 # pthread-config: use pthread-config program (for GNU Pth library)
8340
8341 case $host_os in
8342
8343         hpux*)
8344
8345         # From the cc(1) man page: "[-mt] Sets various -D flags to enable
8346         # multi-threading and also sets -lpthread."
8347
8348         ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
8349         ;;
8350
8351         openedition*)
8352
8353         # IBM z/OS requires a feature-test macro to be defined in order to
8354         # enable POSIX threads at all, so give the user a hint if this is
8355         # not set. (We don't define these ourselves, as they can affect
8356         # other portions of the system API in unpredictable ways.)
8357
8358         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8359 /* end confdefs.h.  */
8360
8361 #            if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
8362              AX_PTHREAD_ZOS_MISSING
8363 #            endif
8364
8365 _ACEOF
8366 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8367   $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
8368   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
8369 $as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
8370 fi
8371 rm -f conftest*
8372
8373         ;;
8374
8375         solaris*)
8376
8377         # Newer versions of Solaris require the "-mt -lpthread" pair, and we
8378         # check that first.  On some older versions, libc contains stubbed
8379         # (non-functional) versions of the pthreads routines, so link-based
8380         # tests will erroneously succeed.  (We need to link with -pthreads/-mt/
8381         # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
8382         # a function called by this macro, so we could check for that, but
8383         # who knows whether they'll stub that too in a future libc.)  So
8384         # we'll look for -pthreads and -lpthread shortly thereafter.
8385
8386         ax_pthread_flags="-mt,pthread -pthreads -pthread pthread $ax_pthread_flags"
8387         ;;
8388 esac
8389
8390 # Older versions of Clang only give a warning instead of an error for an
8391 # unrecognized option, unless we specify -Werror. (We throw in some extra
8392 # Clang warning flags for good measure.)
8393
8394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler needs certain flags to reject unknown flags" >&5
8395 $as_echo_n "checking if compiler needs certain flags to reject unknown flags... " >&6; }
8396 if ${ax_cv_PTHREAD_REJECT_UNKNOWN+:} false; then :
8397   $as_echo_n "(cached) " >&6
8398 else
8399   ax_cv_PTHREAD_REJECT_UNKNOWN=unknown
8400      save_CFLAGS="$CFLAGS"
8401      ax_pthread_extra_flags="-Wunknown-warning-option -Wunused-command-line-argument"
8402      CFLAGS="$CFLAGS $ax_pthread_extra_flags -Wfoobaz -foobaz"
8403      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8404 /* end confdefs.h.  */
8405 int foo(void);
8406 int
8407 main ()
8408 {
8409 foo()
8410   ;
8411   return 0;
8412 }
8413 _ACEOF
8414 if ac_fn_c_try_compile "$LINENO"; then :
8415   ax_cv_PTHREAD_REJECT_UNKNOWN="-Werror $ax_pthread_extra_flags"
8416 else
8417   ax_cv_PTHREAD_REJECT_UNKNOWN=no
8418 fi
8419 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8420      CFLAGS="$save_CFLAGS"
8421
8422 fi
8423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_REJECT_UNKNOWN" >&5
8424 $as_echo "$ax_cv_PTHREAD_REJECT_UNKNOWN" >&6; }
8425 ax_pthread_extra_flags=
8426 if test "x$ax_cv_PTHREAD_REJECT_UNKNOWN" != "xno"; then :
8427   ax_pthread_extra_flags="$ax_cv_PTHREAD_REJECT_UNKNOWN"
8428 fi
8429
8430 if test x"$ax_pthread_ok" = xno; then
8431 for flag in $ax_pthread_flags; do
8432
8433         case $flag in
8434                 none)
8435                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
8436 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
8437                 ;;
8438
8439                 -mt,pthread)
8440                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
8441 $as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
8442                 PTHREAD_CFLAGS="-mt"
8443                 PTHREAD_LIBS="-lpthread"
8444                 ;;
8445
8446                 -*)
8447                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5
8448 $as_echo_n "checking whether pthreads work with $flag... " >&6; }
8449                 PTHREAD_CFLAGS="$flag"
8450                 ;;
8451
8452                 pthread-config)
8453                 # Extract the first word of "pthread-config", so it can be a program name with args.
8454 set dummy pthread-config; ac_word=$2
8455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8456 $as_echo_n "checking for $ac_word... " >&6; }
8457 if ${ac_cv_prog_ax_pthread_config+:} false; then :
8458   $as_echo_n "(cached) " >&6
8459 else
8460   if test -n "$ax_pthread_config"; then
8461   ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
8462 else
8463 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8464 for as_dir in $PATH
8465 do
8466   IFS=$as_save_IFS
8467   test -z "$as_dir" && as_dir=.
8468     for ac_exec_ext in '' $ac_executable_extensions; do
8469   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8470     ac_cv_prog_ax_pthread_config="yes"
8471     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8472     break 2
8473   fi
8474 done
8475   done
8476 IFS=$as_save_IFS
8477
8478   test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
8479 fi
8480 fi
8481 ax_pthread_config=$ac_cv_prog_ax_pthread_config
8482 if test -n "$ax_pthread_config"; then
8483   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
8484 $as_echo "$ax_pthread_config" >&6; }
8485 else
8486   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8487 $as_echo "no" >&6; }
8488 fi
8489
8490
8491                 if test x"$ax_pthread_config" = xno; then continue; fi
8492                 PTHREAD_CFLAGS="`pthread-config --cflags`"
8493                 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
8494                 ;;
8495
8496                 *)
8497                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5
8498 $as_echo_n "checking for the pthreads library -l$flag... " >&6; }
8499                 PTHREAD_LIBS="-l$flag"
8500                 ;;
8501         esac
8502
8503         save_LIBS="$LIBS"
8504         save_CFLAGS="$CFLAGS"
8505         LIBS="$PTHREAD_LIBS $LIBS"
8506         CFLAGS="$CFLAGS $PTHREAD_CFLAGS $ax_pthread_extra_flags"
8507
8508         # Check for various functions.  We must include pthread.h,
8509         # since some functions may be macros.  (On the Sequent, we
8510         # need a special flag -Kthread to make this header compile.)
8511         # We check for pthread_join because it is in -lpthread on IRIX
8512         # while pthread_create is in libc.  We check for pthread_attr_init
8513         # due to DEC craziness with -lpthreads.  We check for
8514         # pthread_cleanup_push because it is one of the few pthread
8515         # functions on Solaris that doesn't have a non-functional libc stub.
8516         # We try pthread_create on general principles.
8517         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8518 /* end confdefs.h.  */
8519 #include <pthread.h>
8520                         static void routine(void *a) { a = 0; }
8521                         static void *start_routine(void *a) { return a; }
8522 int
8523 main ()
8524 {
8525 pthread_t th; pthread_attr_t attr;
8526                         pthread_create(&th, 0, start_routine, 0);
8527                         pthread_join(th, 0);
8528                         pthread_attr_init(&attr);
8529                         pthread_cleanup_push(routine, 0);
8530                         pthread_cleanup_pop(0) /* ; */
8531   ;
8532   return 0;
8533 }
8534 _ACEOF
8535 if ac_fn_c_try_link "$LINENO"; then :
8536   ax_pthread_ok=yes
8537 fi
8538 rm -f core conftest.err conftest.$ac_objext \
8539     conftest$ac_exeext conftest.$ac_ext
8540
8541         LIBS="$save_LIBS"
8542         CFLAGS="$save_CFLAGS"
8543
8544         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
8545 $as_echo "$ax_pthread_ok" >&6; }
8546         if test "x$ax_pthread_ok" = xyes; then
8547                 break;
8548         fi
8549
8550         PTHREAD_LIBS=""
8551         PTHREAD_CFLAGS=""
8552 done
8553 fi
8554
8555 # Various other checks:
8556 if test "x$ax_pthread_ok" = xyes; then
8557         save_LIBS="$LIBS"
8558         LIBS="$PTHREAD_LIBS $LIBS"
8559         save_CFLAGS="$CFLAGS"
8560         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
8561
8562         # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
8563         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
8564 $as_echo_n "checking for joinable pthread attribute... " >&6; }
8565 if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
8566   $as_echo_n "(cached) " >&6
8567 else
8568   ax_cv_PTHREAD_JOINABLE_ATTR=unknown
8569              for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
8570                  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8571 /* end confdefs.h.  */
8572 #include <pthread.h>
8573 int
8574 main ()
8575 {
8576 int attr = $attr; return attr /* ; */
8577   ;
8578   return 0;
8579 }
8580 _ACEOF
8581 if ac_fn_c_try_link "$LINENO"; then :
8582   ax_cv_PTHREAD_JOINABLE_ATTR=$attr; break
8583 fi
8584 rm -f core conftest.err conftest.$ac_objext \
8585     conftest$ac_exeext conftest.$ac_ext
8586              done
8587
8588 fi
8589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
8590 $as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
8591         if test "$ax_cv_PTHREAD_JOINABLE_ATTR" != unknown && \
8592                test "$ax_cv_PTHREAD_JOINABLE_ATTR" != PTHREAD_CREATE_JOINABLE; then :
8593
8594 cat >>confdefs.h <<_ACEOF
8595 #define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
8596 _ACEOF
8597
8598 fi
8599
8600         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5
8601 $as_echo_n "checking if more special flags are required for pthreads... " >&6; }
8602 if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
8603   $as_echo_n "(cached) " >&6
8604 else
8605   ax_cv_PTHREAD_SPECIAL_FLAGS=no
8606              ax_pthread_special_flags_added=no
8607              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8608 /* end confdefs.h.  */
8609
8610 #                 if !defined(_REENTRANT) && !defined(_THREAD_SAFE)
8611                   AX_PTHREAD_NEED_SPECIAL_FLAG
8612 #                 endif
8613
8614 _ACEOF
8615 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8616   $EGREP "AX_PTHREAD_NEED_SPECIAL_FLAG" >/dev/null 2>&1; then :
8617   case $host_os in
8618                   aix* | freebsd*)
8619                   ax_cv_PTHREAD_SPECIAL_FLAGS="-D_THREAD_SAFE"
8620                   ;;
8621                   darwin* | hpux* | osf* | solaris*)
8622                   ax_cv_PTHREAD_SPECIAL_FLAGS="-D_REENTRANT"
8623                   ;;
8624                   esac
8625
8626 fi
8627 rm -f conftest*
8628
8629
8630 fi
8631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
8632 $as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
8633         if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
8634                test "x$ax_pthread_special_flags_added" != "xyes"; then :
8635   PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
8636                ax_pthread_special_flags_added=yes
8637 fi
8638
8639         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
8640 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
8641 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
8642   $as_echo_n "(cached) " >&6
8643 else
8644   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8645 /* end confdefs.h.  */
8646 #include <pthread.h>
8647 int
8648 main ()
8649 {
8650 int i = PTHREAD_PRIO_INHERIT;
8651   ;
8652   return 0;
8653 }
8654 _ACEOF
8655 if ac_fn_c_try_link "$LINENO"; then :
8656   ax_cv_PTHREAD_PRIO_INHERIT=yes
8657 else
8658   ax_cv_PTHREAD_PRIO_INHERIT=no
8659 fi
8660 rm -f core conftest.err conftest.$ac_objext \
8661     conftest$ac_exeext conftest.$ac_ext
8662
8663 fi
8664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
8665 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
8666         if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"; then :
8667
8668 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
8669
8670 fi
8671
8672         LIBS="$save_LIBS"
8673         CFLAGS="$save_CFLAGS"
8674
8675         # More AIX lossage: compile with *_r variant
8676         if test "x$GCC" != xyes; then
8677             case $host_os in
8678                 aix*)
8679                 case "x/$CC" in #(
8680   x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
8681     #handle absolute path differently from PATH based program lookup
8682                    case "x$CC" in #(
8683   x/*) :
8684     if as_fn_executable_p ${CC}_r; then :
8685   PTHREAD_CC="${CC}_r"
8686 fi ;; #(
8687   *) :
8688     for ac_prog in ${CC}_r
8689 do
8690   # Extract the first word of "$ac_prog", so it can be a program name with args.
8691 set dummy $ac_prog; ac_word=$2
8692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8693 $as_echo_n "checking for $ac_word... " >&6; }
8694 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
8695   $as_echo_n "(cached) " >&6
8696 else
8697   if test -n "$PTHREAD_CC"; then
8698   ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
8699 else
8700 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8701 for as_dir in $PATH
8702 do
8703   IFS=$as_save_IFS
8704   test -z "$as_dir" && as_dir=.
8705     for ac_exec_ext in '' $ac_executable_extensions; do
8706   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8707     ac_cv_prog_PTHREAD_CC="$ac_prog"
8708     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8709     break 2
8710   fi
8711 done
8712   done
8713 IFS=$as_save_IFS
8714
8715 fi
8716 fi
8717 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
8718 if test -n "$PTHREAD_CC"; then
8719   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
8720 $as_echo "$PTHREAD_CC" >&6; }
8721 else
8722   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8723 $as_echo "no" >&6; }
8724 fi
8725
8726
8727   test -n "$PTHREAD_CC" && break
8728 done
8729 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
8730  ;;
8731 esac ;; #(
8732   *) :
8733      ;;
8734 esac
8735                 ;;
8736             esac
8737         fi
8738 fi
8739
8740 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
8741
8742
8743
8744
8745
8746 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
8747 if test x"$ax_pthread_ok" = xyes; then
8748
8749 $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
8750
8751         :
8752 else
8753         ax_pthread_ok=no
8754
8755 fi
8756 ac_ext=c
8757 ac_cpp='$CPP $CPPFLAGS'
8758 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8759 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8760 ac_compiler_gnu=$ac_cv_c_compiler_gnu
8761
8762         # set thread flags
8763
8764 # Some platforms use these, so just define them.  They can't hurt if they
8765 # are not supported.  For example, on Solaris -D_POSIX_PTHREAD_SEMANTICS
8766 # enables 5-arg getpwuid_r, among other things.
8767 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
8768
8769 # Check for *_r functions
8770 _CFLAGS="$CFLAGS"
8771 _LIBS="$LIBS"
8772 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
8773 LIBS="$LIBS $PTHREAD_LIBS"
8774
8775 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
8776 if test "x$ac_cv_header_pthread_h" = xyes; then :
8777
8778 else
8779   as_fn_error $? "
8780 pthread.h not found;  use --disable-thread-safety to disable thread safety" "$LINENO" 5
8781 fi
8782
8783
8784
8785 for ac_func in strerror_r getpwuid_r gethostbyname_r
8786 do :
8787   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8788 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8789 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
8790   cat >>confdefs.h <<_ACEOF
8791 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
8792 _ACEOF
8793
8794 fi
8795 done
8796
8797
8798 # Do test here with the proper thread flags
8799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns int" >&5
8800 $as_echo_n "checking whether strerror_r returns int... " >&6; }
8801 if ${pgac_cv_func_strerror_r_int+:} false; then :
8802   $as_echo_n "(cached) " >&6
8803 else
8804   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8805 /* end confdefs.h.  */
8806 #include <string.h>
8807 int
8808 main ()
8809 {
8810 #ifndef _AIX
8811 int strerror_r(int, char *, size_t);
8812 #else
8813 /* Older AIX has 'int' for the third argument so we don't test the args. */
8814 int strerror_r();
8815 #endif
8816   ;
8817   return 0;
8818 }
8819 _ACEOF
8820 if ac_fn_c_try_compile "$LINENO"; then :
8821   pgac_cv_func_strerror_r_int=yes
8822 else
8823   pgac_cv_func_strerror_r_int=no
8824 fi
8825 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8826 fi
8827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_strerror_r_int" >&5
8828 $as_echo "$pgac_cv_func_strerror_r_int" >&6; }
8829 if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
8830
8831 $as_echo "#define STRERROR_R_INT 1" >>confdefs.h
8832
8833 fi
8834
8835
8836 CFLAGS="$_CFLAGS"
8837 LIBS="$_LIBS"
8838
8839
8840 else
8841    # else
8842 # do not use values from template file
8843 PTHREAD_CFLAGS=
8844 PTHREAD_LIBS=
8845
8846 fi # fi
8847
8848
8849
8850
8851
8852 ##
8853 ## Libraries
8854 ##
8855 ## Most libraries are included only if they demonstrably provide a function
8856 ## we need, but libm is an exception: always include it, because there are
8857 ## too many compilers that play cute optimization games that will break
8858 ## probes for standard functions such as pow().
8859 ##
8860
8861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
8862 $as_echo_n "checking for main in -lm... " >&6; }
8863 if ${ac_cv_lib_m_main+:} false; then :
8864   $as_echo_n "(cached) " >&6
8865 else
8866   ac_check_lib_save_LIBS=$LIBS
8867 LIBS="-lm  $LIBS"
8868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8869 /* end confdefs.h.  */
8870
8871
8872 int
8873 main ()
8874 {
8875 return main ();
8876   ;
8877   return 0;
8878 }
8879 _ACEOF
8880 if ac_fn_c_try_link "$LINENO"; then :
8881   ac_cv_lib_m_main=yes
8882 else
8883   ac_cv_lib_m_main=no
8884 fi
8885 rm -f core conftest.err conftest.$ac_objext \
8886     conftest$ac_exeext conftest.$ac_ext
8887 LIBS=$ac_check_lib_save_LIBS
8888 fi
8889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
8890 $as_echo "$ac_cv_lib_m_main" >&6; }
8891 if test "x$ac_cv_lib_m_main" = xyes; then :
8892   cat >>confdefs.h <<_ACEOF
8893 #define HAVE_LIBM 1
8894 _ACEOF
8895
8896   LIBS="-lm $LIBS"
8897
8898 fi
8899
8900 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setproctitle" >&5
8901 $as_echo_n "checking for library containing setproctitle... " >&6; }
8902 if ${ac_cv_search_setproctitle+:} false; then :
8903   $as_echo_n "(cached) " >&6
8904 else
8905   ac_func_search_save_LIBS=$LIBS
8906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8907 /* end confdefs.h.  */
8908
8909 /* Override any GCC internal prototype to avoid an error.
8910    Use char because int might match the return type of a GCC
8911    builtin and then its argument prototype would still apply.  */
8912 #ifdef __cplusplus
8913 extern "C"
8914 #endif
8915 char setproctitle ();
8916 int
8917 main ()
8918 {
8919 return setproctitle ();
8920   ;
8921   return 0;
8922 }
8923 _ACEOF
8924 for ac_lib in '' util; do
8925   if test -z "$ac_lib"; then
8926     ac_res="none required"
8927   else
8928     ac_res=-l$ac_lib
8929     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8930   fi
8931   if ac_fn_c_try_link "$LINENO"; then :
8932   ac_cv_search_setproctitle=$ac_res
8933 fi
8934 rm -f core conftest.err conftest.$ac_objext \
8935     conftest$ac_exeext
8936   if ${ac_cv_search_setproctitle+:} false; then :
8937   break
8938 fi
8939 done
8940 if ${ac_cv_search_setproctitle+:} false; then :
8941
8942 else
8943   ac_cv_search_setproctitle=no
8944 fi
8945 rm conftest.$ac_ext
8946 LIBS=$ac_func_search_save_LIBS
8947 fi
8948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setproctitle" >&5
8949 $as_echo "$ac_cv_search_setproctitle" >&6; }
8950 ac_res=$ac_cv_search_setproctitle
8951 if test "$ac_res" != no; then :
8952   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8953
8954 fi
8955
8956 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
8957 $as_echo_n "checking for library containing dlopen... " >&6; }
8958 if ${ac_cv_search_dlopen+:} false; then :
8959   $as_echo_n "(cached) " >&6
8960 else
8961   ac_func_search_save_LIBS=$LIBS
8962 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8963 /* end confdefs.h.  */
8964
8965 /* Override any GCC internal prototype to avoid an error.
8966    Use char because int might match the return type of a GCC
8967    builtin and then its argument prototype would still apply.  */
8968 #ifdef __cplusplus
8969 extern "C"
8970 #endif
8971 char dlopen ();
8972 int
8973 main ()
8974 {
8975 return dlopen ();
8976   ;
8977   return 0;
8978 }
8979 _ACEOF
8980 for ac_lib in '' dl; do
8981   if test -z "$ac_lib"; then
8982     ac_res="none required"
8983   else
8984     ac_res=-l$ac_lib
8985     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8986   fi
8987   if ac_fn_c_try_link "$LINENO"; then :
8988   ac_cv_search_dlopen=$ac_res
8989 fi
8990 rm -f core conftest.err conftest.$ac_objext \
8991     conftest$ac_exeext
8992   if ${ac_cv_search_dlopen+:} false; then :
8993   break
8994 fi
8995 done
8996 if ${ac_cv_search_dlopen+:} false; then :
8997
8998 else
8999   ac_cv_search_dlopen=no
9000 fi
9001 rm conftest.$ac_ext
9002 LIBS=$ac_func_search_save_LIBS
9003 fi
9004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
9005 $as_echo "$ac_cv_search_dlopen" >&6; }
9006 ac_res=$ac_cv_search_dlopen
9007 if test "$ac_res" != no; then :
9008   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9009
9010 fi
9011
9012 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
9013 $as_echo_n "checking for library containing socket... " >&6; }
9014 if ${ac_cv_search_socket+:} false; then :
9015   $as_echo_n "(cached) " >&6
9016 else
9017   ac_func_search_save_LIBS=$LIBS
9018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9019 /* end confdefs.h.  */
9020
9021 /* Override any GCC internal prototype to avoid an error.
9022    Use char because int might match the return type of a GCC
9023    builtin and then its argument prototype would still apply.  */
9024 #ifdef __cplusplus
9025 extern "C"
9026 #endif
9027 char socket ();
9028 int
9029 main ()
9030 {
9031 return socket ();
9032   ;
9033   return 0;
9034 }
9035 _ACEOF
9036 for ac_lib in '' socket ws2_32; do
9037   if test -z "$ac_lib"; then
9038     ac_res="none required"
9039   else
9040     ac_res=-l$ac_lib
9041     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9042   fi
9043   if ac_fn_c_try_link "$LINENO"; then :
9044   ac_cv_search_socket=$ac_res
9045 fi
9046 rm -f core conftest.err conftest.$ac_objext \
9047     conftest$ac_exeext
9048   if ${ac_cv_search_socket+:} false; then :
9049   break
9050 fi
9051 done
9052 if ${ac_cv_search_socket+:} false; then :
9053
9054 else
9055   ac_cv_search_socket=no
9056 fi
9057 rm conftest.$ac_ext
9058 LIBS=$ac_func_search_save_LIBS
9059 fi
9060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
9061 $as_echo "$ac_cv_search_socket" >&6; }
9062 ac_res=$ac_cv_search_socket
9063 if test "$ac_res" != no; then :
9064   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9065
9066 fi
9067
9068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shl_load" >&5
9069 $as_echo_n "checking for library containing shl_load... " >&6; }
9070 if ${ac_cv_search_shl_load+:} false; then :
9071   $as_echo_n "(cached) " >&6
9072 else
9073   ac_func_search_save_LIBS=$LIBS
9074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9075 /* end confdefs.h.  */
9076
9077 /* Override any GCC internal prototype to avoid an error.
9078    Use char because int might match the return type of a GCC
9079    builtin and then its argument prototype would still apply.  */
9080 #ifdef __cplusplus
9081 extern "C"
9082 #endif
9083 char shl_load ();
9084 int
9085 main ()
9086 {
9087 return shl_load ();
9088   ;
9089   return 0;
9090 }
9091 _ACEOF
9092 for ac_lib in '' dld; do
9093   if test -z "$ac_lib"; then
9094     ac_res="none required"
9095   else
9096     ac_res=-l$ac_lib
9097     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9098   fi
9099   if ac_fn_c_try_link "$LINENO"; then :
9100   ac_cv_search_shl_load=$ac_res
9101 fi
9102 rm -f core conftest.err conftest.$ac_objext \
9103     conftest$ac_exeext
9104   if ${ac_cv_search_shl_load+:} false; then :
9105   break
9106 fi
9107 done
9108 if ${ac_cv_search_shl_load+:} false; then :
9109
9110 else
9111   ac_cv_search_shl_load=no
9112 fi
9113 rm conftest.$ac_ext
9114 LIBS=$ac_func_search_save_LIBS
9115 fi
9116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shl_load" >&5
9117 $as_echo "$ac_cv_search_shl_load" >&6; }
9118 ac_res=$ac_cv_search_shl_load
9119 if test "$ac_res" != no; then :
9120   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9121
9122 fi
9123
9124 # We only use libld in port/dynloader/aix.c
9125 case $host_os in
9126      aix*)
9127         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing ldopen" >&5
9128 $as_echo_n "checking for library containing ldopen... " >&6; }
9129 if ${ac_cv_search_ldopen+:} false; then :
9130   $as_echo_n "(cached) " >&6
9131 else
9132   ac_func_search_save_LIBS=$LIBS
9133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9134 /* end confdefs.h.  */
9135
9136 /* Override any GCC internal prototype to avoid an error.
9137    Use char because int might match the return type of a GCC
9138    builtin and then its argument prototype would still apply.  */
9139 #ifdef __cplusplus
9140 extern "C"
9141 #endif
9142 char ldopen ();
9143 int
9144 main ()
9145 {
9146 return ldopen ();
9147   ;
9148   return 0;
9149 }
9150 _ACEOF
9151 for ac_lib in '' ld; do
9152   if test -z "$ac_lib"; then
9153     ac_res="none required"
9154   else
9155     ac_res=-l$ac_lib
9156     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9157   fi
9158   if ac_fn_c_try_link "$LINENO"; then :
9159   ac_cv_search_ldopen=$ac_res
9160 fi
9161 rm -f core conftest.err conftest.$ac_objext \
9162     conftest$ac_exeext
9163   if ${ac_cv_search_ldopen+:} false; then :
9164   break
9165 fi
9166 done
9167 if ${ac_cv_search_ldopen+:} false; then :
9168
9169 else
9170   ac_cv_search_ldopen=no
9171 fi
9172 rm conftest.$ac_ext
9173 LIBS=$ac_func_search_save_LIBS
9174 fi
9175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_ldopen" >&5
9176 $as_echo "$ac_cv_search_ldopen" >&6; }
9177 ac_res=$ac_cv_search_ldopen
9178 if test "$ac_res" != no; then :
9179   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9180
9181 fi
9182
9183         ;;
9184 esac
9185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getopt_long" >&5
9186 $as_echo_n "checking for library containing getopt_long... " >&6; }
9187 if ${ac_cv_search_getopt_long+:} false; then :
9188   $as_echo_n "(cached) " >&6
9189 else
9190   ac_func_search_save_LIBS=$LIBS
9191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9192 /* end confdefs.h.  */
9193
9194 /* Override any GCC internal prototype to avoid an error.
9195    Use char because int might match the return type of a GCC
9196    builtin and then its argument prototype would still apply.  */
9197 #ifdef __cplusplus
9198 extern "C"
9199 #endif
9200 char getopt_long ();
9201 int
9202 main ()
9203 {
9204 return getopt_long ();
9205   ;
9206   return 0;
9207 }
9208 _ACEOF
9209 for ac_lib in '' getopt gnugetopt; do
9210   if test -z "$ac_lib"; then
9211     ac_res="none required"
9212   else
9213     ac_res=-l$ac_lib
9214     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9215   fi
9216   if ac_fn_c_try_link "$LINENO"; then :
9217   ac_cv_search_getopt_long=$ac_res
9218 fi
9219 rm -f core conftest.err conftest.$ac_objext \
9220     conftest$ac_exeext
9221   if ${ac_cv_search_getopt_long+:} false; then :
9222   break
9223 fi
9224 done
9225 if ${ac_cv_search_getopt_long+:} false; then :
9226
9227 else
9228   ac_cv_search_getopt_long=no
9229 fi
9230 rm conftest.$ac_ext
9231 LIBS=$ac_func_search_save_LIBS
9232 fi
9233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getopt_long" >&5
9234 $as_echo "$ac_cv_search_getopt_long" >&6; }
9235 ac_res=$ac_cv_search_getopt_long
9236 if test "$ac_res" != no; then :
9237   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9238
9239 fi
9240
9241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
9242 $as_echo_n "checking for library containing crypt... " >&6; }
9243 if ${ac_cv_search_crypt+:} false; then :
9244   $as_echo_n "(cached) " >&6
9245 else
9246   ac_func_search_save_LIBS=$LIBS
9247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9248 /* end confdefs.h.  */
9249
9250 /* Override any GCC internal prototype to avoid an error.
9251    Use char because int might match the return type of a GCC
9252    builtin and then its argument prototype would still apply.  */
9253 #ifdef __cplusplus
9254 extern "C"
9255 #endif
9256 char crypt ();
9257 int
9258 main ()
9259 {
9260 return crypt ();
9261   ;
9262   return 0;
9263 }
9264 _ACEOF
9265 for ac_lib in '' crypt; do
9266   if test -z "$ac_lib"; then
9267     ac_res="none required"
9268   else
9269     ac_res=-l$ac_lib
9270     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9271   fi
9272   if ac_fn_c_try_link "$LINENO"; then :
9273   ac_cv_search_crypt=$ac_res
9274 fi
9275 rm -f core conftest.err conftest.$ac_objext \
9276     conftest$ac_exeext
9277   if ${ac_cv_search_crypt+:} false; then :
9278   break
9279 fi
9280 done
9281 if ${ac_cv_search_crypt+:} false; then :
9282
9283 else
9284   ac_cv_search_crypt=no
9285 fi
9286 rm conftest.$ac_ext
9287 LIBS=$ac_func_search_save_LIBS
9288 fi
9289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
9290 $as_echo "$ac_cv_search_crypt" >&6; }
9291 ac_res=$ac_cv_search_crypt
9292 if test "$ac_res" != no; then :
9293   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9294
9295 fi
9296
9297 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
9298 $as_echo_n "checking for library containing shm_open... " >&6; }
9299 if ${ac_cv_search_shm_open+:} false; then :
9300   $as_echo_n "(cached) " >&6
9301 else
9302   ac_func_search_save_LIBS=$LIBS
9303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9304 /* end confdefs.h.  */
9305
9306 /* Override any GCC internal prototype to avoid an error.
9307    Use char because int might match the return type of a GCC
9308    builtin and then its argument prototype would still apply.  */
9309 #ifdef __cplusplus
9310 extern "C"
9311 #endif
9312 char shm_open ();
9313 int
9314 main ()
9315 {
9316 return shm_open ();
9317   ;
9318   return 0;
9319 }
9320 _ACEOF
9321 for ac_lib in '' rt; do
9322   if test -z "$ac_lib"; then
9323     ac_res="none required"
9324   else
9325     ac_res=-l$ac_lib
9326     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9327   fi
9328   if ac_fn_c_try_link "$LINENO"; then :
9329   ac_cv_search_shm_open=$ac_res
9330 fi
9331 rm -f core conftest.err conftest.$ac_objext \
9332     conftest$ac_exeext
9333   if ${ac_cv_search_shm_open+:} false; then :
9334   break
9335 fi
9336 done
9337 if ${ac_cv_search_shm_open+:} false; then :
9338
9339 else
9340   ac_cv_search_shm_open=no
9341 fi
9342 rm conftest.$ac_ext
9343 LIBS=$ac_func_search_save_LIBS
9344 fi
9345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
9346 $as_echo "$ac_cv_search_shm_open" >&6; }
9347 ac_res=$ac_cv_search_shm_open
9348 if test "$ac_res" != no; then :
9349   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9350
9351 fi
9352
9353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_unlink" >&5
9354 $as_echo_n "checking for library containing shm_unlink... " >&6; }
9355 if ${ac_cv_search_shm_unlink+:} false; then :
9356   $as_echo_n "(cached) " >&6
9357 else
9358   ac_func_search_save_LIBS=$LIBS
9359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9360 /* end confdefs.h.  */
9361
9362 /* Override any GCC internal prototype to avoid an error.
9363    Use char because int might match the return type of a GCC
9364    builtin and then its argument prototype would still apply.  */
9365 #ifdef __cplusplus
9366 extern "C"
9367 #endif
9368 char shm_unlink ();
9369 int
9370 main ()
9371 {
9372 return shm_unlink ();
9373   ;
9374   return 0;
9375 }
9376 _ACEOF
9377 for ac_lib in '' rt; do
9378   if test -z "$ac_lib"; then
9379     ac_res="none required"
9380   else
9381     ac_res=-l$ac_lib
9382     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9383   fi
9384   if ac_fn_c_try_link "$LINENO"; then :
9385   ac_cv_search_shm_unlink=$ac_res
9386 fi
9387 rm -f core conftest.err conftest.$ac_objext \
9388     conftest$ac_exeext
9389   if ${ac_cv_search_shm_unlink+:} false; then :
9390   break
9391 fi
9392 done
9393 if ${ac_cv_search_shm_unlink+:} false; then :
9394
9395 else
9396   ac_cv_search_shm_unlink=no
9397 fi
9398 rm conftest.$ac_ext
9399 LIBS=$ac_func_search_save_LIBS
9400 fi
9401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_unlink" >&5
9402 $as_echo "$ac_cv_search_shm_unlink" >&6; }
9403 ac_res=$ac_cv_search_shm_unlink
9404 if test "$ac_res" != no; then :
9405   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9406
9407 fi
9408
9409 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
9410 $as_echo_n "checking for library containing clock_gettime... " >&6; }
9411 if ${ac_cv_search_clock_gettime+:} false; then :
9412   $as_echo_n "(cached) " >&6
9413 else
9414   ac_func_search_save_LIBS=$LIBS
9415 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9416 /* end confdefs.h.  */
9417
9418 /* Override any GCC internal prototype to avoid an error.
9419    Use char because int might match the return type of a GCC
9420    builtin and then its argument prototype would still apply.  */
9421 #ifdef __cplusplus
9422 extern "C"
9423 #endif
9424 char clock_gettime ();
9425 int
9426 main ()
9427 {
9428 return clock_gettime ();
9429   ;
9430   return 0;
9431 }
9432 _ACEOF
9433 for ac_lib in '' rt posix4; do
9434   if test -z "$ac_lib"; then
9435     ac_res="none required"
9436   else
9437     ac_res=-l$ac_lib
9438     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9439   fi
9440   if ac_fn_c_try_link "$LINENO"; then :
9441   ac_cv_search_clock_gettime=$ac_res
9442 fi
9443 rm -f core conftest.err conftest.$ac_objext \
9444     conftest$ac_exeext
9445   if ${ac_cv_search_clock_gettime+:} false; then :
9446   break
9447 fi
9448 done
9449 if ${ac_cv_search_clock_gettime+:} false; then :
9450
9451 else
9452   ac_cv_search_clock_gettime=no
9453 fi
9454 rm conftest.$ac_ext
9455 LIBS=$ac_func_search_save_LIBS
9456 fi
9457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
9458 $as_echo "$ac_cv_search_clock_gettime" >&6; }
9459 ac_res=$ac_cv_search_clock_gettime
9460 if test "$ac_res" != no; then :
9461   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9462
9463 fi
9464
9465 # Solaris:
9466 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5
9467 $as_echo_n "checking for library containing fdatasync... " >&6; }
9468 if ${ac_cv_search_fdatasync+:} false; then :
9469   $as_echo_n "(cached) " >&6
9470 else
9471   ac_func_search_save_LIBS=$LIBS
9472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9473 /* end confdefs.h.  */
9474
9475 /* Override any GCC internal prototype to avoid an error.
9476    Use char because int might match the return type of a GCC
9477    builtin and then its argument prototype would still apply.  */
9478 #ifdef __cplusplus
9479 extern "C"
9480 #endif
9481 char fdatasync ();
9482 int
9483 main ()
9484 {
9485 return fdatasync ();
9486   ;
9487   return 0;
9488 }
9489 _ACEOF
9490 for ac_lib in '' rt posix4; do
9491   if test -z "$ac_lib"; then
9492     ac_res="none required"
9493   else
9494     ac_res=-l$ac_lib
9495     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9496   fi
9497   if ac_fn_c_try_link "$LINENO"; then :
9498   ac_cv_search_fdatasync=$ac_res
9499 fi
9500 rm -f core conftest.err conftest.$ac_objext \
9501     conftest$ac_exeext
9502   if ${ac_cv_search_fdatasync+:} false; then :
9503   break
9504 fi
9505 done
9506 if ${ac_cv_search_fdatasync+:} false; then :
9507
9508 else
9509   ac_cv_search_fdatasync=no
9510 fi
9511 rm conftest.$ac_ext
9512 LIBS=$ac_func_search_save_LIBS
9513 fi
9514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5
9515 $as_echo "$ac_cv_search_fdatasync" >&6; }
9516 ac_res=$ac_cv_search_fdatasync
9517 if test "$ac_res" != no; then :
9518   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9519
9520 fi
9521
9522 # Required for thread_test.c on Solaris
9523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sched_yield" >&5
9524 $as_echo_n "checking for library containing sched_yield... " >&6; }
9525 if ${ac_cv_search_sched_yield+:} false; then :
9526   $as_echo_n "(cached) " >&6
9527 else
9528   ac_func_search_save_LIBS=$LIBS
9529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9530 /* end confdefs.h.  */
9531
9532 /* Override any GCC internal prototype to avoid an error.
9533    Use char because int might match the return type of a GCC
9534    builtin and then its argument prototype would still apply.  */
9535 #ifdef __cplusplus
9536 extern "C"
9537 #endif
9538 char sched_yield ();
9539 int
9540 main ()
9541 {
9542 return sched_yield ();
9543   ;
9544   return 0;
9545 }
9546 _ACEOF
9547 for ac_lib in '' rt; do
9548   if test -z "$ac_lib"; then
9549     ac_res="none required"
9550   else
9551     ac_res=-l$ac_lib
9552     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9553   fi
9554   if ac_fn_c_try_link "$LINENO"; then :
9555   ac_cv_search_sched_yield=$ac_res
9556 fi
9557 rm -f core conftest.err conftest.$ac_objext \
9558     conftest$ac_exeext
9559   if ${ac_cv_search_sched_yield+:} false; then :
9560   break
9561 fi
9562 done
9563 if ${ac_cv_search_sched_yield+:} false; then :
9564
9565 else
9566   ac_cv_search_sched_yield=no
9567 fi
9568 rm conftest.$ac_ext
9569 LIBS=$ac_func_search_save_LIBS
9570 fi
9571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sched_yield" >&5
9572 $as_echo "$ac_cv_search_sched_yield" >&6; }
9573 ac_res=$ac_cv_search_sched_yield
9574 if test "$ac_res" != no; then :
9575   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9576
9577 fi
9578
9579 # Required for thread_test.c on Solaris 2.5:
9580 # Other ports use it too (HP-UX) so test unconditionally
9581 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname_r" >&5
9582 $as_echo_n "checking for library containing gethostbyname_r... " >&6; }
9583 if ${ac_cv_search_gethostbyname_r+:} false; then :
9584   $as_echo_n "(cached) " >&6
9585 else
9586   ac_func_search_save_LIBS=$LIBS
9587 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9588 /* end confdefs.h.  */
9589
9590 /* Override any GCC internal prototype to avoid an error.
9591    Use char because int might match the return type of a GCC
9592    builtin and then its argument prototype would still apply.  */
9593 #ifdef __cplusplus
9594 extern "C"
9595 #endif
9596 char gethostbyname_r ();
9597 int
9598 main ()
9599 {
9600 return gethostbyname_r ();
9601   ;
9602   return 0;
9603 }
9604 _ACEOF
9605 for ac_lib in '' nsl; do
9606   if test -z "$ac_lib"; then
9607     ac_res="none required"
9608   else
9609     ac_res=-l$ac_lib
9610     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9611   fi
9612   if ac_fn_c_try_link "$LINENO"; then :
9613   ac_cv_search_gethostbyname_r=$ac_res
9614 fi
9615 rm -f core conftest.err conftest.$ac_objext \
9616     conftest$ac_exeext
9617   if ${ac_cv_search_gethostbyname_r+:} false; then :
9618   break
9619 fi
9620 done
9621 if ${ac_cv_search_gethostbyname_r+:} false; then :
9622
9623 else
9624   ac_cv_search_gethostbyname_r=no
9625 fi
9626 rm conftest.$ac_ext
9627 LIBS=$ac_func_search_save_LIBS
9628 fi
9629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname_r" >&5
9630 $as_echo "$ac_cv_search_gethostbyname_r" >&6; }
9631 ac_res=$ac_cv_search_gethostbyname_r
9632 if test "$ac_res" != no; then :
9633   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9634
9635 fi
9636
9637 # Cygwin:
9638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shmget" >&5
9639 $as_echo_n "checking for library containing shmget... " >&6; }
9640 if ${ac_cv_search_shmget+:} false; then :
9641   $as_echo_n "(cached) " >&6
9642 else
9643   ac_func_search_save_LIBS=$LIBS
9644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9645 /* end confdefs.h.  */
9646
9647 /* Override any GCC internal prototype to avoid an error.
9648    Use char because int might match the return type of a GCC
9649    builtin and then its argument prototype would still apply.  */
9650 #ifdef __cplusplus
9651 extern "C"
9652 #endif
9653 char shmget ();
9654 int
9655 main ()
9656 {
9657 return shmget ();
9658   ;
9659   return 0;
9660 }
9661 _ACEOF
9662 for ac_lib in '' cygipc; do
9663   if test -z "$ac_lib"; then
9664     ac_res="none required"
9665   else
9666     ac_res=-l$ac_lib
9667     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9668   fi
9669   if ac_fn_c_try_link "$LINENO"; then :
9670   ac_cv_search_shmget=$ac_res
9671 fi
9672 rm -f core conftest.err conftest.$ac_objext \
9673     conftest$ac_exeext
9674   if ${ac_cv_search_shmget+:} false; then :
9675   break
9676 fi
9677 done
9678 if ${ac_cv_search_shmget+:} false; then :
9679
9680 else
9681   ac_cv_search_shmget=no
9682 fi
9683 rm conftest.$ac_ext
9684 LIBS=$ac_func_search_save_LIBS
9685 fi
9686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shmget" >&5
9687 $as_echo "$ac_cv_search_shmget" >&6; }
9688 ac_res=$ac_cv_search_shmget
9689 if test "$ac_res" != no; then :
9690   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9691
9692 fi
9693
9694
9695 if test "$with_readline" = yes; then
9696
9697
9698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing readline" >&5
9699 $as_echo_n "checking for library containing readline... " >&6; }
9700 if ${pgac_cv_check_readline+:} false; then :
9701   $as_echo_n "(cached) " >&6
9702 else
9703   pgac_cv_check_readline=no
9704 pgac_save_LIBS=$LIBS
9705 if test x"$with_libedit_preferred" != x"yes"
9706 then    READLINE_ORDER="-lreadline -ledit"
9707 else    READLINE_ORDER="-ledit -lreadline"
9708 fi
9709 for pgac_rllib in $READLINE_ORDER ; do
9710   for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
9711     LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
9712     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9713 /* end confdefs.h.  */
9714
9715 /* Override any GCC internal prototype to avoid an error.
9716    Use char because int might match the return type of a GCC
9717    builtin and then its argument prototype would still apply.  */
9718 #ifdef __cplusplus
9719 extern "C"
9720 #endif
9721 char readline ();
9722 int
9723 main ()
9724 {
9725 return readline ();
9726   ;
9727   return 0;
9728 }
9729 _ACEOF
9730 if ac_fn_c_try_link "$LINENO"; then :
9731
9732       # Older NetBSD, OpenBSD, and Irix have a broken linker that does not
9733       # recognize dependent libraries; assume curses is needed if we didn't
9734       # find any dependency.
9735       case $host_os in
9736         netbsd* | openbsd* | irix*)
9737           if test x"$pgac_lib" = x"" ; then
9738             pgac_lib=" -lcurses"
9739           fi ;;
9740       esac
9741
9742       pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
9743       break
9744
9745 fi
9746 rm -f core conftest.err conftest.$ac_objext \
9747     conftest$ac_exeext conftest.$ac_ext
9748   done
9749   if test "$pgac_cv_check_readline" != no ; then
9750     break
9751   fi
9752 done
9753 LIBS=$pgac_save_LIBS
9754
9755 fi
9756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_readline" >&5
9757 $as_echo "$pgac_cv_check_readline" >&6; }
9758 if test "$pgac_cv_check_readline" != no ; then
9759   LIBS="$pgac_cv_check_readline $LIBS"
9760
9761 $as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
9762
9763 fi
9764
9765
9766   if test x"$pgac_cv_check_readline" = x"no"; then
9767     as_fn_error $? "readline library not found
9768 If you have readline already installed, see config.log for details on the
9769 failure.  It is possible the compiler isn't looking in the proper directory.
9770 Use --without-readline to disable readline support." "$LINENO" 5
9771   fi
9772 fi
9773
9774 if test "$with_zlib" = yes; then
9775   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5
9776 $as_echo_n "checking for inflate in -lz... " >&6; }
9777 if ${ac_cv_lib_z_inflate+:} false; then :
9778   $as_echo_n "(cached) " >&6
9779 else
9780   ac_check_lib_save_LIBS=$LIBS
9781 LIBS="-lz  $LIBS"
9782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9783 /* end confdefs.h.  */
9784
9785 /* Override any GCC internal prototype to avoid an error.
9786    Use char because int might match the return type of a GCC
9787    builtin and then its argument prototype would still apply.  */
9788 #ifdef __cplusplus
9789 extern "C"
9790 #endif
9791 char inflate ();
9792 int
9793 main ()
9794 {
9795 return inflate ();
9796   ;
9797   return 0;
9798 }
9799 _ACEOF
9800 if ac_fn_c_try_link "$LINENO"; then :
9801   ac_cv_lib_z_inflate=yes
9802 else
9803   ac_cv_lib_z_inflate=no
9804 fi
9805 rm -f core conftest.err conftest.$ac_objext \
9806     conftest$ac_exeext conftest.$ac_ext
9807 LIBS=$ac_check_lib_save_LIBS
9808 fi
9809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5
9810 $as_echo "$ac_cv_lib_z_inflate" >&6; }
9811 if test "x$ac_cv_lib_z_inflate" = xyes; then :
9812   cat >>confdefs.h <<_ACEOF
9813 #define HAVE_LIBZ 1
9814 _ACEOF
9815
9816   LIBS="-lz $LIBS"
9817
9818 else
9819   as_fn_error $? "zlib library not found
9820 If you have zlib already installed, see config.log for details on the
9821 failure.  It is possible the compiler isn't looking in the proper directory.
9822 Use --without-zlib to disable zlib support." "$LINENO" 5
9823 fi
9824
9825 fi
9826
9827 if test "$enable_spinlocks" = yes; then
9828
9829 $as_echo "#define HAVE_SPINLOCKS 1" >>confdefs.h
9830
9831 else
9832   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9833 *** Not using spinlocks will cause poor performance." >&5
9834 $as_echo "$as_me: WARNING:
9835 *** Not using spinlocks will cause poor performance." >&2;}
9836 fi
9837
9838 if test "$enable_atomics" = yes; then
9839
9840 $as_echo "#define HAVE_ATOMICS 1" >>confdefs.h
9841
9842 else
9843   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9844 *** Not using atomic operations will cause poor performance." >&5
9845 $as_echo "$as_me: WARNING:
9846 *** Not using atomic operations will cause poor performance." >&2;}
9847 fi
9848
9849 if test "$with_gssapi" = yes ; then
9850   if test "$PORTNAME" != "win32"; then
9851     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gss_init_sec_context" >&5
9852 $as_echo_n "checking for library containing gss_init_sec_context... " >&6; }
9853 if ${ac_cv_search_gss_init_sec_context+:} false; then :
9854   $as_echo_n "(cached) " >&6
9855 else
9856   ac_func_search_save_LIBS=$LIBS
9857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9858 /* end confdefs.h.  */
9859
9860 /* Override any GCC internal prototype to avoid an error.
9861    Use char because int might match the return type of a GCC
9862    builtin and then its argument prototype would still apply.  */
9863 #ifdef __cplusplus
9864 extern "C"
9865 #endif
9866 char gss_init_sec_context ();
9867 int
9868 main ()
9869 {
9870 return gss_init_sec_context ();
9871   ;
9872   return 0;
9873 }
9874 _ACEOF
9875 for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'; do
9876   if test -z "$ac_lib"; then
9877     ac_res="none required"
9878   else
9879     ac_res=-l$ac_lib
9880     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9881   fi
9882   if ac_fn_c_try_link "$LINENO"; then :
9883   ac_cv_search_gss_init_sec_context=$ac_res
9884 fi
9885 rm -f core conftest.err conftest.$ac_objext \
9886     conftest$ac_exeext
9887   if ${ac_cv_search_gss_init_sec_context+:} false; then :
9888   break
9889 fi
9890 done
9891 if ${ac_cv_search_gss_init_sec_context+:} false; then :
9892
9893 else
9894   ac_cv_search_gss_init_sec_context=no
9895 fi
9896 rm conftest.$ac_ext
9897 LIBS=$ac_func_search_save_LIBS
9898 fi
9899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gss_init_sec_context" >&5
9900 $as_echo "$ac_cv_search_gss_init_sec_context" >&6; }
9901 ac_res=$ac_cv_search_gss_init_sec_context
9902 if test "$ac_res" != no; then :
9903   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9904
9905 else
9906   as_fn_error $? "could not find function 'gss_init_sec_context' required for GSSAPI" "$LINENO" 5
9907 fi
9908
9909   else
9910     LIBS="$LIBS -lgssapi32"
9911   fi
9912 fi
9913
9914 if test "$with_openssl" = yes ; then
9915     if test "$PORTNAME" != "win32"; then
9916      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_new_ex_data in -lcrypto" >&5
9917 $as_echo_n "checking for CRYPTO_new_ex_data in -lcrypto... " >&6; }
9918 if ${ac_cv_lib_crypto_CRYPTO_new_ex_data+:} false; then :
9919   $as_echo_n "(cached) " >&6
9920 else
9921   ac_check_lib_save_LIBS=$LIBS
9922 LIBS="-lcrypto  $LIBS"
9923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9924 /* end confdefs.h.  */
9925
9926 /* Override any GCC internal prototype to avoid an error.
9927    Use char because int might match the return type of a GCC
9928    builtin and then its argument prototype would still apply.  */
9929 #ifdef __cplusplus
9930 extern "C"
9931 #endif
9932 char CRYPTO_new_ex_data ();
9933 int
9934 main ()
9935 {
9936 return CRYPTO_new_ex_data ();
9937   ;
9938   return 0;
9939 }
9940 _ACEOF
9941 if ac_fn_c_try_link "$LINENO"; then :
9942   ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
9943 else
9944   ac_cv_lib_crypto_CRYPTO_new_ex_data=no
9945 fi
9946 rm -f core conftest.err conftest.$ac_objext \
9947     conftest$ac_exeext conftest.$ac_ext
9948 LIBS=$ac_check_lib_save_LIBS
9949 fi
9950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
9951 $as_echo "$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6; }
9952 if test "x$ac_cv_lib_crypto_CRYPTO_new_ex_data" = xyes; then :
9953   cat >>confdefs.h <<_ACEOF
9954 #define HAVE_LIBCRYPTO 1
9955 _ACEOF
9956
9957   LIBS="-lcrypto $LIBS"
9958
9959 else
9960   as_fn_error $? "library 'crypto' is required for OpenSSL" "$LINENO" 5
9961 fi
9962
9963      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl" >&5
9964 $as_echo_n "checking for SSL_new in -lssl... " >&6; }
9965 if ${ac_cv_lib_ssl_SSL_new+:} false; then :
9966   $as_echo_n "(cached) " >&6
9967 else
9968   ac_check_lib_save_LIBS=$LIBS
9969 LIBS="-lssl  $LIBS"
9970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9971 /* end confdefs.h.  */
9972
9973 /* Override any GCC internal prototype to avoid an error.
9974    Use char because int might match the return type of a GCC
9975    builtin and then its argument prototype would still apply.  */
9976 #ifdef __cplusplus
9977 extern "C"
9978 #endif
9979 char SSL_new ();
9980 int
9981 main ()
9982 {
9983 return SSL_new ();
9984   ;
9985   return 0;
9986 }
9987 _ACEOF
9988 if ac_fn_c_try_link "$LINENO"; then :
9989   ac_cv_lib_ssl_SSL_new=yes
9990 else
9991   ac_cv_lib_ssl_SSL_new=no
9992 fi
9993 rm -f core conftest.err conftest.$ac_objext \
9994     conftest$ac_exeext conftest.$ac_ext
9995 LIBS=$ac_check_lib_save_LIBS
9996 fi
9997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_new" >&5
9998 $as_echo "$ac_cv_lib_ssl_SSL_new" >&6; }
9999 if test "x$ac_cv_lib_ssl_SSL_new" = xyes; then :
10000   cat >>confdefs.h <<_ACEOF
10001 #define HAVE_LIBSSL 1
10002 _ACEOF
10003
10004   LIBS="-lssl $LIBS"
10005
10006 else
10007   as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5
10008 fi
10009
10010   else
10011      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing CRYPTO_new_ex_data" >&5
10012 $as_echo_n "checking for library containing CRYPTO_new_ex_data... " >&6; }
10013 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
10014   $as_echo_n "(cached) " >&6
10015 else
10016   ac_func_search_save_LIBS=$LIBS
10017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10018 /* end confdefs.h.  */
10019
10020 /* Override any GCC internal prototype to avoid an error.
10021    Use char because int might match the return type of a GCC
10022    builtin and then its argument prototype would still apply.  */
10023 #ifdef __cplusplus
10024 extern "C"
10025 #endif
10026 char CRYPTO_new_ex_data ();
10027 int
10028 main ()
10029 {
10030 return CRYPTO_new_ex_data ();
10031   ;
10032   return 0;
10033 }
10034 _ACEOF
10035 for ac_lib in '' eay32 crypto; do
10036   if test -z "$ac_lib"; then
10037     ac_res="none required"
10038   else
10039     ac_res=-l$ac_lib
10040     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10041   fi
10042   if ac_fn_c_try_link "$LINENO"; then :
10043   ac_cv_search_CRYPTO_new_ex_data=$ac_res
10044 fi
10045 rm -f core conftest.err conftest.$ac_objext \
10046     conftest$ac_exeext
10047   if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
10048   break
10049 fi
10050 done
10051 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
10052
10053 else
10054   ac_cv_search_CRYPTO_new_ex_data=no
10055 fi
10056 rm conftest.$ac_ext
10057 LIBS=$ac_func_search_save_LIBS
10058 fi
10059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_CRYPTO_new_ex_data" >&5
10060 $as_echo "$ac_cv_search_CRYPTO_new_ex_data" >&6; }
10061 ac_res=$ac_cv_search_CRYPTO_new_ex_data
10062 if test "$ac_res" != no; then :
10063   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10064
10065 else
10066   as_fn_error $? "library 'eay32' or 'crypto' is required for OpenSSL" "$LINENO" 5
10067 fi
10068
10069      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_new" >&5
10070 $as_echo_n "checking for library containing SSL_new... " >&6; }
10071 if ${ac_cv_search_SSL_new+:} false; then :
10072   $as_echo_n "(cached) " >&6
10073 else
10074   ac_func_search_save_LIBS=$LIBS
10075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10076 /* end confdefs.h.  */
10077
10078 /* Override any GCC internal prototype to avoid an error.
10079    Use char because int might match the return type of a GCC
10080    builtin and then its argument prototype would still apply.  */
10081 #ifdef __cplusplus
10082 extern "C"
10083 #endif
10084 char SSL_new ();
10085 int
10086 main ()
10087 {
10088 return SSL_new ();
10089   ;
10090   return 0;
10091 }
10092 _ACEOF
10093 for ac_lib in '' ssleay32 ssl; do
10094   if test -z "$ac_lib"; then
10095     ac_res="none required"
10096   else
10097     ac_res=-l$ac_lib
10098     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10099   fi
10100   if ac_fn_c_try_link "$LINENO"; then :
10101   ac_cv_search_SSL_new=$ac_res
10102 fi
10103 rm -f core conftest.err conftest.$ac_objext \
10104     conftest$ac_exeext
10105   if ${ac_cv_search_SSL_new+:} false; then :
10106   break
10107 fi
10108 done
10109 if ${ac_cv_search_SSL_new+:} false; then :
10110
10111 else
10112   ac_cv_search_SSL_new=no
10113 fi
10114 rm conftest.$ac_ext
10115 LIBS=$ac_func_search_save_LIBS
10116 fi
10117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_new" >&5
10118 $as_echo "$ac_cv_search_SSL_new" >&6; }
10119 ac_res=$ac_cv_search_SSL_new
10120 if test "$ac_res" != no; then :
10121   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10122
10123 else
10124   as_fn_error $? "library 'ssleay32' or 'ssl' is required for OpenSSL" "$LINENO" 5
10125 fi
10126
10127   fi
10128   for ac_func in SSL_get_current_compression X509_get_signature_nid
10129 do :
10130   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10131 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10132 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
10133   cat >>confdefs.h <<_ACEOF
10134 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10135 _ACEOF
10136
10137 fi
10138 done
10139
10140   # Functions introduced in OpenSSL 1.1.0. We used to check for
10141   # OPENSSL_VERSION_NUMBER, but that didn't work with 1.1.0, because LibreSSL
10142   # defines OPENSSL_VERSION_NUMBER to claim version 2.0.0, even though it
10143   # doesn't have these OpenSSL 1.1.0 functions. So check for individual
10144   # functions.
10145   for ac_func in OPENSSL_init_ssl BIO_get_data BIO_meth_new ASN1_STRING_get0_data RAND_OpenSSL
10146 do :
10147   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10148 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10149 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
10150   cat >>confdefs.h <<_ACEOF
10151 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10152 _ACEOF
10153
10154 fi
10155 done
10156
10157   # OpenSSL versions before 1.1.0 required setting callback functions, for
10158   # thread-safety. In 1.1.0, it's no longer required, and CRYPTO_lock()
10159   # function was removed.
10160   for ac_func in CRYPTO_lock
10161 do :
10162   ac_fn_c_check_func "$LINENO" "CRYPTO_lock" "ac_cv_func_CRYPTO_lock"
10163 if test "x$ac_cv_func_CRYPTO_lock" = xyes; then :
10164   cat >>confdefs.h <<_ACEOF
10165 #define HAVE_CRYPTO_LOCK 1
10166 _ACEOF
10167
10168 fi
10169 done
10170
10171 fi
10172
10173 if test "$with_pam" = yes ; then
10174   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_start in -lpam" >&5
10175 $as_echo_n "checking for pam_start in -lpam... " >&6; }
10176 if ${ac_cv_lib_pam_pam_start+:} false; then :
10177   $as_echo_n "(cached) " >&6
10178 else
10179   ac_check_lib_save_LIBS=$LIBS
10180 LIBS="-lpam  $LIBS"
10181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10182 /* end confdefs.h.  */
10183
10184 /* Override any GCC internal prototype to avoid an error.
10185    Use char because int might match the return type of a GCC
10186    builtin and then its argument prototype would still apply.  */
10187 #ifdef __cplusplus
10188 extern "C"
10189 #endif
10190 char pam_start ();
10191 int
10192 main ()
10193 {
10194 return pam_start ();
10195   ;
10196   return 0;
10197 }
10198 _ACEOF
10199 if ac_fn_c_try_link "$LINENO"; then :
10200   ac_cv_lib_pam_pam_start=yes
10201 else
10202   ac_cv_lib_pam_pam_start=no
10203 fi
10204 rm -f core conftest.err conftest.$ac_objext \
10205     conftest$ac_exeext conftest.$ac_ext
10206 LIBS=$ac_check_lib_save_LIBS
10207 fi
10208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_start" >&5
10209 $as_echo "$ac_cv_lib_pam_pam_start" >&6; }
10210 if test "x$ac_cv_lib_pam_pam_start" = xyes; then :
10211   cat >>confdefs.h <<_ACEOF
10212 #define HAVE_LIBPAM 1
10213 _ACEOF
10214
10215   LIBS="-lpam $LIBS"
10216
10217 else
10218   as_fn_error $? "library 'pam' is required for PAM" "$LINENO" 5
10219 fi
10220
10221 fi
10222
10223 if test "$with_libxml" = yes ; then
10224   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlSaveToBuffer in -lxml2" >&5
10225 $as_echo_n "checking for xmlSaveToBuffer in -lxml2... " >&6; }
10226 if ${ac_cv_lib_xml2_xmlSaveToBuffer+:} false; then :
10227   $as_echo_n "(cached) " >&6
10228 else
10229   ac_check_lib_save_LIBS=$LIBS
10230 LIBS="-lxml2  $LIBS"
10231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10232 /* end confdefs.h.  */
10233
10234 /* Override any GCC internal prototype to avoid an error.
10235    Use char because int might match the return type of a GCC
10236    builtin and then its argument prototype would still apply.  */
10237 #ifdef __cplusplus
10238 extern "C"
10239 #endif
10240 char xmlSaveToBuffer ();
10241 int
10242 main ()
10243 {
10244 return xmlSaveToBuffer ();
10245   ;
10246   return 0;
10247 }
10248 _ACEOF
10249 if ac_fn_c_try_link "$LINENO"; then :
10250   ac_cv_lib_xml2_xmlSaveToBuffer=yes
10251 else
10252   ac_cv_lib_xml2_xmlSaveToBuffer=no
10253 fi
10254 rm -f core conftest.err conftest.$ac_objext \
10255     conftest$ac_exeext conftest.$ac_ext
10256 LIBS=$ac_check_lib_save_LIBS
10257 fi
10258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlSaveToBuffer" >&5
10259 $as_echo "$ac_cv_lib_xml2_xmlSaveToBuffer" >&6; }
10260 if test "x$ac_cv_lib_xml2_xmlSaveToBuffer" = xyes; then :
10261   cat >>confdefs.h <<_ACEOF
10262 #define HAVE_LIBXML2 1
10263 _ACEOF
10264
10265   LIBS="-lxml2 $LIBS"
10266
10267 else
10268   as_fn_error $? "library 'xml2' (version >= 2.6.23) is required for XML support" "$LINENO" 5
10269 fi
10270
10271 fi
10272
10273 if test "$with_libxslt" = yes ; then
10274   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xsltCleanupGlobals in -lxslt" >&5
10275 $as_echo_n "checking for xsltCleanupGlobals in -lxslt... " >&6; }
10276 if ${ac_cv_lib_xslt_xsltCleanupGlobals+:} false; then :
10277   $as_echo_n "(cached) " >&6
10278 else
10279   ac_check_lib_save_LIBS=$LIBS
10280 LIBS="-lxslt  $LIBS"
10281 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10282 /* end confdefs.h.  */
10283
10284 /* Override any GCC internal prototype to avoid an error.
10285    Use char because int might match the return type of a GCC
10286    builtin and then its argument prototype would still apply.  */
10287 #ifdef __cplusplus
10288 extern "C"
10289 #endif
10290 char xsltCleanupGlobals ();
10291 int
10292 main ()
10293 {
10294 return xsltCleanupGlobals ();
10295   ;
10296   return 0;
10297 }
10298 _ACEOF
10299 if ac_fn_c_try_link "$LINENO"; then :
10300   ac_cv_lib_xslt_xsltCleanupGlobals=yes
10301 else
10302   ac_cv_lib_xslt_xsltCleanupGlobals=no
10303 fi
10304 rm -f core conftest.err conftest.$ac_objext \
10305     conftest$ac_exeext conftest.$ac_ext
10306 LIBS=$ac_check_lib_save_LIBS
10307 fi
10308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xslt_xsltCleanupGlobals" >&5
10309 $as_echo "$ac_cv_lib_xslt_xsltCleanupGlobals" >&6; }
10310 if test "x$ac_cv_lib_xslt_xsltCleanupGlobals" = xyes; then :
10311   cat >>confdefs.h <<_ACEOF
10312 #define HAVE_LIBXSLT 1
10313 _ACEOF
10314
10315   LIBS="-lxslt $LIBS"
10316
10317 else
10318   as_fn_error $? "library 'xslt' is required for XSLT support" "$LINENO" 5
10319 fi
10320
10321 fi
10322
10323 # Note: We can test for libldap_r only after we know PTHREAD_LIBS
10324 if test "$with_ldap" = yes ; then
10325   _LIBS="$LIBS"
10326   if test "$PORTNAME" != "win32"; then
10327     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap" >&5
10328 $as_echo_n "checking for ldap_bind in -lldap... " >&6; }
10329 if ${ac_cv_lib_ldap_ldap_bind+:} false; then :
10330   $as_echo_n "(cached) " >&6
10331 else
10332   ac_check_lib_save_LIBS=$LIBS
10333 LIBS="-lldap $EXTRA_LDAP_LIBS $LIBS"
10334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10335 /* end confdefs.h.  */
10336
10337 /* Override any GCC internal prototype to avoid an error.
10338    Use char because int might match the return type of a GCC
10339    builtin and then its argument prototype would still apply.  */
10340 #ifdef __cplusplus
10341 extern "C"
10342 #endif
10343 char ldap_bind ();
10344 int
10345 main ()
10346 {
10347 return ldap_bind ();
10348   ;
10349   return 0;
10350 }
10351 _ACEOF
10352 if ac_fn_c_try_link "$LINENO"; then :
10353   ac_cv_lib_ldap_ldap_bind=yes
10354 else
10355   ac_cv_lib_ldap_ldap_bind=no
10356 fi
10357 rm -f core conftest.err conftest.$ac_objext \
10358     conftest$ac_exeext conftest.$ac_ext
10359 LIBS=$ac_check_lib_save_LIBS
10360 fi
10361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_ldap_bind" >&5
10362 $as_echo "$ac_cv_lib_ldap_ldap_bind" >&6; }
10363 if test "x$ac_cv_lib_ldap_ldap_bind" = xyes; then :
10364   cat >>confdefs.h <<_ACEOF
10365 #define HAVE_LIBLDAP 1
10366 _ACEOF
10367
10368   LIBS="-lldap $LIBS"
10369
10370 else
10371   as_fn_error $? "library 'ldap' is required for LDAP" "$LINENO" 5
10372 fi
10373
10374     LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
10375     if test "$enable_thread_safety" = yes; then
10376       # on some platforms ldap_r fails to link without PTHREAD_LIBS
10377       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_simple_bind in -lldap_r" >&5
10378 $as_echo_n "checking for ldap_simple_bind in -lldap_r... " >&6; }
10379 if ${ac_cv_lib_ldap_r_ldap_simple_bind+:} false; then :
10380   $as_echo_n "(cached) " >&6
10381 else
10382   ac_check_lib_save_LIBS=$LIBS
10383 LIBS="-lldap_r $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
10384 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10385 /* end confdefs.h.  */
10386
10387 /* Override any GCC internal prototype to avoid an error.
10388    Use char because int might match the return type of a GCC
10389    builtin and then its argument prototype would still apply.  */
10390 #ifdef __cplusplus
10391 extern "C"
10392 #endif
10393 char ldap_simple_bind ();
10394 int
10395 main ()
10396 {
10397 return ldap_simple_bind ();
10398   ;
10399   return 0;
10400 }
10401 _ACEOF
10402 if ac_fn_c_try_link "$LINENO"; then :
10403   ac_cv_lib_ldap_r_ldap_simple_bind=yes
10404 else
10405   ac_cv_lib_ldap_r_ldap_simple_bind=no
10406 fi
10407 rm -f core conftest.err conftest.$ac_objext \
10408     conftest$ac_exeext conftest.$ac_ext
10409 LIBS=$ac_check_lib_save_LIBS
10410 fi
10411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_r_ldap_simple_bind" >&5
10412 $as_echo "$ac_cv_lib_ldap_r_ldap_simple_bind" >&6; }
10413 if test "x$ac_cv_lib_ldap_r_ldap_simple_bind" = xyes; then :
10414   cat >>confdefs.h <<_ACEOF
10415 #define HAVE_LIBLDAP_R 1
10416 _ACEOF
10417
10418   LIBS="-lldap_r $LIBS"
10419
10420 else
10421   as_fn_error $? "library 'ldap_r' is required for LDAP" "$LINENO" 5
10422 fi
10423
10424       LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
10425     else
10426       LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
10427     fi
10428     for ac_func in ldap_initialize
10429 do :
10430   ac_fn_c_check_func "$LINENO" "ldap_initialize" "ac_cv_func_ldap_initialize"
10431 if test "x$ac_cv_func_ldap_initialize" = xyes; then :
10432   cat >>confdefs.h <<_ACEOF
10433 #define HAVE_LDAP_INITIALIZE 1
10434 _ACEOF
10435
10436 fi
10437 done
10438
10439   else
10440     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lwldap32" >&5
10441 $as_echo_n "checking for ldap_bind in -lwldap32... " >&6; }
10442 if ${ac_cv_lib_wldap32_ldap_bind+:} false; then :
10443   $as_echo_n "(cached) " >&6
10444 else
10445   ac_check_lib_save_LIBS=$LIBS
10446 LIBS="-lwldap32  $LIBS"
10447 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10448 /* end confdefs.h.  */
10449
10450 /* Override any GCC internal prototype to avoid an error.
10451    Use char because int might match the return type of a GCC
10452    builtin and then its argument prototype would still apply.  */
10453 #ifdef __cplusplus
10454 extern "C"
10455 #endif
10456 char ldap_bind ();
10457 int
10458 main ()
10459 {
10460 return ldap_bind ();
10461   ;
10462   return 0;
10463 }
10464 _ACEOF
10465 if ac_fn_c_try_link "$LINENO"; then :
10466   ac_cv_lib_wldap32_ldap_bind=yes
10467 else
10468   ac_cv_lib_wldap32_ldap_bind=no
10469 fi
10470 rm -f core conftest.err conftest.$ac_objext \
10471     conftest$ac_exeext conftest.$ac_ext
10472 LIBS=$ac_check_lib_save_LIBS
10473 fi
10474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wldap32_ldap_bind" >&5
10475 $as_echo "$ac_cv_lib_wldap32_ldap_bind" >&6; }
10476 if test "x$ac_cv_lib_wldap32_ldap_bind" = xyes; then :
10477   cat >>confdefs.h <<_ACEOF
10478 #define HAVE_LIBWLDAP32 1
10479 _ACEOF
10480
10481   LIBS="-lwldap32 $LIBS"
10482
10483 else
10484   as_fn_error $? "library 'wldap32' is required for LDAP" "$LINENO" 5
10485 fi
10486
10487     LDAP_LIBS_FE="-lwldap32"
10488     LDAP_LIBS_BE="-lwldap32"
10489   fi
10490   LIBS="$_LIBS"
10491 fi
10492
10493
10494
10495 # for contrib/sepgsql
10496 if test "$with_selinux" = yes; then
10497   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_compute_create_name in -lselinux" >&5
10498 $as_echo_n "checking for security_compute_create_name in -lselinux... " >&6; }
10499 if ${ac_cv_lib_selinux_security_compute_create_name+:} false; then :
10500   $as_echo_n "(cached) " >&6
10501 else
10502   ac_check_lib_save_LIBS=$LIBS
10503 LIBS="-lselinux  $LIBS"
10504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10505 /* end confdefs.h.  */
10506
10507 /* Override any GCC internal prototype to avoid an error.
10508    Use char because int might match the return type of a GCC
10509    builtin and then its argument prototype would still apply.  */
10510 #ifdef __cplusplus
10511 extern "C"
10512 #endif
10513 char security_compute_create_name ();
10514 int
10515 main ()
10516 {
10517 return security_compute_create_name ();
10518   ;
10519   return 0;
10520 }
10521 _ACEOF
10522 if ac_fn_c_try_link "$LINENO"; then :
10523   ac_cv_lib_selinux_security_compute_create_name=yes
10524 else
10525   ac_cv_lib_selinux_security_compute_create_name=no
10526 fi
10527 rm -f core conftest.err conftest.$ac_objext \
10528     conftest$ac_exeext conftest.$ac_ext
10529 LIBS=$ac_check_lib_save_LIBS
10530 fi
10531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_compute_create_name" >&5
10532 $as_echo "$ac_cv_lib_selinux_security_compute_create_name" >&6; }
10533 if test "x$ac_cv_lib_selinux_security_compute_create_name" = xyes; then :
10534   cat >>confdefs.h <<_ACEOF
10535 #define HAVE_LIBSELINUX 1
10536 _ACEOF
10537
10538   LIBS="-lselinux $LIBS"
10539
10540 else
10541   as_fn_error $? "library 'libselinux', version 2.1.10 or newer, is required for SELinux support" "$LINENO" 5
10542 fi
10543
10544 fi
10545
10546 # for contrib/uuid-ossp
10547 if test "$with_uuid" = bsd ; then
10548   # On BSD, the UUID functions are in libc
10549   ac_fn_c_check_func "$LINENO" "uuid_to_string" "ac_cv_func_uuid_to_string"
10550 if test "x$ac_cv_func_uuid_to_string" = xyes; then :
10551   UUID_LIBS=""
10552 else
10553   as_fn_error $? "BSD UUID functions are not present" "$LINENO" 5
10554 fi
10555
10556 elif test "$with_uuid" = e2fs ; then
10557   # On macOS, the UUID functions are in libc
10558   ac_fn_c_check_func "$LINENO" "uuid_generate" "ac_cv_func_uuid_generate"
10559 if test "x$ac_cv_func_uuid_generate" = xyes; then :
10560   UUID_LIBS=""
10561 else
10562   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5
10563 $as_echo_n "checking for uuid_generate in -luuid... " >&6; }
10564 if ${ac_cv_lib_uuid_uuid_generate+:} false; then :
10565   $as_echo_n "(cached) " >&6
10566 else
10567   ac_check_lib_save_LIBS=$LIBS
10568 LIBS="-luuid  $LIBS"
10569 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10570 /* end confdefs.h.  */
10571
10572 /* Override any GCC internal prototype to avoid an error.
10573    Use char because int might match the return type of a GCC
10574    builtin and then its argument prototype would still apply.  */
10575 #ifdef __cplusplus
10576 extern "C"
10577 #endif
10578 char uuid_generate ();
10579 int
10580 main ()
10581 {
10582 return uuid_generate ();
10583   ;
10584   return 0;
10585 }
10586 _ACEOF
10587 if ac_fn_c_try_link "$LINENO"; then :
10588   ac_cv_lib_uuid_uuid_generate=yes
10589 else
10590   ac_cv_lib_uuid_uuid_generate=no
10591 fi
10592 rm -f core conftest.err conftest.$ac_objext \
10593     conftest$ac_exeext conftest.$ac_ext
10594 LIBS=$ac_check_lib_save_LIBS
10595 fi
10596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate" >&5
10597 $as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; }
10598 if test "x$ac_cv_lib_uuid_uuid_generate" = xyes; then :
10599   UUID_LIBS="-luuid"
10600 else
10601   as_fn_error $? "library 'uuid' is required for E2FS UUID" "$LINENO" 5
10602 fi
10603
10604 fi
10605
10606 elif test "$with_uuid" = ossp ; then
10607   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -lossp-uuid" >&5
10608 $as_echo_n "checking for uuid_export in -lossp-uuid... " >&6; }
10609 if ${ac_cv_lib_ossp_uuid_uuid_export+:} false; then :
10610   $as_echo_n "(cached) " >&6
10611 else
10612   ac_check_lib_save_LIBS=$LIBS
10613 LIBS="-lossp-uuid  $LIBS"
10614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10615 /* end confdefs.h.  */
10616
10617 /* Override any GCC internal prototype to avoid an error.
10618    Use char because int might match the return type of a GCC
10619    builtin and then its argument prototype would still apply.  */
10620 #ifdef __cplusplus
10621 extern "C"
10622 #endif
10623 char uuid_export ();
10624 int
10625 main ()
10626 {
10627 return uuid_export ();
10628   ;
10629   return 0;
10630 }
10631 _ACEOF
10632 if ac_fn_c_try_link "$LINENO"; then :
10633   ac_cv_lib_ossp_uuid_uuid_export=yes
10634 else
10635   ac_cv_lib_ossp_uuid_uuid_export=no
10636 fi
10637 rm -f core conftest.err conftest.$ac_objext \
10638     conftest$ac_exeext conftest.$ac_ext
10639 LIBS=$ac_check_lib_save_LIBS
10640 fi
10641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossp_uuid_uuid_export" >&5
10642 $as_echo "$ac_cv_lib_ossp_uuid_uuid_export" >&6; }
10643 if test "x$ac_cv_lib_ossp_uuid_uuid_export" = xyes; then :
10644   UUID_LIBS="-lossp-uuid"
10645 else
10646   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -luuid" >&5
10647 $as_echo_n "checking for uuid_export in -luuid... " >&6; }
10648 if ${ac_cv_lib_uuid_uuid_export+:} false; then :
10649   $as_echo_n "(cached) " >&6
10650 else
10651   ac_check_lib_save_LIBS=$LIBS
10652 LIBS="-luuid  $LIBS"
10653 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10654 /* end confdefs.h.  */
10655
10656 /* Override any GCC internal prototype to avoid an error.
10657    Use char because int might match the return type of a GCC
10658    builtin and then its argument prototype would still apply.  */
10659 #ifdef __cplusplus
10660 extern "C"
10661 #endif
10662 char uuid_export ();
10663 int
10664 main ()
10665 {
10666 return uuid_export ();
10667   ;
10668   return 0;
10669 }
10670 _ACEOF
10671 if ac_fn_c_try_link "$LINENO"; then :
10672   ac_cv_lib_uuid_uuid_export=yes
10673 else
10674   ac_cv_lib_uuid_uuid_export=no
10675 fi
10676 rm -f core conftest.err conftest.$ac_objext \
10677     conftest$ac_exeext conftest.$ac_ext
10678 LIBS=$ac_check_lib_save_LIBS
10679 fi
10680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_export" >&5
10681 $as_echo "$ac_cv_lib_uuid_uuid_export" >&6; }
10682 if test "x$ac_cv_lib_uuid_uuid_export" = xyes; then :
10683   UUID_LIBS="-luuid"
10684 else
10685   as_fn_error $? "library 'ossp-uuid' or 'uuid' is required for OSSP UUID" "$LINENO" 5
10686 fi
10687
10688 fi
10689
10690 fi
10691
10692
10693
10694 ##
10695 ## Header files
10696 ##
10697
10698 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
10699 do :
10700   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10701 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
10702 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
10703   cat >>confdefs.h <<_ACEOF
10704 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10705 _ACEOF
10706
10707 fi
10708
10709 done
10710
10711
10712 # On BSD, test for net/if.h will fail unless sys/socket.h
10713 # is included first.
10714 for ac_header in net/if.h
10715 do :
10716   ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
10717 #include <sys/socket.h>
10718
10719 "
10720 if test "x$ac_cv_header_net_if_h" = xyes; then :
10721   cat >>confdefs.h <<_ACEOF
10722 #define HAVE_NET_IF_H 1
10723 _ACEOF
10724
10725 fi
10726
10727 done
10728
10729
10730 # On OpenBSD, test for sys/ucred.h will fail unless sys/param.h
10731 # is included first.
10732 for ac_header in sys/ucred.h
10733 do :
10734   ac_fn_c_check_header_compile "$LINENO" "sys/ucred.h" "ac_cv_header_sys_ucred_h" "$ac_includes_default
10735 #include <sys/param.h>
10736
10737 "
10738 if test "x$ac_cv_header_sys_ucred_h" = xyes; then :
10739   cat >>confdefs.h <<_ACEOF
10740 #define HAVE_SYS_UCRED_H 1
10741 _ACEOF
10742
10743 fi
10744
10745 done
10746
10747
10748 # At least on IRIX, test for netinet/tcp.h will fail unless
10749 # netinet/in.h is included first.
10750 for ac_header in netinet/tcp.h
10751 do :
10752   ac_fn_c_check_header_compile "$LINENO" "netinet/tcp.h" "ac_cv_header_netinet_tcp_h" "$ac_includes_default
10753 #include <netinet/in.h>
10754
10755 "
10756 if test "x$ac_cv_header_netinet_tcp_h" = xyes; then :
10757   cat >>confdefs.h <<_ACEOF
10758 #define HAVE_NETINET_TCP_H 1
10759 _ACEOF
10760
10761 fi
10762
10763 done
10764
10765
10766 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
10767   for ac_header in readline/readline.h
10768 do :
10769   ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
10770 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
10771   cat >>confdefs.h <<_ACEOF
10772 #define HAVE_READLINE_READLINE_H 1
10773 _ACEOF
10774
10775 else
10776   for ac_header in readline.h
10777 do :
10778   ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
10779 if test "x$ac_cv_header_readline_h" = xyes; then :
10780   cat >>confdefs.h <<_ACEOF
10781 #define HAVE_READLINE_H 1
10782 _ACEOF
10783
10784 else
10785   as_fn_error $? "readline header not found
10786 If you have readline already installed, see config.log for details on the
10787 failure.  It is possible the compiler isn't looking in the proper directory.
10788 Use --without-readline to disable readline support." "$LINENO" 5
10789 fi
10790
10791 done
10792
10793 fi
10794
10795 done
10796
10797   for ac_header in readline/history.h
10798 do :
10799   ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
10800 if test "x$ac_cv_header_readline_history_h" = xyes; then :
10801   cat >>confdefs.h <<_ACEOF
10802 #define HAVE_READLINE_HISTORY_H 1
10803 _ACEOF
10804
10805 else
10806   for ac_header in history.h
10807 do :
10808   ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
10809 if test "x$ac_cv_header_history_h" = xyes; then :
10810   cat >>confdefs.h <<_ACEOF
10811 #define HAVE_HISTORY_H 1
10812 _ACEOF
10813
10814 else
10815   as_fn_error $? "history header not found
10816 If you have readline already installed, see config.log for details on the
10817 failure.  It is possible the compiler isn't looking in the proper directory.
10818 Use --without-readline to disable readline support." "$LINENO" 5
10819 fi
10820
10821 done
10822
10823 fi
10824
10825 done
10826
10827 fi
10828
10829 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
10830 # Some installations of libedit usurp /usr/include/readline/, which seems
10831 # bad practice, since in combined installations readline will have its headers
10832 # there.  We might have to resort to AC_EGREP checks to make sure we found
10833 # the proper header...
10834   for ac_header in editline/readline.h
10835 do :
10836   ac_fn_c_check_header_mongrel "$LINENO" "editline/readline.h" "ac_cv_header_editline_readline_h" "$ac_includes_default"
10837 if test "x$ac_cv_header_editline_readline_h" = xyes; then :
10838   cat >>confdefs.h <<_ACEOF
10839 #define HAVE_EDITLINE_READLINE_H 1
10840 _ACEOF
10841
10842 else
10843   for ac_header in readline.h
10844 do :
10845   ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
10846 if test "x$ac_cv_header_readline_h" = xyes; then :
10847   cat >>confdefs.h <<_ACEOF
10848 #define HAVE_READLINE_H 1
10849 _ACEOF
10850
10851 else
10852   for ac_header in readline/readline.h
10853 do :
10854   ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
10855 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
10856   cat >>confdefs.h <<_ACEOF
10857 #define HAVE_READLINE_READLINE_H 1
10858 _ACEOF
10859
10860 else
10861   as_fn_error $? "readline header not found
10862 If you have libedit already installed, see config.log for details on the
10863 failure.  It is possible the compiler isn't looking in the proper directory.
10864 Use --without-readline to disable libedit support." "$LINENO" 5
10865 fi
10866
10867 done
10868
10869 fi
10870
10871 done
10872
10873 fi
10874
10875 done
10876
10877 # Note: in a libedit installation, history.h is sometimes a dummy, and may
10878 # not be there at all.  Hence, don't complain if not found.  We must check
10879 # though, since in yet other versions it is an independent header.
10880   for ac_header in editline/history.h
10881 do :
10882   ac_fn_c_check_header_mongrel "$LINENO" "editline/history.h" "ac_cv_header_editline_history_h" "$ac_includes_default"
10883 if test "x$ac_cv_header_editline_history_h" = xyes; then :
10884   cat >>confdefs.h <<_ACEOF
10885 #define HAVE_EDITLINE_HISTORY_H 1
10886 _ACEOF
10887
10888 else
10889   for ac_header in history.h
10890 do :
10891   ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
10892 if test "x$ac_cv_header_history_h" = xyes; then :
10893   cat >>confdefs.h <<_ACEOF
10894 #define HAVE_HISTORY_H 1
10895 _ACEOF
10896
10897 else
10898   for ac_header in readline/history.h
10899 do :
10900   ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
10901 if test "x$ac_cv_header_readline_history_h" = xyes; then :
10902   cat >>confdefs.h <<_ACEOF
10903 #define HAVE_READLINE_HISTORY_H 1
10904 _ACEOF
10905
10906 fi
10907
10908 done
10909
10910 fi
10911
10912 done
10913
10914 fi
10915
10916 done
10917
10918 fi
10919
10920 if test "$with_zlib" = yes; then
10921   ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
10922 if test "x$ac_cv_header_zlib_h" = xyes; then :
10923
10924 else
10925   as_fn_error $? "zlib header not found
10926 If you have zlib already installed, see config.log for details on the
10927 failure.  It is possible the compiler isn't looking in the proper directory.
10928 Use --without-zlib to disable zlib support." "$LINENO" 5
10929 fi
10930
10931
10932 fi
10933
10934 if test "$with_gssapi" = yes ; then
10935   for ac_header in gssapi/gssapi.h
10936 do :
10937   ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi.h" "ac_cv_header_gssapi_gssapi_h" "$ac_includes_default"
10938 if test "x$ac_cv_header_gssapi_gssapi_h" = xyes; then :
10939   cat >>confdefs.h <<_ACEOF
10940 #define HAVE_GSSAPI_GSSAPI_H 1
10941 _ACEOF
10942
10943 else
10944   for ac_header in gssapi.h
10945 do :
10946   ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
10947 if test "x$ac_cv_header_gssapi_h" = xyes; then :
10948   cat >>confdefs.h <<_ACEOF
10949 #define HAVE_GSSAPI_H 1
10950 _ACEOF
10951
10952 else
10953   as_fn_error $? "gssapi.h header file is required for GSSAPI" "$LINENO" 5
10954 fi
10955
10956 done
10957
10958 fi
10959
10960 done
10961
10962 fi
10963
10964 if test "$with_openssl" = yes ; then
10965   ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
10966 if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
10967
10968 else
10969   as_fn_error $? "header file <openssl/ssl.h> is required for OpenSSL" "$LINENO" 5
10970 fi
10971
10972
10973   ac_fn_c_check_header_mongrel "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default"
10974 if test "x$ac_cv_header_openssl_err_h" = xyes; then :
10975
10976 else
10977   as_fn_error $? "header file <openssl/err.h> is required for OpenSSL" "$LINENO" 5
10978 fi
10979
10980
10981 fi
10982
10983 if test "$with_pam" = yes ; then
10984   for ac_header in security/pam_appl.h
10985 do :
10986   ac_fn_c_check_header_mongrel "$LINENO" "security/pam_appl.h" "ac_cv_header_security_pam_appl_h" "$ac_includes_default"
10987 if test "x$ac_cv_header_security_pam_appl_h" = xyes; then :
10988   cat >>confdefs.h <<_ACEOF
10989 #define HAVE_SECURITY_PAM_APPL_H 1
10990 _ACEOF
10991
10992 else
10993   for ac_header in pam/pam_appl.h
10994 do :
10995   ac_fn_c_check_header_mongrel "$LINENO" "pam/pam_appl.h" "ac_cv_header_pam_pam_appl_h" "$ac_includes_default"
10996 if test "x$ac_cv_header_pam_pam_appl_h" = xyes; then :
10997   cat >>confdefs.h <<_ACEOF
10998 #define HAVE_PAM_PAM_APPL_H 1
10999 _ACEOF
11000
11001 else
11002   as_fn_error $? "header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." "$LINENO" 5
11003 fi
11004
11005 done
11006
11007 fi
11008
11009 done
11010
11011 fi
11012
11013 if test "$with_bsd_auth" = yes ; then
11014   ac_fn_c_check_header_mongrel "$LINENO" "bsd_auth.h" "ac_cv_header_bsd_auth_h" "$ac_includes_default"
11015 if test "x$ac_cv_header_bsd_auth_h" = xyes; then :
11016
11017 else
11018   as_fn_error $? "header file <bsd_auth.h> is required for BSD Authentication support" "$LINENO" 5
11019 fi
11020
11021
11022 fi
11023
11024 if test "$with_systemd" = yes ; then
11025   ac_fn_c_check_header_mongrel "$LINENO" "systemd/sd-daemon.h" "ac_cv_header_systemd_sd_daemon_h" "$ac_includes_default"
11026 if test "x$ac_cv_header_systemd_sd_daemon_h" = xyes; then :
11027
11028 else
11029   as_fn_error $? "header file <systemd/sd-daemon.h> is required for systemd support" "$LINENO" 5
11030 fi
11031
11032
11033 fi
11034
11035 if test "$with_libxml" = yes ; then
11036   ac_fn_c_check_header_mongrel "$LINENO" "libxml/parser.h" "ac_cv_header_libxml_parser_h" "$ac_includes_default"
11037 if test "x$ac_cv_header_libxml_parser_h" = xyes; then :
11038
11039 else
11040   as_fn_error $? "header file <libxml/parser.h> is required for XML support" "$LINENO" 5
11041 fi
11042
11043
11044 fi
11045
11046 if test "$with_libxslt" = yes ; then
11047   ac_fn_c_check_header_mongrel "$LINENO" "libxslt/xslt.h" "ac_cv_header_libxslt_xslt_h" "$ac_includes_default"
11048 if test "x$ac_cv_header_libxslt_xslt_h" = xyes; then :
11049
11050 else
11051   as_fn_error $? "header file <libxslt/xslt.h> is required for XSLT support" "$LINENO" 5
11052 fi
11053
11054
11055 fi
11056
11057 if test "$with_ldap" = yes ; then
11058   if test "$PORTNAME" != "win32"; then
11059      for ac_header in ldap.h
11060 do :
11061   ac_fn_c_check_header_mongrel "$LINENO" "ldap.h" "ac_cv_header_ldap_h" "$ac_includes_default"
11062 if test "x$ac_cv_header_ldap_h" = xyes; then :
11063   cat >>confdefs.h <<_ACEOF
11064 #define HAVE_LDAP_H 1
11065 _ACEOF
11066
11067 else
11068   as_fn_error $? "header file <ldap.h> is required for LDAP" "$LINENO" 5
11069 fi
11070
11071 done
11072
11073      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compatible LDAP implementation" >&5
11074 $as_echo_n "checking for compatible LDAP implementation... " >&6; }
11075 if ${pgac_cv_ldap_safe+:} false; then :
11076   $as_echo_n "(cached) " >&6
11077 else
11078   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11079 /* end confdefs.h.  */
11080 #include <ldap.h>
11081 #if !defined(LDAP_VENDOR_VERSION) || \
11082      (defined(LDAP_API_FEATURE_X_OPENLDAP) && \
11083       LDAP_VENDOR_VERSION >= 20424 && LDAP_VENDOR_VERSION <= 20431)
11084 choke me
11085 #endif
11086 int
11087 main ()
11088 {
11089
11090   ;
11091   return 0;
11092 }
11093 _ACEOF
11094 if ac_fn_c_try_compile "$LINENO"; then :
11095   pgac_cv_ldap_safe=yes
11096 else
11097   pgac_cv_ldap_safe=no
11098 fi
11099 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11100 fi
11101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_ldap_safe" >&5
11102 $as_echo "$pgac_cv_ldap_safe" >&6; }
11103
11104 if test "$pgac_cv_ldap_safe" != yes; then
11105   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
11106 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
11107 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
11108 *** also uses LDAP will crash on exit." >&5
11109 $as_echo "$as_me: WARNING:
11110 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
11111 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
11112 *** also uses LDAP will crash on exit." >&2;}
11113 fi
11114   else
11115      for ac_header in winldap.h
11116 do :
11117   ac_fn_c_check_header_compile "$LINENO" "winldap.h" "ac_cv_header_winldap_h" "$ac_includes_default
11118 #include <windows.h>
11119
11120 "
11121 if test "x$ac_cv_header_winldap_h" = xyes; then :
11122   cat >>confdefs.h <<_ACEOF
11123 #define HAVE_WINLDAP_H 1
11124 _ACEOF
11125
11126 else
11127   as_fn_error $? "header file <winldap.h> is required for LDAP" "$LINENO" 5
11128 fi
11129
11130 done
11131
11132   fi
11133 fi
11134
11135 if test "$with_bonjour" = yes ; then
11136   ac_fn_c_check_header_mongrel "$LINENO" "dns_sd.h" "ac_cv_header_dns_sd_h" "$ac_includes_default"
11137 if test "x$ac_cv_header_dns_sd_h" = xyes; then :
11138
11139 else
11140   as_fn_error $? "header file <dns_sd.h> is required for Bonjour" "$LINENO" 5
11141 fi
11142
11143
11144 fi
11145
11146 # for contrib/uuid-ossp
11147 if test "$with_uuid" = bsd ; then
11148   for ac_header in uuid.h
11149 do :
11150   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
11151 if test "x$ac_cv_header_uuid_h" = xyes; then :
11152   cat >>confdefs.h <<_ACEOF
11153 #define HAVE_UUID_H 1
11154 _ACEOF
11155  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11156 /* end confdefs.h.  */
11157 #include <uuid.h>
11158
11159 _ACEOF
11160 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11161   $EGREP "uuid_to_string" >/dev/null 2>&1; then :
11162
11163 else
11164   as_fn_error $? "header file <uuid.h> does not match BSD UUID library" "$LINENO" 5
11165 fi
11166 rm -f conftest*
11167
11168 else
11169   as_fn_error $? "header file <uuid.h> is required for BSD UUID" "$LINENO" 5
11170 fi
11171
11172 done
11173
11174 elif test "$with_uuid" = e2fs ; then
11175   for ac_header in uuid/uuid.h
11176 do :
11177   ac_fn_c_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
11178 if test "x$ac_cv_header_uuid_uuid_h" = xyes; then :
11179   cat >>confdefs.h <<_ACEOF
11180 #define HAVE_UUID_UUID_H 1
11181 _ACEOF
11182  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11183 /* end confdefs.h.  */
11184 #include <uuid/uuid.h>
11185
11186 _ACEOF
11187 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11188   $EGREP "uuid_generate" >/dev/null 2>&1; then :
11189
11190 else
11191   as_fn_error $? "header file <uuid/uuid.h> does not match E2FS UUID library" "$LINENO" 5
11192 fi
11193 rm -f conftest*
11194
11195 else
11196   for ac_header in uuid.h
11197 do :
11198   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
11199 if test "x$ac_cv_header_uuid_h" = xyes; then :
11200   cat >>confdefs.h <<_ACEOF
11201 #define HAVE_UUID_H 1
11202 _ACEOF
11203  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11204 /* end confdefs.h.  */
11205 #include <uuid.h>
11206
11207 _ACEOF
11208 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11209   $EGREP "uuid_generate" >/dev/null 2>&1; then :
11210
11211 else
11212   as_fn_error $? "header file <uuid.h> does not match E2FS UUID library" "$LINENO" 5
11213 fi
11214 rm -f conftest*
11215
11216 else
11217   as_fn_error $? "header file <uuid/uuid.h> or <uuid.h> is required for E2FS UUID" "$LINENO" 5
11218 fi
11219
11220 done
11221
11222 fi
11223
11224 done
11225
11226 elif test "$with_uuid" = ossp ; then
11227   for ac_header in ossp/uuid.h
11228 do :
11229   ac_fn_c_check_header_mongrel "$LINENO" "ossp/uuid.h" "ac_cv_header_ossp_uuid_h" "$ac_includes_default"
11230 if test "x$ac_cv_header_ossp_uuid_h" = xyes; then :
11231   cat >>confdefs.h <<_ACEOF
11232 #define HAVE_OSSP_UUID_H 1
11233 _ACEOF
11234  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11235 /* end confdefs.h.  */
11236 #include <ossp/uuid.h>
11237
11238 _ACEOF
11239 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11240   $EGREP "uuid_export" >/dev/null 2>&1; then :
11241
11242 else
11243   as_fn_error $? "header file <ossp/uuid.h> does not match OSSP UUID library" "$LINENO" 5
11244 fi
11245 rm -f conftest*
11246
11247 else
11248   for ac_header in uuid.h
11249 do :
11250   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
11251 if test "x$ac_cv_header_uuid_h" = xyes; then :
11252   cat >>confdefs.h <<_ACEOF
11253 #define HAVE_UUID_H 1
11254 _ACEOF
11255  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11256 /* end confdefs.h.  */
11257 #include <uuid.h>
11258
11259 _ACEOF
11260 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11261   $EGREP "uuid_export" >/dev/null 2>&1; then :
11262
11263 else
11264   as_fn_error $? "header file <uuid.h> does not match OSSP UUID library" "$LINENO" 5
11265 fi
11266 rm -f conftest*
11267
11268 else
11269   as_fn_error $? "header file <ossp/uuid.h> or <uuid.h> is required for OSSP UUID" "$LINENO" 5
11270 fi
11271
11272 done
11273
11274 fi
11275
11276 done
11277
11278 fi
11279
11280 if test "$PORTNAME" = "win32" ; then
11281    for ac_header in crtdefs.h
11282 do :
11283   ac_fn_c_check_header_mongrel "$LINENO" "crtdefs.h" "ac_cv_header_crtdefs_h" "$ac_includes_default"
11284 if test "x$ac_cv_header_crtdefs_h" = xyes; then :
11285   cat >>confdefs.h <<_ACEOF
11286 #define HAVE_CRTDEFS_H 1
11287 _ACEOF
11288
11289 fi
11290
11291 done
11292
11293 fi
11294
11295 ##
11296 ## Types, structures, compiler characteristics
11297 ##
11298
11299   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
11300 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
11301 if ${ac_cv_c_bigendian+:} false; then :
11302   $as_echo_n "(cached) " >&6
11303 else
11304   ac_cv_c_bigendian=unknown
11305     # See if we're dealing with a universal compiler.
11306     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11307 /* end confdefs.h.  */
11308 #ifndef __APPLE_CC__
11309                not a universal capable compiler
11310              #endif
11311              typedef int dummy;
11312
11313 _ACEOF
11314 if ac_fn_c_try_compile "$LINENO"; then :
11315
11316         # Check for potential -arch flags.  It is not universal unless
11317         # there are at least two -arch flags with different values.
11318         ac_arch=
11319         ac_prev=
11320         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
11321          if test -n "$ac_prev"; then
11322            case $ac_word in
11323              i?86 | x86_64 | ppc | ppc64)
11324                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
11325                  ac_arch=$ac_word
11326                else
11327                  ac_cv_c_bigendian=universal
11328                  break
11329                fi
11330                ;;
11331            esac
11332            ac_prev=
11333          elif test "x$ac_word" = "x-arch"; then
11334            ac_prev=arch
11335          fi
11336        done
11337 fi
11338 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11339     if test $ac_cv_c_bigendian = unknown; then
11340       # See if sys/param.h defines the BYTE_ORDER macro.
11341       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11342 /* end confdefs.h.  */
11343 #include <sys/types.h>
11344              #include <sys/param.h>
11345
11346 int
11347 main ()
11348 {
11349 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
11350                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
11351                      && LITTLE_ENDIAN)
11352               bogus endian macros
11353              #endif
11354
11355   ;
11356   return 0;
11357 }
11358 _ACEOF
11359 if ac_fn_c_try_compile "$LINENO"; then :
11360   # It does; now see whether it defined to BIG_ENDIAN or not.
11361          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11362 /* end confdefs.h.  */
11363 #include <sys/types.h>
11364                 #include <sys/param.h>
11365
11366 int
11367 main ()
11368 {
11369 #if BYTE_ORDER != BIG_ENDIAN
11370                  not big endian
11371                 #endif
11372
11373   ;
11374   return 0;
11375 }
11376 _ACEOF
11377 if ac_fn_c_try_compile "$LINENO"; then :
11378   ac_cv_c_bigendian=yes
11379 else
11380   ac_cv_c_bigendian=no
11381 fi
11382 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11383 fi
11384 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11385     fi
11386     if test $ac_cv_c_bigendian = unknown; then
11387       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
11388       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11389 /* end confdefs.h.  */
11390 #include <limits.h>
11391
11392 int
11393 main ()
11394 {
11395 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
11396               bogus endian macros
11397              #endif
11398
11399   ;
11400   return 0;
11401 }
11402 _ACEOF
11403 if ac_fn_c_try_compile "$LINENO"; then :
11404   # It does; now see whether it defined to _BIG_ENDIAN or not.
11405          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11406 /* end confdefs.h.  */
11407 #include <limits.h>
11408
11409 int
11410 main ()
11411 {
11412 #ifndef _BIG_ENDIAN
11413                  not big endian
11414                 #endif
11415
11416   ;
11417   return 0;
11418 }
11419 _ACEOF
11420 if ac_fn_c_try_compile "$LINENO"; then :
11421   ac_cv_c_bigendian=yes
11422 else
11423   ac_cv_c_bigendian=no
11424 fi
11425 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11426 fi
11427 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11428     fi
11429     if test $ac_cv_c_bigendian = unknown; then
11430       # Compile a test program.
11431       if test "$cross_compiling" = yes; then :
11432   # Try to guess by grepping values from an object file.
11433          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11434 /* end confdefs.h.  */
11435 short int ascii_mm[] =
11436                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
11437                 short int ascii_ii[] =
11438                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
11439                 int use_ascii (int i) {
11440                   return ascii_mm[i] + ascii_ii[i];
11441                 }
11442                 short int ebcdic_ii[] =
11443                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
11444                 short int ebcdic_mm[] =
11445                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
11446                 int use_ebcdic (int i) {
11447                   return ebcdic_mm[i] + ebcdic_ii[i];
11448                 }
11449                 extern int foo;
11450
11451 int
11452 main ()
11453 {
11454 return use_ascii (foo) == use_ebcdic (foo);
11455   ;
11456   return 0;
11457 }
11458 _ACEOF
11459 if ac_fn_c_try_compile "$LINENO"; then :
11460   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
11461               ac_cv_c_bigendian=yes
11462             fi
11463             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
11464               if test "$ac_cv_c_bigendian" = unknown; then
11465                 ac_cv_c_bigendian=no
11466               else
11467                 # finding both strings is unlikely to happen, but who knows?
11468                 ac_cv_c_bigendian=unknown
11469               fi
11470             fi
11471 fi
11472 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11473 else
11474   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11475 /* end confdefs.h.  */
11476 $ac_includes_default
11477 int
11478 main ()
11479 {
11480
11481              /* Are we little or big endian?  From Harbison&Steele.  */
11482              union
11483              {
11484                long int l;
11485                char c[sizeof (long int)];
11486              } u;
11487              u.l = 1;
11488              return u.c[sizeof (long int) - 1] == 1;
11489
11490   ;
11491   return 0;
11492 }
11493 _ACEOF
11494 if ac_fn_c_try_run "$LINENO"; then :
11495   ac_cv_c_bigendian=no
11496 else
11497   ac_cv_c_bigendian=yes
11498 fi
11499 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11500   conftest.$ac_objext conftest.beam conftest.$ac_ext
11501 fi
11502
11503     fi
11504 fi
11505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
11506 $as_echo "$ac_cv_c_bigendian" >&6; }
11507  case $ac_cv_c_bigendian in #(
11508    yes)
11509      $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
11510 ;; #(
11511    no)
11512       ;; #(
11513    universal)
11514
11515 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
11516
11517      ;; #(
11518    *)
11519      as_fn_error $? "unknown endianness
11520  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
11521  esac
11522
11523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
11524 $as_echo_n "checking for inline... " >&6; }
11525 if ${ac_cv_c_inline+:} false; then :
11526   $as_echo_n "(cached) " >&6
11527 else
11528   ac_cv_c_inline=no
11529 for ac_kw in inline __inline__ __inline; do
11530   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11531 /* end confdefs.h.  */
11532 #ifndef __cplusplus
11533 typedef int foo_t;
11534 static $ac_kw foo_t static_foo () {return 0; }
11535 $ac_kw foo_t foo () {return 0; }
11536 #endif
11537
11538 _ACEOF
11539 if ac_fn_c_try_compile "$LINENO"; then :
11540   ac_cv_c_inline=$ac_kw
11541 fi
11542 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11543   test "$ac_cv_c_inline" != no && break
11544 done
11545
11546 fi
11547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
11548 $as_echo "$ac_cv_c_inline" >&6; }
11549
11550 case $ac_cv_c_inline in
11551   inline | yes) ;;
11552   *)
11553     case $ac_cv_c_inline in
11554       no) ac_val=;;
11555       *) ac_val=$ac_cv_c_inline;;
11556     esac
11557     cat >>confdefs.h <<_ACEOF
11558 #ifndef __cplusplus
11559 #define inline $ac_val
11560 #endif
11561 _ACEOF
11562     ;;
11563 esac
11564
11565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for printf format archetype" >&5
11566 $as_echo_n "checking for printf format archetype... " >&6; }
11567 if ${pgac_cv_printf_archetype+:} false; then :
11568   $as_echo_n "(cached) " >&6
11569 else
11570   ac_save_c_werror_flag=$ac_c_werror_flag
11571 ac_c_werror_flag=yes
11572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11573 /* end confdefs.h.  */
11574 extern int
11575 pgac_write(int ignore, const char *fmt,...)
11576 __attribute__((format(gnu_printf, 2, 3)));
11577 int
11578 main ()
11579 {
11580
11581   ;
11582   return 0;
11583 }
11584 _ACEOF
11585 if ac_fn_c_try_compile "$LINENO"; then :
11586   pgac_cv_printf_archetype=gnu_printf
11587 else
11588   pgac_cv_printf_archetype=printf
11589 fi
11590 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11591 ac_c_werror_flag=$ac_save_c_werror_flag
11592 fi
11593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_printf_archetype" >&5
11594 $as_echo "$pgac_cv_printf_archetype" >&6; }
11595
11596 cat >>confdefs.h <<_ACEOF
11597 #define PG_PRINTF_ATTRIBUTE $pgac_cv_printf_archetype
11598 _ACEOF
11599
11600
11601
11602   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array members" >&5
11603 $as_echo_n "checking for flexible array members... " >&6; }
11604 if ${ac_cv_c_flexmember+:} false; then :
11605   $as_echo_n "(cached) " >&6
11606 else
11607   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11608 /* end confdefs.h.  */
11609 #include <stdlib.h>
11610             #include <stdio.h>
11611             #include <stddef.h>
11612             struct s { int n; double d[]; };
11613 int
11614 main ()
11615 {
11616 int m = getchar ();
11617             struct s *p = malloc (offsetof (struct s, d)
11618                                   + m * sizeof (double));
11619             p->d[0] = 0.0;
11620             return p->d != (double *) NULL;
11621   ;
11622   return 0;
11623 }
11624 _ACEOF
11625 if ac_fn_c_try_compile "$LINENO"; then :
11626   ac_cv_c_flexmember=yes
11627 else
11628   ac_cv_c_flexmember=no
11629 fi
11630 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11631 fi
11632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
11633 $as_echo "$ac_cv_c_flexmember" >&6; }
11634   if test $ac_cv_c_flexmember = yes; then
11635
11636 $as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
11637
11638   else
11639     $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
11640
11641   fi
11642
11643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signed types" >&5
11644 $as_echo_n "checking for signed types... " >&6; }
11645 if ${pgac_cv_c_signed+:} false; then :
11646   $as_echo_n "(cached) " >&6
11647 else
11648   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11649 /* end confdefs.h.  */
11650
11651 int
11652 main ()
11653 {
11654 signed char c; signed short s; signed int i;
11655   ;
11656   return 0;
11657 }
11658 _ACEOF
11659 if ac_fn_c_try_compile "$LINENO"; then :
11660   pgac_cv_c_signed=yes
11661 else
11662   pgac_cv_c_signed=no
11663 fi
11664 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11665 fi
11666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_signed" >&5
11667 $as_echo "$pgac_cv_c_signed" >&6; }
11668 if test x"$pgac_cv_c_signed" = xno ; then
11669
11670 $as_echo "#define signed /**/" >>confdefs.h
11671
11672 fi
11673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __func__" >&5
11674 $as_echo_n "checking for __func__... " >&6; }
11675 if ${pgac_cv_funcname_func_support+:} false; then :
11676   $as_echo_n "(cached) " >&6
11677 else
11678   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11679 /* end confdefs.h.  */
11680 #include <stdio.h>
11681 int
11682 main ()
11683 {
11684 printf("%s\n", __func__);
11685   ;
11686   return 0;
11687 }
11688 _ACEOF
11689 if ac_fn_c_try_compile "$LINENO"; then :
11690   pgac_cv_funcname_func_support=yes
11691 else
11692   pgac_cv_funcname_func_support=no
11693 fi
11694 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11695 fi
11696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_func_support" >&5
11697 $as_echo "$pgac_cv_funcname_func_support" >&6; }
11698 if test x"$pgac_cv_funcname_func_support" = xyes ; then
11699
11700 $as_echo "#define HAVE_FUNCNAME__FUNC 1" >>confdefs.h
11701
11702 else
11703 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __FUNCTION__" >&5
11704 $as_echo_n "checking for __FUNCTION__... " >&6; }
11705 if ${pgac_cv_funcname_function_support+:} false; then :
11706   $as_echo_n "(cached) " >&6
11707 else
11708   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11709 /* end confdefs.h.  */
11710 #include <stdio.h>
11711 int
11712 main ()
11713 {
11714 printf("%s\n", __FUNCTION__);
11715   ;
11716   return 0;
11717 }
11718 _ACEOF
11719 if ac_fn_c_try_compile "$LINENO"; then :
11720   pgac_cv_funcname_function_support=yes
11721 else
11722   pgac_cv_funcname_function_support=no
11723 fi
11724 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11725 fi
11726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_function_support" >&5
11727 $as_echo "$pgac_cv_funcname_function_support" >&6; }
11728 if test x"$pgac_cv_funcname_function_support" = xyes ; then
11729
11730 $as_echo "#define HAVE_FUNCNAME__FUNCTION 1" >>confdefs.h
11731
11732 fi
11733 fi
11734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Static_assert" >&5
11735 $as_echo_n "checking for _Static_assert... " >&6; }
11736 if ${pgac_cv__static_assert+:} false; then :
11737   $as_echo_n "(cached) " >&6
11738 else
11739   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11740 /* end confdefs.h.  */
11741
11742 int
11743 main ()
11744 {
11745 ({ _Static_assert(1, "foo"); })
11746   ;
11747   return 0;
11748 }
11749 _ACEOF
11750 if ac_fn_c_try_link "$LINENO"; then :
11751   pgac_cv__static_assert=yes
11752 else
11753   pgac_cv__static_assert=no
11754 fi
11755 rm -f core conftest.err conftest.$ac_objext \
11756     conftest$ac_exeext conftest.$ac_ext
11757 fi
11758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__static_assert" >&5
11759 $as_echo "$pgac_cv__static_assert" >&6; }
11760 if test x"$pgac_cv__static_assert" = xyes ; then
11761
11762 $as_echo "#define HAVE__STATIC_ASSERT 1" >>confdefs.h
11763
11764 fi
11765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeof" >&5
11766 $as_echo_n "checking for typeof... " >&6; }
11767 if ${pgac_cv_c_typeof+:} false; then :
11768   $as_echo_n "(cached) " >&6
11769 else
11770   pgac_cv_c_typeof=no
11771 for pgac_kw in typeof __typeof__ decltype; do
11772   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11773 /* end confdefs.h.  */
11774
11775 int
11776 main ()
11777 {
11778 int x = 0;
11779 $pgac_kw(x) y;
11780 y = x;
11781 return y;
11782   ;
11783   return 0;
11784 }
11785 _ACEOF
11786 if ac_fn_c_try_compile "$LINENO"; then :
11787   pgac_cv_c_typeof=$pgac_kw
11788 fi
11789 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11790   test "$pgac_cv_c_typeof" != no && break
11791 done
11792 fi
11793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_typeof" >&5
11794 $as_echo "$pgac_cv_c_typeof" >&6; }
11795 if test "$pgac_cv_c_typeof" != no; then
11796
11797 $as_echo "#define HAVE_TYPEOF 1" >>confdefs.h
11798
11799   if test "$pgac_cv_c_typeof" != typeof; then
11800
11801 cat >>confdefs.h <<_ACEOF
11802 #define typeof $pgac_cv_c_typeof
11803 _ACEOF
11804
11805   fi
11806 fi
11807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_types_compatible_p" >&5
11808 $as_echo_n "checking for __builtin_types_compatible_p... " >&6; }
11809 if ${pgac_cv__types_compatible+:} false; then :
11810   $as_echo_n "(cached) " >&6
11811 else
11812   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11813 /* end confdefs.h.  */
11814
11815 int
11816 main ()
11817 {
11818  int x; static int y[__builtin_types_compatible_p(__typeof__(x), int)];
11819   ;
11820   return 0;
11821 }
11822 _ACEOF
11823 if ac_fn_c_try_compile "$LINENO"; then :
11824   pgac_cv__types_compatible=yes
11825 else
11826   pgac_cv__types_compatible=no
11827 fi
11828 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11829 fi
11830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__types_compatible" >&5
11831 $as_echo "$pgac_cv__types_compatible" >&6; }
11832 if test x"$pgac_cv__types_compatible" = xyes ; then
11833
11834 $as_echo "#define HAVE__BUILTIN_TYPES_COMPATIBLE_P 1" >>confdefs.h
11835
11836 fi
11837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap16" >&5
11838 $as_echo_n "checking for __builtin_bswap16... " >&6; }
11839 if ${pgac_cv__builtin_bswap16+:} false; then :
11840   $as_echo_n "(cached) " >&6
11841 else
11842   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11843 /* end confdefs.h.  */
11844 static unsigned long int x = __builtin_bswap16(0xaabb);
11845
11846 _ACEOF
11847 if ac_fn_c_try_compile "$LINENO"; then :
11848   pgac_cv__builtin_bswap16=yes
11849 else
11850   pgac_cv__builtin_bswap16=no
11851 fi
11852 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11853 fi
11854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap16" >&5
11855 $as_echo "$pgac_cv__builtin_bswap16" >&6; }
11856 if test x"$pgac_cv__builtin_bswap16" = xyes ; then
11857
11858 $as_echo "#define HAVE__BUILTIN_BSWAP16 1" >>confdefs.h
11859
11860 fi
11861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap32" >&5
11862 $as_echo_n "checking for __builtin_bswap32... " >&6; }
11863 if ${pgac_cv__builtin_bswap32+:} false; then :
11864   $as_echo_n "(cached) " >&6
11865 else
11866   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11867 /* end confdefs.h.  */
11868 static unsigned long int x = __builtin_bswap32(0xaabbccdd);
11869
11870 _ACEOF
11871 if ac_fn_c_try_compile "$LINENO"; then :
11872   pgac_cv__builtin_bswap32=yes
11873 else
11874   pgac_cv__builtin_bswap32=no
11875 fi
11876 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11877 fi
11878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap32" >&5
11879 $as_echo "$pgac_cv__builtin_bswap32" >&6; }
11880 if test x"$pgac_cv__builtin_bswap32" = xyes ; then
11881
11882 $as_echo "#define HAVE__BUILTIN_BSWAP32 1" >>confdefs.h
11883
11884 fi
11885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap64" >&5
11886 $as_echo_n "checking for __builtin_bswap64... " >&6; }
11887 if ${pgac_cv__builtin_bswap64+:} false; then :
11888   $as_echo_n "(cached) " >&6
11889 else
11890   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11891 /* end confdefs.h.  */
11892 static unsigned long int x = __builtin_bswap64(0xaabbccddeeff0011);
11893
11894 _ACEOF
11895 if ac_fn_c_try_compile "$LINENO"; then :
11896   pgac_cv__builtin_bswap64=yes
11897 else
11898   pgac_cv__builtin_bswap64=no
11899 fi
11900 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11901 fi
11902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap64" >&5
11903 $as_echo "$pgac_cv__builtin_bswap64" >&6; }
11904 if test x"$pgac_cv__builtin_bswap64" = xyes ; then
11905
11906 $as_echo "#define HAVE__BUILTIN_BSWAP64 1" >>confdefs.h
11907
11908 fi
11909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_constant_p" >&5
11910 $as_echo_n "checking for __builtin_constant_p... " >&6; }
11911 if ${pgac_cv__builtin_constant_p+:} false; then :
11912   $as_echo_n "(cached) " >&6
11913 else
11914   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11915 /* end confdefs.h.  */
11916 static int x;
11917   static int y[__builtin_constant_p(x) ? x : 1];
11918   static int z[__builtin_constant_p("string literal") ? 1 : x];
11919
11920
11921 _ACEOF
11922 if ac_fn_c_try_compile "$LINENO"; then :
11923   pgac_cv__builtin_constant_p=yes
11924 else
11925   pgac_cv__builtin_constant_p=no
11926 fi
11927 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11928 fi
11929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_constant_p" >&5
11930 $as_echo "$pgac_cv__builtin_constant_p" >&6; }
11931 if test x"$pgac_cv__builtin_constant_p" = xyes ; then
11932
11933 $as_echo "#define HAVE__BUILTIN_CONSTANT_P 1" >>confdefs.h
11934
11935 fi
11936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unreachable" >&5
11937 $as_echo_n "checking for __builtin_unreachable... " >&6; }
11938 if ${pgac_cv__builtin_unreachable+:} false; then :
11939   $as_echo_n "(cached) " >&6
11940 else
11941   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11942 /* end confdefs.h.  */
11943
11944 int
11945 main ()
11946 {
11947 __builtin_unreachable();
11948   ;
11949   return 0;
11950 }
11951 _ACEOF
11952 if ac_fn_c_try_link "$LINENO"; then :
11953   pgac_cv__builtin_unreachable=yes
11954 else
11955   pgac_cv__builtin_unreachable=no
11956 fi
11957 rm -f core conftest.err conftest.$ac_objext \
11958     conftest$ac_exeext conftest.$ac_ext
11959 fi
11960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_unreachable" >&5
11961 $as_echo "$pgac_cv__builtin_unreachable" >&6; }
11962 if test x"$pgac_cv__builtin_unreachable" = xyes ; then
11963
11964 $as_echo "#define HAVE__BUILTIN_UNREACHABLE 1" >>confdefs.h
11965
11966 fi
11967 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for computed goto support" >&5
11968 $as_echo_n "checking for computed goto support... " >&6; }
11969 if ${pgac_cv_computed_goto+:} false; then :
11970   $as_echo_n "(cached) " >&6
11971 else
11972   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11973 /* end confdefs.h.  */
11974
11975 int
11976 main ()
11977 {
11978 void *labeladdrs[] = {&&my_label};
11979   goto *labeladdrs[0];
11980   my_label:
11981   return 1;
11982
11983   ;
11984   return 0;
11985 }
11986 _ACEOF
11987 if ac_fn_c_try_compile "$LINENO"; then :
11988   pgac_cv_computed_goto=yes
11989 else
11990   pgac_cv_computed_goto=no
11991 fi
11992 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11993 fi
11994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_computed_goto" >&5
11995 $as_echo "$pgac_cv_computed_goto" >&6; }
11996 if test x"$pgac_cv_computed_goto" = xyes ; then
11997
11998 $as_echo "#define HAVE_COMPUTED_GOTO 1" >>confdefs.h
11999
12000 fi
12001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __VA_ARGS__" >&5
12002 $as_echo_n "checking for __VA_ARGS__... " >&6; }
12003 if ${pgac_cv__va_args+:} false; then :
12004   $as_echo_n "(cached) " >&6
12005 else
12006   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12007 /* end confdefs.h.  */
12008 #include <stdio.h>
12009 int
12010 main ()
12011 {
12012 #define debug(...) fprintf(stderr, __VA_ARGS__)
12013 debug("%s", "blarg");
12014
12015   ;
12016   return 0;
12017 }
12018 _ACEOF
12019 if ac_fn_c_try_compile "$LINENO"; then :
12020   pgac_cv__va_args=yes
12021 else
12022   pgac_cv__va_args=no
12023 fi
12024 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12025 fi
12026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__va_args" >&5
12027 $as_echo "$pgac_cv__va_args" >&6; }
12028 if test x"$pgac_cv__va_args" = xyes ; then
12029
12030 $as_echo "#define HAVE__VA_ARGS 1" >>confdefs.h
12031
12032 fi
12033 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12034 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
12035 if ${ac_cv_struct_tm+:} false; then :
12036   $as_echo_n "(cached) " >&6
12037 else
12038   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12039 /* end confdefs.h.  */
12040 #include <sys/types.h>
12041 #include <time.h>
12042
12043 int
12044 main ()
12045 {
12046 struct tm tm;
12047                                      int *p = &tm.tm_sec;
12048                                      return !p;
12049   ;
12050   return 0;
12051 }
12052 _ACEOF
12053 if ac_fn_c_try_compile "$LINENO"; then :
12054   ac_cv_struct_tm=time.h
12055 else
12056   ac_cv_struct_tm=sys/time.h
12057 fi
12058 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12059 fi
12060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12061 $as_echo "$ac_cv_struct_tm" >&6; }
12062 if test $ac_cv_struct_tm = sys/time.h; then
12063
12064 $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
12065
12066 fi
12067
12068 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
12069 #include <$ac_cv_struct_tm>
12070
12071 "
12072 if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
12073
12074 cat >>confdefs.h <<_ACEOF
12075 #define HAVE_STRUCT_TM_TM_ZONE 1
12076 _ACEOF
12077
12078
12079 fi
12080
12081 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12082
12083 $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
12084
12085 fi
12086 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12087 $as_echo_n "checking for tzname... " >&6; }
12088 if ${ac_cv_var_tzname+:} false; then :
12089   $as_echo_n "(cached) " >&6
12090 else
12091   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12092 /* end confdefs.h.  */
12093 #include <stdlib.h>
12094 #include <time.h>
12095 #ifndef tzname /* For SGI.  */
12096 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
12097 #endif
12098
12099 int
12100 main ()
12101 {
12102 atoi(*tzname);
12103   ;
12104   return 0;
12105 }
12106 _ACEOF
12107 if ac_fn_c_try_link "$LINENO"; then :
12108   ac_cv_var_tzname=yes
12109 else
12110   ac_cv_var_tzname=no
12111 fi
12112 rm -f core conftest.err conftest.$ac_objext \
12113     conftest$ac_exeext conftest.$ac_ext
12114 fi
12115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12116 $as_echo "$ac_cv_var_tzname" >&6; }
12117 if test $ac_cv_var_tzname = yes; then
12118
12119 $as_echo "#define HAVE_TZNAME 1" >>confdefs.h
12120
12121 fi
12122
12123 ac_fn_c_check_type "$LINENO" "union semun" "ac_cv_type_union_semun" "#include <sys/types.h>
12124 #ifdef HAVE_SYS_IPC_H
12125 #include <sys/ipc.h>
12126 #endif
12127 #ifdef HAVE_SYS_SEM_H
12128 #include <sys/sem.h>
12129 #endif
12130 "
12131 if test "x$ac_cv_type_union_semun" = xyes; then :
12132
12133 cat >>confdefs.h <<_ACEOF
12134 #define HAVE_UNION_SEMUN 1
12135 _ACEOF
12136
12137
12138 fi
12139
12140 ac_fn_c_check_type "$LINENO" "struct sockaddr_un" "ac_cv_type_struct_sockaddr_un" "#include <sys/types.h>
12141 #ifdef HAVE_SYS_UN_H
12142 #include <sys/un.h>
12143 #endif
12144
12145 "
12146 if test "x$ac_cv_type_struct_sockaddr_un" = xyes; then :
12147
12148 $as_echo "#define HAVE_UNIX_SOCKETS 1" >>confdefs.h
12149
12150 fi
12151
12152 ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "#include <sys/types.h>
12153 #include <sys/socket.h>
12154
12155 "
12156 if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
12157
12158 cat >>confdefs.h <<_ACEOF
12159 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
12160 _ACEOF
12161
12162
12163 fi
12164
12165 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
12166 #include <sys/socket.h>
12167
12168 "
12169 if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then :
12170
12171 cat >>confdefs.h <<_ACEOF
12172 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
12173 _ACEOF
12174
12175
12176 fi
12177 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_family" "ac_cv_member_struct_sockaddr_storage___ss_family" "#include <sys/types.h>
12178 #include <sys/socket.h>
12179
12180 "
12181 if test "x$ac_cv_member_struct_sockaddr_storage___ss_family" = xyes; then :
12182
12183 cat >>confdefs.h <<_ACEOF
12184 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1
12185 _ACEOF
12186
12187
12188 fi
12189 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_len" "ac_cv_member_struct_sockaddr_storage_ss_len" "#include <sys/types.h>
12190 #include <sys/socket.h>
12191
12192 "
12193 if test "x$ac_cv_member_struct_sockaddr_storage_ss_len" = xyes; then :
12194
12195 cat >>confdefs.h <<_ACEOF
12196 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1
12197 _ACEOF
12198
12199
12200 fi
12201 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_len" "ac_cv_member_struct_sockaddr_storage___ss_len" "#include <sys/types.h>
12202 #include <sys/socket.h>
12203
12204 "
12205 if test "x$ac_cv_member_struct_sockaddr_storage___ss_len" = xyes; then :
12206
12207 cat >>confdefs.h <<_ACEOF
12208 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN 1
12209 _ACEOF
12210
12211
12212 fi
12213 ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/types.h>
12214 #include <sys/socket.h>
12215
12216 "
12217 if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
12218
12219 cat >>confdefs.h <<_ACEOF
12220 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
12221 _ACEOF
12222
12223
12224 fi
12225
12226 ac_fn_c_check_type "$LINENO" "struct addrinfo" "ac_cv_type_struct_addrinfo" "#include <sys/types.h>
12227 #include <sys/socket.h>
12228 #include <netdb.h>
12229
12230 "
12231 if test "x$ac_cv_type_struct_addrinfo" = xyes; then :
12232
12233 cat >>confdefs.h <<_ACEOF
12234 #define HAVE_STRUCT_ADDRINFO 1
12235 _ACEOF
12236
12237
12238 fi
12239
12240
12241   ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
12242 if test "x$ac_cv_type_intptr_t" = xyes; then :
12243
12244 $as_echo "#define HAVE_INTPTR_T 1" >>confdefs.h
12245
12246 else
12247   for ac_type in 'int' 'long int' 'long long int'; do
12248        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12249 /* end confdefs.h.  */
12250 $ac_includes_default
12251 int
12252 main ()
12253 {
12254 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
12255 test_array [0] = 0;
12256 return test_array [0];
12257
12258   ;
12259   return 0;
12260 }
12261 _ACEOF
12262 if ac_fn_c_try_compile "$LINENO"; then :
12263
12264 cat >>confdefs.h <<_ACEOF
12265 #define intptr_t $ac_type
12266 _ACEOF
12267
12268           ac_type=
12269 fi
12270 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12271        test -z "$ac_type" && break
12272      done
12273 fi
12274
12275
12276
12277   ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
12278 if test "x$ac_cv_type_uintptr_t" = xyes; then :
12279
12280 $as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h
12281
12282 else
12283   for ac_type in 'unsigned int' 'unsigned long int' \
12284         'unsigned long long int'; do
12285        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12286 /* end confdefs.h.  */
12287 $ac_includes_default
12288 int
12289 main ()
12290 {
12291 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
12292 test_array [0] = 0;
12293 return test_array [0];
12294
12295   ;
12296   return 0;
12297 }
12298 _ACEOF
12299 if ac_fn_c_try_compile "$LINENO"; then :
12300
12301 cat >>confdefs.h <<_ACEOF
12302 #define uintptr_t $ac_type
12303 _ACEOF
12304
12305           ac_type=
12306 fi
12307 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12308        test -z "$ac_type" && break
12309      done
12310 fi
12311
12312
12313
12314   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
12315 $as_echo_n "checking for unsigned long long int... " >&6; }
12316 if ${ac_cv_type_unsigned_long_long_int+:} false; then :
12317   $as_echo_n "(cached) " >&6
12318 else
12319   ac_cv_type_unsigned_long_long_int=yes
12320      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
12321        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12322 /* end confdefs.h.  */
12323
12324   /* For now, do not test the preprocessor; as of 2007 there are too many
12325          implementations with broken preprocessors.  Perhaps this can
12326          be revisited in 2012.  In the meantime, code should not expect
12327          #if to work with literals wider than 32 bits.  */
12328       /* Test literals.  */
12329       long long int ll = 9223372036854775807ll;
12330       long long int nll = -9223372036854775807LL;
12331       unsigned long long int ull = 18446744073709551615ULL;
12332       /* Test constant expressions.   */
12333       typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
12334                      ? 1 : -1)];
12335       typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
12336                      ? 1 : -1)];
12337       int i = 63;
12338 int
12339 main ()
12340 {
12341 /* Test availability of runtime routines for shift and division.  */
12342       long long int llmax = 9223372036854775807ll;
12343       unsigned long long int ullmax = 18446744073709551615ull;
12344       return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
12345               | (llmax / ll) | (llmax % ll)
12346               | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
12347               | (ullmax / ull) | (ullmax % ull));
12348   ;
12349   return 0;
12350 }
12351
12352 _ACEOF
12353 if ac_fn_c_try_link "$LINENO"; then :
12354
12355 else
12356   ac_cv_type_unsigned_long_long_int=no
12357 fi
12358 rm -f core conftest.err conftest.$ac_objext \
12359     conftest$ac_exeext conftest.$ac_ext
12360      fi
12361 fi
12362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
12363 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
12364   if test $ac_cv_type_unsigned_long_long_int = yes; then
12365
12366 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
12367
12368   fi
12369
12370
12371
12372   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
12373 $as_echo_n "checking for long long int... " >&6; }
12374 if ${ac_cv_type_long_long_int+:} false; then :
12375   $as_echo_n "(cached) " >&6
12376 else
12377   ac_cv_type_long_long_int=yes
12378       if test "x${ac_cv_prog_cc_c99-no}" = xno; then
12379         ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
12380         if test $ac_cv_type_long_long_int = yes; then
12381                                   if test "$cross_compiling" = yes; then :
12382   :
12383 else
12384   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12385 /* end confdefs.h.  */
12386 #include <limits.h>
12387                  #ifndef LLONG_MAX
12388                  # define HALF \
12389                           (1LL << (sizeof (long long int) * CHAR_BIT - 2))
12390                  # define LLONG_MAX (HALF - 1 + HALF)
12391                  #endif
12392 int
12393 main ()
12394 {
12395 long long int n = 1;
12396                  int i;
12397                  for (i = 0; ; i++)
12398                    {
12399                      long long int m = n << i;
12400                      if (m >> i != n)
12401                        return 1;
12402                      if (LLONG_MAX / 2 < m)
12403                        break;
12404                    }
12405                  return 0;
12406   ;
12407   return 0;
12408 }
12409 _ACEOF
12410 if ac_fn_c_try_run "$LINENO"; then :
12411
12412 else
12413   ac_cv_type_long_long_int=no
12414 fi
12415 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12416   conftest.$ac_objext conftest.beam conftest.$ac_ext
12417 fi
12418
12419         fi
12420       fi
12421 fi
12422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
12423 $as_echo "$ac_cv_type_long_long_int" >&6; }
12424   if test $ac_cv_type_long_long_int = yes; then
12425
12426 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
12427
12428   fi
12429
12430
12431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for locale_t" >&5
12432 $as_echo_n "checking for locale_t... " >&6; }
12433 if ${pgac_cv_type_locale_t+:} false; then :
12434   $as_echo_n "(cached) " >&6
12435 else
12436   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12437 /* end confdefs.h.  */
12438 #include <locale.h>
12439 locale_t x;
12440 int
12441 main ()
12442 {
12443
12444   ;
12445   return 0;
12446 }
12447 _ACEOF
12448 if ac_fn_c_try_compile "$LINENO"; then :
12449   pgac_cv_type_locale_t=yes
12450 else
12451   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12452 /* end confdefs.h.  */
12453 #include <xlocale.h>
12454 locale_t x;
12455 int
12456 main ()
12457 {
12458
12459   ;
12460   return 0;
12461 }
12462 _ACEOF
12463 if ac_fn_c_try_compile "$LINENO"; then :
12464   pgac_cv_type_locale_t='yes (in xlocale.h)'
12465 else
12466   pgac_cv_type_locale_t=no
12467 fi
12468 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12469 fi
12470 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12471 fi
12472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_locale_t" >&5
12473 $as_echo "$pgac_cv_type_locale_t" >&6; }
12474 if test "$pgac_cv_type_locale_t" != no; then
12475
12476 $as_echo "#define HAVE_LOCALE_T 1" >>confdefs.h
12477
12478 fi
12479 if test "$pgac_cv_type_locale_t" = 'yes (in xlocale.h)'; then
12480
12481 $as_echo "#define LOCALE_T_IN_XLOCALE 1" >>confdefs.h
12482
12483 fi
12484
12485 # MSVC doesn't cope well with defining restrict to __restrict, the
12486 # spelling it understands, because it conflicts with
12487 # __declspec(restrict). Therefore we define pg_restrict to the
12488 # appropriate definition, which presumably won't conflict.
12489 #
12490 # Allow platforms with buggy compilers to force restrict to not be
12491 # used by setting $FORCE_DISABLE_RESTRICT=yes in the relevant
12492 # template.
12493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
12494 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
12495 if ${ac_cv_c_restrict+:} false; then :
12496   $as_echo_n "(cached) " >&6
12497 else
12498   ac_cv_c_restrict=no
12499    # The order here caters to the fact that C++ does not require restrict.
12500    for ac_kw in __restrict __restrict__ _Restrict restrict; do
12501      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12502 /* end confdefs.h.  */
12503 typedef int * int_ptr;
12504         int foo (int_ptr $ac_kw ip) {
12505         return ip[0];
12506        }
12507 int
12508 main ()
12509 {
12510 int s[1];
12511         int * $ac_kw t = s;
12512         t[0] = 0;
12513         return foo(t)
12514   ;
12515   return 0;
12516 }
12517 _ACEOF
12518 if ac_fn_c_try_compile "$LINENO"; then :
12519   ac_cv_c_restrict=$ac_kw
12520 fi
12521 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12522      test "$ac_cv_c_restrict" != no && break
12523    done
12524
12525 fi
12526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
12527 $as_echo "$ac_cv_c_restrict" >&6; }
12528
12529  case $ac_cv_c_restrict in
12530    restrict) ;;
12531    no) $as_echo "#define restrict /**/" >>confdefs.h
12532  ;;
12533    *)  cat >>confdefs.h <<_ACEOF
12534 #define restrict $ac_cv_c_restrict
12535 _ACEOF
12536  ;;
12537  esac
12538
12539 if test "$ac_cv_c_restrict" = "no" -o "x$FORCE_DISABLE_RESTRICT" = "xyes"; then
12540   pg_restrict=""
12541 else
12542   pg_restrict="$ac_cv_c_restrict"
12543 fi
12544
12545 cat >>confdefs.h <<_ACEOF
12546 #define pg_restrict $pg_restrict
12547 _ACEOF
12548
12549
12550 ac_fn_c_check_type "$LINENO" "struct cmsgcred" "ac_cv_type_struct_cmsgcred" "#include <sys/socket.h>
12551 #include <sys/param.h>
12552 #ifdef HAVE_SYS_UCRED_H
12553 #include <sys/ucred.h>
12554 #endif
12555 "
12556 if test "x$ac_cv_type_struct_cmsgcred" = xyes; then :
12557
12558 cat >>confdefs.h <<_ACEOF
12559 #define HAVE_STRUCT_CMSGCRED 1
12560 _ACEOF
12561
12562
12563 fi
12564
12565
12566 ac_fn_c_check_type "$LINENO" "struct option" "ac_cv_type_struct_option" "#ifdef HAVE_GETOPT_H
12567 #include <getopt.h>
12568 #endif
12569 "
12570 if test "x$ac_cv_type_struct_option" = xyes; then :
12571
12572 cat >>confdefs.h <<_ACEOF
12573 #define HAVE_STRUCT_OPTION 1
12574 _ACEOF
12575
12576
12577 fi
12578
12579
12580 if test "$with_zlib" = yes; then
12581   # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
12582   # did not).  While we could work around the lack of z_streamp, it
12583   # seems unwise to encourage people to use such old zlib versions...
12584   ac_fn_c_check_type "$LINENO" "z_streamp" "ac_cv_type_z_streamp" "#include <zlib.h>
12585 "
12586 if test "x$ac_cv_type_z_streamp" = xyes; then :
12587
12588 else
12589   as_fn_error $? "zlib version is too old
12590 Use --without-zlib to disable zlib support." "$LINENO" 5
12591 fi
12592
12593 fi
12594
12595 # On PPC, check if assembler supports LWARX instruction's mutex hint bit
12596 case $host_cpu in
12597   ppc*|powerpc*)
12598     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports lwarx hint bit" >&5
12599 $as_echo_n "checking whether assembler supports lwarx hint bit... " >&6; }
12600     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12601 /* end confdefs.h.  */
12602
12603 int
12604 main ()
12605 {
12606 int a = 0; int *p = &a; int r;
12607          __asm__ __volatile__ (" lwarx %0,0,%1,1\n" : "=&r"(r) : "r"(p));
12608   ;
12609   return 0;
12610 }
12611 _ACEOF
12612 if ac_fn_c_try_compile "$LINENO"; then :
12613   pgac_cv_have_ppc_mutex_hint=yes
12614 else
12615   pgac_cv_have_ppc_mutex_hint=no
12616 fi
12617 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12618     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_ppc_mutex_hint" >&5
12619 $as_echo "$pgac_cv_have_ppc_mutex_hint" >&6; }
12620     if test x"$pgac_cv_have_ppc_mutex_hint" = xyes ; then
12621
12622 $as_echo "#define HAVE_PPC_LWARX_MUTEX_HINT 1" >>confdefs.h
12623
12624     fi
12625   ;;
12626 esac
12627
12628 # Check largefile support.  You might think this is a system service not a
12629 # compiler characteristic, but you'd be wrong.  We must check this before
12630 # probing existence of related functions such as fseeko, since the largefile
12631 # defines can affect what is generated for that.
12632 if test "$PORTNAME" != "win32"; then
12633    # Check whether --enable-largefile was given.
12634 if test "${enable_largefile+set}" = set; then :
12635   enableval=$enable_largefile;
12636 fi
12637
12638 if test "$enable_largefile" != no; then
12639
12640   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
12641 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
12642 if ${ac_cv_sys_largefile_CC+:} false; then :
12643   $as_echo_n "(cached) " >&6
12644 else
12645   ac_cv_sys_largefile_CC=no
12646      if test "$GCC" != yes; then
12647        ac_save_CC=$CC
12648        while :; do
12649          # IRIX 6.2 and later do not support large files by default,
12650          # so use the C compiler's -n32 option if that helps.
12651          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12652 /* end confdefs.h.  */
12653 #include <sys/types.h>
12654  /* Check that off_t can represent 2**63 - 1 correctly.
12655     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12656     since some C++ compilers masquerading as C compilers
12657     incorrectly reject 9223372036854775807.  */
12658 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12659   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12660                        && LARGE_OFF_T % 2147483647 == 1)
12661                       ? 1 : -1];
12662 int
12663 main ()
12664 {
12665
12666   ;
12667   return 0;
12668 }
12669 _ACEOF
12670          if ac_fn_c_try_compile "$LINENO"; then :
12671   break
12672 fi
12673 rm -f core conftest.err conftest.$ac_objext
12674          CC="$CC -n32"
12675          if ac_fn_c_try_compile "$LINENO"; then :
12676   ac_cv_sys_largefile_CC=' -n32'; break
12677 fi
12678 rm -f core conftest.err conftest.$ac_objext
12679          break
12680        done
12681        CC=$ac_save_CC
12682        rm -f conftest.$ac_ext
12683     fi
12684 fi
12685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
12686 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
12687   if test "$ac_cv_sys_largefile_CC" != no; then
12688     CC=$CC$ac_cv_sys_largefile_CC
12689   fi
12690
12691   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
12692 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
12693 if ${ac_cv_sys_file_offset_bits+:} false; then :
12694   $as_echo_n "(cached) " >&6
12695 else
12696   while :; do
12697   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12698 /* end confdefs.h.  */
12699 #include <sys/types.h>
12700  /* Check that off_t can represent 2**63 - 1 correctly.
12701     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12702     since some C++ compilers masquerading as C compilers
12703     incorrectly reject 9223372036854775807.  */
12704 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12705   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12706                        && LARGE_OFF_T % 2147483647 == 1)
12707                       ? 1 : -1];
12708 int
12709 main ()
12710 {
12711
12712   ;
12713   return 0;
12714 }
12715 _ACEOF
12716 if ac_fn_c_try_compile "$LINENO"; then :
12717   ac_cv_sys_file_offset_bits=no; break
12718 fi
12719 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12720   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12721 /* end confdefs.h.  */
12722 #define _FILE_OFFSET_BITS 64
12723 #include <sys/types.h>
12724  /* Check that off_t can represent 2**63 - 1 correctly.
12725     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12726     since some C++ compilers masquerading as C compilers
12727     incorrectly reject 9223372036854775807.  */
12728 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12729   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12730                        && LARGE_OFF_T % 2147483647 == 1)
12731                       ? 1 : -1];
12732 int
12733 main ()
12734 {
12735
12736   ;
12737   return 0;
12738 }
12739 _ACEOF
12740 if ac_fn_c_try_compile "$LINENO"; then :
12741   ac_cv_sys_file_offset_bits=64; break
12742 fi
12743 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12744   ac_cv_sys_file_offset_bits=unknown
12745   break
12746 done
12747 fi
12748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
12749 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
12750 case $ac_cv_sys_file_offset_bits in #(
12751   no | unknown) ;;
12752   *)
12753 cat >>confdefs.h <<_ACEOF
12754 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
12755 _ACEOF
12756 ;;
12757 esac
12758 rm -rf conftest*
12759   if test $ac_cv_sys_file_offset_bits = unknown; then
12760     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
12761 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
12762 if ${ac_cv_sys_large_files+:} false; then :
12763   $as_echo_n "(cached) " >&6
12764 else
12765   while :; do
12766   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12767 /* end confdefs.h.  */
12768 #include <sys/types.h>
12769  /* Check that off_t can represent 2**63 - 1 correctly.
12770     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12771     since some C++ compilers masquerading as C compilers
12772     incorrectly reject 9223372036854775807.  */
12773 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12774   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12775                        && LARGE_OFF_T % 2147483647 == 1)
12776                       ? 1 : -1];
12777 int
12778 main ()
12779 {
12780
12781   ;
12782   return 0;
12783 }
12784 _ACEOF
12785 if ac_fn_c_try_compile "$LINENO"; then :
12786   ac_cv_sys_large_files=no; break
12787 fi
12788 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12789   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12790 /* end confdefs.h.  */
12791 #define _LARGE_FILES 1
12792 #include <sys/types.h>
12793  /* Check that off_t can represent 2**63 - 1 correctly.
12794     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12795     since some C++ compilers masquerading as C compilers
12796     incorrectly reject 9223372036854775807.  */
12797 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12798   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12799                        && LARGE_OFF_T % 2147483647 == 1)
12800                       ? 1 : -1];
12801 int
12802 main ()
12803 {
12804
12805   ;
12806   return 0;
12807 }
12808 _ACEOF
12809 if ac_fn_c_try_compile "$LINENO"; then :
12810   ac_cv_sys_large_files=1; break
12811 fi
12812 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12813   ac_cv_sys_large_files=unknown
12814   break
12815 done
12816 fi
12817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
12818 $as_echo "$ac_cv_sys_large_files" >&6; }
12819 case $ac_cv_sys_large_files in #(
12820   no | unknown) ;;
12821   *)
12822 cat >>confdefs.h <<_ACEOF
12823 #define _LARGE_FILES $ac_cv_sys_large_files
12824 _ACEOF
12825 ;;
12826 esac
12827 rm -rf conftest*
12828   fi
12829
12830
12831 fi
12832
12833
12834 fi
12835
12836 # Check for largefile support (must be after AC_SYS_LARGEFILE)
12837 # The cast to long int works around a bug in the HP C Compiler
12838 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12839 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12840 # This bug is HP SR number 8606223364.
12841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
12842 $as_echo_n "checking size of off_t... " >&6; }
12843 if ${ac_cv_sizeof_off_t+:} false; then :
12844   $as_echo_n "(cached) " >&6
12845 else
12846   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t"        "$ac_includes_default"; then :
12847
12848 else
12849   if test "$ac_cv_type_off_t" = yes; then
12850      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12851 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12852 as_fn_error 77 "cannot compute sizeof (off_t)
12853 See \`config.log' for more details" "$LINENO" 5; }
12854    else
12855      ac_cv_sizeof_off_t=0
12856    fi
12857 fi
12858
12859 fi
12860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
12861 $as_echo "$ac_cv_sizeof_off_t" >&6; }
12862
12863
12864
12865 cat >>confdefs.h <<_ACEOF
12866 #define SIZEOF_OFF_T $ac_cv_sizeof_off_t
12867 _ACEOF
12868
12869
12870
12871 # If we don't have largefile support, can't handle segsize >= 2GB.
12872 if test "$ac_cv_sizeof_off_t" -lt 8 -a "$segsize" != "1"; then
12873    as_fn_error $? "Large file support is not enabled. Segment size cannot be larger than 1GB." "$LINENO" 5
12874 fi
12875
12876
12877 ##
12878 ## Functions, global variables
12879 ##
12880
12881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int timezone" >&5
12882 $as_echo_n "checking for int timezone... " >&6; }
12883 if ${pgac_cv_var_int_timezone+:} false; then :
12884   $as_echo_n "(cached) " >&6
12885 else
12886   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12887 /* end confdefs.h.  */
12888 #include <time.h>
12889 int res;
12890 int
12891 main ()
12892 {
12893 #ifndef __CYGWIN__
12894 res = timezone / 60;
12895 #else
12896 res = _timezone / 60;
12897 #endif
12898   ;
12899   return 0;
12900 }
12901 _ACEOF
12902 if ac_fn_c_try_link "$LINENO"; then :
12903   pgac_cv_var_int_timezone=yes
12904 else
12905   pgac_cv_var_int_timezone=no
12906 fi
12907 rm -f core conftest.err conftest.$ac_objext \
12908     conftest$ac_exeext conftest.$ac_ext
12909 fi
12910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_timezone" >&5
12911 $as_echo "$pgac_cv_var_int_timezone" >&6; }
12912 if test x"$pgac_cv_var_int_timezone" = xyes ; then
12913
12914 $as_echo "#define HAVE_INT_TIMEZONE 1" >>confdefs.h
12915
12916 fi
12917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for accept()" >&5
12918 $as_echo_n "checking types of arguments for accept()... " >&6; }
12919  if ${ac_cv_func_accept_return+:} false; then :
12920   $as_echo_n "(cached) " >&6
12921 else
12922    if ${ac_cv_func_accept_arg1+:} false; then :
12923   $as_echo_n "(cached) " >&6
12924 else
12925     if ${ac_cv_func_accept_arg2+:} false; then :
12926   $as_echo_n "(cached) " >&6
12927 else
12928      if ${ac_cv_func_accept_arg3+:} false; then :
12929   $as_echo_n "(cached) " >&6
12930 else
12931       for ac_cv_func_accept_return in 'int' 'unsigned int PASCAL' 'SOCKET WSAAPI'; do
12932       for ac_cv_func_accept_arg1 in 'int' 'unsigned int' 'SOCKET'; do
12933        for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
12934         for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
12935          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12936 /* end confdefs.h.  */
12937 #include <sys/types.h>
12938 #include <sys/socket.h>
12939 extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
12940 _ACEOF
12941 if ac_fn_c_try_compile "$LINENO"; then :
12942   ac_not_found=no; break 4
12943 else
12944   ac_not_found=yes
12945 fi
12946 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12947        done
12948       done
12949      done
12950     done
12951     if test "$ac_not_found" = yes; then
12952       as_fn_error $? "could not determine argument types" "$LINENO" 5
12953     fi
12954     if test "$ac_cv_func_accept_arg3" = "void"; then
12955       ac_cv_func_accept_arg3=int
12956     fi
12957
12958 fi
12959
12960 fi
12961
12962 fi
12963
12964 fi
12965  { $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
12966 $as_echo "$ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&6; }
12967
12968 cat >>confdefs.h <<_ACEOF
12969 #define ACCEPT_TYPE_RETURN $ac_cv_func_accept_return
12970 _ACEOF
12971
12972
12973 cat >>confdefs.h <<_ACEOF
12974 #define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
12975 _ACEOF
12976
12977
12978 cat >>confdefs.h <<_ACEOF
12979 #define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
12980 _ACEOF
12981
12982
12983 cat >>confdefs.h <<_ACEOF
12984 #define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
12985 _ACEOF
12986
12987
12988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday takes only one argument" >&5
12989 $as_echo_n "checking whether gettimeofday takes only one argument... " >&6; }
12990 if ${pgac_cv_func_gettimeofday_1arg+:} false; then :
12991   $as_echo_n "(cached) " >&6
12992 else
12993   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12994 /* end confdefs.h.  */
12995 #include <sys/time.h>
12996 int
12997 main ()
12998 {
12999 struct timeval *tp;
13000 struct timezone *tzp;
13001 gettimeofday(tp,tzp);
13002   ;
13003   return 0;
13004 }
13005 _ACEOF
13006 if ac_fn_c_try_compile "$LINENO"; then :
13007   pgac_cv_func_gettimeofday_1arg=no
13008 else
13009   pgac_cv_func_gettimeofday_1arg=yes
13010 fi
13011 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13012 fi
13013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_gettimeofday_1arg" >&5
13014 $as_echo "$pgac_cv_func_gettimeofday_1arg" >&6; }
13015 if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
13016
13017 $as_echo "#define GETTIMEOFDAY_1ARG 1" >>confdefs.h
13018
13019 fi
13020
13021 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wcstombs_l declaration" >&5
13022 $as_echo_n "checking for wcstombs_l declaration... " >&6; }
13023 if ${pgac_cv_func_wcstombs_l+:} false; then :
13024   $as_echo_n "(cached) " >&6
13025 else
13026   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13027 /* end confdefs.h.  */
13028 #include <stdlib.h>
13029 #include <locale.h>
13030 int
13031 main ()
13032 {
13033 #ifndef wcstombs_l
13034 (void) wcstombs_l;
13035 #endif
13036   ;
13037   return 0;
13038 }
13039 _ACEOF
13040 if ac_fn_c_try_compile "$LINENO"; then :
13041   pgac_cv_func_wcstombs_l='yes'
13042 else
13043   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13044 /* end confdefs.h.  */
13045 #include <stdlib.h>
13046 #include <locale.h>
13047 #include <xlocale.h>
13048 int
13049 main ()
13050 {
13051 #ifndef wcstombs_l
13052 (void) wcstombs_l;
13053 #endif
13054   ;
13055   return 0;
13056 }
13057 _ACEOF
13058 if ac_fn_c_try_compile "$LINENO"; then :
13059   pgac_cv_func_wcstombs_l='yes (in xlocale.h)'
13060 else
13061   pgac_cv_func_wcstombs_l='no'
13062 fi
13063 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13064 fi
13065 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13066 fi
13067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_wcstombs_l" >&5
13068 $as_echo "$pgac_cv_func_wcstombs_l" >&6; }
13069 if test "$pgac_cv_func_wcstombs_l" = 'yes (in xlocale.h)'; then
13070
13071 $as_echo "#define WCSTOMBS_L_IN_XLOCALE 1" >>confdefs.h
13072
13073 fi
13074
13075 # Some versions of libedit contain strlcpy(), setproctitle(), and other
13076 # symbols that that library has no business exposing to the world.  Pending
13077 # acquisition of a clue by those developers, ignore libedit (including its
13078 # possible alias of libreadline) while checking for everything else.
13079 LIBS_including_readline="$LIBS"
13080 LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
13081
13082 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
13083 do :
13084   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13085 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13086 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13087   cat >>confdefs.h <<_ACEOF
13088 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13089 _ACEOF
13090
13091 fi
13092 done
13093
13094
13095 ac_fn_c_check_func "$LINENO" "fseeko" "ac_cv_func_fseeko"
13096 if test "x$ac_cv_func_fseeko" = xyes; then :
13097   $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
13098
13099 else
13100   case " $LIBOBJS " in
13101   *" fseeko.$ac_objext "* ) ;;
13102   *) LIBOBJS="$LIBOBJS fseeko.$ac_objext"
13103  ;;
13104 esac
13105
13106 fi
13107
13108
13109 case $host_os in
13110         # NetBSD uses a custom fseeko/ftello built on fsetpos/fgetpos
13111         # Mingw uses macros to access Win32 API calls
13112         netbsd*|mingw*)
13113
13114 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
13115
13116                 ac_cv_func_fseeko=yes;;
13117         *)
13118                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
13119 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
13120 if ${ac_cv_sys_largefile_source+:} false; then :
13121   $as_echo_n "(cached) " >&6
13122 else
13123   while :; do
13124   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13125 /* end confdefs.h.  */
13126 #include <sys/types.h> /* for off_t */
13127      #include <stdio.h>
13128 int
13129 main ()
13130 {
13131 int (*fp) (FILE *, off_t, int) = fseeko;
13132      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
13133   ;
13134   return 0;
13135 }
13136 _ACEOF
13137 if ac_fn_c_try_link "$LINENO"; then :
13138   ac_cv_sys_largefile_source=no; break
13139 fi
13140 rm -f core conftest.err conftest.$ac_objext \
13141     conftest$ac_exeext conftest.$ac_ext
13142   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13143 /* end confdefs.h.  */
13144 #define _LARGEFILE_SOURCE 1
13145 #include <sys/types.h> /* for off_t */
13146      #include <stdio.h>
13147 int
13148 main ()
13149 {
13150 int (*fp) (FILE *, off_t, int) = fseeko;
13151      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
13152   ;
13153   return 0;
13154 }
13155 _ACEOF
13156 if ac_fn_c_try_link "$LINENO"; then :
13157   ac_cv_sys_largefile_source=1; break
13158 fi
13159 rm -f core conftest.err conftest.$ac_objext \
13160     conftest$ac_exeext conftest.$ac_ext
13161   ac_cv_sys_largefile_source=unknown
13162   break
13163 done
13164 fi
13165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
13166 $as_echo "$ac_cv_sys_largefile_source" >&6; }
13167 case $ac_cv_sys_largefile_source in #(
13168   no | unknown) ;;
13169   *)
13170 cat >>confdefs.h <<_ACEOF
13171 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
13172 _ACEOF
13173 ;;
13174 esac
13175 rm -rf conftest*
13176
13177 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
13178 # in glibc 2.1.3, but that breaks too many other things.
13179 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
13180 if test $ac_cv_sys_largefile_source != unknown; then
13181
13182 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
13183
13184 fi
13185 ;;
13186 esac
13187
13188 # posix_fadvise() is a no-op on Solaris, so don't incur function overhead
13189 # by calling it, 2009-04-02
13190 # http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/posix_fadvise.c
13191 if test "$PORTNAME" != "solaris"; then
13192 for ac_func in posix_fadvise
13193 do :
13194   ac_fn_c_check_func "$LINENO" "posix_fadvise" "ac_cv_func_posix_fadvise"
13195 if test "x$ac_cv_func_posix_fadvise" = xyes; then :
13196   cat >>confdefs.h <<_ACEOF
13197 #define HAVE_POSIX_FADVISE 1
13198 _ACEOF
13199
13200 fi
13201 done
13202
13203 ac_fn_c_check_decl "$LINENO" "posix_fadvise" "ac_cv_have_decl_posix_fadvise" "#include <fcntl.h>
13204 "
13205 if test "x$ac_cv_have_decl_posix_fadvise" = xyes; then :
13206   ac_have_decl=1
13207 else
13208   ac_have_decl=0
13209 fi
13210
13211 cat >>confdefs.h <<_ACEOF
13212 #define HAVE_DECL_POSIX_FADVISE $ac_have_decl
13213 _ACEOF
13214
13215 fi
13216
13217 ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "#include <unistd.h>
13218 "
13219 if test "x$ac_cv_have_decl_fdatasync" = xyes; then :
13220   ac_have_decl=1
13221 else
13222   ac_have_decl=0
13223 fi
13224
13225 cat >>confdefs.h <<_ACEOF
13226 #define HAVE_DECL_FDATASYNC $ac_have_decl
13227 _ACEOF
13228
13229 ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
13230 if test "x$ac_cv_have_decl_strlcat" = 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_STRLCAT $ac_have_decl
13238 _ACEOF
13239 ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
13240 if test "x$ac_cv_have_decl_strlcpy" = xyes; then :
13241   ac_have_decl=1
13242 else
13243   ac_have_decl=0
13244 fi
13245
13246 cat >>confdefs.h <<_ACEOF
13247 #define HAVE_DECL_STRLCPY $ac_have_decl
13248 _ACEOF
13249 ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
13250 if test "x$ac_cv_have_decl_strnlen" = xyes; then :
13251   ac_have_decl=1
13252 else
13253   ac_have_decl=0
13254 fi
13255
13256 cat >>confdefs.h <<_ACEOF
13257 #define HAVE_DECL_STRNLEN $ac_have_decl
13258 _ACEOF
13259
13260 # This is probably only present on macOS, but may as well check always
13261 ac_fn_c_check_decl "$LINENO" "F_FULLFSYNC" "ac_cv_have_decl_F_FULLFSYNC" "#include <fcntl.h>
13262 "
13263 if test "x$ac_cv_have_decl_F_FULLFSYNC" = xyes; then :
13264   ac_have_decl=1
13265 else
13266   ac_have_decl=0
13267 fi
13268
13269 cat >>confdefs.h <<_ACEOF
13270 #define HAVE_DECL_F_FULLFSYNC $ac_have_decl
13271 _ACEOF
13272
13273
13274 HAVE_IPV6=no
13275 ac_fn_c_check_type "$LINENO" "struct sockaddr_in6" "ac_cv_type_struct_sockaddr_in6" "$ac_includes_default
13276 #include <netinet/in.h>
13277 "
13278 if test "x$ac_cv_type_struct_sockaddr_in6" = xyes; then :
13279
13280 $as_echo "#define HAVE_IPV6 1" >>confdefs.h
13281
13282          HAVE_IPV6=yes
13283 fi
13284
13285
13286
13287 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PS_STRINGS" >&5
13288 $as_echo_n "checking for PS_STRINGS... " >&6; }
13289 if ${pgac_cv_var_PS_STRINGS+:} false; then :
13290   $as_echo_n "(cached) " >&6
13291 else
13292   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13293 /* end confdefs.h.  */
13294 #include <machine/vmparam.h>
13295 #include <sys/exec.h>
13296
13297 int
13298 main ()
13299 {
13300 PS_STRINGS->ps_nargvstr = 1;
13301 PS_STRINGS->ps_argvstr = "foo";
13302   ;
13303   return 0;
13304 }
13305 _ACEOF
13306 if ac_fn_c_try_link "$LINENO"; then :
13307   pgac_cv_var_PS_STRINGS=yes
13308 else
13309   pgac_cv_var_PS_STRINGS=no
13310 fi
13311 rm -f core conftest.err conftest.$ac_objext \
13312     conftest$ac_exeext conftest.$ac_ext
13313 fi
13314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_PS_STRINGS" >&5
13315 $as_echo "$pgac_cv_var_PS_STRINGS" >&6; }
13316 if test "$pgac_cv_var_PS_STRINGS" = yes ; then
13317
13318 $as_echo "#define HAVE_PS_STRINGS 1" >>confdefs.h
13319
13320 fi
13321
13322
13323 # We use our snprintf.c emulation if either snprintf() or vsnprintf()
13324 # is missing.  Yes, there are machines that have only one.  We may
13325 # also decide to use snprintf.c if snprintf() is present but does not
13326 # have all the features we need --- see below.
13327
13328 if test "$PORTNAME" = "win32"; then
13329   # Win32 gets snprintf.c built unconditionally.
13330   #
13331   # To properly translate all NLS languages strings, we must support the
13332   # *printf() %$ format, which allows *printf() arguments to be selected
13333   # by position in the translated string.
13334   #
13335   # libintl versions < 0.13 use the native *printf() functions, and Win32
13336   # *printf() doesn't understand %$, so we must use our /port versions,
13337   # which do understand %$. libintl versions >= 0.13 include their own
13338   # *printf versions on Win32.  The libintl 0.13 release note text is:
13339   #
13340   #   C format strings with positions, as they arise when a translator
13341   #   needs to reorder a sentence, are now supported on all platforms.
13342   #   On those few platforms (NetBSD and Woe32) for which the native
13343   #   printf()/fprintf()/... functions don't support such format
13344   #   strings, replacements are provided through <libintl.h>.
13345   #
13346   # We could use libintl >= 0.13's *printf() if we were sure that we had
13347   # a litint >= 0.13 at runtime, but seeing that there is no clean way
13348   # to guarantee that, it is best to just use our own, so we are sure to
13349   # get %$ support. In include/port.h we disable the *printf() macros
13350   # that might have been defined by libintl.
13351   #
13352   # We do this unconditionally whether NLS is used or not so we are sure
13353   # that all Win32 libraries and binaries behave the same.
13354   pgac_need_repl_snprintf=yes
13355 else
13356   pgac_need_repl_snprintf=no
13357   for ac_func in snprintf
13358 do :
13359   ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
13360 if test "x$ac_cv_func_snprintf" = xyes; then :
13361   cat >>confdefs.h <<_ACEOF
13362 #define HAVE_SNPRINTF 1
13363 _ACEOF
13364
13365 else
13366   pgac_need_repl_snprintf=yes
13367 fi
13368 done
13369
13370   for ac_func in vsnprintf
13371 do :
13372   ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
13373 if test "x$ac_cv_func_vsnprintf" = xyes; then :
13374   cat >>confdefs.h <<_ACEOF
13375 #define HAVE_VSNPRINTF 1
13376 _ACEOF
13377
13378 else
13379   pgac_need_repl_snprintf=yes
13380 fi
13381 done
13382
13383 fi
13384
13385
13386 # Check whether <stdio.h> declares snprintf() and vsnprintf(); if not,
13387 # include/c.h will provide declarations.  Note this is a separate test
13388 # from whether the functions exist in the C library --- there are
13389 # systems that have the functions but don't bother to declare them :-(
13390
13391 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
13392 if test "x$ac_cv_have_decl_snprintf" = xyes; then :
13393   ac_have_decl=1
13394 else
13395   ac_have_decl=0
13396 fi
13397
13398 cat >>confdefs.h <<_ACEOF
13399 #define HAVE_DECL_SNPRINTF $ac_have_decl
13400 _ACEOF
13401 ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
13402 if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
13403   ac_have_decl=1
13404 else
13405   ac_have_decl=0
13406 fi
13407
13408 cat >>confdefs.h <<_ACEOF
13409 #define HAVE_DECL_VSNPRINTF $ac_have_decl
13410 _ACEOF
13411
13412
13413
13414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for isinf" >&5
13415 $as_echo_n "checking for isinf... " >&6; }
13416 if ${ac_cv_func_isinf+:} false; then :
13417   $as_echo_n "(cached) " >&6
13418 else
13419   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13420 /* end confdefs.h.  */
13421
13422 #include <math.h>
13423 double glob_double;
13424
13425 int
13426 main ()
13427 {
13428 return isinf(glob_double) ? 0 : 1;
13429   ;
13430   return 0;
13431 }
13432 _ACEOF
13433 if ac_fn_c_try_link "$LINENO"; then :
13434   ac_cv_func_isinf=yes
13435 else
13436   ac_cv_func_isinf=no
13437 fi
13438 rm -f core conftest.err conftest.$ac_objext \
13439     conftest$ac_exeext conftest.$ac_ext
13440 fi
13441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_isinf" >&5
13442 $as_echo "$ac_cv_func_isinf" >&6; }
13443
13444 if test $ac_cv_func_isinf = yes ; then
13445
13446 $as_echo "#define HAVE_ISINF 1" >>confdefs.h
13447
13448 else
13449   case " $LIBOBJS " in
13450   *" isinf.$ac_objext "* ) ;;
13451   *) LIBOBJS="$LIBOBJS isinf.$ac_objext"
13452  ;;
13453 esac
13454
13455   # Look for a way to implement a substitute for isinf()
13456   for ac_func in fpclass fp_class fp_class_d class
13457 do :
13458   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13459 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13460 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13461   cat >>confdefs.h <<_ACEOF
13462 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13463 _ACEOF
13464  break
13465 fi
13466 done
13467
13468 fi
13469
13470 ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt"
13471 if test "x$ac_cv_func_crypt" = xyes; then :
13472   $as_echo "#define HAVE_CRYPT 1" >>confdefs.h
13473
13474 else
13475   case " $LIBOBJS " in
13476   *" crypt.$ac_objext "* ) ;;
13477   *) LIBOBJS="$LIBOBJS crypt.$ac_objext"
13478  ;;
13479 esac
13480
13481 fi
13482
13483 ac_fn_c_check_func "$LINENO" "fls" "ac_cv_func_fls"
13484 if test "x$ac_cv_func_fls" = xyes; then :
13485   $as_echo "#define HAVE_FLS 1" >>confdefs.h
13486
13487 else
13488   case " $LIBOBJS " in
13489   *" fls.$ac_objext "* ) ;;
13490   *) LIBOBJS="$LIBOBJS fls.$ac_objext"
13491  ;;
13492 esac
13493
13494 fi
13495
13496 ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt"
13497 if test "x$ac_cv_func_getopt" = xyes; then :
13498   $as_echo "#define HAVE_GETOPT 1" >>confdefs.h
13499
13500 else
13501   case " $LIBOBJS " in
13502   *" getopt.$ac_objext "* ) ;;
13503   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
13504  ;;
13505 esac
13506
13507 fi
13508
13509 ac_fn_c_check_func "$LINENO" "getrusage" "ac_cv_func_getrusage"
13510 if test "x$ac_cv_func_getrusage" = xyes; then :
13511   $as_echo "#define HAVE_GETRUSAGE 1" >>confdefs.h
13512
13513 else
13514   case " $LIBOBJS " in
13515   *" getrusage.$ac_objext "* ) ;;
13516   *) LIBOBJS="$LIBOBJS getrusage.$ac_objext"
13517  ;;
13518 esac
13519
13520 fi
13521
13522 ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
13523 if test "x$ac_cv_func_inet_aton" = xyes; then :
13524   $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
13525
13526 else
13527   case " $LIBOBJS " in
13528   *" inet_aton.$ac_objext "* ) ;;
13529   *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
13530  ;;
13531 esac
13532
13533 fi
13534
13535 ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
13536 if test "x$ac_cv_func_mkdtemp" = xyes; then :
13537   $as_echo "#define HAVE_MKDTEMP 1" >>confdefs.h
13538
13539 else
13540   case " $LIBOBJS " in
13541   *" mkdtemp.$ac_objext "* ) ;;
13542   *) LIBOBJS="$LIBOBJS mkdtemp.$ac_objext"
13543  ;;
13544 esac
13545
13546 fi
13547
13548 ac_fn_c_check_func "$LINENO" "random" "ac_cv_func_random"
13549 if test "x$ac_cv_func_random" = xyes; then :
13550   $as_echo "#define HAVE_RANDOM 1" >>confdefs.h
13551
13552 else
13553   case " $LIBOBJS " in
13554   *" random.$ac_objext "* ) ;;
13555   *) LIBOBJS="$LIBOBJS random.$ac_objext"
13556  ;;
13557 esac
13558
13559 fi
13560
13561 ac_fn_c_check_func "$LINENO" "rint" "ac_cv_func_rint"
13562 if test "x$ac_cv_func_rint" = xyes; then :
13563   $as_echo "#define HAVE_RINT 1" >>confdefs.h
13564
13565 else
13566   case " $LIBOBJS " in
13567   *" rint.$ac_objext "* ) ;;
13568   *) LIBOBJS="$LIBOBJS rint.$ac_objext"
13569  ;;
13570 esac
13571
13572 fi
13573
13574 ac_fn_c_check_func "$LINENO" "srandom" "ac_cv_func_srandom"
13575 if test "x$ac_cv_func_srandom" = xyes; then :
13576   $as_echo "#define HAVE_SRANDOM 1" >>confdefs.h
13577
13578 else
13579   case " $LIBOBJS " in
13580   *" srandom.$ac_objext "* ) ;;
13581   *) LIBOBJS="$LIBOBJS srandom.$ac_objext"
13582  ;;
13583 esac
13584
13585 fi
13586
13587 ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror"
13588 if test "x$ac_cv_func_strerror" = xyes; then :
13589   $as_echo "#define HAVE_STRERROR 1" >>confdefs.h
13590
13591 else
13592   case " $LIBOBJS " in
13593   *" strerror.$ac_objext "* ) ;;
13594   *) LIBOBJS="$LIBOBJS strerror.$ac_objext"
13595  ;;
13596 esac
13597
13598 fi
13599
13600 ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
13601 if test "x$ac_cv_func_strlcat" = xyes; then :
13602   $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
13603
13604 else
13605   case " $LIBOBJS " in
13606   *" strlcat.$ac_objext "* ) ;;
13607   *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
13608  ;;
13609 esac
13610
13611 fi
13612
13613 ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
13614 if test "x$ac_cv_func_strlcpy" = xyes; then :
13615   $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
13616
13617 else
13618   case " $LIBOBJS " in
13619   *" strlcpy.$ac_objext "* ) ;;
13620   *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
13621  ;;
13622 esac
13623
13624 fi
13625
13626 ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
13627 if test "x$ac_cv_func_strnlen" = xyes; then :
13628   $as_echo "#define HAVE_STRNLEN 1" >>confdefs.h
13629
13630 else
13631   case " $LIBOBJS " in
13632   *" strnlen.$ac_objext "* ) ;;
13633   *) LIBOBJS="$LIBOBJS strnlen.$ac_objext"
13634  ;;
13635 esac
13636
13637 fi
13638
13639
13640
13641 case $host_os in
13642
13643         # Windows uses a specialised env handler
13644         # and doesn't need a replacement getpeereid because it doesn't use
13645         # Unix sockets.
13646         mingw*)
13647
13648 $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
13649
13650
13651 $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
13652
13653                 ac_cv_func_unsetenv=yes
13654                 ac_cv_func_getpeereid=yes;;
13655         *)
13656                 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
13657 if test "x$ac_cv_func_unsetenv" = xyes; then :
13658   $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
13659
13660 else
13661   case " $LIBOBJS " in
13662   *" unsetenv.$ac_objext "* ) ;;
13663   *) LIBOBJS="$LIBOBJS unsetenv.$ac_objext"
13664  ;;
13665 esac
13666
13667 fi
13668
13669 ac_fn_c_check_func "$LINENO" "getpeereid" "ac_cv_func_getpeereid"
13670 if test "x$ac_cv_func_getpeereid" = xyes; then :
13671   $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
13672
13673 else
13674   case " $LIBOBJS " in
13675   *" getpeereid.$ac_objext "* ) ;;
13676   *) LIBOBJS="$LIBOBJS getpeereid.$ac_objext"
13677  ;;
13678 esac
13679
13680 fi
13681
13682
13683                 ;;
13684 esac
13685
13686 # System's version of getaddrinfo(), if any, may be used only if we found
13687 # a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
13688 # We use only our own getaddrinfo.c on Windows, but it's time to revisit that.
13689 if test x"$ac_cv_type_struct_addrinfo" = xyes && \
13690    test "$PORTNAME" != "win32"; then
13691   ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo"
13692 if test "x$ac_cv_func_getaddrinfo" = xyes; then :
13693   $as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
13694
13695 else
13696   case " $LIBOBJS " in
13697   *" getaddrinfo.$ac_objext "* ) ;;
13698   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
13699  ;;
13700 esac
13701
13702 fi
13703
13704
13705 else
13706   case " $LIBOBJS " in
13707   *" getaddrinfo.$ac_objext "* ) ;;
13708   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
13709  ;;
13710 esac
13711
13712 fi
13713
13714 # Similarly, use system's getopt_long() only if system provides struct option.
13715 if test x"$ac_cv_type_struct_option" = xyes ; then
13716   ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long"
13717 if test "x$ac_cv_func_getopt_long" = xyes; then :
13718   $as_echo "#define HAVE_GETOPT_LONG 1" >>confdefs.h
13719
13720 else
13721   case " $LIBOBJS " in
13722   *" getopt_long.$ac_objext "* ) ;;
13723   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
13724  ;;
13725 esac
13726
13727 fi
13728
13729
13730 else
13731   case " $LIBOBJS " in
13732   *" getopt_long.$ac_objext "* ) ;;
13733   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
13734  ;;
13735 esac
13736
13737 fi
13738
13739 # Solaris' getopt() doesn't do what we want for long options, so always use
13740 # our version on that platform.
13741 if test "$PORTNAME" = "solaris"; then
13742   case " $LIBOBJS " in
13743   *" getopt.$ac_objext "* ) ;;
13744   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
13745  ;;
13746 esac
13747
13748 fi
13749
13750 # mingw has adopted a GNU-centric interpretation of optind/optreset,
13751 # so always use our version on Windows.
13752 if test "$PORTNAME" = "win32"; then
13753   case " $LIBOBJS " in
13754   *" getopt.$ac_objext "* ) ;;
13755   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
13756  ;;
13757 esac
13758
13759   case " $LIBOBJS " in
13760   *" getopt_long.$ac_objext "* ) ;;
13761   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
13762  ;;
13763 esac
13764
13765 fi
13766
13767 # Win32 (really MinGW) support
13768 if test "$PORTNAME" = "win32"; then
13769   ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
13770 if test "x$ac_cv_func_gettimeofday" = xyes; then :
13771   $as_echo "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
13772
13773 else
13774   case " $LIBOBJS " in
13775   *" gettimeofday.$ac_objext "* ) ;;
13776   *) LIBOBJS="$LIBOBJS gettimeofday.$ac_objext"
13777  ;;
13778 esac
13779
13780 fi
13781
13782
13783   case " $LIBOBJS " in
13784   *" dirmod.$ac_objext "* ) ;;
13785   *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
13786  ;;
13787 esac
13788
13789   case " $LIBOBJS " in
13790   *" kill.$ac_objext "* ) ;;
13791   *) LIBOBJS="$LIBOBJS kill.$ac_objext"
13792  ;;
13793 esac
13794
13795   case " $LIBOBJS " in
13796   *" open.$ac_objext "* ) ;;
13797   *) LIBOBJS="$LIBOBJS open.$ac_objext"
13798  ;;
13799 esac
13800
13801   case " $LIBOBJS " in
13802   *" system.$ac_objext "* ) ;;
13803   *) LIBOBJS="$LIBOBJS system.$ac_objext"
13804  ;;
13805 esac
13806
13807   case " $LIBOBJS " in
13808   *" win32env.$ac_objext "* ) ;;
13809   *) LIBOBJS="$LIBOBJS win32env.$ac_objext"
13810  ;;
13811 esac
13812
13813   case " $LIBOBJS " in
13814   *" win32error.$ac_objext "* ) ;;
13815   *) LIBOBJS="$LIBOBJS win32error.$ac_objext"
13816  ;;
13817 esac
13818
13819   case " $LIBOBJS " in
13820   *" win32security.$ac_objext "* ) ;;
13821   *) LIBOBJS="$LIBOBJS win32security.$ac_objext"
13822  ;;
13823 esac
13824
13825   case " $LIBOBJS " in
13826   *" win32setlocale.$ac_objext "* ) ;;
13827   *) LIBOBJS="$LIBOBJS win32setlocale.$ac_objext"
13828  ;;
13829 esac
13830
13831
13832 $as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
13833
13834   ac_fn_c_check_type "$LINENO" "MINIDUMP_TYPE" "ac_cv_type_MINIDUMP_TYPE" "
13835 #define WIN32_LEAN_AND_MEAN
13836 #include <windows.h>
13837 #include <string.h>
13838 #include <dbghelp.h>
13839 "
13840 if test "x$ac_cv_type_MINIDUMP_TYPE" = xyes; then :
13841
13842 cat >>confdefs.h <<_ACEOF
13843 #define HAVE_MINIDUMP_TYPE 1
13844 _ACEOF
13845
13846 pgac_minidump_type=yes
13847 else
13848   pgac_minidump_type=no
13849 fi
13850
13851 fi
13852 if test x"$pgac_minidump_type" = x"yes" ; then
13853   have_win32_dbghelp=yes
13854
13855 else
13856   have_win32_dbghelp=no
13857
13858 fi
13859
13860 # Cygwin needs only a bit of that
13861 if test "$PORTNAME" = "cygwin"; then
13862   case " $LIBOBJS " in
13863   *" dirmod.$ac_objext "* ) ;;
13864   *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
13865  ;;
13866 esac
13867
13868 fi
13869
13870 ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "#include <signal.h>
13871 /* NetBSD declares sys_siglist in unistd.h.  */
13872 #ifdef HAVE_UNISTD_H
13873 # include <unistd.h>
13874 #endif
13875
13876 "
13877 if test "x$ac_cv_have_decl_sys_siglist" = xyes; then :
13878   ac_have_decl=1
13879 else
13880   ac_have_decl=0
13881 fi
13882
13883 cat >>confdefs.h <<_ACEOF
13884 #define HAVE_DECL_SYS_SIGLIST $ac_have_decl
13885 _ACEOF
13886
13887
13888 ac_fn_c_check_func "$LINENO" "syslog" "ac_cv_func_syslog"
13889 if test "x$ac_cv_func_syslog" = xyes; then :
13890   ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default"
13891 if test "x$ac_cv_header_syslog_h" = xyes; then :
13892
13893 $as_echo "#define HAVE_SYSLOG 1" >>confdefs.h
13894
13895 fi
13896
13897
13898 fi
13899
13900
13901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opterr" >&5
13902 $as_echo_n "checking for opterr... " >&6; }
13903 if ${pgac_cv_var_int_opterr+:} false; then :
13904   $as_echo_n "(cached) " >&6
13905 else
13906   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13907 /* end confdefs.h.  */
13908 #include <unistd.h>
13909 int
13910 main ()
13911 {
13912 extern int opterr; opterr = 1;
13913   ;
13914   return 0;
13915 }
13916 _ACEOF
13917 if ac_fn_c_try_link "$LINENO"; then :
13918   pgac_cv_var_int_opterr=yes
13919 else
13920   pgac_cv_var_int_opterr=no
13921 fi
13922 rm -f core conftest.err conftest.$ac_objext \
13923     conftest$ac_exeext conftest.$ac_ext
13924 fi
13925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_opterr" >&5
13926 $as_echo "$pgac_cv_var_int_opterr" >&6; }
13927 if test x"$pgac_cv_var_int_opterr" = x"yes"; then
13928
13929 $as_echo "#define HAVE_INT_OPTERR 1" >>confdefs.h
13930
13931 fi
13932
13933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for optreset" >&5
13934 $as_echo_n "checking for optreset... " >&6; }
13935 if ${pgac_cv_var_int_optreset+:} false; then :
13936   $as_echo_n "(cached) " >&6
13937 else
13938   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13939 /* end confdefs.h.  */
13940 #include <unistd.h>
13941 int
13942 main ()
13943 {
13944 extern int optreset; optreset = 1;
13945   ;
13946   return 0;
13947 }
13948 _ACEOF
13949 if ac_fn_c_try_link "$LINENO"; then :
13950   pgac_cv_var_int_optreset=yes
13951 else
13952   pgac_cv_var_int_optreset=no
13953 fi
13954 rm -f core conftest.err conftest.$ac_objext \
13955     conftest$ac_exeext conftest.$ac_ext
13956 fi
13957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_optreset" >&5
13958 $as_echo "$pgac_cv_var_int_optreset" >&6; }
13959 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
13960
13961 $as_echo "#define HAVE_INT_OPTRESET 1" >>confdefs.h
13962
13963 fi
13964
13965 for ac_func in strtoll strtoq
13966 do :
13967   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13968 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13969 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13970   cat >>confdefs.h <<_ACEOF
13971 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13972 _ACEOF
13973  break
13974 fi
13975 done
13976
13977 for ac_func in strtoull strtouq
13978 do :
13979   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13980 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13981 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13982   cat >>confdefs.h <<_ACEOF
13983 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13984 _ACEOF
13985  break
13986 fi
13987 done
13988
13989
13990 if test "$with_icu" = yes; then
13991   ac_save_CPPFLAGS=$CPPFLAGS
13992   CPPFLAGS="$ICU_CFLAGS $CPPFLAGS"
13993
13994   # Verify we have ICU's header files
13995   ac_fn_c_check_header_mongrel "$LINENO" "unicode/ucol.h" "ac_cv_header_unicode_ucol_h" "$ac_includes_default"
13996 if test "x$ac_cv_header_unicode_ucol_h" = xyes; then :
13997
13998 else
13999   as_fn_error $? "header file <unicode/ucol.h> is required for ICU" "$LINENO" 5
14000 fi
14001
14002
14003
14004   CPPFLAGS=$ac_save_CPPFLAGS
14005 fi
14006
14007 # Lastly, restore full LIBS list and check for readline/libedit symbols
14008 LIBS="$LIBS_including_readline"
14009
14010 if test "$with_readline" = yes; then
14011   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_append_character" >&5
14012 $as_echo_n "checking for rl_completion_append_character... " >&6; }
14013 if ${pgac_cv_var_rl_completion_append_character+:} false; then :
14014   $as_echo_n "(cached) " >&6
14015 else
14016   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14017 /* end confdefs.h.  */
14018 #include <stdio.h>
14019 #ifdef HAVE_READLINE_READLINE_H
14020 # include <readline/readline.h>
14021 #elif defined(HAVE_READLINE_H)
14022 # include <readline.h>
14023 #endif
14024
14025 int
14026 main ()
14027 {
14028 rl_completion_append_character = 'x';
14029   ;
14030   return 0;
14031 }
14032 _ACEOF
14033 if ac_fn_c_try_link "$LINENO"; then :
14034   pgac_cv_var_rl_completion_append_character=yes
14035 else
14036   pgac_cv_var_rl_completion_append_character=no
14037 fi
14038 rm -f core conftest.err conftest.$ac_objext \
14039     conftest$ac_exeext conftest.$ac_ext
14040 fi
14041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_completion_append_character" >&5
14042 $as_echo "$pgac_cv_var_rl_completion_append_character" >&6; }
14043 if test x"$pgac_cv_var_rl_completion_append_character" = x"yes"; then
14044
14045 $as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
14046
14047 fi
14048   for ac_func in rl_completion_matches rl_filename_completion_function rl_reset_screen_size
14049 do :
14050   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14051 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14052 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
14053   cat >>confdefs.h <<_ACEOF
14054 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14055 _ACEOF
14056
14057 fi
14058 done
14059
14060   for ac_func in append_history history_truncate_file
14061 do :
14062   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14063 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14064 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
14065   cat >>confdefs.h <<_ACEOF
14066 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14067 _ACEOF
14068
14069 fi
14070 done
14071
14072 fi
14073
14074
14075 # This test makes sure that run tests work at all.  Sometimes a shared
14076 # library is found by the linker, but the runtime linker can't find it.
14077 # This check should come after all modifications of compiler or linker
14078 # variables, and before any other run tests.
14079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking test program" >&5
14080 $as_echo_n "checking test program... " >&6; }
14081 if test "$cross_compiling" = yes; then :
14082   { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling" >&5
14083 $as_echo "cross-compiling" >&6; }
14084 else
14085   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14086 /* end confdefs.h.  */
14087 int main() { return 0; }
14088 _ACEOF
14089 if ac_fn_c_try_run "$LINENO"; then :
14090   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
14091 $as_echo "ok" >&6; }
14092 else
14093   { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
14094 $as_echo "failed" >&6; }
14095 as_fn_error $? "
14096 Could not execute a simple test program.  This may be a problem
14097 related to locating shared libraries.  Check the file 'config.log'
14098 for the exact reason." "$LINENO" 5
14099 fi
14100 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14101   conftest.$ac_objext conftest.beam conftest.$ac_ext
14102 fi
14103
14104
14105 # --------------------
14106 # Run tests below here
14107 # --------------------
14108
14109 # Force use of our snprintf if system's doesn't do arg control
14110 # See comment above at snprintf test for details.
14111 if test "$enable_nls" = yes -a "$pgac_need_repl_snprintf" = no; then
14112   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf supports argument control" >&5
14113 $as_echo_n "checking whether snprintf supports argument control... " >&6; }
14114 if ${pgac_cv_snprintf_arg_control+:} false; then :
14115   $as_echo_n "(cached) " >&6
14116 else
14117   if test "$cross_compiling" = yes; then :
14118   pgac_cv_snprintf_arg_control=cross
14119 else
14120   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14121 /* end confdefs.h.  */
14122 #include <stdio.h>
14123 #include <string.h>
14124
14125 int main()
14126 {
14127   char buf[100];
14128
14129   /* can it swap arguments? */
14130   snprintf(buf, 100, "%2\$d %1\$d", 3, 4);
14131   if (strcmp(buf, "4 3") != 0)
14132     return 1;
14133   return 0;
14134 }
14135 _ACEOF
14136 if ac_fn_c_try_run "$LINENO"; then :
14137   pgac_cv_snprintf_arg_control=yes
14138 else
14139   pgac_cv_snprintf_arg_control=no
14140 fi
14141 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14142   conftest.$ac_objext conftest.beam conftest.$ac_ext
14143 fi
14144
14145
14146 fi
14147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_arg_control" >&5
14148 $as_echo "$pgac_cv_snprintf_arg_control" >&6; }
14149
14150   if test $pgac_cv_snprintf_arg_control != yes ; then
14151     pgac_need_repl_snprintf=yes
14152   fi
14153 fi
14154
14155
14156
14157
14158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long int is 64 bits" >&5
14159 $as_echo_n "checking whether long int is 64 bits... " >&6; }
14160 if ${pgac_cv_type_long_int_64+:} false; then :
14161   $as_echo_n "(cached) " >&6
14162 else
14163   if test "$cross_compiling" = yes; then :
14164   # If cross-compiling, check the size reported by the compiler and
14165 # trust that the arithmetic works.
14166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14167 /* end confdefs.h.  */
14168
14169 int
14170 main ()
14171 {
14172 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
14173 test_array [0] = 0;
14174 return test_array [0];
14175
14176   ;
14177   return 0;
14178 }
14179 _ACEOF
14180 if ac_fn_c_try_compile "$LINENO"; then :
14181   pgac_cv_type_long_int_64=yes
14182 else
14183   pgac_cv_type_long_int_64=no
14184 fi
14185 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14186 else
14187   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14188 /* end confdefs.h.  */
14189 typedef long int ac_int64;
14190
14191 /*
14192  * These are globals to discourage the compiler from folding all the
14193  * arithmetic tests down to compile-time constants.
14194  */
14195 ac_int64 a = 20000001;
14196 ac_int64 b = 40000005;
14197
14198 int does_int64_work()
14199 {
14200   ac_int64 c,d;
14201
14202   if (sizeof(ac_int64) != 8)
14203     return 0;                   /* definitely not the right size */
14204
14205   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
14206   c = a * b;
14207   d = (c + b) / b;
14208   if (d != a+1)
14209     return 0;
14210   return 1;
14211 }
14212
14213 int
14214 main() {
14215   return (! does_int64_work());
14216 }
14217 _ACEOF
14218 if ac_fn_c_try_run "$LINENO"; then :
14219   pgac_cv_type_long_int_64=yes
14220 else
14221   pgac_cv_type_long_int_64=no
14222 fi
14223 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14224   conftest.$ac_objext conftest.beam conftest.$ac_ext
14225 fi
14226
14227 fi
14228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_int_64" >&5
14229 $as_echo "$pgac_cv_type_long_int_64" >&6; }
14230
14231 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
14232 if test x"$pgac_cv_type_long_int_64" = xyes ; then
14233
14234 $as_echo "#define HAVE_LONG_INT_64 1" >>confdefs.h
14235
14236 fi
14237
14238
14239 if test x"$HAVE_LONG_INT_64" = x"yes" ; then
14240   pg_int64_type="long int"
14241 else
14242   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long long int is 64 bits" >&5
14243 $as_echo_n "checking whether long long int is 64 bits... " >&6; }
14244 if ${pgac_cv_type_long_long_int_64+:} false; then :
14245   $as_echo_n "(cached) " >&6
14246 else
14247   if test "$cross_compiling" = yes; then :
14248   # If cross-compiling, check the size reported by the compiler and
14249 # trust that the arithmetic works.
14250 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14251 /* end confdefs.h.  */
14252
14253 int
14254 main ()
14255 {
14256 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
14257 test_array [0] = 0;
14258 return test_array [0];
14259
14260   ;
14261   return 0;
14262 }
14263 _ACEOF
14264 if ac_fn_c_try_compile "$LINENO"; then :
14265   pgac_cv_type_long_long_int_64=yes
14266 else
14267   pgac_cv_type_long_long_int_64=no
14268 fi
14269 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14270 else
14271   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14272 /* end confdefs.h.  */
14273 typedef long long int ac_int64;
14274
14275 /*
14276  * These are globals to discourage the compiler from folding all the
14277  * arithmetic tests down to compile-time constants.
14278  */
14279 ac_int64 a = 20000001;
14280 ac_int64 b = 40000005;
14281
14282 int does_int64_work()
14283 {
14284   ac_int64 c,d;
14285
14286   if (sizeof(ac_int64) != 8)
14287     return 0;                   /* definitely not the right size */
14288
14289   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
14290   c = a * b;
14291   d = (c + b) / b;
14292   if (d != a+1)
14293     return 0;
14294   return 1;
14295 }
14296
14297 int
14298 main() {
14299   return (! does_int64_work());
14300 }
14301 _ACEOF
14302 if ac_fn_c_try_run "$LINENO"; then :
14303   pgac_cv_type_long_long_int_64=yes
14304 else
14305   pgac_cv_type_long_long_int_64=no
14306 fi
14307 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14308   conftest.$ac_objext conftest.beam conftest.$ac_ext
14309 fi
14310
14311 fi
14312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_long_int_64" >&5
14313 $as_echo "$pgac_cv_type_long_long_int_64" >&6; }
14314
14315 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
14316 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
14317
14318 $as_echo "#define HAVE_LONG_LONG_INT_64 1" >>confdefs.h
14319
14320 fi
14321
14322   if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
14323     pg_int64_type="long long int"
14324   else
14325     as_fn_error $? "Cannot find a working 64-bit integer type." "$LINENO" 5
14326   fi
14327 fi
14328
14329
14330 cat >>confdefs.h <<_ACEOF
14331 #define PG_INT64_TYPE $pg_int64_type
14332 _ACEOF
14333
14334
14335 # If we found "long int" is 64 bits, assume snprintf handles it.  If
14336 # we found we need to use "long long int", better check.  We cope with
14337 # snprintfs that use %lld, %qd, or %I64d as the format.  If none of these
14338 # work, fall back to our own snprintf emulation (which we know uses %lld).
14339
14340 if test "$HAVE_LONG_LONG_INT_64" = yes ; then
14341   if test $pgac_need_repl_snprintf = no; then
14342     { $as_echo "$as_me:${as_lineno-$LINENO}: checking snprintf length modifier for long long int" >&5
14343 $as_echo_n "checking snprintf length modifier for long long int... " >&6; }
14344 if ${pgac_cv_snprintf_long_long_int_modifier+:} false; then :
14345   $as_echo_n "(cached) " >&6
14346 else
14347   for pgac_modifier in 'll' 'q' 'I64'; do
14348 if test "$cross_compiling" = yes; then :
14349   pgac_cv_snprintf_long_long_int_modifier=cross; break
14350 else
14351   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14352 /* end confdefs.h.  */
14353 #include <stdio.h>
14354 #include <string.h>
14355 typedef long long int ac_int64;
14356 #define INT64_FORMAT "%${pgac_modifier}d"
14357
14358 ac_int64 a = 20000001;
14359 ac_int64 b = 40000005;
14360
14361 int does_int64_snprintf_work()
14362 {
14363   ac_int64 c;
14364   char buf[100];
14365
14366   if (sizeof(ac_int64) != 8)
14367     return 0;                   /* doesn't look like the right size */
14368
14369   c = a * b;
14370   snprintf(buf, 100, INT64_FORMAT, c);
14371   if (strcmp(buf, "800000140000005") != 0)
14372     return 0;                   /* either multiply or snprintf is busted */
14373   return 1;
14374 }
14375
14376 int
14377 main() {
14378   return (! does_int64_snprintf_work());
14379 }
14380 _ACEOF
14381 if ac_fn_c_try_run "$LINENO"; then :
14382   pgac_cv_snprintf_long_long_int_modifier=$pgac_modifier; break
14383 fi
14384 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14385   conftest.$ac_objext conftest.beam conftest.$ac_ext
14386 fi
14387
14388 done
14389 fi
14390
14391 LONG_LONG_INT_MODIFIER=''
14392
14393 case $pgac_cv_snprintf_long_long_int_modifier in
14394   cross) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot test (not on host machine)" >&5
14395 $as_echo "cannot test (not on host machine)" >&6; };;
14396   ?*)    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_long_long_int_modifier" >&5
14397 $as_echo "$pgac_cv_snprintf_long_long_int_modifier" >&6; }
14398          LONG_LONG_INT_MODIFIER=$pgac_cv_snprintf_long_long_int_modifier;;
14399   *)     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14400 $as_echo "none" >&6; };;
14401 esac
14402     if test "$LONG_LONG_INT_MODIFIER" = ""; then
14403       # Force usage of our own snprintf, since system snprintf is broken
14404       pgac_need_repl_snprintf=yes
14405       LONG_LONG_INT_MODIFIER='ll'
14406     fi
14407   else
14408     # Here if we previously decided we needed to use our own snprintf
14409     LONG_LONG_INT_MODIFIER='ll'
14410   fi
14411 else
14412   # Here if we are not using 'long long int' at all
14413   LONG_LONG_INT_MODIFIER='l'
14414 fi
14415
14416 INT64_MODIFIER="\"$LONG_LONG_INT_MODIFIER\""
14417
14418
14419 cat >>confdefs.h <<_ACEOF
14420 #define INT64_MODIFIER $INT64_MODIFIER
14421 _ACEOF
14422
14423
14424 # Also force use of our snprintf if the system's doesn't support the %z flag.
14425 if test "$pgac_need_repl_snprintf" = no; then
14426   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf supports the %z modifier" >&5
14427 $as_echo_n "checking whether snprintf supports the %z modifier... " >&6; }
14428 if ${pgac_cv_snprintf_size_t_support+:} false; then :
14429   $as_echo_n "(cached) " >&6
14430 else
14431   if test "$cross_compiling" = yes; then :
14432   pgac_cv_snprintf_size_t_support=cross
14433 else
14434   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14435 /* end confdefs.h.  */
14436 #include <stdio.h>
14437 #include <string.h>
14438
14439 int main()
14440 {
14441   char bufz[100];
14442   char buf64[100];
14443
14444   /*
14445    * Print the largest unsigned number fitting in a size_t using both %zu
14446    * and the previously-determined format for 64-bit integers.  Note that
14447    * we don't run this code unless we know snprintf handles 64-bit ints.
14448    */
14449   bufz[0] = '\0';  /* in case snprintf fails to emit anything */
14450   snprintf(bufz, sizeof(bufz), "%zu", ~((size_t) 0));
14451   snprintf(buf64, sizeof(buf64), "%" INT64_MODIFIER "u",
14452     (unsigned PG_INT64_TYPE) ~((size_t) 0));
14453   if (strcmp(bufz, buf64) != 0)
14454     return 1;
14455   return 0;
14456 }
14457 _ACEOF
14458 if ac_fn_c_try_run "$LINENO"; then :
14459   pgac_cv_snprintf_size_t_support=yes
14460 else
14461   pgac_cv_snprintf_size_t_support=no
14462 fi
14463 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14464   conftest.$ac_objext conftest.beam conftest.$ac_ext
14465 fi
14466
14467
14468 fi
14469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_size_t_support" >&5
14470 $as_echo "$pgac_cv_snprintf_size_t_support" >&6; }
14471
14472   if test "$pgac_cv_snprintf_size_t_support" != yes; then
14473     pgac_need_repl_snprintf=yes
14474   fi
14475 fi
14476
14477 # Now we have checked all the reasons to replace snprintf
14478 if test $pgac_need_repl_snprintf = yes; then
14479
14480 $as_echo "#define USE_REPL_SNPRINTF 1" >>confdefs.h
14481
14482   case " $LIBOBJS " in
14483   *" snprintf.$ac_objext "* ) ;;
14484   *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
14485  ;;
14486 esac
14487
14488 fi
14489
14490 # has to be down here, rather than with the other builtins, because
14491 # the test uses PG_INT64_TYPE.
14492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_mul_overflow" >&5
14493 $as_echo_n "checking for __builtin_mul_overflow... " >&6; }
14494 if ${pgac_cv__builtin_op_overflow+:} false; then :
14495   $as_echo_n "(cached) " >&6
14496 else
14497   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14498 /* end confdefs.h.  */
14499
14500 PG_INT64_TYPE a = 1;
14501 PG_INT64_TYPE b = 1;
14502 PG_INT64_TYPE result;
14503 int oflo;
14504
14505 int
14506 main ()
14507 {
14508 oflo = __builtin_mul_overflow(a, b, &result);
14509   ;
14510   return 0;
14511 }
14512 _ACEOF
14513 if ac_fn_c_try_link "$LINENO"; then :
14514   pgac_cv__builtin_op_overflow=yes
14515 else
14516   pgac_cv__builtin_op_overflow=no
14517 fi
14518 rm -f core conftest.err conftest.$ac_objext \
14519     conftest$ac_exeext conftest.$ac_ext
14520 fi
14521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_op_overflow" >&5
14522 $as_echo "$pgac_cv__builtin_op_overflow" >&6; }
14523 if test x"$pgac_cv__builtin_op_overflow" = xyes ; then
14524
14525 $as_echo "#define HAVE__BUILTIN_OP_OVERFLOW 1" >>confdefs.h
14526
14527 fi
14528
14529 # Check size of void *, size_t (enables tweaks for > 32bit address space)
14530 # The cast to long int works around a bug in the HP C Compiler
14531 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14532 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14533 # This bug is HP SR number 8606223364.
14534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
14535 $as_echo_n "checking size of void *... " >&6; }
14536 if ${ac_cv_sizeof_void_p+:} false; then :
14537   $as_echo_n "(cached) " >&6
14538 else
14539   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p"        "$ac_includes_default"; then :
14540
14541 else
14542   if test "$ac_cv_type_void_p" = yes; then
14543      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14544 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14545 as_fn_error 77 "cannot compute sizeof (void *)
14546 See \`config.log' for more details" "$LINENO" 5; }
14547    else
14548      ac_cv_sizeof_void_p=0
14549    fi
14550 fi
14551
14552 fi
14553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
14554 $as_echo "$ac_cv_sizeof_void_p" >&6; }
14555
14556
14557
14558 cat >>confdefs.h <<_ACEOF
14559 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
14560 _ACEOF
14561
14562
14563 # The cast to long int works around a bug in the HP C Compiler
14564 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14565 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14566 # This bug is HP SR number 8606223364.
14567 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
14568 $as_echo_n "checking size of size_t... " >&6; }
14569 if ${ac_cv_sizeof_size_t+:} false; then :
14570   $as_echo_n "(cached) " >&6
14571 else
14572   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t"        "$ac_includes_default"; then :
14573
14574 else
14575   if test "$ac_cv_type_size_t" = yes; then
14576      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14577 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14578 as_fn_error 77 "cannot compute sizeof (size_t)
14579 See \`config.log' for more details" "$LINENO" 5; }
14580    else
14581      ac_cv_sizeof_size_t=0
14582    fi
14583 fi
14584
14585 fi
14586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
14587 $as_echo "$ac_cv_sizeof_size_t" >&6; }
14588
14589
14590
14591 cat >>confdefs.h <<_ACEOF
14592 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
14593 _ACEOF
14594
14595
14596 # The cast to long int works around a bug in the HP C Compiler
14597 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14598 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14599 # This bug is HP SR number 8606223364.
14600 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
14601 $as_echo_n "checking size of long... " >&6; }
14602 if ${ac_cv_sizeof_long+:} false; then :
14603   $as_echo_n "(cached) " >&6
14604 else
14605   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
14606
14607 else
14608   if test "$ac_cv_type_long" = yes; then
14609      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14610 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14611 as_fn_error 77 "cannot compute sizeof (long)
14612 See \`config.log' for more details" "$LINENO" 5; }
14613    else
14614      ac_cv_sizeof_long=0
14615    fi
14616 fi
14617
14618 fi
14619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
14620 $as_echo "$ac_cv_sizeof_long" >&6; }
14621
14622
14623
14624 cat >>confdefs.h <<_ACEOF
14625 #define SIZEOF_LONG $ac_cv_sizeof_long
14626 _ACEOF
14627
14628
14629
14630 # Decide whether float4 is passed by value: user-selectable, enabled by default
14631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float4 passed by value" >&5
14632 $as_echo_n "checking whether to build with float4 passed by value... " >&6; }
14633
14634
14635 # Check whether --enable-float4-byval was given.
14636 if test "${enable_float4_byval+set}" = set; then :
14637   enableval=$enable_float4_byval;
14638   case $enableval in
14639     yes)
14640
14641 $as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
14642
14643                float4passbyval=true
14644       ;;
14645     no)
14646       float4passbyval=false
14647       ;;
14648     *)
14649       as_fn_error $? "no argument expected for --enable-float4-byval option" "$LINENO" 5
14650       ;;
14651   esac
14652
14653 else
14654   enable_float4_byval=yes
14655
14656 $as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
14657
14658                float4passbyval=true
14659 fi
14660
14661
14662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float4_byval" >&5
14663 $as_echo "$enable_float4_byval" >&6; }
14664
14665 cat >>confdefs.h <<_ACEOF
14666 #define FLOAT4PASSBYVAL $float4passbyval
14667 _ACEOF
14668
14669
14670 # Decide whether float8 is passed by value.
14671 # Note: this setting also controls int8 and related types such as timestamp.
14672 # If sizeof(Datum) >= 8, this is user-selectable, enabled by default.
14673 # If not, trying to select it is an error.
14674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float8 passed by value" >&5
14675 $as_echo_n "checking whether to build with float8 passed by value... " >&6; }
14676 if test $ac_cv_sizeof_void_p -ge 8 ; then
14677
14678
14679 # Check whether --enable-float8-byval was given.
14680 if test "${enable_float8_byval+set}" = set; then :
14681   enableval=$enable_float8_byval;
14682   case $enableval in
14683     yes)
14684       :
14685       ;;
14686     no)
14687       :
14688       ;;
14689     *)
14690       as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
14691       ;;
14692   esac
14693
14694 else
14695   enable_float8_byval=yes
14696
14697 fi
14698
14699
14700 else
14701
14702
14703 # Check whether --enable-float8-byval was given.
14704 if test "${enable_float8_byval+set}" = set; then :
14705   enableval=$enable_float8_byval;
14706   case $enableval in
14707     yes)
14708       :
14709       ;;
14710     no)
14711       :
14712       ;;
14713     *)
14714       as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
14715       ;;
14716   esac
14717
14718 else
14719   enable_float8_byval=no
14720
14721 fi
14722
14723
14724   if test "$enable_float8_byval" = yes ; then
14725     as_fn_error $? "--enable-float8-byval is not supported on 32-bit platforms." "$LINENO" 5
14726   fi
14727 fi
14728 if test "$enable_float8_byval" = yes ; then
14729
14730 $as_echo "#define USE_FLOAT8_BYVAL 1" >>confdefs.h
14731
14732   float8passbyval=true
14733 else
14734   float8passbyval=false
14735 fi
14736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float8_byval" >&5
14737 $as_echo "$enable_float8_byval" >&6; }
14738
14739 cat >>confdefs.h <<_ACEOF
14740 #define FLOAT8PASSBYVAL $float8passbyval
14741 _ACEOF
14742
14743
14744 # Determine memory alignment requirements for the basic C data types.
14745
14746 # The cast to long int works around a bug in the HP C Compiler,
14747 # see AC_CHECK_SIZEOF for more information.
14748 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of short" >&5
14749 $as_echo_n "checking alignment of short... " >&6; }
14750 if ${ac_cv_alignof_short+:} false; then :
14751   $as_echo_n "(cached) " >&6
14752 else
14753   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_short"        "$ac_includes_default
14754 #ifndef offsetof
14755 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
14756 #endif
14757 typedef struct { char x; short y; } ac__type_alignof_;"; then :
14758
14759 else
14760   if test "$ac_cv_type_short" = yes; then
14761      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14762 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14763 as_fn_error 77 "cannot compute alignment of short
14764 See \`config.log' for more details" "$LINENO" 5; }
14765    else
14766      ac_cv_alignof_short=0
14767    fi
14768 fi
14769
14770 fi
14771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_short" >&5
14772 $as_echo "$ac_cv_alignof_short" >&6; }
14773
14774
14775
14776 cat >>confdefs.h <<_ACEOF
14777 #define ALIGNOF_SHORT $ac_cv_alignof_short
14778 _ACEOF
14779
14780
14781 # The cast to long int works around a bug in the HP C Compiler,
14782 # see AC_CHECK_SIZEOF for more information.
14783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of int" >&5
14784 $as_echo_n "checking alignment of int... " >&6; }
14785 if ${ac_cv_alignof_int+:} false; then :
14786   $as_echo_n "(cached) " >&6
14787 else
14788   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_int"        "$ac_includes_default
14789 #ifndef offsetof
14790 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
14791 #endif
14792 typedef struct { char x; int y; } ac__type_alignof_;"; then :
14793
14794 else
14795   if test "$ac_cv_type_int" = yes; then
14796      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14797 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14798 as_fn_error 77 "cannot compute alignment of int
14799 See \`config.log' for more details" "$LINENO" 5; }
14800    else
14801      ac_cv_alignof_int=0
14802    fi
14803 fi
14804
14805 fi
14806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_int" >&5
14807 $as_echo "$ac_cv_alignof_int" >&6; }
14808
14809
14810
14811 cat >>confdefs.h <<_ACEOF
14812 #define ALIGNOF_INT $ac_cv_alignof_int
14813 _ACEOF
14814
14815
14816 # The cast to long int works around a bug in the HP C Compiler,
14817 # see AC_CHECK_SIZEOF for more information.
14818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long" >&5
14819 $as_echo_n "checking alignment of long... " >&6; }
14820 if ${ac_cv_alignof_long+:} false; then :
14821   $as_echo_n "(cached) " >&6
14822 else
14823   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long"        "$ac_includes_default
14824 #ifndef offsetof
14825 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
14826 #endif
14827 typedef struct { char x; long y; } ac__type_alignof_;"; then :
14828
14829 else
14830   if test "$ac_cv_type_long" = yes; then
14831      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14832 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14833 as_fn_error 77 "cannot compute alignment of long
14834 See \`config.log' for more details" "$LINENO" 5; }
14835    else
14836      ac_cv_alignof_long=0
14837    fi
14838 fi
14839
14840 fi
14841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long" >&5
14842 $as_echo "$ac_cv_alignof_long" >&6; }
14843
14844
14845
14846 cat >>confdefs.h <<_ACEOF
14847 #define ALIGNOF_LONG $ac_cv_alignof_long
14848 _ACEOF
14849
14850
14851 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
14852   # The cast to long int works around a bug in the HP C Compiler,
14853 # see AC_CHECK_SIZEOF for more information.
14854 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long long int" >&5
14855 $as_echo_n "checking alignment of long long int... " >&6; }
14856 if ${ac_cv_alignof_long_long_int+:} false; then :
14857   $as_echo_n "(cached) " >&6
14858 else
14859   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long_long_int"        "$ac_includes_default
14860 #ifndef offsetof
14861 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
14862 #endif
14863 typedef struct { char x; long long int y; } ac__type_alignof_;"; then :
14864
14865 else
14866   if test "$ac_cv_type_long_long_int" = yes; then
14867      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14868 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14869 as_fn_error 77 "cannot compute alignment of long long int
14870 See \`config.log' for more details" "$LINENO" 5; }
14871    else
14872      ac_cv_alignof_long_long_int=0
14873    fi
14874 fi
14875
14876 fi
14877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long_long_int" >&5
14878 $as_echo "$ac_cv_alignof_long_long_int" >&6; }
14879
14880
14881
14882 cat >>confdefs.h <<_ACEOF
14883 #define ALIGNOF_LONG_LONG_INT $ac_cv_alignof_long_long_int
14884 _ACEOF
14885
14886
14887 fi
14888 # The cast to long int works around a bug in the HP C Compiler,
14889 # see AC_CHECK_SIZEOF for more information.
14890 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of double" >&5
14891 $as_echo_n "checking alignment of double... " >&6; }
14892 if ${ac_cv_alignof_double+:} false; then :
14893   $as_echo_n "(cached) " >&6
14894 else
14895   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_double"        "$ac_includes_default
14896 #ifndef offsetof
14897 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
14898 #endif
14899 typedef struct { char x; double y; } ac__type_alignof_;"; then :
14900
14901 else
14902   if test "$ac_cv_type_double" = yes; then
14903      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14904 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14905 as_fn_error 77 "cannot compute alignment of double
14906 See \`config.log' for more details" "$LINENO" 5; }
14907    else
14908      ac_cv_alignof_double=0
14909    fi
14910 fi
14911
14912 fi
14913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_double" >&5
14914 $as_echo "$ac_cv_alignof_double" >&6; }
14915
14916
14917
14918 cat >>confdefs.h <<_ACEOF
14919 #define ALIGNOF_DOUBLE $ac_cv_alignof_double
14920 _ACEOF
14921
14922
14923
14924 # Compute maximum alignment of any basic type.
14925 # We assume long's alignment is at least as strong as char, short, or int;
14926 # but we must check long long (if it is being used for int64) and double.
14927 # Note that we intentionally do not consider any types wider than 64 bits,
14928 # as allowing MAXIMUM_ALIGNOF to exceed 8 would be too much of a penalty
14929 # for disk and memory space.
14930
14931 MAX_ALIGNOF=$ac_cv_alignof_long
14932 if test $MAX_ALIGNOF -lt $ac_cv_alignof_double ; then
14933   MAX_ALIGNOF=$ac_cv_alignof_double
14934 fi
14935 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $ac_cv_alignof_long_long_int ; then
14936   MAX_ALIGNOF="$ac_cv_alignof_long_long_int"
14937 fi
14938
14939 cat >>confdefs.h <<_ACEOF
14940 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
14941 _ACEOF
14942
14943
14944
14945 # Some platforms predefine the types int8, int16, etc.  Only check
14946 # a (hopefully) representative subset.
14947 ac_fn_c_check_type "$LINENO" "int8" "ac_cv_type_int8" "#include <stdio.h>
14948 "
14949 if test "x$ac_cv_type_int8" = xyes; then :
14950
14951 cat >>confdefs.h <<_ACEOF
14952 #define HAVE_INT8 1
14953 _ACEOF
14954
14955
14956 fi
14957 ac_fn_c_check_type "$LINENO" "uint8" "ac_cv_type_uint8" "#include <stdio.h>
14958 "
14959 if test "x$ac_cv_type_uint8" = xyes; then :
14960
14961 cat >>confdefs.h <<_ACEOF
14962 #define HAVE_UINT8 1
14963 _ACEOF
14964
14965
14966 fi
14967 ac_fn_c_check_type "$LINENO" "int64" "ac_cv_type_int64" "#include <stdio.h>
14968 "
14969 if test "x$ac_cv_type_int64" = xyes; then :
14970
14971 cat >>confdefs.h <<_ACEOF
14972 #define HAVE_INT64 1
14973 _ACEOF
14974
14975
14976 fi
14977 ac_fn_c_check_type "$LINENO" "uint64" "ac_cv_type_uint64" "#include <stdio.h>
14978 "
14979 if test "x$ac_cv_type_uint64" = xyes; then :
14980
14981 cat >>confdefs.h <<_ACEOF
14982 #define HAVE_UINT64 1
14983 _ACEOF
14984
14985
14986 fi
14987
14988
14989 # Some compilers offer a 128-bit integer scalar type.
14990 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128" >&5
14991 $as_echo_n "checking for __int128... " >&6; }
14992 if ${pgac_cv__128bit_int+:} false; then :
14993   $as_echo_n "(cached) " >&6
14994 else
14995   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14996 /* end confdefs.h.  */
14997
14998 /*
14999  * These are globals to discourage the compiler from folding all the
15000  * arithmetic tests down to compile-time constants.  We do not have
15001  * convenient support for 64bit literals at this point...
15002  */
15003 __int128 a = 48828125;
15004 __int128 b = 97656255;
15005
15006 int
15007 main ()
15008 {
15009
15010 __int128 c,d;
15011 a = (a << 12) + 1; /* 200000000001 */
15012 b = (b << 12) + 5; /* 400000000005 */
15013 /* use the most relevant arithmetic ops */
15014 c = a * b;
15015 d = (c + b) / b;
15016 /* return different values, to prevent optimizations */
15017 if (d != a+1)
15018   return 0;
15019 return 1;
15020
15021   ;
15022   return 0;
15023 }
15024 _ACEOF
15025 if ac_fn_c_try_link "$LINENO"; then :
15026   pgac_cv__128bit_int=yes
15027 else
15028   pgac_cv__128bit_int=no
15029 fi
15030 rm -f core conftest.err conftest.$ac_objext \
15031     conftest$ac_exeext conftest.$ac_ext
15032 fi
15033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int" >&5
15034 $as_echo "$pgac_cv__128bit_int" >&6; }
15035 if test x"$pgac_cv__128bit_int" = xyes ; then
15036
15037 $as_echo "#define PG_INT128_TYPE __int128" >>confdefs.h
15038
15039   # The cast to long int works around a bug in the HP C Compiler,
15040 # see AC_CHECK_SIZEOF for more information.
15041 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of PG_INT128_TYPE" >&5
15042 $as_echo_n "checking alignment of PG_INT128_TYPE... " >&6; }
15043 if ${ac_cv_alignof_PG_INT128_TYPE+:} false; then :
15044   $as_echo_n "(cached) " >&6
15045 else
15046   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_PG_INT128_TYPE"        "$ac_includes_default
15047 #ifndef offsetof
15048 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
15049 #endif
15050 typedef struct { char x; PG_INT128_TYPE y; } ac__type_alignof_;"; then :
15051
15052 else
15053   if test "$ac_cv_type_PG_INT128_TYPE" = yes; then
15054      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15055 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15056 as_fn_error 77 "cannot compute alignment of PG_INT128_TYPE
15057 See \`config.log' for more details" "$LINENO" 5; }
15058    else
15059      ac_cv_alignof_PG_INT128_TYPE=0
15060    fi
15061 fi
15062
15063 fi
15064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_PG_INT128_TYPE" >&5
15065 $as_echo "$ac_cv_alignof_PG_INT128_TYPE" >&6; }
15066
15067
15068
15069 cat >>confdefs.h <<_ACEOF
15070 #define ALIGNOF_PG_INT128_TYPE $ac_cv_alignof_PG_INT128_TYPE
15071 _ACEOF
15072
15073
15074 fi
15075
15076 # Check for various atomic operations now that we have checked how to declare
15077 # 64bit integers.
15078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync char locking functions" >&5
15079 $as_echo_n "checking for builtin __sync char locking functions... " >&6; }
15080 if ${pgac_cv_gcc_sync_char_tas+:} false; then :
15081   $as_echo_n "(cached) " >&6
15082 else
15083   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15084 /* end confdefs.h.  */
15085
15086 int
15087 main ()
15088 {
15089 char lock = 0;
15090    __sync_lock_test_and_set(&lock, 1);
15091    __sync_lock_release(&lock);
15092   ;
15093   return 0;
15094 }
15095 _ACEOF
15096 if ac_fn_c_try_link "$LINENO"; then :
15097   pgac_cv_gcc_sync_char_tas="yes"
15098 else
15099   pgac_cv_gcc_sync_char_tas="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_char_tas" >&5
15105 $as_echo "$pgac_cv_gcc_sync_char_tas" >&6; }
15106 if test x"$pgac_cv_gcc_sync_char_tas" = x"yes"; then
15107
15108 $as_echo "#define HAVE_GCC__SYNC_CHAR_TAS 1" >>confdefs.h
15109
15110 fi
15111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 locking functions" >&5
15112 $as_echo_n "checking for builtin __sync int32 locking functions... " >&6; }
15113 if ${pgac_cv_gcc_sync_int32_tas+:} 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 lock = 0;
15123    __sync_lock_test_and_set(&lock, 1);
15124    __sync_lock_release(&lock);
15125   ;
15126   return 0;
15127 }
15128 _ACEOF
15129 if ac_fn_c_try_link "$LINENO"; then :
15130   pgac_cv_gcc_sync_int32_tas="yes"
15131 else
15132   pgac_cv_gcc_sync_int32_tas="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_sync_int32_tas" >&5
15138 $as_echo "$pgac_cv_gcc_sync_int32_tas" >&6; }
15139 if test x"$pgac_cv_gcc_sync_int32_tas" = x"yes"; then
15140
15141 $as_echo "#define HAVE_GCC__SYNC_INT32_TAS 1" >>confdefs.h
15142
15143 fi
15144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 atomic operations" >&5
15145 $as_echo_n "checking for builtin __sync int32 atomic operations... " >&6; }
15146 if ${pgac_cv_gcc_sync_int32_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 int val = 0;
15156    __sync_val_compare_and_swap(&val, 0, 37);
15157   ;
15158   return 0;
15159 }
15160 _ACEOF
15161 if ac_fn_c_try_link "$LINENO"; then :
15162   pgac_cv_gcc_sync_int32_cas="yes"
15163 else
15164   pgac_cv_gcc_sync_int32_cas="no"
15165 fi
15166 rm -f core conftest.err conftest.$ac_objext \
15167     conftest$ac_exeext conftest.$ac_ext
15168 fi
15169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_cas" >&5
15170 $as_echo "$pgac_cv_gcc_sync_int32_cas" >&6; }
15171 if test x"$pgac_cv_gcc_sync_int32_cas" = x"yes"; then
15172
15173 $as_echo "#define HAVE_GCC__SYNC_INT32_CAS 1" >>confdefs.h
15174
15175 fi
15176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int64 atomic operations" >&5
15177 $as_echo_n "checking for builtin __sync int64 atomic operations... " >&6; }
15178 if ${pgac_cv_gcc_sync_int64_cas+:} false; then :
15179   $as_echo_n "(cached) " >&6
15180 else
15181   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15182 /* end confdefs.h.  */
15183
15184 int
15185 main ()
15186 {
15187 PG_INT64_TYPE lock = 0;
15188    __sync_val_compare_and_swap(&lock, 0, (PG_INT64_TYPE) 37);
15189   ;
15190   return 0;
15191 }
15192 _ACEOF
15193 if ac_fn_c_try_link "$LINENO"; then :
15194   pgac_cv_gcc_sync_int64_cas="yes"
15195 else
15196   pgac_cv_gcc_sync_int64_cas="no"
15197 fi
15198 rm -f core conftest.err conftest.$ac_objext \
15199     conftest$ac_exeext conftest.$ac_ext
15200 fi
15201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int64_cas" >&5
15202 $as_echo "$pgac_cv_gcc_sync_int64_cas" >&6; }
15203 if test x"$pgac_cv_gcc_sync_int64_cas" = x"yes"; then
15204
15205 $as_echo "#define HAVE_GCC__SYNC_INT64_CAS 1" >>confdefs.h
15206
15207 fi
15208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int32 atomic operations" >&5
15209 $as_echo_n "checking for builtin __atomic int32 atomic operations... " >&6; }
15210 if ${pgac_cv_gcc_atomic_int32_cas+:} false; then :
15211   $as_echo_n "(cached) " >&6
15212 else
15213   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15214 /* end confdefs.h.  */
15215
15216 int
15217 main ()
15218 {
15219 int val = 0;
15220    int expect = 0;
15221    __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
15222   ;
15223   return 0;
15224 }
15225 _ACEOF
15226 if ac_fn_c_try_link "$LINENO"; then :
15227   pgac_cv_gcc_atomic_int32_cas="yes"
15228 else
15229   pgac_cv_gcc_atomic_int32_cas="no"
15230 fi
15231 rm -f core conftest.err conftest.$ac_objext \
15232     conftest$ac_exeext conftest.$ac_ext
15233 fi
15234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int32_cas" >&5
15235 $as_echo "$pgac_cv_gcc_atomic_int32_cas" >&6; }
15236 if test x"$pgac_cv_gcc_atomic_int32_cas" = x"yes"; then
15237
15238 $as_echo "#define HAVE_GCC__ATOMIC_INT32_CAS 1" >>confdefs.h
15239
15240 fi
15241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int64 atomic operations" >&5
15242 $as_echo_n "checking for builtin __atomic int64 atomic operations... " >&6; }
15243 if ${pgac_cv_gcc_atomic_int64_cas+:} false; then :
15244   $as_echo_n "(cached) " >&6
15245 else
15246   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15247 /* end confdefs.h.  */
15248
15249 int
15250 main ()
15251 {
15252 PG_INT64_TYPE val = 0;
15253    PG_INT64_TYPE expect = 0;
15254    __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
15255   ;
15256   return 0;
15257 }
15258 _ACEOF
15259 if ac_fn_c_try_link "$LINENO"; then :
15260   pgac_cv_gcc_atomic_int64_cas="yes"
15261 else
15262   pgac_cv_gcc_atomic_int64_cas="no"
15263 fi
15264 rm -f core conftest.err conftest.$ac_objext \
15265     conftest$ac_exeext conftest.$ac_ext
15266 fi
15267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int64_cas" >&5
15268 $as_echo "$pgac_cv_gcc_atomic_int64_cas" >&6; }
15269 if test x"$pgac_cv_gcc_atomic_int64_cas" = x"yes"; then
15270
15271 $as_echo "#define HAVE_GCC__ATOMIC_INT64_CAS 1" >>confdefs.h
15272
15273 fi
15274
15275
15276 # Check for x86 cpuid instruction
15277 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __get_cpuid" >&5
15278 $as_echo_n "checking for __get_cpuid... " >&6; }
15279 if ${pgac_cv__get_cpuid+:} false; then :
15280   $as_echo_n "(cached) " >&6
15281 else
15282   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15283 /* end confdefs.h.  */
15284 #include <cpuid.h>
15285 int
15286 main ()
15287 {
15288 unsigned int exx[4] = {0, 0, 0, 0};
15289   __get_cpuid(1, &exx[0], &exx[1], &exx[2], &exx[3]);
15290
15291   ;
15292   return 0;
15293 }
15294 _ACEOF
15295 if ac_fn_c_try_link "$LINENO"; then :
15296   pgac_cv__get_cpuid="yes"
15297 else
15298   pgac_cv__get_cpuid="no"
15299 fi
15300 rm -f core conftest.err conftest.$ac_objext \
15301     conftest$ac_exeext conftest.$ac_ext
15302 fi
15303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__get_cpuid" >&5
15304 $as_echo "$pgac_cv__get_cpuid" >&6; }
15305 if test x"$pgac_cv__get_cpuid" = x"yes"; then
15306
15307 $as_echo "#define HAVE__GET_CPUID 1" >>confdefs.h
15308
15309 fi
15310
15311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __cpuid" >&5
15312 $as_echo_n "checking for __cpuid... " >&6; }
15313 if ${pgac_cv__cpuid+:} false; then :
15314   $as_echo_n "(cached) " >&6
15315 else
15316   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15317 /* end confdefs.h.  */
15318 #include <intrin.h>
15319 int
15320 main ()
15321 {
15322 unsigned int exx[4] = {0, 0, 0, 0};
15323   __get_cpuid(exx[0], 1);
15324
15325   ;
15326   return 0;
15327 }
15328 _ACEOF
15329 if ac_fn_c_try_link "$LINENO"; then :
15330   pgac_cv__cpuid="yes"
15331 else
15332   pgac_cv__cpuid="no"
15333 fi
15334 rm -f core conftest.err conftest.$ac_objext \
15335     conftest$ac_exeext conftest.$ac_ext
15336 fi
15337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__cpuid" >&5
15338 $as_echo "$pgac_cv__cpuid" >&6; }
15339 if test x"$pgac_cv__cpuid" = x"yes"; then
15340
15341 $as_echo "#define HAVE__CPUID 1" >>confdefs.h
15342
15343 fi
15344
15345 # Check for Intel SSE 4.2 intrinsics to do CRC calculations.
15346 #
15347 # First check if the _mm_crc32_u8 and _mm_crc32_u64 intrinsics can be used
15348 # with the default compiler flags. If not, check if adding the -msse4.2
15349 # flag helps. CFLAGS_SSE42 is set to -msse4.2 if that's required.
15350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=" >&5
15351 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=... " >&6; }
15352 if ${pgac_cv_sse42_crc32_intrinsics_+:} false; then :
15353   $as_echo_n "(cached) " >&6
15354 else
15355   pgac_save_CFLAGS=$CFLAGS
15356 CFLAGS="$pgac_save_CFLAGS "
15357 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15358 /* end confdefs.h.  */
15359 #include <nmmintrin.h>
15360 int
15361 main ()
15362 {
15363 unsigned int crc = 0;
15364    crc = _mm_crc32_u8(crc, 0);
15365    crc = _mm_crc32_u32(crc, 0);
15366    /* return computed value, to prevent the above being optimized away */
15367    return crc == 0;
15368   ;
15369   return 0;
15370 }
15371 _ACEOF
15372 if ac_fn_c_try_link "$LINENO"; then :
15373   pgac_cv_sse42_crc32_intrinsics_=yes
15374 else
15375   pgac_cv_sse42_crc32_intrinsics_=no
15376 fi
15377 rm -f core conftest.err conftest.$ac_objext \
15378     conftest$ac_exeext conftest.$ac_ext
15379 CFLAGS="$pgac_save_CFLAGS"
15380 fi
15381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics_" >&5
15382 $as_echo "$pgac_cv_sse42_crc32_intrinsics_" >&6; }
15383 if test x"$pgac_cv_sse42_crc32_intrinsics_" = x"yes"; then
15384   CFLAGS_SSE42=""
15385   pgac_sse42_crc32_intrinsics=yes
15386 fi
15387
15388 if test x"$pgac_sse42_crc32_intrinsics" != x"yes"; then
15389   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2" >&5
15390 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2... " >&6; }
15391 if ${pgac_cv_sse42_crc32_intrinsics__msse4_2+:} false; then :
15392   $as_echo_n "(cached) " >&6
15393 else
15394   pgac_save_CFLAGS=$CFLAGS
15395 CFLAGS="$pgac_save_CFLAGS -msse4.2"
15396 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15397 /* end confdefs.h.  */
15398 #include <nmmintrin.h>
15399 int
15400 main ()
15401 {
15402 unsigned int crc = 0;
15403    crc = _mm_crc32_u8(crc, 0);
15404    crc = _mm_crc32_u32(crc, 0);
15405    /* return computed value, to prevent the above being optimized away */
15406    return crc == 0;
15407   ;
15408   return 0;
15409 }
15410 _ACEOF
15411 if ac_fn_c_try_link "$LINENO"; then :
15412   pgac_cv_sse42_crc32_intrinsics__msse4_2=yes
15413 else
15414   pgac_cv_sse42_crc32_intrinsics__msse4_2=no
15415 fi
15416 rm -f core conftest.err conftest.$ac_objext \
15417     conftest$ac_exeext conftest.$ac_ext
15418 CFLAGS="$pgac_save_CFLAGS"
15419 fi
15420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics__msse4_2" >&5
15421 $as_echo "$pgac_cv_sse42_crc32_intrinsics__msse4_2" >&6; }
15422 if test x"$pgac_cv_sse42_crc32_intrinsics__msse4_2" = x"yes"; then
15423   CFLAGS_SSE42="-msse4.2"
15424   pgac_sse42_crc32_intrinsics=yes
15425 fi
15426
15427 fi
15428
15429
15430 # Are we targeting a processor that supports SSE 4.2? gcc, clang and icc all
15431 # define __SSE4_2__ in that case.
15432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15433 /* end confdefs.h.  */
15434
15435 int
15436 main ()
15437 {
15438
15439 #ifndef __SSE4_2__
15440 #error __SSE4_2__ not defined
15441 #endif
15442
15443   ;
15444   return 0;
15445 }
15446 _ACEOF
15447 if ac_fn_c_try_compile "$LINENO"; then :
15448   SSE4_2_TARGETED=1
15449 fi
15450 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15451
15452 # Select CRC-32C implementation.
15453 #
15454 # If we are targeting a processor that has SSE 4.2 instructions, we can use the
15455 # special CRC instructions for calculating CRC-32C. If we're not targeting such
15456 # a processor, but we can nevertheless produce code that uses the SSE
15457 # intrinsics, perhaps with some extra CFLAGS, compile both implementations and
15458 # select which one to use at runtime, depending on whether SSE 4.2 is supported
15459 # by the processor we're running on.
15460 #
15461 # You can override this logic by setting the appropriate USE_*_CRC32 flag to 1
15462 # in the template or configure command line.
15463 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
15464   if test x"$pgac_sse42_crc32_intrinsics" = x"yes" && test x"$SSE4_2_TARGETED" = x"1" ; then
15465     USE_SSE42_CRC32C=1
15466   else
15467     # the CPUID instruction is needed for the runtime check.
15468     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
15469       USE_SSE42_CRC32C_WITH_RUNTIME_CHECK=1
15470     else
15471       # fall back to slicing-by-8 algorithm which doesn't require any special
15472       # CPU support.
15473       USE_SLICING_BY_8_CRC32C=1
15474     fi
15475   fi
15476 fi
15477
15478 # Set PG_CRC32C_OBJS appropriately depending on the selected implementation.
15479 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which CRC-32C implementation to use" >&5
15480 $as_echo_n "checking which CRC-32C implementation to use... " >&6; }
15481 if test x"$USE_SSE42_CRC32C" = x"1"; then
15482
15483 $as_echo "#define USE_SSE42_CRC32C 1" >>confdefs.h
15484
15485   PG_CRC32C_OBJS="pg_crc32c_sse42.o"
15486   { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2" >&5
15487 $as_echo "SSE 4.2" >&6; }
15488 else
15489   if test x"$USE_SSE42_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
15490
15491 $as_echo "#define USE_SSE42_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
15492
15493     PG_CRC32C_OBJS="pg_crc32c_sse42.o pg_crc32c_sb8.o pg_crc32c_choose.o"
15494     { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2 with runtime check" >&5
15495 $as_echo "SSE 4.2 with runtime check" >&6; }
15496   else
15497
15498 $as_echo "#define USE_SLICING_BY_8_CRC32C 1" >>confdefs.h
15499
15500     PG_CRC32C_OBJS="pg_crc32c_sb8.o"
15501     { $as_echo "$as_me:${as_lineno-$LINENO}: result: slicing-by-8" >&5
15502 $as_echo "slicing-by-8" >&6; }
15503   fi
15504 fi
15505
15506
15507
15508 # Select semaphore implementation type.
15509 if test "$PORTNAME" != "win32"; then
15510   if test x"$PREFERRED_SEMAPHORES" = x"NAMED_POSIX" ; then
15511     # Need sem_open for this
15512     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_open" >&5
15513 $as_echo_n "checking for library containing sem_open... " >&6; }
15514 if ${ac_cv_search_sem_open+:} false; then :
15515   $as_echo_n "(cached) " >&6
15516 else
15517   ac_func_search_save_LIBS=$LIBS
15518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15519 /* end confdefs.h.  */
15520
15521 /* Override any GCC internal prototype to avoid an error.
15522    Use char because int might match the return type of a GCC
15523    builtin and then its argument prototype would still apply.  */
15524 #ifdef __cplusplus
15525 extern "C"
15526 #endif
15527 char sem_open ();
15528 int
15529 main ()
15530 {
15531 return sem_open ();
15532   ;
15533   return 0;
15534 }
15535 _ACEOF
15536 for ac_lib in '' rt pthread; do
15537   if test -z "$ac_lib"; then
15538     ac_res="none required"
15539   else
15540     ac_res=-l$ac_lib
15541     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
15542   fi
15543   if ac_fn_c_try_link "$LINENO"; then :
15544   ac_cv_search_sem_open=$ac_res
15545 fi
15546 rm -f core conftest.err conftest.$ac_objext \
15547     conftest$ac_exeext
15548   if ${ac_cv_search_sem_open+:} false; then :
15549   break
15550 fi
15551 done
15552 if ${ac_cv_search_sem_open+:} false; then :
15553
15554 else
15555   ac_cv_search_sem_open=no
15556 fi
15557 rm conftest.$ac_ext
15558 LIBS=$ac_func_search_save_LIBS
15559 fi
15560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_open" >&5
15561 $as_echo "$ac_cv_search_sem_open" >&6; }
15562 ac_res=$ac_cv_search_sem_open
15563 if test "$ac_res" != no; then :
15564   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15565   USE_NAMED_POSIX_SEMAPHORES=1
15566 fi
15567
15568   fi
15569   if test x"$PREFERRED_SEMAPHORES" = x"UNNAMED_POSIX" ; then
15570     # Need sem_init for this
15571     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
15572 $as_echo_n "checking for library containing sem_init... " >&6; }
15573 if ${ac_cv_search_sem_init+:} false; then :
15574   $as_echo_n "(cached) " >&6
15575 else
15576   ac_func_search_save_LIBS=$LIBS
15577 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15578 /* end confdefs.h.  */
15579
15580 /* Override any GCC internal prototype to avoid an error.
15581    Use char because int might match the return type of a GCC
15582    builtin and then its argument prototype would still apply.  */
15583 #ifdef __cplusplus
15584 extern "C"
15585 #endif
15586 char sem_init ();
15587 int
15588 main ()
15589 {
15590 return sem_init ();
15591   ;
15592   return 0;
15593 }
15594 _ACEOF
15595 for ac_lib in '' rt pthread; do
15596   if test -z "$ac_lib"; then
15597     ac_res="none required"
15598   else
15599     ac_res=-l$ac_lib
15600     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
15601   fi
15602   if ac_fn_c_try_link "$LINENO"; then :
15603   ac_cv_search_sem_init=$ac_res
15604 fi
15605 rm -f core conftest.err conftest.$ac_objext \
15606     conftest$ac_exeext
15607   if ${ac_cv_search_sem_init+:} false; then :
15608   break
15609 fi
15610 done
15611 if ${ac_cv_search_sem_init+:} false; then :
15612
15613 else
15614   ac_cv_search_sem_init=no
15615 fi
15616 rm conftest.$ac_ext
15617 LIBS=$ac_func_search_save_LIBS
15618 fi
15619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
15620 $as_echo "$ac_cv_search_sem_init" >&6; }
15621 ac_res=$ac_cv_search_sem_init
15622 if test "$ac_res" != no; then :
15623   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15624   USE_UNNAMED_POSIX_SEMAPHORES=1
15625 fi
15626
15627   fi
15628   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which semaphore API to use" >&5
15629 $as_echo_n "checking which semaphore API to use... " >&6; }
15630   if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
15631
15632 $as_echo "#define USE_NAMED_POSIX_SEMAPHORES 1" >>confdefs.h
15633
15634     SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
15635     sematype="named POSIX"
15636   else
15637     if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
15638
15639 $as_echo "#define USE_UNNAMED_POSIX_SEMAPHORES 1" >>confdefs.h
15640
15641       SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
15642       sematype="unnamed POSIX"
15643     else
15644
15645 $as_echo "#define USE_SYSV_SEMAPHORES 1" >>confdefs.h
15646
15647       SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
15648       sematype="System V"
15649     fi
15650   fi
15651   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sematype" >&5
15652 $as_echo "$sematype" >&6; }
15653 else
15654
15655 $as_echo "#define USE_WIN32_SEMAPHORES 1" >>confdefs.h
15656
15657   SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
15658 fi
15659
15660
15661 # Select shared-memory implementation type.
15662 if test "$PORTNAME" != "win32"; then
15663
15664 $as_echo "#define USE_SYSV_SHARED_MEMORY 1" >>confdefs.h
15665
15666   SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
15667 else
15668
15669 $as_echo "#define USE_WIN32_SHARED_MEMORY 1" >>confdefs.h
15670
15671   SHMEM_IMPLEMENTATION="src/backend/port/win32_shmem.c"
15672 fi
15673
15674 # Select random number source
15675 #
15676 # You can override this logic by setting the appropriate USE_*RANDOM flag to 1
15677 # in the template or configure command line.
15678
15679 # If not selected manually, try to select a source automatically.
15680 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
15681   if test x"$with_openssl" = x"yes" ; then
15682     USE_OPENSSL_RANDOM=1
15683   elif test "$PORTNAME" = "win32" ; then
15684     USE_WIN32_RANDOM=1
15685   else
15686     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/urandom" >&5
15687 $as_echo_n "checking for /dev/urandom... " >&6; }
15688 if ${ac_cv_file__dev_urandom+:} false; then :
15689   $as_echo_n "(cached) " >&6
15690 else
15691   test "$cross_compiling" = yes &&
15692   as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15693 if test -r "/dev/urandom"; then
15694   ac_cv_file__dev_urandom=yes
15695 else
15696   ac_cv_file__dev_urandom=no
15697 fi
15698 fi
15699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_urandom" >&5
15700 $as_echo "$ac_cv_file__dev_urandom" >&6; }
15701 if test "x$ac_cv_file__dev_urandom" = xyes; then :
15702
15703 fi
15704
15705
15706     if test x"$ac_cv_file__dev_urandom" = x"yes" ; then
15707       USE_DEV_URANDOM=1
15708     fi
15709   fi
15710 fi
15711
15712 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which random number source to use" >&5
15713 $as_echo_n "checking which random number source to use... " >&6; }
15714 if test "$enable_strong_random" = yes ; then
15715   if test x"$USE_OPENSSL_RANDOM" = x"1" ; then
15716
15717 $as_echo "#define USE_OPENSSL_RANDOM 1" >>confdefs.h
15718
15719     { $as_echo "$as_me:${as_lineno-$LINENO}: result: OpenSSL" >&5
15720 $as_echo "OpenSSL" >&6; }
15721   elif test x"$USE_WIN32_RANDOM" = x"1" ; then
15722
15723 $as_echo "#define USE_WIN32_RANDOM 1" >>confdefs.h
15724
15725     { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows native" >&5
15726 $as_echo "Windows native" >&6; }
15727   elif test x"$USE_DEV_URANDOM" = x"1" ; then
15728
15729 $as_echo "#define USE_DEV_URANDOM 1" >>confdefs.h
15730
15731     { $as_echo "$as_me:${as_lineno-$LINENO}: result: /dev/urandom" >&5
15732 $as_echo "/dev/urandom" >&6; }
15733   else
15734     as_fn_error $? "
15735 no source of strong random numbers was found
15736 PostgreSQL can use OpenSSL or /dev/urandom as a source of random numbers,
15737 for authentication protocols. You can use --disable-strong-random to use a
15738 built-in pseudo random number generator, but that may be insecure." "$LINENO" 5
15739   fi
15740
15741 $as_echo "#define HAVE_STRONG_RANDOM 1" >>confdefs.h
15742
15743 else
15744     { $as_echo "$as_me:${as_lineno-$LINENO}: result: weak builtin PRNG" >&5
15745 $as_echo "weak builtin PRNG" >&6; }
15746     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
15747 *** Not using a strong random number source may be insecure." >&5
15748 $as_echo "$as_me: WARNING:
15749 *** Not using a strong random number source may be insecure." >&2;}
15750 fi
15751
15752 # If not set in template file, set bytes to use libc memset()
15753 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
15754   MEMSET_LOOP_LIMIT=1024
15755 fi
15756
15757 cat >>confdefs.h <<_ACEOF
15758 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
15759 _ACEOF
15760
15761
15762
15763 if test "$enable_nls" = yes ; then
15764
15765   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bind_textdomain_codeset" >&5
15766 $as_echo_n "checking for library containing bind_textdomain_codeset... " >&6; }
15767 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
15768   $as_echo_n "(cached) " >&6
15769 else
15770   ac_func_search_save_LIBS=$LIBS
15771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15772 /* end confdefs.h.  */
15773
15774 /* Override any GCC internal prototype to avoid an error.
15775    Use char because int might match the return type of a GCC
15776    builtin and then its argument prototype would still apply.  */
15777 #ifdef __cplusplus
15778 extern "C"
15779 #endif
15780 char bind_textdomain_codeset ();
15781 int
15782 main ()
15783 {
15784 return bind_textdomain_codeset ();
15785   ;
15786   return 0;
15787 }
15788 _ACEOF
15789 for ac_lib in '' intl; do
15790   if test -z "$ac_lib"; then
15791     ac_res="none required"
15792   else
15793     ac_res=-l$ac_lib
15794     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
15795   fi
15796   if ac_fn_c_try_link "$LINENO"; then :
15797   ac_cv_search_bind_textdomain_codeset=$ac_res
15798 fi
15799 rm -f core conftest.err conftest.$ac_objext \
15800     conftest$ac_exeext
15801   if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
15802   break
15803 fi
15804 done
15805 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
15806
15807 else
15808   ac_cv_search_bind_textdomain_codeset=no
15809 fi
15810 rm conftest.$ac_ext
15811 LIBS=$ac_func_search_save_LIBS
15812 fi
15813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bind_textdomain_codeset" >&5
15814 $as_echo "$ac_cv_search_bind_textdomain_codeset" >&6; }
15815 ac_res=$ac_cv_search_bind_textdomain_codeset
15816 if test "$ac_res" != no; then :
15817   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15818
15819 else
15820   as_fn_error $? "a gettext implementation is required for NLS" "$LINENO" 5
15821 fi
15822
15823   ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
15824 if test "x$ac_cv_header_libintl_h" = xyes; then :
15825
15826 else
15827   as_fn_error $? "header file <libintl.h> is required for NLS" "$LINENO" 5
15828 fi
15829
15830
15831   if test -z "$MSGFMT"; then
15832   for ac_prog in msgfmt
15833 do
15834   # Extract the first word of "$ac_prog", so it can be a program name with args.
15835 set dummy $ac_prog; ac_word=$2
15836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15837 $as_echo_n "checking for $ac_word... " >&6; }
15838 if ${ac_cv_path_MSGFMT+:} false; then :
15839   $as_echo_n "(cached) " >&6
15840 else
15841   case $MSGFMT in
15842   [\\/]* | ?:[\\/]*)
15843   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
15844   ;;
15845   *)
15846   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15847 for as_dir in $PATH
15848 do
15849   IFS=$as_save_IFS
15850   test -z "$as_dir" && as_dir=.
15851     for ac_exec_ext in '' $ac_executable_extensions; do
15852   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15853     ac_cv_path_MSGFMT="$as_dir/$ac_word$ac_exec_ext"
15854     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15855     break 2
15856   fi
15857 done
15858   done
15859 IFS=$as_save_IFS
15860
15861   ;;
15862 esac
15863 fi
15864 MSGFMT=$ac_cv_path_MSGFMT
15865 if test -n "$MSGFMT"; then
15866   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
15867 $as_echo "$MSGFMT" >&6; }
15868 else
15869   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15870 $as_echo "no" >&6; }
15871 fi
15872
15873
15874   test -n "$MSGFMT" && break
15875 done
15876
15877 else
15878   # Report the value of MSGFMT in configure's output in all cases.
15879   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGFMT" >&5
15880 $as_echo_n "checking for MSGFMT... " >&6; }
15881   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
15882 $as_echo "$MSGFMT" >&6; }
15883 fi
15884
15885   if test -z "$MSGFMT"; then
15886     as_fn_error $? "msgfmt is required for NLS" "$LINENO" 5
15887   fi
15888   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msgfmt flags" >&5
15889 $as_echo_n "checking for msgfmt flags... " >&6; }
15890 if ${pgac_cv_msgfmt_flags+:} false; then :
15891   $as_echo_n "(cached) " >&6
15892 else
15893   if test x"$MSGFMT" != x"" && "$MSGFMT" --version 2>&1 | grep "GNU" >/dev/null; then
15894     pgac_cv_msgfmt_flags=-c
15895 fi
15896 fi
15897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_msgfmt_flags" >&5
15898 $as_echo "$pgac_cv_msgfmt_flags" >&6; }
15899   MSGFMT_FLAGS=$pgac_cv_msgfmt_flags
15900
15901   if test -z "$MSGMERGE"; then
15902   for ac_prog in msgmerge
15903 do
15904   # Extract the first word of "$ac_prog", so it can be a program name with args.
15905 set dummy $ac_prog; ac_word=$2
15906 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15907 $as_echo_n "checking for $ac_word... " >&6; }
15908 if ${ac_cv_path_MSGMERGE+:} false; then :
15909   $as_echo_n "(cached) " >&6
15910 else
15911   case $MSGMERGE in
15912   [\\/]* | ?:[\\/]*)
15913   ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
15914   ;;
15915   *)
15916   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15917 for as_dir in $PATH
15918 do
15919   IFS=$as_save_IFS
15920   test -z "$as_dir" && as_dir=.
15921     for ac_exec_ext in '' $ac_executable_extensions; do
15922   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15923     ac_cv_path_MSGMERGE="$as_dir/$ac_word$ac_exec_ext"
15924     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15925     break 2
15926   fi
15927 done
15928   done
15929 IFS=$as_save_IFS
15930
15931   ;;
15932 esac
15933 fi
15934 MSGMERGE=$ac_cv_path_MSGMERGE
15935 if test -n "$MSGMERGE"; then
15936   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
15937 $as_echo "$MSGMERGE" >&6; }
15938 else
15939   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15940 $as_echo "no" >&6; }
15941 fi
15942
15943
15944   test -n "$MSGMERGE" && break
15945 done
15946
15947 else
15948   # Report the value of MSGMERGE in configure's output in all cases.
15949   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGMERGE" >&5
15950 $as_echo_n "checking for MSGMERGE... " >&6; }
15951   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
15952 $as_echo "$MSGMERGE" >&6; }
15953 fi
15954
15955   if test -z "$XGETTEXT"; then
15956   for ac_prog in xgettext
15957 do
15958   # Extract the first word of "$ac_prog", so it can be a program name with args.
15959 set dummy $ac_prog; ac_word=$2
15960 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15961 $as_echo_n "checking for $ac_word... " >&6; }
15962 if ${ac_cv_path_XGETTEXT+:} false; then :
15963   $as_echo_n "(cached) " >&6
15964 else
15965   case $XGETTEXT in
15966   [\\/]* | ?:[\\/]*)
15967   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
15968   ;;
15969   *)
15970   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15971 for as_dir in $PATH
15972 do
15973   IFS=$as_save_IFS
15974   test -z "$as_dir" && as_dir=.
15975     for ac_exec_ext in '' $ac_executable_extensions; do
15976   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15977     ac_cv_path_XGETTEXT="$as_dir/$ac_word$ac_exec_ext"
15978     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15979     break 2
15980   fi
15981 done
15982   done
15983 IFS=$as_save_IFS
15984
15985   ;;
15986 esac
15987 fi
15988 XGETTEXT=$ac_cv_path_XGETTEXT
15989 if test -n "$XGETTEXT"; then
15990   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
15991 $as_echo "$XGETTEXT" >&6; }
15992 else
15993   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15994 $as_echo "no" >&6; }
15995 fi
15996
15997
15998   test -n "$XGETTEXT" && break
15999 done
16000
16001 else
16002   # Report the value of XGETTEXT in configure's output in all cases.
16003   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XGETTEXT" >&5
16004 $as_echo_n "checking for XGETTEXT... " >&6; }
16005   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
16006 $as_echo "$XGETTEXT" >&6; }
16007 fi
16008
16009
16010 fi
16011
16012 # Check for Tcl configuration script tclConfig.sh
16013 if test "$with_tcl" = yes; then
16014     if test -z "$TCLSH"; then
16015   for ac_prog in tclsh tcl tclsh8.6 tclsh86 tclsh8.5 tclsh85 tclsh8.4 tclsh84
16016 do
16017   # Extract the first word of "$ac_prog", so it can be a program name with args.
16018 set dummy $ac_prog; ac_word=$2
16019 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16020 $as_echo_n "checking for $ac_word... " >&6; }
16021 if ${ac_cv_path_TCLSH+:} false; then :
16022   $as_echo_n "(cached) " >&6
16023 else
16024   case $TCLSH in
16025   [\\/]* | ?:[\\/]*)
16026   ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
16027   ;;
16028   *)
16029   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16030 for as_dir in $PATH
16031 do
16032   IFS=$as_save_IFS
16033   test -z "$as_dir" && as_dir=.
16034     for ac_exec_ext in '' $ac_executable_extensions; do
16035   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16036     ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
16037     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16038     break 2
16039   fi
16040 done
16041   done
16042 IFS=$as_save_IFS
16043
16044   ;;
16045 esac
16046 fi
16047 TCLSH=$ac_cv_path_TCLSH
16048 if test -n "$TCLSH"; then
16049   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
16050 $as_echo "$TCLSH" >&6; }
16051 else
16052   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16053 $as_echo "no" >&6; }
16054 fi
16055
16056
16057   test -n "$TCLSH" && break
16058 done
16059
16060 else
16061   # Report the value of TCLSH in configure's output in all cases.
16062   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TCLSH" >&5
16063 $as_echo_n "checking for TCLSH... " >&6; }
16064   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
16065 $as_echo "$TCLSH" >&6; }
16066 fi
16067
16068 if test x"$TCLSH" = x""; then
16069   as_fn_error $? "Tcl shell not found" "$LINENO" 5
16070 fi
16071
16072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclConfig.sh" >&5
16073 $as_echo_n "checking for tclConfig.sh... " >&6; }
16074 # Let user override test
16075 if test -z "$TCL_CONFIG_SH"; then
16076     pgac_test_dirs="$with_tclconfig"
16077
16078     set X $pgac_test_dirs; shift
16079     if test $# -eq 0; then
16080         test -z "$TCLSH" && as_fn_error $? "unable to locate tclConfig.sh because no Tcl shell was found" "$LINENO" 5
16081         set X `echo 'puts $auto_path' | $TCLSH`; shift
16082     fi
16083
16084     for pgac_dir do
16085         if test -r "$pgac_dir/tclConfig.sh"; then
16086             TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
16087             break
16088         fi
16089     done
16090 fi
16091
16092 if test -z "$TCL_CONFIG_SH"; then
16093     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16094 $as_echo "no" >&6; }
16095     as_fn_error $? "file 'tclConfig.sh' is required for Tcl" "$LINENO" 5
16096 else
16097     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCL_CONFIG_SH" >&5
16098 $as_echo "$TCL_CONFIG_SH" >&6; }
16099 fi
16100
16101
16102
16103     . "$TCL_CONFIG_SH"
16104 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
16105 eval TCL_LIBS=\"$TCL_LIBS\"
16106 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
16107 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
16108
16109         if test "$TCL_SHARED_BUILD" != 1; then
16110       as_fn_error $? "cannot build PL/Tcl because Tcl is not a shared library
16111 Use --without-tcl to disable building PL/Tcl." "$LINENO" 5
16112     fi
16113     # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
16114     ac_save_CPPFLAGS=$CPPFLAGS
16115     CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
16116     ac_fn_c_check_header_mongrel "$LINENO" "tcl.h" "ac_cv_header_tcl_h" "$ac_includes_default"
16117 if test "x$ac_cv_header_tcl_h" = xyes; then :
16118
16119 else
16120   as_fn_error $? "header file <tcl.h> is required for Tcl" "$LINENO" 5
16121 fi
16122
16123
16124     CPPFLAGS=$ac_save_CPPFLAGS
16125 fi
16126
16127 # check for <perl.h>
16128 if test "$with_perl" = yes; then
16129   ac_save_CPPFLAGS=$CPPFLAGS
16130   CPPFLAGS="$CPPFLAGS -I$perl_archlibexp/CORE"
16131   ac_fn_c_check_header_compile "$LINENO" "perl.h" "ac_cv_header_perl_h" "#include <EXTERN.h>
16132 "
16133 if test "x$ac_cv_header_perl_h" = xyes; then :
16134
16135 else
16136   as_fn_error $? "header file <perl.h> is required for Perl" "$LINENO" 5
16137 fi
16138
16139
16140   # While we're at it, check that we can link to libperl.
16141   # On most platforms, if perl.h is there then libperl.so will be too, but at
16142   # this writing Debian packages them separately.  There is no known reason to
16143   # waste cycles on separate probes for the Tcl or Python libraries, though.
16144   pgac_save_LIBS=$LIBS
16145   LIBS="$perl_embed_ldflags"
16146   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libperl" >&5
16147 $as_echo_n "checking for libperl... " >&6; }
16148   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16149 /* end confdefs.h.  */
16150
16151 #include <EXTERN.h>
16152 #include <perl.h>
16153
16154 int
16155 main ()
16156 {
16157 perl_alloc();
16158   ;
16159   return 0;
16160 }
16161 _ACEOF
16162 if ac_fn_c_try_link "$LINENO"; then :
16163   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16164 $as_echo "yes" >&6; }
16165 else
16166   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16167 $as_echo "no" >&6; }
16168      as_fn_error $? "libperl library is required for Perl" "$LINENO" 5
16169 fi
16170 rm -f core conftest.err conftest.$ac_objext \
16171     conftest$ac_exeext conftest.$ac_ext
16172   LIBS=$pgac_save_LIBS
16173   CPPFLAGS=$ac_save_CPPFLAGS
16174 fi
16175
16176 # check for <Python.h>
16177 if test "$with_python" = yes; then
16178   ac_save_CPPFLAGS=$CPPFLAGS
16179   CPPFLAGS="$python_includespec $CPPFLAGS"
16180   ac_fn_c_check_header_mongrel "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default"
16181 if test "x$ac_cv_header_Python_h" = xyes; then :
16182
16183 else
16184   as_fn_error $? "header file <Python.h> is required for Python" "$LINENO" 5
16185 fi
16186
16187
16188   CPPFLAGS=$ac_save_CPPFLAGS
16189 fi
16190
16191 #
16192 # Check for DocBook and tools
16193 #
16194 if test -z "$XMLLINT"; then
16195   for ac_prog in xmllint
16196 do
16197   # Extract the first word of "$ac_prog", so it can be a program name with args.
16198 set dummy $ac_prog; ac_word=$2
16199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16200 $as_echo_n "checking for $ac_word... " >&6; }
16201 if ${ac_cv_path_XMLLINT+:} false; then :
16202   $as_echo_n "(cached) " >&6
16203 else
16204   case $XMLLINT in
16205   [\\/]* | ?:[\\/]*)
16206   ac_cv_path_XMLLINT="$XMLLINT" # Let the user override the test with a path.
16207   ;;
16208   *)
16209   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16210 for as_dir in $PATH
16211 do
16212   IFS=$as_save_IFS
16213   test -z "$as_dir" && as_dir=.
16214     for ac_exec_ext in '' $ac_executable_extensions; do
16215   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16216     ac_cv_path_XMLLINT="$as_dir/$ac_word$ac_exec_ext"
16217     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16218     break 2
16219   fi
16220 done
16221   done
16222 IFS=$as_save_IFS
16223
16224   ;;
16225 esac
16226 fi
16227 XMLLINT=$ac_cv_path_XMLLINT
16228 if test -n "$XMLLINT"; then
16229   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
16230 $as_echo "$XMLLINT" >&6; }
16231 else
16232   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16233 $as_echo "no" >&6; }
16234 fi
16235
16236
16237   test -n "$XMLLINT" && break
16238 done
16239
16240 else
16241   # Report the value of XMLLINT in configure's output in all cases.
16242   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XMLLINT" >&5
16243 $as_echo_n "checking for XMLLINT... " >&6; }
16244   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
16245 $as_echo "$XMLLINT" >&6; }
16246 fi
16247
16248
16249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DocBook XML V4.2" >&5
16250 $as_echo_n "checking for DocBook XML V4.2... " >&6; }
16251 if ${pgac_cv_check_docbook+:} false; then :
16252   $as_echo_n "(cached) " >&6
16253 else
16254   cat >conftest.xml <<EOF
16255 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
16256 <book>
16257  <title>test</title>
16258  <chapter>
16259   <title>random</title>
16260    <sect1>
16261     <title>testsect</title>
16262     <para>text</para>
16263   </sect1>
16264  </chapter>
16265 </book>
16266 EOF
16267
16268 pgac_cv_check_docbook=no
16269
16270 if test -n "$XMLLINT"; then
16271   $XMLLINT --noout --valid conftest.xml 1>&5 2>&1
16272   if test $? -eq 0; then
16273     pgac_cv_check_docbook=yes
16274   fi
16275 fi
16276 rm -f conftest.xml
16277 fi
16278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_docbook" >&5
16279 $as_echo "$pgac_cv_check_docbook" >&6; }
16280
16281 have_docbook=$pgac_cv_check_docbook
16282
16283
16284 if test -z "$DBTOEPUB"; then
16285   for ac_prog in dbtoepub
16286 do
16287   # Extract the first word of "$ac_prog", so it can be a program name with args.
16288 set dummy $ac_prog; ac_word=$2
16289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16290 $as_echo_n "checking for $ac_word... " >&6; }
16291 if ${ac_cv_path_DBTOEPUB+:} false; then :
16292   $as_echo_n "(cached) " >&6
16293 else
16294   case $DBTOEPUB in
16295   [\\/]* | ?:[\\/]*)
16296   ac_cv_path_DBTOEPUB="$DBTOEPUB" # Let the user override the test with a path.
16297   ;;
16298   *)
16299   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16300 for as_dir in $PATH
16301 do
16302   IFS=$as_save_IFS
16303   test -z "$as_dir" && as_dir=.
16304     for ac_exec_ext in '' $ac_executable_extensions; do
16305   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16306     ac_cv_path_DBTOEPUB="$as_dir/$ac_word$ac_exec_ext"
16307     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16308     break 2
16309   fi
16310 done
16311   done
16312 IFS=$as_save_IFS
16313
16314   ;;
16315 esac
16316 fi
16317 DBTOEPUB=$ac_cv_path_DBTOEPUB
16318 if test -n "$DBTOEPUB"; then
16319   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
16320 $as_echo "$DBTOEPUB" >&6; }
16321 else
16322   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16323 $as_echo "no" >&6; }
16324 fi
16325
16326
16327   test -n "$DBTOEPUB" && break
16328 done
16329
16330 else
16331   # Report the value of DBTOEPUB in configure's output in all cases.
16332   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DBTOEPUB" >&5
16333 $as_echo_n "checking for DBTOEPUB... " >&6; }
16334   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
16335 $as_echo "$DBTOEPUB" >&6; }
16336 fi
16337
16338 if test -z "$XSLTPROC"; then
16339   for ac_prog in xsltproc
16340 do
16341   # Extract the first word of "$ac_prog", so it can be a program name with args.
16342 set dummy $ac_prog; ac_word=$2
16343 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16344 $as_echo_n "checking for $ac_word... " >&6; }
16345 if ${ac_cv_path_XSLTPROC+:} false; then :
16346   $as_echo_n "(cached) " >&6
16347 else
16348   case $XSLTPROC in
16349   [\\/]* | ?:[\\/]*)
16350   ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
16351   ;;
16352   *)
16353   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16354 for as_dir in $PATH
16355 do
16356   IFS=$as_save_IFS
16357   test -z "$as_dir" && as_dir=.
16358     for ac_exec_ext in '' $ac_executable_extensions; do
16359   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16360     ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
16361     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16362     break 2
16363   fi
16364 done
16365   done
16366 IFS=$as_save_IFS
16367
16368   ;;
16369 esac
16370 fi
16371 XSLTPROC=$ac_cv_path_XSLTPROC
16372 if test -n "$XSLTPROC"; then
16373   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
16374 $as_echo "$XSLTPROC" >&6; }
16375 else
16376   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16377 $as_echo "no" >&6; }
16378 fi
16379
16380
16381   test -n "$XSLTPROC" && break
16382 done
16383
16384 else
16385   # Report the value of XSLTPROC in configure's output in all cases.
16386   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XSLTPROC" >&5
16387 $as_echo_n "checking for XSLTPROC... " >&6; }
16388   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
16389 $as_echo "$XSLTPROC" >&6; }
16390 fi
16391
16392 if test -z "$FOP"; then
16393   for ac_prog in fop
16394 do
16395   # Extract the first word of "$ac_prog", so it can be a program name with args.
16396 set dummy $ac_prog; ac_word=$2
16397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16398 $as_echo_n "checking for $ac_word... " >&6; }
16399 if ${ac_cv_path_FOP+:} false; then :
16400   $as_echo_n "(cached) " >&6
16401 else
16402   case $FOP in
16403   [\\/]* | ?:[\\/]*)
16404   ac_cv_path_FOP="$FOP" # Let the user override the test with a path.
16405   ;;
16406   *)
16407   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16408 for as_dir in $PATH
16409 do
16410   IFS=$as_save_IFS
16411   test -z "$as_dir" && as_dir=.
16412     for ac_exec_ext in '' $ac_executable_extensions; do
16413   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16414     ac_cv_path_FOP="$as_dir/$ac_word$ac_exec_ext"
16415     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16416     break 2
16417   fi
16418 done
16419   done
16420 IFS=$as_save_IFS
16421
16422   ;;
16423 esac
16424 fi
16425 FOP=$ac_cv_path_FOP
16426 if test -n "$FOP"; then
16427   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
16428 $as_echo "$FOP" >&6; }
16429 else
16430   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16431 $as_echo "no" >&6; }
16432 fi
16433
16434
16435   test -n "$FOP" && break
16436 done
16437
16438 else
16439   # Report the value of FOP in configure's output in all cases.
16440   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FOP" >&5
16441 $as_echo_n "checking for FOP... " >&6; }
16442   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
16443 $as_echo "$FOP" >&6; }
16444 fi
16445
16446
16447 #
16448 # Check for test tools
16449 #
16450 if test "$enable_tap_tests" = yes; then
16451   # Check for necessary modules, unless user has specified the "prove" to use;
16452   # in that case it's her responsibility to have a working configuration.
16453   # (prove might be part of a different Perl installation than perl, eg on
16454   # MSys, so the result of AX_PROG_PERL_MODULES could be irrelevant anyway.)
16455   if test -z "$PROVE"; then
16456
16457
16458
16459
16460
16461
16462 # Make sure we have perl
16463 if test -z "$PERL"; then
16464 # Extract the first word of "perl", so it can be a program name with args.
16465 set dummy perl; ac_word=$2
16466 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16467 $as_echo_n "checking for $ac_word... " >&6; }
16468 if ${ac_cv_prog_PERL+:} false; then :
16469   $as_echo_n "(cached) " >&6
16470 else
16471   if test -n "$PERL"; then
16472   ac_cv_prog_PERL="$PERL" # Let the user override the test.
16473 else
16474 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16475 for as_dir in $PATH
16476 do
16477   IFS=$as_save_IFS
16478   test -z "$as_dir" && as_dir=.
16479     for ac_exec_ext in '' $ac_executable_extensions; do
16480   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16481     ac_cv_prog_PERL="perl"
16482     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16483     break 2
16484   fi
16485 done
16486   done
16487 IFS=$as_save_IFS
16488
16489 fi
16490 fi
16491 PERL=$ac_cv_prog_PERL
16492 if test -n "$PERL"; then
16493   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
16494 $as_echo "$PERL" >&6; }
16495 else
16496   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16497 $as_echo "no" >&6; }
16498 fi
16499
16500
16501 fi
16502
16503 if test "x$PERL" != x; then
16504   ax_perl_modules_failed=0
16505   for ax_perl_module in 'IPC::Run' ; do
16506     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for perl module $ax_perl_module" >&5
16507 $as_echo_n "checking for perl module $ax_perl_module... " >&6; }
16508
16509     # Would be nice to log result here, but can't rely on autoconf internals
16510     $PERL -e "use $ax_perl_module; exit" > /dev/null 2>&1
16511     if test $? -ne 0; then
16512       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16513 $as_echo "no" >&6; };
16514       ax_perl_modules_failed=1
16515    else
16516       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16517 $as_echo "ok" >&6; };
16518     fi
16519   done
16520
16521   # Run optional shell commands
16522   if test "$ax_perl_modules_failed" = 0; then
16523     :
16524
16525   else
16526     :
16527     as_fn_error $? "Perl module IPC::Run is required to run TAP tests" "$LINENO" 5
16528   fi
16529 else
16530   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not find perl" >&5
16531 $as_echo "$as_me: WARNING: could not find perl" >&2;}
16532 fi
16533   fi
16534   # Now make sure we know where prove is
16535   if test -z "$PROVE"; then
16536   for ac_prog in prove
16537 do
16538   # Extract the first word of "$ac_prog", so it can be a program name with args.
16539 set dummy $ac_prog; ac_word=$2
16540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16541 $as_echo_n "checking for $ac_word... " >&6; }
16542 if ${ac_cv_path_PROVE+:} false; then :
16543   $as_echo_n "(cached) " >&6
16544 else
16545   case $PROVE in
16546   [\\/]* | ?:[\\/]*)
16547   ac_cv_path_PROVE="$PROVE" # Let the user override the test with a path.
16548   ;;
16549   *)
16550   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16551 for as_dir in $PATH
16552 do
16553   IFS=$as_save_IFS
16554   test -z "$as_dir" && as_dir=.
16555     for ac_exec_ext in '' $ac_executable_extensions; do
16556   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16557     ac_cv_path_PROVE="$as_dir/$ac_word$ac_exec_ext"
16558     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16559     break 2
16560   fi
16561 done
16562   done
16563 IFS=$as_save_IFS
16564
16565   ;;
16566 esac
16567 fi
16568 PROVE=$ac_cv_path_PROVE
16569 if test -n "$PROVE"; then
16570   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
16571 $as_echo "$PROVE" >&6; }
16572 else
16573   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16574 $as_echo "no" >&6; }
16575 fi
16576
16577
16578   test -n "$PROVE" && break
16579 done
16580
16581 else
16582   # Report the value of PROVE in configure's output in all cases.
16583   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PROVE" >&5
16584 $as_echo_n "checking for PROVE... " >&6; }
16585   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
16586 $as_echo "$PROVE" >&6; }
16587 fi
16588
16589   if test -z "$PROVE"; then
16590     as_fn_error $? "prove not found" "$LINENO" 5
16591   fi
16592 fi
16593
16594 # Thread testing
16595
16596 # We have to run the thread test near the end so we have all our symbols
16597 # defined.  Cross compiling throws a warning.
16598 #
16599 if test "$enable_thread_safety" = yes; then
16600 if test "$PORTNAME" != "win32"
16601 then
16602 { $as_echo "$as_me:${as_lineno-$LINENO}: checking thread safety of required library functions" >&5
16603 $as_echo_n "checking thread safety of required library functions... " >&6; }
16604
16605 _CFLAGS="$CFLAGS"
16606 _LIBS="$LIBS"
16607 CFLAGS="$CFLAGS $PTHREAD_CFLAGS -DIN_CONFIGURE"
16608 LIBS="$LIBS $PTHREAD_LIBS"
16609 if test "$cross_compiling" = yes; then :
16610   { $as_echo "$as_me:${as_lineno-$LINENO}: result: maybe" >&5
16611 $as_echo "maybe" >&6; }
16612   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
16613 *** Skipping thread test program because of cross-compile build.
16614 *** Run the program in src/test/thread on the target machine.
16615 " >&5
16616 $as_echo "$as_me: WARNING:
16617 *** Skipping thread test program because of cross-compile build.
16618 *** Run the program in src/test/thread on the target machine.
16619 " >&2;}
16620 else
16621   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16622 /* end confdefs.h.  */
16623 #include "$srcdir/src/test/thread/thread_test.c"
16624 _ACEOF
16625 if ac_fn_c_try_run "$LINENO"; then :
16626   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16627 $as_echo "yes" >&6; }
16628 else
16629   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16630 $as_echo "no" >&6; }
16631   as_fn_error $? "thread test program failed
16632 This platform is not thread-safe.  Check the file 'config.log' or compile
16633 and run src/test/thread/thread_test for the exact reason.
16634 Use --disable-thread-safety to disable thread safety." "$LINENO" 5
16635 fi
16636 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16637   conftest.$ac_objext conftest.beam conftest.$ac_ext
16638 fi
16639
16640 CFLAGS="$_CFLAGS"
16641 LIBS="$_LIBS"
16642 else
16643 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** skipping thread test on Win32" >&5
16644 $as_echo "$as_me: WARNING: *** skipping thread test on Win32" >&2;}
16645 fi
16646 fi
16647
16648 # If compiler will take -Wl,--as-needed (or various platform-specific
16649 # spellings thereof) then add that to LDFLAGS.  This is much easier than
16650 # trying to filter LIBS to the minimum for each executable.
16651 # On (at least) some Red-Hat-derived systems, this switch breaks linking to
16652 # libreadline; therefore we postpone testing it until we know what library
16653 # dependencies readline has.  The test code will try to link with $LIBS.
16654 if test "$with_readline" = yes; then
16655   link_test_func=readline
16656 else
16657   link_test_func=exit
16658 fi
16659
16660 if test "$PORTNAME" = "darwin"; then
16661   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-dead_strip_dylibs" >&5
16662 $as_echo_n "checking whether $CC supports -Wl,-dead_strip_dylibs... " >&6; }
16663 if ${pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs+:} false; then :
16664   $as_echo_n "(cached) " >&6
16665 else
16666   pgac_save_LDFLAGS=$LDFLAGS
16667 LDFLAGS="$pgac_save_LDFLAGS -Wl,-dead_strip_dylibs"
16668 if test "$cross_compiling" = yes; then :
16669   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs="assuming no"
16670 else
16671   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16672 /* end confdefs.h.  */
16673 extern void $link_test_func (); void (*fptr) () = $link_test_func;
16674 int
16675 main ()
16676 {
16677
16678   ;
16679   return 0;
16680 }
16681 _ACEOF
16682 if ac_fn_c_try_run "$LINENO"; then :
16683   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=yes
16684 else
16685   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=no
16686 fi
16687 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16688   conftest.$ac_objext conftest.beam conftest.$ac_ext
16689 fi
16690
16691 LDFLAGS="$pgac_save_LDFLAGS"
16692 fi
16693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&5
16694 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&6; }
16695 if test x"$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" = x"yes"; then
16696   LDFLAGS="$LDFLAGS -Wl,-dead_strip_dylibs"
16697 fi
16698
16699 elif test "$PORTNAME" = "openbsd"; then
16700   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-Bdynamic" >&5
16701 $as_echo_n "checking whether $CC supports -Wl,-Bdynamic... " >&6; }
16702 if ${pgac_cv_prog_cc_ldflags__Wl__Bdynamic+:} false; then :
16703   $as_echo_n "(cached) " >&6
16704 else
16705   pgac_save_LDFLAGS=$LDFLAGS
16706 LDFLAGS="$pgac_save_LDFLAGS -Wl,-Bdynamic"
16707 if test "$cross_compiling" = yes; then :
16708   pgac_cv_prog_cc_ldflags__Wl__Bdynamic="assuming no"
16709 else
16710   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16711 /* end confdefs.h.  */
16712 extern void $link_test_func (); void (*fptr) () = $link_test_func;
16713 int
16714 main ()
16715 {
16716
16717   ;
16718   return 0;
16719 }
16720 _ACEOF
16721 if ac_fn_c_try_run "$LINENO"; then :
16722   pgac_cv_prog_cc_ldflags__Wl__Bdynamic=yes
16723 else
16724   pgac_cv_prog_cc_ldflags__Wl__Bdynamic=no
16725 fi
16726 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16727   conftest.$ac_objext conftest.beam conftest.$ac_ext
16728 fi
16729
16730 LDFLAGS="$pgac_save_LDFLAGS"
16731 fi
16732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&5
16733 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&6; }
16734 if test x"$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" = x"yes"; then
16735   LDFLAGS="$LDFLAGS -Wl,-Bdynamic"
16736 fi
16737
16738 else
16739   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,--as-needed" >&5
16740 $as_echo_n "checking whether $CC supports -Wl,--as-needed... " >&6; }
16741 if ${pgac_cv_prog_cc_ldflags__Wl___as_needed+:} false; then :
16742   $as_echo_n "(cached) " >&6
16743 else
16744   pgac_save_LDFLAGS=$LDFLAGS
16745 LDFLAGS="$pgac_save_LDFLAGS -Wl,--as-needed"
16746 if test "$cross_compiling" = yes; then :
16747   pgac_cv_prog_cc_ldflags__Wl___as_needed="assuming no"
16748 else
16749   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16750 /* end confdefs.h.  */
16751 extern void $link_test_func (); void (*fptr) () = $link_test_func;
16752 int
16753 main ()
16754 {
16755
16756   ;
16757   return 0;
16758 }
16759 _ACEOF
16760 if ac_fn_c_try_run "$LINENO"; then :
16761   pgac_cv_prog_cc_ldflags__Wl___as_needed=yes
16762 else
16763   pgac_cv_prog_cc_ldflags__Wl___as_needed=no
16764 fi
16765 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16766   conftest.$ac_objext conftest.beam conftest.$ac_ext
16767 fi
16768
16769 LDFLAGS="$pgac_save_LDFLAGS"
16770 fi
16771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl___as_needed" >&5
16772 $as_echo "$pgac_cv_prog_cc_ldflags__Wl___as_needed" >&6; }
16773 if test x"$pgac_cv_prog_cc_ldflags__Wl___as_needed" = x"yes"; then
16774   LDFLAGS="$LDFLAGS -Wl,--as-needed"
16775 fi
16776
16777 fi
16778
16779 # Create compiler version string
16780 if test x"$GCC" = x"yes" ; then
16781   cc_string=`${CC} --version | sed q`
16782   case $cc_string in [A-Za-z]*) ;; *) cc_string="GCC $cc_string";; esac
16783 elif test x"$SUN_STUDIO_CC" = x"yes" ; then
16784   cc_string=`${CC} -V 2>&1 | sed q`
16785 else
16786   cc_string=$CC
16787 fi
16788
16789
16790 cat >>confdefs.h <<_ACEOF
16791 #define PG_VERSION_STR "PostgreSQL $PG_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"
16792 _ACEOF
16793
16794
16795 # Supply a numeric version string for use by 3rd party add-ons
16796 # awk -F is a regex on some platforms, and not on others, so make "." a tab
16797 PG_VERSION_NUM="`echo "$PACKAGE_VERSION" | sed 's/[A-Za-z].*$//' |
16798 tr '.' '        ' |
16799 $AWK '{printf "%d%04d", $1, $2}'`"
16800
16801 cat >>confdefs.h <<_ACEOF
16802 #define PG_VERSION_NUM $PG_VERSION_NUM
16803 _ACEOF
16804
16805
16806
16807
16808 # Begin output steps
16809
16810 { $as_echo "$as_me:${as_lineno-$LINENO}: using compiler=$cc_string" >&5
16811 $as_echo "$as_me: using compiler=$cc_string" >&6;}
16812 { $as_echo "$as_me:${as_lineno-$LINENO}: using CFLAGS=$CFLAGS" >&5
16813 $as_echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
16814 { $as_echo "$as_me:${as_lineno-$LINENO}: using CPPFLAGS=$CPPFLAGS" >&5
16815 $as_echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
16816 { $as_echo "$as_me:${as_lineno-$LINENO}: using LDFLAGS=$LDFLAGS" >&5
16817 $as_echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
16818
16819 # prepare build tree if outside source tree
16820 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
16821 # Note 2: /bin/pwd might be better than shell's built-in at getting
16822 #         a symlink-free name.
16823 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
16824   vpath_build=no
16825 else
16826   vpath_build=yes
16827   if test "$no_create" != yes; then
16828     $as_echo_n "preparing build tree... " >&6
16829     pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
16830     $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
16831       || as_fn_error $? "failed" "$LINENO" 5
16832     { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16833 $as_echo "done" >&6; }
16834   fi
16835 fi
16836
16837
16838
16839 ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
16840
16841
16842 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}"
16843
16844
16845 if test "$PORTNAME" = "win32"; then
16846 ac_config_commands="$ac_config_commands check_win32_symlinks"
16847
16848 fi
16849
16850 ac_config_headers="$ac_config_headers src/include/pg_config.h"
16851
16852
16853 ac_config_headers="$ac_config_headers src/include/pg_config_ext.h"
16854
16855
16856 ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
16857
16858
16859 cat >confcache <<\_ACEOF
16860 # This file is a shell script that caches the results of configure
16861 # tests run on this system so they can be shared between configure
16862 # scripts and configure runs, see configure's option --config-cache.
16863 # It is not useful on other systems.  If it contains results you don't
16864 # want to keep, you may remove or edit it.
16865 #
16866 # config.status only pays attention to the cache file if you give it
16867 # the --recheck option to rerun configure.
16868 #
16869 # `ac_cv_env_foo' variables (set or unset) will be overridden when
16870 # loading this file, other *unset* `ac_cv_foo' will be assigned the
16871 # following values.
16872
16873 _ACEOF
16874
16875 # The following way of writing the cache mishandles newlines in values,
16876 # but we know of no workaround that is simple, portable, and efficient.
16877 # So, we kill variables containing newlines.
16878 # Ultrix sh set writes to stderr and can't be redirected directly,
16879 # and sets the high bit in the cache file unless we assign to the vars.
16880 (
16881   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16882     eval ac_val=\$$ac_var
16883     case $ac_val in #(
16884     *${as_nl}*)
16885       case $ac_var in #(
16886       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16887 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
16888       esac
16889       case $ac_var in #(
16890       _ | IFS | as_nl) ;; #(
16891       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16892       *) { eval $ac_var=; unset $ac_var;} ;;
16893       esac ;;
16894     esac
16895   done
16896
16897   (set) 2>&1 |
16898     case $as_nl`(ac_space=' '; set) 2>&1` in #(
16899     *${as_nl}ac_space=\ *)
16900       # `set' does not quote correctly, so add quotes: double-quote
16901       # substitution turns \\\\ into \\, and sed turns \\ into \.
16902       sed -n \
16903         "s/'/'\\\\''/g;
16904           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
16905       ;; #(
16906     *)
16907       # `set' quotes correctly as required by POSIX, so do not add quotes.
16908       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
16909       ;;
16910     esac |
16911     sort
16912 ) |
16913   sed '
16914      /^ac_cv_env_/b end
16915      t clear
16916      :clear
16917      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16918      t end
16919      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16920      :end' >>confcache
16921 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16922   if test -w "$cache_file"; then
16923     if test "x$cache_file" != "x/dev/null"; then
16924       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16925 $as_echo "$as_me: updating cache $cache_file" >&6;}
16926       if test ! -f "$cache_file" || test -h "$cache_file"; then
16927         cat confcache >"$cache_file"
16928       else
16929         case $cache_file in #(
16930         */* | ?:*)
16931           mv -f confcache "$cache_file"$$ &&
16932           mv -f "$cache_file"$$ "$cache_file" ;; #(
16933         *)
16934           mv -f confcache "$cache_file" ;;
16935         esac
16936       fi
16937     fi
16938   else
16939     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16940 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
16941   fi
16942 fi
16943 rm -f confcache
16944
16945 test "x$prefix" = xNONE && prefix=$ac_default_prefix
16946 # Let make expand exec_prefix.
16947 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16948
16949 DEFS=-DHAVE_CONFIG_H
16950
16951 ac_libobjs=
16952 ac_ltlibobjs=
16953 U=
16954 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16955   # 1. Remove the extension, and $U if already installed.
16956   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
16957   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
16958   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
16959   #    will be set to the directory where LIBOBJS objects are built.
16960   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16961   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
16962 done
16963 LIBOBJS=$ac_libobjs
16964
16965 LTLIBOBJS=$ac_ltlibobjs
16966
16967
16968
16969
16970 : "${CONFIG_STATUS=./config.status}"
16971 ac_write_fail=0
16972 ac_clean_files_save=$ac_clean_files
16973 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
16974 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16975 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16976 as_write_fail=0
16977 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
16978 #! $SHELL
16979 # Generated by $as_me.
16980 # Run this file to recreate the current configuration.
16981 # Compiler output produced by configure, useful for debugging
16982 # configure, is in config.log if it exists.
16983
16984 debug=false
16985 ac_cs_recheck=false
16986 ac_cs_silent=false
16987
16988 SHELL=\${CONFIG_SHELL-$SHELL}
16989 export SHELL
16990 _ASEOF
16991 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16992 ## -------------------- ##
16993 ## M4sh Initialization. ##
16994 ## -------------------- ##
16995
16996 # Be more Bourne compatible
16997 DUALCASE=1; export DUALCASE # for MKS sh
16998 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
16999   emulate sh
17000   NULLCMD=:
17001   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
17002   # is contrary to our usage.  Disable this feature.
17003   alias -g '${1+"$@"}'='"$@"'
17004   setopt NO_GLOB_SUBST
17005 else
17006   case `(set -o) 2>/dev/null` in #(
17007   *posix*) :
17008     set -o posix ;; #(
17009   *) :
17010      ;;
17011 esac
17012 fi
17013
17014
17015 as_nl='
17016 '
17017 export as_nl
17018 # Printing a long string crashes Solaris 7 /usr/bin/printf.
17019 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17020 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17021 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17022 # Prefer a ksh shell builtin over an external printf program on Solaris,
17023 # but without wasting forks for bash or zsh.
17024 if test -z "$BASH_VERSION$ZSH_VERSION" \
17025     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17026   as_echo='print -r --'
17027   as_echo_n='print -rn --'
17028 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17029   as_echo='printf %s\n'
17030   as_echo_n='printf %s'
17031 else
17032   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17033     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17034     as_echo_n='/usr/ucb/echo -n'
17035   else
17036     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17037     as_echo_n_body='eval
17038       arg=$1;
17039       case $arg in #(
17040       *"$as_nl"*)
17041         expr "X$arg" : "X\\(.*\\)$as_nl";
17042         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17043       esac;
17044       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17045     '
17046     export as_echo_n_body
17047     as_echo_n='sh -c $as_echo_n_body as_echo'
17048   fi
17049   export as_echo_body
17050   as_echo='sh -c $as_echo_body as_echo'
17051 fi
17052
17053 # The user is always right.
17054 if test "${PATH_SEPARATOR+set}" != set; then
17055   PATH_SEPARATOR=:
17056   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17057     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17058       PATH_SEPARATOR=';'
17059   }
17060 fi
17061
17062
17063 # IFS
17064 # We need space, tab and new line, in precisely that order.  Quoting is
17065 # there to prevent editors from complaining about space-tab.
17066 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
17067 # splitting by setting IFS to empty value.)
17068 IFS=" ""        $as_nl"
17069
17070 # Find who we are.  Look in the path if we contain no directory separator.
17071 as_myself=
17072 case $0 in #((
17073   *[\\/]* ) as_myself=$0 ;;
17074   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17075 for as_dir in $PATH
17076 do
17077   IFS=$as_save_IFS
17078   test -z "$as_dir" && as_dir=.
17079     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17080   done
17081 IFS=$as_save_IFS
17082
17083      ;;
17084 esac
17085 # We did not find ourselves, most probably we were run as `sh COMMAND'
17086 # in which case we are not to be found in the path.
17087 if test "x$as_myself" = x; then
17088   as_myself=$0
17089 fi
17090 if test ! -f "$as_myself"; then
17091   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17092   exit 1
17093 fi
17094
17095 # Unset variables that we do not need and which cause bugs (e.g. in
17096 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
17097 # suppresses any "Segmentation fault" message there.  '((' could
17098 # trigger a bug in pdksh 5.2.14.
17099 for as_var in BASH_ENV ENV MAIL MAILPATH
17100 do eval test x\${$as_var+set} = xset \
17101   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
17102 done
17103 PS1='$ '
17104 PS2='> '
17105 PS4='+ '
17106
17107 # NLS nuisances.
17108 LC_ALL=C
17109 export LC_ALL
17110 LANGUAGE=C
17111 export LANGUAGE
17112
17113 # CDPATH.
17114 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17115
17116
17117 # as_fn_error STATUS ERROR [LINENO LOG_FD]
17118 # ----------------------------------------
17119 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17120 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
17121 # script with STATUS, using 1 if that was 0.
17122 as_fn_error ()
17123 {
17124   as_status=$1; test $as_status -eq 0 && as_status=1
17125   if test "$4"; then
17126     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17127     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
17128   fi
17129   $as_echo "$as_me: error: $2" >&2
17130   as_fn_exit $as_status
17131 } # as_fn_error
17132
17133
17134 # as_fn_set_status STATUS
17135 # -----------------------
17136 # Set $? to STATUS, without forking.
17137 as_fn_set_status ()
17138 {
17139   return $1
17140 } # as_fn_set_status
17141
17142 # as_fn_exit STATUS
17143 # -----------------
17144 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17145 as_fn_exit ()
17146 {
17147   set +e
17148   as_fn_set_status $1
17149   exit $1
17150 } # as_fn_exit
17151
17152 # as_fn_unset VAR
17153 # ---------------
17154 # Portably unset VAR.
17155 as_fn_unset ()
17156 {
17157   { eval $1=; unset $1;}
17158 }
17159 as_unset=as_fn_unset
17160 # as_fn_append VAR VALUE
17161 # ----------------------
17162 # Append the text in VALUE to the end of the definition contained in VAR. Take
17163 # advantage of any shell optimizations that allow amortized linear growth over
17164 # repeated appends, instead of the typical quadratic growth present in naive
17165 # implementations.
17166 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
17167   eval 'as_fn_append ()
17168   {
17169     eval $1+=\$2
17170   }'
17171 else
17172   as_fn_append ()
17173   {
17174     eval $1=\$$1\$2
17175   }
17176 fi # as_fn_append
17177
17178 # as_fn_arith ARG...
17179 # ------------------
17180 # Perform arithmetic evaluation on the ARGs, and store the result in the
17181 # global $as_val. Take advantage of shells that can avoid forks. The arguments
17182 # must be portable across $(()) and expr.
17183 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
17184   eval 'as_fn_arith ()
17185   {
17186     as_val=$(( $* ))
17187   }'
17188 else
17189   as_fn_arith ()
17190   {
17191     as_val=`expr "$@" || test $? -eq 1`
17192   }
17193 fi # as_fn_arith
17194
17195
17196 if expr a : '\(a\)' >/dev/null 2>&1 &&
17197    test "X`expr 00001 : '.*\(...\)'`" = X001; then
17198   as_expr=expr
17199 else
17200   as_expr=false
17201 fi
17202
17203 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17204   as_basename=basename
17205 else
17206   as_basename=false
17207 fi
17208
17209 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17210   as_dirname=dirname
17211 else
17212   as_dirname=false
17213 fi
17214
17215 as_me=`$as_basename -- "$0" ||
17216 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17217          X"$0" : 'X\(//\)$' \| \
17218          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
17219 $as_echo X/"$0" |
17220     sed '/^.*\/\([^/][^/]*\)\/*$/{
17221             s//\1/
17222             q
17223           }
17224           /^X\/\(\/\/\)$/{
17225             s//\1/
17226             q
17227           }
17228           /^X\/\(\/\).*/{
17229             s//\1/
17230             q
17231           }
17232           s/.*/./; q'`
17233
17234 # Avoid depending upon Character Ranges.
17235 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17236 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17237 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17238 as_cr_digits='0123456789'
17239 as_cr_alnum=$as_cr_Letters$as_cr_digits
17240
17241 ECHO_C= ECHO_N= ECHO_T=
17242 case `echo -n x` in #(((((
17243 -n*)
17244   case `echo 'xy\c'` in
17245   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
17246   xy)  ECHO_C='\c';;
17247   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
17248        ECHO_T=' ';;
17249   esac;;
17250 *)
17251   ECHO_N='-n';;
17252 esac
17253
17254 rm -f conf$$ conf$$.exe conf$$.file
17255 if test -d conf$$.dir; then
17256   rm -f conf$$.dir/conf$$.file
17257 else
17258   rm -f conf$$.dir
17259   mkdir conf$$.dir 2>/dev/null
17260 fi
17261 if (echo >conf$$.file) 2>/dev/null; then
17262   if ln -s conf$$.file conf$$ 2>/dev/null; then
17263     as_ln_s='ln -s'
17264     # ... but there are two gotchas:
17265     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17266     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
17267     # In both cases, we have to default to `cp -pR'.
17268     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
17269       as_ln_s='cp -pR'
17270   elif ln conf$$.file conf$$ 2>/dev/null; then
17271     as_ln_s=ln
17272   else
17273     as_ln_s='cp -pR'
17274   fi
17275 else
17276   as_ln_s='cp -pR'
17277 fi
17278 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17279 rmdir conf$$.dir 2>/dev/null
17280
17281
17282 # as_fn_mkdir_p
17283 # -------------
17284 # Create "$as_dir" as a directory, including parents if necessary.
17285 as_fn_mkdir_p ()
17286 {
17287
17288   case $as_dir in #(
17289   -*) as_dir=./$as_dir;;
17290   esac
17291   test -d "$as_dir" || eval $as_mkdir_p || {
17292     as_dirs=
17293     while :; do
17294       case $as_dir in #(
17295       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17296       *) as_qdir=$as_dir;;
17297       esac
17298       as_dirs="'$as_qdir' $as_dirs"
17299       as_dir=`$as_dirname -- "$as_dir" ||
17300 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17301          X"$as_dir" : 'X\(//\)[^/]' \| \
17302          X"$as_dir" : 'X\(//\)$' \| \
17303          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17304 $as_echo X"$as_dir" |
17305     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17306             s//\1/
17307             q
17308           }
17309           /^X\(\/\/\)[^/].*/{
17310             s//\1/
17311             q
17312           }
17313           /^X\(\/\/\)$/{
17314             s//\1/
17315             q
17316           }
17317           /^X\(\/\).*/{
17318             s//\1/
17319             q
17320           }
17321           s/.*/./; q'`
17322       test -d "$as_dir" && break
17323     done
17324     test -z "$as_dirs" || eval "mkdir $as_dirs"
17325   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
17326
17327
17328 } # as_fn_mkdir_p
17329 if mkdir -p . 2>/dev/null; then
17330   as_mkdir_p='mkdir -p "$as_dir"'
17331 else
17332   test -d ./-p && rmdir ./-p
17333   as_mkdir_p=false
17334 fi
17335
17336
17337 # as_fn_executable_p FILE
17338 # -----------------------
17339 # Test if FILE is an executable regular file.
17340 as_fn_executable_p ()
17341 {
17342   test -f "$1" && test -x "$1"
17343 } # as_fn_executable_p
17344 as_test_x='test -x'
17345 as_executable_p=as_fn_executable_p
17346
17347 # Sed expression to map a string onto a valid CPP name.
17348 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
17349
17350 # Sed expression to map a string onto a valid variable name.
17351 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
17352
17353
17354 exec 6>&1
17355 ## ----------------------------------- ##
17356 ## Main body of $CONFIG_STATUS script. ##
17357 ## ----------------------------------- ##
17358 _ASEOF
17359 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
17360
17361 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17362 # Save the log message, to keep $0 and so on meaningful, and to
17363 # report actual input values of CONFIG_FILES etc. instead of their
17364 # values after options handling.
17365 ac_log="
17366 This file was extended by PostgreSQL $as_me 11devel, which was
17367 generated by GNU Autoconf 2.69.  Invocation command line was
17368
17369   CONFIG_FILES    = $CONFIG_FILES
17370   CONFIG_HEADERS  = $CONFIG_HEADERS
17371   CONFIG_LINKS    = $CONFIG_LINKS
17372   CONFIG_COMMANDS = $CONFIG_COMMANDS
17373   $ $0 $@
17374
17375 on `(hostname || uname -n) 2>/dev/null | sed 1q`
17376 "
17377
17378 _ACEOF
17379
17380 case $ac_config_files in *"
17381 "*) set x $ac_config_files; shift; ac_config_files=$*;;
17382 esac
17383
17384 case $ac_config_headers in *"
17385 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17386 esac
17387
17388
17389 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17390 # Files that config.status was made for.
17391 config_files="$ac_config_files"
17392 config_headers="$ac_config_headers"
17393 config_links="$ac_config_links"
17394 config_commands="$ac_config_commands"
17395
17396 _ACEOF
17397
17398 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17399 ac_cs_usage="\
17400 \`$as_me' instantiates files and other configuration actions
17401 from templates according to the current configuration.  Unless the files
17402 and actions are specified as TAGs, all are instantiated by default.
17403
17404 Usage: $0 [OPTION]... [TAG]...
17405
17406   -h, --help       print this help, then exit
17407   -V, --version    print version number and configuration settings, then exit
17408       --config     print configuration, then exit
17409   -q, --quiet, --silent
17410                    do not print progress messages
17411   -d, --debug      don't remove temporary files
17412       --recheck    update $as_me by reconfiguring in the same conditions
17413       --file=FILE[:TEMPLATE]
17414                    instantiate the configuration file FILE
17415       --header=FILE[:TEMPLATE]
17416                    instantiate the configuration header FILE
17417
17418 Configuration files:
17419 $config_files
17420
17421 Configuration headers:
17422 $config_headers
17423
17424 Configuration links:
17425 $config_links
17426
17427 Configuration commands:
17428 $config_commands
17429
17430 Report bugs to <pgsql-bugs@postgresql.org>."
17431
17432 _ACEOF
17433 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17434 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
17435 ac_cs_version="\\
17436 PostgreSQL config.status 11devel
17437 configured by $0, generated by GNU Autoconf 2.69,
17438   with options \\"\$ac_cs_config\\"
17439
17440 Copyright (C) 2012 Free Software Foundation, Inc.
17441 This config.status script is free software; the Free Software Foundation
17442 gives unlimited permission to copy, distribute and modify it."
17443
17444 ac_pwd='$ac_pwd'
17445 srcdir='$srcdir'
17446 INSTALL='$INSTALL'
17447 MKDIR_P='$MKDIR_P'
17448 AWK='$AWK'
17449 test -n "\$AWK" || AWK=awk
17450 _ACEOF
17451
17452 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17453 # The default lists apply if the user does not specify any file.
17454 ac_need_defaults=:
17455 while test $# != 0
17456 do
17457   case $1 in
17458   --*=?*)
17459     ac_option=`expr "X$1" : 'X\([^=]*\)='`
17460     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
17461     ac_shift=:
17462     ;;
17463   --*=)
17464     ac_option=`expr "X$1" : 'X\([^=]*\)='`
17465     ac_optarg=
17466     ac_shift=:
17467     ;;
17468   *)
17469     ac_option=$1
17470     ac_optarg=$2
17471     ac_shift=shift
17472     ;;
17473   esac
17474
17475   case $ac_option in
17476   # Handling of the options.
17477   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17478     ac_cs_recheck=: ;;
17479   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
17480     $as_echo "$ac_cs_version"; exit ;;
17481   --config | --confi | --conf | --con | --co | --c )
17482     $as_echo "$ac_cs_config"; exit ;;
17483   --debug | --debu | --deb | --de | --d | -d )
17484     debug=: ;;
17485   --file | --fil | --fi | --f )
17486     $ac_shift
17487     case $ac_optarg in
17488     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17489     '') as_fn_error $? "missing file argument" ;;
17490     esac
17491     as_fn_append CONFIG_FILES " '$ac_optarg'"
17492     ac_need_defaults=false;;
17493   --header | --heade | --head | --hea )
17494     $ac_shift
17495     case $ac_optarg in
17496     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17497     esac
17498     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
17499     ac_need_defaults=false;;
17500   --he | --h)
17501     # Conflict between --help and --header
17502     as_fn_error $? "ambiguous option: \`$1'
17503 Try \`$0 --help' for more information.";;
17504   --help | --hel | -h )
17505     $as_echo "$ac_cs_usage"; exit ;;
17506   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17507   | -silent | --silent | --silen | --sile | --sil | --si | --s)
17508     ac_cs_silent=: ;;
17509
17510   # This is an error.
17511   -*) as_fn_error $? "unrecognized option: \`$1'
17512 Try \`$0 --help' for more information." ;;
17513
17514   *) as_fn_append ac_config_targets " $1"
17515      ac_need_defaults=false ;;
17516
17517   esac
17518   shift
17519 done
17520
17521 ac_configure_extra_args=
17522
17523 if $ac_cs_silent; then
17524   exec 6>/dev/null
17525   ac_configure_extra_args="$ac_configure_extra_args --silent"
17526 fi
17527
17528 _ACEOF
17529 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17530 if \$ac_cs_recheck; then
17531   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
17532   shift
17533   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17534   CONFIG_SHELL='$SHELL'
17535   export CONFIG_SHELL
17536   exec "\$@"
17537 fi
17538
17539 _ACEOF
17540 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17541 exec 5>>config.log
17542 {
17543   echo
17544   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17545 ## Running $as_me. ##
17546 _ASBOX
17547   $as_echo "$ac_log"
17548 } >&5
17549
17550 _ACEOF
17551 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17552 _ACEOF
17553
17554 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17555
17556 # Handling of arguments.
17557 for ac_config_target in $ac_config_targets
17558 do
17559   case $ac_config_target in
17560     "src/backend/port/tas.s") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
17561     "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
17562     "src/Makefile.global") CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
17563     "src/backend/port/dynloader.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/dynloader.c:src/backend/port/dynloader/${template}.c" ;;
17564     "src/backend/port/pg_sema.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
17565     "src/backend/port/pg_shmem.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
17566     "src/include/dynloader.h") CONFIG_LINKS="$CONFIG_LINKS src/include/dynloader.h:src/backend/port/dynloader/${template}.h" ;;
17567     "src/include/pg_config_os.h") CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
17568     "src/Makefile.port") CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
17569     "check_win32_symlinks") CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
17570     "src/include/pg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
17571     "src/include/pg_config_ext.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config_ext.h" ;;
17572     "src/interfaces/ecpg/include/ecpg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
17573
17574   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
17575   esac
17576 done
17577
17578
17579 # If the user did not use the arguments to specify the items to instantiate,
17580 # then the envvar interface is used.  Set only those that are not.
17581 # We use the long form for the default assignment because of an extremely
17582 # bizarre bug on SunOS 4.1.3.
17583 if $ac_need_defaults; then
17584   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17585   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17586   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
17587   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
17588 fi
17589
17590 # Have a temporary directory for convenience.  Make it in the build tree
17591 # simply because there is no reason against having it here, and in addition,
17592 # creating and moving files from /tmp can sometimes cause problems.
17593 # Hook for its removal unless debugging.
17594 # Note that there is a small window in which the directory will not be cleaned:
17595 # after its creation but before its name has been assigned to `$tmp'.
17596 $debug ||
17597 {
17598   tmp= ac_tmp=
17599   trap 'exit_status=$?
17600   : "${ac_tmp:=$tmp}"
17601   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
17602 ' 0
17603   trap 'as_fn_exit 1' 1 2 13 15
17604 }
17605 # Create a (secure) tmp directory for tmp files.
17606
17607 {
17608   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
17609   test -d "$tmp"
17610 }  ||
17611 {
17612   tmp=./conf$$-$RANDOM
17613   (umask 077 && mkdir "$tmp")
17614 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
17615 ac_tmp=$tmp
17616
17617 # Set up the scripts for CONFIG_FILES section.
17618 # No need to generate them if there are no CONFIG_FILES.
17619 # This happens for instance with `./config.status config.h'.
17620 if test -n "$CONFIG_FILES"; then
17621
17622
17623 ac_cr=`echo X | tr X '\015'`
17624 # On cygwin, bash can eat \r inside `` if the user requested igncr.
17625 # But we know of no other shell where ac_cr would be empty at this
17626 # point, so we can use a bashism as a fallback.
17627 if test "x$ac_cr" = x; then
17628   eval ac_cr=\$\'\\r\'
17629 fi
17630 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17631 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
17632   ac_cs_awk_cr='\\r'
17633 else
17634   ac_cs_awk_cr=$ac_cr
17635 fi
17636
17637 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
17638 _ACEOF
17639
17640
17641 {
17642   echo "cat >conf$$subs.awk <<_ACEOF" &&
17643   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17644   echo "_ACEOF"
17645 } >conf$$subs.sh ||
17646   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17647 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
17648 ac_delim='%!_!# '
17649 for ac_last_try in false false false false false :; do
17650   . ./conf$$subs.sh ||
17651     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17652
17653   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17654   if test $ac_delim_n = $ac_delim_num; then
17655     break
17656   elif $ac_last_try; then
17657     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17658   else
17659     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17660   fi
17661 done
17662 rm -f conf$$subs.sh
17663
17664 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17665 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
17666 _ACEOF
17667 sed -n '
17668 h
17669 s/^/S["/; s/!.*/"]=/
17670 p
17671 g
17672 s/^[^!]*!//
17673 :repl
17674 t repl
17675 s/'"$ac_delim"'$//
17676 t delim
17677 :nl
17678 h
17679 s/\(.\{148\}\)..*/\1/
17680 t more1
17681 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17682 p
17683 n
17684 b repl
17685 :more1
17686 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17687 p
17688 g
17689 s/.\{148\}//
17690 t nl
17691 :delim
17692 h
17693 s/\(.\{148\}\)..*/\1/
17694 t more2
17695 s/["\\]/\\&/g; s/^/"/; s/$/"/
17696 p
17697 b
17698 :more2
17699 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17700 p
17701 g
17702 s/.\{148\}//
17703 t delim
17704 ' <conf$$subs.awk | sed '
17705 /^[^""]/{
17706   N
17707   s/\n//
17708 }
17709 ' >>$CONFIG_STATUS || ac_write_fail=1
17710 rm -f conf$$subs.awk
17711 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17712 _ACAWK
17713 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
17714   for (key in S) S_is_set[key] = 1
17715   FS = "\a"
17716
17717 }
17718 {
17719   line = $ 0
17720   nfields = split(line, field, "@")
17721   substed = 0
17722   len = length(field[1])
17723   for (i = 2; i < nfields; i++) {
17724     key = field[i]
17725     keylen = length(key)
17726     if (S_is_set[key]) {
17727       value = S[key]
17728       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17729       len += length(value) + length(field[++i])
17730       substed = 1
17731     } else
17732       len += 1 + keylen
17733   }
17734
17735   print line
17736 }
17737
17738 _ACAWK
17739 _ACEOF
17740 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17741 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17742   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17743 else
17744   cat
17745 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
17746   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
17747 _ACEOF
17748
17749 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17750 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
17751 # trailing colons and then remove the whole line if VPATH becomes empty
17752 # (actually we leave an empty line to preserve line numbers).
17753 if test "x$srcdir" = x.; then
17754   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
17755 h
17756 s///
17757 s/^/:/
17758 s/[      ]*$/:/
17759 s/:\$(srcdir):/:/g
17760 s/:\${srcdir}:/:/g
17761 s/:@srcdir@:/:/g
17762 s/^:*//
17763 s/:*$//
17764 x
17765 s/\(=[   ]*\).*/\1/
17766 G
17767 s/\n//
17768 s/^[^=]*=[       ]*$//
17769 }'
17770 fi
17771
17772 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17773 fi # test -n "$CONFIG_FILES"
17774
17775 # Set up the scripts for CONFIG_HEADERS section.
17776 # No need to generate them if there are no CONFIG_HEADERS.
17777 # This happens for instance with `./config.status Makefile'.
17778 if test -n "$CONFIG_HEADERS"; then
17779 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
17780 BEGIN {
17781 _ACEOF
17782
17783 # Transform confdefs.h into an awk script `defines.awk', embedded as
17784 # here-document in config.status, that substitutes the proper values into
17785 # config.h.in to produce config.h.
17786
17787 # Create a delimiter string that does not exist in confdefs.h, to ease
17788 # handling of long lines.
17789 ac_delim='%!_!# '
17790 for ac_last_try in false false :; do
17791   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17792   if test -z "$ac_tt"; then
17793     break
17794   elif $ac_last_try; then
17795     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
17796   else
17797     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17798   fi
17799 done
17800
17801 # For the awk script, D is an array of macro values keyed by name,
17802 # likewise P contains macro parameters if any.  Preserve backslash
17803 # newline sequences.
17804
17805 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17806 sed -n '
17807 s/.\{148\}/&'"$ac_delim"'/g
17808 t rset
17809 :rset
17810 s/^[     ]*#[    ]*define[       ][      ]*/ /
17811 t def
17812 d
17813 :def
17814 s/\\$//
17815 t bsnl
17816 s/["\\]/\\&/g
17817 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
17818 D["\1"]=" \3"/p
17819 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
17820 d
17821 :bsnl
17822 s/["\\]/\\&/g
17823 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
17824 D["\1"]=" \3\\\\\\n"\\/p
17825 t cont
17826 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17827 t cont
17828 d
17829 :cont
17830 n
17831 s/.\{148\}/&'"$ac_delim"'/g
17832 t clear
17833 :clear
17834 s/\\$//
17835 t bsnlc
17836 s/["\\]/\\&/g; s/^/"/; s/$/"/p
17837 d
17838 :bsnlc
17839 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17840 b cont
17841 ' <confdefs.h | sed '
17842 s/'"$ac_delim"'/"\\\
17843 "/g' >>$CONFIG_STATUS || ac_write_fail=1
17844
17845 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17846   for (key in D) D_is_set[key] = 1
17847   FS = "\a"
17848 }
17849 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17850   line = \$ 0
17851   split(line, arg, " ")
17852   if (arg[1] == "#") {
17853     defundef = arg[2]
17854     mac1 = arg[3]
17855   } else {
17856     defundef = substr(arg[1], 2)
17857     mac1 = arg[2]
17858   }
17859   split(mac1, mac2, "(") #)
17860   macro = mac2[1]
17861   prefix = substr(line, 1, index(line, defundef) - 1)
17862   if (D_is_set[macro]) {
17863     # Preserve the white space surrounding the "#".
17864     print prefix "define", macro P[macro] D[macro]
17865     next
17866   } else {
17867     # Replace #undef with comments.  This is necessary, for example,
17868     # in the case of _POSIX_SOURCE, which is predefined and required
17869     # on some systems where configure will not decide to define it.
17870     if (defundef == "undef") {
17871       print "/*", prefix defundef, macro, "*/"
17872       next
17873     }
17874   }
17875 }
17876 { print }
17877 _ACAWK
17878 _ACEOF
17879 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17880   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
17881 fi # test -n "$CONFIG_HEADERS"
17882
17883
17884 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS  :L $CONFIG_LINKS  :C $CONFIG_COMMANDS"
17885 shift
17886 for ac_tag
17887 do
17888   case $ac_tag in
17889   :[FHLC]) ac_mode=$ac_tag; continue;;
17890   esac
17891   case $ac_mode$ac_tag in
17892   :[FHL]*:*);;
17893   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
17894   :[FH]-) ac_tag=-:-;;
17895   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17896   esac
17897   ac_save_IFS=$IFS
17898   IFS=:
17899   set x $ac_tag
17900   IFS=$ac_save_IFS
17901   shift
17902   ac_file=$1
17903   shift
17904
17905   case $ac_mode in
17906   :L) ac_source=$1;;
17907   :[FH])
17908     ac_file_inputs=
17909     for ac_f
17910     do
17911       case $ac_f in
17912       -) ac_f="$ac_tmp/stdin";;
17913       *) # Look for the file first in the build tree, then in the source tree
17914          # (if the path is not absolute).  The absolute path cannot be DOS-style,
17915          # because $ac_f cannot contain `:'.
17916          test -f "$ac_f" ||
17917            case $ac_f in
17918            [\\/$]*) false;;
17919            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17920            esac ||
17921            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
17922       esac
17923       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17924       as_fn_append ac_file_inputs " '$ac_f'"
17925     done
17926
17927     # Let's still pretend it is `configure' which instantiates (i.e., don't
17928     # use $as_me), people would be surprised to read:
17929     #    /* config.h.  Generated by config.status.  */
17930     configure_input='Generated from '`
17931           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17932         `' by configure.'
17933     if test x"$ac_file" != x-; then
17934       configure_input="$ac_file.  $configure_input"
17935       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17936 $as_echo "$as_me: creating $ac_file" >&6;}
17937     fi
17938     # Neutralize special characters interpreted by sed in replacement strings.
17939     case $configure_input in #(
17940     *\&* | *\|* | *\\* )
17941        ac_sed_conf_input=`$as_echo "$configure_input" |
17942        sed 's/[\\\\&|]/\\\\&/g'`;; #(
17943     *) ac_sed_conf_input=$configure_input;;
17944     esac
17945
17946     case $ac_tag in
17947     *:-:* | *:-) cat >"$ac_tmp/stdin" \
17948       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
17949     esac
17950     ;;
17951   esac
17952
17953   ac_dir=`$as_dirname -- "$ac_file" ||
17954 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17955          X"$ac_file" : 'X\(//\)[^/]' \| \
17956          X"$ac_file" : 'X\(//\)$' \| \
17957          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
17958 $as_echo X"$ac_file" |
17959     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17960             s//\1/
17961             q
17962           }
17963           /^X\(\/\/\)[^/].*/{
17964             s//\1/
17965             q
17966           }
17967           /^X\(\/\/\)$/{
17968             s//\1/
17969             q
17970           }
17971           /^X\(\/\).*/{
17972             s//\1/
17973             q
17974           }
17975           s/.*/./; q'`
17976   as_dir="$ac_dir"; as_fn_mkdir_p
17977   ac_builddir=.
17978
17979 case "$ac_dir" in
17980 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17981 *)
17982   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
17983   # A ".." for each directory in $ac_dir_suffix.
17984   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
17985   case $ac_top_builddir_sub in
17986   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17987   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17988   esac ;;
17989 esac
17990 ac_abs_top_builddir=$ac_pwd
17991 ac_abs_builddir=$ac_pwd$ac_dir_suffix
17992 # for backward compatibility:
17993 ac_top_builddir=$ac_top_build_prefix
17994
17995 case $srcdir in
17996   .)  # We are building in place.
17997     ac_srcdir=.
17998     ac_top_srcdir=$ac_top_builddir_sub
17999     ac_abs_top_srcdir=$ac_pwd ;;
18000   [\\/]* | ?:[\\/]* )  # Absolute name.
18001     ac_srcdir=$srcdir$ac_dir_suffix;
18002     ac_top_srcdir=$srcdir
18003     ac_abs_top_srcdir=$srcdir ;;
18004   *) # Relative name.
18005     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18006     ac_top_srcdir=$ac_top_build_prefix$srcdir
18007     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
18008 esac
18009 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
18010
18011
18012   case $ac_mode in
18013   :F)
18014   #
18015   # CONFIG_FILE
18016   #
18017
18018   case $INSTALL in
18019   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
18020   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
18021   esac
18022   ac_MKDIR_P=$MKDIR_P
18023   case $MKDIR_P in
18024   [\\/$]* | ?:[\\/]* ) ;;
18025   */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
18026   esac
18027 _ACEOF
18028
18029 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18030 # If the template does not know about datarootdir, expand it.
18031 # FIXME: This hack should be removed a few years after 2.60.
18032 ac_datarootdir_hack=; ac_datarootdir_seen=
18033 ac_sed_dataroot='
18034 /datarootdir/ {
18035   p
18036   q
18037 }
18038 /@datadir@/p
18039 /@docdir@/p
18040 /@infodir@/p
18041 /@localedir@/p
18042 /@mandir@/p'
18043 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
18044 *datarootdir*) ac_datarootdir_seen=yes;;
18045 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
18046   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18047 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
18048 _ACEOF
18049 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18050   ac_datarootdir_hack='
18051   s&@datadir@&$datadir&g
18052   s&@docdir@&$docdir&g
18053   s&@infodir@&$infodir&g
18054   s&@localedir@&$localedir&g
18055   s&@mandir@&$mandir&g
18056   s&\\\${datarootdir}&$datarootdir&g' ;;
18057 esac
18058 _ACEOF
18059
18060 # Neutralize VPATH when `$srcdir' = `.'.
18061 # Shell code in configure.ac might set extrasub.
18062 # FIXME: do we really want to maintain this feature?
18063 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18064 ac_sed_extra="$ac_vpsub
18065 $extrasub
18066 _ACEOF
18067 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18068 :t
18069 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
18070 s|@configure_input@|$ac_sed_conf_input|;t t
18071 s&@top_builddir@&$ac_top_builddir_sub&;t t
18072 s&@top_build_prefix@&$ac_top_build_prefix&;t t
18073 s&@srcdir@&$ac_srcdir&;t t
18074 s&@abs_srcdir@&$ac_abs_srcdir&;t t
18075 s&@top_srcdir@&$ac_top_srcdir&;t t
18076 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18077 s&@builddir@&$ac_builddir&;t t
18078 s&@abs_builddir@&$ac_abs_builddir&;t t
18079 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18080 s&@INSTALL@&$ac_INSTALL&;t t
18081 s&@MKDIR_P@&$ac_MKDIR_P&;t t
18082 $ac_datarootdir_hack
18083 "
18084 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
18085   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
18086
18087 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
18088   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
18089   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
18090       "$ac_tmp/out"`; test -z "$ac_out"; } &&
18091   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
18092 which seems to be undefined.  Please make sure it is defined" >&5
18093 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
18094 which seems to be undefined.  Please make sure it is defined" >&2;}
18095
18096   rm -f "$ac_tmp/stdin"
18097   case $ac_file in
18098   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
18099   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
18100   esac \
18101   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
18102  ;;
18103   :H)
18104   #
18105   # CONFIG_HEADER
18106   #
18107   if test x"$ac_file" != x-; then
18108     {
18109       $as_echo "/* $configure_input  */" \
18110       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
18111     } >"$ac_tmp/config.h" \
18112       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
18113     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
18114       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18115 $as_echo "$as_me: $ac_file is unchanged" >&6;}
18116     else
18117       rm -f "$ac_file"
18118       mv "$ac_tmp/config.h" "$ac_file" \
18119         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
18120     fi
18121   else
18122     $as_echo "/* $configure_input  */" \
18123       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
18124       || as_fn_error $? "could not create -" "$LINENO" 5
18125   fi
18126  ;;
18127   :L)
18128   #
18129   # CONFIG_LINK
18130   #
18131
18132   if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
18133     :
18134   else
18135     # Prefer the file from the source tree if names are identical.
18136     if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
18137       ac_source=$srcdir/$ac_source
18138     fi
18139
18140     { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
18141 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
18142
18143     if test ! -r "$ac_source"; then
18144       as_fn_error $? "$ac_source: file not found" "$LINENO" 5
18145     fi
18146     rm -f "$ac_file"
18147
18148     # Try a relative symlink, then a hard link, then a copy.
18149     case $ac_source in
18150     [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
18151         *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
18152     esac
18153     ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
18154       ln "$ac_source" "$ac_file" 2>/dev/null ||
18155       cp -p "$ac_source" "$ac_file" ||
18156       as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
18157   fi
18158  ;;
18159   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
18160 $as_echo "$as_me: executing $ac_file commands" >&6;}
18161  ;;
18162   esac
18163
18164
18165   case $ac_file$ac_mode in
18166     "check_win32_symlinks":C)
18167 # Links sometimes fail undetected on Mingw -
18168 # so here we detect it and warn the user
18169 for FILE in $CONFIG_LINKS
18170  do
18171         # test -e works for symlinks in the MinGW console
18172         test -e `expr "$FILE" : '\([^:]*\)'` || { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** link for $FILE -- please fix by hand" >&5
18173 $as_echo "$as_me: WARNING: *** link for $FILE -- please fix by hand" >&2;}
18174  done
18175  ;;
18176     "src/include/pg_config.h":H)
18177 # Update timestamp for pg_config.h (see Makefile.global)
18178 echo >src/include/stamp-h
18179  ;;
18180     "src/include/pg_config_ext.h":H)
18181 # Update timestamp for pg_config_ext.h (see Makefile.global)
18182 echo >src/include/stamp-ext-h
18183  ;;
18184     "src/interfaces/ecpg/include/ecpg_config.h":H) echo >src/interfaces/ecpg/include/stamp-h ;;
18185
18186   esac
18187 done # for ac_tag
18188
18189
18190 as_fn_exit 0
18191 _ACEOF
18192 ac_clean_files=$ac_clean_files_save
18193
18194 test $ac_write_fail = 0 ||
18195   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
18196
18197
18198 # configure is writing to config.log, and then calls config.status.
18199 # config.status does its own redirection, appending to config.log.
18200 # Unfortunately, on DOS this fails, as config.log is still kept open
18201 # by configure, so config.status won't be able to write to it; its
18202 # output is simply discarded.  So we exec the FD to /dev/null,
18203 # effectively closing config.log, so it can be properly (re)opened and
18204 # appended to by config.status.  When coming back to configure, we
18205 # need to make the FD available again.
18206 if test "$no_create" != yes; then
18207   ac_cs_success=:
18208   ac_config_status_args=
18209   test "$silent" = yes &&
18210     ac_config_status_args="$ac_config_status_args --quiet"
18211   exec 5>/dev/null
18212   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
18213   exec 5>>config.log
18214   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18215   # would make configure fail if this is the last instruction.
18216   $ac_cs_success || as_fn_exit 1
18217 fi
18218 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18219   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18220 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
18221 fi
18222