]> granicus.if.org Git - postgresql/blob - configure
Don't zero opfuncid when reading nodes.
[postgresql] / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69 for PostgreSQL 9.6devel.
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-2015, 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='9.6devel'
586 PACKAGE_STRING='PostgreSQL 9.6devel'
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 OSX
633 XSLTPROC
634 XMLLINT
635 DBTOEPUB
636 COLLATEINDEX
637 DOCBOOKSTYLE
638 have_docbook
639 JADE
640 NSGMLS
641 TCL_SHLIB_LD_LIBS
642 TCL_SHARED_BUILD
643 TCL_LIB_SPEC
644 TCL_LIBS
645 TCL_INCLUDE_SPEC
646 TCL_CONFIG_SH
647 TCLSH
648 XGETTEXT
649 MSGMERGE
650 MSGFMT_FLAGS
651 MSGFMT
652 PG_CRC32C_OBJS
653 CFLAGS_SSE42
654 have_win32_dbghelp
655 HAVE_IPV6
656 LIBOBJS
657 UUID_LIBS
658 LDAP_LIBS_BE
659 LDAP_LIBS_FE
660 PTHREAD_CFLAGS
661 PTHREAD_LIBS
662 PTHREAD_CC
663 ax_pthread_config
664 ZIC
665 python_additional_libs
666 python_libspec
667 python_libdir
668 python_includespec
669 python_version
670 python_majorversion
671 PYTHON
672 perl_embed_ldflags
673 perl_useshrplib
674 perl_privlibexp
675 perl_archlibexp
676 PERL
677 FLEXFLAGS
678 FLEX
679 BISONFLAGS
680 BISON
681 MKDIR_P
682 AWK
683 LN_S
684 TAR
685 install_bin
686 INSTALL_DATA
687 INSTALL_SCRIPT
688 INSTALL_PROGRAM
689 WINDRES
690 DLLWRAP
691 DLLTOOL
692 AR
693 STRIP_SHARED_LIB
694 STRIP_STATIC_LIB
695 STRIP
696 RANLIB
697 ld_R_works
698 with_gnu_ld
699 LD
700 LDFLAGS_SL
701 LDFLAGS_EX
702 ELF_SYS
703 EGREP
704 GREP
705 with_zlib
706 with_system_tzdata
707 with_libxslt
708 with_libxml
709 XML2_CONFIG
710 UUID_EXTRA_OBJS
711 with_uuid
712 with_selinux
713 with_openssl
714 krb_srvtab
715 with_python
716 with_perl
717 with_tcl
718 enable_thread_safety
719 INCLUDES
720 autodepend
721 TAS
722 GCC
723 CPP
724 CFLAGS_VECTOR
725 SUN_STUDIO_CC
726 OBJEXT
727 EXEEXT
728 ac_ct_CC
729 CPPFLAGS
730 LDFLAGS
731 CFLAGS
732 CC
733 enable_tap_tests
734 enable_dtrace
735 DTRACEFLAGS
736 DTRACE
737 enable_coverage
738 GENHTML
739 LCOV
740 GCOV
741 enable_debug
742 enable_rpath
743 default_port
744 WANTED_LANGUAGES
745 enable_nls
746 PORTNAME
747 host_os
748 host_vendor
749 host_cpu
750 host
751 build_os
752 build_vendor
753 build_cpu
754 build
755 PG_MAJORVERSION
756 configure_args
757 target_alias
758 host_alias
759 build_alias
760 LIBS
761 ECHO_T
762 ECHO_N
763 ECHO_C
764 DEFS
765 mandir
766 localedir
767 libdir
768 psdir
769 pdfdir
770 dvidir
771 htmldir
772 infodir
773 docdir
774 oldincludedir
775 includedir
776 localstatedir
777 sharedstatedir
778 sysconfdir
779 datadir
780 datarootdir
781 libexecdir
782 sbindir
783 bindir
784 program_transform_name
785 prefix
786 exec_prefix
787 PACKAGE_URL
788 PACKAGE_BUGREPORT
789 PACKAGE_STRING
790 PACKAGE_VERSION
791 PACKAGE_TARNAME
792 PACKAGE_NAME
793 PATH_SEPARATOR
794 SHELL'
795 ac_subst_files=''
796 ac_user_opts='
797 enable_option_checking
798 with_extra_version
799 with_template
800 with_includes
801 with_libraries
802 with_libs
803 enable_integer_datetimes
804 enable_nls
805 with_pgport
806 enable_rpath
807 enable_spinlocks
808 enable_atomics
809 enable_debug
810 enable_profiling
811 enable_coverage
812 enable_dtrace
813 enable_tap_tests
814 with_blocksize
815 with_segsize
816 with_wal_blocksize
817 with_wal_segsize
818 with_CC
819 enable_depend
820 enable_cassert
821 enable_thread_safety
822 with_tcl
823 with_tclconfig
824 with_perl
825 with_python
826 with_gssapi
827 with_krb_srvnam
828 with_pam
829 with_ldap
830 with_bonjour
831 with_openssl
832 with_selinux
833 with_readline
834 with_libedit_preferred
835 with_uuid
836 with_ossp_uuid
837 with_libxml
838 with_libxslt
839 with_system_tzdata
840 with_zlib
841 with_gnu_ld
842 enable_largefile
843 enable_float4_byval
844 enable_float8_byval
845 '
846       ac_precious_vars='build_alias
847 host_alias
848 target_alias
849 CC
850 CFLAGS
851 LDFLAGS
852 LIBS
853 CPPFLAGS
854 CPP
855 LDFLAGS_EX
856 LDFLAGS_SL
857 DOCBOOKSTYLE'
858
859
860 # Initialize some variables set by options.
861 ac_init_help=
862 ac_init_version=false
863 ac_unrecognized_opts=
864 ac_unrecognized_sep=
865 # The variables have the same names as the options, with
866 # dashes changed to underlines.
867 cache_file=/dev/null
868 exec_prefix=NONE
869 no_create=
870 no_recursion=
871 prefix=NONE
872 program_prefix=NONE
873 program_suffix=NONE
874 program_transform_name=s,x,x,
875 silent=
876 site=
877 srcdir=
878 verbose=
879 x_includes=NONE
880 x_libraries=NONE
881
882 # Installation directory options.
883 # These are left unexpanded so users can "make install exec_prefix=/foo"
884 # and all the variables that are supposed to be based on exec_prefix
885 # by default will actually change.
886 # Use braces instead of parens because sh, perl, etc. also accept them.
887 # (The list follows the same order as the GNU Coding Standards.)
888 bindir='${exec_prefix}/bin'
889 sbindir='${exec_prefix}/sbin'
890 libexecdir='${exec_prefix}/libexec'
891 datarootdir='${prefix}/share'
892 datadir='${datarootdir}'
893 sysconfdir='${prefix}/etc'
894 sharedstatedir='${prefix}/com'
895 localstatedir='${prefix}/var'
896 includedir='${prefix}/include'
897 oldincludedir='/usr/include'
898 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
899 infodir='${datarootdir}/info'
900 htmldir='${docdir}'
901 dvidir='${docdir}'
902 pdfdir='${docdir}'
903 psdir='${docdir}'
904 libdir='${exec_prefix}/lib'
905 localedir='${datarootdir}/locale'
906 mandir='${datarootdir}/man'
907
908 ac_prev=
909 ac_dashdash=
910 for ac_option
911 do
912   # If the previous option needs an argument, assign it.
913   if test -n "$ac_prev"; then
914     eval $ac_prev=\$ac_option
915     ac_prev=
916     continue
917   fi
918
919   case $ac_option in
920   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
921   *=)   ac_optarg= ;;
922   *)    ac_optarg=yes ;;
923   esac
924
925   # Accept the important Cygnus configure options, so we can diagnose typos.
926
927   case $ac_dashdash$ac_option in
928   --)
929     ac_dashdash=yes ;;
930
931   -bindir | --bindir | --bindi | --bind | --bin | --bi)
932     ac_prev=bindir ;;
933   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
934     bindir=$ac_optarg ;;
935
936   -build | --build | --buil | --bui | --bu)
937     ac_prev=build_alias ;;
938   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
939     build_alias=$ac_optarg ;;
940
941   -cache-file | --cache-file | --cache-fil | --cache-fi \
942   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
943     ac_prev=cache_file ;;
944   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
945   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
946     cache_file=$ac_optarg ;;
947
948   --config-cache | -C)
949     cache_file=config.cache ;;
950
951   -datadir | --datadir | --datadi | --datad)
952     ac_prev=datadir ;;
953   -datadir=* | --datadir=* | --datadi=* | --datad=*)
954     datadir=$ac_optarg ;;
955
956   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
957   | --dataroo | --dataro | --datar)
958     ac_prev=datarootdir ;;
959   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
960   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
961     datarootdir=$ac_optarg ;;
962
963   -disable-* | --disable-*)
964     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
965     # Reject names that are not valid shell variable names.
966     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
967       as_fn_error $? "invalid feature name: $ac_useropt"
968     ac_useropt_orig=$ac_useropt
969     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
970     case $ac_user_opts in
971       *"
972 "enable_$ac_useropt"
973 "*) ;;
974       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
975          ac_unrecognized_sep=', ';;
976     esac
977     eval enable_$ac_useropt=no ;;
978
979   -docdir | --docdir | --docdi | --doc | --do)
980     ac_prev=docdir ;;
981   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
982     docdir=$ac_optarg ;;
983
984   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
985     ac_prev=dvidir ;;
986   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
987     dvidir=$ac_optarg ;;
988
989   -enable-* | --enable-*)
990     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
991     # Reject names that are not valid shell variable names.
992     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
993       as_fn_error $? "invalid feature name: $ac_useropt"
994     ac_useropt_orig=$ac_useropt
995     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
996     case $ac_user_opts in
997       *"
998 "enable_$ac_useropt"
999 "*) ;;
1000       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1001          ac_unrecognized_sep=', ';;
1002     esac
1003     eval enable_$ac_useropt=\$ac_optarg ;;
1004
1005   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1006   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1007   | --exec | --exe | --ex)
1008     ac_prev=exec_prefix ;;
1009   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1010   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1011   | --exec=* | --exe=* | --ex=*)
1012     exec_prefix=$ac_optarg ;;
1013
1014   -gas | --gas | --ga | --g)
1015     # Obsolete; use --with-gas.
1016     with_gas=yes ;;
1017
1018   -help | --help | --hel | --he | -h)
1019     ac_init_help=long ;;
1020   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1021     ac_init_help=recursive ;;
1022   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1023     ac_init_help=short ;;
1024
1025   -host | --host | --hos | --ho)
1026     ac_prev=host_alias ;;
1027   -host=* | --host=* | --hos=* | --ho=*)
1028     host_alias=$ac_optarg ;;
1029
1030   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1031     ac_prev=htmldir ;;
1032   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1033   | --ht=*)
1034     htmldir=$ac_optarg ;;
1035
1036   -includedir | --includedir | --includedi | --included | --include \
1037   | --includ | --inclu | --incl | --inc)
1038     ac_prev=includedir ;;
1039   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1040   | --includ=* | --inclu=* | --incl=* | --inc=*)
1041     includedir=$ac_optarg ;;
1042
1043   -infodir | --infodir | --infodi | --infod | --info | --inf)
1044     ac_prev=infodir ;;
1045   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1046     infodir=$ac_optarg ;;
1047
1048   -libdir | --libdir | --libdi | --libd)
1049     ac_prev=libdir ;;
1050   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1051     libdir=$ac_optarg ;;
1052
1053   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1054   | --libexe | --libex | --libe)
1055     ac_prev=libexecdir ;;
1056   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1057   | --libexe=* | --libex=* | --libe=*)
1058     libexecdir=$ac_optarg ;;
1059
1060   -localedir | --localedir | --localedi | --localed | --locale)
1061     ac_prev=localedir ;;
1062   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1063     localedir=$ac_optarg ;;
1064
1065   -localstatedir | --localstatedir | --localstatedi | --localstated \
1066   | --localstate | --localstat | --localsta | --localst | --locals)
1067     ac_prev=localstatedir ;;
1068   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1069   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1070     localstatedir=$ac_optarg ;;
1071
1072   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1073     ac_prev=mandir ;;
1074   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1075     mandir=$ac_optarg ;;
1076
1077   -nfp | --nfp | --nf)
1078     # Obsolete; use --without-fp.
1079     with_fp=no ;;
1080
1081   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1082   | --no-cr | --no-c | -n)
1083     no_create=yes ;;
1084
1085   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1086   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1087     no_recursion=yes ;;
1088
1089   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1090   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1091   | --oldin | --oldi | --old | --ol | --o)
1092     ac_prev=oldincludedir ;;
1093   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1094   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1095   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1096     oldincludedir=$ac_optarg ;;
1097
1098   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1099     ac_prev=prefix ;;
1100   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1101     prefix=$ac_optarg ;;
1102
1103   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1104   | --program-pre | --program-pr | --program-p)
1105     ac_prev=program_prefix ;;
1106   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1107   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1108     program_prefix=$ac_optarg ;;
1109
1110   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1111   | --program-suf | --program-su | --program-s)
1112     ac_prev=program_suffix ;;
1113   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1114   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1115     program_suffix=$ac_optarg ;;
1116
1117   -program-transform-name | --program-transform-name \
1118   | --program-transform-nam | --program-transform-na \
1119   | --program-transform-n | --program-transform- \
1120   | --program-transform | --program-transfor \
1121   | --program-transfo | --program-transf \
1122   | --program-trans | --program-tran \
1123   | --progr-tra | --program-tr | --program-t)
1124     ac_prev=program_transform_name ;;
1125   -program-transform-name=* | --program-transform-name=* \
1126   | --program-transform-nam=* | --program-transform-na=* \
1127   | --program-transform-n=* | --program-transform-=* \
1128   | --program-transform=* | --program-transfor=* \
1129   | --program-transfo=* | --program-transf=* \
1130   | --program-trans=* | --program-tran=* \
1131   | --progr-tra=* | --program-tr=* | --program-t=*)
1132     program_transform_name=$ac_optarg ;;
1133
1134   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1135     ac_prev=pdfdir ;;
1136   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1137     pdfdir=$ac_optarg ;;
1138
1139   -psdir | --psdir | --psdi | --psd | --ps)
1140     ac_prev=psdir ;;
1141   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1142     psdir=$ac_optarg ;;
1143
1144   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1145   | -silent | --silent | --silen | --sile | --sil)
1146     silent=yes ;;
1147
1148   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1149     ac_prev=sbindir ;;
1150   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1151   | --sbi=* | --sb=*)
1152     sbindir=$ac_optarg ;;
1153
1154   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1155   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1156   | --sharedst | --shareds | --shared | --share | --shar \
1157   | --sha | --sh)
1158     ac_prev=sharedstatedir ;;
1159   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1160   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1161   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1162   | --sha=* | --sh=*)
1163     sharedstatedir=$ac_optarg ;;
1164
1165   -site | --site | --sit)
1166     ac_prev=site ;;
1167   -site=* | --site=* | --sit=*)
1168     site=$ac_optarg ;;
1169
1170   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1171     ac_prev=srcdir ;;
1172   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1173     srcdir=$ac_optarg ;;
1174
1175   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1176   | --syscon | --sysco | --sysc | --sys | --sy)
1177     ac_prev=sysconfdir ;;
1178   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1179   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1180     sysconfdir=$ac_optarg ;;
1181
1182   -target | --target | --targe | --targ | --tar | --ta | --t)
1183     ac_prev=target_alias ;;
1184   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1185     target_alias=$ac_optarg ;;
1186
1187   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1188     verbose=yes ;;
1189
1190   -version | --version | --versio | --versi | --vers | -V)
1191     ac_init_version=: ;;
1192
1193   -with-* | --with-*)
1194     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1195     # Reject names that are not valid shell variable names.
1196     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1197       as_fn_error $? "invalid package name: $ac_useropt"
1198     ac_useropt_orig=$ac_useropt
1199     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1200     case $ac_user_opts in
1201       *"
1202 "with_$ac_useropt"
1203 "*) ;;
1204       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1205          ac_unrecognized_sep=', ';;
1206     esac
1207     eval with_$ac_useropt=\$ac_optarg ;;
1208
1209   -without-* | --without-*)
1210     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1211     # Reject names that are not valid shell variable names.
1212     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1213       as_fn_error $? "invalid package name: $ac_useropt"
1214     ac_useropt_orig=$ac_useropt
1215     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1216     case $ac_user_opts in
1217       *"
1218 "with_$ac_useropt"
1219 "*) ;;
1220       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1221          ac_unrecognized_sep=', ';;
1222     esac
1223     eval with_$ac_useropt=no ;;
1224
1225   --x)
1226     # Obsolete; use --with-x.
1227     with_x=yes ;;
1228
1229   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1230   | --x-incl | --x-inc | --x-in | --x-i)
1231     ac_prev=x_includes ;;
1232   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1233   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1234     x_includes=$ac_optarg ;;
1235
1236   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1237   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1238     ac_prev=x_libraries ;;
1239   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1240   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1241     x_libraries=$ac_optarg ;;
1242
1243   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1244 Try \`$0 --help' for more information"
1245     ;;
1246
1247   *=*)
1248     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1249     # Reject names that are not valid shell variable names.
1250     case $ac_envvar in #(
1251       '' | [0-9]* | *[!_$as_cr_alnum]* )
1252       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1253     esac
1254     eval $ac_envvar=\$ac_optarg
1255     export $ac_envvar ;;
1256
1257   *)
1258     # FIXME: should be removed in autoconf 3.0.
1259     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1260     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1261       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1262     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1263     ;;
1264
1265   esac
1266 done
1267
1268 if test -n "$ac_prev"; then
1269   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1270   as_fn_error $? "missing argument to $ac_option"
1271 fi
1272
1273 if test -n "$ac_unrecognized_opts"; then
1274   case $enable_option_checking in
1275     no) ;;
1276     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1277     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1278   esac
1279 fi
1280
1281 # Check all directory arguments for consistency.
1282 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1283                 datadir sysconfdir sharedstatedir localstatedir includedir \
1284                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1285                 libdir localedir mandir
1286 do
1287   eval ac_val=\$$ac_var
1288   # Remove trailing slashes.
1289   case $ac_val in
1290     */ )
1291       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1292       eval $ac_var=\$ac_val;;
1293   esac
1294   # Be sure to have absolute directory names.
1295   case $ac_val in
1296     [\\/$]* | ?:[\\/]* )  continue;;
1297     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1298   esac
1299   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1300 done
1301
1302 # There might be people who depend on the old broken behavior: `$host'
1303 # used to hold the argument of --host etc.
1304 # FIXME: To remove some day.
1305 build=$build_alias
1306 host=$host_alias
1307 target=$target_alias
1308
1309 # FIXME: To remove some day.
1310 if test "x$host_alias" != x; then
1311   if test "x$build_alias" = x; then
1312     cross_compiling=maybe
1313   elif test "x$build_alias" != "x$host_alias"; then
1314     cross_compiling=yes
1315   fi
1316 fi
1317
1318 ac_tool_prefix=
1319 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1320
1321 test "$silent" = yes && exec 6>/dev/null
1322
1323
1324 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1325 ac_ls_di=`ls -di .` &&
1326 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1327   as_fn_error $? "working directory cannot be determined"
1328 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1329   as_fn_error $? "pwd does not report name of working directory"
1330
1331
1332 # Find the source files, if location was not specified.
1333 if test -z "$srcdir"; then
1334   ac_srcdir_defaulted=yes
1335   # Try the directory containing this script, then the parent directory.
1336   ac_confdir=`$as_dirname -- "$as_myself" ||
1337 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1338          X"$as_myself" : 'X\(//\)[^/]' \| \
1339          X"$as_myself" : 'X\(//\)$' \| \
1340          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1341 $as_echo X"$as_myself" |
1342     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1343             s//\1/
1344             q
1345           }
1346           /^X\(\/\/\)[^/].*/{
1347             s//\1/
1348             q
1349           }
1350           /^X\(\/\/\)$/{
1351             s//\1/
1352             q
1353           }
1354           /^X\(\/\).*/{
1355             s//\1/
1356             q
1357           }
1358           s/.*/./; q'`
1359   srcdir=$ac_confdir
1360   if test ! -r "$srcdir/$ac_unique_file"; then
1361     srcdir=..
1362   fi
1363 else
1364   ac_srcdir_defaulted=no
1365 fi
1366 if test ! -r "$srcdir/$ac_unique_file"; then
1367   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1368   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1369 fi
1370 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1371 ac_abs_confdir=`(
1372         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1373         pwd)`
1374 # When building in place, set srcdir=.
1375 if test "$ac_abs_confdir" = "$ac_pwd"; then
1376   srcdir=.
1377 fi
1378 # Remove unnecessary trailing slashes from srcdir.
1379 # Double slashes in file names in object file debugging info
1380 # mess up M-x gdb in Emacs.
1381 case $srcdir in
1382 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1383 esac
1384 for ac_var in $ac_precious_vars; do
1385   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1386   eval ac_env_${ac_var}_value=\$${ac_var}
1387   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1388   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1389 done
1390
1391 #
1392 # Report the --help message.
1393 #
1394 if test "$ac_init_help" = "long"; then
1395   # Omit some internal or obsolete options to make the list less imposing.
1396   # This message is too long to be a string in the A/UX 3.1 sh.
1397   cat <<_ACEOF
1398 \`configure' configures PostgreSQL 9.6devel to adapt to many kinds of systems.
1399
1400 Usage: $0 [OPTION]... [VAR=VALUE]...
1401
1402 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1403 VAR=VALUE.  See below for descriptions of some of the useful variables.
1404
1405 Defaults for the options are specified in brackets.
1406
1407 Configuration:
1408   -h, --help              display this help and exit
1409       --help=short        display options specific to this package
1410       --help=recursive    display the short help of all the included packages
1411   -V, --version           display version information and exit
1412   -q, --quiet, --silent   do not print \`checking ...' messages
1413       --cache-file=FILE   cache test results in FILE [disabled]
1414   -C, --config-cache      alias for \`--cache-file=config.cache'
1415   -n, --no-create         do not create output files
1416       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1417
1418 Installation directories:
1419   --prefix=PREFIX         install architecture-independent files in PREFIX
1420                           [$ac_default_prefix]
1421   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1422                           [PREFIX]
1423
1424 By default, \`make install' will install all the files in
1425 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1426 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1427 for instance \`--prefix=\$HOME'.
1428
1429 For better control, use the options below.
1430
1431 Fine tuning of the installation directories:
1432   --bindir=DIR            user executables [EPREFIX/bin]
1433   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1434   --libexecdir=DIR        program executables [EPREFIX/libexec]
1435   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1436   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1437   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1438   --libdir=DIR            object code libraries [EPREFIX/lib]
1439   --includedir=DIR        C header files [PREFIX/include]
1440   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1441   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1442   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1443   --infodir=DIR           info documentation [DATAROOTDIR/info]
1444   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1445   --mandir=DIR            man documentation [DATAROOTDIR/man]
1446   --docdir=DIR            documentation root [DATAROOTDIR/doc/postgresql]
1447   --htmldir=DIR           html documentation [DOCDIR]
1448   --dvidir=DIR            dvi documentation [DOCDIR]
1449   --pdfdir=DIR            pdf documentation [DOCDIR]
1450   --psdir=DIR             ps documentation [DOCDIR]
1451 _ACEOF
1452
1453   cat <<\_ACEOF
1454
1455 System types:
1456   --build=BUILD     configure for building on BUILD [guessed]
1457   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1458 _ACEOF
1459 fi
1460
1461 if test -n "$ac_init_help"; then
1462   case $ac_init_help in
1463      short | recursive ) echo "Configuration of PostgreSQL 9.6devel:";;
1464    esac
1465   cat <<\_ACEOF
1466
1467 Optional Features:
1468   --disable-option-checking  ignore unrecognized --enable/--with options
1469   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1470   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1471   --disable-integer-datetimes
1472                           disable 64-bit integer date/time support
1473   --enable-nls[=LANGUAGES]
1474                           enable Native Language Support
1475   --disable-rpath         do not embed shared library search path in
1476                           executables
1477   --disable-spinlocks     do not use spinlocks
1478   --disable-atomics       do not use atomic operations
1479   --enable-debug          build with debugging symbols (-g)
1480   --enable-profiling      build with profiling enabled
1481   --enable-coverage       build with coverage testing instrumentation
1482   --enable-dtrace         build with DTrace support
1483   --enable-tap-tests      enable TAP tests (requires Perl and IPC::Run)
1484   --enable-depend         turn on automatic dependency tracking
1485   --enable-cassert        enable assertion checks (for debugging)
1486   --disable-thread-safety disable thread-safety in client libraries
1487   --disable-largefile     omit support for large files
1488   --disable-float4-byval  disable float4 passed by value
1489   --disable-float8-byval  disable float8 passed by value
1490
1491 Optional Packages:
1492   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1493   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1494   --with-extra-version=STRING
1495                           append STRING to version
1496   --with-template=NAME    override operating system template
1497   --with-includes=DIRS    look for additional header files in DIRS
1498   --with-libraries=DIRS   look for additional libraries in DIRS
1499   --with-libs=DIRS        alternative spelling of --with-libraries
1500   --with-pgport=PORTNUM   set default port number [5432]
1501   --with-blocksize=BLOCKSIZE
1502                           set table block size in kB [8]
1503   --with-segsize=SEGSIZE  set table segment size in GB [1]
1504   --with-wal-blocksize=BLOCKSIZE
1505                           set WAL block size in kB [8]
1506   --with-wal-segsize=SEGSIZE
1507                           set WAL segment size in MB [16]
1508   --with-CC=CMD           set compiler (deprecated)
1509   --with-tcl              build Tcl modules (PL/Tcl)
1510   --with-tclconfig=DIR    tclConfig.sh is in DIR
1511   --with-perl             build Perl modules (PL/Perl)
1512   --with-python           build Python modules (PL/Python)
1513   --with-gssapi           build with GSSAPI support
1514   --with-krb-srvnam=NAME  default service principal name in Kerberos (GSSAPI)
1515                           [postgres]
1516   --with-pam              build with PAM support
1517   --with-ldap             build with LDAP support
1518   --with-bonjour          build with Bonjour support
1519   --with-openssl          build with OpenSSL support
1520   --with-selinux          build with SELinux support
1521   --without-readline      do not use GNU Readline nor BSD Libedit for editing
1522   --with-libedit-preferred
1523                           prefer BSD Libedit over GNU Readline
1524   --with-uuid=LIB         build contrib/uuid-ossp using LIB (bsd,e2fs,ossp)
1525   --with-ossp-uuid        obsolete spelling of --with-uuid=ossp
1526   --with-libxml           build with XML support
1527   --with-libxslt          use XSLT support when building contrib/xml2
1528   --with-system-tzdata=DIR
1529                           use system time zone data in DIR
1530   --without-zlib          do not use Zlib
1531   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1532
1533 Some influential environment variables:
1534   CC          C compiler command
1535   CFLAGS      C compiler flags
1536   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1537               nonstandard directory <lib dir>
1538   LIBS        libraries to pass to the linker, e.g. -l<library>
1539   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1540               you have headers in a nonstandard directory <include dir>
1541   CPP         C preprocessor
1542   LDFLAGS_EX  extra linker flags for linking executables only
1543   LDFLAGS_SL  extra linker flags for linking shared libraries only
1544   DOCBOOKSTYLE
1545               location of DocBook stylesheets
1546
1547 Use these variables to override the choices made by `configure' or to help
1548 it to find libraries and programs with nonstandard names/locations.
1549
1550 Report bugs to <pgsql-bugs@postgresql.org>.
1551 _ACEOF
1552 ac_status=$?
1553 fi
1554
1555 if test "$ac_init_help" = "recursive"; then
1556   # If there are subdirs, report their specific --help.
1557   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1558     test -d "$ac_dir" ||
1559       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1560       continue
1561     ac_builddir=.
1562
1563 case "$ac_dir" in
1564 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1565 *)
1566   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1567   # A ".." for each directory in $ac_dir_suffix.
1568   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1569   case $ac_top_builddir_sub in
1570   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1571   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1572   esac ;;
1573 esac
1574 ac_abs_top_builddir=$ac_pwd
1575 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1576 # for backward compatibility:
1577 ac_top_builddir=$ac_top_build_prefix
1578
1579 case $srcdir in
1580   .)  # We are building in place.
1581     ac_srcdir=.
1582     ac_top_srcdir=$ac_top_builddir_sub
1583     ac_abs_top_srcdir=$ac_pwd ;;
1584   [\\/]* | ?:[\\/]* )  # Absolute name.
1585     ac_srcdir=$srcdir$ac_dir_suffix;
1586     ac_top_srcdir=$srcdir
1587     ac_abs_top_srcdir=$srcdir ;;
1588   *) # Relative name.
1589     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1590     ac_top_srcdir=$ac_top_build_prefix$srcdir
1591     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1592 esac
1593 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1594
1595     cd "$ac_dir" || { ac_status=$?; continue; }
1596     # Check for guested configure.
1597     if test -f "$ac_srcdir/configure.gnu"; then
1598       echo &&
1599       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1600     elif test -f "$ac_srcdir/configure"; then
1601       echo &&
1602       $SHELL "$ac_srcdir/configure" --help=recursive
1603     else
1604       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1605     fi || ac_status=$?
1606     cd "$ac_pwd" || { ac_status=$?; break; }
1607   done
1608 fi
1609
1610 test -n "$ac_init_help" && exit $ac_status
1611 if $ac_init_version; then
1612   cat <<\_ACEOF
1613 PostgreSQL configure 9.6devel
1614 generated by GNU Autoconf 2.69
1615
1616 Copyright (C) 2012 Free Software Foundation, Inc.
1617 This configure script is free software; the Free Software Foundation
1618 gives unlimited permission to copy, distribute and modify it.
1619
1620 Copyright (c) 1996-2015, PostgreSQL Global Development Group
1621 _ACEOF
1622   exit
1623 fi
1624
1625 ## ------------------------ ##
1626 ## Autoconf initialization. ##
1627 ## ------------------------ ##
1628
1629 # ac_fn_c_try_compile LINENO
1630 # --------------------------
1631 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1632 ac_fn_c_try_compile ()
1633 {
1634   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1635   rm -f conftest.$ac_objext
1636   if { { ac_try="$ac_compile"
1637 case "(($ac_try" in
1638   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1639   *) ac_try_echo=$ac_try;;
1640 esac
1641 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1642 $as_echo "$ac_try_echo"; } >&5
1643   (eval "$ac_compile") 2>conftest.err
1644   ac_status=$?
1645   if test -s conftest.err; then
1646     grep -v '^ *+' conftest.err >conftest.er1
1647     cat conftest.er1 >&5
1648     mv -f conftest.er1 conftest.err
1649   fi
1650   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1651   test $ac_status = 0; } && {
1652          test -z "$ac_c_werror_flag" ||
1653          test ! -s conftest.err
1654        } && test -s conftest.$ac_objext; then :
1655   ac_retval=0
1656 else
1657   $as_echo "$as_me: failed program was:" >&5
1658 sed 's/^/| /' conftest.$ac_ext >&5
1659
1660         ac_retval=1
1661 fi
1662   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1663   as_fn_set_status $ac_retval
1664
1665 } # ac_fn_c_try_compile
1666
1667 # ac_fn_c_try_link LINENO
1668 # -----------------------
1669 # Try to link conftest.$ac_ext, and return whether this succeeded.
1670 ac_fn_c_try_link ()
1671 {
1672   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1673   rm -f conftest.$ac_objext conftest$ac_exeext
1674   if { { ac_try="$ac_link"
1675 case "(($ac_try" in
1676   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1677   *) ac_try_echo=$ac_try;;
1678 esac
1679 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1680 $as_echo "$ac_try_echo"; } >&5
1681   (eval "$ac_link") 2>conftest.err
1682   ac_status=$?
1683   if test -s conftest.err; then
1684     grep -v '^ *+' conftest.err >conftest.er1
1685     cat conftest.er1 >&5
1686     mv -f conftest.er1 conftest.err
1687   fi
1688   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1689   test $ac_status = 0; } && {
1690          test -z "$ac_c_werror_flag" ||
1691          test ! -s conftest.err
1692        } && test -s conftest$ac_exeext && {
1693          test "$cross_compiling" = yes ||
1694          test -x conftest$ac_exeext
1695        }; then :
1696   ac_retval=0
1697 else
1698   $as_echo "$as_me: failed program was:" >&5
1699 sed 's/^/| /' conftest.$ac_ext >&5
1700
1701         ac_retval=1
1702 fi
1703   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1704   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1705   # interfere with the next link command; also delete a directory that is
1706   # left behind by Apple's compiler.  We do this before executing the actions.
1707   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1708   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1709   as_fn_set_status $ac_retval
1710
1711 } # ac_fn_c_try_link
1712
1713 # ac_fn_c_try_cpp LINENO
1714 # ----------------------
1715 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1716 ac_fn_c_try_cpp ()
1717 {
1718   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1719   if { { ac_try="$ac_cpp conftest.$ac_ext"
1720 case "(($ac_try" in
1721   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1722   *) ac_try_echo=$ac_try;;
1723 esac
1724 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1725 $as_echo "$ac_try_echo"; } >&5
1726   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1727   ac_status=$?
1728   if test -s conftest.err; then
1729     grep -v '^ *+' conftest.err >conftest.er1
1730     cat conftest.er1 >&5
1731     mv -f conftest.er1 conftest.err
1732   fi
1733   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1734   test $ac_status = 0; } > conftest.i && {
1735          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1736          test ! -s conftest.err
1737        }; then :
1738   ac_retval=0
1739 else
1740   $as_echo "$as_me: failed program was:" >&5
1741 sed 's/^/| /' conftest.$ac_ext >&5
1742
1743     ac_retval=1
1744 fi
1745   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1746   as_fn_set_status $ac_retval
1747
1748 } # ac_fn_c_try_cpp
1749
1750 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1751 # -------------------------------------------------------
1752 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1753 # the include files in INCLUDES and setting the cache variable VAR
1754 # accordingly.
1755 ac_fn_c_check_header_mongrel ()
1756 {
1757   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1758   if eval \${$3+:} false; then :
1759   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1760 $as_echo_n "checking for $2... " >&6; }
1761 if eval \${$3+:} false; then :
1762   $as_echo_n "(cached) " >&6
1763 fi
1764 eval ac_res=\$$3
1765                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1766 $as_echo "$ac_res" >&6; }
1767 else
1768   # Is the header compilable?
1769 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1770 $as_echo_n "checking $2 usability... " >&6; }
1771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1772 /* end confdefs.h.  */
1773 $4
1774 #include <$2>
1775 _ACEOF
1776 if ac_fn_c_try_compile "$LINENO"; then :
1777   ac_header_compiler=yes
1778 else
1779   ac_header_compiler=no
1780 fi
1781 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1783 $as_echo "$ac_header_compiler" >&6; }
1784
1785 # Is the header present?
1786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1787 $as_echo_n "checking $2 presence... " >&6; }
1788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1789 /* end confdefs.h.  */
1790 #include <$2>
1791 _ACEOF
1792 if ac_fn_c_try_cpp "$LINENO"; then :
1793   ac_header_preproc=yes
1794 else
1795   ac_header_preproc=no
1796 fi
1797 rm -f conftest.err conftest.i conftest.$ac_ext
1798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1799 $as_echo "$ac_header_preproc" >&6; }
1800
1801 # So?  What about this header?
1802 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1803   yes:no: )
1804     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1805 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1806     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1807 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1808     ;;
1809   no:yes:* )
1810     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1811 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1812     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1813 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1814     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1815 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1816     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1817 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1818     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1819 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1820 ( $as_echo "## ---------------------------------------- ##
1821 ## Report this to pgsql-bugs@postgresql.org ##
1822 ## ---------------------------------------- ##"
1823      ) | sed "s/^/$as_me: WARNING:     /" >&2
1824     ;;
1825 esac
1826   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1827 $as_echo_n "checking for $2... " >&6; }
1828 if eval \${$3+:} false; then :
1829   $as_echo_n "(cached) " >&6
1830 else
1831   eval "$3=\$ac_header_compiler"
1832 fi
1833 eval ac_res=\$$3
1834                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1835 $as_echo "$ac_res" >&6; }
1836 fi
1837   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1838
1839 } # ac_fn_c_check_header_mongrel
1840
1841 # ac_fn_c_try_run LINENO
1842 # ----------------------
1843 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1844 # that executables *can* be run.
1845 ac_fn_c_try_run ()
1846 {
1847   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1848   if { { ac_try="$ac_link"
1849 case "(($ac_try" in
1850   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1851   *) ac_try_echo=$ac_try;;
1852 esac
1853 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1854 $as_echo "$ac_try_echo"; } >&5
1855   (eval "$ac_link") 2>&5
1856   ac_status=$?
1857   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1858   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1859   { { case "(($ac_try" in
1860   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1861   *) ac_try_echo=$ac_try;;
1862 esac
1863 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1864 $as_echo "$ac_try_echo"; } >&5
1865   (eval "$ac_try") 2>&5
1866   ac_status=$?
1867   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1868   test $ac_status = 0; }; }; then :
1869   ac_retval=0
1870 else
1871   $as_echo "$as_me: program exited with status $ac_status" >&5
1872        $as_echo "$as_me: failed program was:" >&5
1873 sed 's/^/| /' conftest.$ac_ext >&5
1874
1875        ac_retval=$ac_status
1876 fi
1877   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1878   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1879   as_fn_set_status $ac_retval
1880
1881 } # ac_fn_c_try_run
1882
1883 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1884 # -------------------------------------------------------
1885 # Tests whether HEADER exists and can be compiled using the include files in
1886 # INCLUDES, setting the cache variable VAR accordingly.
1887 ac_fn_c_check_header_compile ()
1888 {
1889   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1890   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1891 $as_echo_n "checking for $2... " >&6; }
1892 if eval \${$3+:} false; then :
1893   $as_echo_n "(cached) " >&6
1894 else
1895   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1896 /* end confdefs.h.  */
1897 $4
1898 #include <$2>
1899 _ACEOF
1900 if ac_fn_c_try_compile "$LINENO"; then :
1901   eval "$3=yes"
1902 else
1903   eval "$3=no"
1904 fi
1905 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1906 fi
1907 eval ac_res=\$$3
1908                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1909 $as_echo "$ac_res" >&6; }
1910   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1911
1912 } # ac_fn_c_check_header_compile
1913
1914 # ac_fn_c_check_func LINENO FUNC VAR
1915 # ----------------------------------
1916 # Tests whether FUNC exists, setting the cache variable VAR accordingly
1917 ac_fn_c_check_func ()
1918 {
1919   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1920   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1921 $as_echo_n "checking for $2... " >&6; }
1922 if eval \${$3+:} false; then :
1923   $as_echo_n "(cached) " >&6
1924 else
1925   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1926 /* end confdefs.h.  */
1927 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1928    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
1929 #define $2 innocuous_$2
1930
1931 /* System header to define __stub macros and hopefully few prototypes,
1932     which can conflict with char $2 (); below.
1933     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1934     <limits.h> exists even on freestanding compilers.  */
1935
1936 #ifdef __STDC__
1937 # include <limits.h>
1938 #else
1939 # include <assert.h>
1940 #endif
1941
1942 #undef $2
1943
1944 /* Override any GCC internal prototype to avoid an error.
1945    Use char because int might match the return type of a GCC
1946    builtin and then its argument prototype would still apply.  */
1947 #ifdef __cplusplus
1948 extern "C"
1949 #endif
1950 char $2 ();
1951 /* The GNU C library defines this for functions which it implements
1952     to always fail with ENOSYS.  Some functions are actually named
1953     something starting with __ and the normal name is an alias.  */
1954 #if defined __stub_$2 || defined __stub___$2
1955 choke me
1956 #endif
1957
1958 int
1959 main ()
1960 {
1961 return $2 ();
1962   ;
1963   return 0;
1964 }
1965 _ACEOF
1966 if ac_fn_c_try_link "$LINENO"; then :
1967   eval "$3=yes"
1968 else
1969   eval "$3=no"
1970 fi
1971 rm -f core conftest.err conftest.$ac_objext \
1972     conftest$ac_exeext conftest.$ac_ext
1973 fi
1974 eval ac_res=\$$3
1975                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1976 $as_echo "$ac_res" >&6; }
1977   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1978
1979 } # ac_fn_c_check_func
1980
1981 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
1982 # ----------------------------------------------------
1983 # Tries to find if the field MEMBER exists in type AGGR, after including
1984 # INCLUDES, setting cache variable VAR accordingly.
1985 ac_fn_c_check_member ()
1986 {
1987   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1988   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
1989 $as_echo_n "checking for $2.$3... " >&6; }
1990 if eval \${$4+:} false; then :
1991   $as_echo_n "(cached) " >&6
1992 else
1993   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1994 /* end confdefs.h.  */
1995 $5
1996 int
1997 main ()
1998 {
1999 static $2 ac_aggr;
2000 if (ac_aggr.$3)
2001 return 0;
2002   ;
2003   return 0;
2004 }
2005 _ACEOF
2006 if ac_fn_c_try_compile "$LINENO"; then :
2007   eval "$4=yes"
2008 else
2009   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2010 /* end confdefs.h.  */
2011 $5
2012 int
2013 main ()
2014 {
2015 static $2 ac_aggr;
2016 if (sizeof ac_aggr.$3)
2017 return 0;
2018   ;
2019   return 0;
2020 }
2021 _ACEOF
2022 if ac_fn_c_try_compile "$LINENO"; then :
2023   eval "$4=yes"
2024 else
2025   eval "$4=no"
2026 fi
2027 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2028 fi
2029 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2030 fi
2031 eval ac_res=\$$4
2032                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2033 $as_echo "$ac_res" >&6; }
2034   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2035
2036 } # ac_fn_c_check_member
2037
2038 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2039 # -------------------------------------------
2040 # Tests whether TYPE exists after having included INCLUDES, setting cache
2041 # variable VAR accordingly.
2042 ac_fn_c_check_type ()
2043 {
2044   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2045   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2046 $as_echo_n "checking for $2... " >&6; }
2047 if eval \${$3+:} false; then :
2048   $as_echo_n "(cached) " >&6
2049 else
2050   eval "$3=no"
2051   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2052 /* end confdefs.h.  */
2053 $4
2054 int
2055 main ()
2056 {
2057 if (sizeof ($2))
2058          return 0;
2059   ;
2060   return 0;
2061 }
2062 _ACEOF
2063 if ac_fn_c_try_compile "$LINENO"; then :
2064   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2065 /* end confdefs.h.  */
2066 $4
2067 int
2068 main ()
2069 {
2070 if (sizeof (($2)))
2071             return 0;
2072   ;
2073   return 0;
2074 }
2075 _ACEOF
2076 if ac_fn_c_try_compile "$LINENO"; then :
2077
2078 else
2079   eval "$3=yes"
2080 fi
2081 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2082 fi
2083 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2084 fi
2085 eval ac_res=\$$3
2086                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2087 $as_echo "$ac_res" >&6; }
2088   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2089
2090 } # ac_fn_c_check_type
2091
2092 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2093 # --------------------------------------------
2094 # Tries to find the compile-time value of EXPR in a program that includes
2095 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2096 # computed
2097 ac_fn_c_compute_int ()
2098 {
2099   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2100   if test "$cross_compiling" = yes; then
2101     # Depending upon the size, compute the lo and hi bounds.
2102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2103 /* end confdefs.h.  */
2104 $4
2105 int
2106 main ()
2107 {
2108 static int test_array [1 - 2 * !(($2) >= 0)];
2109 test_array [0] = 0;
2110 return test_array [0];
2111
2112   ;
2113   return 0;
2114 }
2115 _ACEOF
2116 if ac_fn_c_try_compile "$LINENO"; then :
2117   ac_lo=0 ac_mid=0
2118   while :; do
2119     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2120 /* end confdefs.h.  */
2121 $4
2122 int
2123 main ()
2124 {
2125 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2126 test_array [0] = 0;
2127 return test_array [0];
2128
2129   ;
2130   return 0;
2131 }
2132 _ACEOF
2133 if ac_fn_c_try_compile "$LINENO"; then :
2134   ac_hi=$ac_mid; break
2135 else
2136   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2137                         if test $ac_lo -le $ac_mid; then
2138                           ac_lo= ac_hi=
2139                           break
2140                         fi
2141                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2142 fi
2143 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2144   done
2145 else
2146   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2147 /* end confdefs.h.  */
2148 $4
2149 int
2150 main ()
2151 {
2152 static int test_array [1 - 2 * !(($2) < 0)];
2153 test_array [0] = 0;
2154 return test_array [0];
2155
2156   ;
2157   return 0;
2158 }
2159 _ACEOF
2160 if ac_fn_c_try_compile "$LINENO"; then :
2161   ac_hi=-1 ac_mid=-1
2162   while :; do
2163     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2164 /* end confdefs.h.  */
2165 $4
2166 int
2167 main ()
2168 {
2169 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2170 test_array [0] = 0;
2171 return test_array [0];
2172
2173   ;
2174   return 0;
2175 }
2176 _ACEOF
2177 if ac_fn_c_try_compile "$LINENO"; then :
2178   ac_lo=$ac_mid; break
2179 else
2180   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2181                         if test $ac_mid -le $ac_hi; then
2182                           ac_lo= ac_hi=
2183                           break
2184                         fi
2185                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2186 fi
2187 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2188   done
2189 else
2190   ac_lo= ac_hi=
2191 fi
2192 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2193 fi
2194 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2195 # Binary search between lo and hi bounds.
2196 while test "x$ac_lo" != "x$ac_hi"; do
2197   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2198   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2199 /* end confdefs.h.  */
2200 $4
2201 int
2202 main ()
2203 {
2204 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2205 test_array [0] = 0;
2206 return test_array [0];
2207
2208   ;
2209   return 0;
2210 }
2211 _ACEOF
2212 if ac_fn_c_try_compile "$LINENO"; then :
2213   ac_hi=$ac_mid
2214 else
2215   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2216 fi
2217 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2218 done
2219 case $ac_lo in #((
2220 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2221 '') ac_retval=1 ;;
2222 esac
2223   else
2224     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2225 /* end confdefs.h.  */
2226 $4
2227 static long int longval () { return $2; }
2228 static unsigned long int ulongval () { return $2; }
2229 #include <stdio.h>
2230 #include <stdlib.h>
2231 int
2232 main ()
2233 {
2234
2235   FILE *f = fopen ("conftest.val", "w");
2236   if (! f)
2237     return 1;
2238   if (($2) < 0)
2239     {
2240       long int i = longval ();
2241       if (i != ($2))
2242         return 1;
2243       fprintf (f, "%ld", i);
2244     }
2245   else
2246     {
2247       unsigned long int i = ulongval ();
2248       if (i != ($2))
2249         return 1;
2250       fprintf (f, "%lu", i);
2251     }
2252   /* Do not output a trailing newline, as this causes \r\n confusion
2253      on some platforms.  */
2254   return ferror (f) || fclose (f) != 0;
2255
2256   ;
2257   return 0;
2258 }
2259 _ACEOF
2260 if ac_fn_c_try_run "$LINENO"; then :
2261   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2262 else
2263   ac_retval=1
2264 fi
2265 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2266   conftest.$ac_objext conftest.beam conftest.$ac_ext
2267 rm -f conftest.val
2268
2269   fi
2270   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2271   as_fn_set_status $ac_retval
2272
2273 } # ac_fn_c_compute_int
2274
2275 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2276 # ---------------------------------------------
2277 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2278 # accordingly.
2279 ac_fn_c_check_decl ()
2280 {
2281   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2282   as_decl_name=`echo $2|sed 's/ *(.*//'`
2283   as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2284   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2285 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2286 if eval \${$3+:} false; then :
2287   $as_echo_n "(cached) " >&6
2288 else
2289   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2290 /* end confdefs.h.  */
2291 $4
2292 int
2293 main ()
2294 {
2295 #ifndef $as_decl_name
2296 #ifdef __cplusplus
2297   (void) $as_decl_use;
2298 #else
2299   (void) $as_decl_name;
2300 #endif
2301 #endif
2302
2303   ;
2304   return 0;
2305 }
2306 _ACEOF
2307 if ac_fn_c_try_compile "$LINENO"; then :
2308   eval "$3=yes"
2309 else
2310   eval "$3=no"
2311 fi
2312 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2313 fi
2314 eval ac_res=\$$3
2315                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2316 $as_echo "$ac_res" >&6; }
2317   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2318
2319 } # ac_fn_c_check_decl
2320 cat >config.log <<_ACEOF
2321 This file contains any messages produced by compilers while
2322 running configure, to aid debugging if configure makes a mistake.
2323
2324 It was created by PostgreSQL $as_me 9.6devel, which was
2325 generated by GNU Autoconf 2.69.  Invocation command line was
2326
2327   $ $0 $@
2328
2329 _ACEOF
2330 exec 5>>config.log
2331 {
2332 cat <<_ASUNAME
2333 ## --------- ##
2334 ## Platform. ##
2335 ## --------- ##
2336
2337 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2338 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2339 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2340 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2341 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2342
2343 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2344 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2345
2346 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2347 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2348 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2349 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2350 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2351 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2352 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2353
2354 _ASUNAME
2355
2356 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2357 for as_dir in $PATH
2358 do
2359   IFS=$as_save_IFS
2360   test -z "$as_dir" && as_dir=.
2361     $as_echo "PATH: $as_dir"
2362   done
2363 IFS=$as_save_IFS
2364
2365 } >&5
2366
2367 cat >&5 <<_ACEOF
2368
2369
2370 ## ----------- ##
2371 ## Core tests. ##
2372 ## ----------- ##
2373
2374 _ACEOF
2375
2376
2377 # Keep a trace of the command line.
2378 # Strip out --no-create and --no-recursion so they do not pile up.
2379 # Strip out --silent because we don't want to record it for future runs.
2380 # Also quote any args containing shell meta-characters.
2381 # Make two passes to allow for proper duplicate-argument suppression.
2382 ac_configure_args=
2383 ac_configure_args0=
2384 ac_configure_args1=
2385 ac_must_keep_next=false
2386 for ac_pass in 1 2
2387 do
2388   for ac_arg
2389   do
2390     case $ac_arg in
2391     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2392     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2393     | -silent | --silent | --silen | --sile | --sil)
2394       continue ;;
2395     *\'*)
2396       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2397     esac
2398     case $ac_pass in
2399     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2400     2)
2401       as_fn_append ac_configure_args1 " '$ac_arg'"
2402       if test $ac_must_keep_next = true; then
2403         ac_must_keep_next=false # Got value, back to normal.
2404       else
2405         case $ac_arg in
2406           *=* | --config-cache | -C | -disable-* | --disable-* \
2407           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2408           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2409           | -with-* | --with-* | -without-* | --without-* | --x)
2410             case "$ac_configure_args0 " in
2411               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2412             esac
2413             ;;
2414           -* ) ac_must_keep_next=true ;;
2415         esac
2416       fi
2417       as_fn_append ac_configure_args " '$ac_arg'"
2418       ;;
2419     esac
2420   done
2421 done
2422 { ac_configure_args0=; unset ac_configure_args0;}
2423 { ac_configure_args1=; unset ac_configure_args1;}
2424
2425 # When interrupted or exit'd, cleanup temporary files, and complete
2426 # config.log.  We remove comments because anyway the quotes in there
2427 # would cause problems or look ugly.
2428 # WARNING: Use '\'' to represent an apostrophe within the trap.
2429 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2430 trap 'exit_status=$?
2431   # Save into config.log some information that might help in debugging.
2432   {
2433     echo
2434
2435     $as_echo "## ---------------- ##
2436 ## Cache variables. ##
2437 ## ---------------- ##"
2438     echo
2439     # The following way of writing the cache mishandles newlines in values,
2440 (
2441   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2442     eval ac_val=\$$ac_var
2443     case $ac_val in #(
2444     *${as_nl}*)
2445       case $ac_var in #(
2446       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2447 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2448       esac
2449       case $ac_var in #(
2450       _ | IFS | as_nl) ;; #(
2451       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2452       *) { eval $ac_var=; unset $ac_var;} ;;
2453       esac ;;
2454     esac
2455   done
2456   (set) 2>&1 |
2457     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2458     *${as_nl}ac_space=\ *)
2459       sed -n \
2460         "s/'\''/'\''\\\\'\'''\''/g;
2461           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2462       ;; #(
2463     *)
2464       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2465       ;;
2466     esac |
2467     sort
2468 )
2469     echo
2470
2471     $as_echo "## ----------------- ##
2472 ## Output variables. ##
2473 ## ----------------- ##"
2474     echo
2475     for ac_var in $ac_subst_vars
2476     do
2477       eval ac_val=\$$ac_var
2478       case $ac_val in
2479       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2480       esac
2481       $as_echo "$ac_var='\''$ac_val'\''"
2482     done | sort
2483     echo
2484
2485     if test -n "$ac_subst_files"; then
2486       $as_echo "## ------------------- ##
2487 ## File substitutions. ##
2488 ## ------------------- ##"
2489       echo
2490       for ac_var in $ac_subst_files
2491       do
2492         eval ac_val=\$$ac_var
2493         case $ac_val in
2494         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2495         esac
2496         $as_echo "$ac_var='\''$ac_val'\''"
2497       done | sort
2498       echo
2499     fi
2500
2501     if test -s confdefs.h; then
2502       $as_echo "## ----------- ##
2503 ## confdefs.h. ##
2504 ## ----------- ##"
2505       echo
2506       cat confdefs.h
2507       echo
2508     fi
2509     test "$ac_signal" != 0 &&
2510       $as_echo "$as_me: caught signal $ac_signal"
2511     $as_echo "$as_me: exit $exit_status"
2512   } >&5
2513   rm -f core *.core core.conftest.* &&
2514     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2515     exit $exit_status
2516 ' 0
2517 for ac_signal in 1 2 13 15; do
2518   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2519 done
2520 ac_signal=0
2521
2522 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2523 rm -f -r conftest* confdefs.h
2524
2525 $as_echo "/* confdefs.h */" > confdefs.h
2526
2527 # Predefined preprocessor variables.
2528
2529 cat >>confdefs.h <<_ACEOF
2530 #define PACKAGE_NAME "$PACKAGE_NAME"
2531 _ACEOF
2532
2533 cat >>confdefs.h <<_ACEOF
2534 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2535 _ACEOF
2536
2537 cat >>confdefs.h <<_ACEOF
2538 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2539 _ACEOF
2540
2541 cat >>confdefs.h <<_ACEOF
2542 #define PACKAGE_STRING "$PACKAGE_STRING"
2543 _ACEOF
2544
2545 cat >>confdefs.h <<_ACEOF
2546 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2547 _ACEOF
2548
2549 cat >>confdefs.h <<_ACEOF
2550 #define PACKAGE_URL "$PACKAGE_URL"
2551 _ACEOF
2552
2553
2554 # Let the site file select an alternate cache file if it wants to.
2555 # Prefer an explicitly selected file to automatically selected ones.
2556 ac_site_file1=NONE
2557 ac_site_file2=NONE
2558 if test -n "$CONFIG_SITE"; then
2559   # We do not want a PATH search for config.site.
2560   case $CONFIG_SITE in #((
2561     -*)  ac_site_file1=./$CONFIG_SITE;;
2562     */*) ac_site_file1=$CONFIG_SITE;;
2563     *)   ac_site_file1=./$CONFIG_SITE;;
2564   esac
2565 elif test "x$prefix" != xNONE; then
2566   ac_site_file1=$prefix/share/config.site
2567   ac_site_file2=$prefix/etc/config.site
2568 else
2569   ac_site_file1=$ac_default_prefix/share/config.site
2570   ac_site_file2=$ac_default_prefix/etc/config.site
2571 fi
2572 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2573 do
2574   test "x$ac_site_file" = xNONE && continue
2575   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2576     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2577 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2578     sed 's/^/| /' "$ac_site_file" >&5
2579     . "$ac_site_file" \
2580       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2581 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2582 as_fn_error $? "failed to load site script $ac_site_file
2583 See \`config.log' for more details" "$LINENO" 5; }
2584   fi
2585 done
2586
2587 if test -r "$cache_file"; then
2588   # Some versions of bash will fail to source /dev/null (special files
2589   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2590   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2591     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2592 $as_echo "$as_me: loading cache $cache_file" >&6;}
2593     case $cache_file in
2594       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2595       *)                      . "./$cache_file";;
2596     esac
2597   fi
2598 else
2599   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2600 $as_echo "$as_me: creating cache $cache_file" >&6;}
2601   >$cache_file
2602 fi
2603
2604 # Check that the precious variables saved in the cache have kept the same
2605 # value.
2606 ac_cache_corrupted=false
2607 for ac_var in $ac_precious_vars; do
2608   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2609   eval ac_new_set=\$ac_env_${ac_var}_set
2610   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2611   eval ac_new_val=\$ac_env_${ac_var}_value
2612   case $ac_old_set,$ac_new_set in
2613     set,)
2614       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2615 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2616       ac_cache_corrupted=: ;;
2617     ,set)
2618       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2619 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2620       ac_cache_corrupted=: ;;
2621     ,);;
2622     *)
2623       if test "x$ac_old_val" != "x$ac_new_val"; then
2624         # differences in whitespace do not lead to failure.
2625         ac_old_val_w=`echo x $ac_old_val`
2626         ac_new_val_w=`echo x $ac_new_val`
2627         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2628           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2629 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2630           ac_cache_corrupted=:
2631         else
2632           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2633 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2634           eval $ac_var=\$ac_old_val
2635         fi
2636         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2637 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2638         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2639 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2640       fi;;
2641   esac
2642   # Pass precious variables to config.status.
2643   if test "$ac_new_set" = set; then
2644     case $ac_new_val in
2645     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2646     *) ac_arg=$ac_var=$ac_new_val ;;
2647     esac
2648     case " $ac_configure_args " in
2649       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2650       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2651     esac
2652   fi
2653 done
2654 if $ac_cache_corrupted; then
2655   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2656 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2657   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2658 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2659   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2660 fi
2661 ## -------------------- ##
2662 ## Main body of script. ##
2663 ## -------------------- ##
2664
2665 ac_ext=c
2666 ac_cpp='$CPP $CPPFLAGS'
2667 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2668 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2669 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2670
2671
2672
2673
2674
2675
2676 ac_aux_dir=
2677 for ac_dir in config "$srcdir"/config; do
2678   if test -f "$ac_dir/install-sh"; then
2679     ac_aux_dir=$ac_dir
2680     ac_install_sh="$ac_aux_dir/install-sh -c"
2681     break
2682   elif test -f "$ac_dir/install.sh"; then
2683     ac_aux_dir=$ac_dir
2684     ac_install_sh="$ac_aux_dir/install.sh -c"
2685     break
2686   elif test -f "$ac_dir/shtool"; then
2687     ac_aux_dir=$ac_dir
2688     ac_install_sh="$ac_aux_dir/shtool install -c"
2689     break
2690   fi
2691 done
2692 if test -z "$ac_aux_dir"; then
2693   as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5
2694 fi
2695
2696 # These three variables are undocumented and unsupported,
2697 # and are intended to be withdrawn in a future Autoconf release.
2698 # They can cause serious problems if a builder's source tree is in a directory
2699 # whose full name contains unusual characters.
2700 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2701 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2702 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2703
2704
2705
2706 configure_args=$ac_configure_args
2707
2708
2709 PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\.[0-9][0-9]*\)'`
2710
2711
2712 cat >>confdefs.h <<_ACEOF
2713 #define PG_MAJORVERSION "$PG_MAJORVERSION"
2714 _ACEOF
2715
2716
2717
2718
2719
2720 # Check whether --with-extra-version was given.
2721 if test "${with_extra_version+set}" = set; then :
2722   withval=$with_extra_version;
2723   case $withval in
2724     yes)
2725       as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2726       ;;
2727     no)
2728       as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2729       ;;
2730     *)
2731       PG_VERSION="$PACKAGE_VERSION$withval"
2732       ;;
2733   esac
2734
2735 else
2736   PG_VERSION="$PACKAGE_VERSION"
2737 fi
2738
2739
2740
2741 cat >>confdefs.h <<_ACEOF
2742 #define PG_VERSION "$PG_VERSION"
2743 _ACEOF
2744
2745
2746 # Make sure we can run config.sub.
2747 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2748   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2749
2750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2751 $as_echo_n "checking build system type... " >&6; }
2752 if ${ac_cv_build+:} false; then :
2753   $as_echo_n "(cached) " >&6
2754 else
2755   ac_build_alias=$build_alias
2756 test "x$ac_build_alias" = x &&
2757   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2758 test "x$ac_build_alias" = x &&
2759   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2760 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2761   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2762
2763 fi
2764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2765 $as_echo "$ac_cv_build" >&6; }
2766 case $ac_cv_build in
2767 *-*-*) ;;
2768 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2769 esac
2770 build=$ac_cv_build
2771 ac_save_IFS=$IFS; IFS='-'
2772 set x $ac_cv_build
2773 shift
2774 build_cpu=$1
2775 build_vendor=$2
2776 shift; shift
2777 # Remember, the first character of IFS is used to create $*,
2778 # except with old shells:
2779 build_os=$*
2780 IFS=$ac_save_IFS
2781 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2782
2783
2784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2785 $as_echo_n "checking host system type... " >&6; }
2786 if ${ac_cv_host+:} false; then :
2787   $as_echo_n "(cached) " >&6
2788 else
2789   if test "x$host_alias" = x; then
2790   ac_cv_host=$ac_cv_build
2791 else
2792   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2793     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2794 fi
2795
2796 fi
2797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2798 $as_echo "$ac_cv_host" >&6; }
2799 case $ac_cv_host in
2800 *-*-*) ;;
2801 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2802 esac
2803 host=$ac_cv_host
2804 ac_save_IFS=$IFS; IFS='-'
2805 set x $ac_cv_host
2806 shift
2807 host_cpu=$1
2808 host_vendor=$2
2809 shift; shift
2810 # Remember, the first character of IFS is used to create $*,
2811 # except with old shells:
2812 host_os=$*
2813 IFS=$ac_save_IFS
2814 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2815
2816
2817
2818 template=
2819 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which template to use" >&5
2820 $as_echo_n "checking which template to use... " >&6; }
2821
2822
2823
2824
2825 # Check whether --with-template was given.
2826 if test "${with_template+set}" = set; then :
2827   withval=$with_template;
2828   case $withval in
2829     yes)
2830       as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2831       ;;
2832     no)
2833       as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2834       ;;
2835     *)
2836
2837   case $withval in
2838     list)   echo; ls "$srcdir/src/template"; exit;;
2839     *)      if test -f "$srcdir/src/template/$with_template" ; then
2840               template=$withval
2841             else
2842               as_fn_error $? "'$withval' is not a valid template name. Use 'list' for a list." "$LINENO" 5
2843             fi;;
2844   esac
2845
2846       ;;
2847   esac
2848
2849 else
2850
2851 # --with-template not given
2852
2853 case $host_os in
2854      aix*) template=aix ;;
2855   cygwin*) template=cygwin ;;
2856   darwin*) template=darwin ;;
2857 dragonfly*) template=netbsd ;;
2858  freebsd*) template=freebsd ;;
2859     hpux*) template=hpux ;;
2860  linux*|gnu*|k*bsd*-gnu)
2861            template=linux ;;
2862    mingw*) template=win32 ;;
2863   netbsd*) template=netbsd ;;
2864  openbsd*) template=openbsd ;;
2865      sco*) template=sco ;;
2866  solaris*) template=solaris ;;
2867    sysv5*) template=unixware ;;
2868 esac
2869
2870   if test x"$template" = x"" ; then
2871     as_fn_error $? "
2872 *******************************************************************
2873 PostgreSQL has apparently not been ported to your platform yet.
2874 To try a manual configuration, look into the src/template directory
2875 for a similar platform and use the '--with-template=' option.
2876
2877 Please also contact <pgsql-bugs@postgresql.org> to see about
2878 rectifying this.  Include the above 'checking host system type...'
2879 line.
2880 *******************************************************************
2881 " "$LINENO" 5
2882   fi
2883
2884
2885 fi
2886
2887
2888
2889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $template" >&5
2890 $as_echo "$template" >&6; }
2891
2892 PORTNAME=$template
2893
2894
2895 # Initialize default assumption that we do not need separate assembly code
2896 # for TAS (test-and-set).  This can be overridden by the template file
2897 # when it's executed.
2898 need_tas=no
2899 tas_file=dummy.s
2900
2901
2902
2903 ##
2904 ## Command line options
2905 ##
2906
2907 #
2908 # Add non-standard directories to the include path
2909 #
2910
2911
2912
2913 # Check whether --with-includes was given.
2914 if test "${with_includes+set}" = set; then :
2915   withval=$with_includes;
2916   case $withval in
2917     yes)
2918       as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
2919       ;;
2920     no)
2921       as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
2922       ;;
2923     *)
2924
2925       ;;
2926   esac
2927
2928 fi
2929
2930
2931
2932
2933 #
2934 # Add non-standard directories to the library search path
2935 #
2936
2937
2938
2939 # Check whether --with-libraries was given.
2940 if test "${with_libraries+set}" = set; then :
2941   withval=$with_libraries;
2942   case $withval in
2943     yes)
2944       as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
2945       ;;
2946     no)
2947       as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
2948       ;;
2949     *)
2950       LIBRARY_DIRS=$withval
2951       ;;
2952   esac
2953
2954 fi
2955
2956
2957
2958
2959
2960
2961 # Check whether --with-libs was given.
2962 if test "${with_libs+set}" = set; then :
2963   withval=$with_libs;
2964   case $withval in
2965     yes)
2966       as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
2967       ;;
2968     no)
2969       as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
2970       ;;
2971     *)
2972       LIBRARY_DIRS=$withval
2973       ;;
2974   esac
2975
2976 fi
2977
2978
2979
2980
2981 #
2982 # 64-bit integer date/time storage: enabled by default.
2983 #
2984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with 64-bit integer date/time support" >&5
2985 $as_echo_n "checking whether to build with 64-bit integer date/time support... " >&6; }
2986
2987
2988 # Check whether --enable-integer-datetimes was given.
2989 if test "${enable_integer_datetimes+set}" = set; then :
2990   enableval=$enable_integer_datetimes;
2991   case $enableval in
2992     yes)
2993
2994 $as_echo "#define USE_INTEGER_DATETIMES 1" >>confdefs.h
2995
2996       ;;
2997     no)
2998       :
2999       ;;
3000     *)
3001       as_fn_error $? "no argument expected for --enable-integer-datetimes option" "$LINENO" 5
3002       ;;
3003   esac
3004
3005 else
3006   enable_integer_datetimes=yes
3007
3008 $as_echo "#define USE_INTEGER_DATETIMES 1" >>confdefs.h
3009
3010 fi
3011
3012
3013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_integer_datetimes" >&5
3014 $as_echo "$enable_integer_datetimes" >&6; }
3015
3016
3017 #
3018 # NLS
3019 #
3020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is wanted" >&5
3021 $as_echo_n "checking whether NLS is wanted... " >&6; }
3022
3023
3024 # Check whether --enable-nls was given.
3025 if test "${enable_nls+set}" = set; then :
3026   enableval=$enable_nls;
3027   case $enableval in
3028     yes)
3029       :
3030       ;;
3031     no)
3032       :
3033       ;;
3034     *)
3035       enable_nls=yes
3036 WANTED_LANGUAGES=$enableval
3037       ;;
3038   esac
3039
3040 else
3041   enable_nls=no
3042 fi
3043
3044
3045
3046 if test "$enable_nls" = yes; then
3047
3048 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
3049
3050 fi
3051
3052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_nls" >&5
3053 $as_echo "$enable_nls" >&6; }
3054
3055
3056
3057 #
3058 # Default port number (--with-pgport), default 5432
3059 #
3060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default port number" >&5
3061 $as_echo_n "checking for default port number... " >&6; }
3062
3063
3064
3065 # Check whether --with-pgport was given.
3066 if test "${with_pgport+set}" = set; then :
3067   withval=$with_pgport;
3068   case $withval in
3069     yes)
3070       as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3071       ;;
3072     no)
3073       as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3074       ;;
3075     *)
3076       default_port=$withval
3077       ;;
3078   esac
3079
3080 else
3081   default_port=5432
3082 fi
3083
3084
3085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_port" >&5
3086 $as_echo "$default_port" >&6; }
3087 # Need both of these because some places want an integer and some a string
3088
3089 cat >>confdefs.h <<_ACEOF
3090 #define DEF_PGPORT ${default_port}
3091 _ACEOF
3092
3093
3094 cat >>confdefs.h <<_ACEOF
3095 #define DEF_PGPORT_STR "${default_port}"
3096 _ACEOF
3097
3098
3099
3100 #
3101 # '-rpath'-like feature can be disabled
3102 #
3103
3104
3105 # Check whether --enable-rpath was given.
3106 if test "${enable_rpath+set}" = set; then :
3107   enableval=$enable_rpath;
3108   case $enableval in
3109     yes)
3110       :
3111       ;;
3112     no)
3113       :
3114       ;;
3115     *)
3116       as_fn_error $? "no argument expected for --enable-rpath option" "$LINENO" 5
3117       ;;
3118   esac
3119
3120 else
3121   enable_rpath=yes
3122
3123 fi
3124
3125
3126
3127
3128 #
3129 # Spinlocks
3130 #
3131
3132
3133 # Check whether --enable-spinlocks was given.
3134 if test "${enable_spinlocks+set}" = set; then :
3135   enableval=$enable_spinlocks;
3136   case $enableval in
3137     yes)
3138       :
3139       ;;
3140     no)
3141       :
3142       ;;
3143     *)
3144       as_fn_error $? "no argument expected for --enable-spinlocks option" "$LINENO" 5
3145       ;;
3146   esac
3147
3148 else
3149   enable_spinlocks=yes
3150
3151 fi
3152
3153
3154
3155 #
3156 # Atomic operations
3157 #
3158
3159
3160 # Check whether --enable-atomics was given.
3161 if test "${enable_atomics+set}" = set; then :
3162   enableval=$enable_atomics;
3163   case $enableval in
3164     yes)
3165       :
3166       ;;
3167     no)
3168       :
3169       ;;
3170     *)
3171       as_fn_error $? "no argument expected for --enable-atomics option" "$LINENO" 5
3172       ;;
3173   esac
3174
3175 else
3176   enable_atomics=yes
3177
3178 fi
3179
3180
3181
3182 #
3183 # --enable-debug adds -g to compiler flags
3184 #
3185
3186
3187 # Check whether --enable-debug was given.
3188 if test "${enable_debug+set}" = set; then :
3189   enableval=$enable_debug;
3190   case $enableval in
3191     yes)
3192       :
3193       ;;
3194     no)
3195       :
3196       ;;
3197     *)
3198       as_fn_error $? "no argument expected for --enable-debug option" "$LINENO" 5
3199       ;;
3200   esac
3201
3202 else
3203   enable_debug=no
3204
3205 fi
3206
3207
3208
3209
3210 #
3211 # --enable-profiling enables gcc profiling
3212 #
3213
3214
3215 # Check whether --enable-profiling was given.
3216 if test "${enable_profiling+set}" = set; then :
3217   enableval=$enable_profiling;
3218   case $enableval in
3219     yes)
3220       :
3221       ;;
3222     no)
3223       :
3224       ;;
3225     *)
3226       as_fn_error $? "no argument expected for --enable-profiling option" "$LINENO" 5
3227       ;;
3228   esac
3229
3230 else
3231   enable_profiling=no
3232
3233 fi
3234
3235
3236
3237 #
3238 # --enable-coverage enables generation of code coverage metrics with gcov
3239 #
3240
3241
3242 # Check whether --enable-coverage was given.
3243 if test "${enable_coverage+set}" = set; then :
3244   enableval=$enable_coverage;
3245   case $enableval in
3246     yes)
3247       for ac_prog in gcov
3248 do
3249   # Extract the first word of "$ac_prog", so it can be a program name with args.
3250 set dummy $ac_prog; ac_word=$2
3251 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3252 $as_echo_n "checking for $ac_word... " >&6; }
3253 if ${ac_cv_prog_GCOV+:} false; then :
3254   $as_echo_n "(cached) " >&6
3255 else
3256   if test -n "$GCOV"; then
3257   ac_cv_prog_GCOV="$GCOV" # Let the user override the test.
3258 else
3259 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3260 for as_dir in $PATH
3261 do
3262   IFS=$as_save_IFS
3263   test -z "$as_dir" && as_dir=.
3264     for ac_exec_ext in '' $ac_executable_extensions; do
3265   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3266     ac_cv_prog_GCOV="$ac_prog"
3267     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3268     break 2
3269   fi
3270 done
3271   done
3272 IFS=$as_save_IFS
3273
3274 fi
3275 fi
3276 GCOV=$ac_cv_prog_GCOV
3277 if test -n "$GCOV"; then
3278   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3279 $as_echo "$GCOV" >&6; }
3280 else
3281   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3282 $as_echo "no" >&6; }
3283 fi
3284
3285
3286   test -n "$GCOV" && break
3287 done
3288
3289 if test -z "$GCOV"; then
3290   as_fn_error $? "gcov not found" "$LINENO" 5
3291 fi
3292 for ac_prog in lcov
3293 do
3294   # Extract the first word of "$ac_prog", so it can be a program name with args.
3295 set dummy $ac_prog; ac_word=$2
3296 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3297 $as_echo_n "checking for $ac_word... " >&6; }
3298 if ${ac_cv_prog_LCOV+:} false; then :
3299   $as_echo_n "(cached) " >&6
3300 else
3301   if test -n "$LCOV"; then
3302   ac_cv_prog_LCOV="$LCOV" # Let the user override the test.
3303 else
3304 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3305 for as_dir in $PATH
3306 do
3307   IFS=$as_save_IFS
3308   test -z "$as_dir" && as_dir=.
3309     for ac_exec_ext in '' $ac_executable_extensions; do
3310   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3311     ac_cv_prog_LCOV="$ac_prog"
3312     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3313     break 2
3314   fi
3315 done
3316   done
3317 IFS=$as_save_IFS
3318
3319 fi
3320 fi
3321 LCOV=$ac_cv_prog_LCOV
3322 if test -n "$LCOV"; then
3323   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3324 $as_echo "$LCOV" >&6; }
3325 else
3326   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3327 $as_echo "no" >&6; }
3328 fi
3329
3330
3331   test -n "$LCOV" && break
3332 done
3333
3334 if test -z "$LCOV"; then
3335   as_fn_error $? "lcov not found" "$LINENO" 5
3336 fi
3337 for ac_prog in genhtml
3338 do
3339   # Extract the first word of "$ac_prog", so it can be a program name with args.
3340 set dummy $ac_prog; ac_word=$2
3341 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3342 $as_echo_n "checking for $ac_word... " >&6; }
3343 if ${ac_cv_prog_GENHTML+:} false; then :
3344   $as_echo_n "(cached) " >&6
3345 else
3346   if test -n "$GENHTML"; then
3347   ac_cv_prog_GENHTML="$GENHTML" # Let the user override the test.
3348 else
3349 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3350 for as_dir in $PATH
3351 do
3352   IFS=$as_save_IFS
3353   test -z "$as_dir" && as_dir=.
3354     for ac_exec_ext in '' $ac_executable_extensions; do
3355   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3356     ac_cv_prog_GENHTML="$ac_prog"
3357     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3358     break 2
3359   fi
3360 done
3361   done
3362 IFS=$as_save_IFS
3363
3364 fi
3365 fi
3366 GENHTML=$ac_cv_prog_GENHTML
3367 if test -n "$GENHTML"; then
3368   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3369 $as_echo "$GENHTML" >&6; }
3370 else
3371   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3372 $as_echo "no" >&6; }
3373 fi
3374
3375
3376   test -n "$GENHTML" && break
3377 done
3378
3379 if test -z "$GENHTML"; then
3380   as_fn_error $? "genhtml not found" "$LINENO" 5
3381 fi
3382       ;;
3383     no)
3384       :
3385       ;;
3386     *)
3387       as_fn_error $? "no argument expected for --enable-coverage option" "$LINENO" 5
3388       ;;
3389   esac
3390
3391 else
3392   enable_coverage=no
3393
3394 fi
3395
3396
3397
3398
3399 #
3400 # DTrace
3401 #
3402
3403
3404 # Check whether --enable-dtrace was given.
3405 if test "${enable_dtrace+set}" = set; then :
3406   enableval=$enable_dtrace;
3407   case $enableval in
3408     yes)
3409       for ac_prog in dtrace
3410 do
3411   # Extract the first word of "$ac_prog", so it can be a program name with args.
3412 set dummy $ac_prog; ac_word=$2
3413 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3414 $as_echo_n "checking for $ac_word... " >&6; }
3415 if ${ac_cv_prog_DTRACE+:} false; then :
3416   $as_echo_n "(cached) " >&6
3417 else
3418   if test -n "$DTRACE"; then
3419   ac_cv_prog_DTRACE="$DTRACE" # Let the user override the test.
3420 else
3421 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3422 for as_dir in $PATH
3423 do
3424   IFS=$as_save_IFS
3425   test -z "$as_dir" && as_dir=.
3426     for ac_exec_ext in '' $ac_executable_extensions; do
3427   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3428     ac_cv_prog_DTRACE="$ac_prog"
3429     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3430     break 2
3431   fi
3432 done
3433   done
3434 IFS=$as_save_IFS
3435
3436 fi
3437 fi
3438 DTRACE=$ac_cv_prog_DTRACE
3439 if test -n "$DTRACE"; then
3440   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3441 $as_echo "$DTRACE" >&6; }
3442 else
3443   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3444 $as_echo "no" >&6; }
3445 fi
3446
3447
3448   test -n "$DTRACE" && break
3449 done
3450
3451 if test -z "$DTRACE"; then
3452   as_fn_error $? "dtrace not found" "$LINENO" 5
3453 fi
3454
3455       ;;
3456     no)
3457       :
3458       ;;
3459     *)
3460       as_fn_error $? "no argument expected for --enable-dtrace option" "$LINENO" 5
3461       ;;
3462   esac
3463
3464 else
3465   enable_dtrace=no
3466
3467 fi
3468
3469
3470
3471
3472 #
3473 # TAP tests
3474 #
3475
3476
3477 # Check whether --enable-tap-tests was given.
3478 if test "${enable_tap_tests+set}" = set; then :
3479   enableval=$enable_tap_tests;
3480   case $enableval in
3481     yes)
3482       :
3483       ;;
3484     no)
3485       :
3486       ;;
3487     *)
3488       as_fn_error $? "no argument expected for --enable-tap-tests option" "$LINENO" 5
3489       ;;
3490   esac
3491
3492 else
3493   enable_tap_tests=no
3494
3495 fi
3496
3497
3498
3499
3500 #
3501 # Block size
3502 #
3503 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for block size" >&5
3504 $as_echo_n "checking for block size... " >&6; }
3505
3506
3507
3508 # Check whether --with-blocksize was given.
3509 if test "${with_blocksize+set}" = set; then :
3510   withval=$with_blocksize;
3511   case $withval in
3512     yes)
3513       as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3514       ;;
3515     no)
3516       as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3517       ;;
3518     *)
3519       blocksize=$withval
3520       ;;
3521   esac
3522
3523 else
3524   blocksize=8
3525 fi
3526
3527
3528 case ${blocksize} in
3529   1) BLCKSZ=1024;;
3530   2) BLCKSZ=2048;;
3531   4) BLCKSZ=4096;;
3532   8) BLCKSZ=8192;;
3533  16) BLCKSZ=16384;;
3534  32) BLCKSZ=32768;;
3535   *) as_fn_error $? "Invalid block size. Allowed values are 1,2,4,8,16,32." "$LINENO" 5
3536 esac
3537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${blocksize}kB" >&5
3538 $as_echo "${blocksize}kB" >&6; }
3539
3540
3541 cat >>confdefs.h <<_ACEOF
3542 #define BLCKSZ ${BLCKSZ}
3543 _ACEOF
3544
3545
3546 #
3547 # Relation segment size
3548 #
3549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for segment size" >&5
3550 $as_echo_n "checking for segment size... " >&6; }
3551
3552
3553
3554 # Check whether --with-segsize was given.
3555 if test "${with_segsize+set}" = set; then :
3556   withval=$with_segsize;
3557   case $withval in
3558     yes)
3559       as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3560       ;;
3561     no)
3562       as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3563       ;;
3564     *)
3565       segsize=$withval
3566       ;;
3567   esac
3568
3569 else
3570   segsize=1
3571 fi
3572
3573
3574 # this expression is set up to avoid unnecessary integer overflow
3575 # blocksize is already guaranteed to be a factor of 1024
3576 RELSEG_SIZE=`expr '(' 1024 / ${blocksize} ')' '*' ${segsize} '*' 1024`
3577 test $? -eq 0 || exit 1
3578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${segsize}GB" >&5
3579 $as_echo "${segsize}GB" >&6; }
3580
3581
3582 cat >>confdefs.h <<_ACEOF
3583 #define RELSEG_SIZE ${RELSEG_SIZE}
3584 _ACEOF
3585
3586
3587 #
3588 # WAL block size
3589 #
3590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAL block size" >&5
3591 $as_echo_n "checking for WAL block size... " >&6; }
3592
3593
3594
3595 # Check whether --with-wal-blocksize was given.
3596 if test "${with_wal_blocksize+set}" = set; then :
3597   withval=$with_wal_blocksize;
3598   case $withval in
3599     yes)
3600       as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3601       ;;
3602     no)
3603       as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3604       ;;
3605     *)
3606       wal_blocksize=$withval
3607       ;;
3608   esac
3609
3610 else
3611   wal_blocksize=8
3612 fi
3613
3614
3615 case ${wal_blocksize} in
3616   1) XLOG_BLCKSZ=1024;;
3617   2) XLOG_BLCKSZ=2048;;
3618   4) XLOG_BLCKSZ=4096;;
3619   8) XLOG_BLCKSZ=8192;;
3620  16) XLOG_BLCKSZ=16384;;
3621  32) XLOG_BLCKSZ=32768;;
3622  64) XLOG_BLCKSZ=65536;;
3623   *) as_fn_error $? "Invalid WAL block size. Allowed values are 1,2,4,8,16,32,64." "$LINENO" 5
3624 esac
3625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${wal_blocksize}kB" >&5
3626 $as_echo "${wal_blocksize}kB" >&6; }
3627
3628
3629 cat >>confdefs.h <<_ACEOF
3630 #define XLOG_BLCKSZ ${XLOG_BLCKSZ}
3631 _ACEOF
3632
3633
3634 #
3635 # WAL segment size
3636 #
3637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAL segment size" >&5
3638 $as_echo_n "checking for WAL segment size... " >&6; }
3639
3640
3641
3642 # Check whether --with-wal-segsize was given.
3643 if test "${with_wal_segsize+set}" = set; then :
3644   withval=$with_wal_segsize;
3645   case $withval in
3646     yes)
3647       as_fn_error $? "argument required for --with-wal-segsize option" "$LINENO" 5
3648       ;;
3649     no)
3650       as_fn_error $? "argument required for --with-wal-segsize option" "$LINENO" 5
3651       ;;
3652     *)
3653       wal_segsize=$withval
3654       ;;
3655   esac
3656
3657 else
3658   wal_segsize=16
3659 fi
3660
3661
3662 case ${wal_segsize} in
3663   1) ;;
3664   2) ;;
3665   4) ;;
3666   8) ;;
3667  16) ;;
3668  32) ;;
3669  64) ;;
3670   *) as_fn_error $? "Invalid WAL segment size. Allowed values are 1,2,4,8,16,32,64." "$LINENO" 5
3671 esac
3672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${wal_segsize}MB" >&5
3673 $as_echo "${wal_segsize}MB" >&6; }
3674
3675
3676 cat >>confdefs.h <<_ACEOF
3677 #define XLOG_SEG_SIZE (${wal_segsize} * 1024 * 1024)
3678 _ACEOF
3679
3680
3681 #
3682 # C compiler
3683 #
3684
3685 # For historical reasons you can also use --with-CC to specify the C compiler
3686 # to use, although the standard way to do this is to set the CC environment
3687 # variable.
3688
3689
3690
3691 # Check whether --with-CC was given.
3692 if test "${with_CC+set}" = set; then :
3693   withval=$with_CC;
3694   case $withval in
3695     yes)
3696       as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3697       ;;
3698     no)
3699       as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3700       ;;
3701     *)
3702       CC=$with_CC
3703       ;;
3704   esac
3705
3706 fi
3707
3708
3709
3710 case $template in
3711   aix) pgac_cc_list="gcc xlc";;
3712     *) pgac_cc_list="gcc cc";;
3713 esac
3714
3715 ac_ext=c
3716 ac_cpp='$CPP $CPPFLAGS'
3717 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3718 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3719 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3720 if test -n "$ac_tool_prefix"; then
3721   for ac_prog in $pgac_cc_list
3722   do
3723     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3724 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3726 $as_echo_n "checking for $ac_word... " >&6; }
3727 if ${ac_cv_prog_CC+:} false; then :
3728   $as_echo_n "(cached) " >&6
3729 else
3730   if test -n "$CC"; then
3731   ac_cv_prog_CC="$CC" # Let the user override the test.
3732 else
3733 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3734 for as_dir in $PATH
3735 do
3736   IFS=$as_save_IFS
3737   test -z "$as_dir" && as_dir=.
3738     for ac_exec_ext in '' $ac_executable_extensions; do
3739   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3740     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3741     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3742     break 2
3743   fi
3744 done
3745   done
3746 IFS=$as_save_IFS
3747
3748 fi
3749 fi
3750 CC=$ac_cv_prog_CC
3751 if test -n "$CC"; then
3752   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3753 $as_echo "$CC" >&6; }
3754 else
3755   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3756 $as_echo "no" >&6; }
3757 fi
3758
3759
3760     test -n "$CC" && break
3761   done
3762 fi
3763 if test -z "$CC"; then
3764   ac_ct_CC=$CC
3765   for ac_prog in $pgac_cc_list
3766 do
3767   # Extract the first word of "$ac_prog", so it can be a program name with args.
3768 set dummy $ac_prog; ac_word=$2
3769 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3770 $as_echo_n "checking for $ac_word... " >&6; }
3771 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3772   $as_echo_n "(cached) " >&6
3773 else
3774   if test -n "$ac_ct_CC"; then
3775   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3776 else
3777 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3778 for as_dir in $PATH
3779 do
3780   IFS=$as_save_IFS
3781   test -z "$as_dir" && as_dir=.
3782     for ac_exec_ext in '' $ac_executable_extensions; do
3783   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3784     ac_cv_prog_ac_ct_CC="$ac_prog"
3785     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3786     break 2
3787   fi
3788 done
3789   done
3790 IFS=$as_save_IFS
3791
3792 fi
3793 fi
3794 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3795 if test -n "$ac_ct_CC"; then
3796   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3797 $as_echo "$ac_ct_CC" >&6; }
3798 else
3799   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3800 $as_echo "no" >&6; }
3801 fi
3802
3803
3804   test -n "$ac_ct_CC" && break
3805 done
3806
3807   if test "x$ac_ct_CC" = x; then
3808     CC=""
3809   else
3810     case $cross_compiling:$ac_tool_warned in
3811 yes:)
3812 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3813 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3814 ac_tool_warned=yes ;;
3815 esac
3816     CC=$ac_ct_CC
3817   fi
3818 fi
3819
3820
3821 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3822 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3823 as_fn_error $? "no acceptable C compiler found in \$PATH
3824 See \`config.log' for more details" "$LINENO" 5; }
3825
3826 # Provide some information about the compiler.
3827 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3828 set X $ac_compile
3829 ac_compiler=$2
3830 for ac_option in --version -v -V -qversion; do
3831   { { ac_try="$ac_compiler $ac_option >&5"
3832 case "(($ac_try" in
3833   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3834   *) ac_try_echo=$ac_try;;
3835 esac
3836 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3837 $as_echo "$ac_try_echo"; } >&5
3838   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3839   ac_status=$?
3840   if test -s conftest.err; then
3841     sed '10a\
3842 ... rest of stderr output deleted ...
3843          10q' conftest.err >conftest.er1
3844     cat conftest.er1 >&5
3845   fi
3846   rm -f conftest.er1 conftest.err
3847   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3848   test $ac_status = 0; }
3849 done
3850
3851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3852 /* end confdefs.h.  */
3853
3854 int
3855 main ()
3856 {
3857
3858   ;
3859   return 0;
3860 }
3861 _ACEOF
3862 ac_clean_files_save=$ac_clean_files
3863 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3864 # Try to create an executable without -o first, disregard a.out.
3865 # It will help us diagnose broken compilers, and finding out an intuition
3866 # of exeext.
3867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3868 $as_echo_n "checking whether the C compiler works... " >&6; }
3869 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3870
3871 # The possible output files:
3872 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3873
3874 ac_rmfiles=
3875 for ac_file in $ac_files
3876 do
3877   case $ac_file in
3878     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3879     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3880   esac
3881 done
3882 rm -f $ac_rmfiles
3883
3884 if { { ac_try="$ac_link_default"
3885 case "(($ac_try" in
3886   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3887   *) ac_try_echo=$ac_try;;
3888 esac
3889 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3890 $as_echo "$ac_try_echo"; } >&5
3891   (eval "$ac_link_default") 2>&5
3892   ac_status=$?
3893   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3894   test $ac_status = 0; }; then :
3895   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3896 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3897 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
3898 # so that the user can short-circuit this test for compilers unknown to
3899 # Autoconf.
3900 for ac_file in $ac_files ''
3901 do
3902   test -f "$ac_file" || continue
3903   case $ac_file in
3904     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3905         ;;
3906     [ab].out )
3907         # We found the default executable, but exeext='' is most
3908         # certainly right.
3909         break;;
3910     *.* )
3911         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3912         then :; else
3913            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3914         fi
3915         # We set ac_cv_exeext here because the later test for it is not
3916         # safe: cross compilers may not add the suffix if given an `-o'
3917         # argument, so we may need to know it at that point already.
3918         # Even if this section looks crufty: it has the advantage of
3919         # actually working.
3920         break;;
3921     * )
3922         break;;
3923   esac
3924 done
3925 test "$ac_cv_exeext" = no && ac_cv_exeext=
3926
3927 else
3928   ac_file=''
3929 fi
3930 if test -z "$ac_file"; then :
3931   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3932 $as_echo "no" >&6; }
3933 $as_echo "$as_me: failed program was:" >&5
3934 sed 's/^/| /' conftest.$ac_ext >&5
3935
3936 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3937 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3938 as_fn_error 77 "C compiler cannot create executables
3939 See \`config.log' for more details" "$LINENO" 5; }
3940 else
3941   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3942 $as_echo "yes" >&6; }
3943 fi
3944 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3945 $as_echo_n "checking for C compiler default output file name... " >&6; }
3946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3947 $as_echo "$ac_file" >&6; }
3948 ac_exeext=$ac_cv_exeext
3949
3950 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3951 ac_clean_files=$ac_clean_files_save
3952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3953 $as_echo_n "checking for suffix of executables... " >&6; }
3954 if { { ac_try="$ac_link"
3955 case "(($ac_try" in
3956   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3957   *) ac_try_echo=$ac_try;;
3958 esac
3959 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3960 $as_echo "$ac_try_echo"; } >&5
3961   (eval "$ac_link") 2>&5
3962   ac_status=$?
3963   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3964   test $ac_status = 0; }; then :
3965   # If both `conftest.exe' and `conftest' are `present' (well, observable)
3966 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3967 # work properly (i.e., refer to `conftest.exe'), while it won't with
3968 # `rm'.
3969 for ac_file in conftest.exe conftest conftest.*; do
3970   test -f "$ac_file" || continue
3971   case $ac_file in
3972     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3973     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3974           break;;
3975     * ) break;;
3976   esac
3977 done
3978 else
3979   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3980 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3981 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3982 See \`config.log' for more details" "$LINENO" 5; }
3983 fi
3984 rm -f conftest conftest$ac_cv_exeext
3985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3986 $as_echo "$ac_cv_exeext" >&6; }
3987
3988 rm -f conftest.$ac_ext
3989 EXEEXT=$ac_cv_exeext
3990 ac_exeext=$EXEEXT
3991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3992 /* end confdefs.h.  */
3993 #include <stdio.h>
3994 int
3995 main ()
3996 {
3997 FILE *f = fopen ("conftest.out", "w");
3998  return ferror (f) || fclose (f) != 0;
3999
4000   ;
4001   return 0;
4002 }
4003 _ACEOF
4004 ac_clean_files="$ac_clean_files conftest.out"
4005 # Check that the compiler produces executables we can run.  If not, either
4006 # the compiler is broken, or we cross compile.
4007 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4008 $as_echo_n "checking whether we are cross compiling... " >&6; }
4009 if test "$cross_compiling" != yes; then
4010   { { ac_try="$ac_link"
4011 case "(($ac_try" in
4012   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4013   *) ac_try_echo=$ac_try;;
4014 esac
4015 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4016 $as_echo "$ac_try_echo"; } >&5
4017   (eval "$ac_link") 2>&5
4018   ac_status=$?
4019   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4020   test $ac_status = 0; }
4021   if { ac_try='./conftest$ac_cv_exeext'
4022   { { case "(($ac_try" in
4023   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4024   *) ac_try_echo=$ac_try;;
4025 esac
4026 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4027 $as_echo "$ac_try_echo"; } >&5
4028   (eval "$ac_try") 2>&5
4029   ac_status=$?
4030   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4031   test $ac_status = 0; }; }; then
4032     cross_compiling=no
4033   else
4034     if test "$cross_compiling" = maybe; then
4035         cross_compiling=yes
4036     else
4037         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4038 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4039 as_fn_error $? "cannot run C compiled programs.
4040 If you meant to cross compile, use \`--host'.
4041 See \`config.log' for more details" "$LINENO" 5; }
4042     fi
4043   fi
4044 fi
4045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4046 $as_echo "$cross_compiling" >&6; }
4047
4048 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4049 ac_clean_files=$ac_clean_files_save
4050 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4051 $as_echo_n "checking for suffix of object files... " >&6; }
4052 if ${ac_cv_objext+:} false; then :
4053   $as_echo_n "(cached) " >&6
4054 else
4055   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4056 /* end confdefs.h.  */
4057
4058 int
4059 main ()
4060 {
4061
4062   ;
4063   return 0;
4064 }
4065 _ACEOF
4066 rm -f conftest.o conftest.obj
4067 if { { ac_try="$ac_compile"
4068 case "(($ac_try" in
4069   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4070   *) ac_try_echo=$ac_try;;
4071 esac
4072 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4073 $as_echo "$ac_try_echo"; } >&5
4074   (eval "$ac_compile") 2>&5
4075   ac_status=$?
4076   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4077   test $ac_status = 0; }; then :
4078   for ac_file in conftest.o conftest.obj conftest.*; do
4079   test -f "$ac_file" || continue;
4080   case $ac_file in
4081     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4082     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4083        break;;
4084   esac
4085 done
4086 else
4087   $as_echo "$as_me: failed program was:" >&5
4088 sed 's/^/| /' conftest.$ac_ext >&5
4089
4090 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4091 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4092 as_fn_error $? "cannot compute suffix of object files: cannot compile
4093 See \`config.log' for more details" "$LINENO" 5; }
4094 fi
4095 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4096 fi
4097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4098 $as_echo "$ac_cv_objext" >&6; }
4099 OBJEXT=$ac_cv_objext
4100 ac_objext=$OBJEXT
4101 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4102 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4103 if ${ac_cv_c_compiler_gnu+:} false; then :
4104   $as_echo_n "(cached) " >&6
4105 else
4106   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4107 /* end confdefs.h.  */
4108
4109 int
4110 main ()
4111 {
4112 #ifndef __GNUC__
4113        choke me
4114 #endif
4115
4116   ;
4117   return 0;
4118 }
4119 _ACEOF
4120 if ac_fn_c_try_compile "$LINENO"; then :
4121   ac_compiler_gnu=yes
4122 else
4123   ac_compiler_gnu=no
4124 fi
4125 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4126 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4127
4128 fi
4129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4130 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4131 if test $ac_compiler_gnu = yes; then
4132   GCC=yes
4133 else
4134   GCC=
4135 fi
4136 ac_test_CFLAGS=${CFLAGS+set}
4137 ac_save_CFLAGS=$CFLAGS
4138 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4139 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4140 if ${ac_cv_prog_cc_g+:} false; then :
4141   $as_echo_n "(cached) " >&6
4142 else
4143   ac_save_c_werror_flag=$ac_c_werror_flag
4144    ac_c_werror_flag=yes
4145    ac_cv_prog_cc_g=no
4146    CFLAGS="-g"
4147    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4148 /* end confdefs.h.  */
4149
4150 int
4151 main ()
4152 {
4153
4154   ;
4155   return 0;
4156 }
4157 _ACEOF
4158 if ac_fn_c_try_compile "$LINENO"; then :
4159   ac_cv_prog_cc_g=yes
4160 else
4161   CFLAGS=""
4162       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4163 /* end confdefs.h.  */
4164
4165 int
4166 main ()
4167 {
4168
4169   ;
4170   return 0;
4171 }
4172 _ACEOF
4173 if ac_fn_c_try_compile "$LINENO"; then :
4174
4175 else
4176   ac_c_werror_flag=$ac_save_c_werror_flag
4177          CFLAGS="-g"
4178          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4179 /* end confdefs.h.  */
4180
4181 int
4182 main ()
4183 {
4184
4185   ;
4186   return 0;
4187 }
4188 _ACEOF
4189 if ac_fn_c_try_compile "$LINENO"; then :
4190   ac_cv_prog_cc_g=yes
4191 fi
4192 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4193 fi
4194 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4195 fi
4196 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4197    ac_c_werror_flag=$ac_save_c_werror_flag
4198 fi
4199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4200 $as_echo "$ac_cv_prog_cc_g" >&6; }
4201 if test "$ac_test_CFLAGS" = set; then
4202   CFLAGS=$ac_save_CFLAGS
4203 elif test $ac_cv_prog_cc_g = yes; then
4204   if test "$GCC" = yes; then
4205     CFLAGS="-g -O2"
4206   else
4207     CFLAGS="-g"
4208   fi
4209 else
4210   if test "$GCC" = yes; then
4211     CFLAGS="-O2"
4212   else
4213     CFLAGS=
4214   fi
4215 fi
4216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4217 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4218 if ${ac_cv_prog_cc_c89+:} false; then :
4219   $as_echo_n "(cached) " >&6
4220 else
4221   ac_cv_prog_cc_c89=no
4222 ac_save_CC=$CC
4223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4224 /* end confdefs.h.  */
4225 #include <stdarg.h>
4226 #include <stdio.h>
4227 struct stat;
4228 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4229 struct buf { int x; };
4230 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4231 static char *e (p, i)
4232      char **p;
4233      int i;
4234 {
4235   return p[i];
4236 }
4237 static char *f (char * (*g) (char **, int), char **p, ...)
4238 {
4239   char *s;
4240   va_list v;
4241   va_start (v,p);
4242   s = g (p, va_arg (v,int));
4243   va_end (v);
4244   return s;
4245 }
4246
4247 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
4248    function prototypes and stuff, but not '\xHH' hex character constants.
4249    These don't provoke an error unfortunately, instead are silently treated
4250    as 'x'.  The following induces an error, until -std is added to get
4251    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
4252    array size at least.  It's necessary to write '\x00'==0 to get something
4253    that's true only with -std.  */
4254 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4255
4256 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4257    inside strings and character constants.  */
4258 #define FOO(x) 'x'
4259 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4260
4261 int test (int i, double x);
4262 struct s1 {int (*f) (int a);};
4263 struct s2 {int (*f) (double a);};
4264 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4265 int argc;
4266 char **argv;
4267 int
4268 main ()
4269 {
4270 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4271   ;
4272   return 0;
4273 }
4274 _ACEOF
4275 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4276         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4277 do
4278   CC="$ac_save_CC $ac_arg"
4279   if ac_fn_c_try_compile "$LINENO"; then :
4280   ac_cv_prog_cc_c89=$ac_arg
4281 fi
4282 rm -f core conftest.err conftest.$ac_objext
4283   test "x$ac_cv_prog_cc_c89" != "xno" && break
4284 done
4285 rm -f conftest.$ac_ext
4286 CC=$ac_save_CC
4287
4288 fi
4289 # AC_CACHE_VAL
4290 case "x$ac_cv_prog_cc_c89" in
4291   x)
4292     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4293 $as_echo "none needed" >&6; } ;;
4294   xno)
4295     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4296 $as_echo "unsupported" >&6; } ;;
4297   *)
4298     CC="$CC $ac_cv_prog_cc_c89"
4299     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4300 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4301 esac
4302 if test "x$ac_cv_prog_cc_c89" != xno; then :
4303
4304 fi
4305
4306 ac_ext=c
4307 ac_cpp='$CPP $CPPFLAGS'
4308 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4309 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4310 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4311
4312
4313 # Check if it's Intel's compiler, which (usually) pretends to be gcc,
4314 # but has idiosyncrasies of its own.  We assume icc will define
4315 # __INTEL_COMPILER regardless of CFLAGS.
4316
4317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4318 /* end confdefs.h.  */
4319
4320 int
4321 main ()
4322 {
4323 #ifndef __INTEL_COMPILER
4324 choke me
4325 #endif
4326   ;
4327   return 0;
4328 }
4329 _ACEOF
4330 if ac_fn_c_try_compile "$LINENO"; then :
4331   ICC=yes
4332 else
4333   ICC=no
4334 fi
4335 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4336
4337 # Check if it's Sun Studio compiler. We assume that
4338 # __SUNPRO_C will be defined for Sun Studio compilers
4339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4340 /* end confdefs.h.  */
4341
4342 int
4343 main ()
4344 {
4345 #ifndef __SUNPRO_C
4346 choke me
4347 #endif
4348   ;
4349   return 0;
4350 }
4351 _ACEOF
4352 if ac_fn_c_try_compile "$LINENO"; then :
4353   SUN_STUDIO_CC=yes
4354 else
4355   SUN_STUDIO_CC=no
4356 fi
4357 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4358
4359
4360
4361 unset CFLAGS
4362
4363 #
4364 # Read the template
4365 #
4366 . "$srcdir/src/template/$template" || exit
4367
4368 # CFLAGS are selected so:
4369 # If the user specifies something in the environment, that is used.
4370 # else:  If the template file set something, that is used.
4371 # else:  If coverage was enabled, don't set anything.
4372 # else:  If the compiler is GCC, then we use -O2.
4373 # else:  If the compiler is something else, then we use -O, unless debugging.
4374
4375 if test "$ac_env_CFLAGS_set" = set; then
4376   CFLAGS=$ac_env_CFLAGS_value
4377 elif test "${CFLAGS+set}" = set; then
4378   : # (keep what template set)
4379 elif test "$enable_coverage" = yes; then
4380   : # no optimization by default
4381 elif test "$GCC" = yes; then
4382   CFLAGS="-O2"
4383 else
4384   # if the user selected debug mode, don't use -O
4385   if test "$enable_debug" != yes; then
4386     CFLAGS="-O"
4387   fi
4388 fi
4389
4390 # CFLAGS we determined above will be added back at the end
4391 user_CFLAGS=$CFLAGS
4392 CFLAGS=""
4393
4394 # set CFLAGS_VECTOR from the environment, if available
4395 if test "$ac_env_CFLAGS_VECTOR_set" = set; then
4396   CFLAGS_VECTOR=$ac_env_CFLAGS_VECTOR_value
4397 fi
4398
4399 # Some versions of GCC support some additional useful warning flags.
4400 # Check whether they are supported, and add them to CFLAGS if so.
4401 # ICC pretends to be GCC but it's lying; it doesn't support these flags,
4402 # but has its own.  Also check other compiler-specific flags here.
4403
4404 if test "$GCC" = yes -a "$ICC" = no; then
4405   CFLAGS="-Wall -Wmissing-prototypes -Wpointer-arith"
4406   # These work in some but not all gcc versions
4407   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wdeclaration-after-statement" >&5
4408 $as_echo_n "checking whether $CC supports -Wdeclaration-after-statement... " >&6; }
4409 if ${pgac_cv_prog_cc_cflags__Wdeclaration_after_statement+:} false; then :
4410   $as_echo_n "(cached) " >&6
4411 else
4412   pgac_save_CFLAGS=$CFLAGS
4413 CFLAGS="$pgac_save_CFLAGS -Wdeclaration-after-statement"
4414 ac_save_c_werror_flag=$ac_c_werror_flag
4415 ac_c_werror_flag=yes
4416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4417 /* end confdefs.h.  */
4418
4419 int
4420 main ()
4421 {
4422
4423   ;
4424   return 0;
4425 }
4426 _ACEOF
4427 if ac_fn_c_try_compile "$LINENO"; then :
4428   pgac_cv_prog_cc_cflags__Wdeclaration_after_statement=yes
4429 else
4430   pgac_cv_prog_cc_cflags__Wdeclaration_after_statement=no
4431 fi
4432 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4433 ac_c_werror_flag=$ac_save_c_werror_flag
4434 CFLAGS="$pgac_save_CFLAGS"
4435 fi
4436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" >&5
4437 $as_echo "$pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" >&6; }
4438 if test x"$pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" = x"yes"; then
4439   CFLAGS="$CFLAGS -Wdeclaration-after-statement"
4440 fi
4441
4442   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wendif-labels" >&5
4443 $as_echo_n "checking whether $CC supports -Wendif-labels... " >&6; }
4444 if ${pgac_cv_prog_cc_cflags__Wendif_labels+:} false; then :
4445   $as_echo_n "(cached) " >&6
4446 else
4447   pgac_save_CFLAGS=$CFLAGS
4448 CFLAGS="$pgac_save_CFLAGS -Wendif-labels"
4449 ac_save_c_werror_flag=$ac_c_werror_flag
4450 ac_c_werror_flag=yes
4451 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4452 /* end confdefs.h.  */
4453
4454 int
4455 main ()
4456 {
4457
4458   ;
4459   return 0;
4460 }
4461 _ACEOF
4462 if ac_fn_c_try_compile "$LINENO"; then :
4463   pgac_cv_prog_cc_cflags__Wendif_labels=yes
4464 else
4465   pgac_cv_prog_cc_cflags__Wendif_labels=no
4466 fi
4467 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4468 ac_c_werror_flag=$ac_save_c_werror_flag
4469 CFLAGS="$pgac_save_CFLAGS"
4470 fi
4471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wendif_labels" >&5
4472 $as_echo "$pgac_cv_prog_cc_cflags__Wendif_labels" >&6; }
4473 if test x"$pgac_cv_prog_cc_cflags__Wendif_labels" = x"yes"; then
4474   CFLAGS="$CFLAGS -Wendif-labels"
4475 fi
4476
4477   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wmissing-format-attribute" >&5
4478 $as_echo_n "checking whether $CC supports -Wmissing-format-attribute... " >&6; }
4479 if ${pgac_cv_prog_cc_cflags__Wmissing_format_attribute+:} false; then :
4480   $as_echo_n "(cached) " >&6
4481 else
4482   pgac_save_CFLAGS=$CFLAGS
4483 CFLAGS="$pgac_save_CFLAGS -Wmissing-format-attribute"
4484 ac_save_c_werror_flag=$ac_c_werror_flag
4485 ac_c_werror_flag=yes
4486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4487 /* end confdefs.h.  */
4488
4489 int
4490 main ()
4491 {
4492
4493   ;
4494   return 0;
4495 }
4496 _ACEOF
4497 if ac_fn_c_try_compile "$LINENO"; then :
4498   pgac_cv_prog_cc_cflags__Wmissing_format_attribute=yes
4499 else
4500   pgac_cv_prog_cc_cflags__Wmissing_format_attribute=no
4501 fi
4502 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4503 ac_c_werror_flag=$ac_save_c_werror_flag
4504 CFLAGS="$pgac_save_CFLAGS"
4505 fi
4506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wmissing_format_attribute" >&5
4507 $as_echo "$pgac_cv_prog_cc_cflags__Wmissing_format_attribute" >&6; }
4508 if test x"$pgac_cv_prog_cc_cflags__Wmissing_format_attribute" = x"yes"; then
4509   CFLAGS="$CFLAGS -Wmissing-format-attribute"
4510 fi
4511
4512   # This was included in -Wall/-Wformat in older GCC versions
4513   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wformat-security" >&5
4514 $as_echo_n "checking whether $CC supports -Wformat-security... " >&6; }
4515 if ${pgac_cv_prog_cc_cflags__Wformat_security+:} false; then :
4516   $as_echo_n "(cached) " >&6
4517 else
4518   pgac_save_CFLAGS=$CFLAGS
4519 CFLAGS="$pgac_save_CFLAGS -Wformat-security"
4520 ac_save_c_werror_flag=$ac_c_werror_flag
4521 ac_c_werror_flag=yes
4522 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4523 /* end confdefs.h.  */
4524
4525 int
4526 main ()
4527 {
4528
4529   ;
4530   return 0;
4531 }
4532 _ACEOF
4533 if ac_fn_c_try_compile "$LINENO"; then :
4534   pgac_cv_prog_cc_cflags__Wformat_security=yes
4535 else
4536   pgac_cv_prog_cc_cflags__Wformat_security=no
4537 fi
4538 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4539 ac_c_werror_flag=$ac_save_c_werror_flag
4540 CFLAGS="$pgac_save_CFLAGS"
4541 fi
4542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wformat_security" >&5
4543 $as_echo "$pgac_cv_prog_cc_cflags__Wformat_security" >&6; }
4544 if test x"$pgac_cv_prog_cc_cflags__Wformat_security" = x"yes"; then
4545   CFLAGS="$CFLAGS -Wformat-security"
4546 fi
4547
4548   # Disable strict-aliasing rules; needed for gcc 3.3+
4549   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fno-strict-aliasing" >&5
4550 $as_echo_n "checking whether $CC supports -fno-strict-aliasing... " >&6; }
4551 if ${pgac_cv_prog_cc_cflags__fno_strict_aliasing+:} false; then :
4552   $as_echo_n "(cached) " >&6
4553 else
4554   pgac_save_CFLAGS=$CFLAGS
4555 CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing"
4556 ac_save_c_werror_flag=$ac_c_werror_flag
4557 ac_c_werror_flag=yes
4558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4559 /* end confdefs.h.  */
4560
4561 int
4562 main ()
4563 {
4564
4565   ;
4566   return 0;
4567 }
4568 _ACEOF
4569 if ac_fn_c_try_compile "$LINENO"; then :
4570   pgac_cv_prog_cc_cflags__fno_strict_aliasing=yes
4571 else
4572   pgac_cv_prog_cc_cflags__fno_strict_aliasing=no
4573 fi
4574 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4575 ac_c_werror_flag=$ac_save_c_werror_flag
4576 CFLAGS="$pgac_save_CFLAGS"
4577 fi
4578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&5
4579 $as_echo "$pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&6; }
4580 if test x"$pgac_cv_prog_cc_cflags__fno_strict_aliasing" = x"yes"; then
4581   CFLAGS="$CFLAGS -fno-strict-aliasing"
4582 fi
4583
4584   # Disable optimizations that assume no overflow; needed for gcc 4.3+
4585   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fwrapv" >&5
4586 $as_echo_n "checking whether $CC supports -fwrapv... " >&6; }
4587 if ${pgac_cv_prog_cc_cflags__fwrapv+:} false; then :
4588   $as_echo_n "(cached) " >&6
4589 else
4590   pgac_save_CFLAGS=$CFLAGS
4591 CFLAGS="$pgac_save_CFLAGS -fwrapv"
4592 ac_save_c_werror_flag=$ac_c_werror_flag
4593 ac_c_werror_flag=yes
4594 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4595 /* end confdefs.h.  */
4596
4597 int
4598 main ()
4599 {
4600
4601   ;
4602   return 0;
4603 }
4604 _ACEOF
4605 if ac_fn_c_try_compile "$LINENO"; then :
4606   pgac_cv_prog_cc_cflags__fwrapv=yes
4607 else
4608   pgac_cv_prog_cc_cflags__fwrapv=no
4609 fi
4610 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4611 ac_c_werror_flag=$ac_save_c_werror_flag
4612 CFLAGS="$pgac_save_CFLAGS"
4613 fi
4614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fwrapv" >&5
4615 $as_echo "$pgac_cv_prog_cc_cflags__fwrapv" >&6; }
4616 if test x"$pgac_cv_prog_cc_cflags__fwrapv" = x"yes"; then
4617   CFLAGS="$CFLAGS -fwrapv"
4618 fi
4619
4620   # Disable FP optimizations that cause various errors on gcc 4.5+ or maybe 4.6+
4621   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fexcess-precision=standard" >&5
4622 $as_echo_n "checking whether $CC supports -fexcess-precision=standard... " >&6; }
4623 if ${pgac_cv_prog_cc_cflags__fexcess_precision_standard+:} false; then :
4624   $as_echo_n "(cached) " >&6
4625 else
4626   pgac_save_CFLAGS=$CFLAGS
4627 CFLAGS="$pgac_save_CFLAGS -fexcess-precision=standard"
4628 ac_save_c_werror_flag=$ac_c_werror_flag
4629 ac_c_werror_flag=yes
4630 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4631 /* end confdefs.h.  */
4632
4633 int
4634 main ()
4635 {
4636
4637   ;
4638   return 0;
4639 }
4640 _ACEOF
4641 if ac_fn_c_try_compile "$LINENO"; then :
4642   pgac_cv_prog_cc_cflags__fexcess_precision_standard=yes
4643 else
4644   pgac_cv_prog_cc_cflags__fexcess_precision_standard=no
4645 fi
4646 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4647 ac_c_werror_flag=$ac_save_c_werror_flag
4648 CFLAGS="$pgac_save_CFLAGS"
4649 fi
4650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fexcess_precision_standard" >&5
4651 $as_echo "$pgac_cv_prog_cc_cflags__fexcess_precision_standard" >&6; }
4652 if test x"$pgac_cv_prog_cc_cflags__fexcess_precision_standard" = x"yes"; then
4653   CFLAGS="$CFLAGS -fexcess-precision=standard"
4654 fi
4655
4656   # Optimization flags for specific files that benefit from vectorization
4657   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -funroll-loops" >&5
4658 $as_echo_n "checking whether $CC supports -funroll-loops... " >&6; }
4659 if ${pgac_cv_prog_cc_cflags__funroll_loops+:} false; then :
4660   $as_echo_n "(cached) " >&6
4661 else
4662   pgac_save_CFLAGS=$CFLAGS
4663 CFLAGS="$pgac_save_CFLAGS -funroll-loops"
4664 ac_save_c_werror_flag=$ac_c_werror_flag
4665 ac_c_werror_flag=yes
4666 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4667 /* end confdefs.h.  */
4668
4669 int
4670 main ()
4671 {
4672
4673   ;
4674   return 0;
4675 }
4676 _ACEOF
4677 if ac_fn_c_try_compile "$LINENO"; then :
4678   pgac_cv_prog_cc_cflags__funroll_loops=yes
4679 else
4680   pgac_cv_prog_cc_cflags__funroll_loops=no
4681 fi
4682 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4683 ac_c_werror_flag=$ac_save_c_werror_flag
4684 CFLAGS="$pgac_save_CFLAGS"
4685 fi
4686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__funroll_loops" >&5
4687 $as_echo "$pgac_cv_prog_cc_cflags__funroll_loops" >&6; }
4688 if test x"$pgac_cv_prog_cc_cflags__funroll_loops" = x"yes"; then
4689   CFLAGS_VECTOR="${CFLAGS_VECTOR} -funroll-loops"
4690 fi
4691
4692   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -ftree-vectorize" >&5
4693 $as_echo_n "checking whether $CC supports -ftree-vectorize... " >&6; }
4694 if ${pgac_cv_prog_cc_cflags__ftree_vectorize+:} false; then :
4695   $as_echo_n "(cached) " >&6
4696 else
4697   pgac_save_CFLAGS=$CFLAGS
4698 CFLAGS="$pgac_save_CFLAGS -ftree-vectorize"
4699 ac_save_c_werror_flag=$ac_c_werror_flag
4700 ac_c_werror_flag=yes
4701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4702 /* end confdefs.h.  */
4703
4704 int
4705 main ()
4706 {
4707
4708   ;
4709   return 0;
4710 }
4711 _ACEOF
4712 if ac_fn_c_try_compile "$LINENO"; then :
4713   pgac_cv_prog_cc_cflags__ftree_vectorize=yes
4714 else
4715   pgac_cv_prog_cc_cflags__ftree_vectorize=no
4716 fi
4717 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4718 ac_c_werror_flag=$ac_save_c_werror_flag
4719 CFLAGS="$pgac_save_CFLAGS"
4720 fi
4721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__ftree_vectorize" >&5
4722 $as_echo "$pgac_cv_prog_cc_cflags__ftree_vectorize" >&6; }
4723 if test x"$pgac_cv_prog_cc_cflags__ftree_vectorize" = x"yes"; then
4724   CFLAGS_VECTOR="${CFLAGS_VECTOR} -ftree-vectorize"
4725 fi
4726
4727   # We want to suppress clang's unhelpful unused-command-line-argument warnings
4728   # but gcc won't complain about unrecognized -Wno-foo switches, so we have to
4729   # test for the positive form and if that works, add the negative form
4730   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wunused-command-line-argument" >&5
4731 $as_echo_n "checking whether $CC supports -Wunused-command-line-argument... " >&6; }
4732 if ${pgac_cv_prog_cc_cflags__Wunused_command_line_argument+:} false; then :
4733   $as_echo_n "(cached) " >&6
4734 else
4735   pgac_save_CFLAGS=$CFLAGS
4736 CFLAGS="$pgac_save_CFLAGS -Wunused-command-line-argument"
4737 ac_save_c_werror_flag=$ac_c_werror_flag
4738 ac_c_werror_flag=yes
4739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4740 /* end confdefs.h.  */
4741
4742 int
4743 main ()
4744 {
4745
4746   ;
4747   return 0;
4748 }
4749 _ACEOF
4750 if ac_fn_c_try_compile "$LINENO"; then :
4751   pgac_cv_prog_cc_cflags__Wunused_command_line_argument=yes
4752 else
4753   pgac_cv_prog_cc_cflags__Wunused_command_line_argument=no
4754 fi
4755 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4756 ac_c_werror_flag=$ac_save_c_werror_flag
4757 CFLAGS="$pgac_save_CFLAGS"
4758 fi
4759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wunused_command_line_argument" >&5
4760 $as_echo "$pgac_cv_prog_cc_cflags__Wunused_command_line_argument" >&6; }
4761 if test x"$pgac_cv_prog_cc_cflags__Wunused_command_line_argument" = x"yes"; then
4762   NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
4763 fi
4764
4765   if test -n "$NOT_THE_CFLAGS"; then
4766     CFLAGS="$CFLAGS -Wno-unused-command-line-argument"
4767   fi
4768 elif test "$ICC" = yes; then
4769   # Intel's compiler has a bug/misoptimization in checking for
4770   # division by NAN (NaN == 0), -mp1 fixes it, so add it to the CFLAGS.
4771   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -mp1" >&5
4772 $as_echo_n "checking whether $CC supports -mp1... " >&6; }
4773 if ${pgac_cv_prog_cc_cflags__mp1+:} false; then :
4774   $as_echo_n "(cached) " >&6
4775 else
4776   pgac_save_CFLAGS=$CFLAGS
4777 CFLAGS="$pgac_save_CFLAGS -mp1"
4778 ac_save_c_werror_flag=$ac_c_werror_flag
4779 ac_c_werror_flag=yes
4780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4781 /* end confdefs.h.  */
4782
4783 int
4784 main ()
4785 {
4786
4787   ;
4788   return 0;
4789 }
4790 _ACEOF
4791 if ac_fn_c_try_compile "$LINENO"; then :
4792   pgac_cv_prog_cc_cflags__mp1=yes
4793 else
4794   pgac_cv_prog_cc_cflags__mp1=no
4795 fi
4796 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4797 ac_c_werror_flag=$ac_save_c_werror_flag
4798 CFLAGS="$pgac_save_CFLAGS"
4799 fi
4800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__mp1" >&5
4801 $as_echo "$pgac_cv_prog_cc_cflags__mp1" >&6; }
4802 if test x"$pgac_cv_prog_cc_cflags__mp1" = x"yes"; then
4803   CFLAGS="$CFLAGS -mp1"
4804 fi
4805
4806   # Make sure strict aliasing is off (though this is said to be the default)
4807   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fno-strict-aliasing" >&5
4808 $as_echo_n "checking whether $CC supports -fno-strict-aliasing... " >&6; }
4809 if ${pgac_cv_prog_cc_cflags__fno_strict_aliasing+:} false; then :
4810   $as_echo_n "(cached) " >&6
4811 else
4812   pgac_save_CFLAGS=$CFLAGS
4813 CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing"
4814 ac_save_c_werror_flag=$ac_c_werror_flag
4815 ac_c_werror_flag=yes
4816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4817 /* end confdefs.h.  */
4818
4819 int
4820 main ()
4821 {
4822
4823   ;
4824   return 0;
4825 }
4826 _ACEOF
4827 if ac_fn_c_try_compile "$LINENO"; then :
4828   pgac_cv_prog_cc_cflags__fno_strict_aliasing=yes
4829 else
4830   pgac_cv_prog_cc_cflags__fno_strict_aliasing=no
4831 fi
4832 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4833 ac_c_werror_flag=$ac_save_c_werror_flag
4834 CFLAGS="$pgac_save_CFLAGS"
4835 fi
4836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&5
4837 $as_echo "$pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&6; }
4838 if test x"$pgac_cv_prog_cc_cflags__fno_strict_aliasing" = x"yes"; then
4839   CFLAGS="$CFLAGS -fno-strict-aliasing"
4840 fi
4841
4842 elif test "$PORTNAME" = "aix"; then
4843   # AIX's xlc has to have strict aliasing turned off too
4844   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -qnoansialias" >&5
4845 $as_echo_n "checking whether $CC supports -qnoansialias... " >&6; }
4846 if ${pgac_cv_prog_cc_cflags__qnoansialias+:} false; then :
4847   $as_echo_n "(cached) " >&6
4848 else
4849   pgac_save_CFLAGS=$CFLAGS
4850 CFLAGS="$pgac_save_CFLAGS -qnoansialias"
4851 ac_save_c_werror_flag=$ac_c_werror_flag
4852 ac_c_werror_flag=yes
4853 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4854 /* end confdefs.h.  */
4855
4856 int
4857 main ()
4858 {
4859
4860   ;
4861   return 0;
4862 }
4863 _ACEOF
4864 if ac_fn_c_try_compile "$LINENO"; then :
4865   pgac_cv_prog_cc_cflags__qnoansialias=yes
4866 else
4867   pgac_cv_prog_cc_cflags__qnoansialias=no
4868 fi
4869 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4870 ac_c_werror_flag=$ac_save_c_werror_flag
4871 CFLAGS="$pgac_save_CFLAGS"
4872 fi
4873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__qnoansialias" >&5
4874 $as_echo "$pgac_cv_prog_cc_cflags__qnoansialias" >&6; }
4875 if test x"$pgac_cv_prog_cc_cflags__qnoansialias" = x"yes"; then
4876   CFLAGS="$CFLAGS -qnoansialias"
4877 fi
4878
4879   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -qlonglong" >&5
4880 $as_echo_n "checking whether $CC supports -qlonglong... " >&6; }
4881 if ${pgac_cv_prog_cc_cflags__qlonglong+:} false; then :
4882   $as_echo_n "(cached) " >&6
4883 else
4884   pgac_save_CFLAGS=$CFLAGS
4885 CFLAGS="$pgac_save_CFLAGS -qlonglong"
4886 ac_save_c_werror_flag=$ac_c_werror_flag
4887 ac_c_werror_flag=yes
4888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4889 /* end confdefs.h.  */
4890
4891 int
4892 main ()
4893 {
4894
4895   ;
4896   return 0;
4897 }
4898 _ACEOF
4899 if ac_fn_c_try_compile "$LINENO"; then :
4900   pgac_cv_prog_cc_cflags__qlonglong=yes
4901 else
4902   pgac_cv_prog_cc_cflags__qlonglong=no
4903 fi
4904 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4905 ac_c_werror_flag=$ac_save_c_werror_flag
4906 CFLAGS="$pgac_save_CFLAGS"
4907 fi
4908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__qlonglong" >&5
4909 $as_echo "$pgac_cv_prog_cc_cflags__qlonglong" >&6; }
4910 if test x"$pgac_cv_prog_cc_cflags__qlonglong" = x"yes"; then
4911   CFLAGS="$CFLAGS -qlonglong"
4912 fi
4913
4914 elif test "$PORTNAME" = "hpux"; then
4915   # On some versions of HP-UX, libm functions do not set errno by default.
4916   # Fix that by using +Olibmerrno if the compiler recognizes it.
4917   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports +Olibmerrno" >&5
4918 $as_echo_n "checking whether $CC supports +Olibmerrno... " >&6; }
4919 if ${pgac_cv_prog_cc_cflags_pOlibmerrno+:} false; then :
4920   $as_echo_n "(cached) " >&6
4921 else
4922   pgac_save_CFLAGS=$CFLAGS
4923 CFLAGS="$pgac_save_CFLAGS +Olibmerrno"
4924 ac_save_c_werror_flag=$ac_c_werror_flag
4925 ac_c_werror_flag=yes
4926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4927 /* end confdefs.h.  */
4928
4929 int
4930 main ()
4931 {
4932
4933   ;
4934   return 0;
4935 }
4936 _ACEOF
4937 if ac_fn_c_try_compile "$LINENO"; then :
4938   pgac_cv_prog_cc_cflags_pOlibmerrno=yes
4939 else
4940   pgac_cv_prog_cc_cflags_pOlibmerrno=no
4941 fi
4942 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4943 ac_c_werror_flag=$ac_save_c_werror_flag
4944 CFLAGS="$pgac_save_CFLAGS"
4945 fi
4946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags_pOlibmerrno" >&5
4947 $as_echo "$pgac_cv_prog_cc_cflags_pOlibmerrno" >&6; }
4948 if test x"$pgac_cv_prog_cc_cflags_pOlibmerrno" = x"yes"; then
4949   CFLAGS="$CFLAGS +Olibmerrno"
4950 fi
4951
4952 fi
4953
4954 CFLAGS_VECTOR=$CFLAGS_VECTOR
4955
4956
4957 # supply -g if --enable-debug
4958 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
4959   CFLAGS="$CFLAGS -g"
4960 fi
4961
4962 # enable code coverage if --enable-coverage
4963 if test "$enable_coverage" = yes; then
4964   if test "$GCC" = yes; then
4965     CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
4966   else
4967     as_fn_error $? "--enable-coverage is supported only when using GCC" "$LINENO" 5
4968   fi
4969 fi
4970
4971 # enable profiling if --enable-profiling
4972 if test "$enable_profiling" = yes && test "$ac_cv_prog_cc_g" = yes; then
4973   if test "$GCC" = yes; then
4974
4975 $as_echo "#define PROFILE_PID_DIR 1" >>confdefs.h
4976
4977     CFLAGS="$CFLAGS -pg $PLATFORM_PROFILE_FLAGS"
4978   else
4979     as_fn_error $? "--enable-profiling is supported only when using GCC" "$LINENO" 5
4980   fi
4981 fi
4982
4983 # We already have this in Makefile.win32, but configure needs it too
4984 if test "$PORTNAME" = "win32"; then
4985   CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32 -DEXEC_BACKEND"
4986 fi
4987
4988 # Now that we're done automatically adding stuff to CFLAGS, put back the
4989 # user-specified flags (if any) at the end.  This lets users override
4990 # the automatic additions.
4991 CFLAGS="$CFLAGS $user_CFLAGS"
4992
4993 # Check if the compiler still works with the final flag settings
4994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler still works" >&5
4995 $as_echo_n "checking whether the C compiler still works... " >&6; }
4996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4997 /* end confdefs.h.  */
4998
4999 int
5000 main ()
5001 {
5002 return 0;
5003   ;
5004   return 0;
5005 }
5006 _ACEOF
5007 if ac_fn_c_try_link "$LINENO"; then :
5008   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5009 $as_echo "yes" >&6; }
5010 else
5011   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5012 $as_echo "no" >&6; }
5013    as_fn_error $? "cannot proceed" "$LINENO" 5
5014 fi
5015 rm -f core conftest.err conftest.$ac_objext \
5016     conftest$ac_exeext conftest.$ac_ext
5017
5018 # Defend against gcc -ffast-math
5019 if test "$GCC" = yes; then
5020 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5021 /* end confdefs.h.  */
5022
5023 int
5024 main ()
5025 {
5026 #ifdef __FAST_MATH__
5027 choke me
5028 #endif
5029   ;
5030   return 0;
5031 }
5032 _ACEOF
5033 if ac_fn_c_try_compile "$LINENO"; then :
5034
5035 else
5036   as_fn_error $? "do not put -ffast-math in CFLAGS" "$LINENO" 5
5037 fi
5038 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5039 fi
5040
5041 ac_ext=c
5042 ac_cpp='$CPP $CPPFLAGS'
5043 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5044 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5045 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5047 $as_echo_n "checking how to run the C preprocessor... " >&6; }
5048 # On Suns, sometimes $CPP names a directory.
5049 if test -n "$CPP" && test -d "$CPP"; then
5050   CPP=
5051 fi
5052 if test -z "$CPP"; then
5053   if ${ac_cv_prog_CPP+:} false; then :
5054   $as_echo_n "(cached) " >&6
5055 else
5056       # Double quotes because CPP needs to be expanded
5057     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
5058     do
5059       ac_preproc_ok=false
5060 for ac_c_preproc_warn_flag in '' yes
5061 do
5062   # Use a header file that comes with gcc, so configuring glibc
5063   # with a fresh cross-compiler works.
5064   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5065   # <limits.h> exists even on freestanding compilers.
5066   # On the NeXT, cc -E runs the code through the compiler's parser,
5067   # not just through cpp. "Syntax error" is here to catch this case.
5068   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5069 /* end confdefs.h.  */
5070 #ifdef __STDC__
5071 # include <limits.h>
5072 #else
5073 # include <assert.h>
5074 #endif
5075                      Syntax error
5076 _ACEOF
5077 if ac_fn_c_try_cpp "$LINENO"; then :
5078
5079 else
5080   # Broken: fails on valid input.
5081 continue
5082 fi
5083 rm -f conftest.err conftest.i conftest.$ac_ext
5084
5085   # OK, works on sane cases.  Now check whether nonexistent headers
5086   # can be detected and how.
5087   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5088 /* end confdefs.h.  */
5089 #include <ac_nonexistent.h>
5090 _ACEOF
5091 if ac_fn_c_try_cpp "$LINENO"; then :
5092   # Broken: success on invalid input.
5093 continue
5094 else
5095   # Passes both tests.
5096 ac_preproc_ok=:
5097 break
5098 fi
5099 rm -f conftest.err conftest.i conftest.$ac_ext
5100
5101 done
5102 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5103 rm -f conftest.i conftest.err conftest.$ac_ext
5104 if $ac_preproc_ok; then :
5105   break
5106 fi
5107
5108     done
5109     ac_cv_prog_CPP=$CPP
5110
5111 fi
5112   CPP=$ac_cv_prog_CPP
5113 else
5114   ac_cv_prog_CPP=$CPP
5115 fi
5116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5117 $as_echo "$CPP" >&6; }
5118 ac_preproc_ok=false
5119 for ac_c_preproc_warn_flag in '' yes
5120 do
5121   # Use a header file that comes with gcc, so configuring glibc
5122   # with a fresh cross-compiler works.
5123   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5124   # <limits.h> exists even on freestanding compilers.
5125   # On the NeXT, cc -E runs the code through the compiler's parser,
5126   # not just through cpp. "Syntax error" is here to catch this case.
5127   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5128 /* end confdefs.h.  */
5129 #ifdef __STDC__
5130 # include <limits.h>
5131 #else
5132 # include <assert.h>
5133 #endif
5134                      Syntax error
5135 _ACEOF
5136 if ac_fn_c_try_cpp "$LINENO"; then :
5137
5138 else
5139   # Broken: fails on valid input.
5140 continue
5141 fi
5142 rm -f conftest.err conftest.i conftest.$ac_ext
5143
5144   # OK, works on sane cases.  Now check whether nonexistent headers
5145   # can be detected and how.
5146   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5147 /* end confdefs.h.  */
5148 #include <ac_nonexistent.h>
5149 _ACEOF
5150 if ac_fn_c_try_cpp "$LINENO"; then :
5151   # Broken: success on invalid input.
5152 continue
5153 else
5154   # Passes both tests.
5155 ac_preproc_ok=:
5156 break
5157 fi
5158 rm -f conftest.err conftest.i conftest.$ac_ext
5159
5160 done
5161 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5162 rm -f conftest.i conftest.err conftest.$ac_ext
5163 if $ac_preproc_ok; then :
5164
5165 else
5166   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5167 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5168 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
5169 See \`config.log' for more details" "$LINENO" 5; }
5170 fi
5171
5172 ac_ext=c
5173 ac_cpp='$CPP $CPPFLAGS'
5174 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5175 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5176 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5177
5178
5179
5180
5181 #
5182 # Set up TAS assembly code if needed; the template file has now had its
5183 # chance to request this.
5184 #
5185 ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
5186
5187
5188 if test "$need_tas" = yes ; then
5189   TAS=tas.o
5190 else
5191   TAS=""
5192 fi
5193
5194
5195
5196 #
5197 # Automatic dependency tracking
5198 #
5199
5200
5201 # Check whether --enable-depend was given.
5202 if test "${enable_depend+set}" = set; then :
5203   enableval=$enable_depend;
5204   case $enableval in
5205     yes)
5206       autodepend=yes
5207       ;;
5208     no)
5209       :
5210       ;;
5211     *)
5212       as_fn_error $? "no argument expected for --enable-depend option" "$LINENO" 5
5213       ;;
5214   esac
5215
5216 else
5217   enable_depend=no
5218
5219 fi
5220
5221
5222
5223
5224
5225 #
5226 # Enable assert checks
5227 #
5228
5229
5230 # Check whether --enable-cassert was given.
5231 if test "${enable_cassert+set}" = set; then :
5232   enableval=$enable_cassert;
5233   case $enableval in
5234     yes)
5235
5236 $as_echo "#define USE_ASSERT_CHECKING 1" >>confdefs.h
5237
5238       ;;
5239     no)
5240       :
5241       ;;
5242     *)
5243       as_fn_error $? "no argument expected for --enable-cassert option" "$LINENO" 5
5244       ;;
5245   esac
5246
5247 else
5248   enable_cassert=no
5249
5250 fi
5251
5252
5253
5254
5255 #
5256 # Include directories
5257 #
5258 ac_save_IFS=$IFS
5259 IFS="${IFS}${PATH_SEPARATOR}"
5260 # SRCH_INC comes from the template file
5261 for dir in $with_includes $SRCH_INC; do
5262   if test -d "$dir"; then
5263     INCLUDES="$INCLUDES -I$dir"
5264   else
5265     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Include directory $dir does not exist." >&5
5266 $as_echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
5267   fi
5268 done
5269 IFS=$ac_save_IFS
5270
5271
5272
5273 #
5274 # Library directories
5275 #
5276 ac_save_IFS=$IFS
5277 IFS="${IFS}${PATH_SEPARATOR}"
5278 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
5279 for dir in $LIBRARY_DIRS $SRCH_LIB; do
5280   if test -d "$dir"; then
5281     LIBDIRS="$LIBDIRS -L$dir"
5282   else
5283     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Library directory $dir does not exist." >&5
5284 $as_echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
5285   fi
5286 done
5287 IFS=$ac_save_IFS
5288
5289 #
5290 # Enable thread-safe client libraries
5291 #
5292 { $as_echo "$as_me:${as_lineno-$LINENO}: checking allow thread-safe client libraries" >&5
5293 $as_echo_n "checking allow thread-safe client libraries... " >&6; }
5294
5295
5296 # Check whether --enable-thread-safety was given.
5297 if test "${enable_thread_safety+set}" = set; then :
5298   enableval=$enable_thread_safety;
5299   case $enableval in
5300     yes)
5301       :
5302       ;;
5303     no)
5304       :
5305       ;;
5306     *)
5307       as_fn_error $? "no argument expected for --enable-thread-safety option" "$LINENO" 5
5308       ;;
5309   esac
5310
5311 else
5312   enable_thread_safety=yes
5313
5314 fi
5315
5316
5317 if test "$enable_thread_safety" = yes; then
5318
5319 $as_echo "#define ENABLE_THREAD_SAFETY 1" >>confdefs.h
5320
5321 fi
5322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_thread_safety" >&5
5323 $as_echo "$enable_thread_safety" >&6; }
5324
5325
5326 #
5327 # Optionally build Tcl modules (PL/Tcl)
5328 #
5329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Tcl" >&5
5330 $as_echo_n "checking whether to build with Tcl... " >&6; }
5331
5332
5333
5334 # Check whether --with-tcl was given.
5335 if test "${with_tcl+set}" = set; then :
5336   withval=$with_tcl;
5337   case $withval in
5338     yes)
5339       :
5340       ;;
5341     no)
5342       :
5343       ;;
5344     *)
5345       as_fn_error $? "no argument expected for --with-tcl option" "$LINENO" 5
5346       ;;
5347   esac
5348
5349 else
5350   with_tcl=no
5351
5352 fi
5353
5354
5355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcl" >&5
5356 $as_echo "$with_tcl" >&6; }
5357
5358
5359 # We see if the path to the Tcl/Tk configuration scripts is specified.
5360 # This will override the use of tclsh to find the paths to search.
5361
5362
5363
5364
5365 # Check whether --with-tclconfig was given.
5366 if test "${with_tclconfig+set}" = set; then :
5367   withval=$with_tclconfig;
5368   case $withval in
5369     yes)
5370       as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
5371       ;;
5372     no)
5373       as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
5374       ;;
5375     *)
5376
5377       ;;
5378   esac
5379
5380 fi
5381
5382
5383
5384 #
5385 # Optionally build Perl modules (PL/Perl)
5386 #
5387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Perl modules" >&5
5388 $as_echo_n "checking whether to build Perl modules... " >&6; }
5389
5390
5391
5392 # Check whether --with-perl was given.
5393 if test "${with_perl+set}" = set; then :
5394   withval=$with_perl;
5395   case $withval in
5396     yes)
5397       :
5398       ;;
5399     no)
5400       :
5401       ;;
5402     *)
5403       as_fn_error $? "no argument expected for --with-perl option" "$LINENO" 5
5404       ;;
5405   esac
5406
5407 else
5408   with_perl=no
5409
5410 fi
5411
5412
5413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_perl" >&5
5414 $as_echo "$with_perl" >&6; }
5415
5416
5417 #
5418 # Optionally build Python modules (PL/Python)
5419 #
5420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Python modules" >&5
5421 $as_echo_n "checking whether to build Python modules... " >&6; }
5422
5423
5424
5425 # Check whether --with-python was given.
5426 if test "${with_python+set}" = set; then :
5427   withval=$with_python;
5428   case $withval in
5429     yes)
5430       :
5431       ;;
5432     no)
5433       :
5434       ;;
5435     *)
5436       as_fn_error $? "no argument expected for --with-python option" "$LINENO" 5
5437       ;;
5438   esac
5439
5440 else
5441   with_python=no
5442
5443 fi
5444
5445
5446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
5447 $as_echo "$with_python" >&6; }
5448
5449
5450 #
5451 # GSSAPI
5452 #
5453 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with GSSAPI support" >&5
5454 $as_echo_n "checking whether to build with GSSAPI support... " >&6; }
5455
5456
5457
5458 # Check whether --with-gssapi was given.
5459 if test "${with_gssapi+set}" = set; then :
5460   withval=$with_gssapi;
5461   case $withval in
5462     yes)
5463
5464
5465 $as_echo "#define ENABLE_GSS 1" >>confdefs.h
5466
5467   krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
5468
5469       ;;
5470     no)
5471       :
5472       ;;
5473     *)
5474       as_fn_error $? "no argument expected for --with-gssapi option" "$LINENO" 5
5475       ;;
5476   esac
5477
5478 else
5479   with_gssapi=no
5480
5481 fi
5482
5483
5484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_gssapi" >&5
5485 $as_echo "$with_gssapi" >&6; }
5486
5487
5488
5489
5490
5491 #
5492 # Kerberos configuration parameters
5493 #
5494
5495
5496
5497 # Check whether --with-krb-srvnam was given.
5498 if test "${with_krb_srvnam+set}" = set; then :
5499   withval=$with_krb_srvnam;
5500   case $withval in
5501     yes)
5502       as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
5503       ;;
5504     no)
5505       as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
5506       ;;
5507     *)
5508
5509       ;;
5510   esac
5511
5512 else
5513   with_krb_srvnam="postgres"
5514 fi
5515
5516
5517
5518 cat >>confdefs.h <<_ACEOF
5519 #define PG_KRB_SRVNAM "$with_krb_srvnam"
5520 _ACEOF
5521
5522
5523
5524 #
5525 # PAM
5526 #
5527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with PAM support" >&5
5528 $as_echo_n "checking whether to build with PAM support... " >&6; }
5529
5530
5531
5532 # Check whether --with-pam was given.
5533 if test "${with_pam+set}" = set; then :
5534   withval=$with_pam;
5535   case $withval in
5536     yes)
5537
5538 $as_echo "#define USE_PAM 1" >>confdefs.h
5539
5540       ;;
5541     no)
5542       :
5543       ;;
5544     *)
5545       as_fn_error $? "no argument expected for --with-pam option" "$LINENO" 5
5546       ;;
5547   esac
5548
5549 else
5550   with_pam=no
5551
5552 fi
5553
5554
5555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pam" >&5
5556 $as_echo "$with_pam" >&6; }
5557
5558
5559 #
5560 # LDAP
5561 #
5562 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LDAP support" >&5
5563 $as_echo_n "checking whether to build with LDAP support... " >&6; }
5564
5565
5566
5567 # Check whether --with-ldap was given.
5568 if test "${with_ldap+set}" = set; then :
5569   withval=$with_ldap;
5570   case $withval in
5571     yes)
5572
5573 $as_echo "#define USE_LDAP 1" >>confdefs.h
5574
5575       ;;
5576     no)
5577       :
5578       ;;
5579     *)
5580       as_fn_error $? "no argument expected for --with-ldap option" "$LINENO" 5
5581       ;;
5582   esac
5583
5584 else
5585   with_ldap=no
5586
5587 fi
5588
5589
5590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_ldap" >&5
5591 $as_echo "$with_ldap" >&6; }
5592
5593
5594 #
5595 # Bonjour
5596 #
5597 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Bonjour support" >&5
5598 $as_echo_n "checking whether to build with Bonjour support... " >&6; }
5599
5600
5601
5602 # Check whether --with-bonjour was given.
5603 if test "${with_bonjour+set}" = set; then :
5604   withval=$with_bonjour;
5605   case $withval in
5606     yes)
5607
5608 $as_echo "#define USE_BONJOUR 1" >>confdefs.h
5609
5610       ;;
5611     no)
5612       :
5613       ;;
5614     *)
5615       as_fn_error $? "no argument expected for --with-bonjour option" "$LINENO" 5
5616       ;;
5617   esac
5618
5619 else
5620   with_bonjour=no
5621
5622 fi
5623
5624
5625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bonjour" >&5
5626 $as_echo "$with_bonjour" >&6; }
5627
5628
5629 #
5630 # OpenSSL
5631 #
5632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with OpenSSL support" >&5
5633 $as_echo_n "checking whether to build with OpenSSL support... " >&6; }
5634
5635
5636
5637 # Check whether --with-openssl was given.
5638 if test "${with_openssl+set}" = set; then :
5639   withval=$with_openssl;
5640   case $withval in
5641     yes)
5642
5643 $as_echo "#define USE_OPENSSL 1" >>confdefs.h
5644
5645       ;;
5646     no)
5647       :
5648       ;;
5649     *)
5650       as_fn_error $? "no argument expected for --with-openssl option" "$LINENO" 5
5651       ;;
5652   esac
5653
5654 else
5655   with_openssl=no
5656
5657 fi
5658
5659
5660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_openssl" >&5
5661 $as_echo "$with_openssl" >&6; }
5662
5663
5664 #
5665 # SELinux
5666 #
5667 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with SELinux support" >&5
5668 $as_echo_n "checking whether to build with SELinux support... " >&6; }
5669
5670
5671
5672 # Check whether --with-selinux was given.
5673 if test "${with_selinux+set}" = set; then :
5674   withval=$with_selinux;
5675   case $withval in
5676     yes)
5677       :
5678       ;;
5679     no)
5680       :
5681       ;;
5682     *)
5683       as_fn_error $? "no argument expected for --with-selinux option" "$LINENO" 5
5684       ;;
5685   esac
5686
5687 else
5688   with_selinux=no
5689
5690 fi
5691
5692
5693
5694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_selinux" >&5
5695 $as_echo "$with_selinux" >&6; }
5696
5697 #
5698 # Readline
5699 #
5700
5701
5702
5703 # Check whether --with-readline was given.
5704 if test "${with_readline+set}" = set; then :
5705   withval=$with_readline;
5706   case $withval in
5707     yes)
5708       :
5709       ;;
5710     no)
5711       :
5712       ;;
5713     *)
5714       as_fn_error $? "no argument expected for --with-readline option" "$LINENO" 5
5715       ;;
5716   esac
5717
5718 else
5719   with_readline=yes
5720
5721 fi
5722
5723
5724 # readline on MinGW has problems with backslashes in psql and other bugs.
5725 # This is particularly a problem with non-US code pages.
5726 # Therefore disable its use until we understand the cause. 2004-07-20
5727 if test "$PORTNAME" = "win32"; then
5728   if test "$with_readline" = yes; then
5729     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Readline does not work on MinGW --- disabling" >&5
5730 $as_echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
5731     with_readline=no
5732   fi
5733 fi
5734
5735
5736 #
5737 # Prefer libedit
5738 #
5739
5740
5741
5742 # Check whether --with-libedit-preferred was given.
5743 if test "${with_libedit_preferred+set}" = set; then :
5744   withval=$with_libedit_preferred;
5745   case $withval in
5746     yes)
5747       :
5748       ;;
5749     no)
5750       :
5751       ;;
5752     *)
5753       as_fn_error $? "no argument expected for --with-libedit-preferred option" "$LINENO" 5
5754       ;;
5755   esac
5756
5757 else
5758   with_libedit_preferred=no
5759
5760 fi
5761
5762
5763
5764
5765 #
5766 # UUID library
5767 #
5768 # There are at least three UUID libraries in common use: the FreeBSD/NetBSD
5769 # library, the e2fsprogs libuuid (now part of util-linux-ng), and the OSSP
5770 # UUID library.  More than one of these might be present on a given platform,
5771 # so we make the user say which one she wants.
5772 #
5773
5774
5775
5776 # Check whether --with-uuid was given.
5777 if test "${with_uuid+set}" = set; then :
5778   withval=$with_uuid;
5779   case $withval in
5780     yes)
5781       as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
5782       ;;
5783     no)
5784       as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
5785       ;;
5786     *)
5787
5788       ;;
5789   esac
5790
5791 fi
5792
5793
5794 if test x"$with_uuid" = x"" ; then
5795   with_uuid=no
5796 fi
5797
5798
5799
5800 # Check whether --with-ossp-uuid was given.
5801 if test "${with_ossp_uuid+set}" = set; then :
5802   withval=$with_ossp_uuid;
5803   case $withval in
5804     yes)
5805       :
5806       ;;
5807     no)
5808       :
5809       ;;
5810     *)
5811       as_fn_error $? "no argument expected for --with-ossp-uuid option" "$LINENO" 5
5812       ;;
5813   esac
5814
5815 else
5816   with_ossp_uuid=no
5817
5818 fi
5819
5820
5821 if test "$with_ossp_uuid" = yes ; then
5822   with_uuid=ossp
5823 fi
5824
5825 if test "$with_uuid" = bsd ; then
5826
5827 $as_echo "#define HAVE_UUID_BSD 1" >>confdefs.h
5828
5829   UUID_EXTRA_OBJS="md5.o sha1.o"
5830 elif test "$with_uuid" = e2fs ; then
5831
5832 $as_echo "#define HAVE_UUID_E2FS 1" >>confdefs.h
5833
5834   UUID_EXTRA_OBJS="md5.o sha1.o"
5835 elif test "$with_uuid" = ossp ; then
5836
5837 $as_echo "#define HAVE_UUID_OSSP 1" >>confdefs.h
5838
5839   UUID_EXTRA_OBJS=""
5840 elif test "$with_uuid" = no ; then
5841   UUID_EXTRA_OBJS=""
5842 else
5843   as_fn_error $? "--with-uuid must specify one of bsd, e2fs, or ossp" "$LINENO" 5
5844 fi
5845
5846
5847
5848
5849 #
5850 # XML
5851 #
5852
5853
5854
5855 # Check whether --with-libxml was given.
5856 if test "${with_libxml+set}" = set; then :
5857   withval=$with_libxml;
5858   case $withval in
5859     yes)
5860
5861 $as_echo "#define USE_LIBXML 1" >>confdefs.h
5862
5863       ;;
5864     no)
5865       :
5866       ;;
5867     *)
5868       as_fn_error $? "no argument expected for --with-libxml option" "$LINENO" 5
5869       ;;
5870   esac
5871
5872 else
5873   with_libxml=no
5874
5875 fi
5876
5877
5878
5879 if test "$with_libxml" = yes ; then
5880   for ac_prog in xml2-config
5881 do
5882   # Extract the first word of "$ac_prog", so it can be a program name with args.
5883 set dummy $ac_prog; ac_word=$2
5884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5885 $as_echo_n "checking for $ac_word... " >&6; }
5886 if ${ac_cv_prog_XML2_CONFIG+:} false; then :
5887   $as_echo_n "(cached) " >&6
5888 else
5889   if test -n "$XML2_CONFIG"; then
5890   ac_cv_prog_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test.
5891 else
5892 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5893 for as_dir in $PATH
5894 do
5895   IFS=$as_save_IFS
5896   test -z "$as_dir" && as_dir=.
5897     for ac_exec_ext in '' $ac_executable_extensions; do
5898   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5899     ac_cv_prog_XML2_CONFIG="$ac_prog"
5900     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5901     break 2
5902   fi
5903 done
5904   done
5905 IFS=$as_save_IFS
5906
5907 fi
5908 fi
5909 XML2_CONFIG=$ac_cv_prog_XML2_CONFIG
5910 if test -n "$XML2_CONFIG"; then
5911   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
5912 $as_echo "$XML2_CONFIG" >&6; }
5913 else
5914   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5915 $as_echo "no" >&6; }
5916 fi
5917
5918
5919   test -n "$XML2_CONFIG" && break
5920 done
5921
5922   if test -n "$XML2_CONFIG"; then
5923     for pgac_option in `$XML2_CONFIG --cflags`; do
5924       case $pgac_option in
5925         -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
5926       esac
5927     done
5928     for pgac_option in `$XML2_CONFIG --libs`; do
5929       case $pgac_option in
5930         -L*) LDFLAGS="$LDFLAGS $pgac_option";;
5931       esac
5932     done
5933   fi
5934 fi
5935
5936
5937
5938 #
5939 # XSLT
5940 #
5941
5942
5943
5944 # Check whether --with-libxslt was given.
5945 if test "${with_libxslt+set}" = set; then :
5946   withval=$with_libxslt;
5947   case $withval in
5948     yes)
5949
5950 $as_echo "#define USE_LIBXSLT 1" >>confdefs.h
5951
5952       ;;
5953     no)
5954       :
5955       ;;
5956     *)
5957       as_fn_error $? "no argument expected for --with-libxslt option" "$LINENO" 5
5958       ;;
5959   esac
5960
5961 else
5962   with_libxslt=no
5963
5964 fi
5965
5966
5967
5968
5969
5970
5971 #
5972 # tzdata
5973 #
5974
5975
5976
5977 # Check whether --with-system-tzdata was given.
5978 if test "${with_system_tzdata+set}" = set; then :
5979   withval=$with_system_tzdata;
5980   case $withval in
5981     yes)
5982       as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
5983       ;;
5984     no)
5985       as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
5986       ;;
5987     *)
5988
5989       ;;
5990   esac
5991
5992 fi
5993
5994
5995
5996
5997 #
5998 # Zlib
5999 #
6000
6001
6002
6003 # Check whether --with-zlib was given.
6004 if test "${with_zlib+set}" = set; then :
6005   withval=$with_zlib;
6006   case $withval in
6007     yes)
6008       :
6009       ;;
6010     no)
6011       :
6012       ;;
6013     *)
6014       as_fn_error $? "no argument expected for --with-zlib option" "$LINENO" 5
6015       ;;
6016   esac
6017
6018 else
6019   with_zlib=yes
6020
6021 fi
6022
6023
6024
6025
6026 #
6027 # Elf
6028 #
6029
6030 # Assume system is ELF if it predefines __ELF__ as 1,
6031 # otherwise believe host_os based default.
6032 case $host_os in
6033     freebsd1*|freebsd2*) elf=no;;
6034     freebsd3*|freebsd4*) elf=yes;;
6035 esac
6036
6037
6038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6039 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6040 if ${ac_cv_path_GREP+:} false; then :
6041   $as_echo_n "(cached) " >&6
6042 else
6043   if test -z "$GREP"; then
6044   ac_path_GREP_found=false
6045   # Loop through the user's path and test for each of PROGNAME-LIST
6046   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6047 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6048 do
6049   IFS=$as_save_IFS
6050   test -z "$as_dir" && as_dir=.
6051     for ac_prog in grep ggrep; do
6052     for ac_exec_ext in '' $ac_executable_extensions; do
6053       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6054       as_fn_executable_p "$ac_path_GREP" || continue
6055 # Check for GNU ac_path_GREP and select it if it is found.
6056   # Check for GNU $ac_path_GREP
6057 case `"$ac_path_GREP" --version 2>&1` in
6058 *GNU*)
6059   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6060 *)
6061   ac_count=0
6062   $as_echo_n 0123456789 >"conftest.in"
6063   while :
6064   do
6065     cat "conftest.in" "conftest.in" >"conftest.tmp"
6066     mv "conftest.tmp" "conftest.in"
6067     cp "conftest.in" "conftest.nl"
6068     $as_echo 'GREP' >> "conftest.nl"
6069     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6070     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6071     as_fn_arith $ac_count + 1 && ac_count=$as_val
6072     if test $ac_count -gt ${ac_path_GREP_max-0}; then
6073       # Best one so far, save it but keep looking for a better one
6074       ac_cv_path_GREP="$ac_path_GREP"
6075       ac_path_GREP_max=$ac_count
6076     fi
6077     # 10*(2^10) chars as input seems more than enough
6078     test $ac_count -gt 10 && break
6079   done
6080   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6081 esac
6082
6083       $ac_path_GREP_found && break 3
6084     done
6085   done
6086   done
6087 IFS=$as_save_IFS
6088   if test -z "$ac_cv_path_GREP"; then
6089     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6090   fi
6091 else
6092   ac_cv_path_GREP=$GREP
6093 fi
6094
6095 fi
6096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6097 $as_echo "$ac_cv_path_GREP" >&6; }
6098  GREP="$ac_cv_path_GREP"
6099
6100
6101 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6102 $as_echo_n "checking for egrep... " >&6; }
6103 if ${ac_cv_path_EGREP+:} false; then :
6104   $as_echo_n "(cached) " >&6
6105 else
6106   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6107    then ac_cv_path_EGREP="$GREP -E"
6108    else
6109      if test -z "$EGREP"; then
6110   ac_path_EGREP_found=false
6111   # Loop through the user's path and test for each of PROGNAME-LIST
6112   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6113 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6114 do
6115   IFS=$as_save_IFS
6116   test -z "$as_dir" && as_dir=.
6117     for ac_prog in egrep; do
6118     for ac_exec_ext in '' $ac_executable_extensions; do
6119       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6120       as_fn_executable_p "$ac_path_EGREP" || continue
6121 # Check for GNU ac_path_EGREP and select it if it is found.
6122   # Check for GNU $ac_path_EGREP
6123 case `"$ac_path_EGREP" --version 2>&1` in
6124 *GNU*)
6125   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6126 *)
6127   ac_count=0
6128   $as_echo_n 0123456789 >"conftest.in"
6129   while :
6130   do
6131     cat "conftest.in" "conftest.in" >"conftest.tmp"
6132     mv "conftest.tmp" "conftest.in"
6133     cp "conftest.in" "conftest.nl"
6134     $as_echo 'EGREP' >> "conftest.nl"
6135     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6136     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6137     as_fn_arith $ac_count + 1 && ac_count=$as_val
6138     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6139       # Best one so far, save it but keep looking for a better one
6140       ac_cv_path_EGREP="$ac_path_EGREP"
6141       ac_path_EGREP_max=$ac_count
6142     fi
6143     # 10*(2^10) chars as input seems more than enough
6144     test $ac_count -gt 10 && break
6145   done
6146   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6147 esac
6148
6149       $ac_path_EGREP_found && break 3
6150     done
6151   done
6152   done
6153 IFS=$as_save_IFS
6154   if test -z "$ac_cv_path_EGREP"; then
6155     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6156   fi
6157 else
6158   ac_cv_path_EGREP=$EGREP
6159 fi
6160
6161    fi
6162 fi
6163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6164 $as_echo "$ac_cv_path_EGREP" >&6; }
6165  EGREP="$ac_cv_path_EGREP"
6166
6167
6168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6169 /* end confdefs.h.  */
6170 #if __ELF__
6171   yes
6172 #endif
6173
6174 _ACEOF
6175 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6176   $EGREP "yes" >/dev/null 2>&1; then :
6177   ELF_SYS=true
6178 else
6179   if test "X$elf" = "Xyes" ; then
6180   ELF_SYS=true
6181 else
6182   ELF_SYS=
6183 fi
6184 fi
6185 rm -f conftest*
6186
6187
6188
6189 #
6190 # Assignments
6191 #
6192
6193 CPPFLAGS="$CPPFLAGS $INCLUDES"
6194 LDFLAGS="$LDFLAGS $LIBDIRS"
6195
6196
6197
6198
6199
6200 # Check whether --with-gnu-ld was given.
6201 if test "${with_gnu_ld+set}" = set; then :
6202   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
6203 else
6204   with_gnu_ld=no
6205 fi
6206
6207 ac_prog=ld
6208 if test "$GCC" = yes; then
6209   # Check if gcc -print-prog-name=ld gives a path.
6210   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
6211 $as_echo_n "checking for ld used by GCC... " >&6; }
6212   case $host in
6213   *-*-mingw*)
6214     # gcc leaves a trailing carriage return which upsets mingw
6215     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
6216   *)
6217     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
6218   esac
6219   case "$ac_prog" in
6220     # Accept absolute paths.
6221     [\\/]* | [A-Za-z]:[\\/]*)
6222       re_direlt='/[^/][^/]*/\.\./'
6223       # Canonicalize the path of ld
6224       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
6225       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
6226         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
6227       done
6228       test -z "$LD" && LD="$ac_prog"
6229       ;;
6230   "")
6231     # If it fails, then pretend we aren't using GCC.
6232     ac_prog=ld
6233     ;;
6234   *)
6235     # If it is relative, then search for the first ld in PATH.
6236     with_gnu_ld=unknown
6237     ;;
6238   esac
6239 elif test "$with_gnu_ld" = yes; then
6240   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
6241 $as_echo_n "checking for GNU ld... " >&6; }
6242 else
6243   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
6244 $as_echo_n "checking for non-GNU ld... " >&6; }
6245 fi
6246 if ${ac_cv_path_LD+:} false; then :
6247   $as_echo_n "(cached) " >&6
6248 else
6249   if test -z "$LD"; then
6250   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
6251   for ac_dir in $PATH; do
6252     test -z "$ac_dir" && ac_dir=.
6253     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
6254       ac_cv_path_LD="$ac_dir/$ac_prog"
6255       # Check to see if the program is GNU ld.  I'd rather use --version,
6256       # but apparently some GNU ld's only accept -v.
6257       # Break only if it was the GNU/non-GNU ld that we prefer.
6258       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
6259         test "$with_gnu_ld" != no && break
6260       else
6261         test "$with_gnu_ld" != yes && break
6262       fi
6263     fi
6264   done
6265   IFS="$ac_save_ifs"
6266 else
6267   ac_cv_path_LD="$LD" # Let the user override the test with a path.
6268 fi
6269 fi
6270
6271 LD="$ac_cv_path_LD"
6272 if test -n "$LD"; then
6273   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
6274 $as_echo "$LD" >&6; }
6275 else
6276   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6277 $as_echo "no" >&6; }
6278 fi
6279 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
6280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
6281 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
6282 if ${ac_cv_prog_gnu_ld+:} false; then :
6283   $as_echo_n "(cached) " >&6
6284 else
6285   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
6286 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
6287   ac_cv_prog_gnu_ld=yes
6288 else
6289   ac_cv_prog_gnu_ld=no
6290 fi
6291 fi
6292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gnu_ld" >&5
6293 $as_echo "$ac_cv_prog_gnu_ld" >&6; }
6294 with_gnu_ld=$ac_cv_prog_gnu_ld
6295
6296
6297
6298
6299 case $host_os in sysv5*)
6300   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ld -R works" >&5
6301 $as_echo_n "checking whether ld -R works... " >&6; }
6302 if ${pgac_cv_prog_ld_R+:} false; then :
6303   $as_echo_n "(cached) " >&6
6304 else
6305
6306     pgac_save_LDFLAGS=$LDFLAGS; LDFLAGS="$LDFLAGS -Wl,-R/usr/lib"
6307     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6308 /* end confdefs.h.  */
6309
6310 int
6311 main ()
6312 {
6313
6314   ;
6315   return 0;
6316 }
6317 _ACEOF
6318 if ac_fn_c_try_link "$LINENO"; then :
6319   pgac_cv_prog_ld_R=yes
6320 else
6321   pgac_cv_prog_ld_R=no
6322 fi
6323 rm -f core conftest.err conftest.$ac_objext \
6324     conftest$ac_exeext conftest.$ac_ext
6325     LDFLAGS=$pgac_save_LDFLAGS
6326
6327 fi
6328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_ld_R" >&5
6329 $as_echo "$pgac_cv_prog_ld_R" >&6; }
6330   ld_R_works=$pgac_cv_prog_ld_R
6331
6332 esac
6333 if test -n "$ac_tool_prefix"; then
6334   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6335 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6336 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6337 $as_echo_n "checking for $ac_word... " >&6; }
6338 if ${ac_cv_prog_RANLIB+:} false; then :
6339   $as_echo_n "(cached) " >&6
6340 else
6341   if test -n "$RANLIB"; then
6342   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6343 else
6344 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6345 for as_dir in $PATH
6346 do
6347   IFS=$as_save_IFS
6348   test -z "$as_dir" && as_dir=.
6349     for ac_exec_ext in '' $ac_executable_extensions; do
6350   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6351     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6352     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6353     break 2
6354   fi
6355 done
6356   done
6357 IFS=$as_save_IFS
6358
6359 fi
6360 fi
6361 RANLIB=$ac_cv_prog_RANLIB
6362 if test -n "$RANLIB"; then
6363   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6364 $as_echo "$RANLIB" >&6; }
6365 else
6366   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6367 $as_echo "no" >&6; }
6368 fi
6369
6370
6371 fi
6372 if test -z "$ac_cv_prog_RANLIB"; then
6373   ac_ct_RANLIB=$RANLIB
6374   # Extract the first word of "ranlib", so it can be a program name with args.
6375 set dummy ranlib; ac_word=$2
6376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6377 $as_echo_n "checking for $ac_word... " >&6; }
6378 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
6379   $as_echo_n "(cached) " >&6
6380 else
6381   if test -n "$ac_ct_RANLIB"; then
6382   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6383 else
6384 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6385 for as_dir in $PATH
6386 do
6387   IFS=$as_save_IFS
6388   test -z "$as_dir" && as_dir=.
6389     for ac_exec_ext in '' $ac_executable_extensions; do
6390   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6391     ac_cv_prog_ac_ct_RANLIB="ranlib"
6392     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6393     break 2
6394   fi
6395 done
6396   done
6397 IFS=$as_save_IFS
6398
6399 fi
6400 fi
6401 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6402 if test -n "$ac_ct_RANLIB"; then
6403   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6404 $as_echo "$ac_ct_RANLIB" >&6; }
6405 else
6406   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6407 $as_echo "no" >&6; }
6408 fi
6409
6410   if test "x$ac_ct_RANLIB" = x; then
6411     RANLIB=":"
6412   else
6413     case $cross_compiling:$ac_tool_warned in
6414 yes:)
6415 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6416 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6417 ac_tool_warned=yes ;;
6418 esac
6419     RANLIB=$ac_ct_RANLIB
6420   fi
6421 else
6422   RANLIB="$ac_cv_prog_RANLIB"
6423 fi
6424
6425
6426   if test -n "$ac_tool_prefix"; then
6427   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
6428 set dummy ${ac_tool_prefix}strip; ac_word=$2
6429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6430 $as_echo_n "checking for $ac_word... " >&6; }
6431 if ${ac_cv_prog_STRIP+:} false; then :
6432   $as_echo_n "(cached) " >&6
6433 else
6434   if test -n "$STRIP"; then
6435   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
6436 else
6437 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6438 for as_dir in $PATH
6439 do
6440   IFS=$as_save_IFS
6441   test -z "$as_dir" && as_dir=.
6442     for ac_exec_ext in '' $ac_executable_extensions; do
6443   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6444     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
6445     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6446     break 2
6447   fi
6448 done
6449   done
6450 IFS=$as_save_IFS
6451
6452 fi
6453 fi
6454 STRIP=$ac_cv_prog_STRIP
6455 if test -n "$STRIP"; then
6456   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
6457 $as_echo "$STRIP" >&6; }
6458 else
6459   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6460 $as_echo "no" >&6; }
6461 fi
6462
6463
6464 fi
6465 if test -z "$ac_cv_prog_STRIP"; then
6466   ac_ct_STRIP=$STRIP
6467   # Extract the first word of "strip", so it can be a program name with args.
6468 set dummy strip; ac_word=$2
6469 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6470 $as_echo_n "checking for $ac_word... " >&6; }
6471 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
6472   $as_echo_n "(cached) " >&6
6473 else
6474   if test -n "$ac_ct_STRIP"; then
6475   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
6476 else
6477 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6478 for as_dir in $PATH
6479 do
6480   IFS=$as_save_IFS
6481   test -z "$as_dir" && as_dir=.
6482     for ac_exec_ext in '' $ac_executable_extensions; do
6483   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6484     ac_cv_prog_ac_ct_STRIP="strip"
6485     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6486     break 2
6487   fi
6488 done
6489   done
6490 IFS=$as_save_IFS
6491
6492 fi
6493 fi
6494 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
6495 if test -n "$ac_ct_STRIP"; then
6496   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
6497 $as_echo "$ac_ct_STRIP" >&6; }
6498 else
6499   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6500 $as_echo "no" >&6; }
6501 fi
6502
6503   if test "x$ac_ct_STRIP" = x; then
6504     STRIP=":"
6505   else
6506     case $cross_compiling:$ac_tool_warned in
6507 yes:)
6508 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6509 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6510 ac_tool_warned=yes ;;
6511 esac
6512     STRIP=$ac_ct_STRIP
6513   fi
6514 else
6515   STRIP="$ac_cv_prog_STRIP"
6516 fi
6517
6518
6519   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is possible to strip libraries" >&5
6520 $as_echo_n "checking whether it is possible to strip libraries... " >&6; }
6521   if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
6522     STRIP_STATIC_LIB="$STRIP -x"
6523     STRIP_SHARED_LIB="$STRIP --strip-unneeded"
6524     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6525 $as_echo "yes" >&6; }
6526   else
6527     case $host_os in
6528       darwin*)
6529         STRIP="$STRIP -x"
6530         STRIP_STATIC_LIB=$STRIP
6531         STRIP_SHARED_LIB=$STRIP
6532         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6533 $as_echo "yes" >&6; }
6534         ;;
6535       *)
6536         STRIP_STATIC_LIB=:
6537         STRIP_SHARED_LIB=:
6538         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6539 $as_echo "no" >&6; }
6540         ;;
6541     esac
6542   fi
6543
6544
6545
6546 if test -n "$ac_tool_prefix"; then
6547   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6548 set dummy ${ac_tool_prefix}ar; ac_word=$2
6549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6550 $as_echo_n "checking for $ac_word... " >&6; }
6551 if ${ac_cv_prog_AR+:} false; then :
6552   $as_echo_n "(cached) " >&6
6553 else
6554   if test -n "$AR"; then
6555   ac_cv_prog_AR="$AR" # Let the user override the test.
6556 else
6557 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6558 for as_dir in $PATH
6559 do
6560   IFS=$as_save_IFS
6561   test -z "$as_dir" && as_dir=.
6562     for ac_exec_ext in '' $ac_executable_extensions; do
6563   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6564     ac_cv_prog_AR="${ac_tool_prefix}ar"
6565     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6566     break 2
6567   fi
6568 done
6569   done
6570 IFS=$as_save_IFS
6571
6572 fi
6573 fi
6574 AR=$ac_cv_prog_AR
6575 if test -n "$AR"; then
6576   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6577 $as_echo "$AR" >&6; }
6578 else
6579   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6580 $as_echo "no" >&6; }
6581 fi
6582
6583
6584 fi
6585 if test -z "$ac_cv_prog_AR"; then
6586   ac_ct_AR=$AR
6587   # Extract the first word of "ar", so it can be a program name with args.
6588 set dummy ar; ac_word=$2
6589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6590 $as_echo_n "checking for $ac_word... " >&6; }
6591 if ${ac_cv_prog_ac_ct_AR+:} false; then :
6592   $as_echo_n "(cached) " >&6
6593 else
6594   if test -n "$ac_ct_AR"; then
6595   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6596 else
6597 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6598 for as_dir in $PATH
6599 do
6600   IFS=$as_save_IFS
6601   test -z "$as_dir" && as_dir=.
6602     for ac_exec_ext in '' $ac_executable_extensions; do
6603   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6604     ac_cv_prog_ac_ct_AR="ar"
6605     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6606     break 2
6607   fi
6608 done
6609   done
6610 IFS=$as_save_IFS
6611
6612 fi
6613 fi
6614 ac_ct_AR=$ac_cv_prog_ac_ct_AR
6615 if test -n "$ac_ct_AR"; then
6616   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6617 $as_echo "$ac_ct_AR" >&6; }
6618 else
6619   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6620 $as_echo "no" >&6; }
6621 fi
6622
6623   if test "x$ac_ct_AR" = x; then
6624     AR="ar"
6625   else
6626     case $cross_compiling:$ac_tool_warned in
6627 yes:)
6628 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6629 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6630 ac_tool_warned=yes ;;
6631 esac
6632     AR=$ac_ct_AR
6633   fi
6634 else
6635   AR="$ac_cv_prog_AR"
6636 fi
6637
6638 if test "$PORTNAME" = "win32"; then
6639   if test -n "$ac_tool_prefix"; then
6640   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
6641 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
6642 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6643 $as_echo_n "checking for $ac_word... " >&6; }
6644 if ${ac_cv_prog_DLLTOOL+:} false; then :
6645   $as_echo_n "(cached) " >&6
6646 else
6647   if test -n "$DLLTOOL"; then
6648   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
6649 else
6650 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6651 for as_dir in $PATH
6652 do
6653   IFS=$as_save_IFS
6654   test -z "$as_dir" && as_dir=.
6655     for ac_exec_ext in '' $ac_executable_extensions; do
6656   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6657     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
6658     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6659     break 2
6660   fi
6661 done
6662   done
6663 IFS=$as_save_IFS
6664
6665 fi
6666 fi
6667 DLLTOOL=$ac_cv_prog_DLLTOOL
6668 if test -n "$DLLTOOL"; then
6669   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
6670 $as_echo "$DLLTOOL" >&6; }
6671 else
6672   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6673 $as_echo "no" >&6; }
6674 fi
6675
6676
6677 fi
6678 if test -z "$ac_cv_prog_DLLTOOL"; then
6679   ac_ct_DLLTOOL=$DLLTOOL
6680   # Extract the first word of "dlltool", so it can be a program name with args.
6681 set dummy dlltool; ac_word=$2
6682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6683 $as_echo_n "checking for $ac_word... " >&6; }
6684 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
6685   $as_echo_n "(cached) " >&6
6686 else
6687   if test -n "$ac_ct_DLLTOOL"; then
6688   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
6689 else
6690 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6691 for as_dir in $PATH
6692 do
6693   IFS=$as_save_IFS
6694   test -z "$as_dir" && as_dir=.
6695     for ac_exec_ext in '' $ac_executable_extensions; do
6696   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6697     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
6698     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6699     break 2
6700   fi
6701 done
6702   done
6703 IFS=$as_save_IFS
6704
6705 fi
6706 fi
6707 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
6708 if test -n "$ac_ct_DLLTOOL"; then
6709   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
6710 $as_echo "$ac_ct_DLLTOOL" >&6; }
6711 else
6712   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6713 $as_echo "no" >&6; }
6714 fi
6715
6716   if test "x$ac_ct_DLLTOOL" = x; then
6717     DLLTOOL="dlltool"
6718   else
6719     case $cross_compiling:$ac_tool_warned in
6720 yes:)
6721 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6722 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6723 ac_tool_warned=yes ;;
6724 esac
6725     DLLTOOL=$ac_ct_DLLTOOL
6726   fi
6727 else
6728   DLLTOOL="$ac_cv_prog_DLLTOOL"
6729 fi
6730
6731   if test -n "$ac_tool_prefix"; then
6732   # Extract the first word of "${ac_tool_prefix}dllwrap", so it can be a program name with args.
6733 set dummy ${ac_tool_prefix}dllwrap; ac_word=$2
6734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6735 $as_echo_n "checking for $ac_word... " >&6; }
6736 if ${ac_cv_prog_DLLWRAP+:} false; then :
6737   $as_echo_n "(cached) " >&6
6738 else
6739   if test -n "$DLLWRAP"; then
6740   ac_cv_prog_DLLWRAP="$DLLWRAP" # Let the user override the test.
6741 else
6742 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6743 for as_dir in $PATH
6744 do
6745   IFS=$as_save_IFS
6746   test -z "$as_dir" && as_dir=.
6747     for ac_exec_ext in '' $ac_executable_extensions; do
6748   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6749     ac_cv_prog_DLLWRAP="${ac_tool_prefix}dllwrap"
6750     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6751     break 2
6752   fi
6753 done
6754   done
6755 IFS=$as_save_IFS
6756
6757 fi
6758 fi
6759 DLLWRAP=$ac_cv_prog_DLLWRAP
6760 if test -n "$DLLWRAP"; then
6761   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLWRAP" >&5
6762 $as_echo "$DLLWRAP" >&6; }
6763 else
6764   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6765 $as_echo "no" >&6; }
6766 fi
6767
6768
6769 fi
6770 if test -z "$ac_cv_prog_DLLWRAP"; then
6771   ac_ct_DLLWRAP=$DLLWRAP
6772   # Extract the first word of "dllwrap", so it can be a program name with args.
6773 set dummy dllwrap; ac_word=$2
6774 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6775 $as_echo_n "checking for $ac_word... " >&6; }
6776 if ${ac_cv_prog_ac_ct_DLLWRAP+:} false; then :
6777   $as_echo_n "(cached) " >&6
6778 else
6779   if test -n "$ac_ct_DLLWRAP"; then
6780   ac_cv_prog_ac_ct_DLLWRAP="$ac_ct_DLLWRAP" # Let the user override the test.
6781 else
6782 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6783 for as_dir in $PATH
6784 do
6785   IFS=$as_save_IFS
6786   test -z "$as_dir" && as_dir=.
6787     for ac_exec_ext in '' $ac_executable_extensions; do
6788   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6789     ac_cv_prog_ac_ct_DLLWRAP="dllwrap"
6790     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6791     break 2
6792   fi
6793 done
6794   done
6795 IFS=$as_save_IFS
6796
6797 fi
6798 fi
6799 ac_ct_DLLWRAP=$ac_cv_prog_ac_ct_DLLWRAP
6800 if test -n "$ac_ct_DLLWRAP"; then
6801   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLWRAP" >&5
6802 $as_echo "$ac_ct_DLLWRAP" >&6; }
6803 else
6804   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6805 $as_echo "no" >&6; }
6806 fi
6807
6808   if test "x$ac_ct_DLLWRAP" = x; then
6809     DLLWRAP="dllwrap"
6810   else
6811     case $cross_compiling:$ac_tool_warned in
6812 yes:)
6813 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6814 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6815 ac_tool_warned=yes ;;
6816 esac
6817     DLLWRAP=$ac_ct_DLLWRAP
6818   fi
6819 else
6820   DLLWRAP="$ac_cv_prog_DLLWRAP"
6821 fi
6822
6823   if test -n "$ac_tool_prefix"; then
6824   # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
6825 set dummy ${ac_tool_prefix}windres; ac_word=$2
6826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6827 $as_echo_n "checking for $ac_word... " >&6; }
6828 if ${ac_cv_prog_WINDRES+:} false; then :
6829   $as_echo_n "(cached) " >&6
6830 else
6831   if test -n "$WINDRES"; then
6832   ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
6833 else
6834 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6835 for as_dir in $PATH
6836 do
6837   IFS=$as_save_IFS
6838   test -z "$as_dir" && as_dir=.
6839     for ac_exec_ext in '' $ac_executable_extensions; do
6840   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6841     ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
6842     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6843     break 2
6844   fi
6845 done
6846   done
6847 IFS=$as_save_IFS
6848
6849 fi
6850 fi
6851 WINDRES=$ac_cv_prog_WINDRES
6852 if test -n "$WINDRES"; then
6853   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
6854 $as_echo "$WINDRES" >&6; }
6855 else
6856   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6857 $as_echo "no" >&6; }
6858 fi
6859
6860
6861 fi
6862 if test -z "$ac_cv_prog_WINDRES"; then
6863   ac_ct_WINDRES=$WINDRES
6864   # Extract the first word of "windres", so it can be a program name with args.
6865 set dummy windres; ac_word=$2
6866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6867 $as_echo_n "checking for $ac_word... " >&6; }
6868 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
6869   $as_echo_n "(cached) " >&6
6870 else
6871   if test -n "$ac_ct_WINDRES"; then
6872   ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
6873 else
6874 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6875 for as_dir in $PATH
6876 do
6877   IFS=$as_save_IFS
6878   test -z "$as_dir" && as_dir=.
6879     for ac_exec_ext in '' $ac_executable_extensions; do
6880   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6881     ac_cv_prog_ac_ct_WINDRES="windres"
6882     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6883     break 2
6884   fi
6885 done
6886   done
6887 IFS=$as_save_IFS
6888
6889 fi
6890 fi
6891 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
6892 if test -n "$ac_ct_WINDRES"; then
6893   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
6894 $as_echo "$ac_ct_WINDRES" >&6; }
6895 else
6896   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6897 $as_echo "no" >&6; }
6898 fi
6899
6900   if test "x$ac_ct_WINDRES" = x; then
6901     WINDRES="windres"
6902   else
6903     case $cross_compiling:$ac_tool_warned in
6904 yes:)
6905 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6906 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6907 ac_tool_warned=yes ;;
6908 esac
6909     WINDRES=$ac_ct_WINDRES
6910   fi
6911 else
6912   WINDRES="$ac_cv_prog_WINDRES"
6913 fi
6914
6915 fi
6916
6917 # Find a good install program.  We prefer a C program (faster),
6918 # so one script is as good as another.  But avoid the broken or
6919 # incompatible versions:
6920 # SysV /etc/install, /usr/sbin/install
6921 # SunOS /usr/etc/install
6922 # IRIX /sbin/install
6923 # AIX /bin/install
6924 # AmigaOS /C/install, which installs bootblocks on floppy discs
6925 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6926 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
6927 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6928 # OS/2's system install, which has a completely different semantic
6929 # ./install, which can be erroneously created by make from ./install.sh.
6930 # Reject install programs that cannot install multiple files.
6931 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6932 $as_echo_n "checking for a BSD-compatible install... " >&6; }
6933 if test -z "$INSTALL"; then
6934 if ${ac_cv_path_install+:} false; then :
6935   $as_echo_n "(cached) " >&6
6936 else
6937   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6938 for as_dir in $PATH
6939 do
6940   IFS=$as_save_IFS
6941   test -z "$as_dir" && as_dir=.
6942     # Account for people who put trailing slashes in PATH elements.
6943 case $as_dir/ in #((
6944   ./ | .// | /[cC]/* | \
6945   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
6946   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
6947   /usr/ucb/* ) ;;
6948   *)
6949     # OSF1 and SCO ODT 3.0 have their own names for install.
6950     # Don't use installbsd from OSF since it installs stuff as root
6951     # by default.
6952     for ac_prog in ginstall scoinst install; do
6953       for ac_exec_ext in '' $ac_executable_extensions; do
6954         if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
6955           if test $ac_prog = install &&
6956             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6957             # AIX install.  It has an incompatible calling convention.
6958             :
6959           elif test $ac_prog = install &&
6960             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6961             # program-specific install script used by HP pwplus--don't use.
6962             :
6963           else
6964             rm -rf conftest.one conftest.two conftest.dir
6965             echo one > conftest.one
6966             echo two > conftest.two
6967             mkdir conftest.dir
6968             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6969               test -s conftest.one && test -s conftest.two &&
6970               test -s conftest.dir/conftest.one &&
6971               test -s conftest.dir/conftest.two
6972             then
6973               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6974               break 3
6975             fi
6976           fi
6977         fi
6978       done
6979     done
6980     ;;
6981 esac
6982
6983   done
6984 IFS=$as_save_IFS
6985
6986 rm -rf conftest.one conftest.two conftest.dir
6987
6988 fi
6989   if test "${ac_cv_path_install+set}" = set; then
6990     INSTALL=$ac_cv_path_install
6991   else
6992     # As a last resort, use the slow shell script.  Don't cache a
6993     # value for INSTALL within a source directory, because that will
6994     # break other packages using the cache if that directory is
6995     # removed, or if the value is a relative name.
6996     INSTALL=$ac_install_sh
6997   fi
6998 fi
6999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
7000 $as_echo "$INSTALL" >&6; }
7001
7002 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7003 # It thinks the first close brace ends the variable substitution.
7004 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7005
7006 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
7007
7008 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
7009
7010 # When Autoconf chooses install-sh as install program it tries to generate
7011 # a relative path to it in each makefile where it subsitutes it. This clashes
7012 # with our Makefile.global concept. This workaround helps.
7013 case $INSTALL in
7014   *install-sh*) install_bin='';;
7015   *) install_bin=$INSTALL;;
7016 esac
7017
7018
7019 # Extract the first word of "tar", so it can be a program name with args.
7020 set dummy tar; ac_word=$2
7021 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7022 $as_echo_n "checking for $ac_word... " >&6; }
7023 if ${ac_cv_path_TAR+:} false; then :
7024   $as_echo_n "(cached) " >&6
7025 else
7026   case $TAR in
7027   [\\/]* | ?:[\\/]*)
7028   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
7029   ;;
7030   *)
7031   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7032 for as_dir in $PATH
7033 do
7034   IFS=$as_save_IFS
7035   test -z "$as_dir" && as_dir=.
7036     for ac_exec_ext in '' $ac_executable_extensions; do
7037   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7038     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
7039     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7040     break 2
7041   fi
7042 done
7043   done
7044 IFS=$as_save_IFS
7045
7046   ;;
7047 esac
7048 fi
7049 TAR=$ac_cv_path_TAR
7050 if test -n "$TAR"; then
7051   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
7052 $as_echo "$TAR" >&6; }
7053 else
7054   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7055 $as_echo "no" >&6; }
7056 fi
7057
7058
7059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7060 $as_echo_n "checking whether ln -s works... " >&6; }
7061 LN_S=$as_ln_s
7062 if test "$LN_S" = "ln -s"; then
7063   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7064 $as_echo "yes" >&6; }
7065 else
7066   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7067 $as_echo "no, using $LN_S" >&6; }
7068 fi
7069
7070 for ac_prog in gawk mawk nawk awk
7071 do
7072   # Extract the first word of "$ac_prog", so it can be a program name with args.
7073 set dummy $ac_prog; ac_word=$2
7074 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7075 $as_echo_n "checking for $ac_word... " >&6; }
7076 if ${ac_cv_prog_AWK+:} false; then :
7077   $as_echo_n "(cached) " >&6
7078 else
7079   if test -n "$AWK"; then
7080   ac_cv_prog_AWK="$AWK" # Let the user override the test.
7081 else
7082 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7083 for as_dir in $PATH
7084 do
7085   IFS=$as_save_IFS
7086   test -z "$as_dir" && as_dir=.
7087     for ac_exec_ext in '' $ac_executable_extensions; do
7088   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7089     ac_cv_prog_AWK="$ac_prog"
7090     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7091     break 2
7092   fi
7093 done
7094   done
7095 IFS=$as_save_IFS
7096
7097 fi
7098 fi
7099 AWK=$ac_cv_prog_AWK
7100 if test -n "$AWK"; then
7101   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7102 $as_echo "$AWK" >&6; }
7103 else
7104   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7105 $as_echo "no" >&6; }
7106 fi
7107
7108
7109   test -n "$AWK" && break
7110 done
7111
7112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
7113 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
7114 if test -z "$MKDIR_P"; then
7115   if ${ac_cv_path_mkdir+:} false; then :
7116   $as_echo_n "(cached) " >&6
7117 else
7118   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7119 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
7120 do
7121   IFS=$as_save_IFS
7122   test -z "$as_dir" && as_dir=.
7123     for ac_prog in mkdir gmkdir; do
7124          for ac_exec_ext in '' $ac_executable_extensions; do
7125            as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
7126            case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
7127              'mkdir (GNU coreutils) '* | \
7128              'mkdir (coreutils) '* | \
7129              'mkdir (fileutils) '4.1*)
7130                ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
7131                break 3;;
7132            esac
7133          done
7134        done
7135   done
7136 IFS=$as_save_IFS
7137
7138 fi
7139
7140   test -d ./--version && rmdir ./--version
7141   if test "${ac_cv_path_mkdir+set}" = set; then
7142     MKDIR_P="$ac_cv_path_mkdir -p"
7143   else
7144     # As a last resort, use the slow shell script.  Don't cache a
7145     # value for MKDIR_P within a source directory, because that will
7146     # break other packages using the cache if that directory is
7147     # removed, or if the value is a relative name.
7148     MKDIR_P="$ac_install_sh -d"
7149   fi
7150 fi
7151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
7152 $as_echo "$MKDIR_P" >&6; }
7153
7154 # When Autoconf chooses install-sh as mkdir -p program it tries to generate
7155 # a relative path to it in each makefile where it subsitutes it. This clashes
7156 # with our Makefile.global concept. This workaround helps.
7157 case $MKDIR_P in
7158   *install-sh*) MKDIR_P='\${SHELL} \${top_srcdir}/config/install-sh -c -d';;
7159 esac
7160
7161 # Let the user override the search
7162 if test -z "$BISON"; then
7163   for ac_prog in bison
7164 do
7165   # Extract the first word of "$ac_prog", so it can be a program name with args.
7166 set dummy $ac_prog; ac_word=$2
7167 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7168 $as_echo_n "checking for $ac_word... " >&6; }
7169 if ${ac_cv_path_BISON+:} false; then :
7170   $as_echo_n "(cached) " >&6
7171 else
7172   case $BISON in
7173   [\\/]* | ?:[\\/]*)
7174   ac_cv_path_BISON="$BISON" # Let the user override the test with a path.
7175   ;;
7176   *)
7177   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7178 for as_dir in $PATH
7179 do
7180   IFS=$as_save_IFS
7181   test -z "$as_dir" && as_dir=.
7182     for ac_exec_ext in '' $ac_executable_extensions; do
7183   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7184     ac_cv_path_BISON="$as_dir/$ac_word$ac_exec_ext"
7185     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7186     break 2
7187   fi
7188 done
7189   done
7190 IFS=$as_save_IFS
7191
7192   ;;
7193 esac
7194 fi
7195 BISON=$ac_cv_path_BISON
7196 if test -n "$BISON"; then
7197   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
7198 $as_echo "$BISON" >&6; }
7199 else
7200   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7201 $as_echo "no" >&6; }
7202 fi
7203
7204
7205   test -n "$BISON" && break
7206 done
7207
7208 fi
7209
7210 if test "$BISON"; then
7211   pgac_bison_version=`$BISON --version 2>/dev/null | sed q`
7212   { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_bison_version" >&5
7213 $as_echo "$as_me: using $pgac_bison_version" >&6;}
7214   if echo "$pgac_bison_version" | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'
7215   then
7216     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7217 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
7218 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&5
7219 $as_echo "$as_me: WARNING:
7220 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
7221 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&2;}
7222     BISON=""
7223   fi
7224   # Bison >=3.0 issues warnings about %name-prefix="base_yy", instead
7225   # of the now preferred %name-prefix "base_yy", but the latter
7226   # doesn't work with Bison 2.3 or less.  So for now we silence the
7227   # deprecation warnings.
7228   if echo "$pgac_bison_version" | $AWK '{ if ($4 >= 3) exit 0; else exit 1;}'
7229   then
7230     BISONFLAGS="$BISONFLAGS -Wno-deprecated"
7231   fi
7232 fi
7233
7234 if test -z "$BISON"; then
7235   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7236 *** Without Bison you will not be able to build PostgreSQL from Git nor
7237 *** change any of the parser definition files.  You can obtain Bison from
7238 *** a GNU mirror site.  (If you are using the official distribution of
7239 *** PostgreSQL then you do not need to worry about this, because the Bison
7240 *** output is pre-generated.)" >&5
7241 $as_echo "$as_me: WARNING:
7242 *** Without Bison you will not be able to build PostgreSQL from Git nor
7243 *** change any of the parser definition files.  You can obtain Bison from
7244 *** a GNU mirror site.  (If you are using the official distribution of
7245 *** PostgreSQL then you do not need to worry about this, because the Bison
7246 *** output is pre-generated.)" >&2;}
7247 fi
7248 # We don't need AC_SUBST(BISON) because AC_PATH_PROG did it
7249
7250
7251 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flex" >&5
7252 $as_echo_n "checking for flex... " >&6; }
7253 if ${pgac_cv_path_flex+:} false; then :
7254   $as_echo_n "(cached) " >&6
7255 else
7256   # Let the user override the test
7257 if test -n "$FLEX"; then
7258   pgac_cv_path_flex=$FLEX
7259 else
7260   pgac_save_IFS=$IFS
7261   IFS=$PATH_SEPARATOR
7262   for pgac_dir in $PATH; do
7263     IFS=$pgac_save_IFS
7264     if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
7265       pgac_dir=`pwd`
7266     fi
7267     for pgac_prog in flex lex; do
7268       pgac_candidate="$pgac_dir/$pgac_prog"
7269       if test -f "$pgac_candidate" \
7270         && $pgac_candidate --version </dev/null >/dev/null 2>&1
7271       then
7272         echo '%%'  > conftest.l
7273         if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
7274           pgac_flex_version=`$pgac_candidate --version 2>/dev/null`
7275           if echo "$pgac_flex_version" | sed 's/[.a-z]/ /g' | $AWK '{ if ($1 = 2 && $2 = 5 && $3 >= 31) exit 0; else exit 1;}'
7276           then
7277             pgac_cv_path_flex=$pgac_candidate
7278             break 2
7279           else
7280             { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7281 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
7282 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&5
7283 $as_echo "$as_me: WARNING:
7284 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
7285 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&2;}
7286           fi
7287         fi
7288       fi
7289     done
7290   done
7291   rm -f conftest.l lex.yy.c
7292   : ${pgac_cv_path_flex=no}
7293 fi
7294
7295 fi
7296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_path_flex" >&5
7297 $as_echo "$pgac_cv_path_flex" >&6; }
7298 if test x"$pgac_cv_path_flex" = x"no"; then
7299   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7300 *** Without Flex you will not be able to build PostgreSQL from Git nor
7301 *** change any of the scanner definition files.  You can obtain Flex from
7302 *** a GNU mirror site.  (If you are using the official distribution of
7303 *** PostgreSQL then you do not need to worry about this because the Flex
7304 *** output is pre-generated.)" >&5
7305 $as_echo "$as_me: WARNING:
7306 *** Without Flex you will not be able to build PostgreSQL from Git nor
7307 *** change any of the scanner definition files.  You can obtain Flex from
7308 *** a GNU mirror site.  (If you are using the official distribution of
7309 *** PostgreSQL then you do not need to worry about this because the Flex
7310 *** output is pre-generated.)" >&2;}
7311
7312   FLEX=
7313 else
7314   FLEX=$pgac_cv_path_flex
7315   pgac_flex_version=`$FLEX --version 2>/dev/null`
7316   { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_flex_version" >&5
7317 $as_echo "$as_me: using $pgac_flex_version" >&6;}
7318 fi
7319
7320
7321
7322
7323
7324 # Let the user override the search
7325 if test -z "$PERL"; then
7326   # Extract the first word of "perl", so it can be a program name with args.
7327 set dummy perl; ac_word=$2
7328 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7329 $as_echo_n "checking for $ac_word... " >&6; }
7330 if ${ac_cv_path_PERL+:} false; then :
7331   $as_echo_n "(cached) " >&6
7332 else
7333   case $PERL in
7334   [\\/]* | ?:[\\/]*)
7335   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
7336   ;;
7337   *)
7338   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7339 for as_dir in $PATH
7340 do
7341   IFS=$as_save_IFS
7342   test -z "$as_dir" && as_dir=.
7343     for ac_exec_ext in '' $ac_executable_extensions; do
7344   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7345     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
7346     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7347     break 2
7348   fi
7349 done
7350   done
7351 IFS=$as_save_IFS
7352
7353   ;;
7354 esac
7355 fi
7356 PERL=$ac_cv_path_PERL
7357 if test -n "$PERL"; then
7358   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
7359 $as_echo "$PERL" >&6; }
7360 else
7361   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7362 $as_echo "no" >&6; }
7363 fi
7364
7365
7366 fi
7367
7368 if test "$PERL"; then
7369   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'`
7370   { $as_echo "$as_me:${as_lineno-$LINENO}: using perl $pgac_perl_version" >&5
7371 $as_echo "$as_me: using perl $pgac_perl_version" >&6;}
7372   if echo "$pgac_perl_version" | sed 's/[.a-z_]/ /g' | \
7373     $AWK '{ if ($1 = 5 && $2 >= 8) exit 1; else exit 0;}'
7374   then
7375     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7376 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
7377 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&5
7378 $as_echo "$as_me: WARNING:
7379 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
7380 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&2;}
7381     PERL=""
7382   fi
7383 fi
7384
7385 if test -z "$PERL"; then
7386   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7387 *** Without Perl you will not be able to build PostgreSQL from Git.
7388 *** You can obtain Perl from any CPAN mirror site.
7389 *** (If you are using the official distribution of PostgreSQL then you do not
7390 *** need to worry about this, because the Perl output is pre-generated.)" >&5
7391 $as_echo "$as_me: WARNING:
7392 *** Without Perl you will not be able to build PostgreSQL from Git.
7393 *** You can obtain Perl from any CPAN mirror site.
7394 *** (If you are using the official distribution of PostgreSQL then you do not
7395 *** need to worry about this, because the Perl output is pre-generated.)" >&2;}
7396 fi
7397
7398 if test "$with_perl" = yes; then
7399   if test -z "$PERL"; then
7400     as_fn_error $? "Perl not found" "$LINENO" 5
7401   fi
7402
7403 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl archlibexp" >&5
7404 $as_echo_n "checking for Perl archlibexp... " >&6; }
7405 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
7406 test "$PORTNAME" = "win32" && perl_archlibexp=`echo $perl_archlibexp | sed 's,\\\\,/,g'`
7407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_archlibexp" >&5
7408 $as_echo "$perl_archlibexp" >&6; }
7409 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl privlibexp" >&5
7410 $as_echo_n "checking for Perl privlibexp... " >&6; }
7411 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
7412 test "$PORTNAME" = "win32" && perl_privlibexp=`echo $perl_privlibexp | sed 's,\\\\,/,g'`
7413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_privlibexp" >&5
7414 $as_echo "$perl_privlibexp" >&6; }
7415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl useshrplib" >&5
7416 $as_echo_n "checking for Perl useshrplib... " >&6; }
7417 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
7418 test "$PORTNAME" = "win32" && perl_useshrplib=`echo $perl_useshrplib | sed 's,\\\\,/,g'`
7419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_useshrplib" >&5
7420 $as_echo "$perl_useshrplib" >&6; }
7421   if test "$perl_useshrplib" != yes && test "$perl_useshrplib" != true; then
7422     as_fn_error $? "cannot build PL/Perl because libperl is not a shared library
7423 You might have to rebuild your Perl installation.  Refer to the
7424 documentation for details.  Use --without-perl to disable building
7425 PL/Perl." "$LINENO" 5
7426   fi
7427
7428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flags to link embedded Perl" >&5
7429 $as_echo_n "checking for flags to link embedded Perl... " >&6; }
7430 if test "$PORTNAME" = "win32" ; then
7431 perl_lib=`basename $perl_archlibexp/CORE/perl[5-9]*.lib .lib`
7432 test -e "$perl_archlibexp/CORE/$perl_lib.lib" && perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
7433 else
7434 pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
7435 pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
7436 perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%" -e "s/ -arch [-a-zA-Z0-9_]*//g"`
7437 fi
7438 if test -z "$perl_embed_ldflags" ; then
7439         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7440 $as_echo "no" >&6; }
7441         as_fn_error $? "could not determine flags for linking embedded Perl.
7442 This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not
7443 installed." "$LINENO" 5
7444 else
7445         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ldflags" >&5
7446 $as_echo "$perl_embed_ldflags" >&6; }
7447 fi
7448
7449 fi
7450
7451 if test "$with_python" = yes; then
7452   # Extract the first word of "python", so it can be a program name with args.
7453 set dummy python; ac_word=$2
7454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7455 $as_echo_n "checking for $ac_word... " >&6; }
7456 if ${ac_cv_path_PYTHON+:} false; then :
7457   $as_echo_n "(cached) " >&6
7458 else
7459   case $PYTHON in
7460   [\\/]* | ?:[\\/]*)
7461   ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
7462   ;;
7463   *)
7464   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7465 for as_dir in $PATH
7466 do
7467   IFS=$as_save_IFS
7468   test -z "$as_dir" && as_dir=.
7469     for ac_exec_ext in '' $ac_executable_extensions; do
7470   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7471     ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
7472     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7473     break 2
7474   fi
7475 done
7476   done
7477 IFS=$as_save_IFS
7478
7479   ;;
7480 esac
7481 fi
7482 PYTHON=$ac_cv_path_PYTHON
7483 if test -n "$PYTHON"; then
7484   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
7485 $as_echo "$PYTHON" >&6; }
7486 else
7487   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7488 $as_echo "no" >&6; }
7489 fi
7490
7491
7492 if test x"$PYTHON" = x""; then
7493   as_fn_error $? "Python not found" "$LINENO" 5
7494 fi
7495
7496
7497 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python distutils module" >&5
7498 $as_echo_n "checking for Python distutils module... " >&6; }
7499 if "${PYTHON}" -c 'import distutils' 2>&5
7500 then
7501     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7502 $as_echo "yes" >&6; }
7503 else
7504     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7505 $as_echo "no" >&6; }
7506     as_fn_error $? "distutils module not found" "$LINENO" 5
7507 fi
7508 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python configuration directory" >&5
7509 $as_echo_n "checking Python configuration directory... " >&6; }
7510 python_majorversion=`${PYTHON} -c "import sys; print(sys.version[0])"`
7511 python_version=`${PYTHON} -c "import sys; print(sys.version[:3])"`
7512 python_configdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBPL'))))"`
7513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_configdir" >&5
7514 $as_echo "$python_configdir" >&6; }
7515
7516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python include directories" >&5
7517 $as_echo_n "checking Python include directories... " >&6; }
7518 python_includespec=`${PYTHON} -c "
7519 import distutils.sysconfig
7520 a = '-I' + distutils.sysconfig.get_python_inc(False)
7521 b = '-I' + distutils.sysconfig.get_python_inc(True)
7522 if a == b:
7523     print(a)
7524 else:
7525     print(a + ' ' + b)"`
7526 if test "$PORTNAME" = win32 ; then
7527     python_includespec=`echo $python_includespec | sed 's,[\],/,g'`
7528 fi
7529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_includespec" >&5
7530 $as_echo "$python_includespec" >&6; }
7531
7532
7533
7534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link an embedded Python application" >&5
7535 $as_echo_n "checking how to link an embedded Python application... " >&6; }
7536
7537 python_libdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBDIR'))))"`
7538 python_ldlibrary=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDLIBRARY'))))"`
7539 python_so=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('SO'))))"`
7540 ldlibrary=`echo "${python_ldlibrary}" | sed "s/${python_so}$//"`
7541 python_enable_shared=`${PYTHON} -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_vars().get('Py_ENABLE_SHARED',0))"`
7542
7543 if test x"${python_libdir}" != x"" -a x"${python_ldlibrary}" != x"" -a x"${python_ldlibrary}" != x"${ldlibrary}"
7544 then
7545         # New way: use the official shared library
7546         ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
7547         python_libspec="-L${python_libdir} -l${ldlibrary}"
7548 else
7549         # Old way: use libpython from python_configdir
7550         python_libdir="${python_configdir}"
7551         # LDVERSION was introduced in Python 3.2.
7552         python_ldversion=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDVERSION'))))"`
7553         if test x"${python_ldversion}" = x""; then
7554                 python_ldversion=$python_version
7555         fi
7556         python_libspec="-L${python_libdir} -lpython${python_ldversion}"
7557 fi
7558
7559 python_additional_libs=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBS','LIBC','LIBM','BASEMODLIBS'))))"`
7560
7561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_libspec} ${python_additional_libs}" >&5
7562 $as_echo "${python_libspec} ${python_additional_libs}" >&6; }
7563
7564
7565
7566
7567   # We need libpython as a shared library.  With Python >=2.5, we
7568   # check the Py_ENABLE_SHARED setting.  On Debian, the setting is not
7569   # correct before the jessie release (http://bugs.debian.org/695979).
7570   # We also want to support older Python versions.  So as a fallback
7571   # we see if there is a file that is named like a shared library.
7572
7573   if test "$python_enable_shared" != 1; then
7574     if test "$PORTNAME" = darwin; then
7575       # OS X does supply a .dylib even though Py_ENABLE_SHARED does
7576       # not get set.  The file detection logic below doesn't succeed
7577       # on older OS X versions, so make it explicit.
7578       python_enable_shared=1
7579     elif test "$PORTNAME" = win32; then
7580       # Windows also needs an explicit override.
7581       python_enable_shared=1
7582     else
7583       # We don't know the platform shared library extension here yet,
7584       # so we try some candidates.
7585       for dlsuffix in .so .sl; do
7586         if ls "$python_libdir"/libpython*${dlsuffix}* >/dev/null 2>&1; then
7587           python_enable_shared=1
7588           break
7589         fi
7590       done
7591     fi
7592   fi
7593
7594   if test "$python_enable_shared" != 1; then
7595     as_fn_error $? "cannot build PL/Python because libpython is not a shared library
7596 You might have to rebuild your Python installation.  Refer to the
7597 documentation for details.  Use --without-python to disable building
7598 PL/Python." "$LINENO" 5
7599   fi
7600 fi
7601
7602 if test "$cross_compiling" = yes && test -z "$with_system_tzdata"; then
7603   # Extract the first word of "zic", so it can be a program name with args.
7604 set dummy zic; ac_word=$2
7605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7606 $as_echo_n "checking for $ac_word... " >&6; }
7607 if ${ac_cv_path_ZIC+:} false; then :
7608   $as_echo_n "(cached) " >&6
7609 else
7610   case $ZIC in
7611   [\\/]* | ?:[\\/]*)
7612   ac_cv_path_ZIC="$ZIC" # Let the user override the test with a path.
7613   ;;
7614   *)
7615   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7616 for as_dir in $PATH
7617 do
7618   IFS=$as_save_IFS
7619   test -z "$as_dir" && as_dir=.
7620     for ac_exec_ext in '' $ac_executable_extensions; do
7621   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7622     ac_cv_path_ZIC="$as_dir/$ac_word$ac_exec_ext"
7623     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7624     break 2
7625   fi
7626 done
7627   done
7628 IFS=$as_save_IFS
7629
7630   ;;
7631 esac
7632 fi
7633 ZIC=$ac_cv_path_ZIC
7634 if test -n "$ZIC"; then
7635   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
7636 $as_echo "$ZIC" >&6; }
7637 else
7638   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7639 $as_echo "no" >&6; }
7640 fi
7641
7642
7643   if test -z "$ZIC"; then
7644     as_fn_error $? "
7645 When cross-compiling, either use the option --with-system-tzdata to use
7646 existing time-zone data, or set the environment variable ZIC to a zic
7647 program to use during the build." "$LINENO" 5
7648   fi
7649 fi
7650
7651 #
7652 # Pthreads
7653 #
7654 # For each platform, we need to know about any special compile and link
7655 # libraries, and whether the normal C function names are thread-safe.
7656 # See the comment at the top of src/port/thread.c for more information.
7657 # WIN32 doesn't need the pthread tests;  it always uses threads
7658 #
7659 # These tests are run before the library-tests, because linking with the
7660 # other libraries can pull in the pthread functions as a side-effect.  We
7661 # want to use the -pthread or similar flags directly, and not rely on
7662 # the side-effects of linking with some other library.
7663 #
7664 # note: We have to use AS_IF here rather than plain if. The AC_CHECK_HEADER
7665 # invocation below is the first one in the script, and autoconf generates
7666 # additional code for that, which must not be inside the if-block. AS_IF
7667 # knows how to do that.
7668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7669 $as_echo_n "checking for ANSI C header files... " >&6; }
7670 if ${ac_cv_header_stdc+:} false; then :
7671   $as_echo_n "(cached) " >&6
7672 else
7673   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7674 /* end confdefs.h.  */
7675 #include <stdlib.h>
7676 #include <stdarg.h>
7677 #include <string.h>
7678 #include <float.h>
7679
7680 int
7681 main ()
7682 {
7683
7684   ;
7685   return 0;
7686 }
7687 _ACEOF
7688 if ac_fn_c_try_compile "$LINENO"; then :
7689   ac_cv_header_stdc=yes
7690 else
7691   ac_cv_header_stdc=no
7692 fi
7693 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7694
7695 if test $ac_cv_header_stdc = yes; then
7696   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
7697   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7698 /* end confdefs.h.  */
7699 #include <string.h>
7700
7701 _ACEOF
7702 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7703   $EGREP "memchr" >/dev/null 2>&1; then :
7704
7705 else
7706   ac_cv_header_stdc=no
7707 fi
7708 rm -f conftest*
7709
7710 fi
7711
7712 if test $ac_cv_header_stdc = yes; then
7713   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
7714   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7715 /* end confdefs.h.  */
7716 #include <stdlib.h>
7717
7718 _ACEOF
7719 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7720   $EGREP "free" >/dev/null 2>&1; then :
7721
7722 else
7723   ac_cv_header_stdc=no
7724 fi
7725 rm -f conftest*
7726
7727 fi
7728
7729 if test $ac_cv_header_stdc = yes; then
7730   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
7731   if test "$cross_compiling" = yes; then :
7732   :
7733 else
7734   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7735 /* end confdefs.h.  */
7736 #include <ctype.h>
7737 #include <stdlib.h>
7738 #if ((' ' & 0x0FF) == 0x020)
7739 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7740 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7741 #else
7742 # define ISLOWER(c) \
7743                    (('a' <= (c) && (c) <= 'i') \
7744                      || ('j' <= (c) && (c) <= 'r') \
7745                      || ('s' <= (c) && (c) <= 'z'))
7746 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7747 #endif
7748
7749 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7750 int
7751 main ()
7752 {
7753   int i;
7754   for (i = 0; i < 256; i++)
7755     if (XOR (islower (i), ISLOWER (i))
7756         || toupper (i) != TOUPPER (i))
7757       return 2;
7758   return 0;
7759 }
7760 _ACEOF
7761 if ac_fn_c_try_run "$LINENO"; then :
7762
7763 else
7764   ac_cv_header_stdc=no
7765 fi
7766 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7767   conftest.$ac_objext conftest.beam conftest.$ac_ext
7768 fi
7769
7770 fi
7771 fi
7772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7773 $as_echo "$ac_cv_header_stdc" >&6; }
7774 if test $ac_cv_header_stdc = yes; then
7775
7776 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
7777
7778 fi
7779
7780 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
7781 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
7782                   inttypes.h stdint.h unistd.h
7783 do :
7784   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7785 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
7786 "
7787 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7788   cat >>confdefs.h <<_ACEOF
7789 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7790 _ACEOF
7791
7792 fi
7793
7794 done
7795
7796
7797 if test "$enable_thread_safety" = yes -a "$PORTNAME" != "win32"; then :
7798    # then
7799
7800
7801
7802 ac_ext=c
7803 ac_cpp='$CPP $CPPFLAGS'
7804 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7805 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7806 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7807
7808 ax_pthread_ok=no
7809
7810 # We used to check for pthread.h first, but this fails if pthread.h
7811 # requires special compiler flags (e.g. on Tru64 or Sequent).
7812 # It gets checked for in the link test anyway.
7813
7814 # First of all, check if the user has set any of the PTHREAD_LIBS,
7815 # etcetera environment variables, and if threads linking works using
7816 # them:
7817 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
7818         save_CFLAGS="$CFLAGS"
7819         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
7820         save_LIBS="$LIBS"
7821         LIBS="$PTHREAD_LIBS $LIBS"
7822         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
7823 $as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
7824         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7825 /* end confdefs.h.  */
7826
7827 /* Override any GCC internal prototype to avoid an error.
7828    Use char because int might match the return type of a GCC
7829    builtin and then its argument prototype would still apply.  */
7830 #ifdef __cplusplus
7831 extern "C"
7832 #endif
7833 char pthread_join ();
7834 int
7835 main ()
7836 {
7837 return pthread_join ();
7838   ;
7839   return 0;
7840 }
7841 _ACEOF
7842 if ac_fn_c_try_link "$LINENO"; then :
7843   ax_pthread_ok=yes
7844 fi
7845 rm -f core conftest.err conftest.$ac_objext \
7846     conftest$ac_exeext conftest.$ac_ext
7847         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
7848 $as_echo "$ax_pthread_ok" >&6; }
7849         if test x"$ax_pthread_ok" = xno; then
7850                 PTHREAD_LIBS=""
7851                 PTHREAD_CFLAGS=""
7852         fi
7853         LIBS="$save_LIBS"
7854         CFLAGS="$save_CFLAGS"
7855 fi
7856
7857 # We must check for the threads library under a number of different
7858 # names; the ordering is very important because some systems
7859 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
7860 # libraries is broken (non-POSIX).
7861
7862 # Create a list of thread flags to try.  Items starting with a "-" are
7863 # C compiler flags, and other items are library names, except for "none"
7864 # which indicates that we try without any flags at all, and "pthread-config"
7865 # which is a program returning the flags for the Pth emulation library.
7866
7867 ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mt -mthreads pthread --thread-safe pthread-config"
7868
7869 # The ordering *is* (sometimes) important.  Some notes on the
7870 # individual items follow:
7871
7872 # pthreads: AIX (must check this before -lpthread)
7873 # none: in case threads are in libc; should be tried before -Kthread and
7874 #       other compiler flags to prevent continual compiler warnings
7875 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
7876 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
7877 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
7878 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
7879 # -pthreads: Solaris/gcc
7880 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
7881 #      doesn't hurt to check since this sometimes defines pthreads and
7882 #      -D_REENTRANT too), HP C (must be checked before -lpthread, which
7883 #      is present but should not be used directly)
7884 # -mthreads: Mingw32/gcc, Lynx/gcc
7885 # pthread: Linux, etcetera
7886 # --thread-safe: KAI C++
7887 # pthread-config: use pthread-config program (for GNU Pth library)
7888
7889 case $host_os in
7890
7891         hpux*)
7892
7893         # From the cc(1) man page: "[-mt] Sets various -D flags to enable
7894         # multi-threading and also sets -lpthread."
7895
7896         ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
7897         ;;
7898
7899         openedition*)
7900
7901         # IBM z/OS requires a feature-test macro to be defined in order to
7902         # enable POSIX threads at all, so give the user a hint if this is
7903         # not set. (We don't define these ourselves, as they can affect
7904         # other portions of the system API in unpredictable ways.)
7905
7906         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7907 /* end confdefs.h.  */
7908
7909 #            if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
7910              AX_PTHREAD_ZOS_MISSING
7911 #            endif
7912
7913 _ACEOF
7914 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7915   $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
7916   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
7917 $as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
7918 fi
7919 rm -f conftest*
7920
7921         ;;
7922
7923         solaris*)
7924
7925         # Newer versions of Solaris require the "-mt -lpthread" pair, and we
7926         # check that first.  On some older versions, libc contains stubbed
7927         # (non-functional) versions of the pthreads routines, so link-based
7928         # tests will erroneously succeed.  (We need to link with -pthreads/-mt/
7929         # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
7930         # a function called by this macro, so we could check for that, but
7931         # who knows whether they'll stub that too in a future libc.)  So
7932         # we'll look for -pthreads and -lpthread shortly thereafter.
7933
7934         ax_pthread_flags="-mt,pthread -pthreads -pthread pthread $ax_pthread_flags"
7935         ;;
7936 esac
7937
7938 # Older versions of Clang only give a warning instead of an error for an
7939 # unrecognized option, unless we specify -Werror. (We throw in some extra
7940 # Clang warning flags for good measure.)
7941
7942 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler needs certain flags to reject unknown flags" >&5
7943 $as_echo_n "checking if compiler needs certain flags to reject unknown flags... " >&6; }
7944 if ${ax_cv_PTHREAD_REJECT_UNKNOWN+:} false; then :
7945   $as_echo_n "(cached) " >&6
7946 else
7947   ax_cv_PTHREAD_REJECT_UNKNOWN=unknown
7948      save_CFLAGS="$CFLAGS"
7949      ax_pthread_extra_flags="-Wunknown-warning-option -Wunused-command-line-argument"
7950      CFLAGS="$CFLAGS $ax_pthread_extra_flags -Wfoobaz -foobaz"
7951      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7952 /* end confdefs.h.  */
7953 int foo(void);
7954 int
7955 main ()
7956 {
7957 foo()
7958   ;
7959   return 0;
7960 }
7961 _ACEOF
7962 if ac_fn_c_try_compile "$LINENO"; then :
7963   ax_cv_PTHREAD_REJECT_UNKNOWN="-Werror $ax_pthread_extra_flags"
7964 else
7965   ax_cv_PTHREAD_REJECT_UNKNOWN=no
7966 fi
7967 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7968      CFLAGS="$save_CFLAGS"
7969
7970 fi
7971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_REJECT_UNKNOWN" >&5
7972 $as_echo "$ax_cv_PTHREAD_REJECT_UNKNOWN" >&6; }
7973 ax_pthread_extra_flags=
7974 if test "x$ax_cv_PTHREAD_REJECT_UNKNOWN" != "xno"; then :
7975   ax_pthread_extra_flags="$ax_cv_PTHREAD_REJECT_UNKNOWN"
7976 fi
7977
7978 if test x"$ax_pthread_ok" = xno; then
7979 for flag in $ax_pthread_flags; do
7980
7981         case $flag in
7982                 none)
7983                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
7984 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
7985                 ;;
7986
7987                 -mt,pthread)
7988                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
7989 $as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
7990                 PTHREAD_CFLAGS="-mt"
7991                 PTHREAD_LIBS="-lpthread"
7992                 ;;
7993
7994                 -*)
7995                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5
7996 $as_echo_n "checking whether pthreads work with $flag... " >&6; }
7997                 PTHREAD_CFLAGS="$flag"
7998                 ;;
7999
8000                 pthread-config)
8001                 # Extract the first word of "pthread-config", so it can be a program name with args.
8002 set dummy pthread-config; ac_word=$2
8003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8004 $as_echo_n "checking for $ac_word... " >&6; }
8005 if ${ac_cv_prog_ax_pthread_config+:} false; then :
8006   $as_echo_n "(cached) " >&6
8007 else
8008   if test -n "$ax_pthread_config"; then
8009   ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
8010 else
8011 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8012 for as_dir in $PATH
8013 do
8014   IFS=$as_save_IFS
8015   test -z "$as_dir" && as_dir=.
8016     for ac_exec_ext in '' $ac_executable_extensions; do
8017   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8018     ac_cv_prog_ax_pthread_config="yes"
8019     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8020     break 2
8021   fi
8022 done
8023   done
8024 IFS=$as_save_IFS
8025
8026   test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
8027 fi
8028 fi
8029 ax_pthread_config=$ac_cv_prog_ax_pthread_config
8030 if test -n "$ax_pthread_config"; then
8031   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
8032 $as_echo "$ax_pthread_config" >&6; }
8033 else
8034   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8035 $as_echo "no" >&6; }
8036 fi
8037
8038
8039                 if test x"$ax_pthread_config" = xno; then continue; fi
8040                 PTHREAD_CFLAGS="`pthread-config --cflags`"
8041                 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
8042                 ;;
8043
8044                 *)
8045                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5
8046 $as_echo_n "checking for the pthreads library -l$flag... " >&6; }
8047                 PTHREAD_LIBS="-l$flag"
8048                 ;;
8049         esac
8050
8051         save_LIBS="$LIBS"
8052         save_CFLAGS="$CFLAGS"
8053         LIBS="$PTHREAD_LIBS $LIBS"
8054         CFLAGS="$CFLAGS $PTHREAD_CFLAGS $ax_pthread_extra_flags"
8055
8056         # Check for various functions.  We must include pthread.h,
8057         # since some functions may be macros.  (On the Sequent, we
8058         # need a special flag -Kthread to make this header compile.)
8059         # We check for pthread_join because it is in -lpthread on IRIX
8060         # while pthread_create is in libc.  We check for pthread_attr_init
8061         # due to DEC craziness with -lpthreads.  We check for
8062         # pthread_cleanup_push because it is one of the few pthread
8063         # functions on Solaris that doesn't have a non-functional libc stub.
8064         # We try pthread_create on general principles.
8065         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8066 /* end confdefs.h.  */
8067 #include <pthread.h>
8068                         static void routine(void *a) { a = 0; }
8069                         static void *start_routine(void *a) { return a; }
8070 int
8071 main ()
8072 {
8073 pthread_t th; pthread_attr_t attr;
8074                         pthread_create(&th, 0, start_routine, 0);
8075                         pthread_join(th, 0);
8076                         pthread_attr_init(&attr);
8077                         pthread_cleanup_push(routine, 0);
8078                         pthread_cleanup_pop(0) /* ; */
8079   ;
8080   return 0;
8081 }
8082 _ACEOF
8083 if ac_fn_c_try_link "$LINENO"; then :
8084   ax_pthread_ok=yes
8085 fi
8086 rm -f core conftest.err conftest.$ac_objext \
8087     conftest$ac_exeext conftest.$ac_ext
8088
8089         LIBS="$save_LIBS"
8090         CFLAGS="$save_CFLAGS"
8091
8092         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
8093 $as_echo "$ax_pthread_ok" >&6; }
8094         if test "x$ax_pthread_ok" = xyes; then
8095                 break;
8096         fi
8097
8098         PTHREAD_LIBS=""
8099         PTHREAD_CFLAGS=""
8100 done
8101 fi
8102
8103 # Various other checks:
8104 if test "x$ax_pthread_ok" = xyes; then
8105         save_LIBS="$LIBS"
8106         LIBS="$PTHREAD_LIBS $LIBS"
8107         save_CFLAGS="$CFLAGS"
8108         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
8109
8110         # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
8111         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
8112 $as_echo_n "checking for joinable pthread attribute... " >&6; }
8113 if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
8114   $as_echo_n "(cached) " >&6
8115 else
8116   ax_cv_PTHREAD_JOINABLE_ATTR=unknown
8117              for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
8118                  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8119 /* end confdefs.h.  */
8120 #include <pthread.h>
8121 int
8122 main ()
8123 {
8124 int attr = $attr; return attr /* ; */
8125   ;
8126   return 0;
8127 }
8128 _ACEOF
8129 if ac_fn_c_try_link "$LINENO"; then :
8130   ax_cv_PTHREAD_JOINABLE_ATTR=$attr; break
8131 fi
8132 rm -f core conftest.err conftest.$ac_objext \
8133     conftest$ac_exeext conftest.$ac_ext
8134              done
8135
8136 fi
8137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
8138 $as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
8139         if test "$ax_cv_PTHREAD_JOINABLE_ATTR" != unknown && \
8140                test "$ax_cv_PTHREAD_JOINABLE_ATTR" != PTHREAD_CREATE_JOINABLE; then :
8141
8142 cat >>confdefs.h <<_ACEOF
8143 #define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
8144 _ACEOF
8145
8146 fi
8147
8148         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5
8149 $as_echo_n "checking if more special flags are required for pthreads... " >&6; }
8150 if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
8151   $as_echo_n "(cached) " >&6
8152 else
8153   ax_cv_PTHREAD_SPECIAL_FLAGS=no
8154              ax_pthread_special_flags_added=no
8155              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8156 /* end confdefs.h.  */
8157
8158 #                 if !defined(_REENTRANT) && !defined(_THREAD_SAFE)
8159                   AX_PTHREAD_NEED_SPECIAL_FLAG
8160 #                 endif
8161
8162 _ACEOF
8163 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8164   $EGREP "AX_PTHREAD_NEED_SPECIAL_FLAG" >/dev/null 2>&1; then :
8165   case $host_os in
8166                   aix* | freebsd*)
8167                   ax_cv_PTHREAD_SPECIAL_FLAGS="-D_THREAD_SAFE"
8168                   ;;
8169                   darwin* | hpux* | osf* | solaris*)
8170                   ax_cv_PTHREAD_SPECIAL_FLAGS="-D_REENTRANT"
8171                   ;;
8172                   esac
8173
8174 fi
8175 rm -f conftest*
8176
8177
8178 fi
8179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
8180 $as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
8181         if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
8182                test "x$ax_pthread_special_flags_added" != "xyes"; then :
8183   PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
8184                ax_pthread_special_flags_added=yes
8185 fi
8186
8187         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
8188 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
8189 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
8190   $as_echo_n "(cached) " >&6
8191 else
8192   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8193 /* end confdefs.h.  */
8194 #include <pthread.h>
8195 int
8196 main ()
8197 {
8198 int i = PTHREAD_PRIO_INHERIT;
8199   ;
8200   return 0;
8201 }
8202 _ACEOF
8203 if ac_fn_c_try_link "$LINENO"; then :
8204   ax_cv_PTHREAD_PRIO_INHERIT=yes
8205 else
8206   ax_cv_PTHREAD_PRIO_INHERIT=no
8207 fi
8208 rm -f core conftest.err conftest.$ac_objext \
8209     conftest$ac_exeext conftest.$ac_ext
8210
8211 fi
8212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
8213 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
8214         if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"; then :
8215
8216 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
8217
8218 fi
8219
8220         LIBS="$save_LIBS"
8221         CFLAGS="$save_CFLAGS"
8222
8223         # More AIX lossage: compile with *_r variant
8224         if test "x$GCC" != xyes; then
8225             case $host_os in
8226                 aix*)
8227                 case "x/$CC" in #(
8228   x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
8229     #handle absolute path differently from PATH based program lookup
8230                    case "x$CC" in #(
8231   x/*) :
8232     if as_fn_executable_p ${CC}_r; then :
8233   PTHREAD_CC="${CC}_r"
8234 fi ;; #(
8235   *) :
8236     for ac_prog in ${CC}_r
8237 do
8238   # Extract the first word of "$ac_prog", so it can be a program name with args.
8239 set dummy $ac_prog; ac_word=$2
8240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8241 $as_echo_n "checking for $ac_word... " >&6; }
8242 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
8243   $as_echo_n "(cached) " >&6
8244 else
8245   if test -n "$PTHREAD_CC"; then
8246   ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
8247 else
8248 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8249 for as_dir in $PATH
8250 do
8251   IFS=$as_save_IFS
8252   test -z "$as_dir" && as_dir=.
8253     for ac_exec_ext in '' $ac_executable_extensions; do
8254   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8255     ac_cv_prog_PTHREAD_CC="$ac_prog"
8256     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8257     break 2
8258   fi
8259 done
8260   done
8261 IFS=$as_save_IFS
8262
8263 fi
8264 fi
8265 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
8266 if test -n "$PTHREAD_CC"; then
8267   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
8268 $as_echo "$PTHREAD_CC" >&6; }
8269 else
8270   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8271 $as_echo "no" >&6; }
8272 fi
8273
8274
8275   test -n "$PTHREAD_CC" && break
8276 done
8277 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
8278  ;;
8279 esac ;; #(
8280   *) :
8281      ;;
8282 esac
8283                 ;;
8284             esac
8285         fi
8286 fi
8287
8288 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
8289
8290
8291
8292
8293
8294 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
8295 if test x"$ax_pthread_ok" = xyes; then
8296
8297 $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
8298
8299         :
8300 else
8301         ax_pthread_ok=no
8302
8303 fi
8304 ac_ext=c
8305 ac_cpp='$CPP $CPPFLAGS'
8306 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8307 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8308 ac_compiler_gnu=$ac_cv_c_compiler_gnu
8309
8310         # set thread flags
8311
8312 # Some platforms use these, so just define them.  They can't hurt if they
8313 # are not supported.  For example, on Solaris -D_POSIX_PTHREAD_SEMANTICS
8314 # enables 5-arg getpwuid_r, among other things.
8315 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
8316
8317 # Check for *_r functions
8318 _CFLAGS="$CFLAGS"
8319 _LIBS="$LIBS"
8320 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
8321 LIBS="$LIBS $PTHREAD_LIBS"
8322
8323 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
8324 if test "x$ac_cv_header_pthread_h" = xyes; then :
8325
8326 else
8327   as_fn_error $? "
8328 pthread.h not found;  use --disable-thread-safety to disable thread safety" "$LINENO" 5
8329 fi
8330
8331
8332
8333 for ac_func in strerror_r getpwuid_r gethostbyname_r
8334 do :
8335   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8336 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8337 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
8338   cat >>confdefs.h <<_ACEOF
8339 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
8340 _ACEOF
8341
8342 fi
8343 done
8344
8345
8346 # Do test here with the proper thread flags
8347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns int" >&5
8348 $as_echo_n "checking whether strerror_r returns int... " >&6; }
8349 if ${pgac_cv_func_strerror_r_int+:} false; then :
8350   $as_echo_n "(cached) " >&6
8351 else
8352   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8353 /* end confdefs.h.  */
8354 #include <string.h>
8355 int
8356 main ()
8357 {
8358 #ifndef _AIX
8359 int strerror_r(int, char *, size_t);
8360 #else
8361 /* Older AIX has 'int' for the third argument so we don't test the args. */
8362 int strerror_r();
8363 #endif
8364   ;
8365   return 0;
8366 }
8367 _ACEOF
8368 if ac_fn_c_try_compile "$LINENO"; then :
8369   pgac_cv_func_strerror_r_int=yes
8370 else
8371   pgac_cv_func_strerror_r_int=no
8372 fi
8373 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8374 fi
8375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_strerror_r_int" >&5
8376 $as_echo "$pgac_cv_func_strerror_r_int" >&6; }
8377 if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
8378
8379 $as_echo "#define STRERROR_R_INT 1" >>confdefs.h
8380
8381 fi
8382
8383
8384 CFLAGS="$_CFLAGS"
8385 LIBS="$_LIBS"
8386
8387
8388 else
8389    # else
8390 # do not use values from template file
8391 PTHREAD_CFLAGS=
8392 PTHREAD_LIBS=
8393
8394 fi # fi
8395
8396
8397
8398
8399
8400 ##
8401 ## Libraries
8402 ##
8403 ## Most libraries are included only if they demonstrably provide a function
8404 ## we need, but libm is an exception: always include it, because there are
8405 ## too many compilers that play cute optimization games that will break
8406 ## probes for standard functions such as pow().
8407 ##
8408
8409 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
8410 $as_echo_n "checking for main in -lm... " >&6; }
8411 if ${ac_cv_lib_m_main+:} false; then :
8412   $as_echo_n "(cached) " >&6
8413 else
8414   ac_check_lib_save_LIBS=$LIBS
8415 LIBS="-lm  $LIBS"
8416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8417 /* end confdefs.h.  */
8418
8419
8420 int
8421 main ()
8422 {
8423 return main ();
8424   ;
8425   return 0;
8426 }
8427 _ACEOF
8428 if ac_fn_c_try_link "$LINENO"; then :
8429   ac_cv_lib_m_main=yes
8430 else
8431   ac_cv_lib_m_main=no
8432 fi
8433 rm -f core conftest.err conftest.$ac_objext \
8434     conftest$ac_exeext conftest.$ac_ext
8435 LIBS=$ac_check_lib_save_LIBS
8436 fi
8437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
8438 $as_echo "$ac_cv_lib_m_main" >&6; }
8439 if test "x$ac_cv_lib_m_main" = xyes; then :
8440   cat >>confdefs.h <<_ACEOF
8441 #define HAVE_LIBM 1
8442 _ACEOF
8443
8444   LIBS="-lm $LIBS"
8445
8446 fi
8447
8448 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setproctitle" >&5
8449 $as_echo_n "checking for library containing setproctitle... " >&6; }
8450 if ${ac_cv_search_setproctitle+:} false; then :
8451   $as_echo_n "(cached) " >&6
8452 else
8453   ac_func_search_save_LIBS=$LIBS
8454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8455 /* end confdefs.h.  */
8456
8457 /* Override any GCC internal prototype to avoid an error.
8458    Use char because int might match the return type of a GCC
8459    builtin and then its argument prototype would still apply.  */
8460 #ifdef __cplusplus
8461 extern "C"
8462 #endif
8463 char setproctitle ();
8464 int
8465 main ()
8466 {
8467 return setproctitle ();
8468   ;
8469   return 0;
8470 }
8471 _ACEOF
8472 for ac_lib in '' util; do
8473   if test -z "$ac_lib"; then
8474     ac_res="none required"
8475   else
8476     ac_res=-l$ac_lib
8477     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8478   fi
8479   if ac_fn_c_try_link "$LINENO"; then :
8480   ac_cv_search_setproctitle=$ac_res
8481 fi
8482 rm -f core conftest.err conftest.$ac_objext \
8483     conftest$ac_exeext
8484   if ${ac_cv_search_setproctitle+:} false; then :
8485   break
8486 fi
8487 done
8488 if ${ac_cv_search_setproctitle+:} false; then :
8489
8490 else
8491   ac_cv_search_setproctitle=no
8492 fi
8493 rm conftest.$ac_ext
8494 LIBS=$ac_func_search_save_LIBS
8495 fi
8496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setproctitle" >&5
8497 $as_echo "$ac_cv_search_setproctitle" >&6; }
8498 ac_res=$ac_cv_search_setproctitle
8499 if test "$ac_res" != no; then :
8500   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8501
8502 fi
8503
8504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
8505 $as_echo_n "checking for library containing dlopen... " >&6; }
8506 if ${ac_cv_search_dlopen+:} false; then :
8507   $as_echo_n "(cached) " >&6
8508 else
8509   ac_func_search_save_LIBS=$LIBS
8510 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8511 /* end confdefs.h.  */
8512
8513 /* Override any GCC internal prototype to avoid an error.
8514    Use char because int might match the return type of a GCC
8515    builtin and then its argument prototype would still apply.  */
8516 #ifdef __cplusplus
8517 extern "C"
8518 #endif
8519 char dlopen ();
8520 int
8521 main ()
8522 {
8523 return dlopen ();
8524   ;
8525   return 0;
8526 }
8527 _ACEOF
8528 for ac_lib in '' dl; do
8529   if test -z "$ac_lib"; then
8530     ac_res="none required"
8531   else
8532     ac_res=-l$ac_lib
8533     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8534   fi
8535   if ac_fn_c_try_link "$LINENO"; then :
8536   ac_cv_search_dlopen=$ac_res
8537 fi
8538 rm -f core conftest.err conftest.$ac_objext \
8539     conftest$ac_exeext
8540   if ${ac_cv_search_dlopen+:} false; then :
8541   break
8542 fi
8543 done
8544 if ${ac_cv_search_dlopen+:} false; then :
8545
8546 else
8547   ac_cv_search_dlopen=no
8548 fi
8549 rm conftest.$ac_ext
8550 LIBS=$ac_func_search_save_LIBS
8551 fi
8552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
8553 $as_echo "$ac_cv_search_dlopen" >&6; }
8554 ac_res=$ac_cv_search_dlopen
8555 if test "$ac_res" != no; then :
8556   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8557
8558 fi
8559
8560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
8561 $as_echo_n "checking for library containing socket... " >&6; }
8562 if ${ac_cv_search_socket+:} false; then :
8563   $as_echo_n "(cached) " >&6
8564 else
8565   ac_func_search_save_LIBS=$LIBS
8566 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8567 /* end confdefs.h.  */
8568
8569 /* Override any GCC internal prototype to avoid an error.
8570    Use char because int might match the return type of a GCC
8571    builtin and then its argument prototype would still apply.  */
8572 #ifdef __cplusplus
8573 extern "C"
8574 #endif
8575 char socket ();
8576 int
8577 main ()
8578 {
8579 return socket ();
8580   ;
8581   return 0;
8582 }
8583 _ACEOF
8584 for ac_lib in '' socket ws2_32; do
8585   if test -z "$ac_lib"; then
8586     ac_res="none required"
8587   else
8588     ac_res=-l$ac_lib
8589     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8590   fi
8591   if ac_fn_c_try_link "$LINENO"; then :
8592   ac_cv_search_socket=$ac_res
8593 fi
8594 rm -f core conftest.err conftest.$ac_objext \
8595     conftest$ac_exeext
8596   if ${ac_cv_search_socket+:} false; then :
8597   break
8598 fi
8599 done
8600 if ${ac_cv_search_socket+:} false; then :
8601
8602 else
8603   ac_cv_search_socket=no
8604 fi
8605 rm conftest.$ac_ext
8606 LIBS=$ac_func_search_save_LIBS
8607 fi
8608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
8609 $as_echo "$ac_cv_search_socket" >&6; }
8610 ac_res=$ac_cv_search_socket
8611 if test "$ac_res" != no; then :
8612   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8613
8614 fi
8615
8616 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shl_load" >&5
8617 $as_echo_n "checking for library containing shl_load... " >&6; }
8618 if ${ac_cv_search_shl_load+:} false; then :
8619   $as_echo_n "(cached) " >&6
8620 else
8621   ac_func_search_save_LIBS=$LIBS
8622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8623 /* end confdefs.h.  */
8624
8625 /* Override any GCC internal prototype to avoid an error.
8626    Use char because int might match the return type of a GCC
8627    builtin and then its argument prototype would still apply.  */
8628 #ifdef __cplusplus
8629 extern "C"
8630 #endif
8631 char shl_load ();
8632 int
8633 main ()
8634 {
8635 return shl_load ();
8636   ;
8637   return 0;
8638 }
8639 _ACEOF
8640 for ac_lib in '' dld; do
8641   if test -z "$ac_lib"; then
8642     ac_res="none required"
8643   else
8644     ac_res=-l$ac_lib
8645     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8646   fi
8647   if ac_fn_c_try_link "$LINENO"; then :
8648   ac_cv_search_shl_load=$ac_res
8649 fi
8650 rm -f core conftest.err conftest.$ac_objext \
8651     conftest$ac_exeext
8652   if ${ac_cv_search_shl_load+:} false; then :
8653   break
8654 fi
8655 done
8656 if ${ac_cv_search_shl_load+:} false; then :
8657
8658 else
8659   ac_cv_search_shl_load=no
8660 fi
8661 rm conftest.$ac_ext
8662 LIBS=$ac_func_search_save_LIBS
8663 fi
8664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shl_load" >&5
8665 $as_echo "$ac_cv_search_shl_load" >&6; }
8666 ac_res=$ac_cv_search_shl_load
8667 if test "$ac_res" != no; then :
8668   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8669
8670 fi
8671
8672 # We only use libld in port/dynloader/aix.c
8673 case $host_os in
8674      aix*)
8675         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing ldopen" >&5
8676 $as_echo_n "checking for library containing ldopen... " >&6; }
8677 if ${ac_cv_search_ldopen+:} false; then :
8678   $as_echo_n "(cached) " >&6
8679 else
8680   ac_func_search_save_LIBS=$LIBS
8681 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8682 /* end confdefs.h.  */
8683
8684 /* Override any GCC internal prototype to avoid an error.
8685    Use char because int might match the return type of a GCC
8686    builtin and then its argument prototype would still apply.  */
8687 #ifdef __cplusplus
8688 extern "C"
8689 #endif
8690 char ldopen ();
8691 int
8692 main ()
8693 {
8694 return ldopen ();
8695   ;
8696   return 0;
8697 }
8698 _ACEOF
8699 for ac_lib in '' ld; do
8700   if test -z "$ac_lib"; then
8701     ac_res="none required"
8702   else
8703     ac_res=-l$ac_lib
8704     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8705   fi
8706   if ac_fn_c_try_link "$LINENO"; then :
8707   ac_cv_search_ldopen=$ac_res
8708 fi
8709 rm -f core conftest.err conftest.$ac_objext \
8710     conftest$ac_exeext
8711   if ${ac_cv_search_ldopen+:} false; then :
8712   break
8713 fi
8714 done
8715 if ${ac_cv_search_ldopen+:} false; then :
8716
8717 else
8718   ac_cv_search_ldopen=no
8719 fi
8720 rm conftest.$ac_ext
8721 LIBS=$ac_func_search_save_LIBS
8722 fi
8723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_ldopen" >&5
8724 $as_echo "$ac_cv_search_ldopen" >&6; }
8725 ac_res=$ac_cv_search_ldopen
8726 if test "$ac_res" != no; then :
8727   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8728
8729 fi
8730
8731         ;;
8732 esac
8733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getopt_long" >&5
8734 $as_echo_n "checking for library containing getopt_long... " >&6; }
8735 if ${ac_cv_search_getopt_long+:} false; then :
8736   $as_echo_n "(cached) " >&6
8737 else
8738   ac_func_search_save_LIBS=$LIBS
8739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8740 /* end confdefs.h.  */
8741
8742 /* Override any GCC internal prototype to avoid an error.
8743    Use char because int might match the return type of a GCC
8744    builtin and then its argument prototype would still apply.  */
8745 #ifdef __cplusplus
8746 extern "C"
8747 #endif
8748 char getopt_long ();
8749 int
8750 main ()
8751 {
8752 return getopt_long ();
8753   ;
8754   return 0;
8755 }
8756 _ACEOF
8757 for ac_lib in '' getopt gnugetopt; do
8758   if test -z "$ac_lib"; then
8759     ac_res="none required"
8760   else
8761     ac_res=-l$ac_lib
8762     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8763   fi
8764   if ac_fn_c_try_link "$LINENO"; then :
8765   ac_cv_search_getopt_long=$ac_res
8766 fi
8767 rm -f core conftest.err conftest.$ac_objext \
8768     conftest$ac_exeext
8769   if ${ac_cv_search_getopt_long+:} false; then :
8770   break
8771 fi
8772 done
8773 if ${ac_cv_search_getopt_long+:} false; then :
8774
8775 else
8776   ac_cv_search_getopt_long=no
8777 fi
8778 rm conftest.$ac_ext
8779 LIBS=$ac_func_search_save_LIBS
8780 fi
8781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getopt_long" >&5
8782 $as_echo "$ac_cv_search_getopt_long" >&6; }
8783 ac_res=$ac_cv_search_getopt_long
8784 if test "$ac_res" != no; then :
8785   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8786
8787 fi
8788
8789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
8790 $as_echo_n "checking for library containing crypt... " >&6; }
8791 if ${ac_cv_search_crypt+:} false; then :
8792   $as_echo_n "(cached) " >&6
8793 else
8794   ac_func_search_save_LIBS=$LIBS
8795 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8796 /* end confdefs.h.  */
8797
8798 /* Override any GCC internal prototype to avoid an error.
8799    Use char because int might match the return type of a GCC
8800    builtin and then its argument prototype would still apply.  */
8801 #ifdef __cplusplus
8802 extern "C"
8803 #endif
8804 char crypt ();
8805 int
8806 main ()
8807 {
8808 return crypt ();
8809   ;
8810   return 0;
8811 }
8812 _ACEOF
8813 for ac_lib in '' crypt; do
8814   if test -z "$ac_lib"; then
8815     ac_res="none required"
8816   else
8817     ac_res=-l$ac_lib
8818     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8819   fi
8820   if ac_fn_c_try_link "$LINENO"; then :
8821   ac_cv_search_crypt=$ac_res
8822 fi
8823 rm -f core conftest.err conftest.$ac_objext \
8824     conftest$ac_exeext
8825   if ${ac_cv_search_crypt+:} false; then :
8826   break
8827 fi
8828 done
8829 if ${ac_cv_search_crypt+:} false; then :
8830
8831 else
8832   ac_cv_search_crypt=no
8833 fi
8834 rm conftest.$ac_ext
8835 LIBS=$ac_func_search_save_LIBS
8836 fi
8837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
8838 $as_echo "$ac_cv_search_crypt" >&6; }
8839 ac_res=$ac_cv_search_crypt
8840 if test "$ac_res" != no; then :
8841   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8842
8843 fi
8844
8845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
8846 $as_echo_n "checking for library containing shm_open... " >&6; }
8847 if ${ac_cv_search_shm_open+:} false; then :
8848   $as_echo_n "(cached) " >&6
8849 else
8850   ac_func_search_save_LIBS=$LIBS
8851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8852 /* end confdefs.h.  */
8853
8854 /* Override any GCC internal prototype to avoid an error.
8855    Use char because int might match the return type of a GCC
8856    builtin and then its argument prototype would still apply.  */
8857 #ifdef __cplusplus
8858 extern "C"
8859 #endif
8860 char shm_open ();
8861 int
8862 main ()
8863 {
8864 return shm_open ();
8865   ;
8866   return 0;
8867 }
8868 _ACEOF
8869 for ac_lib in '' rt; do
8870   if test -z "$ac_lib"; then
8871     ac_res="none required"
8872   else
8873     ac_res=-l$ac_lib
8874     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8875   fi
8876   if ac_fn_c_try_link "$LINENO"; then :
8877   ac_cv_search_shm_open=$ac_res
8878 fi
8879 rm -f core conftest.err conftest.$ac_objext \
8880     conftest$ac_exeext
8881   if ${ac_cv_search_shm_open+:} false; then :
8882   break
8883 fi
8884 done
8885 if ${ac_cv_search_shm_open+:} false; then :
8886
8887 else
8888   ac_cv_search_shm_open=no
8889 fi
8890 rm conftest.$ac_ext
8891 LIBS=$ac_func_search_save_LIBS
8892 fi
8893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
8894 $as_echo "$ac_cv_search_shm_open" >&6; }
8895 ac_res=$ac_cv_search_shm_open
8896 if test "$ac_res" != no; then :
8897   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8898
8899 fi
8900
8901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_unlink" >&5
8902 $as_echo_n "checking for library containing shm_unlink... " >&6; }
8903 if ${ac_cv_search_shm_unlink+:} false; then :
8904   $as_echo_n "(cached) " >&6
8905 else
8906   ac_func_search_save_LIBS=$LIBS
8907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8908 /* end confdefs.h.  */
8909
8910 /* Override any GCC internal prototype to avoid an error.
8911    Use char because int might match the return type of a GCC
8912    builtin and then its argument prototype would still apply.  */
8913 #ifdef __cplusplus
8914 extern "C"
8915 #endif
8916 char shm_unlink ();
8917 int
8918 main ()
8919 {
8920 return shm_unlink ();
8921   ;
8922   return 0;
8923 }
8924 _ACEOF
8925 for ac_lib in '' rt; do
8926   if test -z "$ac_lib"; then
8927     ac_res="none required"
8928   else
8929     ac_res=-l$ac_lib
8930     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8931   fi
8932   if ac_fn_c_try_link "$LINENO"; then :
8933   ac_cv_search_shm_unlink=$ac_res
8934 fi
8935 rm -f core conftest.err conftest.$ac_objext \
8936     conftest$ac_exeext
8937   if ${ac_cv_search_shm_unlink+:} false; then :
8938   break
8939 fi
8940 done
8941 if ${ac_cv_search_shm_unlink+:} false; then :
8942
8943 else
8944   ac_cv_search_shm_unlink=no
8945 fi
8946 rm conftest.$ac_ext
8947 LIBS=$ac_func_search_save_LIBS
8948 fi
8949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_unlink" >&5
8950 $as_echo "$ac_cv_search_shm_unlink" >&6; }
8951 ac_res=$ac_cv_search_shm_unlink
8952 if test "$ac_res" != no; then :
8953   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8954
8955 fi
8956
8957 # Solaris:
8958 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5
8959 $as_echo_n "checking for library containing fdatasync... " >&6; }
8960 if ${ac_cv_search_fdatasync+:} false; then :
8961   $as_echo_n "(cached) " >&6
8962 else
8963   ac_func_search_save_LIBS=$LIBS
8964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8965 /* end confdefs.h.  */
8966
8967 /* Override any GCC internal prototype to avoid an error.
8968    Use char because int might match the return type of a GCC
8969    builtin and then its argument prototype would still apply.  */
8970 #ifdef __cplusplus
8971 extern "C"
8972 #endif
8973 char fdatasync ();
8974 int
8975 main ()
8976 {
8977 return fdatasync ();
8978   ;
8979   return 0;
8980 }
8981 _ACEOF
8982 for ac_lib in '' rt posix4; do
8983   if test -z "$ac_lib"; then
8984     ac_res="none required"
8985   else
8986     ac_res=-l$ac_lib
8987     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8988   fi
8989   if ac_fn_c_try_link "$LINENO"; then :
8990   ac_cv_search_fdatasync=$ac_res
8991 fi
8992 rm -f core conftest.err conftest.$ac_objext \
8993     conftest$ac_exeext
8994   if ${ac_cv_search_fdatasync+:} false; then :
8995   break
8996 fi
8997 done
8998 if ${ac_cv_search_fdatasync+:} false; then :
8999
9000 else
9001   ac_cv_search_fdatasync=no
9002 fi
9003 rm conftest.$ac_ext
9004 LIBS=$ac_func_search_save_LIBS
9005 fi
9006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5
9007 $as_echo "$ac_cv_search_fdatasync" >&6; }
9008 ac_res=$ac_cv_search_fdatasync
9009 if test "$ac_res" != no; then :
9010   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9011
9012 fi
9013
9014 # Required for thread_test.c on Solaris
9015 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sched_yield" >&5
9016 $as_echo_n "checking for library containing sched_yield... " >&6; }
9017 if ${ac_cv_search_sched_yield+:} false; then :
9018   $as_echo_n "(cached) " >&6
9019 else
9020   ac_func_search_save_LIBS=$LIBS
9021 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9022 /* end confdefs.h.  */
9023
9024 /* Override any GCC internal prototype to avoid an error.
9025    Use char because int might match the return type of a GCC
9026    builtin and then its argument prototype would still apply.  */
9027 #ifdef __cplusplus
9028 extern "C"
9029 #endif
9030 char sched_yield ();
9031 int
9032 main ()
9033 {
9034 return sched_yield ();
9035   ;
9036   return 0;
9037 }
9038 _ACEOF
9039 for ac_lib in '' rt; do
9040   if test -z "$ac_lib"; then
9041     ac_res="none required"
9042   else
9043     ac_res=-l$ac_lib
9044     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9045   fi
9046   if ac_fn_c_try_link "$LINENO"; then :
9047   ac_cv_search_sched_yield=$ac_res
9048 fi
9049 rm -f core conftest.err conftest.$ac_objext \
9050     conftest$ac_exeext
9051   if ${ac_cv_search_sched_yield+:} false; then :
9052   break
9053 fi
9054 done
9055 if ${ac_cv_search_sched_yield+:} false; then :
9056
9057 else
9058   ac_cv_search_sched_yield=no
9059 fi
9060 rm conftest.$ac_ext
9061 LIBS=$ac_func_search_save_LIBS
9062 fi
9063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sched_yield" >&5
9064 $as_echo "$ac_cv_search_sched_yield" >&6; }
9065 ac_res=$ac_cv_search_sched_yield
9066 if test "$ac_res" != no; then :
9067   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9068
9069 fi
9070
9071 # Required for thread_test.c on Solaris 2.5:
9072 # Other ports use it too (HP-UX) so test unconditionally
9073 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname_r" >&5
9074 $as_echo_n "checking for library containing gethostbyname_r... " >&6; }
9075 if ${ac_cv_search_gethostbyname_r+:} false; then :
9076   $as_echo_n "(cached) " >&6
9077 else
9078   ac_func_search_save_LIBS=$LIBS
9079 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9080 /* end confdefs.h.  */
9081
9082 /* Override any GCC internal prototype to avoid an error.
9083    Use char because int might match the return type of a GCC
9084    builtin and then its argument prototype would still apply.  */
9085 #ifdef __cplusplus
9086 extern "C"
9087 #endif
9088 char gethostbyname_r ();
9089 int
9090 main ()
9091 {
9092 return gethostbyname_r ();
9093   ;
9094   return 0;
9095 }
9096 _ACEOF
9097 for ac_lib in '' nsl; do
9098   if test -z "$ac_lib"; then
9099     ac_res="none required"
9100   else
9101     ac_res=-l$ac_lib
9102     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9103   fi
9104   if ac_fn_c_try_link "$LINENO"; then :
9105   ac_cv_search_gethostbyname_r=$ac_res
9106 fi
9107 rm -f core conftest.err conftest.$ac_objext \
9108     conftest$ac_exeext
9109   if ${ac_cv_search_gethostbyname_r+:} false; then :
9110   break
9111 fi
9112 done
9113 if ${ac_cv_search_gethostbyname_r+:} false; then :
9114
9115 else
9116   ac_cv_search_gethostbyname_r=no
9117 fi
9118 rm conftest.$ac_ext
9119 LIBS=$ac_func_search_save_LIBS
9120 fi
9121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname_r" >&5
9122 $as_echo "$ac_cv_search_gethostbyname_r" >&6; }
9123 ac_res=$ac_cv_search_gethostbyname_r
9124 if test "$ac_res" != no; then :
9125   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9126
9127 fi
9128
9129 # Cygwin:
9130 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shmget" >&5
9131 $as_echo_n "checking for library containing shmget... " >&6; }
9132 if ${ac_cv_search_shmget+:} false; then :
9133   $as_echo_n "(cached) " >&6
9134 else
9135   ac_func_search_save_LIBS=$LIBS
9136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9137 /* end confdefs.h.  */
9138
9139 /* Override any GCC internal prototype to avoid an error.
9140    Use char because int might match the return type of a GCC
9141    builtin and then its argument prototype would still apply.  */
9142 #ifdef __cplusplus
9143 extern "C"
9144 #endif
9145 char shmget ();
9146 int
9147 main ()
9148 {
9149 return shmget ();
9150   ;
9151   return 0;
9152 }
9153 _ACEOF
9154 for ac_lib in '' cygipc; do
9155   if test -z "$ac_lib"; then
9156     ac_res="none required"
9157   else
9158     ac_res=-l$ac_lib
9159     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9160   fi
9161   if ac_fn_c_try_link "$LINENO"; then :
9162   ac_cv_search_shmget=$ac_res
9163 fi
9164 rm -f core conftest.err conftest.$ac_objext \
9165     conftest$ac_exeext
9166   if ${ac_cv_search_shmget+:} false; then :
9167   break
9168 fi
9169 done
9170 if ${ac_cv_search_shmget+:} false; then :
9171
9172 else
9173   ac_cv_search_shmget=no
9174 fi
9175 rm conftest.$ac_ext
9176 LIBS=$ac_func_search_save_LIBS
9177 fi
9178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shmget" >&5
9179 $as_echo "$ac_cv_search_shmget" >&6; }
9180 ac_res=$ac_cv_search_shmget
9181 if test "$ac_res" != no; then :
9182   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9183
9184 fi
9185
9186
9187 if test "$with_readline" = yes; then
9188
9189
9190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing readline" >&5
9191 $as_echo_n "checking for library containing readline... " >&6; }
9192 if ${pgac_cv_check_readline+:} false; then :
9193   $as_echo_n "(cached) " >&6
9194 else
9195   pgac_cv_check_readline=no
9196 pgac_save_LIBS=$LIBS
9197 if test x"$with_libedit_preferred" != x"yes"
9198 then    READLINE_ORDER="-lreadline -ledit"
9199 else    READLINE_ORDER="-ledit -lreadline"
9200 fi
9201 for pgac_rllib in $READLINE_ORDER ; do
9202   for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
9203     LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
9204     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9205 /* end confdefs.h.  */
9206
9207 /* Override any GCC internal prototype to avoid an error.
9208    Use char because int might match the return type of a GCC
9209    builtin and then its argument prototype would still apply.  */
9210 #ifdef __cplusplus
9211 extern "C"
9212 #endif
9213 char readline ();
9214 int
9215 main ()
9216 {
9217 return readline ();
9218   ;
9219   return 0;
9220 }
9221 _ACEOF
9222 if ac_fn_c_try_link "$LINENO"; then :
9223
9224       # Older NetBSD, OpenBSD, and Irix have a broken linker that does not
9225       # recognize dependent libraries; assume curses is needed if we didn't
9226       # find any dependency.
9227       case $host_os in
9228         netbsd* | openbsd* | irix*)
9229           if test x"$pgac_lib" = x"" ; then
9230             pgac_lib=" -lcurses"
9231           fi ;;
9232       esac
9233
9234       pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
9235       break
9236
9237 fi
9238 rm -f core conftest.err conftest.$ac_objext \
9239     conftest$ac_exeext conftest.$ac_ext
9240   done
9241   if test "$pgac_cv_check_readline" != no ; then
9242     break
9243   fi
9244 done
9245 LIBS=$pgac_save_LIBS
9246
9247 fi
9248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_readline" >&5
9249 $as_echo "$pgac_cv_check_readline" >&6; }
9250 if test "$pgac_cv_check_readline" != no ; then
9251   LIBS="$pgac_cv_check_readline $LIBS"
9252
9253 $as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
9254
9255 fi
9256
9257
9258   if test x"$pgac_cv_check_readline" = x"no"; then
9259     as_fn_error $? "readline library not found
9260 If you have readline already installed, see config.log for details on the
9261 failure.  It is possible the compiler isn't looking in the proper directory.
9262 Use --without-readline to disable readline support." "$LINENO" 5
9263   fi
9264 fi
9265
9266 if test "$with_zlib" = yes; then
9267   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5
9268 $as_echo_n "checking for inflate in -lz... " >&6; }
9269 if ${ac_cv_lib_z_inflate+:} false; then :
9270   $as_echo_n "(cached) " >&6
9271 else
9272   ac_check_lib_save_LIBS=$LIBS
9273 LIBS="-lz  $LIBS"
9274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9275 /* end confdefs.h.  */
9276
9277 /* Override any GCC internal prototype to avoid an error.
9278    Use char because int might match the return type of a GCC
9279    builtin and then its argument prototype would still apply.  */
9280 #ifdef __cplusplus
9281 extern "C"
9282 #endif
9283 char inflate ();
9284 int
9285 main ()
9286 {
9287 return inflate ();
9288   ;
9289   return 0;
9290 }
9291 _ACEOF
9292 if ac_fn_c_try_link "$LINENO"; then :
9293   ac_cv_lib_z_inflate=yes
9294 else
9295   ac_cv_lib_z_inflate=no
9296 fi
9297 rm -f core conftest.err conftest.$ac_objext \
9298     conftest$ac_exeext conftest.$ac_ext
9299 LIBS=$ac_check_lib_save_LIBS
9300 fi
9301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5
9302 $as_echo "$ac_cv_lib_z_inflate" >&6; }
9303 if test "x$ac_cv_lib_z_inflate" = xyes; then :
9304   cat >>confdefs.h <<_ACEOF
9305 #define HAVE_LIBZ 1
9306 _ACEOF
9307
9308   LIBS="-lz $LIBS"
9309
9310 else
9311   as_fn_error $? "zlib library not found
9312 If you have zlib already installed, see config.log for details on the
9313 failure.  It is possible the compiler isn't looking in the proper directory.
9314 Use --without-zlib to disable zlib support." "$LINENO" 5
9315 fi
9316
9317 fi
9318
9319 if test "$enable_spinlocks" = yes; then
9320
9321 $as_echo "#define HAVE_SPINLOCKS 1" >>confdefs.h
9322
9323 else
9324   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9325 *** Not using spinlocks will cause poor performance." >&5
9326 $as_echo "$as_me: WARNING:
9327 *** Not using spinlocks will cause poor performance." >&2;}
9328 fi
9329
9330 if test "$enable_atomics" = yes; then
9331
9332 $as_echo "#define HAVE_ATOMICS 1" >>confdefs.h
9333
9334 else
9335   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9336 *** Not using atomic operations will cause poor performance." >&5
9337 $as_echo "$as_me: WARNING:
9338 *** Not using atomic operations will cause poor performance." >&2;}
9339 fi
9340
9341 if test "$with_gssapi" = yes ; then
9342   if test "$PORTNAME" != "win32"; then
9343     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gss_init_sec_context" >&5
9344 $as_echo_n "checking for library containing gss_init_sec_context... " >&6; }
9345 if ${ac_cv_search_gss_init_sec_context+:} false; then :
9346   $as_echo_n "(cached) " >&6
9347 else
9348   ac_func_search_save_LIBS=$LIBS
9349 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9350 /* end confdefs.h.  */
9351
9352 /* Override any GCC internal prototype to avoid an error.
9353    Use char because int might match the return type of a GCC
9354    builtin and then its argument prototype would still apply.  */
9355 #ifdef __cplusplus
9356 extern "C"
9357 #endif
9358 char gss_init_sec_context ();
9359 int
9360 main ()
9361 {
9362 return gss_init_sec_context ();
9363   ;
9364   return 0;
9365 }
9366 _ACEOF
9367 for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'; do
9368   if test -z "$ac_lib"; then
9369     ac_res="none required"
9370   else
9371     ac_res=-l$ac_lib
9372     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9373   fi
9374   if ac_fn_c_try_link "$LINENO"; then :
9375   ac_cv_search_gss_init_sec_context=$ac_res
9376 fi
9377 rm -f core conftest.err conftest.$ac_objext \
9378     conftest$ac_exeext
9379   if ${ac_cv_search_gss_init_sec_context+:} false; then :
9380   break
9381 fi
9382 done
9383 if ${ac_cv_search_gss_init_sec_context+:} false; then :
9384
9385 else
9386   ac_cv_search_gss_init_sec_context=no
9387 fi
9388 rm conftest.$ac_ext
9389 LIBS=$ac_func_search_save_LIBS
9390 fi
9391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gss_init_sec_context" >&5
9392 $as_echo "$ac_cv_search_gss_init_sec_context" >&6; }
9393 ac_res=$ac_cv_search_gss_init_sec_context
9394 if test "$ac_res" != no; then :
9395   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9396
9397 else
9398   as_fn_error $? "could not find function 'gss_init_sec_context' required for GSSAPI" "$LINENO" 5
9399 fi
9400
9401   else
9402     LIBS="$LIBS -lgssapi32"
9403   fi
9404 fi
9405
9406 if test "$with_openssl" = yes ; then
9407     if test "$PORTNAME" != "win32"; then
9408      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_new_ex_data in -lcrypto" >&5
9409 $as_echo_n "checking for CRYPTO_new_ex_data in -lcrypto... " >&6; }
9410 if ${ac_cv_lib_crypto_CRYPTO_new_ex_data+:} false; then :
9411   $as_echo_n "(cached) " >&6
9412 else
9413   ac_check_lib_save_LIBS=$LIBS
9414 LIBS="-lcrypto  $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 CRYPTO_new_ex_data ();
9425 int
9426 main ()
9427 {
9428 return CRYPTO_new_ex_data ();
9429   ;
9430   return 0;
9431 }
9432 _ACEOF
9433 if ac_fn_c_try_link "$LINENO"; then :
9434   ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
9435 else
9436   ac_cv_lib_crypto_CRYPTO_new_ex_data=no
9437 fi
9438 rm -f core conftest.err conftest.$ac_objext \
9439     conftest$ac_exeext conftest.$ac_ext
9440 LIBS=$ac_check_lib_save_LIBS
9441 fi
9442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
9443 $as_echo "$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6; }
9444 if test "x$ac_cv_lib_crypto_CRYPTO_new_ex_data" = xyes; then :
9445   cat >>confdefs.h <<_ACEOF
9446 #define HAVE_LIBCRYPTO 1
9447 _ACEOF
9448
9449   LIBS="-lcrypto $LIBS"
9450
9451 else
9452   as_fn_error $? "library 'crypto' is required for OpenSSL" "$LINENO" 5
9453 fi
9454
9455      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_library_init in -lssl" >&5
9456 $as_echo_n "checking for SSL_library_init in -lssl... " >&6; }
9457 if ${ac_cv_lib_ssl_SSL_library_init+:} false; then :
9458   $as_echo_n "(cached) " >&6
9459 else
9460   ac_check_lib_save_LIBS=$LIBS
9461 LIBS="-lssl  $LIBS"
9462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9463 /* end confdefs.h.  */
9464
9465 /* Override any GCC internal prototype to avoid an error.
9466    Use char because int might match the return type of a GCC
9467    builtin and then its argument prototype would still apply.  */
9468 #ifdef __cplusplus
9469 extern "C"
9470 #endif
9471 char SSL_library_init ();
9472 int
9473 main ()
9474 {
9475 return SSL_library_init ();
9476   ;
9477   return 0;
9478 }
9479 _ACEOF
9480 if ac_fn_c_try_link "$LINENO"; then :
9481   ac_cv_lib_ssl_SSL_library_init=yes
9482 else
9483   ac_cv_lib_ssl_SSL_library_init=no
9484 fi
9485 rm -f core conftest.err conftest.$ac_objext \
9486     conftest$ac_exeext conftest.$ac_ext
9487 LIBS=$ac_check_lib_save_LIBS
9488 fi
9489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_library_init" >&5
9490 $as_echo "$ac_cv_lib_ssl_SSL_library_init" >&6; }
9491 if test "x$ac_cv_lib_ssl_SSL_library_init" = xyes; then :
9492   cat >>confdefs.h <<_ACEOF
9493 #define HAVE_LIBSSL 1
9494 _ACEOF
9495
9496   LIBS="-lssl $LIBS"
9497
9498 else
9499   as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5
9500 fi
9501
9502   else
9503      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing CRYPTO_new_ex_data" >&5
9504 $as_echo_n "checking for library containing CRYPTO_new_ex_data... " >&6; }
9505 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
9506   $as_echo_n "(cached) " >&6
9507 else
9508   ac_func_search_save_LIBS=$LIBS
9509 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9510 /* end confdefs.h.  */
9511
9512 /* Override any GCC internal prototype to avoid an error.
9513    Use char because int might match the return type of a GCC
9514    builtin and then its argument prototype would still apply.  */
9515 #ifdef __cplusplus
9516 extern "C"
9517 #endif
9518 char CRYPTO_new_ex_data ();
9519 int
9520 main ()
9521 {
9522 return CRYPTO_new_ex_data ();
9523   ;
9524   return 0;
9525 }
9526 _ACEOF
9527 for ac_lib in '' eay32 crypto; do
9528   if test -z "$ac_lib"; then
9529     ac_res="none required"
9530   else
9531     ac_res=-l$ac_lib
9532     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9533   fi
9534   if ac_fn_c_try_link "$LINENO"; then :
9535   ac_cv_search_CRYPTO_new_ex_data=$ac_res
9536 fi
9537 rm -f core conftest.err conftest.$ac_objext \
9538     conftest$ac_exeext
9539   if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
9540   break
9541 fi
9542 done
9543 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
9544
9545 else
9546   ac_cv_search_CRYPTO_new_ex_data=no
9547 fi
9548 rm conftest.$ac_ext
9549 LIBS=$ac_func_search_save_LIBS
9550 fi
9551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_CRYPTO_new_ex_data" >&5
9552 $as_echo "$ac_cv_search_CRYPTO_new_ex_data" >&6; }
9553 ac_res=$ac_cv_search_CRYPTO_new_ex_data
9554 if test "$ac_res" != no; then :
9555   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9556
9557 else
9558   as_fn_error $? "library 'eay32' or 'crypto' is required for OpenSSL" "$LINENO" 5
9559 fi
9560
9561      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_library_init" >&5
9562 $as_echo_n "checking for library containing SSL_library_init... " >&6; }
9563 if ${ac_cv_search_SSL_library_init+:} false; then :
9564   $as_echo_n "(cached) " >&6
9565 else
9566   ac_func_search_save_LIBS=$LIBS
9567 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9568 /* end confdefs.h.  */
9569
9570 /* Override any GCC internal prototype to avoid an error.
9571    Use char because int might match the return type of a GCC
9572    builtin and then its argument prototype would still apply.  */
9573 #ifdef __cplusplus
9574 extern "C"
9575 #endif
9576 char SSL_library_init ();
9577 int
9578 main ()
9579 {
9580 return SSL_library_init ();
9581   ;
9582   return 0;
9583 }
9584 _ACEOF
9585 for ac_lib in '' ssleay32 ssl; do
9586   if test -z "$ac_lib"; then
9587     ac_res="none required"
9588   else
9589     ac_res=-l$ac_lib
9590     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9591   fi
9592   if ac_fn_c_try_link "$LINENO"; then :
9593   ac_cv_search_SSL_library_init=$ac_res
9594 fi
9595 rm -f core conftest.err conftest.$ac_objext \
9596     conftest$ac_exeext
9597   if ${ac_cv_search_SSL_library_init+:} false; then :
9598   break
9599 fi
9600 done
9601 if ${ac_cv_search_SSL_library_init+:} false; then :
9602
9603 else
9604   ac_cv_search_SSL_library_init=no
9605 fi
9606 rm conftest.$ac_ext
9607 LIBS=$ac_func_search_save_LIBS
9608 fi
9609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_library_init" >&5
9610 $as_echo "$ac_cv_search_SSL_library_init" >&6; }
9611 ac_res=$ac_cv_search_SSL_library_init
9612 if test "$ac_res" != no; then :
9613   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9614
9615 else
9616   as_fn_error $? "library 'ssleay32' or 'ssl' is required for OpenSSL" "$LINENO" 5
9617 fi
9618
9619   fi
9620   for ac_func in SSL_get_current_compression
9621 do :
9622   ac_fn_c_check_func "$LINENO" "SSL_get_current_compression" "ac_cv_func_SSL_get_current_compression"
9623 if test "x$ac_cv_func_SSL_get_current_compression" = xyes; then :
9624   cat >>confdefs.h <<_ACEOF
9625 #define HAVE_SSL_GET_CURRENT_COMPRESSION 1
9626 _ACEOF
9627
9628 fi
9629 done
9630
9631 fi
9632
9633 if test "$with_pam" = yes ; then
9634   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_start in -lpam" >&5
9635 $as_echo_n "checking for pam_start in -lpam... " >&6; }
9636 if ${ac_cv_lib_pam_pam_start+:} false; then :
9637   $as_echo_n "(cached) " >&6
9638 else
9639   ac_check_lib_save_LIBS=$LIBS
9640 LIBS="-lpam  $LIBS"
9641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9642 /* end confdefs.h.  */
9643
9644 /* Override any GCC internal prototype to avoid an error.
9645    Use char because int might match the return type of a GCC
9646    builtin and then its argument prototype would still apply.  */
9647 #ifdef __cplusplus
9648 extern "C"
9649 #endif
9650 char pam_start ();
9651 int
9652 main ()
9653 {
9654 return pam_start ();
9655   ;
9656   return 0;
9657 }
9658 _ACEOF
9659 if ac_fn_c_try_link "$LINENO"; then :
9660   ac_cv_lib_pam_pam_start=yes
9661 else
9662   ac_cv_lib_pam_pam_start=no
9663 fi
9664 rm -f core conftest.err conftest.$ac_objext \
9665     conftest$ac_exeext conftest.$ac_ext
9666 LIBS=$ac_check_lib_save_LIBS
9667 fi
9668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_start" >&5
9669 $as_echo "$ac_cv_lib_pam_pam_start" >&6; }
9670 if test "x$ac_cv_lib_pam_pam_start" = xyes; then :
9671   cat >>confdefs.h <<_ACEOF
9672 #define HAVE_LIBPAM 1
9673 _ACEOF
9674
9675   LIBS="-lpam $LIBS"
9676
9677 else
9678   as_fn_error $? "library 'pam' is required for PAM" "$LINENO" 5
9679 fi
9680
9681 fi
9682
9683 if test "$with_libxml" = yes ; then
9684   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlSaveToBuffer in -lxml2" >&5
9685 $as_echo_n "checking for xmlSaveToBuffer in -lxml2... " >&6; }
9686 if ${ac_cv_lib_xml2_xmlSaveToBuffer+:} false; then :
9687   $as_echo_n "(cached) " >&6
9688 else
9689   ac_check_lib_save_LIBS=$LIBS
9690 LIBS="-lxml2  $LIBS"
9691 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9692 /* end confdefs.h.  */
9693
9694 /* Override any GCC internal prototype to avoid an error.
9695    Use char because int might match the return type of a GCC
9696    builtin and then its argument prototype would still apply.  */
9697 #ifdef __cplusplus
9698 extern "C"
9699 #endif
9700 char xmlSaveToBuffer ();
9701 int
9702 main ()
9703 {
9704 return xmlSaveToBuffer ();
9705   ;
9706   return 0;
9707 }
9708 _ACEOF
9709 if ac_fn_c_try_link "$LINENO"; then :
9710   ac_cv_lib_xml2_xmlSaveToBuffer=yes
9711 else
9712   ac_cv_lib_xml2_xmlSaveToBuffer=no
9713 fi
9714 rm -f core conftest.err conftest.$ac_objext \
9715     conftest$ac_exeext conftest.$ac_ext
9716 LIBS=$ac_check_lib_save_LIBS
9717 fi
9718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlSaveToBuffer" >&5
9719 $as_echo "$ac_cv_lib_xml2_xmlSaveToBuffer" >&6; }
9720 if test "x$ac_cv_lib_xml2_xmlSaveToBuffer" = xyes; then :
9721   cat >>confdefs.h <<_ACEOF
9722 #define HAVE_LIBXML2 1
9723 _ACEOF
9724
9725   LIBS="-lxml2 $LIBS"
9726
9727 else
9728   as_fn_error $? "library 'xml2' (version >= 2.6.23) is required for XML support" "$LINENO" 5
9729 fi
9730
9731 fi
9732
9733 if test "$with_libxslt" = yes ; then
9734   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xsltCleanupGlobals in -lxslt" >&5
9735 $as_echo_n "checking for xsltCleanupGlobals in -lxslt... " >&6; }
9736 if ${ac_cv_lib_xslt_xsltCleanupGlobals+:} false; then :
9737   $as_echo_n "(cached) " >&6
9738 else
9739   ac_check_lib_save_LIBS=$LIBS
9740 LIBS="-lxslt  $LIBS"
9741 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9742 /* end confdefs.h.  */
9743
9744 /* Override any GCC internal prototype to avoid an error.
9745    Use char because int might match the return type of a GCC
9746    builtin and then its argument prototype would still apply.  */
9747 #ifdef __cplusplus
9748 extern "C"
9749 #endif
9750 char xsltCleanupGlobals ();
9751 int
9752 main ()
9753 {
9754 return xsltCleanupGlobals ();
9755   ;
9756   return 0;
9757 }
9758 _ACEOF
9759 if ac_fn_c_try_link "$LINENO"; then :
9760   ac_cv_lib_xslt_xsltCleanupGlobals=yes
9761 else
9762   ac_cv_lib_xslt_xsltCleanupGlobals=no
9763 fi
9764 rm -f core conftest.err conftest.$ac_objext \
9765     conftest$ac_exeext conftest.$ac_ext
9766 LIBS=$ac_check_lib_save_LIBS
9767 fi
9768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xslt_xsltCleanupGlobals" >&5
9769 $as_echo "$ac_cv_lib_xslt_xsltCleanupGlobals" >&6; }
9770 if test "x$ac_cv_lib_xslt_xsltCleanupGlobals" = xyes; then :
9771   cat >>confdefs.h <<_ACEOF
9772 #define HAVE_LIBXSLT 1
9773 _ACEOF
9774
9775   LIBS="-lxslt $LIBS"
9776
9777 else
9778   as_fn_error $? "library 'xslt' is required for XSLT support" "$LINENO" 5
9779 fi
9780
9781 fi
9782
9783 # Note: We can test for libldap_r only after we know PTHREAD_LIBS
9784 if test "$with_ldap" = yes ; then
9785   _LIBS="$LIBS"
9786   if test "$PORTNAME" != "win32"; then
9787     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap" >&5
9788 $as_echo_n "checking for ldap_bind in -lldap... " >&6; }
9789 if ${ac_cv_lib_ldap_ldap_bind+:} false; then :
9790   $as_echo_n "(cached) " >&6
9791 else
9792   ac_check_lib_save_LIBS=$LIBS
9793 LIBS="-lldap $EXTRA_LDAP_LIBS $LIBS"
9794 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9795 /* end confdefs.h.  */
9796
9797 /* Override any GCC internal prototype to avoid an error.
9798    Use char because int might match the return type of a GCC
9799    builtin and then its argument prototype would still apply.  */
9800 #ifdef __cplusplus
9801 extern "C"
9802 #endif
9803 char ldap_bind ();
9804 int
9805 main ()
9806 {
9807 return ldap_bind ();
9808   ;
9809   return 0;
9810 }
9811 _ACEOF
9812 if ac_fn_c_try_link "$LINENO"; then :
9813   ac_cv_lib_ldap_ldap_bind=yes
9814 else
9815   ac_cv_lib_ldap_ldap_bind=no
9816 fi
9817 rm -f core conftest.err conftest.$ac_objext \
9818     conftest$ac_exeext conftest.$ac_ext
9819 LIBS=$ac_check_lib_save_LIBS
9820 fi
9821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_ldap_bind" >&5
9822 $as_echo "$ac_cv_lib_ldap_ldap_bind" >&6; }
9823 if test "x$ac_cv_lib_ldap_ldap_bind" = xyes; then :
9824   cat >>confdefs.h <<_ACEOF
9825 #define HAVE_LIBLDAP 1
9826 _ACEOF
9827
9828   LIBS="-lldap $LIBS"
9829
9830 else
9831   as_fn_error $? "library 'ldap' is required for LDAP" "$LINENO" 5
9832 fi
9833
9834     LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
9835     if test "$enable_thread_safety" = yes; then
9836       # on some platforms ldap_r fails to link without PTHREAD_LIBS
9837       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_simple_bind in -lldap_r" >&5
9838 $as_echo_n "checking for ldap_simple_bind in -lldap_r... " >&6; }
9839 if ${ac_cv_lib_ldap_r_ldap_simple_bind+:} false; then :
9840   $as_echo_n "(cached) " >&6
9841 else
9842   ac_check_lib_save_LIBS=$LIBS
9843 LIBS="-lldap_r $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
9844 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9845 /* end confdefs.h.  */
9846
9847 /* Override any GCC internal prototype to avoid an error.
9848    Use char because int might match the return type of a GCC
9849    builtin and then its argument prototype would still apply.  */
9850 #ifdef __cplusplus
9851 extern "C"
9852 #endif
9853 char ldap_simple_bind ();
9854 int
9855 main ()
9856 {
9857 return ldap_simple_bind ();
9858   ;
9859   return 0;
9860 }
9861 _ACEOF
9862 if ac_fn_c_try_link "$LINENO"; then :
9863   ac_cv_lib_ldap_r_ldap_simple_bind=yes
9864 else
9865   ac_cv_lib_ldap_r_ldap_simple_bind=no
9866 fi
9867 rm -f core conftest.err conftest.$ac_objext \
9868     conftest$ac_exeext conftest.$ac_ext
9869 LIBS=$ac_check_lib_save_LIBS
9870 fi
9871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_r_ldap_simple_bind" >&5
9872 $as_echo "$ac_cv_lib_ldap_r_ldap_simple_bind" >&6; }
9873 if test "x$ac_cv_lib_ldap_r_ldap_simple_bind" = xyes; then :
9874   cat >>confdefs.h <<_ACEOF
9875 #define HAVE_LIBLDAP_R 1
9876 _ACEOF
9877
9878   LIBS="-lldap_r $LIBS"
9879
9880 else
9881   as_fn_error $? "library 'ldap_r' is required for LDAP" "$LINENO" 5
9882 fi
9883
9884       LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
9885     else
9886       LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
9887     fi
9888   else
9889     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lwldap32" >&5
9890 $as_echo_n "checking for ldap_bind in -lwldap32... " >&6; }
9891 if ${ac_cv_lib_wldap32_ldap_bind+:} false; then :
9892   $as_echo_n "(cached) " >&6
9893 else
9894   ac_check_lib_save_LIBS=$LIBS
9895 LIBS="-lwldap32  $LIBS"
9896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9897 /* end confdefs.h.  */
9898
9899 /* Override any GCC internal prototype to avoid an error.
9900    Use char because int might match the return type of a GCC
9901    builtin and then its argument prototype would still apply.  */
9902 #ifdef __cplusplus
9903 extern "C"
9904 #endif
9905 char ldap_bind ();
9906 int
9907 main ()
9908 {
9909 return ldap_bind ();
9910   ;
9911   return 0;
9912 }
9913 _ACEOF
9914 if ac_fn_c_try_link "$LINENO"; then :
9915   ac_cv_lib_wldap32_ldap_bind=yes
9916 else
9917   ac_cv_lib_wldap32_ldap_bind=no
9918 fi
9919 rm -f core conftest.err conftest.$ac_objext \
9920     conftest$ac_exeext conftest.$ac_ext
9921 LIBS=$ac_check_lib_save_LIBS
9922 fi
9923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wldap32_ldap_bind" >&5
9924 $as_echo "$ac_cv_lib_wldap32_ldap_bind" >&6; }
9925 if test "x$ac_cv_lib_wldap32_ldap_bind" = xyes; then :
9926   cat >>confdefs.h <<_ACEOF
9927 #define HAVE_LIBWLDAP32 1
9928 _ACEOF
9929
9930   LIBS="-lwldap32 $LIBS"
9931
9932 else
9933   as_fn_error $? "library 'wldap32' is required for LDAP" "$LINENO" 5
9934 fi
9935
9936     LDAP_LIBS_FE="-lwldap32"
9937     LDAP_LIBS_BE="-lwldap32"
9938   fi
9939   LIBS="$_LIBS"
9940 fi
9941
9942
9943
9944 # for contrib/sepgsql
9945 if test "$with_selinux" = yes; then
9946   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_compute_create_name in -lselinux" >&5
9947 $as_echo_n "checking for security_compute_create_name in -lselinux... " >&6; }
9948 if ${ac_cv_lib_selinux_security_compute_create_name+:} false; then :
9949   $as_echo_n "(cached) " >&6
9950 else
9951   ac_check_lib_save_LIBS=$LIBS
9952 LIBS="-lselinux  $LIBS"
9953 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9954 /* end confdefs.h.  */
9955
9956 /* Override any GCC internal prototype to avoid an error.
9957    Use char because int might match the return type of a GCC
9958    builtin and then its argument prototype would still apply.  */
9959 #ifdef __cplusplus
9960 extern "C"
9961 #endif
9962 char security_compute_create_name ();
9963 int
9964 main ()
9965 {
9966 return security_compute_create_name ();
9967   ;
9968   return 0;
9969 }
9970 _ACEOF
9971 if ac_fn_c_try_link "$LINENO"; then :
9972   ac_cv_lib_selinux_security_compute_create_name=yes
9973 else
9974   ac_cv_lib_selinux_security_compute_create_name=no
9975 fi
9976 rm -f core conftest.err conftest.$ac_objext \
9977     conftest$ac_exeext conftest.$ac_ext
9978 LIBS=$ac_check_lib_save_LIBS
9979 fi
9980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_compute_create_name" >&5
9981 $as_echo "$ac_cv_lib_selinux_security_compute_create_name" >&6; }
9982 if test "x$ac_cv_lib_selinux_security_compute_create_name" = xyes; then :
9983   cat >>confdefs.h <<_ACEOF
9984 #define HAVE_LIBSELINUX 1
9985 _ACEOF
9986
9987   LIBS="-lselinux $LIBS"
9988
9989 else
9990   as_fn_error $? "library 'libselinux', version 2.1.10 or newer, is required for SELinux support" "$LINENO" 5
9991 fi
9992
9993 fi
9994
9995 # for contrib/uuid-ossp
9996 if test "$with_uuid" = bsd ; then
9997   # On BSD, the UUID functions are in libc
9998   ac_fn_c_check_func "$LINENO" "uuid_to_string" "ac_cv_func_uuid_to_string"
9999 if test "x$ac_cv_func_uuid_to_string" = xyes; then :
10000   UUID_LIBS=""
10001 else
10002   as_fn_error $? "BSD UUID functions are not present" "$LINENO" 5
10003 fi
10004
10005 elif test "$with_uuid" = e2fs ; then
10006   # On OS X, the UUID functions are in libc
10007   ac_fn_c_check_func "$LINENO" "uuid_generate" "ac_cv_func_uuid_generate"
10008 if test "x$ac_cv_func_uuid_generate" = xyes; then :
10009   UUID_LIBS=""
10010 else
10011   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5
10012 $as_echo_n "checking for uuid_generate in -luuid... " >&6; }
10013 if ${ac_cv_lib_uuid_uuid_generate+:} false; then :
10014   $as_echo_n "(cached) " >&6
10015 else
10016   ac_check_lib_save_LIBS=$LIBS
10017 LIBS="-luuid  $LIBS"
10018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10019 /* end confdefs.h.  */
10020
10021 /* Override any GCC internal prototype to avoid an error.
10022    Use char because int might match the return type of a GCC
10023    builtin and then its argument prototype would still apply.  */
10024 #ifdef __cplusplus
10025 extern "C"
10026 #endif
10027 char uuid_generate ();
10028 int
10029 main ()
10030 {
10031 return uuid_generate ();
10032   ;
10033   return 0;
10034 }
10035 _ACEOF
10036 if ac_fn_c_try_link "$LINENO"; then :
10037   ac_cv_lib_uuid_uuid_generate=yes
10038 else
10039   ac_cv_lib_uuid_uuid_generate=no
10040 fi
10041 rm -f core conftest.err conftest.$ac_objext \
10042     conftest$ac_exeext conftest.$ac_ext
10043 LIBS=$ac_check_lib_save_LIBS
10044 fi
10045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate" >&5
10046 $as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; }
10047 if test "x$ac_cv_lib_uuid_uuid_generate" = xyes; then :
10048   UUID_LIBS="-luuid"
10049 else
10050   as_fn_error $? "library 'uuid' is required for E2FS UUID" "$LINENO" 5
10051 fi
10052
10053 fi
10054
10055 elif test "$with_uuid" = ossp ; then
10056   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -lossp-uuid" >&5
10057 $as_echo_n "checking for uuid_export in -lossp-uuid... " >&6; }
10058 if ${ac_cv_lib_ossp_uuid_uuid_export+:} false; then :
10059   $as_echo_n "(cached) " >&6
10060 else
10061   ac_check_lib_save_LIBS=$LIBS
10062 LIBS="-lossp-uuid  $LIBS"
10063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10064 /* end confdefs.h.  */
10065
10066 /* Override any GCC internal prototype to avoid an error.
10067    Use char because int might match the return type of a GCC
10068    builtin and then its argument prototype would still apply.  */
10069 #ifdef __cplusplus
10070 extern "C"
10071 #endif
10072 char uuid_export ();
10073 int
10074 main ()
10075 {
10076 return uuid_export ();
10077   ;
10078   return 0;
10079 }
10080 _ACEOF
10081 if ac_fn_c_try_link "$LINENO"; then :
10082   ac_cv_lib_ossp_uuid_uuid_export=yes
10083 else
10084   ac_cv_lib_ossp_uuid_uuid_export=no
10085 fi
10086 rm -f core conftest.err conftest.$ac_objext \
10087     conftest$ac_exeext conftest.$ac_ext
10088 LIBS=$ac_check_lib_save_LIBS
10089 fi
10090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossp_uuid_uuid_export" >&5
10091 $as_echo "$ac_cv_lib_ossp_uuid_uuid_export" >&6; }
10092 if test "x$ac_cv_lib_ossp_uuid_uuid_export" = xyes; then :
10093   UUID_LIBS="-lossp-uuid"
10094 else
10095   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -luuid" >&5
10096 $as_echo_n "checking for uuid_export in -luuid... " >&6; }
10097 if ${ac_cv_lib_uuid_uuid_export+:} false; then :
10098   $as_echo_n "(cached) " >&6
10099 else
10100   ac_check_lib_save_LIBS=$LIBS
10101 LIBS="-luuid  $LIBS"
10102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10103 /* end confdefs.h.  */
10104
10105 /* Override any GCC internal prototype to avoid an error.
10106    Use char because int might match the return type of a GCC
10107    builtin and then its argument prototype would still apply.  */
10108 #ifdef __cplusplus
10109 extern "C"
10110 #endif
10111 char uuid_export ();
10112 int
10113 main ()
10114 {
10115 return uuid_export ();
10116   ;
10117   return 0;
10118 }
10119 _ACEOF
10120 if ac_fn_c_try_link "$LINENO"; then :
10121   ac_cv_lib_uuid_uuid_export=yes
10122 else
10123   ac_cv_lib_uuid_uuid_export=no
10124 fi
10125 rm -f core conftest.err conftest.$ac_objext \
10126     conftest$ac_exeext conftest.$ac_ext
10127 LIBS=$ac_check_lib_save_LIBS
10128 fi
10129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_export" >&5
10130 $as_echo "$ac_cv_lib_uuid_uuid_export" >&6; }
10131 if test "x$ac_cv_lib_uuid_uuid_export" = xyes; then :
10132   UUID_LIBS="-luuid"
10133 else
10134   as_fn_error $? "library 'ossp-uuid' or 'uuid' is required for OSSP UUID" "$LINENO" 5
10135 fi
10136
10137 fi
10138
10139 fi
10140
10141
10142
10143 ##
10144 ## Header files
10145 ##
10146
10147 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 pwd.h sys/ioctl.h sys/ipc.h sys/poll.h sys/pstat.h sys/resource.h sys/select.h sys/sem.h sys/shm.h sys/socket.h sys/sockio.h sys/tas.h sys/time.h sys/un.h termios.h ucred.h utime.h wchar.h wctype.h
10148 do :
10149   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10150 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
10151 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
10152   cat >>confdefs.h <<_ACEOF
10153 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10154 _ACEOF
10155
10156 fi
10157
10158 done
10159
10160
10161 # On BSD, test for net/if.h will fail unless sys/socket.h
10162 # is included first.
10163 for ac_header in net/if.h
10164 do :
10165   ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
10166 #ifdef HAVE_SYS_SOCKET_H
10167 #include <sys/socket.h>
10168 #endif
10169
10170 "
10171 if test "x$ac_cv_header_net_if_h" = xyes; then :
10172   cat >>confdefs.h <<_ACEOF
10173 #define HAVE_NET_IF_H 1
10174 _ACEOF
10175
10176 fi
10177
10178 done
10179
10180
10181 # On OpenBSD, test for sys/ucred.h will fail unless sys/param.h
10182 # is included first.
10183 for ac_header in sys/ucred.h
10184 do :
10185   ac_fn_c_check_header_compile "$LINENO" "sys/ucred.h" "ac_cv_header_sys_ucred_h" "$ac_includes_default
10186 #include <sys/param.h>
10187
10188 "
10189 if test "x$ac_cv_header_sys_ucred_h" = xyes; then :
10190   cat >>confdefs.h <<_ACEOF
10191 #define HAVE_SYS_UCRED_H 1
10192 _ACEOF
10193
10194 fi
10195
10196 done
10197
10198
10199 # At least on IRIX, test for netinet/tcp.h will fail unless
10200 # netinet/in.h is included first.
10201 for ac_header in netinet/in.h
10202 do :
10203   ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
10204 if test "x$ac_cv_header_netinet_in_h" = xyes; then :
10205   cat >>confdefs.h <<_ACEOF
10206 #define HAVE_NETINET_IN_H 1
10207 _ACEOF
10208
10209 fi
10210
10211 done
10212
10213 for ac_header in netinet/tcp.h
10214 do :
10215   ac_fn_c_check_header_compile "$LINENO" "netinet/tcp.h" "ac_cv_header_netinet_tcp_h" "$ac_includes_default
10216 #ifdef HAVE_NETINET_IN_H
10217 #include <netinet/in.h>
10218 #endif
10219
10220 "
10221 if test "x$ac_cv_header_netinet_tcp_h" = xyes; then :
10222   cat >>confdefs.h <<_ACEOF
10223 #define HAVE_NETINET_TCP_H 1
10224 _ACEOF
10225
10226 fi
10227
10228 done
10229
10230
10231 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
10232   for ac_header in readline/readline.h
10233 do :
10234   ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
10235 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
10236   cat >>confdefs.h <<_ACEOF
10237 #define HAVE_READLINE_READLINE_H 1
10238 _ACEOF
10239
10240 else
10241   for ac_header in readline.h
10242 do :
10243   ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
10244 if test "x$ac_cv_header_readline_h" = xyes; then :
10245   cat >>confdefs.h <<_ACEOF
10246 #define HAVE_READLINE_H 1
10247 _ACEOF
10248
10249 else
10250   as_fn_error $? "readline header not found
10251 If you have readline already installed, see config.log for details on the
10252 failure.  It is possible the compiler isn't looking in the proper directory.
10253 Use --without-readline to disable readline support." "$LINENO" 5
10254 fi
10255
10256 done
10257
10258 fi
10259
10260 done
10261
10262   for ac_header in readline/history.h
10263 do :
10264   ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
10265 if test "x$ac_cv_header_readline_history_h" = xyes; then :
10266   cat >>confdefs.h <<_ACEOF
10267 #define HAVE_READLINE_HISTORY_H 1
10268 _ACEOF
10269
10270 else
10271   for ac_header in history.h
10272 do :
10273   ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
10274 if test "x$ac_cv_header_history_h" = xyes; then :
10275   cat >>confdefs.h <<_ACEOF
10276 #define HAVE_HISTORY_H 1
10277 _ACEOF
10278
10279 else
10280   as_fn_error $? "history header not found
10281 If you have readline already installed, see config.log for details on the
10282 failure.  It is possible the compiler isn't looking in the proper directory.
10283 Use --without-readline to disable readline support." "$LINENO" 5
10284 fi
10285
10286 done
10287
10288 fi
10289
10290 done
10291
10292 fi
10293
10294 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
10295 # Some installations of libedit usurp /usr/include/readline/, which seems
10296 # bad practice, since in combined installations readline will have its headers
10297 # there.  We might have to resort to AC_EGREP checks to make sure we found
10298 # the proper header...
10299   for ac_header in editline/readline.h
10300 do :
10301   ac_fn_c_check_header_mongrel "$LINENO" "editline/readline.h" "ac_cv_header_editline_readline_h" "$ac_includes_default"
10302 if test "x$ac_cv_header_editline_readline_h" = xyes; then :
10303   cat >>confdefs.h <<_ACEOF
10304 #define HAVE_EDITLINE_READLINE_H 1
10305 _ACEOF
10306
10307 else
10308   for ac_header in readline.h
10309 do :
10310   ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
10311 if test "x$ac_cv_header_readline_h" = xyes; then :
10312   cat >>confdefs.h <<_ACEOF
10313 #define HAVE_READLINE_H 1
10314 _ACEOF
10315
10316 else
10317   for ac_header in readline/readline.h
10318 do :
10319   ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
10320 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
10321   cat >>confdefs.h <<_ACEOF
10322 #define HAVE_READLINE_READLINE_H 1
10323 _ACEOF
10324
10325 else
10326   as_fn_error $? "readline header not found
10327 If you have libedit already installed, see config.log for details on the
10328 failure.  It is possible the compiler isn't looking in the proper directory.
10329 Use --without-readline to disable libedit support." "$LINENO" 5
10330 fi
10331
10332 done
10333
10334 fi
10335
10336 done
10337
10338 fi
10339
10340 done
10341
10342 # Note: in a libedit installation, history.h is sometimes a dummy, and may
10343 # not be there at all.  Hence, don't complain if not found.  We must check
10344 # though, since in yet other versions it is an independent header.
10345   for ac_header in editline/history.h
10346 do :
10347   ac_fn_c_check_header_mongrel "$LINENO" "editline/history.h" "ac_cv_header_editline_history_h" "$ac_includes_default"
10348 if test "x$ac_cv_header_editline_history_h" = xyes; then :
10349   cat >>confdefs.h <<_ACEOF
10350 #define HAVE_EDITLINE_HISTORY_H 1
10351 _ACEOF
10352
10353 else
10354   for ac_header in history.h
10355 do :
10356   ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
10357 if test "x$ac_cv_header_history_h" = xyes; then :
10358   cat >>confdefs.h <<_ACEOF
10359 #define HAVE_HISTORY_H 1
10360 _ACEOF
10361
10362 else
10363   for ac_header in readline/history.h
10364 do :
10365   ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
10366 if test "x$ac_cv_header_readline_history_h" = xyes; then :
10367   cat >>confdefs.h <<_ACEOF
10368 #define HAVE_READLINE_HISTORY_H 1
10369 _ACEOF
10370
10371 fi
10372
10373 done
10374
10375 fi
10376
10377 done
10378
10379 fi
10380
10381 done
10382
10383 fi
10384
10385 if test "$with_zlib" = yes; then
10386   ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
10387 if test "x$ac_cv_header_zlib_h" = xyes; then :
10388
10389 else
10390   as_fn_error $? "zlib header not found
10391 If you have zlib already installed, see config.log for details on the
10392 failure.  It is possible the compiler isn't looking in the proper directory.
10393 Use --without-zlib to disable zlib support." "$LINENO" 5
10394 fi
10395
10396
10397 fi
10398
10399 if test "$with_gssapi" = yes ; then
10400   for ac_header in gssapi/gssapi.h
10401 do :
10402   ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi.h" "ac_cv_header_gssapi_gssapi_h" "$ac_includes_default"
10403 if test "x$ac_cv_header_gssapi_gssapi_h" = xyes; then :
10404   cat >>confdefs.h <<_ACEOF
10405 #define HAVE_GSSAPI_GSSAPI_H 1
10406 _ACEOF
10407
10408 else
10409   for ac_header in gssapi.h
10410 do :
10411   ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
10412 if test "x$ac_cv_header_gssapi_h" = xyes; then :
10413   cat >>confdefs.h <<_ACEOF
10414 #define HAVE_GSSAPI_H 1
10415 _ACEOF
10416
10417 else
10418   as_fn_error $? "gssapi.h header file is required for GSSAPI" "$LINENO" 5
10419 fi
10420
10421 done
10422
10423 fi
10424
10425 done
10426
10427 fi
10428
10429 if test "$with_openssl" = yes ; then
10430   ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
10431 if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
10432
10433 else
10434   as_fn_error $? "header file <openssl/ssl.h> is required for OpenSSL" "$LINENO" 5
10435 fi
10436
10437
10438   ac_fn_c_check_header_mongrel "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default"
10439 if test "x$ac_cv_header_openssl_err_h" = xyes; then :
10440
10441 else
10442   as_fn_error $? "header file <openssl/err.h> is required for OpenSSL" "$LINENO" 5
10443 fi
10444
10445
10446 fi
10447
10448 if test "$with_pam" = yes ; then
10449   for ac_header in security/pam_appl.h
10450 do :
10451   ac_fn_c_check_header_mongrel "$LINENO" "security/pam_appl.h" "ac_cv_header_security_pam_appl_h" "$ac_includes_default"
10452 if test "x$ac_cv_header_security_pam_appl_h" = xyes; then :
10453   cat >>confdefs.h <<_ACEOF
10454 #define HAVE_SECURITY_PAM_APPL_H 1
10455 _ACEOF
10456
10457 else
10458   for ac_header in pam/pam_appl.h
10459 do :
10460   ac_fn_c_check_header_mongrel "$LINENO" "pam/pam_appl.h" "ac_cv_header_pam_pam_appl_h" "$ac_includes_default"
10461 if test "x$ac_cv_header_pam_pam_appl_h" = xyes; then :
10462   cat >>confdefs.h <<_ACEOF
10463 #define HAVE_PAM_PAM_APPL_H 1
10464 _ACEOF
10465
10466 else
10467   as_fn_error $? "header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." "$LINENO" 5
10468 fi
10469
10470 done
10471
10472 fi
10473
10474 done
10475
10476 fi
10477
10478 if test "$with_libxml" = yes ; then
10479   ac_fn_c_check_header_mongrel "$LINENO" "libxml/parser.h" "ac_cv_header_libxml_parser_h" "$ac_includes_default"
10480 if test "x$ac_cv_header_libxml_parser_h" = xyes; then :
10481
10482 else
10483   as_fn_error $? "header file <libxml/parser.h> is required for XML support" "$LINENO" 5
10484 fi
10485
10486
10487 fi
10488
10489 if test "$with_libxslt" = yes ; then
10490   ac_fn_c_check_header_mongrel "$LINENO" "libxslt/xslt.h" "ac_cv_header_libxslt_xslt_h" "$ac_includes_default"
10491 if test "x$ac_cv_header_libxslt_xslt_h" = xyes; then :
10492
10493 else
10494   as_fn_error $? "header file <libxslt/xslt.h> is required for XSLT support" "$LINENO" 5
10495 fi
10496
10497
10498 fi
10499
10500 if test "$with_ldap" = yes ; then
10501   if test "$PORTNAME" != "win32"; then
10502      for ac_header in ldap.h
10503 do :
10504   ac_fn_c_check_header_mongrel "$LINENO" "ldap.h" "ac_cv_header_ldap_h" "$ac_includes_default"
10505 if test "x$ac_cv_header_ldap_h" = xyes; then :
10506   cat >>confdefs.h <<_ACEOF
10507 #define HAVE_LDAP_H 1
10508 _ACEOF
10509
10510 else
10511   as_fn_error $? "header file <ldap.h> is required for LDAP" "$LINENO" 5
10512 fi
10513
10514 done
10515
10516      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compatible LDAP implementation" >&5
10517 $as_echo_n "checking for compatible LDAP implementation... " >&6; }
10518 if ${pgac_cv_ldap_safe+:} false; then :
10519   $as_echo_n "(cached) " >&6
10520 else
10521   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10522 /* end confdefs.h.  */
10523 #include <ldap.h>
10524 #if !defined(LDAP_VENDOR_VERSION) || \
10525      (defined(LDAP_API_FEATURE_X_OPENLDAP) && \
10526       LDAP_VENDOR_VERSION >= 20424 && LDAP_VENDOR_VERSION <= 20431)
10527 choke me
10528 #endif
10529 int
10530 main ()
10531 {
10532
10533   ;
10534   return 0;
10535 }
10536 _ACEOF
10537 if ac_fn_c_try_compile "$LINENO"; then :
10538   pgac_cv_ldap_safe=yes
10539 else
10540   pgac_cv_ldap_safe=no
10541 fi
10542 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10543 fi
10544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_ldap_safe" >&5
10545 $as_echo "$pgac_cv_ldap_safe" >&6; }
10546
10547 if test "$pgac_cv_ldap_safe" != yes; then
10548   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
10549 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
10550 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
10551 *** also uses LDAP will crash on exit." >&5
10552 $as_echo "$as_me: WARNING:
10553 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
10554 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
10555 *** also uses LDAP will crash on exit." >&2;}
10556 fi
10557   else
10558      for ac_header in winldap.h
10559 do :
10560   ac_fn_c_check_header_compile "$LINENO" "winldap.h" "ac_cv_header_winldap_h" "$ac_includes_default
10561 #include <windows.h>
10562
10563 "
10564 if test "x$ac_cv_header_winldap_h" = xyes; then :
10565   cat >>confdefs.h <<_ACEOF
10566 #define HAVE_WINLDAP_H 1
10567 _ACEOF
10568
10569 else
10570   as_fn_error $? "header file <winldap.h> is required for LDAP" "$LINENO" 5
10571 fi
10572
10573 done
10574
10575   fi
10576 fi
10577
10578 if test "$with_bonjour" = yes ; then
10579   ac_fn_c_check_header_mongrel "$LINENO" "dns_sd.h" "ac_cv_header_dns_sd_h" "$ac_includes_default"
10580 if test "x$ac_cv_header_dns_sd_h" = xyes; then :
10581
10582 else
10583   as_fn_error $? "header file <dns_sd.h> is required for Bonjour" "$LINENO" 5
10584 fi
10585
10586
10587 fi
10588
10589 # for contrib/uuid-ossp
10590 if test "$with_uuid" = bsd ; then
10591   for ac_header in uuid.h
10592 do :
10593   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
10594 if test "x$ac_cv_header_uuid_h" = xyes; then :
10595   cat >>confdefs.h <<_ACEOF
10596 #define HAVE_UUID_H 1
10597 _ACEOF
10598  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10599 /* end confdefs.h.  */
10600 #include <uuid.h>
10601
10602 _ACEOF
10603 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10604   $EGREP "uuid_to_string" >/dev/null 2>&1; then :
10605
10606 else
10607   as_fn_error $? "header file <uuid.h> does not match BSD UUID library" "$LINENO" 5
10608 fi
10609 rm -f conftest*
10610
10611 else
10612   as_fn_error $? "header file <uuid.h> is required for BSD UUID" "$LINENO" 5
10613 fi
10614
10615 done
10616
10617 elif test "$with_uuid" = e2fs ; then
10618   for ac_header in uuid/uuid.h
10619 do :
10620   ac_fn_c_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
10621 if test "x$ac_cv_header_uuid_uuid_h" = xyes; then :
10622   cat >>confdefs.h <<_ACEOF
10623 #define HAVE_UUID_UUID_H 1
10624 _ACEOF
10625  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10626 /* end confdefs.h.  */
10627 #include <uuid/uuid.h>
10628
10629 _ACEOF
10630 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10631   $EGREP "uuid_generate" >/dev/null 2>&1; then :
10632
10633 else
10634   as_fn_error $? "header file <uuid/uuid.h> does not match E2FS UUID library" "$LINENO" 5
10635 fi
10636 rm -f conftest*
10637
10638 else
10639   for ac_header in uuid.h
10640 do :
10641   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
10642 if test "x$ac_cv_header_uuid_h" = xyes; then :
10643   cat >>confdefs.h <<_ACEOF
10644 #define HAVE_UUID_H 1
10645 _ACEOF
10646  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10647 /* end confdefs.h.  */
10648 #include <uuid.h>
10649
10650 _ACEOF
10651 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10652   $EGREP "uuid_generate" >/dev/null 2>&1; then :
10653
10654 else
10655   as_fn_error $? "header file <uuid.h> does not match E2FS UUID library" "$LINENO" 5
10656 fi
10657 rm -f conftest*
10658
10659 else
10660   as_fn_error $? "header file <uuid/uuid.h> or <uuid.h> is required for E2FS UUID" "$LINENO" 5
10661 fi
10662
10663 done
10664
10665 fi
10666
10667 done
10668
10669 elif test "$with_uuid" = ossp ; then
10670   for ac_header in ossp/uuid.h
10671 do :
10672   ac_fn_c_check_header_mongrel "$LINENO" "ossp/uuid.h" "ac_cv_header_ossp_uuid_h" "$ac_includes_default"
10673 if test "x$ac_cv_header_ossp_uuid_h" = xyes; then :
10674   cat >>confdefs.h <<_ACEOF
10675 #define HAVE_OSSP_UUID_H 1
10676 _ACEOF
10677  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10678 /* end confdefs.h.  */
10679 #include <ossp/uuid.h>
10680
10681 _ACEOF
10682 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10683   $EGREP "uuid_export" >/dev/null 2>&1; then :
10684
10685 else
10686   as_fn_error $? "header file <ossp/uuid.h> does not match OSSP UUID library" "$LINENO" 5
10687 fi
10688 rm -f conftest*
10689
10690 else
10691   for ac_header in uuid.h
10692 do :
10693   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
10694 if test "x$ac_cv_header_uuid_h" = xyes; then :
10695   cat >>confdefs.h <<_ACEOF
10696 #define HAVE_UUID_H 1
10697 _ACEOF
10698  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10699 /* end confdefs.h.  */
10700 #include <uuid.h>
10701
10702 _ACEOF
10703 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10704   $EGREP "uuid_export" >/dev/null 2>&1; then :
10705
10706 else
10707   as_fn_error $? "header file <uuid.h> does not match OSSP UUID library" "$LINENO" 5
10708 fi
10709 rm -f conftest*
10710
10711 else
10712   as_fn_error $? "header file <ossp/uuid.h> or <uuid.h> is required for OSSP UUID" "$LINENO" 5
10713 fi
10714
10715 done
10716
10717 fi
10718
10719 done
10720
10721 fi
10722
10723 if test "$PORTNAME" = "win32" ; then
10724    for ac_header in crtdefs.h
10725 do :
10726   ac_fn_c_check_header_mongrel "$LINENO" "crtdefs.h" "ac_cv_header_crtdefs_h" "$ac_includes_default"
10727 if test "x$ac_cv_header_crtdefs_h" = xyes; then :
10728   cat >>confdefs.h <<_ACEOF
10729 #define HAVE_CRTDEFS_H 1
10730 _ACEOF
10731
10732 fi
10733
10734 done
10735
10736 fi
10737
10738 ##
10739 ## Types, structures, compiler characteristics
10740 ##
10741
10742   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
10743 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
10744 if ${ac_cv_c_bigendian+:} false; then :
10745   $as_echo_n "(cached) " >&6
10746 else
10747   ac_cv_c_bigendian=unknown
10748     # See if we're dealing with a universal compiler.
10749     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10750 /* end confdefs.h.  */
10751 #ifndef __APPLE_CC__
10752                not a universal capable compiler
10753              #endif
10754              typedef int dummy;
10755
10756 _ACEOF
10757 if ac_fn_c_try_compile "$LINENO"; then :
10758
10759         # Check for potential -arch flags.  It is not universal unless
10760         # there are at least two -arch flags with different values.
10761         ac_arch=
10762         ac_prev=
10763         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
10764          if test -n "$ac_prev"; then
10765            case $ac_word in
10766              i?86 | x86_64 | ppc | ppc64)
10767                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
10768                  ac_arch=$ac_word
10769                else
10770                  ac_cv_c_bigendian=universal
10771                  break
10772                fi
10773                ;;
10774            esac
10775            ac_prev=
10776          elif test "x$ac_word" = "x-arch"; then
10777            ac_prev=arch
10778          fi
10779        done
10780 fi
10781 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10782     if test $ac_cv_c_bigendian = unknown; then
10783       # See if sys/param.h defines the BYTE_ORDER macro.
10784       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10785 /* end confdefs.h.  */
10786 #include <sys/types.h>
10787              #include <sys/param.h>
10788
10789 int
10790 main ()
10791 {
10792 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
10793                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
10794                      && LITTLE_ENDIAN)
10795               bogus endian macros
10796              #endif
10797
10798   ;
10799   return 0;
10800 }
10801 _ACEOF
10802 if ac_fn_c_try_compile "$LINENO"; then :
10803   # It does; now see whether it defined to BIG_ENDIAN or not.
10804          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10805 /* end confdefs.h.  */
10806 #include <sys/types.h>
10807                 #include <sys/param.h>
10808
10809 int
10810 main ()
10811 {
10812 #if BYTE_ORDER != BIG_ENDIAN
10813                  not big endian
10814                 #endif
10815
10816   ;
10817   return 0;
10818 }
10819 _ACEOF
10820 if ac_fn_c_try_compile "$LINENO"; then :
10821   ac_cv_c_bigendian=yes
10822 else
10823   ac_cv_c_bigendian=no
10824 fi
10825 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10826 fi
10827 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10828     fi
10829     if test $ac_cv_c_bigendian = unknown; then
10830       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
10831       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10832 /* end confdefs.h.  */
10833 #include <limits.h>
10834
10835 int
10836 main ()
10837 {
10838 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
10839               bogus endian macros
10840              #endif
10841
10842   ;
10843   return 0;
10844 }
10845 _ACEOF
10846 if ac_fn_c_try_compile "$LINENO"; then :
10847   # It does; now see whether it defined to _BIG_ENDIAN or not.
10848          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10849 /* end confdefs.h.  */
10850 #include <limits.h>
10851
10852 int
10853 main ()
10854 {
10855 #ifndef _BIG_ENDIAN
10856                  not big endian
10857                 #endif
10858
10859   ;
10860   return 0;
10861 }
10862 _ACEOF
10863 if ac_fn_c_try_compile "$LINENO"; then :
10864   ac_cv_c_bigendian=yes
10865 else
10866   ac_cv_c_bigendian=no
10867 fi
10868 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10869 fi
10870 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10871     fi
10872     if test $ac_cv_c_bigendian = unknown; then
10873       # Compile a test program.
10874       if test "$cross_compiling" = yes; then :
10875   # Try to guess by grepping values from an object file.
10876          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10877 /* end confdefs.h.  */
10878 short int ascii_mm[] =
10879                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
10880                 short int ascii_ii[] =
10881                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
10882                 int use_ascii (int i) {
10883                   return ascii_mm[i] + ascii_ii[i];
10884                 }
10885                 short int ebcdic_ii[] =
10886                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
10887                 short int ebcdic_mm[] =
10888                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
10889                 int use_ebcdic (int i) {
10890                   return ebcdic_mm[i] + ebcdic_ii[i];
10891                 }
10892                 extern int foo;
10893
10894 int
10895 main ()
10896 {
10897 return use_ascii (foo) == use_ebcdic (foo);
10898   ;
10899   return 0;
10900 }
10901 _ACEOF
10902 if ac_fn_c_try_compile "$LINENO"; then :
10903   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
10904               ac_cv_c_bigendian=yes
10905             fi
10906             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
10907               if test "$ac_cv_c_bigendian" = unknown; then
10908                 ac_cv_c_bigendian=no
10909               else
10910                 # finding both strings is unlikely to happen, but who knows?
10911                 ac_cv_c_bigendian=unknown
10912               fi
10913             fi
10914 fi
10915 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10916 else
10917   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10918 /* end confdefs.h.  */
10919 $ac_includes_default
10920 int
10921 main ()
10922 {
10923
10924              /* Are we little or big endian?  From Harbison&Steele.  */
10925              union
10926              {
10927                long int l;
10928                char c[sizeof (long int)];
10929              } u;
10930              u.l = 1;
10931              return u.c[sizeof (long int) - 1] == 1;
10932
10933   ;
10934   return 0;
10935 }
10936 _ACEOF
10937 if ac_fn_c_try_run "$LINENO"; then :
10938   ac_cv_c_bigendian=no
10939 else
10940   ac_cv_c_bigendian=yes
10941 fi
10942 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10943   conftest.$ac_objext conftest.beam conftest.$ac_ext
10944 fi
10945
10946     fi
10947 fi
10948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
10949 $as_echo "$ac_cv_c_bigendian" >&6; }
10950  case $ac_cv_c_bigendian in #(
10951    yes)
10952      $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
10953 ;; #(
10954    no)
10955       ;; #(
10956    universal)
10957
10958 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
10959
10960      ;; #(
10961    *)
10962      as_fn_error $? "unknown endianness
10963  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
10964  esac
10965
10966 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
10967 $as_echo_n "checking for inline... " >&6; }
10968 if ${ac_cv_c_inline+:} false; then :
10969   $as_echo_n "(cached) " >&6
10970 else
10971   ac_cv_c_inline=no
10972 for ac_kw in inline __inline__ __inline; do
10973   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10974 /* end confdefs.h.  */
10975 #ifndef __cplusplus
10976 typedef int foo_t;
10977 static $ac_kw foo_t static_foo () {return 0; }
10978 $ac_kw foo_t foo () {return 0; }
10979 #endif
10980
10981 _ACEOF
10982 if ac_fn_c_try_compile "$LINENO"; then :
10983   ac_cv_c_inline=$ac_kw
10984 fi
10985 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10986   test "$ac_cv_c_inline" != no && break
10987 done
10988
10989 fi
10990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
10991 $as_echo "$ac_cv_c_inline" >&6; }
10992
10993 case $ac_cv_c_inline in
10994   inline | yes) ;;
10995   *)
10996     case $ac_cv_c_inline in
10997       no) ac_val=;;
10998       *) ac_val=$ac_cv_c_inline;;
10999     esac
11000     cat >>confdefs.h <<_ACEOF
11001 #ifndef __cplusplus
11002 #define inline $ac_val
11003 #endif
11004 _ACEOF
11005     ;;
11006 esac
11007
11008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for printf format archetype" >&5
11009 $as_echo_n "checking for printf format archetype... " >&6; }
11010 if ${pgac_cv_printf_archetype+:} false; then :
11011   $as_echo_n "(cached) " >&6
11012 else
11013   ac_save_c_werror_flag=$ac_c_werror_flag
11014 ac_c_werror_flag=yes
11015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11016 /* end confdefs.h.  */
11017 extern int
11018 pgac_write(int ignore, const char *fmt,...)
11019 __attribute__((format(gnu_printf, 2, 3)));
11020 int
11021 main ()
11022 {
11023
11024   ;
11025   return 0;
11026 }
11027 _ACEOF
11028 if ac_fn_c_try_compile "$LINENO"; then :
11029   pgac_cv_printf_archetype=gnu_printf
11030 else
11031   pgac_cv_printf_archetype=printf
11032 fi
11033 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11034 ac_c_werror_flag=$ac_save_c_werror_flag
11035 fi
11036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_printf_archetype" >&5
11037 $as_echo "$pgac_cv_printf_archetype" >&6; }
11038
11039 cat >>confdefs.h <<_ACEOF
11040 #define PG_PRINTF_ATTRIBUTE $pgac_cv_printf_archetype
11041 _ACEOF
11042
11043
11044
11045   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array members" >&5
11046 $as_echo_n "checking for flexible array members... " >&6; }
11047 if ${ac_cv_c_flexmember+:} false; then :
11048   $as_echo_n "(cached) " >&6
11049 else
11050   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11051 /* end confdefs.h.  */
11052 #include <stdlib.h>
11053             #include <stdio.h>
11054             #include <stddef.h>
11055             struct s { int n; double d[]; };
11056 int
11057 main ()
11058 {
11059 int m = getchar ();
11060             struct s *p = malloc (offsetof (struct s, d)
11061                                   + m * sizeof (double));
11062             p->d[0] = 0.0;
11063             return p->d != (double *) NULL;
11064   ;
11065   return 0;
11066 }
11067 _ACEOF
11068 if ac_fn_c_try_compile "$LINENO"; then :
11069   ac_cv_c_flexmember=yes
11070 else
11071   ac_cv_c_flexmember=no
11072 fi
11073 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11074 fi
11075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
11076 $as_echo "$ac_cv_c_flexmember" >&6; }
11077   if test $ac_cv_c_flexmember = yes; then
11078
11079 $as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
11080
11081   else
11082     $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
11083
11084   fi
11085
11086 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signed types" >&5
11087 $as_echo_n "checking for signed types... " >&6; }
11088 if ${pgac_cv_c_signed+:} false; then :
11089   $as_echo_n "(cached) " >&6
11090 else
11091   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11092 /* end confdefs.h.  */
11093
11094 int
11095 main ()
11096 {
11097 signed char c; signed short s; signed int i;
11098   ;
11099   return 0;
11100 }
11101 _ACEOF
11102 if ac_fn_c_try_compile "$LINENO"; then :
11103   pgac_cv_c_signed=yes
11104 else
11105   pgac_cv_c_signed=no
11106 fi
11107 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11108 fi
11109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_signed" >&5
11110 $as_echo "$pgac_cv_c_signed" >&6; }
11111 if test x"$pgac_cv_c_signed" = xno ; then
11112
11113 $as_echo "#define signed /**/" >>confdefs.h
11114
11115 fi
11116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __func__" >&5
11117 $as_echo_n "checking for __func__... " >&6; }
11118 if ${pgac_cv_funcname_func_support+:} false; then :
11119   $as_echo_n "(cached) " >&6
11120 else
11121   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11122 /* end confdefs.h.  */
11123 #include <stdio.h>
11124 int
11125 main ()
11126 {
11127 printf("%s\n", __func__);
11128   ;
11129   return 0;
11130 }
11131 _ACEOF
11132 if ac_fn_c_try_compile "$LINENO"; then :
11133   pgac_cv_funcname_func_support=yes
11134 else
11135   pgac_cv_funcname_func_support=no
11136 fi
11137 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11138 fi
11139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_func_support" >&5
11140 $as_echo "$pgac_cv_funcname_func_support" >&6; }
11141 if test x"$pgac_cv_funcname_func_support" = xyes ; then
11142
11143 $as_echo "#define HAVE_FUNCNAME__FUNC 1" >>confdefs.h
11144
11145 else
11146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __FUNCTION__" >&5
11147 $as_echo_n "checking for __FUNCTION__... " >&6; }
11148 if ${pgac_cv_funcname_function_support+:} false; then :
11149   $as_echo_n "(cached) " >&6
11150 else
11151   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11152 /* end confdefs.h.  */
11153 #include <stdio.h>
11154 int
11155 main ()
11156 {
11157 printf("%s\n", __FUNCTION__);
11158   ;
11159   return 0;
11160 }
11161 _ACEOF
11162 if ac_fn_c_try_compile "$LINENO"; then :
11163   pgac_cv_funcname_function_support=yes
11164 else
11165   pgac_cv_funcname_function_support=no
11166 fi
11167 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11168 fi
11169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_function_support" >&5
11170 $as_echo "$pgac_cv_funcname_function_support" >&6; }
11171 if test x"$pgac_cv_funcname_function_support" = xyes ; then
11172
11173 $as_echo "#define HAVE_FUNCNAME__FUNCTION 1" >>confdefs.h
11174
11175 fi
11176 fi
11177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Static_assert" >&5
11178 $as_echo_n "checking for _Static_assert... " >&6; }
11179 if ${pgac_cv__static_assert+:} false; then :
11180   $as_echo_n "(cached) " >&6
11181 else
11182   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11183 /* end confdefs.h.  */
11184
11185 int
11186 main ()
11187 {
11188 ({ _Static_assert(1, "foo"); })
11189   ;
11190   return 0;
11191 }
11192 _ACEOF
11193 if ac_fn_c_try_link "$LINENO"; then :
11194   pgac_cv__static_assert=yes
11195 else
11196   pgac_cv__static_assert=no
11197 fi
11198 rm -f core conftest.err conftest.$ac_objext \
11199     conftest$ac_exeext conftest.$ac_ext
11200 fi
11201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__static_assert" >&5
11202 $as_echo "$pgac_cv__static_assert" >&6; }
11203 if test x"$pgac_cv__static_assert" = xyes ; then
11204
11205 $as_echo "#define HAVE__STATIC_ASSERT 1" >>confdefs.h
11206
11207 fi
11208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_types_compatible_p" >&5
11209 $as_echo_n "checking for __builtin_types_compatible_p... " >&6; }
11210 if ${pgac_cv__types_compatible+:} false; then :
11211   $as_echo_n "(cached) " >&6
11212 else
11213   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11214 /* end confdefs.h.  */
11215
11216 int
11217 main ()
11218 {
11219  int x; static int y[__builtin_types_compatible_p(__typeof__(x), int)];
11220   ;
11221   return 0;
11222 }
11223 _ACEOF
11224 if ac_fn_c_try_compile "$LINENO"; then :
11225   pgac_cv__types_compatible=yes
11226 else
11227   pgac_cv__types_compatible=no
11228 fi
11229 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11230 fi
11231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__types_compatible" >&5
11232 $as_echo "$pgac_cv__types_compatible" >&6; }
11233 if test x"$pgac_cv__types_compatible" = xyes ; then
11234
11235 $as_echo "#define HAVE__BUILTIN_TYPES_COMPATIBLE_P 1" >>confdefs.h
11236
11237 fi
11238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap32" >&5
11239 $as_echo_n "checking for __builtin_bswap32... " >&6; }
11240 if ${pgac_cv__builtin_bswap32+:} false; then :
11241   $as_echo_n "(cached) " >&6
11242 else
11243   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11244 /* end confdefs.h.  */
11245 static unsigned long int x = __builtin_bswap32(0xaabbccdd);
11246
11247 _ACEOF
11248 if ac_fn_c_try_compile "$LINENO"; then :
11249   pgac_cv__builtin_bswap32=yes
11250 else
11251   pgac_cv__builtin_bswap32=no
11252 fi
11253 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11254 fi
11255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap32" >&5
11256 $as_echo "$pgac_cv__builtin_bswap32" >&6; }
11257 if test x"$pgac_cv__builtin_bswap32" = xyes ; then
11258
11259 $as_echo "#define HAVE__BUILTIN_BSWAP32 1" >>confdefs.h
11260
11261 fi
11262 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_constant_p" >&5
11263 $as_echo_n "checking for __builtin_constant_p... " >&6; }
11264 if ${pgac_cv__builtin_constant_p+:} false; then :
11265   $as_echo_n "(cached) " >&6
11266 else
11267   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11268 /* end confdefs.h.  */
11269 static int x; static int y[__builtin_constant_p(x) ? x : 1];
11270
11271 _ACEOF
11272 if ac_fn_c_try_compile "$LINENO"; then :
11273   pgac_cv__builtin_constant_p=yes
11274 else
11275   pgac_cv__builtin_constant_p=no
11276 fi
11277 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11278 fi
11279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_constant_p" >&5
11280 $as_echo "$pgac_cv__builtin_constant_p" >&6; }
11281 if test x"$pgac_cv__builtin_constant_p" = xyes ; then
11282
11283 $as_echo "#define HAVE__BUILTIN_CONSTANT_P 1" >>confdefs.h
11284
11285 fi
11286 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unreachable" >&5
11287 $as_echo_n "checking for __builtin_unreachable... " >&6; }
11288 if ${pgac_cv__builtin_unreachable+:} false; then :
11289   $as_echo_n "(cached) " >&6
11290 else
11291   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11292 /* end confdefs.h.  */
11293
11294 int
11295 main ()
11296 {
11297 __builtin_unreachable();
11298   ;
11299   return 0;
11300 }
11301 _ACEOF
11302 if ac_fn_c_try_link "$LINENO"; then :
11303   pgac_cv__builtin_unreachable=yes
11304 else
11305   pgac_cv__builtin_unreachable=no
11306 fi
11307 rm -f core conftest.err conftest.$ac_objext \
11308     conftest$ac_exeext conftest.$ac_ext
11309 fi
11310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_unreachable" >&5
11311 $as_echo "$pgac_cv__builtin_unreachable" >&6; }
11312 if test x"$pgac_cv__builtin_unreachable" = xyes ; then
11313
11314 $as_echo "#define HAVE__BUILTIN_UNREACHABLE 1" >>confdefs.h
11315
11316 fi
11317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __VA_ARGS__" >&5
11318 $as_echo_n "checking for __VA_ARGS__... " >&6; }
11319 if ${pgac_cv__va_args+:} false; then :
11320   $as_echo_n "(cached) " >&6
11321 else
11322   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11323 /* end confdefs.h.  */
11324 #include <stdio.h>
11325 int
11326 main ()
11327 {
11328 #define debug(...) fprintf(stderr, __VA_ARGS__)
11329 debug("%s", "blarg");
11330
11331   ;
11332   return 0;
11333 }
11334 _ACEOF
11335 if ac_fn_c_try_compile "$LINENO"; then :
11336   pgac_cv__va_args=yes
11337 else
11338   pgac_cv__va_args=no
11339 fi
11340 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11341 fi
11342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__va_args" >&5
11343 $as_echo "$pgac_cv__va_args" >&6; }
11344 if test x"$pgac_cv__va_args" = xyes ; then
11345
11346 $as_echo "#define HAVE__VA_ARGS 1" >>confdefs.h
11347
11348 fi
11349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
11350 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
11351 if ${ac_cv_struct_tm+:} false; then :
11352   $as_echo_n "(cached) " >&6
11353 else
11354   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11355 /* end confdefs.h.  */
11356 #include <sys/types.h>
11357 #include <time.h>
11358
11359 int
11360 main ()
11361 {
11362 struct tm tm;
11363                                      int *p = &tm.tm_sec;
11364                                      return !p;
11365   ;
11366   return 0;
11367 }
11368 _ACEOF
11369 if ac_fn_c_try_compile "$LINENO"; then :
11370   ac_cv_struct_tm=time.h
11371 else
11372   ac_cv_struct_tm=sys/time.h
11373 fi
11374 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11375 fi
11376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
11377 $as_echo "$ac_cv_struct_tm" >&6; }
11378 if test $ac_cv_struct_tm = sys/time.h; then
11379
11380 $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
11381
11382 fi
11383
11384 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
11385 #include <$ac_cv_struct_tm>
11386
11387 "
11388 if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
11389
11390 cat >>confdefs.h <<_ACEOF
11391 #define HAVE_STRUCT_TM_TM_ZONE 1
11392 _ACEOF
11393
11394
11395 fi
11396
11397 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11398
11399 $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
11400
11401 fi
11402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11403 $as_echo_n "checking for tzname... " >&6; }
11404 if ${ac_cv_var_tzname+:} false; then :
11405   $as_echo_n "(cached) " >&6
11406 else
11407   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11408 /* end confdefs.h.  */
11409 #include <time.h>
11410 #ifndef tzname /* For SGI.  */
11411 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
11412 #endif
11413
11414 int
11415 main ()
11416 {
11417 atoi(*tzname);
11418   ;
11419   return 0;
11420 }
11421 _ACEOF
11422 if ac_fn_c_try_link "$LINENO"; then :
11423   ac_cv_var_tzname=yes
11424 else
11425   ac_cv_var_tzname=no
11426 fi
11427 rm -f core conftest.err conftest.$ac_objext \
11428     conftest$ac_exeext conftest.$ac_ext
11429 fi
11430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11431 $as_echo "$ac_cv_var_tzname" >&6; }
11432 if test $ac_cv_var_tzname = yes; then
11433
11434 $as_echo "#define HAVE_TZNAME 1" >>confdefs.h
11435
11436 fi
11437
11438 ac_fn_c_check_type "$LINENO" "union semun" "ac_cv_type_union_semun" "#include <sys/types.h>
11439 #include <sys/ipc.h>
11440 #include <sys/sem.h>
11441 "
11442 if test "x$ac_cv_type_union_semun" = xyes; then :
11443
11444 cat >>confdefs.h <<_ACEOF
11445 #define HAVE_UNION_SEMUN 1
11446 _ACEOF
11447
11448
11449 fi
11450
11451 ac_fn_c_check_type "$LINENO" "struct sockaddr_un" "ac_cv_type_struct_sockaddr_un" "#include <sys/types.h>
11452 #ifdef HAVE_SYS_UN_H
11453 #include <sys/un.h>
11454 #endif
11455
11456 "
11457 if test "x$ac_cv_type_struct_sockaddr_un" = xyes; then :
11458
11459 $as_echo "#define HAVE_UNIX_SOCKETS 1" >>confdefs.h
11460
11461 fi
11462
11463 ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "#include <sys/types.h>
11464 #ifdef HAVE_SYS_SOCKET_H
11465 #include <sys/socket.h>
11466 #endif
11467
11468 "
11469 if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
11470
11471 cat >>confdefs.h <<_ACEOF
11472 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
11473 _ACEOF
11474
11475
11476 fi
11477
11478 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
11479 #ifdef HAVE_SYS_SOCKET_H
11480 #include <sys/socket.h>
11481 #endif
11482
11483 "
11484 if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then :
11485
11486 cat >>confdefs.h <<_ACEOF
11487 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
11488 _ACEOF
11489
11490
11491 fi
11492 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_family" "ac_cv_member_struct_sockaddr_storage___ss_family" "#include <sys/types.h>
11493 #ifdef HAVE_SYS_SOCKET_H
11494 #include <sys/socket.h>
11495 #endif
11496
11497 "
11498 if test "x$ac_cv_member_struct_sockaddr_storage___ss_family" = xyes; then :
11499
11500 cat >>confdefs.h <<_ACEOF
11501 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1
11502 _ACEOF
11503
11504
11505 fi
11506 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_len" "ac_cv_member_struct_sockaddr_storage_ss_len" "#include <sys/types.h>
11507 #ifdef HAVE_SYS_SOCKET_H
11508 #include <sys/socket.h>
11509 #endif
11510
11511 "
11512 if test "x$ac_cv_member_struct_sockaddr_storage_ss_len" = xyes; then :
11513
11514 cat >>confdefs.h <<_ACEOF
11515 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1
11516 _ACEOF
11517
11518
11519 fi
11520 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_len" "ac_cv_member_struct_sockaddr_storage___ss_len" "#include <sys/types.h>
11521 #ifdef HAVE_SYS_SOCKET_H
11522 #include <sys/socket.h>
11523 #endif
11524
11525 "
11526 if test "x$ac_cv_member_struct_sockaddr_storage___ss_len" = xyes; then :
11527
11528 cat >>confdefs.h <<_ACEOF
11529 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN 1
11530 _ACEOF
11531
11532
11533 fi
11534 ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/types.h>
11535 #ifdef HAVE_SYS_SOCKET_H
11536 #include <sys/socket.h>
11537 #endif
11538
11539 "
11540 if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
11541
11542 cat >>confdefs.h <<_ACEOF
11543 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
11544 _ACEOF
11545
11546
11547 fi
11548
11549 ac_fn_c_check_type "$LINENO" "struct addrinfo" "ac_cv_type_struct_addrinfo" "#include <sys/types.h>
11550 #include <sys/socket.h>
11551 #include <netdb.h>
11552
11553 "
11554 if test "x$ac_cv_type_struct_addrinfo" = xyes; then :
11555
11556 cat >>confdefs.h <<_ACEOF
11557 #define HAVE_STRUCT_ADDRINFO 1
11558 _ACEOF
11559
11560
11561 fi
11562
11563
11564   ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
11565 if test "x$ac_cv_type_intptr_t" = xyes; then :
11566
11567 $as_echo "#define HAVE_INTPTR_T 1" >>confdefs.h
11568
11569 else
11570   for ac_type in 'int' 'long int' 'long long int'; do
11571        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11572 /* end confdefs.h.  */
11573 $ac_includes_default
11574 int
11575 main ()
11576 {
11577 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
11578 test_array [0] = 0;
11579 return test_array [0];
11580
11581   ;
11582   return 0;
11583 }
11584 _ACEOF
11585 if ac_fn_c_try_compile "$LINENO"; then :
11586
11587 cat >>confdefs.h <<_ACEOF
11588 #define intptr_t $ac_type
11589 _ACEOF
11590
11591           ac_type=
11592 fi
11593 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11594        test -z "$ac_type" && break
11595      done
11596 fi
11597
11598
11599
11600   ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
11601 if test "x$ac_cv_type_uintptr_t" = xyes; then :
11602
11603 $as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h
11604
11605 else
11606   for ac_type in 'unsigned int' 'unsigned long int' \
11607         'unsigned long long int'; do
11608        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11609 /* end confdefs.h.  */
11610 $ac_includes_default
11611 int
11612 main ()
11613 {
11614 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
11615 test_array [0] = 0;
11616 return test_array [0];
11617
11618   ;
11619   return 0;
11620 }
11621 _ACEOF
11622 if ac_fn_c_try_compile "$LINENO"; then :
11623
11624 cat >>confdefs.h <<_ACEOF
11625 #define uintptr_t $ac_type
11626 _ACEOF
11627
11628           ac_type=
11629 fi
11630 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11631        test -z "$ac_type" && break
11632      done
11633 fi
11634
11635
11636
11637   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
11638 $as_echo_n "checking for unsigned long long int... " >&6; }
11639 if ${ac_cv_type_unsigned_long_long_int+:} false; then :
11640   $as_echo_n "(cached) " >&6
11641 else
11642   ac_cv_type_unsigned_long_long_int=yes
11643      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
11644        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11645 /* end confdefs.h.  */
11646
11647   /* For now, do not test the preprocessor; as of 2007 there are too many
11648          implementations with broken preprocessors.  Perhaps this can
11649          be revisited in 2012.  In the meantime, code should not expect
11650          #if to work with literals wider than 32 bits.  */
11651       /* Test literals.  */
11652       long long int ll = 9223372036854775807ll;
11653       long long int nll = -9223372036854775807LL;
11654       unsigned long long int ull = 18446744073709551615ULL;
11655       /* Test constant expressions.   */
11656       typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
11657                      ? 1 : -1)];
11658       typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
11659                      ? 1 : -1)];
11660       int i = 63;
11661 int
11662 main ()
11663 {
11664 /* Test availability of runtime routines for shift and division.  */
11665       long long int llmax = 9223372036854775807ll;
11666       unsigned long long int ullmax = 18446744073709551615ull;
11667       return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
11668               | (llmax / ll) | (llmax % ll)
11669               | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
11670               | (ullmax / ull) | (ullmax % ull));
11671   ;
11672   return 0;
11673 }
11674
11675 _ACEOF
11676 if ac_fn_c_try_link "$LINENO"; then :
11677
11678 else
11679   ac_cv_type_unsigned_long_long_int=no
11680 fi
11681 rm -f core conftest.err conftest.$ac_objext \
11682     conftest$ac_exeext conftest.$ac_ext
11683      fi
11684 fi
11685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
11686 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
11687   if test $ac_cv_type_unsigned_long_long_int = yes; then
11688
11689 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
11690
11691   fi
11692
11693
11694
11695   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
11696 $as_echo_n "checking for long long int... " >&6; }
11697 if ${ac_cv_type_long_long_int+:} false; then :
11698   $as_echo_n "(cached) " >&6
11699 else
11700   ac_cv_type_long_long_int=yes
11701       if test "x${ac_cv_prog_cc_c99-no}" = xno; then
11702         ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
11703         if test $ac_cv_type_long_long_int = yes; then
11704                                   if test "$cross_compiling" = yes; then :
11705   :
11706 else
11707   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11708 /* end confdefs.h.  */
11709 #include <limits.h>
11710                  #ifndef LLONG_MAX
11711                  # define HALF \
11712                           (1LL << (sizeof (long long int) * CHAR_BIT - 2))
11713                  # define LLONG_MAX (HALF - 1 + HALF)
11714                  #endif
11715 int
11716 main ()
11717 {
11718 long long int n = 1;
11719                  int i;
11720                  for (i = 0; ; i++)
11721                    {
11722                      long long int m = n << i;
11723                      if (m >> i != n)
11724                        return 1;
11725                      if (LLONG_MAX / 2 < m)
11726                        break;
11727                    }
11728                  return 0;
11729   ;
11730   return 0;
11731 }
11732 _ACEOF
11733 if ac_fn_c_try_run "$LINENO"; then :
11734
11735 else
11736   ac_cv_type_long_long_int=no
11737 fi
11738 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11739   conftest.$ac_objext conftest.beam conftest.$ac_ext
11740 fi
11741
11742         fi
11743       fi
11744 fi
11745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
11746 $as_echo "$ac_cv_type_long_long_int" >&6; }
11747   if test $ac_cv_type_long_long_int = yes; then
11748
11749 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
11750
11751   fi
11752
11753
11754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for locale_t" >&5
11755 $as_echo_n "checking for locale_t... " >&6; }
11756 if ${pgac_cv_type_locale_t+:} false; then :
11757   $as_echo_n "(cached) " >&6
11758 else
11759   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11760 /* end confdefs.h.  */
11761 #include <locale.h>
11762 locale_t x;
11763 int
11764 main ()
11765 {
11766
11767   ;
11768   return 0;
11769 }
11770 _ACEOF
11771 if ac_fn_c_try_compile "$LINENO"; then :
11772   pgac_cv_type_locale_t=yes
11773 else
11774   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11775 /* end confdefs.h.  */
11776 #include <xlocale.h>
11777 locale_t x;
11778 int
11779 main ()
11780 {
11781
11782   ;
11783   return 0;
11784 }
11785 _ACEOF
11786 if ac_fn_c_try_compile "$LINENO"; then :
11787   pgac_cv_type_locale_t='yes (in xlocale.h)'
11788 else
11789   pgac_cv_type_locale_t=no
11790 fi
11791 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11792 fi
11793 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11794 fi
11795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_locale_t" >&5
11796 $as_echo "$pgac_cv_type_locale_t" >&6; }
11797 if test "$pgac_cv_type_locale_t" != no; then
11798
11799 $as_echo "#define HAVE_LOCALE_T 1" >>confdefs.h
11800
11801 fi
11802 if test "$pgac_cv_type_locale_t" = 'yes (in xlocale.h)'; then
11803
11804 $as_echo "#define LOCALE_T_IN_XLOCALE 1" >>confdefs.h
11805
11806 fi
11807
11808 ac_fn_c_check_type "$LINENO" "struct cmsgcred" "ac_cv_type_struct_cmsgcred" "#include <sys/socket.h>
11809 #include <sys/param.h>
11810 #ifdef HAVE_SYS_UCRED_H
11811 #include <sys/ucred.h>
11812 #endif
11813 "
11814 if test "x$ac_cv_type_struct_cmsgcred" = xyes; then :
11815
11816 cat >>confdefs.h <<_ACEOF
11817 #define HAVE_STRUCT_CMSGCRED 1
11818 _ACEOF
11819
11820
11821 fi
11822
11823
11824 ac_fn_c_check_type "$LINENO" "struct option" "ac_cv_type_struct_option" "#ifdef HAVE_GETOPT_H
11825 #include <getopt.h>
11826 #endif
11827 "
11828 if test "x$ac_cv_type_struct_option" = xyes; then :
11829
11830 cat >>confdefs.h <<_ACEOF
11831 #define HAVE_STRUCT_OPTION 1
11832 _ACEOF
11833
11834
11835 fi
11836
11837
11838 if test "$with_zlib" = yes; then
11839   # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
11840   # did not).  While we could work around the lack of z_streamp, it
11841   # seems unwise to encourage people to use such old zlib versions...
11842   ac_fn_c_check_type "$LINENO" "z_streamp" "ac_cv_type_z_streamp" "#include <zlib.h>
11843 "
11844 if test "x$ac_cv_type_z_streamp" = xyes; then :
11845
11846 else
11847   as_fn_error $? "zlib version is too old
11848 Use --without-zlib to disable zlib support." "$LINENO" 5
11849 fi
11850
11851 fi
11852
11853 # On PPC, check if assembler supports LWARX instruction's mutex hint bit
11854 case $host_cpu in
11855   ppc*|powerpc*)
11856     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports lwarx hint bit" >&5
11857 $as_echo_n "checking whether assembler supports lwarx hint bit... " >&6; }
11858     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11859 /* end confdefs.h.  */
11860
11861 int
11862 main ()
11863 {
11864 int a = 0; int *p = &a; int r;
11865          __asm__ __volatile__ (" lwarx %0,0,%1,1\n" : "=&r"(r) : "r"(p));
11866   ;
11867   return 0;
11868 }
11869 _ACEOF
11870 if ac_fn_c_try_compile "$LINENO"; then :
11871   pgac_cv_have_ppc_mutex_hint=yes
11872 else
11873   pgac_cv_have_ppc_mutex_hint=no
11874 fi
11875 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11876     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_ppc_mutex_hint" >&5
11877 $as_echo "$pgac_cv_have_ppc_mutex_hint" >&6; }
11878     if test x"$pgac_cv_have_ppc_mutex_hint" = xyes ; then
11879
11880 $as_echo "#define HAVE_PPC_LWARX_MUTEX_HINT 1" >>confdefs.h
11881
11882     fi
11883   ;;
11884 esac
11885
11886 # Check largefile support.  You might think this is a system service not a
11887 # compiler characteristic, but you'd be wrong.  We must check this before
11888 # probing existence of related functions such as fseeko, since the largefile
11889 # defines can affect what is generated for that.
11890 if test "$PORTNAME" != "win32"; then
11891    # Check whether --enable-largefile was given.
11892 if test "${enable_largefile+set}" = set; then :
11893   enableval=$enable_largefile;
11894 fi
11895
11896 if test "$enable_largefile" != no; then
11897
11898   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
11899 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
11900 if ${ac_cv_sys_largefile_CC+:} false; then :
11901   $as_echo_n "(cached) " >&6
11902 else
11903   ac_cv_sys_largefile_CC=no
11904      if test "$GCC" != yes; then
11905        ac_save_CC=$CC
11906        while :; do
11907          # IRIX 6.2 and later do not support large files by default,
11908          # so use the C compiler's -n32 option if that helps.
11909          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11910 /* end confdefs.h.  */
11911 #include <sys/types.h>
11912  /* Check that off_t can represent 2**63 - 1 correctly.
11913     We can't simply define LARGE_OFF_T to be 9223372036854775807,
11914     since some C++ compilers masquerading as C compilers
11915     incorrectly reject 9223372036854775807.  */
11916 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11917   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11918                        && LARGE_OFF_T % 2147483647 == 1)
11919                       ? 1 : -1];
11920 int
11921 main ()
11922 {
11923
11924   ;
11925   return 0;
11926 }
11927 _ACEOF
11928          if ac_fn_c_try_compile "$LINENO"; then :
11929   break
11930 fi
11931 rm -f core conftest.err conftest.$ac_objext
11932          CC="$CC -n32"
11933          if ac_fn_c_try_compile "$LINENO"; then :
11934   ac_cv_sys_largefile_CC=' -n32'; break
11935 fi
11936 rm -f core conftest.err conftest.$ac_objext
11937          break
11938        done
11939        CC=$ac_save_CC
11940        rm -f conftest.$ac_ext
11941     fi
11942 fi
11943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
11944 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
11945   if test "$ac_cv_sys_largefile_CC" != no; then
11946     CC=$CC$ac_cv_sys_largefile_CC
11947   fi
11948
11949   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
11950 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
11951 if ${ac_cv_sys_file_offset_bits+:} false; then :
11952   $as_echo_n "(cached) " >&6
11953 else
11954   while :; do
11955   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11956 /* end confdefs.h.  */
11957 #include <sys/types.h>
11958  /* Check that off_t can represent 2**63 - 1 correctly.
11959     We can't simply define LARGE_OFF_T to be 9223372036854775807,
11960     since some C++ compilers masquerading as C compilers
11961     incorrectly reject 9223372036854775807.  */
11962 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11963   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11964                        && LARGE_OFF_T % 2147483647 == 1)
11965                       ? 1 : -1];
11966 int
11967 main ()
11968 {
11969
11970   ;
11971   return 0;
11972 }
11973 _ACEOF
11974 if ac_fn_c_try_compile "$LINENO"; then :
11975   ac_cv_sys_file_offset_bits=no; break
11976 fi
11977 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11978   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11979 /* end confdefs.h.  */
11980 #define _FILE_OFFSET_BITS 64
11981 #include <sys/types.h>
11982  /* Check that off_t can represent 2**63 - 1 correctly.
11983     We can't simply define LARGE_OFF_T to be 9223372036854775807,
11984     since some C++ compilers masquerading as C compilers
11985     incorrectly reject 9223372036854775807.  */
11986 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11987   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11988                        && LARGE_OFF_T % 2147483647 == 1)
11989                       ? 1 : -1];
11990 int
11991 main ()
11992 {
11993
11994   ;
11995   return 0;
11996 }
11997 _ACEOF
11998 if ac_fn_c_try_compile "$LINENO"; then :
11999   ac_cv_sys_file_offset_bits=64; break
12000 fi
12001 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12002   ac_cv_sys_file_offset_bits=unknown
12003   break
12004 done
12005 fi
12006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
12007 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
12008 case $ac_cv_sys_file_offset_bits in #(
12009   no | unknown) ;;
12010   *)
12011 cat >>confdefs.h <<_ACEOF
12012 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
12013 _ACEOF
12014 ;;
12015 esac
12016 rm -rf conftest*
12017   if test $ac_cv_sys_file_offset_bits = unknown; then
12018     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
12019 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
12020 if ${ac_cv_sys_large_files+:} false; then :
12021   $as_echo_n "(cached) " >&6
12022 else
12023   while :; do
12024   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12025 /* end confdefs.h.  */
12026 #include <sys/types.h>
12027  /* Check that off_t can represent 2**63 - 1 correctly.
12028     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12029     since some C++ compilers masquerading as C compilers
12030     incorrectly reject 9223372036854775807.  */
12031 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12032   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12033                        && LARGE_OFF_T % 2147483647 == 1)
12034                       ? 1 : -1];
12035 int
12036 main ()
12037 {
12038
12039   ;
12040   return 0;
12041 }
12042 _ACEOF
12043 if ac_fn_c_try_compile "$LINENO"; then :
12044   ac_cv_sys_large_files=no; break
12045 fi
12046 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12047   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12048 /* end confdefs.h.  */
12049 #define _LARGE_FILES 1
12050 #include <sys/types.h>
12051  /* Check that off_t can represent 2**63 - 1 correctly.
12052     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12053     since some C++ compilers masquerading as C compilers
12054     incorrectly reject 9223372036854775807.  */
12055 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12056   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12057                        && LARGE_OFF_T % 2147483647 == 1)
12058                       ? 1 : -1];
12059 int
12060 main ()
12061 {
12062
12063   ;
12064   return 0;
12065 }
12066 _ACEOF
12067 if ac_fn_c_try_compile "$LINENO"; then :
12068   ac_cv_sys_large_files=1; break
12069 fi
12070 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12071   ac_cv_sys_large_files=unknown
12072   break
12073 done
12074 fi
12075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
12076 $as_echo "$ac_cv_sys_large_files" >&6; }
12077 case $ac_cv_sys_large_files in #(
12078   no | unknown) ;;
12079   *)
12080 cat >>confdefs.h <<_ACEOF
12081 #define _LARGE_FILES $ac_cv_sys_large_files
12082 _ACEOF
12083 ;;
12084 esac
12085 rm -rf conftest*
12086   fi
12087
12088
12089 fi
12090
12091
12092 fi
12093
12094 # Check for largefile support (must be after AC_SYS_LARGEFILE)
12095 # The cast to long int works around a bug in the HP C Compiler
12096 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12097 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12098 # This bug is HP SR number 8606223364.
12099 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
12100 $as_echo_n "checking size of off_t... " >&6; }
12101 if ${ac_cv_sizeof_off_t+:} false; then :
12102   $as_echo_n "(cached) " >&6
12103 else
12104   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t"        "$ac_includes_default"; then :
12105
12106 else
12107   if test "$ac_cv_type_off_t" = yes; then
12108      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12109 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12110 as_fn_error 77 "cannot compute sizeof (off_t)
12111 See \`config.log' for more details" "$LINENO" 5; }
12112    else
12113      ac_cv_sizeof_off_t=0
12114    fi
12115 fi
12116
12117 fi
12118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
12119 $as_echo "$ac_cv_sizeof_off_t" >&6; }
12120
12121
12122
12123 cat >>confdefs.h <<_ACEOF
12124 #define SIZEOF_OFF_T $ac_cv_sizeof_off_t
12125 _ACEOF
12126
12127
12128
12129 # If we don't have largefile support, can't handle segsize >= 2GB.
12130 if test "$ac_cv_sizeof_off_t" -lt 8 -a "$segsize" != "1"; then
12131    as_fn_error $? "Large file support is not enabled. Segment size cannot be larger than 1GB." "$LINENO" 5
12132 fi
12133
12134
12135 ##
12136 ## Functions, global variables
12137 ##
12138
12139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int timezone" >&5
12140 $as_echo_n "checking for int timezone... " >&6; }
12141 if ${pgac_cv_var_int_timezone+:} false; then :
12142   $as_echo_n "(cached) " >&6
12143 else
12144   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12145 /* end confdefs.h.  */
12146 #include <time.h>
12147 int res;
12148 int
12149 main ()
12150 {
12151 #ifndef __CYGWIN__
12152 res = timezone / 60;
12153 #else
12154 res = _timezone / 60;
12155 #endif
12156   ;
12157   return 0;
12158 }
12159 _ACEOF
12160 if ac_fn_c_try_link "$LINENO"; then :
12161   pgac_cv_var_int_timezone=yes
12162 else
12163   pgac_cv_var_int_timezone=no
12164 fi
12165 rm -f core conftest.err conftest.$ac_objext \
12166     conftest$ac_exeext conftest.$ac_ext
12167 fi
12168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_timezone" >&5
12169 $as_echo "$pgac_cv_var_int_timezone" >&6; }
12170 if test x"$pgac_cv_var_int_timezone" = xyes ; then
12171
12172 $as_echo "#define HAVE_INT_TIMEZONE 1" >>confdefs.h
12173
12174 fi
12175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for accept()" >&5
12176 $as_echo_n "checking types of arguments for accept()... " >&6; }
12177  if ${ac_cv_func_accept_return+:} false; then :
12178   $as_echo_n "(cached) " >&6
12179 else
12180    if ${ac_cv_func_accept_arg1+:} false; then :
12181   $as_echo_n "(cached) " >&6
12182 else
12183     if ${ac_cv_func_accept_arg2+:} false; then :
12184   $as_echo_n "(cached) " >&6
12185 else
12186      if ${ac_cv_func_accept_arg3+:} false; then :
12187   $as_echo_n "(cached) " >&6
12188 else
12189       for ac_cv_func_accept_return in 'int' 'unsigned int PASCAL' 'SOCKET WSAAPI'; do
12190       for ac_cv_func_accept_arg1 in 'int' 'unsigned int' 'SOCKET'; do
12191        for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
12192         for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
12193          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12194 /* end confdefs.h.  */
12195 #ifdef HAVE_SYS_TYPES_H
12196 #include <sys/types.h>
12197 #endif
12198 #ifdef HAVE_SYS_SOCKET_H
12199 #include <sys/socket.h>
12200 #endif
12201 extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
12202 _ACEOF
12203 if ac_fn_c_try_compile "$LINENO"; then :
12204   ac_not_found=no; break 4
12205 else
12206   ac_not_found=yes
12207 fi
12208 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12209        done
12210       done
12211      done
12212     done
12213     if test "$ac_not_found" = yes; then
12214       as_fn_error $? "could not determine argument types" "$LINENO" 5
12215     fi
12216     if test "$ac_cv_func_accept_arg3" = "void"; then
12217       ac_cv_func_accept_arg3=int
12218     fi
12219
12220 fi
12221
12222 fi
12223
12224 fi
12225
12226 fi
12227  { $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
12228 $as_echo "$ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&6; }
12229
12230 cat >>confdefs.h <<_ACEOF
12231 #define ACCEPT_TYPE_RETURN $ac_cv_func_accept_return
12232 _ACEOF
12233
12234
12235 cat >>confdefs.h <<_ACEOF
12236 #define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
12237 _ACEOF
12238
12239
12240 cat >>confdefs.h <<_ACEOF
12241 #define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
12242 _ACEOF
12243
12244
12245 cat >>confdefs.h <<_ACEOF
12246 #define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
12247 _ACEOF
12248
12249
12250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday takes only one argument" >&5
12251 $as_echo_n "checking whether gettimeofday takes only one argument... " >&6; }
12252 if ${pgac_cv_func_gettimeofday_1arg+:} false; then :
12253   $as_echo_n "(cached) " >&6
12254 else
12255   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12256 /* end confdefs.h.  */
12257 #include <sys/time.h>
12258 int
12259 main ()
12260 {
12261 struct timeval *tp;
12262 struct timezone *tzp;
12263 gettimeofday(tp,tzp);
12264   ;
12265   return 0;
12266 }
12267 _ACEOF
12268 if ac_fn_c_try_compile "$LINENO"; then :
12269   pgac_cv_func_gettimeofday_1arg=no
12270 else
12271   pgac_cv_func_gettimeofday_1arg=yes
12272 fi
12273 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12274 fi
12275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_gettimeofday_1arg" >&5
12276 $as_echo "$pgac_cv_func_gettimeofday_1arg" >&6; }
12277 if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
12278
12279 $as_echo "#define GETTIMEOFDAY_1ARG 1" >>confdefs.h
12280
12281 fi
12282
12283
12284 # Some versions of libedit contain strlcpy(), setproctitle(), and other
12285 # symbols that that library has no business exposing to the world.  Pending
12286 # acquisition of a clue by those developers, ignore libedit (including its
12287 # possible alias of libreadline) while checking for everything else.
12288 LIBS_including_readline="$LIBS"
12289 LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
12290
12291 for ac_func in cbrt dlopen fdatasync getifaddrs getpeerucred getrlimit mbstowcs_l memmove poll pstat pthread_is_threaded_np readlink setproctitle setsid shm_open symlink sync_file_range towlower utime utimes wcstombs wcstombs_l
12292 do :
12293   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12294 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12295 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12296   cat >>confdefs.h <<_ACEOF
12297 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12298 _ACEOF
12299
12300 fi
12301 done
12302
12303
12304 ac_fn_c_check_func "$LINENO" "fseeko" "ac_cv_func_fseeko"
12305 if test "x$ac_cv_func_fseeko" = xyes; then :
12306   $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
12307
12308 else
12309   case " $LIBOBJS " in
12310   *" fseeko.$ac_objext "* ) ;;
12311   *) LIBOBJS="$LIBOBJS fseeko.$ac_objext"
12312  ;;
12313 esac
12314
12315 fi
12316
12317
12318 case $host_os in
12319         # NetBSD uses a custom fseeko/ftello built on fsetpos/fgetpos
12320         # Mingw uses macros to access Win32 API calls
12321         netbsd*|mingw*)
12322
12323 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
12324
12325                 ac_cv_func_fseeko=yes;;
12326         *)
12327                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
12328 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
12329 if ${ac_cv_sys_largefile_source+:} false; then :
12330   $as_echo_n "(cached) " >&6
12331 else
12332   while :; do
12333   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12334 /* end confdefs.h.  */
12335 #include <sys/types.h> /* for off_t */
12336      #include <stdio.h>
12337 int
12338 main ()
12339 {
12340 int (*fp) (FILE *, off_t, int) = fseeko;
12341      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
12342   ;
12343   return 0;
12344 }
12345 _ACEOF
12346 if ac_fn_c_try_link "$LINENO"; then :
12347   ac_cv_sys_largefile_source=no; break
12348 fi
12349 rm -f core conftest.err conftest.$ac_objext \
12350     conftest$ac_exeext conftest.$ac_ext
12351   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12352 /* end confdefs.h.  */
12353 #define _LARGEFILE_SOURCE 1
12354 #include <sys/types.h> /* for off_t */
12355      #include <stdio.h>
12356 int
12357 main ()
12358 {
12359 int (*fp) (FILE *, off_t, int) = fseeko;
12360      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
12361   ;
12362   return 0;
12363 }
12364 _ACEOF
12365 if ac_fn_c_try_link "$LINENO"; then :
12366   ac_cv_sys_largefile_source=1; break
12367 fi
12368 rm -f core conftest.err conftest.$ac_objext \
12369     conftest$ac_exeext conftest.$ac_ext
12370   ac_cv_sys_largefile_source=unknown
12371   break
12372 done
12373 fi
12374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
12375 $as_echo "$ac_cv_sys_largefile_source" >&6; }
12376 case $ac_cv_sys_largefile_source in #(
12377   no | unknown) ;;
12378   *)
12379 cat >>confdefs.h <<_ACEOF
12380 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
12381 _ACEOF
12382 ;;
12383 esac
12384 rm -rf conftest*
12385
12386 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
12387 # in glibc 2.1.3, but that breaks too many other things.
12388 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
12389 if test $ac_cv_sys_largefile_source != unknown; then
12390
12391 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
12392
12393 fi
12394 ;;
12395 esac
12396
12397 # posix_fadvise() is a no-op on Solaris, so don't incur function overhead
12398 # by calling it, 2009-04-02
12399 # http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/posix_fadvise.c
12400 if test "$PORTNAME" != "solaris"; then
12401 for ac_func in posix_fadvise
12402 do :
12403   ac_fn_c_check_func "$LINENO" "posix_fadvise" "ac_cv_func_posix_fadvise"
12404 if test "x$ac_cv_func_posix_fadvise" = xyes; then :
12405   cat >>confdefs.h <<_ACEOF
12406 #define HAVE_POSIX_FADVISE 1
12407 _ACEOF
12408
12409 fi
12410 done
12411
12412 ac_fn_c_check_decl "$LINENO" "posix_fadvise" "ac_cv_have_decl_posix_fadvise" "#include <fcntl.h>
12413 "
12414 if test "x$ac_cv_have_decl_posix_fadvise" = xyes; then :
12415   ac_have_decl=1
12416 else
12417   ac_have_decl=0
12418 fi
12419
12420 cat >>confdefs.h <<_ACEOF
12421 #define HAVE_DECL_POSIX_FADVISE $ac_have_decl
12422 _ACEOF
12423
12424 fi
12425
12426 ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "#include <unistd.h>
12427 "
12428 if test "x$ac_cv_have_decl_fdatasync" = xyes; then :
12429   ac_have_decl=1
12430 else
12431   ac_have_decl=0
12432 fi
12433
12434 cat >>confdefs.h <<_ACEOF
12435 #define HAVE_DECL_FDATASYNC $ac_have_decl
12436 _ACEOF
12437
12438 ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
12439 if test "x$ac_cv_have_decl_strlcat" = xyes; then :
12440   ac_have_decl=1
12441 else
12442   ac_have_decl=0
12443 fi
12444
12445 cat >>confdefs.h <<_ACEOF
12446 #define HAVE_DECL_STRLCAT $ac_have_decl
12447 _ACEOF
12448 ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
12449 if test "x$ac_cv_have_decl_strlcpy" = xyes; then :
12450   ac_have_decl=1
12451 else
12452   ac_have_decl=0
12453 fi
12454
12455 cat >>confdefs.h <<_ACEOF
12456 #define HAVE_DECL_STRLCPY $ac_have_decl
12457 _ACEOF
12458
12459 # This is probably only present on Darwin, but may as well check always
12460 ac_fn_c_check_decl "$LINENO" "F_FULLFSYNC" "ac_cv_have_decl_F_FULLFSYNC" "#include <fcntl.h>
12461 "
12462 if test "x$ac_cv_have_decl_F_FULLFSYNC" = xyes; then :
12463   ac_have_decl=1
12464 else
12465   ac_have_decl=0
12466 fi
12467
12468 cat >>confdefs.h <<_ACEOF
12469 #define HAVE_DECL_F_FULLFSYNC $ac_have_decl
12470 _ACEOF
12471
12472
12473 HAVE_IPV6=no
12474 ac_fn_c_check_type "$LINENO" "struct sockaddr_in6" "ac_cv_type_struct_sockaddr_in6" "$ac_includes_default
12475 #include <netinet/in.h>
12476 "
12477 if test "x$ac_cv_type_struct_sockaddr_in6" = xyes; then :
12478
12479 $as_echo "#define HAVE_IPV6 1" >>confdefs.h
12480
12481          HAVE_IPV6=yes
12482 fi
12483
12484
12485
12486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PS_STRINGS" >&5
12487 $as_echo_n "checking for PS_STRINGS... " >&6; }
12488 if ${pgac_cv_var_PS_STRINGS+:} false; then :
12489   $as_echo_n "(cached) " >&6
12490 else
12491   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12492 /* end confdefs.h.  */
12493 #include <machine/vmparam.h>
12494 #include <sys/exec.h>
12495
12496 int
12497 main ()
12498 {
12499 PS_STRINGS->ps_nargvstr = 1;
12500 PS_STRINGS->ps_argvstr = "foo";
12501   ;
12502   return 0;
12503 }
12504 _ACEOF
12505 if ac_fn_c_try_link "$LINENO"; then :
12506   pgac_cv_var_PS_STRINGS=yes
12507 else
12508   pgac_cv_var_PS_STRINGS=no
12509 fi
12510 rm -f core conftest.err conftest.$ac_objext \
12511     conftest$ac_exeext conftest.$ac_ext
12512 fi
12513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_PS_STRINGS" >&5
12514 $as_echo "$pgac_cv_var_PS_STRINGS" >&6; }
12515 if test "$pgac_cv_var_PS_STRINGS" = yes ; then
12516
12517 $as_echo "#define HAVE_PS_STRINGS 1" >>confdefs.h
12518
12519 fi
12520
12521
12522 # We use our snprintf.c emulation if either snprintf() or vsnprintf()
12523 # is missing.  Yes, there are machines that have only one.  We may
12524 # also decide to use snprintf.c if snprintf() is present but does not
12525 # have all the features we need --- see below.
12526
12527 if test "$PORTNAME" = "win32"; then
12528   # Win32 gets snprintf.c built unconditionally.
12529   #
12530   # To properly translate all NLS languages strings, we must support the
12531   # *printf() %$ format, which allows *printf() arguments to be selected
12532   # by position in the translated string.
12533   #
12534   # libintl versions < 0.13 use the native *printf() functions, and Win32
12535   # *printf() doesn't understand %$, so we must use our /port versions,
12536   # which do understand %$. libintl versions >= 0.13 include their own
12537   # *printf versions on Win32.  The libintl 0.13 release note text is:
12538   #
12539   #   C format strings with positions, as they arise when a translator
12540   #   needs to reorder a sentence, are now supported on all platforms.
12541   #   On those few platforms (NetBSD and Woe32) for which the native
12542   #   printf()/fprintf()/... functions don't support such format
12543   #   strings, replacements are provided through <libintl.h>.
12544   #
12545   # We could use libintl >= 0.13's *printf() if we were sure that we had
12546   # a litint >= 0.13 at runtime, but seeing that there is no clean way
12547   # to guarantee that, it is best to just use our own, so we are sure to
12548   # get %$ support. In include/port.h we disable the *printf() macros
12549   # that might have been defined by libintl.
12550   #
12551   # We do this unconditionally whether NLS is used or not so we are sure
12552   # that all Win32 libraries and binaries behave the same.
12553   pgac_need_repl_snprintf=yes
12554 else
12555   pgac_need_repl_snprintf=no
12556   for ac_func in snprintf
12557 do :
12558   ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
12559 if test "x$ac_cv_func_snprintf" = xyes; then :
12560   cat >>confdefs.h <<_ACEOF
12561 #define HAVE_SNPRINTF 1
12562 _ACEOF
12563
12564 else
12565   pgac_need_repl_snprintf=yes
12566 fi
12567 done
12568
12569   for ac_func in vsnprintf
12570 do :
12571   ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
12572 if test "x$ac_cv_func_vsnprintf" = xyes; then :
12573   cat >>confdefs.h <<_ACEOF
12574 #define HAVE_VSNPRINTF 1
12575 _ACEOF
12576
12577 else
12578   pgac_need_repl_snprintf=yes
12579 fi
12580 done
12581
12582 fi
12583
12584
12585 # Check whether <stdio.h> declares snprintf() and vsnprintf(); if not,
12586 # include/c.h will provide declarations.  Note this is a separate test
12587 # from whether the functions exist in the C library --- there are
12588 # systems that have the functions but don't bother to declare them :-(
12589
12590 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
12591 if test "x$ac_cv_have_decl_snprintf" = xyes; then :
12592   ac_have_decl=1
12593 else
12594   ac_have_decl=0
12595 fi
12596
12597 cat >>confdefs.h <<_ACEOF
12598 #define HAVE_DECL_SNPRINTF $ac_have_decl
12599 _ACEOF
12600 ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
12601 if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
12602   ac_have_decl=1
12603 else
12604   ac_have_decl=0
12605 fi
12606
12607 cat >>confdefs.h <<_ACEOF
12608 #define HAVE_DECL_VSNPRINTF $ac_have_decl
12609 _ACEOF
12610
12611
12612
12613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for isinf" >&5
12614 $as_echo_n "checking for isinf... " >&6; }
12615 if ${ac_cv_func_isinf+:} false; then :
12616   $as_echo_n "(cached) " >&6
12617 else
12618   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12619 /* end confdefs.h.  */
12620
12621 #include <math.h>
12622 double glob_double;
12623
12624 int
12625 main ()
12626 {
12627 return isinf(glob_double) ? 0 : 1;
12628   ;
12629   return 0;
12630 }
12631 _ACEOF
12632 if ac_fn_c_try_link "$LINENO"; then :
12633   ac_cv_func_isinf=yes
12634 else
12635   ac_cv_func_isinf=no
12636 fi
12637 rm -f core conftest.err conftest.$ac_objext \
12638     conftest$ac_exeext conftest.$ac_ext
12639 fi
12640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_isinf" >&5
12641 $as_echo "$ac_cv_func_isinf" >&6; }
12642
12643 if test $ac_cv_func_isinf = yes ; then
12644
12645 $as_echo "#define HAVE_ISINF 1" >>confdefs.h
12646
12647 else
12648   case " $LIBOBJS " in
12649   *" isinf.$ac_objext "* ) ;;
12650   *) LIBOBJS="$LIBOBJS isinf.$ac_objext"
12651  ;;
12652 esac
12653
12654   # Look for a way to implement a substitute for isinf()
12655   for ac_func in fpclass fp_class fp_class_d class
12656 do :
12657   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12658 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12659 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12660   cat >>confdefs.h <<_ACEOF
12661 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12662 _ACEOF
12663  break
12664 fi
12665 done
12666
12667 fi
12668
12669 ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt"
12670 if test "x$ac_cv_func_crypt" = xyes; then :
12671   $as_echo "#define HAVE_CRYPT 1" >>confdefs.h
12672
12673 else
12674   case " $LIBOBJS " in
12675   *" crypt.$ac_objext "* ) ;;
12676   *) LIBOBJS="$LIBOBJS crypt.$ac_objext"
12677  ;;
12678 esac
12679
12680 fi
12681
12682 ac_fn_c_check_func "$LINENO" "fls" "ac_cv_func_fls"
12683 if test "x$ac_cv_func_fls" = xyes; then :
12684   $as_echo "#define HAVE_FLS 1" >>confdefs.h
12685
12686 else
12687   case " $LIBOBJS " in
12688   *" fls.$ac_objext "* ) ;;
12689   *) LIBOBJS="$LIBOBJS fls.$ac_objext"
12690  ;;
12691 esac
12692
12693 fi
12694
12695 ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt"
12696 if test "x$ac_cv_func_getopt" = xyes; then :
12697   $as_echo "#define HAVE_GETOPT 1" >>confdefs.h
12698
12699 else
12700   case " $LIBOBJS " in
12701   *" getopt.$ac_objext "* ) ;;
12702   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
12703  ;;
12704 esac
12705
12706 fi
12707
12708 ac_fn_c_check_func "$LINENO" "getrusage" "ac_cv_func_getrusage"
12709 if test "x$ac_cv_func_getrusage" = xyes; then :
12710   $as_echo "#define HAVE_GETRUSAGE 1" >>confdefs.h
12711
12712 else
12713   case " $LIBOBJS " in
12714   *" getrusage.$ac_objext "* ) ;;
12715   *) LIBOBJS="$LIBOBJS getrusage.$ac_objext"
12716  ;;
12717 esac
12718
12719 fi
12720
12721 ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
12722 if test "x$ac_cv_func_inet_aton" = xyes; then :
12723   $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
12724
12725 else
12726   case " $LIBOBJS " in
12727   *" inet_aton.$ac_objext "* ) ;;
12728   *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
12729  ;;
12730 esac
12731
12732 fi
12733
12734 ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
12735 if test "x$ac_cv_func_mkdtemp" = xyes; then :
12736   $as_echo "#define HAVE_MKDTEMP 1" >>confdefs.h
12737
12738 else
12739   case " $LIBOBJS " in
12740   *" mkdtemp.$ac_objext "* ) ;;
12741   *) LIBOBJS="$LIBOBJS mkdtemp.$ac_objext"
12742  ;;
12743 esac
12744
12745 fi
12746
12747 ac_fn_c_check_func "$LINENO" "random" "ac_cv_func_random"
12748 if test "x$ac_cv_func_random" = xyes; then :
12749   $as_echo "#define HAVE_RANDOM 1" >>confdefs.h
12750
12751 else
12752   case " $LIBOBJS " in
12753   *" random.$ac_objext "* ) ;;
12754   *) LIBOBJS="$LIBOBJS random.$ac_objext"
12755  ;;
12756 esac
12757
12758 fi
12759
12760 ac_fn_c_check_func "$LINENO" "rint" "ac_cv_func_rint"
12761 if test "x$ac_cv_func_rint" = xyes; then :
12762   $as_echo "#define HAVE_RINT 1" >>confdefs.h
12763
12764 else
12765   case " $LIBOBJS " in
12766   *" rint.$ac_objext "* ) ;;
12767   *) LIBOBJS="$LIBOBJS rint.$ac_objext"
12768  ;;
12769 esac
12770
12771 fi
12772
12773 ac_fn_c_check_func "$LINENO" "srandom" "ac_cv_func_srandom"
12774 if test "x$ac_cv_func_srandom" = xyes; then :
12775   $as_echo "#define HAVE_SRANDOM 1" >>confdefs.h
12776
12777 else
12778   case " $LIBOBJS " in
12779   *" srandom.$ac_objext "* ) ;;
12780   *) LIBOBJS="$LIBOBJS srandom.$ac_objext"
12781  ;;
12782 esac
12783
12784 fi
12785
12786 ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror"
12787 if test "x$ac_cv_func_strerror" = xyes; then :
12788   $as_echo "#define HAVE_STRERROR 1" >>confdefs.h
12789
12790 else
12791   case " $LIBOBJS " in
12792   *" strerror.$ac_objext "* ) ;;
12793   *) LIBOBJS="$LIBOBJS strerror.$ac_objext"
12794  ;;
12795 esac
12796
12797 fi
12798
12799 ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
12800 if test "x$ac_cv_func_strlcat" = xyes; then :
12801   $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
12802
12803 else
12804   case " $LIBOBJS " in
12805   *" strlcat.$ac_objext "* ) ;;
12806   *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
12807  ;;
12808 esac
12809
12810 fi
12811
12812 ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
12813 if test "x$ac_cv_func_strlcpy" = xyes; then :
12814   $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
12815
12816 else
12817   case " $LIBOBJS " in
12818   *" strlcpy.$ac_objext "* ) ;;
12819   *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
12820  ;;
12821 esac
12822
12823 fi
12824
12825
12826
12827 case $host_os in
12828
12829         # Windows uses a specialised env handler
12830         # and doesn't need a replacement getpeereid because it doesn't use
12831         # Unix sockets.
12832         mingw*)
12833
12834 $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
12835
12836
12837 $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
12838
12839                 ac_cv_func_unsetenv=yes
12840                 ac_cv_func_getpeereid=yes;;
12841         *)
12842                 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
12843 if test "x$ac_cv_func_unsetenv" = xyes; then :
12844   $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
12845
12846 else
12847   case " $LIBOBJS " in
12848   *" unsetenv.$ac_objext "* ) ;;
12849   *) LIBOBJS="$LIBOBJS unsetenv.$ac_objext"
12850  ;;
12851 esac
12852
12853 fi
12854
12855 ac_fn_c_check_func "$LINENO" "getpeereid" "ac_cv_func_getpeereid"
12856 if test "x$ac_cv_func_getpeereid" = xyes; then :
12857   $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
12858
12859 else
12860   case " $LIBOBJS " in
12861   *" getpeereid.$ac_objext "* ) ;;
12862   *) LIBOBJS="$LIBOBJS getpeereid.$ac_objext"
12863  ;;
12864 esac
12865
12866 fi
12867
12868
12869                 ;;
12870 esac
12871
12872 # System's version of getaddrinfo(), if any, may be used only if we found
12873 # a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
12874 # We use only our own getaddrinfo.c on Windows, but it's time to revisit that.
12875 if test x"$ac_cv_type_struct_addrinfo" = xyes && \
12876    test "$PORTNAME" != "win32"; then
12877   ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo"
12878 if test "x$ac_cv_func_getaddrinfo" = xyes; then :
12879   $as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
12880
12881 else
12882   case " $LIBOBJS " in
12883   *" getaddrinfo.$ac_objext "* ) ;;
12884   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
12885  ;;
12886 esac
12887
12888 fi
12889
12890
12891 else
12892   case " $LIBOBJS " in
12893   *" getaddrinfo.$ac_objext "* ) ;;
12894   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
12895  ;;
12896 esac
12897
12898 fi
12899
12900 # Similarly, use system's getopt_long() only if system provides struct option.
12901 if test x"$ac_cv_type_struct_option" = xyes ; then
12902   ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long"
12903 if test "x$ac_cv_func_getopt_long" = xyes; then :
12904   $as_echo "#define HAVE_GETOPT_LONG 1" >>confdefs.h
12905
12906 else
12907   case " $LIBOBJS " in
12908   *" getopt_long.$ac_objext "* ) ;;
12909   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
12910  ;;
12911 esac
12912
12913 fi
12914
12915
12916 else
12917   case " $LIBOBJS " in
12918   *" getopt_long.$ac_objext "* ) ;;
12919   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
12920  ;;
12921 esac
12922
12923 fi
12924
12925 # Solaris' getopt() doesn't do what we want for long options, so always use
12926 # our version on that platform.
12927 if test "$PORTNAME" = "solaris"; then
12928   case " $LIBOBJS " in
12929   *" getopt.$ac_objext "* ) ;;
12930   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
12931  ;;
12932 esac
12933
12934 fi
12935
12936 # mingw has adopted a GNU-centric interpretation of optind/optreset,
12937 # so always use our version on Windows.
12938 if test "$PORTNAME" = "win32"; then
12939   case " $LIBOBJS " in
12940   *" getopt.$ac_objext "* ) ;;
12941   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
12942  ;;
12943 esac
12944
12945   case " $LIBOBJS " in
12946   *" getopt_long.$ac_objext "* ) ;;
12947   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
12948  ;;
12949 esac
12950
12951 fi
12952
12953 # Win32 (really MinGW) support
12954 if test "$PORTNAME" = "win32"; then
12955   ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
12956 if test "x$ac_cv_func_gettimeofday" = xyes; then :
12957   $as_echo "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
12958
12959 else
12960   case " $LIBOBJS " in
12961   *" gettimeofday.$ac_objext "* ) ;;
12962   *) LIBOBJS="$LIBOBJS gettimeofday.$ac_objext"
12963  ;;
12964 esac
12965
12966 fi
12967
12968
12969   case " $LIBOBJS " in
12970   *" dirmod.$ac_objext "* ) ;;
12971   *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
12972  ;;
12973 esac
12974
12975   case " $LIBOBJS " in
12976   *" kill.$ac_objext "* ) ;;
12977   *) LIBOBJS="$LIBOBJS kill.$ac_objext"
12978  ;;
12979 esac
12980
12981   case " $LIBOBJS " in
12982   *" open.$ac_objext "* ) ;;
12983   *) LIBOBJS="$LIBOBJS open.$ac_objext"
12984  ;;
12985 esac
12986
12987   case " $LIBOBJS " in
12988   *" system.$ac_objext "* ) ;;
12989   *) LIBOBJS="$LIBOBJS system.$ac_objext"
12990  ;;
12991 esac
12992
12993   case " $LIBOBJS " in
12994   *" win32env.$ac_objext "* ) ;;
12995   *) LIBOBJS="$LIBOBJS win32env.$ac_objext"
12996  ;;
12997 esac
12998
12999   case " $LIBOBJS " in
13000   *" win32error.$ac_objext "* ) ;;
13001   *) LIBOBJS="$LIBOBJS win32error.$ac_objext"
13002  ;;
13003 esac
13004
13005   case " $LIBOBJS " in
13006   *" win32setlocale.$ac_objext "* ) ;;
13007   *) LIBOBJS="$LIBOBJS win32setlocale.$ac_objext"
13008  ;;
13009 esac
13010
13011
13012 $as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
13013
13014   ac_fn_c_check_type "$LINENO" "MINIDUMP_TYPE" "ac_cv_type_MINIDUMP_TYPE" "
13015 #define WIN32_LEAN_AND_MEAN
13016 #include <windows.h>
13017 #include <string.h>
13018 #include <dbghelp.h>
13019 "
13020 if test "x$ac_cv_type_MINIDUMP_TYPE" = xyes; then :
13021
13022 cat >>confdefs.h <<_ACEOF
13023 #define HAVE_MINIDUMP_TYPE 1
13024 _ACEOF
13025
13026 pgac_minidump_type=yes
13027 else
13028   pgac_minidump_type=no
13029 fi
13030
13031 fi
13032 if test x"$pgac_minidump_type" = x"yes" ; then
13033   have_win32_dbghelp=yes
13034
13035 else
13036   have_win32_dbghelp=no
13037
13038 fi
13039
13040 # Cygwin needs only a bit of that
13041 if test "$PORTNAME" = "cygwin"; then
13042   case " $LIBOBJS " in
13043   *" dirmod.$ac_objext "* ) ;;
13044   *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
13045  ;;
13046 esac
13047
13048 fi
13049
13050 ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "#include <signal.h>
13051 /* NetBSD declares sys_siglist in unistd.h.  */
13052 #ifdef HAVE_UNISTD_H
13053 # include <unistd.h>
13054 #endif
13055
13056 "
13057 if test "x$ac_cv_have_decl_sys_siglist" = xyes; then :
13058   ac_have_decl=1
13059 else
13060   ac_have_decl=0
13061 fi
13062
13063 cat >>confdefs.h <<_ACEOF
13064 #define HAVE_DECL_SYS_SIGLIST $ac_have_decl
13065 _ACEOF
13066
13067
13068 ac_fn_c_check_func "$LINENO" "syslog" "ac_cv_func_syslog"
13069 if test "x$ac_cv_func_syslog" = xyes; then :
13070   ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default"
13071 if test "x$ac_cv_header_syslog_h" = xyes; then :
13072
13073 $as_echo "#define HAVE_SYSLOG 1" >>confdefs.h
13074
13075 fi
13076
13077
13078 fi
13079
13080
13081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opterr" >&5
13082 $as_echo_n "checking for opterr... " >&6; }
13083 if ${pgac_cv_var_int_opterr+:} false; then :
13084   $as_echo_n "(cached) " >&6
13085 else
13086   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13087 /* end confdefs.h.  */
13088 #include <unistd.h>
13089 int
13090 main ()
13091 {
13092 extern int opterr; opterr = 1;
13093   ;
13094   return 0;
13095 }
13096 _ACEOF
13097 if ac_fn_c_try_link "$LINENO"; then :
13098   pgac_cv_var_int_opterr=yes
13099 else
13100   pgac_cv_var_int_opterr=no
13101 fi
13102 rm -f core conftest.err conftest.$ac_objext \
13103     conftest$ac_exeext conftest.$ac_ext
13104 fi
13105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_opterr" >&5
13106 $as_echo "$pgac_cv_var_int_opterr" >&6; }
13107 if test x"$pgac_cv_var_int_opterr" = x"yes"; then
13108
13109 $as_echo "#define HAVE_INT_OPTERR 1" >>confdefs.h
13110
13111 fi
13112
13113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for optreset" >&5
13114 $as_echo_n "checking for optreset... " >&6; }
13115 if ${pgac_cv_var_int_optreset+:} false; then :
13116   $as_echo_n "(cached) " >&6
13117 else
13118   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13119 /* end confdefs.h.  */
13120 #include <unistd.h>
13121 int
13122 main ()
13123 {
13124 extern int optreset; optreset = 1;
13125   ;
13126   return 0;
13127 }
13128 _ACEOF
13129 if ac_fn_c_try_link "$LINENO"; then :
13130   pgac_cv_var_int_optreset=yes
13131 else
13132   pgac_cv_var_int_optreset=no
13133 fi
13134 rm -f core conftest.err conftest.$ac_objext \
13135     conftest$ac_exeext conftest.$ac_ext
13136 fi
13137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_optreset" >&5
13138 $as_echo "$pgac_cv_var_int_optreset" >&6; }
13139 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
13140
13141 $as_echo "#define HAVE_INT_OPTRESET 1" >>confdefs.h
13142
13143 fi
13144
13145 for ac_func in strtoll strtoq
13146 do :
13147   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13148 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13149 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13150   cat >>confdefs.h <<_ACEOF
13151 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13152 _ACEOF
13153  break
13154 fi
13155 done
13156
13157 for ac_func in strtoull strtouq
13158 do :
13159   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13160 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13161 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13162   cat >>confdefs.h <<_ACEOF
13163 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13164 _ACEOF
13165  break
13166 fi
13167 done
13168
13169
13170 # Lastly, restore full LIBS list and check for readline/libedit symbols
13171 LIBS="$LIBS_including_readline"
13172
13173 if test "$with_readline" = yes; then
13174   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_append_character" >&5
13175 $as_echo_n "checking for rl_completion_append_character... " >&6; }
13176 if ${pgac_cv_var_rl_completion_append_character+:} false; then :
13177   $as_echo_n "(cached) " >&6
13178 else
13179   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13180 /* end confdefs.h.  */
13181 #include <stdio.h>
13182 #ifdef HAVE_READLINE_READLINE_H
13183 # include <readline/readline.h>
13184 #elif defined(HAVE_READLINE_H)
13185 # include <readline.h>
13186 #endif
13187
13188 int
13189 main ()
13190 {
13191 rl_completion_append_character = 'x';
13192   ;
13193   return 0;
13194 }
13195 _ACEOF
13196 if ac_fn_c_try_link "$LINENO"; then :
13197   pgac_cv_var_rl_completion_append_character=yes
13198 else
13199   pgac_cv_var_rl_completion_append_character=no
13200 fi
13201 rm -f core conftest.err conftest.$ac_objext \
13202     conftest$ac_exeext conftest.$ac_ext
13203 fi
13204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_completion_append_character" >&5
13205 $as_echo "$pgac_cv_var_rl_completion_append_character" >&6; }
13206 if test x"$pgac_cv_var_rl_completion_append_character" = x"yes"; then
13207
13208 $as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
13209
13210 fi
13211   for ac_func in rl_completion_matches rl_filename_completion_function
13212 do :
13213   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13214 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13215 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13216   cat >>confdefs.h <<_ACEOF
13217 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13218 _ACEOF
13219
13220 fi
13221 done
13222
13223   for ac_func in append_history history_truncate_file
13224 do :
13225   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13226 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13227 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13228   cat >>confdefs.h <<_ACEOF
13229 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13230 _ACEOF
13231
13232 fi
13233 done
13234
13235 fi
13236
13237
13238 # This test makes sure that run tests work at all.  Sometimes a shared
13239 # library is found by the linker, but the runtime linker can't find it.
13240 # This check should come after all modifications of compiler or linker
13241 # variables, and before any other run tests.
13242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking test program" >&5
13243 $as_echo_n "checking test program... " >&6; }
13244 if test "$cross_compiling" = yes; then :
13245   { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling" >&5
13246 $as_echo "cross-compiling" >&6; }
13247 else
13248   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13249 /* end confdefs.h.  */
13250 int main() { return 0; }
13251 _ACEOF
13252 if ac_fn_c_try_run "$LINENO"; then :
13253   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
13254 $as_echo "ok" >&6; }
13255 else
13256   { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
13257 $as_echo "failed" >&6; }
13258 as_fn_error $? "
13259 Could not execute a simple test program.  This may be a problem
13260 related to locating shared libraries.  Check the file 'config.log'
13261 for the exact reason." "$LINENO" 5
13262 fi
13263 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13264   conftest.$ac_objext conftest.beam conftest.$ac_ext
13265 fi
13266
13267
13268 # --------------------
13269 # Run tests below here
13270 # --------------------
13271
13272 # Force use of our snprintf if system's doesn't do arg control
13273 # See comment above at snprintf test for details.
13274 if test "$enable_nls" = yes -a "$pgac_need_repl_snprintf" = no; then
13275   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf supports argument control" >&5
13276 $as_echo_n "checking whether snprintf supports argument control... " >&6; }
13277 if ${pgac_cv_snprintf_arg_control+:} false; then :
13278   $as_echo_n "(cached) " >&6
13279 else
13280   if test "$cross_compiling" = yes; then :
13281   pgac_cv_snprintf_arg_control=cross
13282 else
13283   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13284 /* end confdefs.h.  */
13285 #include <stdio.h>
13286 #include <string.h>
13287
13288 int main()
13289 {
13290   char buf[100];
13291
13292   /* can it swap arguments? */
13293   snprintf(buf, 100, "%2\$d %1\$d", 3, 4);
13294   if (strcmp(buf, "4 3") != 0)
13295     return 1;
13296   return 0;
13297 }
13298 _ACEOF
13299 if ac_fn_c_try_run "$LINENO"; then :
13300   pgac_cv_snprintf_arg_control=yes
13301 else
13302   pgac_cv_snprintf_arg_control=no
13303 fi
13304 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13305   conftest.$ac_objext conftest.beam conftest.$ac_ext
13306 fi
13307
13308
13309 fi
13310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_arg_control" >&5
13311 $as_echo "$pgac_cv_snprintf_arg_control" >&6; }
13312
13313   if test $pgac_cv_snprintf_arg_control != yes ; then
13314     pgac_need_repl_snprintf=yes
13315   fi
13316 fi
13317
13318
13319
13320
13321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long int is 64 bits" >&5
13322 $as_echo_n "checking whether long int is 64 bits... " >&6; }
13323 if ${pgac_cv_type_long_int_64+:} false; then :
13324   $as_echo_n "(cached) " >&6
13325 else
13326   if test "$cross_compiling" = yes; then :
13327   # If cross-compiling, check the size reported by the compiler and
13328 # trust that the arithmetic works.
13329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13330 /* end confdefs.h.  */
13331
13332 int
13333 main ()
13334 {
13335 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
13336 test_array [0] = 0;
13337 return test_array [0];
13338
13339   ;
13340   return 0;
13341 }
13342 _ACEOF
13343 if ac_fn_c_try_compile "$LINENO"; then :
13344   pgac_cv_type_long_int_64=yes
13345 else
13346   pgac_cv_type_long_int_64=no
13347 fi
13348 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13349 else
13350   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13351 /* end confdefs.h.  */
13352 typedef long int ac_int64;
13353
13354 /*
13355  * These are globals to discourage the compiler from folding all the
13356  * arithmetic tests down to compile-time constants.
13357  */
13358 ac_int64 a = 20000001;
13359 ac_int64 b = 40000005;
13360
13361 int does_int64_work()
13362 {
13363   ac_int64 c,d;
13364
13365   if (sizeof(ac_int64) != 8)
13366     return 0;                   /* definitely not the right size */
13367
13368   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
13369   c = a * b;
13370   d = (c + b) / b;
13371   if (d != a+1)
13372     return 0;
13373   return 1;
13374 }
13375 main() {
13376   exit(! does_int64_work());
13377 }
13378 _ACEOF
13379 if ac_fn_c_try_run "$LINENO"; then :
13380   pgac_cv_type_long_int_64=yes
13381 else
13382   pgac_cv_type_long_int_64=no
13383 fi
13384 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13385   conftest.$ac_objext conftest.beam conftest.$ac_ext
13386 fi
13387
13388 fi
13389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_int_64" >&5
13390 $as_echo "$pgac_cv_type_long_int_64" >&6; }
13391
13392 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
13393 if test x"$pgac_cv_type_long_int_64" = xyes ; then
13394
13395 $as_echo "#define HAVE_LONG_INT_64 1" >>confdefs.h
13396
13397 fi
13398
13399
13400 if test x"$HAVE_LONG_INT_64" = x"yes" ; then
13401   pg_int64_type="long int"
13402 else
13403   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long long int is 64 bits" >&5
13404 $as_echo_n "checking whether long long int is 64 bits... " >&6; }
13405 if ${pgac_cv_type_long_long_int_64+:} false; then :
13406   $as_echo_n "(cached) " >&6
13407 else
13408   if test "$cross_compiling" = yes; then :
13409   # If cross-compiling, check the size reported by the compiler and
13410 # trust that the arithmetic works.
13411 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13412 /* end confdefs.h.  */
13413
13414 int
13415 main ()
13416 {
13417 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
13418 test_array [0] = 0;
13419 return test_array [0];
13420
13421   ;
13422   return 0;
13423 }
13424 _ACEOF
13425 if ac_fn_c_try_compile "$LINENO"; then :
13426   pgac_cv_type_long_long_int_64=yes
13427 else
13428   pgac_cv_type_long_long_int_64=no
13429 fi
13430 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13431 else
13432   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13433 /* end confdefs.h.  */
13434 typedef long long int ac_int64;
13435
13436 /*
13437  * These are globals to discourage the compiler from folding all the
13438  * arithmetic tests down to compile-time constants.
13439  */
13440 ac_int64 a = 20000001;
13441 ac_int64 b = 40000005;
13442
13443 int does_int64_work()
13444 {
13445   ac_int64 c,d;
13446
13447   if (sizeof(ac_int64) != 8)
13448     return 0;                   /* definitely not the right size */
13449
13450   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
13451   c = a * b;
13452   d = (c + b) / b;
13453   if (d != a+1)
13454     return 0;
13455   return 1;
13456 }
13457 main() {
13458   exit(! does_int64_work());
13459 }
13460 _ACEOF
13461 if ac_fn_c_try_run "$LINENO"; then :
13462   pgac_cv_type_long_long_int_64=yes
13463 else
13464   pgac_cv_type_long_long_int_64=no
13465 fi
13466 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13467   conftest.$ac_objext conftest.beam conftest.$ac_ext
13468 fi
13469
13470 fi
13471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_long_int_64" >&5
13472 $as_echo "$pgac_cv_type_long_long_int_64" >&6; }
13473
13474 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
13475 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
13476
13477 $as_echo "#define HAVE_LONG_LONG_INT_64 1" >>confdefs.h
13478
13479 fi
13480
13481   if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
13482     pg_int64_type="long long int"
13483   else
13484     as_fn_error $? "Cannot find a working 64-bit integer type." "$LINENO" 5
13485   fi
13486 fi
13487
13488
13489 cat >>confdefs.h <<_ACEOF
13490 #define PG_INT64_TYPE $pg_int64_type
13491 _ACEOF
13492
13493
13494
13495 if test x"$HAVE_LONG_LONG_INT_64" = xyes ; then
13496   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13497 /* end confdefs.h.  */
13498
13499 #define INT64CONST(x)  x##LL
13500 long long int foo = INT64CONST(0x1234567890123456);
13501
13502 _ACEOF
13503 if ac_fn_c_try_compile "$LINENO"; then :
13504
13505 $as_echo "#define HAVE_LL_CONSTANTS 1" >>confdefs.h
13506
13507 fi
13508 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13509 fi
13510
13511
13512 # If we found "long int" is 64 bits, assume snprintf handles it.  If
13513 # we found we need to use "long long int", better check.  We cope with
13514 # snprintfs that use %lld, %qd, or %I64d as the format.  If none of these
13515 # work, fall back to our own snprintf emulation (which we know uses %lld).
13516
13517 if test "$HAVE_LONG_LONG_INT_64" = yes ; then
13518   if test $pgac_need_repl_snprintf = no; then
13519     { $as_echo "$as_me:${as_lineno-$LINENO}: checking snprintf length modifier for long long int" >&5
13520 $as_echo_n "checking snprintf length modifier for long long int... " >&6; }
13521 if ${pgac_cv_snprintf_long_long_int_modifier+:} false; then :
13522   $as_echo_n "(cached) " >&6
13523 else
13524   for pgac_modifier in 'll' 'q' 'I64'; do
13525 if test "$cross_compiling" = yes; then :
13526   pgac_cv_snprintf_long_long_int_modifier=cross; break
13527 else
13528   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13529 /* end confdefs.h.  */
13530 #include <stdio.h>
13531 typedef long long int ac_int64;
13532 #define INT64_FORMAT "%${pgac_modifier}d"
13533
13534 ac_int64 a = 20000001;
13535 ac_int64 b = 40000005;
13536
13537 int does_int64_snprintf_work()
13538 {
13539   ac_int64 c;
13540   char buf[100];
13541
13542   if (sizeof(ac_int64) != 8)
13543     return 0;                   /* doesn't look like the right size */
13544
13545   c = a * b;
13546   snprintf(buf, 100, INT64_FORMAT, c);
13547   if (strcmp(buf, "800000140000005") != 0)
13548     return 0;                   /* either multiply or snprintf is busted */
13549   return 1;
13550 }
13551 main() {
13552   exit(! does_int64_snprintf_work());
13553 }
13554 _ACEOF
13555 if ac_fn_c_try_run "$LINENO"; then :
13556   pgac_cv_snprintf_long_long_int_modifier=$pgac_modifier; break
13557 fi
13558 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13559   conftest.$ac_objext conftest.beam conftest.$ac_ext
13560 fi
13561
13562 done
13563 fi
13564
13565 LONG_LONG_INT_MODIFIER=''
13566
13567 case $pgac_cv_snprintf_long_long_int_modifier in
13568   cross) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot test (not on host machine)" >&5
13569 $as_echo "cannot test (not on host machine)" >&6; };;
13570   ?*)    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_long_long_int_modifier" >&5
13571 $as_echo "$pgac_cv_snprintf_long_long_int_modifier" >&6; }
13572          LONG_LONG_INT_MODIFIER=$pgac_cv_snprintf_long_long_int_modifier;;
13573   *)     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13574 $as_echo "none" >&6; };;
13575 esac
13576     if test "$LONG_LONG_INT_MODIFIER" = ""; then
13577       # Force usage of our own snprintf, since system snprintf is broken
13578       pgac_need_repl_snprintf=yes
13579       LONG_LONG_INT_MODIFIER='ll'
13580     fi
13581   else
13582     # Here if we previously decided we needed to use our own snprintf
13583     LONG_LONG_INT_MODIFIER='ll'
13584   fi
13585 else
13586   # Here if we are not using 'long long int' at all
13587   LONG_LONG_INT_MODIFIER='l'
13588 fi
13589
13590 INT64_MODIFIER="\"$LONG_LONG_INT_MODIFIER\""
13591
13592
13593 cat >>confdefs.h <<_ACEOF
13594 #define INT64_MODIFIER $INT64_MODIFIER
13595 _ACEOF
13596
13597
13598 # Also force use of our snprintf if the system's doesn't support the %z flag.
13599 if test "$pgac_need_repl_snprintf" = no; then
13600   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf supports the %z modifier" >&5
13601 $as_echo_n "checking whether snprintf supports the %z modifier... " >&6; }
13602 if ${pgac_cv_snprintf_size_t_support+:} false; then :
13603   $as_echo_n "(cached) " >&6
13604 else
13605   if test "$cross_compiling" = yes; then :
13606   pgac_cv_snprintf_size_t_support=cross
13607 else
13608   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13609 /* end confdefs.h.  */
13610 #include <stdio.h>
13611 #include <string.h>
13612
13613 int main()
13614 {
13615   char bufz[100];
13616   char buf64[100];
13617
13618   /*
13619    * Print the largest unsigned number fitting in a size_t using both %zu
13620    * and the previously-determined format for 64-bit integers.  Note that
13621    * we don't run this code unless we know snprintf handles 64-bit ints.
13622    */
13623   bufz[0] = '\0';  /* in case snprintf fails to emit anything */
13624   snprintf(bufz, sizeof(bufz), "%zu", ~((size_t) 0));
13625   snprintf(buf64, sizeof(buf64), "%" INT64_MODIFIER "u",
13626     (unsigned PG_INT64_TYPE) ~((size_t) 0));
13627   if (strcmp(bufz, buf64) != 0)
13628     return 1;
13629   return 0;
13630 }
13631 _ACEOF
13632 if ac_fn_c_try_run "$LINENO"; then :
13633   pgac_cv_snprintf_size_t_support=yes
13634 else
13635   pgac_cv_snprintf_size_t_support=no
13636 fi
13637 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13638   conftest.$ac_objext conftest.beam conftest.$ac_ext
13639 fi
13640
13641
13642 fi
13643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_size_t_support" >&5
13644 $as_echo "$pgac_cv_snprintf_size_t_support" >&6; }
13645
13646   if test "$pgac_cv_snprintf_size_t_support" != yes; then
13647     pgac_need_repl_snprintf=yes
13648   fi
13649 fi
13650
13651 # Now we have checked all the reasons to replace snprintf
13652 if test $pgac_need_repl_snprintf = yes; then
13653
13654 $as_echo "#define USE_REPL_SNPRINTF 1" >>confdefs.h
13655
13656   case " $LIBOBJS " in
13657   *" snprintf.$ac_objext "* ) ;;
13658   *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
13659  ;;
13660 esac
13661
13662 fi
13663
13664 # Check size of void *, size_t (enables tweaks for > 32bit address space)
13665 # The cast to long int works around a bug in the HP C Compiler
13666 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13667 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13668 # This bug is HP SR number 8606223364.
13669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
13670 $as_echo_n "checking size of void *... " >&6; }
13671 if ${ac_cv_sizeof_void_p+:} false; then :
13672   $as_echo_n "(cached) " >&6
13673 else
13674   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p"        "$ac_includes_default"; then :
13675
13676 else
13677   if test "$ac_cv_type_void_p" = yes; then
13678      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13679 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13680 as_fn_error 77 "cannot compute sizeof (void *)
13681 See \`config.log' for more details" "$LINENO" 5; }
13682    else
13683      ac_cv_sizeof_void_p=0
13684    fi
13685 fi
13686
13687 fi
13688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
13689 $as_echo "$ac_cv_sizeof_void_p" >&6; }
13690
13691
13692
13693 cat >>confdefs.h <<_ACEOF
13694 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
13695 _ACEOF
13696
13697
13698 # The cast to long int works around a bug in the HP C Compiler
13699 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13700 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13701 # This bug is HP SR number 8606223364.
13702 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
13703 $as_echo_n "checking size of size_t... " >&6; }
13704 if ${ac_cv_sizeof_size_t+:} false; then :
13705   $as_echo_n "(cached) " >&6
13706 else
13707   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t"        "$ac_includes_default"; then :
13708
13709 else
13710   if test "$ac_cv_type_size_t" = yes; then
13711      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13712 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13713 as_fn_error 77 "cannot compute sizeof (size_t)
13714 See \`config.log' for more details" "$LINENO" 5; }
13715    else
13716      ac_cv_sizeof_size_t=0
13717    fi
13718 fi
13719
13720 fi
13721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
13722 $as_echo "$ac_cv_sizeof_size_t" >&6; }
13723
13724
13725
13726 cat >>confdefs.h <<_ACEOF
13727 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
13728 _ACEOF
13729
13730
13731 # The cast to long int works around a bug in the HP C Compiler
13732 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13733 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13734 # This bug is HP SR number 8606223364.
13735 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
13736 $as_echo_n "checking size of long... " >&6; }
13737 if ${ac_cv_sizeof_long+:} false; then :
13738   $as_echo_n "(cached) " >&6
13739 else
13740   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
13741
13742 else
13743   if test "$ac_cv_type_long" = yes; then
13744      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13745 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13746 as_fn_error 77 "cannot compute sizeof (long)
13747 See \`config.log' for more details" "$LINENO" 5; }
13748    else
13749      ac_cv_sizeof_long=0
13750    fi
13751 fi
13752
13753 fi
13754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
13755 $as_echo "$ac_cv_sizeof_long" >&6; }
13756
13757
13758
13759 cat >>confdefs.h <<_ACEOF
13760 #define SIZEOF_LONG $ac_cv_sizeof_long
13761 _ACEOF
13762
13763
13764
13765 # Decide whether float4 is passed by value: user-selectable, enabled by default
13766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float4 passed by value" >&5
13767 $as_echo_n "checking whether to build with float4 passed by value... " >&6; }
13768
13769
13770 # Check whether --enable-float4-byval was given.
13771 if test "${enable_float4_byval+set}" = set; then :
13772   enableval=$enable_float4_byval;
13773   case $enableval in
13774     yes)
13775
13776 $as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
13777
13778                float4passbyval=true
13779       ;;
13780     no)
13781       float4passbyval=false
13782       ;;
13783     *)
13784       as_fn_error $? "no argument expected for --enable-float4-byval option" "$LINENO" 5
13785       ;;
13786   esac
13787
13788 else
13789   enable_float4_byval=yes
13790
13791 $as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
13792
13793                float4passbyval=true
13794 fi
13795
13796
13797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float4_byval" >&5
13798 $as_echo "$enable_float4_byval" >&6; }
13799
13800 cat >>confdefs.h <<_ACEOF
13801 #define FLOAT4PASSBYVAL $float4passbyval
13802 _ACEOF
13803
13804
13805 # Decide whether float8 is passed by value.
13806 # Note: this setting also controls int8 and related types such as timestamp.
13807 # If sizeof(Datum) >= 8, this is user-selectable, enabled by default.
13808 # If not, trying to select it is an error.
13809 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float8 passed by value" >&5
13810 $as_echo_n "checking whether to build with float8 passed by value... " >&6; }
13811 if test $ac_cv_sizeof_void_p -ge 8 ; then
13812
13813
13814 # Check whether --enable-float8-byval was given.
13815 if test "${enable_float8_byval+set}" = set; then :
13816   enableval=$enable_float8_byval;
13817   case $enableval in
13818     yes)
13819       :
13820       ;;
13821     no)
13822       :
13823       ;;
13824     *)
13825       as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
13826       ;;
13827   esac
13828
13829 else
13830   enable_float8_byval=yes
13831
13832 fi
13833
13834
13835 else
13836
13837
13838 # Check whether --enable-float8-byval was given.
13839 if test "${enable_float8_byval+set}" = set; then :
13840   enableval=$enable_float8_byval;
13841   case $enableval in
13842     yes)
13843       :
13844       ;;
13845     no)
13846       :
13847       ;;
13848     *)
13849       as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
13850       ;;
13851   esac
13852
13853 else
13854   enable_float8_byval=no
13855
13856 fi
13857
13858
13859   if test "$enable_float8_byval" = yes ; then
13860     as_fn_error $? "--enable-float8-byval is not supported on 32-bit platforms." "$LINENO" 5
13861   fi
13862 fi
13863 if test "$enable_float8_byval" = yes ; then
13864
13865 $as_echo "#define USE_FLOAT8_BYVAL 1" >>confdefs.h
13866
13867   float8passbyval=true
13868 else
13869   float8passbyval=false
13870 fi
13871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float8_byval" >&5
13872 $as_echo "$enable_float8_byval" >&6; }
13873
13874 cat >>confdefs.h <<_ACEOF
13875 #define FLOAT8PASSBYVAL $float8passbyval
13876 _ACEOF
13877
13878
13879 # Determine memory alignment requirements for the basic C data types.
13880
13881 # The cast to long int works around a bug in the HP C Compiler,
13882 # see AC_CHECK_SIZEOF for more information.
13883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of short" >&5
13884 $as_echo_n "checking alignment of short... " >&6; }
13885 if ${ac_cv_alignof_short+:} false; then :
13886   $as_echo_n "(cached) " >&6
13887 else
13888   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_short"        "$ac_includes_default
13889 #ifndef offsetof
13890 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
13891 #endif
13892 typedef struct { char x; short y; } ac__type_alignof_;"; then :
13893
13894 else
13895   if test "$ac_cv_type_short" = yes; then
13896      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13897 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13898 as_fn_error 77 "cannot compute alignment of short
13899 See \`config.log' for more details" "$LINENO" 5; }
13900    else
13901      ac_cv_alignof_short=0
13902    fi
13903 fi
13904
13905 fi
13906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_short" >&5
13907 $as_echo "$ac_cv_alignof_short" >&6; }
13908
13909
13910
13911 cat >>confdefs.h <<_ACEOF
13912 #define ALIGNOF_SHORT $ac_cv_alignof_short
13913 _ACEOF
13914
13915
13916 # The cast to long int works around a bug in the HP C Compiler,
13917 # see AC_CHECK_SIZEOF for more information.
13918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of int" >&5
13919 $as_echo_n "checking alignment of int... " >&6; }
13920 if ${ac_cv_alignof_int+:} false; then :
13921   $as_echo_n "(cached) " >&6
13922 else
13923   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_int"        "$ac_includes_default
13924 #ifndef offsetof
13925 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
13926 #endif
13927 typedef struct { char x; int y; } ac__type_alignof_;"; then :
13928
13929 else
13930   if test "$ac_cv_type_int" = yes; then
13931      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13932 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13933 as_fn_error 77 "cannot compute alignment of int
13934 See \`config.log' for more details" "$LINENO" 5; }
13935    else
13936      ac_cv_alignof_int=0
13937    fi
13938 fi
13939
13940 fi
13941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_int" >&5
13942 $as_echo "$ac_cv_alignof_int" >&6; }
13943
13944
13945
13946 cat >>confdefs.h <<_ACEOF
13947 #define ALIGNOF_INT $ac_cv_alignof_int
13948 _ACEOF
13949
13950
13951 # The cast to long int works around a bug in the HP C Compiler,
13952 # see AC_CHECK_SIZEOF for more information.
13953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long" >&5
13954 $as_echo_n "checking alignment of long... " >&6; }
13955 if ${ac_cv_alignof_long+:} false; then :
13956   $as_echo_n "(cached) " >&6
13957 else
13958   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long"        "$ac_includes_default
13959 #ifndef offsetof
13960 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
13961 #endif
13962 typedef struct { char x; long y; } ac__type_alignof_;"; then :
13963
13964 else
13965   if test "$ac_cv_type_long" = yes; then
13966      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13967 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13968 as_fn_error 77 "cannot compute alignment of long
13969 See \`config.log' for more details" "$LINENO" 5; }
13970    else
13971      ac_cv_alignof_long=0
13972    fi
13973 fi
13974
13975 fi
13976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long" >&5
13977 $as_echo "$ac_cv_alignof_long" >&6; }
13978
13979
13980
13981 cat >>confdefs.h <<_ACEOF
13982 #define ALIGNOF_LONG $ac_cv_alignof_long
13983 _ACEOF
13984
13985
13986 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
13987   # The cast to long int works around a bug in the HP C Compiler,
13988 # see AC_CHECK_SIZEOF for more information.
13989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long long int" >&5
13990 $as_echo_n "checking alignment of long long int... " >&6; }
13991 if ${ac_cv_alignof_long_long_int+:} false; then :
13992   $as_echo_n "(cached) " >&6
13993 else
13994   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long_long_int"        "$ac_includes_default
13995 #ifndef offsetof
13996 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
13997 #endif
13998 typedef struct { char x; long long int y; } ac__type_alignof_;"; then :
13999
14000 else
14001   if test "$ac_cv_type_long_long_int" = yes; then
14002      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14003 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14004 as_fn_error 77 "cannot compute alignment of long long int
14005 See \`config.log' for more details" "$LINENO" 5; }
14006    else
14007      ac_cv_alignof_long_long_int=0
14008    fi
14009 fi
14010
14011 fi
14012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long_long_int" >&5
14013 $as_echo "$ac_cv_alignof_long_long_int" >&6; }
14014
14015
14016
14017 cat >>confdefs.h <<_ACEOF
14018 #define ALIGNOF_LONG_LONG_INT $ac_cv_alignof_long_long_int
14019 _ACEOF
14020
14021
14022 fi
14023 # The cast to long int works around a bug in the HP C Compiler,
14024 # see AC_CHECK_SIZEOF for more information.
14025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of double" >&5
14026 $as_echo_n "checking alignment of double... " >&6; }
14027 if ${ac_cv_alignof_double+:} false; then :
14028   $as_echo_n "(cached) " >&6
14029 else
14030   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_double"        "$ac_includes_default
14031 #ifndef offsetof
14032 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
14033 #endif
14034 typedef struct { char x; double y; } ac__type_alignof_;"; then :
14035
14036 else
14037   if test "$ac_cv_type_double" = yes; then
14038      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14039 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14040 as_fn_error 77 "cannot compute alignment of double
14041 See \`config.log' for more details" "$LINENO" 5; }
14042    else
14043      ac_cv_alignof_double=0
14044    fi
14045 fi
14046
14047 fi
14048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_double" >&5
14049 $as_echo "$ac_cv_alignof_double" >&6; }
14050
14051
14052
14053 cat >>confdefs.h <<_ACEOF
14054 #define ALIGNOF_DOUBLE $ac_cv_alignof_double
14055 _ACEOF
14056
14057
14058
14059 # Compute maximum alignment of any basic type.
14060 # We assume long's alignment is at least as strong as char, short, or int;
14061 # but we must check long long (if it exists) and double.
14062
14063 MAX_ALIGNOF=$ac_cv_alignof_long
14064 if test $MAX_ALIGNOF -lt $ac_cv_alignof_double ; then
14065   MAX_ALIGNOF=$ac_cv_alignof_double
14066 fi
14067 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $ac_cv_alignof_long_long_int ; then
14068   MAX_ALIGNOF="$ac_cv_alignof_long_long_int"
14069 fi
14070
14071 cat >>confdefs.h <<_ACEOF
14072 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
14073 _ACEOF
14074
14075
14076
14077 # Some platforms predefine the types int8, int16, etc.  Only check
14078 # a (hopefully) representative subset.
14079 ac_fn_c_check_type "$LINENO" "int8" "ac_cv_type_int8" "#include <stdio.h>
14080 "
14081 if test "x$ac_cv_type_int8" = xyes; then :
14082
14083 cat >>confdefs.h <<_ACEOF
14084 #define HAVE_INT8 1
14085 _ACEOF
14086
14087
14088 fi
14089 ac_fn_c_check_type "$LINENO" "uint8" "ac_cv_type_uint8" "#include <stdio.h>
14090 "
14091 if test "x$ac_cv_type_uint8" = xyes; then :
14092
14093 cat >>confdefs.h <<_ACEOF
14094 #define HAVE_UINT8 1
14095 _ACEOF
14096
14097
14098 fi
14099 ac_fn_c_check_type "$LINENO" "int64" "ac_cv_type_int64" "#include <stdio.h>
14100 "
14101 if test "x$ac_cv_type_int64" = xyes; then :
14102
14103 cat >>confdefs.h <<_ACEOF
14104 #define HAVE_INT64 1
14105 _ACEOF
14106
14107
14108 fi
14109 ac_fn_c_check_type "$LINENO" "uint64" "ac_cv_type_uint64" "#include <stdio.h>
14110 "
14111 if test "x$ac_cv_type_uint64" = xyes; then :
14112
14113 cat >>confdefs.h <<_ACEOF
14114 #define HAVE_UINT64 1
14115 _ACEOF
14116
14117
14118 fi
14119
14120
14121 # Check for extensions offering the integer scalar type __int128.
14122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128" >&5
14123 $as_echo_n "checking for __int128... " >&6; }
14124 if ${pgac_cv__128bit_int+:} false; then :
14125   $as_echo_n "(cached) " >&6
14126 else
14127   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14128 /* end confdefs.h.  */
14129
14130 /*
14131  * These are globals to discourage the compiler from folding all the
14132  * arithmetic tests down to compile-time constants.  We do not have
14133  * convenient support for 64bit literals at this point...
14134  */
14135 __int128 a = 48828125;
14136 __int128 b = 97656255;
14137
14138 int
14139 main ()
14140 {
14141
14142 __int128 c,d;
14143 a = (a << 12) + 1; /* 200000000001 */
14144 b = (b << 12) + 5; /* 400000000005 */
14145 /* use the most relevant arithmetic ops */
14146 c = a * b;
14147 d = (c + b) / b;
14148 /* return different values, to prevent optimizations */
14149 if (d != a+1)
14150   return 0;
14151 return 1;
14152
14153   ;
14154   return 0;
14155 }
14156 _ACEOF
14157 if ac_fn_c_try_link "$LINENO"; then :
14158   pgac_cv__128bit_int=yes
14159 else
14160   pgac_cv__128bit_int=no
14161 fi
14162 rm -f core conftest.err conftest.$ac_objext \
14163     conftest$ac_exeext conftest.$ac_ext
14164 fi
14165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int" >&5
14166 $as_echo "$pgac_cv__128bit_int" >&6; }
14167 if test x"$pgac_cv__128bit_int" = xyes ; then
14168
14169 $as_echo "#define PG_INT128_TYPE __int128" >>confdefs.h
14170
14171 fi
14172
14173 # Check for various atomic operations now that we have checked how to declare
14174 # 64bit integers.
14175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync char locking functions" >&5
14176 $as_echo_n "checking for builtin __sync char locking functions... " >&6; }
14177 if ${pgac_cv_gcc_sync_char_tas+:} false; then :
14178   $as_echo_n "(cached) " >&6
14179 else
14180   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14181 /* end confdefs.h.  */
14182
14183 int
14184 main ()
14185 {
14186 char lock = 0;
14187    __sync_lock_test_and_set(&lock, 1);
14188    __sync_lock_release(&lock);
14189   ;
14190   return 0;
14191 }
14192 _ACEOF
14193 if ac_fn_c_try_link "$LINENO"; then :
14194   pgac_cv_gcc_sync_char_tas="yes"
14195 else
14196   pgac_cv_gcc_sync_char_tas="no"
14197 fi
14198 rm -f core conftest.err conftest.$ac_objext \
14199     conftest$ac_exeext conftest.$ac_ext
14200 fi
14201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_char_tas" >&5
14202 $as_echo "$pgac_cv_gcc_sync_char_tas" >&6; }
14203 if test x"$pgac_cv_gcc_sync_char_tas" = x"yes"; then
14204
14205 $as_echo "#define HAVE_GCC__SYNC_CHAR_TAS 1" >>confdefs.h
14206
14207 fi
14208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 locking functions" >&5
14209 $as_echo_n "checking for builtin __sync int32 locking functions... " >&6; }
14210 if ${pgac_cv_gcc_sync_int32_tas+:} false; then :
14211   $as_echo_n "(cached) " >&6
14212 else
14213   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14214 /* end confdefs.h.  */
14215
14216 int
14217 main ()
14218 {
14219 int lock = 0;
14220    __sync_lock_test_and_set(&lock, 1);
14221    __sync_lock_release(&lock);
14222   ;
14223   return 0;
14224 }
14225 _ACEOF
14226 if ac_fn_c_try_link "$LINENO"; then :
14227   pgac_cv_gcc_sync_int32_tas="yes"
14228 else
14229   pgac_cv_gcc_sync_int32_tas="no"
14230 fi
14231 rm -f core conftest.err conftest.$ac_objext \
14232     conftest$ac_exeext conftest.$ac_ext
14233 fi
14234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_tas" >&5
14235 $as_echo "$pgac_cv_gcc_sync_int32_tas" >&6; }
14236 if test x"$pgac_cv_gcc_sync_int32_tas" = x"yes"; then
14237
14238 $as_echo "#define HAVE_GCC__SYNC_INT32_TAS 1" >>confdefs.h
14239
14240 fi
14241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 atomic operations" >&5
14242 $as_echo_n "checking for builtin __sync int32 atomic operations... " >&6; }
14243 if ${pgac_cv_gcc_sync_int32_cas+:} false; then :
14244   $as_echo_n "(cached) " >&6
14245 else
14246   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14247 /* end confdefs.h.  */
14248
14249 int
14250 main ()
14251 {
14252 int val = 0;
14253    __sync_val_compare_and_swap(&val, 0, 37);
14254   ;
14255   return 0;
14256 }
14257 _ACEOF
14258 if ac_fn_c_try_link "$LINENO"; then :
14259   pgac_cv_gcc_sync_int32_cas="yes"
14260 else
14261   pgac_cv_gcc_sync_int32_cas="no"
14262 fi
14263 rm -f core conftest.err conftest.$ac_objext \
14264     conftest$ac_exeext conftest.$ac_ext
14265 fi
14266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_cas" >&5
14267 $as_echo "$pgac_cv_gcc_sync_int32_cas" >&6; }
14268 if test x"$pgac_cv_gcc_sync_int32_cas" = x"yes"; then
14269
14270 $as_echo "#define HAVE_GCC__SYNC_INT32_CAS 1" >>confdefs.h
14271
14272 fi
14273 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int64 atomic operations" >&5
14274 $as_echo_n "checking for builtin __sync int64 atomic operations... " >&6; }
14275 if ${pgac_cv_gcc_sync_int64_cas+:} false; then :
14276   $as_echo_n "(cached) " >&6
14277 else
14278   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14279 /* end confdefs.h.  */
14280
14281 int
14282 main ()
14283 {
14284 PG_INT64_TYPE lock = 0;
14285    __sync_val_compare_and_swap(&lock, 0, (PG_INT64_TYPE) 37);
14286   ;
14287   return 0;
14288 }
14289 _ACEOF
14290 if ac_fn_c_try_link "$LINENO"; then :
14291   pgac_cv_gcc_sync_int64_cas="yes"
14292 else
14293   pgac_cv_gcc_sync_int64_cas="no"
14294 fi
14295 rm -f core conftest.err conftest.$ac_objext \
14296     conftest$ac_exeext conftest.$ac_ext
14297 fi
14298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int64_cas" >&5
14299 $as_echo "$pgac_cv_gcc_sync_int64_cas" >&6; }
14300 if test x"$pgac_cv_gcc_sync_int64_cas" = x"yes"; then
14301
14302 $as_echo "#define HAVE_GCC__SYNC_INT64_CAS 1" >>confdefs.h
14303
14304 fi
14305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int32 atomic operations" >&5
14306 $as_echo_n "checking for builtin __atomic int32 atomic operations... " >&6; }
14307 if ${pgac_cv_gcc_atomic_int32_cas+:} false; then :
14308   $as_echo_n "(cached) " >&6
14309 else
14310   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14311 /* end confdefs.h.  */
14312
14313 int
14314 main ()
14315 {
14316 int val = 0;
14317    int expect = 0;
14318    __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
14319   ;
14320   return 0;
14321 }
14322 _ACEOF
14323 if ac_fn_c_try_link "$LINENO"; then :
14324   pgac_cv_gcc_atomic_int32_cas="yes"
14325 else
14326   pgac_cv_gcc_atomic_int32_cas="no"
14327 fi
14328 rm -f core conftest.err conftest.$ac_objext \
14329     conftest$ac_exeext conftest.$ac_ext
14330 fi
14331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int32_cas" >&5
14332 $as_echo "$pgac_cv_gcc_atomic_int32_cas" >&6; }
14333 if test x"$pgac_cv_gcc_atomic_int32_cas" = x"yes"; then
14334
14335 $as_echo "#define HAVE_GCC__ATOMIC_INT32_CAS 1" >>confdefs.h
14336
14337 fi
14338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int64 atomic operations" >&5
14339 $as_echo_n "checking for builtin __atomic int64 atomic operations... " >&6; }
14340 if ${pgac_cv_gcc_atomic_int64_cas+:} false; then :
14341   $as_echo_n "(cached) " >&6
14342 else
14343   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14344 /* end confdefs.h.  */
14345
14346 int
14347 main ()
14348 {
14349 PG_INT64_TYPE val = 0;
14350    PG_INT64_TYPE expect = 0;
14351    __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
14352   ;
14353   return 0;
14354 }
14355 _ACEOF
14356 if ac_fn_c_try_link "$LINENO"; then :
14357   pgac_cv_gcc_atomic_int64_cas="yes"
14358 else
14359   pgac_cv_gcc_atomic_int64_cas="no"
14360 fi
14361 rm -f core conftest.err conftest.$ac_objext \
14362     conftest$ac_exeext conftest.$ac_ext
14363 fi
14364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int64_cas" >&5
14365 $as_echo "$pgac_cv_gcc_atomic_int64_cas" >&6; }
14366 if test x"$pgac_cv_gcc_atomic_int64_cas" = x"yes"; then
14367
14368 $as_echo "#define HAVE_GCC__ATOMIC_INT64_CAS 1" >>confdefs.h
14369
14370 fi
14371
14372
14373 # Check for x86 cpuid instruction
14374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __get_cpuid" >&5
14375 $as_echo_n "checking for __get_cpuid... " >&6; }
14376 if ${pgac_cv__get_cpuid+:} false; then :
14377   $as_echo_n "(cached) " >&6
14378 else
14379   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14380 /* end confdefs.h.  */
14381 #include <cpuid.h>
14382 int
14383 main ()
14384 {
14385 unsigned int exx[4] = {0, 0, 0, 0};
14386   __get_cpuid(1, &exx[0], &exx[1], &exx[2], &exx[3]);
14387
14388   ;
14389   return 0;
14390 }
14391 _ACEOF
14392 if ac_fn_c_try_link "$LINENO"; then :
14393   pgac_cv__get_cpuid="yes"
14394 else
14395   pgac_cv__get_cpuid="no"
14396 fi
14397 rm -f core conftest.err conftest.$ac_objext \
14398     conftest$ac_exeext conftest.$ac_ext
14399 fi
14400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__get_cpuid" >&5
14401 $as_echo "$pgac_cv__get_cpuid" >&6; }
14402 if test x"$pgac_cv__get_cpuid" = x"yes"; then
14403
14404 $as_echo "#define HAVE__GET_CPUID 1" >>confdefs.h
14405
14406 fi
14407
14408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __cpuid" >&5
14409 $as_echo_n "checking for __cpuid... " >&6; }
14410 if ${pgac_cv__cpuid+:} false; then :
14411   $as_echo_n "(cached) " >&6
14412 else
14413   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14414 /* end confdefs.h.  */
14415 #include <intrin.h>
14416 int
14417 main ()
14418 {
14419 unsigned int exx[4] = {0, 0, 0, 0};
14420   __get_cpuid(exx[0], 1);
14421
14422   ;
14423   return 0;
14424 }
14425 _ACEOF
14426 if ac_fn_c_try_link "$LINENO"; then :
14427   pgac_cv__cpuid="yes"
14428 else
14429   pgac_cv__cpuid="no"
14430 fi
14431 rm -f core conftest.err conftest.$ac_objext \
14432     conftest$ac_exeext conftest.$ac_ext
14433 fi
14434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__cpuid" >&5
14435 $as_echo "$pgac_cv__cpuid" >&6; }
14436 if test x"$pgac_cv__cpuid" = x"yes"; then
14437
14438 $as_echo "#define HAVE__CPUID 1" >>confdefs.h
14439
14440 fi
14441
14442 # Check for Intel SSE 4.2 intrinsics to do CRC calculations.
14443 #
14444 # First check if the _mm_crc32_u8 and _mm_crc32_u64 intrinsics can be used
14445 # with the default compiler flags. If not, check if adding the -msse4.2
14446 # flag helps. CFLAGS_SSE42 is set to -msse4.2 if that's required.
14447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=" >&5
14448 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=... " >&6; }
14449 if ${pgac_cv_sse42_crc32_intrinsics_+:} false; then :
14450   $as_echo_n "(cached) " >&6
14451 else
14452   pgac_save_CFLAGS=$CFLAGS
14453 CFLAGS="$pgac_save_CFLAGS "
14454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14455 /* end confdefs.h.  */
14456 #include <nmmintrin.h>
14457 int
14458 main ()
14459 {
14460 unsigned int crc = 0;
14461    crc = _mm_crc32_u8(crc, 0);
14462    crc = _mm_crc32_u32(crc, 0);
14463    /* return computed value, to prevent the above being optimized away */
14464    return crc == 0;
14465   ;
14466   return 0;
14467 }
14468 _ACEOF
14469 if ac_fn_c_try_link "$LINENO"; then :
14470   pgac_cv_sse42_crc32_intrinsics_=yes
14471 else
14472   pgac_cv_sse42_crc32_intrinsics_=no
14473 fi
14474 rm -f core conftest.err conftest.$ac_objext \
14475     conftest$ac_exeext conftest.$ac_ext
14476 CFLAGS="$pgac_save_CFLAGS"
14477 fi
14478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics_" >&5
14479 $as_echo "$pgac_cv_sse42_crc32_intrinsics_" >&6; }
14480 if test x"$pgac_cv_sse42_crc32_intrinsics_" = x"yes"; then
14481   CFLAGS_SSE42=""
14482   pgac_sse42_crc32_intrinsics=yes
14483 fi
14484
14485 if test x"$pgac_sse42_crc32_intrinsics" != x"yes"; then
14486   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2" >&5
14487 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2... " >&6; }
14488 if ${pgac_cv_sse42_crc32_intrinsics__msse4_2+:} false; then :
14489   $as_echo_n "(cached) " >&6
14490 else
14491   pgac_save_CFLAGS=$CFLAGS
14492 CFLAGS="$pgac_save_CFLAGS -msse4.2"
14493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14494 /* end confdefs.h.  */
14495 #include <nmmintrin.h>
14496 int
14497 main ()
14498 {
14499 unsigned int crc = 0;
14500    crc = _mm_crc32_u8(crc, 0);
14501    crc = _mm_crc32_u32(crc, 0);
14502    /* return computed value, to prevent the above being optimized away */
14503    return crc == 0;
14504   ;
14505   return 0;
14506 }
14507 _ACEOF
14508 if ac_fn_c_try_link "$LINENO"; then :
14509   pgac_cv_sse42_crc32_intrinsics__msse4_2=yes
14510 else
14511   pgac_cv_sse42_crc32_intrinsics__msse4_2=no
14512 fi
14513 rm -f core conftest.err conftest.$ac_objext \
14514     conftest$ac_exeext conftest.$ac_ext
14515 CFLAGS="$pgac_save_CFLAGS"
14516 fi
14517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics__msse4_2" >&5
14518 $as_echo "$pgac_cv_sse42_crc32_intrinsics__msse4_2" >&6; }
14519 if test x"$pgac_cv_sse42_crc32_intrinsics__msse4_2" = x"yes"; then
14520   CFLAGS_SSE42="-msse4.2"
14521   pgac_sse42_crc32_intrinsics=yes
14522 fi
14523
14524 fi
14525
14526
14527 # Are we targeting a processor that supports SSE 4.2? gcc, clang and icc all
14528 # define __SSE4_2__ in that case.
14529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14530 /* end confdefs.h.  */
14531
14532 int
14533 main ()
14534 {
14535
14536 #ifndef __SSE4_2__
14537 #error __SSE4_2__ not defined
14538 #endif
14539
14540   ;
14541   return 0;
14542 }
14543 _ACEOF
14544 if ac_fn_c_try_compile "$LINENO"; then :
14545   SSE4_2_TARGETED=1
14546 fi
14547 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14548
14549 # Select CRC-32C implementation.
14550 #
14551 # If we are targeting a processor that has SSE 4.2 instructions, we can use the
14552 # special CRC instructions for calculating CRC-32C. If we're not targeting such
14553 # a processor, but we can nevertheless produce code that uses the SSE
14554 # intrinsics, perhaps with some extra CFLAGS, compile both implementations and
14555 # select which one to use at runtime, depending on whether SSE 4.2 is supported
14556 # by the processor we're running on.
14557 #
14558 # You can override this logic by setting the appropriate USE_*_CRC32 flag to 1
14559 # in the template or configure command line.
14560 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
14561   if test x"$pgac_sse42_crc32_intrinsics" = x"yes" && test x"$SSE4_2_TARGETED" = x"1" ; then
14562     USE_SSE42_CRC32C=1
14563   else
14564     # the CPUID instruction is needed for the runtime check.
14565     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
14566       USE_SSE42_CRC32C_WITH_RUNTIME_CHECK=1
14567     else
14568       # fall back to slicing-by-8 algorithm which doesn't require any special
14569       # CPU support.
14570       USE_SLICING_BY_8_CRC32C=1
14571     fi
14572   fi
14573 fi
14574
14575 # Set PG_CRC32C_OBJS appropriately depending on the selected implementation.
14576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which CRC-32C implementation to use" >&5
14577 $as_echo_n "checking which CRC-32C implementation to use... " >&6; }
14578 if test x"$USE_SSE42_CRC32C" = x"1"; then
14579
14580 $as_echo "#define USE_SSE42_CRC32C 1" >>confdefs.h
14581
14582   PG_CRC32C_OBJS="pg_crc32c_sse42.o"
14583   { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2" >&5
14584 $as_echo "SSE 4.2" >&6; }
14585 else
14586   if test x"$USE_SSE42_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
14587
14588 $as_echo "#define USE_SSE42_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
14589
14590     PG_CRC32C_OBJS="pg_crc32c_sse42.o pg_crc32c_sb8.o pg_crc32c_choose.o"
14591     { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2 with runtime check" >&5
14592 $as_echo "SSE 4.2 with runtime check" >&6; }
14593   else
14594
14595 $as_echo "#define USE_SLICING_BY_8_CRC32C 1" >>confdefs.h
14596
14597     PG_CRC32C_OBJS="pg_crc32c_sb8.o"
14598     { $as_echo "$as_me:${as_lineno-$LINENO}: result: slicing-by-8" >&5
14599 $as_echo "slicing-by-8" >&6; }
14600   fi
14601 fi
14602
14603
14604
14605 # Select semaphore implementation type.
14606 if test "$PORTNAME" != "win32"; then
14607   if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
14608
14609 $as_echo "#define USE_NAMED_POSIX_SEMAPHORES 1" >>confdefs.h
14610
14611     SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
14612   else
14613     if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
14614
14615 $as_echo "#define USE_UNNAMED_POSIX_SEMAPHORES 1" >>confdefs.h
14616
14617       SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
14618     else
14619
14620 $as_echo "#define USE_SYSV_SEMAPHORES 1" >>confdefs.h
14621
14622       SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
14623     fi
14624   fi
14625 else
14626
14627 $as_echo "#define USE_WIN32_SEMAPHORES 1" >>confdefs.h
14628
14629   SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
14630 fi
14631
14632
14633 # Select shared-memory implementation type.
14634 if test "$PORTNAME" != "win32"; then
14635
14636 $as_echo "#define USE_SYSV_SHARED_MEMORY 1" >>confdefs.h
14637
14638   SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
14639 else
14640
14641 $as_echo "#define USE_WIN32_SHARED_MEMORY 1" >>confdefs.h
14642
14643   SHMEM_IMPLEMENTATION="src/backend/port/win32_shmem.c"
14644 fi
14645
14646 # Select latch implementation type.
14647 if test "$PORTNAME" != "win32"; then
14648   LATCH_IMPLEMENTATION="src/backend/port/unix_latch.c"
14649 else
14650   LATCH_IMPLEMENTATION="src/backend/port/win32_latch.c"
14651 fi
14652
14653 # If not set in template file, set bytes to use libc memset()
14654 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
14655   MEMSET_LOOP_LIMIT=1024
14656 fi
14657
14658 cat >>confdefs.h <<_ACEOF
14659 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
14660 _ACEOF
14661
14662
14663
14664 if test "$enable_nls" = yes ; then
14665
14666   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bind_textdomain_codeset" >&5
14667 $as_echo_n "checking for library containing bind_textdomain_codeset... " >&6; }
14668 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
14669   $as_echo_n "(cached) " >&6
14670 else
14671   ac_func_search_save_LIBS=$LIBS
14672 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14673 /* end confdefs.h.  */
14674
14675 /* Override any GCC internal prototype to avoid an error.
14676    Use char because int might match the return type of a GCC
14677    builtin and then its argument prototype would still apply.  */
14678 #ifdef __cplusplus
14679 extern "C"
14680 #endif
14681 char bind_textdomain_codeset ();
14682 int
14683 main ()
14684 {
14685 return bind_textdomain_codeset ();
14686   ;
14687   return 0;
14688 }
14689 _ACEOF
14690 for ac_lib in '' intl; do
14691   if test -z "$ac_lib"; then
14692     ac_res="none required"
14693   else
14694     ac_res=-l$ac_lib
14695     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
14696   fi
14697   if ac_fn_c_try_link "$LINENO"; then :
14698   ac_cv_search_bind_textdomain_codeset=$ac_res
14699 fi
14700 rm -f core conftest.err conftest.$ac_objext \
14701     conftest$ac_exeext
14702   if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
14703   break
14704 fi
14705 done
14706 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
14707
14708 else
14709   ac_cv_search_bind_textdomain_codeset=no
14710 fi
14711 rm conftest.$ac_ext
14712 LIBS=$ac_func_search_save_LIBS
14713 fi
14714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bind_textdomain_codeset" >&5
14715 $as_echo "$ac_cv_search_bind_textdomain_codeset" >&6; }
14716 ac_res=$ac_cv_search_bind_textdomain_codeset
14717 if test "$ac_res" != no; then :
14718   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14719
14720 else
14721   as_fn_error $? "a gettext implementation is required for NLS" "$LINENO" 5
14722 fi
14723
14724   ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
14725 if test "x$ac_cv_header_libintl_h" = xyes; then :
14726
14727 else
14728   as_fn_error $? "header file <libintl.h> is required for NLS" "$LINENO" 5
14729 fi
14730
14731
14732   for ac_prog in msgfmt
14733 do
14734   # Extract the first word of "$ac_prog", so it can be a program name with args.
14735 set dummy $ac_prog; ac_word=$2
14736 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14737 $as_echo_n "checking for $ac_word... " >&6; }
14738 if ${ac_cv_prog_MSGFMT+:} false; then :
14739   $as_echo_n "(cached) " >&6
14740 else
14741   if test -n "$MSGFMT"; then
14742   ac_cv_prog_MSGFMT="$MSGFMT" # Let the user override the test.
14743 else
14744 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14745 for as_dir in $PATH
14746 do
14747   IFS=$as_save_IFS
14748   test -z "$as_dir" && as_dir=.
14749     for ac_exec_ext in '' $ac_executable_extensions; do
14750   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14751     ac_cv_prog_MSGFMT="$ac_prog"
14752     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14753     break 2
14754   fi
14755 done
14756   done
14757 IFS=$as_save_IFS
14758
14759 fi
14760 fi
14761 MSGFMT=$ac_cv_prog_MSGFMT
14762 if test -n "$MSGFMT"; then
14763   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
14764 $as_echo "$MSGFMT" >&6; }
14765 else
14766   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14767 $as_echo "no" >&6; }
14768 fi
14769
14770
14771   test -n "$MSGFMT" && break
14772 done
14773
14774   if test -z "$MSGFMT"; then
14775     as_fn_error $? "msgfmt is required for NLS" "$LINENO" 5
14776   fi
14777   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msgfmt flags" >&5
14778 $as_echo_n "checking for msgfmt flags... " >&6; }
14779 if ${pgac_cv_msgfmt_flags+:} false; then :
14780   $as_echo_n "(cached) " >&6
14781 else
14782   if test x"$MSGFMT" != x"" && "$MSGFMT" --version 2>&1 | grep "GNU" >/dev/null; then
14783     pgac_cv_msgfmt_flags=-c
14784 fi
14785 fi
14786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_msgfmt_flags" >&5
14787 $as_echo "$pgac_cv_msgfmt_flags" >&6; }
14788   MSGFMT_FLAGS=$pgac_cv_msgfmt_flags
14789
14790   for ac_prog in msgmerge
14791 do
14792   # Extract the first word of "$ac_prog", so it can be a program name with args.
14793 set dummy $ac_prog; ac_word=$2
14794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14795 $as_echo_n "checking for $ac_word... " >&6; }
14796 if ${ac_cv_prog_MSGMERGE+:} false; then :
14797   $as_echo_n "(cached) " >&6
14798 else
14799   if test -n "$MSGMERGE"; then
14800   ac_cv_prog_MSGMERGE="$MSGMERGE" # Let the user override the test.
14801 else
14802 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14803 for as_dir in $PATH
14804 do
14805   IFS=$as_save_IFS
14806   test -z "$as_dir" && as_dir=.
14807     for ac_exec_ext in '' $ac_executable_extensions; do
14808   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14809     ac_cv_prog_MSGMERGE="$ac_prog"
14810     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14811     break 2
14812   fi
14813 done
14814   done
14815 IFS=$as_save_IFS
14816
14817 fi
14818 fi
14819 MSGMERGE=$ac_cv_prog_MSGMERGE
14820 if test -n "$MSGMERGE"; then
14821   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
14822 $as_echo "$MSGMERGE" >&6; }
14823 else
14824   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14825 $as_echo "no" >&6; }
14826 fi
14827
14828
14829   test -n "$MSGMERGE" && break
14830 done
14831
14832   for ac_prog in xgettext
14833 do
14834   # Extract the first word of "$ac_prog", so it can be a program name with args.
14835 set dummy $ac_prog; ac_word=$2
14836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14837 $as_echo_n "checking for $ac_word... " >&6; }
14838 if ${ac_cv_prog_XGETTEXT+:} false; then :
14839   $as_echo_n "(cached) " >&6
14840 else
14841   if test -n "$XGETTEXT"; then
14842   ac_cv_prog_XGETTEXT="$XGETTEXT" # Let the user override the test.
14843 else
14844 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14845 for as_dir in $PATH
14846 do
14847   IFS=$as_save_IFS
14848   test -z "$as_dir" && as_dir=.
14849     for ac_exec_ext in '' $ac_executable_extensions; do
14850   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14851     ac_cv_prog_XGETTEXT="$ac_prog"
14852     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14853     break 2
14854   fi
14855 done
14856   done
14857 IFS=$as_save_IFS
14858
14859 fi
14860 fi
14861 XGETTEXT=$ac_cv_prog_XGETTEXT
14862 if test -n "$XGETTEXT"; then
14863   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
14864 $as_echo "$XGETTEXT" >&6; }
14865 else
14866   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14867 $as_echo "no" >&6; }
14868 fi
14869
14870
14871   test -n "$XGETTEXT" && break
14872 done
14873
14874
14875 fi
14876
14877 # Check for Tcl configuration script tclConfig.sh
14878 if test "$with_tcl" = yes; then
14879     for ac_prog in tclsh tcl tclsh8.6 tclsh86 tclsh8.5 tclsh85 tclsh8.4 tclsh84 tclsh8.3 tclsh83
14880 do
14881   # Extract the first word of "$ac_prog", so it can be a program name with args.
14882 set dummy $ac_prog; ac_word=$2
14883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14884 $as_echo_n "checking for $ac_word... " >&6; }
14885 if ${ac_cv_path_TCLSH+:} false; then :
14886   $as_echo_n "(cached) " >&6
14887 else
14888   case $TCLSH in
14889   [\\/]* | ?:[\\/]*)
14890   ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
14891   ;;
14892   *)
14893   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14894 for as_dir in $PATH
14895 do
14896   IFS=$as_save_IFS
14897   test -z "$as_dir" && as_dir=.
14898     for ac_exec_ext in '' $ac_executable_extensions; do
14899   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14900     ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
14901     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14902     break 2
14903   fi
14904 done
14905   done
14906 IFS=$as_save_IFS
14907
14908   ;;
14909 esac
14910 fi
14911 TCLSH=$ac_cv_path_TCLSH
14912 if test -n "$TCLSH"; then
14913   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
14914 $as_echo "$TCLSH" >&6; }
14915 else
14916   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14917 $as_echo "no" >&6; }
14918 fi
14919
14920
14921   test -n "$TCLSH" && break
14922 done
14923
14924 if test x"$TCLSH" = x""; then
14925   as_fn_error $? "Tcl shell not found" "$LINENO" 5
14926 fi
14927
14928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclConfig.sh" >&5
14929 $as_echo_n "checking for tclConfig.sh... " >&6; }
14930 # Let user override test
14931 if test -z "$TCL_CONFIG_SH"; then
14932     pgac_test_dirs="$with_tclconfig"
14933
14934     set X $pgac_test_dirs; shift
14935     if test $# -eq 0; then
14936         test -z "$TCLSH" && as_fn_error $? "unable to locate tclConfig.sh because no Tcl shell was found" "$LINENO" 5
14937         set X `echo 'puts $auto_path' | $TCLSH`; shift
14938     fi
14939
14940     for pgac_dir do
14941         if test -r "$pgac_dir/tclConfig.sh"; then
14942             TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
14943             break
14944         fi
14945     done
14946 fi
14947
14948 if test -z "$TCL_CONFIG_SH"; then
14949     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14950 $as_echo "no" >&6; }
14951     as_fn_error $? "file 'tclConfig.sh' is required for Tcl" "$LINENO" 5
14952 else
14953     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCL_CONFIG_SH" >&5
14954 $as_echo "$TCL_CONFIG_SH" >&6; }
14955 fi
14956
14957
14958
14959     . "$TCL_CONFIG_SH"
14960 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
14961 eval TCL_LIBS=\"$TCL_LIBS\"
14962 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
14963 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
14964
14965         if test "$TCL_SHARED_BUILD" != 1; then
14966       as_fn_error $? "cannot build PL/Tcl because Tcl is not a shared library
14967 Use --without-tcl to disable building PL/Tcl." "$LINENO" 5
14968     fi
14969     # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
14970     ac_save_CPPFLAGS=$CPPFLAGS
14971     CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
14972     ac_fn_c_check_header_mongrel "$LINENO" "tcl.h" "ac_cv_header_tcl_h" "$ac_includes_default"
14973 if test "x$ac_cv_header_tcl_h" = xyes; then :
14974
14975 else
14976   as_fn_error $? "header file <tcl.h> is required for Tcl" "$LINENO" 5
14977 fi
14978
14979
14980     CPPFLAGS=$ac_save_CPPFLAGS
14981 fi
14982
14983 # check for <perl.h>
14984 if test "$with_perl" = yes; then
14985   ac_save_CPPFLAGS=$CPPFLAGS
14986   CPPFLAGS="$CPPFLAGS -I$perl_archlibexp/CORE"
14987   ac_fn_c_check_header_compile "$LINENO" "perl.h" "ac_cv_header_perl_h" "#include <EXTERN.h>
14988 "
14989 if test "x$ac_cv_header_perl_h" = xyes; then :
14990
14991 else
14992   as_fn_error $? "header file <perl.h> is required for Perl" "$LINENO" 5
14993 fi
14994
14995
14996   # While we're at it, check that we can link to libperl.
14997   # On most platforms, if perl.h is there then libperl.so will be too, but at
14998   # this writing Debian packages them separately.  There is no known reason to
14999   # waste cycles on separate probes for the Tcl or Python libraries, though.
15000   pgac_save_LIBS=$LIBS
15001   LIBS="$perl_embed_ldflags"
15002   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libperl" >&5
15003 $as_echo_n "checking for libperl... " >&6; }
15004   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15005 /* end confdefs.h.  */
15006
15007 #include <EXTERN.h>
15008 #include <perl.h>
15009
15010 int
15011 main ()
15012 {
15013 perl_alloc();
15014   ;
15015   return 0;
15016 }
15017 _ACEOF
15018 if ac_fn_c_try_link "$LINENO"; then :
15019   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15020 $as_echo "yes" >&6; }
15021 else
15022   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15023 $as_echo "no" >&6; }
15024      as_fn_error $? "libperl library is required for Perl" "$LINENO" 5
15025 fi
15026 rm -f core conftest.err conftest.$ac_objext \
15027     conftest$ac_exeext conftest.$ac_ext
15028   LIBS=$pgac_save_LIBS
15029   CPPFLAGS=$ac_save_CPPFLAGS
15030 fi
15031
15032 # check for <Python.h>
15033 if test "$with_python" = yes; then
15034   ac_save_CPPFLAGS=$CPPFLAGS
15035   CPPFLAGS="$python_includespec $CPPFLAGS"
15036   ac_fn_c_check_header_mongrel "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default"
15037 if test "x$ac_cv_header_Python_h" = xyes; then :
15038
15039 else
15040   as_fn_error $? "header file <Python.h> is required for Python" "$LINENO" 5
15041 fi
15042
15043
15044   CPPFLAGS=$ac_save_CPPFLAGS
15045 fi
15046
15047 #
15048 # Check for DocBook and tools
15049 #
15050 for ac_prog in onsgmls nsgmls
15051 do
15052   # Extract the first word of "$ac_prog", so it can be a program name with args.
15053 set dummy $ac_prog; ac_word=$2
15054 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15055 $as_echo_n "checking for $ac_word... " >&6; }
15056 if ${ac_cv_prog_NSGMLS+:} false; then :
15057   $as_echo_n "(cached) " >&6
15058 else
15059   if test -n "$NSGMLS"; then
15060   ac_cv_prog_NSGMLS="$NSGMLS" # Let the user override the test.
15061 else
15062 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15063 for as_dir in $PATH
15064 do
15065   IFS=$as_save_IFS
15066   test -z "$as_dir" && as_dir=.
15067     for ac_exec_ext in '' $ac_executable_extensions; do
15068   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15069     ac_cv_prog_NSGMLS="$ac_prog"
15070     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15071     break 2
15072   fi
15073 done
15074   done
15075 IFS=$as_save_IFS
15076
15077 fi
15078 fi
15079 NSGMLS=$ac_cv_prog_NSGMLS
15080 if test -n "$NSGMLS"; then
15081   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NSGMLS" >&5
15082 $as_echo "$NSGMLS" >&6; }
15083 else
15084   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15085 $as_echo "no" >&6; }
15086 fi
15087
15088
15089   test -n "$NSGMLS" && break
15090 done
15091
15092 for ac_prog in openjade jade
15093 do
15094   # Extract the first word of "$ac_prog", so it can be a program name with args.
15095 set dummy $ac_prog; ac_word=$2
15096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15097 $as_echo_n "checking for $ac_word... " >&6; }
15098 if ${ac_cv_prog_JADE+:} false; then :
15099   $as_echo_n "(cached) " >&6
15100 else
15101   if test -n "$JADE"; then
15102   ac_cv_prog_JADE="$JADE" # Let the user override the test.
15103 else
15104 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15105 for as_dir in $PATH
15106 do
15107   IFS=$as_save_IFS
15108   test -z "$as_dir" && as_dir=.
15109     for ac_exec_ext in '' $ac_executable_extensions; do
15110   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15111     ac_cv_prog_JADE="$ac_prog"
15112     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15113     break 2
15114   fi
15115 done
15116   done
15117 IFS=$as_save_IFS
15118
15119 fi
15120 fi
15121 JADE=$ac_cv_prog_JADE
15122 if test -n "$JADE"; then
15123   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JADE" >&5
15124 $as_echo "$JADE" >&6; }
15125 else
15126   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15127 $as_echo "no" >&6; }
15128 fi
15129
15130
15131   test -n "$JADE" && break
15132 done
15133
15134
15135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DocBook V4.2" >&5
15136 $as_echo_n "checking for DocBook V4.2... " >&6; }
15137 if ${pgac_cv_check_docbook+:} false; then :
15138   $as_echo_n "(cached) " >&6
15139 else
15140   cat >conftest.sgml <<EOF
15141 <!doctype book PUBLIC "-//OASIS//DTD DocBook V4.2//EN">
15142 <book>
15143  <title>test</title>
15144  <chapter>
15145   <title>random</title>
15146    <sect1>
15147     <title>testsect</title>
15148     <para>text</para>
15149   </sect1>
15150  </chapter>
15151 </book>
15152 EOF
15153
15154 pgac_cv_check_docbook=no
15155
15156 if test -n "$NSGMLS"; then
15157   $NSGMLS -s conftest.sgml 1>&5 2>&1
15158   if test $? -eq 0; then
15159     pgac_cv_check_docbook=yes
15160   fi
15161 fi
15162 rm -f conftest.sgml
15163 fi
15164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_docbook" >&5
15165 $as_echo "$pgac_cv_check_docbook" >&6; }
15166
15167 have_docbook=$pgac_cv_check_docbook
15168
15169
15170 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DocBook stylesheets" >&5
15171 $as_echo_n "checking for DocBook stylesheets... " >&6; }
15172 if ${pgac_cv_path_stylesheets+:} false; then :
15173   $as_echo_n "(cached) " >&6
15174 else
15175   if test -n "$DOCBOOKSTYLE"; then
15176   pgac_cv_path_stylesheets=$DOCBOOKSTYLE
15177 else
15178   for pgac_prefix in /usr /usr/local /opt /sw; do
15179     for pgac_infix in share lib; do
15180       for pgac_postfix in \
15181         sgml/stylesheets/nwalsh-modular \
15182         sgml/stylesheets/docbook \
15183         sgml/stylesheets/dsssl/docbook \
15184         sgml/docbook-dsssl \
15185         sgml/docbook/dsssl/modular \
15186         sgml/docbook/stylesheet/dsssl/modular \
15187         sgml/docbook/dsssl-stylesheets \
15188         sgml/dsssl/docbook-dsssl-nwalsh
15189       do
15190         pgac_candidate=$pgac_prefix/$pgac_infix/$pgac_postfix
15191         if test -r "$pgac_candidate/html/docbook.dsl" \
15192            && test -r "$pgac_candidate/print/docbook.dsl"
15193         then
15194           pgac_cv_path_stylesheets=$pgac_candidate
15195           break 3
15196         fi
15197       done
15198     done
15199   done
15200 fi
15201 fi
15202
15203 DOCBOOKSTYLE=$pgac_cv_path_stylesheets
15204
15205 if test -n "$DOCBOOKSTYLE"; then
15206   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOCBOOKSTYLE" >&5
15207 $as_echo "$DOCBOOKSTYLE" >&6; }
15208 else
15209   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15210 $as_echo "no" >&6; }
15211 fi
15212 if test -n "$DOCBOOKSTYLE" -a -r "$DOCBOOKSTYLE/bin/collateindex.pl"; then
15213   COLLATEINDEX="$DOCBOOKSTYLE/bin/collateindex.pl"
15214
15215 else
15216   # Extract the first word of "collateindex.pl", so it can be a program name with args.
15217 set dummy collateindex.pl; ac_word=$2
15218 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15219 $as_echo_n "checking for $ac_word... " >&6; }
15220 if ${ac_cv_path_COLLATEINDEX+:} false; then :
15221   $as_echo_n "(cached) " >&6
15222 else
15223   case $COLLATEINDEX in
15224   [\\/]* | ?:[\\/]*)
15225   ac_cv_path_COLLATEINDEX="$COLLATEINDEX" # Let the user override the test with a path.
15226   ;;
15227   *)
15228   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15229 for as_dir in $PATH
15230 do
15231   IFS=$as_save_IFS
15232   test -z "$as_dir" && as_dir=.
15233     for ac_exec_ext in '' $ac_executable_extensions; do
15234   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15235     ac_cv_path_COLLATEINDEX="$as_dir/$ac_word$ac_exec_ext"
15236     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15237     break 2
15238   fi
15239 done
15240   done
15241 IFS=$as_save_IFS
15242
15243   ;;
15244 esac
15245 fi
15246 COLLATEINDEX=$ac_cv_path_COLLATEINDEX
15247 if test -n "$COLLATEINDEX"; then
15248   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COLLATEINDEX" >&5
15249 $as_echo "$COLLATEINDEX" >&6; }
15250 else
15251   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15252 $as_echo "no" >&6; }
15253 fi
15254
15255
15256 fi
15257 for ac_prog in dbtoepub
15258 do
15259   # Extract the first word of "$ac_prog", so it can be a program name with args.
15260 set dummy $ac_prog; ac_word=$2
15261 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15262 $as_echo_n "checking for $ac_word... " >&6; }
15263 if ${ac_cv_prog_DBTOEPUB+:} false; then :
15264   $as_echo_n "(cached) " >&6
15265 else
15266   if test -n "$DBTOEPUB"; then
15267   ac_cv_prog_DBTOEPUB="$DBTOEPUB" # Let the user override the test.
15268 else
15269 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15270 for as_dir in $PATH
15271 do
15272   IFS=$as_save_IFS
15273   test -z "$as_dir" && as_dir=.
15274     for ac_exec_ext in '' $ac_executable_extensions; do
15275   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15276     ac_cv_prog_DBTOEPUB="$ac_prog"
15277     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15278     break 2
15279   fi
15280 done
15281   done
15282 IFS=$as_save_IFS
15283
15284 fi
15285 fi
15286 DBTOEPUB=$ac_cv_prog_DBTOEPUB
15287 if test -n "$DBTOEPUB"; then
15288   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
15289 $as_echo "$DBTOEPUB" >&6; }
15290 else
15291   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15292 $as_echo "no" >&6; }
15293 fi
15294
15295
15296   test -n "$DBTOEPUB" && break
15297 done
15298
15299 for ac_prog in xmllint
15300 do
15301   # Extract the first word of "$ac_prog", so it can be a program name with args.
15302 set dummy $ac_prog; ac_word=$2
15303 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15304 $as_echo_n "checking for $ac_word... " >&6; }
15305 if ${ac_cv_prog_XMLLINT+:} false; then :
15306   $as_echo_n "(cached) " >&6
15307 else
15308   if test -n "$XMLLINT"; then
15309   ac_cv_prog_XMLLINT="$XMLLINT" # Let the user override the test.
15310 else
15311 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15312 for as_dir in $PATH
15313 do
15314   IFS=$as_save_IFS
15315   test -z "$as_dir" && as_dir=.
15316     for ac_exec_ext in '' $ac_executable_extensions; do
15317   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15318     ac_cv_prog_XMLLINT="$ac_prog"
15319     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15320     break 2
15321   fi
15322 done
15323   done
15324 IFS=$as_save_IFS
15325
15326 fi
15327 fi
15328 XMLLINT=$ac_cv_prog_XMLLINT
15329 if test -n "$XMLLINT"; then
15330   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
15331 $as_echo "$XMLLINT" >&6; }
15332 else
15333   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15334 $as_echo "no" >&6; }
15335 fi
15336
15337
15338   test -n "$XMLLINT" && break
15339 done
15340
15341 for ac_prog in xsltproc
15342 do
15343   # Extract the first word of "$ac_prog", so it can be a program name with args.
15344 set dummy $ac_prog; ac_word=$2
15345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15346 $as_echo_n "checking for $ac_word... " >&6; }
15347 if ${ac_cv_prog_XSLTPROC+:} false; then :
15348   $as_echo_n "(cached) " >&6
15349 else
15350   if test -n "$XSLTPROC"; then
15351   ac_cv_prog_XSLTPROC="$XSLTPROC" # Let the user override the test.
15352 else
15353 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15354 for as_dir in $PATH
15355 do
15356   IFS=$as_save_IFS
15357   test -z "$as_dir" && as_dir=.
15358     for ac_exec_ext in '' $ac_executable_extensions; do
15359   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15360     ac_cv_prog_XSLTPROC="$ac_prog"
15361     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15362     break 2
15363   fi
15364 done
15365   done
15366 IFS=$as_save_IFS
15367
15368 fi
15369 fi
15370 XSLTPROC=$ac_cv_prog_XSLTPROC
15371 if test -n "$XSLTPROC"; then
15372   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
15373 $as_echo "$XSLTPROC" >&6; }
15374 else
15375   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15376 $as_echo "no" >&6; }
15377 fi
15378
15379
15380   test -n "$XSLTPROC" && break
15381 done
15382
15383 for ac_prog in osx sgml2xml sx
15384 do
15385   # Extract the first word of "$ac_prog", so it can be a program name with args.
15386 set dummy $ac_prog; ac_word=$2
15387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15388 $as_echo_n "checking for $ac_word... " >&6; }
15389 if ${ac_cv_prog_OSX+:} false; then :
15390   $as_echo_n "(cached) " >&6
15391 else
15392   if test -n "$OSX"; then
15393   ac_cv_prog_OSX="$OSX" # Let the user override the test.
15394 else
15395 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15396 for as_dir in $PATH
15397 do
15398   IFS=$as_save_IFS
15399   test -z "$as_dir" && as_dir=.
15400     for ac_exec_ext in '' $ac_executable_extensions; do
15401   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15402     ac_cv_prog_OSX="$ac_prog"
15403     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15404     break 2
15405   fi
15406 done
15407   done
15408 IFS=$as_save_IFS
15409
15410 fi
15411 fi
15412 OSX=$ac_cv_prog_OSX
15413 if test -n "$OSX"; then
15414   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OSX" >&5
15415 $as_echo "$OSX" >&6; }
15416 else
15417   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15418 $as_echo "no" >&6; }
15419 fi
15420
15421
15422   test -n "$OSX" && break
15423 done
15424
15425
15426 #
15427 # Check for test tools
15428 #
15429 if test "$enable_tap_tests" = yes; then
15430   for ac_prog in prove
15431 do
15432   # Extract the first word of "$ac_prog", so it can be a program name with args.
15433 set dummy $ac_prog; ac_word=$2
15434 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15435 $as_echo_n "checking for $ac_word... " >&6; }
15436 if ${ac_cv_prog_PROVE+:} false; then :
15437   $as_echo_n "(cached) " >&6
15438 else
15439   if test -n "$PROVE"; then
15440   ac_cv_prog_PROVE="$PROVE" # Let the user override the test.
15441 else
15442 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15443 for as_dir in $PATH
15444 do
15445   IFS=$as_save_IFS
15446   test -z "$as_dir" && as_dir=.
15447     for ac_exec_ext in '' $ac_executable_extensions; do
15448   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15449     ac_cv_prog_PROVE="$ac_prog"
15450     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15451     break 2
15452   fi
15453 done
15454   done
15455 IFS=$as_save_IFS
15456
15457 fi
15458 fi
15459 PROVE=$ac_cv_prog_PROVE
15460 if test -n "$PROVE"; then
15461   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
15462 $as_echo "$PROVE" >&6; }
15463 else
15464   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15465 $as_echo "no" >&6; }
15466 fi
15467
15468
15469   test -n "$PROVE" && break
15470 done
15471
15472   if test -z "$PROVE"; then
15473     as_fn_error $? "prove not found" "$LINENO" 5
15474   fi
15475   if test -z "$PERL"; then
15476     as_fn_error $? "Perl not found" "$LINENO" 5
15477   fi
15478 fi
15479
15480 # Thread testing
15481
15482 # We have to run the thread test near the end so we have all our symbols
15483 # defined.  Cross compiling throws a warning.
15484 #
15485 if test "$enable_thread_safety" = yes; then
15486 if test "$PORTNAME" != "win32"
15487 then
15488 { $as_echo "$as_me:${as_lineno-$LINENO}: checking thread safety of required library functions" >&5
15489 $as_echo_n "checking thread safety of required library functions... " >&6; }
15490
15491 _CFLAGS="$CFLAGS"
15492 _LIBS="$LIBS"
15493 CFLAGS="$CFLAGS $PTHREAD_CFLAGS -DIN_CONFIGURE"
15494 LIBS="$LIBS $PTHREAD_LIBS"
15495 if test "$cross_compiling" = yes; then :
15496   { $as_echo "$as_me:${as_lineno-$LINENO}: result: maybe" >&5
15497 $as_echo "maybe" >&6; }
15498   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
15499 *** Skipping thread test program because of cross-compile build.
15500 *** Run the program in src/test/thread on the target machine.
15501 " >&5
15502 $as_echo "$as_me: WARNING:
15503 *** Skipping thread test program because of cross-compile build.
15504 *** Run the program in src/test/thread on the target machine.
15505 " >&2;}
15506 else
15507   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15508 /* end confdefs.h.  */
15509 #include "$srcdir/src/test/thread/thread_test.c"
15510 _ACEOF
15511 if ac_fn_c_try_run "$LINENO"; then :
15512   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15513 $as_echo "yes" >&6; }
15514 else
15515   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15516 $as_echo "no" >&6; }
15517   as_fn_error $? "thread test program failed
15518 This platform is not thread-safe.  Check the file 'config.log' or compile
15519 and run src/test/thread/thread_test for the exact reason.
15520 Use --disable-thread-safety to disable thread safety." "$LINENO" 5
15521 fi
15522 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15523   conftest.$ac_objext conftest.beam conftest.$ac_ext
15524 fi
15525
15526 CFLAGS="$_CFLAGS"
15527 LIBS="$_LIBS"
15528 else
15529 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** skipping thread test on Win32" >&5
15530 $as_echo "$as_me: WARNING: *** skipping thread test on Win32" >&2;}
15531 fi
15532 fi
15533
15534 # If compiler will take -Wl,--as-needed (or various platform-specific
15535 # spellings thereof) then add that to LDFLAGS.  This is much easier than
15536 # trying to filter LIBS to the minimum for each executable.
15537 # On (at least) some Red-Hat-derived systems, this switch breaks linking to
15538 # libreadline; therefore we postpone testing it until we know what library
15539 # dependencies readline has.  The test code will try to link with $LIBS.
15540 if test "$with_readline" = yes; then
15541   link_test_func=readline
15542 else
15543   link_test_func=exit
15544 fi
15545
15546 if test "$PORTNAME" = "darwin"; then
15547   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-dead_strip_dylibs" >&5
15548 $as_echo_n "checking whether $CC supports -Wl,-dead_strip_dylibs... " >&6; }
15549 if ${pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs+:} false; then :
15550   $as_echo_n "(cached) " >&6
15551 else
15552   pgac_save_LDFLAGS=$LDFLAGS
15553 LDFLAGS="$pgac_save_LDFLAGS -Wl,-dead_strip_dylibs"
15554 if test "$cross_compiling" = yes; then :
15555   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs="assuming no"
15556 else
15557   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15558 /* end confdefs.h.  */
15559 extern void $link_test_func (); void (*fptr) () = $link_test_func;
15560 int
15561 main ()
15562 {
15563
15564   ;
15565   return 0;
15566 }
15567 _ACEOF
15568 if ac_fn_c_try_run "$LINENO"; then :
15569   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=yes
15570 else
15571   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=no
15572 fi
15573 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15574   conftest.$ac_objext conftest.beam conftest.$ac_ext
15575 fi
15576
15577 LDFLAGS="$pgac_save_LDFLAGS"
15578 fi
15579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&5
15580 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&6; }
15581 if test x"$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" = x"yes"; then
15582   LDFLAGS="$LDFLAGS -Wl,-dead_strip_dylibs"
15583 fi
15584
15585 elif test "$PORTNAME" = "openbsd"; then
15586   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-Bdynamic" >&5
15587 $as_echo_n "checking whether $CC supports -Wl,-Bdynamic... " >&6; }
15588 if ${pgac_cv_prog_cc_ldflags__Wl__Bdynamic+:} false; then :
15589   $as_echo_n "(cached) " >&6
15590 else
15591   pgac_save_LDFLAGS=$LDFLAGS
15592 LDFLAGS="$pgac_save_LDFLAGS -Wl,-Bdynamic"
15593 if test "$cross_compiling" = yes; then :
15594   pgac_cv_prog_cc_ldflags__Wl__Bdynamic="assuming no"
15595 else
15596   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15597 /* end confdefs.h.  */
15598 extern void $link_test_func (); void (*fptr) () = $link_test_func;
15599 int
15600 main ()
15601 {
15602
15603   ;
15604   return 0;
15605 }
15606 _ACEOF
15607 if ac_fn_c_try_run "$LINENO"; then :
15608   pgac_cv_prog_cc_ldflags__Wl__Bdynamic=yes
15609 else
15610   pgac_cv_prog_cc_ldflags__Wl__Bdynamic=no
15611 fi
15612 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15613   conftest.$ac_objext conftest.beam conftest.$ac_ext
15614 fi
15615
15616 LDFLAGS="$pgac_save_LDFLAGS"
15617 fi
15618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&5
15619 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&6; }
15620 if test x"$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" = x"yes"; then
15621   LDFLAGS="$LDFLAGS -Wl,-Bdynamic"
15622 fi
15623
15624 else
15625   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,--as-needed" >&5
15626 $as_echo_n "checking whether $CC supports -Wl,--as-needed... " >&6; }
15627 if ${pgac_cv_prog_cc_ldflags__Wl___as_needed+:} false; then :
15628   $as_echo_n "(cached) " >&6
15629 else
15630   pgac_save_LDFLAGS=$LDFLAGS
15631 LDFLAGS="$pgac_save_LDFLAGS -Wl,--as-needed"
15632 if test "$cross_compiling" = yes; then :
15633   pgac_cv_prog_cc_ldflags__Wl___as_needed="assuming no"
15634 else
15635   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15636 /* end confdefs.h.  */
15637 extern void $link_test_func (); void (*fptr) () = $link_test_func;
15638 int
15639 main ()
15640 {
15641
15642   ;
15643   return 0;
15644 }
15645 _ACEOF
15646 if ac_fn_c_try_run "$LINENO"; then :
15647   pgac_cv_prog_cc_ldflags__Wl___as_needed=yes
15648 else
15649   pgac_cv_prog_cc_ldflags__Wl___as_needed=no
15650 fi
15651 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15652   conftest.$ac_objext conftest.beam conftest.$ac_ext
15653 fi
15654
15655 LDFLAGS="$pgac_save_LDFLAGS"
15656 fi
15657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl___as_needed" >&5
15658 $as_echo "$pgac_cv_prog_cc_ldflags__Wl___as_needed" >&6; }
15659 if test x"$pgac_cv_prog_cc_ldflags__Wl___as_needed" = x"yes"; then
15660   LDFLAGS="$LDFLAGS -Wl,--as-needed"
15661 fi
15662
15663 fi
15664
15665 # Create compiler version string
15666 if test x"$GCC" = x"yes" ; then
15667   cc_string=`${CC} --version | sed q`
15668   case $cc_string in [A-Za-z]*) ;; *) cc_string="GCC $cc_string";; esac
15669 elif test x"$SUN_STUDIO_CC" = x"yes" ; then
15670   cc_string=`${CC} -V 2>&1 | sed q`
15671 else
15672   cc_string=$CC
15673 fi
15674
15675
15676 cat >>confdefs.h <<_ACEOF
15677 #define PG_VERSION_STR "PostgreSQL $PG_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"
15678 _ACEOF
15679
15680
15681 # Supply a numeric version string for use by 3rd party add-ons
15682 # awk -F is a regex on some platforms, and not on others, so make "." a tab
15683 PG_VERSION_NUM="`echo "$PACKAGE_VERSION" | sed 's/[A-Za-z].*$//' |
15684 tr '.' '        ' |
15685 $AWK '{printf "%d%02d%02d", $1, $2, (NF >= 3) ? $3 : 0}'`"
15686
15687 cat >>confdefs.h <<_ACEOF
15688 #define PG_VERSION_NUM $PG_VERSION_NUM
15689 _ACEOF
15690
15691
15692
15693
15694 # Begin output steps
15695
15696 { $as_echo "$as_me:${as_lineno-$LINENO}: using compiler=$cc_string" >&5
15697 $as_echo "$as_me: using compiler=$cc_string" >&6;}
15698 { $as_echo "$as_me:${as_lineno-$LINENO}: using CFLAGS=$CFLAGS" >&5
15699 $as_echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
15700 { $as_echo "$as_me:${as_lineno-$LINENO}: using CPPFLAGS=$CPPFLAGS" >&5
15701 $as_echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
15702 { $as_echo "$as_me:${as_lineno-$LINENO}: using LDFLAGS=$LDFLAGS" >&5
15703 $as_echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
15704
15705 # prepare build tree if outside source tree
15706 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
15707 # Note 2: /bin/pwd might be better than shell's built-in at getting
15708 #         a symlink-free name.
15709 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
15710   vpath_build=no
15711 else
15712   vpath_build=yes
15713   if test "$no_create" != yes; then
15714     $as_echo_n "preparing build tree... " >&6
15715     pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
15716     $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
15717       || as_fn_error $? "failed" "$LINENO" 5
15718     { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
15719 $as_echo "done" >&6; }
15720   fi
15721 fi
15722
15723
15724
15725 ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
15726
15727
15728 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/backend/port/pg_latch.c:${LATCH_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}"
15729
15730
15731 if test "$PORTNAME" = "win32"; then
15732 ac_config_commands="$ac_config_commands check_win32_symlinks"
15733
15734 fi
15735
15736 ac_config_headers="$ac_config_headers src/include/pg_config.h"
15737
15738
15739 ac_config_headers="$ac_config_headers src/include/pg_config_ext.h"
15740
15741
15742 ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
15743
15744
15745 cat >confcache <<\_ACEOF
15746 # This file is a shell script that caches the results of configure
15747 # tests run on this system so they can be shared between configure
15748 # scripts and configure runs, see configure's option --config-cache.
15749 # It is not useful on other systems.  If it contains results you don't
15750 # want to keep, you may remove or edit it.
15751 #
15752 # config.status only pays attention to the cache file if you give it
15753 # the --recheck option to rerun configure.
15754 #
15755 # `ac_cv_env_foo' variables (set or unset) will be overridden when
15756 # loading this file, other *unset* `ac_cv_foo' will be assigned the
15757 # following values.
15758
15759 _ACEOF
15760
15761 # The following way of writing the cache mishandles newlines in values,
15762 # but we know of no workaround that is simple, portable, and efficient.
15763 # So, we kill variables containing newlines.
15764 # Ultrix sh set writes to stderr and can't be redirected directly,
15765 # and sets the high bit in the cache file unless we assign to the vars.
15766 (
15767   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15768     eval ac_val=\$$ac_var
15769     case $ac_val in #(
15770     *${as_nl}*)
15771       case $ac_var in #(
15772       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15773 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
15774       esac
15775       case $ac_var in #(
15776       _ | IFS | as_nl) ;; #(
15777       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15778       *) { eval $ac_var=; unset $ac_var;} ;;
15779       esac ;;
15780     esac
15781   done
15782
15783   (set) 2>&1 |
15784     case $as_nl`(ac_space=' '; set) 2>&1` in #(
15785     *${as_nl}ac_space=\ *)
15786       # `set' does not quote correctly, so add quotes: double-quote
15787       # substitution turns \\\\ into \\, and sed turns \\ into \.
15788       sed -n \
15789         "s/'/'\\\\''/g;
15790           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
15791       ;; #(
15792     *)
15793       # `set' quotes correctly as required by POSIX, so do not add quotes.
15794       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
15795       ;;
15796     esac |
15797     sort
15798 ) |
15799   sed '
15800      /^ac_cv_env_/b end
15801      t clear
15802      :clear
15803      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15804      t end
15805      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15806      :end' >>confcache
15807 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15808   if test -w "$cache_file"; then
15809     if test "x$cache_file" != "x/dev/null"; then
15810       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15811 $as_echo "$as_me: updating cache $cache_file" >&6;}
15812       if test ! -f "$cache_file" || test -h "$cache_file"; then
15813         cat confcache >"$cache_file"
15814       else
15815         case $cache_file in #(
15816         */* | ?:*)
15817           mv -f confcache "$cache_file"$$ &&
15818           mv -f "$cache_file"$$ "$cache_file" ;; #(
15819         *)
15820           mv -f confcache "$cache_file" ;;
15821         esac
15822       fi
15823     fi
15824   else
15825     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15826 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
15827   fi
15828 fi
15829 rm -f confcache
15830
15831 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15832 # Let make expand exec_prefix.
15833 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15834
15835 DEFS=-DHAVE_CONFIG_H
15836
15837 ac_libobjs=
15838 ac_ltlibobjs=
15839 U=
15840 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15841   # 1. Remove the extension, and $U if already installed.
15842   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
15843   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
15844   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
15845   #    will be set to the directory where LIBOBJS objects are built.
15846   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15847   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
15848 done
15849 LIBOBJS=$ac_libobjs
15850
15851 LTLIBOBJS=$ac_ltlibobjs
15852
15853
15854
15855
15856 : "${CONFIG_STATUS=./config.status}"
15857 ac_write_fail=0
15858 ac_clean_files_save=$ac_clean_files
15859 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
15860 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15861 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15862 as_write_fail=0
15863 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
15864 #! $SHELL
15865 # Generated by $as_me.
15866 # Run this file to recreate the current configuration.
15867 # Compiler output produced by configure, useful for debugging
15868 # configure, is in config.log if it exists.
15869
15870 debug=false
15871 ac_cs_recheck=false
15872 ac_cs_silent=false
15873
15874 SHELL=\${CONFIG_SHELL-$SHELL}
15875 export SHELL
15876 _ASEOF
15877 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15878 ## -------------------- ##
15879 ## M4sh Initialization. ##
15880 ## -------------------- ##
15881
15882 # Be more Bourne compatible
15883 DUALCASE=1; export DUALCASE # for MKS sh
15884 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
15885   emulate sh
15886   NULLCMD=:
15887   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
15888   # is contrary to our usage.  Disable this feature.
15889   alias -g '${1+"$@"}'='"$@"'
15890   setopt NO_GLOB_SUBST
15891 else
15892   case `(set -o) 2>/dev/null` in #(
15893   *posix*) :
15894     set -o posix ;; #(
15895   *) :
15896      ;;
15897 esac
15898 fi
15899
15900
15901 as_nl='
15902 '
15903 export as_nl
15904 # Printing a long string crashes Solaris 7 /usr/bin/printf.
15905 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15906 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15907 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15908 # Prefer a ksh shell builtin over an external printf program on Solaris,
15909 # but without wasting forks for bash or zsh.
15910 if test -z "$BASH_VERSION$ZSH_VERSION" \
15911     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15912   as_echo='print -r --'
15913   as_echo_n='print -rn --'
15914 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15915   as_echo='printf %s\n'
15916   as_echo_n='printf %s'
15917 else
15918   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15919     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15920     as_echo_n='/usr/ucb/echo -n'
15921   else
15922     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15923     as_echo_n_body='eval
15924       arg=$1;
15925       case $arg in #(
15926       *"$as_nl"*)
15927         expr "X$arg" : "X\\(.*\\)$as_nl";
15928         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15929       esac;
15930       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15931     '
15932     export as_echo_n_body
15933     as_echo_n='sh -c $as_echo_n_body as_echo'
15934   fi
15935   export as_echo_body
15936   as_echo='sh -c $as_echo_body as_echo'
15937 fi
15938
15939 # The user is always right.
15940 if test "${PATH_SEPARATOR+set}" != set; then
15941   PATH_SEPARATOR=:
15942   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15943     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15944       PATH_SEPARATOR=';'
15945   }
15946 fi
15947
15948
15949 # IFS
15950 # We need space, tab and new line, in precisely that order.  Quoting is
15951 # there to prevent editors from complaining about space-tab.
15952 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
15953 # splitting by setting IFS to empty value.)
15954 IFS=" ""        $as_nl"
15955
15956 # Find who we are.  Look in the path if we contain no directory separator.
15957 as_myself=
15958 case $0 in #((
15959   *[\\/]* ) as_myself=$0 ;;
15960   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15961 for as_dir in $PATH
15962 do
15963   IFS=$as_save_IFS
15964   test -z "$as_dir" && as_dir=.
15965     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15966   done
15967 IFS=$as_save_IFS
15968
15969      ;;
15970 esac
15971 # We did not find ourselves, most probably we were run as `sh COMMAND'
15972 # in which case we are not to be found in the path.
15973 if test "x$as_myself" = x; then
15974   as_myself=$0
15975 fi
15976 if test ! -f "$as_myself"; then
15977   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15978   exit 1
15979 fi
15980
15981 # Unset variables that we do not need and which cause bugs (e.g. in
15982 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
15983 # suppresses any "Segmentation fault" message there.  '((' could
15984 # trigger a bug in pdksh 5.2.14.
15985 for as_var in BASH_ENV ENV MAIL MAILPATH
15986 do eval test x\${$as_var+set} = xset \
15987   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
15988 done
15989 PS1='$ '
15990 PS2='> '
15991 PS4='+ '
15992
15993 # NLS nuisances.
15994 LC_ALL=C
15995 export LC_ALL
15996 LANGUAGE=C
15997 export LANGUAGE
15998
15999 # CDPATH.
16000 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16001
16002
16003 # as_fn_error STATUS ERROR [LINENO LOG_FD]
16004 # ----------------------------------------
16005 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16006 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
16007 # script with STATUS, using 1 if that was 0.
16008 as_fn_error ()
16009 {
16010   as_status=$1; test $as_status -eq 0 && as_status=1
16011   if test "$4"; then
16012     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16013     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
16014   fi
16015   $as_echo "$as_me: error: $2" >&2
16016   as_fn_exit $as_status
16017 } # as_fn_error
16018
16019
16020 # as_fn_set_status STATUS
16021 # -----------------------
16022 # Set $? to STATUS, without forking.
16023 as_fn_set_status ()
16024 {
16025   return $1
16026 } # as_fn_set_status
16027
16028 # as_fn_exit STATUS
16029 # -----------------
16030 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16031 as_fn_exit ()
16032 {
16033   set +e
16034   as_fn_set_status $1
16035   exit $1
16036 } # as_fn_exit
16037
16038 # as_fn_unset VAR
16039 # ---------------
16040 # Portably unset VAR.
16041 as_fn_unset ()
16042 {
16043   { eval $1=; unset $1;}
16044 }
16045 as_unset=as_fn_unset
16046 # as_fn_append VAR VALUE
16047 # ----------------------
16048 # Append the text in VALUE to the end of the definition contained in VAR. Take
16049 # advantage of any shell optimizations that allow amortized linear growth over
16050 # repeated appends, instead of the typical quadratic growth present in naive
16051 # implementations.
16052 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16053   eval 'as_fn_append ()
16054   {
16055     eval $1+=\$2
16056   }'
16057 else
16058   as_fn_append ()
16059   {
16060     eval $1=\$$1\$2
16061   }
16062 fi # as_fn_append
16063
16064 # as_fn_arith ARG...
16065 # ------------------
16066 # Perform arithmetic evaluation on the ARGs, and store the result in the
16067 # global $as_val. Take advantage of shells that can avoid forks. The arguments
16068 # must be portable across $(()) and expr.
16069 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16070   eval 'as_fn_arith ()
16071   {
16072     as_val=$(( $* ))
16073   }'
16074 else
16075   as_fn_arith ()
16076   {
16077     as_val=`expr "$@" || test $? -eq 1`
16078   }
16079 fi # as_fn_arith
16080
16081
16082 if expr a : '\(a\)' >/dev/null 2>&1 &&
16083    test "X`expr 00001 : '.*\(...\)'`" = X001; then
16084   as_expr=expr
16085 else
16086   as_expr=false
16087 fi
16088
16089 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
16090   as_basename=basename
16091 else
16092   as_basename=false
16093 fi
16094
16095 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16096   as_dirname=dirname
16097 else
16098   as_dirname=false
16099 fi
16100
16101 as_me=`$as_basename -- "$0" ||
16102 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16103          X"$0" : 'X\(//\)$' \| \
16104          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
16105 $as_echo X/"$0" |
16106     sed '/^.*\/\([^/][^/]*\)\/*$/{
16107             s//\1/
16108             q
16109           }
16110           /^X\/\(\/\/\)$/{
16111             s//\1/
16112             q
16113           }
16114           /^X\/\(\/\).*/{
16115             s//\1/
16116             q
16117           }
16118           s/.*/./; q'`
16119
16120 # Avoid depending upon Character Ranges.
16121 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16122 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16123 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16124 as_cr_digits='0123456789'
16125 as_cr_alnum=$as_cr_Letters$as_cr_digits
16126
16127 ECHO_C= ECHO_N= ECHO_T=
16128 case `echo -n x` in #(((((
16129 -n*)
16130   case `echo 'xy\c'` in
16131   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
16132   xy)  ECHO_C='\c';;
16133   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
16134        ECHO_T=' ';;
16135   esac;;
16136 *)
16137   ECHO_N='-n';;
16138 esac
16139
16140 rm -f conf$$ conf$$.exe conf$$.file
16141 if test -d conf$$.dir; then
16142   rm -f conf$$.dir/conf$$.file
16143 else
16144   rm -f conf$$.dir
16145   mkdir conf$$.dir 2>/dev/null
16146 fi
16147 if (echo >conf$$.file) 2>/dev/null; then
16148   if ln -s conf$$.file conf$$ 2>/dev/null; then
16149     as_ln_s='ln -s'
16150     # ... but there are two gotchas:
16151     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16152     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
16153     # In both cases, we have to default to `cp -pR'.
16154     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
16155       as_ln_s='cp -pR'
16156   elif ln conf$$.file conf$$ 2>/dev/null; then
16157     as_ln_s=ln
16158   else
16159     as_ln_s='cp -pR'
16160   fi
16161 else
16162   as_ln_s='cp -pR'
16163 fi
16164 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16165 rmdir conf$$.dir 2>/dev/null
16166
16167
16168 # as_fn_mkdir_p
16169 # -------------
16170 # Create "$as_dir" as a directory, including parents if necessary.
16171 as_fn_mkdir_p ()
16172 {
16173
16174   case $as_dir in #(
16175   -*) as_dir=./$as_dir;;
16176   esac
16177   test -d "$as_dir" || eval $as_mkdir_p || {
16178     as_dirs=
16179     while :; do
16180       case $as_dir in #(
16181       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16182       *) as_qdir=$as_dir;;
16183       esac
16184       as_dirs="'$as_qdir' $as_dirs"
16185       as_dir=`$as_dirname -- "$as_dir" ||
16186 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16187          X"$as_dir" : 'X\(//\)[^/]' \| \
16188          X"$as_dir" : 'X\(//\)$' \| \
16189          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16190 $as_echo X"$as_dir" |
16191     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16192             s//\1/
16193             q
16194           }
16195           /^X\(\/\/\)[^/].*/{
16196             s//\1/
16197             q
16198           }
16199           /^X\(\/\/\)$/{
16200             s//\1/
16201             q
16202           }
16203           /^X\(\/\).*/{
16204             s//\1/
16205             q
16206           }
16207           s/.*/./; q'`
16208       test -d "$as_dir" && break
16209     done
16210     test -z "$as_dirs" || eval "mkdir $as_dirs"
16211   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
16212
16213
16214 } # as_fn_mkdir_p
16215 if mkdir -p . 2>/dev/null; then
16216   as_mkdir_p='mkdir -p "$as_dir"'
16217 else
16218   test -d ./-p && rmdir ./-p
16219   as_mkdir_p=false
16220 fi
16221
16222
16223 # as_fn_executable_p FILE
16224 # -----------------------
16225 # Test if FILE is an executable regular file.
16226 as_fn_executable_p ()
16227 {
16228   test -f "$1" && test -x "$1"
16229 } # as_fn_executable_p
16230 as_test_x='test -x'
16231 as_executable_p=as_fn_executable_p
16232
16233 # Sed expression to map a string onto a valid CPP name.
16234 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
16235
16236 # Sed expression to map a string onto a valid variable name.
16237 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
16238
16239
16240 exec 6>&1
16241 ## ----------------------------------- ##
16242 ## Main body of $CONFIG_STATUS script. ##
16243 ## ----------------------------------- ##
16244 _ASEOF
16245 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
16246
16247 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16248 # Save the log message, to keep $0 and so on meaningful, and to
16249 # report actual input values of CONFIG_FILES etc. instead of their
16250 # values after options handling.
16251 ac_log="
16252 This file was extended by PostgreSQL $as_me 9.6devel, which was
16253 generated by GNU Autoconf 2.69.  Invocation command line was
16254
16255   CONFIG_FILES    = $CONFIG_FILES
16256   CONFIG_HEADERS  = $CONFIG_HEADERS
16257   CONFIG_LINKS    = $CONFIG_LINKS
16258   CONFIG_COMMANDS = $CONFIG_COMMANDS
16259   $ $0 $@
16260
16261 on `(hostname || uname -n) 2>/dev/null | sed 1q`
16262 "
16263
16264 _ACEOF
16265
16266 case $ac_config_files in *"
16267 "*) set x $ac_config_files; shift; ac_config_files=$*;;
16268 esac
16269
16270 case $ac_config_headers in *"
16271 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
16272 esac
16273
16274
16275 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16276 # Files that config.status was made for.
16277 config_files="$ac_config_files"
16278 config_headers="$ac_config_headers"
16279 config_links="$ac_config_links"
16280 config_commands="$ac_config_commands"
16281
16282 _ACEOF
16283
16284 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16285 ac_cs_usage="\
16286 \`$as_me' instantiates files and other configuration actions
16287 from templates according to the current configuration.  Unless the files
16288 and actions are specified as TAGs, all are instantiated by default.
16289
16290 Usage: $0 [OPTION]... [TAG]...
16291
16292   -h, --help       print this help, then exit
16293   -V, --version    print version number and configuration settings, then exit
16294       --config     print configuration, then exit
16295   -q, --quiet, --silent
16296                    do not print progress messages
16297   -d, --debug      don't remove temporary files
16298       --recheck    update $as_me by reconfiguring in the same conditions
16299       --file=FILE[:TEMPLATE]
16300                    instantiate the configuration file FILE
16301       --header=FILE[:TEMPLATE]
16302                    instantiate the configuration header FILE
16303
16304 Configuration files:
16305 $config_files
16306
16307 Configuration headers:
16308 $config_headers
16309
16310 Configuration links:
16311 $config_links
16312
16313 Configuration commands:
16314 $config_commands
16315
16316 Report bugs to <pgsql-bugs@postgresql.org>."
16317
16318 _ACEOF
16319 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16320 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
16321 ac_cs_version="\\
16322 PostgreSQL config.status 9.6devel
16323 configured by $0, generated by GNU Autoconf 2.69,
16324   with options \\"\$ac_cs_config\\"
16325
16326 Copyright (C) 2012 Free Software Foundation, Inc.
16327 This config.status script is free software; the Free Software Foundation
16328 gives unlimited permission to copy, distribute and modify it."
16329
16330 ac_pwd='$ac_pwd'
16331 srcdir='$srcdir'
16332 INSTALL='$INSTALL'
16333 MKDIR_P='$MKDIR_P'
16334 AWK='$AWK'
16335 test -n "\$AWK" || AWK=awk
16336 _ACEOF
16337
16338 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16339 # The default lists apply if the user does not specify any file.
16340 ac_need_defaults=:
16341 while test $# != 0
16342 do
16343   case $1 in
16344   --*=?*)
16345     ac_option=`expr "X$1" : 'X\([^=]*\)='`
16346     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
16347     ac_shift=:
16348     ;;
16349   --*=)
16350     ac_option=`expr "X$1" : 'X\([^=]*\)='`
16351     ac_optarg=
16352     ac_shift=:
16353     ;;
16354   *)
16355     ac_option=$1
16356     ac_optarg=$2
16357     ac_shift=shift
16358     ;;
16359   esac
16360
16361   case $ac_option in
16362   # Handling of the options.
16363   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16364     ac_cs_recheck=: ;;
16365   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
16366     $as_echo "$ac_cs_version"; exit ;;
16367   --config | --confi | --conf | --con | --co | --c )
16368     $as_echo "$ac_cs_config"; exit ;;
16369   --debug | --debu | --deb | --de | --d | -d )
16370     debug=: ;;
16371   --file | --fil | --fi | --f )
16372     $ac_shift
16373     case $ac_optarg in
16374     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16375     '') as_fn_error $? "missing file argument" ;;
16376     esac
16377     as_fn_append CONFIG_FILES " '$ac_optarg'"
16378     ac_need_defaults=false;;
16379   --header | --heade | --head | --hea )
16380     $ac_shift
16381     case $ac_optarg in
16382     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16383     esac
16384     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
16385     ac_need_defaults=false;;
16386   --he | --h)
16387     # Conflict between --help and --header
16388     as_fn_error $? "ambiguous option: \`$1'
16389 Try \`$0 --help' for more information.";;
16390   --help | --hel | -h )
16391     $as_echo "$ac_cs_usage"; exit ;;
16392   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16393   | -silent | --silent | --silen | --sile | --sil | --si | --s)
16394     ac_cs_silent=: ;;
16395
16396   # This is an error.
16397   -*) as_fn_error $? "unrecognized option: \`$1'
16398 Try \`$0 --help' for more information." ;;
16399
16400   *) as_fn_append ac_config_targets " $1"
16401      ac_need_defaults=false ;;
16402
16403   esac
16404   shift
16405 done
16406
16407 ac_configure_extra_args=
16408
16409 if $ac_cs_silent; then
16410   exec 6>/dev/null
16411   ac_configure_extra_args="$ac_configure_extra_args --silent"
16412 fi
16413
16414 _ACEOF
16415 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16416 if \$ac_cs_recheck; then
16417   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
16418   shift
16419   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
16420   CONFIG_SHELL='$SHELL'
16421   export CONFIG_SHELL
16422   exec "\$@"
16423 fi
16424
16425 _ACEOF
16426 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16427 exec 5>>config.log
16428 {
16429   echo
16430   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16431 ## Running $as_me. ##
16432 _ASBOX
16433   $as_echo "$ac_log"
16434 } >&5
16435
16436 _ACEOF
16437 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16438 _ACEOF
16439
16440 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16441
16442 # Handling of arguments.
16443 for ac_config_target in $ac_config_targets
16444 do
16445   case $ac_config_target in
16446     "src/backend/port/tas.s") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
16447     "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
16448     "src/Makefile.global") CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
16449     "src/backend/port/dynloader.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/dynloader.c:src/backend/port/dynloader/${template}.c" ;;
16450     "src/backend/port/pg_sema.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
16451     "src/backend/port/pg_shmem.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
16452     "src/backend/port/pg_latch.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_latch.c:${LATCH_IMPLEMENTATION}" ;;
16453     "src/include/dynloader.h") CONFIG_LINKS="$CONFIG_LINKS src/include/dynloader.h:src/backend/port/dynloader/${template}.h" ;;
16454     "src/include/pg_config_os.h") CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
16455     "src/Makefile.port") CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
16456     "check_win32_symlinks") CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
16457     "src/include/pg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
16458     "src/include/pg_config_ext.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config_ext.h" ;;
16459     "src/interfaces/ecpg/include/ecpg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
16460
16461   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
16462   esac
16463 done
16464
16465
16466 # If the user did not use the arguments to specify the items to instantiate,
16467 # then the envvar interface is used.  Set only those that are not.
16468 # We use the long form for the default assignment because of an extremely
16469 # bizarre bug on SunOS 4.1.3.
16470 if $ac_need_defaults; then
16471   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16472   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16473   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
16474   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
16475 fi
16476
16477 # Have a temporary directory for convenience.  Make it in the build tree
16478 # simply because there is no reason against having it here, and in addition,
16479 # creating and moving files from /tmp can sometimes cause problems.
16480 # Hook for its removal unless debugging.
16481 # Note that there is a small window in which the directory will not be cleaned:
16482 # after its creation but before its name has been assigned to `$tmp'.
16483 $debug ||
16484 {
16485   tmp= ac_tmp=
16486   trap 'exit_status=$?
16487   : "${ac_tmp:=$tmp}"
16488   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
16489 ' 0
16490   trap 'as_fn_exit 1' 1 2 13 15
16491 }
16492 # Create a (secure) tmp directory for tmp files.
16493
16494 {
16495   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
16496   test -d "$tmp"
16497 }  ||
16498 {
16499   tmp=./conf$$-$RANDOM
16500   (umask 077 && mkdir "$tmp")
16501 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
16502 ac_tmp=$tmp
16503
16504 # Set up the scripts for CONFIG_FILES section.
16505 # No need to generate them if there are no CONFIG_FILES.
16506 # This happens for instance with `./config.status config.h'.
16507 if test -n "$CONFIG_FILES"; then
16508
16509
16510 ac_cr=`echo X | tr X '\015'`
16511 # On cygwin, bash can eat \r inside `` if the user requested igncr.
16512 # But we know of no other shell where ac_cr would be empty at this
16513 # point, so we can use a bashism as a fallback.
16514 if test "x$ac_cr" = x; then
16515   eval ac_cr=\$\'\\r\'
16516 fi
16517 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
16518 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
16519   ac_cs_awk_cr='\\r'
16520 else
16521   ac_cs_awk_cr=$ac_cr
16522 fi
16523
16524 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
16525 _ACEOF
16526
16527
16528 {
16529   echo "cat >conf$$subs.awk <<_ACEOF" &&
16530   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
16531   echo "_ACEOF"
16532 } >conf$$subs.sh ||
16533   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
16534 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
16535 ac_delim='%!_!# '
16536 for ac_last_try in false false false false false :; do
16537   . ./conf$$subs.sh ||
16538     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
16539
16540   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
16541   if test $ac_delim_n = $ac_delim_num; then
16542     break
16543   elif $ac_last_try; then
16544     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
16545   else
16546     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16547   fi
16548 done
16549 rm -f conf$$subs.sh
16550
16551 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16552 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
16553 _ACEOF
16554 sed -n '
16555 h
16556 s/^/S["/; s/!.*/"]=/
16557 p
16558 g
16559 s/^[^!]*!//
16560 :repl
16561 t repl
16562 s/'"$ac_delim"'$//
16563 t delim
16564 :nl
16565 h
16566 s/\(.\{148\}\)..*/\1/
16567 t more1
16568 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
16569 p
16570 n
16571 b repl
16572 :more1
16573 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16574 p
16575 g
16576 s/.\{148\}//
16577 t nl
16578 :delim
16579 h
16580 s/\(.\{148\}\)..*/\1/
16581 t more2
16582 s/["\\]/\\&/g; s/^/"/; s/$/"/
16583 p
16584 b
16585 :more2
16586 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16587 p
16588 g
16589 s/.\{148\}//
16590 t delim
16591 ' <conf$$subs.awk | sed '
16592 /^[^""]/{
16593   N
16594   s/\n//
16595 }
16596 ' >>$CONFIG_STATUS || ac_write_fail=1
16597 rm -f conf$$subs.awk
16598 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16599 _ACAWK
16600 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
16601   for (key in S) S_is_set[key] = 1
16602   FS = "\a"
16603
16604 }
16605 {
16606   line = $ 0
16607   nfields = split(line, field, "@")
16608   substed = 0
16609   len = length(field[1])
16610   for (i = 2; i < nfields; i++) {
16611     key = field[i]
16612     keylen = length(key)
16613     if (S_is_set[key]) {
16614       value = S[key]
16615       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
16616       len += length(value) + length(field[++i])
16617       substed = 1
16618     } else
16619       len += 1 + keylen
16620   }
16621
16622   print line
16623 }
16624
16625 _ACAWK
16626 _ACEOF
16627 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16628 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16629   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16630 else
16631   cat
16632 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
16633   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
16634 _ACEOF
16635
16636 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
16637 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
16638 # trailing colons and then remove the whole line if VPATH becomes empty
16639 # (actually we leave an empty line to preserve line numbers).
16640 if test "x$srcdir" = x.; then
16641   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
16642 h
16643 s///
16644 s/^/:/
16645 s/[      ]*$/:/
16646 s/:\$(srcdir):/:/g
16647 s/:\${srcdir}:/:/g
16648 s/:@srcdir@:/:/g
16649 s/^:*//
16650 s/:*$//
16651 x
16652 s/\(=[   ]*\).*/\1/
16653 G
16654 s/\n//
16655 s/^[^=]*=[       ]*$//
16656 }'
16657 fi
16658
16659 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16660 fi # test -n "$CONFIG_FILES"
16661
16662 # Set up the scripts for CONFIG_HEADERS section.
16663 # No need to generate them if there are no CONFIG_HEADERS.
16664 # This happens for instance with `./config.status Makefile'.
16665 if test -n "$CONFIG_HEADERS"; then
16666 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
16667 BEGIN {
16668 _ACEOF
16669
16670 # Transform confdefs.h into an awk script `defines.awk', embedded as
16671 # here-document in config.status, that substitutes the proper values into
16672 # config.h.in to produce config.h.
16673
16674 # Create a delimiter string that does not exist in confdefs.h, to ease
16675 # handling of long lines.
16676 ac_delim='%!_!# '
16677 for ac_last_try in false false :; do
16678   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
16679   if test -z "$ac_tt"; then
16680     break
16681   elif $ac_last_try; then
16682     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
16683   else
16684     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16685   fi
16686 done
16687
16688 # For the awk script, D is an array of macro values keyed by name,
16689 # likewise P contains macro parameters if any.  Preserve backslash
16690 # newline sequences.
16691
16692 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16693 sed -n '
16694 s/.\{148\}/&'"$ac_delim"'/g
16695 t rset
16696 :rset
16697 s/^[     ]*#[    ]*define[       ][      ]*/ /
16698 t def
16699 d
16700 :def
16701 s/\\$//
16702 t bsnl
16703 s/["\\]/\\&/g
16704 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
16705 D["\1"]=" \3"/p
16706 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
16707 d
16708 :bsnl
16709 s/["\\]/\\&/g
16710 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
16711 D["\1"]=" \3\\\\\\n"\\/p
16712 t cont
16713 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16714 t cont
16715 d
16716 :cont
16717 n
16718 s/.\{148\}/&'"$ac_delim"'/g
16719 t clear
16720 :clear
16721 s/\\$//
16722 t bsnlc
16723 s/["\\]/\\&/g; s/^/"/; s/$/"/p
16724 d
16725 :bsnlc
16726 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16727 b cont
16728 ' <confdefs.h | sed '
16729 s/'"$ac_delim"'/"\\\
16730 "/g' >>$CONFIG_STATUS || ac_write_fail=1
16731
16732 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16733   for (key in D) D_is_set[key] = 1
16734   FS = "\a"
16735 }
16736 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16737   line = \$ 0
16738   split(line, arg, " ")
16739   if (arg[1] == "#") {
16740     defundef = arg[2]
16741     mac1 = arg[3]
16742   } else {
16743     defundef = substr(arg[1], 2)
16744     mac1 = arg[2]
16745   }
16746   split(mac1, mac2, "(") #)
16747   macro = mac2[1]
16748   prefix = substr(line, 1, index(line, defundef) - 1)
16749   if (D_is_set[macro]) {
16750     # Preserve the white space surrounding the "#".
16751     print prefix "define", macro P[macro] D[macro]
16752     next
16753   } else {
16754     # Replace #undef with comments.  This is necessary, for example,
16755     # in the case of _POSIX_SOURCE, which is predefined and required
16756     # on some systems where configure will not decide to define it.
16757     if (defundef == "undef") {
16758       print "/*", prefix defundef, macro, "*/"
16759       next
16760     }
16761   }
16762 }
16763 { print }
16764 _ACAWK
16765 _ACEOF
16766 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16767   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
16768 fi # test -n "$CONFIG_HEADERS"
16769
16770
16771 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS  :L $CONFIG_LINKS  :C $CONFIG_COMMANDS"
16772 shift
16773 for ac_tag
16774 do
16775   case $ac_tag in
16776   :[FHLC]) ac_mode=$ac_tag; continue;;
16777   esac
16778   case $ac_mode$ac_tag in
16779   :[FHL]*:*);;
16780   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
16781   :[FH]-) ac_tag=-:-;;
16782   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16783   esac
16784   ac_save_IFS=$IFS
16785   IFS=:
16786   set x $ac_tag
16787   IFS=$ac_save_IFS
16788   shift
16789   ac_file=$1
16790   shift
16791
16792   case $ac_mode in
16793   :L) ac_source=$1;;
16794   :[FH])
16795     ac_file_inputs=
16796     for ac_f
16797     do
16798       case $ac_f in
16799       -) ac_f="$ac_tmp/stdin";;
16800       *) # Look for the file first in the build tree, then in the source tree
16801          # (if the path is not absolute).  The absolute path cannot be DOS-style,
16802          # because $ac_f cannot contain `:'.
16803          test -f "$ac_f" ||
16804            case $ac_f in
16805            [\\/$]*) false;;
16806            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16807            esac ||
16808            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
16809       esac
16810       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16811       as_fn_append ac_file_inputs " '$ac_f'"
16812     done
16813
16814     # Let's still pretend it is `configure' which instantiates (i.e., don't
16815     # use $as_me), people would be surprised to read:
16816     #    /* config.h.  Generated by config.status.  */
16817     configure_input='Generated from '`
16818           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16819         `' by configure.'
16820     if test x"$ac_file" != x-; then
16821       configure_input="$ac_file.  $configure_input"
16822       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16823 $as_echo "$as_me: creating $ac_file" >&6;}
16824     fi
16825     # Neutralize special characters interpreted by sed in replacement strings.
16826     case $configure_input in #(
16827     *\&* | *\|* | *\\* )
16828        ac_sed_conf_input=`$as_echo "$configure_input" |
16829        sed 's/[\\\\&|]/\\\\&/g'`;; #(
16830     *) ac_sed_conf_input=$configure_input;;
16831     esac
16832
16833     case $ac_tag in
16834     *:-:* | *:-) cat >"$ac_tmp/stdin" \
16835       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
16836     esac
16837     ;;
16838   esac
16839
16840   ac_dir=`$as_dirname -- "$ac_file" ||
16841 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16842          X"$ac_file" : 'X\(//\)[^/]' \| \
16843          X"$ac_file" : 'X\(//\)$' \| \
16844          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
16845 $as_echo X"$ac_file" |
16846     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16847             s//\1/
16848             q
16849           }
16850           /^X\(\/\/\)[^/].*/{
16851             s//\1/
16852             q
16853           }
16854           /^X\(\/\/\)$/{
16855             s//\1/
16856             q
16857           }
16858           /^X\(\/\).*/{
16859             s//\1/
16860             q
16861           }
16862           s/.*/./; q'`
16863   as_dir="$ac_dir"; as_fn_mkdir_p
16864   ac_builddir=.
16865
16866 case "$ac_dir" in
16867 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16868 *)
16869   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
16870   # A ".." for each directory in $ac_dir_suffix.
16871   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
16872   case $ac_top_builddir_sub in
16873   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16874   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16875   esac ;;
16876 esac
16877 ac_abs_top_builddir=$ac_pwd
16878 ac_abs_builddir=$ac_pwd$ac_dir_suffix
16879 # for backward compatibility:
16880 ac_top_builddir=$ac_top_build_prefix
16881
16882 case $srcdir in
16883   .)  # We are building in place.
16884     ac_srcdir=.
16885     ac_top_srcdir=$ac_top_builddir_sub
16886     ac_abs_top_srcdir=$ac_pwd ;;
16887   [\\/]* | ?:[\\/]* )  # Absolute name.
16888     ac_srcdir=$srcdir$ac_dir_suffix;
16889     ac_top_srcdir=$srcdir
16890     ac_abs_top_srcdir=$srcdir ;;
16891   *) # Relative name.
16892     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16893     ac_top_srcdir=$ac_top_build_prefix$srcdir
16894     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
16895 esac
16896 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
16897
16898
16899   case $ac_mode in
16900   :F)
16901   #
16902   # CONFIG_FILE
16903   #
16904
16905   case $INSTALL in
16906   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
16907   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
16908   esac
16909   ac_MKDIR_P=$MKDIR_P
16910   case $MKDIR_P in
16911   [\\/$]* | ?:[\\/]* ) ;;
16912   */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
16913   esac
16914 _ACEOF
16915
16916 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16917 # If the template does not know about datarootdir, expand it.
16918 # FIXME: This hack should be removed a few years after 2.60.
16919 ac_datarootdir_hack=; ac_datarootdir_seen=
16920 ac_sed_dataroot='
16921 /datarootdir/ {
16922   p
16923   q
16924 }
16925 /@datadir@/p
16926 /@docdir@/p
16927 /@infodir@/p
16928 /@localedir@/p
16929 /@mandir@/p'
16930 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
16931 *datarootdir*) ac_datarootdir_seen=yes;;
16932 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
16933   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16934 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
16935 _ACEOF
16936 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16937   ac_datarootdir_hack='
16938   s&@datadir@&$datadir&g
16939   s&@docdir@&$docdir&g
16940   s&@infodir@&$infodir&g
16941   s&@localedir@&$localedir&g
16942   s&@mandir@&$mandir&g
16943   s&\\\${datarootdir}&$datarootdir&g' ;;
16944 esac
16945 _ACEOF
16946
16947 # Neutralize VPATH when `$srcdir' = `.'.
16948 # Shell code in configure.ac might set extrasub.
16949 # FIXME: do we really want to maintain this feature?
16950 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16951 ac_sed_extra="$ac_vpsub
16952 $extrasub
16953 _ACEOF
16954 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16955 :t
16956 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
16957 s|@configure_input@|$ac_sed_conf_input|;t t
16958 s&@top_builddir@&$ac_top_builddir_sub&;t t
16959 s&@top_build_prefix@&$ac_top_build_prefix&;t t
16960 s&@srcdir@&$ac_srcdir&;t t
16961 s&@abs_srcdir@&$ac_abs_srcdir&;t t
16962 s&@top_srcdir@&$ac_top_srcdir&;t t
16963 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16964 s&@builddir@&$ac_builddir&;t t
16965 s&@abs_builddir@&$ac_abs_builddir&;t t
16966 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16967 s&@INSTALL@&$ac_INSTALL&;t t
16968 s&@MKDIR_P@&$ac_MKDIR_P&;t t
16969 $ac_datarootdir_hack
16970 "
16971 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16972   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16973
16974 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
16975   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16976   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
16977       "$ac_tmp/out"`; test -z "$ac_out"; } &&
16978   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
16979 which seems to be undefined.  Please make sure it is defined" >&5
16980 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
16981 which seems to be undefined.  Please make sure it is defined" >&2;}
16982
16983   rm -f "$ac_tmp/stdin"
16984   case $ac_file in
16985   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16986   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
16987   esac \
16988   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16989  ;;
16990   :H)
16991   #
16992   # CONFIG_HEADER
16993   #
16994   if test x"$ac_file" != x-; then
16995     {
16996       $as_echo "/* $configure_input  */" \
16997       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16998     } >"$ac_tmp/config.h" \
16999       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
17000     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
17001       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17002 $as_echo "$as_me: $ac_file is unchanged" >&6;}
17003     else
17004       rm -f "$ac_file"
17005       mv "$ac_tmp/config.h" "$ac_file" \
17006         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
17007     fi
17008   else
17009     $as_echo "/* $configure_input  */" \
17010       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
17011       || as_fn_error $? "could not create -" "$LINENO" 5
17012   fi
17013  ;;
17014   :L)
17015   #
17016   # CONFIG_LINK
17017   #
17018
17019   if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
17020     :
17021   else
17022     # Prefer the file from the source tree if names are identical.
17023     if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
17024       ac_source=$srcdir/$ac_source
17025     fi
17026
17027     { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
17028 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
17029
17030     if test ! -r "$ac_source"; then
17031       as_fn_error $? "$ac_source: file not found" "$LINENO" 5
17032     fi
17033     rm -f "$ac_file"
17034
17035     # Try a relative symlink, then a hard link, then a copy.
17036     case $ac_source in
17037     [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
17038         *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
17039     esac
17040     ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
17041       ln "$ac_source" "$ac_file" 2>/dev/null ||
17042       cp -p "$ac_source" "$ac_file" ||
17043       as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
17044   fi
17045  ;;
17046   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
17047 $as_echo "$as_me: executing $ac_file commands" >&6;}
17048  ;;
17049   esac
17050
17051
17052   case $ac_file$ac_mode in
17053     "check_win32_symlinks":C)
17054 # Links sometimes fail undetected on Mingw -
17055 # so here we detect it and warn the user
17056 for FILE in $CONFIG_LINKS
17057  do
17058         # test -e works for symlinks in the MinGW console
17059         test -e `expr "$FILE" : '\([^:]*\)'` || { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** link for $FILE -- please fix by hand" >&5
17060 $as_echo "$as_me: WARNING: *** link for $FILE -- please fix by hand" >&2;}
17061  done
17062  ;;
17063     "src/include/pg_config.h":H)
17064 # Update timestamp for pg_config.h (see Makefile.global)
17065 echo >src/include/stamp-h
17066  ;;
17067     "src/include/pg_config_ext.h":H)
17068 # Update timestamp for pg_config_ext.h (see Makefile.global)
17069 echo >src/include/stamp-ext-h
17070  ;;
17071     "src/interfaces/ecpg/include/ecpg_config.h":H) echo >src/interfaces/ecpg/include/stamp-h ;;
17072
17073   esac
17074 done # for ac_tag
17075
17076
17077 as_fn_exit 0
17078 _ACEOF
17079 ac_clean_files=$ac_clean_files_save
17080
17081 test $ac_write_fail = 0 ||
17082   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
17083
17084
17085 # configure is writing to config.log, and then calls config.status.
17086 # config.status does its own redirection, appending to config.log.
17087 # Unfortunately, on DOS this fails, as config.log is still kept open
17088 # by configure, so config.status won't be able to write to it; its
17089 # output is simply discarded.  So we exec the FD to /dev/null,
17090 # effectively closing config.log, so it can be properly (re)opened and
17091 # appended to by config.status.  When coming back to configure, we
17092 # need to make the FD available again.
17093 if test "$no_create" != yes; then
17094   ac_cs_success=:
17095   ac_config_status_args=
17096   test "$silent" = yes &&
17097     ac_config_status_args="$ac_config_status_args --quiet"
17098   exec 5>/dev/null
17099   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
17100   exec 5>>config.log
17101   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17102   # would make configure fail if this is the last instruction.
17103   $ac_cs_success || as_fn_exit 1
17104 fi
17105 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17106   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17107 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
17108 fi
17109