]> granicus.if.org Git - postgresql/blob - configure
Remove "sco" and "unixware" ports.
[postgresql] / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69 for PostgreSQL 10devel.
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-2016, 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='10devel'
586 PACKAGE_STRING='PostgreSQL 10devel'
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 with_gnu_ld
698 LD
699 LDFLAGS_SL
700 LDFLAGS_EX
701 ELF_SYS
702 EGREP
703 GREP
704 with_zlib
705 with_system_tzdata
706 with_libxslt
707 with_libxml
708 XML2_CONFIG
709 UUID_EXTRA_OBJS
710 with_uuid
711 with_systemd
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_bsd_auth
830 with_ldap
831 with_bonjour
832 with_openssl
833 with_selinux
834 with_systemd
835 with_readline
836 with_libedit_preferred
837 with_uuid
838 with_ossp_uuid
839 with_libxml
840 with_libxslt
841 with_system_tzdata
842 with_zlib
843 with_gnu_ld
844 enable_largefile
845 enable_float4_byval
846 enable_float8_byval
847 '
848       ac_precious_vars='build_alias
849 host_alias
850 target_alias
851 CC
852 CFLAGS
853 LDFLAGS
854 LIBS
855 CPPFLAGS
856 CPP
857 LDFLAGS_EX
858 LDFLAGS_SL
859 DOCBOOKSTYLE'
860
861
862 # Initialize some variables set by options.
863 ac_init_help=
864 ac_init_version=false
865 ac_unrecognized_opts=
866 ac_unrecognized_sep=
867 # The variables have the same names as the options, with
868 # dashes changed to underlines.
869 cache_file=/dev/null
870 exec_prefix=NONE
871 no_create=
872 no_recursion=
873 prefix=NONE
874 program_prefix=NONE
875 program_suffix=NONE
876 program_transform_name=s,x,x,
877 silent=
878 site=
879 srcdir=
880 verbose=
881 x_includes=NONE
882 x_libraries=NONE
883
884 # Installation directory options.
885 # These are left unexpanded so users can "make install exec_prefix=/foo"
886 # and all the variables that are supposed to be based on exec_prefix
887 # by default will actually change.
888 # Use braces instead of parens because sh, perl, etc. also accept them.
889 # (The list follows the same order as the GNU Coding Standards.)
890 bindir='${exec_prefix}/bin'
891 sbindir='${exec_prefix}/sbin'
892 libexecdir='${exec_prefix}/libexec'
893 datarootdir='${prefix}/share'
894 datadir='${datarootdir}'
895 sysconfdir='${prefix}/etc'
896 sharedstatedir='${prefix}/com'
897 localstatedir='${prefix}/var'
898 includedir='${prefix}/include'
899 oldincludedir='/usr/include'
900 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
901 infodir='${datarootdir}/info'
902 htmldir='${docdir}'
903 dvidir='${docdir}'
904 pdfdir='${docdir}'
905 psdir='${docdir}'
906 libdir='${exec_prefix}/lib'
907 localedir='${datarootdir}/locale'
908 mandir='${datarootdir}/man'
909
910 ac_prev=
911 ac_dashdash=
912 for ac_option
913 do
914   # If the previous option needs an argument, assign it.
915   if test -n "$ac_prev"; then
916     eval $ac_prev=\$ac_option
917     ac_prev=
918     continue
919   fi
920
921   case $ac_option in
922   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
923   *=)   ac_optarg= ;;
924   *)    ac_optarg=yes ;;
925   esac
926
927   # Accept the important Cygnus configure options, so we can diagnose typos.
928
929   case $ac_dashdash$ac_option in
930   --)
931     ac_dashdash=yes ;;
932
933   -bindir | --bindir | --bindi | --bind | --bin | --bi)
934     ac_prev=bindir ;;
935   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
936     bindir=$ac_optarg ;;
937
938   -build | --build | --buil | --bui | --bu)
939     ac_prev=build_alias ;;
940   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
941     build_alias=$ac_optarg ;;
942
943   -cache-file | --cache-file | --cache-fil | --cache-fi \
944   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
945     ac_prev=cache_file ;;
946   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
947   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
948     cache_file=$ac_optarg ;;
949
950   --config-cache | -C)
951     cache_file=config.cache ;;
952
953   -datadir | --datadir | --datadi | --datad)
954     ac_prev=datadir ;;
955   -datadir=* | --datadir=* | --datadi=* | --datad=*)
956     datadir=$ac_optarg ;;
957
958   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
959   | --dataroo | --dataro | --datar)
960     ac_prev=datarootdir ;;
961   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
962   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
963     datarootdir=$ac_optarg ;;
964
965   -disable-* | --disable-*)
966     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
967     # Reject names that are not valid shell variable names.
968     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
969       as_fn_error $? "invalid feature name: $ac_useropt"
970     ac_useropt_orig=$ac_useropt
971     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
972     case $ac_user_opts in
973       *"
974 "enable_$ac_useropt"
975 "*) ;;
976       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
977          ac_unrecognized_sep=', ';;
978     esac
979     eval enable_$ac_useropt=no ;;
980
981   -docdir | --docdir | --docdi | --doc | --do)
982     ac_prev=docdir ;;
983   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
984     docdir=$ac_optarg ;;
985
986   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
987     ac_prev=dvidir ;;
988   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
989     dvidir=$ac_optarg ;;
990
991   -enable-* | --enable-*)
992     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
993     # Reject names that are not valid shell variable names.
994     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
995       as_fn_error $? "invalid feature name: $ac_useropt"
996     ac_useropt_orig=$ac_useropt
997     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
998     case $ac_user_opts in
999       *"
1000 "enable_$ac_useropt"
1001 "*) ;;
1002       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1003          ac_unrecognized_sep=', ';;
1004     esac
1005     eval enable_$ac_useropt=\$ac_optarg ;;
1006
1007   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1008   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1009   | --exec | --exe | --ex)
1010     ac_prev=exec_prefix ;;
1011   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1012   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1013   | --exec=* | --exe=* | --ex=*)
1014     exec_prefix=$ac_optarg ;;
1015
1016   -gas | --gas | --ga | --g)
1017     # Obsolete; use --with-gas.
1018     with_gas=yes ;;
1019
1020   -help | --help | --hel | --he | -h)
1021     ac_init_help=long ;;
1022   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1023     ac_init_help=recursive ;;
1024   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1025     ac_init_help=short ;;
1026
1027   -host | --host | --hos | --ho)
1028     ac_prev=host_alias ;;
1029   -host=* | --host=* | --hos=* | --ho=*)
1030     host_alias=$ac_optarg ;;
1031
1032   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1033     ac_prev=htmldir ;;
1034   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1035   | --ht=*)
1036     htmldir=$ac_optarg ;;
1037
1038   -includedir | --includedir | --includedi | --included | --include \
1039   | --includ | --inclu | --incl | --inc)
1040     ac_prev=includedir ;;
1041   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1042   | --includ=* | --inclu=* | --incl=* | --inc=*)
1043     includedir=$ac_optarg ;;
1044
1045   -infodir | --infodir | --infodi | --infod | --info | --inf)
1046     ac_prev=infodir ;;
1047   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1048     infodir=$ac_optarg ;;
1049
1050   -libdir | --libdir | --libdi | --libd)
1051     ac_prev=libdir ;;
1052   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1053     libdir=$ac_optarg ;;
1054
1055   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1056   | --libexe | --libex | --libe)
1057     ac_prev=libexecdir ;;
1058   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1059   | --libexe=* | --libex=* | --libe=*)
1060     libexecdir=$ac_optarg ;;
1061
1062   -localedir | --localedir | --localedi | --localed | --locale)
1063     ac_prev=localedir ;;
1064   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1065     localedir=$ac_optarg ;;
1066
1067   -localstatedir | --localstatedir | --localstatedi | --localstated \
1068   | --localstate | --localstat | --localsta | --localst | --locals)
1069     ac_prev=localstatedir ;;
1070   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1071   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1072     localstatedir=$ac_optarg ;;
1073
1074   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1075     ac_prev=mandir ;;
1076   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1077     mandir=$ac_optarg ;;
1078
1079   -nfp | --nfp | --nf)
1080     # Obsolete; use --without-fp.
1081     with_fp=no ;;
1082
1083   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1084   | --no-cr | --no-c | -n)
1085     no_create=yes ;;
1086
1087   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1088   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1089     no_recursion=yes ;;
1090
1091   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1092   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1093   | --oldin | --oldi | --old | --ol | --o)
1094     ac_prev=oldincludedir ;;
1095   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1096   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1097   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1098     oldincludedir=$ac_optarg ;;
1099
1100   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1101     ac_prev=prefix ;;
1102   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1103     prefix=$ac_optarg ;;
1104
1105   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1106   | --program-pre | --program-pr | --program-p)
1107     ac_prev=program_prefix ;;
1108   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1109   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1110     program_prefix=$ac_optarg ;;
1111
1112   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1113   | --program-suf | --program-su | --program-s)
1114     ac_prev=program_suffix ;;
1115   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1116   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1117     program_suffix=$ac_optarg ;;
1118
1119   -program-transform-name | --program-transform-name \
1120   | --program-transform-nam | --program-transform-na \
1121   | --program-transform-n | --program-transform- \
1122   | --program-transform | --program-transfor \
1123   | --program-transfo | --program-transf \
1124   | --program-trans | --program-tran \
1125   | --progr-tra | --program-tr | --program-t)
1126     ac_prev=program_transform_name ;;
1127   -program-transform-name=* | --program-transform-name=* \
1128   | --program-transform-nam=* | --program-transform-na=* \
1129   | --program-transform-n=* | --program-transform-=* \
1130   | --program-transform=* | --program-transfor=* \
1131   | --program-transfo=* | --program-transf=* \
1132   | --program-trans=* | --program-tran=* \
1133   | --progr-tra=* | --program-tr=* | --program-t=*)
1134     program_transform_name=$ac_optarg ;;
1135
1136   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1137     ac_prev=pdfdir ;;
1138   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1139     pdfdir=$ac_optarg ;;
1140
1141   -psdir | --psdir | --psdi | --psd | --ps)
1142     ac_prev=psdir ;;
1143   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1144     psdir=$ac_optarg ;;
1145
1146   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1147   | -silent | --silent | --silen | --sile | --sil)
1148     silent=yes ;;
1149
1150   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1151     ac_prev=sbindir ;;
1152   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1153   | --sbi=* | --sb=*)
1154     sbindir=$ac_optarg ;;
1155
1156   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1157   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1158   | --sharedst | --shareds | --shared | --share | --shar \
1159   | --sha | --sh)
1160     ac_prev=sharedstatedir ;;
1161   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1162   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1163   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1164   | --sha=* | --sh=*)
1165     sharedstatedir=$ac_optarg ;;
1166
1167   -site | --site | --sit)
1168     ac_prev=site ;;
1169   -site=* | --site=* | --sit=*)
1170     site=$ac_optarg ;;
1171
1172   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1173     ac_prev=srcdir ;;
1174   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1175     srcdir=$ac_optarg ;;
1176
1177   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1178   | --syscon | --sysco | --sysc | --sys | --sy)
1179     ac_prev=sysconfdir ;;
1180   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1181   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1182     sysconfdir=$ac_optarg ;;
1183
1184   -target | --target | --targe | --targ | --tar | --ta | --t)
1185     ac_prev=target_alias ;;
1186   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1187     target_alias=$ac_optarg ;;
1188
1189   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1190     verbose=yes ;;
1191
1192   -version | --version | --versio | --versi | --vers | -V)
1193     ac_init_version=: ;;
1194
1195   -with-* | --with-*)
1196     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1197     # Reject names that are not valid shell variable names.
1198     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1199       as_fn_error $? "invalid package name: $ac_useropt"
1200     ac_useropt_orig=$ac_useropt
1201     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1202     case $ac_user_opts in
1203       *"
1204 "with_$ac_useropt"
1205 "*) ;;
1206       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1207          ac_unrecognized_sep=', ';;
1208     esac
1209     eval with_$ac_useropt=\$ac_optarg ;;
1210
1211   -without-* | --without-*)
1212     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1213     # Reject names that are not valid shell variable names.
1214     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1215       as_fn_error $? "invalid package name: $ac_useropt"
1216     ac_useropt_orig=$ac_useropt
1217     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1218     case $ac_user_opts in
1219       *"
1220 "with_$ac_useropt"
1221 "*) ;;
1222       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1223          ac_unrecognized_sep=', ';;
1224     esac
1225     eval with_$ac_useropt=no ;;
1226
1227   --x)
1228     # Obsolete; use --with-x.
1229     with_x=yes ;;
1230
1231   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1232   | --x-incl | --x-inc | --x-in | --x-i)
1233     ac_prev=x_includes ;;
1234   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1235   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1236     x_includes=$ac_optarg ;;
1237
1238   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1239   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1240     ac_prev=x_libraries ;;
1241   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1242   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1243     x_libraries=$ac_optarg ;;
1244
1245   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1246 Try \`$0 --help' for more information"
1247     ;;
1248
1249   *=*)
1250     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1251     # Reject names that are not valid shell variable names.
1252     case $ac_envvar in #(
1253       '' | [0-9]* | *[!_$as_cr_alnum]* )
1254       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1255     esac
1256     eval $ac_envvar=\$ac_optarg
1257     export $ac_envvar ;;
1258
1259   *)
1260     # FIXME: should be removed in autoconf 3.0.
1261     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1262     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1263       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1264     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1265     ;;
1266
1267   esac
1268 done
1269
1270 if test -n "$ac_prev"; then
1271   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1272   as_fn_error $? "missing argument to $ac_option"
1273 fi
1274
1275 if test -n "$ac_unrecognized_opts"; then
1276   case $enable_option_checking in
1277     no) ;;
1278     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1279     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1280   esac
1281 fi
1282
1283 # Check all directory arguments for consistency.
1284 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1285                 datadir sysconfdir sharedstatedir localstatedir includedir \
1286                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1287                 libdir localedir mandir
1288 do
1289   eval ac_val=\$$ac_var
1290   # Remove trailing slashes.
1291   case $ac_val in
1292     */ )
1293       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1294       eval $ac_var=\$ac_val;;
1295   esac
1296   # Be sure to have absolute directory names.
1297   case $ac_val in
1298     [\\/$]* | ?:[\\/]* )  continue;;
1299     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1300   esac
1301   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1302 done
1303
1304 # There might be people who depend on the old broken behavior: `$host'
1305 # used to hold the argument of --host etc.
1306 # FIXME: To remove some day.
1307 build=$build_alias
1308 host=$host_alias
1309 target=$target_alias
1310
1311 # FIXME: To remove some day.
1312 if test "x$host_alias" != x; then
1313   if test "x$build_alias" = x; then
1314     cross_compiling=maybe
1315   elif test "x$build_alias" != "x$host_alias"; then
1316     cross_compiling=yes
1317   fi
1318 fi
1319
1320 ac_tool_prefix=
1321 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1322
1323 test "$silent" = yes && exec 6>/dev/null
1324
1325
1326 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1327 ac_ls_di=`ls -di .` &&
1328 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1329   as_fn_error $? "working directory cannot be determined"
1330 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1331   as_fn_error $? "pwd does not report name of working directory"
1332
1333
1334 # Find the source files, if location was not specified.
1335 if test -z "$srcdir"; then
1336   ac_srcdir_defaulted=yes
1337   # Try the directory containing this script, then the parent directory.
1338   ac_confdir=`$as_dirname -- "$as_myself" ||
1339 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1340          X"$as_myself" : 'X\(//\)[^/]' \| \
1341          X"$as_myself" : 'X\(//\)$' \| \
1342          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1343 $as_echo X"$as_myself" |
1344     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1345             s//\1/
1346             q
1347           }
1348           /^X\(\/\/\)[^/].*/{
1349             s//\1/
1350             q
1351           }
1352           /^X\(\/\/\)$/{
1353             s//\1/
1354             q
1355           }
1356           /^X\(\/\).*/{
1357             s//\1/
1358             q
1359           }
1360           s/.*/./; q'`
1361   srcdir=$ac_confdir
1362   if test ! -r "$srcdir/$ac_unique_file"; then
1363     srcdir=..
1364   fi
1365 else
1366   ac_srcdir_defaulted=no
1367 fi
1368 if test ! -r "$srcdir/$ac_unique_file"; then
1369   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1370   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1371 fi
1372 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1373 ac_abs_confdir=`(
1374         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1375         pwd)`
1376 # When building in place, set srcdir=.
1377 if test "$ac_abs_confdir" = "$ac_pwd"; then
1378   srcdir=.
1379 fi
1380 # Remove unnecessary trailing slashes from srcdir.
1381 # Double slashes in file names in object file debugging info
1382 # mess up M-x gdb in Emacs.
1383 case $srcdir in
1384 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1385 esac
1386 for ac_var in $ac_precious_vars; do
1387   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1388   eval ac_env_${ac_var}_value=\$${ac_var}
1389   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1390   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1391 done
1392
1393 #
1394 # Report the --help message.
1395 #
1396 if test "$ac_init_help" = "long"; then
1397   # Omit some internal or obsolete options to make the list less imposing.
1398   # This message is too long to be a string in the A/UX 3.1 sh.
1399   cat <<_ACEOF
1400 \`configure' configures PostgreSQL 10devel to adapt to many kinds of systems.
1401
1402 Usage: $0 [OPTION]... [VAR=VALUE]...
1403
1404 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1405 VAR=VALUE.  See below for descriptions of some of the useful variables.
1406
1407 Defaults for the options are specified in brackets.
1408
1409 Configuration:
1410   -h, --help              display this help and exit
1411       --help=short        display options specific to this package
1412       --help=recursive    display the short help of all the included packages
1413   -V, --version           display version information and exit
1414   -q, --quiet, --silent   do not print \`checking ...' messages
1415       --cache-file=FILE   cache test results in FILE [disabled]
1416   -C, --config-cache      alias for \`--cache-file=config.cache'
1417   -n, --no-create         do not create output files
1418       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1419
1420 Installation directories:
1421   --prefix=PREFIX         install architecture-independent files in PREFIX
1422                           [$ac_default_prefix]
1423   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1424                           [PREFIX]
1425
1426 By default, \`make install' will install all the files in
1427 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1428 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1429 for instance \`--prefix=\$HOME'.
1430
1431 For better control, use the options below.
1432
1433 Fine tuning of the installation directories:
1434   --bindir=DIR            user executables [EPREFIX/bin]
1435   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1436   --libexecdir=DIR        program executables [EPREFIX/libexec]
1437   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1438   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1439   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1440   --libdir=DIR            object code libraries [EPREFIX/lib]
1441   --includedir=DIR        C header files [PREFIX/include]
1442   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1443   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1444   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1445   --infodir=DIR           info documentation [DATAROOTDIR/info]
1446   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1447   --mandir=DIR            man documentation [DATAROOTDIR/man]
1448   --docdir=DIR            documentation root [DATAROOTDIR/doc/postgresql]
1449   --htmldir=DIR           html documentation [DOCDIR]
1450   --dvidir=DIR            dvi documentation [DOCDIR]
1451   --pdfdir=DIR            pdf documentation [DOCDIR]
1452   --psdir=DIR             ps documentation [DOCDIR]
1453 _ACEOF
1454
1455   cat <<\_ACEOF
1456
1457 System types:
1458   --build=BUILD     configure for building on BUILD [guessed]
1459   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1460 _ACEOF
1461 fi
1462
1463 if test -n "$ac_init_help"; then
1464   case $ac_init_help in
1465      short | recursive ) echo "Configuration of PostgreSQL 10devel:";;
1466    esac
1467   cat <<\_ACEOF
1468
1469 Optional Features:
1470   --disable-option-checking  ignore unrecognized --enable/--with options
1471   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1472   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1473   --disable-integer-datetimes
1474                           disable 64-bit integer date/time support
1475   --enable-nls[=LANGUAGES]
1476                           enable Native Language Support
1477   --disable-rpath         do not embed shared library search path in
1478                           executables
1479   --disable-spinlocks     do not use spinlocks
1480   --disable-atomics       do not use atomic operations
1481   --enable-debug          build with debugging symbols (-g)
1482   --enable-profiling      build with profiling enabled
1483   --enable-coverage       build with coverage testing instrumentation
1484   --enable-dtrace         build with DTrace support
1485   --enable-tap-tests      enable TAP tests (requires Perl and IPC::Run)
1486   --enable-depend         turn on automatic dependency tracking
1487   --enable-cassert        enable assertion checks (for debugging)
1488   --disable-thread-safety disable thread-safety in client libraries
1489   --disable-largefile     omit support for large files
1490   --disable-float4-byval  disable float4 passed by value
1491   --disable-float8-byval  disable float8 passed by value
1492
1493 Optional Packages:
1494   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1495   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1496   --with-extra-version=STRING
1497                           append STRING to version
1498   --with-template=NAME    override operating system template
1499   --with-includes=DIRS    look for additional header files in DIRS
1500   --with-libraries=DIRS   look for additional libraries in DIRS
1501   --with-libs=DIRS        alternative spelling of --with-libraries
1502   --with-pgport=PORTNUM   set default port number [5432]
1503   --with-blocksize=BLOCKSIZE
1504                           set table block size in kB [8]
1505   --with-segsize=SEGSIZE  set table segment size in GB [1]
1506   --with-wal-blocksize=BLOCKSIZE
1507                           set WAL block size in kB [8]
1508   --with-wal-segsize=SEGSIZE
1509                           set WAL segment size in MB [16]
1510   --with-CC=CMD           set compiler (deprecated)
1511   --with-tcl              build Tcl modules (PL/Tcl)
1512   --with-tclconfig=DIR    tclConfig.sh is in DIR
1513   --with-perl             build Perl modules (PL/Perl)
1514   --with-python           build Python modules (PL/Python)
1515   --with-gssapi           build with GSSAPI support
1516   --with-krb-srvnam=NAME  default service principal name in Kerberos (GSSAPI)
1517                           [postgres]
1518   --with-pam              build with PAM support
1519   --with-bsd-auth         build with BSD Authentication support
1520   --with-ldap             build with LDAP support
1521   --with-bonjour          build with Bonjour support
1522   --with-openssl          build with OpenSSL support
1523   --with-selinux          build with SELinux support
1524   --with-systemd          build with systemd support
1525   --without-readline      do not use GNU Readline nor BSD Libedit for editing
1526   --with-libedit-preferred
1527                           prefer BSD Libedit over GNU Readline
1528   --with-uuid=LIB         build contrib/uuid-ossp using LIB (bsd,e2fs,ossp)
1529   --with-ossp-uuid        obsolete spelling of --with-uuid=ossp
1530   --with-libxml           build with XML support
1531   --with-libxslt          use XSLT support when building contrib/xml2
1532   --with-system-tzdata=DIR
1533                           use system time zone data in DIR
1534   --without-zlib          do not use Zlib
1535   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1536
1537 Some influential environment variables:
1538   CC          C compiler command
1539   CFLAGS      C compiler flags
1540   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1541               nonstandard directory <lib dir>
1542   LIBS        libraries to pass to the linker, e.g. -l<library>
1543   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1544               you have headers in a nonstandard directory <include dir>
1545   CPP         C preprocessor
1546   LDFLAGS_EX  extra linker flags for linking executables only
1547   LDFLAGS_SL  extra linker flags for linking shared libraries only
1548   DOCBOOKSTYLE
1549               location of DocBook stylesheets
1550
1551 Use these variables to override the choices made by `configure' or to help
1552 it to find libraries and programs with nonstandard names/locations.
1553
1554 Report bugs to <pgsql-bugs@postgresql.org>.
1555 _ACEOF
1556 ac_status=$?
1557 fi
1558
1559 if test "$ac_init_help" = "recursive"; then
1560   # If there are subdirs, report their specific --help.
1561   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1562     test -d "$ac_dir" ||
1563       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1564       continue
1565     ac_builddir=.
1566
1567 case "$ac_dir" in
1568 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1569 *)
1570   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1571   # A ".." for each directory in $ac_dir_suffix.
1572   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1573   case $ac_top_builddir_sub in
1574   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1575   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1576   esac ;;
1577 esac
1578 ac_abs_top_builddir=$ac_pwd
1579 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1580 # for backward compatibility:
1581 ac_top_builddir=$ac_top_build_prefix
1582
1583 case $srcdir in
1584   .)  # We are building in place.
1585     ac_srcdir=.
1586     ac_top_srcdir=$ac_top_builddir_sub
1587     ac_abs_top_srcdir=$ac_pwd ;;
1588   [\\/]* | ?:[\\/]* )  # Absolute name.
1589     ac_srcdir=$srcdir$ac_dir_suffix;
1590     ac_top_srcdir=$srcdir
1591     ac_abs_top_srcdir=$srcdir ;;
1592   *) # Relative name.
1593     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1594     ac_top_srcdir=$ac_top_build_prefix$srcdir
1595     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1596 esac
1597 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1598
1599     cd "$ac_dir" || { ac_status=$?; continue; }
1600     # Check for guested configure.
1601     if test -f "$ac_srcdir/configure.gnu"; then
1602       echo &&
1603       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1604     elif test -f "$ac_srcdir/configure"; then
1605       echo &&
1606       $SHELL "$ac_srcdir/configure" --help=recursive
1607     else
1608       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1609     fi || ac_status=$?
1610     cd "$ac_pwd" || { ac_status=$?; break; }
1611   done
1612 fi
1613
1614 test -n "$ac_init_help" && exit $ac_status
1615 if $ac_init_version; then
1616   cat <<\_ACEOF
1617 PostgreSQL configure 10devel
1618 generated by GNU Autoconf 2.69
1619
1620 Copyright (C) 2012 Free Software Foundation, Inc.
1621 This configure script is free software; the Free Software Foundation
1622 gives unlimited permission to copy, distribute and modify it.
1623
1624 Copyright (c) 1996-2016, PostgreSQL Global Development Group
1625 _ACEOF
1626   exit
1627 fi
1628
1629 ## ------------------------ ##
1630 ## Autoconf initialization. ##
1631 ## ------------------------ ##
1632
1633 # ac_fn_c_try_compile LINENO
1634 # --------------------------
1635 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1636 ac_fn_c_try_compile ()
1637 {
1638   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1639   rm -f conftest.$ac_objext
1640   if { { ac_try="$ac_compile"
1641 case "(($ac_try" in
1642   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1643   *) ac_try_echo=$ac_try;;
1644 esac
1645 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1646 $as_echo "$ac_try_echo"; } >&5
1647   (eval "$ac_compile") 2>conftest.err
1648   ac_status=$?
1649   if test -s conftest.err; then
1650     grep -v '^ *+' conftest.err >conftest.er1
1651     cat conftest.er1 >&5
1652     mv -f conftest.er1 conftest.err
1653   fi
1654   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1655   test $ac_status = 0; } && {
1656          test -z "$ac_c_werror_flag" ||
1657          test ! -s conftest.err
1658        } && test -s conftest.$ac_objext; then :
1659   ac_retval=0
1660 else
1661   $as_echo "$as_me: failed program was:" >&5
1662 sed 's/^/| /' conftest.$ac_ext >&5
1663
1664         ac_retval=1
1665 fi
1666   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1667   as_fn_set_status $ac_retval
1668
1669 } # ac_fn_c_try_compile
1670
1671 # ac_fn_c_try_link LINENO
1672 # -----------------------
1673 # Try to link conftest.$ac_ext, and return whether this succeeded.
1674 ac_fn_c_try_link ()
1675 {
1676   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1677   rm -f conftest.$ac_objext conftest$ac_exeext
1678   if { { ac_try="$ac_link"
1679 case "(($ac_try" in
1680   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1681   *) ac_try_echo=$ac_try;;
1682 esac
1683 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1684 $as_echo "$ac_try_echo"; } >&5
1685   (eval "$ac_link") 2>conftest.err
1686   ac_status=$?
1687   if test -s conftest.err; then
1688     grep -v '^ *+' conftest.err >conftest.er1
1689     cat conftest.er1 >&5
1690     mv -f conftest.er1 conftest.err
1691   fi
1692   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1693   test $ac_status = 0; } && {
1694          test -z "$ac_c_werror_flag" ||
1695          test ! -s conftest.err
1696        } && test -s conftest$ac_exeext && {
1697          test "$cross_compiling" = yes ||
1698          test -x conftest$ac_exeext
1699        }; then :
1700   ac_retval=0
1701 else
1702   $as_echo "$as_me: failed program was:" >&5
1703 sed 's/^/| /' conftest.$ac_ext >&5
1704
1705         ac_retval=1
1706 fi
1707   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1708   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1709   # interfere with the next link command; also delete a directory that is
1710   # left behind by Apple's compiler.  We do this before executing the actions.
1711   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1712   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1713   as_fn_set_status $ac_retval
1714
1715 } # ac_fn_c_try_link
1716
1717 # ac_fn_c_try_cpp LINENO
1718 # ----------------------
1719 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1720 ac_fn_c_try_cpp ()
1721 {
1722   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1723   if { { ac_try="$ac_cpp conftest.$ac_ext"
1724 case "(($ac_try" in
1725   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1726   *) ac_try_echo=$ac_try;;
1727 esac
1728 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1729 $as_echo "$ac_try_echo"; } >&5
1730   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1731   ac_status=$?
1732   if test -s conftest.err; then
1733     grep -v '^ *+' conftest.err >conftest.er1
1734     cat conftest.er1 >&5
1735     mv -f conftest.er1 conftest.err
1736   fi
1737   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1738   test $ac_status = 0; } > conftest.i && {
1739          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1740          test ! -s conftest.err
1741        }; then :
1742   ac_retval=0
1743 else
1744   $as_echo "$as_me: failed program was:" >&5
1745 sed 's/^/| /' conftest.$ac_ext >&5
1746
1747     ac_retval=1
1748 fi
1749   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1750   as_fn_set_status $ac_retval
1751
1752 } # ac_fn_c_try_cpp
1753
1754 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1755 # -------------------------------------------------------
1756 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1757 # the include files in INCLUDES and setting the cache variable VAR
1758 # accordingly.
1759 ac_fn_c_check_header_mongrel ()
1760 {
1761   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1762   if eval \${$3+:} false; then :
1763   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1764 $as_echo_n "checking for $2... " >&6; }
1765 if eval \${$3+:} false; then :
1766   $as_echo_n "(cached) " >&6
1767 fi
1768 eval ac_res=\$$3
1769                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1770 $as_echo "$ac_res" >&6; }
1771 else
1772   # Is the header compilable?
1773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1774 $as_echo_n "checking $2 usability... " >&6; }
1775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1776 /* end confdefs.h.  */
1777 $4
1778 #include <$2>
1779 _ACEOF
1780 if ac_fn_c_try_compile "$LINENO"; then :
1781   ac_header_compiler=yes
1782 else
1783   ac_header_compiler=no
1784 fi
1785 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1787 $as_echo "$ac_header_compiler" >&6; }
1788
1789 # Is the header present?
1790 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1791 $as_echo_n "checking $2 presence... " >&6; }
1792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1793 /* end confdefs.h.  */
1794 #include <$2>
1795 _ACEOF
1796 if ac_fn_c_try_cpp "$LINENO"; then :
1797   ac_header_preproc=yes
1798 else
1799   ac_header_preproc=no
1800 fi
1801 rm -f conftest.err conftest.i conftest.$ac_ext
1802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1803 $as_echo "$ac_header_preproc" >&6; }
1804
1805 # So?  What about this header?
1806 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1807   yes:no: )
1808     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1809 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1810     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1811 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1812     ;;
1813   no:yes:* )
1814     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1815 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1816     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1817 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1818     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1819 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1820     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1821 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1822     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1823 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1824 ( $as_echo "## ---------------------------------------- ##
1825 ## Report this to pgsql-bugs@postgresql.org ##
1826 ## ---------------------------------------- ##"
1827      ) | sed "s/^/$as_me: WARNING:     /" >&2
1828     ;;
1829 esac
1830   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1831 $as_echo_n "checking for $2... " >&6; }
1832 if eval \${$3+:} false; then :
1833   $as_echo_n "(cached) " >&6
1834 else
1835   eval "$3=\$ac_header_compiler"
1836 fi
1837 eval ac_res=\$$3
1838                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1839 $as_echo "$ac_res" >&6; }
1840 fi
1841   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1842
1843 } # ac_fn_c_check_header_mongrel
1844
1845 # ac_fn_c_try_run LINENO
1846 # ----------------------
1847 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1848 # that executables *can* be run.
1849 ac_fn_c_try_run ()
1850 {
1851   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1852   if { { ac_try="$ac_link"
1853 case "(($ac_try" in
1854   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1855   *) ac_try_echo=$ac_try;;
1856 esac
1857 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1858 $as_echo "$ac_try_echo"; } >&5
1859   (eval "$ac_link") 2>&5
1860   ac_status=$?
1861   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1862   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1863   { { case "(($ac_try" in
1864   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1865   *) ac_try_echo=$ac_try;;
1866 esac
1867 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1868 $as_echo "$ac_try_echo"; } >&5
1869   (eval "$ac_try") 2>&5
1870   ac_status=$?
1871   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1872   test $ac_status = 0; }; }; then :
1873   ac_retval=0
1874 else
1875   $as_echo "$as_me: program exited with status $ac_status" >&5
1876        $as_echo "$as_me: failed program was:" >&5
1877 sed 's/^/| /' conftest.$ac_ext >&5
1878
1879        ac_retval=$ac_status
1880 fi
1881   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1882   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1883   as_fn_set_status $ac_retval
1884
1885 } # ac_fn_c_try_run
1886
1887 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1888 # -------------------------------------------------------
1889 # Tests whether HEADER exists and can be compiled using the include files in
1890 # INCLUDES, setting the cache variable VAR accordingly.
1891 ac_fn_c_check_header_compile ()
1892 {
1893   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1894   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1895 $as_echo_n "checking for $2... " >&6; }
1896 if eval \${$3+:} false; then :
1897   $as_echo_n "(cached) " >&6
1898 else
1899   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1900 /* end confdefs.h.  */
1901 $4
1902 #include <$2>
1903 _ACEOF
1904 if ac_fn_c_try_compile "$LINENO"; then :
1905   eval "$3=yes"
1906 else
1907   eval "$3=no"
1908 fi
1909 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1910 fi
1911 eval ac_res=\$$3
1912                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1913 $as_echo "$ac_res" >&6; }
1914   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1915
1916 } # ac_fn_c_check_header_compile
1917
1918 # ac_fn_c_check_func LINENO FUNC VAR
1919 # ----------------------------------
1920 # Tests whether FUNC exists, setting the cache variable VAR accordingly
1921 ac_fn_c_check_func ()
1922 {
1923   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1924   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1925 $as_echo_n "checking for $2... " >&6; }
1926 if eval \${$3+:} false; then :
1927   $as_echo_n "(cached) " >&6
1928 else
1929   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1930 /* end confdefs.h.  */
1931 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1932    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
1933 #define $2 innocuous_$2
1934
1935 /* System header to define __stub macros and hopefully few prototypes,
1936     which can conflict with char $2 (); below.
1937     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1938     <limits.h> exists even on freestanding compilers.  */
1939
1940 #ifdef __STDC__
1941 # include <limits.h>
1942 #else
1943 # include <assert.h>
1944 #endif
1945
1946 #undef $2
1947
1948 /* Override any GCC internal prototype to avoid an error.
1949    Use char because int might match the return type of a GCC
1950    builtin and then its argument prototype would still apply.  */
1951 #ifdef __cplusplus
1952 extern "C"
1953 #endif
1954 char $2 ();
1955 /* The GNU C library defines this for functions which it implements
1956     to always fail with ENOSYS.  Some functions are actually named
1957     something starting with __ and the normal name is an alias.  */
1958 #if defined __stub_$2 || defined __stub___$2
1959 choke me
1960 #endif
1961
1962 int
1963 main ()
1964 {
1965 return $2 ();
1966   ;
1967   return 0;
1968 }
1969 _ACEOF
1970 if ac_fn_c_try_link "$LINENO"; then :
1971   eval "$3=yes"
1972 else
1973   eval "$3=no"
1974 fi
1975 rm -f core conftest.err conftest.$ac_objext \
1976     conftest$ac_exeext conftest.$ac_ext
1977 fi
1978 eval ac_res=\$$3
1979                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1980 $as_echo "$ac_res" >&6; }
1981   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1982
1983 } # ac_fn_c_check_func
1984
1985 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
1986 # ----------------------------------------------------
1987 # Tries to find if the field MEMBER exists in type AGGR, after including
1988 # INCLUDES, setting cache variable VAR accordingly.
1989 ac_fn_c_check_member ()
1990 {
1991   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1992   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
1993 $as_echo_n "checking for $2.$3... " >&6; }
1994 if eval \${$4+:} false; then :
1995   $as_echo_n "(cached) " >&6
1996 else
1997   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1998 /* end confdefs.h.  */
1999 $5
2000 int
2001 main ()
2002 {
2003 static $2 ac_aggr;
2004 if (ac_aggr.$3)
2005 return 0;
2006   ;
2007   return 0;
2008 }
2009 _ACEOF
2010 if ac_fn_c_try_compile "$LINENO"; then :
2011   eval "$4=yes"
2012 else
2013   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2014 /* end confdefs.h.  */
2015 $5
2016 int
2017 main ()
2018 {
2019 static $2 ac_aggr;
2020 if (sizeof ac_aggr.$3)
2021 return 0;
2022   ;
2023   return 0;
2024 }
2025 _ACEOF
2026 if ac_fn_c_try_compile "$LINENO"; then :
2027   eval "$4=yes"
2028 else
2029   eval "$4=no"
2030 fi
2031 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2032 fi
2033 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2034 fi
2035 eval ac_res=\$$4
2036                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2037 $as_echo "$ac_res" >&6; }
2038   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2039
2040 } # ac_fn_c_check_member
2041
2042 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2043 # -------------------------------------------
2044 # Tests whether TYPE exists after having included INCLUDES, setting cache
2045 # variable VAR accordingly.
2046 ac_fn_c_check_type ()
2047 {
2048   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2049   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2050 $as_echo_n "checking for $2... " >&6; }
2051 if eval \${$3+:} false; then :
2052   $as_echo_n "(cached) " >&6
2053 else
2054   eval "$3=no"
2055   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2056 /* end confdefs.h.  */
2057 $4
2058 int
2059 main ()
2060 {
2061 if (sizeof ($2))
2062          return 0;
2063   ;
2064   return 0;
2065 }
2066 _ACEOF
2067 if ac_fn_c_try_compile "$LINENO"; then :
2068   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2069 /* end confdefs.h.  */
2070 $4
2071 int
2072 main ()
2073 {
2074 if (sizeof (($2)))
2075             return 0;
2076   ;
2077   return 0;
2078 }
2079 _ACEOF
2080 if ac_fn_c_try_compile "$LINENO"; then :
2081
2082 else
2083   eval "$3=yes"
2084 fi
2085 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2086 fi
2087 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2088 fi
2089 eval ac_res=\$$3
2090                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2091 $as_echo "$ac_res" >&6; }
2092   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2093
2094 } # ac_fn_c_check_type
2095
2096 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2097 # --------------------------------------------
2098 # Tries to find the compile-time value of EXPR in a program that includes
2099 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2100 # computed
2101 ac_fn_c_compute_int ()
2102 {
2103   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2104   if test "$cross_compiling" = yes; then
2105     # Depending upon the size, compute the lo and hi bounds.
2106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2107 /* end confdefs.h.  */
2108 $4
2109 int
2110 main ()
2111 {
2112 static int test_array [1 - 2 * !(($2) >= 0)];
2113 test_array [0] = 0;
2114 return test_array [0];
2115
2116   ;
2117   return 0;
2118 }
2119 _ACEOF
2120 if ac_fn_c_try_compile "$LINENO"; then :
2121   ac_lo=0 ac_mid=0
2122   while :; do
2123     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2124 /* end confdefs.h.  */
2125 $4
2126 int
2127 main ()
2128 {
2129 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2130 test_array [0] = 0;
2131 return test_array [0];
2132
2133   ;
2134   return 0;
2135 }
2136 _ACEOF
2137 if ac_fn_c_try_compile "$LINENO"; then :
2138   ac_hi=$ac_mid; break
2139 else
2140   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2141                         if test $ac_lo -le $ac_mid; then
2142                           ac_lo= ac_hi=
2143                           break
2144                         fi
2145                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2146 fi
2147 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2148   done
2149 else
2150   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2151 /* end confdefs.h.  */
2152 $4
2153 int
2154 main ()
2155 {
2156 static int test_array [1 - 2 * !(($2) < 0)];
2157 test_array [0] = 0;
2158 return test_array [0];
2159
2160   ;
2161   return 0;
2162 }
2163 _ACEOF
2164 if ac_fn_c_try_compile "$LINENO"; then :
2165   ac_hi=-1 ac_mid=-1
2166   while :; do
2167     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2168 /* end confdefs.h.  */
2169 $4
2170 int
2171 main ()
2172 {
2173 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2174 test_array [0] = 0;
2175 return test_array [0];
2176
2177   ;
2178   return 0;
2179 }
2180 _ACEOF
2181 if ac_fn_c_try_compile "$LINENO"; then :
2182   ac_lo=$ac_mid; break
2183 else
2184   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2185                         if test $ac_mid -le $ac_hi; then
2186                           ac_lo= ac_hi=
2187                           break
2188                         fi
2189                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2190 fi
2191 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2192   done
2193 else
2194   ac_lo= ac_hi=
2195 fi
2196 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2197 fi
2198 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2199 # Binary search between lo and hi bounds.
2200 while test "x$ac_lo" != "x$ac_hi"; do
2201   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2202   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2203 /* end confdefs.h.  */
2204 $4
2205 int
2206 main ()
2207 {
2208 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2209 test_array [0] = 0;
2210 return test_array [0];
2211
2212   ;
2213   return 0;
2214 }
2215 _ACEOF
2216 if ac_fn_c_try_compile "$LINENO"; then :
2217   ac_hi=$ac_mid
2218 else
2219   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2220 fi
2221 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2222 done
2223 case $ac_lo in #((
2224 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2225 '') ac_retval=1 ;;
2226 esac
2227   else
2228     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2229 /* end confdefs.h.  */
2230 $4
2231 static long int longval () { return $2; }
2232 static unsigned long int ulongval () { return $2; }
2233 #include <stdio.h>
2234 #include <stdlib.h>
2235 int
2236 main ()
2237 {
2238
2239   FILE *f = fopen ("conftest.val", "w");
2240   if (! f)
2241     return 1;
2242   if (($2) < 0)
2243     {
2244       long int i = longval ();
2245       if (i != ($2))
2246         return 1;
2247       fprintf (f, "%ld", i);
2248     }
2249   else
2250     {
2251       unsigned long int i = ulongval ();
2252       if (i != ($2))
2253         return 1;
2254       fprintf (f, "%lu", i);
2255     }
2256   /* Do not output a trailing newline, as this causes \r\n confusion
2257      on some platforms.  */
2258   return ferror (f) || fclose (f) != 0;
2259
2260   ;
2261   return 0;
2262 }
2263 _ACEOF
2264 if ac_fn_c_try_run "$LINENO"; then :
2265   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2266 else
2267   ac_retval=1
2268 fi
2269 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2270   conftest.$ac_objext conftest.beam conftest.$ac_ext
2271 rm -f conftest.val
2272
2273   fi
2274   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2275   as_fn_set_status $ac_retval
2276
2277 } # ac_fn_c_compute_int
2278
2279 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2280 # ---------------------------------------------
2281 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2282 # accordingly.
2283 ac_fn_c_check_decl ()
2284 {
2285   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2286   as_decl_name=`echo $2|sed 's/ *(.*//'`
2287   as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2288   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2289 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2290 if eval \${$3+:} false; then :
2291   $as_echo_n "(cached) " >&6
2292 else
2293   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2294 /* end confdefs.h.  */
2295 $4
2296 int
2297 main ()
2298 {
2299 #ifndef $as_decl_name
2300 #ifdef __cplusplus
2301   (void) $as_decl_use;
2302 #else
2303   (void) $as_decl_name;
2304 #endif
2305 #endif
2306
2307   ;
2308   return 0;
2309 }
2310 _ACEOF
2311 if ac_fn_c_try_compile "$LINENO"; then :
2312   eval "$3=yes"
2313 else
2314   eval "$3=no"
2315 fi
2316 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2317 fi
2318 eval ac_res=\$$3
2319                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2320 $as_echo "$ac_res" >&6; }
2321   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2322
2323 } # ac_fn_c_check_decl
2324 cat >config.log <<_ACEOF
2325 This file contains any messages produced by compilers while
2326 running configure, to aid debugging if configure makes a mistake.
2327
2328 It was created by PostgreSQL $as_me 10devel, which was
2329 generated by GNU Autoconf 2.69.  Invocation command line was
2330
2331   $ $0 $@
2332
2333 _ACEOF
2334 exec 5>>config.log
2335 {
2336 cat <<_ASUNAME
2337 ## --------- ##
2338 ## Platform. ##
2339 ## --------- ##
2340
2341 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2342 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2343 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2344 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2345 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2346
2347 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2348 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2349
2350 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2351 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2352 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2353 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2354 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2355 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2356 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2357
2358 _ASUNAME
2359
2360 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2361 for as_dir in $PATH
2362 do
2363   IFS=$as_save_IFS
2364   test -z "$as_dir" && as_dir=.
2365     $as_echo "PATH: $as_dir"
2366   done
2367 IFS=$as_save_IFS
2368
2369 } >&5
2370
2371 cat >&5 <<_ACEOF
2372
2373
2374 ## ----------- ##
2375 ## Core tests. ##
2376 ## ----------- ##
2377
2378 _ACEOF
2379
2380
2381 # Keep a trace of the command line.
2382 # Strip out --no-create and --no-recursion so they do not pile up.
2383 # Strip out --silent because we don't want to record it for future runs.
2384 # Also quote any args containing shell meta-characters.
2385 # Make two passes to allow for proper duplicate-argument suppression.
2386 ac_configure_args=
2387 ac_configure_args0=
2388 ac_configure_args1=
2389 ac_must_keep_next=false
2390 for ac_pass in 1 2
2391 do
2392   for ac_arg
2393   do
2394     case $ac_arg in
2395     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2396     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2397     | -silent | --silent | --silen | --sile | --sil)
2398       continue ;;
2399     *\'*)
2400       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2401     esac
2402     case $ac_pass in
2403     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2404     2)
2405       as_fn_append ac_configure_args1 " '$ac_arg'"
2406       if test $ac_must_keep_next = true; then
2407         ac_must_keep_next=false # Got value, back to normal.
2408       else
2409         case $ac_arg in
2410           *=* | --config-cache | -C | -disable-* | --disable-* \
2411           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2412           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2413           | -with-* | --with-* | -without-* | --without-* | --x)
2414             case "$ac_configure_args0 " in
2415               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2416             esac
2417             ;;
2418           -* ) ac_must_keep_next=true ;;
2419         esac
2420       fi
2421       as_fn_append ac_configure_args " '$ac_arg'"
2422       ;;
2423     esac
2424   done
2425 done
2426 { ac_configure_args0=; unset ac_configure_args0;}
2427 { ac_configure_args1=; unset ac_configure_args1;}
2428
2429 # When interrupted or exit'd, cleanup temporary files, and complete
2430 # config.log.  We remove comments because anyway the quotes in there
2431 # would cause problems or look ugly.
2432 # WARNING: Use '\'' to represent an apostrophe within the trap.
2433 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2434 trap 'exit_status=$?
2435   # Save into config.log some information that might help in debugging.
2436   {
2437     echo
2438
2439     $as_echo "## ---------------- ##
2440 ## Cache variables. ##
2441 ## ---------------- ##"
2442     echo
2443     # The following way of writing the cache mishandles newlines in values,
2444 (
2445   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2446     eval ac_val=\$$ac_var
2447     case $ac_val in #(
2448     *${as_nl}*)
2449       case $ac_var in #(
2450       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2451 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2452       esac
2453       case $ac_var in #(
2454       _ | IFS | as_nl) ;; #(
2455       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2456       *) { eval $ac_var=; unset $ac_var;} ;;
2457       esac ;;
2458     esac
2459   done
2460   (set) 2>&1 |
2461     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2462     *${as_nl}ac_space=\ *)
2463       sed -n \
2464         "s/'\''/'\''\\\\'\'''\''/g;
2465           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2466       ;; #(
2467     *)
2468       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2469       ;;
2470     esac |
2471     sort
2472 )
2473     echo
2474
2475     $as_echo "## ----------------- ##
2476 ## Output variables. ##
2477 ## ----------------- ##"
2478     echo
2479     for ac_var in $ac_subst_vars
2480     do
2481       eval ac_val=\$$ac_var
2482       case $ac_val in
2483       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2484       esac
2485       $as_echo "$ac_var='\''$ac_val'\''"
2486     done | sort
2487     echo
2488
2489     if test -n "$ac_subst_files"; then
2490       $as_echo "## ------------------- ##
2491 ## File substitutions. ##
2492 ## ------------------- ##"
2493       echo
2494       for ac_var in $ac_subst_files
2495       do
2496         eval ac_val=\$$ac_var
2497         case $ac_val in
2498         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2499         esac
2500         $as_echo "$ac_var='\''$ac_val'\''"
2501       done | sort
2502       echo
2503     fi
2504
2505     if test -s confdefs.h; then
2506       $as_echo "## ----------- ##
2507 ## confdefs.h. ##
2508 ## ----------- ##"
2509       echo
2510       cat confdefs.h
2511       echo
2512     fi
2513     test "$ac_signal" != 0 &&
2514       $as_echo "$as_me: caught signal $ac_signal"
2515     $as_echo "$as_me: exit $exit_status"
2516   } >&5
2517   rm -f core *.core core.conftest.* &&
2518     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2519     exit $exit_status
2520 ' 0
2521 for ac_signal in 1 2 13 15; do
2522   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2523 done
2524 ac_signal=0
2525
2526 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2527 rm -f -r conftest* confdefs.h
2528
2529 $as_echo "/* confdefs.h */" > confdefs.h
2530
2531 # Predefined preprocessor variables.
2532
2533 cat >>confdefs.h <<_ACEOF
2534 #define PACKAGE_NAME "$PACKAGE_NAME"
2535 _ACEOF
2536
2537 cat >>confdefs.h <<_ACEOF
2538 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2539 _ACEOF
2540
2541 cat >>confdefs.h <<_ACEOF
2542 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2543 _ACEOF
2544
2545 cat >>confdefs.h <<_ACEOF
2546 #define PACKAGE_STRING "$PACKAGE_STRING"
2547 _ACEOF
2548
2549 cat >>confdefs.h <<_ACEOF
2550 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2551 _ACEOF
2552
2553 cat >>confdefs.h <<_ACEOF
2554 #define PACKAGE_URL "$PACKAGE_URL"
2555 _ACEOF
2556
2557
2558 # Let the site file select an alternate cache file if it wants to.
2559 # Prefer an explicitly selected file to automatically selected ones.
2560 ac_site_file1=NONE
2561 ac_site_file2=NONE
2562 if test -n "$CONFIG_SITE"; then
2563   # We do not want a PATH search for config.site.
2564   case $CONFIG_SITE in #((
2565     -*)  ac_site_file1=./$CONFIG_SITE;;
2566     */*) ac_site_file1=$CONFIG_SITE;;
2567     *)   ac_site_file1=./$CONFIG_SITE;;
2568   esac
2569 elif test "x$prefix" != xNONE; then
2570   ac_site_file1=$prefix/share/config.site
2571   ac_site_file2=$prefix/etc/config.site
2572 else
2573   ac_site_file1=$ac_default_prefix/share/config.site
2574   ac_site_file2=$ac_default_prefix/etc/config.site
2575 fi
2576 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2577 do
2578   test "x$ac_site_file" = xNONE && continue
2579   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2580     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2581 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2582     sed 's/^/| /' "$ac_site_file" >&5
2583     . "$ac_site_file" \
2584       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2585 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2586 as_fn_error $? "failed to load site script $ac_site_file
2587 See \`config.log' for more details" "$LINENO" 5; }
2588   fi
2589 done
2590
2591 if test -r "$cache_file"; then
2592   # Some versions of bash will fail to source /dev/null (special files
2593   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2594   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2595     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2596 $as_echo "$as_me: loading cache $cache_file" >&6;}
2597     case $cache_file in
2598       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2599       *)                      . "./$cache_file";;
2600     esac
2601   fi
2602 else
2603   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2604 $as_echo "$as_me: creating cache $cache_file" >&6;}
2605   >$cache_file
2606 fi
2607
2608 # Check that the precious variables saved in the cache have kept the same
2609 # value.
2610 ac_cache_corrupted=false
2611 for ac_var in $ac_precious_vars; do
2612   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2613   eval ac_new_set=\$ac_env_${ac_var}_set
2614   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2615   eval ac_new_val=\$ac_env_${ac_var}_value
2616   case $ac_old_set,$ac_new_set in
2617     set,)
2618       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2619 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2620       ac_cache_corrupted=: ;;
2621     ,set)
2622       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2623 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2624       ac_cache_corrupted=: ;;
2625     ,);;
2626     *)
2627       if test "x$ac_old_val" != "x$ac_new_val"; then
2628         # differences in whitespace do not lead to failure.
2629         ac_old_val_w=`echo x $ac_old_val`
2630         ac_new_val_w=`echo x $ac_new_val`
2631         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2632           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2633 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2634           ac_cache_corrupted=:
2635         else
2636           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2637 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2638           eval $ac_var=\$ac_old_val
2639         fi
2640         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2641 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2642         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2643 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2644       fi;;
2645   esac
2646   # Pass precious variables to config.status.
2647   if test "$ac_new_set" = set; then
2648     case $ac_new_val in
2649     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2650     *) ac_arg=$ac_var=$ac_new_val ;;
2651     esac
2652     case " $ac_configure_args " in
2653       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2654       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2655     esac
2656   fi
2657 done
2658 if $ac_cache_corrupted; then
2659   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2660 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2661   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2662 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2663   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2664 fi
2665 ## -------------------- ##
2666 ## Main body of script. ##
2667 ## -------------------- ##
2668
2669 ac_ext=c
2670 ac_cpp='$CPP $CPPFLAGS'
2671 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2672 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2673 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2674
2675
2676
2677
2678
2679
2680 ac_aux_dir=
2681 for ac_dir in config "$srcdir"/config; do
2682   if 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/install.sh"; then
2687     ac_aux_dir=$ac_dir
2688     ac_install_sh="$ac_aux_dir/install.sh -c"
2689     break
2690   elif test -f "$ac_dir/shtool"; then
2691     ac_aux_dir=$ac_dir
2692     ac_install_sh="$ac_aux_dir/shtool install -c"
2693     break
2694   fi
2695 done
2696 if test -z "$ac_aux_dir"; then
2697   as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5
2698 fi
2699
2700 # These three variables are undocumented and unsupported,
2701 # and are intended to be withdrawn in a future Autoconf release.
2702 # They can cause serious problems if a builder's source tree is in a directory
2703 # whose full name contains unusual characters.
2704 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2705 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2706 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2707
2708
2709
2710 configure_args=$ac_configure_args
2711
2712
2713 PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\)'`
2714
2715
2716 cat >>confdefs.h <<_ACEOF
2717 #define PG_MAJORVERSION "$PG_MAJORVERSION"
2718 _ACEOF
2719
2720
2721
2722
2723
2724 # Check whether --with-extra-version was given.
2725 if test "${with_extra_version+set}" = set; then :
2726   withval=$with_extra_version;
2727   case $withval in
2728     yes)
2729       as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2730       ;;
2731     no)
2732       as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2733       ;;
2734     *)
2735       PG_VERSION="$PACKAGE_VERSION$withval"
2736       ;;
2737   esac
2738
2739 else
2740   PG_VERSION="$PACKAGE_VERSION"
2741 fi
2742
2743
2744
2745 cat >>confdefs.h <<_ACEOF
2746 #define PG_VERSION "$PG_VERSION"
2747 _ACEOF
2748
2749
2750 # Make sure we can run config.sub.
2751 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2752   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2753
2754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2755 $as_echo_n "checking build system type... " >&6; }
2756 if ${ac_cv_build+:} false; then :
2757   $as_echo_n "(cached) " >&6
2758 else
2759   ac_build_alias=$build_alias
2760 test "x$ac_build_alias" = x &&
2761   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2762 test "x$ac_build_alias" = x &&
2763   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2764 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2765   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2766
2767 fi
2768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2769 $as_echo "$ac_cv_build" >&6; }
2770 case $ac_cv_build in
2771 *-*-*) ;;
2772 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2773 esac
2774 build=$ac_cv_build
2775 ac_save_IFS=$IFS; IFS='-'
2776 set x $ac_cv_build
2777 shift
2778 build_cpu=$1
2779 build_vendor=$2
2780 shift; shift
2781 # Remember, the first character of IFS is used to create $*,
2782 # except with old shells:
2783 build_os=$*
2784 IFS=$ac_save_IFS
2785 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2786
2787
2788 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2789 $as_echo_n "checking host system type... " >&6; }
2790 if ${ac_cv_host+:} false; then :
2791   $as_echo_n "(cached) " >&6
2792 else
2793   if test "x$host_alias" = x; then
2794   ac_cv_host=$ac_cv_build
2795 else
2796   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2797     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2798 fi
2799
2800 fi
2801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2802 $as_echo "$ac_cv_host" >&6; }
2803 case $ac_cv_host in
2804 *-*-*) ;;
2805 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2806 esac
2807 host=$ac_cv_host
2808 ac_save_IFS=$IFS; IFS='-'
2809 set x $ac_cv_host
2810 shift
2811 host_cpu=$1
2812 host_vendor=$2
2813 shift; shift
2814 # Remember, the first character of IFS is used to create $*,
2815 # except with old shells:
2816 host_os=$*
2817 IFS=$ac_save_IFS
2818 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2819
2820
2821
2822 template=
2823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which template to use" >&5
2824 $as_echo_n "checking which template to use... " >&6; }
2825
2826
2827
2828
2829 # Check whether --with-template was given.
2830 if test "${with_template+set}" = set; then :
2831   withval=$with_template;
2832   case $withval in
2833     yes)
2834       as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2835       ;;
2836     no)
2837       as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2838       ;;
2839     *)
2840
2841   case $withval in
2842     list)   echo; ls "$srcdir/src/template"; exit;;
2843     *)      if test -f "$srcdir/src/template/$with_template" ; then
2844               template=$withval
2845             else
2846               as_fn_error $? "'$withval' is not a valid template name. Use 'list' for a list." "$LINENO" 5
2847             fi;;
2848   esac
2849
2850       ;;
2851   esac
2852
2853 else
2854
2855 # --with-template not given
2856
2857 case $host_os in
2858      aix*) template=aix ;;
2859   cygwin*) template=cygwin ;;
2860   darwin*) template=darwin ;;
2861 dragonfly*) template=netbsd ;;
2862  freebsd*) template=freebsd ;;
2863     hpux*) template=hpux ;;
2864  linux*|gnu*|k*bsd*-gnu)
2865            template=linux ;;
2866    mingw*) template=win32 ;;
2867   netbsd*) template=netbsd ;;
2868  openbsd*) template=openbsd ;;
2869  solaris*) template=solaris ;;
2870 esac
2871
2872   if test x"$template" = x"" ; then
2873     as_fn_error $? "
2874 *******************************************************************
2875 PostgreSQL has apparently not been ported to your platform yet.
2876 To try a manual configuration, look into the src/template directory
2877 for a similar platform and use the '--with-template=' option.
2878
2879 Please also contact <pgsql-bugs@postgresql.org> to see about
2880 rectifying this.  Include the above 'checking host system type...'
2881 line.
2882 *******************************************************************
2883 " "$LINENO" 5
2884   fi
2885
2886
2887 fi
2888
2889
2890
2891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $template" >&5
2892 $as_echo "$template" >&6; }
2893
2894 PORTNAME=$template
2895
2896
2897 # Initialize default assumption that we do not need separate assembly code
2898 # for TAS (test-and-set).  This can be overridden by the template file
2899 # when it's executed.
2900 need_tas=no
2901 tas_file=dummy.s
2902
2903
2904
2905 ##
2906 ## Command line options
2907 ##
2908
2909 #
2910 # Add non-standard directories to the include path
2911 #
2912
2913
2914
2915 # Check whether --with-includes was given.
2916 if test "${with_includes+set}" = set; then :
2917   withval=$with_includes;
2918   case $withval in
2919     yes)
2920       as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
2921       ;;
2922     no)
2923       as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
2924       ;;
2925     *)
2926
2927       ;;
2928   esac
2929
2930 fi
2931
2932
2933
2934
2935 #
2936 # Add non-standard directories to the library search path
2937 #
2938
2939
2940
2941 # Check whether --with-libraries was given.
2942 if test "${with_libraries+set}" = set; then :
2943   withval=$with_libraries;
2944   case $withval in
2945     yes)
2946       as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
2947       ;;
2948     no)
2949       as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
2950       ;;
2951     *)
2952       LIBRARY_DIRS=$withval
2953       ;;
2954   esac
2955
2956 fi
2957
2958
2959
2960
2961
2962
2963 # Check whether --with-libs was given.
2964 if test "${with_libs+set}" = set; then :
2965   withval=$with_libs;
2966   case $withval in
2967     yes)
2968       as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
2969       ;;
2970     no)
2971       as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
2972       ;;
2973     *)
2974       LIBRARY_DIRS=$withval
2975       ;;
2976   esac
2977
2978 fi
2979
2980
2981
2982
2983 #
2984 # 64-bit integer date/time storage: enabled by default.
2985 #
2986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with 64-bit integer date/time support" >&5
2987 $as_echo_n "checking whether to build with 64-bit integer date/time support... " >&6; }
2988
2989
2990 # Check whether --enable-integer-datetimes was given.
2991 if test "${enable_integer_datetimes+set}" = set; then :
2992   enableval=$enable_integer_datetimes;
2993   case $enableval in
2994     yes)
2995
2996 $as_echo "#define USE_INTEGER_DATETIMES 1" >>confdefs.h
2997
2998       ;;
2999     no)
3000       :
3001       ;;
3002     *)
3003       as_fn_error $? "no argument expected for --enable-integer-datetimes option" "$LINENO" 5
3004       ;;
3005   esac
3006
3007 else
3008   enable_integer_datetimes=yes
3009
3010 $as_echo "#define USE_INTEGER_DATETIMES 1" >>confdefs.h
3011
3012 fi
3013
3014
3015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_integer_datetimes" >&5
3016 $as_echo "$enable_integer_datetimes" >&6; }
3017
3018
3019 #
3020 # NLS
3021 #
3022 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is wanted" >&5
3023 $as_echo_n "checking whether NLS is wanted... " >&6; }
3024
3025
3026 # Check whether --enable-nls was given.
3027 if test "${enable_nls+set}" = set; then :
3028   enableval=$enable_nls;
3029   case $enableval in
3030     yes)
3031       :
3032       ;;
3033     no)
3034       :
3035       ;;
3036     *)
3037       enable_nls=yes
3038 WANTED_LANGUAGES=$enableval
3039       ;;
3040   esac
3041
3042 else
3043   enable_nls=no
3044 fi
3045
3046
3047
3048 if test "$enable_nls" = yes; then
3049
3050 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
3051
3052 fi
3053
3054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_nls" >&5
3055 $as_echo "$enable_nls" >&6; }
3056
3057
3058
3059 #
3060 # Default port number (--with-pgport), default 5432
3061 #
3062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default port number" >&5
3063 $as_echo_n "checking for default port number... " >&6; }
3064
3065
3066
3067 # Check whether --with-pgport was given.
3068 if test "${with_pgport+set}" = set; then :
3069   withval=$with_pgport;
3070   case $withval in
3071     yes)
3072       as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3073       ;;
3074     no)
3075       as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3076       ;;
3077     *)
3078       default_port=$withval
3079       ;;
3080   esac
3081
3082 else
3083   default_port=5432
3084 fi
3085
3086
3087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_port" >&5
3088 $as_echo "$default_port" >&6; }
3089 # Need both of these because some places want an integer and some a string
3090
3091 cat >>confdefs.h <<_ACEOF
3092 #define DEF_PGPORT ${default_port}
3093 _ACEOF
3094
3095
3096 cat >>confdefs.h <<_ACEOF
3097 #define DEF_PGPORT_STR "${default_port}"
3098 _ACEOF
3099
3100
3101
3102 # It's worth validating port; you can get very confusing errors otherwise
3103 if test x"$default_port" = x""; then
3104   as_fn_error $? "invalid --with-pgport specification: empty string" "$LINENO" 5
3105 elif test ! x`echo "$default_port" | sed -e 's/[0-9]*//'` = x""; then
3106   as_fn_error $? "invalid --with-pgport specification: must be a number" "$LINENO" 5
3107 elif test ! x`echo "$default_port" | sed -e 's/^0.//'` = x"$default_port"; then
3108   as_fn_error $? "invalid --with-pgport specification: must not have leading 0" "$LINENO" 5
3109 elif test "$default_port" -lt "1" -o "$default_port" -gt "65535"; then
3110   as_fn_error $? "invalid --with-pgport specification: must be between 1 and 65535" "$LINENO" 5
3111 fi
3112
3113 #
3114 # '-rpath'-like feature can be disabled
3115 #
3116
3117
3118 # Check whether --enable-rpath was given.
3119 if test "${enable_rpath+set}" = set; then :
3120   enableval=$enable_rpath;
3121   case $enableval in
3122     yes)
3123       :
3124       ;;
3125     no)
3126       :
3127       ;;
3128     *)
3129       as_fn_error $? "no argument expected for --enable-rpath option" "$LINENO" 5
3130       ;;
3131   esac
3132
3133 else
3134   enable_rpath=yes
3135
3136 fi
3137
3138
3139
3140
3141 #
3142 # Spinlocks
3143 #
3144
3145
3146 # Check whether --enable-spinlocks was given.
3147 if test "${enable_spinlocks+set}" = set; then :
3148   enableval=$enable_spinlocks;
3149   case $enableval in
3150     yes)
3151       :
3152       ;;
3153     no)
3154       :
3155       ;;
3156     *)
3157       as_fn_error $? "no argument expected for --enable-spinlocks option" "$LINENO" 5
3158       ;;
3159   esac
3160
3161 else
3162   enable_spinlocks=yes
3163
3164 fi
3165
3166
3167
3168 #
3169 # Atomic operations
3170 #
3171
3172
3173 # Check whether --enable-atomics was given.
3174 if test "${enable_atomics+set}" = set; then :
3175   enableval=$enable_atomics;
3176   case $enableval in
3177     yes)
3178       :
3179       ;;
3180     no)
3181       :
3182       ;;
3183     *)
3184       as_fn_error $? "no argument expected for --enable-atomics option" "$LINENO" 5
3185       ;;
3186   esac
3187
3188 else
3189   enable_atomics=yes
3190
3191 fi
3192
3193
3194
3195 #
3196 # --enable-debug adds -g to compiler flags
3197 #
3198
3199
3200 # Check whether --enable-debug was given.
3201 if test "${enable_debug+set}" = set; then :
3202   enableval=$enable_debug;
3203   case $enableval in
3204     yes)
3205       :
3206       ;;
3207     no)
3208       :
3209       ;;
3210     *)
3211       as_fn_error $? "no argument expected for --enable-debug option" "$LINENO" 5
3212       ;;
3213   esac
3214
3215 else
3216   enable_debug=no
3217
3218 fi
3219
3220
3221
3222
3223 #
3224 # --enable-profiling enables gcc profiling
3225 #
3226
3227
3228 # Check whether --enable-profiling was given.
3229 if test "${enable_profiling+set}" = set; then :
3230   enableval=$enable_profiling;
3231   case $enableval in
3232     yes)
3233       :
3234       ;;
3235     no)
3236       :
3237       ;;
3238     *)
3239       as_fn_error $? "no argument expected for --enable-profiling option" "$LINENO" 5
3240       ;;
3241   esac
3242
3243 else
3244   enable_profiling=no
3245
3246 fi
3247
3248
3249
3250 #
3251 # --enable-coverage enables generation of code coverage metrics with gcov
3252 #
3253
3254
3255 # Check whether --enable-coverage was given.
3256 if test "${enable_coverage+set}" = set; then :
3257   enableval=$enable_coverage;
3258   case $enableval in
3259     yes)
3260       for ac_prog in gcov
3261 do
3262   # Extract the first word of "$ac_prog", so it can be a program name with args.
3263 set dummy $ac_prog; ac_word=$2
3264 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3265 $as_echo_n "checking for $ac_word... " >&6; }
3266 if ${ac_cv_prog_GCOV+:} false; then :
3267   $as_echo_n "(cached) " >&6
3268 else
3269   if test -n "$GCOV"; then
3270   ac_cv_prog_GCOV="$GCOV" # Let the user override the test.
3271 else
3272 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3273 for as_dir in $PATH
3274 do
3275   IFS=$as_save_IFS
3276   test -z "$as_dir" && as_dir=.
3277     for ac_exec_ext in '' $ac_executable_extensions; do
3278   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3279     ac_cv_prog_GCOV="$ac_prog"
3280     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3281     break 2
3282   fi
3283 done
3284   done
3285 IFS=$as_save_IFS
3286
3287 fi
3288 fi
3289 GCOV=$ac_cv_prog_GCOV
3290 if test -n "$GCOV"; then
3291   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3292 $as_echo "$GCOV" >&6; }
3293 else
3294   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3295 $as_echo "no" >&6; }
3296 fi
3297
3298
3299   test -n "$GCOV" && break
3300 done
3301
3302 if test -z "$GCOV"; then
3303   as_fn_error $? "gcov not found" "$LINENO" 5
3304 fi
3305 for ac_prog in lcov
3306 do
3307   # Extract the first word of "$ac_prog", so it can be a program name with args.
3308 set dummy $ac_prog; ac_word=$2
3309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3310 $as_echo_n "checking for $ac_word... " >&6; }
3311 if ${ac_cv_prog_LCOV+:} false; then :
3312   $as_echo_n "(cached) " >&6
3313 else
3314   if test -n "$LCOV"; then
3315   ac_cv_prog_LCOV="$LCOV" # Let the user override the test.
3316 else
3317 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3318 for as_dir in $PATH
3319 do
3320   IFS=$as_save_IFS
3321   test -z "$as_dir" && as_dir=.
3322     for ac_exec_ext in '' $ac_executable_extensions; do
3323   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3324     ac_cv_prog_LCOV="$ac_prog"
3325     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3326     break 2
3327   fi
3328 done
3329   done
3330 IFS=$as_save_IFS
3331
3332 fi
3333 fi
3334 LCOV=$ac_cv_prog_LCOV
3335 if test -n "$LCOV"; then
3336   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3337 $as_echo "$LCOV" >&6; }
3338 else
3339   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3340 $as_echo "no" >&6; }
3341 fi
3342
3343
3344   test -n "$LCOV" && break
3345 done
3346
3347 if test -z "$LCOV"; then
3348   as_fn_error $? "lcov not found" "$LINENO" 5
3349 fi
3350 for ac_prog in genhtml
3351 do
3352   # Extract the first word of "$ac_prog", so it can be a program name with args.
3353 set dummy $ac_prog; ac_word=$2
3354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3355 $as_echo_n "checking for $ac_word... " >&6; }
3356 if ${ac_cv_prog_GENHTML+:} false; then :
3357   $as_echo_n "(cached) " >&6
3358 else
3359   if test -n "$GENHTML"; then
3360   ac_cv_prog_GENHTML="$GENHTML" # Let the user override the test.
3361 else
3362 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3363 for as_dir in $PATH
3364 do
3365   IFS=$as_save_IFS
3366   test -z "$as_dir" && as_dir=.
3367     for ac_exec_ext in '' $ac_executable_extensions; do
3368   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3369     ac_cv_prog_GENHTML="$ac_prog"
3370     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3371     break 2
3372   fi
3373 done
3374   done
3375 IFS=$as_save_IFS
3376
3377 fi
3378 fi
3379 GENHTML=$ac_cv_prog_GENHTML
3380 if test -n "$GENHTML"; then
3381   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3382 $as_echo "$GENHTML" >&6; }
3383 else
3384   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3385 $as_echo "no" >&6; }
3386 fi
3387
3388
3389   test -n "$GENHTML" && break
3390 done
3391
3392 if test -z "$GENHTML"; then
3393   as_fn_error $? "genhtml not found" "$LINENO" 5
3394 fi
3395       ;;
3396     no)
3397       :
3398       ;;
3399     *)
3400       as_fn_error $? "no argument expected for --enable-coverage option" "$LINENO" 5
3401       ;;
3402   esac
3403
3404 else
3405   enable_coverage=no
3406
3407 fi
3408
3409
3410
3411
3412 #
3413 # DTrace
3414 #
3415
3416
3417 # Check whether --enable-dtrace was given.
3418 if test "${enable_dtrace+set}" = set; then :
3419   enableval=$enable_dtrace;
3420   case $enableval in
3421     yes)
3422       for ac_prog in dtrace
3423 do
3424   # Extract the first word of "$ac_prog", so it can be a program name with args.
3425 set dummy $ac_prog; ac_word=$2
3426 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3427 $as_echo_n "checking for $ac_word... " >&6; }
3428 if ${ac_cv_prog_DTRACE+:} false; then :
3429   $as_echo_n "(cached) " >&6
3430 else
3431   if test -n "$DTRACE"; then
3432   ac_cv_prog_DTRACE="$DTRACE" # Let the user override the test.
3433 else
3434 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3435 for as_dir in $PATH
3436 do
3437   IFS=$as_save_IFS
3438   test -z "$as_dir" && as_dir=.
3439     for ac_exec_ext in '' $ac_executable_extensions; do
3440   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3441     ac_cv_prog_DTRACE="$ac_prog"
3442     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3443     break 2
3444   fi
3445 done
3446   done
3447 IFS=$as_save_IFS
3448
3449 fi
3450 fi
3451 DTRACE=$ac_cv_prog_DTRACE
3452 if test -n "$DTRACE"; then
3453   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3454 $as_echo "$DTRACE" >&6; }
3455 else
3456   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3457 $as_echo "no" >&6; }
3458 fi
3459
3460
3461   test -n "$DTRACE" && break
3462 done
3463
3464 if test -z "$DTRACE"; then
3465   as_fn_error $? "dtrace not found" "$LINENO" 5
3466 fi
3467
3468       ;;
3469     no)
3470       :
3471       ;;
3472     *)
3473       as_fn_error $? "no argument expected for --enable-dtrace option" "$LINENO" 5
3474       ;;
3475   esac
3476
3477 else
3478   enable_dtrace=no
3479
3480 fi
3481
3482
3483
3484
3485 #
3486 # TAP tests
3487 #
3488
3489
3490 # Check whether --enable-tap-tests was given.
3491 if test "${enable_tap_tests+set}" = set; then :
3492   enableval=$enable_tap_tests;
3493   case $enableval in
3494     yes)
3495       :
3496       ;;
3497     no)
3498       :
3499       ;;
3500     *)
3501       as_fn_error $? "no argument expected for --enable-tap-tests option" "$LINENO" 5
3502       ;;
3503   esac
3504
3505 else
3506   enable_tap_tests=no
3507
3508 fi
3509
3510
3511
3512
3513 #
3514 # Block size
3515 #
3516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for block size" >&5
3517 $as_echo_n "checking for block size... " >&6; }
3518
3519
3520
3521 # Check whether --with-blocksize was given.
3522 if test "${with_blocksize+set}" = set; then :
3523   withval=$with_blocksize;
3524   case $withval in
3525     yes)
3526       as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3527       ;;
3528     no)
3529       as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3530       ;;
3531     *)
3532       blocksize=$withval
3533       ;;
3534   esac
3535
3536 else
3537   blocksize=8
3538 fi
3539
3540
3541 case ${blocksize} in
3542   1) BLCKSZ=1024;;
3543   2) BLCKSZ=2048;;
3544   4) BLCKSZ=4096;;
3545   8) BLCKSZ=8192;;
3546  16) BLCKSZ=16384;;
3547  32) BLCKSZ=32768;;
3548   *) as_fn_error $? "Invalid block size. Allowed values are 1,2,4,8,16,32." "$LINENO" 5
3549 esac
3550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${blocksize}kB" >&5
3551 $as_echo "${blocksize}kB" >&6; }
3552
3553
3554 cat >>confdefs.h <<_ACEOF
3555 #define BLCKSZ ${BLCKSZ}
3556 _ACEOF
3557
3558
3559 #
3560 # Relation segment size
3561 #
3562 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for segment size" >&5
3563 $as_echo_n "checking for segment size... " >&6; }
3564
3565
3566
3567 # Check whether --with-segsize was given.
3568 if test "${with_segsize+set}" = set; then :
3569   withval=$with_segsize;
3570   case $withval in
3571     yes)
3572       as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3573       ;;
3574     no)
3575       as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3576       ;;
3577     *)
3578       segsize=$withval
3579       ;;
3580   esac
3581
3582 else
3583   segsize=1
3584 fi
3585
3586
3587 # this expression is set up to avoid unnecessary integer overflow
3588 # blocksize is already guaranteed to be a factor of 1024
3589 RELSEG_SIZE=`expr '(' 1024 / ${blocksize} ')' '*' ${segsize} '*' 1024`
3590 test $? -eq 0 || exit 1
3591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${segsize}GB" >&5
3592 $as_echo "${segsize}GB" >&6; }
3593
3594
3595 cat >>confdefs.h <<_ACEOF
3596 #define RELSEG_SIZE ${RELSEG_SIZE}
3597 _ACEOF
3598
3599
3600 #
3601 # WAL block size
3602 #
3603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAL block size" >&5
3604 $as_echo_n "checking for WAL block size... " >&6; }
3605
3606
3607
3608 # Check whether --with-wal-blocksize was given.
3609 if test "${with_wal_blocksize+set}" = set; then :
3610   withval=$with_wal_blocksize;
3611   case $withval in
3612     yes)
3613       as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3614       ;;
3615     no)
3616       as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3617       ;;
3618     *)
3619       wal_blocksize=$withval
3620       ;;
3621   esac
3622
3623 else
3624   wal_blocksize=8
3625 fi
3626
3627
3628 case ${wal_blocksize} in
3629   1) XLOG_BLCKSZ=1024;;
3630   2) XLOG_BLCKSZ=2048;;
3631   4) XLOG_BLCKSZ=4096;;
3632   8) XLOG_BLCKSZ=8192;;
3633  16) XLOG_BLCKSZ=16384;;
3634  32) XLOG_BLCKSZ=32768;;
3635  64) XLOG_BLCKSZ=65536;;
3636   *) as_fn_error $? "Invalid WAL block size. Allowed values are 1,2,4,8,16,32,64." "$LINENO" 5
3637 esac
3638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${wal_blocksize}kB" >&5
3639 $as_echo "${wal_blocksize}kB" >&6; }
3640
3641
3642 cat >>confdefs.h <<_ACEOF
3643 #define XLOG_BLCKSZ ${XLOG_BLCKSZ}
3644 _ACEOF
3645
3646
3647 #
3648 # WAL segment size
3649 #
3650 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAL segment size" >&5
3651 $as_echo_n "checking for WAL segment size... " >&6; }
3652
3653
3654
3655 # Check whether --with-wal-segsize was given.
3656 if test "${with_wal_segsize+set}" = set; then :
3657   withval=$with_wal_segsize;
3658   case $withval in
3659     yes)
3660       as_fn_error $? "argument required for --with-wal-segsize option" "$LINENO" 5
3661       ;;
3662     no)
3663       as_fn_error $? "argument required for --with-wal-segsize option" "$LINENO" 5
3664       ;;
3665     *)
3666       wal_segsize=$withval
3667       ;;
3668   esac
3669
3670 else
3671   wal_segsize=16
3672 fi
3673
3674
3675 case ${wal_segsize} in
3676   1) ;;
3677   2) ;;
3678   4) ;;
3679   8) ;;
3680  16) ;;
3681  32) ;;
3682  64) ;;
3683   *) as_fn_error $? "Invalid WAL segment size. Allowed values are 1,2,4,8,16,32,64." "$LINENO" 5
3684 esac
3685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${wal_segsize}MB" >&5
3686 $as_echo "${wal_segsize}MB" >&6; }
3687
3688
3689 cat >>confdefs.h <<_ACEOF
3690 #define XLOG_SEG_SIZE (${wal_segsize} * 1024 * 1024)
3691 _ACEOF
3692
3693
3694 #
3695 # C compiler
3696 #
3697
3698 # For historical reasons you can also use --with-CC to specify the C compiler
3699 # to use, although the standard way to do this is to set the CC environment
3700 # variable.
3701
3702
3703
3704 # Check whether --with-CC was given.
3705 if test "${with_CC+set}" = set; then :
3706   withval=$with_CC;
3707   case $withval in
3708     yes)
3709       as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3710       ;;
3711     no)
3712       as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3713       ;;
3714     *)
3715       CC=$with_CC
3716       ;;
3717   esac
3718
3719 fi
3720
3721
3722
3723 case $template in
3724   aix) pgac_cc_list="gcc xlc";;
3725     *) pgac_cc_list="gcc cc";;
3726 esac
3727
3728 ac_ext=c
3729 ac_cpp='$CPP $CPPFLAGS'
3730 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3731 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3732 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3733 if test -n "$ac_tool_prefix"; then
3734   for ac_prog in $pgac_cc_list
3735   do
3736     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3737 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3739 $as_echo_n "checking for $ac_word... " >&6; }
3740 if ${ac_cv_prog_CC+:} false; then :
3741   $as_echo_n "(cached) " >&6
3742 else
3743   if test -n "$CC"; then
3744   ac_cv_prog_CC="$CC" # Let the user override the test.
3745 else
3746 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3747 for as_dir in $PATH
3748 do
3749   IFS=$as_save_IFS
3750   test -z "$as_dir" && as_dir=.
3751     for ac_exec_ext in '' $ac_executable_extensions; do
3752   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3753     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3754     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3755     break 2
3756   fi
3757 done
3758   done
3759 IFS=$as_save_IFS
3760
3761 fi
3762 fi
3763 CC=$ac_cv_prog_CC
3764 if test -n "$CC"; then
3765   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3766 $as_echo "$CC" >&6; }
3767 else
3768   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3769 $as_echo "no" >&6; }
3770 fi
3771
3772
3773     test -n "$CC" && break
3774   done
3775 fi
3776 if test -z "$CC"; then
3777   ac_ct_CC=$CC
3778   for ac_prog in $pgac_cc_list
3779 do
3780   # Extract the first word of "$ac_prog", so it can be a program name with args.
3781 set dummy $ac_prog; ac_word=$2
3782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3783 $as_echo_n "checking for $ac_word... " >&6; }
3784 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3785   $as_echo_n "(cached) " >&6
3786 else
3787   if test -n "$ac_ct_CC"; then
3788   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3789 else
3790 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3791 for as_dir in $PATH
3792 do
3793   IFS=$as_save_IFS
3794   test -z "$as_dir" && as_dir=.
3795     for ac_exec_ext in '' $ac_executable_extensions; do
3796   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3797     ac_cv_prog_ac_ct_CC="$ac_prog"
3798     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3799     break 2
3800   fi
3801 done
3802   done
3803 IFS=$as_save_IFS
3804
3805 fi
3806 fi
3807 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3808 if test -n "$ac_ct_CC"; then
3809   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3810 $as_echo "$ac_ct_CC" >&6; }
3811 else
3812   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3813 $as_echo "no" >&6; }
3814 fi
3815
3816
3817   test -n "$ac_ct_CC" && break
3818 done
3819
3820   if test "x$ac_ct_CC" = x; then
3821     CC=""
3822   else
3823     case $cross_compiling:$ac_tool_warned in
3824 yes:)
3825 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3826 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3827 ac_tool_warned=yes ;;
3828 esac
3829     CC=$ac_ct_CC
3830   fi
3831 fi
3832
3833
3834 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3835 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3836 as_fn_error $? "no acceptable C compiler found in \$PATH
3837 See \`config.log' for more details" "$LINENO" 5; }
3838
3839 # Provide some information about the compiler.
3840 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3841 set X $ac_compile
3842 ac_compiler=$2
3843 for ac_option in --version -v -V -qversion; do
3844   { { ac_try="$ac_compiler $ac_option >&5"
3845 case "(($ac_try" in
3846   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3847   *) ac_try_echo=$ac_try;;
3848 esac
3849 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3850 $as_echo "$ac_try_echo"; } >&5
3851   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3852   ac_status=$?
3853   if test -s conftest.err; then
3854     sed '10a\
3855 ... rest of stderr output deleted ...
3856          10q' conftest.err >conftest.er1
3857     cat conftest.er1 >&5
3858   fi
3859   rm -f conftest.er1 conftest.err
3860   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3861   test $ac_status = 0; }
3862 done
3863
3864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3865 /* end confdefs.h.  */
3866
3867 int
3868 main ()
3869 {
3870
3871   ;
3872   return 0;
3873 }
3874 _ACEOF
3875 ac_clean_files_save=$ac_clean_files
3876 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3877 # Try to create an executable without -o first, disregard a.out.
3878 # It will help us diagnose broken compilers, and finding out an intuition
3879 # of exeext.
3880 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3881 $as_echo_n "checking whether the C compiler works... " >&6; }
3882 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3883
3884 # The possible output files:
3885 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3886
3887 ac_rmfiles=
3888 for ac_file in $ac_files
3889 do
3890   case $ac_file in
3891     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3892     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3893   esac
3894 done
3895 rm -f $ac_rmfiles
3896
3897 if { { ac_try="$ac_link_default"
3898 case "(($ac_try" in
3899   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3900   *) ac_try_echo=$ac_try;;
3901 esac
3902 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3903 $as_echo "$ac_try_echo"; } >&5
3904   (eval "$ac_link_default") 2>&5
3905   ac_status=$?
3906   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3907   test $ac_status = 0; }; then :
3908   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3909 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3910 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
3911 # so that the user can short-circuit this test for compilers unknown to
3912 # Autoconf.
3913 for ac_file in $ac_files ''
3914 do
3915   test -f "$ac_file" || continue
3916   case $ac_file in
3917     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3918         ;;
3919     [ab].out )
3920         # We found the default executable, but exeext='' is most
3921         # certainly right.
3922         break;;
3923     *.* )
3924         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3925         then :; else
3926            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3927         fi
3928         # We set ac_cv_exeext here because the later test for it is not
3929         # safe: cross compilers may not add the suffix if given an `-o'
3930         # argument, so we may need to know it at that point already.
3931         # Even if this section looks crufty: it has the advantage of
3932         # actually working.
3933         break;;
3934     * )
3935         break;;
3936   esac
3937 done
3938 test "$ac_cv_exeext" = no && ac_cv_exeext=
3939
3940 else
3941   ac_file=''
3942 fi
3943 if test -z "$ac_file"; then :
3944   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3945 $as_echo "no" >&6; }
3946 $as_echo "$as_me: failed program was:" >&5
3947 sed 's/^/| /' conftest.$ac_ext >&5
3948
3949 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3950 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3951 as_fn_error 77 "C compiler cannot create executables
3952 See \`config.log' for more details" "$LINENO" 5; }
3953 else
3954   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3955 $as_echo "yes" >&6; }
3956 fi
3957 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3958 $as_echo_n "checking for C compiler default output file name... " >&6; }
3959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3960 $as_echo "$ac_file" >&6; }
3961 ac_exeext=$ac_cv_exeext
3962
3963 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3964 ac_clean_files=$ac_clean_files_save
3965 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3966 $as_echo_n "checking for suffix of executables... " >&6; }
3967 if { { ac_try="$ac_link"
3968 case "(($ac_try" in
3969   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3970   *) ac_try_echo=$ac_try;;
3971 esac
3972 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3973 $as_echo "$ac_try_echo"; } >&5
3974   (eval "$ac_link") 2>&5
3975   ac_status=$?
3976   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3977   test $ac_status = 0; }; then :
3978   # If both `conftest.exe' and `conftest' are `present' (well, observable)
3979 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3980 # work properly (i.e., refer to `conftest.exe'), while it won't with
3981 # `rm'.
3982 for ac_file in conftest.exe conftest conftest.*; do
3983   test -f "$ac_file" || continue
3984   case $ac_file in
3985     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3986     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3987           break;;
3988     * ) break;;
3989   esac
3990 done
3991 else
3992   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3993 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3994 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3995 See \`config.log' for more details" "$LINENO" 5; }
3996 fi
3997 rm -f conftest conftest$ac_cv_exeext
3998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3999 $as_echo "$ac_cv_exeext" >&6; }
4000
4001 rm -f conftest.$ac_ext
4002 EXEEXT=$ac_cv_exeext
4003 ac_exeext=$EXEEXT
4004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4005 /* end confdefs.h.  */
4006 #include <stdio.h>
4007 int
4008 main ()
4009 {
4010 FILE *f = fopen ("conftest.out", "w");
4011  return ferror (f) || fclose (f) != 0;
4012
4013   ;
4014   return 0;
4015 }
4016 _ACEOF
4017 ac_clean_files="$ac_clean_files conftest.out"
4018 # Check that the compiler produces executables we can run.  If not, either
4019 # the compiler is broken, or we cross compile.
4020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4021 $as_echo_n "checking whether we are cross compiling... " >&6; }
4022 if test "$cross_compiling" != yes; then
4023   { { ac_try="$ac_link"
4024 case "(($ac_try" in
4025   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4026   *) ac_try_echo=$ac_try;;
4027 esac
4028 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4029 $as_echo "$ac_try_echo"; } >&5
4030   (eval "$ac_link") 2>&5
4031   ac_status=$?
4032   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4033   test $ac_status = 0; }
4034   if { ac_try='./conftest$ac_cv_exeext'
4035   { { case "(($ac_try" in
4036   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4037   *) ac_try_echo=$ac_try;;
4038 esac
4039 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4040 $as_echo "$ac_try_echo"; } >&5
4041   (eval "$ac_try") 2>&5
4042   ac_status=$?
4043   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4044   test $ac_status = 0; }; }; then
4045     cross_compiling=no
4046   else
4047     if test "$cross_compiling" = maybe; then
4048         cross_compiling=yes
4049     else
4050         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4051 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4052 as_fn_error $? "cannot run C compiled programs.
4053 If you meant to cross compile, use \`--host'.
4054 See \`config.log' for more details" "$LINENO" 5; }
4055     fi
4056   fi
4057 fi
4058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4059 $as_echo "$cross_compiling" >&6; }
4060
4061 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4062 ac_clean_files=$ac_clean_files_save
4063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4064 $as_echo_n "checking for suffix of object files... " >&6; }
4065 if ${ac_cv_objext+:} false; then :
4066   $as_echo_n "(cached) " >&6
4067 else
4068   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4069 /* end confdefs.h.  */
4070
4071 int
4072 main ()
4073 {
4074
4075   ;
4076   return 0;
4077 }
4078 _ACEOF
4079 rm -f conftest.o conftest.obj
4080 if { { ac_try="$ac_compile"
4081 case "(($ac_try" in
4082   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4083   *) ac_try_echo=$ac_try;;
4084 esac
4085 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4086 $as_echo "$ac_try_echo"; } >&5
4087   (eval "$ac_compile") 2>&5
4088   ac_status=$?
4089   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4090   test $ac_status = 0; }; then :
4091   for ac_file in conftest.o conftest.obj conftest.*; do
4092   test -f "$ac_file" || continue;
4093   case $ac_file in
4094     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4095     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4096        break;;
4097   esac
4098 done
4099 else
4100   $as_echo "$as_me: failed program was:" >&5
4101 sed 's/^/| /' conftest.$ac_ext >&5
4102
4103 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4104 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4105 as_fn_error $? "cannot compute suffix of object files: cannot compile
4106 See \`config.log' for more details" "$LINENO" 5; }
4107 fi
4108 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4109 fi
4110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4111 $as_echo "$ac_cv_objext" >&6; }
4112 OBJEXT=$ac_cv_objext
4113 ac_objext=$OBJEXT
4114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4115 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4116 if ${ac_cv_c_compiler_gnu+:} false; then :
4117   $as_echo_n "(cached) " >&6
4118 else
4119   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4120 /* end confdefs.h.  */
4121
4122 int
4123 main ()
4124 {
4125 #ifndef __GNUC__
4126        choke me
4127 #endif
4128
4129   ;
4130   return 0;
4131 }
4132 _ACEOF
4133 if ac_fn_c_try_compile "$LINENO"; then :
4134   ac_compiler_gnu=yes
4135 else
4136   ac_compiler_gnu=no
4137 fi
4138 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4139 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4140
4141 fi
4142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4143 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4144 if test $ac_compiler_gnu = yes; then
4145   GCC=yes
4146 else
4147   GCC=
4148 fi
4149 ac_test_CFLAGS=${CFLAGS+set}
4150 ac_save_CFLAGS=$CFLAGS
4151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4152 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4153 if ${ac_cv_prog_cc_g+:} false; then :
4154   $as_echo_n "(cached) " >&6
4155 else
4156   ac_save_c_werror_flag=$ac_c_werror_flag
4157    ac_c_werror_flag=yes
4158    ac_cv_prog_cc_g=no
4159    CFLAGS="-g"
4160    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4161 /* end confdefs.h.  */
4162
4163 int
4164 main ()
4165 {
4166
4167   ;
4168   return 0;
4169 }
4170 _ACEOF
4171 if ac_fn_c_try_compile "$LINENO"; then :
4172   ac_cv_prog_cc_g=yes
4173 else
4174   CFLAGS=""
4175       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4176 /* end confdefs.h.  */
4177
4178 int
4179 main ()
4180 {
4181
4182   ;
4183   return 0;
4184 }
4185 _ACEOF
4186 if ac_fn_c_try_compile "$LINENO"; then :
4187
4188 else
4189   ac_c_werror_flag=$ac_save_c_werror_flag
4190          CFLAGS="-g"
4191          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4192 /* end confdefs.h.  */
4193
4194 int
4195 main ()
4196 {
4197
4198   ;
4199   return 0;
4200 }
4201 _ACEOF
4202 if ac_fn_c_try_compile "$LINENO"; then :
4203   ac_cv_prog_cc_g=yes
4204 fi
4205 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4206 fi
4207 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4208 fi
4209 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4210    ac_c_werror_flag=$ac_save_c_werror_flag
4211 fi
4212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4213 $as_echo "$ac_cv_prog_cc_g" >&6; }
4214 if test "$ac_test_CFLAGS" = set; then
4215   CFLAGS=$ac_save_CFLAGS
4216 elif test $ac_cv_prog_cc_g = yes; then
4217   if test "$GCC" = yes; then
4218     CFLAGS="-g -O2"
4219   else
4220     CFLAGS="-g"
4221   fi
4222 else
4223   if test "$GCC" = yes; then
4224     CFLAGS="-O2"
4225   else
4226     CFLAGS=
4227   fi
4228 fi
4229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4230 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4231 if ${ac_cv_prog_cc_c89+:} false; then :
4232   $as_echo_n "(cached) " >&6
4233 else
4234   ac_cv_prog_cc_c89=no
4235 ac_save_CC=$CC
4236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4237 /* end confdefs.h.  */
4238 #include <stdarg.h>
4239 #include <stdio.h>
4240 struct stat;
4241 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4242 struct buf { int x; };
4243 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4244 static char *e (p, i)
4245      char **p;
4246      int i;
4247 {
4248   return p[i];
4249 }
4250 static char *f (char * (*g) (char **, int), char **p, ...)
4251 {
4252   char *s;
4253   va_list v;
4254   va_start (v,p);
4255   s = g (p, va_arg (v,int));
4256   va_end (v);
4257   return s;
4258 }
4259
4260 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
4261    function prototypes and stuff, but not '\xHH' hex character constants.
4262    These don't provoke an error unfortunately, instead are silently treated
4263    as 'x'.  The following induces an error, until -std is added to get
4264    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
4265    array size at least.  It's necessary to write '\x00'==0 to get something
4266    that's true only with -std.  */
4267 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4268
4269 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4270    inside strings and character constants.  */
4271 #define FOO(x) 'x'
4272 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4273
4274 int test (int i, double x);
4275 struct s1 {int (*f) (int a);};
4276 struct s2 {int (*f) (double a);};
4277 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4278 int argc;
4279 char **argv;
4280 int
4281 main ()
4282 {
4283 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4284   ;
4285   return 0;
4286 }
4287 _ACEOF
4288 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4289         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4290 do
4291   CC="$ac_save_CC $ac_arg"
4292   if ac_fn_c_try_compile "$LINENO"; then :
4293   ac_cv_prog_cc_c89=$ac_arg
4294 fi
4295 rm -f core conftest.err conftest.$ac_objext
4296   test "x$ac_cv_prog_cc_c89" != "xno" && break
4297 done
4298 rm -f conftest.$ac_ext
4299 CC=$ac_save_CC
4300
4301 fi
4302 # AC_CACHE_VAL
4303 case "x$ac_cv_prog_cc_c89" in
4304   x)
4305     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4306 $as_echo "none needed" >&6; } ;;
4307   xno)
4308     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4309 $as_echo "unsupported" >&6; } ;;
4310   *)
4311     CC="$CC $ac_cv_prog_cc_c89"
4312     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4313 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4314 esac
4315 if test "x$ac_cv_prog_cc_c89" != xno; then :
4316
4317 fi
4318
4319 ac_ext=c
4320 ac_cpp='$CPP $CPPFLAGS'
4321 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4322 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4323 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4324
4325
4326 # Check if it's Intel's compiler, which (usually) pretends to be gcc,
4327 # but has idiosyncrasies of its own.  We assume icc will define
4328 # __INTEL_COMPILER regardless of CFLAGS.
4329
4330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4331 /* end confdefs.h.  */
4332
4333 int
4334 main ()
4335 {
4336 #ifndef __INTEL_COMPILER
4337 choke me
4338 #endif
4339   ;
4340   return 0;
4341 }
4342 _ACEOF
4343 if ac_fn_c_try_compile "$LINENO"; then :
4344   ICC=yes
4345 else
4346   ICC=no
4347 fi
4348 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4349
4350 # Check if it's Sun Studio compiler. We assume that
4351 # __SUNPRO_C will be defined for Sun Studio compilers
4352 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4353 /* end confdefs.h.  */
4354
4355 int
4356 main ()
4357 {
4358 #ifndef __SUNPRO_C
4359 choke me
4360 #endif
4361   ;
4362   return 0;
4363 }
4364 _ACEOF
4365 if ac_fn_c_try_compile "$LINENO"; then :
4366   SUN_STUDIO_CC=yes
4367 else
4368   SUN_STUDIO_CC=no
4369 fi
4370 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4371
4372
4373
4374 unset CFLAGS
4375
4376 #
4377 # Read the template
4378 #
4379 . "$srcdir/src/template/$template" || exit
4380
4381 # CFLAGS are selected so:
4382 # If the user specifies something in the environment, that is used.
4383 # else:  If the template file set something, that is used.
4384 # else:  If coverage was enabled, don't set anything.
4385 # else:  If the compiler is GCC, then we use -O2.
4386 # else:  If the compiler is something else, then we use -O, unless debugging.
4387
4388 if test "$ac_env_CFLAGS_set" = set; then
4389   CFLAGS=$ac_env_CFLAGS_value
4390 elif test "${CFLAGS+set}" = set; then
4391   : # (keep what template set)
4392 elif test "$enable_coverage" = yes; then
4393   : # no optimization by default
4394 elif test "$GCC" = yes; then
4395   CFLAGS="-O2"
4396 else
4397   # if the user selected debug mode, don't use -O
4398   if test "$enable_debug" != yes; then
4399     CFLAGS="-O"
4400   fi
4401 fi
4402
4403 # CFLAGS we determined above will be added back at the end
4404 user_CFLAGS=$CFLAGS
4405 CFLAGS=""
4406
4407 # set CFLAGS_VECTOR from the environment, if available
4408 if test "$ac_env_CFLAGS_VECTOR_set" = set; then
4409   CFLAGS_VECTOR=$ac_env_CFLAGS_VECTOR_value
4410 fi
4411
4412 # Some versions of GCC support some additional useful warning flags.
4413 # Check whether they are supported, and add them to CFLAGS if so.
4414 # ICC pretends to be GCC but it's lying; it doesn't support these flags,
4415 # but has its own.  Also check other compiler-specific flags here.
4416
4417 if test "$GCC" = yes -a "$ICC" = no; then
4418   CFLAGS="-Wall -Wmissing-prototypes -Wpointer-arith"
4419   # These work in some but not all gcc versions
4420   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wdeclaration-after-statement" >&5
4421 $as_echo_n "checking whether $CC supports -Wdeclaration-after-statement... " >&6; }
4422 if ${pgac_cv_prog_cc_cflags__Wdeclaration_after_statement+:} false; then :
4423   $as_echo_n "(cached) " >&6
4424 else
4425   pgac_save_CFLAGS=$CFLAGS
4426 CFLAGS="$pgac_save_CFLAGS -Wdeclaration-after-statement"
4427 ac_save_c_werror_flag=$ac_c_werror_flag
4428 ac_c_werror_flag=yes
4429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4430 /* end confdefs.h.  */
4431
4432 int
4433 main ()
4434 {
4435
4436   ;
4437   return 0;
4438 }
4439 _ACEOF
4440 if ac_fn_c_try_compile "$LINENO"; then :
4441   pgac_cv_prog_cc_cflags__Wdeclaration_after_statement=yes
4442 else
4443   pgac_cv_prog_cc_cflags__Wdeclaration_after_statement=no
4444 fi
4445 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4446 ac_c_werror_flag=$ac_save_c_werror_flag
4447 CFLAGS="$pgac_save_CFLAGS"
4448 fi
4449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" >&5
4450 $as_echo "$pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" >&6; }
4451 if test x"$pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" = x"yes"; then
4452   CFLAGS="$CFLAGS -Wdeclaration-after-statement"
4453 fi
4454
4455   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wendif-labels" >&5
4456 $as_echo_n "checking whether $CC supports -Wendif-labels... " >&6; }
4457 if ${pgac_cv_prog_cc_cflags__Wendif_labels+:} false; then :
4458   $as_echo_n "(cached) " >&6
4459 else
4460   pgac_save_CFLAGS=$CFLAGS
4461 CFLAGS="$pgac_save_CFLAGS -Wendif-labels"
4462 ac_save_c_werror_flag=$ac_c_werror_flag
4463 ac_c_werror_flag=yes
4464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4465 /* end confdefs.h.  */
4466
4467 int
4468 main ()
4469 {
4470
4471   ;
4472   return 0;
4473 }
4474 _ACEOF
4475 if ac_fn_c_try_compile "$LINENO"; then :
4476   pgac_cv_prog_cc_cflags__Wendif_labels=yes
4477 else
4478   pgac_cv_prog_cc_cflags__Wendif_labels=no
4479 fi
4480 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4481 ac_c_werror_flag=$ac_save_c_werror_flag
4482 CFLAGS="$pgac_save_CFLAGS"
4483 fi
4484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wendif_labels" >&5
4485 $as_echo "$pgac_cv_prog_cc_cflags__Wendif_labels" >&6; }
4486 if test x"$pgac_cv_prog_cc_cflags__Wendif_labels" = x"yes"; then
4487   CFLAGS="$CFLAGS -Wendif-labels"
4488 fi
4489
4490   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wmissing-format-attribute" >&5
4491 $as_echo_n "checking whether $CC supports -Wmissing-format-attribute... " >&6; }
4492 if ${pgac_cv_prog_cc_cflags__Wmissing_format_attribute+:} false; then :
4493   $as_echo_n "(cached) " >&6
4494 else
4495   pgac_save_CFLAGS=$CFLAGS
4496 CFLAGS="$pgac_save_CFLAGS -Wmissing-format-attribute"
4497 ac_save_c_werror_flag=$ac_c_werror_flag
4498 ac_c_werror_flag=yes
4499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4500 /* end confdefs.h.  */
4501
4502 int
4503 main ()
4504 {
4505
4506   ;
4507   return 0;
4508 }
4509 _ACEOF
4510 if ac_fn_c_try_compile "$LINENO"; then :
4511   pgac_cv_prog_cc_cflags__Wmissing_format_attribute=yes
4512 else
4513   pgac_cv_prog_cc_cflags__Wmissing_format_attribute=no
4514 fi
4515 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4516 ac_c_werror_flag=$ac_save_c_werror_flag
4517 CFLAGS="$pgac_save_CFLAGS"
4518 fi
4519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wmissing_format_attribute" >&5
4520 $as_echo "$pgac_cv_prog_cc_cflags__Wmissing_format_attribute" >&6; }
4521 if test x"$pgac_cv_prog_cc_cflags__Wmissing_format_attribute" = x"yes"; then
4522   CFLAGS="$CFLAGS -Wmissing-format-attribute"
4523 fi
4524
4525   # This was included in -Wall/-Wformat in older GCC versions
4526   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wformat-security" >&5
4527 $as_echo_n "checking whether $CC supports -Wformat-security... " >&6; }
4528 if ${pgac_cv_prog_cc_cflags__Wformat_security+:} false; then :
4529   $as_echo_n "(cached) " >&6
4530 else
4531   pgac_save_CFLAGS=$CFLAGS
4532 CFLAGS="$pgac_save_CFLAGS -Wformat-security"
4533 ac_save_c_werror_flag=$ac_c_werror_flag
4534 ac_c_werror_flag=yes
4535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4536 /* end confdefs.h.  */
4537
4538 int
4539 main ()
4540 {
4541
4542   ;
4543   return 0;
4544 }
4545 _ACEOF
4546 if ac_fn_c_try_compile "$LINENO"; then :
4547   pgac_cv_prog_cc_cflags__Wformat_security=yes
4548 else
4549   pgac_cv_prog_cc_cflags__Wformat_security=no
4550 fi
4551 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4552 ac_c_werror_flag=$ac_save_c_werror_flag
4553 CFLAGS="$pgac_save_CFLAGS"
4554 fi
4555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wformat_security" >&5
4556 $as_echo "$pgac_cv_prog_cc_cflags__Wformat_security" >&6; }
4557 if test x"$pgac_cv_prog_cc_cflags__Wformat_security" = x"yes"; then
4558   CFLAGS="$CFLAGS -Wformat-security"
4559 fi
4560
4561   # Disable strict-aliasing rules; needed for gcc 3.3+
4562   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fno-strict-aliasing" >&5
4563 $as_echo_n "checking whether $CC supports -fno-strict-aliasing... " >&6; }
4564 if ${pgac_cv_prog_cc_cflags__fno_strict_aliasing+:} false; then :
4565   $as_echo_n "(cached) " >&6
4566 else
4567   pgac_save_CFLAGS=$CFLAGS
4568 CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing"
4569 ac_save_c_werror_flag=$ac_c_werror_flag
4570 ac_c_werror_flag=yes
4571 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4572 /* end confdefs.h.  */
4573
4574 int
4575 main ()
4576 {
4577
4578   ;
4579   return 0;
4580 }
4581 _ACEOF
4582 if ac_fn_c_try_compile "$LINENO"; then :
4583   pgac_cv_prog_cc_cflags__fno_strict_aliasing=yes
4584 else
4585   pgac_cv_prog_cc_cflags__fno_strict_aliasing=no
4586 fi
4587 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4588 ac_c_werror_flag=$ac_save_c_werror_flag
4589 CFLAGS="$pgac_save_CFLAGS"
4590 fi
4591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&5
4592 $as_echo "$pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&6; }
4593 if test x"$pgac_cv_prog_cc_cflags__fno_strict_aliasing" = x"yes"; then
4594   CFLAGS="$CFLAGS -fno-strict-aliasing"
4595 fi
4596
4597   # Disable optimizations that assume no overflow; needed for gcc 4.3+
4598   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fwrapv" >&5
4599 $as_echo_n "checking whether $CC supports -fwrapv... " >&6; }
4600 if ${pgac_cv_prog_cc_cflags__fwrapv+:} false; then :
4601   $as_echo_n "(cached) " >&6
4602 else
4603   pgac_save_CFLAGS=$CFLAGS
4604 CFLAGS="$pgac_save_CFLAGS -fwrapv"
4605 ac_save_c_werror_flag=$ac_c_werror_flag
4606 ac_c_werror_flag=yes
4607 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4608 /* end confdefs.h.  */
4609
4610 int
4611 main ()
4612 {
4613
4614   ;
4615   return 0;
4616 }
4617 _ACEOF
4618 if ac_fn_c_try_compile "$LINENO"; then :
4619   pgac_cv_prog_cc_cflags__fwrapv=yes
4620 else
4621   pgac_cv_prog_cc_cflags__fwrapv=no
4622 fi
4623 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4624 ac_c_werror_flag=$ac_save_c_werror_flag
4625 CFLAGS="$pgac_save_CFLAGS"
4626 fi
4627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fwrapv" >&5
4628 $as_echo "$pgac_cv_prog_cc_cflags__fwrapv" >&6; }
4629 if test x"$pgac_cv_prog_cc_cflags__fwrapv" = x"yes"; then
4630   CFLAGS="$CFLAGS -fwrapv"
4631 fi
4632
4633   # Disable FP optimizations that cause various errors on gcc 4.5+ or maybe 4.6+
4634   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fexcess-precision=standard" >&5
4635 $as_echo_n "checking whether $CC supports -fexcess-precision=standard... " >&6; }
4636 if ${pgac_cv_prog_cc_cflags__fexcess_precision_standard+:} false; then :
4637   $as_echo_n "(cached) " >&6
4638 else
4639   pgac_save_CFLAGS=$CFLAGS
4640 CFLAGS="$pgac_save_CFLAGS -fexcess-precision=standard"
4641 ac_save_c_werror_flag=$ac_c_werror_flag
4642 ac_c_werror_flag=yes
4643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4644 /* end confdefs.h.  */
4645
4646 int
4647 main ()
4648 {
4649
4650   ;
4651   return 0;
4652 }
4653 _ACEOF
4654 if ac_fn_c_try_compile "$LINENO"; then :
4655   pgac_cv_prog_cc_cflags__fexcess_precision_standard=yes
4656 else
4657   pgac_cv_prog_cc_cflags__fexcess_precision_standard=no
4658 fi
4659 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4660 ac_c_werror_flag=$ac_save_c_werror_flag
4661 CFLAGS="$pgac_save_CFLAGS"
4662 fi
4663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fexcess_precision_standard" >&5
4664 $as_echo "$pgac_cv_prog_cc_cflags__fexcess_precision_standard" >&6; }
4665 if test x"$pgac_cv_prog_cc_cflags__fexcess_precision_standard" = x"yes"; then
4666   CFLAGS="$CFLAGS -fexcess-precision=standard"
4667 fi
4668
4669   # Optimization flags for specific files that benefit from vectorization
4670   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -funroll-loops" >&5
4671 $as_echo_n "checking whether $CC supports -funroll-loops... " >&6; }
4672 if ${pgac_cv_prog_cc_cflags__funroll_loops+:} false; then :
4673   $as_echo_n "(cached) " >&6
4674 else
4675   pgac_save_CFLAGS=$CFLAGS
4676 CFLAGS="$pgac_save_CFLAGS -funroll-loops"
4677 ac_save_c_werror_flag=$ac_c_werror_flag
4678 ac_c_werror_flag=yes
4679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4680 /* end confdefs.h.  */
4681
4682 int
4683 main ()
4684 {
4685
4686   ;
4687   return 0;
4688 }
4689 _ACEOF
4690 if ac_fn_c_try_compile "$LINENO"; then :
4691   pgac_cv_prog_cc_cflags__funroll_loops=yes
4692 else
4693   pgac_cv_prog_cc_cflags__funroll_loops=no
4694 fi
4695 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4696 ac_c_werror_flag=$ac_save_c_werror_flag
4697 CFLAGS="$pgac_save_CFLAGS"
4698 fi
4699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__funroll_loops" >&5
4700 $as_echo "$pgac_cv_prog_cc_cflags__funroll_loops" >&6; }
4701 if test x"$pgac_cv_prog_cc_cflags__funroll_loops" = x"yes"; then
4702   CFLAGS_VECTOR="${CFLAGS_VECTOR} -funroll-loops"
4703 fi
4704
4705   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -ftree-vectorize" >&5
4706 $as_echo_n "checking whether $CC supports -ftree-vectorize... " >&6; }
4707 if ${pgac_cv_prog_cc_cflags__ftree_vectorize+:} false; then :
4708   $as_echo_n "(cached) " >&6
4709 else
4710   pgac_save_CFLAGS=$CFLAGS
4711 CFLAGS="$pgac_save_CFLAGS -ftree-vectorize"
4712 ac_save_c_werror_flag=$ac_c_werror_flag
4713 ac_c_werror_flag=yes
4714 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4715 /* end confdefs.h.  */
4716
4717 int
4718 main ()
4719 {
4720
4721   ;
4722   return 0;
4723 }
4724 _ACEOF
4725 if ac_fn_c_try_compile "$LINENO"; then :
4726   pgac_cv_prog_cc_cflags__ftree_vectorize=yes
4727 else
4728   pgac_cv_prog_cc_cflags__ftree_vectorize=no
4729 fi
4730 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4731 ac_c_werror_flag=$ac_save_c_werror_flag
4732 CFLAGS="$pgac_save_CFLAGS"
4733 fi
4734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__ftree_vectorize" >&5
4735 $as_echo "$pgac_cv_prog_cc_cflags__ftree_vectorize" >&6; }
4736 if test x"$pgac_cv_prog_cc_cflags__ftree_vectorize" = x"yes"; then
4737   CFLAGS_VECTOR="${CFLAGS_VECTOR} -ftree-vectorize"
4738 fi
4739
4740   # We want to suppress clang's unhelpful unused-command-line-argument warnings
4741   # but gcc won't complain about unrecognized -Wno-foo switches, so we have to
4742   # test for the positive form and if that works, add the negative form
4743   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wunused-command-line-argument" >&5
4744 $as_echo_n "checking whether $CC supports -Wunused-command-line-argument... " >&6; }
4745 if ${pgac_cv_prog_cc_cflags__Wunused_command_line_argument+:} false; then :
4746   $as_echo_n "(cached) " >&6
4747 else
4748   pgac_save_CFLAGS=$CFLAGS
4749 CFLAGS="$pgac_save_CFLAGS -Wunused-command-line-argument"
4750 ac_save_c_werror_flag=$ac_c_werror_flag
4751 ac_c_werror_flag=yes
4752 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4753 /* end confdefs.h.  */
4754
4755 int
4756 main ()
4757 {
4758
4759   ;
4760   return 0;
4761 }
4762 _ACEOF
4763 if ac_fn_c_try_compile "$LINENO"; then :
4764   pgac_cv_prog_cc_cflags__Wunused_command_line_argument=yes
4765 else
4766   pgac_cv_prog_cc_cflags__Wunused_command_line_argument=no
4767 fi
4768 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4769 ac_c_werror_flag=$ac_save_c_werror_flag
4770 CFLAGS="$pgac_save_CFLAGS"
4771 fi
4772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wunused_command_line_argument" >&5
4773 $as_echo "$pgac_cv_prog_cc_cflags__Wunused_command_line_argument" >&6; }
4774 if test x"$pgac_cv_prog_cc_cflags__Wunused_command_line_argument" = x"yes"; then
4775   NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
4776 fi
4777
4778   if test -n "$NOT_THE_CFLAGS"; then
4779     CFLAGS="$CFLAGS -Wno-unused-command-line-argument"
4780   fi
4781 elif test "$ICC" = yes; then
4782   # Intel's compiler has a bug/misoptimization in checking for
4783   # division by NAN (NaN == 0), -mp1 fixes it, so add it to the CFLAGS.
4784   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -mp1" >&5
4785 $as_echo_n "checking whether $CC supports -mp1... " >&6; }
4786 if ${pgac_cv_prog_cc_cflags__mp1+:} false; then :
4787   $as_echo_n "(cached) " >&6
4788 else
4789   pgac_save_CFLAGS=$CFLAGS
4790 CFLAGS="$pgac_save_CFLAGS -mp1"
4791 ac_save_c_werror_flag=$ac_c_werror_flag
4792 ac_c_werror_flag=yes
4793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4794 /* end confdefs.h.  */
4795
4796 int
4797 main ()
4798 {
4799
4800   ;
4801   return 0;
4802 }
4803 _ACEOF
4804 if ac_fn_c_try_compile "$LINENO"; then :
4805   pgac_cv_prog_cc_cflags__mp1=yes
4806 else
4807   pgac_cv_prog_cc_cflags__mp1=no
4808 fi
4809 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4810 ac_c_werror_flag=$ac_save_c_werror_flag
4811 CFLAGS="$pgac_save_CFLAGS"
4812 fi
4813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__mp1" >&5
4814 $as_echo "$pgac_cv_prog_cc_cflags__mp1" >&6; }
4815 if test x"$pgac_cv_prog_cc_cflags__mp1" = x"yes"; then
4816   CFLAGS="$CFLAGS -mp1"
4817 fi
4818
4819   # Make sure strict aliasing is off (though this is said to be the default)
4820   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fno-strict-aliasing" >&5
4821 $as_echo_n "checking whether $CC supports -fno-strict-aliasing... " >&6; }
4822 if ${pgac_cv_prog_cc_cflags__fno_strict_aliasing+:} false; then :
4823   $as_echo_n "(cached) " >&6
4824 else
4825   pgac_save_CFLAGS=$CFLAGS
4826 CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing"
4827 ac_save_c_werror_flag=$ac_c_werror_flag
4828 ac_c_werror_flag=yes
4829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4830 /* end confdefs.h.  */
4831
4832 int
4833 main ()
4834 {
4835
4836   ;
4837   return 0;
4838 }
4839 _ACEOF
4840 if ac_fn_c_try_compile "$LINENO"; then :
4841   pgac_cv_prog_cc_cflags__fno_strict_aliasing=yes
4842 else
4843   pgac_cv_prog_cc_cflags__fno_strict_aliasing=no
4844 fi
4845 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4846 ac_c_werror_flag=$ac_save_c_werror_flag
4847 CFLAGS="$pgac_save_CFLAGS"
4848 fi
4849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&5
4850 $as_echo "$pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&6; }
4851 if test x"$pgac_cv_prog_cc_cflags__fno_strict_aliasing" = x"yes"; then
4852   CFLAGS="$CFLAGS -fno-strict-aliasing"
4853 fi
4854
4855 elif test "$PORTNAME" = "aix"; then
4856   # AIX's xlc has to have strict aliasing turned off too
4857   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -qnoansialias" >&5
4858 $as_echo_n "checking whether $CC supports -qnoansialias... " >&6; }
4859 if ${pgac_cv_prog_cc_cflags__qnoansialias+:} false; then :
4860   $as_echo_n "(cached) " >&6
4861 else
4862   pgac_save_CFLAGS=$CFLAGS
4863 CFLAGS="$pgac_save_CFLAGS -qnoansialias"
4864 ac_save_c_werror_flag=$ac_c_werror_flag
4865 ac_c_werror_flag=yes
4866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4867 /* end confdefs.h.  */
4868
4869 int
4870 main ()
4871 {
4872
4873   ;
4874   return 0;
4875 }
4876 _ACEOF
4877 if ac_fn_c_try_compile "$LINENO"; then :
4878   pgac_cv_prog_cc_cflags__qnoansialias=yes
4879 else
4880   pgac_cv_prog_cc_cflags__qnoansialias=no
4881 fi
4882 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4883 ac_c_werror_flag=$ac_save_c_werror_flag
4884 CFLAGS="$pgac_save_CFLAGS"
4885 fi
4886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__qnoansialias" >&5
4887 $as_echo "$pgac_cv_prog_cc_cflags__qnoansialias" >&6; }
4888 if test x"$pgac_cv_prog_cc_cflags__qnoansialias" = x"yes"; then
4889   CFLAGS="$CFLAGS -qnoansialias"
4890 fi
4891
4892   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -qlonglong" >&5
4893 $as_echo_n "checking whether $CC supports -qlonglong... " >&6; }
4894 if ${pgac_cv_prog_cc_cflags__qlonglong+:} false; then :
4895   $as_echo_n "(cached) " >&6
4896 else
4897   pgac_save_CFLAGS=$CFLAGS
4898 CFLAGS="$pgac_save_CFLAGS -qlonglong"
4899 ac_save_c_werror_flag=$ac_c_werror_flag
4900 ac_c_werror_flag=yes
4901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4902 /* end confdefs.h.  */
4903
4904 int
4905 main ()
4906 {
4907
4908   ;
4909   return 0;
4910 }
4911 _ACEOF
4912 if ac_fn_c_try_compile "$LINENO"; then :
4913   pgac_cv_prog_cc_cflags__qlonglong=yes
4914 else
4915   pgac_cv_prog_cc_cflags__qlonglong=no
4916 fi
4917 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4918 ac_c_werror_flag=$ac_save_c_werror_flag
4919 CFLAGS="$pgac_save_CFLAGS"
4920 fi
4921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__qlonglong" >&5
4922 $as_echo "$pgac_cv_prog_cc_cflags__qlonglong" >&6; }
4923 if test x"$pgac_cv_prog_cc_cflags__qlonglong" = x"yes"; then
4924   CFLAGS="$CFLAGS -qlonglong"
4925 fi
4926
4927 elif test "$PORTNAME" = "hpux"; then
4928   # On some versions of HP-UX, libm functions do not set errno by default.
4929   # Fix that by using +Olibmerrno if the compiler recognizes it.
4930   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports +Olibmerrno" >&5
4931 $as_echo_n "checking whether $CC supports +Olibmerrno... " >&6; }
4932 if ${pgac_cv_prog_cc_cflags_pOlibmerrno+:} false; then :
4933   $as_echo_n "(cached) " >&6
4934 else
4935   pgac_save_CFLAGS=$CFLAGS
4936 CFLAGS="$pgac_save_CFLAGS +Olibmerrno"
4937 ac_save_c_werror_flag=$ac_c_werror_flag
4938 ac_c_werror_flag=yes
4939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4940 /* end confdefs.h.  */
4941
4942 int
4943 main ()
4944 {
4945
4946   ;
4947   return 0;
4948 }
4949 _ACEOF
4950 if ac_fn_c_try_compile "$LINENO"; then :
4951   pgac_cv_prog_cc_cflags_pOlibmerrno=yes
4952 else
4953   pgac_cv_prog_cc_cflags_pOlibmerrno=no
4954 fi
4955 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4956 ac_c_werror_flag=$ac_save_c_werror_flag
4957 CFLAGS="$pgac_save_CFLAGS"
4958 fi
4959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags_pOlibmerrno" >&5
4960 $as_echo "$pgac_cv_prog_cc_cflags_pOlibmerrno" >&6; }
4961 if test x"$pgac_cv_prog_cc_cflags_pOlibmerrno" = x"yes"; then
4962   CFLAGS="$CFLAGS +Olibmerrno"
4963 fi
4964
4965 fi
4966
4967 CFLAGS_VECTOR=$CFLAGS_VECTOR
4968
4969
4970 # supply -g if --enable-debug
4971 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
4972   CFLAGS="$CFLAGS -g"
4973 fi
4974
4975 # enable code coverage if --enable-coverage
4976 if test "$enable_coverage" = yes; then
4977   if test "$GCC" = yes; then
4978     CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
4979   else
4980     as_fn_error $? "--enable-coverage is supported only when using GCC" "$LINENO" 5
4981   fi
4982 fi
4983
4984 # enable profiling if --enable-profiling
4985 if test "$enable_profiling" = yes && test "$ac_cv_prog_cc_g" = yes; then
4986   if test "$GCC" = yes; then
4987
4988 $as_echo "#define PROFILE_PID_DIR 1" >>confdefs.h
4989
4990     CFLAGS="$CFLAGS -pg $PLATFORM_PROFILE_FLAGS"
4991   else
4992     as_fn_error $? "--enable-profiling is supported only when using GCC" "$LINENO" 5
4993   fi
4994 fi
4995
4996 # We already have this in Makefile.win32, but configure needs it too
4997 if test "$PORTNAME" = "win32"; then
4998   CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32 -DEXEC_BACKEND"
4999 fi
5000
5001 # Now that we're done automatically adding stuff to CFLAGS, put back the
5002 # user-specified flags (if any) at the end.  This lets users override
5003 # the automatic additions.
5004 CFLAGS="$CFLAGS $user_CFLAGS"
5005
5006 # Check if the compiler still works with the final flag settings
5007 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler still works" >&5
5008 $as_echo_n "checking whether the C compiler still works... " >&6; }
5009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5010 /* end confdefs.h.  */
5011
5012 int
5013 main ()
5014 {
5015 return 0;
5016   ;
5017   return 0;
5018 }
5019 _ACEOF
5020 if ac_fn_c_try_link "$LINENO"; then :
5021   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5022 $as_echo "yes" >&6; }
5023 else
5024   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5025 $as_echo "no" >&6; }
5026    as_fn_error $? "cannot proceed" "$LINENO" 5
5027 fi
5028 rm -f core conftest.err conftest.$ac_objext \
5029     conftest$ac_exeext conftest.$ac_ext
5030
5031 # Defend against gcc -ffast-math
5032 if test "$GCC" = yes; then
5033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5034 /* end confdefs.h.  */
5035
5036 int
5037 main ()
5038 {
5039 #ifdef __FAST_MATH__
5040 choke me
5041 #endif
5042   ;
5043   return 0;
5044 }
5045 _ACEOF
5046 if ac_fn_c_try_compile "$LINENO"; then :
5047
5048 else
5049   as_fn_error $? "do not put -ffast-math in CFLAGS" "$LINENO" 5
5050 fi
5051 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5052 fi
5053
5054 ac_ext=c
5055 ac_cpp='$CPP $CPPFLAGS'
5056 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5057 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5058 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5060 $as_echo_n "checking how to run the C preprocessor... " >&6; }
5061 # On Suns, sometimes $CPP names a directory.
5062 if test -n "$CPP" && test -d "$CPP"; then
5063   CPP=
5064 fi
5065 if test -z "$CPP"; then
5066   if ${ac_cv_prog_CPP+:} false; then :
5067   $as_echo_n "(cached) " >&6
5068 else
5069       # Double quotes because CPP needs to be expanded
5070     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
5071     do
5072       ac_preproc_ok=false
5073 for ac_c_preproc_warn_flag in '' yes
5074 do
5075   # Use a header file that comes with gcc, so configuring glibc
5076   # with a fresh cross-compiler works.
5077   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5078   # <limits.h> exists even on freestanding compilers.
5079   # On the NeXT, cc -E runs the code through the compiler's parser,
5080   # not just through cpp. "Syntax error" is here to catch this case.
5081   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5082 /* end confdefs.h.  */
5083 #ifdef __STDC__
5084 # include <limits.h>
5085 #else
5086 # include <assert.h>
5087 #endif
5088                      Syntax error
5089 _ACEOF
5090 if ac_fn_c_try_cpp "$LINENO"; then :
5091
5092 else
5093   # Broken: fails on valid input.
5094 continue
5095 fi
5096 rm -f conftest.err conftest.i conftest.$ac_ext
5097
5098   # OK, works on sane cases.  Now check whether nonexistent headers
5099   # can be detected and how.
5100   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5101 /* end confdefs.h.  */
5102 #include <ac_nonexistent.h>
5103 _ACEOF
5104 if ac_fn_c_try_cpp "$LINENO"; then :
5105   # Broken: success on invalid input.
5106 continue
5107 else
5108   # Passes both tests.
5109 ac_preproc_ok=:
5110 break
5111 fi
5112 rm -f conftest.err conftest.i conftest.$ac_ext
5113
5114 done
5115 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5116 rm -f conftest.i conftest.err conftest.$ac_ext
5117 if $ac_preproc_ok; then :
5118   break
5119 fi
5120
5121     done
5122     ac_cv_prog_CPP=$CPP
5123
5124 fi
5125   CPP=$ac_cv_prog_CPP
5126 else
5127   ac_cv_prog_CPP=$CPP
5128 fi
5129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5130 $as_echo "$CPP" >&6; }
5131 ac_preproc_ok=false
5132 for ac_c_preproc_warn_flag in '' yes
5133 do
5134   # Use a header file that comes with gcc, so configuring glibc
5135   # with a fresh cross-compiler works.
5136   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5137   # <limits.h> exists even on freestanding compilers.
5138   # On the NeXT, cc -E runs the code through the compiler's parser,
5139   # not just through cpp. "Syntax error" is here to catch this case.
5140   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5141 /* end confdefs.h.  */
5142 #ifdef __STDC__
5143 # include <limits.h>
5144 #else
5145 # include <assert.h>
5146 #endif
5147                      Syntax error
5148 _ACEOF
5149 if ac_fn_c_try_cpp "$LINENO"; then :
5150
5151 else
5152   # Broken: fails on valid input.
5153 continue
5154 fi
5155 rm -f conftest.err conftest.i conftest.$ac_ext
5156
5157   # OK, works on sane cases.  Now check whether nonexistent headers
5158   # can be detected and how.
5159   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5160 /* end confdefs.h.  */
5161 #include <ac_nonexistent.h>
5162 _ACEOF
5163 if ac_fn_c_try_cpp "$LINENO"; then :
5164   # Broken: success on invalid input.
5165 continue
5166 else
5167   # Passes both tests.
5168 ac_preproc_ok=:
5169 break
5170 fi
5171 rm -f conftest.err conftest.i conftest.$ac_ext
5172
5173 done
5174 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5175 rm -f conftest.i conftest.err conftest.$ac_ext
5176 if $ac_preproc_ok; then :
5177
5178 else
5179   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5180 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5181 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
5182 See \`config.log' for more details" "$LINENO" 5; }
5183 fi
5184
5185 ac_ext=c
5186 ac_cpp='$CPP $CPPFLAGS'
5187 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5188 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5189 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5190
5191
5192
5193
5194 #
5195 # Set up TAS assembly code if needed; the template file has now had its
5196 # chance to request this.
5197 #
5198 ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
5199
5200
5201 if test "$need_tas" = yes ; then
5202   TAS=tas.o
5203 else
5204   TAS=""
5205 fi
5206
5207
5208
5209 #
5210 # Automatic dependency tracking
5211 #
5212
5213
5214 # Check whether --enable-depend was given.
5215 if test "${enable_depend+set}" = set; then :
5216   enableval=$enable_depend;
5217   case $enableval in
5218     yes)
5219       autodepend=yes
5220       ;;
5221     no)
5222       :
5223       ;;
5224     *)
5225       as_fn_error $? "no argument expected for --enable-depend option" "$LINENO" 5
5226       ;;
5227   esac
5228
5229 else
5230   enable_depend=no
5231
5232 fi
5233
5234
5235
5236
5237
5238 #
5239 # Enable assert checks
5240 #
5241
5242
5243 # Check whether --enable-cassert was given.
5244 if test "${enable_cassert+set}" = set; then :
5245   enableval=$enable_cassert;
5246   case $enableval in
5247     yes)
5248
5249 $as_echo "#define USE_ASSERT_CHECKING 1" >>confdefs.h
5250
5251       ;;
5252     no)
5253       :
5254       ;;
5255     *)
5256       as_fn_error $? "no argument expected for --enable-cassert option" "$LINENO" 5
5257       ;;
5258   esac
5259
5260 else
5261   enable_cassert=no
5262
5263 fi
5264
5265
5266
5267
5268 #
5269 # Include directories
5270 #
5271 ac_save_IFS=$IFS
5272 IFS="${IFS}${PATH_SEPARATOR}"
5273 # SRCH_INC comes from the template file
5274 for dir in $with_includes $SRCH_INC; do
5275   if test -d "$dir"; then
5276     INCLUDES="$INCLUDES -I$dir"
5277   else
5278     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Include directory $dir does not exist." >&5
5279 $as_echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
5280   fi
5281 done
5282 IFS=$ac_save_IFS
5283
5284
5285
5286 #
5287 # Library directories
5288 #
5289 ac_save_IFS=$IFS
5290 IFS="${IFS}${PATH_SEPARATOR}"
5291 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
5292 for dir in $LIBRARY_DIRS $SRCH_LIB; do
5293   if test -d "$dir"; then
5294     LIBDIRS="$LIBDIRS -L$dir"
5295   else
5296     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Library directory $dir does not exist." >&5
5297 $as_echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
5298   fi
5299 done
5300 IFS=$ac_save_IFS
5301
5302 #
5303 # Enable thread-safe client libraries
5304 #
5305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking allow thread-safe client libraries" >&5
5306 $as_echo_n "checking allow thread-safe client libraries... " >&6; }
5307
5308
5309 # Check whether --enable-thread-safety was given.
5310 if test "${enable_thread_safety+set}" = set; then :
5311   enableval=$enable_thread_safety;
5312   case $enableval in
5313     yes)
5314       :
5315       ;;
5316     no)
5317       :
5318       ;;
5319     *)
5320       as_fn_error $? "no argument expected for --enable-thread-safety option" "$LINENO" 5
5321       ;;
5322   esac
5323
5324 else
5325   enable_thread_safety=yes
5326
5327 fi
5328
5329
5330 if test "$enable_thread_safety" = yes; then
5331
5332 $as_echo "#define ENABLE_THREAD_SAFETY 1" >>confdefs.h
5333
5334 fi
5335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_thread_safety" >&5
5336 $as_echo "$enable_thread_safety" >&6; }
5337
5338
5339 #
5340 # Optionally build Tcl modules (PL/Tcl)
5341 #
5342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Tcl" >&5
5343 $as_echo_n "checking whether to build with Tcl... " >&6; }
5344
5345
5346
5347 # Check whether --with-tcl was given.
5348 if test "${with_tcl+set}" = set; then :
5349   withval=$with_tcl;
5350   case $withval in
5351     yes)
5352       :
5353       ;;
5354     no)
5355       :
5356       ;;
5357     *)
5358       as_fn_error $? "no argument expected for --with-tcl option" "$LINENO" 5
5359       ;;
5360   esac
5361
5362 else
5363   with_tcl=no
5364
5365 fi
5366
5367
5368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcl" >&5
5369 $as_echo "$with_tcl" >&6; }
5370
5371
5372 # We see if the path to the Tcl/Tk configuration scripts is specified.
5373 # This will override the use of tclsh to find the paths to search.
5374
5375
5376
5377
5378 # Check whether --with-tclconfig was given.
5379 if test "${with_tclconfig+set}" = set; then :
5380   withval=$with_tclconfig;
5381   case $withval in
5382     yes)
5383       as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
5384       ;;
5385     no)
5386       as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
5387       ;;
5388     *)
5389
5390       ;;
5391   esac
5392
5393 fi
5394
5395
5396
5397 #
5398 # Optionally build Perl modules (PL/Perl)
5399 #
5400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Perl modules" >&5
5401 $as_echo_n "checking whether to build Perl modules... " >&6; }
5402
5403
5404
5405 # Check whether --with-perl was given.
5406 if test "${with_perl+set}" = set; then :
5407   withval=$with_perl;
5408   case $withval in
5409     yes)
5410       :
5411       ;;
5412     no)
5413       :
5414       ;;
5415     *)
5416       as_fn_error $? "no argument expected for --with-perl option" "$LINENO" 5
5417       ;;
5418   esac
5419
5420 else
5421   with_perl=no
5422
5423 fi
5424
5425
5426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_perl" >&5
5427 $as_echo "$with_perl" >&6; }
5428
5429
5430 #
5431 # Optionally build Python modules (PL/Python)
5432 #
5433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Python modules" >&5
5434 $as_echo_n "checking whether to build Python modules... " >&6; }
5435
5436
5437
5438 # Check whether --with-python was given.
5439 if test "${with_python+set}" = set; then :
5440   withval=$with_python;
5441   case $withval in
5442     yes)
5443       :
5444       ;;
5445     no)
5446       :
5447       ;;
5448     *)
5449       as_fn_error $? "no argument expected for --with-python option" "$LINENO" 5
5450       ;;
5451   esac
5452
5453 else
5454   with_python=no
5455
5456 fi
5457
5458
5459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
5460 $as_echo "$with_python" >&6; }
5461
5462
5463 #
5464 # GSSAPI
5465 #
5466 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with GSSAPI support" >&5
5467 $as_echo_n "checking whether to build with GSSAPI support... " >&6; }
5468
5469
5470
5471 # Check whether --with-gssapi was given.
5472 if test "${with_gssapi+set}" = set; then :
5473   withval=$with_gssapi;
5474   case $withval in
5475     yes)
5476
5477
5478 $as_echo "#define ENABLE_GSS 1" >>confdefs.h
5479
5480   krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
5481
5482       ;;
5483     no)
5484       :
5485       ;;
5486     *)
5487       as_fn_error $? "no argument expected for --with-gssapi option" "$LINENO" 5
5488       ;;
5489   esac
5490
5491 else
5492   with_gssapi=no
5493
5494 fi
5495
5496
5497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_gssapi" >&5
5498 $as_echo "$with_gssapi" >&6; }
5499
5500
5501
5502
5503
5504 #
5505 # Kerberos configuration parameters
5506 #
5507
5508
5509
5510 # Check whether --with-krb-srvnam was given.
5511 if test "${with_krb_srvnam+set}" = set; then :
5512   withval=$with_krb_srvnam;
5513   case $withval in
5514     yes)
5515       as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
5516       ;;
5517     no)
5518       as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
5519       ;;
5520     *)
5521
5522       ;;
5523   esac
5524
5525 else
5526   with_krb_srvnam="postgres"
5527 fi
5528
5529
5530
5531 cat >>confdefs.h <<_ACEOF
5532 #define PG_KRB_SRVNAM "$with_krb_srvnam"
5533 _ACEOF
5534
5535
5536
5537 #
5538 # PAM
5539 #
5540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with PAM support" >&5
5541 $as_echo_n "checking whether to build with PAM support... " >&6; }
5542
5543
5544
5545 # Check whether --with-pam was given.
5546 if test "${with_pam+set}" = set; then :
5547   withval=$with_pam;
5548   case $withval in
5549     yes)
5550
5551 $as_echo "#define USE_PAM 1" >>confdefs.h
5552
5553       ;;
5554     no)
5555       :
5556       ;;
5557     *)
5558       as_fn_error $? "no argument expected for --with-pam option" "$LINENO" 5
5559       ;;
5560   esac
5561
5562 else
5563   with_pam=no
5564
5565 fi
5566
5567
5568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pam" >&5
5569 $as_echo "$with_pam" >&6; }
5570
5571
5572 #
5573 # BSD AUTH
5574 #
5575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with BSD Authentication support" >&5
5576 $as_echo_n "checking whether to build with BSD Authentication support... " >&6; }
5577
5578
5579
5580 # Check whether --with-bsd-auth was given.
5581 if test "${with_bsd_auth+set}" = set; then :
5582   withval=$with_bsd_auth;
5583   case $withval in
5584     yes)
5585
5586 $as_echo "#define USE_BSD_AUTH 1" >>confdefs.h
5587
5588       ;;
5589     no)
5590       :
5591       ;;
5592     *)
5593       as_fn_error $? "no argument expected for --with-bsd-auth option" "$LINENO" 5
5594       ;;
5595   esac
5596
5597 else
5598   with_bsd_auth=no
5599
5600 fi
5601
5602
5603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bsd_auth" >&5
5604 $as_echo "$with_bsd_auth" >&6; }
5605
5606
5607 #
5608 # LDAP
5609 #
5610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LDAP support" >&5
5611 $as_echo_n "checking whether to build with LDAP support... " >&6; }
5612
5613
5614
5615 # Check whether --with-ldap was given.
5616 if test "${with_ldap+set}" = set; then :
5617   withval=$with_ldap;
5618   case $withval in
5619     yes)
5620
5621 $as_echo "#define USE_LDAP 1" >>confdefs.h
5622
5623       ;;
5624     no)
5625       :
5626       ;;
5627     *)
5628       as_fn_error $? "no argument expected for --with-ldap option" "$LINENO" 5
5629       ;;
5630   esac
5631
5632 else
5633   with_ldap=no
5634
5635 fi
5636
5637
5638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_ldap" >&5
5639 $as_echo "$with_ldap" >&6; }
5640
5641
5642 #
5643 # Bonjour
5644 #
5645 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Bonjour support" >&5
5646 $as_echo_n "checking whether to build with Bonjour support... " >&6; }
5647
5648
5649
5650 # Check whether --with-bonjour was given.
5651 if test "${with_bonjour+set}" = set; then :
5652   withval=$with_bonjour;
5653   case $withval in
5654     yes)
5655
5656 $as_echo "#define USE_BONJOUR 1" >>confdefs.h
5657
5658       ;;
5659     no)
5660       :
5661       ;;
5662     *)
5663       as_fn_error $? "no argument expected for --with-bonjour option" "$LINENO" 5
5664       ;;
5665   esac
5666
5667 else
5668   with_bonjour=no
5669
5670 fi
5671
5672
5673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bonjour" >&5
5674 $as_echo "$with_bonjour" >&6; }
5675
5676
5677 #
5678 # OpenSSL
5679 #
5680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with OpenSSL support" >&5
5681 $as_echo_n "checking whether to build with OpenSSL support... " >&6; }
5682
5683
5684
5685 # Check whether --with-openssl was given.
5686 if test "${with_openssl+set}" = set; then :
5687   withval=$with_openssl;
5688   case $withval in
5689     yes)
5690
5691 $as_echo "#define USE_OPENSSL 1" >>confdefs.h
5692
5693       ;;
5694     no)
5695       :
5696       ;;
5697     *)
5698       as_fn_error $? "no argument expected for --with-openssl option" "$LINENO" 5
5699       ;;
5700   esac
5701
5702 else
5703   with_openssl=no
5704
5705 fi
5706
5707
5708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_openssl" >&5
5709 $as_echo "$with_openssl" >&6; }
5710
5711
5712 #
5713 # SELinux
5714 #
5715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with SELinux support" >&5
5716 $as_echo_n "checking whether to build with SELinux support... " >&6; }
5717
5718
5719
5720 # Check whether --with-selinux was given.
5721 if test "${with_selinux+set}" = set; then :
5722   withval=$with_selinux;
5723   case $withval in
5724     yes)
5725       :
5726       ;;
5727     no)
5728       :
5729       ;;
5730     *)
5731       as_fn_error $? "no argument expected for --with-selinux option" "$LINENO" 5
5732       ;;
5733   esac
5734
5735 else
5736   with_selinux=no
5737
5738 fi
5739
5740
5741
5742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_selinux" >&5
5743 $as_echo "$with_selinux" >&6; }
5744
5745 #
5746 # Systemd
5747 #
5748 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with systemd support" >&5
5749 $as_echo_n "checking whether to build with systemd support... " >&6; }
5750
5751
5752
5753 # Check whether --with-systemd was given.
5754 if test "${with_systemd+set}" = set; then :
5755   withval=$with_systemd;
5756   case $withval in
5757     yes)
5758
5759 $as_echo "#define USE_SYSTEMD 1" >>confdefs.h
5760
5761       ;;
5762     no)
5763       :
5764       ;;
5765     *)
5766       as_fn_error $? "no argument expected for --with-systemd option" "$LINENO" 5
5767       ;;
5768   esac
5769
5770 else
5771   with_systemd=no
5772
5773 fi
5774
5775
5776
5777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_systemd" >&5
5778 $as_echo "$with_systemd" >&6; }
5779
5780 #
5781 # Readline
5782 #
5783
5784
5785
5786 # Check whether --with-readline was given.
5787 if test "${with_readline+set}" = set; then :
5788   withval=$with_readline;
5789   case $withval in
5790     yes)
5791       :
5792       ;;
5793     no)
5794       :
5795       ;;
5796     *)
5797       as_fn_error $? "no argument expected for --with-readline option" "$LINENO" 5
5798       ;;
5799   esac
5800
5801 else
5802   with_readline=yes
5803
5804 fi
5805
5806
5807 # readline on MinGW has problems with backslashes in psql and other bugs.
5808 # This is particularly a problem with non-US code pages.
5809 # Therefore disable its use until we understand the cause. 2004-07-20
5810 if test "$PORTNAME" = "win32"; then
5811   if test "$with_readline" = yes; then
5812     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Readline does not work on MinGW --- disabling" >&5
5813 $as_echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
5814     with_readline=no
5815   fi
5816 fi
5817
5818
5819 #
5820 # Prefer libedit
5821 #
5822
5823
5824
5825 # Check whether --with-libedit-preferred was given.
5826 if test "${with_libedit_preferred+set}" = set; then :
5827   withval=$with_libedit_preferred;
5828   case $withval in
5829     yes)
5830       :
5831       ;;
5832     no)
5833       :
5834       ;;
5835     *)
5836       as_fn_error $? "no argument expected for --with-libedit-preferred option" "$LINENO" 5
5837       ;;
5838   esac
5839
5840 else
5841   with_libedit_preferred=no
5842
5843 fi
5844
5845
5846
5847
5848 #
5849 # UUID library
5850 #
5851 # There are at least three UUID libraries in common use: the FreeBSD/NetBSD
5852 # library, the e2fsprogs libuuid (now part of util-linux-ng), and the OSSP
5853 # UUID library.  More than one of these might be present on a given platform,
5854 # so we make the user say which one she wants.
5855 #
5856
5857
5858
5859 # Check whether --with-uuid was given.
5860 if test "${with_uuid+set}" = set; then :
5861   withval=$with_uuid;
5862   case $withval in
5863     yes)
5864       as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
5865       ;;
5866     no)
5867       as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
5868       ;;
5869     *)
5870
5871       ;;
5872   esac
5873
5874 fi
5875
5876
5877 if test x"$with_uuid" = x"" ; then
5878   with_uuid=no
5879 fi
5880
5881
5882
5883 # Check whether --with-ossp-uuid was given.
5884 if test "${with_ossp_uuid+set}" = set; then :
5885   withval=$with_ossp_uuid;
5886   case $withval in
5887     yes)
5888       :
5889       ;;
5890     no)
5891       :
5892       ;;
5893     *)
5894       as_fn_error $? "no argument expected for --with-ossp-uuid option" "$LINENO" 5
5895       ;;
5896   esac
5897
5898 else
5899   with_ossp_uuid=no
5900
5901 fi
5902
5903
5904 if test "$with_ossp_uuid" = yes ; then
5905   with_uuid=ossp
5906 fi
5907
5908 if test "$with_uuid" = bsd ; then
5909
5910 $as_echo "#define HAVE_UUID_BSD 1" >>confdefs.h
5911
5912   UUID_EXTRA_OBJS="md5.o sha1.o"
5913 elif test "$with_uuid" = e2fs ; then
5914
5915 $as_echo "#define HAVE_UUID_E2FS 1" >>confdefs.h
5916
5917   UUID_EXTRA_OBJS="md5.o sha1.o"
5918 elif test "$with_uuid" = ossp ; then
5919
5920 $as_echo "#define HAVE_UUID_OSSP 1" >>confdefs.h
5921
5922   UUID_EXTRA_OBJS=""
5923 elif test "$with_uuid" = no ; then
5924   UUID_EXTRA_OBJS=""
5925 else
5926   as_fn_error $? "--with-uuid must specify one of bsd, e2fs, or ossp" "$LINENO" 5
5927 fi
5928
5929
5930
5931
5932 #
5933 # XML
5934 #
5935
5936
5937
5938 # Check whether --with-libxml was given.
5939 if test "${with_libxml+set}" = set; then :
5940   withval=$with_libxml;
5941   case $withval in
5942     yes)
5943
5944 $as_echo "#define USE_LIBXML 1" >>confdefs.h
5945
5946       ;;
5947     no)
5948       :
5949       ;;
5950     *)
5951       as_fn_error $? "no argument expected for --with-libxml option" "$LINENO" 5
5952       ;;
5953   esac
5954
5955 else
5956   with_libxml=no
5957
5958 fi
5959
5960
5961
5962 if test "$with_libxml" = yes ; then
5963   for ac_prog in xml2-config
5964 do
5965   # Extract the first word of "$ac_prog", so it can be a program name with args.
5966 set dummy $ac_prog; ac_word=$2
5967 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5968 $as_echo_n "checking for $ac_word... " >&6; }
5969 if ${ac_cv_prog_XML2_CONFIG+:} false; then :
5970   $as_echo_n "(cached) " >&6
5971 else
5972   if test -n "$XML2_CONFIG"; then
5973   ac_cv_prog_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test.
5974 else
5975 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5976 for as_dir in $PATH
5977 do
5978   IFS=$as_save_IFS
5979   test -z "$as_dir" && as_dir=.
5980     for ac_exec_ext in '' $ac_executable_extensions; do
5981   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5982     ac_cv_prog_XML2_CONFIG="$ac_prog"
5983     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5984     break 2
5985   fi
5986 done
5987   done
5988 IFS=$as_save_IFS
5989
5990 fi
5991 fi
5992 XML2_CONFIG=$ac_cv_prog_XML2_CONFIG
5993 if test -n "$XML2_CONFIG"; then
5994   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
5995 $as_echo "$XML2_CONFIG" >&6; }
5996 else
5997   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5998 $as_echo "no" >&6; }
5999 fi
6000
6001
6002   test -n "$XML2_CONFIG" && break
6003 done
6004
6005   if test -n "$XML2_CONFIG"; then
6006     for pgac_option in `$XML2_CONFIG --cflags`; do
6007       case $pgac_option in
6008         -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
6009       esac
6010     done
6011     for pgac_option in `$XML2_CONFIG --libs`; do
6012       case $pgac_option in
6013         -L*) LDFLAGS="$LDFLAGS $pgac_option";;
6014       esac
6015     done
6016   fi
6017 fi
6018
6019
6020
6021 #
6022 # XSLT
6023 #
6024
6025
6026
6027 # Check whether --with-libxslt was given.
6028 if test "${with_libxslt+set}" = set; then :
6029   withval=$with_libxslt;
6030   case $withval in
6031     yes)
6032
6033 $as_echo "#define USE_LIBXSLT 1" >>confdefs.h
6034
6035       ;;
6036     no)
6037       :
6038       ;;
6039     *)
6040       as_fn_error $? "no argument expected for --with-libxslt option" "$LINENO" 5
6041       ;;
6042   esac
6043
6044 else
6045   with_libxslt=no
6046
6047 fi
6048
6049
6050
6051
6052
6053
6054 #
6055 # tzdata
6056 #
6057
6058
6059
6060 # Check whether --with-system-tzdata was given.
6061 if test "${with_system_tzdata+set}" = set; then :
6062   withval=$with_system_tzdata;
6063   case $withval in
6064     yes)
6065       as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
6066       ;;
6067     no)
6068       as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
6069       ;;
6070     *)
6071
6072       ;;
6073   esac
6074
6075 fi
6076
6077
6078
6079
6080 #
6081 # Zlib
6082 #
6083
6084
6085
6086 # Check whether --with-zlib was given.
6087 if test "${with_zlib+set}" = set; then :
6088   withval=$with_zlib;
6089   case $withval in
6090     yes)
6091       :
6092       ;;
6093     no)
6094       :
6095       ;;
6096     *)
6097       as_fn_error $? "no argument expected for --with-zlib option" "$LINENO" 5
6098       ;;
6099   esac
6100
6101 else
6102   with_zlib=yes
6103
6104 fi
6105
6106
6107
6108
6109 #
6110 # Elf
6111 #
6112
6113 # Assume system is ELF if it predefines __ELF__ as 1,
6114 # otherwise believe host_os based default.
6115 case $host_os in
6116     freebsd1*|freebsd2*) elf=no;;
6117     freebsd3*|freebsd4*) elf=yes;;
6118 esac
6119
6120
6121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6122 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6123 if ${ac_cv_path_GREP+:} false; then :
6124   $as_echo_n "(cached) " >&6
6125 else
6126   if test -z "$GREP"; then
6127   ac_path_GREP_found=false
6128   # Loop through the user's path and test for each of PROGNAME-LIST
6129   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6130 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6131 do
6132   IFS=$as_save_IFS
6133   test -z "$as_dir" && as_dir=.
6134     for ac_prog in grep ggrep; do
6135     for ac_exec_ext in '' $ac_executable_extensions; do
6136       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6137       as_fn_executable_p "$ac_path_GREP" || continue
6138 # Check for GNU ac_path_GREP and select it if it is found.
6139   # Check for GNU $ac_path_GREP
6140 case `"$ac_path_GREP" --version 2>&1` in
6141 *GNU*)
6142   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6143 *)
6144   ac_count=0
6145   $as_echo_n 0123456789 >"conftest.in"
6146   while :
6147   do
6148     cat "conftest.in" "conftest.in" >"conftest.tmp"
6149     mv "conftest.tmp" "conftest.in"
6150     cp "conftest.in" "conftest.nl"
6151     $as_echo 'GREP' >> "conftest.nl"
6152     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6153     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6154     as_fn_arith $ac_count + 1 && ac_count=$as_val
6155     if test $ac_count -gt ${ac_path_GREP_max-0}; then
6156       # Best one so far, save it but keep looking for a better one
6157       ac_cv_path_GREP="$ac_path_GREP"
6158       ac_path_GREP_max=$ac_count
6159     fi
6160     # 10*(2^10) chars as input seems more than enough
6161     test $ac_count -gt 10 && break
6162   done
6163   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6164 esac
6165
6166       $ac_path_GREP_found && break 3
6167     done
6168   done
6169   done
6170 IFS=$as_save_IFS
6171   if test -z "$ac_cv_path_GREP"; then
6172     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6173   fi
6174 else
6175   ac_cv_path_GREP=$GREP
6176 fi
6177
6178 fi
6179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6180 $as_echo "$ac_cv_path_GREP" >&6; }
6181  GREP="$ac_cv_path_GREP"
6182
6183
6184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6185 $as_echo_n "checking for egrep... " >&6; }
6186 if ${ac_cv_path_EGREP+:} false; then :
6187   $as_echo_n "(cached) " >&6
6188 else
6189   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6190    then ac_cv_path_EGREP="$GREP -E"
6191    else
6192      if test -z "$EGREP"; then
6193   ac_path_EGREP_found=false
6194   # Loop through the user's path and test for each of PROGNAME-LIST
6195   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6196 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6197 do
6198   IFS=$as_save_IFS
6199   test -z "$as_dir" && as_dir=.
6200     for ac_prog in egrep; do
6201     for ac_exec_ext in '' $ac_executable_extensions; do
6202       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6203       as_fn_executable_p "$ac_path_EGREP" || continue
6204 # Check for GNU ac_path_EGREP and select it if it is found.
6205   # Check for GNU $ac_path_EGREP
6206 case `"$ac_path_EGREP" --version 2>&1` in
6207 *GNU*)
6208   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6209 *)
6210   ac_count=0
6211   $as_echo_n 0123456789 >"conftest.in"
6212   while :
6213   do
6214     cat "conftest.in" "conftest.in" >"conftest.tmp"
6215     mv "conftest.tmp" "conftest.in"
6216     cp "conftest.in" "conftest.nl"
6217     $as_echo 'EGREP' >> "conftest.nl"
6218     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6219     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6220     as_fn_arith $ac_count + 1 && ac_count=$as_val
6221     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6222       # Best one so far, save it but keep looking for a better one
6223       ac_cv_path_EGREP="$ac_path_EGREP"
6224       ac_path_EGREP_max=$ac_count
6225     fi
6226     # 10*(2^10) chars as input seems more than enough
6227     test $ac_count -gt 10 && break
6228   done
6229   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6230 esac
6231
6232       $ac_path_EGREP_found && break 3
6233     done
6234   done
6235   done
6236 IFS=$as_save_IFS
6237   if test -z "$ac_cv_path_EGREP"; then
6238     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6239   fi
6240 else
6241   ac_cv_path_EGREP=$EGREP
6242 fi
6243
6244    fi
6245 fi
6246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6247 $as_echo "$ac_cv_path_EGREP" >&6; }
6248  EGREP="$ac_cv_path_EGREP"
6249
6250
6251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6252 /* end confdefs.h.  */
6253 #if __ELF__
6254   yes
6255 #endif
6256
6257 _ACEOF
6258 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6259   $EGREP "yes" >/dev/null 2>&1; then :
6260   ELF_SYS=true
6261 else
6262   if test "X$elf" = "Xyes" ; then
6263   ELF_SYS=true
6264 else
6265   ELF_SYS=
6266 fi
6267 fi
6268 rm -f conftest*
6269
6270
6271
6272 #
6273 # Assignments
6274 #
6275
6276 CPPFLAGS="$CPPFLAGS $INCLUDES"
6277 LDFLAGS="$LDFLAGS $LIBDIRS"
6278
6279
6280
6281
6282
6283 # Check whether --with-gnu-ld was given.
6284 if test "${with_gnu_ld+set}" = set; then :
6285   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
6286 else
6287   with_gnu_ld=no
6288 fi
6289
6290 ac_prog=ld
6291 if test "$GCC" = yes; then
6292   # Check if gcc -print-prog-name=ld gives a path.
6293   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
6294 $as_echo_n "checking for ld used by GCC... " >&6; }
6295   case $host in
6296   *-*-mingw*)
6297     # gcc leaves a trailing carriage return which upsets mingw
6298     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
6299   *)
6300     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
6301   esac
6302   case "$ac_prog" in
6303     # Accept absolute paths.
6304     [\\/]* | [A-Za-z]:[\\/]*)
6305       re_direlt='/[^/][^/]*/\.\./'
6306       # Canonicalize the path of ld
6307       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
6308       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
6309         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
6310       done
6311       test -z "$LD" && LD="$ac_prog"
6312       ;;
6313   "")
6314     # If it fails, then pretend we aren't using GCC.
6315     ac_prog=ld
6316     ;;
6317   *)
6318     # If it is relative, then search for the first ld in PATH.
6319     with_gnu_ld=unknown
6320     ;;
6321   esac
6322 elif test "$with_gnu_ld" = yes; then
6323   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
6324 $as_echo_n "checking for GNU ld... " >&6; }
6325 else
6326   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
6327 $as_echo_n "checking for non-GNU ld... " >&6; }
6328 fi
6329 if ${ac_cv_path_LD+:} false; then :
6330   $as_echo_n "(cached) " >&6
6331 else
6332   if test -z "$LD"; then
6333   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
6334   for ac_dir in $PATH; do
6335     test -z "$ac_dir" && ac_dir=.
6336     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
6337       ac_cv_path_LD="$ac_dir/$ac_prog"
6338       # Check to see if the program is GNU ld.  I'd rather use --version,
6339       # but apparently some GNU ld's only accept -v.
6340       # Break only if it was the GNU/non-GNU ld that we prefer.
6341       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
6342         test "$with_gnu_ld" != no && break
6343       else
6344         test "$with_gnu_ld" != yes && break
6345       fi
6346     fi
6347   done
6348   IFS="$ac_save_ifs"
6349 else
6350   ac_cv_path_LD="$LD" # Let the user override the test with a path.
6351 fi
6352 fi
6353
6354 LD="$ac_cv_path_LD"
6355 if test -n "$LD"; then
6356   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
6357 $as_echo "$LD" >&6; }
6358 else
6359   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6360 $as_echo "no" >&6; }
6361 fi
6362 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
6363 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
6364 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
6365 if ${ac_cv_prog_gnu_ld+:} false; then :
6366   $as_echo_n "(cached) " >&6
6367 else
6368   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
6369 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
6370   ac_cv_prog_gnu_ld=yes
6371 else
6372   ac_cv_prog_gnu_ld=no
6373 fi
6374 fi
6375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gnu_ld" >&5
6376 $as_echo "$ac_cv_prog_gnu_ld" >&6; }
6377 with_gnu_ld=$ac_cv_prog_gnu_ld
6378
6379
6380
6381
6382 if test -n "$ac_tool_prefix"; then
6383   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6384 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6386 $as_echo_n "checking for $ac_word... " >&6; }
6387 if ${ac_cv_prog_RANLIB+:} false; then :
6388   $as_echo_n "(cached) " >&6
6389 else
6390   if test -n "$RANLIB"; then
6391   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6392 else
6393 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6394 for as_dir in $PATH
6395 do
6396   IFS=$as_save_IFS
6397   test -z "$as_dir" && as_dir=.
6398     for ac_exec_ext in '' $ac_executable_extensions; do
6399   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6400     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6401     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6402     break 2
6403   fi
6404 done
6405   done
6406 IFS=$as_save_IFS
6407
6408 fi
6409 fi
6410 RANLIB=$ac_cv_prog_RANLIB
6411 if test -n "$RANLIB"; then
6412   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6413 $as_echo "$RANLIB" >&6; }
6414 else
6415   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6416 $as_echo "no" >&6; }
6417 fi
6418
6419
6420 fi
6421 if test -z "$ac_cv_prog_RANLIB"; then
6422   ac_ct_RANLIB=$RANLIB
6423   # Extract the first word of "ranlib", so it can be a program name with args.
6424 set dummy ranlib; ac_word=$2
6425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6426 $as_echo_n "checking for $ac_word... " >&6; }
6427 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
6428   $as_echo_n "(cached) " >&6
6429 else
6430   if test -n "$ac_ct_RANLIB"; then
6431   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6432 else
6433 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6434 for as_dir in $PATH
6435 do
6436   IFS=$as_save_IFS
6437   test -z "$as_dir" && as_dir=.
6438     for ac_exec_ext in '' $ac_executable_extensions; do
6439   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6440     ac_cv_prog_ac_ct_RANLIB="ranlib"
6441     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6442     break 2
6443   fi
6444 done
6445   done
6446 IFS=$as_save_IFS
6447
6448 fi
6449 fi
6450 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6451 if test -n "$ac_ct_RANLIB"; then
6452   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6453 $as_echo "$ac_ct_RANLIB" >&6; }
6454 else
6455   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6456 $as_echo "no" >&6; }
6457 fi
6458
6459   if test "x$ac_ct_RANLIB" = x; then
6460     RANLIB=":"
6461   else
6462     case $cross_compiling:$ac_tool_warned in
6463 yes:)
6464 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6465 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6466 ac_tool_warned=yes ;;
6467 esac
6468     RANLIB=$ac_ct_RANLIB
6469   fi
6470 else
6471   RANLIB="$ac_cv_prog_RANLIB"
6472 fi
6473
6474
6475   if test -n "$ac_tool_prefix"; then
6476   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
6477 set dummy ${ac_tool_prefix}strip; ac_word=$2
6478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6479 $as_echo_n "checking for $ac_word... " >&6; }
6480 if ${ac_cv_prog_STRIP+:} false; then :
6481   $as_echo_n "(cached) " >&6
6482 else
6483   if test -n "$STRIP"; then
6484   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
6485 else
6486 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6487 for as_dir in $PATH
6488 do
6489   IFS=$as_save_IFS
6490   test -z "$as_dir" && as_dir=.
6491     for ac_exec_ext in '' $ac_executable_extensions; do
6492   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6493     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
6494     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6495     break 2
6496   fi
6497 done
6498   done
6499 IFS=$as_save_IFS
6500
6501 fi
6502 fi
6503 STRIP=$ac_cv_prog_STRIP
6504 if test -n "$STRIP"; then
6505   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
6506 $as_echo "$STRIP" >&6; }
6507 else
6508   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6509 $as_echo "no" >&6; }
6510 fi
6511
6512
6513 fi
6514 if test -z "$ac_cv_prog_STRIP"; then
6515   ac_ct_STRIP=$STRIP
6516   # Extract the first word of "strip", so it can be a program name with args.
6517 set dummy strip; ac_word=$2
6518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6519 $as_echo_n "checking for $ac_word... " >&6; }
6520 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
6521   $as_echo_n "(cached) " >&6
6522 else
6523   if test -n "$ac_ct_STRIP"; then
6524   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
6525 else
6526 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6527 for as_dir in $PATH
6528 do
6529   IFS=$as_save_IFS
6530   test -z "$as_dir" && as_dir=.
6531     for ac_exec_ext in '' $ac_executable_extensions; do
6532   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6533     ac_cv_prog_ac_ct_STRIP="strip"
6534     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6535     break 2
6536   fi
6537 done
6538   done
6539 IFS=$as_save_IFS
6540
6541 fi
6542 fi
6543 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
6544 if test -n "$ac_ct_STRIP"; then
6545   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
6546 $as_echo "$ac_ct_STRIP" >&6; }
6547 else
6548   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6549 $as_echo "no" >&6; }
6550 fi
6551
6552   if test "x$ac_ct_STRIP" = x; then
6553     STRIP=":"
6554   else
6555     case $cross_compiling:$ac_tool_warned in
6556 yes:)
6557 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6558 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6559 ac_tool_warned=yes ;;
6560 esac
6561     STRIP=$ac_ct_STRIP
6562   fi
6563 else
6564   STRIP="$ac_cv_prog_STRIP"
6565 fi
6566
6567
6568   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is possible to strip libraries" >&5
6569 $as_echo_n "checking whether it is possible to strip libraries... " >&6; }
6570   if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
6571     STRIP_STATIC_LIB="$STRIP -x"
6572     STRIP_SHARED_LIB="$STRIP --strip-unneeded"
6573     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6574 $as_echo "yes" >&6; }
6575   else
6576     case $host_os in
6577       darwin*)
6578         STRIP="$STRIP -x"
6579         STRIP_STATIC_LIB=$STRIP
6580         STRIP_SHARED_LIB=$STRIP
6581         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6582 $as_echo "yes" >&6; }
6583         ;;
6584       *)
6585         STRIP_STATIC_LIB=:
6586         STRIP_SHARED_LIB=:
6587         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6588 $as_echo "no" >&6; }
6589         ;;
6590     esac
6591   fi
6592
6593
6594
6595 if test -n "$ac_tool_prefix"; then
6596   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6597 set dummy ${ac_tool_prefix}ar; ac_word=$2
6598 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6599 $as_echo_n "checking for $ac_word... " >&6; }
6600 if ${ac_cv_prog_AR+:} false; then :
6601   $as_echo_n "(cached) " >&6
6602 else
6603   if test -n "$AR"; then
6604   ac_cv_prog_AR="$AR" # Let the user override the test.
6605 else
6606 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6607 for as_dir in $PATH
6608 do
6609   IFS=$as_save_IFS
6610   test -z "$as_dir" && as_dir=.
6611     for ac_exec_ext in '' $ac_executable_extensions; do
6612   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6613     ac_cv_prog_AR="${ac_tool_prefix}ar"
6614     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6615     break 2
6616   fi
6617 done
6618   done
6619 IFS=$as_save_IFS
6620
6621 fi
6622 fi
6623 AR=$ac_cv_prog_AR
6624 if test -n "$AR"; then
6625   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6626 $as_echo "$AR" >&6; }
6627 else
6628   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6629 $as_echo "no" >&6; }
6630 fi
6631
6632
6633 fi
6634 if test -z "$ac_cv_prog_AR"; then
6635   ac_ct_AR=$AR
6636   # Extract the first word of "ar", so it can be a program name with args.
6637 set dummy ar; ac_word=$2
6638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6639 $as_echo_n "checking for $ac_word... " >&6; }
6640 if ${ac_cv_prog_ac_ct_AR+:} false; then :
6641   $as_echo_n "(cached) " >&6
6642 else
6643   if test -n "$ac_ct_AR"; then
6644   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6645 else
6646 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6647 for as_dir in $PATH
6648 do
6649   IFS=$as_save_IFS
6650   test -z "$as_dir" && as_dir=.
6651     for ac_exec_ext in '' $ac_executable_extensions; do
6652   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6653     ac_cv_prog_ac_ct_AR="ar"
6654     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6655     break 2
6656   fi
6657 done
6658   done
6659 IFS=$as_save_IFS
6660
6661 fi
6662 fi
6663 ac_ct_AR=$ac_cv_prog_ac_ct_AR
6664 if test -n "$ac_ct_AR"; then
6665   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6666 $as_echo "$ac_ct_AR" >&6; }
6667 else
6668   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6669 $as_echo "no" >&6; }
6670 fi
6671
6672   if test "x$ac_ct_AR" = x; then
6673     AR="ar"
6674   else
6675     case $cross_compiling:$ac_tool_warned in
6676 yes:)
6677 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6678 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6679 ac_tool_warned=yes ;;
6680 esac
6681     AR=$ac_ct_AR
6682   fi
6683 else
6684   AR="$ac_cv_prog_AR"
6685 fi
6686
6687 if test "$PORTNAME" = "win32"; then
6688   if test -n "$ac_tool_prefix"; then
6689   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
6690 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
6691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6692 $as_echo_n "checking for $ac_word... " >&6; }
6693 if ${ac_cv_prog_DLLTOOL+:} false; then :
6694   $as_echo_n "(cached) " >&6
6695 else
6696   if test -n "$DLLTOOL"; then
6697   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
6698 else
6699 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6700 for as_dir in $PATH
6701 do
6702   IFS=$as_save_IFS
6703   test -z "$as_dir" && as_dir=.
6704     for ac_exec_ext in '' $ac_executable_extensions; do
6705   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6706     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
6707     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6708     break 2
6709   fi
6710 done
6711   done
6712 IFS=$as_save_IFS
6713
6714 fi
6715 fi
6716 DLLTOOL=$ac_cv_prog_DLLTOOL
6717 if test -n "$DLLTOOL"; then
6718   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
6719 $as_echo "$DLLTOOL" >&6; }
6720 else
6721   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6722 $as_echo "no" >&6; }
6723 fi
6724
6725
6726 fi
6727 if test -z "$ac_cv_prog_DLLTOOL"; then
6728   ac_ct_DLLTOOL=$DLLTOOL
6729   # Extract the first word of "dlltool", so it can be a program name with args.
6730 set dummy dlltool; ac_word=$2
6731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6732 $as_echo_n "checking for $ac_word... " >&6; }
6733 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
6734   $as_echo_n "(cached) " >&6
6735 else
6736   if test -n "$ac_ct_DLLTOOL"; then
6737   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
6738 else
6739 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6740 for as_dir in $PATH
6741 do
6742   IFS=$as_save_IFS
6743   test -z "$as_dir" && as_dir=.
6744     for ac_exec_ext in '' $ac_executable_extensions; do
6745   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6746     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
6747     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6748     break 2
6749   fi
6750 done
6751   done
6752 IFS=$as_save_IFS
6753
6754 fi
6755 fi
6756 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
6757 if test -n "$ac_ct_DLLTOOL"; then
6758   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
6759 $as_echo "$ac_ct_DLLTOOL" >&6; }
6760 else
6761   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6762 $as_echo "no" >&6; }
6763 fi
6764
6765   if test "x$ac_ct_DLLTOOL" = x; then
6766     DLLTOOL="dlltool"
6767   else
6768     case $cross_compiling:$ac_tool_warned in
6769 yes:)
6770 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6771 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6772 ac_tool_warned=yes ;;
6773 esac
6774     DLLTOOL=$ac_ct_DLLTOOL
6775   fi
6776 else
6777   DLLTOOL="$ac_cv_prog_DLLTOOL"
6778 fi
6779
6780   if test -n "$ac_tool_prefix"; then
6781   # Extract the first word of "${ac_tool_prefix}dllwrap", so it can be a program name with args.
6782 set dummy ${ac_tool_prefix}dllwrap; ac_word=$2
6783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6784 $as_echo_n "checking for $ac_word... " >&6; }
6785 if ${ac_cv_prog_DLLWRAP+:} false; then :
6786   $as_echo_n "(cached) " >&6
6787 else
6788   if test -n "$DLLWRAP"; then
6789   ac_cv_prog_DLLWRAP="$DLLWRAP" # Let the user override the test.
6790 else
6791 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6792 for as_dir in $PATH
6793 do
6794   IFS=$as_save_IFS
6795   test -z "$as_dir" && as_dir=.
6796     for ac_exec_ext in '' $ac_executable_extensions; do
6797   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6798     ac_cv_prog_DLLWRAP="${ac_tool_prefix}dllwrap"
6799     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6800     break 2
6801   fi
6802 done
6803   done
6804 IFS=$as_save_IFS
6805
6806 fi
6807 fi
6808 DLLWRAP=$ac_cv_prog_DLLWRAP
6809 if test -n "$DLLWRAP"; then
6810   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLWRAP" >&5
6811 $as_echo "$DLLWRAP" >&6; }
6812 else
6813   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6814 $as_echo "no" >&6; }
6815 fi
6816
6817
6818 fi
6819 if test -z "$ac_cv_prog_DLLWRAP"; then
6820   ac_ct_DLLWRAP=$DLLWRAP
6821   # Extract the first word of "dllwrap", so it can be a program name with args.
6822 set dummy dllwrap; ac_word=$2
6823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6824 $as_echo_n "checking for $ac_word... " >&6; }
6825 if ${ac_cv_prog_ac_ct_DLLWRAP+:} false; then :
6826   $as_echo_n "(cached) " >&6
6827 else
6828   if test -n "$ac_ct_DLLWRAP"; then
6829   ac_cv_prog_ac_ct_DLLWRAP="$ac_ct_DLLWRAP" # Let the user override the test.
6830 else
6831 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6832 for as_dir in $PATH
6833 do
6834   IFS=$as_save_IFS
6835   test -z "$as_dir" && as_dir=.
6836     for ac_exec_ext in '' $ac_executable_extensions; do
6837   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6838     ac_cv_prog_ac_ct_DLLWRAP="dllwrap"
6839     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6840     break 2
6841   fi
6842 done
6843   done
6844 IFS=$as_save_IFS
6845
6846 fi
6847 fi
6848 ac_ct_DLLWRAP=$ac_cv_prog_ac_ct_DLLWRAP
6849 if test -n "$ac_ct_DLLWRAP"; then
6850   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLWRAP" >&5
6851 $as_echo "$ac_ct_DLLWRAP" >&6; }
6852 else
6853   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6854 $as_echo "no" >&6; }
6855 fi
6856
6857   if test "x$ac_ct_DLLWRAP" = x; then
6858     DLLWRAP="dllwrap"
6859   else
6860     case $cross_compiling:$ac_tool_warned in
6861 yes:)
6862 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6863 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6864 ac_tool_warned=yes ;;
6865 esac
6866     DLLWRAP=$ac_ct_DLLWRAP
6867   fi
6868 else
6869   DLLWRAP="$ac_cv_prog_DLLWRAP"
6870 fi
6871
6872   if test -n "$ac_tool_prefix"; then
6873   # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
6874 set dummy ${ac_tool_prefix}windres; ac_word=$2
6875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6876 $as_echo_n "checking for $ac_word... " >&6; }
6877 if ${ac_cv_prog_WINDRES+:} false; then :
6878   $as_echo_n "(cached) " >&6
6879 else
6880   if test -n "$WINDRES"; then
6881   ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
6882 else
6883 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6884 for as_dir in $PATH
6885 do
6886   IFS=$as_save_IFS
6887   test -z "$as_dir" && as_dir=.
6888     for ac_exec_ext in '' $ac_executable_extensions; do
6889   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6890     ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
6891     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6892     break 2
6893   fi
6894 done
6895   done
6896 IFS=$as_save_IFS
6897
6898 fi
6899 fi
6900 WINDRES=$ac_cv_prog_WINDRES
6901 if test -n "$WINDRES"; then
6902   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
6903 $as_echo "$WINDRES" >&6; }
6904 else
6905   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6906 $as_echo "no" >&6; }
6907 fi
6908
6909
6910 fi
6911 if test -z "$ac_cv_prog_WINDRES"; then
6912   ac_ct_WINDRES=$WINDRES
6913   # Extract the first word of "windres", so it can be a program name with args.
6914 set dummy windres; ac_word=$2
6915 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6916 $as_echo_n "checking for $ac_word... " >&6; }
6917 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
6918   $as_echo_n "(cached) " >&6
6919 else
6920   if test -n "$ac_ct_WINDRES"; then
6921   ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
6922 else
6923 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6924 for as_dir in $PATH
6925 do
6926   IFS=$as_save_IFS
6927   test -z "$as_dir" && as_dir=.
6928     for ac_exec_ext in '' $ac_executable_extensions; do
6929   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6930     ac_cv_prog_ac_ct_WINDRES="windres"
6931     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6932     break 2
6933   fi
6934 done
6935   done
6936 IFS=$as_save_IFS
6937
6938 fi
6939 fi
6940 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
6941 if test -n "$ac_ct_WINDRES"; then
6942   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
6943 $as_echo "$ac_ct_WINDRES" >&6; }
6944 else
6945   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6946 $as_echo "no" >&6; }
6947 fi
6948
6949   if test "x$ac_ct_WINDRES" = x; then
6950     WINDRES="windres"
6951   else
6952     case $cross_compiling:$ac_tool_warned in
6953 yes:)
6954 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6955 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6956 ac_tool_warned=yes ;;
6957 esac
6958     WINDRES=$ac_ct_WINDRES
6959   fi
6960 else
6961   WINDRES="$ac_cv_prog_WINDRES"
6962 fi
6963
6964 fi
6965
6966 # Find a good install program.  We prefer a C program (faster),
6967 # so one script is as good as another.  But avoid the broken or
6968 # incompatible versions:
6969 # SysV /etc/install, /usr/sbin/install
6970 # SunOS /usr/etc/install
6971 # IRIX /sbin/install
6972 # AIX /bin/install
6973 # AmigaOS /C/install, which installs bootblocks on floppy discs
6974 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6975 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
6976 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6977 # OS/2's system install, which has a completely different semantic
6978 # ./install, which can be erroneously created by make from ./install.sh.
6979 # Reject install programs that cannot install multiple files.
6980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6981 $as_echo_n "checking for a BSD-compatible install... " >&6; }
6982 if test -z "$INSTALL"; then
6983 if ${ac_cv_path_install+:} false; then :
6984   $as_echo_n "(cached) " >&6
6985 else
6986   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6987 for as_dir in $PATH
6988 do
6989   IFS=$as_save_IFS
6990   test -z "$as_dir" && as_dir=.
6991     # Account for people who put trailing slashes in PATH elements.
6992 case $as_dir/ in #((
6993   ./ | .// | /[cC]/* | \
6994   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
6995   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
6996   /usr/ucb/* ) ;;
6997   *)
6998     # OSF1 and SCO ODT 3.0 have their own names for install.
6999     # Don't use installbsd from OSF since it installs stuff as root
7000     # by default.
7001     for ac_prog in ginstall scoinst install; do
7002       for ac_exec_ext in '' $ac_executable_extensions; do
7003         if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
7004           if test $ac_prog = install &&
7005             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7006             # AIX install.  It has an incompatible calling convention.
7007             :
7008           elif test $ac_prog = install &&
7009             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7010             # program-specific install script used by HP pwplus--don't use.
7011             :
7012           else
7013             rm -rf conftest.one conftest.two conftest.dir
7014             echo one > conftest.one
7015             echo two > conftest.two
7016             mkdir conftest.dir
7017             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
7018               test -s conftest.one && test -s conftest.two &&
7019               test -s conftest.dir/conftest.one &&
7020               test -s conftest.dir/conftest.two
7021             then
7022               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
7023               break 3
7024             fi
7025           fi
7026         fi
7027       done
7028     done
7029     ;;
7030 esac
7031
7032   done
7033 IFS=$as_save_IFS
7034
7035 rm -rf conftest.one conftest.two conftest.dir
7036
7037 fi
7038   if test "${ac_cv_path_install+set}" = set; then
7039     INSTALL=$ac_cv_path_install
7040   else
7041     # As a last resort, use the slow shell script.  Don't cache a
7042     # value for INSTALL within a source directory, because that will
7043     # break other packages using the cache if that directory is
7044     # removed, or if the value is a relative name.
7045     INSTALL=$ac_install_sh
7046   fi
7047 fi
7048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
7049 $as_echo "$INSTALL" >&6; }
7050
7051 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7052 # It thinks the first close brace ends the variable substitution.
7053 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7054
7055 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
7056
7057 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
7058
7059 # When Autoconf chooses install-sh as install program it tries to generate
7060 # a relative path to it in each makefile where it subsitutes it. This clashes
7061 # with our Makefile.global concept. This workaround helps.
7062 case $INSTALL in
7063   *install-sh*) install_bin='';;
7064   *) install_bin=$INSTALL;;
7065 esac
7066
7067
7068 # Extract the first word of "tar", so it can be a program name with args.
7069 set dummy tar; ac_word=$2
7070 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7071 $as_echo_n "checking for $ac_word... " >&6; }
7072 if ${ac_cv_path_TAR+:} false; then :
7073   $as_echo_n "(cached) " >&6
7074 else
7075   case $TAR in
7076   [\\/]* | ?:[\\/]*)
7077   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
7078   ;;
7079   *)
7080   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7081 for as_dir in $PATH
7082 do
7083   IFS=$as_save_IFS
7084   test -z "$as_dir" && as_dir=.
7085     for ac_exec_ext in '' $ac_executable_extensions; do
7086   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7087     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
7088     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7089     break 2
7090   fi
7091 done
7092   done
7093 IFS=$as_save_IFS
7094
7095   ;;
7096 esac
7097 fi
7098 TAR=$ac_cv_path_TAR
7099 if test -n "$TAR"; then
7100   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
7101 $as_echo "$TAR" >&6; }
7102 else
7103   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7104 $as_echo "no" >&6; }
7105 fi
7106
7107
7108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7109 $as_echo_n "checking whether ln -s works... " >&6; }
7110 LN_S=$as_ln_s
7111 if test "$LN_S" = "ln -s"; then
7112   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7113 $as_echo "yes" >&6; }
7114 else
7115   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7116 $as_echo "no, using $LN_S" >&6; }
7117 fi
7118
7119 for ac_prog in gawk mawk nawk awk
7120 do
7121   # Extract the first word of "$ac_prog", so it can be a program name with args.
7122 set dummy $ac_prog; ac_word=$2
7123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7124 $as_echo_n "checking for $ac_word... " >&6; }
7125 if ${ac_cv_prog_AWK+:} false; then :
7126   $as_echo_n "(cached) " >&6
7127 else
7128   if test -n "$AWK"; then
7129   ac_cv_prog_AWK="$AWK" # Let the user override the test.
7130 else
7131 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7132 for as_dir in $PATH
7133 do
7134   IFS=$as_save_IFS
7135   test -z "$as_dir" && as_dir=.
7136     for ac_exec_ext in '' $ac_executable_extensions; do
7137   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7138     ac_cv_prog_AWK="$ac_prog"
7139     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7140     break 2
7141   fi
7142 done
7143   done
7144 IFS=$as_save_IFS
7145
7146 fi
7147 fi
7148 AWK=$ac_cv_prog_AWK
7149 if test -n "$AWK"; then
7150   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7151 $as_echo "$AWK" >&6; }
7152 else
7153   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7154 $as_echo "no" >&6; }
7155 fi
7156
7157
7158   test -n "$AWK" && break
7159 done
7160
7161 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
7162 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
7163 if test -z "$MKDIR_P"; then
7164   if ${ac_cv_path_mkdir+:} false; then :
7165   $as_echo_n "(cached) " >&6
7166 else
7167   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7168 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
7169 do
7170   IFS=$as_save_IFS
7171   test -z "$as_dir" && as_dir=.
7172     for ac_prog in mkdir gmkdir; do
7173          for ac_exec_ext in '' $ac_executable_extensions; do
7174            as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
7175            case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
7176              'mkdir (GNU coreutils) '* | \
7177              'mkdir (coreutils) '* | \
7178              'mkdir (fileutils) '4.1*)
7179                ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
7180                break 3;;
7181            esac
7182          done
7183        done
7184   done
7185 IFS=$as_save_IFS
7186
7187 fi
7188
7189   test -d ./--version && rmdir ./--version
7190   if test "${ac_cv_path_mkdir+set}" = set; then
7191     MKDIR_P="$ac_cv_path_mkdir -p"
7192   else
7193     # As a last resort, use the slow shell script.  Don't cache a
7194     # value for MKDIR_P within a source directory, because that will
7195     # break other packages using the cache if that directory is
7196     # removed, or if the value is a relative name.
7197     MKDIR_P="$ac_install_sh -d"
7198   fi
7199 fi
7200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
7201 $as_echo "$MKDIR_P" >&6; }
7202
7203 # When Autoconf chooses install-sh as mkdir -p program it tries to generate
7204 # a relative path to it in each makefile where it subsitutes it. This clashes
7205 # with our Makefile.global concept. This workaround helps.
7206 case $MKDIR_P in
7207   *install-sh*) MKDIR_P='\${SHELL} \${top_srcdir}/config/install-sh -c -d';;
7208 esac
7209
7210 # Let the user override the search
7211 if test -z "$BISON"; then
7212   for ac_prog in bison
7213 do
7214   # Extract the first word of "$ac_prog", so it can be a program name with args.
7215 set dummy $ac_prog; ac_word=$2
7216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7217 $as_echo_n "checking for $ac_word... " >&6; }
7218 if ${ac_cv_path_BISON+:} false; then :
7219   $as_echo_n "(cached) " >&6
7220 else
7221   case $BISON in
7222   [\\/]* | ?:[\\/]*)
7223   ac_cv_path_BISON="$BISON" # Let the user override the test with a path.
7224   ;;
7225   *)
7226   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7227 for as_dir in $PATH
7228 do
7229   IFS=$as_save_IFS
7230   test -z "$as_dir" && as_dir=.
7231     for ac_exec_ext in '' $ac_executable_extensions; do
7232   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7233     ac_cv_path_BISON="$as_dir/$ac_word$ac_exec_ext"
7234     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7235     break 2
7236   fi
7237 done
7238   done
7239 IFS=$as_save_IFS
7240
7241   ;;
7242 esac
7243 fi
7244 BISON=$ac_cv_path_BISON
7245 if test -n "$BISON"; then
7246   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
7247 $as_echo "$BISON" >&6; }
7248 else
7249   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7250 $as_echo "no" >&6; }
7251 fi
7252
7253
7254   test -n "$BISON" && break
7255 done
7256
7257 fi
7258
7259 if test "$BISON"; then
7260   pgac_bison_version=`$BISON --version 2>/dev/null | sed q`
7261   { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_bison_version" >&5
7262 $as_echo "$as_me: using $pgac_bison_version" >&6;}
7263   if echo "$pgac_bison_version" | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'
7264   then
7265     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7266 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
7267 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&5
7268 $as_echo "$as_me: WARNING:
7269 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
7270 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&2;}
7271     BISON=""
7272   fi
7273   # Bison >=3.0 issues warnings about %name-prefix="base_yy", instead
7274   # of the now preferred %name-prefix "base_yy", but the latter
7275   # doesn't work with Bison 2.3 or less.  So for now we silence the
7276   # deprecation warnings.
7277   if echo "$pgac_bison_version" | $AWK '{ if ($4 >= 3) exit 0; else exit 1;}'
7278   then
7279     BISONFLAGS="$BISONFLAGS -Wno-deprecated"
7280   fi
7281 fi
7282
7283 if test -z "$BISON"; then
7284   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7285 *** Without Bison you will not be able to build PostgreSQL from Git nor
7286 *** change any of the parser definition files.  You can obtain Bison from
7287 *** a GNU mirror site.  (If you are using the official distribution of
7288 *** PostgreSQL then you do not need to worry about this, because the Bison
7289 *** output is pre-generated.)" >&5
7290 $as_echo "$as_me: WARNING:
7291 *** Without Bison you will not be able to build PostgreSQL from Git nor
7292 *** change any of the parser definition files.  You can obtain Bison from
7293 *** a GNU mirror site.  (If you are using the official distribution of
7294 *** PostgreSQL then you do not need to worry about this, because the Bison
7295 *** output is pre-generated.)" >&2;}
7296 fi
7297 # We don't need AC_SUBST(BISON) because AC_PATH_PROG did it
7298
7299
7300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flex" >&5
7301 $as_echo_n "checking for flex... " >&6; }
7302 if ${pgac_cv_path_flex+:} false; then :
7303   $as_echo_n "(cached) " >&6
7304 else
7305   # Let the user override the test
7306 if test -n "$FLEX"; then
7307   pgac_cv_path_flex=$FLEX
7308 else
7309   pgac_save_IFS=$IFS
7310   IFS=$PATH_SEPARATOR
7311   for pgac_dir in $PATH; do
7312     IFS=$pgac_save_IFS
7313     if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
7314       pgac_dir=`pwd`
7315     fi
7316     for pgac_prog in flex lex; do
7317       pgac_candidate="$pgac_dir/$pgac_prog"
7318       if test -f "$pgac_candidate" \
7319         && $pgac_candidate --version </dev/null >/dev/null 2>&1
7320       then
7321         echo '%%'  > conftest.l
7322         if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
7323           pgac_flex_version=`$pgac_candidate --version 2>/dev/null`
7324           if echo "$pgac_flex_version" | sed 's/[.a-z]/ /g' | $AWK '{ if ($1 == 2 && ($2 > 5 || ($2 == 5 && $3 >= 31))) exit 0; else exit 1;}'
7325           then
7326             pgac_cv_path_flex=$pgac_candidate
7327             break 2
7328           else
7329             { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7330 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
7331 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&5
7332 $as_echo "$as_me: WARNING:
7333 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
7334 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&2;}
7335           fi
7336         fi
7337       fi
7338     done
7339   done
7340   rm -f conftest.l lex.yy.c
7341   : ${pgac_cv_path_flex=no}
7342 fi
7343
7344 fi
7345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_path_flex" >&5
7346 $as_echo "$pgac_cv_path_flex" >&6; }
7347 if test x"$pgac_cv_path_flex" = x"no"; then
7348   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7349 *** Without Flex you will not be able to build PostgreSQL from Git nor
7350 *** change any of the scanner definition files.  You can obtain Flex from
7351 *** a GNU mirror site.  (If you are using the official distribution of
7352 *** PostgreSQL then you do not need to worry about this because the Flex
7353 *** output is pre-generated.)" >&5
7354 $as_echo "$as_me: WARNING:
7355 *** Without Flex you will not be able to build PostgreSQL from Git nor
7356 *** change any of the scanner definition files.  You can obtain Flex from
7357 *** a GNU mirror site.  (If you are using the official distribution of
7358 *** PostgreSQL then you do not need to worry about this because the Flex
7359 *** output is pre-generated.)" >&2;}
7360
7361   FLEX=
7362 else
7363   FLEX=$pgac_cv_path_flex
7364   pgac_flex_version=`$FLEX --version 2>/dev/null`
7365   { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_flex_version" >&5
7366 $as_echo "$as_me: using $pgac_flex_version" >&6;}
7367 fi
7368
7369
7370
7371
7372
7373 # Let the user override the search
7374 if test -z "$PERL"; then
7375   # Extract the first word of "perl", so it can be a program name with args.
7376 set dummy perl; ac_word=$2
7377 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7378 $as_echo_n "checking for $ac_word... " >&6; }
7379 if ${ac_cv_path_PERL+:} false; then :
7380   $as_echo_n "(cached) " >&6
7381 else
7382   case $PERL in
7383   [\\/]* | ?:[\\/]*)
7384   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
7385   ;;
7386   *)
7387   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7388 for as_dir in $PATH
7389 do
7390   IFS=$as_save_IFS
7391   test -z "$as_dir" && as_dir=.
7392     for ac_exec_ext in '' $ac_executable_extensions; do
7393   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7394     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
7395     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7396     break 2
7397   fi
7398 done
7399   done
7400 IFS=$as_save_IFS
7401
7402   ;;
7403 esac
7404 fi
7405 PERL=$ac_cv_path_PERL
7406 if test -n "$PERL"; then
7407   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
7408 $as_echo "$PERL" >&6; }
7409 else
7410   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7411 $as_echo "no" >&6; }
7412 fi
7413
7414
7415 fi
7416
7417 if test "$PERL"; then
7418   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'`
7419   { $as_echo "$as_me:${as_lineno-$LINENO}: using perl $pgac_perl_version" >&5
7420 $as_echo "$as_me: using perl $pgac_perl_version" >&6;}
7421   if echo "$pgac_perl_version" | sed 's/[.a-z_]/ /g' | \
7422     $AWK '{ if ($1 == 5 && $2 >= 8) exit 1; else exit 0;}'
7423   then
7424     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7425 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
7426 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&5
7427 $as_echo "$as_me: WARNING:
7428 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
7429 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&2;}
7430     PERL=""
7431   fi
7432 fi
7433
7434 if test -z "$PERL"; then
7435   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7436 *** Without Perl you will not be able to build PostgreSQL from Git.
7437 *** You can obtain Perl from any CPAN mirror site.
7438 *** (If you are using the official distribution of PostgreSQL then you do not
7439 *** need to worry about this, because the Perl output is pre-generated.)" >&5
7440 $as_echo "$as_me: WARNING:
7441 *** Without Perl you will not be able to build PostgreSQL from Git.
7442 *** You can obtain Perl from any CPAN mirror site.
7443 *** (If you are using the official distribution of PostgreSQL then you do not
7444 *** need to worry about this, because the Perl output is pre-generated.)" >&2;}
7445 fi
7446
7447 if test "$with_perl" = yes; then
7448   if test -z "$PERL"; then
7449     as_fn_error $? "Perl not found" "$LINENO" 5
7450   fi
7451
7452 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl archlibexp" >&5
7453 $as_echo_n "checking for Perl archlibexp... " >&6; }
7454 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
7455 test "$PORTNAME" = "win32" && perl_archlibexp=`echo $perl_archlibexp | sed 's,\\\\,/,g'`
7456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_archlibexp" >&5
7457 $as_echo "$perl_archlibexp" >&6; }
7458 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl privlibexp" >&5
7459 $as_echo_n "checking for Perl privlibexp... " >&6; }
7460 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
7461 test "$PORTNAME" = "win32" && perl_privlibexp=`echo $perl_privlibexp | sed 's,\\\\,/,g'`
7462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_privlibexp" >&5
7463 $as_echo "$perl_privlibexp" >&6; }
7464 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl useshrplib" >&5
7465 $as_echo_n "checking for Perl useshrplib... " >&6; }
7466 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
7467 test "$PORTNAME" = "win32" && perl_useshrplib=`echo $perl_useshrplib | sed 's,\\\\,/,g'`
7468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_useshrplib" >&5
7469 $as_echo "$perl_useshrplib" >&6; }
7470   if test "$perl_useshrplib" != yes && test "$perl_useshrplib" != true; then
7471     as_fn_error $? "cannot build PL/Perl because libperl is not a shared library
7472 You might have to rebuild your Perl installation.  Refer to the
7473 documentation for details.  Use --without-perl to disable building
7474 PL/Perl." "$LINENO" 5
7475   fi
7476
7477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flags to link embedded Perl" >&5
7478 $as_echo_n "checking for flags to link embedded Perl... " >&6; }
7479 if test "$PORTNAME" = "win32" ; then
7480 perl_lib=`basename $perl_archlibexp/CORE/perl[5-9]*.lib .lib`
7481 test -e "$perl_archlibexp/CORE/$perl_lib.lib" && perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
7482 else
7483 pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
7484 pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
7485 perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%" -e "s/ -arch [-a-zA-Z0-9_]*//g"`
7486 fi
7487 if test -z "$perl_embed_ldflags" ; then
7488         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7489 $as_echo "no" >&6; }
7490         as_fn_error $? "could not determine flags for linking embedded Perl.
7491 This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not
7492 installed." "$LINENO" 5
7493 else
7494         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ldflags" >&5
7495 $as_echo "$perl_embed_ldflags" >&6; }
7496 fi
7497
7498 fi
7499
7500 if test "$with_python" = yes; then
7501   # Extract the first word of "python", so it can be a program name with args.
7502 set dummy python; ac_word=$2
7503 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7504 $as_echo_n "checking for $ac_word... " >&6; }
7505 if ${ac_cv_path_PYTHON+:} false; then :
7506   $as_echo_n "(cached) " >&6
7507 else
7508   case $PYTHON in
7509   [\\/]* | ?:[\\/]*)
7510   ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
7511   ;;
7512   *)
7513   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7514 for as_dir in $PATH
7515 do
7516   IFS=$as_save_IFS
7517   test -z "$as_dir" && as_dir=.
7518     for ac_exec_ext in '' $ac_executable_extensions; do
7519   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7520     ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
7521     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7522     break 2
7523   fi
7524 done
7525   done
7526 IFS=$as_save_IFS
7527
7528   ;;
7529 esac
7530 fi
7531 PYTHON=$ac_cv_path_PYTHON
7532 if test -n "$PYTHON"; then
7533   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
7534 $as_echo "$PYTHON" >&6; }
7535 else
7536   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7537 $as_echo "no" >&6; }
7538 fi
7539
7540
7541 if test x"$PYTHON" = x""; then
7542   as_fn_error $? "Python not found" "$LINENO" 5
7543 fi
7544
7545
7546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python distutils module" >&5
7547 $as_echo_n "checking for Python distutils module... " >&6; }
7548 if "${PYTHON}" -c 'import distutils' 2>&5
7549 then
7550     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7551 $as_echo "yes" >&6; }
7552 else
7553     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7554 $as_echo "no" >&6; }
7555     as_fn_error $? "distutils module not found" "$LINENO" 5
7556 fi
7557 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python configuration directory" >&5
7558 $as_echo_n "checking Python configuration directory... " >&6; }
7559 python_majorversion=`${PYTHON} -c "import sys; print(sys.version[0])"`
7560 python_version=`${PYTHON} -c "import sys; print(sys.version[:3])"`
7561 python_configdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBPL'))))"`
7562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_configdir" >&5
7563 $as_echo "$python_configdir" >&6; }
7564
7565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python include directories" >&5
7566 $as_echo_n "checking Python include directories... " >&6; }
7567 python_includespec=`${PYTHON} -c "
7568 import distutils.sysconfig
7569 a = '-I' + distutils.sysconfig.get_python_inc(False)
7570 b = '-I' + distutils.sysconfig.get_python_inc(True)
7571 if a == b:
7572     print(a)
7573 else:
7574     print(a + ' ' + b)"`
7575 if test "$PORTNAME" = win32 ; then
7576     python_includespec=`echo $python_includespec | sed 's,[\],/,g'`
7577 fi
7578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_includespec" >&5
7579 $as_echo "$python_includespec" >&6; }
7580
7581
7582
7583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link an embedded Python application" >&5
7584 $as_echo_n "checking how to link an embedded Python application... " >&6; }
7585
7586 python_libdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBDIR'))))"`
7587 python_ldlibrary=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDLIBRARY'))))"`
7588
7589 # If LDLIBRARY exists and has a shlib extension, use it verbatim.
7590 ldlibrary=`echo "${python_ldlibrary}" | sed -e 's/\.so$//' -e 's/\.dll$//' -e 's/\.dylib$//' -e 's/\.sl$//'`
7591 if test -e "${python_libdir}/${python_ldlibrary}" -a x"${python_ldlibrary}" != x"${ldlibrary}"
7592 then
7593         ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
7594         found_shlib=1
7595 else
7596         # Otherwise, guess the base name of the shlib.
7597         # LDVERSION was added in Python 3.2, before that use VERSION,
7598         # or failing that, $python_version from _PGAC_CHECK_PYTHON_DIRS.
7599         python_ldversion=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDVERSION'))))"`
7600         if test x"${python_ldversion}" != x""; then
7601                 ldlibrary="python${python_ldversion}"
7602         else
7603                 python_version_var=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('VERSION'))))"`
7604                 if test x"${python_version_var}" != x""; then
7605                         ldlibrary="python${python_version_var}"
7606                 else
7607                         ldlibrary="python${python_version}"
7608                 fi
7609         fi
7610         # Search for a likely-looking file.
7611         found_shlib=0
7612         for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
7613         do
7614                 # We don't know the platform DLSUFFIX here, so check 'em all.
7615                 for e in .so .dll .dylib .sl; do
7616                         if test -e "$d/lib${ldlibrary}$e"; then
7617                                 python_libdir="$d"
7618                                 found_shlib=1
7619                                 break 2
7620                         fi
7621                 done
7622         done
7623         # Some platforms (OpenBSD) require us to accept a bare versioned shlib
7624         # (".so.n.n") as well. However, check this only after failing to find
7625         # ".so" anywhere, because yet other platforms (Debian) put the .so
7626         # symlink in a different directory from the underlying versioned shlib.
7627         if test "$found_shlib" != 1; then
7628                 for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
7629                 do
7630                         for f in "$d/lib${ldlibrary}.so."* ; do
7631                                 if test -e "$f"; then
7632                                         python_libdir="$d"
7633                                         found_shlib=1
7634                                         break 2
7635                                 fi
7636                         done
7637                 done
7638         fi
7639         # As usual, Windows has its own ideas.  Possible default library
7640         # locations include c:/Windows/System32 and (for Cygwin) /usr/bin,
7641         # and the "lib" prefix might not be there.
7642         if test "$found_shlib" != 1 -a \( "$PORTNAME" = win32 -o "$PORTNAME" = cygwin \); then
7643                 for d in "${python_libdir}" "${python_configdir}" c:/Windows/System32 /usr/bin
7644                 do
7645                         for f in "$d/lib${ldlibrary}.dll" "$d/${ldlibrary}.dll" ; do
7646                                 if test -e "$f"; then
7647                                         python_libdir="$d"
7648                                         found_shlib=1
7649                                         break 2
7650                                 fi
7651                         done
7652                 done
7653         fi
7654 fi
7655 if test "$found_shlib" != 1; then
7656         as_fn_error $? "could not find shared library for Python
7657 You might have to rebuild your Python installation.  Refer to the
7658 documentation for details.  Use --without-python to disable building
7659 PL/Python." "$LINENO" 5
7660 fi
7661 python_libspec="-L${python_libdir} -l${ldlibrary}"
7662
7663 python_additional_libs=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBS','LIBC','LIBM','BASEMODLIBS'))))"`
7664
7665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_libspec} ${python_additional_libs}" >&5
7666 $as_echo "${python_libspec} ${python_additional_libs}" >&6; }
7667
7668
7669
7670 fi
7671
7672 if test "$cross_compiling" = yes && test -z "$with_system_tzdata"; then
7673   # Extract the first word of "zic", so it can be a program name with args.
7674 set dummy zic; ac_word=$2
7675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7676 $as_echo_n "checking for $ac_word... " >&6; }
7677 if ${ac_cv_path_ZIC+:} false; then :
7678   $as_echo_n "(cached) " >&6
7679 else
7680   case $ZIC in
7681   [\\/]* | ?:[\\/]*)
7682   ac_cv_path_ZIC="$ZIC" # Let the user override the test with a path.
7683   ;;
7684   *)
7685   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7686 for as_dir in $PATH
7687 do
7688   IFS=$as_save_IFS
7689   test -z "$as_dir" && as_dir=.
7690     for ac_exec_ext in '' $ac_executable_extensions; do
7691   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7692     ac_cv_path_ZIC="$as_dir/$ac_word$ac_exec_ext"
7693     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7694     break 2
7695   fi
7696 done
7697   done
7698 IFS=$as_save_IFS
7699
7700   ;;
7701 esac
7702 fi
7703 ZIC=$ac_cv_path_ZIC
7704 if test -n "$ZIC"; then
7705   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
7706 $as_echo "$ZIC" >&6; }
7707 else
7708   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7709 $as_echo "no" >&6; }
7710 fi
7711
7712
7713   if test -z "$ZIC"; then
7714     as_fn_error $? "
7715 When cross-compiling, either use the option --with-system-tzdata to use
7716 existing time-zone data, or set the environment variable ZIC to a zic
7717 program to use during the build." "$LINENO" 5
7718   fi
7719 fi
7720
7721 #
7722 # Pthreads
7723 #
7724 # For each platform, we need to know about any special compile and link
7725 # libraries, and whether the normal C function names are thread-safe.
7726 # See the comment at the top of src/port/thread.c for more information.
7727 # WIN32 doesn't need the pthread tests;  it always uses threads
7728 #
7729 # These tests are run before the library-tests, because linking with the
7730 # other libraries can pull in the pthread functions as a side-effect.  We
7731 # want to use the -pthread or similar flags directly, and not rely on
7732 # the side-effects of linking with some other library.
7733 #
7734 # note: We have to use AS_IF here rather than plain if. The AC_CHECK_HEADER
7735 # invocation below is the first one in the script, and autoconf generates
7736 # additional code for that, which must not be inside the if-block. AS_IF
7737 # knows how to do that.
7738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7739 $as_echo_n "checking for ANSI C header files... " >&6; }
7740 if ${ac_cv_header_stdc+:} false; then :
7741   $as_echo_n "(cached) " >&6
7742 else
7743   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7744 /* end confdefs.h.  */
7745 #include <stdlib.h>
7746 #include <stdarg.h>
7747 #include <string.h>
7748 #include <float.h>
7749
7750 int
7751 main ()
7752 {
7753
7754   ;
7755   return 0;
7756 }
7757 _ACEOF
7758 if ac_fn_c_try_compile "$LINENO"; then :
7759   ac_cv_header_stdc=yes
7760 else
7761   ac_cv_header_stdc=no
7762 fi
7763 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7764
7765 if test $ac_cv_header_stdc = yes; then
7766   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
7767   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7768 /* end confdefs.h.  */
7769 #include <string.h>
7770
7771 _ACEOF
7772 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7773   $EGREP "memchr" >/dev/null 2>&1; then :
7774
7775 else
7776   ac_cv_header_stdc=no
7777 fi
7778 rm -f conftest*
7779
7780 fi
7781
7782 if test $ac_cv_header_stdc = yes; then
7783   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
7784   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7785 /* end confdefs.h.  */
7786 #include <stdlib.h>
7787
7788 _ACEOF
7789 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7790   $EGREP "free" >/dev/null 2>&1; then :
7791
7792 else
7793   ac_cv_header_stdc=no
7794 fi
7795 rm -f conftest*
7796
7797 fi
7798
7799 if test $ac_cv_header_stdc = yes; then
7800   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
7801   if test "$cross_compiling" = yes; then :
7802   :
7803 else
7804   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7805 /* end confdefs.h.  */
7806 #include <ctype.h>
7807 #include <stdlib.h>
7808 #if ((' ' & 0x0FF) == 0x020)
7809 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7810 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7811 #else
7812 # define ISLOWER(c) \
7813                    (('a' <= (c) && (c) <= 'i') \
7814                      || ('j' <= (c) && (c) <= 'r') \
7815                      || ('s' <= (c) && (c) <= 'z'))
7816 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7817 #endif
7818
7819 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7820 int
7821 main ()
7822 {
7823   int i;
7824   for (i = 0; i < 256; i++)
7825     if (XOR (islower (i), ISLOWER (i))
7826         || toupper (i) != TOUPPER (i))
7827       return 2;
7828   return 0;
7829 }
7830 _ACEOF
7831 if ac_fn_c_try_run "$LINENO"; then :
7832
7833 else
7834   ac_cv_header_stdc=no
7835 fi
7836 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7837   conftest.$ac_objext conftest.beam conftest.$ac_ext
7838 fi
7839
7840 fi
7841 fi
7842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7843 $as_echo "$ac_cv_header_stdc" >&6; }
7844 if test $ac_cv_header_stdc = yes; then
7845
7846 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
7847
7848 fi
7849
7850 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
7851 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
7852                   inttypes.h stdint.h unistd.h
7853 do :
7854   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7855 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
7856 "
7857 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7858   cat >>confdefs.h <<_ACEOF
7859 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7860 _ACEOF
7861
7862 fi
7863
7864 done
7865
7866
7867 if test "$enable_thread_safety" = yes -a "$PORTNAME" != "win32"; then :
7868    # then
7869
7870
7871
7872 ac_ext=c
7873 ac_cpp='$CPP $CPPFLAGS'
7874 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7875 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7876 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7877
7878 ax_pthread_ok=no
7879
7880 # We used to check for pthread.h first, but this fails if pthread.h
7881 # requires special compiler flags (e.g. on Tru64 or Sequent).
7882 # It gets checked for in the link test anyway.
7883
7884 # First of all, check if the user has set any of the PTHREAD_LIBS,
7885 # etcetera environment variables, and if threads linking works using
7886 # them:
7887 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
7888         save_CFLAGS="$CFLAGS"
7889         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
7890         save_LIBS="$LIBS"
7891         LIBS="$PTHREAD_LIBS $LIBS"
7892         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
7893 $as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
7894         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7895 /* end confdefs.h.  */
7896
7897 /* Override any GCC internal prototype to avoid an error.
7898    Use char because int might match the return type of a GCC
7899    builtin and then its argument prototype would still apply.  */
7900 #ifdef __cplusplus
7901 extern "C"
7902 #endif
7903 char pthread_join ();
7904 int
7905 main ()
7906 {
7907 return pthread_join ();
7908   ;
7909   return 0;
7910 }
7911 _ACEOF
7912 if ac_fn_c_try_link "$LINENO"; then :
7913   ax_pthread_ok=yes
7914 fi
7915 rm -f core conftest.err conftest.$ac_objext \
7916     conftest$ac_exeext conftest.$ac_ext
7917         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
7918 $as_echo "$ax_pthread_ok" >&6; }
7919         if test x"$ax_pthread_ok" = xno; then
7920                 PTHREAD_LIBS=""
7921                 PTHREAD_CFLAGS=""
7922         fi
7923         LIBS="$save_LIBS"
7924         CFLAGS="$save_CFLAGS"
7925 fi
7926
7927 # We must check for the threads library under a number of different
7928 # names; the ordering is very important because some systems
7929 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
7930 # libraries is broken (non-POSIX).
7931
7932 # Create a list of thread flags to try.  Items starting with a "-" are
7933 # C compiler flags, and other items are library names, except for "none"
7934 # which indicates that we try without any flags at all, and "pthread-config"
7935 # which is a program returning the flags for the Pth emulation library.
7936
7937 ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mt -mthreads pthread --thread-safe pthread-config"
7938
7939 # The ordering *is* (sometimes) important.  Some notes on the
7940 # individual items follow:
7941
7942 # pthreads: AIX (must check this before -lpthread)
7943 # none: in case threads are in libc; should be tried before -Kthread and
7944 #       other compiler flags to prevent continual compiler warnings
7945 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
7946 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
7947 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
7948 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
7949 # -pthreads: Solaris/gcc
7950 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
7951 #      doesn't hurt to check since this sometimes defines pthreads and
7952 #      -D_REENTRANT too), HP C (must be checked before -lpthread, which
7953 #      is present but should not be used directly)
7954 # -mthreads: Mingw32/gcc, Lynx/gcc
7955 # pthread: Linux, etcetera
7956 # --thread-safe: KAI C++
7957 # pthread-config: use pthread-config program (for GNU Pth library)
7958
7959 case $host_os in
7960
7961         hpux*)
7962
7963         # From the cc(1) man page: "[-mt] Sets various -D flags to enable
7964         # multi-threading and also sets -lpthread."
7965
7966         ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
7967         ;;
7968
7969         openedition*)
7970
7971         # IBM z/OS requires a feature-test macro to be defined in order to
7972         # enable POSIX threads at all, so give the user a hint if this is
7973         # not set. (We don't define these ourselves, as they can affect
7974         # other portions of the system API in unpredictable ways.)
7975
7976         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7977 /* end confdefs.h.  */
7978
7979 #            if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
7980              AX_PTHREAD_ZOS_MISSING
7981 #            endif
7982
7983 _ACEOF
7984 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7985   $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
7986   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
7987 $as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
7988 fi
7989 rm -f conftest*
7990
7991         ;;
7992
7993         solaris*)
7994
7995         # Newer versions of Solaris require the "-mt -lpthread" pair, and we
7996         # check that first.  On some older versions, libc contains stubbed
7997         # (non-functional) versions of the pthreads routines, so link-based
7998         # tests will erroneously succeed.  (We need to link with -pthreads/-mt/
7999         # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
8000         # a function called by this macro, so we could check for that, but
8001         # who knows whether they'll stub that too in a future libc.)  So
8002         # we'll look for -pthreads and -lpthread shortly thereafter.
8003
8004         ax_pthread_flags="-mt,pthread -pthreads -pthread pthread $ax_pthread_flags"
8005         ;;
8006 esac
8007
8008 # Older versions of Clang only give a warning instead of an error for an
8009 # unrecognized option, unless we specify -Werror. (We throw in some extra
8010 # Clang warning flags for good measure.)
8011
8012 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler needs certain flags to reject unknown flags" >&5
8013 $as_echo_n "checking if compiler needs certain flags to reject unknown flags... " >&6; }
8014 if ${ax_cv_PTHREAD_REJECT_UNKNOWN+:} false; then :
8015   $as_echo_n "(cached) " >&6
8016 else
8017   ax_cv_PTHREAD_REJECT_UNKNOWN=unknown
8018      save_CFLAGS="$CFLAGS"
8019      ax_pthread_extra_flags="-Wunknown-warning-option -Wunused-command-line-argument"
8020      CFLAGS="$CFLAGS $ax_pthread_extra_flags -Wfoobaz -foobaz"
8021      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8022 /* end confdefs.h.  */
8023 int foo(void);
8024 int
8025 main ()
8026 {
8027 foo()
8028   ;
8029   return 0;
8030 }
8031 _ACEOF
8032 if ac_fn_c_try_compile "$LINENO"; then :
8033   ax_cv_PTHREAD_REJECT_UNKNOWN="-Werror $ax_pthread_extra_flags"
8034 else
8035   ax_cv_PTHREAD_REJECT_UNKNOWN=no
8036 fi
8037 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8038      CFLAGS="$save_CFLAGS"
8039
8040 fi
8041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_REJECT_UNKNOWN" >&5
8042 $as_echo "$ax_cv_PTHREAD_REJECT_UNKNOWN" >&6; }
8043 ax_pthread_extra_flags=
8044 if test "x$ax_cv_PTHREAD_REJECT_UNKNOWN" != "xno"; then :
8045   ax_pthread_extra_flags="$ax_cv_PTHREAD_REJECT_UNKNOWN"
8046 fi
8047
8048 if test x"$ax_pthread_ok" = xno; then
8049 for flag in $ax_pthread_flags; do
8050
8051         case $flag in
8052                 none)
8053                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
8054 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
8055                 ;;
8056
8057                 -mt,pthread)
8058                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
8059 $as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
8060                 PTHREAD_CFLAGS="-mt"
8061                 PTHREAD_LIBS="-lpthread"
8062                 ;;
8063
8064                 -*)
8065                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5
8066 $as_echo_n "checking whether pthreads work with $flag... " >&6; }
8067                 PTHREAD_CFLAGS="$flag"
8068                 ;;
8069
8070                 pthread-config)
8071                 # Extract the first word of "pthread-config", so it can be a program name with args.
8072 set dummy pthread-config; ac_word=$2
8073 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8074 $as_echo_n "checking for $ac_word... " >&6; }
8075 if ${ac_cv_prog_ax_pthread_config+:} false; then :
8076   $as_echo_n "(cached) " >&6
8077 else
8078   if test -n "$ax_pthread_config"; then
8079   ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
8080 else
8081 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8082 for as_dir in $PATH
8083 do
8084   IFS=$as_save_IFS
8085   test -z "$as_dir" && as_dir=.
8086     for ac_exec_ext in '' $ac_executable_extensions; do
8087   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8088     ac_cv_prog_ax_pthread_config="yes"
8089     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8090     break 2
8091   fi
8092 done
8093   done
8094 IFS=$as_save_IFS
8095
8096   test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
8097 fi
8098 fi
8099 ax_pthread_config=$ac_cv_prog_ax_pthread_config
8100 if test -n "$ax_pthread_config"; then
8101   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
8102 $as_echo "$ax_pthread_config" >&6; }
8103 else
8104   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8105 $as_echo "no" >&6; }
8106 fi
8107
8108
8109                 if test x"$ax_pthread_config" = xno; then continue; fi
8110                 PTHREAD_CFLAGS="`pthread-config --cflags`"
8111                 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
8112                 ;;
8113
8114                 *)
8115                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5
8116 $as_echo_n "checking for the pthreads library -l$flag... " >&6; }
8117                 PTHREAD_LIBS="-l$flag"
8118                 ;;
8119         esac
8120
8121         save_LIBS="$LIBS"
8122         save_CFLAGS="$CFLAGS"
8123         LIBS="$PTHREAD_LIBS $LIBS"
8124         CFLAGS="$CFLAGS $PTHREAD_CFLAGS $ax_pthread_extra_flags"
8125
8126         # Check for various functions.  We must include pthread.h,
8127         # since some functions may be macros.  (On the Sequent, we
8128         # need a special flag -Kthread to make this header compile.)
8129         # We check for pthread_join because it is in -lpthread on IRIX
8130         # while pthread_create is in libc.  We check for pthread_attr_init
8131         # due to DEC craziness with -lpthreads.  We check for
8132         # pthread_cleanup_push because it is one of the few pthread
8133         # functions on Solaris that doesn't have a non-functional libc stub.
8134         # We try pthread_create on general principles.
8135         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8136 /* end confdefs.h.  */
8137 #include <pthread.h>
8138                         static void routine(void *a) { a = 0; }
8139                         static void *start_routine(void *a) { return a; }
8140 int
8141 main ()
8142 {
8143 pthread_t th; pthread_attr_t attr;
8144                         pthread_create(&th, 0, start_routine, 0);
8145                         pthread_join(th, 0);
8146                         pthread_attr_init(&attr);
8147                         pthread_cleanup_push(routine, 0);
8148                         pthread_cleanup_pop(0) /* ; */
8149   ;
8150   return 0;
8151 }
8152 _ACEOF
8153 if ac_fn_c_try_link "$LINENO"; then :
8154   ax_pthread_ok=yes
8155 fi
8156 rm -f core conftest.err conftest.$ac_objext \
8157     conftest$ac_exeext conftest.$ac_ext
8158
8159         LIBS="$save_LIBS"
8160         CFLAGS="$save_CFLAGS"
8161
8162         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
8163 $as_echo "$ax_pthread_ok" >&6; }
8164         if test "x$ax_pthread_ok" = xyes; then
8165                 break;
8166         fi
8167
8168         PTHREAD_LIBS=""
8169         PTHREAD_CFLAGS=""
8170 done
8171 fi
8172
8173 # Various other checks:
8174 if test "x$ax_pthread_ok" = xyes; then
8175         save_LIBS="$LIBS"
8176         LIBS="$PTHREAD_LIBS $LIBS"
8177         save_CFLAGS="$CFLAGS"
8178         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
8179
8180         # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
8181         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
8182 $as_echo_n "checking for joinable pthread attribute... " >&6; }
8183 if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
8184   $as_echo_n "(cached) " >&6
8185 else
8186   ax_cv_PTHREAD_JOINABLE_ATTR=unknown
8187              for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
8188                  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8189 /* end confdefs.h.  */
8190 #include <pthread.h>
8191 int
8192 main ()
8193 {
8194 int attr = $attr; return attr /* ; */
8195   ;
8196   return 0;
8197 }
8198 _ACEOF
8199 if ac_fn_c_try_link "$LINENO"; then :
8200   ax_cv_PTHREAD_JOINABLE_ATTR=$attr; break
8201 fi
8202 rm -f core conftest.err conftest.$ac_objext \
8203     conftest$ac_exeext conftest.$ac_ext
8204              done
8205
8206 fi
8207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
8208 $as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
8209         if test "$ax_cv_PTHREAD_JOINABLE_ATTR" != unknown && \
8210                test "$ax_cv_PTHREAD_JOINABLE_ATTR" != PTHREAD_CREATE_JOINABLE; then :
8211
8212 cat >>confdefs.h <<_ACEOF
8213 #define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
8214 _ACEOF
8215
8216 fi
8217
8218         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5
8219 $as_echo_n "checking if more special flags are required for pthreads... " >&6; }
8220 if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
8221   $as_echo_n "(cached) " >&6
8222 else
8223   ax_cv_PTHREAD_SPECIAL_FLAGS=no
8224              ax_pthread_special_flags_added=no
8225              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8226 /* end confdefs.h.  */
8227
8228 #                 if !defined(_REENTRANT) && !defined(_THREAD_SAFE)
8229                   AX_PTHREAD_NEED_SPECIAL_FLAG
8230 #                 endif
8231
8232 _ACEOF
8233 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8234   $EGREP "AX_PTHREAD_NEED_SPECIAL_FLAG" >/dev/null 2>&1; then :
8235   case $host_os in
8236                   aix* | freebsd*)
8237                   ax_cv_PTHREAD_SPECIAL_FLAGS="-D_THREAD_SAFE"
8238                   ;;
8239                   darwin* | hpux* | osf* | solaris*)
8240                   ax_cv_PTHREAD_SPECIAL_FLAGS="-D_REENTRANT"
8241                   ;;
8242                   esac
8243
8244 fi
8245 rm -f conftest*
8246
8247
8248 fi
8249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
8250 $as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
8251         if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
8252                test "x$ax_pthread_special_flags_added" != "xyes"; then :
8253   PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
8254                ax_pthread_special_flags_added=yes
8255 fi
8256
8257         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
8258 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
8259 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
8260   $as_echo_n "(cached) " >&6
8261 else
8262   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8263 /* end confdefs.h.  */
8264 #include <pthread.h>
8265 int
8266 main ()
8267 {
8268 int i = PTHREAD_PRIO_INHERIT;
8269   ;
8270   return 0;
8271 }
8272 _ACEOF
8273 if ac_fn_c_try_link "$LINENO"; then :
8274   ax_cv_PTHREAD_PRIO_INHERIT=yes
8275 else
8276   ax_cv_PTHREAD_PRIO_INHERIT=no
8277 fi
8278 rm -f core conftest.err conftest.$ac_objext \
8279     conftest$ac_exeext conftest.$ac_ext
8280
8281 fi
8282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
8283 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
8284         if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"; then :
8285
8286 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
8287
8288 fi
8289
8290         LIBS="$save_LIBS"
8291         CFLAGS="$save_CFLAGS"
8292
8293         # More AIX lossage: compile with *_r variant
8294         if test "x$GCC" != xyes; then
8295             case $host_os in
8296                 aix*)
8297                 case "x/$CC" in #(
8298   x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
8299     #handle absolute path differently from PATH based program lookup
8300                    case "x$CC" in #(
8301   x/*) :
8302     if as_fn_executable_p ${CC}_r; then :
8303   PTHREAD_CC="${CC}_r"
8304 fi ;; #(
8305   *) :
8306     for ac_prog in ${CC}_r
8307 do
8308   # Extract the first word of "$ac_prog", so it can be a program name with args.
8309 set dummy $ac_prog; ac_word=$2
8310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8311 $as_echo_n "checking for $ac_word... " >&6; }
8312 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
8313   $as_echo_n "(cached) " >&6
8314 else
8315   if test -n "$PTHREAD_CC"; then
8316   ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
8317 else
8318 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8319 for as_dir in $PATH
8320 do
8321   IFS=$as_save_IFS
8322   test -z "$as_dir" && as_dir=.
8323     for ac_exec_ext in '' $ac_executable_extensions; do
8324   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8325     ac_cv_prog_PTHREAD_CC="$ac_prog"
8326     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8327     break 2
8328   fi
8329 done
8330   done
8331 IFS=$as_save_IFS
8332
8333 fi
8334 fi
8335 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
8336 if test -n "$PTHREAD_CC"; then
8337   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
8338 $as_echo "$PTHREAD_CC" >&6; }
8339 else
8340   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8341 $as_echo "no" >&6; }
8342 fi
8343
8344
8345   test -n "$PTHREAD_CC" && break
8346 done
8347 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
8348  ;;
8349 esac ;; #(
8350   *) :
8351      ;;
8352 esac
8353                 ;;
8354             esac
8355         fi
8356 fi
8357
8358 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
8359
8360
8361
8362
8363
8364 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
8365 if test x"$ax_pthread_ok" = xyes; then
8366
8367 $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
8368
8369         :
8370 else
8371         ax_pthread_ok=no
8372
8373 fi
8374 ac_ext=c
8375 ac_cpp='$CPP $CPPFLAGS'
8376 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8377 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8378 ac_compiler_gnu=$ac_cv_c_compiler_gnu
8379
8380         # set thread flags
8381
8382 # Some platforms use these, so just define them.  They can't hurt if they
8383 # are not supported.  For example, on Solaris -D_POSIX_PTHREAD_SEMANTICS
8384 # enables 5-arg getpwuid_r, among other things.
8385 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
8386
8387 # Check for *_r functions
8388 _CFLAGS="$CFLAGS"
8389 _LIBS="$LIBS"
8390 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
8391 LIBS="$LIBS $PTHREAD_LIBS"
8392
8393 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
8394 if test "x$ac_cv_header_pthread_h" = xyes; then :
8395
8396 else
8397   as_fn_error $? "
8398 pthread.h not found;  use --disable-thread-safety to disable thread safety" "$LINENO" 5
8399 fi
8400
8401
8402
8403 for ac_func in strerror_r getpwuid_r gethostbyname_r
8404 do :
8405   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8406 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8407 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
8408   cat >>confdefs.h <<_ACEOF
8409 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
8410 _ACEOF
8411
8412 fi
8413 done
8414
8415
8416 # Do test here with the proper thread flags
8417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns int" >&5
8418 $as_echo_n "checking whether strerror_r returns int... " >&6; }
8419 if ${pgac_cv_func_strerror_r_int+:} false; then :
8420   $as_echo_n "(cached) " >&6
8421 else
8422   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8423 /* end confdefs.h.  */
8424 #include <string.h>
8425 int
8426 main ()
8427 {
8428 #ifndef _AIX
8429 int strerror_r(int, char *, size_t);
8430 #else
8431 /* Older AIX has 'int' for the third argument so we don't test the args. */
8432 int strerror_r();
8433 #endif
8434   ;
8435   return 0;
8436 }
8437 _ACEOF
8438 if ac_fn_c_try_compile "$LINENO"; then :
8439   pgac_cv_func_strerror_r_int=yes
8440 else
8441   pgac_cv_func_strerror_r_int=no
8442 fi
8443 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8444 fi
8445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_strerror_r_int" >&5
8446 $as_echo "$pgac_cv_func_strerror_r_int" >&6; }
8447 if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
8448
8449 $as_echo "#define STRERROR_R_INT 1" >>confdefs.h
8450
8451 fi
8452
8453
8454 CFLAGS="$_CFLAGS"
8455 LIBS="$_LIBS"
8456
8457
8458 else
8459    # else
8460 # do not use values from template file
8461 PTHREAD_CFLAGS=
8462 PTHREAD_LIBS=
8463
8464 fi # fi
8465
8466
8467
8468
8469
8470 ##
8471 ## Libraries
8472 ##
8473 ## Most libraries are included only if they demonstrably provide a function
8474 ## we need, but libm is an exception: always include it, because there are
8475 ## too many compilers that play cute optimization games that will break
8476 ## probes for standard functions such as pow().
8477 ##
8478
8479 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
8480 $as_echo_n "checking for main in -lm... " >&6; }
8481 if ${ac_cv_lib_m_main+:} false; then :
8482   $as_echo_n "(cached) " >&6
8483 else
8484   ac_check_lib_save_LIBS=$LIBS
8485 LIBS="-lm  $LIBS"
8486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8487 /* end confdefs.h.  */
8488
8489
8490 int
8491 main ()
8492 {
8493 return main ();
8494   ;
8495   return 0;
8496 }
8497 _ACEOF
8498 if ac_fn_c_try_link "$LINENO"; then :
8499   ac_cv_lib_m_main=yes
8500 else
8501   ac_cv_lib_m_main=no
8502 fi
8503 rm -f core conftest.err conftest.$ac_objext \
8504     conftest$ac_exeext conftest.$ac_ext
8505 LIBS=$ac_check_lib_save_LIBS
8506 fi
8507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
8508 $as_echo "$ac_cv_lib_m_main" >&6; }
8509 if test "x$ac_cv_lib_m_main" = xyes; then :
8510   cat >>confdefs.h <<_ACEOF
8511 #define HAVE_LIBM 1
8512 _ACEOF
8513
8514   LIBS="-lm $LIBS"
8515
8516 fi
8517
8518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setproctitle" >&5
8519 $as_echo_n "checking for library containing setproctitle... " >&6; }
8520 if ${ac_cv_search_setproctitle+:} false; then :
8521   $as_echo_n "(cached) " >&6
8522 else
8523   ac_func_search_save_LIBS=$LIBS
8524 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8525 /* end confdefs.h.  */
8526
8527 /* Override any GCC internal prototype to avoid an error.
8528    Use char because int might match the return type of a GCC
8529    builtin and then its argument prototype would still apply.  */
8530 #ifdef __cplusplus
8531 extern "C"
8532 #endif
8533 char setproctitle ();
8534 int
8535 main ()
8536 {
8537 return setproctitle ();
8538   ;
8539   return 0;
8540 }
8541 _ACEOF
8542 for ac_lib in '' util; do
8543   if test -z "$ac_lib"; then
8544     ac_res="none required"
8545   else
8546     ac_res=-l$ac_lib
8547     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8548   fi
8549   if ac_fn_c_try_link "$LINENO"; then :
8550   ac_cv_search_setproctitle=$ac_res
8551 fi
8552 rm -f core conftest.err conftest.$ac_objext \
8553     conftest$ac_exeext
8554   if ${ac_cv_search_setproctitle+:} false; then :
8555   break
8556 fi
8557 done
8558 if ${ac_cv_search_setproctitle+:} false; then :
8559
8560 else
8561   ac_cv_search_setproctitle=no
8562 fi
8563 rm conftest.$ac_ext
8564 LIBS=$ac_func_search_save_LIBS
8565 fi
8566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setproctitle" >&5
8567 $as_echo "$ac_cv_search_setproctitle" >&6; }
8568 ac_res=$ac_cv_search_setproctitle
8569 if test "$ac_res" != no; then :
8570   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8571
8572 fi
8573
8574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
8575 $as_echo_n "checking for library containing dlopen... " >&6; }
8576 if ${ac_cv_search_dlopen+:} false; then :
8577   $as_echo_n "(cached) " >&6
8578 else
8579   ac_func_search_save_LIBS=$LIBS
8580 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8581 /* end confdefs.h.  */
8582
8583 /* Override any GCC internal prototype to avoid an error.
8584    Use char because int might match the return type of a GCC
8585    builtin and then its argument prototype would still apply.  */
8586 #ifdef __cplusplus
8587 extern "C"
8588 #endif
8589 char dlopen ();
8590 int
8591 main ()
8592 {
8593 return dlopen ();
8594   ;
8595   return 0;
8596 }
8597 _ACEOF
8598 for ac_lib in '' dl; do
8599   if test -z "$ac_lib"; then
8600     ac_res="none required"
8601   else
8602     ac_res=-l$ac_lib
8603     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8604   fi
8605   if ac_fn_c_try_link "$LINENO"; then :
8606   ac_cv_search_dlopen=$ac_res
8607 fi
8608 rm -f core conftest.err conftest.$ac_objext \
8609     conftest$ac_exeext
8610   if ${ac_cv_search_dlopen+:} false; then :
8611   break
8612 fi
8613 done
8614 if ${ac_cv_search_dlopen+:} false; then :
8615
8616 else
8617   ac_cv_search_dlopen=no
8618 fi
8619 rm conftest.$ac_ext
8620 LIBS=$ac_func_search_save_LIBS
8621 fi
8622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
8623 $as_echo "$ac_cv_search_dlopen" >&6; }
8624 ac_res=$ac_cv_search_dlopen
8625 if test "$ac_res" != no; then :
8626   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8627
8628 fi
8629
8630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
8631 $as_echo_n "checking for library containing socket... " >&6; }
8632 if ${ac_cv_search_socket+:} false; then :
8633   $as_echo_n "(cached) " >&6
8634 else
8635   ac_func_search_save_LIBS=$LIBS
8636 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8637 /* end confdefs.h.  */
8638
8639 /* Override any GCC internal prototype to avoid an error.
8640    Use char because int might match the return type of a GCC
8641    builtin and then its argument prototype would still apply.  */
8642 #ifdef __cplusplus
8643 extern "C"
8644 #endif
8645 char socket ();
8646 int
8647 main ()
8648 {
8649 return socket ();
8650   ;
8651   return 0;
8652 }
8653 _ACEOF
8654 for ac_lib in '' socket ws2_32; do
8655   if test -z "$ac_lib"; then
8656     ac_res="none required"
8657   else
8658     ac_res=-l$ac_lib
8659     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8660   fi
8661   if ac_fn_c_try_link "$LINENO"; then :
8662   ac_cv_search_socket=$ac_res
8663 fi
8664 rm -f core conftest.err conftest.$ac_objext \
8665     conftest$ac_exeext
8666   if ${ac_cv_search_socket+:} false; then :
8667   break
8668 fi
8669 done
8670 if ${ac_cv_search_socket+:} false; then :
8671
8672 else
8673   ac_cv_search_socket=no
8674 fi
8675 rm conftest.$ac_ext
8676 LIBS=$ac_func_search_save_LIBS
8677 fi
8678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
8679 $as_echo "$ac_cv_search_socket" >&6; }
8680 ac_res=$ac_cv_search_socket
8681 if test "$ac_res" != no; then :
8682   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8683
8684 fi
8685
8686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shl_load" >&5
8687 $as_echo_n "checking for library containing shl_load... " >&6; }
8688 if ${ac_cv_search_shl_load+:} false; then :
8689   $as_echo_n "(cached) " >&6
8690 else
8691   ac_func_search_save_LIBS=$LIBS
8692 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8693 /* end confdefs.h.  */
8694
8695 /* Override any GCC internal prototype to avoid an error.
8696    Use char because int might match the return type of a GCC
8697    builtin and then its argument prototype would still apply.  */
8698 #ifdef __cplusplus
8699 extern "C"
8700 #endif
8701 char shl_load ();
8702 int
8703 main ()
8704 {
8705 return shl_load ();
8706   ;
8707   return 0;
8708 }
8709 _ACEOF
8710 for ac_lib in '' dld; do
8711   if test -z "$ac_lib"; then
8712     ac_res="none required"
8713   else
8714     ac_res=-l$ac_lib
8715     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8716   fi
8717   if ac_fn_c_try_link "$LINENO"; then :
8718   ac_cv_search_shl_load=$ac_res
8719 fi
8720 rm -f core conftest.err conftest.$ac_objext \
8721     conftest$ac_exeext
8722   if ${ac_cv_search_shl_load+:} false; then :
8723   break
8724 fi
8725 done
8726 if ${ac_cv_search_shl_load+:} false; then :
8727
8728 else
8729   ac_cv_search_shl_load=no
8730 fi
8731 rm conftest.$ac_ext
8732 LIBS=$ac_func_search_save_LIBS
8733 fi
8734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shl_load" >&5
8735 $as_echo "$ac_cv_search_shl_load" >&6; }
8736 ac_res=$ac_cv_search_shl_load
8737 if test "$ac_res" != no; then :
8738   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8739
8740 fi
8741
8742 # We only use libld in port/dynloader/aix.c
8743 case $host_os in
8744      aix*)
8745         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing ldopen" >&5
8746 $as_echo_n "checking for library containing ldopen... " >&6; }
8747 if ${ac_cv_search_ldopen+:} false; then :
8748   $as_echo_n "(cached) " >&6
8749 else
8750   ac_func_search_save_LIBS=$LIBS
8751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8752 /* end confdefs.h.  */
8753
8754 /* Override any GCC internal prototype to avoid an error.
8755    Use char because int might match the return type of a GCC
8756    builtin and then its argument prototype would still apply.  */
8757 #ifdef __cplusplus
8758 extern "C"
8759 #endif
8760 char ldopen ();
8761 int
8762 main ()
8763 {
8764 return ldopen ();
8765   ;
8766   return 0;
8767 }
8768 _ACEOF
8769 for ac_lib in '' ld; do
8770   if test -z "$ac_lib"; then
8771     ac_res="none required"
8772   else
8773     ac_res=-l$ac_lib
8774     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8775   fi
8776   if ac_fn_c_try_link "$LINENO"; then :
8777   ac_cv_search_ldopen=$ac_res
8778 fi
8779 rm -f core conftest.err conftest.$ac_objext \
8780     conftest$ac_exeext
8781   if ${ac_cv_search_ldopen+:} false; then :
8782   break
8783 fi
8784 done
8785 if ${ac_cv_search_ldopen+:} false; then :
8786
8787 else
8788   ac_cv_search_ldopen=no
8789 fi
8790 rm conftest.$ac_ext
8791 LIBS=$ac_func_search_save_LIBS
8792 fi
8793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_ldopen" >&5
8794 $as_echo "$ac_cv_search_ldopen" >&6; }
8795 ac_res=$ac_cv_search_ldopen
8796 if test "$ac_res" != no; then :
8797   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8798
8799 fi
8800
8801         ;;
8802 esac
8803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getopt_long" >&5
8804 $as_echo_n "checking for library containing getopt_long... " >&6; }
8805 if ${ac_cv_search_getopt_long+:} false; then :
8806   $as_echo_n "(cached) " >&6
8807 else
8808   ac_func_search_save_LIBS=$LIBS
8809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8810 /* end confdefs.h.  */
8811
8812 /* Override any GCC internal prototype to avoid an error.
8813    Use char because int might match the return type of a GCC
8814    builtin and then its argument prototype would still apply.  */
8815 #ifdef __cplusplus
8816 extern "C"
8817 #endif
8818 char getopt_long ();
8819 int
8820 main ()
8821 {
8822 return getopt_long ();
8823   ;
8824   return 0;
8825 }
8826 _ACEOF
8827 for ac_lib in '' getopt gnugetopt; do
8828   if test -z "$ac_lib"; then
8829     ac_res="none required"
8830   else
8831     ac_res=-l$ac_lib
8832     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8833   fi
8834   if ac_fn_c_try_link "$LINENO"; then :
8835   ac_cv_search_getopt_long=$ac_res
8836 fi
8837 rm -f core conftest.err conftest.$ac_objext \
8838     conftest$ac_exeext
8839   if ${ac_cv_search_getopt_long+:} false; then :
8840   break
8841 fi
8842 done
8843 if ${ac_cv_search_getopt_long+:} false; then :
8844
8845 else
8846   ac_cv_search_getopt_long=no
8847 fi
8848 rm conftest.$ac_ext
8849 LIBS=$ac_func_search_save_LIBS
8850 fi
8851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getopt_long" >&5
8852 $as_echo "$ac_cv_search_getopt_long" >&6; }
8853 ac_res=$ac_cv_search_getopt_long
8854 if test "$ac_res" != no; then :
8855   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8856
8857 fi
8858
8859 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
8860 $as_echo_n "checking for library containing crypt... " >&6; }
8861 if ${ac_cv_search_crypt+:} false; then :
8862   $as_echo_n "(cached) " >&6
8863 else
8864   ac_func_search_save_LIBS=$LIBS
8865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8866 /* end confdefs.h.  */
8867
8868 /* Override any GCC internal prototype to avoid an error.
8869    Use char because int might match the return type of a GCC
8870    builtin and then its argument prototype would still apply.  */
8871 #ifdef __cplusplus
8872 extern "C"
8873 #endif
8874 char crypt ();
8875 int
8876 main ()
8877 {
8878 return crypt ();
8879   ;
8880   return 0;
8881 }
8882 _ACEOF
8883 for ac_lib in '' crypt; do
8884   if test -z "$ac_lib"; then
8885     ac_res="none required"
8886   else
8887     ac_res=-l$ac_lib
8888     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8889   fi
8890   if ac_fn_c_try_link "$LINENO"; then :
8891   ac_cv_search_crypt=$ac_res
8892 fi
8893 rm -f core conftest.err conftest.$ac_objext \
8894     conftest$ac_exeext
8895   if ${ac_cv_search_crypt+:} false; then :
8896   break
8897 fi
8898 done
8899 if ${ac_cv_search_crypt+:} false; then :
8900
8901 else
8902   ac_cv_search_crypt=no
8903 fi
8904 rm conftest.$ac_ext
8905 LIBS=$ac_func_search_save_LIBS
8906 fi
8907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
8908 $as_echo "$ac_cv_search_crypt" >&6; }
8909 ac_res=$ac_cv_search_crypt
8910 if test "$ac_res" != no; then :
8911   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8912
8913 fi
8914
8915 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
8916 $as_echo_n "checking for library containing shm_open... " >&6; }
8917 if ${ac_cv_search_shm_open+:} false; then :
8918   $as_echo_n "(cached) " >&6
8919 else
8920   ac_func_search_save_LIBS=$LIBS
8921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8922 /* end confdefs.h.  */
8923
8924 /* Override any GCC internal prototype to avoid an error.
8925    Use char because int might match the return type of a GCC
8926    builtin and then its argument prototype would still apply.  */
8927 #ifdef __cplusplus
8928 extern "C"
8929 #endif
8930 char shm_open ();
8931 int
8932 main ()
8933 {
8934 return shm_open ();
8935   ;
8936   return 0;
8937 }
8938 _ACEOF
8939 for ac_lib in '' rt; do
8940   if test -z "$ac_lib"; then
8941     ac_res="none required"
8942   else
8943     ac_res=-l$ac_lib
8944     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8945   fi
8946   if ac_fn_c_try_link "$LINENO"; then :
8947   ac_cv_search_shm_open=$ac_res
8948 fi
8949 rm -f core conftest.err conftest.$ac_objext \
8950     conftest$ac_exeext
8951   if ${ac_cv_search_shm_open+:} false; then :
8952   break
8953 fi
8954 done
8955 if ${ac_cv_search_shm_open+:} false; then :
8956
8957 else
8958   ac_cv_search_shm_open=no
8959 fi
8960 rm conftest.$ac_ext
8961 LIBS=$ac_func_search_save_LIBS
8962 fi
8963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
8964 $as_echo "$ac_cv_search_shm_open" >&6; }
8965 ac_res=$ac_cv_search_shm_open
8966 if test "$ac_res" != no; then :
8967   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8968
8969 fi
8970
8971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_unlink" >&5
8972 $as_echo_n "checking for library containing shm_unlink... " >&6; }
8973 if ${ac_cv_search_shm_unlink+:} false; then :
8974   $as_echo_n "(cached) " >&6
8975 else
8976   ac_func_search_save_LIBS=$LIBS
8977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8978 /* end confdefs.h.  */
8979
8980 /* Override any GCC internal prototype to avoid an error.
8981    Use char because int might match the return type of a GCC
8982    builtin and then its argument prototype would still apply.  */
8983 #ifdef __cplusplus
8984 extern "C"
8985 #endif
8986 char shm_unlink ();
8987 int
8988 main ()
8989 {
8990 return shm_unlink ();
8991   ;
8992   return 0;
8993 }
8994 _ACEOF
8995 for ac_lib in '' rt; do
8996   if test -z "$ac_lib"; then
8997     ac_res="none required"
8998   else
8999     ac_res=-l$ac_lib
9000     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9001   fi
9002   if ac_fn_c_try_link "$LINENO"; then :
9003   ac_cv_search_shm_unlink=$ac_res
9004 fi
9005 rm -f core conftest.err conftest.$ac_objext \
9006     conftest$ac_exeext
9007   if ${ac_cv_search_shm_unlink+:} false; then :
9008   break
9009 fi
9010 done
9011 if ${ac_cv_search_shm_unlink+:} false; then :
9012
9013 else
9014   ac_cv_search_shm_unlink=no
9015 fi
9016 rm conftest.$ac_ext
9017 LIBS=$ac_func_search_save_LIBS
9018 fi
9019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_unlink" >&5
9020 $as_echo "$ac_cv_search_shm_unlink" >&6; }
9021 ac_res=$ac_cv_search_shm_unlink
9022 if test "$ac_res" != no; then :
9023   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9024
9025 fi
9026
9027 # Solaris:
9028 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5
9029 $as_echo_n "checking for library containing fdatasync... " >&6; }
9030 if ${ac_cv_search_fdatasync+:} false; then :
9031   $as_echo_n "(cached) " >&6
9032 else
9033   ac_func_search_save_LIBS=$LIBS
9034 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9035 /* end confdefs.h.  */
9036
9037 /* Override any GCC internal prototype to avoid an error.
9038    Use char because int might match the return type of a GCC
9039    builtin and then its argument prototype would still apply.  */
9040 #ifdef __cplusplus
9041 extern "C"
9042 #endif
9043 char fdatasync ();
9044 int
9045 main ()
9046 {
9047 return fdatasync ();
9048   ;
9049   return 0;
9050 }
9051 _ACEOF
9052 for ac_lib in '' rt posix4; do
9053   if test -z "$ac_lib"; then
9054     ac_res="none required"
9055   else
9056     ac_res=-l$ac_lib
9057     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9058   fi
9059   if ac_fn_c_try_link "$LINENO"; then :
9060   ac_cv_search_fdatasync=$ac_res
9061 fi
9062 rm -f core conftest.err conftest.$ac_objext \
9063     conftest$ac_exeext
9064   if ${ac_cv_search_fdatasync+:} false; then :
9065   break
9066 fi
9067 done
9068 if ${ac_cv_search_fdatasync+:} false; then :
9069
9070 else
9071   ac_cv_search_fdatasync=no
9072 fi
9073 rm conftest.$ac_ext
9074 LIBS=$ac_func_search_save_LIBS
9075 fi
9076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5
9077 $as_echo "$ac_cv_search_fdatasync" >&6; }
9078 ac_res=$ac_cv_search_fdatasync
9079 if test "$ac_res" != no; then :
9080   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9081
9082 fi
9083
9084 # Required for thread_test.c on Solaris
9085 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sched_yield" >&5
9086 $as_echo_n "checking for library containing sched_yield... " >&6; }
9087 if ${ac_cv_search_sched_yield+:} false; then :
9088   $as_echo_n "(cached) " >&6
9089 else
9090   ac_func_search_save_LIBS=$LIBS
9091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9092 /* end confdefs.h.  */
9093
9094 /* Override any GCC internal prototype to avoid an error.
9095    Use char because int might match the return type of a GCC
9096    builtin and then its argument prototype would still apply.  */
9097 #ifdef __cplusplus
9098 extern "C"
9099 #endif
9100 char sched_yield ();
9101 int
9102 main ()
9103 {
9104 return sched_yield ();
9105   ;
9106   return 0;
9107 }
9108 _ACEOF
9109 for ac_lib in '' rt; do
9110   if test -z "$ac_lib"; then
9111     ac_res="none required"
9112   else
9113     ac_res=-l$ac_lib
9114     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9115   fi
9116   if ac_fn_c_try_link "$LINENO"; then :
9117   ac_cv_search_sched_yield=$ac_res
9118 fi
9119 rm -f core conftest.err conftest.$ac_objext \
9120     conftest$ac_exeext
9121   if ${ac_cv_search_sched_yield+:} false; then :
9122   break
9123 fi
9124 done
9125 if ${ac_cv_search_sched_yield+:} false; then :
9126
9127 else
9128   ac_cv_search_sched_yield=no
9129 fi
9130 rm conftest.$ac_ext
9131 LIBS=$ac_func_search_save_LIBS
9132 fi
9133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sched_yield" >&5
9134 $as_echo "$ac_cv_search_sched_yield" >&6; }
9135 ac_res=$ac_cv_search_sched_yield
9136 if test "$ac_res" != no; then :
9137   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9138
9139 fi
9140
9141 # Required for thread_test.c on Solaris 2.5:
9142 # Other ports use it too (HP-UX) so test unconditionally
9143 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname_r" >&5
9144 $as_echo_n "checking for library containing gethostbyname_r... " >&6; }
9145 if ${ac_cv_search_gethostbyname_r+:} false; then :
9146   $as_echo_n "(cached) " >&6
9147 else
9148   ac_func_search_save_LIBS=$LIBS
9149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9150 /* end confdefs.h.  */
9151
9152 /* Override any GCC internal prototype to avoid an error.
9153    Use char because int might match the return type of a GCC
9154    builtin and then its argument prototype would still apply.  */
9155 #ifdef __cplusplus
9156 extern "C"
9157 #endif
9158 char gethostbyname_r ();
9159 int
9160 main ()
9161 {
9162 return gethostbyname_r ();
9163   ;
9164   return 0;
9165 }
9166 _ACEOF
9167 for ac_lib in '' nsl; do
9168   if test -z "$ac_lib"; then
9169     ac_res="none required"
9170   else
9171     ac_res=-l$ac_lib
9172     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9173   fi
9174   if ac_fn_c_try_link "$LINENO"; then :
9175   ac_cv_search_gethostbyname_r=$ac_res
9176 fi
9177 rm -f core conftest.err conftest.$ac_objext \
9178     conftest$ac_exeext
9179   if ${ac_cv_search_gethostbyname_r+:} false; then :
9180   break
9181 fi
9182 done
9183 if ${ac_cv_search_gethostbyname_r+:} false; then :
9184
9185 else
9186   ac_cv_search_gethostbyname_r=no
9187 fi
9188 rm conftest.$ac_ext
9189 LIBS=$ac_func_search_save_LIBS
9190 fi
9191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname_r" >&5
9192 $as_echo "$ac_cv_search_gethostbyname_r" >&6; }
9193 ac_res=$ac_cv_search_gethostbyname_r
9194 if test "$ac_res" != no; then :
9195   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9196
9197 fi
9198
9199 # Cygwin:
9200 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shmget" >&5
9201 $as_echo_n "checking for library containing shmget... " >&6; }
9202 if ${ac_cv_search_shmget+:} false; then :
9203   $as_echo_n "(cached) " >&6
9204 else
9205   ac_func_search_save_LIBS=$LIBS
9206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9207 /* end confdefs.h.  */
9208
9209 /* Override any GCC internal prototype to avoid an error.
9210    Use char because int might match the return type of a GCC
9211    builtin and then its argument prototype would still apply.  */
9212 #ifdef __cplusplus
9213 extern "C"
9214 #endif
9215 char shmget ();
9216 int
9217 main ()
9218 {
9219 return shmget ();
9220   ;
9221   return 0;
9222 }
9223 _ACEOF
9224 for ac_lib in '' cygipc; do
9225   if test -z "$ac_lib"; then
9226     ac_res="none required"
9227   else
9228     ac_res=-l$ac_lib
9229     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9230   fi
9231   if ac_fn_c_try_link "$LINENO"; then :
9232   ac_cv_search_shmget=$ac_res
9233 fi
9234 rm -f core conftest.err conftest.$ac_objext \
9235     conftest$ac_exeext
9236   if ${ac_cv_search_shmget+:} false; then :
9237   break
9238 fi
9239 done
9240 if ${ac_cv_search_shmget+:} false; then :
9241
9242 else
9243   ac_cv_search_shmget=no
9244 fi
9245 rm conftest.$ac_ext
9246 LIBS=$ac_func_search_save_LIBS
9247 fi
9248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shmget" >&5
9249 $as_echo "$ac_cv_search_shmget" >&6; }
9250 ac_res=$ac_cv_search_shmget
9251 if test "$ac_res" != no; then :
9252   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9253
9254 fi
9255
9256
9257 if test "$with_readline" = yes; then
9258
9259
9260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing readline" >&5
9261 $as_echo_n "checking for library containing readline... " >&6; }
9262 if ${pgac_cv_check_readline+:} false; then :
9263   $as_echo_n "(cached) " >&6
9264 else
9265   pgac_cv_check_readline=no
9266 pgac_save_LIBS=$LIBS
9267 if test x"$with_libedit_preferred" != x"yes"
9268 then    READLINE_ORDER="-lreadline -ledit"
9269 else    READLINE_ORDER="-ledit -lreadline"
9270 fi
9271 for pgac_rllib in $READLINE_ORDER ; do
9272   for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
9273     LIBS="${pgac_rllib}${pgac_lib} $pgac_save_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 readline ();
9284 int
9285 main ()
9286 {
9287 return readline ();
9288   ;
9289   return 0;
9290 }
9291 _ACEOF
9292 if ac_fn_c_try_link "$LINENO"; then :
9293
9294       # Older NetBSD, OpenBSD, and Irix have a broken linker that does not
9295       # recognize dependent libraries; assume curses is needed if we didn't
9296       # find any dependency.
9297       case $host_os in
9298         netbsd* | openbsd* | irix*)
9299           if test x"$pgac_lib" = x"" ; then
9300             pgac_lib=" -lcurses"
9301           fi ;;
9302       esac
9303
9304       pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
9305       break
9306
9307 fi
9308 rm -f core conftest.err conftest.$ac_objext \
9309     conftest$ac_exeext conftest.$ac_ext
9310   done
9311   if test "$pgac_cv_check_readline" != no ; then
9312     break
9313   fi
9314 done
9315 LIBS=$pgac_save_LIBS
9316
9317 fi
9318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_readline" >&5
9319 $as_echo "$pgac_cv_check_readline" >&6; }
9320 if test "$pgac_cv_check_readline" != no ; then
9321   LIBS="$pgac_cv_check_readline $LIBS"
9322
9323 $as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
9324
9325 fi
9326
9327
9328   if test x"$pgac_cv_check_readline" = x"no"; then
9329     as_fn_error $? "readline library not found
9330 If you have readline already installed, see config.log for details on the
9331 failure.  It is possible the compiler isn't looking in the proper directory.
9332 Use --without-readline to disable readline support." "$LINENO" 5
9333   fi
9334 fi
9335
9336 if test "$with_zlib" = yes; then
9337   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5
9338 $as_echo_n "checking for inflate in -lz... " >&6; }
9339 if ${ac_cv_lib_z_inflate+:} false; then :
9340   $as_echo_n "(cached) " >&6
9341 else
9342   ac_check_lib_save_LIBS=$LIBS
9343 LIBS="-lz  $LIBS"
9344 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9345 /* end confdefs.h.  */
9346
9347 /* Override any GCC internal prototype to avoid an error.
9348    Use char because int might match the return type of a GCC
9349    builtin and then its argument prototype would still apply.  */
9350 #ifdef __cplusplus
9351 extern "C"
9352 #endif
9353 char inflate ();
9354 int
9355 main ()
9356 {
9357 return inflate ();
9358   ;
9359   return 0;
9360 }
9361 _ACEOF
9362 if ac_fn_c_try_link "$LINENO"; then :
9363   ac_cv_lib_z_inflate=yes
9364 else
9365   ac_cv_lib_z_inflate=no
9366 fi
9367 rm -f core conftest.err conftest.$ac_objext \
9368     conftest$ac_exeext conftest.$ac_ext
9369 LIBS=$ac_check_lib_save_LIBS
9370 fi
9371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5
9372 $as_echo "$ac_cv_lib_z_inflate" >&6; }
9373 if test "x$ac_cv_lib_z_inflate" = xyes; then :
9374   cat >>confdefs.h <<_ACEOF
9375 #define HAVE_LIBZ 1
9376 _ACEOF
9377
9378   LIBS="-lz $LIBS"
9379
9380 else
9381   as_fn_error $? "zlib library not found
9382 If you have zlib already installed, see config.log for details on the
9383 failure.  It is possible the compiler isn't looking in the proper directory.
9384 Use --without-zlib to disable zlib support." "$LINENO" 5
9385 fi
9386
9387 fi
9388
9389 if test "$enable_spinlocks" = yes; then
9390
9391 $as_echo "#define HAVE_SPINLOCKS 1" >>confdefs.h
9392
9393 else
9394   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9395 *** Not using spinlocks will cause poor performance." >&5
9396 $as_echo "$as_me: WARNING:
9397 *** Not using spinlocks will cause poor performance." >&2;}
9398 fi
9399
9400 if test "$enable_atomics" = yes; then
9401
9402 $as_echo "#define HAVE_ATOMICS 1" >>confdefs.h
9403
9404 else
9405   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9406 *** Not using atomic operations will cause poor performance." >&5
9407 $as_echo "$as_me: WARNING:
9408 *** Not using atomic operations will cause poor performance." >&2;}
9409 fi
9410
9411 if test "$with_gssapi" = yes ; then
9412   if test "$PORTNAME" != "win32"; then
9413     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gss_init_sec_context" >&5
9414 $as_echo_n "checking for library containing gss_init_sec_context... " >&6; }
9415 if ${ac_cv_search_gss_init_sec_context+:} false; then :
9416   $as_echo_n "(cached) " >&6
9417 else
9418   ac_func_search_save_LIBS=$LIBS
9419 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9420 /* end confdefs.h.  */
9421
9422 /* Override any GCC internal prototype to avoid an error.
9423    Use char because int might match the return type of a GCC
9424    builtin and then its argument prototype would still apply.  */
9425 #ifdef __cplusplus
9426 extern "C"
9427 #endif
9428 char gss_init_sec_context ();
9429 int
9430 main ()
9431 {
9432 return gss_init_sec_context ();
9433   ;
9434   return 0;
9435 }
9436 _ACEOF
9437 for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'; do
9438   if test -z "$ac_lib"; then
9439     ac_res="none required"
9440   else
9441     ac_res=-l$ac_lib
9442     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9443   fi
9444   if ac_fn_c_try_link "$LINENO"; then :
9445   ac_cv_search_gss_init_sec_context=$ac_res
9446 fi
9447 rm -f core conftest.err conftest.$ac_objext \
9448     conftest$ac_exeext
9449   if ${ac_cv_search_gss_init_sec_context+:} false; then :
9450   break
9451 fi
9452 done
9453 if ${ac_cv_search_gss_init_sec_context+:} false; then :
9454
9455 else
9456   ac_cv_search_gss_init_sec_context=no
9457 fi
9458 rm conftest.$ac_ext
9459 LIBS=$ac_func_search_save_LIBS
9460 fi
9461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gss_init_sec_context" >&5
9462 $as_echo "$ac_cv_search_gss_init_sec_context" >&6; }
9463 ac_res=$ac_cv_search_gss_init_sec_context
9464 if test "$ac_res" != no; then :
9465   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9466
9467 else
9468   as_fn_error $? "could not find function 'gss_init_sec_context' required for GSSAPI" "$LINENO" 5
9469 fi
9470
9471   else
9472     LIBS="$LIBS -lgssapi32"
9473   fi
9474 fi
9475
9476 if test "$with_openssl" = yes ; then
9477     if test "$PORTNAME" != "win32"; then
9478      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_new_ex_data in -lcrypto" >&5
9479 $as_echo_n "checking for CRYPTO_new_ex_data in -lcrypto... " >&6; }
9480 if ${ac_cv_lib_crypto_CRYPTO_new_ex_data+:} false; then :
9481   $as_echo_n "(cached) " >&6
9482 else
9483   ac_check_lib_save_LIBS=$LIBS
9484 LIBS="-lcrypto  $LIBS"
9485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9486 /* end confdefs.h.  */
9487
9488 /* Override any GCC internal prototype to avoid an error.
9489    Use char because int might match the return type of a GCC
9490    builtin and then its argument prototype would still apply.  */
9491 #ifdef __cplusplus
9492 extern "C"
9493 #endif
9494 char CRYPTO_new_ex_data ();
9495 int
9496 main ()
9497 {
9498 return CRYPTO_new_ex_data ();
9499   ;
9500   return 0;
9501 }
9502 _ACEOF
9503 if ac_fn_c_try_link "$LINENO"; then :
9504   ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
9505 else
9506   ac_cv_lib_crypto_CRYPTO_new_ex_data=no
9507 fi
9508 rm -f core conftest.err conftest.$ac_objext \
9509     conftest$ac_exeext conftest.$ac_ext
9510 LIBS=$ac_check_lib_save_LIBS
9511 fi
9512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
9513 $as_echo "$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6; }
9514 if test "x$ac_cv_lib_crypto_CRYPTO_new_ex_data" = xyes; then :
9515   cat >>confdefs.h <<_ACEOF
9516 #define HAVE_LIBCRYPTO 1
9517 _ACEOF
9518
9519   LIBS="-lcrypto $LIBS"
9520
9521 else
9522   as_fn_error $? "library 'crypto' is required for OpenSSL" "$LINENO" 5
9523 fi
9524
9525      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl" >&5
9526 $as_echo_n "checking for SSL_new in -lssl... " >&6; }
9527 if ${ac_cv_lib_ssl_SSL_new+:} false; then :
9528   $as_echo_n "(cached) " >&6
9529 else
9530   ac_check_lib_save_LIBS=$LIBS
9531 LIBS="-lssl  $LIBS"
9532 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9533 /* end confdefs.h.  */
9534
9535 /* Override any GCC internal prototype to avoid an error.
9536    Use char because int might match the return type of a GCC
9537    builtin and then its argument prototype would still apply.  */
9538 #ifdef __cplusplus
9539 extern "C"
9540 #endif
9541 char SSL_new ();
9542 int
9543 main ()
9544 {
9545 return SSL_new ();
9546   ;
9547   return 0;
9548 }
9549 _ACEOF
9550 if ac_fn_c_try_link "$LINENO"; then :
9551   ac_cv_lib_ssl_SSL_new=yes
9552 else
9553   ac_cv_lib_ssl_SSL_new=no
9554 fi
9555 rm -f core conftest.err conftest.$ac_objext \
9556     conftest$ac_exeext conftest.$ac_ext
9557 LIBS=$ac_check_lib_save_LIBS
9558 fi
9559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_new" >&5
9560 $as_echo "$ac_cv_lib_ssl_SSL_new" >&6; }
9561 if test "x$ac_cv_lib_ssl_SSL_new" = xyes; then :
9562   cat >>confdefs.h <<_ACEOF
9563 #define HAVE_LIBSSL 1
9564 _ACEOF
9565
9566   LIBS="-lssl $LIBS"
9567
9568 else
9569   as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5
9570 fi
9571
9572   else
9573      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing CRYPTO_new_ex_data" >&5
9574 $as_echo_n "checking for library containing CRYPTO_new_ex_data... " >&6; }
9575 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
9576   $as_echo_n "(cached) " >&6
9577 else
9578   ac_func_search_save_LIBS=$LIBS
9579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9580 /* end confdefs.h.  */
9581
9582 /* Override any GCC internal prototype to avoid an error.
9583    Use char because int might match the return type of a GCC
9584    builtin and then its argument prototype would still apply.  */
9585 #ifdef __cplusplus
9586 extern "C"
9587 #endif
9588 char CRYPTO_new_ex_data ();
9589 int
9590 main ()
9591 {
9592 return CRYPTO_new_ex_data ();
9593   ;
9594   return 0;
9595 }
9596 _ACEOF
9597 for ac_lib in '' eay32 crypto; do
9598   if test -z "$ac_lib"; then
9599     ac_res="none required"
9600   else
9601     ac_res=-l$ac_lib
9602     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9603   fi
9604   if ac_fn_c_try_link "$LINENO"; then :
9605   ac_cv_search_CRYPTO_new_ex_data=$ac_res
9606 fi
9607 rm -f core conftest.err conftest.$ac_objext \
9608     conftest$ac_exeext
9609   if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
9610   break
9611 fi
9612 done
9613 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
9614
9615 else
9616   ac_cv_search_CRYPTO_new_ex_data=no
9617 fi
9618 rm conftest.$ac_ext
9619 LIBS=$ac_func_search_save_LIBS
9620 fi
9621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_CRYPTO_new_ex_data" >&5
9622 $as_echo "$ac_cv_search_CRYPTO_new_ex_data" >&6; }
9623 ac_res=$ac_cv_search_CRYPTO_new_ex_data
9624 if test "$ac_res" != no; then :
9625   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9626
9627 else
9628   as_fn_error $? "library 'eay32' or 'crypto' is required for OpenSSL" "$LINENO" 5
9629 fi
9630
9631      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_new" >&5
9632 $as_echo_n "checking for library containing SSL_new... " >&6; }
9633 if ${ac_cv_search_SSL_new+:} false; then :
9634   $as_echo_n "(cached) " >&6
9635 else
9636   ac_func_search_save_LIBS=$LIBS
9637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9638 /* end confdefs.h.  */
9639
9640 /* Override any GCC internal prototype to avoid an error.
9641    Use char because int might match the return type of a GCC
9642    builtin and then its argument prototype would still apply.  */
9643 #ifdef __cplusplus
9644 extern "C"
9645 #endif
9646 char SSL_new ();
9647 int
9648 main ()
9649 {
9650 return SSL_new ();
9651   ;
9652   return 0;
9653 }
9654 _ACEOF
9655 for ac_lib in '' ssleay32 ssl; do
9656   if test -z "$ac_lib"; then
9657     ac_res="none required"
9658   else
9659     ac_res=-l$ac_lib
9660     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9661   fi
9662   if ac_fn_c_try_link "$LINENO"; then :
9663   ac_cv_search_SSL_new=$ac_res
9664 fi
9665 rm -f core conftest.err conftest.$ac_objext \
9666     conftest$ac_exeext
9667   if ${ac_cv_search_SSL_new+:} false; then :
9668   break
9669 fi
9670 done
9671 if ${ac_cv_search_SSL_new+:} false; then :
9672
9673 else
9674   ac_cv_search_SSL_new=no
9675 fi
9676 rm conftest.$ac_ext
9677 LIBS=$ac_func_search_save_LIBS
9678 fi
9679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_new" >&5
9680 $as_echo "$ac_cv_search_SSL_new" >&6; }
9681 ac_res=$ac_cv_search_SSL_new
9682 if test "$ac_res" != no; then :
9683   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9684
9685 else
9686   as_fn_error $? "library 'ssleay32' or 'ssl' is required for OpenSSL" "$LINENO" 5
9687 fi
9688
9689   fi
9690   for ac_func in SSL_get_current_compression
9691 do :
9692   ac_fn_c_check_func "$LINENO" "SSL_get_current_compression" "ac_cv_func_SSL_get_current_compression"
9693 if test "x$ac_cv_func_SSL_get_current_compression" = xyes; then :
9694   cat >>confdefs.h <<_ACEOF
9695 #define HAVE_SSL_GET_CURRENT_COMPRESSION 1
9696 _ACEOF
9697
9698 fi
9699 done
9700
9701   # Functions introduced in OpenSSL 1.1.0. We used to check for
9702   # OPENSSL_VERSION_NUMBER, but that didn't work with 1.1.0, because LibreSSL
9703   # defines OPENSSL_VERSION_NUMBER to claim version 2.0.0, even though it
9704   # doesn't have these OpenSSL 1.1.0 functions. So check for individual
9705   # functions.
9706   for ac_func in OPENSSL_init_ssl BIO_get_data BIO_meth_new ASN1_STRING_get0_data RAND_OpenSSL
9707 do :
9708   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9709 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9710 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
9711   cat >>confdefs.h <<_ACEOF
9712 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
9713 _ACEOF
9714
9715 fi
9716 done
9717
9718   # OpenSSL versions before 1.1.0 required setting callback functions, for
9719   # thread-safety. In 1.1.0, it's no longer required, and CRYPTO_lock()
9720   # function was removed.
9721   for ac_func in CRYPTO_lock
9722 do :
9723   ac_fn_c_check_func "$LINENO" "CRYPTO_lock" "ac_cv_func_CRYPTO_lock"
9724 if test "x$ac_cv_func_CRYPTO_lock" = xyes; then :
9725   cat >>confdefs.h <<_ACEOF
9726 #define HAVE_CRYPTO_LOCK 1
9727 _ACEOF
9728
9729 fi
9730 done
9731
9732 fi
9733
9734 if test "$with_pam" = yes ; then
9735   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_start in -lpam" >&5
9736 $as_echo_n "checking for pam_start in -lpam... " >&6; }
9737 if ${ac_cv_lib_pam_pam_start+:} false; then :
9738   $as_echo_n "(cached) " >&6
9739 else
9740   ac_check_lib_save_LIBS=$LIBS
9741 LIBS="-lpam  $LIBS"
9742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9743 /* end confdefs.h.  */
9744
9745 /* Override any GCC internal prototype to avoid an error.
9746    Use char because int might match the return type of a GCC
9747    builtin and then its argument prototype would still apply.  */
9748 #ifdef __cplusplus
9749 extern "C"
9750 #endif
9751 char pam_start ();
9752 int
9753 main ()
9754 {
9755 return pam_start ();
9756   ;
9757   return 0;
9758 }
9759 _ACEOF
9760 if ac_fn_c_try_link "$LINENO"; then :
9761   ac_cv_lib_pam_pam_start=yes
9762 else
9763   ac_cv_lib_pam_pam_start=no
9764 fi
9765 rm -f core conftest.err conftest.$ac_objext \
9766     conftest$ac_exeext conftest.$ac_ext
9767 LIBS=$ac_check_lib_save_LIBS
9768 fi
9769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_start" >&5
9770 $as_echo "$ac_cv_lib_pam_pam_start" >&6; }
9771 if test "x$ac_cv_lib_pam_pam_start" = xyes; then :
9772   cat >>confdefs.h <<_ACEOF
9773 #define HAVE_LIBPAM 1
9774 _ACEOF
9775
9776   LIBS="-lpam $LIBS"
9777
9778 else
9779   as_fn_error $? "library 'pam' is required for PAM" "$LINENO" 5
9780 fi
9781
9782 fi
9783
9784 if test "$with_libxml" = yes ; then
9785   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlSaveToBuffer in -lxml2" >&5
9786 $as_echo_n "checking for xmlSaveToBuffer in -lxml2... " >&6; }
9787 if ${ac_cv_lib_xml2_xmlSaveToBuffer+:} false; then :
9788   $as_echo_n "(cached) " >&6
9789 else
9790   ac_check_lib_save_LIBS=$LIBS
9791 LIBS="-lxml2  $LIBS"
9792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9793 /* end confdefs.h.  */
9794
9795 /* Override any GCC internal prototype to avoid an error.
9796    Use char because int might match the return type of a GCC
9797    builtin and then its argument prototype would still apply.  */
9798 #ifdef __cplusplus
9799 extern "C"
9800 #endif
9801 char xmlSaveToBuffer ();
9802 int
9803 main ()
9804 {
9805 return xmlSaveToBuffer ();
9806   ;
9807   return 0;
9808 }
9809 _ACEOF
9810 if ac_fn_c_try_link "$LINENO"; then :
9811   ac_cv_lib_xml2_xmlSaveToBuffer=yes
9812 else
9813   ac_cv_lib_xml2_xmlSaveToBuffer=no
9814 fi
9815 rm -f core conftest.err conftest.$ac_objext \
9816     conftest$ac_exeext conftest.$ac_ext
9817 LIBS=$ac_check_lib_save_LIBS
9818 fi
9819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlSaveToBuffer" >&5
9820 $as_echo "$ac_cv_lib_xml2_xmlSaveToBuffer" >&6; }
9821 if test "x$ac_cv_lib_xml2_xmlSaveToBuffer" = xyes; then :
9822   cat >>confdefs.h <<_ACEOF
9823 #define HAVE_LIBXML2 1
9824 _ACEOF
9825
9826   LIBS="-lxml2 $LIBS"
9827
9828 else
9829   as_fn_error $? "library 'xml2' (version >= 2.6.23) is required for XML support" "$LINENO" 5
9830 fi
9831
9832 fi
9833
9834 if test "$with_libxslt" = yes ; then
9835   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xsltCleanupGlobals in -lxslt" >&5
9836 $as_echo_n "checking for xsltCleanupGlobals in -lxslt... " >&6; }
9837 if ${ac_cv_lib_xslt_xsltCleanupGlobals+:} false; then :
9838   $as_echo_n "(cached) " >&6
9839 else
9840   ac_check_lib_save_LIBS=$LIBS
9841 LIBS="-lxslt  $LIBS"
9842 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9843 /* end confdefs.h.  */
9844
9845 /* Override any GCC internal prototype to avoid an error.
9846    Use char because int might match the return type of a GCC
9847    builtin and then its argument prototype would still apply.  */
9848 #ifdef __cplusplus
9849 extern "C"
9850 #endif
9851 char xsltCleanupGlobals ();
9852 int
9853 main ()
9854 {
9855 return xsltCleanupGlobals ();
9856   ;
9857   return 0;
9858 }
9859 _ACEOF
9860 if ac_fn_c_try_link "$LINENO"; then :
9861   ac_cv_lib_xslt_xsltCleanupGlobals=yes
9862 else
9863   ac_cv_lib_xslt_xsltCleanupGlobals=no
9864 fi
9865 rm -f core conftest.err conftest.$ac_objext \
9866     conftest$ac_exeext conftest.$ac_ext
9867 LIBS=$ac_check_lib_save_LIBS
9868 fi
9869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xslt_xsltCleanupGlobals" >&5
9870 $as_echo "$ac_cv_lib_xslt_xsltCleanupGlobals" >&6; }
9871 if test "x$ac_cv_lib_xslt_xsltCleanupGlobals" = xyes; then :
9872   cat >>confdefs.h <<_ACEOF
9873 #define HAVE_LIBXSLT 1
9874 _ACEOF
9875
9876   LIBS="-lxslt $LIBS"
9877
9878 else
9879   as_fn_error $? "library 'xslt' is required for XSLT support" "$LINENO" 5
9880 fi
9881
9882 fi
9883
9884 # Note: We can test for libldap_r only after we know PTHREAD_LIBS
9885 if test "$with_ldap" = yes ; then
9886   _LIBS="$LIBS"
9887   if test "$PORTNAME" != "win32"; then
9888     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap" >&5
9889 $as_echo_n "checking for ldap_bind in -lldap... " >&6; }
9890 if ${ac_cv_lib_ldap_ldap_bind+:} false; then :
9891   $as_echo_n "(cached) " >&6
9892 else
9893   ac_check_lib_save_LIBS=$LIBS
9894 LIBS="-lldap $EXTRA_LDAP_LIBS $LIBS"
9895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9896 /* end confdefs.h.  */
9897
9898 /* Override any GCC internal prototype to avoid an error.
9899    Use char because int might match the return type of a GCC
9900    builtin and then its argument prototype would still apply.  */
9901 #ifdef __cplusplus
9902 extern "C"
9903 #endif
9904 char ldap_bind ();
9905 int
9906 main ()
9907 {
9908 return ldap_bind ();
9909   ;
9910   return 0;
9911 }
9912 _ACEOF
9913 if ac_fn_c_try_link "$LINENO"; then :
9914   ac_cv_lib_ldap_ldap_bind=yes
9915 else
9916   ac_cv_lib_ldap_ldap_bind=no
9917 fi
9918 rm -f core conftest.err conftest.$ac_objext \
9919     conftest$ac_exeext conftest.$ac_ext
9920 LIBS=$ac_check_lib_save_LIBS
9921 fi
9922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_ldap_bind" >&5
9923 $as_echo "$ac_cv_lib_ldap_ldap_bind" >&6; }
9924 if test "x$ac_cv_lib_ldap_ldap_bind" = xyes; then :
9925   cat >>confdefs.h <<_ACEOF
9926 #define HAVE_LIBLDAP 1
9927 _ACEOF
9928
9929   LIBS="-lldap $LIBS"
9930
9931 else
9932   as_fn_error $? "library 'ldap' is required for LDAP" "$LINENO" 5
9933 fi
9934
9935     LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
9936     if test "$enable_thread_safety" = yes; then
9937       # on some platforms ldap_r fails to link without PTHREAD_LIBS
9938       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_simple_bind in -lldap_r" >&5
9939 $as_echo_n "checking for ldap_simple_bind in -lldap_r... " >&6; }
9940 if ${ac_cv_lib_ldap_r_ldap_simple_bind+:} false; then :
9941   $as_echo_n "(cached) " >&6
9942 else
9943   ac_check_lib_save_LIBS=$LIBS
9944 LIBS="-lldap_r $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
9945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9946 /* end confdefs.h.  */
9947
9948 /* Override any GCC internal prototype to avoid an error.
9949    Use char because int might match the return type of a GCC
9950    builtin and then its argument prototype would still apply.  */
9951 #ifdef __cplusplus
9952 extern "C"
9953 #endif
9954 char ldap_simple_bind ();
9955 int
9956 main ()
9957 {
9958 return ldap_simple_bind ();
9959   ;
9960   return 0;
9961 }
9962 _ACEOF
9963 if ac_fn_c_try_link "$LINENO"; then :
9964   ac_cv_lib_ldap_r_ldap_simple_bind=yes
9965 else
9966   ac_cv_lib_ldap_r_ldap_simple_bind=no
9967 fi
9968 rm -f core conftest.err conftest.$ac_objext \
9969     conftest$ac_exeext conftest.$ac_ext
9970 LIBS=$ac_check_lib_save_LIBS
9971 fi
9972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_r_ldap_simple_bind" >&5
9973 $as_echo "$ac_cv_lib_ldap_r_ldap_simple_bind" >&6; }
9974 if test "x$ac_cv_lib_ldap_r_ldap_simple_bind" = xyes; then :
9975   cat >>confdefs.h <<_ACEOF
9976 #define HAVE_LIBLDAP_R 1
9977 _ACEOF
9978
9979   LIBS="-lldap_r $LIBS"
9980
9981 else
9982   as_fn_error $? "library 'ldap_r' is required for LDAP" "$LINENO" 5
9983 fi
9984
9985       LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
9986     else
9987       LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
9988     fi
9989   else
9990     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lwldap32" >&5
9991 $as_echo_n "checking for ldap_bind in -lwldap32... " >&6; }
9992 if ${ac_cv_lib_wldap32_ldap_bind+:} false; then :
9993   $as_echo_n "(cached) " >&6
9994 else
9995   ac_check_lib_save_LIBS=$LIBS
9996 LIBS="-lwldap32  $LIBS"
9997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9998 /* end confdefs.h.  */
9999
10000 /* Override any GCC internal prototype to avoid an error.
10001    Use char because int might match the return type of a GCC
10002    builtin and then its argument prototype would still apply.  */
10003 #ifdef __cplusplus
10004 extern "C"
10005 #endif
10006 char ldap_bind ();
10007 int
10008 main ()
10009 {
10010 return ldap_bind ();
10011   ;
10012   return 0;
10013 }
10014 _ACEOF
10015 if ac_fn_c_try_link "$LINENO"; then :
10016   ac_cv_lib_wldap32_ldap_bind=yes
10017 else
10018   ac_cv_lib_wldap32_ldap_bind=no
10019 fi
10020 rm -f core conftest.err conftest.$ac_objext \
10021     conftest$ac_exeext conftest.$ac_ext
10022 LIBS=$ac_check_lib_save_LIBS
10023 fi
10024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wldap32_ldap_bind" >&5
10025 $as_echo "$ac_cv_lib_wldap32_ldap_bind" >&6; }
10026 if test "x$ac_cv_lib_wldap32_ldap_bind" = xyes; then :
10027   cat >>confdefs.h <<_ACEOF
10028 #define HAVE_LIBWLDAP32 1
10029 _ACEOF
10030
10031   LIBS="-lwldap32 $LIBS"
10032
10033 else
10034   as_fn_error $? "library 'wldap32' is required for LDAP" "$LINENO" 5
10035 fi
10036
10037     LDAP_LIBS_FE="-lwldap32"
10038     LDAP_LIBS_BE="-lwldap32"
10039   fi
10040   LIBS="$_LIBS"
10041 fi
10042
10043
10044
10045 # for contrib/sepgsql
10046 if test "$with_selinux" = yes; then
10047   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_compute_create_name in -lselinux" >&5
10048 $as_echo_n "checking for security_compute_create_name in -lselinux... " >&6; }
10049 if ${ac_cv_lib_selinux_security_compute_create_name+:} false; then :
10050   $as_echo_n "(cached) " >&6
10051 else
10052   ac_check_lib_save_LIBS=$LIBS
10053 LIBS="-lselinux  $LIBS"
10054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10055 /* end confdefs.h.  */
10056
10057 /* Override any GCC internal prototype to avoid an error.
10058    Use char because int might match the return type of a GCC
10059    builtin and then its argument prototype would still apply.  */
10060 #ifdef __cplusplus
10061 extern "C"
10062 #endif
10063 char security_compute_create_name ();
10064 int
10065 main ()
10066 {
10067 return security_compute_create_name ();
10068   ;
10069   return 0;
10070 }
10071 _ACEOF
10072 if ac_fn_c_try_link "$LINENO"; then :
10073   ac_cv_lib_selinux_security_compute_create_name=yes
10074 else
10075   ac_cv_lib_selinux_security_compute_create_name=no
10076 fi
10077 rm -f core conftest.err conftest.$ac_objext \
10078     conftest$ac_exeext conftest.$ac_ext
10079 LIBS=$ac_check_lib_save_LIBS
10080 fi
10081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_compute_create_name" >&5
10082 $as_echo "$ac_cv_lib_selinux_security_compute_create_name" >&6; }
10083 if test "x$ac_cv_lib_selinux_security_compute_create_name" = xyes; then :
10084   cat >>confdefs.h <<_ACEOF
10085 #define HAVE_LIBSELINUX 1
10086 _ACEOF
10087
10088   LIBS="-lselinux $LIBS"
10089
10090 else
10091   as_fn_error $? "library 'libselinux', version 2.1.10 or newer, is required for SELinux support" "$LINENO" 5
10092 fi
10093
10094 fi
10095
10096 # for contrib/uuid-ossp
10097 if test "$with_uuid" = bsd ; then
10098   # On BSD, the UUID functions are in libc
10099   ac_fn_c_check_func "$LINENO" "uuid_to_string" "ac_cv_func_uuid_to_string"
10100 if test "x$ac_cv_func_uuid_to_string" = xyes; then :
10101   UUID_LIBS=""
10102 else
10103   as_fn_error $? "BSD UUID functions are not present" "$LINENO" 5
10104 fi
10105
10106 elif test "$with_uuid" = e2fs ; then
10107   # On macOS, the UUID functions are in libc
10108   ac_fn_c_check_func "$LINENO" "uuid_generate" "ac_cv_func_uuid_generate"
10109 if test "x$ac_cv_func_uuid_generate" = xyes; then :
10110   UUID_LIBS=""
10111 else
10112   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5
10113 $as_echo_n "checking for uuid_generate in -luuid... " >&6; }
10114 if ${ac_cv_lib_uuid_uuid_generate+:} false; then :
10115   $as_echo_n "(cached) " >&6
10116 else
10117   ac_check_lib_save_LIBS=$LIBS
10118 LIBS="-luuid  $LIBS"
10119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10120 /* end confdefs.h.  */
10121
10122 /* Override any GCC internal prototype to avoid an error.
10123    Use char because int might match the return type of a GCC
10124    builtin and then its argument prototype would still apply.  */
10125 #ifdef __cplusplus
10126 extern "C"
10127 #endif
10128 char uuid_generate ();
10129 int
10130 main ()
10131 {
10132 return uuid_generate ();
10133   ;
10134   return 0;
10135 }
10136 _ACEOF
10137 if ac_fn_c_try_link "$LINENO"; then :
10138   ac_cv_lib_uuid_uuid_generate=yes
10139 else
10140   ac_cv_lib_uuid_uuid_generate=no
10141 fi
10142 rm -f core conftest.err conftest.$ac_objext \
10143     conftest$ac_exeext conftest.$ac_ext
10144 LIBS=$ac_check_lib_save_LIBS
10145 fi
10146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate" >&5
10147 $as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; }
10148 if test "x$ac_cv_lib_uuid_uuid_generate" = xyes; then :
10149   UUID_LIBS="-luuid"
10150 else
10151   as_fn_error $? "library 'uuid' is required for E2FS UUID" "$LINENO" 5
10152 fi
10153
10154 fi
10155
10156 elif test "$with_uuid" = ossp ; then
10157   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -lossp-uuid" >&5
10158 $as_echo_n "checking for uuid_export in -lossp-uuid... " >&6; }
10159 if ${ac_cv_lib_ossp_uuid_uuid_export+:} false; then :
10160   $as_echo_n "(cached) " >&6
10161 else
10162   ac_check_lib_save_LIBS=$LIBS
10163 LIBS="-lossp-uuid  $LIBS"
10164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10165 /* end confdefs.h.  */
10166
10167 /* Override any GCC internal prototype to avoid an error.
10168    Use char because int might match the return type of a GCC
10169    builtin and then its argument prototype would still apply.  */
10170 #ifdef __cplusplus
10171 extern "C"
10172 #endif
10173 char uuid_export ();
10174 int
10175 main ()
10176 {
10177 return uuid_export ();
10178   ;
10179   return 0;
10180 }
10181 _ACEOF
10182 if ac_fn_c_try_link "$LINENO"; then :
10183   ac_cv_lib_ossp_uuid_uuid_export=yes
10184 else
10185   ac_cv_lib_ossp_uuid_uuid_export=no
10186 fi
10187 rm -f core conftest.err conftest.$ac_objext \
10188     conftest$ac_exeext conftest.$ac_ext
10189 LIBS=$ac_check_lib_save_LIBS
10190 fi
10191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossp_uuid_uuid_export" >&5
10192 $as_echo "$ac_cv_lib_ossp_uuid_uuid_export" >&6; }
10193 if test "x$ac_cv_lib_ossp_uuid_uuid_export" = xyes; then :
10194   UUID_LIBS="-lossp-uuid"
10195 else
10196   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -luuid" >&5
10197 $as_echo_n "checking for uuid_export in -luuid... " >&6; }
10198 if ${ac_cv_lib_uuid_uuid_export+:} false; then :
10199   $as_echo_n "(cached) " >&6
10200 else
10201   ac_check_lib_save_LIBS=$LIBS
10202 LIBS="-luuid  $LIBS"
10203 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10204 /* end confdefs.h.  */
10205
10206 /* Override any GCC internal prototype to avoid an error.
10207    Use char because int might match the return type of a GCC
10208    builtin and then its argument prototype would still apply.  */
10209 #ifdef __cplusplus
10210 extern "C"
10211 #endif
10212 char uuid_export ();
10213 int
10214 main ()
10215 {
10216 return uuid_export ();
10217   ;
10218   return 0;
10219 }
10220 _ACEOF
10221 if ac_fn_c_try_link "$LINENO"; then :
10222   ac_cv_lib_uuid_uuid_export=yes
10223 else
10224   ac_cv_lib_uuid_uuid_export=no
10225 fi
10226 rm -f core conftest.err conftest.$ac_objext \
10227     conftest$ac_exeext conftest.$ac_ext
10228 LIBS=$ac_check_lib_save_LIBS
10229 fi
10230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_export" >&5
10231 $as_echo "$ac_cv_lib_uuid_uuid_export" >&6; }
10232 if test "x$ac_cv_lib_uuid_uuid_export" = xyes; then :
10233   UUID_LIBS="-luuid"
10234 else
10235   as_fn_error $? "library 'ossp-uuid' or 'uuid' is required for OSSP UUID" "$LINENO" 5
10236 fi
10237
10238 fi
10239
10240 fi
10241
10242
10243
10244 ##
10245 ## Header files
10246 ##
10247
10248 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/epoll.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
10249 do :
10250   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10251 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
10252 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
10253   cat >>confdefs.h <<_ACEOF
10254 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10255 _ACEOF
10256
10257 fi
10258
10259 done
10260
10261
10262 # On BSD, test for net/if.h will fail unless sys/socket.h
10263 # is included first.
10264 for ac_header in net/if.h
10265 do :
10266   ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
10267 #ifdef HAVE_SYS_SOCKET_H
10268 #include <sys/socket.h>
10269 #endif
10270
10271 "
10272 if test "x$ac_cv_header_net_if_h" = xyes; then :
10273   cat >>confdefs.h <<_ACEOF
10274 #define HAVE_NET_IF_H 1
10275 _ACEOF
10276
10277 fi
10278
10279 done
10280
10281
10282 # On OpenBSD, test for sys/ucred.h will fail unless sys/param.h
10283 # is included first.
10284 for ac_header in sys/ucred.h
10285 do :
10286   ac_fn_c_check_header_compile "$LINENO" "sys/ucred.h" "ac_cv_header_sys_ucred_h" "$ac_includes_default
10287 #include <sys/param.h>
10288
10289 "
10290 if test "x$ac_cv_header_sys_ucred_h" = xyes; then :
10291   cat >>confdefs.h <<_ACEOF
10292 #define HAVE_SYS_UCRED_H 1
10293 _ACEOF
10294
10295 fi
10296
10297 done
10298
10299
10300 # At least on IRIX, test for netinet/tcp.h will fail unless
10301 # netinet/in.h is included first.
10302 for ac_header in netinet/in.h
10303 do :
10304   ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
10305 if test "x$ac_cv_header_netinet_in_h" = xyes; then :
10306   cat >>confdefs.h <<_ACEOF
10307 #define HAVE_NETINET_IN_H 1
10308 _ACEOF
10309
10310 fi
10311
10312 done
10313
10314 for ac_header in netinet/tcp.h
10315 do :
10316   ac_fn_c_check_header_compile "$LINENO" "netinet/tcp.h" "ac_cv_header_netinet_tcp_h" "$ac_includes_default
10317 #ifdef HAVE_NETINET_IN_H
10318 #include <netinet/in.h>
10319 #endif
10320
10321 "
10322 if test "x$ac_cv_header_netinet_tcp_h" = xyes; then :
10323   cat >>confdefs.h <<_ACEOF
10324 #define HAVE_NETINET_TCP_H 1
10325 _ACEOF
10326
10327 fi
10328
10329 done
10330
10331
10332 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
10333   for ac_header in readline/readline.h
10334 do :
10335   ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
10336 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
10337   cat >>confdefs.h <<_ACEOF
10338 #define HAVE_READLINE_READLINE_H 1
10339 _ACEOF
10340
10341 else
10342   for ac_header in readline.h
10343 do :
10344   ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
10345 if test "x$ac_cv_header_readline_h" = xyes; then :
10346   cat >>confdefs.h <<_ACEOF
10347 #define HAVE_READLINE_H 1
10348 _ACEOF
10349
10350 else
10351   as_fn_error $? "readline header not found
10352 If you have readline already installed, see config.log for details on the
10353 failure.  It is possible the compiler isn't looking in the proper directory.
10354 Use --without-readline to disable readline support." "$LINENO" 5
10355 fi
10356
10357 done
10358
10359 fi
10360
10361 done
10362
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 else
10372   for ac_header in history.h
10373 do :
10374   ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
10375 if test "x$ac_cv_header_history_h" = xyes; then :
10376   cat >>confdefs.h <<_ACEOF
10377 #define HAVE_HISTORY_H 1
10378 _ACEOF
10379
10380 else
10381   as_fn_error $? "history header not found
10382 If you have readline already installed, see config.log for details on the
10383 failure.  It is possible the compiler isn't looking in the proper directory.
10384 Use --without-readline to disable readline support." "$LINENO" 5
10385 fi
10386
10387 done
10388
10389 fi
10390
10391 done
10392
10393 fi
10394
10395 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
10396 # Some installations of libedit usurp /usr/include/readline/, which seems
10397 # bad practice, since in combined installations readline will have its headers
10398 # there.  We might have to resort to AC_EGREP checks to make sure we found
10399 # the proper header...
10400   for ac_header in editline/readline.h
10401 do :
10402   ac_fn_c_check_header_mongrel "$LINENO" "editline/readline.h" "ac_cv_header_editline_readline_h" "$ac_includes_default"
10403 if test "x$ac_cv_header_editline_readline_h" = xyes; then :
10404   cat >>confdefs.h <<_ACEOF
10405 #define HAVE_EDITLINE_READLINE_H 1
10406 _ACEOF
10407
10408 else
10409   for ac_header in readline.h
10410 do :
10411   ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
10412 if test "x$ac_cv_header_readline_h" = xyes; then :
10413   cat >>confdefs.h <<_ACEOF
10414 #define HAVE_READLINE_H 1
10415 _ACEOF
10416
10417 else
10418   for ac_header in readline/readline.h
10419 do :
10420   ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
10421 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
10422   cat >>confdefs.h <<_ACEOF
10423 #define HAVE_READLINE_READLINE_H 1
10424 _ACEOF
10425
10426 else
10427   as_fn_error $? "readline header not found
10428 If you have libedit already installed, see config.log for details on the
10429 failure.  It is possible the compiler isn't looking in the proper directory.
10430 Use --without-readline to disable libedit support." "$LINENO" 5
10431 fi
10432
10433 done
10434
10435 fi
10436
10437 done
10438
10439 fi
10440
10441 done
10442
10443 # Note: in a libedit installation, history.h is sometimes a dummy, and may
10444 # not be there at all.  Hence, don't complain if not found.  We must check
10445 # though, since in yet other versions it is an independent header.
10446   for ac_header in editline/history.h
10447 do :
10448   ac_fn_c_check_header_mongrel "$LINENO" "editline/history.h" "ac_cv_header_editline_history_h" "$ac_includes_default"
10449 if test "x$ac_cv_header_editline_history_h" = xyes; then :
10450   cat >>confdefs.h <<_ACEOF
10451 #define HAVE_EDITLINE_HISTORY_H 1
10452 _ACEOF
10453
10454 else
10455   for ac_header in history.h
10456 do :
10457   ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
10458 if test "x$ac_cv_header_history_h" = xyes; then :
10459   cat >>confdefs.h <<_ACEOF
10460 #define HAVE_HISTORY_H 1
10461 _ACEOF
10462
10463 else
10464   for ac_header in readline/history.h
10465 do :
10466   ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
10467 if test "x$ac_cv_header_readline_history_h" = xyes; then :
10468   cat >>confdefs.h <<_ACEOF
10469 #define HAVE_READLINE_HISTORY_H 1
10470 _ACEOF
10471
10472 fi
10473
10474 done
10475
10476 fi
10477
10478 done
10479
10480 fi
10481
10482 done
10483
10484 fi
10485
10486 if test "$with_zlib" = yes; then
10487   ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
10488 if test "x$ac_cv_header_zlib_h" = xyes; then :
10489
10490 else
10491   as_fn_error $? "zlib header not found
10492 If you have zlib already installed, see config.log for details on the
10493 failure.  It is possible the compiler isn't looking in the proper directory.
10494 Use --without-zlib to disable zlib support." "$LINENO" 5
10495 fi
10496
10497
10498 fi
10499
10500 if test "$with_gssapi" = yes ; then
10501   for ac_header in gssapi/gssapi.h
10502 do :
10503   ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi.h" "ac_cv_header_gssapi_gssapi_h" "$ac_includes_default"
10504 if test "x$ac_cv_header_gssapi_gssapi_h" = xyes; then :
10505   cat >>confdefs.h <<_ACEOF
10506 #define HAVE_GSSAPI_GSSAPI_H 1
10507 _ACEOF
10508
10509 else
10510   for ac_header in gssapi.h
10511 do :
10512   ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
10513 if test "x$ac_cv_header_gssapi_h" = xyes; then :
10514   cat >>confdefs.h <<_ACEOF
10515 #define HAVE_GSSAPI_H 1
10516 _ACEOF
10517
10518 else
10519   as_fn_error $? "gssapi.h header file is required for GSSAPI" "$LINENO" 5
10520 fi
10521
10522 done
10523
10524 fi
10525
10526 done
10527
10528 fi
10529
10530 if test "$with_openssl" = yes ; then
10531   ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
10532 if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
10533
10534 else
10535   as_fn_error $? "header file <openssl/ssl.h> is required for OpenSSL" "$LINENO" 5
10536 fi
10537
10538
10539   ac_fn_c_check_header_mongrel "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default"
10540 if test "x$ac_cv_header_openssl_err_h" = xyes; then :
10541
10542 else
10543   as_fn_error $? "header file <openssl/err.h> is required for OpenSSL" "$LINENO" 5
10544 fi
10545
10546
10547 fi
10548
10549 if test "$with_pam" = yes ; then
10550   for ac_header in security/pam_appl.h
10551 do :
10552   ac_fn_c_check_header_mongrel "$LINENO" "security/pam_appl.h" "ac_cv_header_security_pam_appl_h" "$ac_includes_default"
10553 if test "x$ac_cv_header_security_pam_appl_h" = xyes; then :
10554   cat >>confdefs.h <<_ACEOF
10555 #define HAVE_SECURITY_PAM_APPL_H 1
10556 _ACEOF
10557
10558 else
10559   for ac_header in pam/pam_appl.h
10560 do :
10561   ac_fn_c_check_header_mongrel "$LINENO" "pam/pam_appl.h" "ac_cv_header_pam_pam_appl_h" "$ac_includes_default"
10562 if test "x$ac_cv_header_pam_pam_appl_h" = xyes; then :
10563   cat >>confdefs.h <<_ACEOF
10564 #define HAVE_PAM_PAM_APPL_H 1
10565 _ACEOF
10566
10567 else
10568   as_fn_error $? "header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." "$LINENO" 5
10569 fi
10570
10571 done
10572
10573 fi
10574
10575 done
10576
10577 fi
10578
10579 if test "$with_bsd_auth" = yes ; then
10580   ac_fn_c_check_header_mongrel "$LINENO" "bsd_auth.h" "ac_cv_header_bsd_auth_h" "$ac_includes_default"
10581 if test "x$ac_cv_header_bsd_auth_h" = xyes; then :
10582
10583 else
10584   as_fn_error $? "header file <bsd_auth.h> is required for BSD Authentication support" "$LINENO" 5
10585 fi
10586
10587
10588 fi
10589
10590 if test "$with_systemd" = yes ; then
10591   ac_fn_c_check_header_mongrel "$LINENO" "systemd/sd-daemon.h" "ac_cv_header_systemd_sd_daemon_h" "$ac_includes_default"
10592 if test "x$ac_cv_header_systemd_sd_daemon_h" = xyes; then :
10593
10594 else
10595   as_fn_error $? "header file <systemd/sd-daemon.h> is required for systemd support" "$LINENO" 5
10596 fi
10597
10598
10599 fi
10600
10601 if test "$with_libxml" = yes ; then
10602   ac_fn_c_check_header_mongrel "$LINENO" "libxml/parser.h" "ac_cv_header_libxml_parser_h" "$ac_includes_default"
10603 if test "x$ac_cv_header_libxml_parser_h" = xyes; then :
10604
10605 else
10606   as_fn_error $? "header file <libxml/parser.h> is required for XML support" "$LINENO" 5
10607 fi
10608
10609
10610 fi
10611
10612 if test "$with_libxslt" = yes ; then
10613   ac_fn_c_check_header_mongrel "$LINENO" "libxslt/xslt.h" "ac_cv_header_libxslt_xslt_h" "$ac_includes_default"
10614 if test "x$ac_cv_header_libxslt_xslt_h" = xyes; then :
10615
10616 else
10617   as_fn_error $? "header file <libxslt/xslt.h> is required for XSLT support" "$LINENO" 5
10618 fi
10619
10620
10621 fi
10622
10623 if test "$with_ldap" = yes ; then
10624   if test "$PORTNAME" != "win32"; then
10625      for ac_header in ldap.h
10626 do :
10627   ac_fn_c_check_header_mongrel "$LINENO" "ldap.h" "ac_cv_header_ldap_h" "$ac_includes_default"
10628 if test "x$ac_cv_header_ldap_h" = xyes; then :
10629   cat >>confdefs.h <<_ACEOF
10630 #define HAVE_LDAP_H 1
10631 _ACEOF
10632
10633 else
10634   as_fn_error $? "header file <ldap.h> is required for LDAP" "$LINENO" 5
10635 fi
10636
10637 done
10638
10639      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compatible LDAP implementation" >&5
10640 $as_echo_n "checking for compatible LDAP implementation... " >&6; }
10641 if ${pgac_cv_ldap_safe+:} false; then :
10642   $as_echo_n "(cached) " >&6
10643 else
10644   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10645 /* end confdefs.h.  */
10646 #include <ldap.h>
10647 #if !defined(LDAP_VENDOR_VERSION) || \
10648      (defined(LDAP_API_FEATURE_X_OPENLDAP) && \
10649       LDAP_VENDOR_VERSION >= 20424 && LDAP_VENDOR_VERSION <= 20431)
10650 choke me
10651 #endif
10652 int
10653 main ()
10654 {
10655
10656   ;
10657   return 0;
10658 }
10659 _ACEOF
10660 if ac_fn_c_try_compile "$LINENO"; then :
10661   pgac_cv_ldap_safe=yes
10662 else
10663   pgac_cv_ldap_safe=no
10664 fi
10665 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10666 fi
10667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_ldap_safe" >&5
10668 $as_echo "$pgac_cv_ldap_safe" >&6; }
10669
10670 if test "$pgac_cv_ldap_safe" != yes; then
10671   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
10672 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
10673 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
10674 *** also uses LDAP will crash on exit." >&5
10675 $as_echo "$as_me: WARNING:
10676 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
10677 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
10678 *** also uses LDAP will crash on exit." >&2;}
10679 fi
10680   else
10681      for ac_header in winldap.h
10682 do :
10683   ac_fn_c_check_header_compile "$LINENO" "winldap.h" "ac_cv_header_winldap_h" "$ac_includes_default
10684 #include <windows.h>
10685
10686 "
10687 if test "x$ac_cv_header_winldap_h" = xyes; then :
10688   cat >>confdefs.h <<_ACEOF
10689 #define HAVE_WINLDAP_H 1
10690 _ACEOF
10691
10692 else
10693   as_fn_error $? "header file <winldap.h> is required for LDAP" "$LINENO" 5
10694 fi
10695
10696 done
10697
10698   fi
10699 fi
10700
10701 if test "$with_bonjour" = yes ; then
10702   ac_fn_c_check_header_mongrel "$LINENO" "dns_sd.h" "ac_cv_header_dns_sd_h" "$ac_includes_default"
10703 if test "x$ac_cv_header_dns_sd_h" = xyes; then :
10704
10705 else
10706   as_fn_error $? "header file <dns_sd.h> is required for Bonjour" "$LINENO" 5
10707 fi
10708
10709
10710 fi
10711
10712 # for contrib/uuid-ossp
10713 if test "$with_uuid" = bsd ; then
10714   for ac_header in uuid.h
10715 do :
10716   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
10717 if test "x$ac_cv_header_uuid_h" = xyes; then :
10718   cat >>confdefs.h <<_ACEOF
10719 #define HAVE_UUID_H 1
10720 _ACEOF
10721  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10722 /* end confdefs.h.  */
10723 #include <uuid.h>
10724
10725 _ACEOF
10726 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10727   $EGREP "uuid_to_string" >/dev/null 2>&1; then :
10728
10729 else
10730   as_fn_error $? "header file <uuid.h> does not match BSD UUID library" "$LINENO" 5
10731 fi
10732 rm -f conftest*
10733
10734 else
10735   as_fn_error $? "header file <uuid.h> is required for BSD UUID" "$LINENO" 5
10736 fi
10737
10738 done
10739
10740 elif test "$with_uuid" = e2fs ; then
10741   for ac_header in uuid/uuid.h
10742 do :
10743   ac_fn_c_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
10744 if test "x$ac_cv_header_uuid_uuid_h" = xyes; then :
10745   cat >>confdefs.h <<_ACEOF
10746 #define HAVE_UUID_UUID_H 1
10747 _ACEOF
10748  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10749 /* end confdefs.h.  */
10750 #include <uuid/uuid.h>
10751
10752 _ACEOF
10753 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10754   $EGREP "uuid_generate" >/dev/null 2>&1; then :
10755
10756 else
10757   as_fn_error $? "header file <uuid/uuid.h> does not match E2FS UUID library" "$LINENO" 5
10758 fi
10759 rm -f conftest*
10760
10761 else
10762   for ac_header in uuid.h
10763 do :
10764   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
10765 if test "x$ac_cv_header_uuid_h" = xyes; then :
10766   cat >>confdefs.h <<_ACEOF
10767 #define HAVE_UUID_H 1
10768 _ACEOF
10769  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10770 /* end confdefs.h.  */
10771 #include <uuid.h>
10772
10773 _ACEOF
10774 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10775   $EGREP "uuid_generate" >/dev/null 2>&1; then :
10776
10777 else
10778   as_fn_error $? "header file <uuid.h> does not match E2FS UUID library" "$LINENO" 5
10779 fi
10780 rm -f conftest*
10781
10782 else
10783   as_fn_error $? "header file <uuid/uuid.h> or <uuid.h> is required for E2FS UUID" "$LINENO" 5
10784 fi
10785
10786 done
10787
10788 fi
10789
10790 done
10791
10792 elif test "$with_uuid" = ossp ; then
10793   for ac_header in ossp/uuid.h
10794 do :
10795   ac_fn_c_check_header_mongrel "$LINENO" "ossp/uuid.h" "ac_cv_header_ossp_uuid_h" "$ac_includes_default"
10796 if test "x$ac_cv_header_ossp_uuid_h" = xyes; then :
10797   cat >>confdefs.h <<_ACEOF
10798 #define HAVE_OSSP_UUID_H 1
10799 _ACEOF
10800  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10801 /* end confdefs.h.  */
10802 #include <ossp/uuid.h>
10803
10804 _ACEOF
10805 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10806   $EGREP "uuid_export" >/dev/null 2>&1; then :
10807
10808 else
10809   as_fn_error $? "header file <ossp/uuid.h> does not match OSSP UUID library" "$LINENO" 5
10810 fi
10811 rm -f conftest*
10812
10813 else
10814   for ac_header in uuid.h
10815 do :
10816   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
10817 if test "x$ac_cv_header_uuid_h" = xyes; then :
10818   cat >>confdefs.h <<_ACEOF
10819 #define HAVE_UUID_H 1
10820 _ACEOF
10821  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10822 /* end confdefs.h.  */
10823 #include <uuid.h>
10824
10825 _ACEOF
10826 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10827   $EGREP "uuid_export" >/dev/null 2>&1; then :
10828
10829 else
10830   as_fn_error $? "header file <uuid.h> does not match OSSP UUID library" "$LINENO" 5
10831 fi
10832 rm -f conftest*
10833
10834 else
10835   as_fn_error $? "header file <ossp/uuid.h> or <uuid.h> is required for OSSP UUID" "$LINENO" 5
10836 fi
10837
10838 done
10839
10840 fi
10841
10842 done
10843
10844 fi
10845
10846 if test "$PORTNAME" = "win32" ; then
10847    for ac_header in crtdefs.h
10848 do :
10849   ac_fn_c_check_header_mongrel "$LINENO" "crtdefs.h" "ac_cv_header_crtdefs_h" "$ac_includes_default"
10850 if test "x$ac_cv_header_crtdefs_h" = xyes; then :
10851   cat >>confdefs.h <<_ACEOF
10852 #define HAVE_CRTDEFS_H 1
10853 _ACEOF
10854
10855 fi
10856
10857 done
10858
10859 fi
10860
10861 ##
10862 ## Types, structures, compiler characteristics
10863 ##
10864
10865   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
10866 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
10867 if ${ac_cv_c_bigendian+:} false; then :
10868   $as_echo_n "(cached) " >&6
10869 else
10870   ac_cv_c_bigendian=unknown
10871     # See if we're dealing with a universal compiler.
10872     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10873 /* end confdefs.h.  */
10874 #ifndef __APPLE_CC__
10875                not a universal capable compiler
10876              #endif
10877              typedef int dummy;
10878
10879 _ACEOF
10880 if ac_fn_c_try_compile "$LINENO"; then :
10881
10882         # Check for potential -arch flags.  It is not universal unless
10883         # there are at least two -arch flags with different values.
10884         ac_arch=
10885         ac_prev=
10886         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
10887          if test -n "$ac_prev"; then
10888            case $ac_word in
10889              i?86 | x86_64 | ppc | ppc64)
10890                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
10891                  ac_arch=$ac_word
10892                else
10893                  ac_cv_c_bigendian=universal
10894                  break
10895                fi
10896                ;;
10897            esac
10898            ac_prev=
10899          elif test "x$ac_word" = "x-arch"; then
10900            ac_prev=arch
10901          fi
10902        done
10903 fi
10904 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10905     if test $ac_cv_c_bigendian = unknown; then
10906       # See if sys/param.h defines the BYTE_ORDER macro.
10907       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10908 /* end confdefs.h.  */
10909 #include <sys/types.h>
10910              #include <sys/param.h>
10911
10912 int
10913 main ()
10914 {
10915 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
10916                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
10917                      && LITTLE_ENDIAN)
10918               bogus endian macros
10919              #endif
10920
10921   ;
10922   return 0;
10923 }
10924 _ACEOF
10925 if ac_fn_c_try_compile "$LINENO"; then :
10926   # It does; now see whether it defined to BIG_ENDIAN or not.
10927          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10928 /* end confdefs.h.  */
10929 #include <sys/types.h>
10930                 #include <sys/param.h>
10931
10932 int
10933 main ()
10934 {
10935 #if BYTE_ORDER != BIG_ENDIAN
10936                  not big endian
10937                 #endif
10938
10939   ;
10940   return 0;
10941 }
10942 _ACEOF
10943 if ac_fn_c_try_compile "$LINENO"; then :
10944   ac_cv_c_bigendian=yes
10945 else
10946   ac_cv_c_bigendian=no
10947 fi
10948 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10949 fi
10950 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10951     fi
10952     if test $ac_cv_c_bigendian = unknown; then
10953       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
10954       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10955 /* end confdefs.h.  */
10956 #include <limits.h>
10957
10958 int
10959 main ()
10960 {
10961 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
10962               bogus endian macros
10963              #endif
10964
10965   ;
10966   return 0;
10967 }
10968 _ACEOF
10969 if ac_fn_c_try_compile "$LINENO"; then :
10970   # It does; now see whether it defined to _BIG_ENDIAN or not.
10971          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10972 /* end confdefs.h.  */
10973 #include <limits.h>
10974
10975 int
10976 main ()
10977 {
10978 #ifndef _BIG_ENDIAN
10979                  not big endian
10980                 #endif
10981
10982   ;
10983   return 0;
10984 }
10985 _ACEOF
10986 if ac_fn_c_try_compile "$LINENO"; then :
10987   ac_cv_c_bigendian=yes
10988 else
10989   ac_cv_c_bigendian=no
10990 fi
10991 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10992 fi
10993 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10994     fi
10995     if test $ac_cv_c_bigendian = unknown; then
10996       # Compile a test program.
10997       if test "$cross_compiling" = yes; then :
10998   # Try to guess by grepping values from an object file.
10999          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11000 /* end confdefs.h.  */
11001 short int ascii_mm[] =
11002                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
11003                 short int ascii_ii[] =
11004                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
11005                 int use_ascii (int i) {
11006                   return ascii_mm[i] + ascii_ii[i];
11007                 }
11008                 short int ebcdic_ii[] =
11009                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
11010                 short int ebcdic_mm[] =
11011                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
11012                 int use_ebcdic (int i) {
11013                   return ebcdic_mm[i] + ebcdic_ii[i];
11014                 }
11015                 extern int foo;
11016
11017 int
11018 main ()
11019 {
11020 return use_ascii (foo) == use_ebcdic (foo);
11021   ;
11022   return 0;
11023 }
11024 _ACEOF
11025 if ac_fn_c_try_compile "$LINENO"; then :
11026   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
11027               ac_cv_c_bigendian=yes
11028             fi
11029             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
11030               if test "$ac_cv_c_bigendian" = unknown; then
11031                 ac_cv_c_bigendian=no
11032               else
11033                 # finding both strings is unlikely to happen, but who knows?
11034                 ac_cv_c_bigendian=unknown
11035               fi
11036             fi
11037 fi
11038 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11039 else
11040   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11041 /* end confdefs.h.  */
11042 $ac_includes_default
11043 int
11044 main ()
11045 {
11046
11047              /* Are we little or big endian?  From Harbison&Steele.  */
11048              union
11049              {
11050                long int l;
11051                char c[sizeof (long int)];
11052              } u;
11053              u.l = 1;
11054              return u.c[sizeof (long int) - 1] == 1;
11055
11056   ;
11057   return 0;
11058 }
11059 _ACEOF
11060 if ac_fn_c_try_run "$LINENO"; then :
11061   ac_cv_c_bigendian=no
11062 else
11063   ac_cv_c_bigendian=yes
11064 fi
11065 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11066   conftest.$ac_objext conftest.beam conftest.$ac_ext
11067 fi
11068
11069     fi
11070 fi
11071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
11072 $as_echo "$ac_cv_c_bigendian" >&6; }
11073  case $ac_cv_c_bigendian in #(
11074    yes)
11075      $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
11076 ;; #(
11077    no)
11078       ;; #(
11079    universal)
11080
11081 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
11082
11083      ;; #(
11084    *)
11085      as_fn_error $? "unknown endianness
11086  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
11087  esac
11088
11089 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
11090 $as_echo_n "checking for inline... " >&6; }
11091 if ${ac_cv_c_inline+:} false; then :
11092   $as_echo_n "(cached) " >&6
11093 else
11094   ac_cv_c_inline=no
11095 for ac_kw in inline __inline__ __inline; do
11096   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11097 /* end confdefs.h.  */
11098 #ifndef __cplusplus
11099 typedef int foo_t;
11100 static $ac_kw foo_t static_foo () {return 0; }
11101 $ac_kw foo_t foo () {return 0; }
11102 #endif
11103
11104 _ACEOF
11105 if ac_fn_c_try_compile "$LINENO"; then :
11106   ac_cv_c_inline=$ac_kw
11107 fi
11108 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11109   test "$ac_cv_c_inline" != no && break
11110 done
11111
11112 fi
11113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
11114 $as_echo "$ac_cv_c_inline" >&6; }
11115
11116 case $ac_cv_c_inline in
11117   inline | yes) ;;
11118   *)
11119     case $ac_cv_c_inline in
11120       no) ac_val=;;
11121       *) ac_val=$ac_cv_c_inline;;
11122     esac
11123     cat >>confdefs.h <<_ACEOF
11124 #ifndef __cplusplus
11125 #define inline $ac_val
11126 #endif
11127 _ACEOF
11128     ;;
11129 esac
11130
11131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for printf format archetype" >&5
11132 $as_echo_n "checking for printf format archetype... " >&6; }
11133 if ${pgac_cv_printf_archetype+:} false; then :
11134   $as_echo_n "(cached) " >&6
11135 else
11136   ac_save_c_werror_flag=$ac_c_werror_flag
11137 ac_c_werror_flag=yes
11138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11139 /* end confdefs.h.  */
11140 extern int
11141 pgac_write(int ignore, const char *fmt,...)
11142 __attribute__((format(gnu_printf, 2, 3)));
11143 int
11144 main ()
11145 {
11146
11147   ;
11148   return 0;
11149 }
11150 _ACEOF
11151 if ac_fn_c_try_compile "$LINENO"; then :
11152   pgac_cv_printf_archetype=gnu_printf
11153 else
11154   pgac_cv_printf_archetype=printf
11155 fi
11156 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11157 ac_c_werror_flag=$ac_save_c_werror_flag
11158 fi
11159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_printf_archetype" >&5
11160 $as_echo "$pgac_cv_printf_archetype" >&6; }
11161
11162 cat >>confdefs.h <<_ACEOF
11163 #define PG_PRINTF_ATTRIBUTE $pgac_cv_printf_archetype
11164 _ACEOF
11165
11166
11167
11168   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array members" >&5
11169 $as_echo_n "checking for flexible array members... " >&6; }
11170 if ${ac_cv_c_flexmember+:} false; then :
11171   $as_echo_n "(cached) " >&6
11172 else
11173   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11174 /* end confdefs.h.  */
11175 #include <stdlib.h>
11176             #include <stdio.h>
11177             #include <stddef.h>
11178             struct s { int n; double d[]; };
11179 int
11180 main ()
11181 {
11182 int m = getchar ();
11183             struct s *p = malloc (offsetof (struct s, d)
11184                                   + m * sizeof (double));
11185             p->d[0] = 0.0;
11186             return p->d != (double *) NULL;
11187   ;
11188   return 0;
11189 }
11190 _ACEOF
11191 if ac_fn_c_try_compile "$LINENO"; then :
11192   ac_cv_c_flexmember=yes
11193 else
11194   ac_cv_c_flexmember=no
11195 fi
11196 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11197 fi
11198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
11199 $as_echo "$ac_cv_c_flexmember" >&6; }
11200   if test $ac_cv_c_flexmember = yes; then
11201
11202 $as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
11203
11204   else
11205     $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
11206
11207   fi
11208
11209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signed types" >&5
11210 $as_echo_n "checking for signed types... " >&6; }
11211 if ${pgac_cv_c_signed+:} false; then :
11212   $as_echo_n "(cached) " >&6
11213 else
11214   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11215 /* end confdefs.h.  */
11216
11217 int
11218 main ()
11219 {
11220 signed char c; signed short s; signed int i;
11221   ;
11222   return 0;
11223 }
11224 _ACEOF
11225 if ac_fn_c_try_compile "$LINENO"; then :
11226   pgac_cv_c_signed=yes
11227 else
11228   pgac_cv_c_signed=no
11229 fi
11230 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11231 fi
11232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_signed" >&5
11233 $as_echo "$pgac_cv_c_signed" >&6; }
11234 if test x"$pgac_cv_c_signed" = xno ; then
11235
11236 $as_echo "#define signed /**/" >>confdefs.h
11237
11238 fi
11239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __func__" >&5
11240 $as_echo_n "checking for __func__... " >&6; }
11241 if ${pgac_cv_funcname_func_support+:} false; then :
11242   $as_echo_n "(cached) " >&6
11243 else
11244   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11245 /* end confdefs.h.  */
11246 #include <stdio.h>
11247 int
11248 main ()
11249 {
11250 printf("%s\n", __func__);
11251   ;
11252   return 0;
11253 }
11254 _ACEOF
11255 if ac_fn_c_try_compile "$LINENO"; then :
11256   pgac_cv_funcname_func_support=yes
11257 else
11258   pgac_cv_funcname_func_support=no
11259 fi
11260 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11261 fi
11262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_func_support" >&5
11263 $as_echo "$pgac_cv_funcname_func_support" >&6; }
11264 if test x"$pgac_cv_funcname_func_support" = xyes ; then
11265
11266 $as_echo "#define HAVE_FUNCNAME__FUNC 1" >>confdefs.h
11267
11268 else
11269 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __FUNCTION__" >&5
11270 $as_echo_n "checking for __FUNCTION__... " >&6; }
11271 if ${pgac_cv_funcname_function_support+:} false; then :
11272   $as_echo_n "(cached) " >&6
11273 else
11274   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11275 /* end confdefs.h.  */
11276 #include <stdio.h>
11277 int
11278 main ()
11279 {
11280 printf("%s\n", __FUNCTION__);
11281   ;
11282   return 0;
11283 }
11284 _ACEOF
11285 if ac_fn_c_try_compile "$LINENO"; then :
11286   pgac_cv_funcname_function_support=yes
11287 else
11288   pgac_cv_funcname_function_support=no
11289 fi
11290 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11291 fi
11292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_function_support" >&5
11293 $as_echo "$pgac_cv_funcname_function_support" >&6; }
11294 if test x"$pgac_cv_funcname_function_support" = xyes ; then
11295
11296 $as_echo "#define HAVE_FUNCNAME__FUNCTION 1" >>confdefs.h
11297
11298 fi
11299 fi
11300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Static_assert" >&5
11301 $as_echo_n "checking for _Static_assert... " >&6; }
11302 if ${pgac_cv__static_assert+:} false; then :
11303   $as_echo_n "(cached) " >&6
11304 else
11305   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11306 /* end confdefs.h.  */
11307
11308 int
11309 main ()
11310 {
11311 ({ _Static_assert(1, "foo"); })
11312   ;
11313   return 0;
11314 }
11315 _ACEOF
11316 if ac_fn_c_try_link "$LINENO"; then :
11317   pgac_cv__static_assert=yes
11318 else
11319   pgac_cv__static_assert=no
11320 fi
11321 rm -f core conftest.err conftest.$ac_objext \
11322     conftest$ac_exeext conftest.$ac_ext
11323 fi
11324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__static_assert" >&5
11325 $as_echo "$pgac_cv__static_assert" >&6; }
11326 if test x"$pgac_cv__static_assert" = xyes ; then
11327
11328 $as_echo "#define HAVE__STATIC_ASSERT 1" >>confdefs.h
11329
11330 fi
11331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_types_compatible_p" >&5
11332 $as_echo_n "checking for __builtin_types_compatible_p... " >&6; }
11333 if ${pgac_cv__types_compatible+:} false; then :
11334   $as_echo_n "(cached) " >&6
11335 else
11336   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11337 /* end confdefs.h.  */
11338
11339 int
11340 main ()
11341 {
11342  int x; static int y[__builtin_types_compatible_p(__typeof__(x), int)];
11343   ;
11344   return 0;
11345 }
11346 _ACEOF
11347 if ac_fn_c_try_compile "$LINENO"; then :
11348   pgac_cv__types_compatible=yes
11349 else
11350   pgac_cv__types_compatible=no
11351 fi
11352 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11353 fi
11354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__types_compatible" >&5
11355 $as_echo "$pgac_cv__types_compatible" >&6; }
11356 if test x"$pgac_cv__types_compatible" = xyes ; then
11357
11358 $as_echo "#define HAVE__BUILTIN_TYPES_COMPATIBLE_P 1" >>confdefs.h
11359
11360 fi
11361 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap32" >&5
11362 $as_echo_n "checking for __builtin_bswap32... " >&6; }
11363 if ${pgac_cv__builtin_bswap32+:} false; then :
11364   $as_echo_n "(cached) " >&6
11365 else
11366   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11367 /* end confdefs.h.  */
11368 static unsigned long int x = __builtin_bswap32(0xaabbccdd);
11369
11370 _ACEOF
11371 if ac_fn_c_try_compile "$LINENO"; then :
11372   pgac_cv__builtin_bswap32=yes
11373 else
11374   pgac_cv__builtin_bswap32=no
11375 fi
11376 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11377 fi
11378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap32" >&5
11379 $as_echo "$pgac_cv__builtin_bswap32" >&6; }
11380 if test x"$pgac_cv__builtin_bswap32" = xyes ; then
11381
11382 $as_echo "#define HAVE__BUILTIN_BSWAP32 1" >>confdefs.h
11383
11384 fi
11385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap64" >&5
11386 $as_echo_n "checking for __builtin_bswap64... " >&6; }
11387 if ${pgac_cv__builtin_bswap64+:} false; then :
11388   $as_echo_n "(cached) " >&6
11389 else
11390   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11391 /* end confdefs.h.  */
11392 static unsigned long int x = __builtin_bswap64(0xaabbccddeeff0011);
11393
11394 _ACEOF
11395 if ac_fn_c_try_compile "$LINENO"; then :
11396   pgac_cv__builtin_bswap64=yes
11397 else
11398   pgac_cv__builtin_bswap64=no
11399 fi
11400 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11401 fi
11402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap64" >&5
11403 $as_echo "$pgac_cv__builtin_bswap64" >&6; }
11404 if test x"$pgac_cv__builtin_bswap64" = xyes ; then
11405
11406 $as_echo "#define HAVE__BUILTIN_BSWAP64 1" >>confdefs.h
11407
11408 fi
11409 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_constant_p" >&5
11410 $as_echo_n "checking for __builtin_constant_p... " >&6; }
11411 if ${pgac_cv__builtin_constant_p+:} false; then :
11412   $as_echo_n "(cached) " >&6
11413 else
11414   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11415 /* end confdefs.h.  */
11416 static int x; static int y[__builtin_constant_p(x) ? x : 1];
11417
11418 _ACEOF
11419 if ac_fn_c_try_compile "$LINENO"; then :
11420   pgac_cv__builtin_constant_p=yes
11421 else
11422   pgac_cv__builtin_constant_p=no
11423 fi
11424 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11425 fi
11426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_constant_p" >&5
11427 $as_echo "$pgac_cv__builtin_constant_p" >&6; }
11428 if test x"$pgac_cv__builtin_constant_p" = xyes ; then
11429
11430 $as_echo "#define HAVE__BUILTIN_CONSTANT_P 1" >>confdefs.h
11431
11432 fi
11433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unreachable" >&5
11434 $as_echo_n "checking for __builtin_unreachable... " >&6; }
11435 if ${pgac_cv__builtin_unreachable+:} false; then :
11436   $as_echo_n "(cached) " >&6
11437 else
11438   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11439 /* end confdefs.h.  */
11440
11441 int
11442 main ()
11443 {
11444 __builtin_unreachable();
11445   ;
11446   return 0;
11447 }
11448 _ACEOF
11449 if ac_fn_c_try_link "$LINENO"; then :
11450   pgac_cv__builtin_unreachable=yes
11451 else
11452   pgac_cv__builtin_unreachable=no
11453 fi
11454 rm -f core conftest.err conftest.$ac_objext \
11455     conftest$ac_exeext conftest.$ac_ext
11456 fi
11457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_unreachable" >&5
11458 $as_echo "$pgac_cv__builtin_unreachable" >&6; }
11459 if test x"$pgac_cv__builtin_unreachable" = xyes ; then
11460
11461 $as_echo "#define HAVE__BUILTIN_UNREACHABLE 1" >>confdefs.h
11462
11463 fi
11464 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __VA_ARGS__" >&5
11465 $as_echo_n "checking for __VA_ARGS__... " >&6; }
11466 if ${pgac_cv__va_args+:} false; then :
11467   $as_echo_n "(cached) " >&6
11468 else
11469   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11470 /* end confdefs.h.  */
11471 #include <stdio.h>
11472 int
11473 main ()
11474 {
11475 #define debug(...) fprintf(stderr, __VA_ARGS__)
11476 debug("%s", "blarg");
11477
11478   ;
11479   return 0;
11480 }
11481 _ACEOF
11482 if ac_fn_c_try_compile "$LINENO"; then :
11483   pgac_cv__va_args=yes
11484 else
11485   pgac_cv__va_args=no
11486 fi
11487 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11488 fi
11489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__va_args" >&5
11490 $as_echo "$pgac_cv__va_args" >&6; }
11491 if test x"$pgac_cv__va_args" = xyes ; then
11492
11493 $as_echo "#define HAVE__VA_ARGS 1" >>confdefs.h
11494
11495 fi
11496 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
11497 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
11498 if ${ac_cv_struct_tm+:} false; then :
11499   $as_echo_n "(cached) " >&6
11500 else
11501   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11502 /* end confdefs.h.  */
11503 #include <sys/types.h>
11504 #include <time.h>
11505
11506 int
11507 main ()
11508 {
11509 struct tm tm;
11510                                      int *p = &tm.tm_sec;
11511                                      return !p;
11512   ;
11513   return 0;
11514 }
11515 _ACEOF
11516 if ac_fn_c_try_compile "$LINENO"; then :
11517   ac_cv_struct_tm=time.h
11518 else
11519   ac_cv_struct_tm=sys/time.h
11520 fi
11521 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11522 fi
11523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
11524 $as_echo "$ac_cv_struct_tm" >&6; }
11525 if test $ac_cv_struct_tm = sys/time.h; then
11526
11527 $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
11528
11529 fi
11530
11531 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
11532 #include <$ac_cv_struct_tm>
11533
11534 "
11535 if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
11536
11537 cat >>confdefs.h <<_ACEOF
11538 #define HAVE_STRUCT_TM_TM_ZONE 1
11539 _ACEOF
11540
11541
11542 fi
11543
11544 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11545
11546 $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
11547
11548 fi
11549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11550 $as_echo_n "checking for tzname... " >&6; }
11551 if ${ac_cv_var_tzname+:} false; then :
11552   $as_echo_n "(cached) " >&6
11553 else
11554   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11555 /* end confdefs.h.  */
11556 #include <stdlib.h>
11557 #include <time.h>
11558 #ifndef tzname /* For SGI.  */
11559 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
11560 #endif
11561
11562 int
11563 main ()
11564 {
11565 atoi(*tzname);
11566   ;
11567   return 0;
11568 }
11569 _ACEOF
11570 if ac_fn_c_try_link "$LINENO"; then :
11571   ac_cv_var_tzname=yes
11572 else
11573   ac_cv_var_tzname=no
11574 fi
11575 rm -f core conftest.err conftest.$ac_objext \
11576     conftest$ac_exeext conftest.$ac_ext
11577 fi
11578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11579 $as_echo "$ac_cv_var_tzname" >&6; }
11580 if test $ac_cv_var_tzname = yes; then
11581
11582 $as_echo "#define HAVE_TZNAME 1" >>confdefs.h
11583
11584 fi
11585
11586 ac_fn_c_check_type "$LINENO" "union semun" "ac_cv_type_union_semun" "#include <sys/types.h>
11587 #include <sys/ipc.h>
11588 #include <sys/sem.h>
11589 "
11590 if test "x$ac_cv_type_union_semun" = xyes; then :
11591
11592 cat >>confdefs.h <<_ACEOF
11593 #define HAVE_UNION_SEMUN 1
11594 _ACEOF
11595
11596
11597 fi
11598
11599 ac_fn_c_check_type "$LINENO" "struct sockaddr_un" "ac_cv_type_struct_sockaddr_un" "#include <sys/types.h>
11600 #ifdef HAVE_SYS_UN_H
11601 #include <sys/un.h>
11602 #endif
11603
11604 "
11605 if test "x$ac_cv_type_struct_sockaddr_un" = xyes; then :
11606
11607 $as_echo "#define HAVE_UNIX_SOCKETS 1" >>confdefs.h
11608
11609 fi
11610
11611 ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "#include <sys/types.h>
11612 #ifdef HAVE_SYS_SOCKET_H
11613 #include <sys/socket.h>
11614 #endif
11615
11616 "
11617 if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
11618
11619 cat >>confdefs.h <<_ACEOF
11620 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
11621 _ACEOF
11622
11623
11624 fi
11625
11626 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
11627 #ifdef HAVE_SYS_SOCKET_H
11628 #include <sys/socket.h>
11629 #endif
11630
11631 "
11632 if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then :
11633
11634 cat >>confdefs.h <<_ACEOF
11635 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
11636 _ACEOF
11637
11638
11639 fi
11640 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_family" "ac_cv_member_struct_sockaddr_storage___ss_family" "#include <sys/types.h>
11641 #ifdef HAVE_SYS_SOCKET_H
11642 #include <sys/socket.h>
11643 #endif
11644
11645 "
11646 if test "x$ac_cv_member_struct_sockaddr_storage___ss_family" = xyes; then :
11647
11648 cat >>confdefs.h <<_ACEOF
11649 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1
11650 _ACEOF
11651
11652
11653 fi
11654 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_len" "ac_cv_member_struct_sockaddr_storage_ss_len" "#include <sys/types.h>
11655 #ifdef HAVE_SYS_SOCKET_H
11656 #include <sys/socket.h>
11657 #endif
11658
11659 "
11660 if test "x$ac_cv_member_struct_sockaddr_storage_ss_len" = xyes; then :
11661
11662 cat >>confdefs.h <<_ACEOF
11663 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1
11664 _ACEOF
11665
11666
11667 fi
11668 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_len" "ac_cv_member_struct_sockaddr_storage___ss_len" "#include <sys/types.h>
11669 #ifdef HAVE_SYS_SOCKET_H
11670 #include <sys/socket.h>
11671 #endif
11672
11673 "
11674 if test "x$ac_cv_member_struct_sockaddr_storage___ss_len" = xyes; then :
11675
11676 cat >>confdefs.h <<_ACEOF
11677 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN 1
11678 _ACEOF
11679
11680
11681 fi
11682 ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/types.h>
11683 #ifdef HAVE_SYS_SOCKET_H
11684 #include <sys/socket.h>
11685 #endif
11686
11687 "
11688 if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
11689
11690 cat >>confdefs.h <<_ACEOF
11691 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
11692 _ACEOF
11693
11694
11695 fi
11696
11697 ac_fn_c_check_type "$LINENO" "struct addrinfo" "ac_cv_type_struct_addrinfo" "#include <sys/types.h>
11698 #include <sys/socket.h>
11699 #include <netdb.h>
11700
11701 "
11702 if test "x$ac_cv_type_struct_addrinfo" = xyes; then :
11703
11704 cat >>confdefs.h <<_ACEOF
11705 #define HAVE_STRUCT_ADDRINFO 1
11706 _ACEOF
11707
11708
11709 fi
11710
11711
11712   ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
11713 if test "x$ac_cv_type_intptr_t" = xyes; then :
11714
11715 $as_echo "#define HAVE_INTPTR_T 1" >>confdefs.h
11716
11717 else
11718   for ac_type in 'int' 'long int' 'long long int'; do
11719        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11720 /* end confdefs.h.  */
11721 $ac_includes_default
11722 int
11723 main ()
11724 {
11725 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
11726 test_array [0] = 0;
11727 return test_array [0];
11728
11729   ;
11730   return 0;
11731 }
11732 _ACEOF
11733 if ac_fn_c_try_compile "$LINENO"; then :
11734
11735 cat >>confdefs.h <<_ACEOF
11736 #define intptr_t $ac_type
11737 _ACEOF
11738
11739           ac_type=
11740 fi
11741 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11742        test -z "$ac_type" && break
11743      done
11744 fi
11745
11746
11747
11748   ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
11749 if test "x$ac_cv_type_uintptr_t" = xyes; then :
11750
11751 $as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h
11752
11753 else
11754   for ac_type in 'unsigned int' 'unsigned long int' \
11755         'unsigned long long int'; do
11756        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11757 /* end confdefs.h.  */
11758 $ac_includes_default
11759 int
11760 main ()
11761 {
11762 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
11763 test_array [0] = 0;
11764 return test_array [0];
11765
11766   ;
11767   return 0;
11768 }
11769 _ACEOF
11770 if ac_fn_c_try_compile "$LINENO"; then :
11771
11772 cat >>confdefs.h <<_ACEOF
11773 #define uintptr_t $ac_type
11774 _ACEOF
11775
11776           ac_type=
11777 fi
11778 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11779        test -z "$ac_type" && break
11780      done
11781 fi
11782
11783
11784
11785   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
11786 $as_echo_n "checking for unsigned long long int... " >&6; }
11787 if ${ac_cv_type_unsigned_long_long_int+:} false; then :
11788   $as_echo_n "(cached) " >&6
11789 else
11790   ac_cv_type_unsigned_long_long_int=yes
11791      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
11792        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11793 /* end confdefs.h.  */
11794
11795   /* For now, do not test the preprocessor; as of 2007 there are too many
11796          implementations with broken preprocessors.  Perhaps this can
11797          be revisited in 2012.  In the meantime, code should not expect
11798          #if to work with literals wider than 32 bits.  */
11799       /* Test literals.  */
11800       long long int ll = 9223372036854775807ll;
11801       long long int nll = -9223372036854775807LL;
11802       unsigned long long int ull = 18446744073709551615ULL;
11803       /* Test constant expressions.   */
11804       typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
11805                      ? 1 : -1)];
11806       typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
11807                      ? 1 : -1)];
11808       int i = 63;
11809 int
11810 main ()
11811 {
11812 /* Test availability of runtime routines for shift and division.  */
11813       long long int llmax = 9223372036854775807ll;
11814       unsigned long long int ullmax = 18446744073709551615ull;
11815       return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
11816               | (llmax / ll) | (llmax % ll)
11817               | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
11818               | (ullmax / ull) | (ullmax % ull));
11819   ;
11820   return 0;
11821 }
11822
11823 _ACEOF
11824 if ac_fn_c_try_link "$LINENO"; then :
11825
11826 else
11827   ac_cv_type_unsigned_long_long_int=no
11828 fi
11829 rm -f core conftest.err conftest.$ac_objext \
11830     conftest$ac_exeext conftest.$ac_ext
11831      fi
11832 fi
11833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
11834 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
11835   if test $ac_cv_type_unsigned_long_long_int = yes; then
11836
11837 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
11838
11839   fi
11840
11841
11842
11843   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
11844 $as_echo_n "checking for long long int... " >&6; }
11845 if ${ac_cv_type_long_long_int+:} false; then :
11846   $as_echo_n "(cached) " >&6
11847 else
11848   ac_cv_type_long_long_int=yes
11849       if test "x${ac_cv_prog_cc_c99-no}" = xno; then
11850         ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
11851         if test $ac_cv_type_long_long_int = yes; then
11852                                   if test "$cross_compiling" = yes; then :
11853   :
11854 else
11855   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11856 /* end confdefs.h.  */
11857 #include <limits.h>
11858                  #ifndef LLONG_MAX
11859                  # define HALF \
11860                           (1LL << (sizeof (long long int) * CHAR_BIT - 2))
11861                  # define LLONG_MAX (HALF - 1 + HALF)
11862                  #endif
11863 int
11864 main ()
11865 {
11866 long long int n = 1;
11867                  int i;
11868                  for (i = 0; ; i++)
11869                    {
11870                      long long int m = n << i;
11871                      if (m >> i != n)
11872                        return 1;
11873                      if (LLONG_MAX / 2 < m)
11874                        break;
11875                    }
11876                  return 0;
11877   ;
11878   return 0;
11879 }
11880 _ACEOF
11881 if ac_fn_c_try_run "$LINENO"; then :
11882
11883 else
11884   ac_cv_type_long_long_int=no
11885 fi
11886 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11887   conftest.$ac_objext conftest.beam conftest.$ac_ext
11888 fi
11889
11890         fi
11891       fi
11892 fi
11893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
11894 $as_echo "$ac_cv_type_long_long_int" >&6; }
11895   if test $ac_cv_type_long_long_int = yes; then
11896
11897 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
11898
11899   fi
11900
11901
11902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for locale_t" >&5
11903 $as_echo_n "checking for locale_t... " >&6; }
11904 if ${pgac_cv_type_locale_t+:} false; then :
11905   $as_echo_n "(cached) " >&6
11906 else
11907   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11908 /* end confdefs.h.  */
11909 #include <locale.h>
11910 locale_t x;
11911 int
11912 main ()
11913 {
11914
11915   ;
11916   return 0;
11917 }
11918 _ACEOF
11919 if ac_fn_c_try_compile "$LINENO"; then :
11920   pgac_cv_type_locale_t=yes
11921 else
11922   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11923 /* end confdefs.h.  */
11924 #include <xlocale.h>
11925 locale_t x;
11926 int
11927 main ()
11928 {
11929
11930   ;
11931   return 0;
11932 }
11933 _ACEOF
11934 if ac_fn_c_try_compile "$LINENO"; then :
11935   pgac_cv_type_locale_t='yes (in xlocale.h)'
11936 else
11937   pgac_cv_type_locale_t=no
11938 fi
11939 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11940 fi
11941 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11942 fi
11943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_locale_t" >&5
11944 $as_echo "$pgac_cv_type_locale_t" >&6; }
11945 if test "$pgac_cv_type_locale_t" != no; then
11946
11947 $as_echo "#define HAVE_LOCALE_T 1" >>confdefs.h
11948
11949 fi
11950 if test "$pgac_cv_type_locale_t" = 'yes (in xlocale.h)'; then
11951
11952 $as_echo "#define LOCALE_T_IN_XLOCALE 1" >>confdefs.h
11953
11954 fi
11955
11956 ac_fn_c_check_type "$LINENO" "struct cmsgcred" "ac_cv_type_struct_cmsgcred" "#include <sys/socket.h>
11957 #include <sys/param.h>
11958 #ifdef HAVE_SYS_UCRED_H
11959 #include <sys/ucred.h>
11960 #endif
11961 "
11962 if test "x$ac_cv_type_struct_cmsgcred" = xyes; then :
11963
11964 cat >>confdefs.h <<_ACEOF
11965 #define HAVE_STRUCT_CMSGCRED 1
11966 _ACEOF
11967
11968
11969 fi
11970
11971
11972 ac_fn_c_check_type "$LINENO" "struct option" "ac_cv_type_struct_option" "#ifdef HAVE_GETOPT_H
11973 #include <getopt.h>
11974 #endif
11975 "
11976 if test "x$ac_cv_type_struct_option" = xyes; then :
11977
11978 cat >>confdefs.h <<_ACEOF
11979 #define HAVE_STRUCT_OPTION 1
11980 _ACEOF
11981
11982
11983 fi
11984
11985
11986 if test "$with_zlib" = yes; then
11987   # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
11988   # did not).  While we could work around the lack of z_streamp, it
11989   # seems unwise to encourage people to use such old zlib versions...
11990   ac_fn_c_check_type "$LINENO" "z_streamp" "ac_cv_type_z_streamp" "#include <zlib.h>
11991 "
11992 if test "x$ac_cv_type_z_streamp" = xyes; then :
11993
11994 else
11995   as_fn_error $? "zlib version is too old
11996 Use --without-zlib to disable zlib support." "$LINENO" 5
11997 fi
11998
11999 fi
12000
12001 # On PPC, check if assembler supports LWARX instruction's mutex hint bit
12002 case $host_cpu in
12003   ppc*|powerpc*)
12004     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports lwarx hint bit" >&5
12005 $as_echo_n "checking whether assembler supports lwarx hint bit... " >&6; }
12006     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12007 /* end confdefs.h.  */
12008
12009 int
12010 main ()
12011 {
12012 int a = 0; int *p = &a; int r;
12013          __asm__ __volatile__ (" lwarx %0,0,%1,1\n" : "=&r"(r) : "r"(p));
12014   ;
12015   return 0;
12016 }
12017 _ACEOF
12018 if ac_fn_c_try_compile "$LINENO"; then :
12019   pgac_cv_have_ppc_mutex_hint=yes
12020 else
12021   pgac_cv_have_ppc_mutex_hint=no
12022 fi
12023 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12024     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_ppc_mutex_hint" >&5
12025 $as_echo "$pgac_cv_have_ppc_mutex_hint" >&6; }
12026     if test x"$pgac_cv_have_ppc_mutex_hint" = xyes ; then
12027
12028 $as_echo "#define HAVE_PPC_LWARX_MUTEX_HINT 1" >>confdefs.h
12029
12030     fi
12031   ;;
12032 esac
12033
12034 # Check largefile support.  You might think this is a system service not a
12035 # compiler characteristic, but you'd be wrong.  We must check this before
12036 # probing existence of related functions such as fseeko, since the largefile
12037 # defines can affect what is generated for that.
12038 if test "$PORTNAME" != "win32"; then
12039    # Check whether --enable-largefile was given.
12040 if test "${enable_largefile+set}" = set; then :
12041   enableval=$enable_largefile;
12042 fi
12043
12044 if test "$enable_largefile" != no; then
12045
12046   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
12047 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
12048 if ${ac_cv_sys_largefile_CC+:} false; then :
12049   $as_echo_n "(cached) " >&6
12050 else
12051   ac_cv_sys_largefile_CC=no
12052      if test "$GCC" != yes; then
12053        ac_save_CC=$CC
12054        while :; do
12055          # IRIX 6.2 and later do not support large files by default,
12056          # so use the C compiler's -n32 option if that helps.
12057          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12058 /* end confdefs.h.  */
12059 #include <sys/types.h>
12060  /* Check that off_t can represent 2**63 - 1 correctly.
12061     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12062     since some C++ compilers masquerading as C compilers
12063     incorrectly reject 9223372036854775807.  */
12064 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12065   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12066                        && LARGE_OFF_T % 2147483647 == 1)
12067                       ? 1 : -1];
12068 int
12069 main ()
12070 {
12071
12072   ;
12073   return 0;
12074 }
12075 _ACEOF
12076          if ac_fn_c_try_compile "$LINENO"; then :
12077   break
12078 fi
12079 rm -f core conftest.err conftest.$ac_objext
12080          CC="$CC -n32"
12081          if ac_fn_c_try_compile "$LINENO"; then :
12082   ac_cv_sys_largefile_CC=' -n32'; break
12083 fi
12084 rm -f core conftest.err conftest.$ac_objext
12085          break
12086        done
12087        CC=$ac_save_CC
12088        rm -f conftest.$ac_ext
12089     fi
12090 fi
12091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
12092 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
12093   if test "$ac_cv_sys_largefile_CC" != no; then
12094     CC=$CC$ac_cv_sys_largefile_CC
12095   fi
12096
12097   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
12098 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
12099 if ${ac_cv_sys_file_offset_bits+:} false; then :
12100   $as_echo_n "(cached) " >&6
12101 else
12102   while :; do
12103   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12104 /* end confdefs.h.  */
12105 #include <sys/types.h>
12106  /* Check that off_t can represent 2**63 - 1 correctly.
12107     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12108     since some C++ compilers masquerading as C compilers
12109     incorrectly reject 9223372036854775807.  */
12110 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12111   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12112                        && LARGE_OFF_T % 2147483647 == 1)
12113                       ? 1 : -1];
12114 int
12115 main ()
12116 {
12117
12118   ;
12119   return 0;
12120 }
12121 _ACEOF
12122 if ac_fn_c_try_compile "$LINENO"; then :
12123   ac_cv_sys_file_offset_bits=no; break
12124 fi
12125 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12126   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12127 /* end confdefs.h.  */
12128 #define _FILE_OFFSET_BITS 64
12129 #include <sys/types.h>
12130  /* Check that off_t can represent 2**63 - 1 correctly.
12131     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12132     since some C++ compilers masquerading as C compilers
12133     incorrectly reject 9223372036854775807.  */
12134 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12135   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12136                        && LARGE_OFF_T % 2147483647 == 1)
12137                       ? 1 : -1];
12138 int
12139 main ()
12140 {
12141
12142   ;
12143   return 0;
12144 }
12145 _ACEOF
12146 if ac_fn_c_try_compile "$LINENO"; then :
12147   ac_cv_sys_file_offset_bits=64; break
12148 fi
12149 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12150   ac_cv_sys_file_offset_bits=unknown
12151   break
12152 done
12153 fi
12154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
12155 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
12156 case $ac_cv_sys_file_offset_bits in #(
12157   no | unknown) ;;
12158   *)
12159 cat >>confdefs.h <<_ACEOF
12160 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
12161 _ACEOF
12162 ;;
12163 esac
12164 rm -rf conftest*
12165   if test $ac_cv_sys_file_offset_bits = unknown; then
12166     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
12167 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
12168 if ${ac_cv_sys_large_files+:} false; then :
12169   $as_echo_n "(cached) " >&6
12170 else
12171   while :; do
12172   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12173 /* end confdefs.h.  */
12174 #include <sys/types.h>
12175  /* Check that off_t can represent 2**63 - 1 correctly.
12176     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12177     since some C++ compilers masquerading as C compilers
12178     incorrectly reject 9223372036854775807.  */
12179 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12180   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12181                        && LARGE_OFF_T % 2147483647 == 1)
12182                       ? 1 : -1];
12183 int
12184 main ()
12185 {
12186
12187   ;
12188   return 0;
12189 }
12190 _ACEOF
12191 if ac_fn_c_try_compile "$LINENO"; then :
12192   ac_cv_sys_large_files=no; break
12193 fi
12194 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12195   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12196 /* end confdefs.h.  */
12197 #define _LARGE_FILES 1
12198 #include <sys/types.h>
12199  /* Check that off_t can represent 2**63 - 1 correctly.
12200     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12201     since some C++ compilers masquerading as C compilers
12202     incorrectly reject 9223372036854775807.  */
12203 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12204   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12205                        && LARGE_OFF_T % 2147483647 == 1)
12206                       ? 1 : -1];
12207 int
12208 main ()
12209 {
12210
12211   ;
12212   return 0;
12213 }
12214 _ACEOF
12215 if ac_fn_c_try_compile "$LINENO"; then :
12216   ac_cv_sys_large_files=1; break
12217 fi
12218 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12219   ac_cv_sys_large_files=unknown
12220   break
12221 done
12222 fi
12223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
12224 $as_echo "$ac_cv_sys_large_files" >&6; }
12225 case $ac_cv_sys_large_files in #(
12226   no | unknown) ;;
12227   *)
12228 cat >>confdefs.h <<_ACEOF
12229 #define _LARGE_FILES $ac_cv_sys_large_files
12230 _ACEOF
12231 ;;
12232 esac
12233 rm -rf conftest*
12234   fi
12235
12236
12237 fi
12238
12239
12240 fi
12241
12242 # Check for largefile support (must be after AC_SYS_LARGEFILE)
12243 # The cast to long int works around a bug in the HP C Compiler
12244 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12245 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12246 # This bug is HP SR number 8606223364.
12247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
12248 $as_echo_n "checking size of off_t... " >&6; }
12249 if ${ac_cv_sizeof_off_t+:} false; then :
12250   $as_echo_n "(cached) " >&6
12251 else
12252   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t"        "$ac_includes_default"; then :
12253
12254 else
12255   if test "$ac_cv_type_off_t" = yes; then
12256      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12257 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12258 as_fn_error 77 "cannot compute sizeof (off_t)
12259 See \`config.log' for more details" "$LINENO" 5; }
12260    else
12261      ac_cv_sizeof_off_t=0
12262    fi
12263 fi
12264
12265 fi
12266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
12267 $as_echo "$ac_cv_sizeof_off_t" >&6; }
12268
12269
12270
12271 cat >>confdefs.h <<_ACEOF
12272 #define SIZEOF_OFF_T $ac_cv_sizeof_off_t
12273 _ACEOF
12274
12275
12276
12277 # If we don't have largefile support, can't handle segsize >= 2GB.
12278 if test "$ac_cv_sizeof_off_t" -lt 8 -a "$segsize" != "1"; then
12279    as_fn_error $? "Large file support is not enabled. Segment size cannot be larger than 1GB." "$LINENO" 5
12280 fi
12281
12282
12283 ##
12284 ## Functions, global variables
12285 ##
12286
12287 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int timezone" >&5
12288 $as_echo_n "checking for int timezone... " >&6; }
12289 if ${pgac_cv_var_int_timezone+:} false; then :
12290   $as_echo_n "(cached) " >&6
12291 else
12292   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12293 /* end confdefs.h.  */
12294 #include <time.h>
12295 int res;
12296 int
12297 main ()
12298 {
12299 #ifndef __CYGWIN__
12300 res = timezone / 60;
12301 #else
12302 res = _timezone / 60;
12303 #endif
12304   ;
12305   return 0;
12306 }
12307 _ACEOF
12308 if ac_fn_c_try_link "$LINENO"; then :
12309   pgac_cv_var_int_timezone=yes
12310 else
12311   pgac_cv_var_int_timezone=no
12312 fi
12313 rm -f core conftest.err conftest.$ac_objext \
12314     conftest$ac_exeext conftest.$ac_ext
12315 fi
12316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_timezone" >&5
12317 $as_echo "$pgac_cv_var_int_timezone" >&6; }
12318 if test x"$pgac_cv_var_int_timezone" = xyes ; then
12319
12320 $as_echo "#define HAVE_INT_TIMEZONE 1" >>confdefs.h
12321
12322 fi
12323 { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for accept()" >&5
12324 $as_echo_n "checking types of arguments for accept()... " >&6; }
12325  if ${ac_cv_func_accept_return+:} false; then :
12326   $as_echo_n "(cached) " >&6
12327 else
12328    if ${ac_cv_func_accept_arg1+:} false; then :
12329   $as_echo_n "(cached) " >&6
12330 else
12331     if ${ac_cv_func_accept_arg2+:} false; then :
12332   $as_echo_n "(cached) " >&6
12333 else
12334      if ${ac_cv_func_accept_arg3+:} false; then :
12335   $as_echo_n "(cached) " >&6
12336 else
12337       for ac_cv_func_accept_return in 'int' 'unsigned int PASCAL' 'SOCKET WSAAPI'; do
12338       for ac_cv_func_accept_arg1 in 'int' 'unsigned int' 'SOCKET'; do
12339        for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
12340         for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
12341          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12342 /* end confdefs.h.  */
12343 #ifdef HAVE_SYS_TYPES_H
12344 #include <sys/types.h>
12345 #endif
12346 #ifdef HAVE_SYS_SOCKET_H
12347 #include <sys/socket.h>
12348 #endif
12349 extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
12350 _ACEOF
12351 if ac_fn_c_try_compile "$LINENO"; then :
12352   ac_not_found=no; break 4
12353 else
12354   ac_not_found=yes
12355 fi
12356 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12357        done
12358       done
12359      done
12360     done
12361     if test "$ac_not_found" = yes; then
12362       as_fn_error $? "could not determine argument types" "$LINENO" 5
12363     fi
12364     if test "$ac_cv_func_accept_arg3" = "void"; then
12365       ac_cv_func_accept_arg3=int
12366     fi
12367
12368 fi
12369
12370 fi
12371
12372 fi
12373
12374 fi
12375  { $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
12376 $as_echo "$ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&6; }
12377
12378 cat >>confdefs.h <<_ACEOF
12379 #define ACCEPT_TYPE_RETURN $ac_cv_func_accept_return
12380 _ACEOF
12381
12382
12383 cat >>confdefs.h <<_ACEOF
12384 #define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
12385 _ACEOF
12386
12387
12388 cat >>confdefs.h <<_ACEOF
12389 #define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
12390 _ACEOF
12391
12392
12393 cat >>confdefs.h <<_ACEOF
12394 #define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
12395 _ACEOF
12396
12397
12398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday takes only one argument" >&5
12399 $as_echo_n "checking whether gettimeofday takes only one argument... " >&6; }
12400 if ${pgac_cv_func_gettimeofday_1arg+:} false; then :
12401   $as_echo_n "(cached) " >&6
12402 else
12403   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12404 /* end confdefs.h.  */
12405 #include <sys/time.h>
12406 int
12407 main ()
12408 {
12409 struct timeval *tp;
12410 struct timezone *tzp;
12411 gettimeofday(tp,tzp);
12412   ;
12413   return 0;
12414 }
12415 _ACEOF
12416 if ac_fn_c_try_compile "$LINENO"; then :
12417   pgac_cv_func_gettimeofday_1arg=no
12418 else
12419   pgac_cv_func_gettimeofday_1arg=yes
12420 fi
12421 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12422 fi
12423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_gettimeofday_1arg" >&5
12424 $as_echo "$pgac_cv_func_gettimeofday_1arg" >&6; }
12425 if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
12426
12427 $as_echo "#define GETTIMEOFDAY_1ARG 1" >>confdefs.h
12428
12429 fi
12430
12431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wcstombs_l declaration" >&5
12432 $as_echo_n "checking for wcstombs_l declaration... " >&6; }
12433 if ${pgac_cv_func_wcstombs_l+:} false; then :
12434   $as_echo_n "(cached) " >&6
12435 else
12436   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12437 /* end confdefs.h.  */
12438 #include <stdlib.h>
12439 #include <locale.h>
12440 int
12441 main ()
12442 {
12443 #ifndef wcstombs_l
12444 (void) wcstombs_l;
12445 #endif
12446   ;
12447   return 0;
12448 }
12449 _ACEOF
12450 if ac_fn_c_try_compile "$LINENO"; then :
12451   pgac_cv_func_wcstombs_l='yes'
12452 else
12453   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12454 /* end confdefs.h.  */
12455 #include <stdlib.h>
12456 #include <locale.h>
12457 #include <xlocale.h>
12458 int
12459 main ()
12460 {
12461 #ifndef wcstombs_l
12462 (void) wcstombs_l;
12463 #endif
12464   ;
12465   return 0;
12466 }
12467 _ACEOF
12468 if ac_fn_c_try_compile "$LINENO"; then :
12469   pgac_cv_func_wcstombs_l='yes (in xlocale.h)'
12470 else
12471   pgac_cv_func_wcstombs_l='no'
12472 fi
12473 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12474 fi
12475 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12476 fi
12477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_wcstombs_l" >&5
12478 $as_echo "$pgac_cv_func_wcstombs_l" >&6; }
12479 if test "$pgac_cv_func_wcstombs_l" = 'yes (in xlocale.h)'; then
12480
12481 $as_echo "#define WCSTOMBS_L_IN_XLOCALE 1" >>confdefs.h
12482
12483 fi
12484
12485 # Some versions of libedit contain strlcpy(), setproctitle(), and other
12486 # symbols that that library has no business exposing to the world.  Pending
12487 # acquisition of a clue by those developers, ignore libedit (including its
12488 # possible alias of libreadline) while checking for everything else.
12489 LIBS_including_readline="$LIBS"
12490 LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
12491
12492 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
12493 do :
12494   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12495 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12496 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12497   cat >>confdefs.h <<_ACEOF
12498 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12499 _ACEOF
12500
12501 fi
12502 done
12503
12504
12505 ac_fn_c_check_func "$LINENO" "fseeko" "ac_cv_func_fseeko"
12506 if test "x$ac_cv_func_fseeko" = xyes; then :
12507   $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
12508
12509 else
12510   case " $LIBOBJS " in
12511   *" fseeko.$ac_objext "* ) ;;
12512   *) LIBOBJS="$LIBOBJS fseeko.$ac_objext"
12513  ;;
12514 esac
12515
12516 fi
12517
12518
12519 case $host_os in
12520         # NetBSD uses a custom fseeko/ftello built on fsetpos/fgetpos
12521         # Mingw uses macros to access Win32 API calls
12522         netbsd*|mingw*)
12523
12524 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
12525
12526                 ac_cv_func_fseeko=yes;;
12527         *)
12528                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
12529 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
12530 if ${ac_cv_sys_largefile_source+:} false; then :
12531   $as_echo_n "(cached) " >&6
12532 else
12533   while :; do
12534   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12535 /* end confdefs.h.  */
12536 #include <sys/types.h> /* for off_t */
12537      #include <stdio.h>
12538 int
12539 main ()
12540 {
12541 int (*fp) (FILE *, off_t, int) = fseeko;
12542      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
12543   ;
12544   return 0;
12545 }
12546 _ACEOF
12547 if ac_fn_c_try_link "$LINENO"; then :
12548   ac_cv_sys_largefile_source=no; break
12549 fi
12550 rm -f core conftest.err conftest.$ac_objext \
12551     conftest$ac_exeext conftest.$ac_ext
12552   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12553 /* end confdefs.h.  */
12554 #define _LARGEFILE_SOURCE 1
12555 #include <sys/types.h> /* for off_t */
12556      #include <stdio.h>
12557 int
12558 main ()
12559 {
12560 int (*fp) (FILE *, off_t, int) = fseeko;
12561      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
12562   ;
12563   return 0;
12564 }
12565 _ACEOF
12566 if ac_fn_c_try_link "$LINENO"; then :
12567   ac_cv_sys_largefile_source=1; break
12568 fi
12569 rm -f core conftest.err conftest.$ac_objext \
12570     conftest$ac_exeext conftest.$ac_ext
12571   ac_cv_sys_largefile_source=unknown
12572   break
12573 done
12574 fi
12575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
12576 $as_echo "$ac_cv_sys_largefile_source" >&6; }
12577 case $ac_cv_sys_largefile_source in #(
12578   no | unknown) ;;
12579   *)
12580 cat >>confdefs.h <<_ACEOF
12581 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
12582 _ACEOF
12583 ;;
12584 esac
12585 rm -rf conftest*
12586
12587 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
12588 # in glibc 2.1.3, but that breaks too many other things.
12589 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
12590 if test $ac_cv_sys_largefile_source != unknown; then
12591
12592 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
12593
12594 fi
12595 ;;
12596 esac
12597
12598 # posix_fadvise() is a no-op on Solaris, so don't incur function overhead
12599 # by calling it, 2009-04-02
12600 # http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/posix_fadvise.c
12601 if test "$PORTNAME" != "solaris"; then
12602 for ac_func in posix_fadvise
12603 do :
12604   ac_fn_c_check_func "$LINENO" "posix_fadvise" "ac_cv_func_posix_fadvise"
12605 if test "x$ac_cv_func_posix_fadvise" = xyes; then :
12606   cat >>confdefs.h <<_ACEOF
12607 #define HAVE_POSIX_FADVISE 1
12608 _ACEOF
12609
12610 fi
12611 done
12612
12613 ac_fn_c_check_decl "$LINENO" "posix_fadvise" "ac_cv_have_decl_posix_fadvise" "#include <fcntl.h>
12614 "
12615 if test "x$ac_cv_have_decl_posix_fadvise" = xyes; then :
12616   ac_have_decl=1
12617 else
12618   ac_have_decl=0
12619 fi
12620
12621 cat >>confdefs.h <<_ACEOF
12622 #define HAVE_DECL_POSIX_FADVISE $ac_have_decl
12623 _ACEOF
12624
12625 fi
12626
12627 ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "#include <unistd.h>
12628 "
12629 if test "x$ac_cv_have_decl_fdatasync" = xyes; then :
12630   ac_have_decl=1
12631 else
12632   ac_have_decl=0
12633 fi
12634
12635 cat >>confdefs.h <<_ACEOF
12636 #define HAVE_DECL_FDATASYNC $ac_have_decl
12637 _ACEOF
12638
12639 ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
12640 if test "x$ac_cv_have_decl_strlcat" = xyes; then :
12641   ac_have_decl=1
12642 else
12643   ac_have_decl=0
12644 fi
12645
12646 cat >>confdefs.h <<_ACEOF
12647 #define HAVE_DECL_STRLCAT $ac_have_decl
12648 _ACEOF
12649 ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
12650 if test "x$ac_cv_have_decl_strlcpy" = xyes; then :
12651   ac_have_decl=1
12652 else
12653   ac_have_decl=0
12654 fi
12655
12656 cat >>confdefs.h <<_ACEOF
12657 #define HAVE_DECL_STRLCPY $ac_have_decl
12658 _ACEOF
12659
12660 # This is probably only present on macOS, but may as well check always
12661 ac_fn_c_check_decl "$LINENO" "F_FULLFSYNC" "ac_cv_have_decl_F_FULLFSYNC" "#include <fcntl.h>
12662 "
12663 if test "x$ac_cv_have_decl_F_FULLFSYNC" = xyes; then :
12664   ac_have_decl=1
12665 else
12666   ac_have_decl=0
12667 fi
12668
12669 cat >>confdefs.h <<_ACEOF
12670 #define HAVE_DECL_F_FULLFSYNC $ac_have_decl
12671 _ACEOF
12672
12673
12674 HAVE_IPV6=no
12675 ac_fn_c_check_type "$LINENO" "struct sockaddr_in6" "ac_cv_type_struct_sockaddr_in6" "$ac_includes_default
12676 #include <netinet/in.h>
12677 "
12678 if test "x$ac_cv_type_struct_sockaddr_in6" = xyes; then :
12679
12680 $as_echo "#define HAVE_IPV6 1" >>confdefs.h
12681
12682          HAVE_IPV6=yes
12683 fi
12684
12685
12686
12687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PS_STRINGS" >&5
12688 $as_echo_n "checking for PS_STRINGS... " >&6; }
12689 if ${pgac_cv_var_PS_STRINGS+:} false; then :
12690   $as_echo_n "(cached) " >&6
12691 else
12692   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12693 /* end confdefs.h.  */
12694 #include <machine/vmparam.h>
12695 #include <sys/exec.h>
12696
12697 int
12698 main ()
12699 {
12700 PS_STRINGS->ps_nargvstr = 1;
12701 PS_STRINGS->ps_argvstr = "foo";
12702   ;
12703   return 0;
12704 }
12705 _ACEOF
12706 if ac_fn_c_try_link "$LINENO"; then :
12707   pgac_cv_var_PS_STRINGS=yes
12708 else
12709   pgac_cv_var_PS_STRINGS=no
12710 fi
12711 rm -f core conftest.err conftest.$ac_objext \
12712     conftest$ac_exeext conftest.$ac_ext
12713 fi
12714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_PS_STRINGS" >&5
12715 $as_echo "$pgac_cv_var_PS_STRINGS" >&6; }
12716 if test "$pgac_cv_var_PS_STRINGS" = yes ; then
12717
12718 $as_echo "#define HAVE_PS_STRINGS 1" >>confdefs.h
12719
12720 fi
12721
12722
12723 # We use our snprintf.c emulation if either snprintf() or vsnprintf()
12724 # is missing.  Yes, there are machines that have only one.  We may
12725 # also decide to use snprintf.c if snprintf() is present but does not
12726 # have all the features we need --- see below.
12727
12728 if test "$PORTNAME" = "win32"; then
12729   # Win32 gets snprintf.c built unconditionally.
12730   #
12731   # To properly translate all NLS languages strings, we must support the
12732   # *printf() %$ format, which allows *printf() arguments to be selected
12733   # by position in the translated string.
12734   #
12735   # libintl versions < 0.13 use the native *printf() functions, and Win32
12736   # *printf() doesn't understand %$, so we must use our /port versions,
12737   # which do understand %$. libintl versions >= 0.13 include their own
12738   # *printf versions on Win32.  The libintl 0.13 release note text is:
12739   #
12740   #   C format strings with positions, as they arise when a translator
12741   #   needs to reorder a sentence, are now supported on all platforms.
12742   #   On those few platforms (NetBSD and Woe32) for which the native
12743   #   printf()/fprintf()/... functions don't support such format
12744   #   strings, replacements are provided through <libintl.h>.
12745   #
12746   # We could use libintl >= 0.13's *printf() if we were sure that we had
12747   # a litint >= 0.13 at runtime, but seeing that there is no clean way
12748   # to guarantee that, it is best to just use our own, so we are sure to
12749   # get %$ support. In include/port.h we disable the *printf() macros
12750   # that might have been defined by libintl.
12751   #
12752   # We do this unconditionally whether NLS is used or not so we are sure
12753   # that all Win32 libraries and binaries behave the same.
12754   pgac_need_repl_snprintf=yes
12755 else
12756   pgac_need_repl_snprintf=no
12757   for ac_func in snprintf
12758 do :
12759   ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
12760 if test "x$ac_cv_func_snprintf" = xyes; then :
12761   cat >>confdefs.h <<_ACEOF
12762 #define HAVE_SNPRINTF 1
12763 _ACEOF
12764
12765 else
12766   pgac_need_repl_snprintf=yes
12767 fi
12768 done
12769
12770   for ac_func in vsnprintf
12771 do :
12772   ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
12773 if test "x$ac_cv_func_vsnprintf" = xyes; then :
12774   cat >>confdefs.h <<_ACEOF
12775 #define HAVE_VSNPRINTF 1
12776 _ACEOF
12777
12778 else
12779   pgac_need_repl_snprintf=yes
12780 fi
12781 done
12782
12783 fi
12784
12785
12786 # Check whether <stdio.h> declares snprintf() and vsnprintf(); if not,
12787 # include/c.h will provide declarations.  Note this is a separate test
12788 # from whether the functions exist in the C library --- there are
12789 # systems that have the functions but don't bother to declare them :-(
12790
12791 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
12792 if test "x$ac_cv_have_decl_snprintf" = xyes; then :
12793   ac_have_decl=1
12794 else
12795   ac_have_decl=0
12796 fi
12797
12798 cat >>confdefs.h <<_ACEOF
12799 #define HAVE_DECL_SNPRINTF $ac_have_decl
12800 _ACEOF
12801 ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
12802 if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
12803   ac_have_decl=1
12804 else
12805   ac_have_decl=0
12806 fi
12807
12808 cat >>confdefs.h <<_ACEOF
12809 #define HAVE_DECL_VSNPRINTF $ac_have_decl
12810 _ACEOF
12811
12812
12813
12814 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for isinf" >&5
12815 $as_echo_n "checking for isinf... " >&6; }
12816 if ${ac_cv_func_isinf+:} false; then :
12817   $as_echo_n "(cached) " >&6
12818 else
12819   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12820 /* end confdefs.h.  */
12821
12822 #include <math.h>
12823 double glob_double;
12824
12825 int
12826 main ()
12827 {
12828 return isinf(glob_double) ? 0 : 1;
12829   ;
12830   return 0;
12831 }
12832 _ACEOF
12833 if ac_fn_c_try_link "$LINENO"; then :
12834   ac_cv_func_isinf=yes
12835 else
12836   ac_cv_func_isinf=no
12837 fi
12838 rm -f core conftest.err conftest.$ac_objext \
12839     conftest$ac_exeext conftest.$ac_ext
12840 fi
12841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_isinf" >&5
12842 $as_echo "$ac_cv_func_isinf" >&6; }
12843
12844 if test $ac_cv_func_isinf = yes ; then
12845
12846 $as_echo "#define HAVE_ISINF 1" >>confdefs.h
12847
12848 else
12849   case " $LIBOBJS " in
12850   *" isinf.$ac_objext "* ) ;;
12851   *) LIBOBJS="$LIBOBJS isinf.$ac_objext"
12852  ;;
12853 esac
12854
12855   # Look for a way to implement a substitute for isinf()
12856   for ac_func in fpclass fp_class fp_class_d class
12857 do :
12858   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12859 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12860 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12861   cat >>confdefs.h <<_ACEOF
12862 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12863 _ACEOF
12864  break
12865 fi
12866 done
12867
12868 fi
12869
12870 ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt"
12871 if test "x$ac_cv_func_crypt" = xyes; then :
12872   $as_echo "#define HAVE_CRYPT 1" >>confdefs.h
12873
12874 else
12875   case " $LIBOBJS " in
12876   *" crypt.$ac_objext "* ) ;;
12877   *) LIBOBJS="$LIBOBJS crypt.$ac_objext"
12878  ;;
12879 esac
12880
12881 fi
12882
12883 ac_fn_c_check_func "$LINENO" "fls" "ac_cv_func_fls"
12884 if test "x$ac_cv_func_fls" = xyes; then :
12885   $as_echo "#define HAVE_FLS 1" >>confdefs.h
12886
12887 else
12888   case " $LIBOBJS " in
12889   *" fls.$ac_objext "* ) ;;
12890   *) LIBOBJS="$LIBOBJS fls.$ac_objext"
12891  ;;
12892 esac
12893
12894 fi
12895
12896 ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt"
12897 if test "x$ac_cv_func_getopt" = xyes; then :
12898   $as_echo "#define HAVE_GETOPT 1" >>confdefs.h
12899
12900 else
12901   case " $LIBOBJS " in
12902   *" getopt.$ac_objext "* ) ;;
12903   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
12904  ;;
12905 esac
12906
12907 fi
12908
12909 ac_fn_c_check_func "$LINENO" "getrusage" "ac_cv_func_getrusage"
12910 if test "x$ac_cv_func_getrusage" = xyes; then :
12911   $as_echo "#define HAVE_GETRUSAGE 1" >>confdefs.h
12912
12913 else
12914   case " $LIBOBJS " in
12915   *" getrusage.$ac_objext "* ) ;;
12916   *) LIBOBJS="$LIBOBJS getrusage.$ac_objext"
12917  ;;
12918 esac
12919
12920 fi
12921
12922 ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
12923 if test "x$ac_cv_func_inet_aton" = xyes; then :
12924   $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
12925
12926 else
12927   case " $LIBOBJS " in
12928   *" inet_aton.$ac_objext "* ) ;;
12929   *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
12930  ;;
12931 esac
12932
12933 fi
12934
12935 ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
12936 if test "x$ac_cv_func_mkdtemp" = xyes; then :
12937   $as_echo "#define HAVE_MKDTEMP 1" >>confdefs.h
12938
12939 else
12940   case " $LIBOBJS " in
12941   *" mkdtemp.$ac_objext "* ) ;;
12942   *) LIBOBJS="$LIBOBJS mkdtemp.$ac_objext"
12943  ;;
12944 esac
12945
12946 fi
12947
12948 ac_fn_c_check_func "$LINENO" "random" "ac_cv_func_random"
12949 if test "x$ac_cv_func_random" = xyes; then :
12950   $as_echo "#define HAVE_RANDOM 1" >>confdefs.h
12951
12952 else
12953   case " $LIBOBJS " in
12954   *" random.$ac_objext "* ) ;;
12955   *) LIBOBJS="$LIBOBJS random.$ac_objext"
12956  ;;
12957 esac
12958
12959 fi
12960
12961 ac_fn_c_check_func "$LINENO" "rint" "ac_cv_func_rint"
12962 if test "x$ac_cv_func_rint" = xyes; then :
12963   $as_echo "#define HAVE_RINT 1" >>confdefs.h
12964
12965 else
12966   case " $LIBOBJS " in
12967   *" rint.$ac_objext "* ) ;;
12968   *) LIBOBJS="$LIBOBJS rint.$ac_objext"
12969  ;;
12970 esac
12971
12972 fi
12973
12974 ac_fn_c_check_func "$LINENO" "srandom" "ac_cv_func_srandom"
12975 if test "x$ac_cv_func_srandom" = xyes; then :
12976   $as_echo "#define HAVE_SRANDOM 1" >>confdefs.h
12977
12978 else
12979   case " $LIBOBJS " in
12980   *" srandom.$ac_objext "* ) ;;
12981   *) LIBOBJS="$LIBOBJS srandom.$ac_objext"
12982  ;;
12983 esac
12984
12985 fi
12986
12987 ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror"
12988 if test "x$ac_cv_func_strerror" = xyes; then :
12989   $as_echo "#define HAVE_STRERROR 1" >>confdefs.h
12990
12991 else
12992   case " $LIBOBJS " in
12993   *" strerror.$ac_objext "* ) ;;
12994   *) LIBOBJS="$LIBOBJS strerror.$ac_objext"
12995  ;;
12996 esac
12997
12998 fi
12999
13000 ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
13001 if test "x$ac_cv_func_strlcat" = xyes; then :
13002   $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
13003
13004 else
13005   case " $LIBOBJS " in
13006   *" strlcat.$ac_objext "* ) ;;
13007   *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
13008  ;;
13009 esac
13010
13011 fi
13012
13013 ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
13014 if test "x$ac_cv_func_strlcpy" = xyes; then :
13015   $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
13016
13017 else
13018   case " $LIBOBJS " in
13019   *" strlcpy.$ac_objext "* ) ;;
13020   *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
13021  ;;
13022 esac
13023
13024 fi
13025
13026
13027
13028 case $host_os in
13029
13030         # Windows uses a specialised env handler
13031         # and doesn't need a replacement getpeereid because it doesn't use
13032         # Unix sockets.
13033         mingw*)
13034
13035 $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
13036
13037
13038 $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
13039
13040                 ac_cv_func_unsetenv=yes
13041                 ac_cv_func_getpeereid=yes;;
13042         *)
13043                 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
13044 if test "x$ac_cv_func_unsetenv" = xyes; then :
13045   $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
13046
13047 else
13048   case " $LIBOBJS " in
13049   *" unsetenv.$ac_objext "* ) ;;
13050   *) LIBOBJS="$LIBOBJS unsetenv.$ac_objext"
13051  ;;
13052 esac
13053
13054 fi
13055
13056 ac_fn_c_check_func "$LINENO" "getpeereid" "ac_cv_func_getpeereid"
13057 if test "x$ac_cv_func_getpeereid" = xyes; then :
13058   $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
13059
13060 else
13061   case " $LIBOBJS " in
13062   *" getpeereid.$ac_objext "* ) ;;
13063   *) LIBOBJS="$LIBOBJS getpeereid.$ac_objext"
13064  ;;
13065 esac
13066
13067 fi
13068
13069
13070                 ;;
13071 esac
13072
13073 # System's version of getaddrinfo(), if any, may be used only if we found
13074 # a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
13075 # We use only our own getaddrinfo.c on Windows, but it's time to revisit that.
13076 if test x"$ac_cv_type_struct_addrinfo" = xyes && \
13077    test "$PORTNAME" != "win32"; then
13078   ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo"
13079 if test "x$ac_cv_func_getaddrinfo" = xyes; then :
13080   $as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
13081
13082 else
13083   case " $LIBOBJS " in
13084   *" getaddrinfo.$ac_objext "* ) ;;
13085   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
13086  ;;
13087 esac
13088
13089 fi
13090
13091
13092 else
13093   case " $LIBOBJS " in
13094   *" getaddrinfo.$ac_objext "* ) ;;
13095   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
13096  ;;
13097 esac
13098
13099 fi
13100
13101 # Similarly, use system's getopt_long() only if system provides struct option.
13102 if test x"$ac_cv_type_struct_option" = xyes ; then
13103   ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long"
13104 if test "x$ac_cv_func_getopt_long" = xyes; then :
13105   $as_echo "#define HAVE_GETOPT_LONG 1" >>confdefs.h
13106
13107 else
13108   case " $LIBOBJS " in
13109   *" getopt_long.$ac_objext "* ) ;;
13110   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
13111  ;;
13112 esac
13113
13114 fi
13115
13116
13117 else
13118   case " $LIBOBJS " in
13119   *" getopt_long.$ac_objext "* ) ;;
13120   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
13121  ;;
13122 esac
13123
13124 fi
13125
13126 # Solaris' getopt() doesn't do what we want for long options, so always use
13127 # our version on that platform.
13128 if test "$PORTNAME" = "solaris"; then
13129   case " $LIBOBJS " in
13130   *" getopt.$ac_objext "* ) ;;
13131   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
13132  ;;
13133 esac
13134
13135 fi
13136
13137 # mingw has adopted a GNU-centric interpretation of optind/optreset,
13138 # so always use our version on Windows.
13139 if test "$PORTNAME" = "win32"; then
13140   case " $LIBOBJS " in
13141   *" getopt.$ac_objext "* ) ;;
13142   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
13143  ;;
13144 esac
13145
13146   case " $LIBOBJS " in
13147   *" getopt_long.$ac_objext "* ) ;;
13148   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
13149  ;;
13150 esac
13151
13152 fi
13153
13154 # Win32 (really MinGW) support
13155 if test "$PORTNAME" = "win32"; then
13156   ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
13157 if test "x$ac_cv_func_gettimeofday" = xyes; then :
13158   $as_echo "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
13159
13160 else
13161   case " $LIBOBJS " in
13162   *" gettimeofday.$ac_objext "* ) ;;
13163   *) LIBOBJS="$LIBOBJS gettimeofday.$ac_objext"
13164  ;;
13165 esac
13166
13167 fi
13168
13169
13170   case " $LIBOBJS " in
13171   *" dirmod.$ac_objext "* ) ;;
13172   *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
13173  ;;
13174 esac
13175
13176   case " $LIBOBJS " in
13177   *" kill.$ac_objext "* ) ;;
13178   *) LIBOBJS="$LIBOBJS kill.$ac_objext"
13179  ;;
13180 esac
13181
13182   case " $LIBOBJS " in
13183   *" open.$ac_objext "* ) ;;
13184   *) LIBOBJS="$LIBOBJS open.$ac_objext"
13185  ;;
13186 esac
13187
13188   case " $LIBOBJS " in
13189   *" system.$ac_objext "* ) ;;
13190   *) LIBOBJS="$LIBOBJS system.$ac_objext"
13191  ;;
13192 esac
13193
13194   case " $LIBOBJS " in
13195   *" win32env.$ac_objext "* ) ;;
13196   *) LIBOBJS="$LIBOBJS win32env.$ac_objext"
13197  ;;
13198 esac
13199
13200   case " $LIBOBJS " in
13201   *" win32error.$ac_objext "* ) ;;
13202   *) LIBOBJS="$LIBOBJS win32error.$ac_objext"
13203  ;;
13204 esac
13205
13206   case " $LIBOBJS " in
13207   *" win32security.$ac_objext "* ) ;;
13208   *) LIBOBJS="$LIBOBJS win32security.$ac_objext"
13209  ;;
13210 esac
13211
13212   case " $LIBOBJS " in
13213   *" win32setlocale.$ac_objext "* ) ;;
13214   *) LIBOBJS="$LIBOBJS win32setlocale.$ac_objext"
13215  ;;
13216 esac
13217
13218
13219 $as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
13220
13221   ac_fn_c_check_type "$LINENO" "MINIDUMP_TYPE" "ac_cv_type_MINIDUMP_TYPE" "
13222 #define WIN32_LEAN_AND_MEAN
13223 #include <windows.h>
13224 #include <string.h>
13225 #include <dbghelp.h>
13226 "
13227 if test "x$ac_cv_type_MINIDUMP_TYPE" = xyes; then :
13228
13229 cat >>confdefs.h <<_ACEOF
13230 #define HAVE_MINIDUMP_TYPE 1
13231 _ACEOF
13232
13233 pgac_minidump_type=yes
13234 else
13235   pgac_minidump_type=no
13236 fi
13237
13238 fi
13239 if test x"$pgac_minidump_type" = x"yes" ; then
13240   have_win32_dbghelp=yes
13241
13242 else
13243   have_win32_dbghelp=no
13244
13245 fi
13246
13247 # Cygwin needs only a bit of that
13248 if test "$PORTNAME" = "cygwin"; then
13249   case " $LIBOBJS " in
13250   *" dirmod.$ac_objext "* ) ;;
13251   *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
13252  ;;
13253 esac
13254
13255 fi
13256
13257 ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "#include <signal.h>
13258 /* NetBSD declares sys_siglist in unistd.h.  */
13259 #ifdef HAVE_UNISTD_H
13260 # include <unistd.h>
13261 #endif
13262
13263 "
13264 if test "x$ac_cv_have_decl_sys_siglist" = xyes; then :
13265   ac_have_decl=1
13266 else
13267   ac_have_decl=0
13268 fi
13269
13270 cat >>confdefs.h <<_ACEOF
13271 #define HAVE_DECL_SYS_SIGLIST $ac_have_decl
13272 _ACEOF
13273
13274
13275 ac_fn_c_check_func "$LINENO" "syslog" "ac_cv_func_syslog"
13276 if test "x$ac_cv_func_syslog" = xyes; then :
13277   ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default"
13278 if test "x$ac_cv_header_syslog_h" = xyes; then :
13279
13280 $as_echo "#define HAVE_SYSLOG 1" >>confdefs.h
13281
13282 fi
13283
13284
13285 fi
13286
13287
13288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opterr" >&5
13289 $as_echo_n "checking for opterr... " >&6; }
13290 if ${pgac_cv_var_int_opterr+:} false; then :
13291   $as_echo_n "(cached) " >&6
13292 else
13293   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13294 /* end confdefs.h.  */
13295 #include <unistd.h>
13296 int
13297 main ()
13298 {
13299 extern int opterr; opterr = 1;
13300   ;
13301   return 0;
13302 }
13303 _ACEOF
13304 if ac_fn_c_try_link "$LINENO"; then :
13305   pgac_cv_var_int_opterr=yes
13306 else
13307   pgac_cv_var_int_opterr=no
13308 fi
13309 rm -f core conftest.err conftest.$ac_objext \
13310     conftest$ac_exeext conftest.$ac_ext
13311 fi
13312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_opterr" >&5
13313 $as_echo "$pgac_cv_var_int_opterr" >&6; }
13314 if test x"$pgac_cv_var_int_opterr" = x"yes"; then
13315
13316 $as_echo "#define HAVE_INT_OPTERR 1" >>confdefs.h
13317
13318 fi
13319
13320 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for optreset" >&5
13321 $as_echo_n "checking for optreset... " >&6; }
13322 if ${pgac_cv_var_int_optreset+:} false; then :
13323   $as_echo_n "(cached) " >&6
13324 else
13325   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13326 /* end confdefs.h.  */
13327 #include <unistd.h>
13328 int
13329 main ()
13330 {
13331 extern int optreset; optreset = 1;
13332   ;
13333   return 0;
13334 }
13335 _ACEOF
13336 if ac_fn_c_try_link "$LINENO"; then :
13337   pgac_cv_var_int_optreset=yes
13338 else
13339   pgac_cv_var_int_optreset=no
13340 fi
13341 rm -f core conftest.err conftest.$ac_objext \
13342     conftest$ac_exeext conftest.$ac_ext
13343 fi
13344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_optreset" >&5
13345 $as_echo "$pgac_cv_var_int_optreset" >&6; }
13346 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
13347
13348 $as_echo "#define HAVE_INT_OPTRESET 1" >>confdefs.h
13349
13350 fi
13351
13352 for ac_func in strtoll strtoq
13353 do :
13354   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13355 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13356 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13357   cat >>confdefs.h <<_ACEOF
13358 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13359 _ACEOF
13360  break
13361 fi
13362 done
13363
13364 for ac_func in strtoull strtouq
13365 do :
13366   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13367 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13368 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13369   cat >>confdefs.h <<_ACEOF
13370 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13371 _ACEOF
13372  break
13373 fi
13374 done
13375
13376
13377 # Lastly, restore full LIBS list and check for readline/libedit symbols
13378 LIBS="$LIBS_including_readline"
13379
13380 if test "$with_readline" = yes; then
13381   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_append_character" >&5
13382 $as_echo_n "checking for rl_completion_append_character... " >&6; }
13383 if ${pgac_cv_var_rl_completion_append_character+:} false; then :
13384   $as_echo_n "(cached) " >&6
13385 else
13386   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13387 /* end confdefs.h.  */
13388 #include <stdio.h>
13389 #ifdef HAVE_READLINE_READLINE_H
13390 # include <readline/readline.h>
13391 #elif defined(HAVE_READLINE_H)
13392 # include <readline.h>
13393 #endif
13394
13395 int
13396 main ()
13397 {
13398 rl_completion_append_character = 'x';
13399   ;
13400   return 0;
13401 }
13402 _ACEOF
13403 if ac_fn_c_try_link "$LINENO"; then :
13404   pgac_cv_var_rl_completion_append_character=yes
13405 else
13406   pgac_cv_var_rl_completion_append_character=no
13407 fi
13408 rm -f core conftest.err conftest.$ac_objext \
13409     conftest$ac_exeext conftest.$ac_ext
13410 fi
13411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_completion_append_character" >&5
13412 $as_echo "$pgac_cv_var_rl_completion_append_character" >&6; }
13413 if test x"$pgac_cv_var_rl_completion_append_character" = x"yes"; then
13414
13415 $as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
13416
13417 fi
13418   for ac_func in rl_completion_matches rl_filename_completion_function rl_reset_screen_size
13419 do :
13420   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13421 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13422 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13423   cat >>confdefs.h <<_ACEOF
13424 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13425 _ACEOF
13426
13427 fi
13428 done
13429
13430   for ac_func in append_history history_truncate_file
13431 do :
13432   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13433 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13434 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13435   cat >>confdefs.h <<_ACEOF
13436 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13437 _ACEOF
13438
13439 fi
13440 done
13441
13442 fi
13443
13444
13445 # This test makes sure that run tests work at all.  Sometimes a shared
13446 # library is found by the linker, but the runtime linker can't find it.
13447 # This check should come after all modifications of compiler or linker
13448 # variables, and before any other run tests.
13449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking test program" >&5
13450 $as_echo_n "checking test program... " >&6; }
13451 if test "$cross_compiling" = yes; then :
13452   { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling" >&5
13453 $as_echo "cross-compiling" >&6; }
13454 else
13455   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13456 /* end confdefs.h.  */
13457 int main() { return 0; }
13458 _ACEOF
13459 if ac_fn_c_try_run "$LINENO"; then :
13460   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
13461 $as_echo "ok" >&6; }
13462 else
13463   { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
13464 $as_echo "failed" >&6; }
13465 as_fn_error $? "
13466 Could not execute a simple test program.  This may be a problem
13467 related to locating shared libraries.  Check the file 'config.log'
13468 for the exact reason." "$LINENO" 5
13469 fi
13470 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13471   conftest.$ac_objext conftest.beam conftest.$ac_ext
13472 fi
13473
13474
13475 # --------------------
13476 # Run tests below here
13477 # --------------------
13478
13479 # Force use of our snprintf if system's doesn't do arg control
13480 # See comment above at snprintf test for details.
13481 if test "$enable_nls" = yes -a "$pgac_need_repl_snprintf" = no; then
13482   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf supports argument control" >&5
13483 $as_echo_n "checking whether snprintf supports argument control... " >&6; }
13484 if ${pgac_cv_snprintf_arg_control+:} false; then :
13485   $as_echo_n "(cached) " >&6
13486 else
13487   if test "$cross_compiling" = yes; then :
13488   pgac_cv_snprintf_arg_control=cross
13489 else
13490   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13491 /* end confdefs.h.  */
13492 #include <stdio.h>
13493 #include <string.h>
13494
13495 int main()
13496 {
13497   char buf[100];
13498
13499   /* can it swap arguments? */
13500   snprintf(buf, 100, "%2\$d %1\$d", 3, 4);
13501   if (strcmp(buf, "4 3") != 0)
13502     return 1;
13503   return 0;
13504 }
13505 _ACEOF
13506 if ac_fn_c_try_run "$LINENO"; then :
13507   pgac_cv_snprintf_arg_control=yes
13508 else
13509   pgac_cv_snprintf_arg_control=no
13510 fi
13511 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13512   conftest.$ac_objext conftest.beam conftest.$ac_ext
13513 fi
13514
13515
13516 fi
13517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_arg_control" >&5
13518 $as_echo "$pgac_cv_snprintf_arg_control" >&6; }
13519
13520   if test $pgac_cv_snprintf_arg_control != yes ; then
13521     pgac_need_repl_snprintf=yes
13522   fi
13523 fi
13524
13525
13526
13527
13528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long int is 64 bits" >&5
13529 $as_echo_n "checking whether long int is 64 bits... " >&6; }
13530 if ${pgac_cv_type_long_int_64+:} false; then :
13531   $as_echo_n "(cached) " >&6
13532 else
13533   if test "$cross_compiling" = yes; then :
13534   # If cross-compiling, check the size reported by the compiler and
13535 # trust that the arithmetic works.
13536 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13537 /* end confdefs.h.  */
13538
13539 int
13540 main ()
13541 {
13542 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
13543 test_array [0] = 0;
13544 return test_array [0];
13545
13546   ;
13547   return 0;
13548 }
13549 _ACEOF
13550 if ac_fn_c_try_compile "$LINENO"; then :
13551   pgac_cv_type_long_int_64=yes
13552 else
13553   pgac_cv_type_long_int_64=no
13554 fi
13555 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13556 else
13557   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13558 /* end confdefs.h.  */
13559 typedef long int ac_int64;
13560
13561 /*
13562  * These are globals to discourage the compiler from folding all the
13563  * arithmetic tests down to compile-time constants.
13564  */
13565 ac_int64 a = 20000001;
13566 ac_int64 b = 40000005;
13567
13568 int does_int64_work()
13569 {
13570   ac_int64 c,d;
13571
13572   if (sizeof(ac_int64) != 8)
13573     return 0;                   /* definitely not the right size */
13574
13575   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
13576   c = a * b;
13577   d = (c + b) / b;
13578   if (d != a+1)
13579     return 0;
13580   return 1;
13581 }
13582
13583 int
13584 main() {
13585   return (! does_int64_work());
13586 }
13587 _ACEOF
13588 if ac_fn_c_try_run "$LINENO"; then :
13589   pgac_cv_type_long_int_64=yes
13590 else
13591   pgac_cv_type_long_int_64=no
13592 fi
13593 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13594   conftest.$ac_objext conftest.beam conftest.$ac_ext
13595 fi
13596
13597 fi
13598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_int_64" >&5
13599 $as_echo "$pgac_cv_type_long_int_64" >&6; }
13600
13601 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
13602 if test x"$pgac_cv_type_long_int_64" = xyes ; then
13603
13604 $as_echo "#define HAVE_LONG_INT_64 1" >>confdefs.h
13605
13606 fi
13607
13608
13609 if test x"$HAVE_LONG_INT_64" = x"yes" ; then
13610   pg_int64_type="long int"
13611 else
13612   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long long int is 64 bits" >&5
13613 $as_echo_n "checking whether long long int is 64 bits... " >&6; }
13614 if ${pgac_cv_type_long_long_int_64+:} false; then :
13615   $as_echo_n "(cached) " >&6
13616 else
13617   if test "$cross_compiling" = yes; then :
13618   # If cross-compiling, check the size reported by the compiler and
13619 # trust that the arithmetic works.
13620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13621 /* end confdefs.h.  */
13622
13623 int
13624 main ()
13625 {
13626 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
13627 test_array [0] = 0;
13628 return test_array [0];
13629
13630   ;
13631   return 0;
13632 }
13633 _ACEOF
13634 if ac_fn_c_try_compile "$LINENO"; then :
13635   pgac_cv_type_long_long_int_64=yes
13636 else
13637   pgac_cv_type_long_long_int_64=no
13638 fi
13639 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13640 else
13641   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13642 /* end confdefs.h.  */
13643 typedef long long int ac_int64;
13644
13645 /*
13646  * These are globals to discourage the compiler from folding all the
13647  * arithmetic tests down to compile-time constants.
13648  */
13649 ac_int64 a = 20000001;
13650 ac_int64 b = 40000005;
13651
13652 int does_int64_work()
13653 {
13654   ac_int64 c,d;
13655
13656   if (sizeof(ac_int64) != 8)
13657     return 0;                   /* definitely not the right size */
13658
13659   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
13660   c = a * b;
13661   d = (c + b) / b;
13662   if (d != a+1)
13663     return 0;
13664   return 1;
13665 }
13666
13667 int
13668 main() {
13669   return (! does_int64_work());
13670 }
13671 _ACEOF
13672 if ac_fn_c_try_run "$LINENO"; then :
13673   pgac_cv_type_long_long_int_64=yes
13674 else
13675   pgac_cv_type_long_long_int_64=no
13676 fi
13677 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13678   conftest.$ac_objext conftest.beam conftest.$ac_ext
13679 fi
13680
13681 fi
13682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_long_int_64" >&5
13683 $as_echo "$pgac_cv_type_long_long_int_64" >&6; }
13684
13685 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
13686 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
13687
13688 $as_echo "#define HAVE_LONG_LONG_INT_64 1" >>confdefs.h
13689
13690 fi
13691
13692   if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
13693     pg_int64_type="long long int"
13694   else
13695     as_fn_error $? "Cannot find a working 64-bit integer type." "$LINENO" 5
13696   fi
13697 fi
13698
13699
13700 cat >>confdefs.h <<_ACEOF
13701 #define PG_INT64_TYPE $pg_int64_type
13702 _ACEOF
13703
13704
13705
13706 if test x"$HAVE_LONG_LONG_INT_64" = xyes ; then
13707   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13708 /* end confdefs.h.  */
13709
13710 #define INT64CONST(x)  x##LL
13711 long long int foo = INT64CONST(0x1234567890123456);
13712
13713 _ACEOF
13714 if ac_fn_c_try_compile "$LINENO"; then :
13715
13716 $as_echo "#define HAVE_LL_CONSTANTS 1" >>confdefs.h
13717
13718 fi
13719 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13720 fi
13721
13722
13723 # If we found "long int" is 64 bits, assume snprintf handles it.  If
13724 # we found we need to use "long long int", better check.  We cope with
13725 # snprintfs that use %lld, %qd, or %I64d as the format.  If none of these
13726 # work, fall back to our own snprintf emulation (which we know uses %lld).
13727
13728 if test "$HAVE_LONG_LONG_INT_64" = yes ; then
13729   if test $pgac_need_repl_snprintf = no; then
13730     { $as_echo "$as_me:${as_lineno-$LINENO}: checking snprintf length modifier for long long int" >&5
13731 $as_echo_n "checking snprintf length modifier for long long int... " >&6; }
13732 if ${pgac_cv_snprintf_long_long_int_modifier+:} false; then :
13733   $as_echo_n "(cached) " >&6
13734 else
13735   for pgac_modifier in 'll' 'q' 'I64'; do
13736 if test "$cross_compiling" = yes; then :
13737   pgac_cv_snprintf_long_long_int_modifier=cross; break
13738 else
13739   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13740 /* end confdefs.h.  */
13741 #include <stdio.h>
13742 #include <string.h>
13743 typedef long long int ac_int64;
13744 #define INT64_FORMAT "%${pgac_modifier}d"
13745
13746 ac_int64 a = 20000001;
13747 ac_int64 b = 40000005;
13748
13749 int does_int64_snprintf_work()
13750 {
13751   ac_int64 c;
13752   char buf[100];
13753
13754   if (sizeof(ac_int64) != 8)
13755     return 0;                   /* doesn't look like the right size */
13756
13757   c = a * b;
13758   snprintf(buf, 100, INT64_FORMAT, c);
13759   if (strcmp(buf, "800000140000005") != 0)
13760     return 0;                   /* either multiply or snprintf is busted */
13761   return 1;
13762 }
13763
13764 int
13765 main() {
13766   return (! does_int64_snprintf_work());
13767 }
13768 _ACEOF
13769 if ac_fn_c_try_run "$LINENO"; then :
13770   pgac_cv_snprintf_long_long_int_modifier=$pgac_modifier; break
13771 fi
13772 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13773   conftest.$ac_objext conftest.beam conftest.$ac_ext
13774 fi
13775
13776 done
13777 fi
13778
13779 LONG_LONG_INT_MODIFIER=''
13780
13781 case $pgac_cv_snprintf_long_long_int_modifier in
13782   cross) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot test (not on host machine)" >&5
13783 $as_echo "cannot test (not on host machine)" >&6; };;
13784   ?*)    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_long_long_int_modifier" >&5
13785 $as_echo "$pgac_cv_snprintf_long_long_int_modifier" >&6; }
13786          LONG_LONG_INT_MODIFIER=$pgac_cv_snprintf_long_long_int_modifier;;
13787   *)     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13788 $as_echo "none" >&6; };;
13789 esac
13790     if test "$LONG_LONG_INT_MODIFIER" = ""; then
13791       # Force usage of our own snprintf, since system snprintf is broken
13792       pgac_need_repl_snprintf=yes
13793       LONG_LONG_INT_MODIFIER='ll'
13794     fi
13795   else
13796     # Here if we previously decided we needed to use our own snprintf
13797     LONG_LONG_INT_MODIFIER='ll'
13798   fi
13799 else
13800   # Here if we are not using 'long long int' at all
13801   LONG_LONG_INT_MODIFIER='l'
13802 fi
13803
13804 INT64_MODIFIER="\"$LONG_LONG_INT_MODIFIER\""
13805
13806
13807 cat >>confdefs.h <<_ACEOF
13808 #define INT64_MODIFIER $INT64_MODIFIER
13809 _ACEOF
13810
13811
13812 # Also force use of our snprintf if the system's doesn't support the %z flag.
13813 if test "$pgac_need_repl_snprintf" = no; then
13814   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf supports the %z modifier" >&5
13815 $as_echo_n "checking whether snprintf supports the %z modifier... " >&6; }
13816 if ${pgac_cv_snprintf_size_t_support+:} false; then :
13817   $as_echo_n "(cached) " >&6
13818 else
13819   if test "$cross_compiling" = yes; then :
13820   pgac_cv_snprintf_size_t_support=cross
13821 else
13822   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13823 /* end confdefs.h.  */
13824 #include <stdio.h>
13825 #include <string.h>
13826
13827 int main()
13828 {
13829   char bufz[100];
13830   char buf64[100];
13831
13832   /*
13833    * Print the largest unsigned number fitting in a size_t using both %zu
13834    * and the previously-determined format for 64-bit integers.  Note that
13835    * we don't run this code unless we know snprintf handles 64-bit ints.
13836    */
13837   bufz[0] = '\0';  /* in case snprintf fails to emit anything */
13838   snprintf(bufz, sizeof(bufz), "%zu", ~((size_t) 0));
13839   snprintf(buf64, sizeof(buf64), "%" INT64_MODIFIER "u",
13840     (unsigned PG_INT64_TYPE) ~((size_t) 0));
13841   if (strcmp(bufz, buf64) != 0)
13842     return 1;
13843   return 0;
13844 }
13845 _ACEOF
13846 if ac_fn_c_try_run "$LINENO"; then :
13847   pgac_cv_snprintf_size_t_support=yes
13848 else
13849   pgac_cv_snprintf_size_t_support=no
13850 fi
13851 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13852   conftest.$ac_objext conftest.beam conftest.$ac_ext
13853 fi
13854
13855
13856 fi
13857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_size_t_support" >&5
13858 $as_echo "$pgac_cv_snprintf_size_t_support" >&6; }
13859
13860   if test "$pgac_cv_snprintf_size_t_support" != yes; then
13861     pgac_need_repl_snprintf=yes
13862   fi
13863 fi
13864
13865 # Now we have checked all the reasons to replace snprintf
13866 if test $pgac_need_repl_snprintf = yes; then
13867
13868 $as_echo "#define USE_REPL_SNPRINTF 1" >>confdefs.h
13869
13870   case " $LIBOBJS " in
13871   *" snprintf.$ac_objext "* ) ;;
13872   *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
13873  ;;
13874 esac
13875
13876 fi
13877
13878 # Check size of void *, size_t (enables tweaks for > 32bit address space)
13879 # The cast to long int works around a bug in the HP C Compiler
13880 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13881 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13882 # This bug is HP SR number 8606223364.
13883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
13884 $as_echo_n "checking size of void *... " >&6; }
13885 if ${ac_cv_sizeof_void_p+:} false; then :
13886   $as_echo_n "(cached) " >&6
13887 else
13888   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p"        "$ac_includes_default"; then :
13889
13890 else
13891   if test "$ac_cv_type_void_p" = yes; then
13892      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13893 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13894 as_fn_error 77 "cannot compute sizeof (void *)
13895 See \`config.log' for more details" "$LINENO" 5; }
13896    else
13897      ac_cv_sizeof_void_p=0
13898    fi
13899 fi
13900
13901 fi
13902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
13903 $as_echo "$ac_cv_sizeof_void_p" >&6; }
13904
13905
13906
13907 cat >>confdefs.h <<_ACEOF
13908 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
13909 _ACEOF
13910
13911
13912 # The cast to long int works around a bug in the HP C Compiler
13913 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13914 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13915 # This bug is HP SR number 8606223364.
13916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
13917 $as_echo_n "checking size of size_t... " >&6; }
13918 if ${ac_cv_sizeof_size_t+:} false; then :
13919   $as_echo_n "(cached) " >&6
13920 else
13921   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t"        "$ac_includes_default"; then :
13922
13923 else
13924   if test "$ac_cv_type_size_t" = yes; then
13925      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13926 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13927 as_fn_error 77 "cannot compute sizeof (size_t)
13928 See \`config.log' for more details" "$LINENO" 5; }
13929    else
13930      ac_cv_sizeof_size_t=0
13931    fi
13932 fi
13933
13934 fi
13935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
13936 $as_echo "$ac_cv_sizeof_size_t" >&6; }
13937
13938
13939
13940 cat >>confdefs.h <<_ACEOF
13941 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
13942 _ACEOF
13943
13944
13945 # The cast to long int works around a bug in the HP C Compiler
13946 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13947 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13948 # This bug is HP SR number 8606223364.
13949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
13950 $as_echo_n "checking size of long... " >&6; }
13951 if ${ac_cv_sizeof_long+:} false; then :
13952   $as_echo_n "(cached) " >&6
13953 else
13954   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
13955
13956 else
13957   if test "$ac_cv_type_long" = yes; then
13958      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13959 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13960 as_fn_error 77 "cannot compute sizeof (long)
13961 See \`config.log' for more details" "$LINENO" 5; }
13962    else
13963      ac_cv_sizeof_long=0
13964    fi
13965 fi
13966
13967 fi
13968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
13969 $as_echo "$ac_cv_sizeof_long" >&6; }
13970
13971
13972
13973 cat >>confdefs.h <<_ACEOF
13974 #define SIZEOF_LONG $ac_cv_sizeof_long
13975 _ACEOF
13976
13977
13978
13979 # Decide whether float4 is passed by value: user-selectable, enabled by default
13980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float4 passed by value" >&5
13981 $as_echo_n "checking whether to build with float4 passed by value... " >&6; }
13982
13983
13984 # Check whether --enable-float4-byval was given.
13985 if test "${enable_float4_byval+set}" = set; then :
13986   enableval=$enable_float4_byval;
13987   case $enableval in
13988     yes)
13989
13990 $as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
13991
13992                float4passbyval=true
13993       ;;
13994     no)
13995       float4passbyval=false
13996       ;;
13997     *)
13998       as_fn_error $? "no argument expected for --enable-float4-byval option" "$LINENO" 5
13999       ;;
14000   esac
14001
14002 else
14003   enable_float4_byval=yes
14004
14005 $as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
14006
14007                float4passbyval=true
14008 fi
14009
14010
14011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float4_byval" >&5
14012 $as_echo "$enable_float4_byval" >&6; }
14013
14014 cat >>confdefs.h <<_ACEOF
14015 #define FLOAT4PASSBYVAL $float4passbyval
14016 _ACEOF
14017
14018
14019 # Decide whether float8 is passed by value.
14020 # Note: this setting also controls int8 and related types such as timestamp.
14021 # If sizeof(Datum) >= 8, this is user-selectable, enabled by default.
14022 # If not, trying to select it is an error.
14023 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float8 passed by value" >&5
14024 $as_echo_n "checking whether to build with float8 passed by value... " >&6; }
14025 if test $ac_cv_sizeof_void_p -ge 8 ; then
14026
14027
14028 # Check whether --enable-float8-byval was given.
14029 if test "${enable_float8_byval+set}" = set; then :
14030   enableval=$enable_float8_byval;
14031   case $enableval in
14032     yes)
14033       :
14034       ;;
14035     no)
14036       :
14037       ;;
14038     *)
14039       as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
14040       ;;
14041   esac
14042
14043 else
14044   enable_float8_byval=yes
14045
14046 fi
14047
14048
14049 else
14050
14051
14052 # Check whether --enable-float8-byval was given.
14053 if test "${enable_float8_byval+set}" = set; then :
14054   enableval=$enable_float8_byval;
14055   case $enableval in
14056     yes)
14057       :
14058       ;;
14059     no)
14060       :
14061       ;;
14062     *)
14063       as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
14064       ;;
14065   esac
14066
14067 else
14068   enable_float8_byval=no
14069
14070 fi
14071
14072
14073   if test "$enable_float8_byval" = yes ; then
14074     as_fn_error $? "--enable-float8-byval is not supported on 32-bit platforms." "$LINENO" 5
14075   fi
14076 fi
14077 if test "$enable_float8_byval" = yes ; then
14078
14079 $as_echo "#define USE_FLOAT8_BYVAL 1" >>confdefs.h
14080
14081   float8passbyval=true
14082 else
14083   float8passbyval=false
14084 fi
14085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float8_byval" >&5
14086 $as_echo "$enable_float8_byval" >&6; }
14087
14088 cat >>confdefs.h <<_ACEOF
14089 #define FLOAT8PASSBYVAL $float8passbyval
14090 _ACEOF
14091
14092
14093 # Determine memory alignment requirements for the basic C data types.
14094
14095 # The cast to long int works around a bug in the HP C Compiler,
14096 # see AC_CHECK_SIZEOF for more information.
14097 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of short" >&5
14098 $as_echo_n "checking alignment of short... " >&6; }
14099 if ${ac_cv_alignof_short+:} false; then :
14100   $as_echo_n "(cached) " >&6
14101 else
14102   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_short"        "$ac_includes_default
14103 #ifndef offsetof
14104 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
14105 #endif
14106 typedef struct { char x; short y; } ac__type_alignof_;"; then :
14107
14108 else
14109   if test "$ac_cv_type_short" = yes; then
14110      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14111 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14112 as_fn_error 77 "cannot compute alignment of short
14113 See \`config.log' for more details" "$LINENO" 5; }
14114    else
14115      ac_cv_alignof_short=0
14116    fi
14117 fi
14118
14119 fi
14120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_short" >&5
14121 $as_echo "$ac_cv_alignof_short" >&6; }
14122
14123
14124
14125 cat >>confdefs.h <<_ACEOF
14126 #define ALIGNOF_SHORT $ac_cv_alignof_short
14127 _ACEOF
14128
14129
14130 # The cast to long int works around a bug in the HP C Compiler,
14131 # see AC_CHECK_SIZEOF for more information.
14132 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of int" >&5
14133 $as_echo_n "checking alignment of int... " >&6; }
14134 if ${ac_cv_alignof_int+:} false; then :
14135   $as_echo_n "(cached) " >&6
14136 else
14137   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_int"        "$ac_includes_default
14138 #ifndef offsetof
14139 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
14140 #endif
14141 typedef struct { char x; int y; } ac__type_alignof_;"; then :
14142
14143 else
14144   if test "$ac_cv_type_int" = yes; then
14145      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14146 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14147 as_fn_error 77 "cannot compute alignment of int
14148 See \`config.log' for more details" "$LINENO" 5; }
14149    else
14150      ac_cv_alignof_int=0
14151    fi
14152 fi
14153
14154 fi
14155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_int" >&5
14156 $as_echo "$ac_cv_alignof_int" >&6; }
14157
14158
14159
14160 cat >>confdefs.h <<_ACEOF
14161 #define ALIGNOF_INT $ac_cv_alignof_int
14162 _ACEOF
14163
14164
14165 # The cast to long int works around a bug in the HP C Compiler,
14166 # see AC_CHECK_SIZEOF for more information.
14167 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long" >&5
14168 $as_echo_n "checking alignment of long... " >&6; }
14169 if ${ac_cv_alignof_long+:} false; then :
14170   $as_echo_n "(cached) " >&6
14171 else
14172   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long"        "$ac_includes_default
14173 #ifndef offsetof
14174 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
14175 #endif
14176 typedef struct { char x; long y; } ac__type_alignof_;"; then :
14177
14178 else
14179   if test "$ac_cv_type_long" = yes; then
14180      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14181 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14182 as_fn_error 77 "cannot compute alignment of long
14183 See \`config.log' for more details" "$LINENO" 5; }
14184    else
14185      ac_cv_alignof_long=0
14186    fi
14187 fi
14188
14189 fi
14190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long" >&5
14191 $as_echo "$ac_cv_alignof_long" >&6; }
14192
14193
14194
14195 cat >>confdefs.h <<_ACEOF
14196 #define ALIGNOF_LONG $ac_cv_alignof_long
14197 _ACEOF
14198
14199
14200 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
14201   # The cast to long int works around a bug in the HP C Compiler,
14202 # see AC_CHECK_SIZEOF for more information.
14203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long long int" >&5
14204 $as_echo_n "checking alignment of long long int... " >&6; }
14205 if ${ac_cv_alignof_long_long_int+:} false; then :
14206   $as_echo_n "(cached) " >&6
14207 else
14208   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long_long_int"        "$ac_includes_default
14209 #ifndef offsetof
14210 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
14211 #endif
14212 typedef struct { char x; long long int y; } ac__type_alignof_;"; then :
14213
14214 else
14215   if test "$ac_cv_type_long_long_int" = yes; then
14216      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14217 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14218 as_fn_error 77 "cannot compute alignment of long long int
14219 See \`config.log' for more details" "$LINENO" 5; }
14220    else
14221      ac_cv_alignof_long_long_int=0
14222    fi
14223 fi
14224
14225 fi
14226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long_long_int" >&5
14227 $as_echo "$ac_cv_alignof_long_long_int" >&6; }
14228
14229
14230
14231 cat >>confdefs.h <<_ACEOF
14232 #define ALIGNOF_LONG_LONG_INT $ac_cv_alignof_long_long_int
14233 _ACEOF
14234
14235
14236 fi
14237 # The cast to long int works around a bug in the HP C Compiler,
14238 # see AC_CHECK_SIZEOF for more information.
14239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of double" >&5
14240 $as_echo_n "checking alignment of double... " >&6; }
14241 if ${ac_cv_alignof_double+:} false; then :
14242   $as_echo_n "(cached) " >&6
14243 else
14244   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_double"        "$ac_includes_default
14245 #ifndef offsetof
14246 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
14247 #endif
14248 typedef struct { char x; double y; } ac__type_alignof_;"; then :
14249
14250 else
14251   if test "$ac_cv_type_double" = yes; then
14252      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14253 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14254 as_fn_error 77 "cannot compute alignment of double
14255 See \`config.log' for more details" "$LINENO" 5; }
14256    else
14257      ac_cv_alignof_double=0
14258    fi
14259 fi
14260
14261 fi
14262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_double" >&5
14263 $as_echo "$ac_cv_alignof_double" >&6; }
14264
14265
14266
14267 cat >>confdefs.h <<_ACEOF
14268 #define ALIGNOF_DOUBLE $ac_cv_alignof_double
14269 _ACEOF
14270
14271
14272
14273 # Compute maximum alignment of any basic type.
14274 # We assume long's alignment is at least as strong as char, short, or int;
14275 # but we must check long long (if it exists) and double.
14276
14277 MAX_ALIGNOF=$ac_cv_alignof_long
14278 if test $MAX_ALIGNOF -lt $ac_cv_alignof_double ; then
14279   MAX_ALIGNOF=$ac_cv_alignof_double
14280 fi
14281 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $ac_cv_alignof_long_long_int ; then
14282   MAX_ALIGNOF="$ac_cv_alignof_long_long_int"
14283 fi
14284
14285 cat >>confdefs.h <<_ACEOF
14286 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
14287 _ACEOF
14288
14289
14290
14291 # Some platforms predefine the types int8, int16, etc.  Only check
14292 # a (hopefully) representative subset.
14293 ac_fn_c_check_type "$LINENO" "int8" "ac_cv_type_int8" "#include <stdio.h>
14294 "
14295 if test "x$ac_cv_type_int8" = xyes; then :
14296
14297 cat >>confdefs.h <<_ACEOF
14298 #define HAVE_INT8 1
14299 _ACEOF
14300
14301
14302 fi
14303 ac_fn_c_check_type "$LINENO" "uint8" "ac_cv_type_uint8" "#include <stdio.h>
14304 "
14305 if test "x$ac_cv_type_uint8" = xyes; then :
14306
14307 cat >>confdefs.h <<_ACEOF
14308 #define HAVE_UINT8 1
14309 _ACEOF
14310
14311
14312 fi
14313 ac_fn_c_check_type "$LINENO" "int64" "ac_cv_type_int64" "#include <stdio.h>
14314 "
14315 if test "x$ac_cv_type_int64" = xyes; then :
14316
14317 cat >>confdefs.h <<_ACEOF
14318 #define HAVE_INT64 1
14319 _ACEOF
14320
14321
14322 fi
14323 ac_fn_c_check_type "$LINENO" "uint64" "ac_cv_type_uint64" "#include <stdio.h>
14324 "
14325 if test "x$ac_cv_type_uint64" = xyes; then :
14326
14327 cat >>confdefs.h <<_ACEOF
14328 #define HAVE_UINT64 1
14329 _ACEOF
14330
14331
14332 fi
14333
14334
14335 # Check for extensions offering the integer scalar type __int128.
14336 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128" >&5
14337 $as_echo_n "checking for __int128... " >&6; }
14338 if ${pgac_cv__128bit_int+:} false; then :
14339   $as_echo_n "(cached) " >&6
14340 else
14341   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14342 /* end confdefs.h.  */
14343
14344 /*
14345  * These are globals to discourage the compiler from folding all the
14346  * arithmetic tests down to compile-time constants.  We do not have
14347  * convenient support for 64bit literals at this point...
14348  */
14349 __int128 a = 48828125;
14350 __int128 b = 97656255;
14351
14352 int
14353 main ()
14354 {
14355
14356 __int128 c,d;
14357 a = (a << 12) + 1; /* 200000000001 */
14358 b = (b << 12) + 5; /* 400000000005 */
14359 /* use the most relevant arithmetic ops */
14360 c = a * b;
14361 d = (c + b) / b;
14362 /* return different values, to prevent optimizations */
14363 if (d != a+1)
14364   return 0;
14365 return 1;
14366
14367   ;
14368   return 0;
14369 }
14370 _ACEOF
14371 if ac_fn_c_try_link "$LINENO"; then :
14372   pgac_cv__128bit_int=yes
14373 else
14374   pgac_cv__128bit_int=no
14375 fi
14376 rm -f core conftest.err conftest.$ac_objext \
14377     conftest$ac_exeext conftest.$ac_ext
14378 fi
14379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int" >&5
14380 $as_echo "$pgac_cv__128bit_int" >&6; }
14381 if test x"$pgac_cv__128bit_int" = xyes ; then
14382
14383 $as_echo "#define PG_INT128_TYPE __int128" >>confdefs.h
14384
14385 fi
14386
14387 # Check for various atomic operations now that we have checked how to declare
14388 # 64bit integers.
14389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync char locking functions" >&5
14390 $as_echo_n "checking for builtin __sync char locking functions... " >&6; }
14391 if ${pgac_cv_gcc_sync_char_tas+:} false; then :
14392   $as_echo_n "(cached) " >&6
14393 else
14394   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14395 /* end confdefs.h.  */
14396
14397 int
14398 main ()
14399 {
14400 char lock = 0;
14401    __sync_lock_test_and_set(&lock, 1);
14402    __sync_lock_release(&lock);
14403   ;
14404   return 0;
14405 }
14406 _ACEOF
14407 if ac_fn_c_try_link "$LINENO"; then :
14408   pgac_cv_gcc_sync_char_tas="yes"
14409 else
14410   pgac_cv_gcc_sync_char_tas="no"
14411 fi
14412 rm -f core conftest.err conftest.$ac_objext \
14413     conftest$ac_exeext conftest.$ac_ext
14414 fi
14415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_char_tas" >&5
14416 $as_echo "$pgac_cv_gcc_sync_char_tas" >&6; }
14417 if test x"$pgac_cv_gcc_sync_char_tas" = x"yes"; then
14418
14419 $as_echo "#define HAVE_GCC__SYNC_CHAR_TAS 1" >>confdefs.h
14420
14421 fi
14422 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 locking functions" >&5
14423 $as_echo_n "checking for builtin __sync int32 locking functions... " >&6; }
14424 if ${pgac_cv_gcc_sync_int32_tas+:} false; then :
14425   $as_echo_n "(cached) " >&6
14426 else
14427   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14428 /* end confdefs.h.  */
14429
14430 int
14431 main ()
14432 {
14433 int lock = 0;
14434    __sync_lock_test_and_set(&lock, 1);
14435    __sync_lock_release(&lock);
14436   ;
14437   return 0;
14438 }
14439 _ACEOF
14440 if ac_fn_c_try_link "$LINENO"; then :
14441   pgac_cv_gcc_sync_int32_tas="yes"
14442 else
14443   pgac_cv_gcc_sync_int32_tas="no"
14444 fi
14445 rm -f core conftest.err conftest.$ac_objext \
14446     conftest$ac_exeext conftest.$ac_ext
14447 fi
14448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_tas" >&5
14449 $as_echo "$pgac_cv_gcc_sync_int32_tas" >&6; }
14450 if test x"$pgac_cv_gcc_sync_int32_tas" = x"yes"; then
14451
14452 $as_echo "#define HAVE_GCC__SYNC_INT32_TAS 1" >>confdefs.h
14453
14454 fi
14455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 atomic operations" >&5
14456 $as_echo_n "checking for builtin __sync int32 atomic operations... " >&6; }
14457 if ${pgac_cv_gcc_sync_int32_cas+:} false; then :
14458   $as_echo_n "(cached) " >&6
14459 else
14460   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14461 /* end confdefs.h.  */
14462
14463 int
14464 main ()
14465 {
14466 int val = 0;
14467    __sync_val_compare_and_swap(&val, 0, 37);
14468   ;
14469   return 0;
14470 }
14471 _ACEOF
14472 if ac_fn_c_try_link "$LINENO"; then :
14473   pgac_cv_gcc_sync_int32_cas="yes"
14474 else
14475   pgac_cv_gcc_sync_int32_cas="no"
14476 fi
14477 rm -f core conftest.err conftest.$ac_objext \
14478     conftest$ac_exeext conftest.$ac_ext
14479 fi
14480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_cas" >&5
14481 $as_echo "$pgac_cv_gcc_sync_int32_cas" >&6; }
14482 if test x"$pgac_cv_gcc_sync_int32_cas" = x"yes"; then
14483
14484 $as_echo "#define HAVE_GCC__SYNC_INT32_CAS 1" >>confdefs.h
14485
14486 fi
14487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int64 atomic operations" >&5
14488 $as_echo_n "checking for builtin __sync int64 atomic operations... " >&6; }
14489 if ${pgac_cv_gcc_sync_int64_cas+:} false; then :
14490   $as_echo_n "(cached) " >&6
14491 else
14492   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14493 /* end confdefs.h.  */
14494
14495 int
14496 main ()
14497 {
14498 PG_INT64_TYPE lock = 0;
14499    __sync_val_compare_and_swap(&lock, 0, (PG_INT64_TYPE) 37);
14500   ;
14501   return 0;
14502 }
14503 _ACEOF
14504 if ac_fn_c_try_link "$LINENO"; then :
14505   pgac_cv_gcc_sync_int64_cas="yes"
14506 else
14507   pgac_cv_gcc_sync_int64_cas="no"
14508 fi
14509 rm -f core conftest.err conftest.$ac_objext \
14510     conftest$ac_exeext conftest.$ac_ext
14511 fi
14512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int64_cas" >&5
14513 $as_echo "$pgac_cv_gcc_sync_int64_cas" >&6; }
14514 if test x"$pgac_cv_gcc_sync_int64_cas" = x"yes"; then
14515
14516 $as_echo "#define HAVE_GCC__SYNC_INT64_CAS 1" >>confdefs.h
14517
14518 fi
14519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int32 atomic operations" >&5
14520 $as_echo_n "checking for builtin __atomic int32 atomic operations... " >&6; }
14521 if ${pgac_cv_gcc_atomic_int32_cas+:} false; then :
14522   $as_echo_n "(cached) " >&6
14523 else
14524   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14525 /* end confdefs.h.  */
14526
14527 int
14528 main ()
14529 {
14530 int val = 0;
14531    int expect = 0;
14532    __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
14533   ;
14534   return 0;
14535 }
14536 _ACEOF
14537 if ac_fn_c_try_link "$LINENO"; then :
14538   pgac_cv_gcc_atomic_int32_cas="yes"
14539 else
14540   pgac_cv_gcc_atomic_int32_cas="no"
14541 fi
14542 rm -f core conftest.err conftest.$ac_objext \
14543     conftest$ac_exeext conftest.$ac_ext
14544 fi
14545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int32_cas" >&5
14546 $as_echo "$pgac_cv_gcc_atomic_int32_cas" >&6; }
14547 if test x"$pgac_cv_gcc_atomic_int32_cas" = x"yes"; then
14548
14549 $as_echo "#define HAVE_GCC__ATOMIC_INT32_CAS 1" >>confdefs.h
14550
14551 fi
14552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int64 atomic operations" >&5
14553 $as_echo_n "checking for builtin __atomic int64 atomic operations... " >&6; }
14554 if ${pgac_cv_gcc_atomic_int64_cas+:} false; then :
14555   $as_echo_n "(cached) " >&6
14556 else
14557   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14558 /* end confdefs.h.  */
14559
14560 int
14561 main ()
14562 {
14563 PG_INT64_TYPE val = 0;
14564    PG_INT64_TYPE expect = 0;
14565    __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
14566   ;
14567   return 0;
14568 }
14569 _ACEOF
14570 if ac_fn_c_try_link "$LINENO"; then :
14571   pgac_cv_gcc_atomic_int64_cas="yes"
14572 else
14573   pgac_cv_gcc_atomic_int64_cas="no"
14574 fi
14575 rm -f core conftest.err conftest.$ac_objext \
14576     conftest$ac_exeext conftest.$ac_ext
14577 fi
14578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int64_cas" >&5
14579 $as_echo "$pgac_cv_gcc_atomic_int64_cas" >&6; }
14580 if test x"$pgac_cv_gcc_atomic_int64_cas" = x"yes"; then
14581
14582 $as_echo "#define HAVE_GCC__ATOMIC_INT64_CAS 1" >>confdefs.h
14583
14584 fi
14585
14586
14587 # Check for x86 cpuid instruction
14588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __get_cpuid" >&5
14589 $as_echo_n "checking for __get_cpuid... " >&6; }
14590 if ${pgac_cv__get_cpuid+:} false; then :
14591   $as_echo_n "(cached) " >&6
14592 else
14593   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14594 /* end confdefs.h.  */
14595 #include <cpuid.h>
14596 int
14597 main ()
14598 {
14599 unsigned int exx[4] = {0, 0, 0, 0};
14600   __get_cpuid(1, &exx[0], &exx[1], &exx[2], &exx[3]);
14601
14602   ;
14603   return 0;
14604 }
14605 _ACEOF
14606 if ac_fn_c_try_link "$LINENO"; then :
14607   pgac_cv__get_cpuid="yes"
14608 else
14609   pgac_cv__get_cpuid="no"
14610 fi
14611 rm -f core conftest.err conftest.$ac_objext \
14612     conftest$ac_exeext conftest.$ac_ext
14613 fi
14614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__get_cpuid" >&5
14615 $as_echo "$pgac_cv__get_cpuid" >&6; }
14616 if test x"$pgac_cv__get_cpuid" = x"yes"; then
14617
14618 $as_echo "#define HAVE__GET_CPUID 1" >>confdefs.h
14619
14620 fi
14621
14622 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __cpuid" >&5
14623 $as_echo_n "checking for __cpuid... " >&6; }
14624 if ${pgac_cv__cpuid+:} false; then :
14625   $as_echo_n "(cached) " >&6
14626 else
14627   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14628 /* end confdefs.h.  */
14629 #include <intrin.h>
14630 int
14631 main ()
14632 {
14633 unsigned int exx[4] = {0, 0, 0, 0};
14634   __get_cpuid(exx[0], 1);
14635
14636   ;
14637   return 0;
14638 }
14639 _ACEOF
14640 if ac_fn_c_try_link "$LINENO"; then :
14641   pgac_cv__cpuid="yes"
14642 else
14643   pgac_cv__cpuid="no"
14644 fi
14645 rm -f core conftest.err conftest.$ac_objext \
14646     conftest$ac_exeext conftest.$ac_ext
14647 fi
14648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__cpuid" >&5
14649 $as_echo "$pgac_cv__cpuid" >&6; }
14650 if test x"$pgac_cv__cpuid" = x"yes"; then
14651
14652 $as_echo "#define HAVE__CPUID 1" >>confdefs.h
14653
14654 fi
14655
14656 # Check for Intel SSE 4.2 intrinsics to do CRC calculations.
14657 #
14658 # First check if the _mm_crc32_u8 and _mm_crc32_u64 intrinsics can be used
14659 # with the default compiler flags. If not, check if adding the -msse4.2
14660 # flag helps. CFLAGS_SSE42 is set to -msse4.2 if that's required.
14661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=" >&5
14662 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=... " >&6; }
14663 if ${pgac_cv_sse42_crc32_intrinsics_+:} false; then :
14664   $as_echo_n "(cached) " >&6
14665 else
14666   pgac_save_CFLAGS=$CFLAGS
14667 CFLAGS="$pgac_save_CFLAGS "
14668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14669 /* end confdefs.h.  */
14670 #include <nmmintrin.h>
14671 int
14672 main ()
14673 {
14674 unsigned int crc = 0;
14675    crc = _mm_crc32_u8(crc, 0);
14676    crc = _mm_crc32_u32(crc, 0);
14677    /* return computed value, to prevent the above being optimized away */
14678    return crc == 0;
14679   ;
14680   return 0;
14681 }
14682 _ACEOF
14683 if ac_fn_c_try_link "$LINENO"; then :
14684   pgac_cv_sse42_crc32_intrinsics_=yes
14685 else
14686   pgac_cv_sse42_crc32_intrinsics_=no
14687 fi
14688 rm -f core conftest.err conftest.$ac_objext \
14689     conftest$ac_exeext conftest.$ac_ext
14690 CFLAGS="$pgac_save_CFLAGS"
14691 fi
14692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics_" >&5
14693 $as_echo "$pgac_cv_sse42_crc32_intrinsics_" >&6; }
14694 if test x"$pgac_cv_sse42_crc32_intrinsics_" = x"yes"; then
14695   CFLAGS_SSE42=""
14696   pgac_sse42_crc32_intrinsics=yes
14697 fi
14698
14699 if test x"$pgac_sse42_crc32_intrinsics" != x"yes"; then
14700   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2" >&5
14701 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2... " >&6; }
14702 if ${pgac_cv_sse42_crc32_intrinsics__msse4_2+:} false; then :
14703   $as_echo_n "(cached) " >&6
14704 else
14705   pgac_save_CFLAGS=$CFLAGS
14706 CFLAGS="$pgac_save_CFLAGS -msse4.2"
14707 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14708 /* end confdefs.h.  */
14709 #include <nmmintrin.h>
14710 int
14711 main ()
14712 {
14713 unsigned int crc = 0;
14714    crc = _mm_crc32_u8(crc, 0);
14715    crc = _mm_crc32_u32(crc, 0);
14716    /* return computed value, to prevent the above being optimized away */
14717    return crc == 0;
14718   ;
14719   return 0;
14720 }
14721 _ACEOF
14722 if ac_fn_c_try_link "$LINENO"; then :
14723   pgac_cv_sse42_crc32_intrinsics__msse4_2=yes
14724 else
14725   pgac_cv_sse42_crc32_intrinsics__msse4_2=no
14726 fi
14727 rm -f core conftest.err conftest.$ac_objext \
14728     conftest$ac_exeext conftest.$ac_ext
14729 CFLAGS="$pgac_save_CFLAGS"
14730 fi
14731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics__msse4_2" >&5
14732 $as_echo "$pgac_cv_sse42_crc32_intrinsics__msse4_2" >&6; }
14733 if test x"$pgac_cv_sse42_crc32_intrinsics__msse4_2" = x"yes"; then
14734   CFLAGS_SSE42="-msse4.2"
14735   pgac_sse42_crc32_intrinsics=yes
14736 fi
14737
14738 fi
14739
14740
14741 # Are we targeting a processor that supports SSE 4.2? gcc, clang and icc all
14742 # define __SSE4_2__ in that case.
14743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14744 /* end confdefs.h.  */
14745
14746 int
14747 main ()
14748 {
14749
14750 #ifndef __SSE4_2__
14751 #error __SSE4_2__ not defined
14752 #endif
14753
14754   ;
14755   return 0;
14756 }
14757 _ACEOF
14758 if ac_fn_c_try_compile "$LINENO"; then :
14759   SSE4_2_TARGETED=1
14760 fi
14761 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14762
14763 # Select CRC-32C implementation.
14764 #
14765 # If we are targeting a processor that has SSE 4.2 instructions, we can use the
14766 # special CRC instructions for calculating CRC-32C. If we're not targeting such
14767 # a processor, but we can nevertheless produce code that uses the SSE
14768 # intrinsics, perhaps with some extra CFLAGS, compile both implementations and
14769 # select which one to use at runtime, depending on whether SSE 4.2 is supported
14770 # by the processor we're running on.
14771 #
14772 # You can override this logic by setting the appropriate USE_*_CRC32 flag to 1
14773 # in the template or configure command line.
14774 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
14775   if test x"$pgac_sse42_crc32_intrinsics" = x"yes" && test x"$SSE4_2_TARGETED" = x"1" ; then
14776     USE_SSE42_CRC32C=1
14777   else
14778     # the CPUID instruction is needed for the runtime check.
14779     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
14780       USE_SSE42_CRC32C_WITH_RUNTIME_CHECK=1
14781     else
14782       # fall back to slicing-by-8 algorithm which doesn't require any special
14783       # CPU support.
14784       USE_SLICING_BY_8_CRC32C=1
14785     fi
14786   fi
14787 fi
14788
14789 # Set PG_CRC32C_OBJS appropriately depending on the selected implementation.
14790 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which CRC-32C implementation to use" >&5
14791 $as_echo_n "checking which CRC-32C implementation to use... " >&6; }
14792 if test x"$USE_SSE42_CRC32C" = x"1"; then
14793
14794 $as_echo "#define USE_SSE42_CRC32C 1" >>confdefs.h
14795
14796   PG_CRC32C_OBJS="pg_crc32c_sse42.o"
14797   { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2" >&5
14798 $as_echo "SSE 4.2" >&6; }
14799 else
14800   if test x"$USE_SSE42_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
14801
14802 $as_echo "#define USE_SSE42_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
14803
14804     PG_CRC32C_OBJS="pg_crc32c_sse42.o pg_crc32c_sb8.o pg_crc32c_choose.o"
14805     { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2 with runtime check" >&5
14806 $as_echo "SSE 4.2 with runtime check" >&6; }
14807   else
14808
14809 $as_echo "#define USE_SLICING_BY_8_CRC32C 1" >>confdefs.h
14810
14811     PG_CRC32C_OBJS="pg_crc32c_sb8.o"
14812     { $as_echo "$as_me:${as_lineno-$LINENO}: result: slicing-by-8" >&5
14813 $as_echo "slicing-by-8" >&6; }
14814   fi
14815 fi
14816
14817
14818
14819 # Select semaphore implementation type.
14820 if test "$PORTNAME" != "win32"; then
14821   if test x"$PREFERRED_SEMAPHORES" = x"NAMED_POSIX" ; then
14822     # Need sem_open for this
14823     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_open" >&5
14824 $as_echo_n "checking for library containing sem_open... " >&6; }
14825 if ${ac_cv_search_sem_open+:} false; then :
14826   $as_echo_n "(cached) " >&6
14827 else
14828   ac_func_search_save_LIBS=$LIBS
14829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14830 /* end confdefs.h.  */
14831
14832 /* Override any GCC internal prototype to avoid an error.
14833    Use char because int might match the return type of a GCC
14834    builtin and then its argument prototype would still apply.  */
14835 #ifdef __cplusplus
14836 extern "C"
14837 #endif
14838 char sem_open ();
14839 int
14840 main ()
14841 {
14842 return sem_open ();
14843   ;
14844   return 0;
14845 }
14846 _ACEOF
14847 for ac_lib in '' rt pthread; do
14848   if test -z "$ac_lib"; then
14849     ac_res="none required"
14850   else
14851     ac_res=-l$ac_lib
14852     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
14853   fi
14854   if ac_fn_c_try_link "$LINENO"; then :
14855   ac_cv_search_sem_open=$ac_res
14856 fi
14857 rm -f core conftest.err conftest.$ac_objext \
14858     conftest$ac_exeext
14859   if ${ac_cv_search_sem_open+:} false; then :
14860   break
14861 fi
14862 done
14863 if ${ac_cv_search_sem_open+:} false; then :
14864
14865 else
14866   ac_cv_search_sem_open=no
14867 fi
14868 rm conftest.$ac_ext
14869 LIBS=$ac_func_search_save_LIBS
14870 fi
14871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_open" >&5
14872 $as_echo "$ac_cv_search_sem_open" >&6; }
14873 ac_res=$ac_cv_search_sem_open
14874 if test "$ac_res" != no; then :
14875   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14876   USE_NAMED_POSIX_SEMAPHORES=1
14877 fi
14878
14879   fi
14880   if test x"$PREFERRED_SEMAPHORES" = x"UNNAMED_POSIX" ; then
14881     # Need sem_init for this
14882     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
14883 $as_echo_n "checking for library containing sem_init... " >&6; }
14884 if ${ac_cv_search_sem_init+:} false; then :
14885   $as_echo_n "(cached) " >&6
14886 else
14887   ac_func_search_save_LIBS=$LIBS
14888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14889 /* end confdefs.h.  */
14890
14891 /* Override any GCC internal prototype to avoid an error.
14892    Use char because int might match the return type of a GCC
14893    builtin and then its argument prototype would still apply.  */
14894 #ifdef __cplusplus
14895 extern "C"
14896 #endif
14897 char sem_init ();
14898 int
14899 main ()
14900 {
14901 return sem_init ();
14902   ;
14903   return 0;
14904 }
14905 _ACEOF
14906 for ac_lib in '' rt pthread; do
14907   if test -z "$ac_lib"; then
14908     ac_res="none required"
14909   else
14910     ac_res=-l$ac_lib
14911     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
14912   fi
14913   if ac_fn_c_try_link "$LINENO"; then :
14914   ac_cv_search_sem_init=$ac_res
14915 fi
14916 rm -f core conftest.err conftest.$ac_objext \
14917     conftest$ac_exeext
14918   if ${ac_cv_search_sem_init+:} false; then :
14919   break
14920 fi
14921 done
14922 if ${ac_cv_search_sem_init+:} false; then :
14923
14924 else
14925   ac_cv_search_sem_init=no
14926 fi
14927 rm conftest.$ac_ext
14928 LIBS=$ac_func_search_save_LIBS
14929 fi
14930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
14931 $as_echo "$ac_cv_search_sem_init" >&6; }
14932 ac_res=$ac_cv_search_sem_init
14933 if test "$ac_res" != no; then :
14934   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14935   USE_UNNAMED_POSIX_SEMAPHORES=1
14936 fi
14937
14938   fi
14939   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which semaphore API to use" >&5
14940 $as_echo_n "checking which semaphore API to use... " >&6; }
14941   if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
14942
14943 $as_echo "#define USE_NAMED_POSIX_SEMAPHORES 1" >>confdefs.h
14944
14945     SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
14946     sematype="named POSIX"
14947   else
14948     if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
14949
14950 $as_echo "#define USE_UNNAMED_POSIX_SEMAPHORES 1" >>confdefs.h
14951
14952       SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
14953       sematype="unnamed POSIX"
14954     else
14955
14956 $as_echo "#define USE_SYSV_SEMAPHORES 1" >>confdefs.h
14957
14958       SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
14959       sematype="System V"
14960     fi
14961   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sematype" >&5
14962 $as_echo "$sematype" >&6; }
14963   fi
14964 else
14965
14966 $as_echo "#define USE_WIN32_SEMAPHORES 1" >>confdefs.h
14967
14968   SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
14969 fi
14970
14971
14972 # Select shared-memory implementation type.
14973 if test "$PORTNAME" != "win32"; then
14974
14975 $as_echo "#define USE_SYSV_SHARED_MEMORY 1" >>confdefs.h
14976
14977   SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
14978 else
14979
14980 $as_echo "#define USE_WIN32_SHARED_MEMORY 1" >>confdefs.h
14981
14982   SHMEM_IMPLEMENTATION="src/backend/port/win32_shmem.c"
14983 fi
14984
14985 # If not set in template file, set bytes to use libc memset()
14986 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
14987   MEMSET_LOOP_LIMIT=1024
14988 fi
14989
14990 cat >>confdefs.h <<_ACEOF
14991 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
14992 _ACEOF
14993
14994
14995
14996 if test "$enable_nls" = yes ; then
14997
14998   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bind_textdomain_codeset" >&5
14999 $as_echo_n "checking for library containing bind_textdomain_codeset... " >&6; }
15000 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
15001   $as_echo_n "(cached) " >&6
15002 else
15003   ac_func_search_save_LIBS=$LIBS
15004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15005 /* end confdefs.h.  */
15006
15007 /* Override any GCC internal prototype to avoid an error.
15008    Use char because int might match the return type of a GCC
15009    builtin and then its argument prototype would still apply.  */
15010 #ifdef __cplusplus
15011 extern "C"
15012 #endif
15013 char bind_textdomain_codeset ();
15014 int
15015 main ()
15016 {
15017 return bind_textdomain_codeset ();
15018   ;
15019   return 0;
15020 }
15021 _ACEOF
15022 for ac_lib in '' intl; do
15023   if test -z "$ac_lib"; then
15024     ac_res="none required"
15025   else
15026     ac_res=-l$ac_lib
15027     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
15028   fi
15029   if ac_fn_c_try_link "$LINENO"; then :
15030   ac_cv_search_bind_textdomain_codeset=$ac_res
15031 fi
15032 rm -f core conftest.err conftest.$ac_objext \
15033     conftest$ac_exeext
15034   if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
15035   break
15036 fi
15037 done
15038 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
15039
15040 else
15041   ac_cv_search_bind_textdomain_codeset=no
15042 fi
15043 rm conftest.$ac_ext
15044 LIBS=$ac_func_search_save_LIBS
15045 fi
15046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bind_textdomain_codeset" >&5
15047 $as_echo "$ac_cv_search_bind_textdomain_codeset" >&6; }
15048 ac_res=$ac_cv_search_bind_textdomain_codeset
15049 if test "$ac_res" != no; then :
15050   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15051
15052 else
15053   as_fn_error $? "a gettext implementation is required for NLS" "$LINENO" 5
15054 fi
15055
15056   ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
15057 if test "x$ac_cv_header_libintl_h" = xyes; then :
15058
15059 else
15060   as_fn_error $? "header file <libintl.h> is required for NLS" "$LINENO" 5
15061 fi
15062
15063
15064   for ac_prog in msgfmt
15065 do
15066   # Extract the first word of "$ac_prog", so it can be a program name with args.
15067 set dummy $ac_prog; ac_word=$2
15068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15069 $as_echo_n "checking for $ac_word... " >&6; }
15070 if ${ac_cv_prog_MSGFMT+:} false; then :
15071   $as_echo_n "(cached) " >&6
15072 else
15073   if test -n "$MSGFMT"; then
15074   ac_cv_prog_MSGFMT="$MSGFMT" # Let the user override the test.
15075 else
15076 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15077 for as_dir in $PATH
15078 do
15079   IFS=$as_save_IFS
15080   test -z "$as_dir" && as_dir=.
15081     for ac_exec_ext in '' $ac_executable_extensions; do
15082   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15083     ac_cv_prog_MSGFMT="$ac_prog"
15084     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15085     break 2
15086   fi
15087 done
15088   done
15089 IFS=$as_save_IFS
15090
15091 fi
15092 fi
15093 MSGFMT=$ac_cv_prog_MSGFMT
15094 if test -n "$MSGFMT"; then
15095   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
15096 $as_echo "$MSGFMT" >&6; }
15097 else
15098   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15099 $as_echo "no" >&6; }
15100 fi
15101
15102
15103   test -n "$MSGFMT" && break
15104 done
15105
15106   if test -z "$MSGFMT"; then
15107     as_fn_error $? "msgfmt is required for NLS" "$LINENO" 5
15108   fi
15109   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msgfmt flags" >&5
15110 $as_echo_n "checking for msgfmt flags... " >&6; }
15111 if ${pgac_cv_msgfmt_flags+:} false; then :
15112   $as_echo_n "(cached) " >&6
15113 else
15114   if test x"$MSGFMT" != x"" && "$MSGFMT" --version 2>&1 | grep "GNU" >/dev/null; then
15115     pgac_cv_msgfmt_flags=-c
15116 fi
15117 fi
15118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_msgfmt_flags" >&5
15119 $as_echo "$pgac_cv_msgfmt_flags" >&6; }
15120   MSGFMT_FLAGS=$pgac_cv_msgfmt_flags
15121
15122   for ac_prog in msgmerge
15123 do
15124   # Extract the first word of "$ac_prog", so it can be a program name with args.
15125 set dummy $ac_prog; ac_word=$2
15126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15127 $as_echo_n "checking for $ac_word... " >&6; }
15128 if ${ac_cv_prog_MSGMERGE+:} false; then :
15129   $as_echo_n "(cached) " >&6
15130 else
15131   if test -n "$MSGMERGE"; then
15132   ac_cv_prog_MSGMERGE="$MSGMERGE" # Let the user override the test.
15133 else
15134 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15135 for as_dir in $PATH
15136 do
15137   IFS=$as_save_IFS
15138   test -z "$as_dir" && as_dir=.
15139     for ac_exec_ext in '' $ac_executable_extensions; do
15140   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15141     ac_cv_prog_MSGMERGE="$ac_prog"
15142     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15143     break 2
15144   fi
15145 done
15146   done
15147 IFS=$as_save_IFS
15148
15149 fi
15150 fi
15151 MSGMERGE=$ac_cv_prog_MSGMERGE
15152 if test -n "$MSGMERGE"; then
15153   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
15154 $as_echo "$MSGMERGE" >&6; }
15155 else
15156   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15157 $as_echo "no" >&6; }
15158 fi
15159
15160
15161   test -n "$MSGMERGE" && break
15162 done
15163
15164   for ac_prog in xgettext
15165 do
15166   # Extract the first word of "$ac_prog", so it can be a program name with args.
15167 set dummy $ac_prog; ac_word=$2
15168 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15169 $as_echo_n "checking for $ac_word... " >&6; }
15170 if ${ac_cv_prog_XGETTEXT+:} false; then :
15171   $as_echo_n "(cached) " >&6
15172 else
15173   if test -n "$XGETTEXT"; then
15174   ac_cv_prog_XGETTEXT="$XGETTEXT" # Let the user override the test.
15175 else
15176 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15177 for as_dir in $PATH
15178 do
15179   IFS=$as_save_IFS
15180   test -z "$as_dir" && as_dir=.
15181     for ac_exec_ext in '' $ac_executable_extensions; do
15182   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15183     ac_cv_prog_XGETTEXT="$ac_prog"
15184     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15185     break 2
15186   fi
15187 done
15188   done
15189 IFS=$as_save_IFS
15190
15191 fi
15192 fi
15193 XGETTEXT=$ac_cv_prog_XGETTEXT
15194 if test -n "$XGETTEXT"; then
15195   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
15196 $as_echo "$XGETTEXT" >&6; }
15197 else
15198   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15199 $as_echo "no" >&6; }
15200 fi
15201
15202
15203   test -n "$XGETTEXT" && break
15204 done
15205
15206
15207 fi
15208
15209 # Check for Tcl configuration script tclConfig.sh
15210 if test "$with_tcl" = yes; then
15211     for ac_prog in tclsh tcl tclsh8.6 tclsh86 tclsh8.5 tclsh85 tclsh8.4 tclsh84
15212 do
15213   # Extract the first word of "$ac_prog", so it can be a program name with args.
15214 set dummy $ac_prog; ac_word=$2
15215 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15216 $as_echo_n "checking for $ac_word... " >&6; }
15217 if ${ac_cv_path_TCLSH+:} false; then :
15218   $as_echo_n "(cached) " >&6
15219 else
15220   case $TCLSH in
15221   [\\/]* | ?:[\\/]*)
15222   ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
15223   ;;
15224   *)
15225   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15226 for as_dir in $PATH
15227 do
15228   IFS=$as_save_IFS
15229   test -z "$as_dir" && as_dir=.
15230     for ac_exec_ext in '' $ac_executable_extensions; do
15231   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15232     ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
15233     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15234     break 2
15235   fi
15236 done
15237   done
15238 IFS=$as_save_IFS
15239
15240   ;;
15241 esac
15242 fi
15243 TCLSH=$ac_cv_path_TCLSH
15244 if test -n "$TCLSH"; then
15245   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
15246 $as_echo "$TCLSH" >&6; }
15247 else
15248   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15249 $as_echo "no" >&6; }
15250 fi
15251
15252
15253   test -n "$TCLSH" && break
15254 done
15255
15256 if test x"$TCLSH" = x""; then
15257   as_fn_error $? "Tcl shell not found" "$LINENO" 5
15258 fi
15259
15260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclConfig.sh" >&5
15261 $as_echo_n "checking for tclConfig.sh... " >&6; }
15262 # Let user override test
15263 if test -z "$TCL_CONFIG_SH"; then
15264     pgac_test_dirs="$with_tclconfig"
15265
15266     set X $pgac_test_dirs; shift
15267     if test $# -eq 0; then
15268         test -z "$TCLSH" && as_fn_error $? "unable to locate tclConfig.sh because no Tcl shell was found" "$LINENO" 5
15269         set X `echo 'puts $auto_path' | $TCLSH`; shift
15270     fi
15271
15272     for pgac_dir do
15273         if test -r "$pgac_dir/tclConfig.sh"; then
15274             TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
15275             break
15276         fi
15277     done
15278 fi
15279
15280 if test -z "$TCL_CONFIG_SH"; then
15281     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15282 $as_echo "no" >&6; }
15283     as_fn_error $? "file 'tclConfig.sh' is required for Tcl" "$LINENO" 5
15284 else
15285     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCL_CONFIG_SH" >&5
15286 $as_echo "$TCL_CONFIG_SH" >&6; }
15287 fi
15288
15289
15290
15291     . "$TCL_CONFIG_SH"
15292 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
15293 eval TCL_LIBS=\"$TCL_LIBS\"
15294 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
15295 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
15296
15297         if test "$TCL_SHARED_BUILD" != 1; then
15298       as_fn_error $? "cannot build PL/Tcl because Tcl is not a shared library
15299 Use --without-tcl to disable building PL/Tcl." "$LINENO" 5
15300     fi
15301     # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
15302     ac_save_CPPFLAGS=$CPPFLAGS
15303     CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
15304     ac_fn_c_check_header_mongrel "$LINENO" "tcl.h" "ac_cv_header_tcl_h" "$ac_includes_default"
15305 if test "x$ac_cv_header_tcl_h" = xyes; then :
15306
15307 else
15308   as_fn_error $? "header file <tcl.h> is required for Tcl" "$LINENO" 5
15309 fi
15310
15311
15312     CPPFLAGS=$ac_save_CPPFLAGS
15313 fi
15314
15315 # check for <perl.h>
15316 if test "$with_perl" = yes; then
15317   ac_save_CPPFLAGS=$CPPFLAGS
15318   CPPFLAGS="$CPPFLAGS -I$perl_archlibexp/CORE"
15319   ac_fn_c_check_header_compile "$LINENO" "perl.h" "ac_cv_header_perl_h" "#include <EXTERN.h>
15320 "
15321 if test "x$ac_cv_header_perl_h" = xyes; then :
15322
15323 else
15324   as_fn_error $? "header file <perl.h> is required for Perl" "$LINENO" 5
15325 fi
15326
15327
15328   # While we're at it, check that we can link to libperl.
15329   # On most platforms, if perl.h is there then libperl.so will be too, but at
15330   # this writing Debian packages them separately.  There is no known reason to
15331   # waste cycles on separate probes for the Tcl or Python libraries, though.
15332   pgac_save_LIBS=$LIBS
15333   LIBS="$perl_embed_ldflags"
15334   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libperl" >&5
15335 $as_echo_n "checking for libperl... " >&6; }
15336   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15337 /* end confdefs.h.  */
15338
15339 #include <EXTERN.h>
15340 #include <perl.h>
15341
15342 int
15343 main ()
15344 {
15345 perl_alloc();
15346   ;
15347   return 0;
15348 }
15349 _ACEOF
15350 if ac_fn_c_try_link "$LINENO"; then :
15351   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15352 $as_echo "yes" >&6; }
15353 else
15354   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15355 $as_echo "no" >&6; }
15356      as_fn_error $? "libperl library is required for Perl" "$LINENO" 5
15357 fi
15358 rm -f core conftest.err conftest.$ac_objext \
15359     conftest$ac_exeext conftest.$ac_ext
15360   LIBS=$pgac_save_LIBS
15361   CPPFLAGS=$ac_save_CPPFLAGS
15362 fi
15363
15364 # check for <Python.h>
15365 if test "$with_python" = yes; then
15366   ac_save_CPPFLAGS=$CPPFLAGS
15367   CPPFLAGS="$python_includespec $CPPFLAGS"
15368   ac_fn_c_check_header_mongrel "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default"
15369 if test "x$ac_cv_header_Python_h" = xyes; then :
15370
15371 else
15372   as_fn_error $? "header file <Python.h> is required for Python" "$LINENO" 5
15373 fi
15374
15375
15376   CPPFLAGS=$ac_save_CPPFLAGS
15377 fi
15378
15379 #
15380 # Check for DocBook and tools
15381 #
15382 for ac_prog in onsgmls nsgmls
15383 do
15384   # Extract the first word of "$ac_prog", so it can be a program name with args.
15385 set dummy $ac_prog; ac_word=$2
15386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15387 $as_echo_n "checking for $ac_word... " >&6; }
15388 if ${ac_cv_prog_NSGMLS+:} false; then :
15389   $as_echo_n "(cached) " >&6
15390 else
15391   if test -n "$NSGMLS"; then
15392   ac_cv_prog_NSGMLS="$NSGMLS" # Let the user override the test.
15393 else
15394 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15395 for as_dir in $PATH
15396 do
15397   IFS=$as_save_IFS
15398   test -z "$as_dir" && as_dir=.
15399     for ac_exec_ext in '' $ac_executable_extensions; do
15400   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15401     ac_cv_prog_NSGMLS="$ac_prog"
15402     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15403     break 2
15404   fi
15405 done
15406   done
15407 IFS=$as_save_IFS
15408
15409 fi
15410 fi
15411 NSGMLS=$ac_cv_prog_NSGMLS
15412 if test -n "$NSGMLS"; then
15413   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NSGMLS" >&5
15414 $as_echo "$NSGMLS" >&6; }
15415 else
15416   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15417 $as_echo "no" >&6; }
15418 fi
15419
15420
15421   test -n "$NSGMLS" && break
15422 done
15423
15424 for ac_prog in openjade jade
15425 do
15426   # Extract the first word of "$ac_prog", so it can be a program name with args.
15427 set dummy $ac_prog; ac_word=$2
15428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15429 $as_echo_n "checking for $ac_word... " >&6; }
15430 if ${ac_cv_prog_JADE+:} false; then :
15431   $as_echo_n "(cached) " >&6
15432 else
15433   if test -n "$JADE"; then
15434   ac_cv_prog_JADE="$JADE" # Let the user override the test.
15435 else
15436 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15437 for as_dir in $PATH
15438 do
15439   IFS=$as_save_IFS
15440   test -z "$as_dir" && as_dir=.
15441     for ac_exec_ext in '' $ac_executable_extensions; do
15442   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15443     ac_cv_prog_JADE="$ac_prog"
15444     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15445     break 2
15446   fi
15447 done
15448   done
15449 IFS=$as_save_IFS
15450
15451 fi
15452 fi
15453 JADE=$ac_cv_prog_JADE
15454 if test -n "$JADE"; then
15455   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JADE" >&5
15456 $as_echo "$JADE" >&6; }
15457 else
15458   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15459 $as_echo "no" >&6; }
15460 fi
15461
15462
15463   test -n "$JADE" && break
15464 done
15465
15466
15467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DocBook V4.2" >&5
15468 $as_echo_n "checking for DocBook V4.2... " >&6; }
15469 if ${pgac_cv_check_docbook+:} false; then :
15470   $as_echo_n "(cached) " >&6
15471 else
15472   cat >conftest.sgml <<EOF
15473 <!doctype book PUBLIC "-//OASIS//DTD DocBook V4.2//EN">
15474 <book>
15475  <title>test</title>
15476  <chapter>
15477   <title>random</title>
15478    <sect1>
15479     <title>testsect</title>
15480     <para>text</para>
15481   </sect1>
15482  </chapter>
15483 </book>
15484 EOF
15485
15486 pgac_cv_check_docbook=no
15487
15488 if test -n "$NSGMLS"; then
15489   $NSGMLS -s conftest.sgml 1>&5 2>&1
15490   if test $? -eq 0; then
15491     pgac_cv_check_docbook=yes
15492   fi
15493 fi
15494 rm -f conftest.sgml
15495 fi
15496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_docbook" >&5
15497 $as_echo "$pgac_cv_check_docbook" >&6; }
15498
15499 have_docbook=$pgac_cv_check_docbook
15500
15501
15502 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DocBook stylesheets" >&5
15503 $as_echo_n "checking for DocBook stylesheets... " >&6; }
15504 if ${pgac_cv_path_stylesheets+:} false; then :
15505   $as_echo_n "(cached) " >&6
15506 else
15507   if test -n "$DOCBOOKSTYLE"; then
15508   pgac_cv_path_stylesheets=$DOCBOOKSTYLE
15509 else
15510   for pgac_prefix in /usr /usr/local /opt /sw; do
15511     for pgac_infix in share lib; do
15512       for pgac_postfix in \
15513         sgml/stylesheets/nwalsh-modular \
15514         sgml/stylesheets/docbook \
15515         sgml/stylesheets/dsssl/docbook \
15516         sgml/docbook-dsssl \
15517         sgml/docbook/dsssl/modular \
15518         sgml/docbook/stylesheet/dsssl/modular \
15519         sgml/docbook/dsssl-stylesheets \
15520         sgml/dsssl/docbook-dsssl-nwalsh
15521       do
15522         pgac_candidate=$pgac_prefix/$pgac_infix/$pgac_postfix
15523         if test -r "$pgac_candidate/html/docbook.dsl" \
15524            && test -r "$pgac_candidate/print/docbook.dsl"
15525         then
15526           pgac_cv_path_stylesheets=$pgac_candidate
15527           break 3
15528         fi
15529       done
15530     done
15531   done
15532 fi
15533 fi
15534
15535 DOCBOOKSTYLE=$pgac_cv_path_stylesheets
15536
15537 if test -n "$DOCBOOKSTYLE"; then
15538   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOCBOOKSTYLE" >&5
15539 $as_echo "$DOCBOOKSTYLE" >&6; }
15540 else
15541   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15542 $as_echo "no" >&6; }
15543 fi
15544 if test -n "$DOCBOOKSTYLE" -a -r "$DOCBOOKSTYLE/bin/collateindex.pl"; then
15545   COLLATEINDEX="$DOCBOOKSTYLE/bin/collateindex.pl"
15546
15547 else
15548   # Extract the first word of "collateindex.pl", so it can be a program name with args.
15549 set dummy collateindex.pl; ac_word=$2
15550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15551 $as_echo_n "checking for $ac_word... " >&6; }
15552 if ${ac_cv_path_COLLATEINDEX+:} false; then :
15553   $as_echo_n "(cached) " >&6
15554 else
15555   case $COLLATEINDEX in
15556   [\\/]* | ?:[\\/]*)
15557   ac_cv_path_COLLATEINDEX="$COLLATEINDEX" # Let the user override the test with a path.
15558   ;;
15559   *)
15560   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15561 for as_dir in $PATH
15562 do
15563   IFS=$as_save_IFS
15564   test -z "$as_dir" && as_dir=.
15565     for ac_exec_ext in '' $ac_executable_extensions; do
15566   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15567     ac_cv_path_COLLATEINDEX="$as_dir/$ac_word$ac_exec_ext"
15568     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15569     break 2
15570   fi
15571 done
15572   done
15573 IFS=$as_save_IFS
15574
15575   ;;
15576 esac
15577 fi
15578 COLLATEINDEX=$ac_cv_path_COLLATEINDEX
15579 if test -n "$COLLATEINDEX"; then
15580   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COLLATEINDEX" >&5
15581 $as_echo "$COLLATEINDEX" >&6; }
15582 else
15583   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15584 $as_echo "no" >&6; }
15585 fi
15586
15587
15588 fi
15589 for ac_prog in dbtoepub
15590 do
15591   # Extract the first word of "$ac_prog", so it can be a program name with args.
15592 set dummy $ac_prog; ac_word=$2
15593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15594 $as_echo_n "checking for $ac_word... " >&6; }
15595 if ${ac_cv_prog_DBTOEPUB+:} false; then :
15596   $as_echo_n "(cached) " >&6
15597 else
15598   if test -n "$DBTOEPUB"; then
15599   ac_cv_prog_DBTOEPUB="$DBTOEPUB" # Let the user override the test.
15600 else
15601 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15602 for as_dir in $PATH
15603 do
15604   IFS=$as_save_IFS
15605   test -z "$as_dir" && as_dir=.
15606     for ac_exec_ext in '' $ac_executable_extensions; do
15607   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15608     ac_cv_prog_DBTOEPUB="$ac_prog"
15609     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15610     break 2
15611   fi
15612 done
15613   done
15614 IFS=$as_save_IFS
15615
15616 fi
15617 fi
15618 DBTOEPUB=$ac_cv_prog_DBTOEPUB
15619 if test -n "$DBTOEPUB"; then
15620   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
15621 $as_echo "$DBTOEPUB" >&6; }
15622 else
15623   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15624 $as_echo "no" >&6; }
15625 fi
15626
15627
15628   test -n "$DBTOEPUB" && break
15629 done
15630
15631 for ac_prog in xmllint
15632 do
15633   # Extract the first word of "$ac_prog", so it can be a program name with args.
15634 set dummy $ac_prog; ac_word=$2
15635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15636 $as_echo_n "checking for $ac_word... " >&6; }
15637 if ${ac_cv_prog_XMLLINT+:} false; then :
15638   $as_echo_n "(cached) " >&6
15639 else
15640   if test -n "$XMLLINT"; then
15641   ac_cv_prog_XMLLINT="$XMLLINT" # Let the user override the test.
15642 else
15643 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15644 for as_dir in $PATH
15645 do
15646   IFS=$as_save_IFS
15647   test -z "$as_dir" && as_dir=.
15648     for ac_exec_ext in '' $ac_executable_extensions; do
15649   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15650     ac_cv_prog_XMLLINT="$ac_prog"
15651     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15652     break 2
15653   fi
15654 done
15655   done
15656 IFS=$as_save_IFS
15657
15658 fi
15659 fi
15660 XMLLINT=$ac_cv_prog_XMLLINT
15661 if test -n "$XMLLINT"; then
15662   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
15663 $as_echo "$XMLLINT" >&6; }
15664 else
15665   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15666 $as_echo "no" >&6; }
15667 fi
15668
15669
15670   test -n "$XMLLINT" && break
15671 done
15672
15673 for ac_prog in xsltproc
15674 do
15675   # Extract the first word of "$ac_prog", so it can be a program name with args.
15676 set dummy $ac_prog; ac_word=$2
15677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15678 $as_echo_n "checking for $ac_word... " >&6; }
15679 if ${ac_cv_prog_XSLTPROC+:} false; then :
15680   $as_echo_n "(cached) " >&6
15681 else
15682   if test -n "$XSLTPROC"; then
15683   ac_cv_prog_XSLTPROC="$XSLTPROC" # Let the user override the test.
15684 else
15685 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15686 for as_dir in $PATH
15687 do
15688   IFS=$as_save_IFS
15689   test -z "$as_dir" && as_dir=.
15690     for ac_exec_ext in '' $ac_executable_extensions; do
15691   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15692     ac_cv_prog_XSLTPROC="$ac_prog"
15693     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15694     break 2
15695   fi
15696 done
15697   done
15698 IFS=$as_save_IFS
15699
15700 fi
15701 fi
15702 XSLTPROC=$ac_cv_prog_XSLTPROC
15703 if test -n "$XSLTPROC"; then
15704   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
15705 $as_echo "$XSLTPROC" >&6; }
15706 else
15707   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15708 $as_echo "no" >&6; }
15709 fi
15710
15711
15712   test -n "$XSLTPROC" && break
15713 done
15714
15715 for ac_prog in osx sgml2xml sx
15716 do
15717   # Extract the first word of "$ac_prog", so it can be a program name with args.
15718 set dummy $ac_prog; ac_word=$2
15719 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15720 $as_echo_n "checking for $ac_word... " >&6; }
15721 if ${ac_cv_prog_OSX+:} false; then :
15722   $as_echo_n "(cached) " >&6
15723 else
15724   if test -n "$OSX"; then
15725   ac_cv_prog_OSX="$OSX" # Let the user override the test.
15726 else
15727 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15728 for as_dir in $PATH
15729 do
15730   IFS=$as_save_IFS
15731   test -z "$as_dir" && as_dir=.
15732     for ac_exec_ext in '' $ac_executable_extensions; do
15733   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15734     ac_cv_prog_OSX="$ac_prog"
15735     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15736     break 2
15737   fi
15738 done
15739   done
15740 IFS=$as_save_IFS
15741
15742 fi
15743 fi
15744 OSX=$ac_cv_prog_OSX
15745 if test -n "$OSX"; then
15746   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OSX" >&5
15747 $as_echo "$OSX" >&6; }
15748 else
15749   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15750 $as_echo "no" >&6; }
15751 fi
15752
15753
15754   test -n "$OSX" && break
15755 done
15756
15757
15758 #
15759 # Check for test tools
15760 #
15761 if test "$enable_tap_tests" = yes; then
15762   for ac_prog in prove
15763 do
15764   # Extract the first word of "$ac_prog", so it can be a program name with args.
15765 set dummy $ac_prog; ac_word=$2
15766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15767 $as_echo_n "checking for $ac_word... " >&6; }
15768 if ${ac_cv_prog_PROVE+:} false; then :
15769   $as_echo_n "(cached) " >&6
15770 else
15771   if test -n "$PROVE"; then
15772   ac_cv_prog_PROVE="$PROVE" # Let the user override the test.
15773 else
15774 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15775 for as_dir in $PATH
15776 do
15777   IFS=$as_save_IFS
15778   test -z "$as_dir" && as_dir=.
15779     for ac_exec_ext in '' $ac_executable_extensions; do
15780   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15781     ac_cv_prog_PROVE="$ac_prog"
15782     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15783     break 2
15784   fi
15785 done
15786   done
15787 IFS=$as_save_IFS
15788
15789 fi
15790 fi
15791 PROVE=$ac_cv_prog_PROVE
15792 if test -n "$PROVE"; then
15793   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
15794 $as_echo "$PROVE" >&6; }
15795 else
15796   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15797 $as_echo "no" >&6; }
15798 fi
15799
15800
15801   test -n "$PROVE" && break
15802 done
15803
15804   if test -z "$PROVE"; then
15805     as_fn_error $? "prove not found" "$LINENO" 5
15806   fi
15807   if test -z "$PERL"; then
15808     as_fn_error $? "Perl not found" "$LINENO" 5
15809   fi
15810 fi
15811
15812 # Thread testing
15813
15814 # We have to run the thread test near the end so we have all our symbols
15815 # defined.  Cross compiling throws a warning.
15816 #
15817 if test "$enable_thread_safety" = yes; then
15818 if test "$PORTNAME" != "win32"
15819 then
15820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking thread safety of required library functions" >&5
15821 $as_echo_n "checking thread safety of required library functions... " >&6; }
15822
15823 _CFLAGS="$CFLAGS"
15824 _LIBS="$LIBS"
15825 CFLAGS="$CFLAGS $PTHREAD_CFLAGS -DIN_CONFIGURE"
15826 LIBS="$LIBS $PTHREAD_LIBS"
15827 if test "$cross_compiling" = yes; then :
15828   { $as_echo "$as_me:${as_lineno-$LINENO}: result: maybe" >&5
15829 $as_echo "maybe" >&6; }
15830   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
15831 *** Skipping thread test program because of cross-compile build.
15832 *** Run the program in src/test/thread on the target machine.
15833 " >&5
15834 $as_echo "$as_me: WARNING:
15835 *** Skipping thread test program because of cross-compile build.
15836 *** Run the program in src/test/thread on the target machine.
15837 " >&2;}
15838 else
15839   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15840 /* end confdefs.h.  */
15841 #include "$srcdir/src/test/thread/thread_test.c"
15842 _ACEOF
15843 if ac_fn_c_try_run "$LINENO"; then :
15844   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15845 $as_echo "yes" >&6; }
15846 else
15847   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15848 $as_echo "no" >&6; }
15849   as_fn_error $? "thread test program failed
15850 This platform is not thread-safe.  Check the file 'config.log' or compile
15851 and run src/test/thread/thread_test for the exact reason.
15852 Use --disable-thread-safety to disable thread safety." "$LINENO" 5
15853 fi
15854 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15855   conftest.$ac_objext conftest.beam conftest.$ac_ext
15856 fi
15857
15858 CFLAGS="$_CFLAGS"
15859 LIBS="$_LIBS"
15860 else
15861 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** skipping thread test on Win32" >&5
15862 $as_echo "$as_me: WARNING: *** skipping thread test on Win32" >&2;}
15863 fi
15864 fi
15865
15866 # If compiler will take -Wl,--as-needed (or various platform-specific
15867 # spellings thereof) then add that to LDFLAGS.  This is much easier than
15868 # trying to filter LIBS to the minimum for each executable.
15869 # On (at least) some Red-Hat-derived systems, this switch breaks linking to
15870 # libreadline; therefore we postpone testing it until we know what library
15871 # dependencies readline has.  The test code will try to link with $LIBS.
15872 if test "$with_readline" = yes; then
15873   link_test_func=readline
15874 else
15875   link_test_func=exit
15876 fi
15877
15878 if test "$PORTNAME" = "darwin"; then
15879   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-dead_strip_dylibs" >&5
15880 $as_echo_n "checking whether $CC supports -Wl,-dead_strip_dylibs... " >&6; }
15881 if ${pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs+:} false; then :
15882   $as_echo_n "(cached) " >&6
15883 else
15884   pgac_save_LDFLAGS=$LDFLAGS
15885 LDFLAGS="$pgac_save_LDFLAGS -Wl,-dead_strip_dylibs"
15886 if test "$cross_compiling" = yes; then :
15887   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs="assuming no"
15888 else
15889   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15890 /* end confdefs.h.  */
15891 extern void $link_test_func (); void (*fptr) () = $link_test_func;
15892 int
15893 main ()
15894 {
15895
15896   ;
15897   return 0;
15898 }
15899 _ACEOF
15900 if ac_fn_c_try_run "$LINENO"; then :
15901   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=yes
15902 else
15903   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=no
15904 fi
15905 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15906   conftest.$ac_objext conftest.beam conftest.$ac_ext
15907 fi
15908
15909 LDFLAGS="$pgac_save_LDFLAGS"
15910 fi
15911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&5
15912 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&6; }
15913 if test x"$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" = x"yes"; then
15914   LDFLAGS="$LDFLAGS -Wl,-dead_strip_dylibs"
15915 fi
15916
15917 elif test "$PORTNAME" = "openbsd"; then
15918   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-Bdynamic" >&5
15919 $as_echo_n "checking whether $CC supports -Wl,-Bdynamic... " >&6; }
15920 if ${pgac_cv_prog_cc_ldflags__Wl__Bdynamic+:} false; then :
15921   $as_echo_n "(cached) " >&6
15922 else
15923   pgac_save_LDFLAGS=$LDFLAGS
15924 LDFLAGS="$pgac_save_LDFLAGS -Wl,-Bdynamic"
15925 if test "$cross_compiling" = yes; then :
15926   pgac_cv_prog_cc_ldflags__Wl__Bdynamic="assuming no"
15927 else
15928   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15929 /* end confdefs.h.  */
15930 extern void $link_test_func (); void (*fptr) () = $link_test_func;
15931 int
15932 main ()
15933 {
15934
15935   ;
15936   return 0;
15937 }
15938 _ACEOF
15939 if ac_fn_c_try_run "$LINENO"; then :
15940   pgac_cv_prog_cc_ldflags__Wl__Bdynamic=yes
15941 else
15942   pgac_cv_prog_cc_ldflags__Wl__Bdynamic=no
15943 fi
15944 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15945   conftest.$ac_objext conftest.beam conftest.$ac_ext
15946 fi
15947
15948 LDFLAGS="$pgac_save_LDFLAGS"
15949 fi
15950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&5
15951 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&6; }
15952 if test x"$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" = x"yes"; then
15953   LDFLAGS="$LDFLAGS -Wl,-Bdynamic"
15954 fi
15955
15956 else
15957   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,--as-needed" >&5
15958 $as_echo_n "checking whether $CC supports -Wl,--as-needed... " >&6; }
15959 if ${pgac_cv_prog_cc_ldflags__Wl___as_needed+:} false; then :
15960   $as_echo_n "(cached) " >&6
15961 else
15962   pgac_save_LDFLAGS=$LDFLAGS
15963 LDFLAGS="$pgac_save_LDFLAGS -Wl,--as-needed"
15964 if test "$cross_compiling" = yes; then :
15965   pgac_cv_prog_cc_ldflags__Wl___as_needed="assuming no"
15966 else
15967   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15968 /* end confdefs.h.  */
15969 extern void $link_test_func (); void (*fptr) () = $link_test_func;
15970 int
15971 main ()
15972 {
15973
15974   ;
15975   return 0;
15976 }
15977 _ACEOF
15978 if ac_fn_c_try_run "$LINENO"; then :
15979   pgac_cv_prog_cc_ldflags__Wl___as_needed=yes
15980 else
15981   pgac_cv_prog_cc_ldflags__Wl___as_needed=no
15982 fi
15983 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15984   conftest.$ac_objext conftest.beam conftest.$ac_ext
15985 fi
15986
15987 LDFLAGS="$pgac_save_LDFLAGS"
15988 fi
15989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl___as_needed" >&5
15990 $as_echo "$pgac_cv_prog_cc_ldflags__Wl___as_needed" >&6; }
15991 if test x"$pgac_cv_prog_cc_ldflags__Wl___as_needed" = x"yes"; then
15992   LDFLAGS="$LDFLAGS -Wl,--as-needed"
15993 fi
15994
15995 fi
15996
15997 # Create compiler version string
15998 if test x"$GCC" = x"yes" ; then
15999   cc_string=`${CC} --version | sed q`
16000   case $cc_string in [A-Za-z]*) ;; *) cc_string="GCC $cc_string";; esac
16001 elif test x"$SUN_STUDIO_CC" = x"yes" ; then
16002   cc_string=`${CC} -V 2>&1 | sed q`
16003 else
16004   cc_string=$CC
16005 fi
16006
16007
16008 cat >>confdefs.h <<_ACEOF
16009 #define PG_VERSION_STR "PostgreSQL $PG_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"
16010 _ACEOF
16011
16012
16013 # Supply a numeric version string for use by 3rd party add-ons
16014 # awk -F is a regex on some platforms, and not on others, so make "." a tab
16015 PG_VERSION_NUM="`echo "$PACKAGE_VERSION" | sed 's/[A-Za-z].*$//' |
16016 tr '.' '        ' |
16017 $AWK '{printf "%d%02d%02d", $1, $2, (NF >= 3) ? $3 : 0}'`"
16018
16019 cat >>confdefs.h <<_ACEOF
16020 #define PG_VERSION_NUM $PG_VERSION_NUM
16021 _ACEOF
16022
16023
16024
16025
16026 # Begin output steps
16027
16028 { $as_echo "$as_me:${as_lineno-$LINENO}: using compiler=$cc_string" >&5
16029 $as_echo "$as_me: using compiler=$cc_string" >&6;}
16030 { $as_echo "$as_me:${as_lineno-$LINENO}: using CFLAGS=$CFLAGS" >&5
16031 $as_echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
16032 { $as_echo "$as_me:${as_lineno-$LINENO}: using CPPFLAGS=$CPPFLAGS" >&5
16033 $as_echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
16034 { $as_echo "$as_me:${as_lineno-$LINENO}: using LDFLAGS=$LDFLAGS" >&5
16035 $as_echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
16036
16037 # prepare build tree if outside source tree
16038 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
16039 # Note 2: /bin/pwd might be better than shell's built-in at getting
16040 #         a symlink-free name.
16041 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
16042   vpath_build=no
16043 else
16044   vpath_build=yes
16045   if test "$no_create" != yes; then
16046     $as_echo_n "preparing build tree... " >&6
16047     pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
16048     $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
16049       || as_fn_error $? "failed" "$LINENO" 5
16050     { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16051 $as_echo "done" >&6; }
16052   fi
16053 fi
16054
16055
16056
16057 ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
16058
16059
16060 ac_config_links="$ac_config_links src/backend/port/dynloader.c:src/backend/port/dynloader/${template}.c src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION} src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION} src/include/dynloader.h:src/backend/port/dynloader/${template}.h src/include/pg_config_os.h:src/include/port/${template}.h src/Makefile.port:src/makefiles/Makefile.${template}"
16061
16062
16063 if test "$PORTNAME" = "win32"; then
16064 ac_config_commands="$ac_config_commands check_win32_symlinks"
16065
16066 fi
16067
16068 ac_config_headers="$ac_config_headers src/include/pg_config.h"
16069
16070
16071 ac_config_headers="$ac_config_headers src/include/pg_config_ext.h"
16072
16073
16074 ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
16075
16076
16077 cat >confcache <<\_ACEOF
16078 # This file is a shell script that caches the results of configure
16079 # tests run on this system so they can be shared between configure
16080 # scripts and configure runs, see configure's option --config-cache.
16081 # It is not useful on other systems.  If it contains results you don't
16082 # want to keep, you may remove or edit it.
16083 #
16084 # config.status only pays attention to the cache file if you give it
16085 # the --recheck option to rerun configure.
16086 #
16087 # `ac_cv_env_foo' variables (set or unset) will be overridden when
16088 # loading this file, other *unset* `ac_cv_foo' will be assigned the
16089 # following values.
16090
16091 _ACEOF
16092
16093 # The following way of writing the cache mishandles newlines in values,
16094 # but we know of no workaround that is simple, portable, and efficient.
16095 # So, we kill variables containing newlines.
16096 # Ultrix sh set writes to stderr and can't be redirected directly,
16097 # and sets the high bit in the cache file unless we assign to the vars.
16098 (
16099   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16100     eval ac_val=\$$ac_var
16101     case $ac_val in #(
16102     *${as_nl}*)
16103       case $ac_var in #(
16104       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16105 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
16106       esac
16107       case $ac_var in #(
16108       _ | IFS | as_nl) ;; #(
16109       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16110       *) { eval $ac_var=; unset $ac_var;} ;;
16111       esac ;;
16112     esac
16113   done
16114
16115   (set) 2>&1 |
16116     case $as_nl`(ac_space=' '; set) 2>&1` in #(
16117     *${as_nl}ac_space=\ *)
16118       # `set' does not quote correctly, so add quotes: double-quote
16119       # substitution turns \\\\ into \\, and sed turns \\ into \.
16120       sed -n \
16121         "s/'/'\\\\''/g;
16122           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
16123       ;; #(
16124     *)
16125       # `set' quotes correctly as required by POSIX, so do not add quotes.
16126       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
16127       ;;
16128     esac |
16129     sort
16130 ) |
16131   sed '
16132      /^ac_cv_env_/b end
16133      t clear
16134      :clear
16135      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16136      t end
16137      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16138      :end' >>confcache
16139 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16140   if test -w "$cache_file"; then
16141     if test "x$cache_file" != "x/dev/null"; then
16142       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16143 $as_echo "$as_me: updating cache $cache_file" >&6;}
16144       if test ! -f "$cache_file" || test -h "$cache_file"; then
16145         cat confcache >"$cache_file"
16146       else
16147         case $cache_file in #(
16148         */* | ?:*)
16149           mv -f confcache "$cache_file"$$ &&
16150           mv -f "$cache_file"$$ "$cache_file" ;; #(
16151         *)
16152           mv -f confcache "$cache_file" ;;
16153         esac
16154       fi
16155     fi
16156   else
16157     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16158 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
16159   fi
16160 fi
16161 rm -f confcache
16162
16163 test "x$prefix" = xNONE && prefix=$ac_default_prefix
16164 # Let make expand exec_prefix.
16165 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16166
16167 DEFS=-DHAVE_CONFIG_H
16168
16169 ac_libobjs=
16170 ac_ltlibobjs=
16171 U=
16172 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16173   # 1. Remove the extension, and $U if already installed.
16174   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
16175   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
16176   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
16177   #    will be set to the directory where LIBOBJS objects are built.
16178   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16179   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
16180 done
16181 LIBOBJS=$ac_libobjs
16182
16183 LTLIBOBJS=$ac_ltlibobjs
16184
16185
16186
16187
16188 : "${CONFIG_STATUS=./config.status}"
16189 ac_write_fail=0
16190 ac_clean_files_save=$ac_clean_files
16191 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
16192 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16193 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16194 as_write_fail=0
16195 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
16196 #! $SHELL
16197 # Generated by $as_me.
16198 # Run this file to recreate the current configuration.
16199 # Compiler output produced by configure, useful for debugging
16200 # configure, is in config.log if it exists.
16201
16202 debug=false
16203 ac_cs_recheck=false
16204 ac_cs_silent=false
16205
16206 SHELL=\${CONFIG_SHELL-$SHELL}
16207 export SHELL
16208 _ASEOF
16209 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16210 ## -------------------- ##
16211 ## M4sh Initialization. ##
16212 ## -------------------- ##
16213
16214 # Be more Bourne compatible
16215 DUALCASE=1; export DUALCASE # for MKS sh
16216 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
16217   emulate sh
16218   NULLCMD=:
16219   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
16220   # is contrary to our usage.  Disable this feature.
16221   alias -g '${1+"$@"}'='"$@"'
16222   setopt NO_GLOB_SUBST
16223 else
16224   case `(set -o) 2>/dev/null` in #(
16225   *posix*) :
16226     set -o posix ;; #(
16227   *) :
16228      ;;
16229 esac
16230 fi
16231
16232
16233 as_nl='
16234 '
16235 export as_nl
16236 # Printing a long string crashes Solaris 7 /usr/bin/printf.
16237 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16238 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16239 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16240 # Prefer a ksh shell builtin over an external printf program on Solaris,
16241 # but without wasting forks for bash or zsh.
16242 if test -z "$BASH_VERSION$ZSH_VERSION" \
16243     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16244   as_echo='print -r --'
16245   as_echo_n='print -rn --'
16246 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16247   as_echo='printf %s\n'
16248   as_echo_n='printf %s'
16249 else
16250   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16251     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16252     as_echo_n='/usr/ucb/echo -n'
16253   else
16254     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16255     as_echo_n_body='eval
16256       arg=$1;
16257       case $arg in #(
16258       *"$as_nl"*)
16259         expr "X$arg" : "X\\(.*\\)$as_nl";
16260         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16261       esac;
16262       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16263     '
16264     export as_echo_n_body
16265     as_echo_n='sh -c $as_echo_n_body as_echo'
16266   fi
16267   export as_echo_body
16268   as_echo='sh -c $as_echo_body as_echo'
16269 fi
16270
16271 # The user is always right.
16272 if test "${PATH_SEPARATOR+set}" != set; then
16273   PATH_SEPARATOR=:
16274   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16275     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16276       PATH_SEPARATOR=';'
16277   }
16278 fi
16279
16280
16281 # IFS
16282 # We need space, tab and new line, in precisely that order.  Quoting is
16283 # there to prevent editors from complaining about space-tab.
16284 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
16285 # splitting by setting IFS to empty value.)
16286 IFS=" ""        $as_nl"
16287
16288 # Find who we are.  Look in the path if we contain no directory separator.
16289 as_myself=
16290 case $0 in #((
16291   *[\\/]* ) as_myself=$0 ;;
16292   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16293 for as_dir in $PATH
16294 do
16295   IFS=$as_save_IFS
16296   test -z "$as_dir" && as_dir=.
16297     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16298   done
16299 IFS=$as_save_IFS
16300
16301      ;;
16302 esac
16303 # We did not find ourselves, most probably we were run as `sh COMMAND'
16304 # in which case we are not to be found in the path.
16305 if test "x$as_myself" = x; then
16306   as_myself=$0
16307 fi
16308 if test ! -f "$as_myself"; then
16309   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16310   exit 1
16311 fi
16312
16313 # Unset variables that we do not need and which cause bugs (e.g. in
16314 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
16315 # suppresses any "Segmentation fault" message there.  '((' could
16316 # trigger a bug in pdksh 5.2.14.
16317 for as_var in BASH_ENV ENV MAIL MAILPATH
16318 do eval test x\${$as_var+set} = xset \
16319   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
16320 done
16321 PS1='$ '
16322 PS2='> '
16323 PS4='+ '
16324
16325 # NLS nuisances.
16326 LC_ALL=C
16327 export LC_ALL
16328 LANGUAGE=C
16329 export LANGUAGE
16330
16331 # CDPATH.
16332 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16333
16334
16335 # as_fn_error STATUS ERROR [LINENO LOG_FD]
16336 # ----------------------------------------
16337 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16338 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
16339 # script with STATUS, using 1 if that was 0.
16340 as_fn_error ()
16341 {
16342   as_status=$1; test $as_status -eq 0 && as_status=1
16343   if test "$4"; then
16344     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16345     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
16346   fi
16347   $as_echo "$as_me: error: $2" >&2
16348   as_fn_exit $as_status
16349 } # as_fn_error
16350
16351
16352 # as_fn_set_status STATUS
16353 # -----------------------
16354 # Set $? to STATUS, without forking.
16355 as_fn_set_status ()
16356 {
16357   return $1
16358 } # as_fn_set_status
16359
16360 # as_fn_exit STATUS
16361 # -----------------
16362 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16363 as_fn_exit ()
16364 {
16365   set +e
16366   as_fn_set_status $1
16367   exit $1
16368 } # as_fn_exit
16369
16370 # as_fn_unset VAR
16371 # ---------------
16372 # Portably unset VAR.
16373 as_fn_unset ()
16374 {
16375   { eval $1=; unset $1;}
16376 }
16377 as_unset=as_fn_unset
16378 # as_fn_append VAR VALUE
16379 # ----------------------
16380 # Append the text in VALUE to the end of the definition contained in VAR. Take
16381 # advantage of any shell optimizations that allow amortized linear growth over
16382 # repeated appends, instead of the typical quadratic growth present in naive
16383 # implementations.
16384 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16385   eval 'as_fn_append ()
16386   {
16387     eval $1+=\$2
16388   }'
16389 else
16390   as_fn_append ()
16391   {
16392     eval $1=\$$1\$2
16393   }
16394 fi # as_fn_append
16395
16396 # as_fn_arith ARG...
16397 # ------------------
16398 # Perform arithmetic evaluation on the ARGs, and store the result in the
16399 # global $as_val. Take advantage of shells that can avoid forks. The arguments
16400 # must be portable across $(()) and expr.
16401 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16402   eval 'as_fn_arith ()
16403   {
16404     as_val=$(( $* ))
16405   }'
16406 else
16407   as_fn_arith ()
16408   {
16409     as_val=`expr "$@" || test $? -eq 1`
16410   }
16411 fi # as_fn_arith
16412
16413
16414 if expr a : '\(a\)' >/dev/null 2>&1 &&
16415    test "X`expr 00001 : '.*\(...\)'`" = X001; then
16416   as_expr=expr
16417 else
16418   as_expr=false
16419 fi
16420
16421 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
16422   as_basename=basename
16423 else
16424   as_basename=false
16425 fi
16426
16427 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16428   as_dirname=dirname
16429 else
16430   as_dirname=false
16431 fi
16432
16433 as_me=`$as_basename -- "$0" ||
16434 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16435          X"$0" : 'X\(//\)$' \| \
16436          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
16437 $as_echo X/"$0" |
16438     sed '/^.*\/\([^/][^/]*\)\/*$/{
16439             s//\1/
16440             q
16441           }
16442           /^X\/\(\/\/\)$/{
16443             s//\1/
16444             q
16445           }
16446           /^X\/\(\/\).*/{
16447             s//\1/
16448             q
16449           }
16450           s/.*/./; q'`
16451
16452 # Avoid depending upon Character Ranges.
16453 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16454 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16455 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16456 as_cr_digits='0123456789'
16457 as_cr_alnum=$as_cr_Letters$as_cr_digits
16458
16459 ECHO_C= ECHO_N= ECHO_T=
16460 case `echo -n x` in #(((((
16461 -n*)
16462   case `echo 'xy\c'` in
16463   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
16464   xy)  ECHO_C='\c';;
16465   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
16466        ECHO_T=' ';;
16467   esac;;
16468 *)
16469   ECHO_N='-n';;
16470 esac
16471
16472 rm -f conf$$ conf$$.exe conf$$.file
16473 if test -d conf$$.dir; then
16474   rm -f conf$$.dir/conf$$.file
16475 else
16476   rm -f conf$$.dir
16477   mkdir conf$$.dir 2>/dev/null
16478 fi
16479 if (echo >conf$$.file) 2>/dev/null; then
16480   if ln -s conf$$.file conf$$ 2>/dev/null; then
16481     as_ln_s='ln -s'
16482     # ... but there are two gotchas:
16483     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16484     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
16485     # In both cases, we have to default to `cp -pR'.
16486     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
16487       as_ln_s='cp -pR'
16488   elif ln conf$$.file conf$$ 2>/dev/null; then
16489     as_ln_s=ln
16490   else
16491     as_ln_s='cp -pR'
16492   fi
16493 else
16494   as_ln_s='cp -pR'
16495 fi
16496 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16497 rmdir conf$$.dir 2>/dev/null
16498
16499
16500 # as_fn_mkdir_p
16501 # -------------
16502 # Create "$as_dir" as a directory, including parents if necessary.
16503 as_fn_mkdir_p ()
16504 {
16505
16506   case $as_dir in #(
16507   -*) as_dir=./$as_dir;;
16508   esac
16509   test -d "$as_dir" || eval $as_mkdir_p || {
16510     as_dirs=
16511     while :; do
16512       case $as_dir in #(
16513       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16514       *) as_qdir=$as_dir;;
16515       esac
16516       as_dirs="'$as_qdir' $as_dirs"
16517       as_dir=`$as_dirname -- "$as_dir" ||
16518 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16519          X"$as_dir" : 'X\(//\)[^/]' \| \
16520          X"$as_dir" : 'X\(//\)$' \| \
16521          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16522 $as_echo X"$as_dir" |
16523     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16524             s//\1/
16525             q
16526           }
16527           /^X\(\/\/\)[^/].*/{
16528             s//\1/
16529             q
16530           }
16531           /^X\(\/\/\)$/{
16532             s//\1/
16533             q
16534           }
16535           /^X\(\/\).*/{
16536             s//\1/
16537             q
16538           }
16539           s/.*/./; q'`
16540       test -d "$as_dir" && break
16541     done
16542     test -z "$as_dirs" || eval "mkdir $as_dirs"
16543   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
16544
16545
16546 } # as_fn_mkdir_p
16547 if mkdir -p . 2>/dev/null; then
16548   as_mkdir_p='mkdir -p "$as_dir"'
16549 else
16550   test -d ./-p && rmdir ./-p
16551   as_mkdir_p=false
16552 fi
16553
16554
16555 # as_fn_executable_p FILE
16556 # -----------------------
16557 # Test if FILE is an executable regular file.
16558 as_fn_executable_p ()
16559 {
16560   test -f "$1" && test -x "$1"
16561 } # as_fn_executable_p
16562 as_test_x='test -x'
16563 as_executable_p=as_fn_executable_p
16564
16565 # Sed expression to map a string onto a valid CPP name.
16566 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
16567
16568 # Sed expression to map a string onto a valid variable name.
16569 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
16570
16571
16572 exec 6>&1
16573 ## ----------------------------------- ##
16574 ## Main body of $CONFIG_STATUS script. ##
16575 ## ----------------------------------- ##
16576 _ASEOF
16577 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
16578
16579 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16580 # Save the log message, to keep $0 and so on meaningful, and to
16581 # report actual input values of CONFIG_FILES etc. instead of their
16582 # values after options handling.
16583 ac_log="
16584 This file was extended by PostgreSQL $as_me 10devel, which was
16585 generated by GNU Autoconf 2.69.  Invocation command line was
16586
16587   CONFIG_FILES    = $CONFIG_FILES
16588   CONFIG_HEADERS  = $CONFIG_HEADERS
16589   CONFIG_LINKS    = $CONFIG_LINKS
16590   CONFIG_COMMANDS = $CONFIG_COMMANDS
16591   $ $0 $@
16592
16593 on `(hostname || uname -n) 2>/dev/null | sed 1q`
16594 "
16595
16596 _ACEOF
16597
16598 case $ac_config_files in *"
16599 "*) set x $ac_config_files; shift; ac_config_files=$*;;
16600 esac
16601
16602 case $ac_config_headers in *"
16603 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
16604 esac
16605
16606
16607 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16608 # Files that config.status was made for.
16609 config_files="$ac_config_files"
16610 config_headers="$ac_config_headers"
16611 config_links="$ac_config_links"
16612 config_commands="$ac_config_commands"
16613
16614 _ACEOF
16615
16616 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16617 ac_cs_usage="\
16618 \`$as_me' instantiates files and other configuration actions
16619 from templates according to the current configuration.  Unless the files
16620 and actions are specified as TAGs, all are instantiated by default.
16621
16622 Usage: $0 [OPTION]... [TAG]...
16623
16624   -h, --help       print this help, then exit
16625   -V, --version    print version number and configuration settings, then exit
16626       --config     print configuration, then exit
16627   -q, --quiet, --silent
16628                    do not print progress messages
16629   -d, --debug      don't remove temporary files
16630       --recheck    update $as_me by reconfiguring in the same conditions
16631       --file=FILE[:TEMPLATE]
16632                    instantiate the configuration file FILE
16633       --header=FILE[:TEMPLATE]
16634                    instantiate the configuration header FILE
16635
16636 Configuration files:
16637 $config_files
16638
16639 Configuration headers:
16640 $config_headers
16641
16642 Configuration links:
16643 $config_links
16644
16645 Configuration commands:
16646 $config_commands
16647
16648 Report bugs to <pgsql-bugs@postgresql.org>."
16649
16650 _ACEOF
16651 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16652 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
16653 ac_cs_version="\\
16654 PostgreSQL config.status 10devel
16655 configured by $0, generated by GNU Autoconf 2.69,
16656   with options \\"\$ac_cs_config\\"
16657
16658 Copyright (C) 2012 Free Software Foundation, Inc.
16659 This config.status script is free software; the Free Software Foundation
16660 gives unlimited permission to copy, distribute and modify it."
16661
16662 ac_pwd='$ac_pwd'
16663 srcdir='$srcdir'
16664 INSTALL='$INSTALL'
16665 MKDIR_P='$MKDIR_P'
16666 AWK='$AWK'
16667 test -n "\$AWK" || AWK=awk
16668 _ACEOF
16669
16670 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16671 # The default lists apply if the user does not specify any file.
16672 ac_need_defaults=:
16673 while test $# != 0
16674 do
16675   case $1 in
16676   --*=?*)
16677     ac_option=`expr "X$1" : 'X\([^=]*\)='`
16678     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
16679     ac_shift=:
16680     ;;
16681   --*=)
16682     ac_option=`expr "X$1" : 'X\([^=]*\)='`
16683     ac_optarg=
16684     ac_shift=:
16685     ;;
16686   *)
16687     ac_option=$1
16688     ac_optarg=$2
16689     ac_shift=shift
16690     ;;
16691   esac
16692
16693   case $ac_option in
16694   # Handling of the options.
16695   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16696     ac_cs_recheck=: ;;
16697   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
16698     $as_echo "$ac_cs_version"; exit ;;
16699   --config | --confi | --conf | --con | --co | --c )
16700     $as_echo "$ac_cs_config"; exit ;;
16701   --debug | --debu | --deb | --de | --d | -d )
16702     debug=: ;;
16703   --file | --fil | --fi | --f )
16704     $ac_shift
16705     case $ac_optarg in
16706     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16707     '') as_fn_error $? "missing file argument" ;;
16708     esac
16709     as_fn_append CONFIG_FILES " '$ac_optarg'"
16710     ac_need_defaults=false;;
16711   --header | --heade | --head | --hea )
16712     $ac_shift
16713     case $ac_optarg in
16714     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16715     esac
16716     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
16717     ac_need_defaults=false;;
16718   --he | --h)
16719     # Conflict between --help and --header
16720     as_fn_error $? "ambiguous option: \`$1'
16721 Try \`$0 --help' for more information.";;
16722   --help | --hel | -h )
16723     $as_echo "$ac_cs_usage"; exit ;;
16724   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16725   | -silent | --silent | --silen | --sile | --sil | --si | --s)
16726     ac_cs_silent=: ;;
16727
16728   # This is an error.
16729   -*) as_fn_error $? "unrecognized option: \`$1'
16730 Try \`$0 --help' for more information." ;;
16731
16732   *) as_fn_append ac_config_targets " $1"
16733      ac_need_defaults=false ;;
16734
16735   esac
16736   shift
16737 done
16738
16739 ac_configure_extra_args=
16740
16741 if $ac_cs_silent; then
16742   exec 6>/dev/null
16743   ac_configure_extra_args="$ac_configure_extra_args --silent"
16744 fi
16745
16746 _ACEOF
16747 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16748 if \$ac_cs_recheck; then
16749   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
16750   shift
16751   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
16752   CONFIG_SHELL='$SHELL'
16753   export CONFIG_SHELL
16754   exec "\$@"
16755 fi
16756
16757 _ACEOF
16758 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16759 exec 5>>config.log
16760 {
16761   echo
16762   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16763 ## Running $as_me. ##
16764 _ASBOX
16765   $as_echo "$ac_log"
16766 } >&5
16767
16768 _ACEOF
16769 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16770 _ACEOF
16771
16772 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16773
16774 # Handling of arguments.
16775 for ac_config_target in $ac_config_targets
16776 do
16777   case $ac_config_target in
16778     "src/backend/port/tas.s") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
16779     "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
16780     "src/Makefile.global") CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
16781     "src/backend/port/dynloader.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/dynloader.c:src/backend/port/dynloader/${template}.c" ;;
16782     "src/backend/port/pg_sema.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
16783     "src/backend/port/pg_shmem.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
16784     "src/include/dynloader.h") CONFIG_LINKS="$CONFIG_LINKS src/include/dynloader.h:src/backend/port/dynloader/${template}.h" ;;
16785     "src/include/pg_config_os.h") CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
16786     "src/Makefile.port") CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
16787     "check_win32_symlinks") CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
16788     "src/include/pg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
16789     "src/include/pg_config_ext.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config_ext.h" ;;
16790     "src/interfaces/ecpg/include/ecpg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
16791
16792   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
16793   esac
16794 done
16795
16796
16797 # If the user did not use the arguments to specify the items to instantiate,
16798 # then the envvar interface is used.  Set only those that are not.
16799 # We use the long form for the default assignment because of an extremely
16800 # bizarre bug on SunOS 4.1.3.
16801 if $ac_need_defaults; then
16802   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16803   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16804   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
16805   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
16806 fi
16807
16808 # Have a temporary directory for convenience.  Make it in the build tree
16809 # simply because there is no reason against having it here, and in addition,
16810 # creating and moving files from /tmp can sometimes cause problems.
16811 # Hook for its removal unless debugging.
16812 # Note that there is a small window in which the directory will not be cleaned:
16813 # after its creation but before its name has been assigned to `$tmp'.
16814 $debug ||
16815 {
16816   tmp= ac_tmp=
16817   trap 'exit_status=$?
16818   : "${ac_tmp:=$tmp}"
16819   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
16820 ' 0
16821   trap 'as_fn_exit 1' 1 2 13 15
16822 }
16823 # Create a (secure) tmp directory for tmp files.
16824
16825 {
16826   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
16827   test -d "$tmp"
16828 }  ||
16829 {
16830   tmp=./conf$$-$RANDOM
16831   (umask 077 && mkdir "$tmp")
16832 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
16833 ac_tmp=$tmp
16834
16835 # Set up the scripts for CONFIG_FILES section.
16836 # No need to generate them if there are no CONFIG_FILES.
16837 # This happens for instance with `./config.status config.h'.
16838 if test -n "$CONFIG_FILES"; then
16839
16840
16841 ac_cr=`echo X | tr X '\015'`
16842 # On cygwin, bash can eat \r inside `` if the user requested igncr.
16843 # But we know of no other shell where ac_cr would be empty at this
16844 # point, so we can use a bashism as a fallback.
16845 if test "x$ac_cr" = x; then
16846   eval ac_cr=\$\'\\r\'
16847 fi
16848 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
16849 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
16850   ac_cs_awk_cr='\\r'
16851 else
16852   ac_cs_awk_cr=$ac_cr
16853 fi
16854
16855 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
16856 _ACEOF
16857
16858
16859 {
16860   echo "cat >conf$$subs.awk <<_ACEOF" &&
16861   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
16862   echo "_ACEOF"
16863 } >conf$$subs.sh ||
16864   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
16865 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
16866 ac_delim='%!_!# '
16867 for ac_last_try in false false false false false :; do
16868   . ./conf$$subs.sh ||
16869     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
16870
16871   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
16872   if test $ac_delim_n = $ac_delim_num; then
16873     break
16874   elif $ac_last_try; then
16875     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
16876   else
16877     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16878   fi
16879 done
16880 rm -f conf$$subs.sh
16881
16882 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16883 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
16884 _ACEOF
16885 sed -n '
16886 h
16887 s/^/S["/; s/!.*/"]=/
16888 p
16889 g
16890 s/^[^!]*!//
16891 :repl
16892 t repl
16893 s/'"$ac_delim"'$//
16894 t delim
16895 :nl
16896 h
16897 s/\(.\{148\}\)..*/\1/
16898 t more1
16899 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
16900 p
16901 n
16902 b repl
16903 :more1
16904 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16905 p
16906 g
16907 s/.\{148\}//
16908 t nl
16909 :delim
16910 h
16911 s/\(.\{148\}\)..*/\1/
16912 t more2
16913 s/["\\]/\\&/g; s/^/"/; s/$/"/
16914 p
16915 b
16916 :more2
16917 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16918 p
16919 g
16920 s/.\{148\}//
16921 t delim
16922 ' <conf$$subs.awk | sed '
16923 /^[^""]/{
16924   N
16925   s/\n//
16926 }
16927 ' >>$CONFIG_STATUS || ac_write_fail=1
16928 rm -f conf$$subs.awk
16929 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16930 _ACAWK
16931 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
16932   for (key in S) S_is_set[key] = 1
16933   FS = "\a"
16934
16935 }
16936 {
16937   line = $ 0
16938   nfields = split(line, field, "@")
16939   substed = 0
16940   len = length(field[1])
16941   for (i = 2; i < nfields; i++) {
16942     key = field[i]
16943     keylen = length(key)
16944     if (S_is_set[key]) {
16945       value = S[key]
16946       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
16947       len += length(value) + length(field[++i])
16948       substed = 1
16949     } else
16950       len += 1 + keylen
16951   }
16952
16953   print line
16954 }
16955
16956 _ACAWK
16957 _ACEOF
16958 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16959 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16960   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16961 else
16962   cat
16963 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
16964   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
16965 _ACEOF
16966
16967 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
16968 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
16969 # trailing colons and then remove the whole line if VPATH becomes empty
16970 # (actually we leave an empty line to preserve line numbers).
16971 if test "x$srcdir" = x.; then
16972   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
16973 h
16974 s///
16975 s/^/:/
16976 s/[      ]*$/:/
16977 s/:\$(srcdir):/:/g
16978 s/:\${srcdir}:/:/g
16979 s/:@srcdir@:/:/g
16980 s/^:*//
16981 s/:*$//
16982 x
16983 s/\(=[   ]*\).*/\1/
16984 G
16985 s/\n//
16986 s/^[^=]*=[       ]*$//
16987 }'
16988 fi
16989
16990 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16991 fi # test -n "$CONFIG_FILES"
16992
16993 # Set up the scripts for CONFIG_HEADERS section.
16994 # No need to generate them if there are no CONFIG_HEADERS.
16995 # This happens for instance with `./config.status Makefile'.
16996 if test -n "$CONFIG_HEADERS"; then
16997 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
16998 BEGIN {
16999 _ACEOF
17000
17001 # Transform confdefs.h into an awk script `defines.awk', embedded as
17002 # here-document in config.status, that substitutes the proper values into
17003 # config.h.in to produce config.h.
17004
17005 # Create a delimiter string that does not exist in confdefs.h, to ease
17006 # handling of long lines.
17007 ac_delim='%!_!# '
17008 for ac_last_try in false false :; do
17009   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17010   if test -z "$ac_tt"; then
17011     break
17012   elif $ac_last_try; then
17013     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
17014   else
17015     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17016   fi
17017 done
17018
17019 # For the awk script, D is an array of macro values keyed by name,
17020 # likewise P contains macro parameters if any.  Preserve backslash
17021 # newline sequences.
17022
17023 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17024 sed -n '
17025 s/.\{148\}/&'"$ac_delim"'/g
17026 t rset
17027 :rset
17028 s/^[     ]*#[    ]*define[       ][      ]*/ /
17029 t def
17030 d
17031 :def
17032 s/\\$//
17033 t bsnl
17034 s/["\\]/\\&/g
17035 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
17036 D["\1"]=" \3"/p
17037 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
17038 d
17039 :bsnl
17040 s/["\\]/\\&/g
17041 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
17042 D["\1"]=" \3\\\\\\n"\\/p
17043 t cont
17044 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17045 t cont
17046 d
17047 :cont
17048 n
17049 s/.\{148\}/&'"$ac_delim"'/g
17050 t clear
17051 :clear
17052 s/\\$//
17053 t bsnlc
17054 s/["\\]/\\&/g; s/^/"/; s/$/"/p
17055 d
17056 :bsnlc
17057 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17058 b cont
17059 ' <confdefs.h | sed '
17060 s/'"$ac_delim"'/"\\\
17061 "/g' >>$CONFIG_STATUS || ac_write_fail=1
17062
17063 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17064   for (key in D) D_is_set[key] = 1
17065   FS = "\a"
17066 }
17067 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17068   line = \$ 0
17069   split(line, arg, " ")
17070   if (arg[1] == "#") {
17071     defundef = arg[2]
17072     mac1 = arg[3]
17073   } else {
17074     defundef = substr(arg[1], 2)
17075     mac1 = arg[2]
17076   }
17077   split(mac1, mac2, "(") #)
17078   macro = mac2[1]
17079   prefix = substr(line, 1, index(line, defundef) - 1)
17080   if (D_is_set[macro]) {
17081     # Preserve the white space surrounding the "#".
17082     print prefix "define", macro P[macro] D[macro]
17083     next
17084   } else {
17085     # Replace #undef with comments.  This is necessary, for example,
17086     # in the case of _POSIX_SOURCE, which is predefined and required
17087     # on some systems where configure will not decide to define it.
17088     if (defundef == "undef") {
17089       print "/*", prefix defundef, macro, "*/"
17090       next
17091     }
17092   }
17093 }
17094 { print }
17095 _ACAWK
17096 _ACEOF
17097 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17098   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
17099 fi # test -n "$CONFIG_HEADERS"
17100
17101
17102 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS  :L $CONFIG_LINKS  :C $CONFIG_COMMANDS"
17103 shift
17104 for ac_tag
17105 do
17106   case $ac_tag in
17107   :[FHLC]) ac_mode=$ac_tag; continue;;
17108   esac
17109   case $ac_mode$ac_tag in
17110   :[FHL]*:*);;
17111   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
17112   :[FH]-) ac_tag=-:-;;
17113   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17114   esac
17115   ac_save_IFS=$IFS
17116   IFS=:
17117   set x $ac_tag
17118   IFS=$ac_save_IFS
17119   shift
17120   ac_file=$1
17121   shift
17122
17123   case $ac_mode in
17124   :L) ac_source=$1;;
17125   :[FH])
17126     ac_file_inputs=
17127     for ac_f
17128     do
17129       case $ac_f in
17130       -) ac_f="$ac_tmp/stdin";;
17131       *) # Look for the file first in the build tree, then in the source tree
17132          # (if the path is not absolute).  The absolute path cannot be DOS-style,
17133          # because $ac_f cannot contain `:'.
17134          test -f "$ac_f" ||
17135            case $ac_f in
17136            [\\/$]*) false;;
17137            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17138            esac ||
17139            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
17140       esac
17141       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17142       as_fn_append ac_file_inputs " '$ac_f'"
17143     done
17144
17145     # Let's still pretend it is `configure' which instantiates (i.e., don't
17146     # use $as_me), people would be surprised to read:
17147     #    /* config.h.  Generated by config.status.  */
17148     configure_input='Generated from '`
17149           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17150         `' by configure.'
17151     if test x"$ac_file" != x-; then
17152       configure_input="$ac_file.  $configure_input"
17153       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17154 $as_echo "$as_me: creating $ac_file" >&6;}
17155     fi
17156     # Neutralize special characters interpreted by sed in replacement strings.
17157     case $configure_input in #(
17158     *\&* | *\|* | *\\* )
17159        ac_sed_conf_input=`$as_echo "$configure_input" |
17160        sed 's/[\\\\&|]/\\\\&/g'`;; #(
17161     *) ac_sed_conf_input=$configure_input;;
17162     esac
17163
17164     case $ac_tag in
17165     *:-:* | *:-) cat >"$ac_tmp/stdin" \
17166       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
17167     esac
17168     ;;
17169   esac
17170
17171   ac_dir=`$as_dirname -- "$ac_file" ||
17172 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17173          X"$ac_file" : 'X\(//\)[^/]' \| \
17174          X"$ac_file" : 'X\(//\)$' \| \
17175          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
17176 $as_echo X"$ac_file" |
17177     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17178             s//\1/
17179             q
17180           }
17181           /^X\(\/\/\)[^/].*/{
17182             s//\1/
17183             q
17184           }
17185           /^X\(\/\/\)$/{
17186             s//\1/
17187             q
17188           }
17189           /^X\(\/\).*/{
17190             s//\1/
17191             q
17192           }
17193           s/.*/./; q'`
17194   as_dir="$ac_dir"; as_fn_mkdir_p
17195   ac_builddir=.
17196
17197 case "$ac_dir" in
17198 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17199 *)
17200   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
17201   # A ".." for each directory in $ac_dir_suffix.
17202   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
17203   case $ac_top_builddir_sub in
17204   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17205   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17206   esac ;;
17207 esac
17208 ac_abs_top_builddir=$ac_pwd
17209 ac_abs_builddir=$ac_pwd$ac_dir_suffix
17210 # for backward compatibility:
17211 ac_top_builddir=$ac_top_build_prefix
17212
17213 case $srcdir in
17214   .)  # We are building in place.
17215     ac_srcdir=.
17216     ac_top_srcdir=$ac_top_builddir_sub
17217     ac_abs_top_srcdir=$ac_pwd ;;
17218   [\\/]* | ?:[\\/]* )  # Absolute name.
17219     ac_srcdir=$srcdir$ac_dir_suffix;
17220     ac_top_srcdir=$srcdir
17221     ac_abs_top_srcdir=$srcdir ;;
17222   *) # Relative name.
17223     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17224     ac_top_srcdir=$ac_top_build_prefix$srcdir
17225     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
17226 esac
17227 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
17228
17229
17230   case $ac_mode in
17231   :F)
17232   #
17233   # CONFIG_FILE
17234   #
17235
17236   case $INSTALL in
17237   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
17238   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
17239   esac
17240   ac_MKDIR_P=$MKDIR_P
17241   case $MKDIR_P in
17242   [\\/$]* | ?:[\\/]* ) ;;
17243   */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17244   esac
17245 _ACEOF
17246
17247 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17248 # If the template does not know about datarootdir, expand it.
17249 # FIXME: This hack should be removed a few years after 2.60.
17250 ac_datarootdir_hack=; ac_datarootdir_seen=
17251 ac_sed_dataroot='
17252 /datarootdir/ {
17253   p
17254   q
17255 }
17256 /@datadir@/p
17257 /@docdir@/p
17258 /@infodir@/p
17259 /@localedir@/p
17260 /@mandir@/p'
17261 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
17262 *datarootdir*) ac_datarootdir_seen=yes;;
17263 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
17264   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17265 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
17266 _ACEOF
17267 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17268   ac_datarootdir_hack='
17269   s&@datadir@&$datadir&g
17270   s&@docdir@&$docdir&g
17271   s&@infodir@&$infodir&g
17272   s&@localedir@&$localedir&g
17273   s&@mandir@&$mandir&g
17274   s&\\\${datarootdir}&$datarootdir&g' ;;
17275 esac
17276 _ACEOF
17277
17278 # Neutralize VPATH when `$srcdir' = `.'.
17279 # Shell code in configure.ac might set extrasub.
17280 # FIXME: do we really want to maintain this feature?
17281 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17282 ac_sed_extra="$ac_vpsub
17283 $extrasub
17284 _ACEOF
17285 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17286 :t
17287 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
17288 s|@configure_input@|$ac_sed_conf_input|;t t
17289 s&@top_builddir@&$ac_top_builddir_sub&;t t
17290 s&@top_build_prefix@&$ac_top_build_prefix&;t t
17291 s&@srcdir@&$ac_srcdir&;t t
17292 s&@abs_srcdir@&$ac_abs_srcdir&;t t
17293 s&@top_srcdir@&$ac_top_srcdir&;t t
17294 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17295 s&@builddir@&$ac_builddir&;t t
17296 s&@abs_builddir@&$ac_abs_builddir&;t t
17297 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17298 s&@INSTALL@&$ac_INSTALL&;t t
17299 s&@MKDIR_P@&$ac_MKDIR_P&;t t
17300 $ac_datarootdir_hack
17301 "
17302 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17303   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
17304
17305 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
17306   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17307   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
17308       "$ac_tmp/out"`; test -z "$ac_out"; } &&
17309   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
17310 which seems to be undefined.  Please make sure it is defined" >&5
17311 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
17312 which seems to be undefined.  Please make sure it is defined" >&2;}
17313
17314   rm -f "$ac_tmp/stdin"
17315   case $ac_file in
17316   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17317   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
17318   esac \
17319   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
17320  ;;
17321   :H)
17322   #
17323   # CONFIG_HEADER
17324   #
17325   if test x"$ac_file" != x-; then
17326     {
17327       $as_echo "/* $configure_input  */" \
17328       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17329     } >"$ac_tmp/config.h" \
17330       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
17331     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
17332       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17333 $as_echo "$as_me: $ac_file is unchanged" >&6;}
17334     else
17335       rm -f "$ac_file"
17336       mv "$ac_tmp/config.h" "$ac_file" \
17337         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
17338     fi
17339   else
17340     $as_echo "/* $configure_input  */" \
17341       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
17342       || as_fn_error $? "could not create -" "$LINENO" 5
17343   fi
17344  ;;
17345   :L)
17346   #
17347   # CONFIG_LINK
17348   #
17349
17350   if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
17351     :
17352   else
17353     # Prefer the file from the source tree if names are identical.
17354     if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
17355       ac_source=$srcdir/$ac_source
17356     fi
17357
17358     { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
17359 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
17360
17361     if test ! -r "$ac_source"; then
17362       as_fn_error $? "$ac_source: file not found" "$LINENO" 5
17363     fi
17364     rm -f "$ac_file"
17365
17366     # Try a relative symlink, then a hard link, then a copy.
17367     case $ac_source in
17368     [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
17369         *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
17370     esac
17371     ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
17372       ln "$ac_source" "$ac_file" 2>/dev/null ||
17373       cp -p "$ac_source" "$ac_file" ||
17374       as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
17375   fi
17376  ;;
17377   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
17378 $as_echo "$as_me: executing $ac_file commands" >&6;}
17379  ;;
17380   esac
17381
17382
17383   case $ac_file$ac_mode in
17384     "check_win32_symlinks":C)
17385 # Links sometimes fail undetected on Mingw -
17386 # so here we detect it and warn the user
17387 for FILE in $CONFIG_LINKS
17388  do
17389         # test -e works for symlinks in the MinGW console
17390         test -e `expr "$FILE" : '\([^:]*\)'` || { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** link for $FILE -- please fix by hand" >&5
17391 $as_echo "$as_me: WARNING: *** link for $FILE -- please fix by hand" >&2;}
17392  done
17393  ;;
17394     "src/include/pg_config.h":H)
17395 # Update timestamp for pg_config.h (see Makefile.global)
17396 echo >src/include/stamp-h
17397  ;;
17398     "src/include/pg_config_ext.h":H)
17399 # Update timestamp for pg_config_ext.h (see Makefile.global)
17400 echo >src/include/stamp-ext-h
17401  ;;
17402     "src/interfaces/ecpg/include/ecpg_config.h":H) echo >src/interfaces/ecpg/include/stamp-h ;;
17403
17404   esac
17405 done # for ac_tag
17406
17407
17408 as_fn_exit 0
17409 _ACEOF
17410 ac_clean_files=$ac_clean_files_save
17411
17412 test $ac_write_fail = 0 ||
17413   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
17414
17415
17416 # configure is writing to config.log, and then calls config.status.
17417 # config.status does its own redirection, appending to config.log.
17418 # Unfortunately, on DOS this fails, as config.log is still kept open
17419 # by configure, so config.status won't be able to write to it; its
17420 # output is simply discarded.  So we exec the FD to /dev/null,
17421 # effectively closing config.log, so it can be properly (re)opened and
17422 # appended to by config.status.  When coming back to configure, we
17423 # need to make the FD available again.
17424 if test "$no_create" != yes; then
17425   ac_cs_success=:
17426   ac_config_status_args=
17427   test "$silent" = yes &&
17428     ac_config_status_args="$ac_config_status_args --quiet"
17429   exec 5>/dev/null
17430   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
17431   exec 5>>config.log
17432   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17433   # would make configure fail if this is the last instruction.
17434   $ac_cs_success || as_fn_exit 1
17435 fi
17436 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17437   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17438 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
17439 fi
17440