]> granicus.if.org Git - postgresql/blob - configure
Remove long-dead support for platforms without sig_atomic_t.
[postgresql] / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69 for PostgreSQL 9.6devel.
4 #
5 # Report bugs to <pgsql-bugs@postgresql.org>.
6 #
7 #
8 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
9 #
10 #
11 # This configure script is free software; the Free Software Foundation
12 # gives unlimited permission to copy, distribute and modify it.
13 #
14 # Copyright (c) 1996-2015, PostgreSQL Global Development Group
15 ## -------------------- ##
16 ## M4sh Initialization. ##
17 ## -------------------- ##
18
19 # Be more Bourne compatible
20 DUALCASE=1; export DUALCASE # for MKS sh
21 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
22   emulate sh
23   NULLCMD=:
24   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
25   # is contrary to our usage.  Disable this feature.
26   alias -g '${1+"$@"}'='"$@"'
27   setopt NO_GLOB_SUBST
28 else
29   case `(set -o) 2>/dev/null` in #(
30   *posix*) :
31     set -o posix ;; #(
32   *) :
33      ;;
34 esac
35 fi
36
37
38 as_nl='
39 '
40 export as_nl
41 # Printing a long string crashes Solaris 7 /usr/bin/printf.
42 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
43 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
44 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
45 # Prefer a ksh shell builtin over an external printf program on Solaris,
46 # but without wasting forks for bash or zsh.
47 if test -z "$BASH_VERSION$ZSH_VERSION" \
48     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
49   as_echo='print -r --'
50   as_echo_n='print -rn --'
51 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
52   as_echo='printf %s\n'
53   as_echo_n='printf %s'
54 else
55   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
56     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
57     as_echo_n='/usr/ucb/echo -n'
58   else
59     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
60     as_echo_n_body='eval
61       arg=$1;
62       case $arg in #(
63       *"$as_nl"*)
64         expr "X$arg" : "X\\(.*\\)$as_nl";
65         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66       esac;
67       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
68     '
69     export as_echo_n_body
70     as_echo_n='sh -c $as_echo_n_body as_echo'
71   fi
72   export as_echo_body
73   as_echo='sh -c $as_echo_body as_echo'
74 fi
75
76 # The user is always right.
77 if test "${PATH_SEPARATOR+set}" != set; then
78   PATH_SEPARATOR=:
79   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
80     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
81       PATH_SEPARATOR=';'
82   }
83 fi
84
85
86 # IFS
87 # We need space, tab and new line, in precisely that order.  Quoting is
88 # there to prevent editors from complaining about space-tab.
89 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
90 # splitting by setting IFS to empty value.)
91 IFS=" ""        $as_nl"
92
93 # Find who we are.  Look in the path if we contain no directory separator.
94 as_myself=
95 case $0 in #((
96   *[\\/]* ) as_myself=$0 ;;
97   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
98 for as_dir in $PATH
99 do
100   IFS=$as_save_IFS
101   test -z "$as_dir" && as_dir=.
102     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
103   done
104 IFS=$as_save_IFS
105
106      ;;
107 esac
108 # We did not find ourselves, most probably we were run as `sh COMMAND'
109 # in which case we are not to be found in the path.
110 if test "x$as_myself" = x; then
111   as_myself=$0
112 fi
113 if test ! -f "$as_myself"; then
114   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
115   exit 1
116 fi
117
118 # Unset variables that we do not need and which cause bugs (e.g. in
119 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
120 # suppresses any "Segmentation fault" message there.  '((' could
121 # trigger a bug in pdksh 5.2.14.
122 for as_var in BASH_ENV ENV MAIL MAILPATH
123 do eval test x\${$as_var+set} = xset \
124   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
125 done
126 PS1='$ '
127 PS2='> '
128 PS4='+ '
129
130 # NLS nuisances.
131 LC_ALL=C
132 export LC_ALL
133 LANGUAGE=C
134 export LANGUAGE
135
136 # CDPATH.
137 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
138
139 # Use a proper internal environment variable to ensure we don't fall
140   # into an infinite loop, continuously re-executing ourselves.
141   if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
142     _as_can_reexec=no; export _as_can_reexec;
143     # We cannot yet assume a decent shell, so we have to provide a
144 # neutralization value for shells without unset; and this also
145 # works around shells that cannot unset nonexistent variables.
146 # Preserve -v and -x to the replacement shell.
147 BASH_ENV=/dev/null
148 ENV=/dev/null
149 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
150 case $- in # ((((
151   *v*x* | *x*v* ) as_opts=-vx ;;
152   *v* ) as_opts=-v ;;
153   *x* ) as_opts=-x ;;
154   * ) as_opts= ;;
155 esac
156 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
157 # Admittedly, this is quite paranoid, since all the known shells bail
158 # out after a failed `exec'.
159 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
160 as_fn_exit 255
161   fi
162   # We don't want this to propagate to other subprocesses.
163           { _as_can_reexec=; unset _as_can_reexec;}
164 if test "x$CONFIG_SHELL" = x; then
165   as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
166   emulate sh
167   NULLCMD=:
168   # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
169   # is contrary to our usage.  Disable this feature.
170   alias -g '\${1+\"\$@\"}'='\"\$@\"'
171   setopt NO_GLOB_SUBST
172 else
173   case \`(set -o) 2>/dev/null\` in #(
174   *posix*) :
175     set -o posix ;; #(
176   *) :
177      ;;
178 esac
179 fi
180 "
181   as_required="as_fn_return () { (exit \$1); }
182 as_fn_success () { as_fn_return 0; }
183 as_fn_failure () { as_fn_return 1; }
184 as_fn_ret_success () { return 0; }
185 as_fn_ret_failure () { return 1; }
186
187 exitcode=0
188 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
189 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
190 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
191 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
192 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
193
194 else
195   exitcode=1; echo positional parameters were not saved.
196 fi
197 test x\$exitcode = x0 || exit 1
198 test -x / || exit 1"
199   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
200   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
201   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
202   test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
203 test \$(( 1 + 1 )) = 2 || exit 1"
204   if (eval "$as_required") 2>/dev/null; then :
205   as_have_required=yes
206 else
207   as_have_required=no
208 fi
209   if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
210
211 else
212   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
213 as_found=false
214 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
215 do
216   IFS=$as_save_IFS
217   test -z "$as_dir" && as_dir=.
218   as_found=:
219   case $as_dir in #(
220          /*)
221            for as_base in sh bash ksh sh5; do
222              # Try only shells that exist, to save several forks.
223              as_shell=$as_dir/$as_base
224              if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
225                     { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
226   CONFIG_SHELL=$as_shell as_have_required=yes
227                    if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
228   break 2
229 fi
230 fi
231            done;;
232        esac
233   as_found=false
234 done
235 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
236               { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
237   CONFIG_SHELL=$SHELL as_have_required=yes
238 fi; }
239 IFS=$as_save_IFS
240
241
242       if test "x$CONFIG_SHELL" != x; then :
243   export CONFIG_SHELL
244              # We cannot yet assume a decent shell, so we have to provide a
245 # neutralization value for shells without unset; and this also
246 # works around shells that cannot unset nonexistent variables.
247 # Preserve -v and -x to the replacement shell.
248 BASH_ENV=/dev/null
249 ENV=/dev/null
250 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
251 case $- in # ((((
252   *v*x* | *x*v* ) as_opts=-vx ;;
253   *v* ) as_opts=-v ;;
254   *x* ) as_opts=-x ;;
255   * ) as_opts= ;;
256 esac
257 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
258 # Admittedly, this is quite paranoid, since all the known shells bail
259 # out after a failed `exec'.
260 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
261 exit 255
262 fi
263
264     if test x$as_have_required = xno; then :
265   $as_echo "$0: This script requires a shell more modern than all"
266   $as_echo "$0: the shells that I found on your system."
267   if test x${ZSH_VERSION+set} = xset ; then
268     $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
269     $as_echo "$0: be upgraded to zsh 4.3.4 or later."
270   else
271     $as_echo "$0: Please tell bug-autoconf@gnu.org and
272 $0: pgsql-bugs@postgresql.org about your system, including
273 $0: any error possibly output before this message. Then
274 $0: install a modern shell, or manually run the script
275 $0: under such a shell if you do have one."
276   fi
277   exit 1
278 fi
279 fi
280 fi
281 SHELL=${CONFIG_SHELL-/bin/sh}
282 export SHELL
283 # Unset more variables known to interfere with behavior of common tools.
284 CLICOLOR_FORCE= GREP_OPTIONS=
285 unset CLICOLOR_FORCE GREP_OPTIONS
286
287 ## --------------------- ##
288 ## M4sh Shell Functions. ##
289 ## --------------------- ##
290 # as_fn_unset VAR
291 # ---------------
292 # Portably unset VAR.
293 as_fn_unset ()
294 {
295   { eval $1=; unset $1;}
296 }
297 as_unset=as_fn_unset
298
299 # as_fn_set_status STATUS
300 # -----------------------
301 # Set $? to STATUS, without forking.
302 as_fn_set_status ()
303 {
304   return $1
305 } # as_fn_set_status
306
307 # as_fn_exit STATUS
308 # -----------------
309 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
310 as_fn_exit ()
311 {
312   set +e
313   as_fn_set_status $1
314   exit $1
315 } # as_fn_exit
316
317 # as_fn_mkdir_p
318 # -------------
319 # Create "$as_dir" as a directory, including parents if necessary.
320 as_fn_mkdir_p ()
321 {
322
323   case $as_dir in #(
324   -*) as_dir=./$as_dir;;
325   esac
326   test -d "$as_dir" || eval $as_mkdir_p || {
327     as_dirs=
328     while :; do
329       case $as_dir in #(
330       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
331       *) as_qdir=$as_dir;;
332       esac
333       as_dirs="'$as_qdir' $as_dirs"
334       as_dir=`$as_dirname -- "$as_dir" ||
335 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
336          X"$as_dir" : 'X\(//\)[^/]' \| \
337          X"$as_dir" : 'X\(//\)$' \| \
338          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
339 $as_echo X"$as_dir" |
340     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
341             s//\1/
342             q
343           }
344           /^X\(\/\/\)[^/].*/{
345             s//\1/
346             q
347           }
348           /^X\(\/\/\)$/{
349             s//\1/
350             q
351           }
352           /^X\(\/\).*/{
353             s//\1/
354             q
355           }
356           s/.*/./; q'`
357       test -d "$as_dir" && break
358     done
359     test -z "$as_dirs" || eval "mkdir $as_dirs"
360   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
361
362
363 } # as_fn_mkdir_p
364
365 # as_fn_executable_p FILE
366 # -----------------------
367 # Test if FILE is an executable regular file.
368 as_fn_executable_p ()
369 {
370   test -f "$1" && test -x "$1"
371 } # as_fn_executable_p
372 # as_fn_append VAR VALUE
373 # ----------------------
374 # Append the text in VALUE to the end of the definition contained in VAR. Take
375 # advantage of any shell optimizations that allow amortized linear growth over
376 # repeated appends, instead of the typical quadratic growth present in naive
377 # implementations.
378 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
379   eval 'as_fn_append ()
380   {
381     eval $1+=\$2
382   }'
383 else
384   as_fn_append ()
385   {
386     eval $1=\$$1\$2
387   }
388 fi # as_fn_append
389
390 # as_fn_arith ARG...
391 # ------------------
392 # Perform arithmetic evaluation on the ARGs, and store the result in the
393 # global $as_val. Take advantage of shells that can avoid forks. The arguments
394 # must be portable across $(()) and expr.
395 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
396   eval 'as_fn_arith ()
397   {
398     as_val=$(( $* ))
399   }'
400 else
401   as_fn_arith ()
402   {
403     as_val=`expr "$@" || test $? -eq 1`
404   }
405 fi # as_fn_arith
406
407
408 # as_fn_error STATUS ERROR [LINENO LOG_FD]
409 # ----------------------------------------
410 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
411 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
412 # script with STATUS, using 1 if that was 0.
413 as_fn_error ()
414 {
415   as_status=$1; test $as_status -eq 0 && as_status=1
416   if test "$4"; then
417     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
418     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
419   fi
420   $as_echo "$as_me: error: $2" >&2
421   as_fn_exit $as_status
422 } # as_fn_error
423
424 if expr a : '\(a\)' >/dev/null 2>&1 &&
425    test "X`expr 00001 : '.*\(...\)'`" = X001; then
426   as_expr=expr
427 else
428   as_expr=false
429 fi
430
431 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
432   as_basename=basename
433 else
434   as_basename=false
435 fi
436
437 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
438   as_dirname=dirname
439 else
440   as_dirname=false
441 fi
442
443 as_me=`$as_basename -- "$0" ||
444 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
445          X"$0" : 'X\(//\)$' \| \
446          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
447 $as_echo X/"$0" |
448     sed '/^.*\/\([^/][^/]*\)\/*$/{
449             s//\1/
450             q
451           }
452           /^X\/\(\/\/\)$/{
453             s//\1/
454             q
455           }
456           /^X\/\(\/\).*/{
457             s//\1/
458             q
459           }
460           s/.*/./; q'`
461
462 # Avoid depending upon Character Ranges.
463 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
464 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
465 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
466 as_cr_digits='0123456789'
467 as_cr_alnum=$as_cr_Letters$as_cr_digits
468
469
470   as_lineno_1=$LINENO as_lineno_1a=$LINENO
471   as_lineno_2=$LINENO as_lineno_2a=$LINENO
472   eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
473   test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
474   # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
475   sed -n '
476     p
477     /[$]LINENO/=
478   ' <$as_myself |
479     sed '
480       s/[$]LINENO.*/&-/
481       t lineno
482       b
483       :lineno
484       N
485       :loop
486       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
487       t loop
488       s/-\n.*//
489     ' >$as_me.lineno &&
490   chmod +x "$as_me.lineno" ||
491     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
492
493   # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
494   # already done that, so ensure we don't try to do so again and fall
495   # in an infinite loop.  This has already happened in practice.
496   _as_can_reexec=no; export _as_can_reexec
497   # Don't try to exec as it changes $[0], causing all sort of problems
498   # (the dirname of $[0] is not the place where we might find the
499   # original and so on.  Autoconf is especially sensitive to this).
500   . "./$as_me.lineno"
501   # Exit status is that of the last command.
502   exit
503 }
504
505 ECHO_C= ECHO_N= ECHO_T=
506 case `echo -n x` in #(((((
507 -n*)
508   case `echo 'xy\c'` in
509   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
510   xy)  ECHO_C='\c';;
511   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
512        ECHO_T=' ';;
513   esac;;
514 *)
515   ECHO_N='-n';;
516 esac
517
518 rm -f conf$$ conf$$.exe conf$$.file
519 if test -d conf$$.dir; then
520   rm -f conf$$.dir/conf$$.file
521 else
522   rm -f conf$$.dir
523   mkdir conf$$.dir 2>/dev/null
524 fi
525 if (echo >conf$$.file) 2>/dev/null; then
526   if ln -s conf$$.file conf$$ 2>/dev/null; then
527     as_ln_s='ln -s'
528     # ... but there are two gotchas:
529     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
530     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
531     # In both cases, we have to default to `cp -pR'.
532     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
533       as_ln_s='cp -pR'
534   elif ln conf$$.file conf$$ 2>/dev/null; then
535     as_ln_s=ln
536   else
537     as_ln_s='cp -pR'
538   fi
539 else
540   as_ln_s='cp -pR'
541 fi
542 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
543 rmdir conf$$.dir 2>/dev/null
544
545 if mkdir -p . 2>/dev/null; then
546   as_mkdir_p='mkdir -p "$as_dir"'
547 else
548   test -d ./-p && rmdir ./-p
549   as_mkdir_p=false
550 fi
551
552 as_test_x='test -x'
553 as_executable_p=as_fn_executable_p
554
555 # Sed expression to map a string onto a valid CPP name.
556 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
557
558 # Sed expression to map a string onto a valid variable name.
559 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
560
561
562 test -n "$DJDIR" || exec 7<&0 </dev/null
563 exec 6>&1
564
565 # Name of the host.
566 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
567 # so uname gets run too.
568 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
569
570 #
571 # Initializations.
572 #
573 ac_default_prefix=/usr/local
574 ac_clean_files=
575 ac_config_libobj_dir=.
576 LIBOBJS=
577 cross_compiling=no
578 subdirs=
579 MFLAGS=
580 MAKEFLAGS=
581
582 # Identity of this package.
583 PACKAGE_NAME='PostgreSQL'
584 PACKAGE_TARNAME='postgresql'
585 PACKAGE_VERSION='9.6devel'
586 PACKAGE_STRING='PostgreSQL 9.6devel'
587 PACKAGE_BUGREPORT='pgsql-bugs@postgresql.org'
588 PACKAGE_URL=''
589
590 ac_unique_file="src/backend/access/common/heaptuple.c"
591 ac_default_prefix=/usr/local/pgsql
592 # Factoring default headers for most tests.
593 ac_includes_default="\
594 #include <stdio.h>
595 #ifdef HAVE_SYS_TYPES_H
596 # include <sys/types.h>
597 #endif
598 #ifdef HAVE_SYS_STAT_H
599 # include <sys/stat.h>
600 #endif
601 #ifdef STDC_HEADERS
602 # include <stdlib.h>
603 # include <stddef.h>
604 #else
605 # ifdef HAVE_STDLIB_H
606 #  include <stdlib.h>
607 # endif
608 #endif
609 #ifdef HAVE_STRING_H
610 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
611 #  include <memory.h>
612 # endif
613 # include <string.h>
614 #endif
615 #ifdef HAVE_STRINGS_H
616 # include <strings.h>
617 #endif
618 #ifdef HAVE_INTTYPES_H
619 # include <inttypes.h>
620 #endif
621 #ifdef HAVE_STDINT_H
622 # include <stdint.h>
623 #endif
624 #ifdef HAVE_UNISTD_H
625 # include <unistd.h>
626 #endif"
627
628 ac_subst_vars='LTLIBOBJS
629 vpath_build
630 PG_VERSION_NUM
631 PROVE
632 OSX
633 XSLTPROC
634 XMLLINT
635 DBTOEPUB
636 COLLATEINDEX
637 DOCBOOKSTYLE
638 have_docbook
639 JADE
640 NSGMLS
641 TCL_SHLIB_LD_LIBS
642 TCL_SHARED_BUILD
643 TCL_LIB_SPEC
644 TCL_LIBS
645 TCL_INCLUDE_SPEC
646 TCL_CONFIG_SH
647 TCLSH
648 XGETTEXT
649 MSGMERGE
650 MSGFMT_FLAGS
651 MSGFMT
652 HAVE_POSIX_SIGNALS
653 PG_CRC32C_OBJS
654 CFLAGS_SSE42
655 have_win32_dbghelp
656 HAVE_IPV6
657 LIBOBJS
658 UUID_LIBS
659 LDAP_LIBS_BE
660 LDAP_LIBS_FE
661 PTHREAD_CFLAGS
662 PTHREAD_LIBS
663 PTHREAD_CC
664 ax_pthread_config
665 ZIC
666 python_additional_libs
667 python_libspec
668 python_libdir
669 python_includespec
670 python_version
671 python_majorversion
672 PYTHON
673 perl_embed_ldflags
674 perl_useshrplib
675 perl_privlibexp
676 perl_archlibexp
677 PERL
678 FLEXFLAGS
679 FLEX
680 BISONFLAGS
681 BISON
682 MKDIR_P
683 AWK
684 LN_S
685 TAR
686 install_bin
687 INSTALL_DATA
688 INSTALL_SCRIPT
689 INSTALL_PROGRAM
690 WINDRES
691 DLLWRAP
692 DLLTOOL
693 AR
694 STRIP_SHARED_LIB
695 STRIP_STATIC_LIB
696 STRIP
697 RANLIB
698 ld_R_works
699 with_gnu_ld
700 LD
701 LDFLAGS_SL
702 LDFLAGS_EX
703 ELF_SYS
704 EGREP
705 GREP
706 with_zlib
707 with_system_tzdata
708 with_libxslt
709 with_libxml
710 XML2_CONFIG
711 UUID_EXTRA_OBJS
712 with_uuid
713 with_selinux
714 with_openssl
715 krb_srvtab
716 with_python
717 with_perl
718 with_tcl
719 enable_thread_safety
720 INCLUDES
721 autodepend
722 TAS
723 GCC
724 CPP
725 CFLAGS_VECTOR
726 SUN_STUDIO_CC
727 OBJEXT
728 EXEEXT
729 ac_ct_CC
730 CPPFLAGS
731 LDFLAGS
732 CFLAGS
733 CC
734 enable_tap_tests
735 enable_dtrace
736 DTRACEFLAGS
737 DTRACE
738 enable_coverage
739 GENHTML
740 LCOV
741 GCOV
742 enable_debug
743 enable_rpath
744 default_port
745 WANTED_LANGUAGES
746 enable_nls
747 PORTNAME
748 host_os
749 host_vendor
750 host_cpu
751 host
752 build_os
753 build_vendor
754 build_cpu
755 build
756 PG_MAJORVERSION
757 configure_args
758 target_alias
759 host_alias
760 build_alias
761 LIBS
762 ECHO_T
763 ECHO_N
764 ECHO_C
765 DEFS
766 mandir
767 localedir
768 libdir
769 psdir
770 pdfdir
771 dvidir
772 htmldir
773 infodir
774 docdir
775 oldincludedir
776 includedir
777 localstatedir
778 sharedstatedir
779 sysconfdir
780 datadir
781 datarootdir
782 libexecdir
783 sbindir
784 bindir
785 program_transform_name
786 prefix
787 exec_prefix
788 PACKAGE_URL
789 PACKAGE_BUGREPORT
790 PACKAGE_STRING
791 PACKAGE_VERSION
792 PACKAGE_TARNAME
793 PACKAGE_NAME
794 PATH_SEPARATOR
795 SHELL'
796 ac_subst_files=''
797 ac_user_opts='
798 enable_option_checking
799 with_extra_version
800 with_template
801 with_includes
802 with_libraries
803 with_libs
804 enable_integer_datetimes
805 enable_nls
806 with_pgport
807 enable_rpath
808 enable_spinlocks
809 enable_atomics
810 enable_debug
811 enable_profiling
812 enable_coverage
813 enable_dtrace
814 enable_tap_tests
815 with_blocksize
816 with_segsize
817 with_wal_blocksize
818 with_wal_segsize
819 with_CC
820 enable_depend
821 enable_cassert
822 enable_thread_safety
823 with_tcl
824 with_tclconfig
825 with_perl
826 with_python
827 with_gssapi
828 with_krb_srvnam
829 with_pam
830 with_ldap
831 with_bonjour
832 with_openssl
833 with_selinux
834 with_readline
835 with_libedit_preferred
836 with_uuid
837 with_ossp_uuid
838 with_libxml
839 with_libxslt
840 with_system_tzdata
841 with_zlib
842 with_gnu_ld
843 enable_largefile
844 enable_float4_byval
845 enable_float8_byval
846 '
847       ac_precious_vars='build_alias
848 host_alias
849 target_alias
850 CC
851 CFLAGS
852 LDFLAGS
853 LIBS
854 CPPFLAGS
855 CPP
856 LDFLAGS_EX
857 LDFLAGS_SL
858 DOCBOOKSTYLE'
859
860
861 # Initialize some variables set by options.
862 ac_init_help=
863 ac_init_version=false
864 ac_unrecognized_opts=
865 ac_unrecognized_sep=
866 # The variables have the same names as the options, with
867 # dashes changed to underlines.
868 cache_file=/dev/null
869 exec_prefix=NONE
870 no_create=
871 no_recursion=
872 prefix=NONE
873 program_prefix=NONE
874 program_suffix=NONE
875 program_transform_name=s,x,x,
876 silent=
877 site=
878 srcdir=
879 verbose=
880 x_includes=NONE
881 x_libraries=NONE
882
883 # Installation directory options.
884 # These are left unexpanded so users can "make install exec_prefix=/foo"
885 # and all the variables that are supposed to be based on exec_prefix
886 # by default will actually change.
887 # Use braces instead of parens because sh, perl, etc. also accept them.
888 # (The list follows the same order as the GNU Coding Standards.)
889 bindir='${exec_prefix}/bin'
890 sbindir='${exec_prefix}/sbin'
891 libexecdir='${exec_prefix}/libexec'
892 datarootdir='${prefix}/share'
893 datadir='${datarootdir}'
894 sysconfdir='${prefix}/etc'
895 sharedstatedir='${prefix}/com'
896 localstatedir='${prefix}/var'
897 includedir='${prefix}/include'
898 oldincludedir='/usr/include'
899 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
900 infodir='${datarootdir}/info'
901 htmldir='${docdir}'
902 dvidir='${docdir}'
903 pdfdir='${docdir}'
904 psdir='${docdir}'
905 libdir='${exec_prefix}/lib'
906 localedir='${datarootdir}/locale'
907 mandir='${datarootdir}/man'
908
909 ac_prev=
910 ac_dashdash=
911 for ac_option
912 do
913   # If the previous option needs an argument, assign it.
914   if test -n "$ac_prev"; then
915     eval $ac_prev=\$ac_option
916     ac_prev=
917     continue
918   fi
919
920   case $ac_option in
921   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
922   *=)   ac_optarg= ;;
923   *)    ac_optarg=yes ;;
924   esac
925
926   # Accept the important Cygnus configure options, so we can diagnose typos.
927
928   case $ac_dashdash$ac_option in
929   --)
930     ac_dashdash=yes ;;
931
932   -bindir | --bindir | --bindi | --bind | --bin | --bi)
933     ac_prev=bindir ;;
934   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
935     bindir=$ac_optarg ;;
936
937   -build | --build | --buil | --bui | --bu)
938     ac_prev=build_alias ;;
939   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
940     build_alias=$ac_optarg ;;
941
942   -cache-file | --cache-file | --cache-fil | --cache-fi \
943   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
944     ac_prev=cache_file ;;
945   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
946   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
947     cache_file=$ac_optarg ;;
948
949   --config-cache | -C)
950     cache_file=config.cache ;;
951
952   -datadir | --datadir | --datadi | --datad)
953     ac_prev=datadir ;;
954   -datadir=* | --datadir=* | --datadi=* | --datad=*)
955     datadir=$ac_optarg ;;
956
957   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
958   | --dataroo | --dataro | --datar)
959     ac_prev=datarootdir ;;
960   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
961   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
962     datarootdir=$ac_optarg ;;
963
964   -disable-* | --disable-*)
965     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
966     # Reject names that are not valid shell variable names.
967     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
968       as_fn_error $? "invalid feature name: $ac_useropt"
969     ac_useropt_orig=$ac_useropt
970     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
971     case $ac_user_opts in
972       *"
973 "enable_$ac_useropt"
974 "*) ;;
975       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
976          ac_unrecognized_sep=', ';;
977     esac
978     eval enable_$ac_useropt=no ;;
979
980   -docdir | --docdir | --docdi | --doc | --do)
981     ac_prev=docdir ;;
982   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
983     docdir=$ac_optarg ;;
984
985   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
986     ac_prev=dvidir ;;
987   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
988     dvidir=$ac_optarg ;;
989
990   -enable-* | --enable-*)
991     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
992     # Reject names that are not valid shell variable names.
993     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
994       as_fn_error $? "invalid feature name: $ac_useropt"
995     ac_useropt_orig=$ac_useropt
996     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
997     case $ac_user_opts in
998       *"
999 "enable_$ac_useropt"
1000 "*) ;;
1001       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1002          ac_unrecognized_sep=', ';;
1003     esac
1004     eval enable_$ac_useropt=\$ac_optarg ;;
1005
1006   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1007   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1008   | --exec | --exe | --ex)
1009     ac_prev=exec_prefix ;;
1010   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1011   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1012   | --exec=* | --exe=* | --ex=*)
1013     exec_prefix=$ac_optarg ;;
1014
1015   -gas | --gas | --ga | --g)
1016     # Obsolete; use --with-gas.
1017     with_gas=yes ;;
1018
1019   -help | --help | --hel | --he | -h)
1020     ac_init_help=long ;;
1021   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1022     ac_init_help=recursive ;;
1023   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1024     ac_init_help=short ;;
1025
1026   -host | --host | --hos | --ho)
1027     ac_prev=host_alias ;;
1028   -host=* | --host=* | --hos=* | --ho=*)
1029     host_alias=$ac_optarg ;;
1030
1031   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1032     ac_prev=htmldir ;;
1033   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1034   | --ht=*)
1035     htmldir=$ac_optarg ;;
1036
1037   -includedir | --includedir | --includedi | --included | --include \
1038   | --includ | --inclu | --incl | --inc)
1039     ac_prev=includedir ;;
1040   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1041   | --includ=* | --inclu=* | --incl=* | --inc=*)
1042     includedir=$ac_optarg ;;
1043
1044   -infodir | --infodir | --infodi | --infod | --info | --inf)
1045     ac_prev=infodir ;;
1046   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1047     infodir=$ac_optarg ;;
1048
1049   -libdir | --libdir | --libdi | --libd)
1050     ac_prev=libdir ;;
1051   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1052     libdir=$ac_optarg ;;
1053
1054   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1055   | --libexe | --libex | --libe)
1056     ac_prev=libexecdir ;;
1057   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1058   | --libexe=* | --libex=* | --libe=*)
1059     libexecdir=$ac_optarg ;;
1060
1061   -localedir | --localedir | --localedi | --localed | --locale)
1062     ac_prev=localedir ;;
1063   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1064     localedir=$ac_optarg ;;
1065
1066   -localstatedir | --localstatedir | --localstatedi | --localstated \
1067   | --localstate | --localstat | --localsta | --localst | --locals)
1068     ac_prev=localstatedir ;;
1069   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1070   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1071     localstatedir=$ac_optarg ;;
1072
1073   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1074     ac_prev=mandir ;;
1075   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1076     mandir=$ac_optarg ;;
1077
1078   -nfp | --nfp | --nf)
1079     # Obsolete; use --without-fp.
1080     with_fp=no ;;
1081
1082   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1083   | --no-cr | --no-c | -n)
1084     no_create=yes ;;
1085
1086   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1087   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1088     no_recursion=yes ;;
1089
1090   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1091   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1092   | --oldin | --oldi | --old | --ol | --o)
1093     ac_prev=oldincludedir ;;
1094   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1095   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1096   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1097     oldincludedir=$ac_optarg ;;
1098
1099   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1100     ac_prev=prefix ;;
1101   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1102     prefix=$ac_optarg ;;
1103
1104   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1105   | --program-pre | --program-pr | --program-p)
1106     ac_prev=program_prefix ;;
1107   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1108   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1109     program_prefix=$ac_optarg ;;
1110
1111   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1112   | --program-suf | --program-su | --program-s)
1113     ac_prev=program_suffix ;;
1114   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1115   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1116     program_suffix=$ac_optarg ;;
1117
1118   -program-transform-name | --program-transform-name \
1119   | --program-transform-nam | --program-transform-na \
1120   | --program-transform-n | --program-transform- \
1121   | --program-transform | --program-transfor \
1122   | --program-transfo | --program-transf \
1123   | --program-trans | --program-tran \
1124   | --progr-tra | --program-tr | --program-t)
1125     ac_prev=program_transform_name ;;
1126   -program-transform-name=* | --program-transform-name=* \
1127   | --program-transform-nam=* | --program-transform-na=* \
1128   | --program-transform-n=* | --program-transform-=* \
1129   | --program-transform=* | --program-transfor=* \
1130   | --program-transfo=* | --program-transf=* \
1131   | --program-trans=* | --program-tran=* \
1132   | --progr-tra=* | --program-tr=* | --program-t=*)
1133     program_transform_name=$ac_optarg ;;
1134
1135   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1136     ac_prev=pdfdir ;;
1137   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1138     pdfdir=$ac_optarg ;;
1139
1140   -psdir | --psdir | --psdi | --psd | --ps)
1141     ac_prev=psdir ;;
1142   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1143     psdir=$ac_optarg ;;
1144
1145   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1146   | -silent | --silent | --silen | --sile | --sil)
1147     silent=yes ;;
1148
1149   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1150     ac_prev=sbindir ;;
1151   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1152   | --sbi=* | --sb=*)
1153     sbindir=$ac_optarg ;;
1154
1155   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1156   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1157   | --sharedst | --shareds | --shared | --share | --shar \
1158   | --sha | --sh)
1159     ac_prev=sharedstatedir ;;
1160   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1161   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1162   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1163   | --sha=* | --sh=*)
1164     sharedstatedir=$ac_optarg ;;
1165
1166   -site | --site | --sit)
1167     ac_prev=site ;;
1168   -site=* | --site=* | --sit=*)
1169     site=$ac_optarg ;;
1170
1171   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1172     ac_prev=srcdir ;;
1173   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1174     srcdir=$ac_optarg ;;
1175
1176   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1177   | --syscon | --sysco | --sysc | --sys | --sy)
1178     ac_prev=sysconfdir ;;
1179   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1180   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1181     sysconfdir=$ac_optarg ;;
1182
1183   -target | --target | --targe | --targ | --tar | --ta | --t)
1184     ac_prev=target_alias ;;
1185   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1186     target_alias=$ac_optarg ;;
1187
1188   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1189     verbose=yes ;;
1190
1191   -version | --version | --versio | --versi | --vers | -V)
1192     ac_init_version=: ;;
1193
1194   -with-* | --with-*)
1195     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1196     # Reject names that are not valid shell variable names.
1197     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1198       as_fn_error $? "invalid package name: $ac_useropt"
1199     ac_useropt_orig=$ac_useropt
1200     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1201     case $ac_user_opts in
1202       *"
1203 "with_$ac_useropt"
1204 "*) ;;
1205       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1206          ac_unrecognized_sep=', ';;
1207     esac
1208     eval with_$ac_useropt=\$ac_optarg ;;
1209
1210   -without-* | --without-*)
1211     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1212     # Reject names that are not valid shell variable names.
1213     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1214       as_fn_error $? "invalid package name: $ac_useropt"
1215     ac_useropt_orig=$ac_useropt
1216     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1217     case $ac_user_opts in
1218       *"
1219 "with_$ac_useropt"
1220 "*) ;;
1221       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1222          ac_unrecognized_sep=', ';;
1223     esac
1224     eval with_$ac_useropt=no ;;
1225
1226   --x)
1227     # Obsolete; use --with-x.
1228     with_x=yes ;;
1229
1230   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1231   | --x-incl | --x-inc | --x-in | --x-i)
1232     ac_prev=x_includes ;;
1233   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1234   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1235     x_includes=$ac_optarg ;;
1236
1237   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1238   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1239     ac_prev=x_libraries ;;
1240   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1241   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1242     x_libraries=$ac_optarg ;;
1243
1244   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1245 Try \`$0 --help' for more information"
1246     ;;
1247
1248   *=*)
1249     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1250     # Reject names that are not valid shell variable names.
1251     case $ac_envvar in #(
1252       '' | [0-9]* | *[!_$as_cr_alnum]* )
1253       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1254     esac
1255     eval $ac_envvar=\$ac_optarg
1256     export $ac_envvar ;;
1257
1258   *)
1259     # FIXME: should be removed in autoconf 3.0.
1260     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1261     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1262       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1263     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1264     ;;
1265
1266   esac
1267 done
1268
1269 if test -n "$ac_prev"; then
1270   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1271   as_fn_error $? "missing argument to $ac_option"
1272 fi
1273
1274 if test -n "$ac_unrecognized_opts"; then
1275   case $enable_option_checking in
1276     no) ;;
1277     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1278     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1279   esac
1280 fi
1281
1282 # Check all directory arguments for consistency.
1283 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1284                 datadir sysconfdir sharedstatedir localstatedir includedir \
1285                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1286                 libdir localedir mandir
1287 do
1288   eval ac_val=\$$ac_var
1289   # Remove trailing slashes.
1290   case $ac_val in
1291     */ )
1292       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1293       eval $ac_var=\$ac_val;;
1294   esac
1295   # Be sure to have absolute directory names.
1296   case $ac_val in
1297     [\\/$]* | ?:[\\/]* )  continue;;
1298     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1299   esac
1300   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1301 done
1302
1303 # There might be people who depend on the old broken behavior: `$host'
1304 # used to hold the argument of --host etc.
1305 # FIXME: To remove some day.
1306 build=$build_alias
1307 host=$host_alias
1308 target=$target_alias
1309
1310 # FIXME: To remove some day.
1311 if test "x$host_alias" != x; then
1312   if test "x$build_alias" = x; then
1313     cross_compiling=maybe
1314   elif test "x$build_alias" != "x$host_alias"; then
1315     cross_compiling=yes
1316   fi
1317 fi
1318
1319 ac_tool_prefix=
1320 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1321
1322 test "$silent" = yes && exec 6>/dev/null
1323
1324
1325 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1326 ac_ls_di=`ls -di .` &&
1327 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1328   as_fn_error $? "working directory cannot be determined"
1329 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1330   as_fn_error $? "pwd does not report name of working directory"
1331
1332
1333 # Find the source files, if location was not specified.
1334 if test -z "$srcdir"; then
1335   ac_srcdir_defaulted=yes
1336   # Try the directory containing this script, then the parent directory.
1337   ac_confdir=`$as_dirname -- "$as_myself" ||
1338 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1339          X"$as_myself" : 'X\(//\)[^/]' \| \
1340          X"$as_myself" : 'X\(//\)$' \| \
1341          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1342 $as_echo X"$as_myself" |
1343     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1344             s//\1/
1345             q
1346           }
1347           /^X\(\/\/\)[^/].*/{
1348             s//\1/
1349             q
1350           }
1351           /^X\(\/\/\)$/{
1352             s//\1/
1353             q
1354           }
1355           /^X\(\/\).*/{
1356             s//\1/
1357             q
1358           }
1359           s/.*/./; q'`
1360   srcdir=$ac_confdir
1361   if test ! -r "$srcdir/$ac_unique_file"; then
1362     srcdir=..
1363   fi
1364 else
1365   ac_srcdir_defaulted=no
1366 fi
1367 if test ! -r "$srcdir/$ac_unique_file"; then
1368   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1369   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1370 fi
1371 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1372 ac_abs_confdir=`(
1373         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1374         pwd)`
1375 # When building in place, set srcdir=.
1376 if test "$ac_abs_confdir" = "$ac_pwd"; then
1377   srcdir=.
1378 fi
1379 # Remove unnecessary trailing slashes from srcdir.
1380 # Double slashes in file names in object file debugging info
1381 # mess up M-x gdb in Emacs.
1382 case $srcdir in
1383 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1384 esac
1385 for ac_var in $ac_precious_vars; do
1386   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1387   eval ac_env_${ac_var}_value=\$${ac_var}
1388   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1389   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1390 done
1391
1392 #
1393 # Report the --help message.
1394 #
1395 if test "$ac_init_help" = "long"; then
1396   # Omit some internal or obsolete options to make the list less imposing.
1397   # This message is too long to be a string in the A/UX 3.1 sh.
1398   cat <<_ACEOF
1399 \`configure' configures PostgreSQL 9.6devel to adapt to many kinds of systems.
1400
1401 Usage: $0 [OPTION]... [VAR=VALUE]...
1402
1403 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1404 VAR=VALUE.  See below for descriptions of some of the useful variables.
1405
1406 Defaults for the options are specified in brackets.
1407
1408 Configuration:
1409   -h, --help              display this help and exit
1410       --help=short        display options specific to this package
1411       --help=recursive    display the short help of all the included packages
1412   -V, --version           display version information and exit
1413   -q, --quiet, --silent   do not print \`checking ...' messages
1414       --cache-file=FILE   cache test results in FILE [disabled]
1415   -C, --config-cache      alias for \`--cache-file=config.cache'
1416   -n, --no-create         do not create output files
1417       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1418
1419 Installation directories:
1420   --prefix=PREFIX         install architecture-independent files in PREFIX
1421                           [$ac_default_prefix]
1422   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1423                           [PREFIX]
1424
1425 By default, \`make install' will install all the files in
1426 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1427 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1428 for instance \`--prefix=\$HOME'.
1429
1430 For better control, use the options below.
1431
1432 Fine tuning of the installation directories:
1433   --bindir=DIR            user executables [EPREFIX/bin]
1434   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1435   --libexecdir=DIR        program executables [EPREFIX/libexec]
1436   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1437   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1438   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1439   --libdir=DIR            object code libraries [EPREFIX/lib]
1440   --includedir=DIR        C header files [PREFIX/include]
1441   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1442   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1443   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1444   --infodir=DIR           info documentation [DATAROOTDIR/info]
1445   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1446   --mandir=DIR            man documentation [DATAROOTDIR/man]
1447   --docdir=DIR            documentation root [DATAROOTDIR/doc/postgresql]
1448   --htmldir=DIR           html documentation [DOCDIR]
1449   --dvidir=DIR            dvi documentation [DOCDIR]
1450   --pdfdir=DIR            pdf documentation [DOCDIR]
1451   --psdir=DIR             ps documentation [DOCDIR]
1452 _ACEOF
1453
1454   cat <<\_ACEOF
1455
1456 System types:
1457   --build=BUILD     configure for building on BUILD [guessed]
1458   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1459 _ACEOF
1460 fi
1461
1462 if test -n "$ac_init_help"; then
1463   case $ac_init_help in
1464      short | recursive ) echo "Configuration of PostgreSQL 9.6devel:";;
1465    esac
1466   cat <<\_ACEOF
1467
1468 Optional Features:
1469   --disable-option-checking  ignore unrecognized --enable/--with options
1470   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1471   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1472   --disable-integer-datetimes
1473                           disable 64-bit integer date/time support
1474   --enable-nls[=LANGUAGES]
1475                           enable Native Language Support
1476   --disable-rpath         do not embed shared library search path in
1477                           executables
1478   --disable-spinlocks     do not use spinlocks
1479   --disable-atomics       do not use atomic operations
1480   --enable-debug          build with debugging symbols (-g)
1481   --enable-profiling      build with profiling enabled
1482   --enable-coverage       build with coverage testing instrumentation
1483   --enable-dtrace         build with DTrace support
1484   --enable-tap-tests      enable TAP tests (requires Perl and IPC::Run)
1485   --enable-depend         turn on automatic dependency tracking
1486   --enable-cassert        enable assertion checks (for debugging)
1487   --disable-thread-safety disable thread-safety in client libraries
1488   --disable-largefile     omit support for large files
1489   --disable-float4-byval  disable float4 passed by value
1490   --disable-float8-byval  disable float8 passed by value
1491
1492 Optional Packages:
1493   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1494   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1495   --with-extra-version=STRING
1496                           append STRING to version
1497   --with-template=NAME    override operating system template
1498   --with-includes=DIRS    look for additional header files in DIRS
1499   --with-libraries=DIRS   look for additional libraries in DIRS
1500   --with-libs=DIRS        alternative spelling of --with-libraries
1501   --with-pgport=PORTNUM   set default port number [5432]
1502   --with-blocksize=BLOCKSIZE
1503                           set table block size in kB [8]
1504   --with-segsize=SEGSIZE  set table segment size in GB [1]
1505   --with-wal-blocksize=BLOCKSIZE
1506                           set WAL block size in kB [8]
1507   --with-wal-segsize=SEGSIZE
1508                           set WAL segment size in MB [16]
1509   --with-CC=CMD           set compiler (deprecated)
1510   --with-tcl              build Tcl modules (PL/Tcl)
1511   --with-tclconfig=DIR    tclConfig.sh is in DIR
1512   --with-perl             build Perl modules (PL/Perl)
1513   --with-python           build Python modules (PL/Python)
1514   --with-gssapi           build with GSSAPI support
1515   --with-krb-srvnam=NAME  default service principal name in Kerberos (GSSAPI)
1516                           [postgres]
1517   --with-pam              build with PAM support
1518   --with-ldap             build with LDAP support
1519   --with-bonjour          build with Bonjour support
1520   --with-openssl          build with OpenSSL support
1521   --with-selinux          build with SELinux support
1522   --without-readline      do not use GNU Readline nor BSD Libedit for editing
1523   --with-libedit-preferred
1524                           prefer BSD Libedit over GNU Readline
1525   --with-uuid=LIB         build contrib/uuid-ossp using LIB (bsd,e2fs,ossp)
1526   --with-ossp-uuid        obsolete spelling of --with-uuid=ossp
1527   --with-libxml           build with XML support
1528   --with-libxslt          use XSLT support when building contrib/xml2
1529   --with-system-tzdata=DIR
1530                           use system time zone data in DIR
1531   --without-zlib          do not use Zlib
1532   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1533
1534 Some influential environment variables:
1535   CC          C compiler command
1536   CFLAGS      C compiler flags
1537   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1538               nonstandard directory <lib dir>
1539   LIBS        libraries to pass to the linker, e.g. -l<library>
1540   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1541               you have headers in a nonstandard directory <include dir>
1542   CPP         C preprocessor
1543   LDFLAGS_EX  extra linker flags for linking executables only
1544   LDFLAGS_SL  extra linker flags for linking shared libraries only
1545   DOCBOOKSTYLE
1546               location of DocBook stylesheets
1547
1548 Use these variables to override the choices made by `configure' or to help
1549 it to find libraries and programs with nonstandard names/locations.
1550
1551 Report bugs to <pgsql-bugs@postgresql.org>.
1552 _ACEOF
1553 ac_status=$?
1554 fi
1555
1556 if test "$ac_init_help" = "recursive"; then
1557   # If there are subdirs, report their specific --help.
1558   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1559     test -d "$ac_dir" ||
1560       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1561       continue
1562     ac_builddir=.
1563
1564 case "$ac_dir" in
1565 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1566 *)
1567   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1568   # A ".." for each directory in $ac_dir_suffix.
1569   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1570   case $ac_top_builddir_sub in
1571   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1572   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1573   esac ;;
1574 esac
1575 ac_abs_top_builddir=$ac_pwd
1576 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1577 # for backward compatibility:
1578 ac_top_builddir=$ac_top_build_prefix
1579
1580 case $srcdir in
1581   .)  # We are building in place.
1582     ac_srcdir=.
1583     ac_top_srcdir=$ac_top_builddir_sub
1584     ac_abs_top_srcdir=$ac_pwd ;;
1585   [\\/]* | ?:[\\/]* )  # Absolute name.
1586     ac_srcdir=$srcdir$ac_dir_suffix;
1587     ac_top_srcdir=$srcdir
1588     ac_abs_top_srcdir=$srcdir ;;
1589   *) # Relative name.
1590     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1591     ac_top_srcdir=$ac_top_build_prefix$srcdir
1592     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1593 esac
1594 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1595
1596     cd "$ac_dir" || { ac_status=$?; continue; }
1597     # Check for guested configure.
1598     if test -f "$ac_srcdir/configure.gnu"; then
1599       echo &&
1600       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1601     elif test -f "$ac_srcdir/configure"; then
1602       echo &&
1603       $SHELL "$ac_srcdir/configure" --help=recursive
1604     else
1605       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1606     fi || ac_status=$?
1607     cd "$ac_pwd" || { ac_status=$?; break; }
1608   done
1609 fi
1610
1611 test -n "$ac_init_help" && exit $ac_status
1612 if $ac_init_version; then
1613   cat <<\_ACEOF
1614 PostgreSQL configure 9.6devel
1615 generated by GNU Autoconf 2.69
1616
1617 Copyright (C) 2012 Free Software Foundation, Inc.
1618 This configure script is free software; the Free Software Foundation
1619 gives unlimited permission to copy, distribute and modify it.
1620
1621 Copyright (c) 1996-2015, PostgreSQL Global Development Group
1622 _ACEOF
1623   exit
1624 fi
1625
1626 ## ------------------------ ##
1627 ## Autoconf initialization. ##
1628 ## ------------------------ ##
1629
1630 # ac_fn_c_try_compile LINENO
1631 # --------------------------
1632 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1633 ac_fn_c_try_compile ()
1634 {
1635   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1636   rm -f conftest.$ac_objext
1637   if { { ac_try="$ac_compile"
1638 case "(($ac_try" in
1639   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1640   *) ac_try_echo=$ac_try;;
1641 esac
1642 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1643 $as_echo "$ac_try_echo"; } >&5
1644   (eval "$ac_compile") 2>conftest.err
1645   ac_status=$?
1646   if test -s conftest.err; then
1647     grep -v '^ *+' conftest.err >conftest.er1
1648     cat conftest.er1 >&5
1649     mv -f conftest.er1 conftest.err
1650   fi
1651   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1652   test $ac_status = 0; } && {
1653          test -z "$ac_c_werror_flag" ||
1654          test ! -s conftest.err
1655        } && test -s conftest.$ac_objext; then :
1656   ac_retval=0
1657 else
1658   $as_echo "$as_me: failed program was:" >&5
1659 sed 's/^/| /' conftest.$ac_ext >&5
1660
1661         ac_retval=1
1662 fi
1663   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1664   as_fn_set_status $ac_retval
1665
1666 } # ac_fn_c_try_compile
1667
1668 # ac_fn_c_try_link LINENO
1669 # -----------------------
1670 # Try to link conftest.$ac_ext, and return whether this succeeded.
1671 ac_fn_c_try_link ()
1672 {
1673   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1674   rm -f conftest.$ac_objext conftest$ac_exeext
1675   if { { ac_try="$ac_link"
1676 case "(($ac_try" in
1677   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1678   *) ac_try_echo=$ac_try;;
1679 esac
1680 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1681 $as_echo "$ac_try_echo"; } >&5
1682   (eval "$ac_link") 2>conftest.err
1683   ac_status=$?
1684   if test -s conftest.err; then
1685     grep -v '^ *+' conftest.err >conftest.er1
1686     cat conftest.er1 >&5
1687     mv -f conftest.er1 conftest.err
1688   fi
1689   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1690   test $ac_status = 0; } && {
1691          test -z "$ac_c_werror_flag" ||
1692          test ! -s conftest.err
1693        } && test -s conftest$ac_exeext && {
1694          test "$cross_compiling" = yes ||
1695          test -x conftest$ac_exeext
1696        }; then :
1697   ac_retval=0
1698 else
1699   $as_echo "$as_me: failed program was:" >&5
1700 sed 's/^/| /' conftest.$ac_ext >&5
1701
1702         ac_retval=1
1703 fi
1704   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1705   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1706   # interfere with the next link command; also delete a directory that is
1707   # left behind by Apple's compiler.  We do this before executing the actions.
1708   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1709   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1710   as_fn_set_status $ac_retval
1711
1712 } # ac_fn_c_try_link
1713
1714 # ac_fn_c_try_cpp LINENO
1715 # ----------------------
1716 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1717 ac_fn_c_try_cpp ()
1718 {
1719   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1720   if { { ac_try="$ac_cpp conftest.$ac_ext"
1721 case "(($ac_try" in
1722   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1723   *) ac_try_echo=$ac_try;;
1724 esac
1725 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1726 $as_echo "$ac_try_echo"; } >&5
1727   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1728   ac_status=$?
1729   if test -s conftest.err; then
1730     grep -v '^ *+' conftest.err >conftest.er1
1731     cat conftest.er1 >&5
1732     mv -f conftest.er1 conftest.err
1733   fi
1734   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1735   test $ac_status = 0; } > conftest.i && {
1736          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1737          test ! -s conftest.err
1738        }; then :
1739   ac_retval=0
1740 else
1741   $as_echo "$as_me: failed program was:" >&5
1742 sed 's/^/| /' conftest.$ac_ext >&5
1743
1744     ac_retval=1
1745 fi
1746   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1747   as_fn_set_status $ac_retval
1748
1749 } # ac_fn_c_try_cpp
1750
1751 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1752 # -------------------------------------------------------
1753 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1754 # the include files in INCLUDES and setting the cache variable VAR
1755 # accordingly.
1756 ac_fn_c_check_header_mongrel ()
1757 {
1758   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1759   if eval \${$3+:} false; then :
1760   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1761 $as_echo_n "checking for $2... " >&6; }
1762 if eval \${$3+:} false; then :
1763   $as_echo_n "(cached) " >&6
1764 fi
1765 eval ac_res=\$$3
1766                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1767 $as_echo "$ac_res" >&6; }
1768 else
1769   # Is the header compilable?
1770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1771 $as_echo_n "checking $2 usability... " >&6; }
1772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1773 /* end confdefs.h.  */
1774 $4
1775 #include <$2>
1776 _ACEOF
1777 if ac_fn_c_try_compile "$LINENO"; then :
1778   ac_header_compiler=yes
1779 else
1780   ac_header_compiler=no
1781 fi
1782 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1784 $as_echo "$ac_header_compiler" >&6; }
1785
1786 # Is the header present?
1787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1788 $as_echo_n "checking $2 presence... " >&6; }
1789 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1790 /* end confdefs.h.  */
1791 #include <$2>
1792 _ACEOF
1793 if ac_fn_c_try_cpp "$LINENO"; then :
1794   ac_header_preproc=yes
1795 else
1796   ac_header_preproc=no
1797 fi
1798 rm -f conftest.err conftest.i conftest.$ac_ext
1799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1800 $as_echo "$ac_header_preproc" >&6; }
1801
1802 # So?  What about this header?
1803 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1804   yes:no: )
1805     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1806 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1807     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1808 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1809     ;;
1810   no:yes:* )
1811     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1812 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1813     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1814 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1815     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1816 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1817     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1818 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1819     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1820 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1821 ( $as_echo "## ---------------------------------------- ##
1822 ## Report this to pgsql-bugs@postgresql.org ##
1823 ## ---------------------------------------- ##"
1824      ) | sed "s/^/$as_me: WARNING:     /" >&2
1825     ;;
1826 esac
1827   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1828 $as_echo_n "checking for $2... " >&6; }
1829 if eval \${$3+:} false; then :
1830   $as_echo_n "(cached) " >&6
1831 else
1832   eval "$3=\$ac_header_compiler"
1833 fi
1834 eval ac_res=\$$3
1835                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1836 $as_echo "$ac_res" >&6; }
1837 fi
1838   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1839
1840 } # ac_fn_c_check_header_mongrel
1841
1842 # ac_fn_c_try_run LINENO
1843 # ----------------------
1844 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1845 # that executables *can* be run.
1846 ac_fn_c_try_run ()
1847 {
1848   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1849   if { { ac_try="$ac_link"
1850 case "(($ac_try" in
1851   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1852   *) ac_try_echo=$ac_try;;
1853 esac
1854 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1855 $as_echo "$ac_try_echo"; } >&5
1856   (eval "$ac_link") 2>&5
1857   ac_status=$?
1858   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1859   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1860   { { case "(($ac_try" in
1861   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1862   *) ac_try_echo=$ac_try;;
1863 esac
1864 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1865 $as_echo "$ac_try_echo"; } >&5
1866   (eval "$ac_try") 2>&5
1867   ac_status=$?
1868   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1869   test $ac_status = 0; }; }; then :
1870   ac_retval=0
1871 else
1872   $as_echo "$as_me: program exited with status $ac_status" >&5
1873        $as_echo "$as_me: failed program was:" >&5
1874 sed 's/^/| /' conftest.$ac_ext >&5
1875
1876        ac_retval=$ac_status
1877 fi
1878   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1879   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1880   as_fn_set_status $ac_retval
1881
1882 } # ac_fn_c_try_run
1883
1884 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1885 # -------------------------------------------------------
1886 # Tests whether HEADER exists and can be compiled using the include files in
1887 # INCLUDES, setting the cache variable VAR accordingly.
1888 ac_fn_c_check_header_compile ()
1889 {
1890   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1891   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1892 $as_echo_n "checking for $2... " >&6; }
1893 if eval \${$3+:} false; then :
1894   $as_echo_n "(cached) " >&6
1895 else
1896   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1897 /* end confdefs.h.  */
1898 $4
1899 #include <$2>
1900 _ACEOF
1901 if ac_fn_c_try_compile "$LINENO"; then :
1902   eval "$3=yes"
1903 else
1904   eval "$3=no"
1905 fi
1906 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1907 fi
1908 eval ac_res=\$$3
1909                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1910 $as_echo "$ac_res" >&6; }
1911   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1912
1913 } # ac_fn_c_check_header_compile
1914
1915 # ac_fn_c_check_func LINENO FUNC VAR
1916 # ----------------------------------
1917 # Tests whether FUNC exists, setting the cache variable VAR accordingly
1918 ac_fn_c_check_func ()
1919 {
1920   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1921   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1922 $as_echo_n "checking for $2... " >&6; }
1923 if eval \${$3+:} false; then :
1924   $as_echo_n "(cached) " >&6
1925 else
1926   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1927 /* end confdefs.h.  */
1928 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1929    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
1930 #define $2 innocuous_$2
1931
1932 /* System header to define __stub macros and hopefully few prototypes,
1933     which can conflict with char $2 (); below.
1934     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1935     <limits.h> exists even on freestanding compilers.  */
1936
1937 #ifdef __STDC__
1938 # include <limits.h>
1939 #else
1940 # include <assert.h>
1941 #endif
1942
1943 #undef $2
1944
1945 /* Override any GCC internal prototype to avoid an error.
1946    Use char because int might match the return type of a GCC
1947    builtin and then its argument prototype would still apply.  */
1948 #ifdef __cplusplus
1949 extern "C"
1950 #endif
1951 char $2 ();
1952 /* The GNU C library defines this for functions which it implements
1953     to always fail with ENOSYS.  Some functions are actually named
1954     something starting with __ and the normal name is an alias.  */
1955 #if defined __stub_$2 || defined __stub___$2
1956 choke me
1957 #endif
1958
1959 int
1960 main ()
1961 {
1962 return $2 ();
1963   ;
1964   return 0;
1965 }
1966 _ACEOF
1967 if ac_fn_c_try_link "$LINENO"; then :
1968   eval "$3=yes"
1969 else
1970   eval "$3=no"
1971 fi
1972 rm -f core conftest.err conftest.$ac_objext \
1973     conftest$ac_exeext conftest.$ac_ext
1974 fi
1975 eval ac_res=\$$3
1976                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1977 $as_echo "$ac_res" >&6; }
1978   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1979
1980 } # ac_fn_c_check_func
1981
1982 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
1983 # ----------------------------------------------------
1984 # Tries to find if the field MEMBER exists in type AGGR, after including
1985 # INCLUDES, setting cache variable VAR accordingly.
1986 ac_fn_c_check_member ()
1987 {
1988   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1989   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
1990 $as_echo_n "checking for $2.$3... " >&6; }
1991 if eval \${$4+:} false; then :
1992   $as_echo_n "(cached) " >&6
1993 else
1994   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1995 /* end confdefs.h.  */
1996 $5
1997 int
1998 main ()
1999 {
2000 static $2 ac_aggr;
2001 if (ac_aggr.$3)
2002 return 0;
2003   ;
2004   return 0;
2005 }
2006 _ACEOF
2007 if ac_fn_c_try_compile "$LINENO"; then :
2008   eval "$4=yes"
2009 else
2010   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2011 /* end confdefs.h.  */
2012 $5
2013 int
2014 main ()
2015 {
2016 static $2 ac_aggr;
2017 if (sizeof ac_aggr.$3)
2018 return 0;
2019   ;
2020   return 0;
2021 }
2022 _ACEOF
2023 if ac_fn_c_try_compile "$LINENO"; then :
2024   eval "$4=yes"
2025 else
2026   eval "$4=no"
2027 fi
2028 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2029 fi
2030 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2031 fi
2032 eval ac_res=\$$4
2033                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2034 $as_echo "$ac_res" >&6; }
2035   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2036
2037 } # ac_fn_c_check_member
2038
2039 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2040 # -------------------------------------------
2041 # Tests whether TYPE exists after having included INCLUDES, setting cache
2042 # variable VAR accordingly.
2043 ac_fn_c_check_type ()
2044 {
2045   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2046   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2047 $as_echo_n "checking for $2... " >&6; }
2048 if eval \${$3+:} false; then :
2049   $as_echo_n "(cached) " >&6
2050 else
2051   eval "$3=no"
2052   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2053 /* end confdefs.h.  */
2054 $4
2055 int
2056 main ()
2057 {
2058 if (sizeof ($2))
2059          return 0;
2060   ;
2061   return 0;
2062 }
2063 _ACEOF
2064 if ac_fn_c_try_compile "$LINENO"; then :
2065   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2066 /* end confdefs.h.  */
2067 $4
2068 int
2069 main ()
2070 {
2071 if (sizeof (($2)))
2072             return 0;
2073   ;
2074   return 0;
2075 }
2076 _ACEOF
2077 if ac_fn_c_try_compile "$LINENO"; then :
2078
2079 else
2080   eval "$3=yes"
2081 fi
2082 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2083 fi
2084 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2085 fi
2086 eval ac_res=\$$3
2087                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2088 $as_echo "$ac_res" >&6; }
2089   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2090
2091 } # ac_fn_c_check_type
2092
2093 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2094 # --------------------------------------------
2095 # Tries to find the compile-time value of EXPR in a program that includes
2096 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2097 # computed
2098 ac_fn_c_compute_int ()
2099 {
2100   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2101   if test "$cross_compiling" = yes; then
2102     # Depending upon the size, compute the lo and hi bounds.
2103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2104 /* end confdefs.h.  */
2105 $4
2106 int
2107 main ()
2108 {
2109 static int test_array [1 - 2 * !(($2) >= 0)];
2110 test_array [0] = 0;
2111 return test_array [0];
2112
2113   ;
2114   return 0;
2115 }
2116 _ACEOF
2117 if ac_fn_c_try_compile "$LINENO"; then :
2118   ac_lo=0 ac_mid=0
2119   while :; do
2120     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2121 /* end confdefs.h.  */
2122 $4
2123 int
2124 main ()
2125 {
2126 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2127 test_array [0] = 0;
2128 return test_array [0];
2129
2130   ;
2131   return 0;
2132 }
2133 _ACEOF
2134 if ac_fn_c_try_compile "$LINENO"; then :
2135   ac_hi=$ac_mid; break
2136 else
2137   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2138                         if test $ac_lo -le $ac_mid; then
2139                           ac_lo= ac_hi=
2140                           break
2141                         fi
2142                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2143 fi
2144 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2145   done
2146 else
2147   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2148 /* end confdefs.h.  */
2149 $4
2150 int
2151 main ()
2152 {
2153 static int test_array [1 - 2 * !(($2) < 0)];
2154 test_array [0] = 0;
2155 return test_array [0];
2156
2157   ;
2158   return 0;
2159 }
2160 _ACEOF
2161 if ac_fn_c_try_compile "$LINENO"; then :
2162   ac_hi=-1 ac_mid=-1
2163   while :; do
2164     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2165 /* end confdefs.h.  */
2166 $4
2167 int
2168 main ()
2169 {
2170 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2171 test_array [0] = 0;
2172 return test_array [0];
2173
2174   ;
2175   return 0;
2176 }
2177 _ACEOF
2178 if ac_fn_c_try_compile "$LINENO"; then :
2179   ac_lo=$ac_mid; break
2180 else
2181   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2182                         if test $ac_mid -le $ac_hi; then
2183                           ac_lo= ac_hi=
2184                           break
2185                         fi
2186                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2187 fi
2188 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2189   done
2190 else
2191   ac_lo= ac_hi=
2192 fi
2193 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2194 fi
2195 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2196 # Binary search between lo and hi bounds.
2197 while test "x$ac_lo" != "x$ac_hi"; do
2198   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2199   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2200 /* end confdefs.h.  */
2201 $4
2202 int
2203 main ()
2204 {
2205 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2206 test_array [0] = 0;
2207 return test_array [0];
2208
2209   ;
2210   return 0;
2211 }
2212 _ACEOF
2213 if ac_fn_c_try_compile "$LINENO"; then :
2214   ac_hi=$ac_mid
2215 else
2216   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2217 fi
2218 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2219 done
2220 case $ac_lo in #((
2221 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2222 '') ac_retval=1 ;;
2223 esac
2224   else
2225     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2226 /* end confdefs.h.  */
2227 $4
2228 static long int longval () { return $2; }
2229 static unsigned long int ulongval () { return $2; }
2230 #include <stdio.h>
2231 #include <stdlib.h>
2232 int
2233 main ()
2234 {
2235
2236   FILE *f = fopen ("conftest.val", "w");
2237   if (! f)
2238     return 1;
2239   if (($2) < 0)
2240     {
2241       long int i = longval ();
2242       if (i != ($2))
2243         return 1;
2244       fprintf (f, "%ld", i);
2245     }
2246   else
2247     {
2248       unsigned long int i = ulongval ();
2249       if (i != ($2))
2250         return 1;
2251       fprintf (f, "%lu", i);
2252     }
2253   /* Do not output a trailing newline, as this causes \r\n confusion
2254      on some platforms.  */
2255   return ferror (f) || fclose (f) != 0;
2256
2257   ;
2258   return 0;
2259 }
2260 _ACEOF
2261 if ac_fn_c_try_run "$LINENO"; then :
2262   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2263 else
2264   ac_retval=1
2265 fi
2266 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2267   conftest.$ac_objext conftest.beam conftest.$ac_ext
2268 rm -f conftest.val
2269
2270   fi
2271   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2272   as_fn_set_status $ac_retval
2273
2274 } # ac_fn_c_compute_int
2275
2276 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2277 # ---------------------------------------------
2278 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2279 # accordingly.
2280 ac_fn_c_check_decl ()
2281 {
2282   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2283   as_decl_name=`echo $2|sed 's/ *(.*//'`
2284   as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2285   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2286 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2287 if eval \${$3+:} false; then :
2288   $as_echo_n "(cached) " >&6
2289 else
2290   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2291 /* end confdefs.h.  */
2292 $4
2293 int
2294 main ()
2295 {
2296 #ifndef $as_decl_name
2297 #ifdef __cplusplus
2298   (void) $as_decl_use;
2299 #else
2300   (void) $as_decl_name;
2301 #endif
2302 #endif
2303
2304   ;
2305   return 0;
2306 }
2307 _ACEOF
2308 if ac_fn_c_try_compile "$LINENO"; then :
2309   eval "$3=yes"
2310 else
2311   eval "$3=no"
2312 fi
2313 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2314 fi
2315 eval ac_res=\$$3
2316                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2317 $as_echo "$ac_res" >&6; }
2318   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2319
2320 } # ac_fn_c_check_decl
2321 cat >config.log <<_ACEOF
2322 This file contains any messages produced by compilers while
2323 running configure, to aid debugging if configure makes a mistake.
2324
2325 It was created by PostgreSQL $as_me 9.6devel, which was
2326 generated by GNU Autoconf 2.69.  Invocation command line was
2327
2328   $ $0 $@
2329
2330 _ACEOF
2331 exec 5>>config.log
2332 {
2333 cat <<_ASUNAME
2334 ## --------- ##
2335 ## Platform. ##
2336 ## --------- ##
2337
2338 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2339 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2340 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2341 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2342 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2343
2344 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2345 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2346
2347 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2348 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2349 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2350 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2351 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2352 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2353 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2354
2355 _ASUNAME
2356
2357 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2358 for as_dir in $PATH
2359 do
2360   IFS=$as_save_IFS
2361   test -z "$as_dir" && as_dir=.
2362     $as_echo "PATH: $as_dir"
2363   done
2364 IFS=$as_save_IFS
2365
2366 } >&5
2367
2368 cat >&5 <<_ACEOF
2369
2370
2371 ## ----------- ##
2372 ## Core tests. ##
2373 ## ----------- ##
2374
2375 _ACEOF
2376
2377
2378 # Keep a trace of the command line.
2379 # Strip out --no-create and --no-recursion so they do not pile up.
2380 # Strip out --silent because we don't want to record it for future runs.
2381 # Also quote any args containing shell meta-characters.
2382 # Make two passes to allow for proper duplicate-argument suppression.
2383 ac_configure_args=
2384 ac_configure_args0=
2385 ac_configure_args1=
2386 ac_must_keep_next=false
2387 for ac_pass in 1 2
2388 do
2389   for ac_arg
2390   do
2391     case $ac_arg in
2392     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2393     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2394     | -silent | --silent | --silen | --sile | --sil)
2395       continue ;;
2396     *\'*)
2397       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2398     esac
2399     case $ac_pass in
2400     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2401     2)
2402       as_fn_append ac_configure_args1 " '$ac_arg'"
2403       if test $ac_must_keep_next = true; then
2404         ac_must_keep_next=false # Got value, back to normal.
2405       else
2406         case $ac_arg in
2407           *=* | --config-cache | -C | -disable-* | --disable-* \
2408           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2409           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2410           | -with-* | --with-* | -without-* | --without-* | --x)
2411             case "$ac_configure_args0 " in
2412               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2413             esac
2414             ;;
2415           -* ) ac_must_keep_next=true ;;
2416         esac
2417       fi
2418       as_fn_append ac_configure_args " '$ac_arg'"
2419       ;;
2420     esac
2421   done
2422 done
2423 { ac_configure_args0=; unset ac_configure_args0;}
2424 { ac_configure_args1=; unset ac_configure_args1;}
2425
2426 # When interrupted or exit'd, cleanup temporary files, and complete
2427 # config.log.  We remove comments because anyway the quotes in there
2428 # would cause problems or look ugly.
2429 # WARNING: Use '\'' to represent an apostrophe within the trap.
2430 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2431 trap 'exit_status=$?
2432   # Save into config.log some information that might help in debugging.
2433   {
2434     echo
2435
2436     $as_echo "## ---------------- ##
2437 ## Cache variables. ##
2438 ## ---------------- ##"
2439     echo
2440     # The following way of writing the cache mishandles newlines in values,
2441 (
2442   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2443     eval ac_val=\$$ac_var
2444     case $ac_val in #(
2445     *${as_nl}*)
2446       case $ac_var in #(
2447       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2448 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2449       esac
2450       case $ac_var in #(
2451       _ | IFS | as_nl) ;; #(
2452       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2453       *) { eval $ac_var=; unset $ac_var;} ;;
2454       esac ;;
2455     esac
2456   done
2457   (set) 2>&1 |
2458     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2459     *${as_nl}ac_space=\ *)
2460       sed -n \
2461         "s/'\''/'\''\\\\'\'''\''/g;
2462           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2463       ;; #(
2464     *)
2465       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2466       ;;
2467     esac |
2468     sort
2469 )
2470     echo
2471
2472     $as_echo "## ----------------- ##
2473 ## Output variables. ##
2474 ## ----------------- ##"
2475     echo
2476     for ac_var in $ac_subst_vars
2477     do
2478       eval ac_val=\$$ac_var
2479       case $ac_val in
2480       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2481       esac
2482       $as_echo "$ac_var='\''$ac_val'\''"
2483     done | sort
2484     echo
2485
2486     if test -n "$ac_subst_files"; then
2487       $as_echo "## ------------------- ##
2488 ## File substitutions. ##
2489 ## ------------------- ##"
2490       echo
2491       for ac_var in $ac_subst_files
2492       do
2493         eval ac_val=\$$ac_var
2494         case $ac_val in
2495         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2496         esac
2497         $as_echo "$ac_var='\''$ac_val'\''"
2498       done | sort
2499       echo
2500     fi
2501
2502     if test -s confdefs.h; then
2503       $as_echo "## ----------- ##
2504 ## confdefs.h. ##
2505 ## ----------- ##"
2506       echo
2507       cat confdefs.h
2508       echo
2509     fi
2510     test "$ac_signal" != 0 &&
2511       $as_echo "$as_me: caught signal $ac_signal"
2512     $as_echo "$as_me: exit $exit_status"
2513   } >&5
2514   rm -f core *.core core.conftest.* &&
2515     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2516     exit $exit_status
2517 ' 0
2518 for ac_signal in 1 2 13 15; do
2519   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2520 done
2521 ac_signal=0
2522
2523 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2524 rm -f -r conftest* confdefs.h
2525
2526 $as_echo "/* confdefs.h */" > confdefs.h
2527
2528 # Predefined preprocessor variables.
2529
2530 cat >>confdefs.h <<_ACEOF
2531 #define PACKAGE_NAME "$PACKAGE_NAME"
2532 _ACEOF
2533
2534 cat >>confdefs.h <<_ACEOF
2535 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2536 _ACEOF
2537
2538 cat >>confdefs.h <<_ACEOF
2539 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2540 _ACEOF
2541
2542 cat >>confdefs.h <<_ACEOF
2543 #define PACKAGE_STRING "$PACKAGE_STRING"
2544 _ACEOF
2545
2546 cat >>confdefs.h <<_ACEOF
2547 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2548 _ACEOF
2549
2550 cat >>confdefs.h <<_ACEOF
2551 #define PACKAGE_URL "$PACKAGE_URL"
2552 _ACEOF
2553
2554
2555 # Let the site file select an alternate cache file if it wants to.
2556 # Prefer an explicitly selected file to automatically selected ones.
2557 ac_site_file1=NONE
2558 ac_site_file2=NONE
2559 if test -n "$CONFIG_SITE"; then
2560   # We do not want a PATH search for config.site.
2561   case $CONFIG_SITE in #((
2562     -*)  ac_site_file1=./$CONFIG_SITE;;
2563     */*) ac_site_file1=$CONFIG_SITE;;
2564     *)   ac_site_file1=./$CONFIG_SITE;;
2565   esac
2566 elif test "x$prefix" != xNONE; then
2567   ac_site_file1=$prefix/share/config.site
2568   ac_site_file2=$prefix/etc/config.site
2569 else
2570   ac_site_file1=$ac_default_prefix/share/config.site
2571   ac_site_file2=$ac_default_prefix/etc/config.site
2572 fi
2573 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2574 do
2575   test "x$ac_site_file" = xNONE && continue
2576   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2577     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2578 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2579     sed 's/^/| /' "$ac_site_file" >&5
2580     . "$ac_site_file" \
2581       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2582 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2583 as_fn_error $? "failed to load site script $ac_site_file
2584 See \`config.log' for more details" "$LINENO" 5; }
2585   fi
2586 done
2587
2588 if test -r "$cache_file"; then
2589   # Some versions of bash will fail to source /dev/null (special files
2590   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2591   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2592     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2593 $as_echo "$as_me: loading cache $cache_file" >&6;}
2594     case $cache_file in
2595       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2596       *)                      . "./$cache_file";;
2597     esac
2598   fi
2599 else
2600   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2601 $as_echo "$as_me: creating cache $cache_file" >&6;}
2602   >$cache_file
2603 fi
2604
2605 # Check that the precious variables saved in the cache have kept the same
2606 # value.
2607 ac_cache_corrupted=false
2608 for ac_var in $ac_precious_vars; do
2609   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2610   eval ac_new_set=\$ac_env_${ac_var}_set
2611   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2612   eval ac_new_val=\$ac_env_${ac_var}_value
2613   case $ac_old_set,$ac_new_set in
2614     set,)
2615       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2616 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2617       ac_cache_corrupted=: ;;
2618     ,set)
2619       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2620 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2621       ac_cache_corrupted=: ;;
2622     ,);;
2623     *)
2624       if test "x$ac_old_val" != "x$ac_new_val"; then
2625         # differences in whitespace do not lead to failure.
2626         ac_old_val_w=`echo x $ac_old_val`
2627         ac_new_val_w=`echo x $ac_new_val`
2628         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2629           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2630 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2631           ac_cache_corrupted=:
2632         else
2633           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2634 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2635           eval $ac_var=\$ac_old_val
2636         fi
2637         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2638 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2639         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2640 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2641       fi;;
2642   esac
2643   # Pass precious variables to config.status.
2644   if test "$ac_new_set" = set; then
2645     case $ac_new_val in
2646     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2647     *) ac_arg=$ac_var=$ac_new_val ;;
2648     esac
2649     case " $ac_configure_args " in
2650       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2651       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2652     esac
2653   fi
2654 done
2655 if $ac_cache_corrupted; then
2656   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2657 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2658   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2659 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2660   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2661 fi
2662 ## -------------------- ##
2663 ## Main body of script. ##
2664 ## -------------------- ##
2665
2666 ac_ext=c
2667 ac_cpp='$CPP $CPPFLAGS'
2668 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2669 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2670 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2671
2672
2673
2674
2675
2676
2677 ac_aux_dir=
2678 for ac_dir in config "$srcdir"/config; do
2679   if test -f "$ac_dir/install-sh"; then
2680     ac_aux_dir=$ac_dir
2681     ac_install_sh="$ac_aux_dir/install-sh -c"
2682     break
2683   elif test -f "$ac_dir/install.sh"; then
2684     ac_aux_dir=$ac_dir
2685     ac_install_sh="$ac_aux_dir/install.sh -c"
2686     break
2687   elif test -f "$ac_dir/shtool"; then
2688     ac_aux_dir=$ac_dir
2689     ac_install_sh="$ac_aux_dir/shtool install -c"
2690     break
2691   fi
2692 done
2693 if test -z "$ac_aux_dir"; then
2694   as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5
2695 fi
2696
2697 # These three variables are undocumented and unsupported,
2698 # and are intended to be withdrawn in a future Autoconf release.
2699 # They can cause serious problems if a builder's source tree is in a directory
2700 # whose full name contains unusual characters.
2701 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2702 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2703 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2704
2705
2706
2707 configure_args=$ac_configure_args
2708
2709
2710 PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\.[0-9][0-9]*\)'`
2711
2712
2713 cat >>confdefs.h <<_ACEOF
2714 #define PG_MAJORVERSION "$PG_MAJORVERSION"
2715 _ACEOF
2716
2717
2718
2719
2720
2721 # Check whether --with-extra-version was given.
2722 if test "${with_extra_version+set}" = set; then :
2723   withval=$with_extra_version;
2724   case $withval in
2725     yes)
2726       as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2727       ;;
2728     no)
2729       as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2730       ;;
2731     *)
2732       PG_VERSION="$PACKAGE_VERSION$withval"
2733       ;;
2734   esac
2735
2736 else
2737   PG_VERSION="$PACKAGE_VERSION"
2738 fi
2739
2740
2741
2742 cat >>confdefs.h <<_ACEOF
2743 #define PG_VERSION "$PG_VERSION"
2744 _ACEOF
2745
2746
2747 # Make sure we can run config.sub.
2748 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2749   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2750
2751 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2752 $as_echo_n "checking build system type... " >&6; }
2753 if ${ac_cv_build+:} false; then :
2754   $as_echo_n "(cached) " >&6
2755 else
2756   ac_build_alias=$build_alias
2757 test "x$ac_build_alias" = x &&
2758   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2759 test "x$ac_build_alias" = x &&
2760   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2761 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2762   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2763
2764 fi
2765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2766 $as_echo "$ac_cv_build" >&6; }
2767 case $ac_cv_build in
2768 *-*-*) ;;
2769 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2770 esac
2771 build=$ac_cv_build
2772 ac_save_IFS=$IFS; IFS='-'
2773 set x $ac_cv_build
2774 shift
2775 build_cpu=$1
2776 build_vendor=$2
2777 shift; shift
2778 # Remember, the first character of IFS is used to create $*,
2779 # except with old shells:
2780 build_os=$*
2781 IFS=$ac_save_IFS
2782 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2783
2784
2785 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2786 $as_echo_n "checking host system type... " >&6; }
2787 if ${ac_cv_host+:} false; then :
2788   $as_echo_n "(cached) " >&6
2789 else
2790   if test "x$host_alias" = x; then
2791   ac_cv_host=$ac_cv_build
2792 else
2793   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2794     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2795 fi
2796
2797 fi
2798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2799 $as_echo "$ac_cv_host" >&6; }
2800 case $ac_cv_host in
2801 *-*-*) ;;
2802 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2803 esac
2804 host=$ac_cv_host
2805 ac_save_IFS=$IFS; IFS='-'
2806 set x $ac_cv_host
2807 shift
2808 host_cpu=$1
2809 host_vendor=$2
2810 shift; shift
2811 # Remember, the first character of IFS is used to create $*,
2812 # except with old shells:
2813 host_os=$*
2814 IFS=$ac_save_IFS
2815 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2816
2817
2818
2819 template=
2820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which template to use" >&5
2821 $as_echo_n "checking which template to use... " >&6; }
2822
2823
2824
2825
2826 # Check whether --with-template was given.
2827 if test "${with_template+set}" = set; then :
2828   withval=$with_template;
2829   case $withval in
2830     yes)
2831       as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2832       ;;
2833     no)
2834       as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2835       ;;
2836     *)
2837
2838   case $withval in
2839     list)   echo; ls "$srcdir/src/template"; exit;;
2840     *)      if test -f "$srcdir/src/template/$with_template" ; then
2841               template=$withval
2842             else
2843               as_fn_error $? "'$withval' is not a valid template name. Use 'list' for a list." "$LINENO" 5
2844             fi;;
2845   esac
2846
2847       ;;
2848   esac
2849
2850 else
2851
2852 # --with-template not given
2853
2854 case $host_os in
2855      aix*) template=aix ;;
2856   cygwin*) template=cygwin ;;
2857   darwin*) template=darwin ;;
2858 dragonfly*) template=netbsd ;;
2859  freebsd*) template=freebsd ;;
2860     hpux*) template=hpux ;;
2861  linux*|gnu*|k*bsd*-gnu)
2862            template=linux ;;
2863    mingw*) template=win32 ;;
2864   netbsd*) template=netbsd ;;
2865  openbsd*) template=openbsd ;;
2866      sco*) template=sco ;;
2867  solaris*) template=solaris ;;
2868    sysv5*) template=unixware ;;
2869 esac
2870
2871   if test x"$template" = x"" ; then
2872     as_fn_error $? "
2873 *******************************************************************
2874 PostgreSQL has apparently not been ported to your platform yet.
2875 To try a manual configuration, look into the src/template directory
2876 for a similar platform and use the '--with-template=' option.
2877
2878 Please also contact <pgsql-bugs@postgresql.org> to see about
2879 rectifying this.  Include the above 'checking host system type...'
2880 line.
2881 *******************************************************************
2882 " "$LINENO" 5
2883   fi
2884
2885
2886 fi
2887
2888
2889
2890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $template" >&5
2891 $as_echo "$template" >&6; }
2892
2893 PORTNAME=$template
2894
2895
2896 # Initialize default assumption that we do not need separate assembly code
2897 # for TAS (test-and-set).  This can be overridden by the template file
2898 # when it's executed.
2899 need_tas=no
2900 tas_file=dummy.s
2901
2902
2903
2904 ##
2905 ## Command line options
2906 ##
2907
2908 #
2909 # Add non-standard directories to the include path
2910 #
2911
2912
2913
2914 # Check whether --with-includes was given.
2915 if test "${with_includes+set}" = set; then :
2916   withval=$with_includes;
2917   case $withval in
2918     yes)
2919       as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
2920       ;;
2921     no)
2922       as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
2923       ;;
2924     *)
2925
2926       ;;
2927   esac
2928
2929 fi
2930
2931
2932
2933
2934 #
2935 # Add non-standard directories to the library search path
2936 #
2937
2938
2939
2940 # Check whether --with-libraries was given.
2941 if test "${with_libraries+set}" = set; then :
2942   withval=$with_libraries;
2943   case $withval in
2944     yes)
2945       as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
2946       ;;
2947     no)
2948       as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
2949       ;;
2950     *)
2951       LIBRARY_DIRS=$withval
2952       ;;
2953   esac
2954
2955 fi
2956
2957
2958
2959
2960
2961
2962 # Check whether --with-libs was given.
2963 if test "${with_libs+set}" = set; then :
2964   withval=$with_libs;
2965   case $withval in
2966     yes)
2967       as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
2968       ;;
2969     no)
2970       as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
2971       ;;
2972     *)
2973       LIBRARY_DIRS=$withval
2974       ;;
2975   esac
2976
2977 fi
2978
2979
2980
2981
2982 #
2983 # 64-bit integer date/time storage: enabled by default.
2984 #
2985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with 64-bit integer date/time support" >&5
2986 $as_echo_n "checking whether to build with 64-bit integer date/time support... " >&6; }
2987
2988
2989 # Check whether --enable-integer-datetimes was given.
2990 if test "${enable_integer_datetimes+set}" = set; then :
2991   enableval=$enable_integer_datetimes;
2992   case $enableval in
2993     yes)
2994
2995 $as_echo "#define USE_INTEGER_DATETIMES 1" >>confdefs.h
2996
2997       ;;
2998     no)
2999       :
3000       ;;
3001     *)
3002       as_fn_error $? "no argument expected for --enable-integer-datetimes option" "$LINENO" 5
3003       ;;
3004   esac
3005
3006 else
3007   enable_integer_datetimes=yes
3008
3009 $as_echo "#define USE_INTEGER_DATETIMES 1" >>confdefs.h
3010
3011 fi
3012
3013
3014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_integer_datetimes" >&5
3015 $as_echo "$enable_integer_datetimes" >&6; }
3016
3017
3018 #
3019 # NLS
3020 #
3021 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is wanted" >&5
3022 $as_echo_n "checking whether NLS is wanted... " >&6; }
3023
3024
3025 # Check whether --enable-nls was given.
3026 if test "${enable_nls+set}" = set; then :
3027   enableval=$enable_nls;
3028   case $enableval in
3029     yes)
3030       :
3031       ;;
3032     no)
3033       :
3034       ;;
3035     *)
3036       enable_nls=yes
3037 WANTED_LANGUAGES=$enableval
3038       ;;
3039   esac
3040
3041 else
3042   enable_nls=no
3043 fi
3044
3045
3046
3047 if test "$enable_nls" = yes; then
3048
3049 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
3050
3051 fi
3052
3053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_nls" >&5
3054 $as_echo "$enable_nls" >&6; }
3055
3056
3057
3058 #
3059 # Default port number (--with-pgport), default 5432
3060 #
3061 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default port number" >&5
3062 $as_echo_n "checking for default port number... " >&6; }
3063
3064
3065
3066 # Check whether --with-pgport was given.
3067 if test "${with_pgport+set}" = set; then :
3068   withval=$with_pgport;
3069   case $withval in
3070     yes)
3071       as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3072       ;;
3073     no)
3074       as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3075       ;;
3076     *)
3077       default_port=$withval
3078       ;;
3079   esac
3080
3081 else
3082   default_port=5432
3083 fi
3084
3085
3086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_port" >&5
3087 $as_echo "$default_port" >&6; }
3088 # Need both of these because some places want an integer and some a string
3089
3090 cat >>confdefs.h <<_ACEOF
3091 #define DEF_PGPORT ${default_port}
3092 _ACEOF
3093
3094
3095 cat >>confdefs.h <<_ACEOF
3096 #define DEF_PGPORT_STR "${default_port}"
3097 _ACEOF
3098
3099
3100
3101 #
3102 # '-rpath'-like feature can be disabled
3103 #
3104
3105
3106 # Check whether --enable-rpath was given.
3107 if test "${enable_rpath+set}" = set; then :
3108   enableval=$enable_rpath;
3109   case $enableval in
3110     yes)
3111       :
3112       ;;
3113     no)
3114       :
3115       ;;
3116     *)
3117       as_fn_error $? "no argument expected for --enable-rpath option" "$LINENO" 5
3118       ;;
3119   esac
3120
3121 else
3122   enable_rpath=yes
3123
3124 fi
3125
3126
3127
3128
3129 #
3130 # Spinlocks
3131 #
3132
3133
3134 # Check whether --enable-spinlocks was given.
3135 if test "${enable_spinlocks+set}" = set; then :
3136   enableval=$enable_spinlocks;
3137   case $enableval in
3138     yes)
3139       :
3140       ;;
3141     no)
3142       :
3143       ;;
3144     *)
3145       as_fn_error $? "no argument expected for --enable-spinlocks option" "$LINENO" 5
3146       ;;
3147   esac
3148
3149 else
3150   enable_spinlocks=yes
3151
3152 fi
3153
3154
3155
3156 #
3157 # Atomic operations
3158 #
3159
3160
3161 # Check whether --enable-atomics was given.
3162 if test "${enable_atomics+set}" = set; then :
3163   enableval=$enable_atomics;
3164   case $enableval in
3165     yes)
3166       :
3167       ;;
3168     no)
3169       :
3170       ;;
3171     *)
3172       as_fn_error $? "no argument expected for --enable-atomics option" "$LINENO" 5
3173       ;;
3174   esac
3175
3176 else
3177   enable_atomics=yes
3178
3179 fi
3180
3181
3182
3183 #
3184 # --enable-debug adds -g to compiler flags
3185 #
3186
3187
3188 # Check whether --enable-debug was given.
3189 if test "${enable_debug+set}" = set; then :
3190   enableval=$enable_debug;
3191   case $enableval in
3192     yes)
3193       :
3194       ;;
3195     no)
3196       :
3197       ;;
3198     *)
3199       as_fn_error $? "no argument expected for --enable-debug option" "$LINENO" 5
3200       ;;
3201   esac
3202
3203 else
3204   enable_debug=no
3205
3206 fi
3207
3208
3209
3210
3211 #
3212 # --enable-profiling enables gcc profiling
3213 #
3214
3215
3216 # Check whether --enable-profiling was given.
3217 if test "${enable_profiling+set}" = set; then :
3218   enableval=$enable_profiling;
3219   case $enableval in
3220     yes)
3221       :
3222       ;;
3223     no)
3224       :
3225       ;;
3226     *)
3227       as_fn_error $? "no argument expected for --enable-profiling option" "$LINENO" 5
3228       ;;
3229   esac
3230
3231 else
3232   enable_profiling=no
3233
3234 fi
3235
3236
3237
3238 #
3239 # --enable-coverage enables generation of code coverage metrics with gcov
3240 #
3241
3242
3243 # Check whether --enable-coverage was given.
3244 if test "${enable_coverage+set}" = set; then :
3245   enableval=$enable_coverage;
3246   case $enableval in
3247     yes)
3248       for ac_prog in gcov
3249 do
3250   # Extract the first word of "$ac_prog", so it can be a program name with args.
3251 set dummy $ac_prog; ac_word=$2
3252 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3253 $as_echo_n "checking for $ac_word... " >&6; }
3254 if ${ac_cv_prog_GCOV+:} false; then :
3255   $as_echo_n "(cached) " >&6
3256 else
3257   if test -n "$GCOV"; then
3258   ac_cv_prog_GCOV="$GCOV" # Let the user override the test.
3259 else
3260 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3261 for as_dir in $PATH
3262 do
3263   IFS=$as_save_IFS
3264   test -z "$as_dir" && as_dir=.
3265     for ac_exec_ext in '' $ac_executable_extensions; do
3266   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3267     ac_cv_prog_GCOV="$ac_prog"
3268     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3269     break 2
3270   fi
3271 done
3272   done
3273 IFS=$as_save_IFS
3274
3275 fi
3276 fi
3277 GCOV=$ac_cv_prog_GCOV
3278 if test -n "$GCOV"; then
3279   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3280 $as_echo "$GCOV" >&6; }
3281 else
3282   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3283 $as_echo "no" >&6; }
3284 fi
3285
3286
3287   test -n "$GCOV" && break
3288 done
3289
3290 if test -z "$GCOV"; then
3291   as_fn_error $? "gcov not found" "$LINENO" 5
3292 fi
3293 for ac_prog in lcov
3294 do
3295   # Extract the first word of "$ac_prog", so it can be a program name with args.
3296 set dummy $ac_prog; ac_word=$2
3297 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3298 $as_echo_n "checking for $ac_word... " >&6; }
3299 if ${ac_cv_prog_LCOV+:} false; then :
3300   $as_echo_n "(cached) " >&6
3301 else
3302   if test -n "$LCOV"; then
3303   ac_cv_prog_LCOV="$LCOV" # Let the user override the test.
3304 else
3305 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3306 for as_dir in $PATH
3307 do
3308   IFS=$as_save_IFS
3309   test -z "$as_dir" && as_dir=.
3310     for ac_exec_ext in '' $ac_executable_extensions; do
3311   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3312     ac_cv_prog_LCOV="$ac_prog"
3313     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3314     break 2
3315   fi
3316 done
3317   done
3318 IFS=$as_save_IFS
3319
3320 fi
3321 fi
3322 LCOV=$ac_cv_prog_LCOV
3323 if test -n "$LCOV"; then
3324   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3325 $as_echo "$LCOV" >&6; }
3326 else
3327   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3328 $as_echo "no" >&6; }
3329 fi
3330
3331
3332   test -n "$LCOV" && break
3333 done
3334
3335 if test -z "$LCOV"; then
3336   as_fn_error $? "lcov not found" "$LINENO" 5
3337 fi
3338 for ac_prog in genhtml
3339 do
3340   # Extract the first word of "$ac_prog", so it can be a program name with args.
3341 set dummy $ac_prog; ac_word=$2
3342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3343 $as_echo_n "checking for $ac_word... " >&6; }
3344 if ${ac_cv_prog_GENHTML+:} false; then :
3345   $as_echo_n "(cached) " >&6
3346 else
3347   if test -n "$GENHTML"; then
3348   ac_cv_prog_GENHTML="$GENHTML" # Let the user override the test.
3349 else
3350 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3351 for as_dir in $PATH
3352 do
3353   IFS=$as_save_IFS
3354   test -z "$as_dir" && as_dir=.
3355     for ac_exec_ext in '' $ac_executable_extensions; do
3356   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3357     ac_cv_prog_GENHTML="$ac_prog"
3358     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3359     break 2
3360   fi
3361 done
3362   done
3363 IFS=$as_save_IFS
3364
3365 fi
3366 fi
3367 GENHTML=$ac_cv_prog_GENHTML
3368 if test -n "$GENHTML"; then
3369   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3370 $as_echo "$GENHTML" >&6; }
3371 else
3372   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3373 $as_echo "no" >&6; }
3374 fi
3375
3376
3377   test -n "$GENHTML" && break
3378 done
3379
3380 if test -z "$GENHTML"; then
3381   as_fn_error $? "genhtml not found" "$LINENO" 5
3382 fi
3383       ;;
3384     no)
3385       :
3386       ;;
3387     *)
3388       as_fn_error $? "no argument expected for --enable-coverage option" "$LINENO" 5
3389       ;;
3390   esac
3391
3392 else
3393   enable_coverage=no
3394
3395 fi
3396
3397
3398
3399
3400 #
3401 # DTrace
3402 #
3403
3404
3405 # Check whether --enable-dtrace was given.
3406 if test "${enable_dtrace+set}" = set; then :
3407   enableval=$enable_dtrace;
3408   case $enableval in
3409     yes)
3410       for ac_prog in dtrace
3411 do
3412   # Extract the first word of "$ac_prog", so it can be a program name with args.
3413 set dummy $ac_prog; ac_word=$2
3414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3415 $as_echo_n "checking for $ac_word... " >&6; }
3416 if ${ac_cv_prog_DTRACE+:} false; then :
3417   $as_echo_n "(cached) " >&6
3418 else
3419   if test -n "$DTRACE"; then
3420   ac_cv_prog_DTRACE="$DTRACE" # Let the user override the test.
3421 else
3422 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3423 for as_dir in $PATH
3424 do
3425   IFS=$as_save_IFS
3426   test -z "$as_dir" && as_dir=.
3427     for ac_exec_ext in '' $ac_executable_extensions; do
3428   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3429     ac_cv_prog_DTRACE="$ac_prog"
3430     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3431     break 2
3432   fi
3433 done
3434   done
3435 IFS=$as_save_IFS
3436
3437 fi
3438 fi
3439 DTRACE=$ac_cv_prog_DTRACE
3440 if test -n "$DTRACE"; then
3441   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3442 $as_echo "$DTRACE" >&6; }
3443 else
3444   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3445 $as_echo "no" >&6; }
3446 fi
3447
3448
3449   test -n "$DTRACE" && break
3450 done
3451
3452 if test -z "$DTRACE"; then
3453   as_fn_error $? "dtrace not found" "$LINENO" 5
3454 fi
3455
3456       ;;
3457     no)
3458       :
3459       ;;
3460     *)
3461       as_fn_error $? "no argument expected for --enable-dtrace option" "$LINENO" 5
3462       ;;
3463   esac
3464
3465 else
3466   enable_dtrace=no
3467
3468 fi
3469
3470
3471
3472
3473 #
3474 # TAP tests
3475 #
3476
3477
3478 # Check whether --enable-tap-tests was given.
3479 if test "${enable_tap_tests+set}" = set; then :
3480   enableval=$enable_tap_tests;
3481   case $enableval in
3482     yes)
3483       :
3484       ;;
3485     no)
3486       :
3487       ;;
3488     *)
3489       as_fn_error $? "no argument expected for --enable-tap-tests option" "$LINENO" 5
3490       ;;
3491   esac
3492
3493 else
3494   enable_tap_tests=no
3495
3496 fi
3497
3498
3499
3500
3501 #
3502 # Block size
3503 #
3504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for block size" >&5
3505 $as_echo_n "checking for block size... " >&6; }
3506
3507
3508
3509 # Check whether --with-blocksize was given.
3510 if test "${with_blocksize+set}" = set; then :
3511   withval=$with_blocksize;
3512   case $withval in
3513     yes)
3514       as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3515       ;;
3516     no)
3517       as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3518       ;;
3519     *)
3520       blocksize=$withval
3521       ;;
3522   esac
3523
3524 else
3525   blocksize=8
3526 fi
3527
3528
3529 case ${blocksize} in
3530   1) BLCKSZ=1024;;
3531   2) BLCKSZ=2048;;
3532   4) BLCKSZ=4096;;
3533   8) BLCKSZ=8192;;
3534  16) BLCKSZ=16384;;
3535  32) BLCKSZ=32768;;
3536   *) as_fn_error $? "Invalid block size. Allowed values are 1,2,4,8,16,32." "$LINENO" 5
3537 esac
3538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${blocksize}kB" >&5
3539 $as_echo "${blocksize}kB" >&6; }
3540
3541
3542 cat >>confdefs.h <<_ACEOF
3543 #define BLCKSZ ${BLCKSZ}
3544 _ACEOF
3545
3546
3547 #
3548 # Relation segment size
3549 #
3550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for segment size" >&5
3551 $as_echo_n "checking for segment size... " >&6; }
3552
3553
3554
3555 # Check whether --with-segsize was given.
3556 if test "${with_segsize+set}" = set; then :
3557   withval=$with_segsize;
3558   case $withval in
3559     yes)
3560       as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3561       ;;
3562     no)
3563       as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3564       ;;
3565     *)
3566       segsize=$withval
3567       ;;
3568   esac
3569
3570 else
3571   segsize=1
3572 fi
3573
3574
3575 # this expression is set up to avoid unnecessary integer overflow
3576 # blocksize is already guaranteed to be a factor of 1024
3577 RELSEG_SIZE=`expr '(' 1024 / ${blocksize} ')' '*' ${segsize} '*' 1024`
3578 test $? -eq 0 || exit 1
3579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${segsize}GB" >&5
3580 $as_echo "${segsize}GB" >&6; }
3581
3582
3583 cat >>confdefs.h <<_ACEOF
3584 #define RELSEG_SIZE ${RELSEG_SIZE}
3585 _ACEOF
3586
3587
3588 #
3589 # WAL block size
3590 #
3591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAL block size" >&5
3592 $as_echo_n "checking for WAL block size... " >&6; }
3593
3594
3595
3596 # Check whether --with-wal-blocksize was given.
3597 if test "${with_wal_blocksize+set}" = set; then :
3598   withval=$with_wal_blocksize;
3599   case $withval in
3600     yes)
3601       as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3602       ;;
3603     no)
3604       as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3605       ;;
3606     *)
3607       wal_blocksize=$withval
3608       ;;
3609   esac
3610
3611 else
3612   wal_blocksize=8
3613 fi
3614
3615
3616 case ${wal_blocksize} in
3617   1) XLOG_BLCKSZ=1024;;
3618   2) XLOG_BLCKSZ=2048;;
3619   4) XLOG_BLCKSZ=4096;;
3620   8) XLOG_BLCKSZ=8192;;
3621  16) XLOG_BLCKSZ=16384;;
3622  32) XLOG_BLCKSZ=32768;;
3623  64) XLOG_BLCKSZ=65536;;
3624   *) as_fn_error $? "Invalid WAL block size. Allowed values are 1,2,4,8,16,32,64." "$LINENO" 5
3625 esac
3626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${wal_blocksize}kB" >&5
3627 $as_echo "${wal_blocksize}kB" >&6; }
3628
3629
3630 cat >>confdefs.h <<_ACEOF
3631 #define XLOG_BLCKSZ ${XLOG_BLCKSZ}
3632 _ACEOF
3633
3634
3635 #
3636 # WAL segment size
3637 #
3638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAL segment size" >&5
3639 $as_echo_n "checking for WAL segment size... " >&6; }
3640
3641
3642
3643 # Check whether --with-wal-segsize was given.
3644 if test "${with_wal_segsize+set}" = set; then :
3645   withval=$with_wal_segsize;
3646   case $withval in
3647     yes)
3648       as_fn_error $? "argument required for --with-wal-segsize option" "$LINENO" 5
3649       ;;
3650     no)
3651       as_fn_error $? "argument required for --with-wal-segsize option" "$LINENO" 5
3652       ;;
3653     *)
3654       wal_segsize=$withval
3655       ;;
3656   esac
3657
3658 else
3659   wal_segsize=16
3660 fi
3661
3662
3663 case ${wal_segsize} in
3664   1) ;;
3665   2) ;;
3666   4) ;;
3667   8) ;;
3668  16) ;;
3669  32) ;;
3670  64) ;;
3671   *) as_fn_error $? "Invalid WAL segment size. Allowed values are 1,2,4,8,16,32,64." "$LINENO" 5
3672 esac
3673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${wal_segsize}MB" >&5
3674 $as_echo "${wal_segsize}MB" >&6; }
3675
3676
3677 cat >>confdefs.h <<_ACEOF
3678 #define XLOG_SEG_SIZE (${wal_segsize} * 1024 * 1024)
3679 _ACEOF
3680
3681
3682 #
3683 # C compiler
3684 #
3685
3686 # For historical reasons you can also use --with-CC to specify the C compiler
3687 # to use, although the standard way to do this is to set the CC environment
3688 # variable.
3689
3690
3691
3692 # Check whether --with-CC was given.
3693 if test "${with_CC+set}" = set; then :
3694   withval=$with_CC;
3695   case $withval in
3696     yes)
3697       as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3698       ;;
3699     no)
3700       as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3701       ;;
3702     *)
3703       CC=$with_CC
3704       ;;
3705   esac
3706
3707 fi
3708
3709
3710
3711 case $template in
3712   aix) pgac_cc_list="gcc xlc";;
3713     *) pgac_cc_list="gcc cc";;
3714 esac
3715
3716 ac_ext=c
3717 ac_cpp='$CPP $CPPFLAGS'
3718 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3719 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3720 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3721 if test -n "$ac_tool_prefix"; then
3722   for ac_prog in $pgac_cc_list
3723   do
3724     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3725 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3727 $as_echo_n "checking for $ac_word... " >&6; }
3728 if ${ac_cv_prog_CC+:} false; then :
3729   $as_echo_n "(cached) " >&6
3730 else
3731   if test -n "$CC"; then
3732   ac_cv_prog_CC="$CC" # Let the user override the test.
3733 else
3734 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3735 for as_dir in $PATH
3736 do
3737   IFS=$as_save_IFS
3738   test -z "$as_dir" && as_dir=.
3739     for ac_exec_ext in '' $ac_executable_extensions; do
3740   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3741     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3742     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3743     break 2
3744   fi
3745 done
3746   done
3747 IFS=$as_save_IFS
3748
3749 fi
3750 fi
3751 CC=$ac_cv_prog_CC
3752 if test -n "$CC"; then
3753   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3754 $as_echo "$CC" >&6; }
3755 else
3756   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3757 $as_echo "no" >&6; }
3758 fi
3759
3760
3761     test -n "$CC" && break
3762   done
3763 fi
3764 if test -z "$CC"; then
3765   ac_ct_CC=$CC
3766   for ac_prog in $pgac_cc_list
3767 do
3768   # Extract the first word of "$ac_prog", so it can be a program name with args.
3769 set dummy $ac_prog; ac_word=$2
3770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3771 $as_echo_n "checking for $ac_word... " >&6; }
3772 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3773   $as_echo_n "(cached) " >&6
3774 else
3775   if test -n "$ac_ct_CC"; then
3776   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3777 else
3778 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3779 for as_dir in $PATH
3780 do
3781   IFS=$as_save_IFS
3782   test -z "$as_dir" && as_dir=.
3783     for ac_exec_ext in '' $ac_executable_extensions; do
3784   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3785     ac_cv_prog_ac_ct_CC="$ac_prog"
3786     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3787     break 2
3788   fi
3789 done
3790   done
3791 IFS=$as_save_IFS
3792
3793 fi
3794 fi
3795 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3796 if test -n "$ac_ct_CC"; then
3797   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3798 $as_echo "$ac_ct_CC" >&6; }
3799 else
3800   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3801 $as_echo "no" >&6; }
3802 fi
3803
3804
3805   test -n "$ac_ct_CC" && break
3806 done
3807
3808   if test "x$ac_ct_CC" = x; then
3809     CC=""
3810   else
3811     case $cross_compiling:$ac_tool_warned in
3812 yes:)
3813 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3814 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3815 ac_tool_warned=yes ;;
3816 esac
3817     CC=$ac_ct_CC
3818   fi
3819 fi
3820
3821
3822 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3823 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3824 as_fn_error $? "no acceptable C compiler found in \$PATH
3825 See \`config.log' for more details" "$LINENO" 5; }
3826
3827 # Provide some information about the compiler.
3828 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3829 set X $ac_compile
3830 ac_compiler=$2
3831 for ac_option in --version -v -V -qversion; do
3832   { { ac_try="$ac_compiler $ac_option >&5"
3833 case "(($ac_try" in
3834   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3835   *) ac_try_echo=$ac_try;;
3836 esac
3837 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3838 $as_echo "$ac_try_echo"; } >&5
3839   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3840   ac_status=$?
3841   if test -s conftest.err; then
3842     sed '10a\
3843 ... rest of stderr output deleted ...
3844          10q' conftest.err >conftest.er1
3845     cat conftest.er1 >&5
3846   fi
3847   rm -f conftest.er1 conftest.err
3848   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3849   test $ac_status = 0; }
3850 done
3851
3852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3853 /* end confdefs.h.  */
3854
3855 int
3856 main ()
3857 {
3858
3859   ;
3860   return 0;
3861 }
3862 _ACEOF
3863 ac_clean_files_save=$ac_clean_files
3864 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3865 # Try to create an executable without -o first, disregard a.out.
3866 # It will help us diagnose broken compilers, and finding out an intuition
3867 # of exeext.
3868 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3869 $as_echo_n "checking whether the C compiler works... " >&6; }
3870 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3871
3872 # The possible output files:
3873 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3874
3875 ac_rmfiles=
3876 for ac_file in $ac_files
3877 do
3878   case $ac_file in
3879     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3880     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3881   esac
3882 done
3883 rm -f $ac_rmfiles
3884
3885 if { { ac_try="$ac_link_default"
3886 case "(($ac_try" in
3887   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3888   *) ac_try_echo=$ac_try;;
3889 esac
3890 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3891 $as_echo "$ac_try_echo"; } >&5
3892   (eval "$ac_link_default") 2>&5
3893   ac_status=$?
3894   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3895   test $ac_status = 0; }; then :
3896   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3897 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3898 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
3899 # so that the user can short-circuit this test for compilers unknown to
3900 # Autoconf.
3901 for ac_file in $ac_files ''
3902 do
3903   test -f "$ac_file" || continue
3904   case $ac_file in
3905     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3906         ;;
3907     [ab].out )
3908         # We found the default executable, but exeext='' is most
3909         # certainly right.
3910         break;;
3911     *.* )
3912         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3913         then :; else
3914            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3915         fi
3916         # We set ac_cv_exeext here because the later test for it is not
3917         # safe: cross compilers may not add the suffix if given an `-o'
3918         # argument, so we may need to know it at that point already.
3919         # Even if this section looks crufty: it has the advantage of
3920         # actually working.
3921         break;;
3922     * )
3923         break;;
3924   esac
3925 done
3926 test "$ac_cv_exeext" = no && ac_cv_exeext=
3927
3928 else
3929   ac_file=''
3930 fi
3931 if test -z "$ac_file"; then :
3932   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3933 $as_echo "no" >&6; }
3934 $as_echo "$as_me: failed program was:" >&5
3935 sed 's/^/| /' conftest.$ac_ext >&5
3936
3937 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3938 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3939 as_fn_error 77 "C compiler cannot create executables
3940 See \`config.log' for more details" "$LINENO" 5; }
3941 else
3942   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3943 $as_echo "yes" >&6; }
3944 fi
3945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3946 $as_echo_n "checking for C compiler default output file name... " >&6; }
3947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3948 $as_echo "$ac_file" >&6; }
3949 ac_exeext=$ac_cv_exeext
3950
3951 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3952 ac_clean_files=$ac_clean_files_save
3953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3954 $as_echo_n "checking for suffix of executables... " >&6; }
3955 if { { ac_try="$ac_link"
3956 case "(($ac_try" in
3957   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3958   *) ac_try_echo=$ac_try;;
3959 esac
3960 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3961 $as_echo "$ac_try_echo"; } >&5
3962   (eval "$ac_link") 2>&5
3963   ac_status=$?
3964   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3965   test $ac_status = 0; }; then :
3966   # If both `conftest.exe' and `conftest' are `present' (well, observable)
3967 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3968 # work properly (i.e., refer to `conftest.exe'), while it won't with
3969 # `rm'.
3970 for ac_file in conftest.exe conftest conftest.*; do
3971   test -f "$ac_file" || continue
3972   case $ac_file in
3973     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3974     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3975           break;;
3976     * ) break;;
3977   esac
3978 done
3979 else
3980   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3981 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3982 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3983 See \`config.log' for more details" "$LINENO" 5; }
3984 fi
3985 rm -f conftest conftest$ac_cv_exeext
3986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3987 $as_echo "$ac_cv_exeext" >&6; }
3988
3989 rm -f conftest.$ac_ext
3990 EXEEXT=$ac_cv_exeext
3991 ac_exeext=$EXEEXT
3992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3993 /* end confdefs.h.  */
3994 #include <stdio.h>
3995 int
3996 main ()
3997 {
3998 FILE *f = fopen ("conftest.out", "w");
3999  return ferror (f) || fclose (f) != 0;
4000
4001   ;
4002   return 0;
4003 }
4004 _ACEOF
4005 ac_clean_files="$ac_clean_files conftest.out"
4006 # Check that the compiler produces executables we can run.  If not, either
4007 # the compiler is broken, or we cross compile.
4008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4009 $as_echo_n "checking whether we are cross compiling... " >&6; }
4010 if test "$cross_compiling" != yes; then
4011   { { ac_try="$ac_link"
4012 case "(($ac_try" in
4013   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4014   *) ac_try_echo=$ac_try;;
4015 esac
4016 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4017 $as_echo "$ac_try_echo"; } >&5
4018   (eval "$ac_link") 2>&5
4019   ac_status=$?
4020   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4021   test $ac_status = 0; }
4022   if { ac_try='./conftest$ac_cv_exeext'
4023   { { case "(($ac_try" in
4024   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4025   *) ac_try_echo=$ac_try;;
4026 esac
4027 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4028 $as_echo "$ac_try_echo"; } >&5
4029   (eval "$ac_try") 2>&5
4030   ac_status=$?
4031   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4032   test $ac_status = 0; }; }; then
4033     cross_compiling=no
4034   else
4035     if test "$cross_compiling" = maybe; then
4036         cross_compiling=yes
4037     else
4038         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4039 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4040 as_fn_error $? "cannot run C compiled programs.
4041 If you meant to cross compile, use \`--host'.
4042 See \`config.log' for more details" "$LINENO" 5; }
4043     fi
4044   fi
4045 fi
4046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4047 $as_echo "$cross_compiling" >&6; }
4048
4049 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4050 ac_clean_files=$ac_clean_files_save
4051 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4052 $as_echo_n "checking for suffix of object files... " >&6; }
4053 if ${ac_cv_objext+:} false; then :
4054   $as_echo_n "(cached) " >&6
4055 else
4056   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4057 /* end confdefs.h.  */
4058
4059 int
4060 main ()
4061 {
4062
4063   ;
4064   return 0;
4065 }
4066 _ACEOF
4067 rm -f conftest.o conftest.obj
4068 if { { ac_try="$ac_compile"
4069 case "(($ac_try" in
4070   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4071   *) ac_try_echo=$ac_try;;
4072 esac
4073 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4074 $as_echo "$ac_try_echo"; } >&5
4075   (eval "$ac_compile") 2>&5
4076   ac_status=$?
4077   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4078   test $ac_status = 0; }; then :
4079   for ac_file in conftest.o conftest.obj conftest.*; do
4080   test -f "$ac_file" || continue;
4081   case $ac_file in
4082     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4083     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4084        break;;
4085   esac
4086 done
4087 else
4088   $as_echo "$as_me: failed program was:" >&5
4089 sed 's/^/| /' conftest.$ac_ext >&5
4090
4091 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4092 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4093 as_fn_error $? "cannot compute suffix of object files: cannot compile
4094 See \`config.log' for more details" "$LINENO" 5; }
4095 fi
4096 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4097 fi
4098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4099 $as_echo "$ac_cv_objext" >&6; }
4100 OBJEXT=$ac_cv_objext
4101 ac_objext=$OBJEXT
4102 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4103 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4104 if ${ac_cv_c_compiler_gnu+:} false; then :
4105   $as_echo_n "(cached) " >&6
4106 else
4107   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4108 /* end confdefs.h.  */
4109
4110 int
4111 main ()
4112 {
4113 #ifndef __GNUC__
4114        choke me
4115 #endif
4116
4117   ;
4118   return 0;
4119 }
4120 _ACEOF
4121 if ac_fn_c_try_compile "$LINENO"; then :
4122   ac_compiler_gnu=yes
4123 else
4124   ac_compiler_gnu=no
4125 fi
4126 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4127 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4128
4129 fi
4130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4131 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4132 if test $ac_compiler_gnu = yes; then
4133   GCC=yes
4134 else
4135   GCC=
4136 fi
4137 ac_test_CFLAGS=${CFLAGS+set}
4138 ac_save_CFLAGS=$CFLAGS
4139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4140 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4141 if ${ac_cv_prog_cc_g+:} false; then :
4142   $as_echo_n "(cached) " >&6
4143 else
4144   ac_save_c_werror_flag=$ac_c_werror_flag
4145    ac_c_werror_flag=yes
4146    ac_cv_prog_cc_g=no
4147    CFLAGS="-g"
4148    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4149 /* end confdefs.h.  */
4150
4151 int
4152 main ()
4153 {
4154
4155   ;
4156   return 0;
4157 }
4158 _ACEOF
4159 if ac_fn_c_try_compile "$LINENO"; then :
4160   ac_cv_prog_cc_g=yes
4161 else
4162   CFLAGS=""
4163       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4164 /* end confdefs.h.  */
4165
4166 int
4167 main ()
4168 {
4169
4170   ;
4171   return 0;
4172 }
4173 _ACEOF
4174 if ac_fn_c_try_compile "$LINENO"; then :
4175
4176 else
4177   ac_c_werror_flag=$ac_save_c_werror_flag
4178          CFLAGS="-g"
4179          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4180 /* end confdefs.h.  */
4181
4182 int
4183 main ()
4184 {
4185
4186   ;
4187   return 0;
4188 }
4189 _ACEOF
4190 if ac_fn_c_try_compile "$LINENO"; then :
4191   ac_cv_prog_cc_g=yes
4192 fi
4193 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4194 fi
4195 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4196 fi
4197 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4198    ac_c_werror_flag=$ac_save_c_werror_flag
4199 fi
4200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4201 $as_echo "$ac_cv_prog_cc_g" >&6; }
4202 if test "$ac_test_CFLAGS" = set; then
4203   CFLAGS=$ac_save_CFLAGS
4204 elif test $ac_cv_prog_cc_g = yes; then
4205   if test "$GCC" = yes; then
4206     CFLAGS="-g -O2"
4207   else
4208     CFLAGS="-g"
4209   fi
4210 else
4211   if test "$GCC" = yes; then
4212     CFLAGS="-O2"
4213   else
4214     CFLAGS=
4215   fi
4216 fi
4217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4218 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4219 if ${ac_cv_prog_cc_c89+:} false; then :
4220   $as_echo_n "(cached) " >&6
4221 else
4222   ac_cv_prog_cc_c89=no
4223 ac_save_CC=$CC
4224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4225 /* end confdefs.h.  */
4226 #include <stdarg.h>
4227 #include <stdio.h>
4228 struct stat;
4229 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4230 struct buf { int x; };
4231 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4232 static char *e (p, i)
4233      char **p;
4234      int i;
4235 {
4236   return p[i];
4237 }
4238 static char *f (char * (*g) (char **, int), char **p, ...)
4239 {
4240   char *s;
4241   va_list v;
4242   va_start (v,p);
4243   s = g (p, va_arg (v,int));
4244   va_end (v);
4245   return s;
4246 }
4247
4248 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
4249    function prototypes and stuff, but not '\xHH' hex character constants.
4250    These don't provoke an error unfortunately, instead are silently treated
4251    as 'x'.  The following induces an error, until -std is added to get
4252    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
4253    array size at least.  It's necessary to write '\x00'==0 to get something
4254    that's true only with -std.  */
4255 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4256
4257 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4258    inside strings and character constants.  */
4259 #define FOO(x) 'x'
4260 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4261
4262 int test (int i, double x);
4263 struct s1 {int (*f) (int a);};
4264 struct s2 {int (*f) (double a);};
4265 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4266 int argc;
4267 char **argv;
4268 int
4269 main ()
4270 {
4271 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4272   ;
4273   return 0;
4274 }
4275 _ACEOF
4276 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4277         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4278 do
4279   CC="$ac_save_CC $ac_arg"
4280   if ac_fn_c_try_compile "$LINENO"; then :
4281   ac_cv_prog_cc_c89=$ac_arg
4282 fi
4283 rm -f core conftest.err conftest.$ac_objext
4284   test "x$ac_cv_prog_cc_c89" != "xno" && break
4285 done
4286 rm -f conftest.$ac_ext
4287 CC=$ac_save_CC
4288
4289 fi
4290 # AC_CACHE_VAL
4291 case "x$ac_cv_prog_cc_c89" in
4292   x)
4293     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4294 $as_echo "none needed" >&6; } ;;
4295   xno)
4296     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4297 $as_echo "unsupported" >&6; } ;;
4298   *)
4299     CC="$CC $ac_cv_prog_cc_c89"
4300     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4301 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4302 esac
4303 if test "x$ac_cv_prog_cc_c89" != xno; then :
4304
4305 fi
4306
4307 ac_ext=c
4308 ac_cpp='$CPP $CPPFLAGS'
4309 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4310 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4311 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4312
4313
4314 # Check if it's Intel's compiler, which (usually) pretends to be gcc,
4315 # but has idiosyncrasies of its own.  We assume icc will define
4316 # __INTEL_COMPILER regardless of CFLAGS.
4317
4318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4319 /* end confdefs.h.  */
4320
4321 int
4322 main ()
4323 {
4324 #ifndef __INTEL_COMPILER
4325 choke me
4326 #endif
4327   ;
4328   return 0;
4329 }
4330 _ACEOF
4331 if ac_fn_c_try_compile "$LINENO"; then :
4332   ICC=yes
4333 else
4334   ICC=no
4335 fi
4336 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4337
4338 # Check if it's Sun Studio compiler. We assume that
4339 # __SUNPRO_C will be defined for Sun Studio compilers
4340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4341 /* end confdefs.h.  */
4342
4343 int
4344 main ()
4345 {
4346 #ifndef __SUNPRO_C
4347 choke me
4348 #endif
4349   ;
4350   return 0;
4351 }
4352 _ACEOF
4353 if ac_fn_c_try_compile "$LINENO"; then :
4354   SUN_STUDIO_CC=yes
4355 else
4356   SUN_STUDIO_CC=no
4357 fi
4358 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4359
4360
4361
4362 unset CFLAGS
4363
4364 #
4365 # Read the template
4366 #
4367 . "$srcdir/src/template/$template" || exit
4368
4369 # CFLAGS are selected so:
4370 # If the user specifies something in the environment, that is used.
4371 # else:  If the template file set something, that is used.
4372 # else:  If coverage was enabled, don't set anything.
4373 # else:  If the compiler is GCC, then we use -O2.
4374 # else:  If the compiler is something else, then we use -O, unless debugging.
4375
4376 if test "$ac_env_CFLAGS_set" = set; then
4377   CFLAGS=$ac_env_CFLAGS_value
4378 elif test "${CFLAGS+set}" = set; then
4379   : # (keep what template set)
4380 elif test "$enable_coverage" = yes; then
4381   : # no optimization by default
4382 elif test "$GCC" = yes; then
4383   CFLAGS="-O2"
4384 else
4385   # if the user selected debug mode, don't use -O
4386   if test "$enable_debug" != yes; then
4387     CFLAGS="-O"
4388   fi
4389 fi
4390
4391 # CFLAGS we determined above will be added back at the end
4392 user_CFLAGS=$CFLAGS
4393 CFLAGS=""
4394
4395 # set CFLAGS_VECTOR from the environment, if available
4396 if test "$ac_env_CFLAGS_VECTOR_set" = set; then
4397   CFLAGS_VECTOR=$ac_env_CFLAGS_VECTOR_value
4398 fi
4399
4400 # Some versions of GCC support some additional useful warning flags.
4401 # Check whether they are supported, and add them to CFLAGS if so.
4402 # ICC pretends to be GCC but it's lying; it doesn't support these flags,
4403 # but has its own.  Also check other compiler-specific flags here.
4404
4405 if test "$GCC" = yes -a "$ICC" = no; then
4406   CFLAGS="-Wall -Wmissing-prototypes -Wpointer-arith"
4407   # These work in some but not all gcc versions
4408   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wdeclaration-after-statement" >&5
4409 $as_echo_n "checking whether $CC supports -Wdeclaration-after-statement... " >&6; }
4410 if ${pgac_cv_prog_cc_cflags__Wdeclaration_after_statement+:} false; then :
4411   $as_echo_n "(cached) " >&6
4412 else
4413   pgac_save_CFLAGS=$CFLAGS
4414 CFLAGS="$pgac_save_CFLAGS -Wdeclaration-after-statement"
4415 ac_save_c_werror_flag=$ac_c_werror_flag
4416 ac_c_werror_flag=yes
4417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4418 /* end confdefs.h.  */
4419
4420 int
4421 main ()
4422 {
4423
4424   ;
4425   return 0;
4426 }
4427 _ACEOF
4428 if ac_fn_c_try_compile "$LINENO"; then :
4429   pgac_cv_prog_cc_cflags__Wdeclaration_after_statement=yes
4430 else
4431   pgac_cv_prog_cc_cflags__Wdeclaration_after_statement=no
4432 fi
4433 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4434 ac_c_werror_flag=$ac_save_c_werror_flag
4435 CFLAGS="$pgac_save_CFLAGS"
4436 fi
4437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" >&5
4438 $as_echo "$pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" >&6; }
4439 if test x"$pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" = x"yes"; then
4440   CFLAGS="$CFLAGS -Wdeclaration-after-statement"
4441 fi
4442
4443   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wendif-labels" >&5
4444 $as_echo_n "checking whether $CC supports -Wendif-labels... " >&6; }
4445 if ${pgac_cv_prog_cc_cflags__Wendif_labels+:} false; then :
4446   $as_echo_n "(cached) " >&6
4447 else
4448   pgac_save_CFLAGS=$CFLAGS
4449 CFLAGS="$pgac_save_CFLAGS -Wendif-labels"
4450 ac_save_c_werror_flag=$ac_c_werror_flag
4451 ac_c_werror_flag=yes
4452 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4453 /* end confdefs.h.  */
4454
4455 int
4456 main ()
4457 {
4458
4459   ;
4460   return 0;
4461 }
4462 _ACEOF
4463 if ac_fn_c_try_compile "$LINENO"; then :
4464   pgac_cv_prog_cc_cflags__Wendif_labels=yes
4465 else
4466   pgac_cv_prog_cc_cflags__Wendif_labels=no
4467 fi
4468 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4469 ac_c_werror_flag=$ac_save_c_werror_flag
4470 CFLAGS="$pgac_save_CFLAGS"
4471 fi
4472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wendif_labels" >&5
4473 $as_echo "$pgac_cv_prog_cc_cflags__Wendif_labels" >&6; }
4474 if test x"$pgac_cv_prog_cc_cflags__Wendif_labels" = x"yes"; then
4475   CFLAGS="$CFLAGS -Wendif-labels"
4476 fi
4477
4478   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wmissing-format-attribute" >&5
4479 $as_echo_n "checking whether $CC supports -Wmissing-format-attribute... " >&6; }
4480 if ${pgac_cv_prog_cc_cflags__Wmissing_format_attribute+:} false; then :
4481   $as_echo_n "(cached) " >&6
4482 else
4483   pgac_save_CFLAGS=$CFLAGS
4484 CFLAGS="$pgac_save_CFLAGS -Wmissing-format-attribute"
4485 ac_save_c_werror_flag=$ac_c_werror_flag
4486 ac_c_werror_flag=yes
4487 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4488 /* end confdefs.h.  */
4489
4490 int
4491 main ()
4492 {
4493
4494   ;
4495   return 0;
4496 }
4497 _ACEOF
4498 if ac_fn_c_try_compile "$LINENO"; then :
4499   pgac_cv_prog_cc_cflags__Wmissing_format_attribute=yes
4500 else
4501   pgac_cv_prog_cc_cflags__Wmissing_format_attribute=no
4502 fi
4503 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4504 ac_c_werror_flag=$ac_save_c_werror_flag
4505 CFLAGS="$pgac_save_CFLAGS"
4506 fi
4507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wmissing_format_attribute" >&5
4508 $as_echo "$pgac_cv_prog_cc_cflags__Wmissing_format_attribute" >&6; }
4509 if test x"$pgac_cv_prog_cc_cflags__Wmissing_format_attribute" = x"yes"; then
4510   CFLAGS="$CFLAGS -Wmissing-format-attribute"
4511 fi
4512
4513   # This was included in -Wall/-Wformat in older GCC versions
4514   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wformat-security" >&5
4515 $as_echo_n "checking whether $CC supports -Wformat-security... " >&6; }
4516 if ${pgac_cv_prog_cc_cflags__Wformat_security+:} false; then :
4517   $as_echo_n "(cached) " >&6
4518 else
4519   pgac_save_CFLAGS=$CFLAGS
4520 CFLAGS="$pgac_save_CFLAGS -Wformat-security"
4521 ac_save_c_werror_flag=$ac_c_werror_flag
4522 ac_c_werror_flag=yes
4523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4524 /* end confdefs.h.  */
4525
4526 int
4527 main ()
4528 {
4529
4530   ;
4531   return 0;
4532 }
4533 _ACEOF
4534 if ac_fn_c_try_compile "$LINENO"; then :
4535   pgac_cv_prog_cc_cflags__Wformat_security=yes
4536 else
4537   pgac_cv_prog_cc_cflags__Wformat_security=no
4538 fi
4539 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4540 ac_c_werror_flag=$ac_save_c_werror_flag
4541 CFLAGS="$pgac_save_CFLAGS"
4542 fi
4543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wformat_security" >&5
4544 $as_echo "$pgac_cv_prog_cc_cflags__Wformat_security" >&6; }
4545 if test x"$pgac_cv_prog_cc_cflags__Wformat_security" = x"yes"; then
4546   CFLAGS="$CFLAGS -Wformat-security"
4547 fi
4548
4549   # Disable strict-aliasing rules; needed for gcc 3.3+
4550   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fno-strict-aliasing" >&5
4551 $as_echo_n "checking whether $CC supports -fno-strict-aliasing... " >&6; }
4552 if ${pgac_cv_prog_cc_cflags__fno_strict_aliasing+:} false; then :
4553   $as_echo_n "(cached) " >&6
4554 else
4555   pgac_save_CFLAGS=$CFLAGS
4556 CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing"
4557 ac_save_c_werror_flag=$ac_c_werror_flag
4558 ac_c_werror_flag=yes
4559 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4560 /* end confdefs.h.  */
4561
4562 int
4563 main ()
4564 {
4565
4566   ;
4567   return 0;
4568 }
4569 _ACEOF
4570 if ac_fn_c_try_compile "$LINENO"; then :
4571   pgac_cv_prog_cc_cflags__fno_strict_aliasing=yes
4572 else
4573   pgac_cv_prog_cc_cflags__fno_strict_aliasing=no
4574 fi
4575 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4576 ac_c_werror_flag=$ac_save_c_werror_flag
4577 CFLAGS="$pgac_save_CFLAGS"
4578 fi
4579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&5
4580 $as_echo "$pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&6; }
4581 if test x"$pgac_cv_prog_cc_cflags__fno_strict_aliasing" = x"yes"; then
4582   CFLAGS="$CFLAGS -fno-strict-aliasing"
4583 fi
4584
4585   # Disable optimizations that assume no overflow; needed for gcc 4.3+
4586   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fwrapv" >&5
4587 $as_echo_n "checking whether $CC supports -fwrapv... " >&6; }
4588 if ${pgac_cv_prog_cc_cflags__fwrapv+:} false; then :
4589   $as_echo_n "(cached) " >&6
4590 else
4591   pgac_save_CFLAGS=$CFLAGS
4592 CFLAGS="$pgac_save_CFLAGS -fwrapv"
4593 ac_save_c_werror_flag=$ac_c_werror_flag
4594 ac_c_werror_flag=yes
4595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4596 /* end confdefs.h.  */
4597
4598 int
4599 main ()
4600 {
4601
4602   ;
4603   return 0;
4604 }
4605 _ACEOF
4606 if ac_fn_c_try_compile "$LINENO"; then :
4607   pgac_cv_prog_cc_cflags__fwrapv=yes
4608 else
4609   pgac_cv_prog_cc_cflags__fwrapv=no
4610 fi
4611 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4612 ac_c_werror_flag=$ac_save_c_werror_flag
4613 CFLAGS="$pgac_save_CFLAGS"
4614 fi
4615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fwrapv" >&5
4616 $as_echo "$pgac_cv_prog_cc_cflags__fwrapv" >&6; }
4617 if test x"$pgac_cv_prog_cc_cflags__fwrapv" = x"yes"; then
4618   CFLAGS="$CFLAGS -fwrapv"
4619 fi
4620
4621   # Disable FP optimizations that cause various errors on gcc 4.5+ or maybe 4.6+
4622   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fexcess-precision=standard" >&5
4623 $as_echo_n "checking whether $CC supports -fexcess-precision=standard... " >&6; }
4624 if ${pgac_cv_prog_cc_cflags__fexcess_precision_standard+:} false; then :
4625   $as_echo_n "(cached) " >&6
4626 else
4627   pgac_save_CFLAGS=$CFLAGS
4628 CFLAGS="$pgac_save_CFLAGS -fexcess-precision=standard"
4629 ac_save_c_werror_flag=$ac_c_werror_flag
4630 ac_c_werror_flag=yes
4631 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4632 /* end confdefs.h.  */
4633
4634 int
4635 main ()
4636 {
4637
4638   ;
4639   return 0;
4640 }
4641 _ACEOF
4642 if ac_fn_c_try_compile "$LINENO"; then :
4643   pgac_cv_prog_cc_cflags__fexcess_precision_standard=yes
4644 else
4645   pgac_cv_prog_cc_cflags__fexcess_precision_standard=no
4646 fi
4647 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4648 ac_c_werror_flag=$ac_save_c_werror_flag
4649 CFLAGS="$pgac_save_CFLAGS"
4650 fi
4651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fexcess_precision_standard" >&5
4652 $as_echo "$pgac_cv_prog_cc_cflags__fexcess_precision_standard" >&6; }
4653 if test x"$pgac_cv_prog_cc_cflags__fexcess_precision_standard" = x"yes"; then
4654   CFLAGS="$CFLAGS -fexcess-precision=standard"
4655 fi
4656
4657   # Optimization flags for specific files that benefit from vectorization
4658   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -funroll-loops" >&5
4659 $as_echo_n "checking whether $CC supports -funroll-loops... " >&6; }
4660 if ${pgac_cv_prog_cc_cflags__funroll_loops+:} false; then :
4661   $as_echo_n "(cached) " >&6
4662 else
4663   pgac_save_CFLAGS=$CFLAGS
4664 CFLAGS="$pgac_save_CFLAGS -funroll-loops"
4665 ac_save_c_werror_flag=$ac_c_werror_flag
4666 ac_c_werror_flag=yes
4667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4668 /* end confdefs.h.  */
4669
4670 int
4671 main ()
4672 {
4673
4674   ;
4675   return 0;
4676 }
4677 _ACEOF
4678 if ac_fn_c_try_compile "$LINENO"; then :
4679   pgac_cv_prog_cc_cflags__funroll_loops=yes
4680 else
4681   pgac_cv_prog_cc_cflags__funroll_loops=no
4682 fi
4683 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4684 ac_c_werror_flag=$ac_save_c_werror_flag
4685 CFLAGS="$pgac_save_CFLAGS"
4686 fi
4687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__funroll_loops" >&5
4688 $as_echo "$pgac_cv_prog_cc_cflags__funroll_loops" >&6; }
4689 if test x"$pgac_cv_prog_cc_cflags__funroll_loops" = x"yes"; then
4690   CFLAGS_VECTOR="${CFLAGS_VECTOR} -funroll-loops"
4691 fi
4692
4693   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -ftree-vectorize" >&5
4694 $as_echo_n "checking whether $CC supports -ftree-vectorize... " >&6; }
4695 if ${pgac_cv_prog_cc_cflags__ftree_vectorize+:} false; then :
4696   $as_echo_n "(cached) " >&6
4697 else
4698   pgac_save_CFLAGS=$CFLAGS
4699 CFLAGS="$pgac_save_CFLAGS -ftree-vectorize"
4700 ac_save_c_werror_flag=$ac_c_werror_flag
4701 ac_c_werror_flag=yes
4702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4703 /* end confdefs.h.  */
4704
4705 int
4706 main ()
4707 {
4708
4709   ;
4710   return 0;
4711 }
4712 _ACEOF
4713 if ac_fn_c_try_compile "$LINENO"; then :
4714   pgac_cv_prog_cc_cflags__ftree_vectorize=yes
4715 else
4716   pgac_cv_prog_cc_cflags__ftree_vectorize=no
4717 fi
4718 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4719 ac_c_werror_flag=$ac_save_c_werror_flag
4720 CFLAGS="$pgac_save_CFLAGS"
4721 fi
4722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__ftree_vectorize" >&5
4723 $as_echo "$pgac_cv_prog_cc_cflags__ftree_vectorize" >&6; }
4724 if test x"$pgac_cv_prog_cc_cflags__ftree_vectorize" = x"yes"; then
4725   CFLAGS_VECTOR="${CFLAGS_VECTOR} -ftree-vectorize"
4726 fi
4727
4728   # We want to suppress clang's unhelpful unused-command-line-argument warnings
4729   # but gcc won't complain about unrecognized -Wno-foo switches, so we have to
4730   # test for the positive form and if that works, add the negative form
4731   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wunused-command-line-argument" >&5
4732 $as_echo_n "checking whether $CC supports -Wunused-command-line-argument... " >&6; }
4733 if ${pgac_cv_prog_cc_cflags__Wunused_command_line_argument+:} false; then :
4734   $as_echo_n "(cached) " >&6
4735 else
4736   pgac_save_CFLAGS=$CFLAGS
4737 CFLAGS="$pgac_save_CFLAGS -Wunused-command-line-argument"
4738 ac_save_c_werror_flag=$ac_c_werror_flag
4739 ac_c_werror_flag=yes
4740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4741 /* end confdefs.h.  */
4742
4743 int
4744 main ()
4745 {
4746
4747   ;
4748   return 0;
4749 }
4750 _ACEOF
4751 if ac_fn_c_try_compile "$LINENO"; then :
4752   pgac_cv_prog_cc_cflags__Wunused_command_line_argument=yes
4753 else
4754   pgac_cv_prog_cc_cflags__Wunused_command_line_argument=no
4755 fi
4756 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4757 ac_c_werror_flag=$ac_save_c_werror_flag
4758 CFLAGS="$pgac_save_CFLAGS"
4759 fi
4760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wunused_command_line_argument" >&5
4761 $as_echo "$pgac_cv_prog_cc_cflags__Wunused_command_line_argument" >&6; }
4762 if test x"$pgac_cv_prog_cc_cflags__Wunused_command_line_argument" = x"yes"; then
4763   NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
4764 fi
4765
4766   if test -n "$NOT_THE_CFLAGS"; then
4767     CFLAGS="$CFLAGS -Wno-unused-command-line-argument"
4768   fi
4769 elif test "$ICC" = yes; then
4770   # Intel's compiler has a bug/misoptimization in checking for
4771   # division by NAN (NaN == 0), -mp1 fixes it, so add it to the CFLAGS.
4772   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -mp1" >&5
4773 $as_echo_n "checking whether $CC supports -mp1... " >&6; }
4774 if ${pgac_cv_prog_cc_cflags__mp1+:} false; then :
4775   $as_echo_n "(cached) " >&6
4776 else
4777   pgac_save_CFLAGS=$CFLAGS
4778 CFLAGS="$pgac_save_CFLAGS -mp1"
4779 ac_save_c_werror_flag=$ac_c_werror_flag
4780 ac_c_werror_flag=yes
4781 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4782 /* end confdefs.h.  */
4783
4784 int
4785 main ()
4786 {
4787
4788   ;
4789   return 0;
4790 }
4791 _ACEOF
4792 if ac_fn_c_try_compile "$LINENO"; then :
4793   pgac_cv_prog_cc_cflags__mp1=yes
4794 else
4795   pgac_cv_prog_cc_cflags__mp1=no
4796 fi
4797 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4798 ac_c_werror_flag=$ac_save_c_werror_flag
4799 CFLAGS="$pgac_save_CFLAGS"
4800 fi
4801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__mp1" >&5
4802 $as_echo "$pgac_cv_prog_cc_cflags__mp1" >&6; }
4803 if test x"$pgac_cv_prog_cc_cflags__mp1" = x"yes"; then
4804   CFLAGS="$CFLAGS -mp1"
4805 fi
4806
4807   # Make sure strict aliasing is off (though this is said to be the default)
4808   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fno-strict-aliasing" >&5
4809 $as_echo_n "checking whether $CC supports -fno-strict-aliasing... " >&6; }
4810 if ${pgac_cv_prog_cc_cflags__fno_strict_aliasing+:} false; then :
4811   $as_echo_n "(cached) " >&6
4812 else
4813   pgac_save_CFLAGS=$CFLAGS
4814 CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing"
4815 ac_save_c_werror_flag=$ac_c_werror_flag
4816 ac_c_werror_flag=yes
4817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4818 /* end confdefs.h.  */
4819
4820 int
4821 main ()
4822 {
4823
4824   ;
4825   return 0;
4826 }
4827 _ACEOF
4828 if ac_fn_c_try_compile "$LINENO"; then :
4829   pgac_cv_prog_cc_cflags__fno_strict_aliasing=yes
4830 else
4831   pgac_cv_prog_cc_cflags__fno_strict_aliasing=no
4832 fi
4833 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4834 ac_c_werror_flag=$ac_save_c_werror_flag
4835 CFLAGS="$pgac_save_CFLAGS"
4836 fi
4837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&5
4838 $as_echo "$pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&6; }
4839 if test x"$pgac_cv_prog_cc_cflags__fno_strict_aliasing" = x"yes"; then
4840   CFLAGS="$CFLAGS -fno-strict-aliasing"
4841 fi
4842
4843 elif test "$PORTNAME" = "aix"; then
4844   # AIX's xlc has to have strict aliasing turned off too
4845   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -qnoansialias" >&5
4846 $as_echo_n "checking whether $CC supports -qnoansialias... " >&6; }
4847 if ${pgac_cv_prog_cc_cflags__qnoansialias+:} false; then :
4848   $as_echo_n "(cached) " >&6
4849 else
4850   pgac_save_CFLAGS=$CFLAGS
4851 CFLAGS="$pgac_save_CFLAGS -qnoansialias"
4852 ac_save_c_werror_flag=$ac_c_werror_flag
4853 ac_c_werror_flag=yes
4854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4855 /* end confdefs.h.  */
4856
4857 int
4858 main ()
4859 {
4860
4861   ;
4862   return 0;
4863 }
4864 _ACEOF
4865 if ac_fn_c_try_compile "$LINENO"; then :
4866   pgac_cv_prog_cc_cflags__qnoansialias=yes
4867 else
4868   pgac_cv_prog_cc_cflags__qnoansialias=no
4869 fi
4870 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4871 ac_c_werror_flag=$ac_save_c_werror_flag
4872 CFLAGS="$pgac_save_CFLAGS"
4873 fi
4874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__qnoansialias" >&5
4875 $as_echo "$pgac_cv_prog_cc_cflags__qnoansialias" >&6; }
4876 if test x"$pgac_cv_prog_cc_cflags__qnoansialias" = x"yes"; then
4877   CFLAGS="$CFLAGS -qnoansialias"
4878 fi
4879
4880   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -qlonglong" >&5
4881 $as_echo_n "checking whether $CC supports -qlonglong... " >&6; }
4882 if ${pgac_cv_prog_cc_cflags__qlonglong+:} false; then :
4883   $as_echo_n "(cached) " >&6
4884 else
4885   pgac_save_CFLAGS=$CFLAGS
4886 CFLAGS="$pgac_save_CFLAGS -qlonglong"
4887 ac_save_c_werror_flag=$ac_c_werror_flag
4888 ac_c_werror_flag=yes
4889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4890 /* end confdefs.h.  */
4891
4892 int
4893 main ()
4894 {
4895
4896   ;
4897   return 0;
4898 }
4899 _ACEOF
4900 if ac_fn_c_try_compile "$LINENO"; then :
4901   pgac_cv_prog_cc_cflags__qlonglong=yes
4902 else
4903   pgac_cv_prog_cc_cflags__qlonglong=no
4904 fi
4905 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4906 ac_c_werror_flag=$ac_save_c_werror_flag
4907 CFLAGS="$pgac_save_CFLAGS"
4908 fi
4909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__qlonglong" >&5
4910 $as_echo "$pgac_cv_prog_cc_cflags__qlonglong" >&6; }
4911 if test x"$pgac_cv_prog_cc_cflags__qlonglong" = x"yes"; then
4912   CFLAGS="$CFLAGS -qlonglong"
4913 fi
4914
4915 elif test "$PORTNAME" = "hpux"; then
4916   # On some versions of HP-UX, libm functions do not set errno by default.
4917   # Fix that by using +Olibmerrno if the compiler recognizes it.
4918   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports +Olibmerrno" >&5
4919 $as_echo_n "checking whether $CC supports +Olibmerrno... " >&6; }
4920 if ${pgac_cv_prog_cc_cflags_pOlibmerrno+:} false; then :
4921   $as_echo_n "(cached) " >&6
4922 else
4923   pgac_save_CFLAGS=$CFLAGS
4924 CFLAGS="$pgac_save_CFLAGS +Olibmerrno"
4925 ac_save_c_werror_flag=$ac_c_werror_flag
4926 ac_c_werror_flag=yes
4927 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4928 /* end confdefs.h.  */
4929
4930 int
4931 main ()
4932 {
4933
4934   ;
4935   return 0;
4936 }
4937 _ACEOF
4938 if ac_fn_c_try_compile "$LINENO"; then :
4939   pgac_cv_prog_cc_cflags_pOlibmerrno=yes
4940 else
4941   pgac_cv_prog_cc_cflags_pOlibmerrno=no
4942 fi
4943 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4944 ac_c_werror_flag=$ac_save_c_werror_flag
4945 CFLAGS="$pgac_save_CFLAGS"
4946 fi
4947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags_pOlibmerrno" >&5
4948 $as_echo "$pgac_cv_prog_cc_cflags_pOlibmerrno" >&6; }
4949 if test x"$pgac_cv_prog_cc_cflags_pOlibmerrno" = x"yes"; then
4950   CFLAGS="$CFLAGS +Olibmerrno"
4951 fi
4952
4953 fi
4954
4955 CFLAGS_VECTOR=$CFLAGS_VECTOR
4956
4957
4958 # supply -g if --enable-debug
4959 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
4960   CFLAGS="$CFLAGS -g"
4961 fi
4962
4963 # enable code coverage if --enable-coverage
4964 if test "$enable_coverage" = yes; then
4965   if test "$GCC" = yes; then
4966     CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
4967   else
4968     as_fn_error $? "--enable-coverage is supported only when using GCC" "$LINENO" 5
4969   fi
4970 fi
4971
4972 # enable profiling if --enable-profiling
4973 if test "$enable_profiling" = yes && test "$ac_cv_prog_cc_g" = yes; then
4974   if test "$GCC" = yes; then
4975
4976 $as_echo "#define PROFILE_PID_DIR 1" >>confdefs.h
4977
4978     CFLAGS="$CFLAGS -pg $PLATFORM_PROFILE_FLAGS"
4979   else
4980     as_fn_error $? "--enable-profiling is supported only when using GCC" "$LINENO" 5
4981   fi
4982 fi
4983
4984 # We already have this in Makefile.win32, but configure needs it too
4985 if test "$PORTNAME" = "win32"; then
4986   CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32 -DEXEC_BACKEND"
4987 fi
4988
4989 # Now that we're done automatically adding stuff to CFLAGS, put back the
4990 # user-specified flags (if any) at the end.  This lets users override
4991 # the automatic additions.
4992 CFLAGS="$CFLAGS $user_CFLAGS"
4993
4994 # Check if the compiler still works with the final flag settings
4995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler still works" >&5
4996 $as_echo_n "checking whether the C compiler still works... " >&6; }
4997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4998 /* end confdefs.h.  */
4999
5000 int
5001 main ()
5002 {
5003 return 0;
5004   ;
5005   return 0;
5006 }
5007 _ACEOF
5008 if ac_fn_c_try_link "$LINENO"; then :
5009   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5010 $as_echo "yes" >&6; }
5011 else
5012   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5013 $as_echo "no" >&6; }
5014    as_fn_error $? "cannot proceed" "$LINENO" 5
5015 fi
5016 rm -f core conftest.err conftest.$ac_objext \
5017     conftest$ac_exeext conftest.$ac_ext
5018
5019 # Defend against gcc -ffast-math
5020 if test "$GCC" = yes; then
5021 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5022 /* end confdefs.h.  */
5023
5024 int
5025 main ()
5026 {
5027 #ifdef __FAST_MATH__
5028 choke me
5029 #endif
5030   ;
5031   return 0;
5032 }
5033 _ACEOF
5034 if ac_fn_c_try_compile "$LINENO"; then :
5035
5036 else
5037   as_fn_error $? "do not put -ffast-math in CFLAGS" "$LINENO" 5
5038 fi
5039 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5040 fi
5041
5042 ac_ext=c
5043 ac_cpp='$CPP $CPPFLAGS'
5044 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5045 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5046 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5048 $as_echo_n "checking how to run the C preprocessor... " >&6; }
5049 # On Suns, sometimes $CPP names a directory.
5050 if test -n "$CPP" && test -d "$CPP"; then
5051   CPP=
5052 fi
5053 if test -z "$CPP"; then
5054   if ${ac_cv_prog_CPP+:} false; then :
5055   $as_echo_n "(cached) " >&6
5056 else
5057       # Double quotes because CPP needs to be expanded
5058     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
5059     do
5060       ac_preproc_ok=false
5061 for ac_c_preproc_warn_flag in '' yes
5062 do
5063   # Use a header file that comes with gcc, so configuring glibc
5064   # with a fresh cross-compiler works.
5065   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5066   # <limits.h> exists even on freestanding compilers.
5067   # On the NeXT, cc -E runs the code through the compiler's parser,
5068   # not just through cpp. "Syntax error" is here to catch this case.
5069   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5070 /* end confdefs.h.  */
5071 #ifdef __STDC__
5072 # include <limits.h>
5073 #else
5074 # include <assert.h>
5075 #endif
5076                      Syntax error
5077 _ACEOF
5078 if ac_fn_c_try_cpp "$LINENO"; then :
5079
5080 else
5081   # Broken: fails on valid input.
5082 continue
5083 fi
5084 rm -f conftest.err conftest.i conftest.$ac_ext
5085
5086   # OK, works on sane cases.  Now check whether nonexistent headers
5087   # can be detected and how.
5088   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5089 /* end confdefs.h.  */
5090 #include <ac_nonexistent.h>
5091 _ACEOF
5092 if ac_fn_c_try_cpp "$LINENO"; then :
5093   # Broken: success on invalid input.
5094 continue
5095 else
5096   # Passes both tests.
5097 ac_preproc_ok=:
5098 break
5099 fi
5100 rm -f conftest.err conftest.i conftest.$ac_ext
5101
5102 done
5103 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5104 rm -f conftest.i conftest.err conftest.$ac_ext
5105 if $ac_preproc_ok; then :
5106   break
5107 fi
5108
5109     done
5110     ac_cv_prog_CPP=$CPP
5111
5112 fi
5113   CPP=$ac_cv_prog_CPP
5114 else
5115   ac_cv_prog_CPP=$CPP
5116 fi
5117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5118 $as_echo "$CPP" >&6; }
5119 ac_preproc_ok=false
5120 for ac_c_preproc_warn_flag in '' yes
5121 do
5122   # Use a header file that comes with gcc, so configuring glibc
5123   # with a fresh cross-compiler works.
5124   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5125   # <limits.h> exists even on freestanding compilers.
5126   # On the NeXT, cc -E runs the code through the compiler's parser,
5127   # not just through cpp. "Syntax error" is here to catch this case.
5128   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5129 /* end confdefs.h.  */
5130 #ifdef __STDC__
5131 # include <limits.h>
5132 #else
5133 # include <assert.h>
5134 #endif
5135                      Syntax error
5136 _ACEOF
5137 if ac_fn_c_try_cpp "$LINENO"; then :
5138
5139 else
5140   # Broken: fails on valid input.
5141 continue
5142 fi
5143 rm -f conftest.err conftest.i conftest.$ac_ext
5144
5145   # OK, works on sane cases.  Now check whether nonexistent headers
5146   # can be detected and how.
5147   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5148 /* end confdefs.h.  */
5149 #include <ac_nonexistent.h>
5150 _ACEOF
5151 if ac_fn_c_try_cpp "$LINENO"; then :
5152   # Broken: success on invalid input.
5153 continue
5154 else
5155   # Passes both tests.
5156 ac_preproc_ok=:
5157 break
5158 fi
5159 rm -f conftest.err conftest.i conftest.$ac_ext
5160
5161 done
5162 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5163 rm -f conftest.i conftest.err conftest.$ac_ext
5164 if $ac_preproc_ok; then :
5165
5166 else
5167   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5168 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5169 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
5170 See \`config.log' for more details" "$LINENO" 5; }
5171 fi
5172
5173 ac_ext=c
5174 ac_cpp='$CPP $CPPFLAGS'
5175 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5176 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5177 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5178
5179
5180
5181
5182 #
5183 # Set up TAS assembly code if needed; the template file has now had its
5184 # chance to request this.
5185 #
5186 ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
5187
5188
5189 if test "$need_tas" = yes ; then
5190   TAS=tas.o
5191 else
5192   TAS=""
5193 fi
5194
5195
5196
5197 #
5198 # Automatic dependency tracking
5199 #
5200
5201
5202 # Check whether --enable-depend was given.
5203 if test "${enable_depend+set}" = set; then :
5204   enableval=$enable_depend;
5205   case $enableval in
5206     yes)
5207       autodepend=yes
5208       ;;
5209     no)
5210       :
5211       ;;
5212     *)
5213       as_fn_error $? "no argument expected for --enable-depend option" "$LINENO" 5
5214       ;;
5215   esac
5216
5217 else
5218   enable_depend=no
5219
5220 fi
5221
5222
5223
5224
5225
5226 #
5227 # Enable assert checks
5228 #
5229
5230
5231 # Check whether --enable-cassert was given.
5232 if test "${enable_cassert+set}" = set; then :
5233   enableval=$enable_cassert;
5234   case $enableval in
5235     yes)
5236
5237 $as_echo "#define USE_ASSERT_CHECKING 1" >>confdefs.h
5238
5239       ;;
5240     no)
5241       :
5242       ;;
5243     *)
5244       as_fn_error $? "no argument expected for --enable-cassert option" "$LINENO" 5
5245       ;;
5246   esac
5247
5248 else
5249   enable_cassert=no
5250
5251 fi
5252
5253
5254
5255
5256 #
5257 # Include directories
5258 #
5259 ac_save_IFS=$IFS
5260 IFS="${IFS}${PATH_SEPARATOR}"
5261 # SRCH_INC comes from the template file
5262 for dir in $with_includes $SRCH_INC; do
5263   if test -d "$dir"; then
5264     INCLUDES="$INCLUDES -I$dir"
5265   else
5266     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Include directory $dir does not exist." >&5
5267 $as_echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
5268   fi
5269 done
5270 IFS=$ac_save_IFS
5271
5272
5273
5274 #
5275 # Library directories
5276 #
5277 ac_save_IFS=$IFS
5278 IFS="${IFS}${PATH_SEPARATOR}"
5279 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
5280 for dir in $LIBRARY_DIRS $SRCH_LIB; do
5281   if test -d "$dir"; then
5282     LIBDIRS="$LIBDIRS -L$dir"
5283   else
5284     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Library directory $dir does not exist." >&5
5285 $as_echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
5286   fi
5287 done
5288 IFS=$ac_save_IFS
5289
5290 #
5291 # Enable thread-safe client libraries
5292 #
5293 { $as_echo "$as_me:${as_lineno-$LINENO}: checking allow thread-safe client libraries" >&5
5294 $as_echo_n "checking allow thread-safe client libraries... " >&6; }
5295
5296
5297 # Check whether --enable-thread-safety was given.
5298 if test "${enable_thread_safety+set}" = set; then :
5299   enableval=$enable_thread_safety;
5300   case $enableval in
5301     yes)
5302       :
5303       ;;
5304     no)
5305       :
5306       ;;
5307     *)
5308       as_fn_error $? "no argument expected for --enable-thread-safety option" "$LINENO" 5
5309       ;;
5310   esac
5311
5312 else
5313   enable_thread_safety=yes
5314
5315 fi
5316
5317
5318 if test "$enable_thread_safety" = yes; then
5319
5320 $as_echo "#define ENABLE_THREAD_SAFETY 1" >>confdefs.h
5321
5322 fi
5323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_thread_safety" >&5
5324 $as_echo "$enable_thread_safety" >&6; }
5325
5326
5327 #
5328 # Optionally build Tcl modules (PL/Tcl)
5329 #
5330 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Tcl" >&5
5331 $as_echo_n "checking whether to build with Tcl... " >&6; }
5332
5333
5334
5335 # Check whether --with-tcl was given.
5336 if test "${with_tcl+set}" = set; then :
5337   withval=$with_tcl;
5338   case $withval in
5339     yes)
5340       :
5341       ;;
5342     no)
5343       :
5344       ;;
5345     *)
5346       as_fn_error $? "no argument expected for --with-tcl option" "$LINENO" 5
5347       ;;
5348   esac
5349
5350 else
5351   with_tcl=no
5352
5353 fi
5354
5355
5356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcl" >&5
5357 $as_echo "$with_tcl" >&6; }
5358
5359
5360 # We see if the path to the Tcl/Tk configuration scripts is specified.
5361 # This will override the use of tclsh to find the paths to search.
5362
5363
5364
5365
5366 # Check whether --with-tclconfig was given.
5367 if test "${with_tclconfig+set}" = set; then :
5368   withval=$with_tclconfig;
5369   case $withval in
5370     yes)
5371       as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
5372       ;;
5373     no)
5374       as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
5375       ;;
5376     *)
5377
5378       ;;
5379   esac
5380
5381 fi
5382
5383
5384
5385 #
5386 # Optionally build Perl modules (PL/Perl)
5387 #
5388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Perl modules" >&5
5389 $as_echo_n "checking whether to build Perl modules... " >&6; }
5390
5391
5392
5393 # Check whether --with-perl was given.
5394 if test "${with_perl+set}" = set; then :
5395   withval=$with_perl;
5396   case $withval in
5397     yes)
5398       :
5399       ;;
5400     no)
5401       :
5402       ;;
5403     *)
5404       as_fn_error $? "no argument expected for --with-perl option" "$LINENO" 5
5405       ;;
5406   esac
5407
5408 else
5409   with_perl=no
5410
5411 fi
5412
5413
5414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_perl" >&5
5415 $as_echo "$with_perl" >&6; }
5416
5417
5418 #
5419 # Optionally build Python modules (PL/Python)
5420 #
5421 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Python modules" >&5
5422 $as_echo_n "checking whether to build Python modules... " >&6; }
5423
5424
5425
5426 # Check whether --with-python was given.
5427 if test "${with_python+set}" = set; then :
5428   withval=$with_python;
5429   case $withval in
5430     yes)
5431       :
5432       ;;
5433     no)
5434       :
5435       ;;
5436     *)
5437       as_fn_error $? "no argument expected for --with-python option" "$LINENO" 5
5438       ;;
5439   esac
5440
5441 else
5442   with_python=no
5443
5444 fi
5445
5446
5447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
5448 $as_echo "$with_python" >&6; }
5449
5450
5451 #
5452 # GSSAPI
5453 #
5454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with GSSAPI support" >&5
5455 $as_echo_n "checking whether to build with GSSAPI support... " >&6; }
5456
5457
5458
5459 # Check whether --with-gssapi was given.
5460 if test "${with_gssapi+set}" = set; then :
5461   withval=$with_gssapi;
5462   case $withval in
5463     yes)
5464
5465
5466 $as_echo "#define ENABLE_GSS 1" >>confdefs.h
5467
5468   krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
5469
5470       ;;
5471     no)
5472       :
5473       ;;
5474     *)
5475       as_fn_error $? "no argument expected for --with-gssapi option" "$LINENO" 5
5476       ;;
5477   esac
5478
5479 else
5480   with_gssapi=no
5481
5482 fi
5483
5484
5485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_gssapi" >&5
5486 $as_echo "$with_gssapi" >&6; }
5487
5488
5489
5490
5491
5492 #
5493 # Kerberos configuration parameters
5494 #
5495
5496
5497
5498 # Check whether --with-krb-srvnam was given.
5499 if test "${with_krb_srvnam+set}" = set; then :
5500   withval=$with_krb_srvnam;
5501   case $withval in
5502     yes)
5503       as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
5504       ;;
5505     no)
5506       as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
5507       ;;
5508     *)
5509
5510       ;;
5511   esac
5512
5513 else
5514   with_krb_srvnam="postgres"
5515 fi
5516
5517
5518
5519 cat >>confdefs.h <<_ACEOF
5520 #define PG_KRB_SRVNAM "$with_krb_srvnam"
5521 _ACEOF
5522
5523
5524
5525 #
5526 # PAM
5527 #
5528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with PAM support" >&5
5529 $as_echo_n "checking whether to build with PAM support... " >&6; }
5530
5531
5532
5533 # Check whether --with-pam was given.
5534 if test "${with_pam+set}" = set; then :
5535   withval=$with_pam;
5536   case $withval in
5537     yes)
5538
5539 $as_echo "#define USE_PAM 1" >>confdefs.h
5540
5541       ;;
5542     no)
5543       :
5544       ;;
5545     *)
5546       as_fn_error $? "no argument expected for --with-pam option" "$LINENO" 5
5547       ;;
5548   esac
5549
5550 else
5551   with_pam=no
5552
5553 fi
5554
5555
5556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pam" >&5
5557 $as_echo "$with_pam" >&6; }
5558
5559
5560 #
5561 # LDAP
5562 #
5563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LDAP support" >&5
5564 $as_echo_n "checking whether to build with LDAP support... " >&6; }
5565
5566
5567
5568 # Check whether --with-ldap was given.
5569 if test "${with_ldap+set}" = set; then :
5570   withval=$with_ldap;
5571   case $withval in
5572     yes)
5573
5574 $as_echo "#define USE_LDAP 1" >>confdefs.h
5575
5576       ;;
5577     no)
5578       :
5579       ;;
5580     *)
5581       as_fn_error $? "no argument expected for --with-ldap option" "$LINENO" 5
5582       ;;
5583   esac
5584
5585 else
5586   with_ldap=no
5587
5588 fi
5589
5590
5591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_ldap" >&5
5592 $as_echo "$with_ldap" >&6; }
5593
5594
5595 #
5596 # Bonjour
5597 #
5598 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Bonjour support" >&5
5599 $as_echo_n "checking whether to build with Bonjour support... " >&6; }
5600
5601
5602
5603 # Check whether --with-bonjour was given.
5604 if test "${with_bonjour+set}" = set; then :
5605   withval=$with_bonjour;
5606   case $withval in
5607     yes)
5608
5609 $as_echo "#define USE_BONJOUR 1" >>confdefs.h
5610
5611       ;;
5612     no)
5613       :
5614       ;;
5615     *)
5616       as_fn_error $? "no argument expected for --with-bonjour option" "$LINENO" 5
5617       ;;
5618   esac
5619
5620 else
5621   with_bonjour=no
5622
5623 fi
5624
5625
5626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bonjour" >&5
5627 $as_echo "$with_bonjour" >&6; }
5628
5629
5630 #
5631 # OpenSSL
5632 #
5633 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with OpenSSL support" >&5
5634 $as_echo_n "checking whether to build with OpenSSL support... " >&6; }
5635
5636
5637
5638 # Check whether --with-openssl was given.
5639 if test "${with_openssl+set}" = set; then :
5640   withval=$with_openssl;
5641   case $withval in
5642     yes)
5643
5644 $as_echo "#define USE_OPENSSL 1" >>confdefs.h
5645
5646       ;;
5647     no)
5648       :
5649       ;;
5650     *)
5651       as_fn_error $? "no argument expected for --with-openssl option" "$LINENO" 5
5652       ;;
5653   esac
5654
5655 else
5656   with_openssl=no
5657
5658 fi
5659
5660
5661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_openssl" >&5
5662 $as_echo "$with_openssl" >&6; }
5663
5664
5665 #
5666 # SELinux
5667 #
5668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with SELinux support" >&5
5669 $as_echo_n "checking whether to build with SELinux support... " >&6; }
5670
5671
5672
5673 # Check whether --with-selinux was given.
5674 if test "${with_selinux+set}" = set; then :
5675   withval=$with_selinux;
5676   case $withval in
5677     yes)
5678       :
5679       ;;
5680     no)
5681       :
5682       ;;
5683     *)
5684       as_fn_error $? "no argument expected for --with-selinux option" "$LINENO" 5
5685       ;;
5686   esac
5687
5688 else
5689   with_selinux=no
5690
5691 fi
5692
5693
5694
5695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_selinux" >&5
5696 $as_echo "$with_selinux" >&6; }
5697
5698 #
5699 # Readline
5700 #
5701
5702
5703
5704 # Check whether --with-readline was given.
5705 if test "${with_readline+set}" = set; then :
5706   withval=$with_readline;
5707   case $withval in
5708     yes)
5709       :
5710       ;;
5711     no)
5712       :
5713       ;;
5714     *)
5715       as_fn_error $? "no argument expected for --with-readline option" "$LINENO" 5
5716       ;;
5717   esac
5718
5719 else
5720   with_readline=yes
5721
5722 fi
5723
5724
5725 # readline on MinGW has problems with backslashes in psql and other bugs.
5726 # This is particularly a problem with non-US code pages.
5727 # Therefore disable its use until we understand the cause. 2004-07-20
5728 if test "$PORTNAME" = "win32"; then
5729   if test "$with_readline" = yes; then
5730     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Readline does not work on MinGW --- disabling" >&5
5731 $as_echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
5732     with_readline=no
5733   fi
5734 fi
5735
5736
5737 #
5738 # Prefer libedit
5739 #
5740
5741
5742
5743 # Check whether --with-libedit-preferred was given.
5744 if test "${with_libedit_preferred+set}" = set; then :
5745   withval=$with_libedit_preferred;
5746   case $withval in
5747     yes)
5748       :
5749       ;;
5750     no)
5751       :
5752       ;;
5753     *)
5754       as_fn_error $? "no argument expected for --with-libedit-preferred option" "$LINENO" 5
5755       ;;
5756   esac
5757
5758 else
5759   with_libedit_preferred=no
5760
5761 fi
5762
5763
5764
5765
5766 #
5767 # UUID library
5768 #
5769 # There are at least three UUID libraries in common use: the FreeBSD/NetBSD
5770 # library, the e2fsprogs libuuid (now part of util-linux-ng), and the OSSP
5771 # UUID library.  More than one of these might be present on a given platform,
5772 # so we make the user say which one she wants.
5773 #
5774
5775
5776
5777 # Check whether --with-uuid was given.
5778 if test "${with_uuid+set}" = set; then :
5779   withval=$with_uuid;
5780   case $withval in
5781     yes)
5782       as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
5783       ;;
5784     no)
5785       as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
5786       ;;
5787     *)
5788
5789       ;;
5790   esac
5791
5792 fi
5793
5794
5795 if test x"$with_uuid" = x"" ; then
5796   with_uuid=no
5797 fi
5798
5799
5800
5801 # Check whether --with-ossp-uuid was given.
5802 if test "${with_ossp_uuid+set}" = set; then :
5803   withval=$with_ossp_uuid;
5804   case $withval in
5805     yes)
5806       :
5807       ;;
5808     no)
5809       :
5810       ;;
5811     *)
5812       as_fn_error $? "no argument expected for --with-ossp-uuid option" "$LINENO" 5
5813       ;;
5814   esac
5815
5816 else
5817   with_ossp_uuid=no
5818
5819 fi
5820
5821
5822 if test "$with_ossp_uuid" = yes ; then
5823   with_uuid=ossp
5824 fi
5825
5826 if test "$with_uuid" = bsd ; then
5827
5828 $as_echo "#define HAVE_UUID_BSD 1" >>confdefs.h
5829
5830   UUID_EXTRA_OBJS="md5.o sha1.o"
5831 elif test "$with_uuid" = e2fs ; then
5832
5833 $as_echo "#define HAVE_UUID_E2FS 1" >>confdefs.h
5834
5835   UUID_EXTRA_OBJS="md5.o sha1.o"
5836 elif test "$with_uuid" = ossp ; then
5837
5838 $as_echo "#define HAVE_UUID_OSSP 1" >>confdefs.h
5839
5840   UUID_EXTRA_OBJS=""
5841 elif test "$with_uuid" = no ; then
5842   UUID_EXTRA_OBJS=""
5843 else
5844   as_fn_error $? "--with-uuid must specify one of bsd, e2fs, or ossp" "$LINENO" 5
5845 fi
5846
5847
5848
5849
5850 #
5851 # XML
5852 #
5853
5854
5855
5856 # Check whether --with-libxml was given.
5857 if test "${with_libxml+set}" = set; then :
5858   withval=$with_libxml;
5859   case $withval in
5860     yes)
5861
5862 $as_echo "#define USE_LIBXML 1" >>confdefs.h
5863
5864       ;;
5865     no)
5866       :
5867       ;;
5868     *)
5869       as_fn_error $? "no argument expected for --with-libxml option" "$LINENO" 5
5870       ;;
5871   esac
5872
5873 else
5874   with_libxml=no
5875
5876 fi
5877
5878
5879
5880 if test "$with_libxml" = yes ; then
5881   for ac_prog in xml2-config
5882 do
5883   # Extract the first word of "$ac_prog", so it can be a program name with args.
5884 set dummy $ac_prog; ac_word=$2
5885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5886 $as_echo_n "checking for $ac_word... " >&6; }
5887 if ${ac_cv_prog_XML2_CONFIG+:} false; then :
5888   $as_echo_n "(cached) " >&6
5889 else
5890   if test -n "$XML2_CONFIG"; then
5891   ac_cv_prog_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test.
5892 else
5893 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5894 for as_dir in $PATH
5895 do
5896   IFS=$as_save_IFS
5897   test -z "$as_dir" && as_dir=.
5898     for ac_exec_ext in '' $ac_executable_extensions; do
5899   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5900     ac_cv_prog_XML2_CONFIG="$ac_prog"
5901     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5902     break 2
5903   fi
5904 done
5905   done
5906 IFS=$as_save_IFS
5907
5908 fi
5909 fi
5910 XML2_CONFIG=$ac_cv_prog_XML2_CONFIG
5911 if test -n "$XML2_CONFIG"; then
5912   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
5913 $as_echo "$XML2_CONFIG" >&6; }
5914 else
5915   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5916 $as_echo "no" >&6; }
5917 fi
5918
5919
5920   test -n "$XML2_CONFIG" && break
5921 done
5922
5923   if test -n "$XML2_CONFIG"; then
5924     for pgac_option in `$XML2_CONFIG --cflags`; do
5925       case $pgac_option in
5926         -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
5927       esac
5928     done
5929     for pgac_option in `$XML2_CONFIG --libs`; do
5930       case $pgac_option in
5931         -L*) LDFLAGS="$LDFLAGS $pgac_option";;
5932       esac
5933     done
5934   fi
5935 fi
5936
5937
5938
5939 #
5940 # XSLT
5941 #
5942
5943
5944
5945 # Check whether --with-libxslt was given.
5946 if test "${with_libxslt+set}" = set; then :
5947   withval=$with_libxslt;
5948   case $withval in
5949     yes)
5950
5951 $as_echo "#define USE_LIBXSLT 1" >>confdefs.h
5952
5953       ;;
5954     no)
5955       :
5956       ;;
5957     *)
5958       as_fn_error $? "no argument expected for --with-libxslt option" "$LINENO" 5
5959       ;;
5960   esac
5961
5962 else
5963   with_libxslt=no
5964
5965 fi
5966
5967
5968
5969
5970
5971
5972 #
5973 # tzdata
5974 #
5975
5976
5977
5978 # Check whether --with-system-tzdata was given.
5979 if test "${with_system_tzdata+set}" = set; then :
5980   withval=$with_system_tzdata;
5981   case $withval in
5982     yes)
5983       as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
5984       ;;
5985     no)
5986       as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
5987       ;;
5988     *)
5989
5990       ;;
5991   esac
5992
5993 fi
5994
5995
5996
5997
5998 #
5999 # Zlib
6000 #
6001
6002
6003
6004 # Check whether --with-zlib was given.
6005 if test "${with_zlib+set}" = set; then :
6006   withval=$with_zlib;
6007   case $withval in
6008     yes)
6009       :
6010       ;;
6011     no)
6012       :
6013       ;;
6014     *)
6015       as_fn_error $? "no argument expected for --with-zlib option" "$LINENO" 5
6016       ;;
6017   esac
6018
6019 else
6020   with_zlib=yes
6021
6022 fi
6023
6024
6025
6026
6027 #
6028 # Elf
6029 #
6030
6031 # Assume system is ELF if it predefines __ELF__ as 1,
6032 # otherwise believe host_os based default.
6033 case $host_os in
6034     freebsd1*|freebsd2*) elf=no;;
6035     freebsd3*|freebsd4*) elf=yes;;
6036 esac
6037
6038
6039 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6040 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6041 if ${ac_cv_path_GREP+:} false; then :
6042   $as_echo_n "(cached) " >&6
6043 else
6044   if test -z "$GREP"; then
6045   ac_path_GREP_found=false
6046   # Loop through the user's path and test for each of PROGNAME-LIST
6047   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6048 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6049 do
6050   IFS=$as_save_IFS
6051   test -z "$as_dir" && as_dir=.
6052     for ac_prog in grep ggrep; do
6053     for ac_exec_ext in '' $ac_executable_extensions; do
6054       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6055       as_fn_executable_p "$ac_path_GREP" || continue
6056 # Check for GNU ac_path_GREP and select it if it is found.
6057   # Check for GNU $ac_path_GREP
6058 case `"$ac_path_GREP" --version 2>&1` in
6059 *GNU*)
6060   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6061 *)
6062   ac_count=0
6063   $as_echo_n 0123456789 >"conftest.in"
6064   while :
6065   do
6066     cat "conftest.in" "conftest.in" >"conftest.tmp"
6067     mv "conftest.tmp" "conftest.in"
6068     cp "conftest.in" "conftest.nl"
6069     $as_echo 'GREP' >> "conftest.nl"
6070     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6071     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6072     as_fn_arith $ac_count + 1 && ac_count=$as_val
6073     if test $ac_count -gt ${ac_path_GREP_max-0}; then
6074       # Best one so far, save it but keep looking for a better one
6075       ac_cv_path_GREP="$ac_path_GREP"
6076       ac_path_GREP_max=$ac_count
6077     fi
6078     # 10*(2^10) chars as input seems more than enough
6079     test $ac_count -gt 10 && break
6080   done
6081   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6082 esac
6083
6084       $ac_path_GREP_found && break 3
6085     done
6086   done
6087   done
6088 IFS=$as_save_IFS
6089   if test -z "$ac_cv_path_GREP"; then
6090     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6091   fi
6092 else
6093   ac_cv_path_GREP=$GREP
6094 fi
6095
6096 fi
6097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6098 $as_echo "$ac_cv_path_GREP" >&6; }
6099  GREP="$ac_cv_path_GREP"
6100
6101
6102 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6103 $as_echo_n "checking for egrep... " >&6; }
6104 if ${ac_cv_path_EGREP+:} false; then :
6105   $as_echo_n "(cached) " >&6
6106 else
6107   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6108    then ac_cv_path_EGREP="$GREP -E"
6109    else
6110      if test -z "$EGREP"; then
6111   ac_path_EGREP_found=false
6112   # Loop through the user's path and test for each of PROGNAME-LIST
6113   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6114 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6115 do
6116   IFS=$as_save_IFS
6117   test -z "$as_dir" && as_dir=.
6118     for ac_prog in egrep; do
6119     for ac_exec_ext in '' $ac_executable_extensions; do
6120       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6121       as_fn_executable_p "$ac_path_EGREP" || continue
6122 # Check for GNU ac_path_EGREP and select it if it is found.
6123   # Check for GNU $ac_path_EGREP
6124 case `"$ac_path_EGREP" --version 2>&1` in
6125 *GNU*)
6126   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6127 *)
6128   ac_count=0
6129   $as_echo_n 0123456789 >"conftest.in"
6130   while :
6131   do
6132     cat "conftest.in" "conftest.in" >"conftest.tmp"
6133     mv "conftest.tmp" "conftest.in"
6134     cp "conftest.in" "conftest.nl"
6135     $as_echo 'EGREP' >> "conftest.nl"
6136     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6137     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6138     as_fn_arith $ac_count + 1 && ac_count=$as_val
6139     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6140       # Best one so far, save it but keep looking for a better one
6141       ac_cv_path_EGREP="$ac_path_EGREP"
6142       ac_path_EGREP_max=$ac_count
6143     fi
6144     # 10*(2^10) chars as input seems more than enough
6145     test $ac_count -gt 10 && break
6146   done
6147   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6148 esac
6149
6150       $ac_path_EGREP_found && break 3
6151     done
6152   done
6153   done
6154 IFS=$as_save_IFS
6155   if test -z "$ac_cv_path_EGREP"; then
6156     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6157   fi
6158 else
6159   ac_cv_path_EGREP=$EGREP
6160 fi
6161
6162    fi
6163 fi
6164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6165 $as_echo "$ac_cv_path_EGREP" >&6; }
6166  EGREP="$ac_cv_path_EGREP"
6167
6168
6169 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6170 /* end confdefs.h.  */
6171 #if __ELF__
6172   yes
6173 #endif
6174
6175 _ACEOF
6176 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6177   $EGREP "yes" >/dev/null 2>&1; then :
6178   ELF_SYS=true
6179 else
6180   if test "X$elf" = "Xyes" ; then
6181   ELF_SYS=true
6182 else
6183   ELF_SYS=
6184 fi
6185 fi
6186 rm -f conftest*
6187
6188
6189
6190 #
6191 # Assignments
6192 #
6193
6194 CPPFLAGS="$CPPFLAGS $INCLUDES"
6195 LDFLAGS="$LDFLAGS $LIBDIRS"
6196
6197
6198
6199
6200
6201 # Check whether --with-gnu-ld was given.
6202 if test "${with_gnu_ld+set}" = set; then :
6203   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
6204 else
6205   with_gnu_ld=no
6206 fi
6207
6208 ac_prog=ld
6209 if test "$GCC" = yes; then
6210   # Check if gcc -print-prog-name=ld gives a path.
6211   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
6212 $as_echo_n "checking for ld used by GCC... " >&6; }
6213   case $host in
6214   *-*-mingw*)
6215     # gcc leaves a trailing carriage return which upsets mingw
6216     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
6217   *)
6218     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
6219   esac
6220   case "$ac_prog" in
6221     # Accept absolute paths.
6222     [\\/]* | [A-Za-z]:[\\/]*)
6223       re_direlt='/[^/][^/]*/\.\./'
6224       # Canonicalize the path of ld
6225       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
6226       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
6227         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
6228       done
6229       test -z "$LD" && LD="$ac_prog"
6230       ;;
6231   "")
6232     # If it fails, then pretend we aren't using GCC.
6233     ac_prog=ld
6234     ;;
6235   *)
6236     # If it is relative, then search for the first ld in PATH.
6237     with_gnu_ld=unknown
6238     ;;
6239   esac
6240 elif test "$with_gnu_ld" = yes; then
6241   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
6242 $as_echo_n "checking for GNU ld... " >&6; }
6243 else
6244   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
6245 $as_echo_n "checking for non-GNU ld... " >&6; }
6246 fi
6247 if ${ac_cv_path_LD+:} false; then :
6248   $as_echo_n "(cached) " >&6
6249 else
6250   if test -z "$LD"; then
6251   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
6252   for ac_dir in $PATH; do
6253     test -z "$ac_dir" && ac_dir=.
6254     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
6255       ac_cv_path_LD="$ac_dir/$ac_prog"
6256       # Check to see if the program is GNU ld.  I'd rather use --version,
6257       # but apparently some GNU ld's only accept -v.
6258       # Break only if it was the GNU/non-GNU ld that we prefer.
6259       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
6260         test "$with_gnu_ld" != no && break
6261       else
6262         test "$with_gnu_ld" != yes && break
6263       fi
6264     fi
6265   done
6266   IFS="$ac_save_ifs"
6267 else
6268   ac_cv_path_LD="$LD" # Let the user override the test with a path.
6269 fi
6270 fi
6271
6272 LD="$ac_cv_path_LD"
6273 if test -n "$LD"; then
6274   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
6275 $as_echo "$LD" >&6; }
6276 else
6277   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6278 $as_echo "no" >&6; }
6279 fi
6280 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
6281 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
6282 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
6283 if ${ac_cv_prog_gnu_ld+:} false; then :
6284   $as_echo_n "(cached) " >&6
6285 else
6286   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
6287 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
6288   ac_cv_prog_gnu_ld=yes
6289 else
6290   ac_cv_prog_gnu_ld=no
6291 fi
6292 fi
6293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gnu_ld" >&5
6294 $as_echo "$ac_cv_prog_gnu_ld" >&6; }
6295 with_gnu_ld=$ac_cv_prog_gnu_ld
6296
6297
6298
6299
6300 case $host_os in sysv5*)
6301   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ld -R works" >&5
6302 $as_echo_n "checking whether ld -R works... " >&6; }
6303 if ${pgac_cv_prog_ld_R+:} false; then :
6304   $as_echo_n "(cached) " >&6
6305 else
6306
6307     pgac_save_LDFLAGS=$LDFLAGS; LDFLAGS="$LDFLAGS -Wl,-R/usr/lib"
6308     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6309 /* end confdefs.h.  */
6310
6311 int
6312 main ()
6313 {
6314
6315   ;
6316   return 0;
6317 }
6318 _ACEOF
6319 if ac_fn_c_try_link "$LINENO"; then :
6320   pgac_cv_prog_ld_R=yes
6321 else
6322   pgac_cv_prog_ld_R=no
6323 fi
6324 rm -f core conftest.err conftest.$ac_objext \
6325     conftest$ac_exeext conftest.$ac_ext
6326     LDFLAGS=$pgac_save_LDFLAGS
6327
6328 fi
6329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_ld_R" >&5
6330 $as_echo "$pgac_cv_prog_ld_R" >&6; }
6331   ld_R_works=$pgac_cv_prog_ld_R
6332
6333 esac
6334 if test -n "$ac_tool_prefix"; then
6335   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6336 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6338 $as_echo_n "checking for $ac_word... " >&6; }
6339 if ${ac_cv_prog_RANLIB+:} false; then :
6340   $as_echo_n "(cached) " >&6
6341 else
6342   if test -n "$RANLIB"; then
6343   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6344 else
6345 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6346 for as_dir in $PATH
6347 do
6348   IFS=$as_save_IFS
6349   test -z "$as_dir" && as_dir=.
6350     for ac_exec_ext in '' $ac_executable_extensions; do
6351   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6352     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6353     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6354     break 2
6355   fi
6356 done
6357   done
6358 IFS=$as_save_IFS
6359
6360 fi
6361 fi
6362 RANLIB=$ac_cv_prog_RANLIB
6363 if test -n "$RANLIB"; then
6364   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6365 $as_echo "$RANLIB" >&6; }
6366 else
6367   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6368 $as_echo "no" >&6; }
6369 fi
6370
6371
6372 fi
6373 if test -z "$ac_cv_prog_RANLIB"; then
6374   ac_ct_RANLIB=$RANLIB
6375   # Extract the first word of "ranlib", so it can be a program name with args.
6376 set dummy ranlib; ac_word=$2
6377 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6378 $as_echo_n "checking for $ac_word... " >&6; }
6379 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
6380   $as_echo_n "(cached) " >&6
6381 else
6382   if test -n "$ac_ct_RANLIB"; then
6383   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6384 else
6385 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6386 for as_dir in $PATH
6387 do
6388   IFS=$as_save_IFS
6389   test -z "$as_dir" && as_dir=.
6390     for ac_exec_ext in '' $ac_executable_extensions; do
6391   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6392     ac_cv_prog_ac_ct_RANLIB="ranlib"
6393     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6394     break 2
6395   fi
6396 done
6397   done
6398 IFS=$as_save_IFS
6399
6400 fi
6401 fi
6402 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6403 if test -n "$ac_ct_RANLIB"; then
6404   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6405 $as_echo "$ac_ct_RANLIB" >&6; }
6406 else
6407   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6408 $as_echo "no" >&6; }
6409 fi
6410
6411   if test "x$ac_ct_RANLIB" = x; then
6412     RANLIB=":"
6413   else
6414     case $cross_compiling:$ac_tool_warned in
6415 yes:)
6416 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6417 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6418 ac_tool_warned=yes ;;
6419 esac
6420     RANLIB=$ac_ct_RANLIB
6421   fi
6422 else
6423   RANLIB="$ac_cv_prog_RANLIB"
6424 fi
6425
6426
6427   if test -n "$ac_tool_prefix"; then
6428   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
6429 set dummy ${ac_tool_prefix}strip; ac_word=$2
6430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6431 $as_echo_n "checking for $ac_word... " >&6; }
6432 if ${ac_cv_prog_STRIP+:} false; then :
6433   $as_echo_n "(cached) " >&6
6434 else
6435   if test -n "$STRIP"; then
6436   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
6437 else
6438 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6439 for as_dir in $PATH
6440 do
6441   IFS=$as_save_IFS
6442   test -z "$as_dir" && as_dir=.
6443     for ac_exec_ext in '' $ac_executable_extensions; do
6444   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6445     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
6446     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6447     break 2
6448   fi
6449 done
6450   done
6451 IFS=$as_save_IFS
6452
6453 fi
6454 fi
6455 STRIP=$ac_cv_prog_STRIP
6456 if test -n "$STRIP"; then
6457   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
6458 $as_echo "$STRIP" >&6; }
6459 else
6460   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6461 $as_echo "no" >&6; }
6462 fi
6463
6464
6465 fi
6466 if test -z "$ac_cv_prog_STRIP"; then
6467   ac_ct_STRIP=$STRIP
6468   # Extract the first word of "strip", so it can be a program name with args.
6469 set dummy strip; ac_word=$2
6470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6471 $as_echo_n "checking for $ac_word... " >&6; }
6472 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
6473   $as_echo_n "(cached) " >&6
6474 else
6475   if test -n "$ac_ct_STRIP"; then
6476   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
6477 else
6478 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6479 for as_dir in $PATH
6480 do
6481   IFS=$as_save_IFS
6482   test -z "$as_dir" && as_dir=.
6483     for ac_exec_ext in '' $ac_executable_extensions; do
6484   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6485     ac_cv_prog_ac_ct_STRIP="strip"
6486     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6487     break 2
6488   fi
6489 done
6490   done
6491 IFS=$as_save_IFS
6492
6493 fi
6494 fi
6495 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
6496 if test -n "$ac_ct_STRIP"; then
6497   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
6498 $as_echo "$ac_ct_STRIP" >&6; }
6499 else
6500   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6501 $as_echo "no" >&6; }
6502 fi
6503
6504   if test "x$ac_ct_STRIP" = x; then
6505     STRIP=":"
6506   else
6507     case $cross_compiling:$ac_tool_warned in
6508 yes:)
6509 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6510 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6511 ac_tool_warned=yes ;;
6512 esac
6513     STRIP=$ac_ct_STRIP
6514   fi
6515 else
6516   STRIP="$ac_cv_prog_STRIP"
6517 fi
6518
6519
6520   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is possible to strip libraries" >&5
6521 $as_echo_n "checking whether it is possible to strip libraries... " >&6; }
6522   if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
6523     STRIP_STATIC_LIB="$STRIP -x"
6524     STRIP_SHARED_LIB="$STRIP --strip-unneeded"
6525     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6526 $as_echo "yes" >&6; }
6527   else
6528     case $host_os in
6529       darwin*)
6530         STRIP="$STRIP -x"
6531         STRIP_STATIC_LIB=$STRIP
6532         STRIP_SHARED_LIB=$STRIP
6533         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6534 $as_echo "yes" >&6; }
6535         ;;
6536       *)
6537         STRIP_STATIC_LIB=:
6538         STRIP_SHARED_LIB=:
6539         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6540 $as_echo "no" >&6; }
6541         ;;
6542     esac
6543   fi
6544
6545
6546
6547 if test -n "$ac_tool_prefix"; then
6548   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6549 set dummy ${ac_tool_prefix}ar; ac_word=$2
6550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6551 $as_echo_n "checking for $ac_word... " >&6; }
6552 if ${ac_cv_prog_AR+:} false; then :
6553   $as_echo_n "(cached) " >&6
6554 else
6555   if test -n "$AR"; then
6556   ac_cv_prog_AR="$AR" # Let the user override the test.
6557 else
6558 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6559 for as_dir in $PATH
6560 do
6561   IFS=$as_save_IFS
6562   test -z "$as_dir" && as_dir=.
6563     for ac_exec_ext in '' $ac_executable_extensions; do
6564   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6565     ac_cv_prog_AR="${ac_tool_prefix}ar"
6566     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6567     break 2
6568   fi
6569 done
6570   done
6571 IFS=$as_save_IFS
6572
6573 fi
6574 fi
6575 AR=$ac_cv_prog_AR
6576 if test -n "$AR"; then
6577   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6578 $as_echo "$AR" >&6; }
6579 else
6580   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6581 $as_echo "no" >&6; }
6582 fi
6583
6584
6585 fi
6586 if test -z "$ac_cv_prog_AR"; then
6587   ac_ct_AR=$AR
6588   # Extract the first word of "ar", so it can be a program name with args.
6589 set dummy ar; ac_word=$2
6590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6591 $as_echo_n "checking for $ac_word... " >&6; }
6592 if ${ac_cv_prog_ac_ct_AR+:} false; then :
6593   $as_echo_n "(cached) " >&6
6594 else
6595   if test -n "$ac_ct_AR"; then
6596   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6597 else
6598 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6599 for as_dir in $PATH
6600 do
6601   IFS=$as_save_IFS
6602   test -z "$as_dir" && as_dir=.
6603     for ac_exec_ext in '' $ac_executable_extensions; do
6604   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6605     ac_cv_prog_ac_ct_AR="ar"
6606     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6607     break 2
6608   fi
6609 done
6610   done
6611 IFS=$as_save_IFS
6612
6613 fi
6614 fi
6615 ac_ct_AR=$ac_cv_prog_ac_ct_AR
6616 if test -n "$ac_ct_AR"; then
6617   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6618 $as_echo "$ac_ct_AR" >&6; }
6619 else
6620   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6621 $as_echo "no" >&6; }
6622 fi
6623
6624   if test "x$ac_ct_AR" = x; then
6625     AR="ar"
6626   else
6627     case $cross_compiling:$ac_tool_warned in
6628 yes:)
6629 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6630 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6631 ac_tool_warned=yes ;;
6632 esac
6633     AR=$ac_ct_AR
6634   fi
6635 else
6636   AR="$ac_cv_prog_AR"
6637 fi
6638
6639 if test "$PORTNAME" = "win32"; then
6640   if test -n "$ac_tool_prefix"; then
6641   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
6642 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
6643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6644 $as_echo_n "checking for $ac_word... " >&6; }
6645 if ${ac_cv_prog_DLLTOOL+:} false; then :
6646   $as_echo_n "(cached) " >&6
6647 else
6648   if test -n "$DLLTOOL"; then
6649   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
6650 else
6651 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6652 for as_dir in $PATH
6653 do
6654   IFS=$as_save_IFS
6655   test -z "$as_dir" && as_dir=.
6656     for ac_exec_ext in '' $ac_executable_extensions; do
6657   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6658     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
6659     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6660     break 2
6661   fi
6662 done
6663   done
6664 IFS=$as_save_IFS
6665
6666 fi
6667 fi
6668 DLLTOOL=$ac_cv_prog_DLLTOOL
6669 if test -n "$DLLTOOL"; then
6670   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
6671 $as_echo "$DLLTOOL" >&6; }
6672 else
6673   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6674 $as_echo "no" >&6; }
6675 fi
6676
6677
6678 fi
6679 if test -z "$ac_cv_prog_DLLTOOL"; then
6680   ac_ct_DLLTOOL=$DLLTOOL
6681   # Extract the first word of "dlltool", so it can be a program name with args.
6682 set dummy dlltool; ac_word=$2
6683 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6684 $as_echo_n "checking for $ac_word... " >&6; }
6685 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
6686   $as_echo_n "(cached) " >&6
6687 else
6688   if test -n "$ac_ct_DLLTOOL"; then
6689   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
6690 else
6691 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6692 for as_dir in $PATH
6693 do
6694   IFS=$as_save_IFS
6695   test -z "$as_dir" && as_dir=.
6696     for ac_exec_ext in '' $ac_executable_extensions; do
6697   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6698     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
6699     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6700     break 2
6701   fi
6702 done
6703   done
6704 IFS=$as_save_IFS
6705
6706 fi
6707 fi
6708 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
6709 if test -n "$ac_ct_DLLTOOL"; then
6710   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
6711 $as_echo "$ac_ct_DLLTOOL" >&6; }
6712 else
6713   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6714 $as_echo "no" >&6; }
6715 fi
6716
6717   if test "x$ac_ct_DLLTOOL" = x; then
6718     DLLTOOL="dlltool"
6719   else
6720     case $cross_compiling:$ac_tool_warned in
6721 yes:)
6722 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6723 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6724 ac_tool_warned=yes ;;
6725 esac
6726     DLLTOOL=$ac_ct_DLLTOOL
6727   fi
6728 else
6729   DLLTOOL="$ac_cv_prog_DLLTOOL"
6730 fi
6731
6732   if test -n "$ac_tool_prefix"; then
6733   # Extract the first word of "${ac_tool_prefix}dllwrap", so it can be a program name with args.
6734 set dummy ${ac_tool_prefix}dllwrap; ac_word=$2
6735 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6736 $as_echo_n "checking for $ac_word... " >&6; }
6737 if ${ac_cv_prog_DLLWRAP+:} false; then :
6738   $as_echo_n "(cached) " >&6
6739 else
6740   if test -n "$DLLWRAP"; then
6741   ac_cv_prog_DLLWRAP="$DLLWRAP" # Let the user override the test.
6742 else
6743 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6744 for as_dir in $PATH
6745 do
6746   IFS=$as_save_IFS
6747   test -z "$as_dir" && as_dir=.
6748     for ac_exec_ext in '' $ac_executable_extensions; do
6749   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6750     ac_cv_prog_DLLWRAP="${ac_tool_prefix}dllwrap"
6751     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6752     break 2
6753   fi
6754 done
6755   done
6756 IFS=$as_save_IFS
6757
6758 fi
6759 fi
6760 DLLWRAP=$ac_cv_prog_DLLWRAP
6761 if test -n "$DLLWRAP"; then
6762   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLWRAP" >&5
6763 $as_echo "$DLLWRAP" >&6; }
6764 else
6765   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6766 $as_echo "no" >&6; }
6767 fi
6768
6769
6770 fi
6771 if test -z "$ac_cv_prog_DLLWRAP"; then
6772   ac_ct_DLLWRAP=$DLLWRAP
6773   # Extract the first word of "dllwrap", so it can be a program name with args.
6774 set dummy dllwrap; ac_word=$2
6775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6776 $as_echo_n "checking for $ac_word... " >&6; }
6777 if ${ac_cv_prog_ac_ct_DLLWRAP+:} false; then :
6778   $as_echo_n "(cached) " >&6
6779 else
6780   if test -n "$ac_ct_DLLWRAP"; then
6781   ac_cv_prog_ac_ct_DLLWRAP="$ac_ct_DLLWRAP" # Let the user override the test.
6782 else
6783 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6784 for as_dir in $PATH
6785 do
6786   IFS=$as_save_IFS
6787   test -z "$as_dir" && as_dir=.
6788     for ac_exec_ext in '' $ac_executable_extensions; do
6789   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6790     ac_cv_prog_ac_ct_DLLWRAP="dllwrap"
6791     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6792     break 2
6793   fi
6794 done
6795   done
6796 IFS=$as_save_IFS
6797
6798 fi
6799 fi
6800 ac_ct_DLLWRAP=$ac_cv_prog_ac_ct_DLLWRAP
6801 if test -n "$ac_ct_DLLWRAP"; then
6802   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLWRAP" >&5
6803 $as_echo "$ac_ct_DLLWRAP" >&6; }
6804 else
6805   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6806 $as_echo "no" >&6; }
6807 fi
6808
6809   if test "x$ac_ct_DLLWRAP" = x; then
6810     DLLWRAP="dllwrap"
6811   else
6812     case $cross_compiling:$ac_tool_warned in
6813 yes:)
6814 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6815 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6816 ac_tool_warned=yes ;;
6817 esac
6818     DLLWRAP=$ac_ct_DLLWRAP
6819   fi
6820 else
6821   DLLWRAP="$ac_cv_prog_DLLWRAP"
6822 fi
6823
6824   if test -n "$ac_tool_prefix"; then
6825   # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
6826 set dummy ${ac_tool_prefix}windres; ac_word=$2
6827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6828 $as_echo_n "checking for $ac_word... " >&6; }
6829 if ${ac_cv_prog_WINDRES+:} false; then :
6830   $as_echo_n "(cached) " >&6
6831 else
6832   if test -n "$WINDRES"; then
6833   ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
6834 else
6835 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6836 for as_dir in $PATH
6837 do
6838   IFS=$as_save_IFS
6839   test -z "$as_dir" && as_dir=.
6840     for ac_exec_ext in '' $ac_executable_extensions; do
6841   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6842     ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
6843     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6844     break 2
6845   fi
6846 done
6847   done
6848 IFS=$as_save_IFS
6849
6850 fi
6851 fi
6852 WINDRES=$ac_cv_prog_WINDRES
6853 if test -n "$WINDRES"; then
6854   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
6855 $as_echo "$WINDRES" >&6; }
6856 else
6857   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6858 $as_echo "no" >&6; }
6859 fi
6860
6861
6862 fi
6863 if test -z "$ac_cv_prog_WINDRES"; then
6864   ac_ct_WINDRES=$WINDRES
6865   # Extract the first word of "windres", so it can be a program name with args.
6866 set dummy windres; ac_word=$2
6867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6868 $as_echo_n "checking for $ac_word... " >&6; }
6869 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
6870   $as_echo_n "(cached) " >&6
6871 else
6872   if test -n "$ac_ct_WINDRES"; then
6873   ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
6874 else
6875 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6876 for as_dir in $PATH
6877 do
6878   IFS=$as_save_IFS
6879   test -z "$as_dir" && as_dir=.
6880     for ac_exec_ext in '' $ac_executable_extensions; do
6881   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6882     ac_cv_prog_ac_ct_WINDRES="windres"
6883     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6884     break 2
6885   fi
6886 done
6887   done
6888 IFS=$as_save_IFS
6889
6890 fi
6891 fi
6892 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
6893 if test -n "$ac_ct_WINDRES"; then
6894   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
6895 $as_echo "$ac_ct_WINDRES" >&6; }
6896 else
6897   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6898 $as_echo "no" >&6; }
6899 fi
6900
6901   if test "x$ac_ct_WINDRES" = x; then
6902     WINDRES="windres"
6903   else
6904     case $cross_compiling:$ac_tool_warned in
6905 yes:)
6906 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6907 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6908 ac_tool_warned=yes ;;
6909 esac
6910     WINDRES=$ac_ct_WINDRES
6911   fi
6912 else
6913   WINDRES="$ac_cv_prog_WINDRES"
6914 fi
6915
6916 fi
6917
6918 # Find a good install program.  We prefer a C program (faster),
6919 # so one script is as good as another.  But avoid the broken or
6920 # incompatible versions:
6921 # SysV /etc/install, /usr/sbin/install
6922 # SunOS /usr/etc/install
6923 # IRIX /sbin/install
6924 # AIX /bin/install
6925 # AmigaOS /C/install, which installs bootblocks on floppy discs
6926 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6927 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
6928 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6929 # OS/2's system install, which has a completely different semantic
6930 # ./install, which can be erroneously created by make from ./install.sh.
6931 # Reject install programs that cannot install multiple files.
6932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6933 $as_echo_n "checking for a BSD-compatible install... " >&6; }
6934 if test -z "$INSTALL"; then
6935 if ${ac_cv_path_install+:} false; then :
6936   $as_echo_n "(cached) " >&6
6937 else
6938   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6939 for as_dir in $PATH
6940 do
6941   IFS=$as_save_IFS
6942   test -z "$as_dir" && as_dir=.
6943     # Account for people who put trailing slashes in PATH elements.
6944 case $as_dir/ in #((
6945   ./ | .// | /[cC]/* | \
6946   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
6947   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
6948   /usr/ucb/* ) ;;
6949   *)
6950     # OSF1 and SCO ODT 3.0 have their own names for install.
6951     # Don't use installbsd from OSF since it installs stuff as root
6952     # by default.
6953     for ac_prog in ginstall scoinst install; do
6954       for ac_exec_ext in '' $ac_executable_extensions; do
6955         if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
6956           if test $ac_prog = install &&
6957             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6958             # AIX install.  It has an incompatible calling convention.
6959             :
6960           elif test $ac_prog = install &&
6961             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6962             # program-specific install script used by HP pwplus--don't use.
6963             :
6964           else
6965             rm -rf conftest.one conftest.two conftest.dir
6966             echo one > conftest.one
6967             echo two > conftest.two
6968             mkdir conftest.dir
6969             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6970               test -s conftest.one && test -s conftest.two &&
6971               test -s conftest.dir/conftest.one &&
6972               test -s conftest.dir/conftest.two
6973             then
6974               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6975               break 3
6976             fi
6977           fi
6978         fi
6979       done
6980     done
6981     ;;
6982 esac
6983
6984   done
6985 IFS=$as_save_IFS
6986
6987 rm -rf conftest.one conftest.two conftest.dir
6988
6989 fi
6990   if test "${ac_cv_path_install+set}" = set; then
6991     INSTALL=$ac_cv_path_install
6992   else
6993     # As a last resort, use the slow shell script.  Don't cache a
6994     # value for INSTALL within a source directory, because that will
6995     # break other packages using the cache if that directory is
6996     # removed, or if the value is a relative name.
6997     INSTALL=$ac_install_sh
6998   fi
6999 fi
7000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
7001 $as_echo "$INSTALL" >&6; }
7002
7003 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7004 # It thinks the first close brace ends the variable substitution.
7005 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7006
7007 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
7008
7009 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
7010
7011 # When Autoconf chooses install-sh as install program it tries to generate
7012 # a relative path to it in each makefile where it subsitutes it. This clashes
7013 # with our Makefile.global concept. This workaround helps.
7014 case $INSTALL in
7015   *install-sh*) install_bin='';;
7016   *) install_bin=$INSTALL;;
7017 esac
7018
7019
7020 # Extract the first word of "tar", so it can be a program name with args.
7021 set dummy tar; ac_word=$2
7022 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7023 $as_echo_n "checking for $ac_word... " >&6; }
7024 if ${ac_cv_path_TAR+:} false; then :
7025   $as_echo_n "(cached) " >&6
7026 else
7027   case $TAR in
7028   [\\/]* | ?:[\\/]*)
7029   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
7030   ;;
7031   *)
7032   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7033 for as_dir in $PATH
7034 do
7035   IFS=$as_save_IFS
7036   test -z "$as_dir" && as_dir=.
7037     for ac_exec_ext in '' $ac_executable_extensions; do
7038   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7039     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
7040     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7041     break 2
7042   fi
7043 done
7044   done
7045 IFS=$as_save_IFS
7046
7047   ;;
7048 esac
7049 fi
7050 TAR=$ac_cv_path_TAR
7051 if test -n "$TAR"; then
7052   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
7053 $as_echo "$TAR" >&6; }
7054 else
7055   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7056 $as_echo "no" >&6; }
7057 fi
7058
7059
7060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7061 $as_echo_n "checking whether ln -s works... " >&6; }
7062 LN_S=$as_ln_s
7063 if test "$LN_S" = "ln -s"; then
7064   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7065 $as_echo "yes" >&6; }
7066 else
7067   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7068 $as_echo "no, using $LN_S" >&6; }
7069 fi
7070
7071 for ac_prog in gawk mawk nawk awk
7072 do
7073   # Extract the first word of "$ac_prog", so it can be a program name with args.
7074 set dummy $ac_prog; ac_word=$2
7075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7076 $as_echo_n "checking for $ac_word... " >&6; }
7077 if ${ac_cv_prog_AWK+:} false; then :
7078   $as_echo_n "(cached) " >&6
7079 else
7080   if test -n "$AWK"; then
7081   ac_cv_prog_AWK="$AWK" # Let the user override the test.
7082 else
7083 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7084 for as_dir in $PATH
7085 do
7086   IFS=$as_save_IFS
7087   test -z "$as_dir" && as_dir=.
7088     for ac_exec_ext in '' $ac_executable_extensions; do
7089   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7090     ac_cv_prog_AWK="$ac_prog"
7091     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7092     break 2
7093   fi
7094 done
7095   done
7096 IFS=$as_save_IFS
7097
7098 fi
7099 fi
7100 AWK=$ac_cv_prog_AWK
7101 if test -n "$AWK"; then
7102   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7103 $as_echo "$AWK" >&6; }
7104 else
7105   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7106 $as_echo "no" >&6; }
7107 fi
7108
7109
7110   test -n "$AWK" && break
7111 done
7112
7113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
7114 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
7115 if test -z "$MKDIR_P"; then
7116   if ${ac_cv_path_mkdir+:} false; then :
7117   $as_echo_n "(cached) " >&6
7118 else
7119   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7120 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
7121 do
7122   IFS=$as_save_IFS
7123   test -z "$as_dir" && as_dir=.
7124     for ac_prog in mkdir gmkdir; do
7125          for ac_exec_ext in '' $ac_executable_extensions; do
7126            as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
7127            case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
7128              'mkdir (GNU coreutils) '* | \
7129              'mkdir (coreutils) '* | \
7130              'mkdir (fileutils) '4.1*)
7131                ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
7132                break 3;;
7133            esac
7134          done
7135        done
7136   done
7137 IFS=$as_save_IFS
7138
7139 fi
7140
7141   test -d ./--version && rmdir ./--version
7142   if test "${ac_cv_path_mkdir+set}" = set; then
7143     MKDIR_P="$ac_cv_path_mkdir -p"
7144   else
7145     # As a last resort, use the slow shell script.  Don't cache a
7146     # value for MKDIR_P within a source directory, because that will
7147     # break other packages using the cache if that directory is
7148     # removed, or if the value is a relative name.
7149     MKDIR_P="$ac_install_sh -d"
7150   fi
7151 fi
7152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
7153 $as_echo "$MKDIR_P" >&6; }
7154
7155 # When Autoconf chooses install-sh as mkdir -p program it tries to generate
7156 # a relative path to it in each makefile where it subsitutes it. This clashes
7157 # with our Makefile.global concept. This workaround helps.
7158 case $MKDIR_P in
7159   *install-sh*) MKDIR_P='\${SHELL} \${top_srcdir}/config/install-sh -c -d';;
7160 esac
7161
7162 # Let the user override the search
7163 if test -z "$BISON"; then
7164   for ac_prog in bison
7165 do
7166   # Extract the first word of "$ac_prog", so it can be a program name with args.
7167 set dummy $ac_prog; ac_word=$2
7168 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7169 $as_echo_n "checking for $ac_word... " >&6; }
7170 if ${ac_cv_path_BISON+:} false; then :
7171   $as_echo_n "(cached) " >&6
7172 else
7173   case $BISON in
7174   [\\/]* | ?:[\\/]*)
7175   ac_cv_path_BISON="$BISON" # Let the user override the test with a path.
7176   ;;
7177   *)
7178   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7179 for as_dir in $PATH
7180 do
7181   IFS=$as_save_IFS
7182   test -z "$as_dir" && as_dir=.
7183     for ac_exec_ext in '' $ac_executable_extensions; do
7184   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7185     ac_cv_path_BISON="$as_dir/$ac_word$ac_exec_ext"
7186     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7187     break 2
7188   fi
7189 done
7190   done
7191 IFS=$as_save_IFS
7192
7193   ;;
7194 esac
7195 fi
7196 BISON=$ac_cv_path_BISON
7197 if test -n "$BISON"; then
7198   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
7199 $as_echo "$BISON" >&6; }
7200 else
7201   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7202 $as_echo "no" >&6; }
7203 fi
7204
7205
7206   test -n "$BISON" && break
7207 done
7208
7209 fi
7210
7211 if test "$BISON"; then
7212   pgac_bison_version=`$BISON --version 2>/dev/null | sed q`
7213   { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_bison_version" >&5
7214 $as_echo "$as_me: using $pgac_bison_version" >&6;}
7215   if echo "$pgac_bison_version" | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'
7216   then
7217     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7218 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
7219 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&5
7220 $as_echo "$as_me: WARNING:
7221 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
7222 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&2;}
7223     BISON=""
7224   fi
7225   # Bison >=3.0 issues warnings about %name-prefix="base_yy", instead
7226   # of the now preferred %name-prefix "base_yy", but the latter
7227   # doesn't work with Bison 2.3 or less.  So for now we silence the
7228   # deprecation warnings.
7229   if echo "$pgac_bison_version" | $AWK '{ if ($4 >= 3) exit 0; else exit 1;}'
7230   then
7231     BISONFLAGS="$BISONFLAGS -Wno-deprecated"
7232   fi
7233 fi
7234
7235 if test -z "$BISON"; then
7236   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7237 *** Without Bison you will not be able to build PostgreSQL from Git nor
7238 *** change any of the parser definition files.  You can obtain Bison from
7239 *** a GNU mirror site.  (If you are using the official distribution of
7240 *** PostgreSQL then you do not need to worry about this, because the Bison
7241 *** output is pre-generated.)" >&5
7242 $as_echo "$as_me: WARNING:
7243 *** Without Bison you will not be able to build PostgreSQL from Git nor
7244 *** change any of the parser definition files.  You can obtain Bison from
7245 *** a GNU mirror site.  (If you are using the official distribution of
7246 *** PostgreSQL then you do not need to worry about this, because the Bison
7247 *** output is pre-generated.)" >&2;}
7248 fi
7249 # We don't need AC_SUBST(BISON) because AC_PATH_PROG did it
7250
7251
7252 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flex" >&5
7253 $as_echo_n "checking for flex... " >&6; }
7254 if ${pgac_cv_path_flex+:} false; then :
7255   $as_echo_n "(cached) " >&6
7256 else
7257   # Let the user override the test
7258 if test -n "$FLEX"; then
7259   pgac_cv_path_flex=$FLEX
7260 else
7261   pgac_save_IFS=$IFS
7262   IFS=$PATH_SEPARATOR
7263   for pgac_dir in $PATH; do
7264     IFS=$pgac_save_IFS
7265     if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
7266       pgac_dir=`pwd`
7267     fi
7268     for pgac_prog in flex lex; do
7269       pgac_candidate="$pgac_dir/$pgac_prog"
7270       if test -f "$pgac_candidate" \
7271         && $pgac_candidate --version </dev/null >/dev/null 2>&1
7272       then
7273         echo '%%'  > conftest.l
7274         if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
7275           pgac_flex_version=`$pgac_candidate --version 2>/dev/null`
7276           if echo "$pgac_flex_version" | sed 's/[.a-z]/ /g' | $AWK '{ if ($1 = 2 && $2 = 5 && $3 >= 31) exit 0; else exit 1;}'
7277           then
7278             pgac_cv_path_flex=$pgac_candidate
7279             break 2
7280           else
7281             { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7282 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
7283 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&5
7284 $as_echo "$as_me: WARNING:
7285 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
7286 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&2;}
7287           fi
7288         fi
7289       fi
7290     done
7291   done
7292   rm -f conftest.l lex.yy.c
7293   : ${pgac_cv_path_flex=no}
7294 fi
7295
7296 fi
7297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_path_flex" >&5
7298 $as_echo "$pgac_cv_path_flex" >&6; }
7299 if test x"$pgac_cv_path_flex" = x"no"; then
7300   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7301 *** Without Flex you will not be able to build PostgreSQL from Git nor
7302 *** change any of the scanner definition files.  You can obtain Flex from
7303 *** a GNU mirror site.  (If you are using the official distribution of
7304 *** PostgreSQL then you do not need to worry about this because the Flex
7305 *** output is pre-generated.)" >&5
7306 $as_echo "$as_me: WARNING:
7307 *** Without Flex you will not be able to build PostgreSQL from Git nor
7308 *** change any of the scanner definition files.  You can obtain Flex from
7309 *** a GNU mirror site.  (If you are using the official distribution of
7310 *** PostgreSQL then you do not need to worry about this because the Flex
7311 *** output is pre-generated.)" >&2;}
7312
7313   FLEX=
7314 else
7315   FLEX=$pgac_cv_path_flex
7316   pgac_flex_version=`$FLEX --version 2>/dev/null`
7317   { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_flex_version" >&5
7318 $as_echo "$as_me: using $pgac_flex_version" >&6;}
7319 fi
7320
7321
7322
7323
7324
7325 # Let the user override the search
7326 if test -z "$PERL"; then
7327   # Extract the first word of "perl", so it can be a program name with args.
7328 set dummy perl; ac_word=$2
7329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7330 $as_echo_n "checking for $ac_word... " >&6; }
7331 if ${ac_cv_path_PERL+:} false; then :
7332   $as_echo_n "(cached) " >&6
7333 else
7334   case $PERL in
7335   [\\/]* | ?:[\\/]*)
7336   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
7337   ;;
7338   *)
7339   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7340 for as_dir in $PATH
7341 do
7342   IFS=$as_save_IFS
7343   test -z "$as_dir" && as_dir=.
7344     for ac_exec_ext in '' $ac_executable_extensions; do
7345   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7346     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
7347     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7348     break 2
7349   fi
7350 done
7351   done
7352 IFS=$as_save_IFS
7353
7354   ;;
7355 esac
7356 fi
7357 PERL=$ac_cv_path_PERL
7358 if test -n "$PERL"; then
7359   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
7360 $as_echo "$PERL" >&6; }
7361 else
7362   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7363 $as_echo "no" >&6; }
7364 fi
7365
7366
7367 fi
7368
7369 if test "$PERL"; then
7370   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'`
7371   { $as_echo "$as_me:${as_lineno-$LINENO}: using perl $pgac_perl_version" >&5
7372 $as_echo "$as_me: using perl $pgac_perl_version" >&6;}
7373   if echo "$pgac_perl_version" | sed 's/[.a-z_]/ /g' | \
7374     $AWK '{ if ($1 = 5 && $2 >= 8) exit 1; else exit 0;}'
7375   then
7376     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7377 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
7378 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&5
7379 $as_echo "$as_me: WARNING:
7380 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
7381 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&2;}
7382     PERL=""
7383   fi
7384 fi
7385
7386 if test -z "$PERL"; then
7387   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7388 *** Without Perl you will not be able to build PostgreSQL from Git.
7389 *** You can obtain Perl from any CPAN mirror site.
7390 *** (If you are using the official distribution of PostgreSQL then you do not
7391 *** need to worry about this, because the Perl output is pre-generated.)" >&5
7392 $as_echo "$as_me: WARNING:
7393 *** Without Perl you will not be able to build PostgreSQL from Git.
7394 *** You can obtain Perl from any CPAN mirror site.
7395 *** (If you are using the official distribution of PostgreSQL then you do not
7396 *** need to worry about this, because the Perl output is pre-generated.)" >&2;}
7397 fi
7398
7399 if test "$with_perl" = yes; then
7400   if test -z "$PERL"; then
7401     as_fn_error $? "Perl not found" "$LINENO" 5
7402   fi
7403
7404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl archlibexp" >&5
7405 $as_echo_n "checking for Perl archlibexp... " >&6; }
7406 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
7407 test "$PORTNAME" = "win32" && perl_archlibexp=`echo $perl_archlibexp | sed 's,\\\\,/,g'`
7408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_archlibexp" >&5
7409 $as_echo "$perl_archlibexp" >&6; }
7410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl privlibexp" >&5
7411 $as_echo_n "checking for Perl privlibexp... " >&6; }
7412 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
7413 test "$PORTNAME" = "win32" && perl_privlibexp=`echo $perl_privlibexp | sed 's,\\\\,/,g'`
7414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_privlibexp" >&5
7415 $as_echo "$perl_privlibexp" >&6; }
7416 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl useshrplib" >&5
7417 $as_echo_n "checking for Perl useshrplib... " >&6; }
7418 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
7419 test "$PORTNAME" = "win32" && perl_useshrplib=`echo $perl_useshrplib | sed 's,\\\\,/,g'`
7420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_useshrplib" >&5
7421 $as_echo "$perl_useshrplib" >&6; }
7422   if test "$perl_useshrplib" != yes && test "$perl_useshrplib" != true; then
7423     as_fn_error $? "cannot build PL/Perl because libperl is not a shared library
7424 You might have to rebuild your Perl installation.  Refer to the
7425 documentation for details.  Use --without-perl to disable building
7426 PL/Perl." "$LINENO" 5
7427   fi
7428
7429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flags to link embedded Perl" >&5
7430 $as_echo_n "checking for flags to link embedded Perl... " >&6; }
7431 if test "$PORTNAME" = "win32" ; then
7432 perl_lib=`basename $perl_archlibexp/CORE/perl[5-9]*.lib .lib`
7433 test -e "$perl_archlibexp/CORE/$perl_lib.lib" && perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
7434 else
7435 pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
7436 pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
7437 perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%" -e "s/ -arch [-a-zA-Z0-9_]*//g"`
7438 fi
7439 if test -z "$perl_embed_ldflags" ; then
7440         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7441 $as_echo "no" >&6; }
7442         as_fn_error $? "could not determine flags for linking embedded Perl.
7443 This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not
7444 installed." "$LINENO" 5
7445 else
7446         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ldflags" >&5
7447 $as_echo "$perl_embed_ldflags" >&6; }
7448 fi
7449
7450 fi
7451
7452 if test "$with_python" = yes; then
7453   # Extract the first word of "python", so it can be a program name with args.
7454 set dummy python; ac_word=$2
7455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7456 $as_echo_n "checking for $ac_word... " >&6; }
7457 if ${ac_cv_path_PYTHON+:} false; then :
7458   $as_echo_n "(cached) " >&6
7459 else
7460   case $PYTHON in
7461   [\\/]* | ?:[\\/]*)
7462   ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
7463   ;;
7464   *)
7465   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7466 for as_dir in $PATH
7467 do
7468   IFS=$as_save_IFS
7469   test -z "$as_dir" && as_dir=.
7470     for ac_exec_ext in '' $ac_executable_extensions; do
7471   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7472     ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
7473     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7474     break 2
7475   fi
7476 done
7477   done
7478 IFS=$as_save_IFS
7479
7480   ;;
7481 esac
7482 fi
7483 PYTHON=$ac_cv_path_PYTHON
7484 if test -n "$PYTHON"; then
7485   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
7486 $as_echo "$PYTHON" >&6; }
7487 else
7488   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7489 $as_echo "no" >&6; }
7490 fi
7491
7492
7493 if test x"$PYTHON" = x""; then
7494   as_fn_error $? "Python not found" "$LINENO" 5
7495 fi
7496
7497
7498 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python distutils module" >&5
7499 $as_echo_n "checking for Python distutils module... " >&6; }
7500 if "${PYTHON}" -c 'import distutils' 2>&5
7501 then
7502     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7503 $as_echo "yes" >&6; }
7504 else
7505     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7506 $as_echo "no" >&6; }
7507     as_fn_error $? "distutils module not found" "$LINENO" 5
7508 fi
7509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python configuration directory" >&5
7510 $as_echo_n "checking Python configuration directory... " >&6; }
7511 python_majorversion=`${PYTHON} -c "import sys; print(sys.version[0])"`
7512 python_version=`${PYTHON} -c "import sys; print(sys.version[:3])"`
7513 python_configdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBPL'))))"`
7514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_configdir" >&5
7515 $as_echo "$python_configdir" >&6; }
7516
7517 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python include directories" >&5
7518 $as_echo_n "checking Python include directories... " >&6; }
7519 python_includespec=`${PYTHON} -c "
7520 import distutils.sysconfig
7521 a = '-I' + distutils.sysconfig.get_python_inc(False)
7522 b = '-I' + distutils.sysconfig.get_python_inc(True)
7523 if a == b:
7524     print(a)
7525 else:
7526     print(a + ' ' + b)"`
7527 if test "$PORTNAME" = win32 ; then
7528     python_includespec=`echo $python_includespec | sed 's,[\],/,g'`
7529 fi
7530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_includespec" >&5
7531 $as_echo "$python_includespec" >&6; }
7532
7533
7534
7535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link an embedded Python application" >&5
7536 $as_echo_n "checking how to link an embedded Python application... " >&6; }
7537
7538 python_libdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBDIR'))))"`
7539 python_ldlibrary=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDLIBRARY'))))"`
7540 python_so=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('SO'))))"`
7541 ldlibrary=`echo "${python_ldlibrary}" | sed "s/${python_so}$//"`
7542 python_enable_shared=`${PYTHON} -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_vars().get('Py_ENABLE_SHARED',0))"`
7543
7544 if test x"${python_libdir}" != x"" -a x"${python_ldlibrary}" != x"" -a x"${python_ldlibrary}" != x"${ldlibrary}"
7545 then
7546         # New way: use the official shared library
7547         ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
7548         python_libspec="-L${python_libdir} -l${ldlibrary}"
7549 else
7550         # Old way: use libpython from python_configdir
7551         python_libdir="${python_configdir}"
7552         # LDVERSION was introduced in Python 3.2.
7553         python_ldversion=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDVERSION'))))"`
7554         if test x"${python_ldversion}" = x""; then
7555                 python_ldversion=$python_version
7556         fi
7557         python_libspec="-L${python_libdir} -lpython${python_ldversion}"
7558 fi
7559
7560 python_additional_libs=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBS','LIBC','LIBM','BASEMODLIBS'))))"`
7561
7562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_libspec} ${python_additional_libs}" >&5
7563 $as_echo "${python_libspec} ${python_additional_libs}" >&6; }
7564
7565
7566
7567
7568   # We need libpython as a shared library.  With Python >=2.5, we
7569   # check the Py_ENABLE_SHARED setting.  On Debian, the setting is not
7570   # correct before the jessie release (http://bugs.debian.org/695979).
7571   # We also want to support older Python versions.  So as a fallback
7572   # we see if there is a file that is named like a shared library.
7573
7574   if test "$python_enable_shared" != 1; then
7575     if test "$PORTNAME" = darwin; then
7576       # OS X does supply a .dylib even though Py_ENABLE_SHARED does
7577       # not get set.  The file detection logic below doesn't succeed
7578       # on older OS X versions, so make it explicit.
7579       python_enable_shared=1
7580     elif test "$PORTNAME" = win32; then
7581       # Windows also needs an explicit override.
7582       python_enable_shared=1
7583     else
7584       # We don't know the platform shared library extension here yet,
7585       # so we try some candidates.
7586       for dlsuffix in .so .sl; do
7587         if ls "$python_libdir"/libpython*${dlsuffix}* >/dev/null 2>&1; then
7588           python_enable_shared=1
7589           break
7590         fi
7591       done
7592     fi
7593   fi
7594
7595   if test "$python_enable_shared" != 1; then
7596     as_fn_error $? "cannot build PL/Python because libpython is not a shared library
7597 You might have to rebuild your Python installation.  Refer to the
7598 documentation for details.  Use --without-python to disable building
7599 PL/Python." "$LINENO" 5
7600   fi
7601 fi
7602
7603 if test "$cross_compiling" = yes && test -z "$with_system_tzdata"; then
7604   # Extract the first word of "zic", so it can be a program name with args.
7605 set dummy zic; ac_word=$2
7606 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7607 $as_echo_n "checking for $ac_word... " >&6; }
7608 if ${ac_cv_path_ZIC+:} false; then :
7609   $as_echo_n "(cached) " >&6
7610 else
7611   case $ZIC in
7612   [\\/]* | ?:[\\/]*)
7613   ac_cv_path_ZIC="$ZIC" # Let the user override the test with a path.
7614   ;;
7615   *)
7616   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7617 for as_dir in $PATH
7618 do
7619   IFS=$as_save_IFS
7620   test -z "$as_dir" && as_dir=.
7621     for ac_exec_ext in '' $ac_executable_extensions; do
7622   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7623     ac_cv_path_ZIC="$as_dir/$ac_word$ac_exec_ext"
7624     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7625     break 2
7626   fi
7627 done
7628   done
7629 IFS=$as_save_IFS
7630
7631   ;;
7632 esac
7633 fi
7634 ZIC=$ac_cv_path_ZIC
7635 if test -n "$ZIC"; then
7636   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
7637 $as_echo "$ZIC" >&6; }
7638 else
7639   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7640 $as_echo "no" >&6; }
7641 fi
7642
7643
7644   if test -z "$ZIC"; then
7645     as_fn_error $? "
7646 When cross-compiling, either use the option --with-system-tzdata to use
7647 existing time-zone data, or set the environment variable ZIC to a zic
7648 program to use during the build." "$LINENO" 5
7649   fi
7650 fi
7651
7652 #
7653 # Pthreads
7654 #
7655 # For each platform, we need to know about any special compile and link
7656 # libraries, and whether the normal C function names are thread-safe.
7657 # See the comment at the top of src/port/thread.c for more information.
7658 # WIN32 doesn't need the pthread tests;  it always uses threads
7659 #
7660 # These tests are run before the library-tests, because linking with the
7661 # other libraries can pull in the pthread functions as a side-effect.  We
7662 # want to use the -pthread or similar flags directly, and not rely on
7663 # the side-effects of linking with some other library.
7664 #
7665 # note: We have to use AS_IF here rather than plain if. The AC_CHECK_HEADER
7666 # invocation below is the first one in the script, and autoconf generates
7667 # additional code for that, which must not be inside the if-block. AS_IF
7668 # knows how to do that.
7669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7670 $as_echo_n "checking for ANSI C header files... " >&6; }
7671 if ${ac_cv_header_stdc+:} false; then :
7672   $as_echo_n "(cached) " >&6
7673 else
7674   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7675 /* end confdefs.h.  */
7676 #include <stdlib.h>
7677 #include <stdarg.h>
7678 #include <string.h>
7679 #include <float.h>
7680
7681 int
7682 main ()
7683 {
7684
7685   ;
7686   return 0;
7687 }
7688 _ACEOF
7689 if ac_fn_c_try_compile "$LINENO"; then :
7690   ac_cv_header_stdc=yes
7691 else
7692   ac_cv_header_stdc=no
7693 fi
7694 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7695
7696 if test $ac_cv_header_stdc = yes; then
7697   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
7698   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7699 /* end confdefs.h.  */
7700 #include <string.h>
7701
7702 _ACEOF
7703 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7704   $EGREP "memchr" >/dev/null 2>&1; then :
7705
7706 else
7707   ac_cv_header_stdc=no
7708 fi
7709 rm -f conftest*
7710
7711 fi
7712
7713 if test $ac_cv_header_stdc = yes; then
7714   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
7715   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7716 /* end confdefs.h.  */
7717 #include <stdlib.h>
7718
7719 _ACEOF
7720 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7721   $EGREP "free" >/dev/null 2>&1; then :
7722
7723 else
7724   ac_cv_header_stdc=no
7725 fi
7726 rm -f conftest*
7727
7728 fi
7729
7730 if test $ac_cv_header_stdc = yes; then
7731   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
7732   if test "$cross_compiling" = yes; then :
7733   :
7734 else
7735   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7736 /* end confdefs.h.  */
7737 #include <ctype.h>
7738 #include <stdlib.h>
7739 #if ((' ' & 0x0FF) == 0x020)
7740 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7741 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7742 #else
7743 # define ISLOWER(c) \
7744                    (('a' <= (c) && (c) <= 'i') \
7745                      || ('j' <= (c) && (c) <= 'r') \
7746                      || ('s' <= (c) && (c) <= 'z'))
7747 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7748 #endif
7749
7750 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7751 int
7752 main ()
7753 {
7754   int i;
7755   for (i = 0; i < 256; i++)
7756     if (XOR (islower (i), ISLOWER (i))
7757         || toupper (i) != TOUPPER (i))
7758       return 2;
7759   return 0;
7760 }
7761 _ACEOF
7762 if ac_fn_c_try_run "$LINENO"; then :
7763
7764 else
7765   ac_cv_header_stdc=no
7766 fi
7767 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7768   conftest.$ac_objext conftest.beam conftest.$ac_ext
7769 fi
7770
7771 fi
7772 fi
7773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7774 $as_echo "$ac_cv_header_stdc" >&6; }
7775 if test $ac_cv_header_stdc = yes; then
7776
7777 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
7778
7779 fi
7780
7781 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
7782 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
7783                   inttypes.h stdint.h unistd.h
7784 do :
7785   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7786 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
7787 "
7788 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7789   cat >>confdefs.h <<_ACEOF
7790 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7791 _ACEOF
7792
7793 fi
7794
7795 done
7796
7797
7798 if test "$enable_thread_safety" = yes -a "$PORTNAME" != "win32"; then :
7799    # then
7800
7801
7802
7803 ac_ext=c
7804 ac_cpp='$CPP $CPPFLAGS'
7805 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7806 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7807 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7808
7809 ax_pthread_ok=no
7810
7811 # We used to check for pthread.h first, but this fails if pthread.h
7812 # requires special compiler flags (e.g. on Tru64 or Sequent).
7813 # It gets checked for in the link test anyway.
7814
7815 # First of all, check if the user has set any of the PTHREAD_LIBS,
7816 # etcetera environment variables, and if threads linking works using
7817 # them:
7818 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
7819         save_CFLAGS="$CFLAGS"
7820         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
7821         save_LIBS="$LIBS"
7822         LIBS="$PTHREAD_LIBS $LIBS"
7823         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
7824 $as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
7825         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7826 /* end confdefs.h.  */
7827
7828 /* Override any GCC internal prototype to avoid an error.
7829    Use char because int might match the return type of a GCC
7830    builtin and then its argument prototype would still apply.  */
7831 #ifdef __cplusplus
7832 extern "C"
7833 #endif
7834 char pthread_join ();
7835 int
7836 main ()
7837 {
7838 return pthread_join ();
7839   ;
7840   return 0;
7841 }
7842 _ACEOF
7843 if ac_fn_c_try_link "$LINENO"; then :
7844   ax_pthread_ok=yes
7845 fi
7846 rm -f core conftest.err conftest.$ac_objext \
7847     conftest$ac_exeext conftest.$ac_ext
7848         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
7849 $as_echo "$ax_pthread_ok" >&6; }
7850         if test x"$ax_pthread_ok" = xno; then
7851                 PTHREAD_LIBS=""
7852                 PTHREAD_CFLAGS=""
7853         fi
7854         LIBS="$save_LIBS"
7855         CFLAGS="$save_CFLAGS"
7856 fi
7857
7858 # We must check for the threads library under a number of different
7859 # names; the ordering is very important because some systems
7860 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
7861 # libraries is broken (non-POSIX).
7862
7863 # Create a list of thread flags to try.  Items starting with a "-" are
7864 # C compiler flags, and other items are library names, except for "none"
7865 # which indicates that we try without any flags at all, and "pthread-config"
7866 # which is a program returning the flags for the Pth emulation library.
7867
7868 ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mt -mthreads pthread --thread-safe pthread-config"
7869
7870 # The ordering *is* (sometimes) important.  Some notes on the
7871 # individual items follow:
7872
7873 # pthreads: AIX (must check this before -lpthread)
7874 # none: in case threads are in libc; should be tried before -Kthread and
7875 #       other compiler flags to prevent continual compiler warnings
7876 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
7877 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
7878 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
7879 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
7880 # -pthreads: Solaris/gcc
7881 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
7882 #      doesn't hurt to check since this sometimes defines pthreads and
7883 #      -D_REENTRANT too), HP C (must be checked before -lpthread, which
7884 #      is present but should not be used directly)
7885 # -mthreads: Mingw32/gcc, Lynx/gcc
7886 # pthread: Linux, etcetera
7887 # --thread-safe: KAI C++
7888 # pthread-config: use pthread-config program (for GNU Pth library)
7889
7890 case $host_os in
7891
7892         hpux*)
7893
7894         # From the cc(1) man page: "[-mt] Sets various -D flags to enable
7895         # multi-threading and also sets -lpthread."
7896
7897         ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
7898         ;;
7899
7900         openedition*)
7901
7902         # IBM z/OS requires a feature-test macro to be defined in order to
7903         # enable POSIX threads at all, so give the user a hint if this is
7904         # not set. (We don't define these ourselves, as they can affect
7905         # other portions of the system API in unpredictable ways.)
7906
7907         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7908 /* end confdefs.h.  */
7909
7910 #            if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
7911              AX_PTHREAD_ZOS_MISSING
7912 #            endif
7913
7914 _ACEOF
7915 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7916   $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
7917   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
7918 $as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
7919 fi
7920 rm -f conftest*
7921
7922         ;;
7923
7924         solaris*)
7925
7926         # Newer versions of Solaris require the "-mt -lpthread" pair, and we
7927         # check that first.  On some older versions, libc contains stubbed
7928         # (non-functional) versions of the pthreads routines, so link-based
7929         # tests will erroneously succeed.  (We need to link with -pthreads/-mt/
7930         # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
7931         # a function called by this macro, so we could check for that, but
7932         # who knows whether they'll stub that too in a future libc.)  So
7933         # we'll look for -pthreads and -lpthread shortly thereafter.
7934
7935         ax_pthread_flags="-mt,pthread -pthreads -pthread pthread $ax_pthread_flags"
7936         ;;
7937 esac
7938
7939 # Older versions of Clang only give a warning instead of an error for an
7940 # unrecognized option, unless we specify -Werror. (We throw in some extra
7941 # Clang warning flags for good measure.)
7942
7943 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler needs certain flags to reject unknown flags" >&5
7944 $as_echo_n "checking if compiler needs certain flags to reject unknown flags... " >&6; }
7945 if ${ax_cv_PTHREAD_REJECT_UNKNOWN+:} false; then :
7946   $as_echo_n "(cached) " >&6
7947 else
7948   ax_cv_PTHREAD_REJECT_UNKNOWN=unknown
7949      save_CFLAGS="$CFLAGS"
7950      ax_pthread_extra_flags="-Wunknown-warning-option -Wunused-command-line-argument"
7951      CFLAGS="$CFLAGS $ax_pthread_extra_flags -Wfoobaz -foobaz"
7952      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7953 /* end confdefs.h.  */
7954 int foo(void);
7955 int
7956 main ()
7957 {
7958 foo()
7959   ;
7960   return 0;
7961 }
7962 _ACEOF
7963 if ac_fn_c_try_compile "$LINENO"; then :
7964   ax_cv_PTHREAD_REJECT_UNKNOWN="-Werror $ax_pthread_extra_flags"
7965 else
7966   ax_cv_PTHREAD_REJECT_UNKNOWN=no
7967 fi
7968 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7969      CFLAGS="$save_CFLAGS"
7970
7971 fi
7972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_REJECT_UNKNOWN" >&5
7973 $as_echo "$ax_cv_PTHREAD_REJECT_UNKNOWN" >&6; }
7974 ax_pthread_extra_flags=
7975 if test "x$ax_cv_PTHREAD_REJECT_UNKNOWN" != "xno"; then :
7976   ax_pthread_extra_flags="$ax_cv_PTHREAD_REJECT_UNKNOWN"
7977 fi
7978
7979 if test x"$ax_pthread_ok" = xno; then
7980 for flag in $ax_pthread_flags; do
7981
7982         case $flag in
7983                 none)
7984                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
7985 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
7986                 ;;
7987
7988                 -mt,pthread)
7989                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
7990 $as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
7991                 PTHREAD_CFLAGS="-mt"
7992                 PTHREAD_LIBS="-lpthread"
7993                 ;;
7994
7995                 -*)
7996                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5
7997 $as_echo_n "checking whether pthreads work with $flag... " >&6; }
7998                 PTHREAD_CFLAGS="$flag"
7999                 ;;
8000
8001                 pthread-config)
8002                 # Extract the first word of "pthread-config", so it can be a program name with args.
8003 set dummy pthread-config; ac_word=$2
8004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8005 $as_echo_n "checking for $ac_word... " >&6; }
8006 if ${ac_cv_prog_ax_pthread_config+:} false; then :
8007   $as_echo_n "(cached) " >&6
8008 else
8009   if test -n "$ax_pthread_config"; then
8010   ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
8011 else
8012 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8013 for as_dir in $PATH
8014 do
8015   IFS=$as_save_IFS
8016   test -z "$as_dir" && as_dir=.
8017     for ac_exec_ext in '' $ac_executable_extensions; do
8018   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8019     ac_cv_prog_ax_pthread_config="yes"
8020     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8021     break 2
8022   fi
8023 done
8024   done
8025 IFS=$as_save_IFS
8026
8027   test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
8028 fi
8029 fi
8030 ax_pthread_config=$ac_cv_prog_ax_pthread_config
8031 if test -n "$ax_pthread_config"; then
8032   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
8033 $as_echo "$ax_pthread_config" >&6; }
8034 else
8035   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8036 $as_echo "no" >&6; }
8037 fi
8038
8039
8040                 if test x"$ax_pthread_config" = xno; then continue; fi
8041                 PTHREAD_CFLAGS="`pthread-config --cflags`"
8042                 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
8043                 ;;
8044
8045                 *)
8046                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5
8047 $as_echo_n "checking for the pthreads library -l$flag... " >&6; }
8048                 PTHREAD_LIBS="-l$flag"
8049                 ;;
8050         esac
8051
8052         save_LIBS="$LIBS"
8053         save_CFLAGS="$CFLAGS"
8054         LIBS="$PTHREAD_LIBS $LIBS"
8055         CFLAGS="$CFLAGS $PTHREAD_CFLAGS $ax_pthread_extra_flags"
8056
8057         # Check for various functions.  We must include pthread.h,
8058         # since some functions may be macros.  (On the Sequent, we
8059         # need a special flag -Kthread to make this header compile.)
8060         # We check for pthread_join because it is in -lpthread on IRIX
8061         # while pthread_create is in libc.  We check for pthread_attr_init
8062         # due to DEC craziness with -lpthreads.  We check for
8063         # pthread_cleanup_push because it is one of the few pthread
8064         # functions on Solaris that doesn't have a non-functional libc stub.
8065         # We try pthread_create on general principles.
8066         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8067 /* end confdefs.h.  */
8068 #include <pthread.h>
8069                         static void routine(void *a) { a = 0; }
8070                         static void *start_routine(void *a) { return a; }
8071 int
8072 main ()
8073 {
8074 pthread_t th; pthread_attr_t attr;
8075                         pthread_create(&th, 0, start_routine, 0);
8076                         pthread_join(th, 0);
8077                         pthread_attr_init(&attr);
8078                         pthread_cleanup_push(routine, 0);
8079                         pthread_cleanup_pop(0) /* ; */
8080   ;
8081   return 0;
8082 }
8083 _ACEOF
8084 if ac_fn_c_try_link "$LINENO"; then :
8085   ax_pthread_ok=yes
8086 fi
8087 rm -f core conftest.err conftest.$ac_objext \
8088     conftest$ac_exeext conftest.$ac_ext
8089
8090         LIBS="$save_LIBS"
8091         CFLAGS="$save_CFLAGS"
8092
8093         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
8094 $as_echo "$ax_pthread_ok" >&6; }
8095         if test "x$ax_pthread_ok" = xyes; then
8096                 break;
8097         fi
8098
8099         PTHREAD_LIBS=""
8100         PTHREAD_CFLAGS=""
8101 done
8102 fi
8103
8104 # Various other checks:
8105 if test "x$ax_pthread_ok" = xyes; then
8106         save_LIBS="$LIBS"
8107         LIBS="$PTHREAD_LIBS $LIBS"
8108         save_CFLAGS="$CFLAGS"
8109         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
8110
8111         # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
8112         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
8113 $as_echo_n "checking for joinable pthread attribute... " >&6; }
8114 if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
8115   $as_echo_n "(cached) " >&6
8116 else
8117   ax_cv_PTHREAD_JOINABLE_ATTR=unknown
8118              for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
8119                  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8120 /* end confdefs.h.  */
8121 #include <pthread.h>
8122 int
8123 main ()
8124 {
8125 int attr = $attr; return attr /* ; */
8126   ;
8127   return 0;
8128 }
8129 _ACEOF
8130 if ac_fn_c_try_link "$LINENO"; then :
8131   ax_cv_PTHREAD_JOINABLE_ATTR=$attr; break
8132 fi
8133 rm -f core conftest.err conftest.$ac_objext \
8134     conftest$ac_exeext conftest.$ac_ext
8135              done
8136
8137 fi
8138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
8139 $as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
8140         if test "$ax_cv_PTHREAD_JOINABLE_ATTR" != unknown && \
8141                test "$ax_cv_PTHREAD_JOINABLE_ATTR" != PTHREAD_CREATE_JOINABLE; then :
8142
8143 cat >>confdefs.h <<_ACEOF
8144 #define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
8145 _ACEOF
8146
8147 fi
8148
8149         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5
8150 $as_echo_n "checking if more special flags are required for pthreads... " >&6; }
8151 if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
8152   $as_echo_n "(cached) " >&6
8153 else
8154   ax_cv_PTHREAD_SPECIAL_FLAGS=no
8155              ax_pthread_special_flags_added=no
8156              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8157 /* end confdefs.h.  */
8158
8159 #                 if !defined(_REENTRANT) && !defined(_THREAD_SAFE)
8160                   AX_PTHREAD_NEED_SPECIAL_FLAG
8161 #                 endif
8162
8163 _ACEOF
8164 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8165   $EGREP "AX_PTHREAD_NEED_SPECIAL_FLAG" >/dev/null 2>&1; then :
8166   case $host_os in
8167                   aix* | freebsd*)
8168                   ax_cv_PTHREAD_SPECIAL_FLAGS="-D_THREAD_SAFE"
8169                   ;;
8170                   darwin* | hpux* | osf* | solaris*)
8171                   ax_cv_PTHREAD_SPECIAL_FLAGS="-D_REENTRANT"
8172                   ;;
8173                   esac
8174
8175 fi
8176 rm -f conftest*
8177
8178
8179 fi
8180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
8181 $as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
8182         if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
8183                test "x$ax_pthread_special_flags_added" != "xyes"; then :
8184   PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
8185                ax_pthread_special_flags_added=yes
8186 fi
8187
8188         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
8189 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
8190 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
8191   $as_echo_n "(cached) " >&6
8192 else
8193   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8194 /* end confdefs.h.  */
8195 #include <pthread.h>
8196 int
8197 main ()
8198 {
8199 int i = PTHREAD_PRIO_INHERIT;
8200   ;
8201   return 0;
8202 }
8203 _ACEOF
8204 if ac_fn_c_try_link "$LINENO"; then :
8205   ax_cv_PTHREAD_PRIO_INHERIT=yes
8206 else
8207   ax_cv_PTHREAD_PRIO_INHERIT=no
8208 fi
8209 rm -f core conftest.err conftest.$ac_objext \
8210     conftest$ac_exeext conftest.$ac_ext
8211
8212 fi
8213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
8214 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
8215         if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"; then :
8216
8217 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
8218
8219 fi
8220
8221         LIBS="$save_LIBS"
8222         CFLAGS="$save_CFLAGS"
8223
8224         # More AIX lossage: compile with *_r variant
8225         if test "x$GCC" != xyes; then
8226             case $host_os in
8227                 aix*)
8228                 case "x/$CC" in #(
8229   x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
8230     #handle absolute path differently from PATH based program lookup
8231                    case "x$CC" in #(
8232   x/*) :
8233     if as_fn_executable_p ${CC}_r; then :
8234   PTHREAD_CC="${CC}_r"
8235 fi ;; #(
8236   *) :
8237     for ac_prog in ${CC}_r
8238 do
8239   # Extract the first word of "$ac_prog", so it can be a program name with args.
8240 set dummy $ac_prog; ac_word=$2
8241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8242 $as_echo_n "checking for $ac_word... " >&6; }
8243 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
8244   $as_echo_n "(cached) " >&6
8245 else
8246   if test -n "$PTHREAD_CC"; then
8247   ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
8248 else
8249 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8250 for as_dir in $PATH
8251 do
8252   IFS=$as_save_IFS
8253   test -z "$as_dir" && as_dir=.
8254     for ac_exec_ext in '' $ac_executable_extensions; do
8255   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8256     ac_cv_prog_PTHREAD_CC="$ac_prog"
8257     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8258     break 2
8259   fi
8260 done
8261   done
8262 IFS=$as_save_IFS
8263
8264 fi
8265 fi
8266 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
8267 if test -n "$PTHREAD_CC"; then
8268   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
8269 $as_echo "$PTHREAD_CC" >&6; }
8270 else
8271   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8272 $as_echo "no" >&6; }
8273 fi
8274
8275
8276   test -n "$PTHREAD_CC" && break
8277 done
8278 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
8279  ;;
8280 esac ;; #(
8281   *) :
8282      ;;
8283 esac
8284                 ;;
8285             esac
8286         fi
8287 fi
8288
8289 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
8290
8291
8292
8293
8294
8295 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
8296 if test x"$ax_pthread_ok" = xyes; then
8297
8298 $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
8299
8300         :
8301 else
8302         ax_pthread_ok=no
8303
8304 fi
8305 ac_ext=c
8306 ac_cpp='$CPP $CPPFLAGS'
8307 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8308 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8309 ac_compiler_gnu=$ac_cv_c_compiler_gnu
8310
8311         # set thread flags
8312
8313 # Some platforms use these, so just define them.  They can't hurt if they
8314 # are not supported.  For example, on Solaris -D_POSIX_PTHREAD_SEMANTICS
8315 # enables 5-arg getpwuid_r, among other things.
8316 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
8317
8318 # Check for *_r functions
8319 _CFLAGS="$CFLAGS"
8320 _LIBS="$LIBS"
8321 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
8322 LIBS="$LIBS $PTHREAD_LIBS"
8323
8324 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
8325 if test "x$ac_cv_header_pthread_h" = xyes; then :
8326
8327 else
8328   as_fn_error $? "
8329 pthread.h not found;  use --disable-thread-safety to disable thread safety" "$LINENO" 5
8330 fi
8331
8332
8333
8334 for ac_func in strerror_r getpwuid_r gethostbyname_r
8335 do :
8336   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8337 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8338 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
8339   cat >>confdefs.h <<_ACEOF
8340 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
8341 _ACEOF
8342
8343 fi
8344 done
8345
8346
8347 # Do test here with the proper thread flags
8348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns int" >&5
8349 $as_echo_n "checking whether strerror_r returns int... " >&6; }
8350 if ${pgac_cv_func_strerror_r_int+:} false; then :
8351   $as_echo_n "(cached) " >&6
8352 else
8353   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8354 /* end confdefs.h.  */
8355 #include <string.h>
8356 int
8357 main ()
8358 {
8359 #ifndef _AIX
8360 int strerror_r(int, char *, size_t);
8361 #else
8362 /* Older AIX has 'int' for the third argument so we don't test the args. */
8363 int strerror_r();
8364 #endif
8365   ;
8366   return 0;
8367 }
8368 _ACEOF
8369 if ac_fn_c_try_compile "$LINENO"; then :
8370   pgac_cv_func_strerror_r_int=yes
8371 else
8372   pgac_cv_func_strerror_r_int=no
8373 fi
8374 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8375 fi
8376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_strerror_r_int" >&5
8377 $as_echo "$pgac_cv_func_strerror_r_int" >&6; }
8378 if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
8379
8380 $as_echo "#define STRERROR_R_INT 1" >>confdefs.h
8381
8382 fi
8383
8384
8385 CFLAGS="$_CFLAGS"
8386 LIBS="$_LIBS"
8387
8388
8389 else
8390    # else
8391 # do not use values from template file
8392 PTHREAD_CFLAGS=
8393 PTHREAD_LIBS=
8394
8395 fi # fi
8396
8397
8398
8399
8400
8401 ##
8402 ## Libraries
8403 ##
8404 ## Most libraries are included only if they demonstrably provide a function
8405 ## we need, but libm is an exception: always include it, because there are
8406 ## too many compilers that play cute optimization games that will break
8407 ## probes for standard functions such as pow().
8408 ##
8409
8410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
8411 $as_echo_n "checking for main in -lm... " >&6; }
8412 if ${ac_cv_lib_m_main+:} false; then :
8413   $as_echo_n "(cached) " >&6
8414 else
8415   ac_check_lib_save_LIBS=$LIBS
8416 LIBS="-lm  $LIBS"
8417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8418 /* end confdefs.h.  */
8419
8420
8421 int
8422 main ()
8423 {
8424 return main ();
8425   ;
8426   return 0;
8427 }
8428 _ACEOF
8429 if ac_fn_c_try_link "$LINENO"; then :
8430   ac_cv_lib_m_main=yes
8431 else
8432   ac_cv_lib_m_main=no
8433 fi
8434 rm -f core conftest.err conftest.$ac_objext \
8435     conftest$ac_exeext conftest.$ac_ext
8436 LIBS=$ac_check_lib_save_LIBS
8437 fi
8438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
8439 $as_echo "$ac_cv_lib_m_main" >&6; }
8440 if test "x$ac_cv_lib_m_main" = xyes; then :
8441   cat >>confdefs.h <<_ACEOF
8442 #define HAVE_LIBM 1
8443 _ACEOF
8444
8445   LIBS="-lm $LIBS"
8446
8447 fi
8448
8449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setproctitle" >&5
8450 $as_echo_n "checking for library containing setproctitle... " >&6; }
8451 if ${ac_cv_search_setproctitle+:} false; then :
8452   $as_echo_n "(cached) " >&6
8453 else
8454   ac_func_search_save_LIBS=$LIBS
8455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8456 /* end confdefs.h.  */
8457
8458 /* Override any GCC internal prototype to avoid an error.
8459    Use char because int might match the return type of a GCC
8460    builtin and then its argument prototype would still apply.  */
8461 #ifdef __cplusplus
8462 extern "C"
8463 #endif
8464 char setproctitle ();
8465 int
8466 main ()
8467 {
8468 return setproctitle ();
8469   ;
8470   return 0;
8471 }
8472 _ACEOF
8473 for ac_lib in '' util; do
8474   if test -z "$ac_lib"; then
8475     ac_res="none required"
8476   else
8477     ac_res=-l$ac_lib
8478     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8479   fi
8480   if ac_fn_c_try_link "$LINENO"; then :
8481   ac_cv_search_setproctitle=$ac_res
8482 fi
8483 rm -f core conftest.err conftest.$ac_objext \
8484     conftest$ac_exeext
8485   if ${ac_cv_search_setproctitle+:} false; then :
8486   break
8487 fi
8488 done
8489 if ${ac_cv_search_setproctitle+:} false; then :
8490
8491 else
8492   ac_cv_search_setproctitle=no
8493 fi
8494 rm conftest.$ac_ext
8495 LIBS=$ac_func_search_save_LIBS
8496 fi
8497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setproctitle" >&5
8498 $as_echo "$ac_cv_search_setproctitle" >&6; }
8499 ac_res=$ac_cv_search_setproctitle
8500 if test "$ac_res" != no; then :
8501   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8502
8503 fi
8504
8505 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
8506 $as_echo_n "checking for library containing dlopen... " >&6; }
8507 if ${ac_cv_search_dlopen+:} false; then :
8508   $as_echo_n "(cached) " >&6
8509 else
8510   ac_func_search_save_LIBS=$LIBS
8511 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8512 /* end confdefs.h.  */
8513
8514 /* Override any GCC internal prototype to avoid an error.
8515    Use char because int might match the return type of a GCC
8516    builtin and then its argument prototype would still apply.  */
8517 #ifdef __cplusplus
8518 extern "C"
8519 #endif
8520 char dlopen ();
8521 int
8522 main ()
8523 {
8524 return dlopen ();
8525   ;
8526   return 0;
8527 }
8528 _ACEOF
8529 for ac_lib in '' dl; do
8530   if test -z "$ac_lib"; then
8531     ac_res="none required"
8532   else
8533     ac_res=-l$ac_lib
8534     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8535   fi
8536   if ac_fn_c_try_link "$LINENO"; then :
8537   ac_cv_search_dlopen=$ac_res
8538 fi
8539 rm -f core conftest.err conftest.$ac_objext \
8540     conftest$ac_exeext
8541   if ${ac_cv_search_dlopen+:} false; then :
8542   break
8543 fi
8544 done
8545 if ${ac_cv_search_dlopen+:} false; then :
8546
8547 else
8548   ac_cv_search_dlopen=no
8549 fi
8550 rm conftest.$ac_ext
8551 LIBS=$ac_func_search_save_LIBS
8552 fi
8553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
8554 $as_echo "$ac_cv_search_dlopen" >&6; }
8555 ac_res=$ac_cv_search_dlopen
8556 if test "$ac_res" != no; then :
8557   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8558
8559 fi
8560
8561 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
8562 $as_echo_n "checking for library containing socket... " >&6; }
8563 if ${ac_cv_search_socket+:} false; then :
8564   $as_echo_n "(cached) " >&6
8565 else
8566   ac_func_search_save_LIBS=$LIBS
8567 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8568 /* end confdefs.h.  */
8569
8570 /* Override any GCC internal prototype to avoid an error.
8571    Use char because int might match the return type of a GCC
8572    builtin and then its argument prototype would still apply.  */
8573 #ifdef __cplusplus
8574 extern "C"
8575 #endif
8576 char socket ();
8577 int
8578 main ()
8579 {
8580 return socket ();
8581   ;
8582   return 0;
8583 }
8584 _ACEOF
8585 for ac_lib in '' socket ws2_32; do
8586   if test -z "$ac_lib"; then
8587     ac_res="none required"
8588   else
8589     ac_res=-l$ac_lib
8590     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8591   fi
8592   if ac_fn_c_try_link "$LINENO"; then :
8593   ac_cv_search_socket=$ac_res
8594 fi
8595 rm -f core conftest.err conftest.$ac_objext \
8596     conftest$ac_exeext
8597   if ${ac_cv_search_socket+:} false; then :
8598   break
8599 fi
8600 done
8601 if ${ac_cv_search_socket+:} false; then :
8602
8603 else
8604   ac_cv_search_socket=no
8605 fi
8606 rm conftest.$ac_ext
8607 LIBS=$ac_func_search_save_LIBS
8608 fi
8609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
8610 $as_echo "$ac_cv_search_socket" >&6; }
8611 ac_res=$ac_cv_search_socket
8612 if test "$ac_res" != no; then :
8613   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8614
8615 fi
8616
8617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shl_load" >&5
8618 $as_echo_n "checking for library containing shl_load... " >&6; }
8619 if ${ac_cv_search_shl_load+:} false; then :
8620   $as_echo_n "(cached) " >&6
8621 else
8622   ac_func_search_save_LIBS=$LIBS
8623 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8624 /* end confdefs.h.  */
8625
8626 /* Override any GCC internal prototype to avoid an error.
8627    Use char because int might match the return type of a GCC
8628    builtin and then its argument prototype would still apply.  */
8629 #ifdef __cplusplus
8630 extern "C"
8631 #endif
8632 char shl_load ();
8633 int
8634 main ()
8635 {
8636 return shl_load ();
8637   ;
8638   return 0;
8639 }
8640 _ACEOF
8641 for ac_lib in '' dld; do
8642   if test -z "$ac_lib"; then
8643     ac_res="none required"
8644   else
8645     ac_res=-l$ac_lib
8646     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8647   fi
8648   if ac_fn_c_try_link "$LINENO"; then :
8649   ac_cv_search_shl_load=$ac_res
8650 fi
8651 rm -f core conftest.err conftest.$ac_objext \
8652     conftest$ac_exeext
8653   if ${ac_cv_search_shl_load+:} false; then :
8654   break
8655 fi
8656 done
8657 if ${ac_cv_search_shl_load+:} false; then :
8658
8659 else
8660   ac_cv_search_shl_load=no
8661 fi
8662 rm conftest.$ac_ext
8663 LIBS=$ac_func_search_save_LIBS
8664 fi
8665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shl_load" >&5
8666 $as_echo "$ac_cv_search_shl_load" >&6; }
8667 ac_res=$ac_cv_search_shl_load
8668 if test "$ac_res" != no; then :
8669   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8670
8671 fi
8672
8673 # We only use libld in port/dynloader/aix.c
8674 case $host_os in
8675      aix*)
8676         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing ldopen" >&5
8677 $as_echo_n "checking for library containing ldopen... " >&6; }
8678 if ${ac_cv_search_ldopen+:} false; then :
8679   $as_echo_n "(cached) " >&6
8680 else
8681   ac_func_search_save_LIBS=$LIBS
8682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8683 /* end confdefs.h.  */
8684
8685 /* Override any GCC internal prototype to avoid an error.
8686    Use char because int might match the return type of a GCC
8687    builtin and then its argument prototype would still apply.  */
8688 #ifdef __cplusplus
8689 extern "C"
8690 #endif
8691 char ldopen ();
8692 int
8693 main ()
8694 {
8695 return ldopen ();
8696   ;
8697   return 0;
8698 }
8699 _ACEOF
8700 for ac_lib in '' ld; do
8701   if test -z "$ac_lib"; then
8702     ac_res="none required"
8703   else
8704     ac_res=-l$ac_lib
8705     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8706   fi
8707   if ac_fn_c_try_link "$LINENO"; then :
8708   ac_cv_search_ldopen=$ac_res
8709 fi
8710 rm -f core conftest.err conftest.$ac_objext \
8711     conftest$ac_exeext
8712   if ${ac_cv_search_ldopen+:} false; then :
8713   break
8714 fi
8715 done
8716 if ${ac_cv_search_ldopen+:} false; then :
8717
8718 else
8719   ac_cv_search_ldopen=no
8720 fi
8721 rm conftest.$ac_ext
8722 LIBS=$ac_func_search_save_LIBS
8723 fi
8724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_ldopen" >&5
8725 $as_echo "$ac_cv_search_ldopen" >&6; }
8726 ac_res=$ac_cv_search_ldopen
8727 if test "$ac_res" != no; then :
8728   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8729
8730 fi
8731
8732         ;;
8733 esac
8734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getopt_long" >&5
8735 $as_echo_n "checking for library containing getopt_long... " >&6; }
8736 if ${ac_cv_search_getopt_long+:} false; then :
8737   $as_echo_n "(cached) " >&6
8738 else
8739   ac_func_search_save_LIBS=$LIBS
8740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8741 /* end confdefs.h.  */
8742
8743 /* Override any GCC internal prototype to avoid an error.
8744    Use char because int might match the return type of a GCC
8745    builtin and then its argument prototype would still apply.  */
8746 #ifdef __cplusplus
8747 extern "C"
8748 #endif
8749 char getopt_long ();
8750 int
8751 main ()
8752 {
8753 return getopt_long ();
8754   ;
8755   return 0;
8756 }
8757 _ACEOF
8758 for ac_lib in '' getopt gnugetopt; do
8759   if test -z "$ac_lib"; then
8760     ac_res="none required"
8761   else
8762     ac_res=-l$ac_lib
8763     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8764   fi
8765   if ac_fn_c_try_link "$LINENO"; then :
8766   ac_cv_search_getopt_long=$ac_res
8767 fi
8768 rm -f core conftest.err conftest.$ac_objext \
8769     conftest$ac_exeext
8770   if ${ac_cv_search_getopt_long+:} false; then :
8771   break
8772 fi
8773 done
8774 if ${ac_cv_search_getopt_long+:} false; then :
8775
8776 else
8777   ac_cv_search_getopt_long=no
8778 fi
8779 rm conftest.$ac_ext
8780 LIBS=$ac_func_search_save_LIBS
8781 fi
8782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getopt_long" >&5
8783 $as_echo "$ac_cv_search_getopt_long" >&6; }
8784 ac_res=$ac_cv_search_getopt_long
8785 if test "$ac_res" != no; then :
8786   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8787
8788 fi
8789
8790 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
8791 $as_echo_n "checking for library containing crypt... " >&6; }
8792 if ${ac_cv_search_crypt+:} false; then :
8793   $as_echo_n "(cached) " >&6
8794 else
8795   ac_func_search_save_LIBS=$LIBS
8796 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8797 /* end confdefs.h.  */
8798
8799 /* Override any GCC internal prototype to avoid an error.
8800    Use char because int might match the return type of a GCC
8801    builtin and then its argument prototype would still apply.  */
8802 #ifdef __cplusplus
8803 extern "C"
8804 #endif
8805 char crypt ();
8806 int
8807 main ()
8808 {
8809 return crypt ();
8810   ;
8811   return 0;
8812 }
8813 _ACEOF
8814 for ac_lib in '' crypt; do
8815   if test -z "$ac_lib"; then
8816     ac_res="none required"
8817   else
8818     ac_res=-l$ac_lib
8819     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8820   fi
8821   if ac_fn_c_try_link "$LINENO"; then :
8822   ac_cv_search_crypt=$ac_res
8823 fi
8824 rm -f core conftest.err conftest.$ac_objext \
8825     conftest$ac_exeext
8826   if ${ac_cv_search_crypt+:} false; then :
8827   break
8828 fi
8829 done
8830 if ${ac_cv_search_crypt+:} false; then :
8831
8832 else
8833   ac_cv_search_crypt=no
8834 fi
8835 rm conftest.$ac_ext
8836 LIBS=$ac_func_search_save_LIBS
8837 fi
8838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
8839 $as_echo "$ac_cv_search_crypt" >&6; }
8840 ac_res=$ac_cv_search_crypt
8841 if test "$ac_res" != no; then :
8842   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8843
8844 fi
8845
8846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
8847 $as_echo_n "checking for library containing shm_open... " >&6; }
8848 if ${ac_cv_search_shm_open+:} false; then :
8849   $as_echo_n "(cached) " >&6
8850 else
8851   ac_func_search_save_LIBS=$LIBS
8852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8853 /* end confdefs.h.  */
8854
8855 /* Override any GCC internal prototype to avoid an error.
8856    Use char because int might match the return type of a GCC
8857    builtin and then its argument prototype would still apply.  */
8858 #ifdef __cplusplus
8859 extern "C"
8860 #endif
8861 char shm_open ();
8862 int
8863 main ()
8864 {
8865 return shm_open ();
8866   ;
8867   return 0;
8868 }
8869 _ACEOF
8870 for ac_lib in '' rt; do
8871   if test -z "$ac_lib"; then
8872     ac_res="none required"
8873   else
8874     ac_res=-l$ac_lib
8875     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8876   fi
8877   if ac_fn_c_try_link "$LINENO"; then :
8878   ac_cv_search_shm_open=$ac_res
8879 fi
8880 rm -f core conftest.err conftest.$ac_objext \
8881     conftest$ac_exeext
8882   if ${ac_cv_search_shm_open+:} false; then :
8883   break
8884 fi
8885 done
8886 if ${ac_cv_search_shm_open+:} false; then :
8887
8888 else
8889   ac_cv_search_shm_open=no
8890 fi
8891 rm conftest.$ac_ext
8892 LIBS=$ac_func_search_save_LIBS
8893 fi
8894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
8895 $as_echo "$ac_cv_search_shm_open" >&6; }
8896 ac_res=$ac_cv_search_shm_open
8897 if test "$ac_res" != no; then :
8898   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8899
8900 fi
8901
8902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_unlink" >&5
8903 $as_echo_n "checking for library containing shm_unlink... " >&6; }
8904 if ${ac_cv_search_shm_unlink+:} false; then :
8905   $as_echo_n "(cached) " >&6
8906 else
8907   ac_func_search_save_LIBS=$LIBS
8908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8909 /* end confdefs.h.  */
8910
8911 /* Override any GCC internal prototype to avoid an error.
8912    Use char because int might match the return type of a GCC
8913    builtin and then its argument prototype would still apply.  */
8914 #ifdef __cplusplus
8915 extern "C"
8916 #endif
8917 char shm_unlink ();
8918 int
8919 main ()
8920 {
8921 return shm_unlink ();
8922   ;
8923   return 0;
8924 }
8925 _ACEOF
8926 for ac_lib in '' rt; do
8927   if test -z "$ac_lib"; then
8928     ac_res="none required"
8929   else
8930     ac_res=-l$ac_lib
8931     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8932   fi
8933   if ac_fn_c_try_link "$LINENO"; then :
8934   ac_cv_search_shm_unlink=$ac_res
8935 fi
8936 rm -f core conftest.err conftest.$ac_objext \
8937     conftest$ac_exeext
8938   if ${ac_cv_search_shm_unlink+:} false; then :
8939   break
8940 fi
8941 done
8942 if ${ac_cv_search_shm_unlink+:} false; then :
8943
8944 else
8945   ac_cv_search_shm_unlink=no
8946 fi
8947 rm conftest.$ac_ext
8948 LIBS=$ac_func_search_save_LIBS
8949 fi
8950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_unlink" >&5
8951 $as_echo "$ac_cv_search_shm_unlink" >&6; }
8952 ac_res=$ac_cv_search_shm_unlink
8953 if test "$ac_res" != no; then :
8954   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8955
8956 fi
8957
8958 # Solaris:
8959 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5
8960 $as_echo_n "checking for library containing fdatasync... " >&6; }
8961 if ${ac_cv_search_fdatasync+:} false; then :
8962   $as_echo_n "(cached) " >&6
8963 else
8964   ac_func_search_save_LIBS=$LIBS
8965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8966 /* end confdefs.h.  */
8967
8968 /* Override any GCC internal prototype to avoid an error.
8969    Use char because int might match the return type of a GCC
8970    builtin and then its argument prototype would still apply.  */
8971 #ifdef __cplusplus
8972 extern "C"
8973 #endif
8974 char fdatasync ();
8975 int
8976 main ()
8977 {
8978 return fdatasync ();
8979   ;
8980   return 0;
8981 }
8982 _ACEOF
8983 for ac_lib in '' rt posix4; do
8984   if test -z "$ac_lib"; then
8985     ac_res="none required"
8986   else
8987     ac_res=-l$ac_lib
8988     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8989   fi
8990   if ac_fn_c_try_link "$LINENO"; then :
8991   ac_cv_search_fdatasync=$ac_res
8992 fi
8993 rm -f core conftest.err conftest.$ac_objext \
8994     conftest$ac_exeext
8995   if ${ac_cv_search_fdatasync+:} false; then :
8996   break
8997 fi
8998 done
8999 if ${ac_cv_search_fdatasync+:} false; then :
9000
9001 else
9002   ac_cv_search_fdatasync=no
9003 fi
9004 rm conftest.$ac_ext
9005 LIBS=$ac_func_search_save_LIBS
9006 fi
9007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5
9008 $as_echo "$ac_cv_search_fdatasync" >&6; }
9009 ac_res=$ac_cv_search_fdatasync
9010 if test "$ac_res" != no; then :
9011   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9012
9013 fi
9014
9015 # Required for thread_test.c on Solaris
9016 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sched_yield" >&5
9017 $as_echo_n "checking for library containing sched_yield... " >&6; }
9018 if ${ac_cv_search_sched_yield+:} false; then :
9019   $as_echo_n "(cached) " >&6
9020 else
9021   ac_func_search_save_LIBS=$LIBS
9022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9023 /* end confdefs.h.  */
9024
9025 /* Override any GCC internal prototype to avoid an error.
9026    Use char because int might match the return type of a GCC
9027    builtin and then its argument prototype would still apply.  */
9028 #ifdef __cplusplus
9029 extern "C"
9030 #endif
9031 char sched_yield ();
9032 int
9033 main ()
9034 {
9035 return sched_yield ();
9036   ;
9037   return 0;
9038 }
9039 _ACEOF
9040 for ac_lib in '' rt; do
9041   if test -z "$ac_lib"; then
9042     ac_res="none required"
9043   else
9044     ac_res=-l$ac_lib
9045     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9046   fi
9047   if ac_fn_c_try_link "$LINENO"; then :
9048   ac_cv_search_sched_yield=$ac_res
9049 fi
9050 rm -f core conftest.err conftest.$ac_objext \
9051     conftest$ac_exeext
9052   if ${ac_cv_search_sched_yield+:} false; then :
9053   break
9054 fi
9055 done
9056 if ${ac_cv_search_sched_yield+:} false; then :
9057
9058 else
9059   ac_cv_search_sched_yield=no
9060 fi
9061 rm conftest.$ac_ext
9062 LIBS=$ac_func_search_save_LIBS
9063 fi
9064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sched_yield" >&5
9065 $as_echo "$ac_cv_search_sched_yield" >&6; }
9066 ac_res=$ac_cv_search_sched_yield
9067 if test "$ac_res" != no; then :
9068   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9069
9070 fi
9071
9072 # Required for thread_test.c on Solaris 2.5:
9073 # Other ports use it too (HP-UX) so test unconditionally
9074 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname_r" >&5
9075 $as_echo_n "checking for library containing gethostbyname_r... " >&6; }
9076 if ${ac_cv_search_gethostbyname_r+:} false; then :
9077   $as_echo_n "(cached) " >&6
9078 else
9079   ac_func_search_save_LIBS=$LIBS
9080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9081 /* end confdefs.h.  */
9082
9083 /* Override any GCC internal prototype to avoid an error.
9084    Use char because int might match the return type of a GCC
9085    builtin and then its argument prototype would still apply.  */
9086 #ifdef __cplusplus
9087 extern "C"
9088 #endif
9089 char gethostbyname_r ();
9090 int
9091 main ()
9092 {
9093 return gethostbyname_r ();
9094   ;
9095   return 0;
9096 }
9097 _ACEOF
9098 for ac_lib in '' nsl; do
9099   if test -z "$ac_lib"; then
9100     ac_res="none required"
9101   else
9102     ac_res=-l$ac_lib
9103     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9104   fi
9105   if ac_fn_c_try_link "$LINENO"; then :
9106   ac_cv_search_gethostbyname_r=$ac_res
9107 fi
9108 rm -f core conftest.err conftest.$ac_objext \
9109     conftest$ac_exeext
9110   if ${ac_cv_search_gethostbyname_r+:} false; then :
9111   break
9112 fi
9113 done
9114 if ${ac_cv_search_gethostbyname_r+:} false; then :
9115
9116 else
9117   ac_cv_search_gethostbyname_r=no
9118 fi
9119 rm conftest.$ac_ext
9120 LIBS=$ac_func_search_save_LIBS
9121 fi
9122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname_r" >&5
9123 $as_echo "$ac_cv_search_gethostbyname_r" >&6; }
9124 ac_res=$ac_cv_search_gethostbyname_r
9125 if test "$ac_res" != no; then :
9126   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9127
9128 fi
9129
9130 # Cygwin:
9131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shmget" >&5
9132 $as_echo_n "checking for library containing shmget... " >&6; }
9133 if ${ac_cv_search_shmget+:} false; then :
9134   $as_echo_n "(cached) " >&6
9135 else
9136   ac_func_search_save_LIBS=$LIBS
9137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9138 /* end confdefs.h.  */
9139
9140 /* Override any GCC internal prototype to avoid an error.
9141    Use char because int might match the return type of a GCC
9142    builtin and then its argument prototype would still apply.  */
9143 #ifdef __cplusplus
9144 extern "C"
9145 #endif
9146 char shmget ();
9147 int
9148 main ()
9149 {
9150 return shmget ();
9151   ;
9152   return 0;
9153 }
9154 _ACEOF
9155 for ac_lib in '' cygipc; do
9156   if test -z "$ac_lib"; then
9157     ac_res="none required"
9158   else
9159     ac_res=-l$ac_lib
9160     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9161   fi
9162   if ac_fn_c_try_link "$LINENO"; then :
9163   ac_cv_search_shmget=$ac_res
9164 fi
9165 rm -f core conftest.err conftest.$ac_objext \
9166     conftest$ac_exeext
9167   if ${ac_cv_search_shmget+:} false; then :
9168   break
9169 fi
9170 done
9171 if ${ac_cv_search_shmget+:} false; then :
9172
9173 else
9174   ac_cv_search_shmget=no
9175 fi
9176 rm conftest.$ac_ext
9177 LIBS=$ac_func_search_save_LIBS
9178 fi
9179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shmget" >&5
9180 $as_echo "$ac_cv_search_shmget" >&6; }
9181 ac_res=$ac_cv_search_shmget
9182 if test "$ac_res" != no; then :
9183   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9184
9185 fi
9186
9187
9188 if test "$with_readline" = yes; then
9189
9190
9191 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing readline" >&5
9192 $as_echo_n "checking for library containing readline... " >&6; }
9193 if ${pgac_cv_check_readline+:} false; then :
9194   $as_echo_n "(cached) " >&6
9195 else
9196   pgac_cv_check_readline=no
9197 pgac_save_LIBS=$LIBS
9198 if test x"$with_libedit_preferred" != x"yes"
9199 then    READLINE_ORDER="-lreadline -ledit"
9200 else    READLINE_ORDER="-ledit -lreadline"
9201 fi
9202 for pgac_rllib in $READLINE_ORDER ; do
9203   for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
9204     LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
9205     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9206 /* end confdefs.h.  */
9207
9208 /* Override any GCC internal prototype to avoid an error.
9209    Use char because int might match the return type of a GCC
9210    builtin and then its argument prototype would still apply.  */
9211 #ifdef __cplusplus
9212 extern "C"
9213 #endif
9214 char readline ();
9215 int
9216 main ()
9217 {
9218 return readline ();
9219   ;
9220   return 0;
9221 }
9222 _ACEOF
9223 if ac_fn_c_try_link "$LINENO"; then :
9224
9225       # Older NetBSD, OpenBSD, and Irix have a broken linker that does not
9226       # recognize dependent libraries; assume curses is needed if we didn't
9227       # find any dependency.
9228       case $host_os in
9229         netbsd* | openbsd* | irix*)
9230           if test x"$pgac_lib" = x"" ; then
9231             pgac_lib=" -lcurses"
9232           fi ;;
9233       esac
9234
9235       pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
9236       break
9237
9238 fi
9239 rm -f core conftest.err conftest.$ac_objext \
9240     conftest$ac_exeext conftest.$ac_ext
9241   done
9242   if test "$pgac_cv_check_readline" != no ; then
9243     break
9244   fi
9245 done
9246 LIBS=$pgac_save_LIBS
9247
9248 fi
9249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_readline" >&5
9250 $as_echo "$pgac_cv_check_readline" >&6; }
9251 if test "$pgac_cv_check_readline" != no ; then
9252   LIBS="$pgac_cv_check_readline $LIBS"
9253
9254 $as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
9255
9256 fi
9257
9258
9259   if test x"$pgac_cv_check_readline" = x"no"; then
9260     as_fn_error $? "readline library not found
9261 If you have readline already installed, see config.log for details on the
9262 failure.  It is possible the compiler isn't looking in the proper directory.
9263 Use --without-readline to disable readline support." "$LINENO" 5
9264   fi
9265 fi
9266
9267 if test "$with_zlib" = yes; then
9268   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5
9269 $as_echo_n "checking for inflate in -lz... " >&6; }
9270 if ${ac_cv_lib_z_inflate+:} false; then :
9271   $as_echo_n "(cached) " >&6
9272 else
9273   ac_check_lib_save_LIBS=$LIBS
9274 LIBS="-lz  $LIBS"
9275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9276 /* end confdefs.h.  */
9277
9278 /* Override any GCC internal prototype to avoid an error.
9279    Use char because int might match the return type of a GCC
9280    builtin and then its argument prototype would still apply.  */
9281 #ifdef __cplusplus
9282 extern "C"
9283 #endif
9284 char inflate ();
9285 int
9286 main ()
9287 {
9288 return inflate ();
9289   ;
9290   return 0;
9291 }
9292 _ACEOF
9293 if ac_fn_c_try_link "$LINENO"; then :
9294   ac_cv_lib_z_inflate=yes
9295 else
9296   ac_cv_lib_z_inflate=no
9297 fi
9298 rm -f core conftest.err conftest.$ac_objext \
9299     conftest$ac_exeext conftest.$ac_ext
9300 LIBS=$ac_check_lib_save_LIBS
9301 fi
9302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5
9303 $as_echo "$ac_cv_lib_z_inflate" >&6; }
9304 if test "x$ac_cv_lib_z_inflate" = xyes; then :
9305   cat >>confdefs.h <<_ACEOF
9306 #define HAVE_LIBZ 1
9307 _ACEOF
9308
9309   LIBS="-lz $LIBS"
9310
9311 else
9312   as_fn_error $? "zlib library not found
9313 If you have zlib already installed, see config.log for details on the
9314 failure.  It is possible the compiler isn't looking in the proper directory.
9315 Use --without-zlib to disable zlib support." "$LINENO" 5
9316 fi
9317
9318 fi
9319
9320 if test "$enable_spinlocks" = yes; then
9321
9322 $as_echo "#define HAVE_SPINLOCKS 1" >>confdefs.h
9323
9324 else
9325   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9326 *** Not using spinlocks will cause poor performance." >&5
9327 $as_echo "$as_me: WARNING:
9328 *** Not using spinlocks will cause poor performance." >&2;}
9329 fi
9330
9331 if test "$enable_atomics" = yes; then
9332
9333 $as_echo "#define HAVE_ATOMICS 1" >>confdefs.h
9334
9335 else
9336   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9337 *** Not using atomic operations will cause poor performance." >&5
9338 $as_echo "$as_me: WARNING:
9339 *** Not using atomic operations will cause poor performance." >&2;}
9340 fi
9341
9342 if test "$with_gssapi" = yes ; then
9343   if test "$PORTNAME" != "win32"; then
9344     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gss_init_sec_context" >&5
9345 $as_echo_n "checking for library containing gss_init_sec_context... " >&6; }
9346 if ${ac_cv_search_gss_init_sec_context+:} false; then :
9347   $as_echo_n "(cached) " >&6
9348 else
9349   ac_func_search_save_LIBS=$LIBS
9350 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9351 /* end confdefs.h.  */
9352
9353 /* Override any GCC internal prototype to avoid an error.
9354    Use char because int might match the return type of a GCC
9355    builtin and then its argument prototype would still apply.  */
9356 #ifdef __cplusplus
9357 extern "C"
9358 #endif
9359 char gss_init_sec_context ();
9360 int
9361 main ()
9362 {
9363 return gss_init_sec_context ();
9364   ;
9365   return 0;
9366 }
9367 _ACEOF
9368 for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'; do
9369   if test -z "$ac_lib"; then
9370     ac_res="none required"
9371   else
9372     ac_res=-l$ac_lib
9373     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9374   fi
9375   if ac_fn_c_try_link "$LINENO"; then :
9376   ac_cv_search_gss_init_sec_context=$ac_res
9377 fi
9378 rm -f core conftest.err conftest.$ac_objext \
9379     conftest$ac_exeext
9380   if ${ac_cv_search_gss_init_sec_context+:} false; then :
9381   break
9382 fi
9383 done
9384 if ${ac_cv_search_gss_init_sec_context+:} false; then :
9385
9386 else
9387   ac_cv_search_gss_init_sec_context=no
9388 fi
9389 rm conftest.$ac_ext
9390 LIBS=$ac_func_search_save_LIBS
9391 fi
9392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gss_init_sec_context" >&5
9393 $as_echo "$ac_cv_search_gss_init_sec_context" >&6; }
9394 ac_res=$ac_cv_search_gss_init_sec_context
9395 if test "$ac_res" != no; then :
9396   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9397
9398 else
9399   as_fn_error $? "could not find function 'gss_init_sec_context' required for GSSAPI" "$LINENO" 5
9400 fi
9401
9402   else
9403     LIBS="$LIBS -lgssapi32"
9404   fi
9405 fi
9406
9407 if test "$with_openssl" = yes ; then
9408     if test "$PORTNAME" != "win32"; then
9409      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_new_ex_data in -lcrypto" >&5
9410 $as_echo_n "checking for CRYPTO_new_ex_data in -lcrypto... " >&6; }
9411 if ${ac_cv_lib_crypto_CRYPTO_new_ex_data+:} false; then :
9412   $as_echo_n "(cached) " >&6
9413 else
9414   ac_check_lib_save_LIBS=$LIBS
9415 LIBS="-lcrypto  $LIBS"
9416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9417 /* end confdefs.h.  */
9418
9419 /* Override any GCC internal prototype to avoid an error.
9420    Use char because int might match the return type of a GCC
9421    builtin and then its argument prototype would still apply.  */
9422 #ifdef __cplusplus
9423 extern "C"
9424 #endif
9425 char CRYPTO_new_ex_data ();
9426 int
9427 main ()
9428 {
9429 return CRYPTO_new_ex_data ();
9430   ;
9431   return 0;
9432 }
9433 _ACEOF
9434 if ac_fn_c_try_link "$LINENO"; then :
9435   ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
9436 else
9437   ac_cv_lib_crypto_CRYPTO_new_ex_data=no
9438 fi
9439 rm -f core conftest.err conftest.$ac_objext \
9440     conftest$ac_exeext conftest.$ac_ext
9441 LIBS=$ac_check_lib_save_LIBS
9442 fi
9443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
9444 $as_echo "$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6; }
9445 if test "x$ac_cv_lib_crypto_CRYPTO_new_ex_data" = xyes; then :
9446   cat >>confdefs.h <<_ACEOF
9447 #define HAVE_LIBCRYPTO 1
9448 _ACEOF
9449
9450   LIBS="-lcrypto $LIBS"
9451
9452 else
9453   as_fn_error $? "library 'crypto' is required for OpenSSL" "$LINENO" 5
9454 fi
9455
9456      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_library_init in -lssl" >&5
9457 $as_echo_n "checking for SSL_library_init in -lssl... " >&6; }
9458 if ${ac_cv_lib_ssl_SSL_library_init+:} false; then :
9459   $as_echo_n "(cached) " >&6
9460 else
9461   ac_check_lib_save_LIBS=$LIBS
9462 LIBS="-lssl  $LIBS"
9463 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9464 /* end confdefs.h.  */
9465
9466 /* Override any GCC internal prototype to avoid an error.
9467    Use char because int might match the return type of a GCC
9468    builtin and then its argument prototype would still apply.  */
9469 #ifdef __cplusplus
9470 extern "C"
9471 #endif
9472 char SSL_library_init ();
9473 int
9474 main ()
9475 {
9476 return SSL_library_init ();
9477   ;
9478   return 0;
9479 }
9480 _ACEOF
9481 if ac_fn_c_try_link "$LINENO"; then :
9482   ac_cv_lib_ssl_SSL_library_init=yes
9483 else
9484   ac_cv_lib_ssl_SSL_library_init=no
9485 fi
9486 rm -f core conftest.err conftest.$ac_objext \
9487     conftest$ac_exeext conftest.$ac_ext
9488 LIBS=$ac_check_lib_save_LIBS
9489 fi
9490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_library_init" >&5
9491 $as_echo "$ac_cv_lib_ssl_SSL_library_init" >&6; }
9492 if test "x$ac_cv_lib_ssl_SSL_library_init" = xyes; then :
9493   cat >>confdefs.h <<_ACEOF
9494 #define HAVE_LIBSSL 1
9495 _ACEOF
9496
9497   LIBS="-lssl $LIBS"
9498
9499 else
9500   as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5
9501 fi
9502
9503   else
9504      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing CRYPTO_new_ex_data" >&5
9505 $as_echo_n "checking for library containing CRYPTO_new_ex_data... " >&6; }
9506 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
9507   $as_echo_n "(cached) " >&6
9508 else
9509   ac_func_search_save_LIBS=$LIBS
9510 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9511 /* end confdefs.h.  */
9512
9513 /* Override any GCC internal prototype to avoid an error.
9514    Use char because int might match the return type of a GCC
9515    builtin and then its argument prototype would still apply.  */
9516 #ifdef __cplusplus
9517 extern "C"
9518 #endif
9519 char CRYPTO_new_ex_data ();
9520 int
9521 main ()
9522 {
9523 return CRYPTO_new_ex_data ();
9524   ;
9525   return 0;
9526 }
9527 _ACEOF
9528 for ac_lib in '' eay32 crypto; do
9529   if test -z "$ac_lib"; then
9530     ac_res="none required"
9531   else
9532     ac_res=-l$ac_lib
9533     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9534   fi
9535   if ac_fn_c_try_link "$LINENO"; then :
9536   ac_cv_search_CRYPTO_new_ex_data=$ac_res
9537 fi
9538 rm -f core conftest.err conftest.$ac_objext \
9539     conftest$ac_exeext
9540   if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
9541   break
9542 fi
9543 done
9544 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
9545
9546 else
9547   ac_cv_search_CRYPTO_new_ex_data=no
9548 fi
9549 rm conftest.$ac_ext
9550 LIBS=$ac_func_search_save_LIBS
9551 fi
9552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_CRYPTO_new_ex_data" >&5
9553 $as_echo "$ac_cv_search_CRYPTO_new_ex_data" >&6; }
9554 ac_res=$ac_cv_search_CRYPTO_new_ex_data
9555 if test "$ac_res" != no; then :
9556   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9557
9558 else
9559   as_fn_error $? "library 'eay32' or 'crypto' is required for OpenSSL" "$LINENO" 5
9560 fi
9561
9562      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_library_init" >&5
9563 $as_echo_n "checking for library containing SSL_library_init... " >&6; }
9564 if ${ac_cv_search_SSL_library_init+:} false; then :
9565   $as_echo_n "(cached) " >&6
9566 else
9567   ac_func_search_save_LIBS=$LIBS
9568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9569 /* end confdefs.h.  */
9570
9571 /* Override any GCC internal prototype to avoid an error.
9572    Use char because int might match the return type of a GCC
9573    builtin and then its argument prototype would still apply.  */
9574 #ifdef __cplusplus
9575 extern "C"
9576 #endif
9577 char SSL_library_init ();
9578 int
9579 main ()
9580 {
9581 return SSL_library_init ();
9582   ;
9583   return 0;
9584 }
9585 _ACEOF
9586 for ac_lib in '' ssleay32 ssl; do
9587   if test -z "$ac_lib"; then
9588     ac_res="none required"
9589   else
9590     ac_res=-l$ac_lib
9591     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9592   fi
9593   if ac_fn_c_try_link "$LINENO"; then :
9594   ac_cv_search_SSL_library_init=$ac_res
9595 fi
9596 rm -f core conftest.err conftest.$ac_objext \
9597     conftest$ac_exeext
9598   if ${ac_cv_search_SSL_library_init+:} false; then :
9599   break
9600 fi
9601 done
9602 if ${ac_cv_search_SSL_library_init+:} false; then :
9603
9604 else
9605   ac_cv_search_SSL_library_init=no
9606 fi
9607 rm conftest.$ac_ext
9608 LIBS=$ac_func_search_save_LIBS
9609 fi
9610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_library_init" >&5
9611 $as_echo "$ac_cv_search_SSL_library_init" >&6; }
9612 ac_res=$ac_cv_search_SSL_library_init
9613 if test "$ac_res" != no; then :
9614   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9615
9616 else
9617   as_fn_error $? "library 'ssleay32' or 'ssl' is required for OpenSSL" "$LINENO" 5
9618 fi
9619
9620   fi
9621   for ac_func in SSL_get_current_compression
9622 do :
9623   ac_fn_c_check_func "$LINENO" "SSL_get_current_compression" "ac_cv_func_SSL_get_current_compression"
9624 if test "x$ac_cv_func_SSL_get_current_compression" = xyes; then :
9625   cat >>confdefs.h <<_ACEOF
9626 #define HAVE_SSL_GET_CURRENT_COMPRESSION 1
9627 _ACEOF
9628
9629 fi
9630 done
9631
9632 fi
9633
9634 if test "$with_pam" = yes ; then
9635   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_start in -lpam" >&5
9636 $as_echo_n "checking for pam_start in -lpam... " >&6; }
9637 if ${ac_cv_lib_pam_pam_start+:} false; then :
9638   $as_echo_n "(cached) " >&6
9639 else
9640   ac_check_lib_save_LIBS=$LIBS
9641 LIBS="-lpam  $LIBS"
9642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9643 /* end confdefs.h.  */
9644
9645 /* Override any GCC internal prototype to avoid an error.
9646    Use char because int might match the return type of a GCC
9647    builtin and then its argument prototype would still apply.  */
9648 #ifdef __cplusplus
9649 extern "C"
9650 #endif
9651 char pam_start ();
9652 int
9653 main ()
9654 {
9655 return pam_start ();
9656   ;
9657   return 0;
9658 }
9659 _ACEOF
9660 if ac_fn_c_try_link "$LINENO"; then :
9661   ac_cv_lib_pam_pam_start=yes
9662 else
9663   ac_cv_lib_pam_pam_start=no
9664 fi
9665 rm -f core conftest.err conftest.$ac_objext \
9666     conftest$ac_exeext conftest.$ac_ext
9667 LIBS=$ac_check_lib_save_LIBS
9668 fi
9669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_start" >&5
9670 $as_echo "$ac_cv_lib_pam_pam_start" >&6; }
9671 if test "x$ac_cv_lib_pam_pam_start" = xyes; then :
9672   cat >>confdefs.h <<_ACEOF
9673 #define HAVE_LIBPAM 1
9674 _ACEOF
9675
9676   LIBS="-lpam $LIBS"
9677
9678 else
9679   as_fn_error $? "library 'pam' is required for PAM" "$LINENO" 5
9680 fi
9681
9682 fi
9683
9684 if test "$with_libxml" = yes ; then
9685   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlSaveToBuffer in -lxml2" >&5
9686 $as_echo_n "checking for xmlSaveToBuffer in -lxml2... " >&6; }
9687 if ${ac_cv_lib_xml2_xmlSaveToBuffer+:} false; then :
9688   $as_echo_n "(cached) " >&6
9689 else
9690   ac_check_lib_save_LIBS=$LIBS
9691 LIBS="-lxml2  $LIBS"
9692 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9693 /* end confdefs.h.  */
9694
9695 /* Override any GCC internal prototype to avoid an error.
9696    Use char because int might match the return type of a GCC
9697    builtin and then its argument prototype would still apply.  */
9698 #ifdef __cplusplus
9699 extern "C"
9700 #endif
9701 char xmlSaveToBuffer ();
9702 int
9703 main ()
9704 {
9705 return xmlSaveToBuffer ();
9706   ;
9707   return 0;
9708 }
9709 _ACEOF
9710 if ac_fn_c_try_link "$LINENO"; then :
9711   ac_cv_lib_xml2_xmlSaveToBuffer=yes
9712 else
9713   ac_cv_lib_xml2_xmlSaveToBuffer=no
9714 fi
9715 rm -f core conftest.err conftest.$ac_objext \
9716     conftest$ac_exeext conftest.$ac_ext
9717 LIBS=$ac_check_lib_save_LIBS
9718 fi
9719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlSaveToBuffer" >&5
9720 $as_echo "$ac_cv_lib_xml2_xmlSaveToBuffer" >&6; }
9721 if test "x$ac_cv_lib_xml2_xmlSaveToBuffer" = xyes; then :
9722   cat >>confdefs.h <<_ACEOF
9723 #define HAVE_LIBXML2 1
9724 _ACEOF
9725
9726   LIBS="-lxml2 $LIBS"
9727
9728 else
9729   as_fn_error $? "library 'xml2' (version >= 2.6.23) is required for XML support" "$LINENO" 5
9730 fi
9731
9732 fi
9733
9734 if test "$with_libxslt" = yes ; then
9735   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xsltCleanupGlobals in -lxslt" >&5
9736 $as_echo_n "checking for xsltCleanupGlobals in -lxslt... " >&6; }
9737 if ${ac_cv_lib_xslt_xsltCleanupGlobals+:} false; then :
9738   $as_echo_n "(cached) " >&6
9739 else
9740   ac_check_lib_save_LIBS=$LIBS
9741 LIBS="-lxslt  $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 xsltCleanupGlobals ();
9752 int
9753 main ()
9754 {
9755 return xsltCleanupGlobals ();
9756   ;
9757   return 0;
9758 }
9759 _ACEOF
9760 if ac_fn_c_try_link "$LINENO"; then :
9761   ac_cv_lib_xslt_xsltCleanupGlobals=yes
9762 else
9763   ac_cv_lib_xslt_xsltCleanupGlobals=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_xslt_xsltCleanupGlobals" >&5
9770 $as_echo "$ac_cv_lib_xslt_xsltCleanupGlobals" >&6; }
9771 if test "x$ac_cv_lib_xslt_xsltCleanupGlobals" = xyes; then :
9772   cat >>confdefs.h <<_ACEOF
9773 #define HAVE_LIBXSLT 1
9774 _ACEOF
9775
9776   LIBS="-lxslt $LIBS"
9777
9778 else
9779   as_fn_error $? "library 'xslt' is required for XSLT support" "$LINENO" 5
9780 fi
9781
9782 fi
9783
9784 # Note: We can test for libldap_r only after we know PTHREAD_LIBS
9785 if test "$with_ldap" = yes ; then
9786   _LIBS="$LIBS"
9787   if test "$PORTNAME" != "win32"; then
9788     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap" >&5
9789 $as_echo_n "checking for ldap_bind in -lldap... " >&6; }
9790 if ${ac_cv_lib_ldap_ldap_bind+:} false; then :
9791   $as_echo_n "(cached) " >&6
9792 else
9793   ac_check_lib_save_LIBS=$LIBS
9794 LIBS="-lldap $EXTRA_LDAP_LIBS $LIBS"
9795 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9796 /* end confdefs.h.  */
9797
9798 /* Override any GCC internal prototype to avoid an error.
9799    Use char because int might match the return type of a GCC
9800    builtin and then its argument prototype would still apply.  */
9801 #ifdef __cplusplus
9802 extern "C"
9803 #endif
9804 char ldap_bind ();
9805 int
9806 main ()
9807 {
9808 return ldap_bind ();
9809   ;
9810   return 0;
9811 }
9812 _ACEOF
9813 if ac_fn_c_try_link "$LINENO"; then :
9814   ac_cv_lib_ldap_ldap_bind=yes
9815 else
9816   ac_cv_lib_ldap_ldap_bind=no
9817 fi
9818 rm -f core conftest.err conftest.$ac_objext \
9819     conftest$ac_exeext conftest.$ac_ext
9820 LIBS=$ac_check_lib_save_LIBS
9821 fi
9822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_ldap_bind" >&5
9823 $as_echo "$ac_cv_lib_ldap_ldap_bind" >&6; }
9824 if test "x$ac_cv_lib_ldap_ldap_bind" = xyes; then :
9825   cat >>confdefs.h <<_ACEOF
9826 #define HAVE_LIBLDAP 1
9827 _ACEOF
9828
9829   LIBS="-lldap $LIBS"
9830
9831 else
9832   as_fn_error $? "library 'ldap' is required for LDAP" "$LINENO" 5
9833 fi
9834
9835     LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
9836     if test "$enable_thread_safety" = yes; then
9837       # on some platforms ldap_r fails to link without PTHREAD_LIBS
9838       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_simple_bind in -lldap_r" >&5
9839 $as_echo_n "checking for ldap_simple_bind in -lldap_r... " >&6; }
9840 if ${ac_cv_lib_ldap_r_ldap_simple_bind+:} false; then :
9841   $as_echo_n "(cached) " >&6
9842 else
9843   ac_check_lib_save_LIBS=$LIBS
9844 LIBS="-lldap_r $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
9845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9846 /* end confdefs.h.  */
9847
9848 /* Override any GCC internal prototype to avoid an error.
9849    Use char because int might match the return type of a GCC
9850    builtin and then its argument prototype would still apply.  */
9851 #ifdef __cplusplus
9852 extern "C"
9853 #endif
9854 char ldap_simple_bind ();
9855 int
9856 main ()
9857 {
9858 return ldap_simple_bind ();
9859   ;
9860   return 0;
9861 }
9862 _ACEOF
9863 if ac_fn_c_try_link "$LINENO"; then :
9864   ac_cv_lib_ldap_r_ldap_simple_bind=yes
9865 else
9866   ac_cv_lib_ldap_r_ldap_simple_bind=no
9867 fi
9868 rm -f core conftest.err conftest.$ac_objext \
9869     conftest$ac_exeext conftest.$ac_ext
9870 LIBS=$ac_check_lib_save_LIBS
9871 fi
9872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_r_ldap_simple_bind" >&5
9873 $as_echo "$ac_cv_lib_ldap_r_ldap_simple_bind" >&6; }
9874 if test "x$ac_cv_lib_ldap_r_ldap_simple_bind" = xyes; then :
9875   cat >>confdefs.h <<_ACEOF
9876 #define HAVE_LIBLDAP_R 1
9877 _ACEOF
9878
9879   LIBS="-lldap_r $LIBS"
9880
9881 else
9882   as_fn_error $? "library 'ldap_r' is required for LDAP" "$LINENO" 5
9883 fi
9884
9885       LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
9886     else
9887       LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
9888     fi
9889   else
9890     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lwldap32" >&5
9891 $as_echo_n "checking for ldap_bind in -lwldap32... " >&6; }
9892 if ${ac_cv_lib_wldap32_ldap_bind+:} false; then :
9893   $as_echo_n "(cached) " >&6
9894 else
9895   ac_check_lib_save_LIBS=$LIBS
9896 LIBS="-lwldap32  $LIBS"
9897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9898 /* end confdefs.h.  */
9899
9900 /* Override any GCC internal prototype to avoid an error.
9901    Use char because int might match the return type of a GCC
9902    builtin and then its argument prototype would still apply.  */
9903 #ifdef __cplusplus
9904 extern "C"
9905 #endif
9906 char ldap_bind ();
9907 int
9908 main ()
9909 {
9910 return ldap_bind ();
9911   ;
9912   return 0;
9913 }
9914 _ACEOF
9915 if ac_fn_c_try_link "$LINENO"; then :
9916   ac_cv_lib_wldap32_ldap_bind=yes
9917 else
9918   ac_cv_lib_wldap32_ldap_bind=no
9919 fi
9920 rm -f core conftest.err conftest.$ac_objext \
9921     conftest$ac_exeext conftest.$ac_ext
9922 LIBS=$ac_check_lib_save_LIBS
9923 fi
9924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wldap32_ldap_bind" >&5
9925 $as_echo "$ac_cv_lib_wldap32_ldap_bind" >&6; }
9926 if test "x$ac_cv_lib_wldap32_ldap_bind" = xyes; then :
9927   cat >>confdefs.h <<_ACEOF
9928 #define HAVE_LIBWLDAP32 1
9929 _ACEOF
9930
9931   LIBS="-lwldap32 $LIBS"
9932
9933 else
9934   as_fn_error $? "library 'wldap32' is required for LDAP" "$LINENO" 5
9935 fi
9936
9937     LDAP_LIBS_FE="-lwldap32"
9938     LDAP_LIBS_BE="-lwldap32"
9939   fi
9940   LIBS="$_LIBS"
9941 fi
9942
9943
9944
9945 # for contrib/sepgsql
9946 if test "$with_selinux" = yes; then
9947   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_compute_create_name in -lselinux" >&5
9948 $as_echo_n "checking for security_compute_create_name in -lselinux... " >&6; }
9949 if ${ac_cv_lib_selinux_security_compute_create_name+:} false; then :
9950   $as_echo_n "(cached) " >&6
9951 else
9952   ac_check_lib_save_LIBS=$LIBS
9953 LIBS="-lselinux  $LIBS"
9954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9955 /* end confdefs.h.  */
9956
9957 /* Override any GCC internal prototype to avoid an error.
9958    Use char because int might match the return type of a GCC
9959    builtin and then its argument prototype would still apply.  */
9960 #ifdef __cplusplus
9961 extern "C"
9962 #endif
9963 char security_compute_create_name ();
9964 int
9965 main ()
9966 {
9967 return security_compute_create_name ();
9968   ;
9969   return 0;
9970 }
9971 _ACEOF
9972 if ac_fn_c_try_link "$LINENO"; then :
9973   ac_cv_lib_selinux_security_compute_create_name=yes
9974 else
9975   ac_cv_lib_selinux_security_compute_create_name=no
9976 fi
9977 rm -f core conftest.err conftest.$ac_objext \
9978     conftest$ac_exeext conftest.$ac_ext
9979 LIBS=$ac_check_lib_save_LIBS
9980 fi
9981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_compute_create_name" >&5
9982 $as_echo "$ac_cv_lib_selinux_security_compute_create_name" >&6; }
9983 if test "x$ac_cv_lib_selinux_security_compute_create_name" = xyes; then :
9984   cat >>confdefs.h <<_ACEOF
9985 #define HAVE_LIBSELINUX 1
9986 _ACEOF
9987
9988   LIBS="-lselinux $LIBS"
9989
9990 else
9991   as_fn_error $? "library 'libselinux', version 2.1.10 or newer, is required for SELinux support" "$LINENO" 5
9992 fi
9993
9994 fi
9995
9996 # for contrib/uuid-ossp
9997 if test "$with_uuid" = bsd ; then
9998   # On BSD, the UUID functions are in libc
9999   ac_fn_c_check_func "$LINENO" "uuid_to_string" "ac_cv_func_uuid_to_string"
10000 if test "x$ac_cv_func_uuid_to_string" = xyes; then :
10001   UUID_LIBS=""
10002 else
10003   as_fn_error $? "BSD UUID functions are not present" "$LINENO" 5
10004 fi
10005
10006 elif test "$with_uuid" = e2fs ; then
10007   # On OS X, the UUID functions are in libc
10008   ac_fn_c_check_func "$LINENO" "uuid_generate" "ac_cv_func_uuid_generate"
10009 if test "x$ac_cv_func_uuid_generate" = xyes; then :
10010   UUID_LIBS=""
10011 else
10012   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5
10013 $as_echo_n "checking for uuid_generate in -luuid... " >&6; }
10014 if ${ac_cv_lib_uuid_uuid_generate+:} false; then :
10015   $as_echo_n "(cached) " >&6
10016 else
10017   ac_check_lib_save_LIBS=$LIBS
10018 LIBS="-luuid  $LIBS"
10019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10020 /* end confdefs.h.  */
10021
10022 /* Override any GCC internal prototype to avoid an error.
10023    Use char because int might match the return type of a GCC
10024    builtin and then its argument prototype would still apply.  */
10025 #ifdef __cplusplus
10026 extern "C"
10027 #endif
10028 char uuid_generate ();
10029 int
10030 main ()
10031 {
10032 return uuid_generate ();
10033   ;
10034   return 0;
10035 }
10036 _ACEOF
10037 if ac_fn_c_try_link "$LINENO"; then :
10038   ac_cv_lib_uuid_uuid_generate=yes
10039 else
10040   ac_cv_lib_uuid_uuid_generate=no
10041 fi
10042 rm -f core conftest.err conftest.$ac_objext \
10043     conftest$ac_exeext conftest.$ac_ext
10044 LIBS=$ac_check_lib_save_LIBS
10045 fi
10046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate" >&5
10047 $as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; }
10048 if test "x$ac_cv_lib_uuid_uuid_generate" = xyes; then :
10049   UUID_LIBS="-luuid"
10050 else
10051   as_fn_error $? "library 'uuid' is required for E2FS UUID" "$LINENO" 5
10052 fi
10053
10054 fi
10055
10056 elif test "$with_uuid" = ossp ; then
10057   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -lossp-uuid" >&5
10058 $as_echo_n "checking for uuid_export in -lossp-uuid... " >&6; }
10059 if ${ac_cv_lib_ossp_uuid_uuid_export+:} false; then :
10060   $as_echo_n "(cached) " >&6
10061 else
10062   ac_check_lib_save_LIBS=$LIBS
10063 LIBS="-lossp-uuid  $LIBS"
10064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10065 /* end confdefs.h.  */
10066
10067 /* Override any GCC internal prototype to avoid an error.
10068    Use char because int might match the return type of a GCC
10069    builtin and then its argument prototype would still apply.  */
10070 #ifdef __cplusplus
10071 extern "C"
10072 #endif
10073 char uuid_export ();
10074 int
10075 main ()
10076 {
10077 return uuid_export ();
10078   ;
10079   return 0;
10080 }
10081 _ACEOF
10082 if ac_fn_c_try_link "$LINENO"; then :
10083   ac_cv_lib_ossp_uuid_uuid_export=yes
10084 else
10085   ac_cv_lib_ossp_uuid_uuid_export=no
10086 fi
10087 rm -f core conftest.err conftest.$ac_objext \
10088     conftest$ac_exeext conftest.$ac_ext
10089 LIBS=$ac_check_lib_save_LIBS
10090 fi
10091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossp_uuid_uuid_export" >&5
10092 $as_echo "$ac_cv_lib_ossp_uuid_uuid_export" >&6; }
10093 if test "x$ac_cv_lib_ossp_uuid_uuid_export" = xyes; then :
10094   UUID_LIBS="-lossp-uuid"
10095 else
10096   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -luuid" >&5
10097 $as_echo_n "checking for uuid_export in -luuid... " >&6; }
10098 if ${ac_cv_lib_uuid_uuid_export+:} false; then :
10099   $as_echo_n "(cached) " >&6
10100 else
10101   ac_check_lib_save_LIBS=$LIBS
10102 LIBS="-luuid  $LIBS"
10103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10104 /* end confdefs.h.  */
10105
10106 /* Override any GCC internal prototype to avoid an error.
10107    Use char because int might match the return type of a GCC
10108    builtin and then its argument prototype would still apply.  */
10109 #ifdef __cplusplus
10110 extern "C"
10111 #endif
10112 char uuid_export ();
10113 int
10114 main ()
10115 {
10116 return uuid_export ();
10117   ;
10118   return 0;
10119 }
10120 _ACEOF
10121 if ac_fn_c_try_link "$LINENO"; then :
10122   ac_cv_lib_uuid_uuid_export=yes
10123 else
10124   ac_cv_lib_uuid_uuid_export=no
10125 fi
10126 rm -f core conftest.err conftest.$ac_objext \
10127     conftest$ac_exeext conftest.$ac_ext
10128 LIBS=$ac_check_lib_save_LIBS
10129 fi
10130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_export" >&5
10131 $as_echo "$ac_cv_lib_uuid_uuid_export" >&6; }
10132 if test "x$ac_cv_lib_uuid_uuid_export" = xyes; then :
10133   UUID_LIBS="-luuid"
10134 else
10135   as_fn_error $? "library 'ossp-uuid' or 'uuid' is required for OSSP UUID" "$LINENO" 5
10136 fi
10137
10138 fi
10139
10140 fi
10141
10142
10143
10144 ##
10145 ## Header files
10146 ##
10147
10148 for ac_header in atomic.h crypt.h dld.h fp_class.h getopt.h ieeefp.h ifaddrs.h langinfo.h mbarrier.h poll.h pwd.h sys/ioctl.h sys/ipc.h sys/poll.h sys/pstat.h sys/resource.h sys/select.h sys/sem.h sys/shm.h sys/socket.h sys/sockio.h sys/tas.h sys/time.h sys/un.h termios.h ucred.h utime.h wchar.h wctype.h
10149 do :
10150   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10151 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
10152 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
10153   cat >>confdefs.h <<_ACEOF
10154 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10155 _ACEOF
10156
10157 fi
10158
10159 done
10160
10161
10162 # On BSD, test for net/if.h will fail unless sys/socket.h
10163 # is included first.
10164 for ac_header in net/if.h
10165 do :
10166   ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
10167 #ifdef HAVE_SYS_SOCKET_H
10168 #include <sys/socket.h>
10169 #endif
10170
10171 "
10172 if test "x$ac_cv_header_net_if_h" = xyes; then :
10173   cat >>confdefs.h <<_ACEOF
10174 #define HAVE_NET_IF_H 1
10175 _ACEOF
10176
10177 fi
10178
10179 done
10180
10181
10182 # On OpenBSD, test for sys/ucred.h will fail unless sys/param.h
10183 # is included first.
10184 for ac_header in sys/ucred.h
10185 do :
10186   ac_fn_c_check_header_compile "$LINENO" "sys/ucred.h" "ac_cv_header_sys_ucred_h" "$ac_includes_default
10187 #include <sys/param.h>
10188
10189 "
10190 if test "x$ac_cv_header_sys_ucred_h" = xyes; then :
10191   cat >>confdefs.h <<_ACEOF
10192 #define HAVE_SYS_UCRED_H 1
10193 _ACEOF
10194
10195 fi
10196
10197 done
10198
10199
10200 # At least on IRIX, test for netinet/tcp.h will fail unless
10201 # netinet/in.h is included first.
10202 for ac_header in netinet/in.h
10203 do :
10204   ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
10205 if test "x$ac_cv_header_netinet_in_h" = xyes; then :
10206   cat >>confdefs.h <<_ACEOF
10207 #define HAVE_NETINET_IN_H 1
10208 _ACEOF
10209
10210 fi
10211
10212 done
10213
10214 for ac_header in netinet/tcp.h
10215 do :
10216   ac_fn_c_check_header_compile "$LINENO" "netinet/tcp.h" "ac_cv_header_netinet_tcp_h" "$ac_includes_default
10217 #ifdef HAVE_NETINET_IN_H
10218 #include <netinet/in.h>
10219 #endif
10220
10221 "
10222 if test "x$ac_cv_header_netinet_tcp_h" = xyes; then :
10223   cat >>confdefs.h <<_ACEOF
10224 #define HAVE_NETINET_TCP_H 1
10225 _ACEOF
10226
10227 fi
10228
10229 done
10230
10231
10232 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
10233   for ac_header in readline/readline.h
10234 do :
10235   ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
10236 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
10237   cat >>confdefs.h <<_ACEOF
10238 #define HAVE_READLINE_READLINE_H 1
10239 _ACEOF
10240
10241 else
10242   for ac_header in readline.h
10243 do :
10244   ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
10245 if test "x$ac_cv_header_readline_h" = xyes; then :
10246   cat >>confdefs.h <<_ACEOF
10247 #define HAVE_READLINE_H 1
10248 _ACEOF
10249
10250 else
10251   as_fn_error $? "readline header not found
10252 If you have readline already installed, see config.log for details on the
10253 failure.  It is possible the compiler isn't looking in the proper directory.
10254 Use --without-readline to disable readline support." "$LINENO" 5
10255 fi
10256
10257 done
10258
10259 fi
10260
10261 done
10262
10263   for ac_header in readline/history.h
10264 do :
10265   ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
10266 if test "x$ac_cv_header_readline_history_h" = xyes; then :
10267   cat >>confdefs.h <<_ACEOF
10268 #define HAVE_READLINE_HISTORY_H 1
10269 _ACEOF
10270
10271 else
10272   for ac_header in history.h
10273 do :
10274   ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
10275 if test "x$ac_cv_header_history_h" = xyes; then :
10276   cat >>confdefs.h <<_ACEOF
10277 #define HAVE_HISTORY_H 1
10278 _ACEOF
10279
10280 else
10281   as_fn_error $? "history header not found
10282 If you have readline already installed, see config.log for details on the
10283 failure.  It is possible the compiler isn't looking in the proper directory.
10284 Use --without-readline to disable readline support." "$LINENO" 5
10285 fi
10286
10287 done
10288
10289 fi
10290
10291 done
10292
10293 fi
10294
10295 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
10296 # Some installations of libedit usurp /usr/include/readline/, which seems
10297 # bad practice, since in combined installations readline will have its headers
10298 # there.  We might have to resort to AC_EGREP checks to make sure we found
10299 # the proper header...
10300   for ac_header in editline/readline.h
10301 do :
10302   ac_fn_c_check_header_mongrel "$LINENO" "editline/readline.h" "ac_cv_header_editline_readline_h" "$ac_includes_default"
10303 if test "x$ac_cv_header_editline_readline_h" = xyes; then :
10304   cat >>confdefs.h <<_ACEOF
10305 #define HAVE_EDITLINE_READLINE_H 1
10306 _ACEOF
10307
10308 else
10309   for ac_header in readline.h
10310 do :
10311   ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
10312 if test "x$ac_cv_header_readline_h" = xyes; then :
10313   cat >>confdefs.h <<_ACEOF
10314 #define HAVE_READLINE_H 1
10315 _ACEOF
10316
10317 else
10318   for ac_header in readline/readline.h
10319 do :
10320   ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
10321 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
10322   cat >>confdefs.h <<_ACEOF
10323 #define HAVE_READLINE_READLINE_H 1
10324 _ACEOF
10325
10326 else
10327   as_fn_error $? "readline header not found
10328 If you have libedit already installed, see config.log for details on the
10329 failure.  It is possible the compiler isn't looking in the proper directory.
10330 Use --without-readline to disable libedit support." "$LINENO" 5
10331 fi
10332
10333 done
10334
10335 fi
10336
10337 done
10338
10339 fi
10340
10341 done
10342
10343 # Note: in a libedit installation, history.h is sometimes a dummy, and may
10344 # not be there at all.  Hence, don't complain if not found.  We must check
10345 # though, since in yet other versions it is an independent header.
10346   for ac_header in editline/history.h
10347 do :
10348   ac_fn_c_check_header_mongrel "$LINENO" "editline/history.h" "ac_cv_header_editline_history_h" "$ac_includes_default"
10349 if test "x$ac_cv_header_editline_history_h" = xyes; then :
10350   cat >>confdefs.h <<_ACEOF
10351 #define HAVE_EDITLINE_HISTORY_H 1
10352 _ACEOF
10353
10354 else
10355   for ac_header in history.h
10356 do :
10357   ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
10358 if test "x$ac_cv_header_history_h" = xyes; then :
10359   cat >>confdefs.h <<_ACEOF
10360 #define HAVE_HISTORY_H 1
10361 _ACEOF
10362
10363 else
10364   for ac_header in readline/history.h
10365 do :
10366   ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
10367 if test "x$ac_cv_header_readline_history_h" = xyes; then :
10368   cat >>confdefs.h <<_ACEOF
10369 #define HAVE_READLINE_HISTORY_H 1
10370 _ACEOF
10371
10372 fi
10373
10374 done
10375
10376 fi
10377
10378 done
10379
10380 fi
10381
10382 done
10383
10384 fi
10385
10386 if test "$with_zlib" = yes; then
10387   ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
10388 if test "x$ac_cv_header_zlib_h" = xyes; then :
10389
10390 else
10391   as_fn_error $? "zlib header not found
10392 If you have zlib already installed, see config.log for details on the
10393 failure.  It is possible the compiler isn't looking in the proper directory.
10394 Use --without-zlib to disable zlib support." "$LINENO" 5
10395 fi
10396
10397
10398 fi
10399
10400 if test "$with_gssapi" = yes ; then
10401   for ac_header in gssapi/gssapi.h
10402 do :
10403   ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi.h" "ac_cv_header_gssapi_gssapi_h" "$ac_includes_default"
10404 if test "x$ac_cv_header_gssapi_gssapi_h" = xyes; then :
10405   cat >>confdefs.h <<_ACEOF
10406 #define HAVE_GSSAPI_GSSAPI_H 1
10407 _ACEOF
10408
10409 else
10410   for ac_header in gssapi.h
10411 do :
10412   ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
10413 if test "x$ac_cv_header_gssapi_h" = xyes; then :
10414   cat >>confdefs.h <<_ACEOF
10415 #define HAVE_GSSAPI_H 1
10416 _ACEOF
10417
10418 else
10419   as_fn_error $? "gssapi.h header file is required for GSSAPI" "$LINENO" 5
10420 fi
10421
10422 done
10423
10424 fi
10425
10426 done
10427
10428 fi
10429
10430 if test "$with_openssl" = yes ; then
10431   ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
10432 if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
10433
10434 else
10435   as_fn_error $? "header file <openssl/ssl.h> is required for OpenSSL" "$LINENO" 5
10436 fi
10437
10438
10439   ac_fn_c_check_header_mongrel "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default"
10440 if test "x$ac_cv_header_openssl_err_h" = xyes; then :
10441
10442 else
10443   as_fn_error $? "header file <openssl/err.h> is required for OpenSSL" "$LINENO" 5
10444 fi
10445
10446
10447 fi
10448
10449 if test "$with_pam" = yes ; then
10450   for ac_header in security/pam_appl.h
10451 do :
10452   ac_fn_c_check_header_mongrel "$LINENO" "security/pam_appl.h" "ac_cv_header_security_pam_appl_h" "$ac_includes_default"
10453 if test "x$ac_cv_header_security_pam_appl_h" = xyes; then :
10454   cat >>confdefs.h <<_ACEOF
10455 #define HAVE_SECURITY_PAM_APPL_H 1
10456 _ACEOF
10457
10458 else
10459   for ac_header in pam/pam_appl.h
10460 do :
10461   ac_fn_c_check_header_mongrel "$LINENO" "pam/pam_appl.h" "ac_cv_header_pam_pam_appl_h" "$ac_includes_default"
10462 if test "x$ac_cv_header_pam_pam_appl_h" = xyes; then :
10463   cat >>confdefs.h <<_ACEOF
10464 #define HAVE_PAM_PAM_APPL_H 1
10465 _ACEOF
10466
10467 else
10468   as_fn_error $? "header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." "$LINENO" 5
10469 fi
10470
10471 done
10472
10473 fi
10474
10475 done
10476
10477 fi
10478
10479 if test "$with_libxml" = yes ; then
10480   ac_fn_c_check_header_mongrel "$LINENO" "libxml/parser.h" "ac_cv_header_libxml_parser_h" "$ac_includes_default"
10481 if test "x$ac_cv_header_libxml_parser_h" = xyes; then :
10482
10483 else
10484   as_fn_error $? "header file <libxml/parser.h> is required for XML support" "$LINENO" 5
10485 fi
10486
10487
10488 fi
10489
10490 if test "$with_libxslt" = yes ; then
10491   ac_fn_c_check_header_mongrel "$LINENO" "libxslt/xslt.h" "ac_cv_header_libxslt_xslt_h" "$ac_includes_default"
10492 if test "x$ac_cv_header_libxslt_xslt_h" = xyes; then :
10493
10494 else
10495   as_fn_error $? "header file <libxslt/xslt.h> is required for XSLT support" "$LINENO" 5
10496 fi
10497
10498
10499 fi
10500
10501 if test "$with_ldap" = yes ; then
10502   if test "$PORTNAME" != "win32"; then
10503      for ac_header in ldap.h
10504 do :
10505   ac_fn_c_check_header_mongrel "$LINENO" "ldap.h" "ac_cv_header_ldap_h" "$ac_includes_default"
10506 if test "x$ac_cv_header_ldap_h" = xyes; then :
10507   cat >>confdefs.h <<_ACEOF
10508 #define HAVE_LDAP_H 1
10509 _ACEOF
10510
10511 else
10512   as_fn_error $? "header file <ldap.h> is required for LDAP" "$LINENO" 5
10513 fi
10514
10515 done
10516
10517      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compatible LDAP implementation" >&5
10518 $as_echo_n "checking for compatible LDAP implementation... " >&6; }
10519 if ${pgac_cv_ldap_safe+:} false; then :
10520   $as_echo_n "(cached) " >&6
10521 else
10522   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10523 /* end confdefs.h.  */
10524 #include <ldap.h>
10525 #if !defined(LDAP_VENDOR_VERSION) || \
10526      (defined(LDAP_API_FEATURE_X_OPENLDAP) && \
10527       LDAP_VENDOR_VERSION >= 20424 && LDAP_VENDOR_VERSION <= 20431)
10528 choke me
10529 #endif
10530 int
10531 main ()
10532 {
10533
10534   ;
10535   return 0;
10536 }
10537 _ACEOF
10538 if ac_fn_c_try_compile "$LINENO"; then :
10539   pgac_cv_ldap_safe=yes
10540 else
10541   pgac_cv_ldap_safe=no
10542 fi
10543 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10544 fi
10545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_ldap_safe" >&5
10546 $as_echo "$pgac_cv_ldap_safe" >&6; }
10547
10548 if test "$pgac_cv_ldap_safe" != yes; then
10549   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
10550 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
10551 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
10552 *** also uses LDAP will crash on exit." >&5
10553 $as_echo "$as_me: WARNING:
10554 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
10555 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
10556 *** also uses LDAP will crash on exit." >&2;}
10557 fi
10558   else
10559      for ac_header in winldap.h
10560 do :
10561   ac_fn_c_check_header_compile "$LINENO" "winldap.h" "ac_cv_header_winldap_h" "$ac_includes_default
10562 #include <windows.h>
10563
10564 "
10565 if test "x$ac_cv_header_winldap_h" = xyes; then :
10566   cat >>confdefs.h <<_ACEOF
10567 #define HAVE_WINLDAP_H 1
10568 _ACEOF
10569
10570 else
10571   as_fn_error $? "header file <winldap.h> is required for LDAP" "$LINENO" 5
10572 fi
10573
10574 done
10575
10576   fi
10577 fi
10578
10579 if test "$with_bonjour" = yes ; then
10580   ac_fn_c_check_header_mongrel "$LINENO" "dns_sd.h" "ac_cv_header_dns_sd_h" "$ac_includes_default"
10581 if test "x$ac_cv_header_dns_sd_h" = xyes; then :
10582
10583 else
10584   as_fn_error $? "header file <dns_sd.h> is required for Bonjour" "$LINENO" 5
10585 fi
10586
10587
10588 fi
10589
10590 # for contrib/uuid-ossp
10591 if test "$with_uuid" = bsd ; then
10592   for ac_header in uuid.h
10593 do :
10594   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
10595 if test "x$ac_cv_header_uuid_h" = xyes; then :
10596   cat >>confdefs.h <<_ACEOF
10597 #define HAVE_UUID_H 1
10598 _ACEOF
10599  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10600 /* end confdefs.h.  */
10601 #include <uuid.h>
10602
10603 _ACEOF
10604 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10605   $EGREP "uuid_to_string" >/dev/null 2>&1; then :
10606
10607 else
10608   as_fn_error $? "header file <uuid.h> does not match BSD UUID library" "$LINENO" 5
10609 fi
10610 rm -f conftest*
10611
10612 else
10613   as_fn_error $? "header file <uuid.h> is required for BSD UUID" "$LINENO" 5
10614 fi
10615
10616 done
10617
10618 elif test "$with_uuid" = e2fs ; then
10619   for ac_header in uuid/uuid.h
10620 do :
10621   ac_fn_c_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
10622 if test "x$ac_cv_header_uuid_uuid_h" = xyes; then :
10623   cat >>confdefs.h <<_ACEOF
10624 #define HAVE_UUID_UUID_H 1
10625 _ACEOF
10626  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10627 /* end confdefs.h.  */
10628 #include <uuid/uuid.h>
10629
10630 _ACEOF
10631 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10632   $EGREP "uuid_generate" >/dev/null 2>&1; then :
10633
10634 else
10635   as_fn_error $? "header file <uuid/uuid.h> does not match E2FS UUID library" "$LINENO" 5
10636 fi
10637 rm -f conftest*
10638
10639 else
10640   for ac_header in uuid.h
10641 do :
10642   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
10643 if test "x$ac_cv_header_uuid_h" = xyes; then :
10644   cat >>confdefs.h <<_ACEOF
10645 #define HAVE_UUID_H 1
10646 _ACEOF
10647  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10648 /* end confdefs.h.  */
10649 #include <uuid.h>
10650
10651 _ACEOF
10652 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10653   $EGREP "uuid_generate" >/dev/null 2>&1; then :
10654
10655 else
10656   as_fn_error $? "header file <uuid.h> does not match E2FS UUID library" "$LINENO" 5
10657 fi
10658 rm -f conftest*
10659
10660 else
10661   as_fn_error $? "header file <uuid/uuid.h> or <uuid.h> is required for E2FS UUID" "$LINENO" 5
10662 fi
10663
10664 done
10665
10666 fi
10667
10668 done
10669
10670 elif test "$with_uuid" = ossp ; then
10671   for ac_header in ossp/uuid.h
10672 do :
10673   ac_fn_c_check_header_mongrel "$LINENO" "ossp/uuid.h" "ac_cv_header_ossp_uuid_h" "$ac_includes_default"
10674 if test "x$ac_cv_header_ossp_uuid_h" = xyes; then :
10675   cat >>confdefs.h <<_ACEOF
10676 #define HAVE_OSSP_UUID_H 1
10677 _ACEOF
10678  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10679 /* end confdefs.h.  */
10680 #include <ossp/uuid.h>
10681
10682 _ACEOF
10683 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10684   $EGREP "uuid_export" >/dev/null 2>&1; then :
10685
10686 else
10687   as_fn_error $? "header file <ossp/uuid.h> does not match OSSP UUID library" "$LINENO" 5
10688 fi
10689 rm -f conftest*
10690
10691 else
10692   for ac_header in uuid.h
10693 do :
10694   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
10695 if test "x$ac_cv_header_uuid_h" = xyes; then :
10696   cat >>confdefs.h <<_ACEOF
10697 #define HAVE_UUID_H 1
10698 _ACEOF
10699  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10700 /* end confdefs.h.  */
10701 #include <uuid.h>
10702
10703 _ACEOF
10704 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10705   $EGREP "uuid_export" >/dev/null 2>&1; then :
10706
10707 else
10708   as_fn_error $? "header file <uuid.h> does not match OSSP UUID library" "$LINENO" 5
10709 fi
10710 rm -f conftest*
10711
10712 else
10713   as_fn_error $? "header file <ossp/uuid.h> or <uuid.h> is required for OSSP UUID" "$LINENO" 5
10714 fi
10715
10716 done
10717
10718 fi
10719
10720 done
10721
10722 fi
10723
10724 if test "$PORTNAME" = "win32" ; then
10725    for ac_header in crtdefs.h
10726 do :
10727   ac_fn_c_check_header_mongrel "$LINENO" "crtdefs.h" "ac_cv_header_crtdefs_h" "$ac_includes_default"
10728 if test "x$ac_cv_header_crtdefs_h" = xyes; then :
10729   cat >>confdefs.h <<_ACEOF
10730 #define HAVE_CRTDEFS_H 1
10731 _ACEOF
10732
10733 fi
10734
10735 done
10736
10737 fi
10738
10739 ##
10740 ## Types, structures, compiler characteristics
10741 ##
10742
10743   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
10744 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
10745 if ${ac_cv_c_bigendian+:} false; then :
10746   $as_echo_n "(cached) " >&6
10747 else
10748   ac_cv_c_bigendian=unknown
10749     # See if we're dealing with a universal compiler.
10750     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10751 /* end confdefs.h.  */
10752 #ifndef __APPLE_CC__
10753                not a universal capable compiler
10754              #endif
10755              typedef int dummy;
10756
10757 _ACEOF
10758 if ac_fn_c_try_compile "$LINENO"; then :
10759
10760         # Check for potential -arch flags.  It is not universal unless
10761         # there are at least two -arch flags with different values.
10762         ac_arch=
10763         ac_prev=
10764         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
10765          if test -n "$ac_prev"; then
10766            case $ac_word in
10767              i?86 | x86_64 | ppc | ppc64)
10768                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
10769                  ac_arch=$ac_word
10770                else
10771                  ac_cv_c_bigendian=universal
10772                  break
10773                fi
10774                ;;
10775            esac
10776            ac_prev=
10777          elif test "x$ac_word" = "x-arch"; then
10778            ac_prev=arch
10779          fi
10780        done
10781 fi
10782 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10783     if test $ac_cv_c_bigendian = unknown; then
10784       # See if sys/param.h defines the BYTE_ORDER macro.
10785       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10786 /* end confdefs.h.  */
10787 #include <sys/types.h>
10788              #include <sys/param.h>
10789
10790 int
10791 main ()
10792 {
10793 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
10794                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
10795                      && LITTLE_ENDIAN)
10796               bogus endian macros
10797              #endif
10798
10799   ;
10800   return 0;
10801 }
10802 _ACEOF
10803 if ac_fn_c_try_compile "$LINENO"; then :
10804   # It does; now see whether it defined to BIG_ENDIAN or not.
10805          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10806 /* end confdefs.h.  */
10807 #include <sys/types.h>
10808                 #include <sys/param.h>
10809
10810 int
10811 main ()
10812 {
10813 #if BYTE_ORDER != BIG_ENDIAN
10814                  not big endian
10815                 #endif
10816
10817   ;
10818   return 0;
10819 }
10820 _ACEOF
10821 if ac_fn_c_try_compile "$LINENO"; then :
10822   ac_cv_c_bigendian=yes
10823 else
10824   ac_cv_c_bigendian=no
10825 fi
10826 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10827 fi
10828 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10829     fi
10830     if test $ac_cv_c_bigendian = unknown; then
10831       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
10832       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10833 /* end confdefs.h.  */
10834 #include <limits.h>
10835
10836 int
10837 main ()
10838 {
10839 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
10840               bogus endian macros
10841              #endif
10842
10843   ;
10844   return 0;
10845 }
10846 _ACEOF
10847 if ac_fn_c_try_compile "$LINENO"; then :
10848   # It does; now see whether it defined to _BIG_ENDIAN or not.
10849          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10850 /* end confdefs.h.  */
10851 #include <limits.h>
10852
10853 int
10854 main ()
10855 {
10856 #ifndef _BIG_ENDIAN
10857                  not big endian
10858                 #endif
10859
10860   ;
10861   return 0;
10862 }
10863 _ACEOF
10864 if ac_fn_c_try_compile "$LINENO"; then :
10865   ac_cv_c_bigendian=yes
10866 else
10867   ac_cv_c_bigendian=no
10868 fi
10869 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10870 fi
10871 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10872     fi
10873     if test $ac_cv_c_bigendian = unknown; then
10874       # Compile a test program.
10875       if test "$cross_compiling" = yes; then :
10876   # Try to guess by grepping values from an object file.
10877          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10878 /* end confdefs.h.  */
10879 short int ascii_mm[] =
10880                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
10881                 short int ascii_ii[] =
10882                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
10883                 int use_ascii (int i) {
10884                   return ascii_mm[i] + ascii_ii[i];
10885                 }
10886                 short int ebcdic_ii[] =
10887                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
10888                 short int ebcdic_mm[] =
10889                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
10890                 int use_ebcdic (int i) {
10891                   return ebcdic_mm[i] + ebcdic_ii[i];
10892                 }
10893                 extern int foo;
10894
10895 int
10896 main ()
10897 {
10898 return use_ascii (foo) == use_ebcdic (foo);
10899   ;
10900   return 0;
10901 }
10902 _ACEOF
10903 if ac_fn_c_try_compile "$LINENO"; then :
10904   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
10905               ac_cv_c_bigendian=yes
10906             fi
10907             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
10908               if test "$ac_cv_c_bigendian" = unknown; then
10909                 ac_cv_c_bigendian=no
10910               else
10911                 # finding both strings is unlikely to happen, but who knows?
10912                 ac_cv_c_bigendian=unknown
10913               fi
10914             fi
10915 fi
10916 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10917 else
10918   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10919 /* end confdefs.h.  */
10920 $ac_includes_default
10921 int
10922 main ()
10923 {
10924
10925              /* Are we little or big endian?  From Harbison&Steele.  */
10926              union
10927              {
10928                long int l;
10929                char c[sizeof (long int)];
10930              } u;
10931              u.l = 1;
10932              return u.c[sizeof (long int) - 1] == 1;
10933
10934   ;
10935   return 0;
10936 }
10937 _ACEOF
10938 if ac_fn_c_try_run "$LINENO"; then :
10939   ac_cv_c_bigendian=no
10940 else
10941   ac_cv_c_bigendian=yes
10942 fi
10943 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10944   conftest.$ac_objext conftest.beam conftest.$ac_ext
10945 fi
10946
10947     fi
10948 fi
10949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
10950 $as_echo "$ac_cv_c_bigendian" >&6; }
10951  case $ac_cv_c_bigendian in #(
10952    yes)
10953      $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
10954 ;; #(
10955    no)
10956       ;; #(
10957    universal)
10958
10959 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
10960
10961      ;; #(
10962    *)
10963      as_fn_error $? "unknown endianness
10964  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
10965  esac
10966
10967 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
10968 $as_echo_n "checking for inline... " >&6; }
10969 if ${ac_cv_c_inline+:} false; then :
10970   $as_echo_n "(cached) " >&6
10971 else
10972   ac_cv_c_inline=no
10973 for ac_kw in inline __inline__ __inline; do
10974   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10975 /* end confdefs.h.  */
10976 #ifndef __cplusplus
10977 typedef int foo_t;
10978 static $ac_kw foo_t static_foo () {return 0; }
10979 $ac_kw foo_t foo () {return 0; }
10980 #endif
10981
10982 _ACEOF
10983 if ac_fn_c_try_compile "$LINENO"; then :
10984   ac_cv_c_inline=$ac_kw
10985 fi
10986 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10987   test "$ac_cv_c_inline" != no && break
10988 done
10989
10990 fi
10991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
10992 $as_echo "$ac_cv_c_inline" >&6; }
10993
10994 case $ac_cv_c_inline in
10995   inline | yes) ;;
10996   *)
10997     case $ac_cv_c_inline in
10998       no) ac_val=;;
10999       *) ac_val=$ac_cv_c_inline;;
11000     esac
11001     cat >>confdefs.h <<_ACEOF
11002 #ifndef __cplusplus
11003 #define inline $ac_val
11004 #endif
11005 _ACEOF
11006     ;;
11007 esac
11008
11009 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for printf format archetype" >&5
11010 $as_echo_n "checking for printf format archetype... " >&6; }
11011 if ${pgac_cv_printf_archetype+:} false; then :
11012   $as_echo_n "(cached) " >&6
11013 else
11014   ac_save_c_werror_flag=$ac_c_werror_flag
11015 ac_c_werror_flag=yes
11016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11017 /* end confdefs.h.  */
11018 extern int
11019 pgac_write(int ignore, const char *fmt,...)
11020 __attribute__((format(gnu_printf, 2, 3)));
11021 int
11022 main ()
11023 {
11024
11025   ;
11026   return 0;
11027 }
11028 _ACEOF
11029 if ac_fn_c_try_compile "$LINENO"; then :
11030   pgac_cv_printf_archetype=gnu_printf
11031 else
11032   pgac_cv_printf_archetype=printf
11033 fi
11034 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11035 ac_c_werror_flag=$ac_save_c_werror_flag
11036 fi
11037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_printf_archetype" >&5
11038 $as_echo "$pgac_cv_printf_archetype" >&6; }
11039
11040 cat >>confdefs.h <<_ACEOF
11041 #define PG_PRINTF_ATTRIBUTE $pgac_cv_printf_archetype
11042 _ACEOF
11043
11044
11045
11046   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array members" >&5
11047 $as_echo_n "checking for flexible array members... " >&6; }
11048 if ${ac_cv_c_flexmember+:} false; then :
11049   $as_echo_n "(cached) " >&6
11050 else
11051   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11052 /* end confdefs.h.  */
11053 #include <stdlib.h>
11054             #include <stdio.h>
11055             #include <stddef.h>
11056             struct s { int n; double d[]; };
11057 int
11058 main ()
11059 {
11060 int m = getchar ();
11061             struct s *p = malloc (offsetof (struct s, d)
11062                                   + m * sizeof (double));
11063             p->d[0] = 0.0;
11064             return p->d != (double *) NULL;
11065   ;
11066   return 0;
11067 }
11068 _ACEOF
11069 if ac_fn_c_try_compile "$LINENO"; then :
11070   ac_cv_c_flexmember=yes
11071 else
11072   ac_cv_c_flexmember=no
11073 fi
11074 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11075 fi
11076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
11077 $as_echo "$ac_cv_c_flexmember" >&6; }
11078   if test $ac_cv_c_flexmember = yes; then
11079
11080 $as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
11081
11082   else
11083     $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
11084
11085   fi
11086
11087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signed types" >&5
11088 $as_echo_n "checking for signed types... " >&6; }
11089 if ${pgac_cv_c_signed+:} false; then :
11090   $as_echo_n "(cached) " >&6
11091 else
11092   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11093 /* end confdefs.h.  */
11094
11095 int
11096 main ()
11097 {
11098 signed char c; signed short s; signed int i;
11099   ;
11100   return 0;
11101 }
11102 _ACEOF
11103 if ac_fn_c_try_compile "$LINENO"; then :
11104   pgac_cv_c_signed=yes
11105 else
11106   pgac_cv_c_signed=no
11107 fi
11108 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11109 fi
11110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_signed" >&5
11111 $as_echo "$pgac_cv_c_signed" >&6; }
11112 if test x"$pgac_cv_c_signed" = xno ; then
11113
11114 $as_echo "#define signed /**/" >>confdefs.h
11115
11116 fi
11117 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __func__" >&5
11118 $as_echo_n "checking for __func__... " >&6; }
11119 if ${pgac_cv_funcname_func_support+:} false; then :
11120   $as_echo_n "(cached) " >&6
11121 else
11122   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11123 /* end confdefs.h.  */
11124 #include <stdio.h>
11125 int
11126 main ()
11127 {
11128 printf("%s\n", __func__);
11129   ;
11130   return 0;
11131 }
11132 _ACEOF
11133 if ac_fn_c_try_compile "$LINENO"; then :
11134   pgac_cv_funcname_func_support=yes
11135 else
11136   pgac_cv_funcname_func_support=no
11137 fi
11138 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11139 fi
11140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_func_support" >&5
11141 $as_echo "$pgac_cv_funcname_func_support" >&6; }
11142 if test x"$pgac_cv_funcname_func_support" = xyes ; then
11143
11144 $as_echo "#define HAVE_FUNCNAME__FUNC 1" >>confdefs.h
11145
11146 else
11147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __FUNCTION__" >&5
11148 $as_echo_n "checking for __FUNCTION__... " >&6; }
11149 if ${pgac_cv_funcname_function_support+:} false; then :
11150   $as_echo_n "(cached) " >&6
11151 else
11152   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11153 /* end confdefs.h.  */
11154 #include <stdio.h>
11155 int
11156 main ()
11157 {
11158 printf("%s\n", __FUNCTION__);
11159   ;
11160   return 0;
11161 }
11162 _ACEOF
11163 if ac_fn_c_try_compile "$LINENO"; then :
11164   pgac_cv_funcname_function_support=yes
11165 else
11166   pgac_cv_funcname_function_support=no
11167 fi
11168 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11169 fi
11170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_function_support" >&5
11171 $as_echo "$pgac_cv_funcname_function_support" >&6; }
11172 if test x"$pgac_cv_funcname_function_support" = xyes ; then
11173
11174 $as_echo "#define HAVE_FUNCNAME__FUNCTION 1" >>confdefs.h
11175
11176 fi
11177 fi
11178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Static_assert" >&5
11179 $as_echo_n "checking for _Static_assert... " >&6; }
11180 if ${pgac_cv__static_assert+:} false; then :
11181   $as_echo_n "(cached) " >&6
11182 else
11183   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11184 /* end confdefs.h.  */
11185
11186 int
11187 main ()
11188 {
11189 ({ _Static_assert(1, "foo"); })
11190   ;
11191   return 0;
11192 }
11193 _ACEOF
11194 if ac_fn_c_try_link "$LINENO"; then :
11195   pgac_cv__static_assert=yes
11196 else
11197   pgac_cv__static_assert=no
11198 fi
11199 rm -f core conftest.err conftest.$ac_objext \
11200     conftest$ac_exeext conftest.$ac_ext
11201 fi
11202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__static_assert" >&5
11203 $as_echo "$pgac_cv__static_assert" >&6; }
11204 if test x"$pgac_cv__static_assert" = xyes ; then
11205
11206 $as_echo "#define HAVE__STATIC_ASSERT 1" >>confdefs.h
11207
11208 fi
11209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_types_compatible_p" >&5
11210 $as_echo_n "checking for __builtin_types_compatible_p... " >&6; }
11211 if ${pgac_cv__types_compatible+:} 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  int x; static int y[__builtin_types_compatible_p(__typeof__(x), int)];
11221   ;
11222   return 0;
11223 }
11224 _ACEOF
11225 if ac_fn_c_try_compile "$LINENO"; then :
11226   pgac_cv__types_compatible=yes
11227 else
11228   pgac_cv__types_compatible=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__types_compatible" >&5
11233 $as_echo "$pgac_cv__types_compatible" >&6; }
11234 if test x"$pgac_cv__types_compatible" = xyes ; then
11235
11236 $as_echo "#define HAVE__BUILTIN_TYPES_COMPATIBLE_P 1" >>confdefs.h
11237
11238 fi
11239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap32" >&5
11240 $as_echo_n "checking for __builtin_bswap32... " >&6; }
11241 if ${pgac_cv__builtin_bswap32+:} false; then :
11242   $as_echo_n "(cached) " >&6
11243 else
11244   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11245 /* end confdefs.h.  */
11246 static unsigned long int x = __builtin_bswap32(0xaabbccdd);
11247
11248 _ACEOF
11249 if ac_fn_c_try_compile "$LINENO"; then :
11250   pgac_cv__builtin_bswap32=yes
11251 else
11252   pgac_cv__builtin_bswap32=no
11253 fi
11254 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11255 fi
11256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap32" >&5
11257 $as_echo "$pgac_cv__builtin_bswap32" >&6; }
11258 if test x"$pgac_cv__builtin_bswap32" = xyes ; then
11259
11260 $as_echo "#define HAVE__BUILTIN_BSWAP32 1" >>confdefs.h
11261
11262 fi
11263 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_constant_p" >&5
11264 $as_echo_n "checking for __builtin_constant_p... " >&6; }
11265 if ${pgac_cv__builtin_constant_p+:} false; then :
11266   $as_echo_n "(cached) " >&6
11267 else
11268   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11269 /* end confdefs.h.  */
11270 static int x; static int y[__builtin_constant_p(x) ? x : 1];
11271
11272 _ACEOF
11273 if ac_fn_c_try_compile "$LINENO"; then :
11274   pgac_cv__builtin_constant_p=yes
11275 else
11276   pgac_cv__builtin_constant_p=no
11277 fi
11278 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11279 fi
11280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_constant_p" >&5
11281 $as_echo "$pgac_cv__builtin_constant_p" >&6; }
11282 if test x"$pgac_cv__builtin_constant_p" = xyes ; then
11283
11284 $as_echo "#define HAVE__BUILTIN_CONSTANT_P 1" >>confdefs.h
11285
11286 fi
11287 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unreachable" >&5
11288 $as_echo_n "checking for __builtin_unreachable... " >&6; }
11289 if ${pgac_cv__builtin_unreachable+:} false; then :
11290   $as_echo_n "(cached) " >&6
11291 else
11292   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11293 /* end confdefs.h.  */
11294
11295 int
11296 main ()
11297 {
11298 __builtin_unreachable();
11299   ;
11300   return 0;
11301 }
11302 _ACEOF
11303 if ac_fn_c_try_link "$LINENO"; then :
11304   pgac_cv__builtin_unreachable=yes
11305 else
11306   pgac_cv__builtin_unreachable=no
11307 fi
11308 rm -f core conftest.err conftest.$ac_objext \
11309     conftest$ac_exeext conftest.$ac_ext
11310 fi
11311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_unreachable" >&5
11312 $as_echo "$pgac_cv__builtin_unreachable" >&6; }
11313 if test x"$pgac_cv__builtin_unreachable" = xyes ; then
11314
11315 $as_echo "#define HAVE__BUILTIN_UNREACHABLE 1" >>confdefs.h
11316
11317 fi
11318 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __VA_ARGS__" >&5
11319 $as_echo_n "checking for __VA_ARGS__... " >&6; }
11320 if ${pgac_cv__va_args+:} false; then :
11321   $as_echo_n "(cached) " >&6
11322 else
11323   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11324 /* end confdefs.h.  */
11325 #include <stdio.h>
11326 int
11327 main ()
11328 {
11329 #define debug(...) fprintf(stderr, __VA_ARGS__)
11330 debug("%s", "blarg");
11331
11332   ;
11333   return 0;
11334 }
11335 _ACEOF
11336 if ac_fn_c_try_compile "$LINENO"; then :
11337   pgac_cv__va_args=yes
11338 else
11339   pgac_cv__va_args=no
11340 fi
11341 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11342 fi
11343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__va_args" >&5
11344 $as_echo "$pgac_cv__va_args" >&6; }
11345 if test x"$pgac_cv__va_args" = xyes ; then
11346
11347 $as_echo "#define HAVE__VA_ARGS 1" >>confdefs.h
11348
11349 fi
11350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
11351 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
11352 if ${ac_cv_struct_tm+:} false; then :
11353   $as_echo_n "(cached) " >&6
11354 else
11355   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11356 /* end confdefs.h.  */
11357 #include <sys/types.h>
11358 #include <time.h>
11359
11360 int
11361 main ()
11362 {
11363 struct tm tm;
11364                                      int *p = &tm.tm_sec;
11365                                      return !p;
11366   ;
11367   return 0;
11368 }
11369 _ACEOF
11370 if ac_fn_c_try_compile "$LINENO"; then :
11371   ac_cv_struct_tm=time.h
11372 else
11373   ac_cv_struct_tm=sys/time.h
11374 fi
11375 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11376 fi
11377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
11378 $as_echo "$ac_cv_struct_tm" >&6; }
11379 if test $ac_cv_struct_tm = sys/time.h; then
11380
11381 $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
11382
11383 fi
11384
11385 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
11386 #include <$ac_cv_struct_tm>
11387
11388 "
11389 if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
11390
11391 cat >>confdefs.h <<_ACEOF
11392 #define HAVE_STRUCT_TM_TM_ZONE 1
11393 _ACEOF
11394
11395
11396 fi
11397
11398 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11399
11400 $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
11401
11402 fi
11403 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11404 $as_echo_n "checking for tzname... " >&6; }
11405 if ${ac_cv_var_tzname+:} false; then :
11406   $as_echo_n "(cached) " >&6
11407 else
11408   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11409 /* end confdefs.h.  */
11410 #include <time.h>
11411 #ifndef tzname /* For SGI.  */
11412 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
11413 #endif
11414
11415 int
11416 main ()
11417 {
11418 atoi(*tzname);
11419   ;
11420   return 0;
11421 }
11422 _ACEOF
11423 if ac_fn_c_try_link "$LINENO"; then :
11424   ac_cv_var_tzname=yes
11425 else
11426   ac_cv_var_tzname=no
11427 fi
11428 rm -f core conftest.err conftest.$ac_objext \
11429     conftest$ac_exeext conftest.$ac_ext
11430 fi
11431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11432 $as_echo "$ac_cv_var_tzname" >&6; }
11433 if test $ac_cv_var_tzname = yes; then
11434
11435 $as_echo "#define HAVE_TZNAME 1" >>confdefs.h
11436
11437 fi
11438
11439 ac_fn_c_check_type "$LINENO" "union semun" "ac_cv_type_union_semun" "#include <sys/types.h>
11440 #include <sys/ipc.h>
11441 #include <sys/sem.h>
11442 "
11443 if test "x$ac_cv_type_union_semun" = xyes; then :
11444
11445 cat >>confdefs.h <<_ACEOF
11446 #define HAVE_UNION_SEMUN 1
11447 _ACEOF
11448
11449
11450 fi
11451
11452 ac_fn_c_check_type "$LINENO" "struct sockaddr_un" "ac_cv_type_struct_sockaddr_un" "#include <sys/types.h>
11453 #ifdef HAVE_SYS_UN_H
11454 #include <sys/un.h>
11455 #endif
11456
11457 "
11458 if test "x$ac_cv_type_struct_sockaddr_un" = xyes; then :
11459
11460 $as_echo "#define HAVE_UNIX_SOCKETS 1" >>confdefs.h
11461
11462 fi
11463
11464 ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "#include <sys/types.h>
11465 #ifdef HAVE_SYS_SOCKET_H
11466 #include <sys/socket.h>
11467 #endif
11468
11469 "
11470 if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
11471
11472 cat >>confdefs.h <<_ACEOF
11473 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
11474 _ACEOF
11475
11476
11477 fi
11478
11479 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
11480 #ifdef HAVE_SYS_SOCKET_H
11481 #include <sys/socket.h>
11482 #endif
11483
11484 "
11485 if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then :
11486
11487 cat >>confdefs.h <<_ACEOF
11488 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
11489 _ACEOF
11490
11491
11492 fi
11493 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_family" "ac_cv_member_struct_sockaddr_storage___ss_family" "#include <sys/types.h>
11494 #ifdef HAVE_SYS_SOCKET_H
11495 #include <sys/socket.h>
11496 #endif
11497
11498 "
11499 if test "x$ac_cv_member_struct_sockaddr_storage___ss_family" = xyes; then :
11500
11501 cat >>confdefs.h <<_ACEOF
11502 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1
11503 _ACEOF
11504
11505
11506 fi
11507 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_len" "ac_cv_member_struct_sockaddr_storage_ss_len" "#include <sys/types.h>
11508 #ifdef HAVE_SYS_SOCKET_H
11509 #include <sys/socket.h>
11510 #endif
11511
11512 "
11513 if test "x$ac_cv_member_struct_sockaddr_storage_ss_len" = xyes; then :
11514
11515 cat >>confdefs.h <<_ACEOF
11516 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1
11517 _ACEOF
11518
11519
11520 fi
11521 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_len" "ac_cv_member_struct_sockaddr_storage___ss_len" "#include <sys/types.h>
11522 #ifdef HAVE_SYS_SOCKET_H
11523 #include <sys/socket.h>
11524 #endif
11525
11526 "
11527 if test "x$ac_cv_member_struct_sockaddr_storage___ss_len" = xyes; then :
11528
11529 cat >>confdefs.h <<_ACEOF
11530 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN 1
11531 _ACEOF
11532
11533
11534 fi
11535 ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/types.h>
11536 #ifdef HAVE_SYS_SOCKET_H
11537 #include <sys/socket.h>
11538 #endif
11539
11540 "
11541 if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
11542
11543 cat >>confdefs.h <<_ACEOF
11544 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
11545 _ACEOF
11546
11547
11548 fi
11549
11550 ac_fn_c_check_type "$LINENO" "struct addrinfo" "ac_cv_type_struct_addrinfo" "#include <sys/types.h>
11551 #include <sys/socket.h>
11552 #include <netdb.h>
11553
11554 "
11555 if test "x$ac_cv_type_struct_addrinfo" = xyes; then :
11556
11557 cat >>confdefs.h <<_ACEOF
11558 #define HAVE_STRUCT_ADDRINFO 1
11559 _ACEOF
11560
11561
11562 fi
11563
11564
11565   ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
11566 if test "x$ac_cv_type_intptr_t" = xyes; then :
11567
11568 $as_echo "#define HAVE_INTPTR_T 1" >>confdefs.h
11569
11570 else
11571   for ac_type in 'int' 'long int' 'long long int'; do
11572        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11573 /* end confdefs.h.  */
11574 $ac_includes_default
11575 int
11576 main ()
11577 {
11578 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
11579 test_array [0] = 0;
11580 return test_array [0];
11581
11582   ;
11583   return 0;
11584 }
11585 _ACEOF
11586 if ac_fn_c_try_compile "$LINENO"; then :
11587
11588 cat >>confdefs.h <<_ACEOF
11589 #define intptr_t $ac_type
11590 _ACEOF
11591
11592           ac_type=
11593 fi
11594 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11595        test -z "$ac_type" && break
11596      done
11597 fi
11598
11599
11600
11601   ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
11602 if test "x$ac_cv_type_uintptr_t" = xyes; then :
11603
11604 $as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h
11605
11606 else
11607   for ac_type in 'unsigned int' 'unsigned long int' \
11608         'unsigned long long int'; do
11609        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11610 /* end confdefs.h.  */
11611 $ac_includes_default
11612 int
11613 main ()
11614 {
11615 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
11616 test_array [0] = 0;
11617 return test_array [0];
11618
11619   ;
11620   return 0;
11621 }
11622 _ACEOF
11623 if ac_fn_c_try_compile "$LINENO"; then :
11624
11625 cat >>confdefs.h <<_ACEOF
11626 #define uintptr_t $ac_type
11627 _ACEOF
11628
11629           ac_type=
11630 fi
11631 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11632        test -z "$ac_type" && break
11633      done
11634 fi
11635
11636
11637
11638   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
11639 $as_echo_n "checking for unsigned long long int... " >&6; }
11640 if ${ac_cv_type_unsigned_long_long_int+:} false; then :
11641   $as_echo_n "(cached) " >&6
11642 else
11643   ac_cv_type_unsigned_long_long_int=yes
11644      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
11645        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11646 /* end confdefs.h.  */
11647
11648   /* For now, do not test the preprocessor; as of 2007 there are too many
11649          implementations with broken preprocessors.  Perhaps this can
11650          be revisited in 2012.  In the meantime, code should not expect
11651          #if to work with literals wider than 32 bits.  */
11652       /* Test literals.  */
11653       long long int ll = 9223372036854775807ll;
11654       long long int nll = -9223372036854775807LL;
11655       unsigned long long int ull = 18446744073709551615ULL;
11656       /* Test constant expressions.   */
11657       typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
11658                      ? 1 : -1)];
11659       typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
11660                      ? 1 : -1)];
11661       int i = 63;
11662 int
11663 main ()
11664 {
11665 /* Test availability of runtime routines for shift and division.  */
11666       long long int llmax = 9223372036854775807ll;
11667       unsigned long long int ullmax = 18446744073709551615ull;
11668       return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
11669               | (llmax / ll) | (llmax % ll)
11670               | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
11671               | (ullmax / ull) | (ullmax % ull));
11672   ;
11673   return 0;
11674 }
11675
11676 _ACEOF
11677 if ac_fn_c_try_link "$LINENO"; then :
11678
11679 else
11680   ac_cv_type_unsigned_long_long_int=no
11681 fi
11682 rm -f core conftest.err conftest.$ac_objext \
11683     conftest$ac_exeext conftest.$ac_ext
11684      fi
11685 fi
11686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
11687 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
11688   if test $ac_cv_type_unsigned_long_long_int = yes; then
11689
11690 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
11691
11692   fi
11693
11694
11695
11696   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
11697 $as_echo_n "checking for long long int... " >&6; }
11698 if ${ac_cv_type_long_long_int+:} false; then :
11699   $as_echo_n "(cached) " >&6
11700 else
11701   ac_cv_type_long_long_int=yes
11702       if test "x${ac_cv_prog_cc_c99-no}" = xno; then
11703         ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
11704         if test $ac_cv_type_long_long_int = yes; then
11705                                   if test "$cross_compiling" = yes; then :
11706   :
11707 else
11708   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11709 /* end confdefs.h.  */
11710 #include <limits.h>
11711                  #ifndef LLONG_MAX
11712                  # define HALF \
11713                           (1LL << (sizeof (long long int) * CHAR_BIT - 2))
11714                  # define LLONG_MAX (HALF - 1 + HALF)
11715                  #endif
11716 int
11717 main ()
11718 {
11719 long long int n = 1;
11720                  int i;
11721                  for (i = 0; ; i++)
11722                    {
11723                      long long int m = n << i;
11724                      if (m >> i != n)
11725                        return 1;
11726                      if (LLONG_MAX / 2 < m)
11727                        break;
11728                    }
11729                  return 0;
11730   ;
11731   return 0;
11732 }
11733 _ACEOF
11734 if ac_fn_c_try_run "$LINENO"; then :
11735
11736 else
11737   ac_cv_type_long_long_int=no
11738 fi
11739 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11740   conftest.$ac_objext conftest.beam conftest.$ac_ext
11741 fi
11742
11743         fi
11744       fi
11745 fi
11746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
11747 $as_echo "$ac_cv_type_long_long_int" >&6; }
11748   if test $ac_cv_type_long_long_int = yes; then
11749
11750 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
11751
11752   fi
11753
11754
11755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for locale_t" >&5
11756 $as_echo_n "checking for locale_t... " >&6; }
11757 if ${pgac_cv_type_locale_t+:} false; then :
11758   $as_echo_n "(cached) " >&6
11759 else
11760   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11761 /* end confdefs.h.  */
11762 #include <locale.h>
11763 locale_t x;
11764 int
11765 main ()
11766 {
11767
11768   ;
11769   return 0;
11770 }
11771 _ACEOF
11772 if ac_fn_c_try_compile "$LINENO"; then :
11773   pgac_cv_type_locale_t=yes
11774 else
11775   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11776 /* end confdefs.h.  */
11777 #include <xlocale.h>
11778 locale_t x;
11779 int
11780 main ()
11781 {
11782
11783   ;
11784   return 0;
11785 }
11786 _ACEOF
11787 if ac_fn_c_try_compile "$LINENO"; then :
11788   pgac_cv_type_locale_t='yes (in xlocale.h)'
11789 else
11790   pgac_cv_type_locale_t=no
11791 fi
11792 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11793 fi
11794 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11795 fi
11796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_locale_t" >&5
11797 $as_echo "$pgac_cv_type_locale_t" >&6; }
11798 if test "$pgac_cv_type_locale_t" != no; then
11799
11800 $as_echo "#define HAVE_LOCALE_T 1" >>confdefs.h
11801
11802 fi
11803 if test "$pgac_cv_type_locale_t" = 'yes (in xlocale.h)'; then
11804
11805 $as_echo "#define LOCALE_T_IN_XLOCALE 1" >>confdefs.h
11806
11807 fi
11808
11809 ac_fn_c_check_type "$LINENO" "struct cmsgcred" "ac_cv_type_struct_cmsgcred" "#include <sys/socket.h>
11810 #include <sys/param.h>
11811 #ifdef HAVE_SYS_UCRED_H
11812 #include <sys/ucred.h>
11813 #endif
11814 "
11815 if test "x$ac_cv_type_struct_cmsgcred" = xyes; then :
11816
11817 cat >>confdefs.h <<_ACEOF
11818 #define HAVE_STRUCT_CMSGCRED 1
11819 _ACEOF
11820
11821
11822 fi
11823
11824
11825 ac_fn_c_check_type "$LINENO" "struct option" "ac_cv_type_struct_option" "#ifdef HAVE_GETOPT_H
11826 #include <getopt.h>
11827 #endif
11828 "
11829 if test "x$ac_cv_type_struct_option" = xyes; then :
11830
11831 cat >>confdefs.h <<_ACEOF
11832 #define HAVE_STRUCT_OPTION 1
11833 _ACEOF
11834
11835
11836 fi
11837
11838
11839 if test "$with_zlib" = yes; then
11840   # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
11841   # did not).  While we could work around the lack of z_streamp, it
11842   # seems unwise to encourage people to use such old zlib versions...
11843   ac_fn_c_check_type "$LINENO" "z_streamp" "ac_cv_type_z_streamp" "#include <zlib.h>
11844 "
11845 if test "x$ac_cv_type_z_streamp" = xyes; then :
11846
11847 else
11848   as_fn_error $? "zlib version is too old
11849 Use --without-zlib to disable zlib support." "$LINENO" 5
11850 fi
11851
11852 fi
11853
11854 # On PPC, check if assembler supports LWARX instruction's mutex hint bit
11855 case $host_cpu in
11856   ppc*|powerpc*)
11857     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports lwarx hint bit" >&5
11858 $as_echo_n "checking whether assembler supports lwarx hint bit... " >&6; }
11859     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11860 /* end confdefs.h.  */
11861
11862 int
11863 main ()
11864 {
11865 int a = 0; int *p = &a; int r;
11866          __asm__ __volatile__ (" lwarx %0,0,%1,1\n" : "=&r"(r) : "r"(p));
11867   ;
11868   return 0;
11869 }
11870 _ACEOF
11871 if ac_fn_c_try_compile "$LINENO"; then :
11872   pgac_cv_have_ppc_mutex_hint=yes
11873 else
11874   pgac_cv_have_ppc_mutex_hint=no
11875 fi
11876 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11877     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_ppc_mutex_hint" >&5
11878 $as_echo "$pgac_cv_have_ppc_mutex_hint" >&6; }
11879     if test x"$pgac_cv_have_ppc_mutex_hint" = xyes ; then
11880
11881 $as_echo "#define HAVE_PPC_LWARX_MUTEX_HINT 1" >>confdefs.h
11882
11883     fi
11884   ;;
11885 esac
11886
11887 # Check largefile support.  You might think this is a system service not a
11888 # compiler characteristic, but you'd be wrong.  We must check this before
11889 # probing existence of related functions such as fseeko, since the largefile
11890 # defines can affect what is generated for that.
11891 if test "$PORTNAME" != "win32"; then
11892    # Check whether --enable-largefile was given.
11893 if test "${enable_largefile+set}" = set; then :
11894   enableval=$enable_largefile;
11895 fi
11896
11897 if test "$enable_largefile" != no; then
11898
11899   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
11900 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
11901 if ${ac_cv_sys_largefile_CC+:} false; then :
11902   $as_echo_n "(cached) " >&6
11903 else
11904   ac_cv_sys_largefile_CC=no
11905      if test "$GCC" != yes; then
11906        ac_save_CC=$CC
11907        while :; do
11908          # IRIX 6.2 and later do not support large files by default,
11909          # so use the C compiler's -n32 option if that helps.
11910          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11911 /* end confdefs.h.  */
11912 #include <sys/types.h>
11913  /* Check that off_t can represent 2**63 - 1 correctly.
11914     We can't simply define LARGE_OFF_T to be 9223372036854775807,
11915     since some C++ compilers masquerading as C compilers
11916     incorrectly reject 9223372036854775807.  */
11917 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11918   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11919                        && LARGE_OFF_T % 2147483647 == 1)
11920                       ? 1 : -1];
11921 int
11922 main ()
11923 {
11924
11925   ;
11926   return 0;
11927 }
11928 _ACEOF
11929          if ac_fn_c_try_compile "$LINENO"; then :
11930   break
11931 fi
11932 rm -f core conftest.err conftest.$ac_objext
11933          CC="$CC -n32"
11934          if ac_fn_c_try_compile "$LINENO"; then :
11935   ac_cv_sys_largefile_CC=' -n32'; break
11936 fi
11937 rm -f core conftest.err conftest.$ac_objext
11938          break
11939        done
11940        CC=$ac_save_CC
11941        rm -f conftest.$ac_ext
11942     fi
11943 fi
11944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
11945 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
11946   if test "$ac_cv_sys_largefile_CC" != no; then
11947     CC=$CC$ac_cv_sys_largefile_CC
11948   fi
11949
11950   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
11951 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
11952 if ${ac_cv_sys_file_offset_bits+:} false; then :
11953   $as_echo_n "(cached) " >&6
11954 else
11955   while :; do
11956   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11957 /* end confdefs.h.  */
11958 #include <sys/types.h>
11959  /* Check that off_t can represent 2**63 - 1 correctly.
11960     We can't simply define LARGE_OFF_T to be 9223372036854775807,
11961     since some C++ compilers masquerading as C compilers
11962     incorrectly reject 9223372036854775807.  */
11963 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11964   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11965                        && LARGE_OFF_T % 2147483647 == 1)
11966                       ? 1 : -1];
11967 int
11968 main ()
11969 {
11970
11971   ;
11972   return 0;
11973 }
11974 _ACEOF
11975 if ac_fn_c_try_compile "$LINENO"; then :
11976   ac_cv_sys_file_offset_bits=no; break
11977 fi
11978 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11979   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11980 /* end confdefs.h.  */
11981 #define _FILE_OFFSET_BITS 64
11982 #include <sys/types.h>
11983  /* Check that off_t can represent 2**63 - 1 correctly.
11984     We can't simply define LARGE_OFF_T to be 9223372036854775807,
11985     since some C++ compilers masquerading as C compilers
11986     incorrectly reject 9223372036854775807.  */
11987 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11988   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11989                        && LARGE_OFF_T % 2147483647 == 1)
11990                       ? 1 : -1];
11991 int
11992 main ()
11993 {
11994
11995   ;
11996   return 0;
11997 }
11998 _ACEOF
11999 if ac_fn_c_try_compile "$LINENO"; then :
12000   ac_cv_sys_file_offset_bits=64; break
12001 fi
12002 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12003   ac_cv_sys_file_offset_bits=unknown
12004   break
12005 done
12006 fi
12007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
12008 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
12009 case $ac_cv_sys_file_offset_bits in #(
12010   no | unknown) ;;
12011   *)
12012 cat >>confdefs.h <<_ACEOF
12013 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
12014 _ACEOF
12015 ;;
12016 esac
12017 rm -rf conftest*
12018   if test $ac_cv_sys_file_offset_bits = unknown; then
12019     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
12020 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
12021 if ${ac_cv_sys_large_files+:} false; then :
12022   $as_echo_n "(cached) " >&6
12023 else
12024   while :; do
12025   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12026 /* end confdefs.h.  */
12027 #include <sys/types.h>
12028  /* Check that off_t can represent 2**63 - 1 correctly.
12029     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12030     since some C++ compilers masquerading as C compilers
12031     incorrectly reject 9223372036854775807.  */
12032 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12033   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12034                        && LARGE_OFF_T % 2147483647 == 1)
12035                       ? 1 : -1];
12036 int
12037 main ()
12038 {
12039
12040   ;
12041   return 0;
12042 }
12043 _ACEOF
12044 if ac_fn_c_try_compile "$LINENO"; then :
12045   ac_cv_sys_large_files=no; break
12046 fi
12047 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12048   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12049 /* end confdefs.h.  */
12050 #define _LARGE_FILES 1
12051 #include <sys/types.h>
12052  /* Check that off_t can represent 2**63 - 1 correctly.
12053     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12054     since some C++ compilers masquerading as C compilers
12055     incorrectly reject 9223372036854775807.  */
12056 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12057   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12058                        && LARGE_OFF_T % 2147483647 == 1)
12059                       ? 1 : -1];
12060 int
12061 main ()
12062 {
12063
12064   ;
12065   return 0;
12066 }
12067 _ACEOF
12068 if ac_fn_c_try_compile "$LINENO"; then :
12069   ac_cv_sys_large_files=1; break
12070 fi
12071 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12072   ac_cv_sys_large_files=unknown
12073   break
12074 done
12075 fi
12076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
12077 $as_echo "$ac_cv_sys_large_files" >&6; }
12078 case $ac_cv_sys_large_files in #(
12079   no | unknown) ;;
12080   *)
12081 cat >>confdefs.h <<_ACEOF
12082 #define _LARGE_FILES $ac_cv_sys_large_files
12083 _ACEOF
12084 ;;
12085 esac
12086 rm -rf conftest*
12087   fi
12088
12089
12090 fi
12091
12092
12093 fi
12094
12095 # Check for largefile support (must be after AC_SYS_LARGEFILE)
12096 # The cast to long int works around a bug in the HP C Compiler
12097 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12098 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12099 # This bug is HP SR number 8606223364.
12100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
12101 $as_echo_n "checking size of off_t... " >&6; }
12102 if ${ac_cv_sizeof_off_t+:} false; then :
12103   $as_echo_n "(cached) " >&6
12104 else
12105   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t"        "$ac_includes_default"; then :
12106
12107 else
12108   if test "$ac_cv_type_off_t" = yes; then
12109      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12110 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12111 as_fn_error 77 "cannot compute sizeof (off_t)
12112 See \`config.log' for more details" "$LINENO" 5; }
12113    else
12114      ac_cv_sizeof_off_t=0
12115    fi
12116 fi
12117
12118 fi
12119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
12120 $as_echo "$ac_cv_sizeof_off_t" >&6; }
12121
12122
12123
12124 cat >>confdefs.h <<_ACEOF
12125 #define SIZEOF_OFF_T $ac_cv_sizeof_off_t
12126 _ACEOF
12127
12128
12129
12130 # If we don't have largefile support, can't handle segsize >= 2GB.
12131 if test "$ac_cv_sizeof_off_t" -lt 8 -a "$segsize" != "1"; then
12132    as_fn_error $? "Large file support is not enabled. Segment size cannot be larger than 1GB." "$LINENO" 5
12133 fi
12134
12135
12136 ##
12137 ## Functions, global variables
12138 ##
12139
12140 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int timezone" >&5
12141 $as_echo_n "checking for int timezone... " >&6; }
12142 if ${pgac_cv_var_int_timezone+:} false; then :
12143   $as_echo_n "(cached) " >&6
12144 else
12145   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12146 /* end confdefs.h.  */
12147 #include <time.h>
12148 int res;
12149 int
12150 main ()
12151 {
12152 #ifndef __CYGWIN__
12153 res = timezone / 60;
12154 #else
12155 res = _timezone / 60;
12156 #endif
12157   ;
12158   return 0;
12159 }
12160 _ACEOF
12161 if ac_fn_c_try_link "$LINENO"; then :
12162   pgac_cv_var_int_timezone=yes
12163 else
12164   pgac_cv_var_int_timezone=no
12165 fi
12166 rm -f core conftest.err conftest.$ac_objext \
12167     conftest$ac_exeext conftest.$ac_ext
12168 fi
12169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_timezone" >&5
12170 $as_echo "$pgac_cv_var_int_timezone" >&6; }
12171 if test x"$pgac_cv_var_int_timezone" = xyes ; then
12172
12173 $as_echo "#define HAVE_INT_TIMEZONE 1" >>confdefs.h
12174
12175 fi
12176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for accept()" >&5
12177 $as_echo_n "checking types of arguments for accept()... " >&6; }
12178  if ${ac_cv_func_accept_return+:} false; then :
12179   $as_echo_n "(cached) " >&6
12180 else
12181    if ${ac_cv_func_accept_arg1+:} false; then :
12182   $as_echo_n "(cached) " >&6
12183 else
12184     if ${ac_cv_func_accept_arg2+:} false; then :
12185   $as_echo_n "(cached) " >&6
12186 else
12187      if ${ac_cv_func_accept_arg3+:} false; then :
12188   $as_echo_n "(cached) " >&6
12189 else
12190       for ac_cv_func_accept_return in 'int' 'unsigned int PASCAL' 'SOCKET WSAAPI'; do
12191       for ac_cv_func_accept_arg1 in 'int' 'unsigned int' 'SOCKET'; do
12192        for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
12193         for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
12194          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12195 /* end confdefs.h.  */
12196 #ifdef HAVE_SYS_TYPES_H
12197 #include <sys/types.h>
12198 #endif
12199 #ifdef HAVE_SYS_SOCKET_H
12200 #include <sys/socket.h>
12201 #endif
12202 extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
12203 _ACEOF
12204 if ac_fn_c_try_compile "$LINENO"; then :
12205   ac_not_found=no; break 4
12206 else
12207   ac_not_found=yes
12208 fi
12209 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12210        done
12211       done
12212      done
12213     done
12214     if test "$ac_not_found" = yes; then
12215       as_fn_error $? "could not determine argument types" "$LINENO" 5
12216     fi
12217     if test "$ac_cv_func_accept_arg3" = "void"; then
12218       ac_cv_func_accept_arg3=int
12219     fi
12220
12221 fi
12222
12223 fi
12224
12225 fi
12226
12227 fi
12228  { $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
12229 $as_echo "$ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&6; }
12230
12231 cat >>confdefs.h <<_ACEOF
12232 #define ACCEPT_TYPE_RETURN $ac_cv_func_accept_return
12233 _ACEOF
12234
12235
12236 cat >>confdefs.h <<_ACEOF
12237 #define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
12238 _ACEOF
12239
12240
12241 cat >>confdefs.h <<_ACEOF
12242 #define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
12243 _ACEOF
12244
12245
12246 cat >>confdefs.h <<_ACEOF
12247 #define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
12248 _ACEOF
12249
12250
12251 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday takes only one argument" >&5
12252 $as_echo_n "checking whether gettimeofday takes only one argument... " >&6; }
12253 if ${pgac_cv_func_gettimeofday_1arg+:} false; then :
12254   $as_echo_n "(cached) " >&6
12255 else
12256   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12257 /* end confdefs.h.  */
12258 #include <sys/time.h>
12259 int
12260 main ()
12261 {
12262 struct timeval *tp;
12263 struct timezone *tzp;
12264 gettimeofday(tp,tzp);
12265   ;
12266   return 0;
12267 }
12268 _ACEOF
12269 if ac_fn_c_try_compile "$LINENO"; then :
12270   pgac_cv_func_gettimeofday_1arg=no
12271 else
12272   pgac_cv_func_gettimeofday_1arg=yes
12273 fi
12274 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12275 fi
12276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_gettimeofday_1arg" >&5
12277 $as_echo "$pgac_cv_func_gettimeofday_1arg" >&6; }
12278 if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
12279
12280 $as_echo "#define GETTIMEOFDAY_1ARG 1" >>confdefs.h
12281
12282 fi
12283
12284
12285 # Some versions of libedit contain strlcpy(), setproctitle(), and other
12286 # symbols that that library has no business exposing to the world.  Pending
12287 # acquisition of a clue by those developers, ignore libedit (including its
12288 # possible alias of libreadline) while checking for everything else.
12289 LIBS_including_readline="$LIBS"
12290 LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
12291
12292 for ac_func in cbrt dlopen fdatasync getifaddrs getpeerucred getrlimit mbstowcs_l memmove poll pstat pthread_is_threaded_np readlink setproctitle setsid shm_open sigprocmask symlink sync_file_range towlower utime utimes wcstombs wcstombs_l
12293 do :
12294   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12295 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12296 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12297   cat >>confdefs.h <<_ACEOF
12298 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12299 _ACEOF
12300
12301 fi
12302 done
12303
12304
12305 ac_fn_c_check_func "$LINENO" "fseeko" "ac_cv_func_fseeko"
12306 if test "x$ac_cv_func_fseeko" = xyes; then :
12307   $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
12308
12309 else
12310   case " $LIBOBJS " in
12311   *" fseeko.$ac_objext "* ) ;;
12312   *) LIBOBJS="$LIBOBJS fseeko.$ac_objext"
12313  ;;
12314 esac
12315
12316 fi
12317
12318
12319 case $host_os in
12320         # NetBSD uses a custom fseeko/ftello built on fsetpos/fgetpos
12321         # Mingw uses macros to access Win32 API calls
12322         netbsd*|mingw*)
12323
12324 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
12325
12326                 ac_cv_func_fseeko=yes;;
12327         *)
12328                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
12329 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
12330 if ${ac_cv_sys_largefile_source+:} false; then :
12331   $as_echo_n "(cached) " >&6
12332 else
12333   while :; do
12334   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12335 /* end confdefs.h.  */
12336 #include <sys/types.h> /* for off_t */
12337      #include <stdio.h>
12338 int
12339 main ()
12340 {
12341 int (*fp) (FILE *, off_t, int) = fseeko;
12342      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
12343   ;
12344   return 0;
12345 }
12346 _ACEOF
12347 if ac_fn_c_try_link "$LINENO"; then :
12348   ac_cv_sys_largefile_source=no; break
12349 fi
12350 rm -f core conftest.err conftest.$ac_objext \
12351     conftest$ac_exeext conftest.$ac_ext
12352   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12353 /* end confdefs.h.  */
12354 #define _LARGEFILE_SOURCE 1
12355 #include <sys/types.h> /* for off_t */
12356      #include <stdio.h>
12357 int
12358 main ()
12359 {
12360 int (*fp) (FILE *, off_t, int) = fseeko;
12361      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
12362   ;
12363   return 0;
12364 }
12365 _ACEOF
12366 if ac_fn_c_try_link "$LINENO"; then :
12367   ac_cv_sys_largefile_source=1; break
12368 fi
12369 rm -f core conftest.err conftest.$ac_objext \
12370     conftest$ac_exeext conftest.$ac_ext
12371   ac_cv_sys_largefile_source=unknown
12372   break
12373 done
12374 fi
12375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
12376 $as_echo "$ac_cv_sys_largefile_source" >&6; }
12377 case $ac_cv_sys_largefile_source in #(
12378   no | unknown) ;;
12379   *)
12380 cat >>confdefs.h <<_ACEOF
12381 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
12382 _ACEOF
12383 ;;
12384 esac
12385 rm -rf conftest*
12386
12387 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
12388 # in glibc 2.1.3, but that breaks too many other things.
12389 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
12390 if test $ac_cv_sys_largefile_source != unknown; then
12391
12392 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
12393
12394 fi
12395 ;;
12396 esac
12397
12398 # posix_fadvise() is a no-op on Solaris, so don't incur function overhead
12399 # by calling it, 2009-04-02
12400 # http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/posix_fadvise.c
12401 if test "$PORTNAME" != "solaris"; then
12402 for ac_func in posix_fadvise
12403 do :
12404   ac_fn_c_check_func "$LINENO" "posix_fadvise" "ac_cv_func_posix_fadvise"
12405 if test "x$ac_cv_func_posix_fadvise" = xyes; then :
12406   cat >>confdefs.h <<_ACEOF
12407 #define HAVE_POSIX_FADVISE 1
12408 _ACEOF
12409
12410 fi
12411 done
12412
12413 ac_fn_c_check_decl "$LINENO" "posix_fadvise" "ac_cv_have_decl_posix_fadvise" "#include <fcntl.h>
12414 "
12415 if test "x$ac_cv_have_decl_posix_fadvise" = xyes; then :
12416   ac_have_decl=1
12417 else
12418   ac_have_decl=0
12419 fi
12420
12421 cat >>confdefs.h <<_ACEOF
12422 #define HAVE_DECL_POSIX_FADVISE $ac_have_decl
12423 _ACEOF
12424
12425 fi
12426
12427 ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "#include <unistd.h>
12428 "
12429 if test "x$ac_cv_have_decl_fdatasync" = xyes; then :
12430   ac_have_decl=1
12431 else
12432   ac_have_decl=0
12433 fi
12434
12435 cat >>confdefs.h <<_ACEOF
12436 #define HAVE_DECL_FDATASYNC $ac_have_decl
12437 _ACEOF
12438
12439 ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
12440 if test "x$ac_cv_have_decl_strlcat" = xyes; then :
12441   ac_have_decl=1
12442 else
12443   ac_have_decl=0
12444 fi
12445
12446 cat >>confdefs.h <<_ACEOF
12447 #define HAVE_DECL_STRLCAT $ac_have_decl
12448 _ACEOF
12449 ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
12450 if test "x$ac_cv_have_decl_strlcpy" = xyes; then :
12451   ac_have_decl=1
12452 else
12453   ac_have_decl=0
12454 fi
12455
12456 cat >>confdefs.h <<_ACEOF
12457 #define HAVE_DECL_STRLCPY $ac_have_decl
12458 _ACEOF
12459
12460 # This is probably only present on Darwin, but may as well check always
12461 ac_fn_c_check_decl "$LINENO" "F_FULLFSYNC" "ac_cv_have_decl_F_FULLFSYNC" "#include <fcntl.h>
12462 "
12463 if test "x$ac_cv_have_decl_F_FULLFSYNC" = xyes; then :
12464   ac_have_decl=1
12465 else
12466   ac_have_decl=0
12467 fi
12468
12469 cat >>confdefs.h <<_ACEOF
12470 #define HAVE_DECL_F_FULLFSYNC $ac_have_decl
12471 _ACEOF
12472
12473
12474 HAVE_IPV6=no
12475 ac_fn_c_check_type "$LINENO" "struct sockaddr_in6" "ac_cv_type_struct_sockaddr_in6" "$ac_includes_default
12476 #include <netinet/in.h>
12477 "
12478 if test "x$ac_cv_type_struct_sockaddr_in6" = xyes; then :
12479
12480 $as_echo "#define HAVE_IPV6 1" >>confdefs.h
12481
12482          HAVE_IPV6=yes
12483 fi
12484
12485
12486
12487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PS_STRINGS" >&5
12488 $as_echo_n "checking for PS_STRINGS... " >&6; }
12489 if ${pgac_cv_var_PS_STRINGS+:} false; then :
12490   $as_echo_n "(cached) " >&6
12491 else
12492   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12493 /* end confdefs.h.  */
12494 #include <machine/vmparam.h>
12495 #include <sys/exec.h>
12496
12497 int
12498 main ()
12499 {
12500 PS_STRINGS->ps_nargvstr = 1;
12501 PS_STRINGS->ps_argvstr = "foo";
12502   ;
12503   return 0;
12504 }
12505 _ACEOF
12506 if ac_fn_c_try_link "$LINENO"; then :
12507   pgac_cv_var_PS_STRINGS=yes
12508 else
12509   pgac_cv_var_PS_STRINGS=no
12510 fi
12511 rm -f core conftest.err conftest.$ac_objext \
12512     conftest$ac_exeext conftest.$ac_ext
12513 fi
12514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_PS_STRINGS" >&5
12515 $as_echo "$pgac_cv_var_PS_STRINGS" >&6; }
12516 if test "$pgac_cv_var_PS_STRINGS" = yes ; then
12517
12518 $as_echo "#define HAVE_PS_STRINGS 1" >>confdefs.h
12519
12520 fi
12521
12522
12523 # We use our snprintf.c emulation if either snprintf() or vsnprintf()
12524 # is missing.  Yes, there are machines that have only one.  We may
12525 # also decide to use snprintf.c if snprintf() is present but does not
12526 # have all the features we need --- see below.
12527
12528 if test "$PORTNAME" = "win32"; then
12529   # Win32 gets snprintf.c built unconditionally.
12530   #
12531   # To properly translate all NLS languages strings, we must support the
12532   # *printf() %$ format, which allows *printf() arguments to be selected
12533   # by position in the translated string.
12534   #
12535   # libintl versions < 0.13 use the native *printf() functions, and Win32
12536   # *printf() doesn't understand %$, so we must use our /port versions,
12537   # which do understand %$. libintl versions >= 0.13 include their own
12538   # *printf versions on Win32.  The libintl 0.13 release note text is:
12539   #
12540   #   C format strings with positions, as they arise when a translator
12541   #   needs to reorder a sentence, are now supported on all platforms.
12542   #   On those few platforms (NetBSD and Woe32) for which the native
12543   #   printf()/fprintf()/... functions don't support such format
12544   #   strings, replacements are provided through <libintl.h>.
12545   #
12546   # We could use libintl >= 0.13's *printf() if we were sure that we had
12547   # a litint >= 0.13 at runtime, but seeing that there is no clean way
12548   # to guarantee that, it is best to just use our own, so we are sure to
12549   # get %$ support. In include/port.h we disable the *printf() macros
12550   # that might have been defined by libintl.
12551   #
12552   # We do this unconditionally whether NLS is used or not so we are sure
12553   # that all Win32 libraries and binaries behave the same.
12554   pgac_need_repl_snprintf=yes
12555 else
12556   pgac_need_repl_snprintf=no
12557   for ac_func in snprintf
12558 do :
12559   ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
12560 if test "x$ac_cv_func_snprintf" = xyes; then :
12561   cat >>confdefs.h <<_ACEOF
12562 #define HAVE_SNPRINTF 1
12563 _ACEOF
12564
12565 else
12566   pgac_need_repl_snprintf=yes
12567 fi
12568 done
12569
12570   for ac_func in vsnprintf
12571 do :
12572   ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
12573 if test "x$ac_cv_func_vsnprintf" = xyes; then :
12574   cat >>confdefs.h <<_ACEOF
12575 #define HAVE_VSNPRINTF 1
12576 _ACEOF
12577
12578 else
12579   pgac_need_repl_snprintf=yes
12580 fi
12581 done
12582
12583 fi
12584
12585
12586 # Check whether <stdio.h> declares snprintf() and vsnprintf(); if not,
12587 # include/c.h will provide declarations.  Note this is a separate test
12588 # from whether the functions exist in the C library --- there are
12589 # systems that have the functions but don't bother to declare them :-(
12590
12591 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
12592 if test "x$ac_cv_have_decl_snprintf" = xyes; then :
12593   ac_have_decl=1
12594 else
12595   ac_have_decl=0
12596 fi
12597
12598 cat >>confdefs.h <<_ACEOF
12599 #define HAVE_DECL_SNPRINTF $ac_have_decl
12600 _ACEOF
12601 ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
12602 if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
12603   ac_have_decl=1
12604 else
12605   ac_have_decl=0
12606 fi
12607
12608 cat >>confdefs.h <<_ACEOF
12609 #define HAVE_DECL_VSNPRINTF $ac_have_decl
12610 _ACEOF
12611
12612
12613
12614 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for isinf" >&5
12615 $as_echo_n "checking for isinf... " >&6; }
12616 if ${ac_cv_func_isinf+:} false; then :
12617   $as_echo_n "(cached) " >&6
12618 else
12619   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12620 /* end confdefs.h.  */
12621
12622 #include <math.h>
12623 double glob_double;
12624
12625 int
12626 main ()
12627 {
12628 return isinf(glob_double) ? 0 : 1;
12629   ;
12630   return 0;
12631 }
12632 _ACEOF
12633 if ac_fn_c_try_link "$LINENO"; then :
12634   ac_cv_func_isinf=yes
12635 else
12636   ac_cv_func_isinf=no
12637 fi
12638 rm -f core conftest.err conftest.$ac_objext \
12639     conftest$ac_exeext conftest.$ac_ext
12640 fi
12641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_isinf" >&5
12642 $as_echo "$ac_cv_func_isinf" >&6; }
12643
12644 if test $ac_cv_func_isinf = yes ; then
12645
12646 $as_echo "#define HAVE_ISINF 1" >>confdefs.h
12647
12648 else
12649   case " $LIBOBJS " in
12650   *" isinf.$ac_objext "* ) ;;
12651   *) LIBOBJS="$LIBOBJS isinf.$ac_objext"
12652  ;;
12653 esac
12654
12655   # Look for a way to implement a substitute for isinf()
12656   for ac_func in fpclass fp_class fp_class_d class
12657 do :
12658   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12659 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12660 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12661   cat >>confdefs.h <<_ACEOF
12662 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12663 _ACEOF
12664  break
12665 fi
12666 done
12667
12668 fi
12669
12670 ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt"
12671 if test "x$ac_cv_func_crypt" = xyes; then :
12672   $as_echo "#define HAVE_CRYPT 1" >>confdefs.h
12673
12674 else
12675   case " $LIBOBJS " in
12676   *" crypt.$ac_objext "* ) ;;
12677   *) LIBOBJS="$LIBOBJS crypt.$ac_objext"
12678  ;;
12679 esac
12680
12681 fi
12682
12683 ac_fn_c_check_func "$LINENO" "fls" "ac_cv_func_fls"
12684 if test "x$ac_cv_func_fls" = xyes; then :
12685   $as_echo "#define HAVE_FLS 1" >>confdefs.h
12686
12687 else
12688   case " $LIBOBJS " in
12689   *" fls.$ac_objext "* ) ;;
12690   *) LIBOBJS="$LIBOBJS fls.$ac_objext"
12691  ;;
12692 esac
12693
12694 fi
12695
12696 ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt"
12697 if test "x$ac_cv_func_getopt" = xyes; then :
12698   $as_echo "#define HAVE_GETOPT 1" >>confdefs.h
12699
12700 else
12701   case " $LIBOBJS " in
12702   *" getopt.$ac_objext "* ) ;;
12703   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
12704  ;;
12705 esac
12706
12707 fi
12708
12709 ac_fn_c_check_func "$LINENO" "getrusage" "ac_cv_func_getrusage"
12710 if test "x$ac_cv_func_getrusage" = xyes; then :
12711   $as_echo "#define HAVE_GETRUSAGE 1" >>confdefs.h
12712
12713 else
12714   case " $LIBOBJS " in
12715   *" getrusage.$ac_objext "* ) ;;
12716   *) LIBOBJS="$LIBOBJS getrusage.$ac_objext"
12717  ;;
12718 esac
12719
12720 fi
12721
12722 ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
12723 if test "x$ac_cv_func_inet_aton" = xyes; then :
12724   $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
12725
12726 else
12727   case " $LIBOBJS " in
12728   *" inet_aton.$ac_objext "* ) ;;
12729   *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
12730  ;;
12731 esac
12732
12733 fi
12734
12735 ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
12736 if test "x$ac_cv_func_mkdtemp" = xyes; then :
12737   $as_echo "#define HAVE_MKDTEMP 1" >>confdefs.h
12738
12739 else
12740   case " $LIBOBJS " in
12741   *" mkdtemp.$ac_objext "* ) ;;
12742   *) LIBOBJS="$LIBOBJS mkdtemp.$ac_objext"
12743  ;;
12744 esac
12745
12746 fi
12747
12748 ac_fn_c_check_func "$LINENO" "random" "ac_cv_func_random"
12749 if test "x$ac_cv_func_random" = xyes; then :
12750   $as_echo "#define HAVE_RANDOM 1" >>confdefs.h
12751
12752 else
12753   case " $LIBOBJS " in
12754   *" random.$ac_objext "* ) ;;
12755   *) LIBOBJS="$LIBOBJS random.$ac_objext"
12756  ;;
12757 esac
12758
12759 fi
12760
12761 ac_fn_c_check_func "$LINENO" "rint" "ac_cv_func_rint"
12762 if test "x$ac_cv_func_rint" = xyes; then :
12763   $as_echo "#define HAVE_RINT 1" >>confdefs.h
12764
12765 else
12766   case " $LIBOBJS " in
12767   *" rint.$ac_objext "* ) ;;
12768   *) LIBOBJS="$LIBOBJS rint.$ac_objext"
12769  ;;
12770 esac
12771
12772 fi
12773
12774 ac_fn_c_check_func "$LINENO" "srandom" "ac_cv_func_srandom"
12775 if test "x$ac_cv_func_srandom" = xyes; then :
12776   $as_echo "#define HAVE_SRANDOM 1" >>confdefs.h
12777
12778 else
12779   case " $LIBOBJS " in
12780   *" srandom.$ac_objext "* ) ;;
12781   *) LIBOBJS="$LIBOBJS srandom.$ac_objext"
12782  ;;
12783 esac
12784
12785 fi
12786
12787 ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror"
12788 if test "x$ac_cv_func_strerror" = xyes; then :
12789   $as_echo "#define HAVE_STRERROR 1" >>confdefs.h
12790
12791 else
12792   case " $LIBOBJS " in
12793   *" strerror.$ac_objext "* ) ;;
12794   *) LIBOBJS="$LIBOBJS strerror.$ac_objext"
12795  ;;
12796 esac
12797
12798 fi
12799
12800 ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
12801 if test "x$ac_cv_func_strlcat" = xyes; then :
12802   $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
12803
12804 else
12805   case " $LIBOBJS " in
12806   *" strlcat.$ac_objext "* ) ;;
12807   *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
12808  ;;
12809 esac
12810
12811 fi
12812
12813 ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
12814 if test "x$ac_cv_func_strlcpy" = xyes; then :
12815   $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
12816
12817 else
12818   case " $LIBOBJS " in
12819   *" strlcpy.$ac_objext "* ) ;;
12820   *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
12821  ;;
12822 esac
12823
12824 fi
12825
12826
12827
12828 case $host_os in
12829
12830         # Windows uses a specialised env handler
12831         # and doesn't need a replacement getpeereid because it doesn't use
12832         # Unix sockets.
12833         mingw*)
12834
12835 $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
12836
12837
12838 $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
12839
12840                 ac_cv_func_unsetenv=yes
12841                 ac_cv_func_getpeereid=yes;;
12842         *)
12843                 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
12844 if test "x$ac_cv_func_unsetenv" = xyes; then :
12845   $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
12846
12847 else
12848   case " $LIBOBJS " in
12849   *" unsetenv.$ac_objext "* ) ;;
12850   *) LIBOBJS="$LIBOBJS unsetenv.$ac_objext"
12851  ;;
12852 esac
12853
12854 fi
12855
12856 ac_fn_c_check_func "$LINENO" "getpeereid" "ac_cv_func_getpeereid"
12857 if test "x$ac_cv_func_getpeereid" = xyes; then :
12858   $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
12859
12860 else
12861   case " $LIBOBJS " in
12862   *" getpeereid.$ac_objext "* ) ;;
12863   *) LIBOBJS="$LIBOBJS getpeereid.$ac_objext"
12864  ;;
12865 esac
12866
12867 fi
12868
12869
12870                 ;;
12871 esac
12872
12873 # System's version of getaddrinfo(), if any, may be used only if we found
12874 # a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
12875 # We use only our own getaddrinfo.c on Windows, but it's time to revisit that.
12876 if test x"$ac_cv_type_struct_addrinfo" = xyes && \
12877    test "$PORTNAME" != "win32"; then
12878   ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo"
12879 if test "x$ac_cv_func_getaddrinfo" = xyes; then :
12880   $as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
12881
12882 else
12883   case " $LIBOBJS " in
12884   *" getaddrinfo.$ac_objext "* ) ;;
12885   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
12886  ;;
12887 esac
12888
12889 fi
12890
12891
12892 else
12893   case " $LIBOBJS " in
12894   *" getaddrinfo.$ac_objext "* ) ;;
12895   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
12896  ;;
12897 esac
12898
12899 fi
12900
12901 # Similarly, use system's getopt_long() only if system provides struct option.
12902 if test x"$ac_cv_type_struct_option" = xyes ; then
12903   ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long"
12904 if test "x$ac_cv_func_getopt_long" = xyes; then :
12905   $as_echo "#define HAVE_GETOPT_LONG 1" >>confdefs.h
12906
12907 else
12908   case " $LIBOBJS " in
12909   *" getopt_long.$ac_objext "* ) ;;
12910   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
12911  ;;
12912 esac
12913
12914 fi
12915
12916
12917 else
12918   case " $LIBOBJS " in
12919   *" getopt_long.$ac_objext "* ) ;;
12920   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
12921  ;;
12922 esac
12923
12924 fi
12925
12926 # Solaris' getopt() doesn't do what we want for long options, so always use
12927 # our version on that platform.
12928 if test "$PORTNAME" = "solaris"; then
12929   case " $LIBOBJS " in
12930   *" getopt.$ac_objext "* ) ;;
12931   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
12932  ;;
12933 esac
12934
12935 fi
12936
12937 # mingw has adopted a GNU-centric interpretation of optind/optreset,
12938 # so always use our version on Windows.
12939 if test "$PORTNAME" = "win32"; then
12940   case " $LIBOBJS " in
12941   *" getopt.$ac_objext "* ) ;;
12942   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
12943  ;;
12944 esac
12945
12946   case " $LIBOBJS " in
12947   *" getopt_long.$ac_objext "* ) ;;
12948   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
12949  ;;
12950 esac
12951
12952 fi
12953
12954 # Win32 (really MinGW) support
12955 if test "$PORTNAME" = "win32"; then
12956   ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
12957 if test "x$ac_cv_func_gettimeofday" = xyes; then :
12958   $as_echo "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
12959
12960 else
12961   case " $LIBOBJS " in
12962   *" gettimeofday.$ac_objext "* ) ;;
12963   *) LIBOBJS="$LIBOBJS gettimeofday.$ac_objext"
12964  ;;
12965 esac
12966
12967 fi
12968
12969
12970   case " $LIBOBJS " in
12971   *" dirmod.$ac_objext "* ) ;;
12972   *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
12973  ;;
12974 esac
12975
12976   case " $LIBOBJS " in
12977   *" kill.$ac_objext "* ) ;;
12978   *) LIBOBJS="$LIBOBJS kill.$ac_objext"
12979  ;;
12980 esac
12981
12982   case " $LIBOBJS " in
12983   *" open.$ac_objext "* ) ;;
12984   *) LIBOBJS="$LIBOBJS open.$ac_objext"
12985  ;;
12986 esac
12987
12988   case " $LIBOBJS " in
12989   *" system.$ac_objext "* ) ;;
12990   *) LIBOBJS="$LIBOBJS system.$ac_objext"
12991  ;;
12992 esac
12993
12994   case " $LIBOBJS " in
12995   *" win32env.$ac_objext "* ) ;;
12996   *) LIBOBJS="$LIBOBJS win32env.$ac_objext"
12997  ;;
12998 esac
12999
13000   case " $LIBOBJS " in
13001   *" win32error.$ac_objext "* ) ;;
13002   *) LIBOBJS="$LIBOBJS win32error.$ac_objext"
13003  ;;
13004 esac
13005
13006   case " $LIBOBJS " in
13007   *" win32setlocale.$ac_objext "* ) ;;
13008   *) LIBOBJS="$LIBOBJS win32setlocale.$ac_objext"
13009  ;;
13010 esac
13011
13012
13013 $as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
13014
13015   ac_fn_c_check_type "$LINENO" "MINIDUMP_TYPE" "ac_cv_type_MINIDUMP_TYPE" "
13016 #define WIN32_LEAN_AND_MEAN
13017 #include <windows.h>
13018 #include <string.h>
13019 #include <dbghelp.h>
13020 "
13021 if test "x$ac_cv_type_MINIDUMP_TYPE" = xyes; then :
13022
13023 cat >>confdefs.h <<_ACEOF
13024 #define HAVE_MINIDUMP_TYPE 1
13025 _ACEOF
13026
13027 pgac_minidump_type=yes
13028 else
13029   pgac_minidump_type=no
13030 fi
13031
13032 fi
13033 if test x"$pgac_minidump_type" = x"yes" ; then
13034   have_win32_dbghelp=yes
13035
13036 else
13037   have_win32_dbghelp=no
13038
13039 fi
13040
13041 # Cygwin needs only a bit of that
13042 if test "$PORTNAME" = "cygwin"; then
13043   case " $LIBOBJS " in
13044   *" dirmod.$ac_objext "* ) ;;
13045   *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
13046  ;;
13047 esac
13048
13049 fi
13050
13051 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
13052 $as_echo_n "checking for sigsetjmp... " >&6; }
13053 if ${pgac_cv_func_sigsetjmp+:} false; then :
13054   $as_echo_n "(cached) " >&6
13055 else
13056   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13057 /* end confdefs.h.  */
13058 #include <setjmp.h>
13059 int
13060 main ()
13061 {
13062 sigjmp_buf x; sigsetjmp(x, 1);
13063   ;
13064   return 0;
13065 }
13066 _ACEOF
13067 if ac_fn_c_try_link "$LINENO"; then :
13068   pgac_cv_func_sigsetjmp=yes
13069 else
13070   pgac_cv_func_sigsetjmp=no
13071 fi
13072 rm -f core conftest.err conftest.$ac_objext \
13073     conftest$ac_exeext conftest.$ac_ext
13074 fi
13075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_sigsetjmp" >&5
13076 $as_echo "$pgac_cv_func_sigsetjmp" >&6; }
13077 if test x"$pgac_cv_func_sigsetjmp" = x"yes"; then
13078
13079 $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
13080
13081 fi
13082
13083 ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "#include <signal.h>
13084 /* NetBSD declares sys_siglist in unistd.h.  */
13085 #ifdef HAVE_UNISTD_H
13086 # include <unistd.h>
13087 #endif
13088
13089 "
13090 if test "x$ac_cv_have_decl_sys_siglist" = xyes; then :
13091   ac_have_decl=1
13092 else
13093   ac_have_decl=0
13094 fi
13095
13096 cat >>confdefs.h <<_ACEOF
13097 #define HAVE_DECL_SYS_SIGLIST $ac_have_decl
13098 _ACEOF
13099
13100
13101 ac_fn_c_check_func "$LINENO" "syslog" "ac_cv_func_syslog"
13102 if test "x$ac_cv_func_syslog" = xyes; then :
13103   ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default"
13104 if test "x$ac_cv_header_syslog_h" = xyes; then :
13105
13106 $as_echo "#define HAVE_SYSLOG 1" >>confdefs.h
13107
13108 fi
13109
13110
13111 fi
13112
13113
13114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opterr" >&5
13115 $as_echo_n "checking for opterr... " >&6; }
13116 if ${pgac_cv_var_int_opterr+:} false; then :
13117   $as_echo_n "(cached) " >&6
13118 else
13119   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13120 /* end confdefs.h.  */
13121 #include <unistd.h>
13122 int
13123 main ()
13124 {
13125 extern int opterr; opterr = 1;
13126   ;
13127   return 0;
13128 }
13129 _ACEOF
13130 if ac_fn_c_try_link "$LINENO"; then :
13131   pgac_cv_var_int_opterr=yes
13132 else
13133   pgac_cv_var_int_opterr=no
13134 fi
13135 rm -f core conftest.err conftest.$ac_objext \
13136     conftest$ac_exeext conftest.$ac_ext
13137 fi
13138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_opterr" >&5
13139 $as_echo "$pgac_cv_var_int_opterr" >&6; }
13140 if test x"$pgac_cv_var_int_opterr" = x"yes"; then
13141
13142 $as_echo "#define HAVE_INT_OPTERR 1" >>confdefs.h
13143
13144 fi
13145
13146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for optreset" >&5
13147 $as_echo_n "checking for optreset... " >&6; }
13148 if ${pgac_cv_var_int_optreset+:} false; then :
13149   $as_echo_n "(cached) " >&6
13150 else
13151   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13152 /* end confdefs.h.  */
13153 #include <unistd.h>
13154 int
13155 main ()
13156 {
13157 extern int optreset; optreset = 1;
13158   ;
13159   return 0;
13160 }
13161 _ACEOF
13162 if ac_fn_c_try_link "$LINENO"; then :
13163   pgac_cv_var_int_optreset=yes
13164 else
13165   pgac_cv_var_int_optreset=no
13166 fi
13167 rm -f core conftest.err conftest.$ac_objext \
13168     conftest$ac_exeext conftest.$ac_ext
13169 fi
13170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_optreset" >&5
13171 $as_echo "$pgac_cv_var_int_optreset" >&6; }
13172 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
13173
13174 $as_echo "#define HAVE_INT_OPTRESET 1" >>confdefs.h
13175
13176 fi
13177
13178 for ac_func in strtoll strtoq
13179 do :
13180   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13181 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13182 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13183   cat >>confdefs.h <<_ACEOF
13184 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13185 _ACEOF
13186  break
13187 fi
13188 done
13189
13190 for ac_func in strtoull strtouq
13191 do :
13192   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13193 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13194 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13195   cat >>confdefs.h <<_ACEOF
13196 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13197 _ACEOF
13198  break
13199 fi
13200 done
13201
13202
13203 # Lastly, restore full LIBS list and check for readline/libedit symbols
13204 LIBS="$LIBS_including_readline"
13205
13206 if test "$with_readline" = yes; then
13207   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_append_character" >&5
13208 $as_echo_n "checking for rl_completion_append_character... " >&6; }
13209 if ${pgac_cv_var_rl_completion_append_character+:} false; then :
13210   $as_echo_n "(cached) " >&6
13211 else
13212   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13213 /* end confdefs.h.  */
13214 #include <stdio.h>
13215 #ifdef HAVE_READLINE_READLINE_H
13216 # include <readline/readline.h>
13217 #elif defined(HAVE_READLINE_H)
13218 # include <readline.h>
13219 #endif
13220
13221 int
13222 main ()
13223 {
13224 rl_completion_append_character = 'x';
13225   ;
13226   return 0;
13227 }
13228 _ACEOF
13229 if ac_fn_c_try_link "$LINENO"; then :
13230   pgac_cv_var_rl_completion_append_character=yes
13231 else
13232   pgac_cv_var_rl_completion_append_character=no
13233 fi
13234 rm -f core conftest.err conftest.$ac_objext \
13235     conftest$ac_exeext conftest.$ac_ext
13236 fi
13237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_completion_append_character" >&5
13238 $as_echo "$pgac_cv_var_rl_completion_append_character" >&6; }
13239 if test x"$pgac_cv_var_rl_completion_append_character" = x"yes"; then
13240
13241 $as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
13242
13243 fi
13244   for ac_func in rl_completion_matches rl_filename_completion_function
13245 do :
13246   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13247 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13248 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13249   cat >>confdefs.h <<_ACEOF
13250 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13251 _ACEOF
13252
13253 fi
13254 done
13255
13256   for ac_func in append_history history_truncate_file
13257 do :
13258   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13259 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13260 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13261   cat >>confdefs.h <<_ACEOF
13262 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13263 _ACEOF
13264
13265 fi
13266 done
13267
13268 fi
13269
13270
13271 # This test makes sure that run tests work at all.  Sometimes a shared
13272 # library is found by the linker, but the runtime linker can't find it.
13273 # This check should come after all modifications of compiler or linker
13274 # variables, and before any other run tests.
13275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking test program" >&5
13276 $as_echo_n "checking test program... " >&6; }
13277 if test "$cross_compiling" = yes; then :
13278   { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling" >&5
13279 $as_echo "cross-compiling" >&6; }
13280 else
13281   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13282 /* end confdefs.h.  */
13283 int main() { return 0; }
13284 _ACEOF
13285 if ac_fn_c_try_run "$LINENO"; then :
13286   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
13287 $as_echo "ok" >&6; }
13288 else
13289   { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
13290 $as_echo "failed" >&6; }
13291 as_fn_error $? "
13292 Could not execute a simple test program.  This may be a problem
13293 related to locating shared libraries.  Check the file 'config.log'
13294 for the exact reason." "$LINENO" 5
13295 fi
13296 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13297   conftest.$ac_objext conftest.beam conftest.$ac_ext
13298 fi
13299
13300
13301 # --------------------
13302 # Run tests below here
13303 # --------------------
13304
13305 # Force use of our snprintf if system's doesn't do arg control
13306 # See comment above at snprintf test for details.
13307 if test "$enable_nls" = yes -a "$pgac_need_repl_snprintf" = no; then
13308   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf supports argument control" >&5
13309 $as_echo_n "checking whether snprintf supports argument control... " >&6; }
13310 if ${pgac_cv_snprintf_arg_control+:} false; then :
13311   $as_echo_n "(cached) " >&6
13312 else
13313   if test "$cross_compiling" = yes; then :
13314   pgac_cv_snprintf_arg_control=cross
13315 else
13316   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13317 /* end confdefs.h.  */
13318 #include <stdio.h>
13319 #include <string.h>
13320
13321 int main()
13322 {
13323   char buf[100];
13324
13325   /* can it swap arguments? */
13326   snprintf(buf, 100, "%2\$d %1\$d", 3, 4);
13327   if (strcmp(buf, "4 3") != 0)
13328     return 1;
13329   return 0;
13330 }
13331 _ACEOF
13332 if ac_fn_c_try_run "$LINENO"; then :
13333   pgac_cv_snprintf_arg_control=yes
13334 else
13335   pgac_cv_snprintf_arg_control=no
13336 fi
13337 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13338   conftest.$ac_objext conftest.beam conftest.$ac_ext
13339 fi
13340
13341
13342 fi
13343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_arg_control" >&5
13344 $as_echo "$pgac_cv_snprintf_arg_control" >&6; }
13345
13346   if test $pgac_cv_snprintf_arg_control != yes ; then
13347     pgac_need_repl_snprintf=yes
13348   fi
13349 fi
13350
13351
13352
13353
13354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long int is 64 bits" >&5
13355 $as_echo_n "checking whether long int is 64 bits... " >&6; }
13356 if ${pgac_cv_type_long_int_64+:} false; then :
13357   $as_echo_n "(cached) " >&6
13358 else
13359   if test "$cross_compiling" = yes; then :
13360   # If cross-compiling, check the size reported by the compiler and
13361 # trust that the arithmetic works.
13362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13363 /* end confdefs.h.  */
13364
13365 int
13366 main ()
13367 {
13368 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
13369 test_array [0] = 0;
13370 return test_array [0];
13371
13372   ;
13373   return 0;
13374 }
13375 _ACEOF
13376 if ac_fn_c_try_compile "$LINENO"; then :
13377   pgac_cv_type_long_int_64=yes
13378 else
13379   pgac_cv_type_long_int_64=no
13380 fi
13381 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13382 else
13383   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13384 /* end confdefs.h.  */
13385 typedef long int ac_int64;
13386
13387 /*
13388  * These are globals to discourage the compiler from folding all the
13389  * arithmetic tests down to compile-time constants.
13390  */
13391 ac_int64 a = 20000001;
13392 ac_int64 b = 40000005;
13393
13394 int does_int64_work()
13395 {
13396   ac_int64 c,d;
13397
13398   if (sizeof(ac_int64) != 8)
13399     return 0;                   /* definitely not the right size */
13400
13401   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
13402   c = a * b;
13403   d = (c + b) / b;
13404   if (d != a+1)
13405     return 0;
13406   return 1;
13407 }
13408 main() {
13409   exit(! does_int64_work());
13410 }
13411 _ACEOF
13412 if ac_fn_c_try_run "$LINENO"; then :
13413   pgac_cv_type_long_int_64=yes
13414 else
13415   pgac_cv_type_long_int_64=no
13416 fi
13417 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13418   conftest.$ac_objext conftest.beam conftest.$ac_ext
13419 fi
13420
13421 fi
13422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_int_64" >&5
13423 $as_echo "$pgac_cv_type_long_int_64" >&6; }
13424
13425 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
13426 if test x"$pgac_cv_type_long_int_64" = xyes ; then
13427
13428 $as_echo "#define HAVE_LONG_INT_64 1" >>confdefs.h
13429
13430 fi
13431
13432
13433 if test x"$HAVE_LONG_INT_64" = x"yes" ; then
13434   pg_int64_type="long int"
13435 else
13436   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long long int is 64 bits" >&5
13437 $as_echo_n "checking whether long long int is 64 bits... " >&6; }
13438 if ${pgac_cv_type_long_long_int_64+:} false; then :
13439   $as_echo_n "(cached) " >&6
13440 else
13441   if test "$cross_compiling" = yes; then :
13442   # If cross-compiling, check the size reported by the compiler and
13443 # trust that the arithmetic works.
13444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13445 /* end confdefs.h.  */
13446
13447 int
13448 main ()
13449 {
13450 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
13451 test_array [0] = 0;
13452 return test_array [0];
13453
13454   ;
13455   return 0;
13456 }
13457 _ACEOF
13458 if ac_fn_c_try_compile "$LINENO"; then :
13459   pgac_cv_type_long_long_int_64=yes
13460 else
13461   pgac_cv_type_long_long_int_64=no
13462 fi
13463 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13464 else
13465   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13466 /* end confdefs.h.  */
13467 typedef long long int ac_int64;
13468
13469 /*
13470  * These are globals to discourage the compiler from folding all the
13471  * arithmetic tests down to compile-time constants.
13472  */
13473 ac_int64 a = 20000001;
13474 ac_int64 b = 40000005;
13475
13476 int does_int64_work()
13477 {
13478   ac_int64 c,d;
13479
13480   if (sizeof(ac_int64) != 8)
13481     return 0;                   /* definitely not the right size */
13482
13483   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
13484   c = a * b;
13485   d = (c + b) / b;
13486   if (d != a+1)
13487     return 0;
13488   return 1;
13489 }
13490 main() {
13491   exit(! does_int64_work());
13492 }
13493 _ACEOF
13494 if ac_fn_c_try_run "$LINENO"; then :
13495   pgac_cv_type_long_long_int_64=yes
13496 else
13497   pgac_cv_type_long_long_int_64=no
13498 fi
13499 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13500   conftest.$ac_objext conftest.beam conftest.$ac_ext
13501 fi
13502
13503 fi
13504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_long_int_64" >&5
13505 $as_echo "$pgac_cv_type_long_long_int_64" >&6; }
13506
13507 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
13508 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
13509
13510 $as_echo "#define HAVE_LONG_LONG_INT_64 1" >>confdefs.h
13511
13512 fi
13513
13514   if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
13515     pg_int64_type="long long int"
13516   else
13517     as_fn_error $? "Cannot find a working 64-bit integer type." "$LINENO" 5
13518   fi
13519 fi
13520
13521
13522 cat >>confdefs.h <<_ACEOF
13523 #define PG_INT64_TYPE $pg_int64_type
13524 _ACEOF
13525
13526
13527
13528 if test x"$HAVE_LONG_LONG_INT_64" = xyes ; then
13529   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13530 /* end confdefs.h.  */
13531
13532 #define INT64CONST(x)  x##LL
13533 long long int foo = INT64CONST(0x1234567890123456);
13534
13535 _ACEOF
13536 if ac_fn_c_try_compile "$LINENO"; then :
13537
13538 $as_echo "#define HAVE_LL_CONSTANTS 1" >>confdefs.h
13539
13540 fi
13541 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13542 fi
13543
13544
13545 # If we found "long int" is 64 bits, assume snprintf handles it.  If
13546 # we found we need to use "long long int", better check.  We cope with
13547 # snprintfs that use %lld, %qd, or %I64d as the format.  If none of these
13548 # work, fall back to our own snprintf emulation (which we know uses %lld).
13549
13550 if test "$HAVE_LONG_LONG_INT_64" = yes ; then
13551   if test $pgac_need_repl_snprintf = no; then
13552     { $as_echo "$as_me:${as_lineno-$LINENO}: checking snprintf length modifier for long long int" >&5
13553 $as_echo_n "checking snprintf length modifier for long long int... " >&6; }
13554 if ${pgac_cv_snprintf_long_long_int_modifier+:} false; then :
13555   $as_echo_n "(cached) " >&6
13556 else
13557   for pgac_modifier in 'll' 'q' 'I64'; do
13558 if test "$cross_compiling" = yes; then :
13559   pgac_cv_snprintf_long_long_int_modifier=cross; break
13560 else
13561   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13562 /* end confdefs.h.  */
13563 #include <stdio.h>
13564 typedef long long int ac_int64;
13565 #define INT64_FORMAT "%${pgac_modifier}d"
13566
13567 ac_int64 a = 20000001;
13568 ac_int64 b = 40000005;
13569
13570 int does_int64_snprintf_work()
13571 {
13572   ac_int64 c;
13573   char buf[100];
13574
13575   if (sizeof(ac_int64) != 8)
13576     return 0;                   /* doesn't look like the right size */
13577
13578   c = a * b;
13579   snprintf(buf, 100, INT64_FORMAT, c);
13580   if (strcmp(buf, "800000140000005") != 0)
13581     return 0;                   /* either multiply or snprintf is busted */
13582   return 1;
13583 }
13584 main() {
13585   exit(! does_int64_snprintf_work());
13586 }
13587 _ACEOF
13588 if ac_fn_c_try_run "$LINENO"; then :
13589   pgac_cv_snprintf_long_long_int_modifier=$pgac_modifier; break
13590 fi
13591 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13592   conftest.$ac_objext conftest.beam conftest.$ac_ext
13593 fi
13594
13595 done
13596 fi
13597
13598 LONG_LONG_INT_MODIFIER=''
13599
13600 case $pgac_cv_snprintf_long_long_int_modifier in
13601   cross) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot test (not on host machine)" >&5
13602 $as_echo "cannot test (not on host machine)" >&6; };;
13603   ?*)    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_long_long_int_modifier" >&5
13604 $as_echo "$pgac_cv_snprintf_long_long_int_modifier" >&6; }
13605          LONG_LONG_INT_MODIFIER=$pgac_cv_snprintf_long_long_int_modifier;;
13606   *)     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13607 $as_echo "none" >&6; };;
13608 esac
13609     if test "$LONG_LONG_INT_MODIFIER" = ""; then
13610       # Force usage of our own snprintf, since system snprintf is broken
13611       pgac_need_repl_snprintf=yes
13612       LONG_LONG_INT_MODIFIER='ll'
13613     fi
13614   else
13615     # Here if we previously decided we needed to use our own snprintf
13616     LONG_LONG_INT_MODIFIER='ll'
13617   fi
13618 else
13619   # Here if we are not using 'long long int' at all
13620   LONG_LONG_INT_MODIFIER='l'
13621 fi
13622
13623 INT64_MODIFIER="\"$LONG_LONG_INT_MODIFIER\""
13624
13625
13626 cat >>confdefs.h <<_ACEOF
13627 #define INT64_MODIFIER $INT64_MODIFIER
13628 _ACEOF
13629
13630
13631 # Also force use of our snprintf if the system's doesn't support the %z flag.
13632 if test "$pgac_need_repl_snprintf" = no; then
13633   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf supports the %z modifier" >&5
13634 $as_echo_n "checking whether snprintf supports the %z modifier... " >&6; }
13635 if ${pgac_cv_snprintf_size_t_support+:} false; then :
13636   $as_echo_n "(cached) " >&6
13637 else
13638   if test "$cross_compiling" = yes; then :
13639   pgac_cv_snprintf_size_t_support=cross
13640 else
13641   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13642 /* end confdefs.h.  */
13643 #include <stdio.h>
13644 #include <string.h>
13645
13646 int main()
13647 {
13648   char bufz[100];
13649   char buf64[100];
13650
13651   /*
13652    * Print the largest unsigned number fitting in a size_t using both %zu
13653    * and the previously-determined format for 64-bit integers.  Note that
13654    * we don't run this code unless we know snprintf handles 64-bit ints.
13655    */
13656   bufz[0] = '\0';  /* in case snprintf fails to emit anything */
13657   snprintf(bufz, sizeof(bufz), "%zu", ~((size_t) 0));
13658   snprintf(buf64, sizeof(buf64), "%" INT64_MODIFIER "u",
13659     (unsigned PG_INT64_TYPE) ~((size_t) 0));
13660   if (strcmp(bufz, buf64) != 0)
13661     return 1;
13662   return 0;
13663 }
13664 _ACEOF
13665 if ac_fn_c_try_run "$LINENO"; then :
13666   pgac_cv_snprintf_size_t_support=yes
13667 else
13668   pgac_cv_snprintf_size_t_support=no
13669 fi
13670 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13671   conftest.$ac_objext conftest.beam conftest.$ac_ext
13672 fi
13673
13674
13675 fi
13676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_size_t_support" >&5
13677 $as_echo "$pgac_cv_snprintf_size_t_support" >&6; }
13678
13679   if test "$pgac_cv_snprintf_size_t_support" != yes; then
13680     pgac_need_repl_snprintf=yes
13681   fi
13682 fi
13683
13684 # Now we have checked all the reasons to replace snprintf
13685 if test $pgac_need_repl_snprintf = yes; then
13686
13687 $as_echo "#define USE_REPL_SNPRINTF 1" >>confdefs.h
13688
13689   case " $LIBOBJS " in
13690   *" snprintf.$ac_objext "* ) ;;
13691   *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
13692  ;;
13693 esac
13694
13695 fi
13696
13697 # Check size of void *, size_t (enables tweaks for > 32bit address space)
13698 # The cast to long int works around a bug in the HP C Compiler
13699 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13700 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13701 # This bug is HP SR number 8606223364.
13702 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
13703 $as_echo_n "checking size of void *... " >&6; }
13704 if ${ac_cv_sizeof_void_p+:} false; then :
13705   $as_echo_n "(cached) " >&6
13706 else
13707   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p"        "$ac_includes_default"; then :
13708
13709 else
13710   if test "$ac_cv_type_void_p" = yes; then
13711      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13712 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13713 as_fn_error 77 "cannot compute sizeof (void *)
13714 See \`config.log' for more details" "$LINENO" 5; }
13715    else
13716      ac_cv_sizeof_void_p=0
13717    fi
13718 fi
13719
13720 fi
13721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
13722 $as_echo "$ac_cv_sizeof_void_p" >&6; }
13723
13724
13725
13726 cat >>confdefs.h <<_ACEOF
13727 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
13728 _ACEOF
13729
13730
13731 # The cast to long int works around a bug in the HP C Compiler
13732 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13733 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13734 # This bug is HP SR number 8606223364.
13735 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
13736 $as_echo_n "checking size of size_t... " >&6; }
13737 if ${ac_cv_sizeof_size_t+:} false; then :
13738   $as_echo_n "(cached) " >&6
13739 else
13740   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t"        "$ac_includes_default"; then :
13741
13742 else
13743   if test "$ac_cv_type_size_t" = yes; then
13744      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13745 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13746 as_fn_error 77 "cannot compute sizeof (size_t)
13747 See \`config.log' for more details" "$LINENO" 5; }
13748    else
13749      ac_cv_sizeof_size_t=0
13750    fi
13751 fi
13752
13753 fi
13754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
13755 $as_echo "$ac_cv_sizeof_size_t" >&6; }
13756
13757
13758
13759 cat >>confdefs.h <<_ACEOF
13760 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
13761 _ACEOF
13762
13763
13764 # The cast to long int works around a bug in the HP C Compiler
13765 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13766 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13767 # This bug is HP SR number 8606223364.
13768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
13769 $as_echo_n "checking size of long... " >&6; }
13770 if ${ac_cv_sizeof_long+:} false; then :
13771   $as_echo_n "(cached) " >&6
13772 else
13773   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
13774
13775 else
13776   if test "$ac_cv_type_long" = yes; then
13777      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13778 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13779 as_fn_error 77 "cannot compute sizeof (long)
13780 See \`config.log' for more details" "$LINENO" 5; }
13781    else
13782      ac_cv_sizeof_long=0
13783    fi
13784 fi
13785
13786 fi
13787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
13788 $as_echo "$ac_cv_sizeof_long" >&6; }
13789
13790
13791
13792 cat >>confdefs.h <<_ACEOF
13793 #define SIZEOF_LONG $ac_cv_sizeof_long
13794 _ACEOF
13795
13796
13797
13798 # Decide whether float4 is passed by value: user-selectable, enabled by default
13799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float4 passed by value" >&5
13800 $as_echo_n "checking whether to build with float4 passed by value... " >&6; }
13801
13802
13803 # Check whether --enable-float4-byval was given.
13804 if test "${enable_float4_byval+set}" = set; then :
13805   enableval=$enable_float4_byval;
13806   case $enableval in
13807     yes)
13808
13809 $as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
13810
13811                float4passbyval=true
13812       ;;
13813     no)
13814       float4passbyval=false
13815       ;;
13816     *)
13817       as_fn_error $? "no argument expected for --enable-float4-byval option" "$LINENO" 5
13818       ;;
13819   esac
13820
13821 else
13822   enable_float4_byval=yes
13823
13824 $as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
13825
13826                float4passbyval=true
13827 fi
13828
13829
13830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float4_byval" >&5
13831 $as_echo "$enable_float4_byval" >&6; }
13832
13833 cat >>confdefs.h <<_ACEOF
13834 #define FLOAT4PASSBYVAL $float4passbyval
13835 _ACEOF
13836
13837
13838 # Decide whether float8 is passed by value.
13839 # Note: this setting also controls int8 and related types such as timestamp.
13840 # If sizeof(Datum) >= 8, this is user-selectable, enabled by default.
13841 # If not, trying to select it is an error.
13842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float8 passed by value" >&5
13843 $as_echo_n "checking whether to build with float8 passed by value... " >&6; }
13844 if test $ac_cv_sizeof_void_p -ge 8 ; then
13845
13846
13847 # Check whether --enable-float8-byval was given.
13848 if test "${enable_float8_byval+set}" = set; then :
13849   enableval=$enable_float8_byval;
13850   case $enableval in
13851     yes)
13852       :
13853       ;;
13854     no)
13855       :
13856       ;;
13857     *)
13858       as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
13859       ;;
13860   esac
13861
13862 else
13863   enable_float8_byval=yes
13864
13865 fi
13866
13867
13868 else
13869
13870
13871 # Check whether --enable-float8-byval was given.
13872 if test "${enable_float8_byval+set}" = set; then :
13873   enableval=$enable_float8_byval;
13874   case $enableval in
13875     yes)
13876       :
13877       ;;
13878     no)
13879       :
13880       ;;
13881     *)
13882       as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
13883       ;;
13884   esac
13885
13886 else
13887   enable_float8_byval=no
13888
13889 fi
13890
13891
13892   if test "$enable_float8_byval" = yes ; then
13893     as_fn_error $? "--enable-float8-byval is not supported on 32-bit platforms." "$LINENO" 5
13894   fi
13895 fi
13896 if test "$enable_float8_byval" = yes ; then
13897
13898 $as_echo "#define USE_FLOAT8_BYVAL 1" >>confdefs.h
13899
13900   float8passbyval=true
13901 else
13902   float8passbyval=false
13903 fi
13904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float8_byval" >&5
13905 $as_echo "$enable_float8_byval" >&6; }
13906
13907 cat >>confdefs.h <<_ACEOF
13908 #define FLOAT8PASSBYVAL $float8passbyval
13909 _ACEOF
13910
13911
13912 # Determine memory alignment requirements for the basic C data types.
13913
13914 # The cast to long int works around a bug in the HP C Compiler,
13915 # see AC_CHECK_SIZEOF for more information.
13916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of short" >&5
13917 $as_echo_n "checking alignment of short... " >&6; }
13918 if ${ac_cv_alignof_short+:} false; then :
13919   $as_echo_n "(cached) " >&6
13920 else
13921   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_short"        "$ac_includes_default
13922 #ifndef offsetof
13923 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
13924 #endif
13925 typedef struct { char x; short y; } ac__type_alignof_;"; then :
13926
13927 else
13928   if test "$ac_cv_type_short" = yes; then
13929      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13930 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13931 as_fn_error 77 "cannot compute alignment of short
13932 See \`config.log' for more details" "$LINENO" 5; }
13933    else
13934      ac_cv_alignof_short=0
13935    fi
13936 fi
13937
13938 fi
13939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_short" >&5
13940 $as_echo "$ac_cv_alignof_short" >&6; }
13941
13942
13943
13944 cat >>confdefs.h <<_ACEOF
13945 #define ALIGNOF_SHORT $ac_cv_alignof_short
13946 _ACEOF
13947
13948
13949 # The cast to long int works around a bug in the HP C Compiler,
13950 # see AC_CHECK_SIZEOF for more information.
13951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of int" >&5
13952 $as_echo_n "checking alignment of int... " >&6; }
13953 if ${ac_cv_alignof_int+:} false; then :
13954   $as_echo_n "(cached) " >&6
13955 else
13956   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_int"        "$ac_includes_default
13957 #ifndef offsetof
13958 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
13959 #endif
13960 typedef struct { char x; int y; } ac__type_alignof_;"; then :
13961
13962 else
13963   if test "$ac_cv_type_int" = yes; then
13964      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13965 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13966 as_fn_error 77 "cannot compute alignment of int
13967 See \`config.log' for more details" "$LINENO" 5; }
13968    else
13969      ac_cv_alignof_int=0
13970    fi
13971 fi
13972
13973 fi
13974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_int" >&5
13975 $as_echo "$ac_cv_alignof_int" >&6; }
13976
13977
13978
13979 cat >>confdefs.h <<_ACEOF
13980 #define ALIGNOF_INT $ac_cv_alignof_int
13981 _ACEOF
13982
13983
13984 # The cast to long int works around a bug in the HP C Compiler,
13985 # see AC_CHECK_SIZEOF for more information.
13986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long" >&5
13987 $as_echo_n "checking alignment of long... " >&6; }
13988 if ${ac_cv_alignof_long+:} false; then :
13989   $as_echo_n "(cached) " >&6
13990 else
13991   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long"        "$ac_includes_default
13992 #ifndef offsetof
13993 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
13994 #endif
13995 typedef struct { char x; long y; } ac__type_alignof_;"; then :
13996
13997 else
13998   if test "$ac_cv_type_long" = yes; then
13999      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14000 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14001 as_fn_error 77 "cannot compute alignment of long
14002 See \`config.log' for more details" "$LINENO" 5; }
14003    else
14004      ac_cv_alignof_long=0
14005    fi
14006 fi
14007
14008 fi
14009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long" >&5
14010 $as_echo "$ac_cv_alignof_long" >&6; }
14011
14012
14013
14014 cat >>confdefs.h <<_ACEOF
14015 #define ALIGNOF_LONG $ac_cv_alignof_long
14016 _ACEOF
14017
14018
14019 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
14020   # The cast to long int works around a bug in the HP C Compiler,
14021 # see AC_CHECK_SIZEOF for more information.
14022 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long long int" >&5
14023 $as_echo_n "checking alignment of long long int... " >&6; }
14024 if ${ac_cv_alignof_long_long_int+:} false; then :
14025   $as_echo_n "(cached) " >&6
14026 else
14027   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long_long_int"        "$ac_includes_default
14028 #ifndef offsetof
14029 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
14030 #endif
14031 typedef struct { char x; long long int y; } ac__type_alignof_;"; then :
14032
14033 else
14034   if test "$ac_cv_type_long_long_int" = yes; then
14035      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14036 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14037 as_fn_error 77 "cannot compute alignment of long long int
14038 See \`config.log' for more details" "$LINENO" 5; }
14039    else
14040      ac_cv_alignof_long_long_int=0
14041    fi
14042 fi
14043
14044 fi
14045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long_long_int" >&5
14046 $as_echo "$ac_cv_alignof_long_long_int" >&6; }
14047
14048
14049
14050 cat >>confdefs.h <<_ACEOF
14051 #define ALIGNOF_LONG_LONG_INT $ac_cv_alignof_long_long_int
14052 _ACEOF
14053
14054
14055 fi
14056 # The cast to long int works around a bug in the HP C Compiler,
14057 # see AC_CHECK_SIZEOF for more information.
14058 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of double" >&5
14059 $as_echo_n "checking alignment of double... " >&6; }
14060 if ${ac_cv_alignof_double+:} false; then :
14061   $as_echo_n "(cached) " >&6
14062 else
14063   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_double"        "$ac_includes_default
14064 #ifndef offsetof
14065 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
14066 #endif
14067 typedef struct { char x; double y; } ac__type_alignof_;"; then :
14068
14069 else
14070   if test "$ac_cv_type_double" = yes; then
14071      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14072 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14073 as_fn_error 77 "cannot compute alignment of double
14074 See \`config.log' for more details" "$LINENO" 5; }
14075    else
14076      ac_cv_alignof_double=0
14077    fi
14078 fi
14079
14080 fi
14081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_double" >&5
14082 $as_echo "$ac_cv_alignof_double" >&6; }
14083
14084
14085
14086 cat >>confdefs.h <<_ACEOF
14087 #define ALIGNOF_DOUBLE $ac_cv_alignof_double
14088 _ACEOF
14089
14090
14091
14092 # Compute maximum alignment of any basic type.
14093 # We assume long's alignment is at least as strong as char, short, or int;
14094 # but we must check long long (if it exists) and double.
14095
14096 MAX_ALIGNOF=$ac_cv_alignof_long
14097 if test $MAX_ALIGNOF -lt $ac_cv_alignof_double ; then
14098   MAX_ALIGNOF=$ac_cv_alignof_double
14099 fi
14100 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $ac_cv_alignof_long_long_int ; then
14101   MAX_ALIGNOF="$ac_cv_alignof_long_long_int"
14102 fi
14103
14104 cat >>confdefs.h <<_ACEOF
14105 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
14106 _ACEOF
14107
14108
14109
14110 # Some platforms predefine the types int8, int16, etc.  Only check
14111 # a (hopefully) representative subset.
14112 ac_fn_c_check_type "$LINENO" "int8" "ac_cv_type_int8" "#include <stdio.h>
14113 "
14114 if test "x$ac_cv_type_int8" = xyes; then :
14115
14116 cat >>confdefs.h <<_ACEOF
14117 #define HAVE_INT8 1
14118 _ACEOF
14119
14120
14121 fi
14122 ac_fn_c_check_type "$LINENO" "uint8" "ac_cv_type_uint8" "#include <stdio.h>
14123 "
14124 if test "x$ac_cv_type_uint8" = xyes; then :
14125
14126 cat >>confdefs.h <<_ACEOF
14127 #define HAVE_UINT8 1
14128 _ACEOF
14129
14130
14131 fi
14132 ac_fn_c_check_type "$LINENO" "int64" "ac_cv_type_int64" "#include <stdio.h>
14133 "
14134 if test "x$ac_cv_type_int64" = xyes; then :
14135
14136 cat >>confdefs.h <<_ACEOF
14137 #define HAVE_INT64 1
14138 _ACEOF
14139
14140
14141 fi
14142 ac_fn_c_check_type "$LINENO" "uint64" "ac_cv_type_uint64" "#include <stdio.h>
14143 "
14144 if test "x$ac_cv_type_uint64" = xyes; then :
14145
14146 cat >>confdefs.h <<_ACEOF
14147 #define HAVE_UINT64 1
14148 _ACEOF
14149
14150
14151 fi
14152
14153
14154 # Check for extensions offering the integer scalar type __int128.
14155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128" >&5
14156 $as_echo_n "checking for __int128... " >&6; }
14157 if ${pgac_cv__128bit_int+:} false; then :
14158   $as_echo_n "(cached) " >&6
14159 else
14160   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14161 /* end confdefs.h.  */
14162
14163 /*
14164  * These are globals to discourage the compiler from folding all the
14165  * arithmetic tests down to compile-time constants.  We do not have
14166  * convenient support for 64bit literals at this point...
14167  */
14168 __int128 a = 48828125;
14169 __int128 b = 97656255;
14170
14171 int
14172 main ()
14173 {
14174
14175 __int128 c,d;
14176 a = (a << 12) + 1; /* 200000000001 */
14177 b = (b << 12) + 5; /* 400000000005 */
14178 /* use the most relevant arithmetic ops */
14179 c = a * b;
14180 d = (c + b) / b;
14181 /* return different values, to prevent optimizations */
14182 if (d != a+1)
14183   return 0;
14184 return 1;
14185
14186   ;
14187   return 0;
14188 }
14189 _ACEOF
14190 if ac_fn_c_try_link "$LINENO"; then :
14191   pgac_cv__128bit_int=yes
14192 else
14193   pgac_cv__128bit_int=no
14194 fi
14195 rm -f core conftest.err conftest.$ac_objext \
14196     conftest$ac_exeext conftest.$ac_ext
14197 fi
14198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int" >&5
14199 $as_echo "$pgac_cv__128bit_int" >&6; }
14200 if test x"$pgac_cv__128bit_int" = xyes ; then
14201
14202 $as_echo "#define PG_INT128_TYPE __int128" >>confdefs.h
14203
14204 fi
14205
14206 # Check for various atomic operations now that we have checked how to declare
14207 # 64bit integers.
14208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync char locking functions" >&5
14209 $as_echo_n "checking for builtin __sync char locking functions... " >&6; }
14210 if ${pgac_cv_gcc_sync_char_tas+:} false; then :
14211   $as_echo_n "(cached) " >&6
14212 else
14213   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14214 /* end confdefs.h.  */
14215
14216 int
14217 main ()
14218 {
14219 char lock = 0;
14220    __sync_lock_test_and_set(&lock, 1);
14221    __sync_lock_release(&lock);
14222   ;
14223   return 0;
14224 }
14225 _ACEOF
14226 if ac_fn_c_try_link "$LINENO"; then :
14227   pgac_cv_gcc_sync_char_tas="yes"
14228 else
14229   pgac_cv_gcc_sync_char_tas="no"
14230 fi
14231 rm -f core conftest.err conftest.$ac_objext \
14232     conftest$ac_exeext conftest.$ac_ext
14233 fi
14234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_char_tas" >&5
14235 $as_echo "$pgac_cv_gcc_sync_char_tas" >&6; }
14236 if test x"$pgac_cv_gcc_sync_char_tas" = x"yes"; then
14237
14238 $as_echo "#define HAVE_GCC__SYNC_CHAR_TAS 1" >>confdefs.h
14239
14240 fi
14241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 locking functions" >&5
14242 $as_echo_n "checking for builtin __sync int32 locking functions... " >&6; }
14243 if ${pgac_cv_gcc_sync_int32_tas+:} false; then :
14244   $as_echo_n "(cached) " >&6
14245 else
14246   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14247 /* end confdefs.h.  */
14248
14249 int
14250 main ()
14251 {
14252 int lock = 0;
14253    __sync_lock_test_and_set(&lock, 1);
14254    __sync_lock_release(&lock);
14255   ;
14256   return 0;
14257 }
14258 _ACEOF
14259 if ac_fn_c_try_link "$LINENO"; then :
14260   pgac_cv_gcc_sync_int32_tas="yes"
14261 else
14262   pgac_cv_gcc_sync_int32_tas="no"
14263 fi
14264 rm -f core conftest.err conftest.$ac_objext \
14265     conftest$ac_exeext conftest.$ac_ext
14266 fi
14267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_tas" >&5
14268 $as_echo "$pgac_cv_gcc_sync_int32_tas" >&6; }
14269 if test x"$pgac_cv_gcc_sync_int32_tas" = x"yes"; then
14270
14271 $as_echo "#define HAVE_GCC__SYNC_INT32_TAS 1" >>confdefs.h
14272
14273 fi
14274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 atomic operations" >&5
14275 $as_echo_n "checking for builtin __sync int32 atomic operations... " >&6; }
14276 if ${pgac_cv_gcc_sync_int32_cas+:} false; then :
14277   $as_echo_n "(cached) " >&6
14278 else
14279   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14280 /* end confdefs.h.  */
14281
14282 int
14283 main ()
14284 {
14285 int val = 0;
14286    __sync_val_compare_and_swap(&val, 0, 37);
14287   ;
14288   return 0;
14289 }
14290 _ACEOF
14291 if ac_fn_c_try_link "$LINENO"; then :
14292   pgac_cv_gcc_sync_int32_cas="yes"
14293 else
14294   pgac_cv_gcc_sync_int32_cas="no"
14295 fi
14296 rm -f core conftest.err conftest.$ac_objext \
14297     conftest$ac_exeext conftest.$ac_ext
14298 fi
14299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_cas" >&5
14300 $as_echo "$pgac_cv_gcc_sync_int32_cas" >&6; }
14301 if test x"$pgac_cv_gcc_sync_int32_cas" = x"yes"; then
14302
14303 $as_echo "#define HAVE_GCC__SYNC_INT32_CAS 1" >>confdefs.h
14304
14305 fi
14306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int64 atomic operations" >&5
14307 $as_echo_n "checking for builtin __sync int64 atomic operations... " >&6; }
14308 if ${pgac_cv_gcc_sync_int64_cas+:} false; then :
14309   $as_echo_n "(cached) " >&6
14310 else
14311   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14312 /* end confdefs.h.  */
14313
14314 int
14315 main ()
14316 {
14317 PG_INT64_TYPE lock = 0;
14318    __sync_val_compare_and_swap(&lock, 0, (PG_INT64_TYPE) 37);
14319   ;
14320   return 0;
14321 }
14322 _ACEOF
14323 if ac_fn_c_try_link "$LINENO"; then :
14324   pgac_cv_gcc_sync_int64_cas="yes"
14325 else
14326   pgac_cv_gcc_sync_int64_cas="no"
14327 fi
14328 rm -f core conftest.err conftest.$ac_objext \
14329     conftest$ac_exeext conftest.$ac_ext
14330 fi
14331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int64_cas" >&5
14332 $as_echo "$pgac_cv_gcc_sync_int64_cas" >&6; }
14333 if test x"$pgac_cv_gcc_sync_int64_cas" = x"yes"; then
14334
14335 $as_echo "#define HAVE_GCC__SYNC_INT64_CAS 1" >>confdefs.h
14336
14337 fi
14338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int32 atomic operations" >&5
14339 $as_echo_n "checking for builtin __atomic int32 atomic operations... " >&6; }
14340 if ${pgac_cv_gcc_atomic_int32_cas+:} false; then :
14341   $as_echo_n "(cached) " >&6
14342 else
14343   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14344 /* end confdefs.h.  */
14345
14346 int
14347 main ()
14348 {
14349 int val = 0;
14350    int expect = 0;
14351    __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
14352   ;
14353   return 0;
14354 }
14355 _ACEOF
14356 if ac_fn_c_try_link "$LINENO"; then :
14357   pgac_cv_gcc_atomic_int32_cas="yes"
14358 else
14359   pgac_cv_gcc_atomic_int32_cas="no"
14360 fi
14361 rm -f core conftest.err conftest.$ac_objext \
14362     conftest$ac_exeext conftest.$ac_ext
14363 fi
14364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int32_cas" >&5
14365 $as_echo "$pgac_cv_gcc_atomic_int32_cas" >&6; }
14366 if test x"$pgac_cv_gcc_atomic_int32_cas" = x"yes"; then
14367
14368 $as_echo "#define HAVE_GCC__ATOMIC_INT32_CAS 1" >>confdefs.h
14369
14370 fi
14371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int64 atomic operations" >&5
14372 $as_echo_n "checking for builtin __atomic int64 atomic operations... " >&6; }
14373 if ${pgac_cv_gcc_atomic_int64_cas+:} false; then :
14374   $as_echo_n "(cached) " >&6
14375 else
14376   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14377 /* end confdefs.h.  */
14378
14379 int
14380 main ()
14381 {
14382 PG_INT64_TYPE val = 0;
14383    PG_INT64_TYPE expect = 0;
14384    __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
14385   ;
14386   return 0;
14387 }
14388 _ACEOF
14389 if ac_fn_c_try_link "$LINENO"; then :
14390   pgac_cv_gcc_atomic_int64_cas="yes"
14391 else
14392   pgac_cv_gcc_atomic_int64_cas="no"
14393 fi
14394 rm -f core conftest.err conftest.$ac_objext \
14395     conftest$ac_exeext conftest.$ac_ext
14396 fi
14397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int64_cas" >&5
14398 $as_echo "$pgac_cv_gcc_atomic_int64_cas" >&6; }
14399 if test x"$pgac_cv_gcc_atomic_int64_cas" = x"yes"; then
14400
14401 $as_echo "#define HAVE_GCC__ATOMIC_INT64_CAS 1" >>confdefs.h
14402
14403 fi
14404
14405
14406 # Check for x86 cpuid instruction
14407 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __get_cpuid" >&5
14408 $as_echo_n "checking for __get_cpuid... " >&6; }
14409 if ${pgac_cv__get_cpuid+:} false; then :
14410   $as_echo_n "(cached) " >&6
14411 else
14412   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14413 /* end confdefs.h.  */
14414 #include <cpuid.h>
14415 int
14416 main ()
14417 {
14418 unsigned int exx[4] = {0, 0, 0, 0};
14419   __get_cpuid(1, &exx[0], &exx[1], &exx[2], &exx[3]);
14420
14421   ;
14422   return 0;
14423 }
14424 _ACEOF
14425 if ac_fn_c_try_link "$LINENO"; then :
14426   pgac_cv__get_cpuid="yes"
14427 else
14428   pgac_cv__get_cpuid="no"
14429 fi
14430 rm -f core conftest.err conftest.$ac_objext \
14431     conftest$ac_exeext conftest.$ac_ext
14432 fi
14433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__get_cpuid" >&5
14434 $as_echo "$pgac_cv__get_cpuid" >&6; }
14435 if test x"$pgac_cv__get_cpuid" = x"yes"; then
14436
14437 $as_echo "#define HAVE__GET_CPUID 1" >>confdefs.h
14438
14439 fi
14440
14441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __cpuid" >&5
14442 $as_echo_n "checking for __cpuid... " >&6; }
14443 if ${pgac_cv__cpuid+:} false; then :
14444   $as_echo_n "(cached) " >&6
14445 else
14446   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14447 /* end confdefs.h.  */
14448 #include <intrin.h>
14449 int
14450 main ()
14451 {
14452 unsigned int exx[4] = {0, 0, 0, 0};
14453   __get_cpuid(exx[0], 1);
14454
14455   ;
14456   return 0;
14457 }
14458 _ACEOF
14459 if ac_fn_c_try_link "$LINENO"; then :
14460   pgac_cv__cpuid="yes"
14461 else
14462   pgac_cv__cpuid="no"
14463 fi
14464 rm -f core conftest.err conftest.$ac_objext \
14465     conftest$ac_exeext conftest.$ac_ext
14466 fi
14467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__cpuid" >&5
14468 $as_echo "$pgac_cv__cpuid" >&6; }
14469 if test x"$pgac_cv__cpuid" = x"yes"; then
14470
14471 $as_echo "#define HAVE__CPUID 1" >>confdefs.h
14472
14473 fi
14474
14475 # Check for Intel SSE 4.2 intrinsics to do CRC calculations.
14476 #
14477 # First check if the _mm_crc32_u8 and _mm_crc32_u64 intrinsics can be used
14478 # with the default compiler flags. If not, check if adding the -msse4.2
14479 # flag helps. CFLAGS_SSE42 is set to -msse4.2 if that's required.
14480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=" >&5
14481 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=... " >&6; }
14482 if ${pgac_cv_sse42_crc32_intrinsics_+:} false; then :
14483   $as_echo_n "(cached) " >&6
14484 else
14485   pgac_save_CFLAGS=$CFLAGS
14486 CFLAGS="$pgac_save_CFLAGS "
14487 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14488 /* end confdefs.h.  */
14489 #include <nmmintrin.h>
14490 int
14491 main ()
14492 {
14493 unsigned int crc = 0;
14494    crc = _mm_crc32_u8(crc, 0);
14495    crc = _mm_crc32_u32(crc, 0);
14496    /* return computed value, to prevent the above being optimized away */
14497    return crc == 0;
14498   ;
14499   return 0;
14500 }
14501 _ACEOF
14502 if ac_fn_c_try_link "$LINENO"; then :
14503   pgac_cv_sse42_crc32_intrinsics_=yes
14504 else
14505   pgac_cv_sse42_crc32_intrinsics_=no
14506 fi
14507 rm -f core conftest.err conftest.$ac_objext \
14508     conftest$ac_exeext conftest.$ac_ext
14509 CFLAGS="$pgac_save_CFLAGS"
14510 fi
14511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics_" >&5
14512 $as_echo "$pgac_cv_sse42_crc32_intrinsics_" >&6; }
14513 if test x"$pgac_cv_sse42_crc32_intrinsics_" = x"yes"; then
14514   CFLAGS_SSE42=""
14515   pgac_sse42_crc32_intrinsics=yes
14516 fi
14517
14518 if test x"$pgac_sse42_crc32_intrinsics" != x"yes"; then
14519   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2" >&5
14520 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2... " >&6; }
14521 if ${pgac_cv_sse42_crc32_intrinsics__msse4_2+:} false; then :
14522   $as_echo_n "(cached) " >&6
14523 else
14524   pgac_save_CFLAGS=$CFLAGS
14525 CFLAGS="$pgac_save_CFLAGS -msse4.2"
14526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14527 /* end confdefs.h.  */
14528 #include <nmmintrin.h>
14529 int
14530 main ()
14531 {
14532 unsigned int crc = 0;
14533    crc = _mm_crc32_u8(crc, 0);
14534    crc = _mm_crc32_u32(crc, 0);
14535    /* return computed value, to prevent the above being optimized away */
14536    return crc == 0;
14537   ;
14538   return 0;
14539 }
14540 _ACEOF
14541 if ac_fn_c_try_link "$LINENO"; then :
14542   pgac_cv_sse42_crc32_intrinsics__msse4_2=yes
14543 else
14544   pgac_cv_sse42_crc32_intrinsics__msse4_2=no
14545 fi
14546 rm -f core conftest.err conftest.$ac_objext \
14547     conftest$ac_exeext conftest.$ac_ext
14548 CFLAGS="$pgac_save_CFLAGS"
14549 fi
14550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics__msse4_2" >&5
14551 $as_echo "$pgac_cv_sse42_crc32_intrinsics__msse4_2" >&6; }
14552 if test x"$pgac_cv_sse42_crc32_intrinsics__msse4_2" = x"yes"; then
14553   CFLAGS_SSE42="-msse4.2"
14554   pgac_sse42_crc32_intrinsics=yes
14555 fi
14556
14557 fi
14558
14559
14560 # Are we targeting a processor that supports SSE 4.2? gcc, clang and icc all
14561 # define __SSE4_2__ in that case.
14562 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14563 /* end confdefs.h.  */
14564
14565 int
14566 main ()
14567 {
14568
14569 #ifndef __SSE4_2__
14570 #error __SSE4_2__ not defined
14571 #endif
14572
14573   ;
14574   return 0;
14575 }
14576 _ACEOF
14577 if ac_fn_c_try_compile "$LINENO"; then :
14578   SSE4_2_TARGETED=1
14579 fi
14580 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14581
14582 # Select CRC-32C implementation.
14583 #
14584 # If we are targeting a processor that has SSE 4.2 instructions, we can use the
14585 # special CRC instructions for calculating CRC-32C. If we're not targeting such
14586 # a processor, but we can nevertheless produce code that uses the SSE
14587 # intrinsics, perhaps with some extra CFLAGS, compile both implementations and
14588 # select which one to use at runtime, depending on whether SSE 4.2 is supported
14589 # by the processor we're running on.
14590 #
14591 # You can override this logic by setting the appropriate USE_*_CRC32 flag to 1
14592 # in the template or configure command line.
14593 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
14594   if test x"$pgac_sse42_crc32_intrinsics" = x"yes" && test x"$SSE4_2_TARGETED" = x"1" ; then
14595     USE_SSE42_CRC32C=1
14596   else
14597     # the CPUID instruction is needed for the runtime check.
14598     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
14599       USE_SSE42_CRC32C_WITH_RUNTIME_CHECK=1
14600     else
14601       # fall back to slicing-by-8 algorithm which doesn't require any special
14602       # CPU support.
14603       USE_SLICING_BY_8_CRC32C=1
14604     fi
14605   fi
14606 fi
14607
14608 # Set PG_CRC32C_OBJS appropriately depending on the selected implementation.
14609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which CRC-32C implementation to use" >&5
14610 $as_echo_n "checking which CRC-32C implementation to use... " >&6; }
14611 if test x"$USE_SSE42_CRC32C" = x"1"; then
14612
14613 $as_echo "#define USE_SSE42_CRC32C 1" >>confdefs.h
14614
14615   PG_CRC32C_OBJS="pg_crc32c_sse42.o"
14616   { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2" >&5
14617 $as_echo "SSE 4.2" >&6; }
14618 else
14619   if test x"$USE_SSE42_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
14620
14621 $as_echo "#define USE_SSE42_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
14622
14623     PG_CRC32C_OBJS="pg_crc32c_sse42.o pg_crc32c_sb8.o pg_crc32c_choose.o"
14624     { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2 with runtime check" >&5
14625 $as_echo "SSE 4.2 with runtime check" >&6; }
14626   else
14627
14628 $as_echo "#define USE_SLICING_BY_8_CRC32C 1" >>confdefs.h
14629
14630     PG_CRC32C_OBJS="pg_crc32c_sb8.o"
14631     { $as_echo "$as_me:${as_lineno-$LINENO}: result: slicing-by-8" >&5
14632 $as_echo "slicing-by-8" >&6; }
14633   fi
14634 fi
14635
14636
14637
14638 # Check that POSIX signals are available if thread safety is enabled.
14639 if test "$PORTNAME" != "win32"
14640 then
14641 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for POSIX signal interface" >&5
14642 $as_echo_n "checking for POSIX signal interface... " >&6; }
14643 if ${pgac_cv_func_posix_signals+:} false; then :
14644   $as_echo_n "(cached) " >&6
14645 else
14646   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14647 /* end confdefs.h.  */
14648 #include <signal.h>
14649
14650 int
14651 main ()
14652 {
14653 struct sigaction act, oact;
14654 sigemptyset(&act.sa_mask);
14655 act.sa_flags = SA_RESTART;
14656 sigaction(0, &act, &oact);
14657   ;
14658   return 0;
14659 }
14660 _ACEOF
14661 if ac_fn_c_try_link "$LINENO"; then :
14662   pgac_cv_func_posix_signals=yes
14663 else
14664   pgac_cv_func_posix_signals=no
14665 fi
14666 rm -f core conftest.err conftest.$ac_objext \
14667     conftest$ac_exeext conftest.$ac_ext
14668 fi
14669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_posix_signals" >&5
14670 $as_echo "$pgac_cv_func_posix_signals" >&6; }
14671 if test x"$pgac_cv_func_posix_signals" = xyes ; then
14672
14673 $as_echo "#define HAVE_POSIX_SIGNALS 1" >>confdefs.h
14674
14675 fi
14676 HAVE_POSIX_SIGNALS=$pgac_cv_func_posix_signals
14677
14678 if test "$pgac_cv_func_posix_signals" != yes -a "$enable_thread_safety" = yes; then
14679   as_fn_error $? "
14680 Thread-safety requires POSIX signals, which are not supported by this
14681 operating system;  use --disable-thread-safety to disable thread safety." "$LINENO" 5
14682 fi
14683 fi
14684
14685
14686 # Select semaphore implementation type.
14687 if test "$PORTNAME" != "win32"; then
14688   if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
14689
14690 $as_echo "#define USE_NAMED_POSIX_SEMAPHORES 1" >>confdefs.h
14691
14692     SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
14693   else
14694     if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
14695
14696 $as_echo "#define USE_UNNAMED_POSIX_SEMAPHORES 1" >>confdefs.h
14697
14698       SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
14699     else
14700
14701 $as_echo "#define USE_SYSV_SEMAPHORES 1" >>confdefs.h
14702
14703       SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
14704     fi
14705   fi
14706 else
14707
14708 $as_echo "#define USE_WIN32_SEMAPHORES 1" >>confdefs.h
14709
14710   SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
14711 fi
14712
14713
14714 # Select shared-memory implementation type.
14715 if test "$PORTNAME" != "win32"; then
14716
14717 $as_echo "#define USE_SYSV_SHARED_MEMORY 1" >>confdefs.h
14718
14719   SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
14720 else
14721
14722 $as_echo "#define USE_WIN32_SHARED_MEMORY 1" >>confdefs.h
14723
14724   SHMEM_IMPLEMENTATION="src/backend/port/win32_shmem.c"
14725 fi
14726
14727 # Select latch implementation type.
14728 if test "$PORTNAME" != "win32"; then
14729   LATCH_IMPLEMENTATION="src/backend/port/unix_latch.c"
14730 else
14731   LATCH_IMPLEMENTATION="src/backend/port/win32_latch.c"
14732 fi
14733
14734 # If not set in template file, set bytes to use libc memset()
14735 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
14736   MEMSET_LOOP_LIMIT=1024
14737 fi
14738
14739 cat >>confdefs.h <<_ACEOF
14740 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
14741 _ACEOF
14742
14743
14744
14745 if test "$enable_nls" = yes ; then
14746
14747   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bind_textdomain_codeset" >&5
14748 $as_echo_n "checking for library containing bind_textdomain_codeset... " >&6; }
14749 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
14750   $as_echo_n "(cached) " >&6
14751 else
14752   ac_func_search_save_LIBS=$LIBS
14753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14754 /* end confdefs.h.  */
14755
14756 /* Override any GCC internal prototype to avoid an error.
14757    Use char because int might match the return type of a GCC
14758    builtin and then its argument prototype would still apply.  */
14759 #ifdef __cplusplus
14760 extern "C"
14761 #endif
14762 char bind_textdomain_codeset ();
14763 int
14764 main ()
14765 {
14766 return bind_textdomain_codeset ();
14767   ;
14768   return 0;
14769 }
14770 _ACEOF
14771 for ac_lib in '' intl; do
14772   if test -z "$ac_lib"; then
14773     ac_res="none required"
14774   else
14775     ac_res=-l$ac_lib
14776     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
14777   fi
14778   if ac_fn_c_try_link "$LINENO"; then :
14779   ac_cv_search_bind_textdomain_codeset=$ac_res
14780 fi
14781 rm -f core conftest.err conftest.$ac_objext \
14782     conftest$ac_exeext
14783   if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
14784   break
14785 fi
14786 done
14787 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
14788
14789 else
14790   ac_cv_search_bind_textdomain_codeset=no
14791 fi
14792 rm conftest.$ac_ext
14793 LIBS=$ac_func_search_save_LIBS
14794 fi
14795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bind_textdomain_codeset" >&5
14796 $as_echo "$ac_cv_search_bind_textdomain_codeset" >&6; }
14797 ac_res=$ac_cv_search_bind_textdomain_codeset
14798 if test "$ac_res" != no; then :
14799   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14800
14801 else
14802   as_fn_error $? "a gettext implementation is required for NLS" "$LINENO" 5
14803 fi
14804
14805   ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
14806 if test "x$ac_cv_header_libintl_h" = xyes; then :
14807
14808 else
14809   as_fn_error $? "header file <libintl.h> is required for NLS" "$LINENO" 5
14810 fi
14811
14812
14813   for ac_prog in msgfmt
14814 do
14815   # Extract the first word of "$ac_prog", so it can be a program name with args.
14816 set dummy $ac_prog; ac_word=$2
14817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14818 $as_echo_n "checking for $ac_word... " >&6; }
14819 if ${ac_cv_prog_MSGFMT+:} false; then :
14820   $as_echo_n "(cached) " >&6
14821 else
14822   if test -n "$MSGFMT"; then
14823   ac_cv_prog_MSGFMT="$MSGFMT" # Let the user override the test.
14824 else
14825 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14826 for as_dir in $PATH
14827 do
14828   IFS=$as_save_IFS
14829   test -z "$as_dir" && as_dir=.
14830     for ac_exec_ext in '' $ac_executable_extensions; do
14831   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14832     ac_cv_prog_MSGFMT="$ac_prog"
14833     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14834     break 2
14835   fi
14836 done
14837   done
14838 IFS=$as_save_IFS
14839
14840 fi
14841 fi
14842 MSGFMT=$ac_cv_prog_MSGFMT
14843 if test -n "$MSGFMT"; then
14844   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
14845 $as_echo "$MSGFMT" >&6; }
14846 else
14847   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14848 $as_echo "no" >&6; }
14849 fi
14850
14851
14852   test -n "$MSGFMT" && break
14853 done
14854
14855   if test -z "$MSGFMT"; then
14856     as_fn_error $? "msgfmt is required for NLS" "$LINENO" 5
14857   fi
14858   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msgfmt flags" >&5
14859 $as_echo_n "checking for msgfmt flags... " >&6; }
14860 if ${pgac_cv_msgfmt_flags+:} false; then :
14861   $as_echo_n "(cached) " >&6
14862 else
14863   if test x"$MSGFMT" != x"" && "$MSGFMT" --version 2>&1 | grep "GNU" >/dev/null; then
14864     pgac_cv_msgfmt_flags=-c
14865 fi
14866 fi
14867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_msgfmt_flags" >&5
14868 $as_echo "$pgac_cv_msgfmt_flags" >&6; }
14869   MSGFMT_FLAGS=$pgac_cv_msgfmt_flags
14870
14871   for ac_prog in msgmerge
14872 do
14873   # Extract the first word of "$ac_prog", so it can be a program name with args.
14874 set dummy $ac_prog; ac_word=$2
14875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14876 $as_echo_n "checking for $ac_word... " >&6; }
14877 if ${ac_cv_prog_MSGMERGE+:} false; then :
14878   $as_echo_n "(cached) " >&6
14879 else
14880   if test -n "$MSGMERGE"; then
14881   ac_cv_prog_MSGMERGE="$MSGMERGE" # Let the user override the test.
14882 else
14883 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14884 for as_dir in $PATH
14885 do
14886   IFS=$as_save_IFS
14887   test -z "$as_dir" && as_dir=.
14888     for ac_exec_ext in '' $ac_executable_extensions; do
14889   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14890     ac_cv_prog_MSGMERGE="$ac_prog"
14891     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14892     break 2
14893   fi
14894 done
14895   done
14896 IFS=$as_save_IFS
14897
14898 fi
14899 fi
14900 MSGMERGE=$ac_cv_prog_MSGMERGE
14901 if test -n "$MSGMERGE"; then
14902   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
14903 $as_echo "$MSGMERGE" >&6; }
14904 else
14905   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14906 $as_echo "no" >&6; }
14907 fi
14908
14909
14910   test -n "$MSGMERGE" && break
14911 done
14912
14913   for ac_prog in xgettext
14914 do
14915   # Extract the first word of "$ac_prog", so it can be a program name with args.
14916 set dummy $ac_prog; ac_word=$2
14917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14918 $as_echo_n "checking for $ac_word... " >&6; }
14919 if ${ac_cv_prog_XGETTEXT+:} false; then :
14920   $as_echo_n "(cached) " >&6
14921 else
14922   if test -n "$XGETTEXT"; then
14923   ac_cv_prog_XGETTEXT="$XGETTEXT" # Let the user override the test.
14924 else
14925 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14926 for as_dir in $PATH
14927 do
14928   IFS=$as_save_IFS
14929   test -z "$as_dir" && as_dir=.
14930     for ac_exec_ext in '' $ac_executable_extensions; do
14931   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14932     ac_cv_prog_XGETTEXT="$ac_prog"
14933     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14934     break 2
14935   fi
14936 done
14937   done
14938 IFS=$as_save_IFS
14939
14940 fi
14941 fi
14942 XGETTEXT=$ac_cv_prog_XGETTEXT
14943 if test -n "$XGETTEXT"; then
14944   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
14945 $as_echo "$XGETTEXT" >&6; }
14946 else
14947   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14948 $as_echo "no" >&6; }
14949 fi
14950
14951
14952   test -n "$XGETTEXT" && break
14953 done
14954
14955
14956 fi
14957
14958 # Check for Tcl configuration script tclConfig.sh
14959 if test "$with_tcl" = yes; then
14960     for ac_prog in tclsh tcl tclsh8.6 tclsh86 tclsh8.5 tclsh85 tclsh8.4 tclsh84 tclsh8.3 tclsh83
14961 do
14962   # Extract the first word of "$ac_prog", so it can be a program name with args.
14963 set dummy $ac_prog; ac_word=$2
14964 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14965 $as_echo_n "checking for $ac_word... " >&6; }
14966 if ${ac_cv_path_TCLSH+:} false; then :
14967   $as_echo_n "(cached) " >&6
14968 else
14969   case $TCLSH in
14970   [\\/]* | ?:[\\/]*)
14971   ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
14972   ;;
14973   *)
14974   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14975 for as_dir in $PATH
14976 do
14977   IFS=$as_save_IFS
14978   test -z "$as_dir" && as_dir=.
14979     for ac_exec_ext in '' $ac_executable_extensions; do
14980   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14981     ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
14982     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14983     break 2
14984   fi
14985 done
14986   done
14987 IFS=$as_save_IFS
14988
14989   ;;
14990 esac
14991 fi
14992 TCLSH=$ac_cv_path_TCLSH
14993 if test -n "$TCLSH"; then
14994   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
14995 $as_echo "$TCLSH" >&6; }
14996 else
14997   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14998 $as_echo "no" >&6; }
14999 fi
15000
15001
15002   test -n "$TCLSH" && break
15003 done
15004
15005 if test x"$TCLSH" = x""; then
15006   as_fn_error $? "Tcl shell not found" "$LINENO" 5
15007 fi
15008
15009 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclConfig.sh" >&5
15010 $as_echo_n "checking for tclConfig.sh... " >&6; }
15011 # Let user override test
15012 if test -z "$TCL_CONFIG_SH"; then
15013     pgac_test_dirs="$with_tclconfig"
15014
15015     set X $pgac_test_dirs; shift
15016     if test $# -eq 0; then
15017         test -z "$TCLSH" && as_fn_error $? "unable to locate tclConfig.sh because no Tcl shell was found" "$LINENO" 5
15018         set X `echo 'puts $auto_path' | $TCLSH`; shift
15019     fi
15020
15021     for pgac_dir do
15022         if test -r "$pgac_dir/tclConfig.sh"; then
15023             TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
15024             break
15025         fi
15026     done
15027 fi
15028
15029 if test -z "$TCL_CONFIG_SH"; then
15030     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15031 $as_echo "no" >&6; }
15032     as_fn_error $? "file 'tclConfig.sh' is required for Tcl" "$LINENO" 5
15033 else
15034     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCL_CONFIG_SH" >&5
15035 $as_echo "$TCL_CONFIG_SH" >&6; }
15036 fi
15037
15038
15039
15040     . "$TCL_CONFIG_SH"
15041 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
15042 eval TCL_LIBS=\"$TCL_LIBS\"
15043 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
15044 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
15045
15046         if test "$TCL_SHARED_BUILD" != 1; then
15047       as_fn_error $? "cannot build PL/Tcl because Tcl is not a shared library
15048 Use --without-tcl to disable building PL/Tcl." "$LINENO" 5
15049     fi
15050     # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
15051     ac_save_CPPFLAGS=$CPPFLAGS
15052     CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
15053     ac_fn_c_check_header_mongrel "$LINENO" "tcl.h" "ac_cv_header_tcl_h" "$ac_includes_default"
15054 if test "x$ac_cv_header_tcl_h" = xyes; then :
15055
15056 else
15057   as_fn_error $? "header file <tcl.h> is required for Tcl" "$LINENO" 5
15058 fi
15059
15060
15061     CPPFLAGS=$ac_save_CPPFLAGS
15062 fi
15063
15064 # check for <perl.h>
15065 if test "$with_perl" = yes; then
15066   ac_save_CPPFLAGS=$CPPFLAGS
15067   CPPFLAGS="$CPPFLAGS -I$perl_archlibexp/CORE"
15068   ac_fn_c_check_header_compile "$LINENO" "perl.h" "ac_cv_header_perl_h" "#include <EXTERN.h>
15069 "
15070 if test "x$ac_cv_header_perl_h" = xyes; then :
15071
15072 else
15073   as_fn_error $? "header file <perl.h> is required for Perl" "$LINENO" 5
15074 fi
15075
15076
15077   # While we're at it, check that we can link to libperl.
15078   # On most platforms, if perl.h is there then libperl.so will be too, but at
15079   # this writing Debian packages them separately.  There is no known reason to
15080   # waste cycles on separate probes for the Tcl or Python libraries, though.
15081   pgac_save_LIBS=$LIBS
15082   LIBS="$perl_embed_ldflags"
15083   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libperl" >&5
15084 $as_echo_n "checking for libperl... " >&6; }
15085   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15086 /* end confdefs.h.  */
15087
15088 #include <EXTERN.h>
15089 #include <perl.h>
15090
15091 int
15092 main ()
15093 {
15094 perl_alloc();
15095   ;
15096   return 0;
15097 }
15098 _ACEOF
15099 if ac_fn_c_try_link "$LINENO"; then :
15100   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15101 $as_echo "yes" >&6; }
15102 else
15103   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15104 $as_echo "no" >&6; }
15105      as_fn_error $? "libperl library is required for Perl" "$LINENO" 5
15106 fi
15107 rm -f core conftest.err conftest.$ac_objext \
15108     conftest$ac_exeext conftest.$ac_ext
15109   LIBS=$pgac_save_LIBS
15110   CPPFLAGS=$ac_save_CPPFLAGS
15111 fi
15112
15113 # check for <Python.h>
15114 if test "$with_python" = yes; then
15115   ac_save_CPPFLAGS=$CPPFLAGS
15116   CPPFLAGS="$python_includespec $CPPFLAGS"
15117   ac_fn_c_check_header_mongrel "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default"
15118 if test "x$ac_cv_header_Python_h" = xyes; then :
15119
15120 else
15121   as_fn_error $? "header file <Python.h> is required for Python" "$LINENO" 5
15122 fi
15123
15124
15125   CPPFLAGS=$ac_save_CPPFLAGS
15126 fi
15127
15128 #
15129 # Check for DocBook and tools
15130 #
15131 for ac_prog in onsgmls nsgmls
15132 do
15133   # Extract the first word of "$ac_prog", so it can be a program name with args.
15134 set dummy $ac_prog; ac_word=$2
15135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15136 $as_echo_n "checking for $ac_word... " >&6; }
15137 if ${ac_cv_prog_NSGMLS+:} false; then :
15138   $as_echo_n "(cached) " >&6
15139 else
15140   if test -n "$NSGMLS"; then
15141   ac_cv_prog_NSGMLS="$NSGMLS" # Let the user override the test.
15142 else
15143 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15144 for as_dir in $PATH
15145 do
15146   IFS=$as_save_IFS
15147   test -z "$as_dir" && as_dir=.
15148     for ac_exec_ext in '' $ac_executable_extensions; do
15149   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15150     ac_cv_prog_NSGMLS="$ac_prog"
15151     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15152     break 2
15153   fi
15154 done
15155   done
15156 IFS=$as_save_IFS
15157
15158 fi
15159 fi
15160 NSGMLS=$ac_cv_prog_NSGMLS
15161 if test -n "$NSGMLS"; then
15162   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NSGMLS" >&5
15163 $as_echo "$NSGMLS" >&6; }
15164 else
15165   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15166 $as_echo "no" >&6; }
15167 fi
15168
15169
15170   test -n "$NSGMLS" && break
15171 done
15172
15173 for ac_prog in openjade jade
15174 do
15175   # Extract the first word of "$ac_prog", so it can be a program name with args.
15176 set dummy $ac_prog; ac_word=$2
15177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15178 $as_echo_n "checking for $ac_word... " >&6; }
15179 if ${ac_cv_prog_JADE+:} false; then :
15180   $as_echo_n "(cached) " >&6
15181 else
15182   if test -n "$JADE"; then
15183   ac_cv_prog_JADE="$JADE" # Let the user override the test.
15184 else
15185 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15186 for as_dir in $PATH
15187 do
15188   IFS=$as_save_IFS
15189   test -z "$as_dir" && as_dir=.
15190     for ac_exec_ext in '' $ac_executable_extensions; do
15191   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15192     ac_cv_prog_JADE="$ac_prog"
15193     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15194     break 2
15195   fi
15196 done
15197   done
15198 IFS=$as_save_IFS
15199
15200 fi
15201 fi
15202 JADE=$ac_cv_prog_JADE
15203 if test -n "$JADE"; then
15204   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JADE" >&5
15205 $as_echo "$JADE" >&6; }
15206 else
15207   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15208 $as_echo "no" >&6; }
15209 fi
15210
15211
15212   test -n "$JADE" && break
15213 done
15214
15215
15216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DocBook V4.2" >&5
15217 $as_echo_n "checking for DocBook V4.2... " >&6; }
15218 if ${pgac_cv_check_docbook+:} false; then :
15219   $as_echo_n "(cached) " >&6
15220 else
15221   cat >conftest.sgml <<EOF
15222 <!doctype book PUBLIC "-//OASIS//DTD DocBook V4.2//EN">
15223 <book>
15224  <title>test</title>
15225  <chapter>
15226   <title>random</title>
15227    <sect1>
15228     <title>testsect</title>
15229     <para>text</para>
15230   </sect1>
15231  </chapter>
15232 </book>
15233 EOF
15234
15235 pgac_cv_check_docbook=no
15236
15237 if test -n "$NSGMLS"; then
15238   $NSGMLS -s conftest.sgml 1>&5 2>&1
15239   if test $? -eq 0; then
15240     pgac_cv_check_docbook=yes
15241   fi
15242 fi
15243 rm -f conftest.sgml
15244 fi
15245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_docbook" >&5
15246 $as_echo "$pgac_cv_check_docbook" >&6; }
15247
15248 have_docbook=$pgac_cv_check_docbook
15249
15250
15251 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DocBook stylesheets" >&5
15252 $as_echo_n "checking for DocBook stylesheets... " >&6; }
15253 if ${pgac_cv_path_stylesheets+:} false; then :
15254   $as_echo_n "(cached) " >&6
15255 else
15256   if test -n "$DOCBOOKSTYLE"; then
15257   pgac_cv_path_stylesheets=$DOCBOOKSTYLE
15258 else
15259   for pgac_prefix in /usr /usr/local /opt /sw; do
15260     for pgac_infix in share lib; do
15261       for pgac_postfix in \
15262         sgml/stylesheets/nwalsh-modular \
15263         sgml/stylesheets/docbook \
15264         sgml/stylesheets/dsssl/docbook \
15265         sgml/docbook-dsssl \
15266         sgml/docbook/dsssl/modular \
15267         sgml/docbook/stylesheet/dsssl/modular \
15268         sgml/docbook/dsssl-stylesheets \
15269         sgml/dsssl/docbook-dsssl-nwalsh
15270       do
15271         pgac_candidate=$pgac_prefix/$pgac_infix/$pgac_postfix
15272         if test -r "$pgac_candidate/html/docbook.dsl" \
15273            && test -r "$pgac_candidate/print/docbook.dsl"
15274         then
15275           pgac_cv_path_stylesheets=$pgac_candidate
15276           break 3
15277         fi
15278       done
15279     done
15280   done
15281 fi
15282 fi
15283
15284 DOCBOOKSTYLE=$pgac_cv_path_stylesheets
15285
15286 if test -n "$DOCBOOKSTYLE"; then
15287   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOCBOOKSTYLE" >&5
15288 $as_echo "$DOCBOOKSTYLE" >&6; }
15289 else
15290   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15291 $as_echo "no" >&6; }
15292 fi
15293 if test -n "$DOCBOOKSTYLE" -a -r "$DOCBOOKSTYLE/bin/collateindex.pl"; then
15294   COLLATEINDEX="$DOCBOOKSTYLE/bin/collateindex.pl"
15295
15296 else
15297   # Extract the first word of "collateindex.pl", so it can be a program name with args.
15298 set dummy collateindex.pl; ac_word=$2
15299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15300 $as_echo_n "checking for $ac_word... " >&6; }
15301 if ${ac_cv_path_COLLATEINDEX+:} false; then :
15302   $as_echo_n "(cached) " >&6
15303 else
15304   case $COLLATEINDEX in
15305   [\\/]* | ?:[\\/]*)
15306   ac_cv_path_COLLATEINDEX="$COLLATEINDEX" # Let the user override the test with a path.
15307   ;;
15308   *)
15309   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15310 for as_dir in $PATH
15311 do
15312   IFS=$as_save_IFS
15313   test -z "$as_dir" && as_dir=.
15314     for ac_exec_ext in '' $ac_executable_extensions; do
15315   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15316     ac_cv_path_COLLATEINDEX="$as_dir/$ac_word$ac_exec_ext"
15317     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15318     break 2
15319   fi
15320 done
15321   done
15322 IFS=$as_save_IFS
15323
15324   ;;
15325 esac
15326 fi
15327 COLLATEINDEX=$ac_cv_path_COLLATEINDEX
15328 if test -n "$COLLATEINDEX"; then
15329   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COLLATEINDEX" >&5
15330 $as_echo "$COLLATEINDEX" >&6; }
15331 else
15332   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15333 $as_echo "no" >&6; }
15334 fi
15335
15336
15337 fi
15338 for ac_prog in dbtoepub
15339 do
15340   # Extract the first word of "$ac_prog", so it can be a program name with args.
15341 set dummy $ac_prog; ac_word=$2
15342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15343 $as_echo_n "checking for $ac_word... " >&6; }
15344 if ${ac_cv_prog_DBTOEPUB+:} false; then :
15345   $as_echo_n "(cached) " >&6
15346 else
15347   if test -n "$DBTOEPUB"; then
15348   ac_cv_prog_DBTOEPUB="$DBTOEPUB" # Let the user override the test.
15349 else
15350 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15351 for as_dir in $PATH
15352 do
15353   IFS=$as_save_IFS
15354   test -z "$as_dir" && as_dir=.
15355     for ac_exec_ext in '' $ac_executable_extensions; do
15356   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15357     ac_cv_prog_DBTOEPUB="$ac_prog"
15358     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15359     break 2
15360   fi
15361 done
15362   done
15363 IFS=$as_save_IFS
15364
15365 fi
15366 fi
15367 DBTOEPUB=$ac_cv_prog_DBTOEPUB
15368 if test -n "$DBTOEPUB"; then
15369   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
15370 $as_echo "$DBTOEPUB" >&6; }
15371 else
15372   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15373 $as_echo "no" >&6; }
15374 fi
15375
15376
15377   test -n "$DBTOEPUB" && break
15378 done
15379
15380 for ac_prog in xmllint
15381 do
15382   # Extract the first word of "$ac_prog", so it can be a program name with args.
15383 set dummy $ac_prog; ac_word=$2
15384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15385 $as_echo_n "checking for $ac_word... " >&6; }
15386 if ${ac_cv_prog_XMLLINT+:} false; then :
15387   $as_echo_n "(cached) " >&6
15388 else
15389   if test -n "$XMLLINT"; then
15390   ac_cv_prog_XMLLINT="$XMLLINT" # Let the user override the test.
15391 else
15392 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15393 for as_dir in $PATH
15394 do
15395   IFS=$as_save_IFS
15396   test -z "$as_dir" && as_dir=.
15397     for ac_exec_ext in '' $ac_executable_extensions; do
15398   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15399     ac_cv_prog_XMLLINT="$ac_prog"
15400     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15401     break 2
15402   fi
15403 done
15404   done
15405 IFS=$as_save_IFS
15406
15407 fi
15408 fi
15409 XMLLINT=$ac_cv_prog_XMLLINT
15410 if test -n "$XMLLINT"; then
15411   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
15412 $as_echo "$XMLLINT" >&6; }
15413 else
15414   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15415 $as_echo "no" >&6; }
15416 fi
15417
15418
15419   test -n "$XMLLINT" && break
15420 done
15421
15422 for ac_prog in xsltproc
15423 do
15424   # Extract the first word of "$ac_prog", so it can be a program name with args.
15425 set dummy $ac_prog; ac_word=$2
15426 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15427 $as_echo_n "checking for $ac_word... " >&6; }
15428 if ${ac_cv_prog_XSLTPROC+:} false; then :
15429   $as_echo_n "(cached) " >&6
15430 else
15431   if test -n "$XSLTPROC"; then
15432   ac_cv_prog_XSLTPROC="$XSLTPROC" # Let the user override the test.
15433 else
15434 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15435 for as_dir in $PATH
15436 do
15437   IFS=$as_save_IFS
15438   test -z "$as_dir" && as_dir=.
15439     for ac_exec_ext in '' $ac_executable_extensions; do
15440   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15441     ac_cv_prog_XSLTPROC="$ac_prog"
15442     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15443     break 2
15444   fi
15445 done
15446   done
15447 IFS=$as_save_IFS
15448
15449 fi
15450 fi
15451 XSLTPROC=$ac_cv_prog_XSLTPROC
15452 if test -n "$XSLTPROC"; then
15453   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
15454 $as_echo "$XSLTPROC" >&6; }
15455 else
15456   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15457 $as_echo "no" >&6; }
15458 fi
15459
15460
15461   test -n "$XSLTPROC" && break
15462 done
15463
15464 for ac_prog in osx sgml2xml sx
15465 do
15466   # Extract the first word of "$ac_prog", so it can be a program name with args.
15467 set dummy $ac_prog; ac_word=$2
15468 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15469 $as_echo_n "checking for $ac_word... " >&6; }
15470 if ${ac_cv_prog_OSX+:} false; then :
15471   $as_echo_n "(cached) " >&6
15472 else
15473   if test -n "$OSX"; then
15474   ac_cv_prog_OSX="$OSX" # Let the user override the test.
15475 else
15476 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15477 for as_dir in $PATH
15478 do
15479   IFS=$as_save_IFS
15480   test -z "$as_dir" && as_dir=.
15481     for ac_exec_ext in '' $ac_executable_extensions; do
15482   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15483     ac_cv_prog_OSX="$ac_prog"
15484     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15485     break 2
15486   fi
15487 done
15488   done
15489 IFS=$as_save_IFS
15490
15491 fi
15492 fi
15493 OSX=$ac_cv_prog_OSX
15494 if test -n "$OSX"; then
15495   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OSX" >&5
15496 $as_echo "$OSX" >&6; }
15497 else
15498   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15499 $as_echo "no" >&6; }
15500 fi
15501
15502
15503   test -n "$OSX" && break
15504 done
15505
15506
15507 #
15508 # Check for test tools
15509 #
15510 if test "$enable_tap_tests" = yes; then
15511   for ac_prog in prove
15512 do
15513   # Extract the first word of "$ac_prog", so it can be a program name with args.
15514 set dummy $ac_prog; ac_word=$2
15515 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15516 $as_echo_n "checking for $ac_word... " >&6; }
15517 if ${ac_cv_prog_PROVE+:} false; then :
15518   $as_echo_n "(cached) " >&6
15519 else
15520   if test -n "$PROVE"; then
15521   ac_cv_prog_PROVE="$PROVE" # Let the user override the test.
15522 else
15523 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15524 for as_dir in $PATH
15525 do
15526   IFS=$as_save_IFS
15527   test -z "$as_dir" && as_dir=.
15528     for ac_exec_ext in '' $ac_executable_extensions; do
15529   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15530     ac_cv_prog_PROVE="$ac_prog"
15531     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15532     break 2
15533   fi
15534 done
15535   done
15536 IFS=$as_save_IFS
15537
15538 fi
15539 fi
15540 PROVE=$ac_cv_prog_PROVE
15541 if test -n "$PROVE"; then
15542   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
15543 $as_echo "$PROVE" >&6; }
15544 else
15545   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15546 $as_echo "no" >&6; }
15547 fi
15548
15549
15550   test -n "$PROVE" && break
15551 done
15552
15553   if test -z "$PROVE"; then
15554     as_fn_error $? "prove not found" "$LINENO" 5
15555   fi
15556   if test -z "$PERL"; then
15557     as_fn_error $? "Perl not found" "$LINENO" 5
15558   fi
15559 fi
15560
15561 # Thread testing
15562
15563 # We have to run the thread test near the end so we have all our symbols
15564 # defined.  Cross compiling throws a warning.
15565 #
15566 if test "$enable_thread_safety" = yes; then
15567 if test "$PORTNAME" != "win32"
15568 then
15569 { $as_echo "$as_me:${as_lineno-$LINENO}: checking thread safety of required library functions" >&5
15570 $as_echo_n "checking thread safety of required library functions... " >&6; }
15571
15572 _CFLAGS="$CFLAGS"
15573 _LIBS="$LIBS"
15574 CFLAGS="$CFLAGS $PTHREAD_CFLAGS -DIN_CONFIGURE"
15575 LIBS="$LIBS $PTHREAD_LIBS"
15576 if test "$cross_compiling" = yes; then :
15577   { $as_echo "$as_me:${as_lineno-$LINENO}: result: maybe" >&5
15578 $as_echo "maybe" >&6; }
15579   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
15580 *** Skipping thread test program because of cross-compile build.
15581 *** Run the program in src/test/thread on the target machine.
15582 " >&5
15583 $as_echo "$as_me: WARNING:
15584 *** Skipping thread test program because of cross-compile build.
15585 *** Run the program in src/test/thread on the target machine.
15586 " >&2;}
15587 else
15588   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15589 /* end confdefs.h.  */
15590 #include "$srcdir/src/test/thread/thread_test.c"
15591 _ACEOF
15592 if ac_fn_c_try_run "$LINENO"; then :
15593   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15594 $as_echo "yes" >&6; }
15595 else
15596   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15597 $as_echo "no" >&6; }
15598   as_fn_error $? "thread test program failed
15599 This platform is not thread-safe.  Check the file 'config.log' or compile
15600 and run src/test/thread/thread_test for the exact reason.
15601 Use --disable-thread-safety to disable thread safety." "$LINENO" 5
15602 fi
15603 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15604   conftest.$ac_objext conftest.beam conftest.$ac_ext
15605 fi
15606
15607 CFLAGS="$_CFLAGS"
15608 LIBS="$_LIBS"
15609 else
15610 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** skipping thread test on Win32" >&5
15611 $as_echo "$as_me: WARNING: *** skipping thread test on Win32" >&2;}
15612 fi
15613 fi
15614
15615 # If compiler will take -Wl,--as-needed (or various platform-specific
15616 # spellings thereof) then add that to LDFLAGS.  This is much easier than
15617 # trying to filter LIBS to the minimum for each executable.
15618 # On (at least) some Red-Hat-derived systems, this switch breaks linking to
15619 # libreadline; therefore we postpone testing it until we know what library
15620 # dependencies readline has.  The test code will try to link with $LIBS.
15621 if test "$with_readline" = yes; then
15622   link_test_func=readline
15623 else
15624   link_test_func=exit
15625 fi
15626
15627 if test "$PORTNAME" = "darwin"; then
15628   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-dead_strip_dylibs" >&5
15629 $as_echo_n "checking whether $CC supports -Wl,-dead_strip_dylibs... " >&6; }
15630 if ${pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs+:} false; then :
15631   $as_echo_n "(cached) " >&6
15632 else
15633   pgac_save_LDFLAGS=$LDFLAGS
15634 LDFLAGS="$pgac_save_LDFLAGS -Wl,-dead_strip_dylibs"
15635 if test "$cross_compiling" = yes; then :
15636   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs="assuming no"
15637 else
15638   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15639 /* end confdefs.h.  */
15640 extern void $link_test_func (); void (*fptr) () = $link_test_func;
15641 int
15642 main ()
15643 {
15644
15645   ;
15646   return 0;
15647 }
15648 _ACEOF
15649 if ac_fn_c_try_run "$LINENO"; then :
15650   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=yes
15651 else
15652   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=no
15653 fi
15654 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15655   conftest.$ac_objext conftest.beam conftest.$ac_ext
15656 fi
15657
15658 LDFLAGS="$pgac_save_LDFLAGS"
15659 fi
15660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&5
15661 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&6; }
15662 if test x"$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" = x"yes"; then
15663   LDFLAGS="$LDFLAGS -Wl,-dead_strip_dylibs"
15664 fi
15665
15666 elif test "$PORTNAME" = "openbsd"; then
15667   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-Bdynamic" >&5
15668 $as_echo_n "checking whether $CC supports -Wl,-Bdynamic... " >&6; }
15669 if ${pgac_cv_prog_cc_ldflags__Wl__Bdynamic+:} false; then :
15670   $as_echo_n "(cached) " >&6
15671 else
15672   pgac_save_LDFLAGS=$LDFLAGS
15673 LDFLAGS="$pgac_save_LDFLAGS -Wl,-Bdynamic"
15674 if test "$cross_compiling" = yes; then :
15675   pgac_cv_prog_cc_ldflags__Wl__Bdynamic="assuming no"
15676 else
15677   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15678 /* end confdefs.h.  */
15679 extern void $link_test_func (); void (*fptr) () = $link_test_func;
15680 int
15681 main ()
15682 {
15683
15684   ;
15685   return 0;
15686 }
15687 _ACEOF
15688 if ac_fn_c_try_run "$LINENO"; then :
15689   pgac_cv_prog_cc_ldflags__Wl__Bdynamic=yes
15690 else
15691   pgac_cv_prog_cc_ldflags__Wl__Bdynamic=no
15692 fi
15693 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15694   conftest.$ac_objext conftest.beam conftest.$ac_ext
15695 fi
15696
15697 LDFLAGS="$pgac_save_LDFLAGS"
15698 fi
15699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&5
15700 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&6; }
15701 if test x"$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" = x"yes"; then
15702   LDFLAGS="$LDFLAGS -Wl,-Bdynamic"
15703 fi
15704
15705 else
15706   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,--as-needed" >&5
15707 $as_echo_n "checking whether $CC supports -Wl,--as-needed... " >&6; }
15708 if ${pgac_cv_prog_cc_ldflags__Wl___as_needed+:} false; then :
15709   $as_echo_n "(cached) " >&6
15710 else
15711   pgac_save_LDFLAGS=$LDFLAGS
15712 LDFLAGS="$pgac_save_LDFLAGS -Wl,--as-needed"
15713 if test "$cross_compiling" = yes; then :
15714   pgac_cv_prog_cc_ldflags__Wl___as_needed="assuming no"
15715 else
15716   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15717 /* end confdefs.h.  */
15718 extern void $link_test_func (); void (*fptr) () = $link_test_func;
15719 int
15720 main ()
15721 {
15722
15723   ;
15724   return 0;
15725 }
15726 _ACEOF
15727 if ac_fn_c_try_run "$LINENO"; then :
15728   pgac_cv_prog_cc_ldflags__Wl___as_needed=yes
15729 else
15730   pgac_cv_prog_cc_ldflags__Wl___as_needed=no
15731 fi
15732 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15733   conftest.$ac_objext conftest.beam conftest.$ac_ext
15734 fi
15735
15736 LDFLAGS="$pgac_save_LDFLAGS"
15737 fi
15738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl___as_needed" >&5
15739 $as_echo "$pgac_cv_prog_cc_ldflags__Wl___as_needed" >&6; }
15740 if test x"$pgac_cv_prog_cc_ldflags__Wl___as_needed" = x"yes"; then
15741   LDFLAGS="$LDFLAGS -Wl,--as-needed"
15742 fi
15743
15744 fi
15745
15746 # Create compiler version string
15747 if test x"$GCC" = x"yes" ; then
15748   cc_string=`${CC} --version | sed q`
15749   case $cc_string in [A-Za-z]*) ;; *) cc_string="GCC $cc_string";; esac
15750 elif test x"$SUN_STUDIO_CC" = x"yes" ; then
15751   cc_string=`${CC} -V 2>&1 | sed q`
15752 else
15753   cc_string=$CC
15754 fi
15755
15756
15757 cat >>confdefs.h <<_ACEOF
15758 #define PG_VERSION_STR "PostgreSQL $PG_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"
15759 _ACEOF
15760
15761
15762 # Supply a numeric version string for use by 3rd party add-ons
15763 # awk -F is a regex on some platforms, and not on others, so make "." a tab
15764 PG_VERSION_NUM="`echo "$PACKAGE_VERSION" | sed 's/[A-Za-z].*$//' |
15765 tr '.' '        ' |
15766 $AWK '{printf "%d%02d%02d", $1, $2, (NF >= 3) ? $3 : 0}'`"
15767
15768 cat >>confdefs.h <<_ACEOF
15769 #define PG_VERSION_NUM $PG_VERSION_NUM
15770 _ACEOF
15771
15772
15773
15774
15775 # Begin output steps
15776
15777 { $as_echo "$as_me:${as_lineno-$LINENO}: using compiler=$cc_string" >&5
15778 $as_echo "$as_me: using compiler=$cc_string" >&6;}
15779 { $as_echo "$as_me:${as_lineno-$LINENO}: using CFLAGS=$CFLAGS" >&5
15780 $as_echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
15781 { $as_echo "$as_me:${as_lineno-$LINENO}: using CPPFLAGS=$CPPFLAGS" >&5
15782 $as_echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
15783 { $as_echo "$as_me:${as_lineno-$LINENO}: using LDFLAGS=$LDFLAGS" >&5
15784 $as_echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
15785
15786 # prepare build tree if outside source tree
15787 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
15788 # Note 2: /bin/pwd might be better than shell's built-in at getting
15789 #         a symlink-free name.
15790 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
15791   vpath_build=no
15792 else
15793   vpath_build=yes
15794   if test "$no_create" != yes; then
15795     $as_echo_n "preparing build tree... " >&6
15796     pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
15797     $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
15798       || as_fn_error $? "failed" "$LINENO" 5
15799     { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
15800 $as_echo "done" >&6; }
15801   fi
15802 fi
15803
15804
15805
15806 ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
15807
15808
15809 ac_config_links="$ac_config_links src/backend/port/dynloader.c:src/backend/port/dynloader/${template}.c src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION} src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION} src/backend/port/pg_latch.c:${LATCH_IMPLEMENTATION} src/include/dynloader.h:src/backend/port/dynloader/${template}.h src/include/pg_config_os.h:src/include/port/${template}.h src/Makefile.port:src/makefiles/Makefile.${template}"
15810
15811
15812 if test "$PORTNAME" = "win32"; then
15813 ac_config_commands="$ac_config_commands check_win32_symlinks"
15814
15815 fi
15816
15817 ac_config_headers="$ac_config_headers src/include/pg_config.h"
15818
15819
15820 ac_config_headers="$ac_config_headers src/include/pg_config_ext.h"
15821
15822
15823 ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
15824
15825
15826 cat >confcache <<\_ACEOF
15827 # This file is a shell script that caches the results of configure
15828 # tests run on this system so they can be shared between configure
15829 # scripts and configure runs, see configure's option --config-cache.
15830 # It is not useful on other systems.  If it contains results you don't
15831 # want to keep, you may remove or edit it.
15832 #
15833 # config.status only pays attention to the cache file if you give it
15834 # the --recheck option to rerun configure.
15835 #
15836 # `ac_cv_env_foo' variables (set or unset) will be overridden when
15837 # loading this file, other *unset* `ac_cv_foo' will be assigned the
15838 # following values.
15839
15840 _ACEOF
15841
15842 # The following way of writing the cache mishandles newlines in values,
15843 # but we know of no workaround that is simple, portable, and efficient.
15844 # So, we kill variables containing newlines.
15845 # Ultrix sh set writes to stderr and can't be redirected directly,
15846 # and sets the high bit in the cache file unless we assign to the vars.
15847 (
15848   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15849     eval ac_val=\$$ac_var
15850     case $ac_val in #(
15851     *${as_nl}*)
15852       case $ac_var in #(
15853       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15854 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
15855       esac
15856       case $ac_var in #(
15857       _ | IFS | as_nl) ;; #(
15858       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15859       *) { eval $ac_var=; unset $ac_var;} ;;
15860       esac ;;
15861     esac
15862   done
15863
15864   (set) 2>&1 |
15865     case $as_nl`(ac_space=' '; set) 2>&1` in #(
15866     *${as_nl}ac_space=\ *)
15867       # `set' does not quote correctly, so add quotes: double-quote
15868       # substitution turns \\\\ into \\, and sed turns \\ into \.
15869       sed -n \
15870         "s/'/'\\\\''/g;
15871           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
15872       ;; #(
15873     *)
15874       # `set' quotes correctly as required by POSIX, so do not add quotes.
15875       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
15876       ;;
15877     esac |
15878     sort
15879 ) |
15880   sed '
15881      /^ac_cv_env_/b end
15882      t clear
15883      :clear
15884      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15885      t end
15886      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15887      :end' >>confcache
15888 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15889   if test -w "$cache_file"; then
15890     if test "x$cache_file" != "x/dev/null"; then
15891       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15892 $as_echo "$as_me: updating cache $cache_file" >&6;}
15893       if test ! -f "$cache_file" || test -h "$cache_file"; then
15894         cat confcache >"$cache_file"
15895       else
15896         case $cache_file in #(
15897         */* | ?:*)
15898           mv -f confcache "$cache_file"$$ &&
15899           mv -f "$cache_file"$$ "$cache_file" ;; #(
15900         *)
15901           mv -f confcache "$cache_file" ;;
15902         esac
15903       fi
15904     fi
15905   else
15906     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15907 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
15908   fi
15909 fi
15910 rm -f confcache
15911
15912 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15913 # Let make expand exec_prefix.
15914 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15915
15916 DEFS=-DHAVE_CONFIG_H
15917
15918 ac_libobjs=
15919 ac_ltlibobjs=
15920 U=
15921 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15922   # 1. Remove the extension, and $U if already installed.
15923   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
15924   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
15925   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
15926   #    will be set to the directory where LIBOBJS objects are built.
15927   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15928   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
15929 done
15930 LIBOBJS=$ac_libobjs
15931
15932 LTLIBOBJS=$ac_ltlibobjs
15933
15934
15935
15936
15937 : "${CONFIG_STATUS=./config.status}"
15938 ac_write_fail=0
15939 ac_clean_files_save=$ac_clean_files
15940 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
15941 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15942 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15943 as_write_fail=0
15944 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
15945 #! $SHELL
15946 # Generated by $as_me.
15947 # Run this file to recreate the current configuration.
15948 # Compiler output produced by configure, useful for debugging
15949 # configure, is in config.log if it exists.
15950
15951 debug=false
15952 ac_cs_recheck=false
15953 ac_cs_silent=false
15954
15955 SHELL=\${CONFIG_SHELL-$SHELL}
15956 export SHELL
15957 _ASEOF
15958 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15959 ## -------------------- ##
15960 ## M4sh Initialization. ##
15961 ## -------------------- ##
15962
15963 # Be more Bourne compatible
15964 DUALCASE=1; export DUALCASE # for MKS sh
15965 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
15966   emulate sh
15967   NULLCMD=:
15968   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
15969   # is contrary to our usage.  Disable this feature.
15970   alias -g '${1+"$@"}'='"$@"'
15971   setopt NO_GLOB_SUBST
15972 else
15973   case `(set -o) 2>/dev/null` in #(
15974   *posix*) :
15975     set -o posix ;; #(
15976   *) :
15977      ;;
15978 esac
15979 fi
15980
15981
15982 as_nl='
15983 '
15984 export as_nl
15985 # Printing a long string crashes Solaris 7 /usr/bin/printf.
15986 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15987 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15988 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15989 # Prefer a ksh shell builtin over an external printf program on Solaris,
15990 # but without wasting forks for bash or zsh.
15991 if test -z "$BASH_VERSION$ZSH_VERSION" \
15992     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15993   as_echo='print -r --'
15994   as_echo_n='print -rn --'
15995 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15996   as_echo='printf %s\n'
15997   as_echo_n='printf %s'
15998 else
15999   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16000     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16001     as_echo_n='/usr/ucb/echo -n'
16002   else
16003     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16004     as_echo_n_body='eval
16005       arg=$1;
16006       case $arg in #(
16007       *"$as_nl"*)
16008         expr "X$arg" : "X\\(.*\\)$as_nl";
16009         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16010       esac;
16011       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16012     '
16013     export as_echo_n_body
16014     as_echo_n='sh -c $as_echo_n_body as_echo'
16015   fi
16016   export as_echo_body
16017   as_echo='sh -c $as_echo_body as_echo'
16018 fi
16019
16020 # The user is always right.
16021 if test "${PATH_SEPARATOR+set}" != set; then
16022   PATH_SEPARATOR=:
16023   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16024     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16025       PATH_SEPARATOR=';'
16026   }
16027 fi
16028
16029
16030 # IFS
16031 # We need space, tab and new line, in precisely that order.  Quoting is
16032 # there to prevent editors from complaining about space-tab.
16033 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
16034 # splitting by setting IFS to empty value.)
16035 IFS=" ""        $as_nl"
16036
16037 # Find who we are.  Look in the path if we contain no directory separator.
16038 as_myself=
16039 case $0 in #((
16040   *[\\/]* ) as_myself=$0 ;;
16041   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16042 for as_dir in $PATH
16043 do
16044   IFS=$as_save_IFS
16045   test -z "$as_dir" && as_dir=.
16046     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16047   done
16048 IFS=$as_save_IFS
16049
16050      ;;
16051 esac
16052 # We did not find ourselves, most probably we were run as `sh COMMAND'
16053 # in which case we are not to be found in the path.
16054 if test "x$as_myself" = x; then
16055   as_myself=$0
16056 fi
16057 if test ! -f "$as_myself"; then
16058   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16059   exit 1
16060 fi
16061
16062 # Unset variables that we do not need and which cause bugs (e.g. in
16063 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
16064 # suppresses any "Segmentation fault" message there.  '((' could
16065 # trigger a bug in pdksh 5.2.14.
16066 for as_var in BASH_ENV ENV MAIL MAILPATH
16067 do eval test x\${$as_var+set} = xset \
16068   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
16069 done
16070 PS1='$ '
16071 PS2='> '
16072 PS4='+ '
16073
16074 # NLS nuisances.
16075 LC_ALL=C
16076 export LC_ALL
16077 LANGUAGE=C
16078 export LANGUAGE
16079
16080 # CDPATH.
16081 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16082
16083
16084 # as_fn_error STATUS ERROR [LINENO LOG_FD]
16085 # ----------------------------------------
16086 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16087 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
16088 # script with STATUS, using 1 if that was 0.
16089 as_fn_error ()
16090 {
16091   as_status=$1; test $as_status -eq 0 && as_status=1
16092   if test "$4"; then
16093     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16094     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
16095   fi
16096   $as_echo "$as_me: error: $2" >&2
16097   as_fn_exit $as_status
16098 } # as_fn_error
16099
16100
16101 # as_fn_set_status STATUS
16102 # -----------------------
16103 # Set $? to STATUS, without forking.
16104 as_fn_set_status ()
16105 {
16106   return $1
16107 } # as_fn_set_status
16108
16109 # as_fn_exit STATUS
16110 # -----------------
16111 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16112 as_fn_exit ()
16113 {
16114   set +e
16115   as_fn_set_status $1
16116   exit $1
16117 } # as_fn_exit
16118
16119 # as_fn_unset VAR
16120 # ---------------
16121 # Portably unset VAR.
16122 as_fn_unset ()
16123 {
16124   { eval $1=; unset $1;}
16125 }
16126 as_unset=as_fn_unset
16127 # as_fn_append VAR VALUE
16128 # ----------------------
16129 # Append the text in VALUE to the end of the definition contained in VAR. Take
16130 # advantage of any shell optimizations that allow amortized linear growth over
16131 # repeated appends, instead of the typical quadratic growth present in naive
16132 # implementations.
16133 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16134   eval 'as_fn_append ()
16135   {
16136     eval $1+=\$2
16137   }'
16138 else
16139   as_fn_append ()
16140   {
16141     eval $1=\$$1\$2
16142   }
16143 fi # as_fn_append
16144
16145 # as_fn_arith ARG...
16146 # ------------------
16147 # Perform arithmetic evaluation on the ARGs, and store the result in the
16148 # global $as_val. Take advantage of shells that can avoid forks. The arguments
16149 # must be portable across $(()) and expr.
16150 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16151   eval 'as_fn_arith ()
16152   {
16153     as_val=$(( $* ))
16154   }'
16155 else
16156   as_fn_arith ()
16157   {
16158     as_val=`expr "$@" || test $? -eq 1`
16159   }
16160 fi # as_fn_arith
16161
16162
16163 if expr a : '\(a\)' >/dev/null 2>&1 &&
16164    test "X`expr 00001 : '.*\(...\)'`" = X001; then
16165   as_expr=expr
16166 else
16167   as_expr=false
16168 fi
16169
16170 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
16171   as_basename=basename
16172 else
16173   as_basename=false
16174 fi
16175
16176 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16177   as_dirname=dirname
16178 else
16179   as_dirname=false
16180 fi
16181
16182 as_me=`$as_basename -- "$0" ||
16183 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16184          X"$0" : 'X\(//\)$' \| \
16185          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
16186 $as_echo X/"$0" |
16187     sed '/^.*\/\([^/][^/]*\)\/*$/{
16188             s//\1/
16189             q
16190           }
16191           /^X\/\(\/\/\)$/{
16192             s//\1/
16193             q
16194           }
16195           /^X\/\(\/\).*/{
16196             s//\1/
16197             q
16198           }
16199           s/.*/./; q'`
16200
16201 # Avoid depending upon Character Ranges.
16202 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16203 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16204 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16205 as_cr_digits='0123456789'
16206 as_cr_alnum=$as_cr_Letters$as_cr_digits
16207
16208 ECHO_C= ECHO_N= ECHO_T=
16209 case `echo -n x` in #(((((
16210 -n*)
16211   case `echo 'xy\c'` in
16212   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
16213   xy)  ECHO_C='\c';;
16214   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
16215        ECHO_T=' ';;
16216   esac;;
16217 *)
16218   ECHO_N='-n';;
16219 esac
16220
16221 rm -f conf$$ conf$$.exe conf$$.file
16222 if test -d conf$$.dir; then
16223   rm -f conf$$.dir/conf$$.file
16224 else
16225   rm -f conf$$.dir
16226   mkdir conf$$.dir 2>/dev/null
16227 fi
16228 if (echo >conf$$.file) 2>/dev/null; then
16229   if ln -s conf$$.file conf$$ 2>/dev/null; then
16230     as_ln_s='ln -s'
16231     # ... but there are two gotchas:
16232     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16233     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
16234     # In both cases, we have to default to `cp -pR'.
16235     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
16236       as_ln_s='cp -pR'
16237   elif ln conf$$.file conf$$ 2>/dev/null; then
16238     as_ln_s=ln
16239   else
16240     as_ln_s='cp -pR'
16241   fi
16242 else
16243   as_ln_s='cp -pR'
16244 fi
16245 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16246 rmdir conf$$.dir 2>/dev/null
16247
16248
16249 # as_fn_mkdir_p
16250 # -------------
16251 # Create "$as_dir" as a directory, including parents if necessary.
16252 as_fn_mkdir_p ()
16253 {
16254
16255   case $as_dir in #(
16256   -*) as_dir=./$as_dir;;
16257   esac
16258   test -d "$as_dir" || eval $as_mkdir_p || {
16259     as_dirs=
16260     while :; do
16261       case $as_dir in #(
16262       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16263       *) as_qdir=$as_dir;;
16264       esac
16265       as_dirs="'$as_qdir' $as_dirs"
16266       as_dir=`$as_dirname -- "$as_dir" ||
16267 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16268          X"$as_dir" : 'X\(//\)[^/]' \| \
16269          X"$as_dir" : 'X\(//\)$' \| \
16270          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16271 $as_echo X"$as_dir" |
16272     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16273             s//\1/
16274             q
16275           }
16276           /^X\(\/\/\)[^/].*/{
16277             s//\1/
16278             q
16279           }
16280           /^X\(\/\/\)$/{
16281             s//\1/
16282             q
16283           }
16284           /^X\(\/\).*/{
16285             s//\1/
16286             q
16287           }
16288           s/.*/./; q'`
16289       test -d "$as_dir" && break
16290     done
16291     test -z "$as_dirs" || eval "mkdir $as_dirs"
16292   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
16293
16294
16295 } # as_fn_mkdir_p
16296 if mkdir -p . 2>/dev/null; then
16297   as_mkdir_p='mkdir -p "$as_dir"'
16298 else
16299   test -d ./-p && rmdir ./-p
16300   as_mkdir_p=false
16301 fi
16302
16303
16304 # as_fn_executable_p FILE
16305 # -----------------------
16306 # Test if FILE is an executable regular file.
16307 as_fn_executable_p ()
16308 {
16309   test -f "$1" && test -x "$1"
16310 } # as_fn_executable_p
16311 as_test_x='test -x'
16312 as_executable_p=as_fn_executable_p
16313
16314 # Sed expression to map a string onto a valid CPP name.
16315 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
16316
16317 # Sed expression to map a string onto a valid variable name.
16318 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
16319
16320
16321 exec 6>&1
16322 ## ----------------------------------- ##
16323 ## Main body of $CONFIG_STATUS script. ##
16324 ## ----------------------------------- ##
16325 _ASEOF
16326 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
16327
16328 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16329 # Save the log message, to keep $0 and so on meaningful, and to
16330 # report actual input values of CONFIG_FILES etc. instead of their
16331 # values after options handling.
16332 ac_log="
16333 This file was extended by PostgreSQL $as_me 9.6devel, which was
16334 generated by GNU Autoconf 2.69.  Invocation command line was
16335
16336   CONFIG_FILES    = $CONFIG_FILES
16337   CONFIG_HEADERS  = $CONFIG_HEADERS
16338   CONFIG_LINKS    = $CONFIG_LINKS
16339   CONFIG_COMMANDS = $CONFIG_COMMANDS
16340   $ $0 $@
16341
16342 on `(hostname || uname -n) 2>/dev/null | sed 1q`
16343 "
16344
16345 _ACEOF
16346
16347 case $ac_config_files in *"
16348 "*) set x $ac_config_files; shift; ac_config_files=$*;;
16349 esac
16350
16351 case $ac_config_headers in *"
16352 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
16353 esac
16354
16355
16356 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16357 # Files that config.status was made for.
16358 config_files="$ac_config_files"
16359 config_headers="$ac_config_headers"
16360 config_links="$ac_config_links"
16361 config_commands="$ac_config_commands"
16362
16363 _ACEOF
16364
16365 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16366 ac_cs_usage="\
16367 \`$as_me' instantiates files and other configuration actions
16368 from templates according to the current configuration.  Unless the files
16369 and actions are specified as TAGs, all are instantiated by default.
16370
16371 Usage: $0 [OPTION]... [TAG]...
16372
16373   -h, --help       print this help, then exit
16374   -V, --version    print version number and configuration settings, then exit
16375       --config     print configuration, then exit
16376   -q, --quiet, --silent
16377                    do not print progress messages
16378   -d, --debug      don't remove temporary files
16379       --recheck    update $as_me by reconfiguring in the same conditions
16380       --file=FILE[:TEMPLATE]
16381                    instantiate the configuration file FILE
16382       --header=FILE[:TEMPLATE]
16383                    instantiate the configuration header FILE
16384
16385 Configuration files:
16386 $config_files
16387
16388 Configuration headers:
16389 $config_headers
16390
16391 Configuration links:
16392 $config_links
16393
16394 Configuration commands:
16395 $config_commands
16396
16397 Report bugs to <pgsql-bugs@postgresql.org>."
16398
16399 _ACEOF
16400 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16401 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
16402 ac_cs_version="\\
16403 PostgreSQL config.status 9.6devel
16404 configured by $0, generated by GNU Autoconf 2.69,
16405   with options \\"\$ac_cs_config\\"
16406
16407 Copyright (C) 2012 Free Software Foundation, Inc.
16408 This config.status script is free software; the Free Software Foundation
16409 gives unlimited permission to copy, distribute and modify it."
16410
16411 ac_pwd='$ac_pwd'
16412 srcdir='$srcdir'
16413 INSTALL='$INSTALL'
16414 MKDIR_P='$MKDIR_P'
16415 AWK='$AWK'
16416 test -n "\$AWK" || AWK=awk
16417 _ACEOF
16418
16419 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16420 # The default lists apply if the user does not specify any file.
16421 ac_need_defaults=:
16422 while test $# != 0
16423 do
16424   case $1 in
16425   --*=?*)
16426     ac_option=`expr "X$1" : 'X\([^=]*\)='`
16427     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
16428     ac_shift=:
16429     ;;
16430   --*=)
16431     ac_option=`expr "X$1" : 'X\([^=]*\)='`
16432     ac_optarg=
16433     ac_shift=:
16434     ;;
16435   *)
16436     ac_option=$1
16437     ac_optarg=$2
16438     ac_shift=shift
16439     ;;
16440   esac
16441
16442   case $ac_option in
16443   # Handling of the options.
16444   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16445     ac_cs_recheck=: ;;
16446   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
16447     $as_echo "$ac_cs_version"; exit ;;
16448   --config | --confi | --conf | --con | --co | --c )
16449     $as_echo "$ac_cs_config"; exit ;;
16450   --debug | --debu | --deb | --de | --d | -d )
16451     debug=: ;;
16452   --file | --fil | --fi | --f )
16453     $ac_shift
16454     case $ac_optarg in
16455     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16456     '') as_fn_error $? "missing file argument" ;;
16457     esac
16458     as_fn_append CONFIG_FILES " '$ac_optarg'"
16459     ac_need_defaults=false;;
16460   --header | --heade | --head | --hea )
16461     $ac_shift
16462     case $ac_optarg in
16463     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16464     esac
16465     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
16466     ac_need_defaults=false;;
16467   --he | --h)
16468     # Conflict between --help and --header
16469     as_fn_error $? "ambiguous option: \`$1'
16470 Try \`$0 --help' for more information.";;
16471   --help | --hel | -h )
16472     $as_echo "$ac_cs_usage"; exit ;;
16473   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16474   | -silent | --silent | --silen | --sile | --sil | --si | --s)
16475     ac_cs_silent=: ;;
16476
16477   # This is an error.
16478   -*) as_fn_error $? "unrecognized option: \`$1'
16479 Try \`$0 --help' for more information." ;;
16480
16481   *) as_fn_append ac_config_targets " $1"
16482      ac_need_defaults=false ;;
16483
16484   esac
16485   shift
16486 done
16487
16488 ac_configure_extra_args=
16489
16490 if $ac_cs_silent; then
16491   exec 6>/dev/null
16492   ac_configure_extra_args="$ac_configure_extra_args --silent"
16493 fi
16494
16495 _ACEOF
16496 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16497 if \$ac_cs_recheck; then
16498   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
16499   shift
16500   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
16501   CONFIG_SHELL='$SHELL'
16502   export CONFIG_SHELL
16503   exec "\$@"
16504 fi
16505
16506 _ACEOF
16507 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16508 exec 5>>config.log
16509 {
16510   echo
16511   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16512 ## Running $as_me. ##
16513 _ASBOX
16514   $as_echo "$ac_log"
16515 } >&5
16516
16517 _ACEOF
16518 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16519 _ACEOF
16520
16521 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16522
16523 # Handling of arguments.
16524 for ac_config_target in $ac_config_targets
16525 do
16526   case $ac_config_target in
16527     "src/backend/port/tas.s") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
16528     "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
16529     "src/Makefile.global") CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
16530     "src/backend/port/dynloader.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/dynloader.c:src/backend/port/dynloader/${template}.c" ;;
16531     "src/backend/port/pg_sema.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
16532     "src/backend/port/pg_shmem.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
16533     "src/backend/port/pg_latch.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_latch.c:${LATCH_IMPLEMENTATION}" ;;
16534     "src/include/dynloader.h") CONFIG_LINKS="$CONFIG_LINKS src/include/dynloader.h:src/backend/port/dynloader/${template}.h" ;;
16535     "src/include/pg_config_os.h") CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
16536     "src/Makefile.port") CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
16537     "check_win32_symlinks") CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
16538     "src/include/pg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
16539     "src/include/pg_config_ext.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config_ext.h" ;;
16540     "src/interfaces/ecpg/include/ecpg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
16541
16542   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
16543   esac
16544 done
16545
16546
16547 # If the user did not use the arguments to specify the items to instantiate,
16548 # then the envvar interface is used.  Set only those that are not.
16549 # We use the long form for the default assignment because of an extremely
16550 # bizarre bug on SunOS 4.1.3.
16551 if $ac_need_defaults; then
16552   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16553   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16554   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
16555   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
16556 fi
16557
16558 # Have a temporary directory for convenience.  Make it in the build tree
16559 # simply because there is no reason against having it here, and in addition,
16560 # creating and moving files from /tmp can sometimes cause problems.
16561 # Hook for its removal unless debugging.
16562 # Note that there is a small window in which the directory will not be cleaned:
16563 # after its creation but before its name has been assigned to `$tmp'.
16564 $debug ||
16565 {
16566   tmp= ac_tmp=
16567   trap 'exit_status=$?
16568   : "${ac_tmp:=$tmp}"
16569   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
16570 ' 0
16571   trap 'as_fn_exit 1' 1 2 13 15
16572 }
16573 # Create a (secure) tmp directory for tmp files.
16574
16575 {
16576   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
16577   test -d "$tmp"
16578 }  ||
16579 {
16580   tmp=./conf$$-$RANDOM
16581   (umask 077 && mkdir "$tmp")
16582 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
16583 ac_tmp=$tmp
16584
16585 # Set up the scripts for CONFIG_FILES section.
16586 # No need to generate them if there are no CONFIG_FILES.
16587 # This happens for instance with `./config.status config.h'.
16588 if test -n "$CONFIG_FILES"; then
16589
16590
16591 ac_cr=`echo X | tr X '\015'`
16592 # On cygwin, bash can eat \r inside `` if the user requested igncr.
16593 # But we know of no other shell where ac_cr would be empty at this
16594 # point, so we can use a bashism as a fallback.
16595 if test "x$ac_cr" = x; then
16596   eval ac_cr=\$\'\\r\'
16597 fi
16598 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
16599 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
16600   ac_cs_awk_cr='\\r'
16601 else
16602   ac_cs_awk_cr=$ac_cr
16603 fi
16604
16605 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
16606 _ACEOF
16607
16608
16609 {
16610   echo "cat >conf$$subs.awk <<_ACEOF" &&
16611   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
16612   echo "_ACEOF"
16613 } >conf$$subs.sh ||
16614   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
16615 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
16616 ac_delim='%!_!# '
16617 for ac_last_try in false false false false false :; do
16618   . ./conf$$subs.sh ||
16619     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
16620
16621   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
16622   if test $ac_delim_n = $ac_delim_num; then
16623     break
16624   elif $ac_last_try; then
16625     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
16626   else
16627     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16628   fi
16629 done
16630 rm -f conf$$subs.sh
16631
16632 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16633 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
16634 _ACEOF
16635 sed -n '
16636 h
16637 s/^/S["/; s/!.*/"]=/
16638 p
16639 g
16640 s/^[^!]*!//
16641 :repl
16642 t repl
16643 s/'"$ac_delim"'$//
16644 t delim
16645 :nl
16646 h
16647 s/\(.\{148\}\)..*/\1/
16648 t more1
16649 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
16650 p
16651 n
16652 b repl
16653 :more1
16654 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16655 p
16656 g
16657 s/.\{148\}//
16658 t nl
16659 :delim
16660 h
16661 s/\(.\{148\}\)..*/\1/
16662 t more2
16663 s/["\\]/\\&/g; s/^/"/; s/$/"/
16664 p
16665 b
16666 :more2
16667 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16668 p
16669 g
16670 s/.\{148\}//
16671 t delim
16672 ' <conf$$subs.awk | sed '
16673 /^[^""]/{
16674   N
16675   s/\n//
16676 }
16677 ' >>$CONFIG_STATUS || ac_write_fail=1
16678 rm -f conf$$subs.awk
16679 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16680 _ACAWK
16681 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
16682   for (key in S) S_is_set[key] = 1
16683   FS = "\a"
16684
16685 }
16686 {
16687   line = $ 0
16688   nfields = split(line, field, "@")
16689   substed = 0
16690   len = length(field[1])
16691   for (i = 2; i < nfields; i++) {
16692     key = field[i]
16693     keylen = length(key)
16694     if (S_is_set[key]) {
16695       value = S[key]
16696       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
16697       len += length(value) + length(field[++i])
16698       substed = 1
16699     } else
16700       len += 1 + keylen
16701   }
16702
16703   print line
16704 }
16705
16706 _ACAWK
16707 _ACEOF
16708 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16709 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16710   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16711 else
16712   cat
16713 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
16714   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
16715 _ACEOF
16716
16717 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
16718 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
16719 # trailing colons and then remove the whole line if VPATH becomes empty
16720 # (actually we leave an empty line to preserve line numbers).
16721 if test "x$srcdir" = x.; then
16722   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
16723 h
16724 s///
16725 s/^/:/
16726 s/[      ]*$/:/
16727 s/:\$(srcdir):/:/g
16728 s/:\${srcdir}:/:/g
16729 s/:@srcdir@:/:/g
16730 s/^:*//
16731 s/:*$//
16732 x
16733 s/\(=[   ]*\).*/\1/
16734 G
16735 s/\n//
16736 s/^[^=]*=[       ]*$//
16737 }'
16738 fi
16739
16740 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16741 fi # test -n "$CONFIG_FILES"
16742
16743 # Set up the scripts for CONFIG_HEADERS section.
16744 # No need to generate them if there are no CONFIG_HEADERS.
16745 # This happens for instance with `./config.status Makefile'.
16746 if test -n "$CONFIG_HEADERS"; then
16747 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
16748 BEGIN {
16749 _ACEOF
16750
16751 # Transform confdefs.h into an awk script `defines.awk', embedded as
16752 # here-document in config.status, that substitutes the proper values into
16753 # config.h.in to produce config.h.
16754
16755 # Create a delimiter string that does not exist in confdefs.h, to ease
16756 # handling of long lines.
16757 ac_delim='%!_!# '
16758 for ac_last_try in false false :; do
16759   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
16760   if test -z "$ac_tt"; then
16761     break
16762   elif $ac_last_try; then
16763     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
16764   else
16765     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16766   fi
16767 done
16768
16769 # For the awk script, D is an array of macro values keyed by name,
16770 # likewise P contains macro parameters if any.  Preserve backslash
16771 # newline sequences.
16772
16773 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16774 sed -n '
16775 s/.\{148\}/&'"$ac_delim"'/g
16776 t rset
16777 :rset
16778 s/^[     ]*#[    ]*define[       ][      ]*/ /
16779 t def
16780 d
16781 :def
16782 s/\\$//
16783 t bsnl
16784 s/["\\]/\\&/g
16785 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
16786 D["\1"]=" \3"/p
16787 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
16788 d
16789 :bsnl
16790 s/["\\]/\\&/g
16791 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
16792 D["\1"]=" \3\\\\\\n"\\/p
16793 t cont
16794 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16795 t cont
16796 d
16797 :cont
16798 n
16799 s/.\{148\}/&'"$ac_delim"'/g
16800 t clear
16801 :clear
16802 s/\\$//
16803 t bsnlc
16804 s/["\\]/\\&/g; s/^/"/; s/$/"/p
16805 d
16806 :bsnlc
16807 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16808 b cont
16809 ' <confdefs.h | sed '
16810 s/'"$ac_delim"'/"\\\
16811 "/g' >>$CONFIG_STATUS || ac_write_fail=1
16812
16813 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16814   for (key in D) D_is_set[key] = 1
16815   FS = "\a"
16816 }
16817 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16818   line = \$ 0
16819   split(line, arg, " ")
16820   if (arg[1] == "#") {
16821     defundef = arg[2]
16822     mac1 = arg[3]
16823   } else {
16824     defundef = substr(arg[1], 2)
16825     mac1 = arg[2]
16826   }
16827   split(mac1, mac2, "(") #)
16828   macro = mac2[1]
16829   prefix = substr(line, 1, index(line, defundef) - 1)
16830   if (D_is_set[macro]) {
16831     # Preserve the white space surrounding the "#".
16832     print prefix "define", macro P[macro] D[macro]
16833     next
16834   } else {
16835     # Replace #undef with comments.  This is necessary, for example,
16836     # in the case of _POSIX_SOURCE, which is predefined and required
16837     # on some systems where configure will not decide to define it.
16838     if (defundef == "undef") {
16839       print "/*", prefix defundef, macro, "*/"
16840       next
16841     }
16842   }
16843 }
16844 { print }
16845 _ACAWK
16846 _ACEOF
16847 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16848   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
16849 fi # test -n "$CONFIG_HEADERS"
16850
16851
16852 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS  :L $CONFIG_LINKS  :C $CONFIG_COMMANDS"
16853 shift
16854 for ac_tag
16855 do
16856   case $ac_tag in
16857   :[FHLC]) ac_mode=$ac_tag; continue;;
16858   esac
16859   case $ac_mode$ac_tag in
16860   :[FHL]*:*);;
16861   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
16862   :[FH]-) ac_tag=-:-;;
16863   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16864   esac
16865   ac_save_IFS=$IFS
16866   IFS=:
16867   set x $ac_tag
16868   IFS=$ac_save_IFS
16869   shift
16870   ac_file=$1
16871   shift
16872
16873   case $ac_mode in
16874   :L) ac_source=$1;;
16875   :[FH])
16876     ac_file_inputs=
16877     for ac_f
16878     do
16879       case $ac_f in
16880       -) ac_f="$ac_tmp/stdin";;
16881       *) # Look for the file first in the build tree, then in the source tree
16882          # (if the path is not absolute).  The absolute path cannot be DOS-style,
16883          # because $ac_f cannot contain `:'.
16884          test -f "$ac_f" ||
16885            case $ac_f in
16886            [\\/$]*) false;;
16887            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16888            esac ||
16889            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
16890       esac
16891       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16892       as_fn_append ac_file_inputs " '$ac_f'"
16893     done
16894
16895     # Let's still pretend it is `configure' which instantiates (i.e., don't
16896     # use $as_me), people would be surprised to read:
16897     #    /* config.h.  Generated by config.status.  */
16898     configure_input='Generated from '`
16899           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16900         `' by configure.'
16901     if test x"$ac_file" != x-; then
16902       configure_input="$ac_file.  $configure_input"
16903       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16904 $as_echo "$as_me: creating $ac_file" >&6;}
16905     fi
16906     # Neutralize special characters interpreted by sed in replacement strings.
16907     case $configure_input in #(
16908     *\&* | *\|* | *\\* )
16909        ac_sed_conf_input=`$as_echo "$configure_input" |
16910        sed 's/[\\\\&|]/\\\\&/g'`;; #(
16911     *) ac_sed_conf_input=$configure_input;;
16912     esac
16913
16914     case $ac_tag in
16915     *:-:* | *:-) cat >"$ac_tmp/stdin" \
16916       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
16917     esac
16918     ;;
16919   esac
16920
16921   ac_dir=`$as_dirname -- "$ac_file" ||
16922 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16923          X"$ac_file" : 'X\(//\)[^/]' \| \
16924          X"$ac_file" : 'X\(//\)$' \| \
16925          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
16926 $as_echo X"$ac_file" |
16927     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16928             s//\1/
16929             q
16930           }
16931           /^X\(\/\/\)[^/].*/{
16932             s//\1/
16933             q
16934           }
16935           /^X\(\/\/\)$/{
16936             s//\1/
16937             q
16938           }
16939           /^X\(\/\).*/{
16940             s//\1/
16941             q
16942           }
16943           s/.*/./; q'`
16944   as_dir="$ac_dir"; as_fn_mkdir_p
16945   ac_builddir=.
16946
16947 case "$ac_dir" in
16948 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16949 *)
16950   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
16951   # A ".." for each directory in $ac_dir_suffix.
16952   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
16953   case $ac_top_builddir_sub in
16954   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16955   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16956   esac ;;
16957 esac
16958 ac_abs_top_builddir=$ac_pwd
16959 ac_abs_builddir=$ac_pwd$ac_dir_suffix
16960 # for backward compatibility:
16961 ac_top_builddir=$ac_top_build_prefix
16962
16963 case $srcdir in
16964   .)  # We are building in place.
16965     ac_srcdir=.
16966     ac_top_srcdir=$ac_top_builddir_sub
16967     ac_abs_top_srcdir=$ac_pwd ;;
16968   [\\/]* | ?:[\\/]* )  # Absolute name.
16969     ac_srcdir=$srcdir$ac_dir_suffix;
16970     ac_top_srcdir=$srcdir
16971     ac_abs_top_srcdir=$srcdir ;;
16972   *) # Relative name.
16973     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16974     ac_top_srcdir=$ac_top_build_prefix$srcdir
16975     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
16976 esac
16977 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
16978
16979
16980   case $ac_mode in
16981   :F)
16982   #
16983   # CONFIG_FILE
16984   #
16985
16986   case $INSTALL in
16987   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
16988   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
16989   esac
16990   ac_MKDIR_P=$MKDIR_P
16991   case $MKDIR_P in
16992   [\\/$]* | ?:[\\/]* ) ;;
16993   */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
16994   esac
16995 _ACEOF
16996
16997 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16998 # If the template does not know about datarootdir, expand it.
16999 # FIXME: This hack should be removed a few years after 2.60.
17000 ac_datarootdir_hack=; ac_datarootdir_seen=
17001 ac_sed_dataroot='
17002 /datarootdir/ {
17003   p
17004   q
17005 }
17006 /@datadir@/p
17007 /@docdir@/p
17008 /@infodir@/p
17009 /@localedir@/p
17010 /@mandir@/p'
17011 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
17012 *datarootdir*) ac_datarootdir_seen=yes;;
17013 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
17014   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17015 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
17016 _ACEOF
17017 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17018   ac_datarootdir_hack='
17019   s&@datadir@&$datadir&g
17020   s&@docdir@&$docdir&g
17021   s&@infodir@&$infodir&g
17022   s&@localedir@&$localedir&g
17023   s&@mandir@&$mandir&g
17024   s&\\\${datarootdir}&$datarootdir&g' ;;
17025 esac
17026 _ACEOF
17027
17028 # Neutralize VPATH when `$srcdir' = `.'.
17029 # Shell code in configure.ac might set extrasub.
17030 # FIXME: do we really want to maintain this feature?
17031 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17032 ac_sed_extra="$ac_vpsub
17033 $extrasub
17034 _ACEOF
17035 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17036 :t
17037 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
17038 s|@configure_input@|$ac_sed_conf_input|;t t
17039 s&@top_builddir@&$ac_top_builddir_sub&;t t
17040 s&@top_build_prefix@&$ac_top_build_prefix&;t t
17041 s&@srcdir@&$ac_srcdir&;t t
17042 s&@abs_srcdir@&$ac_abs_srcdir&;t t
17043 s&@top_srcdir@&$ac_top_srcdir&;t t
17044 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17045 s&@builddir@&$ac_builddir&;t t
17046 s&@abs_builddir@&$ac_abs_builddir&;t t
17047 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17048 s&@INSTALL@&$ac_INSTALL&;t t
17049 s&@MKDIR_P@&$ac_MKDIR_P&;t t
17050 $ac_datarootdir_hack
17051 "
17052 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17053   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
17054
17055 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
17056   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17057   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
17058       "$ac_tmp/out"`; test -z "$ac_out"; } &&
17059   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
17060 which seems to be undefined.  Please make sure it is defined" >&5
17061 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
17062 which seems to be undefined.  Please make sure it is defined" >&2;}
17063
17064   rm -f "$ac_tmp/stdin"
17065   case $ac_file in
17066   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17067   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
17068   esac \
17069   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
17070  ;;
17071   :H)
17072   #
17073   # CONFIG_HEADER
17074   #
17075   if test x"$ac_file" != x-; then
17076     {
17077       $as_echo "/* $configure_input  */" \
17078       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17079     } >"$ac_tmp/config.h" \
17080       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
17081     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
17082       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17083 $as_echo "$as_me: $ac_file is unchanged" >&6;}
17084     else
17085       rm -f "$ac_file"
17086       mv "$ac_tmp/config.h" "$ac_file" \
17087         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
17088     fi
17089   else
17090     $as_echo "/* $configure_input  */" \
17091       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
17092       || as_fn_error $? "could not create -" "$LINENO" 5
17093   fi
17094  ;;
17095   :L)
17096   #
17097   # CONFIG_LINK
17098   #
17099
17100   if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
17101     :
17102   else
17103     # Prefer the file from the source tree if names are identical.
17104     if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
17105       ac_source=$srcdir/$ac_source
17106     fi
17107
17108     { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
17109 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
17110
17111     if test ! -r "$ac_source"; then
17112       as_fn_error $? "$ac_source: file not found" "$LINENO" 5
17113     fi
17114     rm -f "$ac_file"
17115
17116     # Try a relative symlink, then a hard link, then a copy.
17117     case $ac_source in
17118     [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
17119         *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
17120     esac
17121     ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
17122       ln "$ac_source" "$ac_file" 2>/dev/null ||
17123       cp -p "$ac_source" "$ac_file" ||
17124       as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
17125   fi
17126  ;;
17127   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
17128 $as_echo "$as_me: executing $ac_file commands" >&6;}
17129  ;;
17130   esac
17131
17132
17133   case $ac_file$ac_mode in
17134     "check_win32_symlinks":C)
17135 # Links sometimes fail undetected on Mingw -
17136 # so here we detect it and warn the user
17137 for FILE in $CONFIG_LINKS
17138  do
17139         # test -e works for symlinks in the MinGW console
17140         test -e `expr "$FILE" : '\([^:]*\)'` || { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** link for $FILE -- please fix by hand" >&5
17141 $as_echo "$as_me: WARNING: *** link for $FILE -- please fix by hand" >&2;}
17142  done
17143  ;;
17144     "src/include/pg_config.h":H)
17145 # Update timestamp for pg_config.h (see Makefile.global)
17146 echo >src/include/stamp-h
17147  ;;
17148     "src/include/pg_config_ext.h":H)
17149 # Update timestamp for pg_config_ext.h (see Makefile.global)
17150 echo >src/include/stamp-ext-h
17151  ;;
17152     "src/interfaces/ecpg/include/ecpg_config.h":H) echo >src/interfaces/ecpg/include/stamp-h ;;
17153
17154   esac
17155 done # for ac_tag
17156
17157
17158 as_fn_exit 0
17159 _ACEOF
17160 ac_clean_files=$ac_clean_files_save
17161
17162 test $ac_write_fail = 0 ||
17163   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
17164
17165
17166 # configure is writing to config.log, and then calls config.status.
17167 # config.status does its own redirection, appending to config.log.
17168 # Unfortunately, on DOS this fails, as config.log is still kept open
17169 # by configure, so config.status won't be able to write to it; its
17170 # output is simply discarded.  So we exec the FD to /dev/null,
17171 # effectively closing config.log, so it can be properly (re)opened and
17172 # appended to by config.status.  When coming back to configure, we
17173 # need to make the FD available again.
17174 if test "$no_create" != yes; then
17175   ac_cs_success=:
17176   ac_config_status_args=
17177   test "$silent" = yes &&
17178     ac_config_status_args="$ac_config_status_args --quiet"
17179   exec 5>/dev/null
17180   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
17181   exec 5>>config.log
17182   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17183   # would make configure fail if this is the last instruction.
17184   $ac_cs_success || as_fn_exit 1
17185 fi
17186 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17187   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17188 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
17189 fi
17190