]> granicus.if.org Git - postgresql/blob - configure
Move psql's print.c and mbprint.c into src/fe_utils.
[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-2016, PostgreSQL Global Development Group
15 ## -------------------- ##
16 ## M4sh Initialization. ##
17 ## -------------------- ##
18
19 # Be more Bourne compatible
20 DUALCASE=1; export DUALCASE # for MKS sh
21 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
22   emulate sh
23   NULLCMD=:
24   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
25   # is contrary to our usage.  Disable this feature.
26   alias -g '${1+"$@"}'='"$@"'
27   setopt NO_GLOB_SUBST
28 else
29   case `(set -o) 2>/dev/null` in #(
30   *posix*) :
31     set -o posix ;; #(
32   *) :
33      ;;
34 esac
35 fi
36
37
38 as_nl='
39 '
40 export as_nl
41 # Printing a long string crashes Solaris 7 /usr/bin/printf.
42 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
43 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
44 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
45 # Prefer a ksh shell builtin over an external printf program on Solaris,
46 # but without wasting forks for bash or zsh.
47 if test -z "$BASH_VERSION$ZSH_VERSION" \
48     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
49   as_echo='print -r --'
50   as_echo_n='print -rn --'
51 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
52   as_echo='printf %s\n'
53   as_echo_n='printf %s'
54 else
55   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
56     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
57     as_echo_n='/usr/ucb/echo -n'
58   else
59     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
60     as_echo_n_body='eval
61       arg=$1;
62       case $arg in #(
63       *"$as_nl"*)
64         expr "X$arg" : "X\\(.*\\)$as_nl";
65         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66       esac;
67       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
68     '
69     export as_echo_n_body
70     as_echo_n='sh -c $as_echo_n_body as_echo'
71   fi
72   export as_echo_body
73   as_echo='sh -c $as_echo_body as_echo'
74 fi
75
76 # The user is always right.
77 if test "${PATH_SEPARATOR+set}" != set; then
78   PATH_SEPARATOR=:
79   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
80     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
81       PATH_SEPARATOR=';'
82   }
83 fi
84
85
86 # IFS
87 # We need space, tab and new line, in precisely that order.  Quoting is
88 # there to prevent editors from complaining about space-tab.
89 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
90 # splitting by setting IFS to empty value.)
91 IFS=" ""        $as_nl"
92
93 # Find who we are.  Look in the path if we contain no directory separator.
94 as_myself=
95 case $0 in #((
96   *[\\/]* ) as_myself=$0 ;;
97   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
98 for as_dir in $PATH
99 do
100   IFS=$as_save_IFS
101   test -z "$as_dir" && as_dir=.
102     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
103   done
104 IFS=$as_save_IFS
105
106      ;;
107 esac
108 # We did not find ourselves, most probably we were run as `sh COMMAND'
109 # in which case we are not to be found in the path.
110 if test "x$as_myself" = x; then
111   as_myself=$0
112 fi
113 if test ! -f "$as_myself"; then
114   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
115   exit 1
116 fi
117
118 # Unset variables that we do not need and which cause bugs (e.g. in
119 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
120 # suppresses any "Segmentation fault" message there.  '((' could
121 # trigger a bug in pdksh 5.2.14.
122 for as_var in BASH_ENV ENV MAIL MAILPATH
123 do eval test x\${$as_var+set} = xset \
124   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
125 done
126 PS1='$ '
127 PS2='> '
128 PS4='+ '
129
130 # NLS nuisances.
131 LC_ALL=C
132 export LC_ALL
133 LANGUAGE=C
134 export LANGUAGE
135
136 # CDPATH.
137 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
138
139 # Use a proper internal environment variable to ensure we don't fall
140   # into an infinite loop, continuously re-executing ourselves.
141   if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
142     _as_can_reexec=no; export _as_can_reexec;
143     # We cannot yet assume a decent shell, so we have to provide a
144 # neutralization value for shells without unset; and this also
145 # works around shells that cannot unset nonexistent variables.
146 # Preserve -v and -x to the replacement shell.
147 BASH_ENV=/dev/null
148 ENV=/dev/null
149 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
150 case $- in # ((((
151   *v*x* | *x*v* ) as_opts=-vx ;;
152   *v* ) as_opts=-v ;;
153   *x* ) as_opts=-x ;;
154   * ) as_opts= ;;
155 esac
156 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
157 # Admittedly, this is quite paranoid, since all the known shells bail
158 # out after a failed `exec'.
159 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
160 as_fn_exit 255
161   fi
162   # We don't want this to propagate to other subprocesses.
163           { _as_can_reexec=; unset _as_can_reexec;}
164 if test "x$CONFIG_SHELL" = x; then
165   as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
166   emulate sh
167   NULLCMD=:
168   # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
169   # is contrary to our usage.  Disable this feature.
170   alias -g '\${1+\"\$@\"}'='\"\$@\"'
171   setopt NO_GLOB_SUBST
172 else
173   case \`(set -o) 2>/dev/null\` in #(
174   *posix*) :
175     set -o posix ;; #(
176   *) :
177      ;;
178 esac
179 fi
180 "
181   as_required="as_fn_return () { (exit \$1); }
182 as_fn_success () { as_fn_return 0; }
183 as_fn_failure () { as_fn_return 1; }
184 as_fn_ret_success () { return 0; }
185 as_fn_ret_failure () { return 1; }
186
187 exitcode=0
188 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
189 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
190 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
191 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
192 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
193
194 else
195   exitcode=1; echo positional parameters were not saved.
196 fi
197 test x\$exitcode = x0 || exit 1
198 test -x / || exit 1"
199   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
200   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
201   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
202   test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
203 test \$(( 1 + 1 )) = 2 || exit 1"
204   if (eval "$as_required") 2>/dev/null; then :
205   as_have_required=yes
206 else
207   as_have_required=no
208 fi
209   if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
210
211 else
212   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
213 as_found=false
214 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
215 do
216   IFS=$as_save_IFS
217   test -z "$as_dir" && as_dir=.
218   as_found=:
219   case $as_dir in #(
220          /*)
221            for as_base in sh bash ksh sh5; do
222              # Try only shells that exist, to save several forks.
223              as_shell=$as_dir/$as_base
224              if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
225                     { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
226   CONFIG_SHELL=$as_shell as_have_required=yes
227                    if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
228   break 2
229 fi
230 fi
231            done;;
232        esac
233   as_found=false
234 done
235 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
236               { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
237   CONFIG_SHELL=$SHELL as_have_required=yes
238 fi; }
239 IFS=$as_save_IFS
240
241
242       if test "x$CONFIG_SHELL" != x; then :
243   export CONFIG_SHELL
244              # We cannot yet assume a decent shell, so we have to provide a
245 # neutralization value for shells without unset; and this also
246 # works around shells that cannot unset nonexistent variables.
247 # Preserve -v and -x to the replacement shell.
248 BASH_ENV=/dev/null
249 ENV=/dev/null
250 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
251 case $- in # ((((
252   *v*x* | *x*v* ) as_opts=-vx ;;
253   *v* ) as_opts=-v ;;
254   *x* ) as_opts=-x ;;
255   * ) as_opts= ;;
256 esac
257 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
258 # Admittedly, this is quite paranoid, since all the known shells bail
259 # out after a failed `exec'.
260 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
261 exit 255
262 fi
263
264     if test x$as_have_required = xno; then :
265   $as_echo "$0: This script requires a shell more modern than all"
266   $as_echo "$0: the shells that I found on your system."
267   if test x${ZSH_VERSION+set} = xset ; then
268     $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
269     $as_echo "$0: be upgraded to zsh 4.3.4 or later."
270   else
271     $as_echo "$0: Please tell bug-autoconf@gnu.org and
272 $0: pgsql-bugs@postgresql.org about your system, including
273 $0: any error possibly output before this message. Then
274 $0: install a modern shell, or manually run the script
275 $0: under such a shell if you do have one."
276   fi
277   exit 1
278 fi
279 fi
280 fi
281 SHELL=${CONFIG_SHELL-/bin/sh}
282 export SHELL
283 # Unset more variables known to interfere with behavior of common tools.
284 CLICOLOR_FORCE= GREP_OPTIONS=
285 unset CLICOLOR_FORCE GREP_OPTIONS
286
287 ## --------------------- ##
288 ## M4sh Shell Functions. ##
289 ## --------------------- ##
290 # as_fn_unset VAR
291 # ---------------
292 # Portably unset VAR.
293 as_fn_unset ()
294 {
295   { eval $1=; unset $1;}
296 }
297 as_unset=as_fn_unset
298
299 # as_fn_set_status STATUS
300 # -----------------------
301 # Set $? to STATUS, without forking.
302 as_fn_set_status ()
303 {
304   return $1
305 } # as_fn_set_status
306
307 # as_fn_exit STATUS
308 # -----------------
309 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
310 as_fn_exit ()
311 {
312   set +e
313   as_fn_set_status $1
314   exit $1
315 } # as_fn_exit
316
317 # as_fn_mkdir_p
318 # -------------
319 # Create "$as_dir" as a directory, including parents if necessary.
320 as_fn_mkdir_p ()
321 {
322
323   case $as_dir in #(
324   -*) as_dir=./$as_dir;;
325   esac
326   test -d "$as_dir" || eval $as_mkdir_p || {
327     as_dirs=
328     while :; do
329       case $as_dir in #(
330       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
331       *) as_qdir=$as_dir;;
332       esac
333       as_dirs="'$as_qdir' $as_dirs"
334       as_dir=`$as_dirname -- "$as_dir" ||
335 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
336          X"$as_dir" : 'X\(//\)[^/]' \| \
337          X"$as_dir" : 'X\(//\)$' \| \
338          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
339 $as_echo X"$as_dir" |
340     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
341             s//\1/
342             q
343           }
344           /^X\(\/\/\)[^/].*/{
345             s//\1/
346             q
347           }
348           /^X\(\/\/\)$/{
349             s//\1/
350             q
351           }
352           /^X\(\/\).*/{
353             s//\1/
354             q
355           }
356           s/.*/./; q'`
357       test -d "$as_dir" && break
358     done
359     test -z "$as_dirs" || eval "mkdir $as_dirs"
360   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
361
362
363 } # as_fn_mkdir_p
364
365 # as_fn_executable_p FILE
366 # -----------------------
367 # Test if FILE is an executable regular file.
368 as_fn_executable_p ()
369 {
370   test -f "$1" && test -x "$1"
371 } # as_fn_executable_p
372 # as_fn_append VAR VALUE
373 # ----------------------
374 # Append the text in VALUE to the end of the definition contained in VAR. Take
375 # advantage of any shell optimizations that allow amortized linear growth over
376 # repeated appends, instead of the typical quadratic growth present in naive
377 # implementations.
378 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
379   eval 'as_fn_append ()
380   {
381     eval $1+=\$2
382   }'
383 else
384   as_fn_append ()
385   {
386     eval $1=\$$1\$2
387   }
388 fi # as_fn_append
389
390 # as_fn_arith ARG...
391 # ------------------
392 # Perform arithmetic evaluation on the ARGs, and store the result in the
393 # global $as_val. Take advantage of shells that can avoid forks. The arguments
394 # must be portable across $(()) and expr.
395 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
396   eval 'as_fn_arith ()
397   {
398     as_val=$(( $* ))
399   }'
400 else
401   as_fn_arith ()
402   {
403     as_val=`expr "$@" || test $? -eq 1`
404   }
405 fi # as_fn_arith
406
407
408 # as_fn_error STATUS ERROR [LINENO LOG_FD]
409 # ----------------------------------------
410 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
411 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
412 # script with STATUS, using 1 if that was 0.
413 as_fn_error ()
414 {
415   as_status=$1; test $as_status -eq 0 && as_status=1
416   if test "$4"; then
417     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
418     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
419   fi
420   $as_echo "$as_me: error: $2" >&2
421   as_fn_exit $as_status
422 } # as_fn_error
423
424 if expr a : '\(a\)' >/dev/null 2>&1 &&
425    test "X`expr 00001 : '.*\(...\)'`" = X001; then
426   as_expr=expr
427 else
428   as_expr=false
429 fi
430
431 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
432   as_basename=basename
433 else
434   as_basename=false
435 fi
436
437 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
438   as_dirname=dirname
439 else
440   as_dirname=false
441 fi
442
443 as_me=`$as_basename -- "$0" ||
444 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
445          X"$0" : 'X\(//\)$' \| \
446          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
447 $as_echo X/"$0" |
448     sed '/^.*\/\([^/][^/]*\)\/*$/{
449             s//\1/
450             q
451           }
452           /^X\/\(\/\/\)$/{
453             s//\1/
454             q
455           }
456           /^X\/\(\/\).*/{
457             s//\1/
458             q
459           }
460           s/.*/./; q'`
461
462 # Avoid depending upon Character Ranges.
463 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
464 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
465 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
466 as_cr_digits='0123456789'
467 as_cr_alnum=$as_cr_Letters$as_cr_digits
468
469
470   as_lineno_1=$LINENO as_lineno_1a=$LINENO
471   as_lineno_2=$LINENO as_lineno_2a=$LINENO
472   eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
473   test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
474   # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
475   sed -n '
476     p
477     /[$]LINENO/=
478   ' <$as_myself |
479     sed '
480       s/[$]LINENO.*/&-/
481       t lineno
482       b
483       :lineno
484       N
485       :loop
486       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
487       t loop
488       s/-\n.*//
489     ' >$as_me.lineno &&
490   chmod +x "$as_me.lineno" ||
491     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
492
493   # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
494   # already done that, so ensure we don't try to do so again and fall
495   # in an infinite loop.  This has already happened in practice.
496   _as_can_reexec=no; export _as_can_reexec
497   # Don't try to exec as it changes $[0], causing all sort of problems
498   # (the dirname of $[0] is not the place where we might find the
499   # original and so on.  Autoconf is especially sensitive to this).
500   . "./$as_me.lineno"
501   # Exit status is that of the last command.
502   exit
503 }
504
505 ECHO_C= ECHO_N= ECHO_T=
506 case `echo -n x` in #(((((
507 -n*)
508   case `echo 'xy\c'` in
509   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
510   xy)  ECHO_C='\c';;
511   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
512        ECHO_T=' ';;
513   esac;;
514 *)
515   ECHO_N='-n';;
516 esac
517
518 rm -f conf$$ conf$$.exe conf$$.file
519 if test -d conf$$.dir; then
520   rm -f conf$$.dir/conf$$.file
521 else
522   rm -f conf$$.dir
523   mkdir conf$$.dir 2>/dev/null
524 fi
525 if (echo >conf$$.file) 2>/dev/null; then
526   if ln -s conf$$.file conf$$ 2>/dev/null; then
527     as_ln_s='ln -s'
528     # ... but there are two gotchas:
529     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
530     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
531     # In both cases, we have to default to `cp -pR'.
532     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
533       as_ln_s='cp -pR'
534   elif ln conf$$.file conf$$ 2>/dev/null; then
535     as_ln_s=ln
536   else
537     as_ln_s='cp -pR'
538   fi
539 else
540   as_ln_s='cp -pR'
541 fi
542 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
543 rmdir conf$$.dir 2>/dev/null
544
545 if mkdir -p . 2>/dev/null; then
546   as_mkdir_p='mkdir -p "$as_dir"'
547 else
548   test -d ./-p && rmdir ./-p
549   as_mkdir_p=false
550 fi
551
552 as_test_x='test -x'
553 as_executable_p=as_fn_executable_p
554
555 # Sed expression to map a string onto a valid CPP name.
556 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
557
558 # Sed expression to map a string onto a valid variable name.
559 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
560
561
562 test -n "$DJDIR" || exec 7<&0 </dev/null
563 exec 6>&1
564
565 # Name of the host.
566 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
567 # so uname gets run too.
568 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
569
570 #
571 # Initializations.
572 #
573 ac_default_prefix=/usr/local
574 ac_clean_files=
575 ac_config_libobj_dir=.
576 LIBOBJS=
577 cross_compiling=no
578 subdirs=
579 MFLAGS=
580 MAKEFLAGS=
581
582 # Identity of this package.
583 PACKAGE_NAME='PostgreSQL'
584 PACKAGE_TARNAME='postgresql'
585 PACKAGE_VERSION='9.6devel'
586 PACKAGE_STRING='PostgreSQL 9.6devel'
587 PACKAGE_BUGREPORT='pgsql-bugs@postgresql.org'
588 PACKAGE_URL=''
589
590 ac_unique_file="src/backend/access/common/heaptuple.c"
591 ac_default_prefix=/usr/local/pgsql
592 # Factoring default headers for most tests.
593 ac_includes_default="\
594 #include <stdio.h>
595 #ifdef HAVE_SYS_TYPES_H
596 # include <sys/types.h>
597 #endif
598 #ifdef HAVE_SYS_STAT_H
599 # include <sys/stat.h>
600 #endif
601 #ifdef STDC_HEADERS
602 # include <stdlib.h>
603 # include <stddef.h>
604 #else
605 # ifdef HAVE_STDLIB_H
606 #  include <stdlib.h>
607 # endif
608 #endif
609 #ifdef HAVE_STRING_H
610 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
611 #  include <memory.h>
612 # endif
613 # include <string.h>
614 #endif
615 #ifdef HAVE_STRINGS_H
616 # include <strings.h>
617 #endif
618 #ifdef HAVE_INTTYPES_H
619 # include <inttypes.h>
620 #endif
621 #ifdef HAVE_STDINT_H
622 # include <stdint.h>
623 #endif
624 #ifdef HAVE_UNISTD_H
625 # include <unistd.h>
626 #endif"
627
628 ac_subst_vars='LTLIBOBJS
629 vpath_build
630 PG_VERSION_NUM
631 PROVE
632 OSX
633 XSLTPROC
634 XMLLINT
635 DBTOEPUB
636 COLLATEINDEX
637 DOCBOOKSTYLE
638 have_docbook
639 JADE
640 NSGMLS
641 TCL_SHLIB_LD_LIBS
642 TCL_SHARED_BUILD
643 TCL_LIB_SPEC
644 TCL_LIBS
645 TCL_INCLUDE_SPEC
646 TCL_CONFIG_SH
647 TCLSH
648 XGETTEXT
649 MSGMERGE
650 MSGFMT_FLAGS
651 MSGFMT
652 PG_CRC32C_OBJS
653 CFLAGS_SSE42
654 have_win32_dbghelp
655 HAVE_IPV6
656 LIBOBJS
657 UUID_LIBS
658 LDAP_LIBS_BE
659 LDAP_LIBS_FE
660 PTHREAD_CFLAGS
661 PTHREAD_LIBS
662 PTHREAD_CC
663 ax_pthread_config
664 ZIC
665 python_additional_libs
666 python_libspec
667 python_libdir
668 python_includespec
669 python_version
670 python_majorversion
671 PYTHON
672 perl_embed_ldflags
673 perl_useshrplib
674 perl_privlibexp
675 perl_archlibexp
676 PERL
677 FLEXFLAGS
678 FLEX
679 BISONFLAGS
680 BISON
681 MKDIR_P
682 AWK
683 LN_S
684 TAR
685 install_bin
686 INSTALL_DATA
687 INSTALL_SCRIPT
688 INSTALL_PROGRAM
689 WINDRES
690 DLLWRAP
691 DLLTOOL
692 AR
693 STRIP_SHARED_LIB
694 STRIP_STATIC_LIB
695 STRIP
696 RANLIB
697 ld_R_works
698 with_gnu_ld
699 LD
700 LDFLAGS_SL
701 LDFLAGS_EX
702 ELF_SYS
703 EGREP
704 GREP
705 with_zlib
706 with_system_tzdata
707 with_libxslt
708 with_libxml
709 XML2_CONFIG
710 UUID_EXTRA_OBJS
711 with_uuid
712 with_systemd
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_systemd
835 with_readline
836 with_libedit_preferred
837 with_uuid
838 with_ossp_uuid
839 with_libxml
840 with_libxslt
841 with_system_tzdata
842 with_zlib
843 with_gnu_ld
844 enable_largefile
845 enable_float4_byval
846 enable_float8_byval
847 '
848       ac_precious_vars='build_alias
849 host_alias
850 target_alias
851 CC
852 CFLAGS
853 LDFLAGS
854 LIBS
855 CPPFLAGS
856 CPP
857 LDFLAGS_EX
858 LDFLAGS_SL
859 DOCBOOKSTYLE'
860
861
862 # Initialize some variables set by options.
863 ac_init_help=
864 ac_init_version=false
865 ac_unrecognized_opts=
866 ac_unrecognized_sep=
867 # The variables have the same names as the options, with
868 # dashes changed to underlines.
869 cache_file=/dev/null
870 exec_prefix=NONE
871 no_create=
872 no_recursion=
873 prefix=NONE
874 program_prefix=NONE
875 program_suffix=NONE
876 program_transform_name=s,x,x,
877 silent=
878 site=
879 srcdir=
880 verbose=
881 x_includes=NONE
882 x_libraries=NONE
883
884 # Installation directory options.
885 # These are left unexpanded so users can "make install exec_prefix=/foo"
886 # and all the variables that are supposed to be based on exec_prefix
887 # by default will actually change.
888 # Use braces instead of parens because sh, perl, etc. also accept them.
889 # (The list follows the same order as the GNU Coding Standards.)
890 bindir='${exec_prefix}/bin'
891 sbindir='${exec_prefix}/sbin'
892 libexecdir='${exec_prefix}/libexec'
893 datarootdir='${prefix}/share'
894 datadir='${datarootdir}'
895 sysconfdir='${prefix}/etc'
896 sharedstatedir='${prefix}/com'
897 localstatedir='${prefix}/var'
898 includedir='${prefix}/include'
899 oldincludedir='/usr/include'
900 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
901 infodir='${datarootdir}/info'
902 htmldir='${docdir}'
903 dvidir='${docdir}'
904 pdfdir='${docdir}'
905 psdir='${docdir}'
906 libdir='${exec_prefix}/lib'
907 localedir='${datarootdir}/locale'
908 mandir='${datarootdir}/man'
909
910 ac_prev=
911 ac_dashdash=
912 for ac_option
913 do
914   # If the previous option needs an argument, assign it.
915   if test -n "$ac_prev"; then
916     eval $ac_prev=\$ac_option
917     ac_prev=
918     continue
919   fi
920
921   case $ac_option in
922   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
923   *=)   ac_optarg= ;;
924   *)    ac_optarg=yes ;;
925   esac
926
927   # Accept the important Cygnus configure options, so we can diagnose typos.
928
929   case $ac_dashdash$ac_option in
930   --)
931     ac_dashdash=yes ;;
932
933   -bindir | --bindir | --bindi | --bind | --bin | --bi)
934     ac_prev=bindir ;;
935   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
936     bindir=$ac_optarg ;;
937
938   -build | --build | --buil | --bui | --bu)
939     ac_prev=build_alias ;;
940   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
941     build_alias=$ac_optarg ;;
942
943   -cache-file | --cache-file | --cache-fil | --cache-fi \
944   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
945     ac_prev=cache_file ;;
946   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
947   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
948     cache_file=$ac_optarg ;;
949
950   --config-cache | -C)
951     cache_file=config.cache ;;
952
953   -datadir | --datadir | --datadi | --datad)
954     ac_prev=datadir ;;
955   -datadir=* | --datadir=* | --datadi=* | --datad=*)
956     datadir=$ac_optarg ;;
957
958   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
959   | --dataroo | --dataro | --datar)
960     ac_prev=datarootdir ;;
961   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
962   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
963     datarootdir=$ac_optarg ;;
964
965   -disable-* | --disable-*)
966     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
967     # Reject names that are not valid shell variable names.
968     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
969       as_fn_error $? "invalid feature name: $ac_useropt"
970     ac_useropt_orig=$ac_useropt
971     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
972     case $ac_user_opts in
973       *"
974 "enable_$ac_useropt"
975 "*) ;;
976       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
977          ac_unrecognized_sep=', ';;
978     esac
979     eval enable_$ac_useropt=no ;;
980
981   -docdir | --docdir | --docdi | --doc | --do)
982     ac_prev=docdir ;;
983   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
984     docdir=$ac_optarg ;;
985
986   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
987     ac_prev=dvidir ;;
988   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
989     dvidir=$ac_optarg ;;
990
991   -enable-* | --enable-*)
992     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
993     # Reject names that are not valid shell variable names.
994     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
995       as_fn_error $? "invalid feature name: $ac_useropt"
996     ac_useropt_orig=$ac_useropt
997     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
998     case $ac_user_opts in
999       *"
1000 "enable_$ac_useropt"
1001 "*) ;;
1002       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1003          ac_unrecognized_sep=', ';;
1004     esac
1005     eval enable_$ac_useropt=\$ac_optarg ;;
1006
1007   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1008   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1009   | --exec | --exe | --ex)
1010     ac_prev=exec_prefix ;;
1011   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1012   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1013   | --exec=* | --exe=* | --ex=*)
1014     exec_prefix=$ac_optarg ;;
1015
1016   -gas | --gas | --ga | --g)
1017     # Obsolete; use --with-gas.
1018     with_gas=yes ;;
1019
1020   -help | --help | --hel | --he | -h)
1021     ac_init_help=long ;;
1022   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1023     ac_init_help=recursive ;;
1024   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1025     ac_init_help=short ;;
1026
1027   -host | --host | --hos | --ho)
1028     ac_prev=host_alias ;;
1029   -host=* | --host=* | --hos=* | --ho=*)
1030     host_alias=$ac_optarg ;;
1031
1032   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1033     ac_prev=htmldir ;;
1034   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1035   | --ht=*)
1036     htmldir=$ac_optarg ;;
1037
1038   -includedir | --includedir | --includedi | --included | --include \
1039   | --includ | --inclu | --incl | --inc)
1040     ac_prev=includedir ;;
1041   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1042   | --includ=* | --inclu=* | --incl=* | --inc=*)
1043     includedir=$ac_optarg ;;
1044
1045   -infodir | --infodir | --infodi | --infod | --info | --inf)
1046     ac_prev=infodir ;;
1047   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1048     infodir=$ac_optarg ;;
1049
1050   -libdir | --libdir | --libdi | --libd)
1051     ac_prev=libdir ;;
1052   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1053     libdir=$ac_optarg ;;
1054
1055   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1056   | --libexe | --libex | --libe)
1057     ac_prev=libexecdir ;;
1058   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1059   | --libexe=* | --libex=* | --libe=*)
1060     libexecdir=$ac_optarg ;;
1061
1062   -localedir | --localedir | --localedi | --localed | --locale)
1063     ac_prev=localedir ;;
1064   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1065     localedir=$ac_optarg ;;
1066
1067   -localstatedir | --localstatedir | --localstatedi | --localstated \
1068   | --localstate | --localstat | --localsta | --localst | --locals)
1069     ac_prev=localstatedir ;;
1070   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1071   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1072     localstatedir=$ac_optarg ;;
1073
1074   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1075     ac_prev=mandir ;;
1076   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1077     mandir=$ac_optarg ;;
1078
1079   -nfp | --nfp | --nf)
1080     # Obsolete; use --without-fp.
1081     with_fp=no ;;
1082
1083   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1084   | --no-cr | --no-c | -n)
1085     no_create=yes ;;
1086
1087   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1088   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1089     no_recursion=yes ;;
1090
1091   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1092   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1093   | --oldin | --oldi | --old | --ol | --o)
1094     ac_prev=oldincludedir ;;
1095   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1096   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1097   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1098     oldincludedir=$ac_optarg ;;
1099
1100   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1101     ac_prev=prefix ;;
1102   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1103     prefix=$ac_optarg ;;
1104
1105   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1106   | --program-pre | --program-pr | --program-p)
1107     ac_prev=program_prefix ;;
1108   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1109   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1110     program_prefix=$ac_optarg ;;
1111
1112   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1113   | --program-suf | --program-su | --program-s)
1114     ac_prev=program_suffix ;;
1115   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1116   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1117     program_suffix=$ac_optarg ;;
1118
1119   -program-transform-name | --program-transform-name \
1120   | --program-transform-nam | --program-transform-na \
1121   | --program-transform-n | --program-transform- \
1122   | --program-transform | --program-transfor \
1123   | --program-transfo | --program-transf \
1124   | --program-trans | --program-tran \
1125   | --progr-tra | --program-tr | --program-t)
1126     ac_prev=program_transform_name ;;
1127   -program-transform-name=* | --program-transform-name=* \
1128   | --program-transform-nam=* | --program-transform-na=* \
1129   | --program-transform-n=* | --program-transform-=* \
1130   | --program-transform=* | --program-transfor=* \
1131   | --program-transfo=* | --program-transf=* \
1132   | --program-trans=* | --program-tran=* \
1133   | --progr-tra=* | --program-tr=* | --program-t=*)
1134     program_transform_name=$ac_optarg ;;
1135
1136   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1137     ac_prev=pdfdir ;;
1138   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1139     pdfdir=$ac_optarg ;;
1140
1141   -psdir | --psdir | --psdi | --psd | --ps)
1142     ac_prev=psdir ;;
1143   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1144     psdir=$ac_optarg ;;
1145
1146   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1147   | -silent | --silent | --silen | --sile | --sil)
1148     silent=yes ;;
1149
1150   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1151     ac_prev=sbindir ;;
1152   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1153   | --sbi=* | --sb=*)
1154     sbindir=$ac_optarg ;;
1155
1156   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1157   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1158   | --sharedst | --shareds | --shared | --share | --shar \
1159   | --sha | --sh)
1160     ac_prev=sharedstatedir ;;
1161   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1162   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1163   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1164   | --sha=* | --sh=*)
1165     sharedstatedir=$ac_optarg ;;
1166
1167   -site | --site | --sit)
1168     ac_prev=site ;;
1169   -site=* | --site=* | --sit=*)
1170     site=$ac_optarg ;;
1171
1172   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1173     ac_prev=srcdir ;;
1174   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1175     srcdir=$ac_optarg ;;
1176
1177   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1178   | --syscon | --sysco | --sysc | --sys | --sy)
1179     ac_prev=sysconfdir ;;
1180   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1181   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1182     sysconfdir=$ac_optarg ;;
1183
1184   -target | --target | --targe | --targ | --tar | --ta | --t)
1185     ac_prev=target_alias ;;
1186   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1187     target_alias=$ac_optarg ;;
1188
1189   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1190     verbose=yes ;;
1191
1192   -version | --version | --versio | --versi | --vers | -V)
1193     ac_init_version=: ;;
1194
1195   -with-* | --with-*)
1196     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1197     # Reject names that are not valid shell variable names.
1198     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1199       as_fn_error $? "invalid package name: $ac_useropt"
1200     ac_useropt_orig=$ac_useropt
1201     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1202     case $ac_user_opts in
1203       *"
1204 "with_$ac_useropt"
1205 "*) ;;
1206       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1207          ac_unrecognized_sep=', ';;
1208     esac
1209     eval with_$ac_useropt=\$ac_optarg ;;
1210
1211   -without-* | --without-*)
1212     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1213     # Reject names that are not valid shell variable names.
1214     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1215       as_fn_error $? "invalid package name: $ac_useropt"
1216     ac_useropt_orig=$ac_useropt
1217     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1218     case $ac_user_opts in
1219       *"
1220 "with_$ac_useropt"
1221 "*) ;;
1222       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1223          ac_unrecognized_sep=', ';;
1224     esac
1225     eval with_$ac_useropt=no ;;
1226
1227   --x)
1228     # Obsolete; use --with-x.
1229     with_x=yes ;;
1230
1231   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1232   | --x-incl | --x-inc | --x-in | --x-i)
1233     ac_prev=x_includes ;;
1234   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1235   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1236     x_includes=$ac_optarg ;;
1237
1238   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1239   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1240     ac_prev=x_libraries ;;
1241   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1242   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1243     x_libraries=$ac_optarg ;;
1244
1245   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1246 Try \`$0 --help' for more information"
1247     ;;
1248
1249   *=*)
1250     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1251     # Reject names that are not valid shell variable names.
1252     case $ac_envvar in #(
1253       '' | [0-9]* | *[!_$as_cr_alnum]* )
1254       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1255     esac
1256     eval $ac_envvar=\$ac_optarg
1257     export $ac_envvar ;;
1258
1259   *)
1260     # FIXME: should be removed in autoconf 3.0.
1261     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1262     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1263       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1264     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1265     ;;
1266
1267   esac
1268 done
1269
1270 if test -n "$ac_prev"; then
1271   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1272   as_fn_error $? "missing argument to $ac_option"
1273 fi
1274
1275 if test -n "$ac_unrecognized_opts"; then
1276   case $enable_option_checking in
1277     no) ;;
1278     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1279     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1280   esac
1281 fi
1282
1283 # Check all directory arguments for consistency.
1284 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1285                 datadir sysconfdir sharedstatedir localstatedir includedir \
1286                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1287                 libdir localedir mandir
1288 do
1289   eval ac_val=\$$ac_var
1290   # Remove trailing slashes.
1291   case $ac_val in
1292     */ )
1293       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1294       eval $ac_var=\$ac_val;;
1295   esac
1296   # Be sure to have absolute directory names.
1297   case $ac_val in
1298     [\\/$]* | ?:[\\/]* )  continue;;
1299     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1300   esac
1301   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1302 done
1303
1304 # There might be people who depend on the old broken behavior: `$host'
1305 # used to hold the argument of --host etc.
1306 # FIXME: To remove some day.
1307 build=$build_alias
1308 host=$host_alias
1309 target=$target_alias
1310
1311 # FIXME: To remove some day.
1312 if test "x$host_alias" != x; then
1313   if test "x$build_alias" = x; then
1314     cross_compiling=maybe
1315   elif test "x$build_alias" != "x$host_alias"; then
1316     cross_compiling=yes
1317   fi
1318 fi
1319
1320 ac_tool_prefix=
1321 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1322
1323 test "$silent" = yes && exec 6>/dev/null
1324
1325
1326 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1327 ac_ls_di=`ls -di .` &&
1328 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1329   as_fn_error $? "working directory cannot be determined"
1330 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1331   as_fn_error $? "pwd does not report name of working directory"
1332
1333
1334 # Find the source files, if location was not specified.
1335 if test -z "$srcdir"; then
1336   ac_srcdir_defaulted=yes
1337   # Try the directory containing this script, then the parent directory.
1338   ac_confdir=`$as_dirname -- "$as_myself" ||
1339 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1340          X"$as_myself" : 'X\(//\)[^/]' \| \
1341          X"$as_myself" : 'X\(//\)$' \| \
1342          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1343 $as_echo X"$as_myself" |
1344     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1345             s//\1/
1346             q
1347           }
1348           /^X\(\/\/\)[^/].*/{
1349             s//\1/
1350             q
1351           }
1352           /^X\(\/\/\)$/{
1353             s//\1/
1354             q
1355           }
1356           /^X\(\/\).*/{
1357             s//\1/
1358             q
1359           }
1360           s/.*/./; q'`
1361   srcdir=$ac_confdir
1362   if test ! -r "$srcdir/$ac_unique_file"; then
1363     srcdir=..
1364   fi
1365 else
1366   ac_srcdir_defaulted=no
1367 fi
1368 if test ! -r "$srcdir/$ac_unique_file"; then
1369   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1370   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1371 fi
1372 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1373 ac_abs_confdir=`(
1374         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1375         pwd)`
1376 # When building in place, set srcdir=.
1377 if test "$ac_abs_confdir" = "$ac_pwd"; then
1378   srcdir=.
1379 fi
1380 # Remove unnecessary trailing slashes from srcdir.
1381 # Double slashes in file names in object file debugging info
1382 # mess up M-x gdb in Emacs.
1383 case $srcdir in
1384 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1385 esac
1386 for ac_var in $ac_precious_vars; do
1387   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1388   eval ac_env_${ac_var}_value=\$${ac_var}
1389   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1390   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1391 done
1392
1393 #
1394 # Report the --help message.
1395 #
1396 if test "$ac_init_help" = "long"; then
1397   # Omit some internal or obsolete options to make the list less imposing.
1398   # This message is too long to be a string in the A/UX 3.1 sh.
1399   cat <<_ACEOF
1400 \`configure' configures PostgreSQL 9.6devel to adapt to many kinds of systems.
1401
1402 Usage: $0 [OPTION]... [VAR=VALUE]...
1403
1404 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1405 VAR=VALUE.  See below for descriptions of some of the useful variables.
1406
1407 Defaults for the options are specified in brackets.
1408
1409 Configuration:
1410   -h, --help              display this help and exit
1411       --help=short        display options specific to this package
1412       --help=recursive    display the short help of all the included packages
1413   -V, --version           display version information and exit
1414   -q, --quiet, --silent   do not print \`checking ...' messages
1415       --cache-file=FILE   cache test results in FILE [disabled]
1416   -C, --config-cache      alias for \`--cache-file=config.cache'
1417   -n, --no-create         do not create output files
1418       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1419
1420 Installation directories:
1421   --prefix=PREFIX         install architecture-independent files in PREFIX
1422                           [$ac_default_prefix]
1423   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1424                           [PREFIX]
1425
1426 By default, \`make install' will install all the files in
1427 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1428 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1429 for instance \`--prefix=\$HOME'.
1430
1431 For better control, use the options below.
1432
1433 Fine tuning of the installation directories:
1434   --bindir=DIR            user executables [EPREFIX/bin]
1435   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1436   --libexecdir=DIR        program executables [EPREFIX/libexec]
1437   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1438   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1439   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1440   --libdir=DIR            object code libraries [EPREFIX/lib]
1441   --includedir=DIR        C header files [PREFIX/include]
1442   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1443   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1444   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1445   --infodir=DIR           info documentation [DATAROOTDIR/info]
1446   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1447   --mandir=DIR            man documentation [DATAROOTDIR/man]
1448   --docdir=DIR            documentation root [DATAROOTDIR/doc/postgresql]
1449   --htmldir=DIR           html documentation [DOCDIR]
1450   --dvidir=DIR            dvi documentation [DOCDIR]
1451   --pdfdir=DIR            pdf documentation [DOCDIR]
1452   --psdir=DIR             ps documentation [DOCDIR]
1453 _ACEOF
1454
1455   cat <<\_ACEOF
1456
1457 System types:
1458   --build=BUILD     configure for building on BUILD [guessed]
1459   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1460 _ACEOF
1461 fi
1462
1463 if test -n "$ac_init_help"; then
1464   case $ac_init_help in
1465      short | recursive ) echo "Configuration of PostgreSQL 9.6devel:";;
1466    esac
1467   cat <<\_ACEOF
1468
1469 Optional Features:
1470   --disable-option-checking  ignore unrecognized --enable/--with options
1471   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1472   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1473   --disable-integer-datetimes
1474                           disable 64-bit integer date/time support
1475   --enable-nls[=LANGUAGES]
1476                           enable Native Language Support
1477   --disable-rpath         do not embed shared library search path in
1478                           executables
1479   --disable-spinlocks     do not use spinlocks
1480   --disable-atomics       do not use atomic operations
1481   --enable-debug          build with debugging symbols (-g)
1482   --enable-profiling      build with profiling enabled
1483   --enable-coverage       build with coverage testing instrumentation
1484   --enable-dtrace         build with DTrace support
1485   --enable-tap-tests      enable TAP tests (requires Perl and IPC::Run)
1486   --enable-depend         turn on automatic dependency tracking
1487   --enable-cassert        enable assertion checks (for debugging)
1488   --disable-thread-safety disable thread-safety in client libraries
1489   --disable-largefile     omit support for large files
1490   --disable-float4-byval  disable float4 passed by value
1491   --disable-float8-byval  disable float8 passed by value
1492
1493 Optional Packages:
1494   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1495   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1496   --with-extra-version=STRING
1497                           append STRING to version
1498   --with-template=NAME    override operating system template
1499   --with-includes=DIRS    look for additional header files in DIRS
1500   --with-libraries=DIRS   look for additional libraries in DIRS
1501   --with-libs=DIRS        alternative spelling of --with-libraries
1502   --with-pgport=PORTNUM   set default port number [5432]
1503   --with-blocksize=BLOCKSIZE
1504                           set table block size in kB [8]
1505   --with-segsize=SEGSIZE  set table segment size in GB [1]
1506   --with-wal-blocksize=BLOCKSIZE
1507                           set WAL block size in kB [8]
1508   --with-wal-segsize=SEGSIZE
1509                           set WAL segment size in MB [16]
1510   --with-CC=CMD           set compiler (deprecated)
1511   --with-tcl              build Tcl modules (PL/Tcl)
1512   --with-tclconfig=DIR    tclConfig.sh is in DIR
1513   --with-perl             build Perl modules (PL/Perl)
1514   --with-python           build Python modules (PL/Python)
1515   --with-gssapi           build with GSSAPI support
1516   --with-krb-srvnam=NAME  default service principal name in Kerberos (GSSAPI)
1517                           [postgres]
1518   --with-pam              build with PAM support
1519   --with-ldap             build with LDAP support
1520   --with-bonjour          build with Bonjour support
1521   --with-openssl          build with OpenSSL support
1522   --with-selinux          build with SELinux support
1523   --with-systemd          build with systemd support
1524   --without-readline      do not use GNU Readline nor BSD Libedit for editing
1525   --with-libedit-preferred
1526                           prefer BSD Libedit over GNU Readline
1527   --with-uuid=LIB         build contrib/uuid-ossp using LIB (bsd,e2fs,ossp)
1528   --with-ossp-uuid        obsolete spelling of --with-uuid=ossp
1529   --with-libxml           build with XML support
1530   --with-libxslt          use XSLT support when building contrib/xml2
1531   --with-system-tzdata=DIR
1532                           use system time zone data in DIR
1533   --without-zlib          do not use Zlib
1534   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1535
1536 Some influential environment variables:
1537   CC          C compiler command
1538   CFLAGS      C compiler flags
1539   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1540               nonstandard directory <lib dir>
1541   LIBS        libraries to pass to the linker, e.g. -l<library>
1542   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1543               you have headers in a nonstandard directory <include dir>
1544   CPP         C preprocessor
1545   LDFLAGS_EX  extra linker flags for linking executables only
1546   LDFLAGS_SL  extra linker flags for linking shared libraries only
1547   DOCBOOKSTYLE
1548               location of DocBook stylesheets
1549
1550 Use these variables to override the choices made by `configure' or to help
1551 it to find libraries and programs with nonstandard names/locations.
1552
1553 Report bugs to <pgsql-bugs@postgresql.org>.
1554 _ACEOF
1555 ac_status=$?
1556 fi
1557
1558 if test "$ac_init_help" = "recursive"; then
1559   # If there are subdirs, report their specific --help.
1560   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1561     test -d "$ac_dir" ||
1562       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1563       continue
1564     ac_builddir=.
1565
1566 case "$ac_dir" in
1567 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1568 *)
1569   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1570   # A ".." for each directory in $ac_dir_suffix.
1571   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1572   case $ac_top_builddir_sub in
1573   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1574   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1575   esac ;;
1576 esac
1577 ac_abs_top_builddir=$ac_pwd
1578 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1579 # for backward compatibility:
1580 ac_top_builddir=$ac_top_build_prefix
1581
1582 case $srcdir in
1583   .)  # We are building in place.
1584     ac_srcdir=.
1585     ac_top_srcdir=$ac_top_builddir_sub
1586     ac_abs_top_srcdir=$ac_pwd ;;
1587   [\\/]* | ?:[\\/]* )  # Absolute name.
1588     ac_srcdir=$srcdir$ac_dir_suffix;
1589     ac_top_srcdir=$srcdir
1590     ac_abs_top_srcdir=$srcdir ;;
1591   *) # Relative name.
1592     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1593     ac_top_srcdir=$ac_top_build_prefix$srcdir
1594     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1595 esac
1596 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1597
1598     cd "$ac_dir" || { ac_status=$?; continue; }
1599     # Check for guested configure.
1600     if test -f "$ac_srcdir/configure.gnu"; then
1601       echo &&
1602       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1603     elif test -f "$ac_srcdir/configure"; then
1604       echo &&
1605       $SHELL "$ac_srcdir/configure" --help=recursive
1606     else
1607       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1608     fi || ac_status=$?
1609     cd "$ac_pwd" || { ac_status=$?; break; }
1610   done
1611 fi
1612
1613 test -n "$ac_init_help" && exit $ac_status
1614 if $ac_init_version; then
1615   cat <<\_ACEOF
1616 PostgreSQL configure 9.6devel
1617 generated by GNU Autoconf 2.69
1618
1619 Copyright (C) 2012 Free Software Foundation, Inc.
1620 This configure script is free software; the Free Software Foundation
1621 gives unlimited permission to copy, distribute and modify it.
1622
1623 Copyright (c) 1996-2016, PostgreSQL Global Development Group
1624 _ACEOF
1625   exit
1626 fi
1627
1628 ## ------------------------ ##
1629 ## Autoconf initialization. ##
1630 ## ------------------------ ##
1631
1632 # ac_fn_c_try_compile LINENO
1633 # --------------------------
1634 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1635 ac_fn_c_try_compile ()
1636 {
1637   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1638   rm -f conftest.$ac_objext
1639   if { { ac_try="$ac_compile"
1640 case "(($ac_try" in
1641   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1642   *) ac_try_echo=$ac_try;;
1643 esac
1644 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1645 $as_echo "$ac_try_echo"; } >&5
1646   (eval "$ac_compile") 2>conftest.err
1647   ac_status=$?
1648   if test -s conftest.err; then
1649     grep -v '^ *+' conftest.err >conftest.er1
1650     cat conftest.er1 >&5
1651     mv -f conftest.er1 conftest.err
1652   fi
1653   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1654   test $ac_status = 0; } && {
1655          test -z "$ac_c_werror_flag" ||
1656          test ! -s conftest.err
1657        } && test -s conftest.$ac_objext; then :
1658   ac_retval=0
1659 else
1660   $as_echo "$as_me: failed program was:" >&5
1661 sed 's/^/| /' conftest.$ac_ext >&5
1662
1663         ac_retval=1
1664 fi
1665   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1666   as_fn_set_status $ac_retval
1667
1668 } # ac_fn_c_try_compile
1669
1670 # ac_fn_c_try_link LINENO
1671 # -----------------------
1672 # Try to link conftest.$ac_ext, and return whether this succeeded.
1673 ac_fn_c_try_link ()
1674 {
1675   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1676   rm -f conftest.$ac_objext conftest$ac_exeext
1677   if { { ac_try="$ac_link"
1678 case "(($ac_try" in
1679   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1680   *) ac_try_echo=$ac_try;;
1681 esac
1682 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1683 $as_echo "$ac_try_echo"; } >&5
1684   (eval "$ac_link") 2>conftest.err
1685   ac_status=$?
1686   if test -s conftest.err; then
1687     grep -v '^ *+' conftest.err >conftest.er1
1688     cat conftest.er1 >&5
1689     mv -f conftest.er1 conftest.err
1690   fi
1691   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1692   test $ac_status = 0; } && {
1693          test -z "$ac_c_werror_flag" ||
1694          test ! -s conftest.err
1695        } && test -s conftest$ac_exeext && {
1696          test "$cross_compiling" = yes ||
1697          test -x conftest$ac_exeext
1698        }; then :
1699   ac_retval=0
1700 else
1701   $as_echo "$as_me: failed program was:" >&5
1702 sed 's/^/| /' conftest.$ac_ext >&5
1703
1704         ac_retval=1
1705 fi
1706   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1707   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1708   # interfere with the next link command; also delete a directory that is
1709   # left behind by Apple's compiler.  We do this before executing the actions.
1710   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1711   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1712   as_fn_set_status $ac_retval
1713
1714 } # ac_fn_c_try_link
1715
1716 # ac_fn_c_try_cpp LINENO
1717 # ----------------------
1718 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1719 ac_fn_c_try_cpp ()
1720 {
1721   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1722   if { { ac_try="$ac_cpp conftest.$ac_ext"
1723 case "(($ac_try" in
1724   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1725   *) ac_try_echo=$ac_try;;
1726 esac
1727 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1728 $as_echo "$ac_try_echo"; } >&5
1729   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1730   ac_status=$?
1731   if test -s conftest.err; then
1732     grep -v '^ *+' conftest.err >conftest.er1
1733     cat conftest.er1 >&5
1734     mv -f conftest.er1 conftest.err
1735   fi
1736   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1737   test $ac_status = 0; } > conftest.i && {
1738          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1739          test ! -s conftest.err
1740        }; then :
1741   ac_retval=0
1742 else
1743   $as_echo "$as_me: failed program was:" >&5
1744 sed 's/^/| /' conftest.$ac_ext >&5
1745
1746     ac_retval=1
1747 fi
1748   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1749   as_fn_set_status $ac_retval
1750
1751 } # ac_fn_c_try_cpp
1752
1753 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1754 # -------------------------------------------------------
1755 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1756 # the include files in INCLUDES and setting the cache variable VAR
1757 # accordingly.
1758 ac_fn_c_check_header_mongrel ()
1759 {
1760   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1761   if eval \${$3+:} false; then :
1762   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1763 $as_echo_n "checking for $2... " >&6; }
1764 if eval \${$3+:} false; then :
1765   $as_echo_n "(cached) " >&6
1766 fi
1767 eval ac_res=\$$3
1768                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1769 $as_echo "$ac_res" >&6; }
1770 else
1771   # Is the header compilable?
1772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1773 $as_echo_n "checking $2 usability... " >&6; }
1774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1775 /* end confdefs.h.  */
1776 $4
1777 #include <$2>
1778 _ACEOF
1779 if ac_fn_c_try_compile "$LINENO"; then :
1780   ac_header_compiler=yes
1781 else
1782   ac_header_compiler=no
1783 fi
1784 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1786 $as_echo "$ac_header_compiler" >&6; }
1787
1788 # Is the header present?
1789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1790 $as_echo_n "checking $2 presence... " >&6; }
1791 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1792 /* end confdefs.h.  */
1793 #include <$2>
1794 _ACEOF
1795 if ac_fn_c_try_cpp "$LINENO"; then :
1796   ac_header_preproc=yes
1797 else
1798   ac_header_preproc=no
1799 fi
1800 rm -f conftest.err conftest.i conftest.$ac_ext
1801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1802 $as_echo "$ac_header_preproc" >&6; }
1803
1804 # So?  What about this header?
1805 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1806   yes:no: )
1807     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1808 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1809     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1810 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1811     ;;
1812   no:yes:* )
1813     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1814 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1815     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1816 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1817     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1818 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1819     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1820 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1821     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1822 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1823 ( $as_echo "## ---------------------------------------- ##
1824 ## Report this to pgsql-bugs@postgresql.org ##
1825 ## ---------------------------------------- ##"
1826      ) | sed "s/^/$as_me: WARNING:     /" >&2
1827     ;;
1828 esac
1829   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1830 $as_echo_n "checking for $2... " >&6; }
1831 if eval \${$3+:} false; then :
1832   $as_echo_n "(cached) " >&6
1833 else
1834   eval "$3=\$ac_header_compiler"
1835 fi
1836 eval ac_res=\$$3
1837                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1838 $as_echo "$ac_res" >&6; }
1839 fi
1840   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1841
1842 } # ac_fn_c_check_header_mongrel
1843
1844 # ac_fn_c_try_run LINENO
1845 # ----------------------
1846 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1847 # that executables *can* be run.
1848 ac_fn_c_try_run ()
1849 {
1850   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1851   if { { ac_try="$ac_link"
1852 case "(($ac_try" in
1853   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1854   *) ac_try_echo=$ac_try;;
1855 esac
1856 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1857 $as_echo "$ac_try_echo"; } >&5
1858   (eval "$ac_link") 2>&5
1859   ac_status=$?
1860   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1861   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1862   { { case "(($ac_try" in
1863   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1864   *) ac_try_echo=$ac_try;;
1865 esac
1866 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1867 $as_echo "$ac_try_echo"; } >&5
1868   (eval "$ac_try") 2>&5
1869   ac_status=$?
1870   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1871   test $ac_status = 0; }; }; then :
1872   ac_retval=0
1873 else
1874   $as_echo "$as_me: program exited with status $ac_status" >&5
1875        $as_echo "$as_me: failed program was:" >&5
1876 sed 's/^/| /' conftest.$ac_ext >&5
1877
1878        ac_retval=$ac_status
1879 fi
1880   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1881   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1882   as_fn_set_status $ac_retval
1883
1884 } # ac_fn_c_try_run
1885
1886 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1887 # -------------------------------------------------------
1888 # Tests whether HEADER exists and can be compiled using the include files in
1889 # INCLUDES, setting the cache variable VAR accordingly.
1890 ac_fn_c_check_header_compile ()
1891 {
1892   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1893   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1894 $as_echo_n "checking for $2... " >&6; }
1895 if eval \${$3+:} false; then :
1896   $as_echo_n "(cached) " >&6
1897 else
1898   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1899 /* end confdefs.h.  */
1900 $4
1901 #include <$2>
1902 _ACEOF
1903 if ac_fn_c_try_compile "$LINENO"; then :
1904   eval "$3=yes"
1905 else
1906   eval "$3=no"
1907 fi
1908 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1909 fi
1910 eval ac_res=\$$3
1911                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1912 $as_echo "$ac_res" >&6; }
1913   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1914
1915 } # ac_fn_c_check_header_compile
1916
1917 # ac_fn_c_check_func LINENO FUNC VAR
1918 # ----------------------------------
1919 # Tests whether FUNC exists, setting the cache variable VAR accordingly
1920 ac_fn_c_check_func ()
1921 {
1922   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1923   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1924 $as_echo_n "checking for $2... " >&6; }
1925 if eval \${$3+:} false; then :
1926   $as_echo_n "(cached) " >&6
1927 else
1928   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1929 /* end confdefs.h.  */
1930 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1931    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
1932 #define $2 innocuous_$2
1933
1934 /* System header to define __stub macros and hopefully few prototypes,
1935     which can conflict with char $2 (); below.
1936     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1937     <limits.h> exists even on freestanding compilers.  */
1938
1939 #ifdef __STDC__
1940 # include <limits.h>
1941 #else
1942 # include <assert.h>
1943 #endif
1944
1945 #undef $2
1946
1947 /* Override any GCC internal prototype to avoid an error.
1948    Use char because int might match the return type of a GCC
1949    builtin and then its argument prototype would still apply.  */
1950 #ifdef __cplusplus
1951 extern "C"
1952 #endif
1953 char $2 ();
1954 /* The GNU C library defines this for functions which it implements
1955     to always fail with ENOSYS.  Some functions are actually named
1956     something starting with __ and the normal name is an alias.  */
1957 #if defined __stub_$2 || defined __stub___$2
1958 choke me
1959 #endif
1960
1961 int
1962 main ()
1963 {
1964 return $2 ();
1965   ;
1966   return 0;
1967 }
1968 _ACEOF
1969 if ac_fn_c_try_link "$LINENO"; then :
1970   eval "$3=yes"
1971 else
1972   eval "$3=no"
1973 fi
1974 rm -f core conftest.err conftest.$ac_objext \
1975     conftest$ac_exeext conftest.$ac_ext
1976 fi
1977 eval ac_res=\$$3
1978                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1979 $as_echo "$ac_res" >&6; }
1980   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1981
1982 } # ac_fn_c_check_func
1983
1984 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
1985 # ----------------------------------------------------
1986 # Tries to find if the field MEMBER exists in type AGGR, after including
1987 # INCLUDES, setting cache variable VAR accordingly.
1988 ac_fn_c_check_member ()
1989 {
1990   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1991   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
1992 $as_echo_n "checking for $2.$3... " >&6; }
1993 if eval \${$4+:} false; then :
1994   $as_echo_n "(cached) " >&6
1995 else
1996   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1997 /* end confdefs.h.  */
1998 $5
1999 int
2000 main ()
2001 {
2002 static $2 ac_aggr;
2003 if (ac_aggr.$3)
2004 return 0;
2005   ;
2006   return 0;
2007 }
2008 _ACEOF
2009 if ac_fn_c_try_compile "$LINENO"; then :
2010   eval "$4=yes"
2011 else
2012   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2013 /* end confdefs.h.  */
2014 $5
2015 int
2016 main ()
2017 {
2018 static $2 ac_aggr;
2019 if (sizeof ac_aggr.$3)
2020 return 0;
2021   ;
2022   return 0;
2023 }
2024 _ACEOF
2025 if ac_fn_c_try_compile "$LINENO"; then :
2026   eval "$4=yes"
2027 else
2028   eval "$4=no"
2029 fi
2030 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2031 fi
2032 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2033 fi
2034 eval ac_res=\$$4
2035                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2036 $as_echo "$ac_res" >&6; }
2037   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2038
2039 } # ac_fn_c_check_member
2040
2041 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2042 # -------------------------------------------
2043 # Tests whether TYPE exists after having included INCLUDES, setting cache
2044 # variable VAR accordingly.
2045 ac_fn_c_check_type ()
2046 {
2047   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2048   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2049 $as_echo_n "checking for $2... " >&6; }
2050 if eval \${$3+:} false; then :
2051   $as_echo_n "(cached) " >&6
2052 else
2053   eval "$3=no"
2054   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2055 /* end confdefs.h.  */
2056 $4
2057 int
2058 main ()
2059 {
2060 if (sizeof ($2))
2061          return 0;
2062   ;
2063   return 0;
2064 }
2065 _ACEOF
2066 if ac_fn_c_try_compile "$LINENO"; then :
2067   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2068 /* end confdefs.h.  */
2069 $4
2070 int
2071 main ()
2072 {
2073 if (sizeof (($2)))
2074             return 0;
2075   ;
2076   return 0;
2077 }
2078 _ACEOF
2079 if ac_fn_c_try_compile "$LINENO"; then :
2080
2081 else
2082   eval "$3=yes"
2083 fi
2084 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2085 fi
2086 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2087 fi
2088 eval ac_res=\$$3
2089                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2090 $as_echo "$ac_res" >&6; }
2091   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2092
2093 } # ac_fn_c_check_type
2094
2095 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2096 # --------------------------------------------
2097 # Tries to find the compile-time value of EXPR in a program that includes
2098 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2099 # computed
2100 ac_fn_c_compute_int ()
2101 {
2102   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2103   if test "$cross_compiling" = yes; then
2104     # Depending upon the size, compute the lo and hi bounds.
2105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2106 /* end confdefs.h.  */
2107 $4
2108 int
2109 main ()
2110 {
2111 static int test_array [1 - 2 * !(($2) >= 0)];
2112 test_array [0] = 0;
2113 return test_array [0];
2114
2115   ;
2116   return 0;
2117 }
2118 _ACEOF
2119 if ac_fn_c_try_compile "$LINENO"; then :
2120   ac_lo=0 ac_mid=0
2121   while :; do
2122     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2123 /* end confdefs.h.  */
2124 $4
2125 int
2126 main ()
2127 {
2128 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2129 test_array [0] = 0;
2130 return test_array [0];
2131
2132   ;
2133   return 0;
2134 }
2135 _ACEOF
2136 if ac_fn_c_try_compile "$LINENO"; then :
2137   ac_hi=$ac_mid; break
2138 else
2139   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2140                         if test $ac_lo -le $ac_mid; then
2141                           ac_lo= ac_hi=
2142                           break
2143                         fi
2144                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2145 fi
2146 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2147   done
2148 else
2149   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2150 /* end confdefs.h.  */
2151 $4
2152 int
2153 main ()
2154 {
2155 static int test_array [1 - 2 * !(($2) < 0)];
2156 test_array [0] = 0;
2157 return test_array [0];
2158
2159   ;
2160   return 0;
2161 }
2162 _ACEOF
2163 if ac_fn_c_try_compile "$LINENO"; then :
2164   ac_hi=-1 ac_mid=-1
2165   while :; do
2166     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2167 /* end confdefs.h.  */
2168 $4
2169 int
2170 main ()
2171 {
2172 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2173 test_array [0] = 0;
2174 return test_array [0];
2175
2176   ;
2177   return 0;
2178 }
2179 _ACEOF
2180 if ac_fn_c_try_compile "$LINENO"; then :
2181   ac_lo=$ac_mid; break
2182 else
2183   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2184                         if test $ac_mid -le $ac_hi; then
2185                           ac_lo= ac_hi=
2186                           break
2187                         fi
2188                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2189 fi
2190 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2191   done
2192 else
2193   ac_lo= ac_hi=
2194 fi
2195 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2196 fi
2197 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2198 # Binary search between lo and hi bounds.
2199 while test "x$ac_lo" != "x$ac_hi"; do
2200   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2201   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2202 /* end confdefs.h.  */
2203 $4
2204 int
2205 main ()
2206 {
2207 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2208 test_array [0] = 0;
2209 return test_array [0];
2210
2211   ;
2212   return 0;
2213 }
2214 _ACEOF
2215 if ac_fn_c_try_compile "$LINENO"; then :
2216   ac_hi=$ac_mid
2217 else
2218   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2219 fi
2220 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2221 done
2222 case $ac_lo in #((
2223 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2224 '') ac_retval=1 ;;
2225 esac
2226   else
2227     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2228 /* end confdefs.h.  */
2229 $4
2230 static long int longval () { return $2; }
2231 static unsigned long int ulongval () { return $2; }
2232 #include <stdio.h>
2233 #include <stdlib.h>
2234 int
2235 main ()
2236 {
2237
2238   FILE *f = fopen ("conftest.val", "w");
2239   if (! f)
2240     return 1;
2241   if (($2) < 0)
2242     {
2243       long int i = longval ();
2244       if (i != ($2))
2245         return 1;
2246       fprintf (f, "%ld", i);
2247     }
2248   else
2249     {
2250       unsigned long int i = ulongval ();
2251       if (i != ($2))
2252         return 1;
2253       fprintf (f, "%lu", i);
2254     }
2255   /* Do not output a trailing newline, as this causes \r\n confusion
2256      on some platforms.  */
2257   return ferror (f) || fclose (f) != 0;
2258
2259   ;
2260   return 0;
2261 }
2262 _ACEOF
2263 if ac_fn_c_try_run "$LINENO"; then :
2264   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2265 else
2266   ac_retval=1
2267 fi
2268 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2269   conftest.$ac_objext conftest.beam conftest.$ac_ext
2270 rm -f conftest.val
2271
2272   fi
2273   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2274   as_fn_set_status $ac_retval
2275
2276 } # ac_fn_c_compute_int
2277
2278 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2279 # ---------------------------------------------
2280 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2281 # accordingly.
2282 ac_fn_c_check_decl ()
2283 {
2284   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2285   as_decl_name=`echo $2|sed 's/ *(.*//'`
2286   as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2287   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2288 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2289 if eval \${$3+:} false; then :
2290   $as_echo_n "(cached) " >&6
2291 else
2292   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2293 /* end confdefs.h.  */
2294 $4
2295 int
2296 main ()
2297 {
2298 #ifndef $as_decl_name
2299 #ifdef __cplusplus
2300   (void) $as_decl_use;
2301 #else
2302   (void) $as_decl_name;
2303 #endif
2304 #endif
2305
2306   ;
2307   return 0;
2308 }
2309 _ACEOF
2310 if ac_fn_c_try_compile "$LINENO"; then :
2311   eval "$3=yes"
2312 else
2313   eval "$3=no"
2314 fi
2315 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2316 fi
2317 eval ac_res=\$$3
2318                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2319 $as_echo "$ac_res" >&6; }
2320   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2321
2322 } # ac_fn_c_check_decl
2323 cat >config.log <<_ACEOF
2324 This file contains any messages produced by compilers while
2325 running configure, to aid debugging if configure makes a mistake.
2326
2327 It was created by PostgreSQL $as_me 9.6devel, which was
2328 generated by GNU Autoconf 2.69.  Invocation command line was
2329
2330   $ $0 $@
2331
2332 _ACEOF
2333 exec 5>>config.log
2334 {
2335 cat <<_ASUNAME
2336 ## --------- ##
2337 ## Platform. ##
2338 ## --------- ##
2339
2340 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2341 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2342 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2343 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2344 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2345
2346 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2347 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2348
2349 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2350 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2351 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2352 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2353 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2354 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2355 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2356
2357 _ASUNAME
2358
2359 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2360 for as_dir in $PATH
2361 do
2362   IFS=$as_save_IFS
2363   test -z "$as_dir" && as_dir=.
2364     $as_echo "PATH: $as_dir"
2365   done
2366 IFS=$as_save_IFS
2367
2368 } >&5
2369
2370 cat >&5 <<_ACEOF
2371
2372
2373 ## ----------- ##
2374 ## Core tests. ##
2375 ## ----------- ##
2376
2377 _ACEOF
2378
2379
2380 # Keep a trace of the command line.
2381 # Strip out --no-create and --no-recursion so they do not pile up.
2382 # Strip out --silent because we don't want to record it for future runs.
2383 # Also quote any args containing shell meta-characters.
2384 # Make two passes to allow for proper duplicate-argument suppression.
2385 ac_configure_args=
2386 ac_configure_args0=
2387 ac_configure_args1=
2388 ac_must_keep_next=false
2389 for ac_pass in 1 2
2390 do
2391   for ac_arg
2392   do
2393     case $ac_arg in
2394     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2395     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2396     | -silent | --silent | --silen | --sile | --sil)
2397       continue ;;
2398     *\'*)
2399       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2400     esac
2401     case $ac_pass in
2402     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2403     2)
2404       as_fn_append ac_configure_args1 " '$ac_arg'"
2405       if test $ac_must_keep_next = true; then
2406         ac_must_keep_next=false # Got value, back to normal.
2407       else
2408         case $ac_arg in
2409           *=* | --config-cache | -C | -disable-* | --disable-* \
2410           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2411           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2412           | -with-* | --with-* | -without-* | --without-* | --x)
2413             case "$ac_configure_args0 " in
2414               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2415             esac
2416             ;;
2417           -* ) ac_must_keep_next=true ;;
2418         esac
2419       fi
2420       as_fn_append ac_configure_args " '$ac_arg'"
2421       ;;
2422     esac
2423   done
2424 done
2425 { ac_configure_args0=; unset ac_configure_args0;}
2426 { ac_configure_args1=; unset ac_configure_args1;}
2427
2428 # When interrupted or exit'd, cleanup temporary files, and complete
2429 # config.log.  We remove comments because anyway the quotes in there
2430 # would cause problems or look ugly.
2431 # WARNING: Use '\'' to represent an apostrophe within the trap.
2432 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2433 trap 'exit_status=$?
2434   # Save into config.log some information that might help in debugging.
2435   {
2436     echo
2437
2438     $as_echo "## ---------------- ##
2439 ## Cache variables. ##
2440 ## ---------------- ##"
2441     echo
2442     # The following way of writing the cache mishandles newlines in values,
2443 (
2444   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2445     eval ac_val=\$$ac_var
2446     case $ac_val in #(
2447     *${as_nl}*)
2448       case $ac_var in #(
2449       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2450 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2451       esac
2452       case $ac_var in #(
2453       _ | IFS | as_nl) ;; #(
2454       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2455       *) { eval $ac_var=; unset $ac_var;} ;;
2456       esac ;;
2457     esac
2458   done
2459   (set) 2>&1 |
2460     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2461     *${as_nl}ac_space=\ *)
2462       sed -n \
2463         "s/'\''/'\''\\\\'\'''\''/g;
2464           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2465       ;; #(
2466     *)
2467       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2468       ;;
2469     esac |
2470     sort
2471 )
2472     echo
2473
2474     $as_echo "## ----------------- ##
2475 ## Output variables. ##
2476 ## ----------------- ##"
2477     echo
2478     for ac_var in $ac_subst_vars
2479     do
2480       eval ac_val=\$$ac_var
2481       case $ac_val in
2482       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2483       esac
2484       $as_echo "$ac_var='\''$ac_val'\''"
2485     done | sort
2486     echo
2487
2488     if test -n "$ac_subst_files"; then
2489       $as_echo "## ------------------- ##
2490 ## File substitutions. ##
2491 ## ------------------- ##"
2492       echo
2493       for ac_var in $ac_subst_files
2494       do
2495         eval ac_val=\$$ac_var
2496         case $ac_val in
2497         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2498         esac
2499         $as_echo "$ac_var='\''$ac_val'\''"
2500       done | sort
2501       echo
2502     fi
2503
2504     if test -s confdefs.h; then
2505       $as_echo "## ----------- ##
2506 ## confdefs.h. ##
2507 ## ----------- ##"
2508       echo
2509       cat confdefs.h
2510       echo
2511     fi
2512     test "$ac_signal" != 0 &&
2513       $as_echo "$as_me: caught signal $ac_signal"
2514     $as_echo "$as_me: exit $exit_status"
2515   } >&5
2516   rm -f core *.core core.conftest.* &&
2517     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2518     exit $exit_status
2519 ' 0
2520 for ac_signal in 1 2 13 15; do
2521   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2522 done
2523 ac_signal=0
2524
2525 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2526 rm -f -r conftest* confdefs.h
2527
2528 $as_echo "/* confdefs.h */" > confdefs.h
2529
2530 # Predefined preprocessor variables.
2531
2532 cat >>confdefs.h <<_ACEOF
2533 #define PACKAGE_NAME "$PACKAGE_NAME"
2534 _ACEOF
2535
2536 cat >>confdefs.h <<_ACEOF
2537 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2538 _ACEOF
2539
2540 cat >>confdefs.h <<_ACEOF
2541 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2542 _ACEOF
2543
2544 cat >>confdefs.h <<_ACEOF
2545 #define PACKAGE_STRING "$PACKAGE_STRING"
2546 _ACEOF
2547
2548 cat >>confdefs.h <<_ACEOF
2549 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2550 _ACEOF
2551
2552 cat >>confdefs.h <<_ACEOF
2553 #define PACKAGE_URL "$PACKAGE_URL"
2554 _ACEOF
2555
2556
2557 # Let the site file select an alternate cache file if it wants to.
2558 # Prefer an explicitly selected file to automatically selected ones.
2559 ac_site_file1=NONE
2560 ac_site_file2=NONE
2561 if test -n "$CONFIG_SITE"; then
2562   # We do not want a PATH search for config.site.
2563   case $CONFIG_SITE in #((
2564     -*)  ac_site_file1=./$CONFIG_SITE;;
2565     */*) ac_site_file1=$CONFIG_SITE;;
2566     *)   ac_site_file1=./$CONFIG_SITE;;
2567   esac
2568 elif test "x$prefix" != xNONE; then
2569   ac_site_file1=$prefix/share/config.site
2570   ac_site_file2=$prefix/etc/config.site
2571 else
2572   ac_site_file1=$ac_default_prefix/share/config.site
2573   ac_site_file2=$ac_default_prefix/etc/config.site
2574 fi
2575 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2576 do
2577   test "x$ac_site_file" = xNONE && continue
2578   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2579     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2580 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2581     sed 's/^/| /' "$ac_site_file" >&5
2582     . "$ac_site_file" \
2583       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2584 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2585 as_fn_error $? "failed to load site script $ac_site_file
2586 See \`config.log' for more details" "$LINENO" 5; }
2587   fi
2588 done
2589
2590 if test -r "$cache_file"; then
2591   # Some versions of bash will fail to source /dev/null (special files
2592   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2593   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2594     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2595 $as_echo "$as_me: loading cache $cache_file" >&6;}
2596     case $cache_file in
2597       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2598       *)                      . "./$cache_file";;
2599     esac
2600   fi
2601 else
2602   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2603 $as_echo "$as_me: creating cache $cache_file" >&6;}
2604   >$cache_file
2605 fi
2606
2607 # Check that the precious variables saved in the cache have kept the same
2608 # value.
2609 ac_cache_corrupted=false
2610 for ac_var in $ac_precious_vars; do
2611   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2612   eval ac_new_set=\$ac_env_${ac_var}_set
2613   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2614   eval ac_new_val=\$ac_env_${ac_var}_value
2615   case $ac_old_set,$ac_new_set in
2616     set,)
2617       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2618 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2619       ac_cache_corrupted=: ;;
2620     ,set)
2621       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2622 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2623       ac_cache_corrupted=: ;;
2624     ,);;
2625     *)
2626       if test "x$ac_old_val" != "x$ac_new_val"; then
2627         # differences in whitespace do not lead to failure.
2628         ac_old_val_w=`echo x $ac_old_val`
2629         ac_new_val_w=`echo x $ac_new_val`
2630         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2631           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2632 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2633           ac_cache_corrupted=:
2634         else
2635           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2636 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2637           eval $ac_var=\$ac_old_val
2638         fi
2639         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2640 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2641         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2642 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2643       fi;;
2644   esac
2645   # Pass precious variables to config.status.
2646   if test "$ac_new_set" = set; then
2647     case $ac_new_val in
2648     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2649     *) ac_arg=$ac_var=$ac_new_val ;;
2650     esac
2651     case " $ac_configure_args " in
2652       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2653       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2654     esac
2655   fi
2656 done
2657 if $ac_cache_corrupted; then
2658   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2659 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2660   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2661 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2662   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2663 fi
2664 ## -------------------- ##
2665 ## Main body of script. ##
2666 ## -------------------- ##
2667
2668 ac_ext=c
2669 ac_cpp='$CPP $CPPFLAGS'
2670 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2671 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2672 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2673
2674
2675
2676
2677
2678
2679 ac_aux_dir=
2680 for ac_dir in config "$srcdir"/config; do
2681   if test -f "$ac_dir/install-sh"; then
2682     ac_aux_dir=$ac_dir
2683     ac_install_sh="$ac_aux_dir/install-sh -c"
2684     break
2685   elif test -f "$ac_dir/install.sh"; then
2686     ac_aux_dir=$ac_dir
2687     ac_install_sh="$ac_aux_dir/install.sh -c"
2688     break
2689   elif test -f "$ac_dir/shtool"; then
2690     ac_aux_dir=$ac_dir
2691     ac_install_sh="$ac_aux_dir/shtool install -c"
2692     break
2693   fi
2694 done
2695 if test -z "$ac_aux_dir"; then
2696   as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5
2697 fi
2698
2699 # These three variables are undocumented and unsupported,
2700 # and are intended to be withdrawn in a future Autoconf release.
2701 # They can cause serious problems if a builder's source tree is in a directory
2702 # whose full name contains unusual characters.
2703 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2704 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2705 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2706
2707
2708
2709 configure_args=$ac_configure_args
2710
2711
2712 PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\.[0-9][0-9]*\)'`
2713
2714
2715 cat >>confdefs.h <<_ACEOF
2716 #define PG_MAJORVERSION "$PG_MAJORVERSION"
2717 _ACEOF
2718
2719
2720
2721
2722
2723 # Check whether --with-extra-version was given.
2724 if test "${with_extra_version+set}" = set; then :
2725   withval=$with_extra_version;
2726   case $withval in
2727     yes)
2728       as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2729       ;;
2730     no)
2731       as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2732       ;;
2733     *)
2734       PG_VERSION="$PACKAGE_VERSION$withval"
2735       ;;
2736   esac
2737
2738 else
2739   PG_VERSION="$PACKAGE_VERSION"
2740 fi
2741
2742
2743
2744 cat >>confdefs.h <<_ACEOF
2745 #define PG_VERSION "$PG_VERSION"
2746 _ACEOF
2747
2748
2749 # Make sure we can run config.sub.
2750 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2751   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2752
2753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2754 $as_echo_n "checking build system type... " >&6; }
2755 if ${ac_cv_build+:} false; then :
2756   $as_echo_n "(cached) " >&6
2757 else
2758   ac_build_alias=$build_alias
2759 test "x$ac_build_alias" = x &&
2760   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2761 test "x$ac_build_alias" = x &&
2762   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2763 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2764   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2765
2766 fi
2767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2768 $as_echo "$ac_cv_build" >&6; }
2769 case $ac_cv_build in
2770 *-*-*) ;;
2771 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2772 esac
2773 build=$ac_cv_build
2774 ac_save_IFS=$IFS; IFS='-'
2775 set x $ac_cv_build
2776 shift
2777 build_cpu=$1
2778 build_vendor=$2
2779 shift; shift
2780 # Remember, the first character of IFS is used to create $*,
2781 # except with old shells:
2782 build_os=$*
2783 IFS=$ac_save_IFS
2784 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2785
2786
2787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2788 $as_echo_n "checking host system type... " >&6; }
2789 if ${ac_cv_host+:} false; then :
2790   $as_echo_n "(cached) " >&6
2791 else
2792   if test "x$host_alias" = x; then
2793   ac_cv_host=$ac_cv_build
2794 else
2795   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2796     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2797 fi
2798
2799 fi
2800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2801 $as_echo "$ac_cv_host" >&6; }
2802 case $ac_cv_host in
2803 *-*-*) ;;
2804 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2805 esac
2806 host=$ac_cv_host
2807 ac_save_IFS=$IFS; IFS='-'
2808 set x $ac_cv_host
2809 shift
2810 host_cpu=$1
2811 host_vendor=$2
2812 shift; shift
2813 # Remember, the first character of IFS is used to create $*,
2814 # except with old shells:
2815 host_os=$*
2816 IFS=$ac_save_IFS
2817 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2818
2819
2820
2821 template=
2822 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which template to use" >&5
2823 $as_echo_n "checking which template to use... " >&6; }
2824
2825
2826
2827
2828 # Check whether --with-template was given.
2829 if test "${with_template+set}" = set; then :
2830   withval=$with_template;
2831   case $withval in
2832     yes)
2833       as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2834       ;;
2835     no)
2836       as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2837       ;;
2838     *)
2839
2840   case $withval in
2841     list)   echo; ls "$srcdir/src/template"; exit;;
2842     *)      if test -f "$srcdir/src/template/$with_template" ; then
2843               template=$withval
2844             else
2845               as_fn_error $? "'$withval' is not a valid template name. Use 'list' for a list." "$LINENO" 5
2846             fi;;
2847   esac
2848
2849       ;;
2850   esac
2851
2852 else
2853
2854 # --with-template not given
2855
2856 case $host_os in
2857      aix*) template=aix ;;
2858   cygwin*) template=cygwin ;;
2859   darwin*) template=darwin ;;
2860 dragonfly*) template=netbsd ;;
2861  freebsd*) template=freebsd ;;
2862     hpux*) template=hpux ;;
2863  linux*|gnu*|k*bsd*-gnu)
2864            template=linux ;;
2865    mingw*) template=win32 ;;
2866   netbsd*) template=netbsd ;;
2867  openbsd*) template=openbsd ;;
2868      sco*) template=sco ;;
2869  solaris*) template=solaris ;;
2870    sysv5*) template=unixware ;;
2871 esac
2872
2873   if test x"$template" = x"" ; then
2874     as_fn_error $? "
2875 *******************************************************************
2876 PostgreSQL has apparently not been ported to your platform yet.
2877 To try a manual configuration, look into the src/template directory
2878 for a similar platform and use the '--with-template=' option.
2879
2880 Please also contact <pgsql-bugs@postgresql.org> to see about
2881 rectifying this.  Include the above 'checking host system type...'
2882 line.
2883 *******************************************************************
2884 " "$LINENO" 5
2885   fi
2886
2887
2888 fi
2889
2890
2891
2892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $template" >&5
2893 $as_echo "$template" >&6; }
2894
2895 PORTNAME=$template
2896
2897
2898 # Initialize default assumption that we do not need separate assembly code
2899 # for TAS (test-and-set).  This can be overridden by the template file
2900 # when it's executed.
2901 need_tas=no
2902 tas_file=dummy.s
2903
2904
2905
2906 ##
2907 ## Command line options
2908 ##
2909
2910 #
2911 # Add non-standard directories to the include path
2912 #
2913
2914
2915
2916 # Check whether --with-includes was given.
2917 if test "${with_includes+set}" = set; then :
2918   withval=$with_includes;
2919   case $withval in
2920     yes)
2921       as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
2922       ;;
2923     no)
2924       as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
2925       ;;
2926     *)
2927
2928       ;;
2929   esac
2930
2931 fi
2932
2933
2934
2935
2936 #
2937 # Add non-standard directories to the library search path
2938 #
2939
2940
2941
2942 # Check whether --with-libraries was given.
2943 if test "${with_libraries+set}" = set; then :
2944   withval=$with_libraries;
2945   case $withval in
2946     yes)
2947       as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
2948       ;;
2949     no)
2950       as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
2951       ;;
2952     *)
2953       LIBRARY_DIRS=$withval
2954       ;;
2955   esac
2956
2957 fi
2958
2959
2960
2961
2962
2963
2964 # Check whether --with-libs was given.
2965 if test "${with_libs+set}" = set; then :
2966   withval=$with_libs;
2967   case $withval in
2968     yes)
2969       as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
2970       ;;
2971     no)
2972       as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
2973       ;;
2974     *)
2975       LIBRARY_DIRS=$withval
2976       ;;
2977   esac
2978
2979 fi
2980
2981
2982
2983
2984 #
2985 # 64-bit integer date/time storage: enabled by default.
2986 #
2987 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with 64-bit integer date/time support" >&5
2988 $as_echo_n "checking whether to build with 64-bit integer date/time support... " >&6; }
2989
2990
2991 # Check whether --enable-integer-datetimes was given.
2992 if test "${enable_integer_datetimes+set}" = set; then :
2993   enableval=$enable_integer_datetimes;
2994   case $enableval in
2995     yes)
2996
2997 $as_echo "#define USE_INTEGER_DATETIMES 1" >>confdefs.h
2998
2999       ;;
3000     no)
3001       :
3002       ;;
3003     *)
3004       as_fn_error $? "no argument expected for --enable-integer-datetimes option" "$LINENO" 5
3005       ;;
3006   esac
3007
3008 else
3009   enable_integer_datetimes=yes
3010
3011 $as_echo "#define USE_INTEGER_DATETIMES 1" >>confdefs.h
3012
3013 fi
3014
3015
3016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_integer_datetimes" >&5
3017 $as_echo "$enable_integer_datetimes" >&6; }
3018
3019
3020 #
3021 # NLS
3022 #
3023 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is wanted" >&5
3024 $as_echo_n "checking whether NLS is wanted... " >&6; }
3025
3026
3027 # Check whether --enable-nls was given.
3028 if test "${enable_nls+set}" = set; then :
3029   enableval=$enable_nls;
3030   case $enableval in
3031     yes)
3032       :
3033       ;;
3034     no)
3035       :
3036       ;;
3037     *)
3038       enable_nls=yes
3039 WANTED_LANGUAGES=$enableval
3040       ;;
3041   esac
3042
3043 else
3044   enable_nls=no
3045 fi
3046
3047
3048
3049 if test "$enable_nls" = yes; then
3050
3051 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
3052
3053 fi
3054
3055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_nls" >&5
3056 $as_echo "$enable_nls" >&6; }
3057
3058
3059
3060 #
3061 # Default port number (--with-pgport), default 5432
3062 #
3063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default port number" >&5
3064 $as_echo_n "checking for default port number... " >&6; }
3065
3066
3067
3068 # Check whether --with-pgport was given.
3069 if test "${with_pgport+set}" = set; then :
3070   withval=$with_pgport;
3071   case $withval in
3072     yes)
3073       as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3074       ;;
3075     no)
3076       as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3077       ;;
3078     *)
3079       default_port=$withval
3080       ;;
3081   esac
3082
3083 else
3084   default_port=5432
3085 fi
3086
3087
3088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_port" >&5
3089 $as_echo "$default_port" >&6; }
3090 # Need both of these because some places want an integer and some a string
3091
3092 cat >>confdefs.h <<_ACEOF
3093 #define DEF_PGPORT ${default_port}
3094 _ACEOF
3095
3096
3097 cat >>confdefs.h <<_ACEOF
3098 #define DEF_PGPORT_STR "${default_port}"
3099 _ACEOF
3100
3101
3102
3103 # It's worth validating port; you can get very confusing errors otherwise
3104 if test x"$default_port" = x""; then
3105   as_fn_error $? "invalid --with-pgport specification: empty string" "$LINENO" 5
3106 elif test ! x`echo "$default_port" | sed -e 's/[0-9]*//'` = x""; then
3107   as_fn_error $? "invalid --with-pgport specification: must be a number" "$LINENO" 5
3108 elif test ! x`echo "$default_port" | sed -e 's/^0.//'` = x"$default_port"; then
3109   as_fn_error $? "invalid --with-pgport specification: must not have leading 0" "$LINENO" 5
3110 elif test "$default_port" -lt "1" -o "$default_port" -gt "65535"; then
3111   as_fn_error $? "invalid --with-pgport specification: must be between 1 and 65535" "$LINENO" 5
3112 fi
3113
3114 #
3115 # '-rpath'-like feature can be disabled
3116 #
3117
3118
3119 # Check whether --enable-rpath was given.
3120 if test "${enable_rpath+set}" = set; then :
3121   enableval=$enable_rpath;
3122   case $enableval in
3123     yes)
3124       :
3125       ;;
3126     no)
3127       :
3128       ;;
3129     *)
3130       as_fn_error $? "no argument expected for --enable-rpath option" "$LINENO" 5
3131       ;;
3132   esac
3133
3134 else
3135   enable_rpath=yes
3136
3137 fi
3138
3139
3140
3141
3142 #
3143 # Spinlocks
3144 #
3145
3146
3147 # Check whether --enable-spinlocks was given.
3148 if test "${enable_spinlocks+set}" = set; then :
3149   enableval=$enable_spinlocks;
3150   case $enableval in
3151     yes)
3152       :
3153       ;;
3154     no)
3155       :
3156       ;;
3157     *)
3158       as_fn_error $? "no argument expected for --enable-spinlocks option" "$LINENO" 5
3159       ;;
3160   esac
3161
3162 else
3163   enable_spinlocks=yes
3164
3165 fi
3166
3167
3168
3169 #
3170 # Atomic operations
3171 #
3172
3173
3174 # Check whether --enable-atomics was given.
3175 if test "${enable_atomics+set}" = set; then :
3176   enableval=$enable_atomics;
3177   case $enableval in
3178     yes)
3179       :
3180       ;;
3181     no)
3182       :
3183       ;;
3184     *)
3185       as_fn_error $? "no argument expected for --enable-atomics option" "$LINENO" 5
3186       ;;
3187   esac
3188
3189 else
3190   enable_atomics=yes
3191
3192 fi
3193
3194
3195
3196 #
3197 # --enable-debug adds -g to compiler flags
3198 #
3199
3200
3201 # Check whether --enable-debug was given.
3202 if test "${enable_debug+set}" = set; then :
3203   enableval=$enable_debug;
3204   case $enableval in
3205     yes)
3206       :
3207       ;;
3208     no)
3209       :
3210       ;;
3211     *)
3212       as_fn_error $? "no argument expected for --enable-debug option" "$LINENO" 5
3213       ;;
3214   esac
3215
3216 else
3217   enable_debug=no
3218
3219 fi
3220
3221
3222
3223
3224 #
3225 # --enable-profiling enables gcc profiling
3226 #
3227
3228
3229 # Check whether --enable-profiling was given.
3230 if test "${enable_profiling+set}" = set; then :
3231   enableval=$enable_profiling;
3232   case $enableval in
3233     yes)
3234       :
3235       ;;
3236     no)
3237       :
3238       ;;
3239     *)
3240       as_fn_error $? "no argument expected for --enable-profiling option" "$LINENO" 5
3241       ;;
3242   esac
3243
3244 else
3245   enable_profiling=no
3246
3247 fi
3248
3249
3250
3251 #
3252 # --enable-coverage enables generation of code coverage metrics with gcov
3253 #
3254
3255
3256 # Check whether --enable-coverage was given.
3257 if test "${enable_coverage+set}" = set; then :
3258   enableval=$enable_coverage;
3259   case $enableval in
3260     yes)
3261       for ac_prog in gcov
3262 do
3263   # Extract the first word of "$ac_prog", so it can be a program name with args.
3264 set dummy $ac_prog; ac_word=$2
3265 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3266 $as_echo_n "checking for $ac_word... " >&6; }
3267 if ${ac_cv_prog_GCOV+:} false; then :
3268   $as_echo_n "(cached) " >&6
3269 else
3270   if test -n "$GCOV"; then
3271   ac_cv_prog_GCOV="$GCOV" # Let the user override the test.
3272 else
3273 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3274 for as_dir in $PATH
3275 do
3276   IFS=$as_save_IFS
3277   test -z "$as_dir" && as_dir=.
3278     for ac_exec_ext in '' $ac_executable_extensions; do
3279   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3280     ac_cv_prog_GCOV="$ac_prog"
3281     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3282     break 2
3283   fi
3284 done
3285   done
3286 IFS=$as_save_IFS
3287
3288 fi
3289 fi
3290 GCOV=$ac_cv_prog_GCOV
3291 if test -n "$GCOV"; then
3292   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3293 $as_echo "$GCOV" >&6; }
3294 else
3295   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3296 $as_echo "no" >&6; }
3297 fi
3298
3299
3300   test -n "$GCOV" && break
3301 done
3302
3303 if test -z "$GCOV"; then
3304   as_fn_error $? "gcov not found" "$LINENO" 5
3305 fi
3306 for ac_prog in lcov
3307 do
3308   # Extract the first word of "$ac_prog", so it can be a program name with args.
3309 set dummy $ac_prog; ac_word=$2
3310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3311 $as_echo_n "checking for $ac_word... " >&6; }
3312 if ${ac_cv_prog_LCOV+:} false; then :
3313   $as_echo_n "(cached) " >&6
3314 else
3315   if test -n "$LCOV"; then
3316   ac_cv_prog_LCOV="$LCOV" # Let the user override the test.
3317 else
3318 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3319 for as_dir in $PATH
3320 do
3321   IFS=$as_save_IFS
3322   test -z "$as_dir" && as_dir=.
3323     for ac_exec_ext in '' $ac_executable_extensions; do
3324   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3325     ac_cv_prog_LCOV="$ac_prog"
3326     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3327     break 2
3328   fi
3329 done
3330   done
3331 IFS=$as_save_IFS
3332
3333 fi
3334 fi
3335 LCOV=$ac_cv_prog_LCOV
3336 if test -n "$LCOV"; then
3337   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3338 $as_echo "$LCOV" >&6; }
3339 else
3340   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3341 $as_echo "no" >&6; }
3342 fi
3343
3344
3345   test -n "$LCOV" && break
3346 done
3347
3348 if test -z "$LCOV"; then
3349   as_fn_error $? "lcov not found" "$LINENO" 5
3350 fi
3351 for ac_prog in genhtml
3352 do
3353   # Extract the first word of "$ac_prog", so it can be a program name with args.
3354 set dummy $ac_prog; ac_word=$2
3355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3356 $as_echo_n "checking for $ac_word... " >&6; }
3357 if ${ac_cv_prog_GENHTML+:} false; then :
3358   $as_echo_n "(cached) " >&6
3359 else
3360   if test -n "$GENHTML"; then
3361   ac_cv_prog_GENHTML="$GENHTML" # Let the user override the test.
3362 else
3363 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3364 for as_dir in $PATH
3365 do
3366   IFS=$as_save_IFS
3367   test -z "$as_dir" && as_dir=.
3368     for ac_exec_ext in '' $ac_executable_extensions; do
3369   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3370     ac_cv_prog_GENHTML="$ac_prog"
3371     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3372     break 2
3373   fi
3374 done
3375   done
3376 IFS=$as_save_IFS
3377
3378 fi
3379 fi
3380 GENHTML=$ac_cv_prog_GENHTML
3381 if test -n "$GENHTML"; then
3382   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3383 $as_echo "$GENHTML" >&6; }
3384 else
3385   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3386 $as_echo "no" >&6; }
3387 fi
3388
3389
3390   test -n "$GENHTML" && break
3391 done
3392
3393 if test -z "$GENHTML"; then
3394   as_fn_error $? "genhtml not found" "$LINENO" 5
3395 fi
3396       ;;
3397     no)
3398       :
3399       ;;
3400     *)
3401       as_fn_error $? "no argument expected for --enable-coverage option" "$LINENO" 5
3402       ;;
3403   esac
3404
3405 else
3406   enable_coverage=no
3407
3408 fi
3409
3410
3411
3412
3413 #
3414 # DTrace
3415 #
3416
3417
3418 # Check whether --enable-dtrace was given.
3419 if test "${enable_dtrace+set}" = set; then :
3420   enableval=$enable_dtrace;
3421   case $enableval in
3422     yes)
3423       for ac_prog in dtrace
3424 do
3425   # Extract the first word of "$ac_prog", so it can be a program name with args.
3426 set dummy $ac_prog; ac_word=$2
3427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3428 $as_echo_n "checking for $ac_word... " >&6; }
3429 if ${ac_cv_prog_DTRACE+:} false; then :
3430   $as_echo_n "(cached) " >&6
3431 else
3432   if test -n "$DTRACE"; then
3433   ac_cv_prog_DTRACE="$DTRACE" # Let the user override the test.
3434 else
3435 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3436 for as_dir in $PATH
3437 do
3438   IFS=$as_save_IFS
3439   test -z "$as_dir" && as_dir=.
3440     for ac_exec_ext in '' $ac_executable_extensions; do
3441   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3442     ac_cv_prog_DTRACE="$ac_prog"
3443     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3444     break 2
3445   fi
3446 done
3447   done
3448 IFS=$as_save_IFS
3449
3450 fi
3451 fi
3452 DTRACE=$ac_cv_prog_DTRACE
3453 if test -n "$DTRACE"; then
3454   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3455 $as_echo "$DTRACE" >&6; }
3456 else
3457   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3458 $as_echo "no" >&6; }
3459 fi
3460
3461
3462   test -n "$DTRACE" && break
3463 done
3464
3465 if test -z "$DTRACE"; then
3466   as_fn_error $? "dtrace not found" "$LINENO" 5
3467 fi
3468
3469       ;;
3470     no)
3471       :
3472       ;;
3473     *)
3474       as_fn_error $? "no argument expected for --enable-dtrace option" "$LINENO" 5
3475       ;;
3476   esac
3477
3478 else
3479   enable_dtrace=no
3480
3481 fi
3482
3483
3484
3485
3486 #
3487 # TAP tests
3488 #
3489
3490
3491 # Check whether --enable-tap-tests was given.
3492 if test "${enable_tap_tests+set}" = set; then :
3493   enableval=$enable_tap_tests;
3494   case $enableval in
3495     yes)
3496       :
3497       ;;
3498     no)
3499       :
3500       ;;
3501     *)
3502       as_fn_error $? "no argument expected for --enable-tap-tests option" "$LINENO" 5
3503       ;;
3504   esac
3505
3506 else
3507   enable_tap_tests=no
3508
3509 fi
3510
3511
3512
3513
3514 #
3515 # Block size
3516 #
3517 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for block size" >&5
3518 $as_echo_n "checking for block size... " >&6; }
3519
3520
3521
3522 # Check whether --with-blocksize was given.
3523 if test "${with_blocksize+set}" = set; then :
3524   withval=$with_blocksize;
3525   case $withval in
3526     yes)
3527       as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3528       ;;
3529     no)
3530       as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3531       ;;
3532     *)
3533       blocksize=$withval
3534       ;;
3535   esac
3536
3537 else
3538   blocksize=8
3539 fi
3540
3541
3542 case ${blocksize} in
3543   1) BLCKSZ=1024;;
3544   2) BLCKSZ=2048;;
3545   4) BLCKSZ=4096;;
3546   8) BLCKSZ=8192;;
3547  16) BLCKSZ=16384;;
3548  32) BLCKSZ=32768;;
3549   *) as_fn_error $? "Invalid block size. Allowed values are 1,2,4,8,16,32." "$LINENO" 5
3550 esac
3551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${blocksize}kB" >&5
3552 $as_echo "${blocksize}kB" >&6; }
3553
3554
3555 cat >>confdefs.h <<_ACEOF
3556 #define BLCKSZ ${BLCKSZ}
3557 _ACEOF
3558
3559
3560 #
3561 # Relation segment size
3562 #
3563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for segment size" >&5
3564 $as_echo_n "checking for segment size... " >&6; }
3565
3566
3567
3568 # Check whether --with-segsize was given.
3569 if test "${with_segsize+set}" = set; then :
3570   withval=$with_segsize;
3571   case $withval in
3572     yes)
3573       as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3574       ;;
3575     no)
3576       as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3577       ;;
3578     *)
3579       segsize=$withval
3580       ;;
3581   esac
3582
3583 else
3584   segsize=1
3585 fi
3586
3587
3588 # this expression is set up to avoid unnecessary integer overflow
3589 # blocksize is already guaranteed to be a factor of 1024
3590 RELSEG_SIZE=`expr '(' 1024 / ${blocksize} ')' '*' ${segsize} '*' 1024`
3591 test $? -eq 0 || exit 1
3592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${segsize}GB" >&5
3593 $as_echo "${segsize}GB" >&6; }
3594
3595
3596 cat >>confdefs.h <<_ACEOF
3597 #define RELSEG_SIZE ${RELSEG_SIZE}
3598 _ACEOF
3599
3600
3601 #
3602 # WAL block size
3603 #
3604 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAL block size" >&5
3605 $as_echo_n "checking for WAL block size... " >&6; }
3606
3607
3608
3609 # Check whether --with-wal-blocksize was given.
3610 if test "${with_wal_blocksize+set}" = set; then :
3611   withval=$with_wal_blocksize;
3612   case $withval in
3613     yes)
3614       as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3615       ;;
3616     no)
3617       as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3618       ;;
3619     *)
3620       wal_blocksize=$withval
3621       ;;
3622   esac
3623
3624 else
3625   wal_blocksize=8
3626 fi
3627
3628
3629 case ${wal_blocksize} in
3630   1) XLOG_BLCKSZ=1024;;
3631   2) XLOG_BLCKSZ=2048;;
3632   4) XLOG_BLCKSZ=4096;;
3633   8) XLOG_BLCKSZ=8192;;
3634  16) XLOG_BLCKSZ=16384;;
3635  32) XLOG_BLCKSZ=32768;;
3636  64) XLOG_BLCKSZ=65536;;
3637   *) as_fn_error $? "Invalid WAL block size. Allowed values are 1,2,4,8,16,32,64." "$LINENO" 5
3638 esac
3639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${wal_blocksize}kB" >&5
3640 $as_echo "${wal_blocksize}kB" >&6; }
3641
3642
3643 cat >>confdefs.h <<_ACEOF
3644 #define XLOG_BLCKSZ ${XLOG_BLCKSZ}
3645 _ACEOF
3646
3647
3648 #
3649 # WAL segment size
3650 #
3651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAL segment size" >&5
3652 $as_echo_n "checking for WAL segment size... " >&6; }
3653
3654
3655
3656 # Check whether --with-wal-segsize was given.
3657 if test "${with_wal_segsize+set}" = set; then :
3658   withval=$with_wal_segsize;
3659   case $withval in
3660     yes)
3661       as_fn_error $? "argument required for --with-wal-segsize option" "$LINENO" 5
3662       ;;
3663     no)
3664       as_fn_error $? "argument required for --with-wal-segsize option" "$LINENO" 5
3665       ;;
3666     *)
3667       wal_segsize=$withval
3668       ;;
3669   esac
3670
3671 else
3672   wal_segsize=16
3673 fi
3674
3675
3676 case ${wal_segsize} in
3677   1) ;;
3678   2) ;;
3679   4) ;;
3680   8) ;;
3681  16) ;;
3682  32) ;;
3683  64) ;;
3684   *) as_fn_error $? "Invalid WAL segment size. Allowed values are 1,2,4,8,16,32,64." "$LINENO" 5
3685 esac
3686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${wal_segsize}MB" >&5
3687 $as_echo "${wal_segsize}MB" >&6; }
3688
3689
3690 cat >>confdefs.h <<_ACEOF
3691 #define XLOG_SEG_SIZE (${wal_segsize} * 1024 * 1024)
3692 _ACEOF
3693
3694
3695 #
3696 # C compiler
3697 #
3698
3699 # For historical reasons you can also use --with-CC to specify the C compiler
3700 # to use, although the standard way to do this is to set the CC environment
3701 # variable.
3702
3703
3704
3705 # Check whether --with-CC was given.
3706 if test "${with_CC+set}" = set; then :
3707   withval=$with_CC;
3708   case $withval in
3709     yes)
3710       as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3711       ;;
3712     no)
3713       as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3714       ;;
3715     *)
3716       CC=$with_CC
3717       ;;
3718   esac
3719
3720 fi
3721
3722
3723
3724 case $template in
3725   aix) pgac_cc_list="gcc xlc";;
3726     *) pgac_cc_list="gcc cc";;
3727 esac
3728
3729 ac_ext=c
3730 ac_cpp='$CPP $CPPFLAGS'
3731 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3732 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3733 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3734 if test -n "$ac_tool_prefix"; then
3735   for ac_prog in $pgac_cc_list
3736   do
3737     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3738 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3740 $as_echo_n "checking for $ac_word... " >&6; }
3741 if ${ac_cv_prog_CC+:} false; then :
3742   $as_echo_n "(cached) " >&6
3743 else
3744   if test -n "$CC"; then
3745   ac_cv_prog_CC="$CC" # Let the user override the test.
3746 else
3747 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3748 for as_dir in $PATH
3749 do
3750   IFS=$as_save_IFS
3751   test -z "$as_dir" && as_dir=.
3752     for ac_exec_ext in '' $ac_executable_extensions; do
3753   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3754     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3755     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3756     break 2
3757   fi
3758 done
3759   done
3760 IFS=$as_save_IFS
3761
3762 fi
3763 fi
3764 CC=$ac_cv_prog_CC
3765 if test -n "$CC"; then
3766   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3767 $as_echo "$CC" >&6; }
3768 else
3769   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3770 $as_echo "no" >&6; }
3771 fi
3772
3773
3774     test -n "$CC" && break
3775   done
3776 fi
3777 if test -z "$CC"; then
3778   ac_ct_CC=$CC
3779   for ac_prog in $pgac_cc_list
3780 do
3781   # Extract the first word of "$ac_prog", so it can be a program name with args.
3782 set dummy $ac_prog; ac_word=$2
3783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3784 $as_echo_n "checking for $ac_word... " >&6; }
3785 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3786   $as_echo_n "(cached) " >&6
3787 else
3788   if test -n "$ac_ct_CC"; then
3789   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3790 else
3791 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3792 for as_dir in $PATH
3793 do
3794   IFS=$as_save_IFS
3795   test -z "$as_dir" && as_dir=.
3796     for ac_exec_ext in '' $ac_executable_extensions; do
3797   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3798     ac_cv_prog_ac_ct_CC="$ac_prog"
3799     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3800     break 2
3801   fi
3802 done
3803   done
3804 IFS=$as_save_IFS
3805
3806 fi
3807 fi
3808 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3809 if test -n "$ac_ct_CC"; then
3810   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3811 $as_echo "$ac_ct_CC" >&6; }
3812 else
3813   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3814 $as_echo "no" >&6; }
3815 fi
3816
3817
3818   test -n "$ac_ct_CC" && break
3819 done
3820
3821   if test "x$ac_ct_CC" = x; then
3822     CC=""
3823   else
3824     case $cross_compiling:$ac_tool_warned in
3825 yes:)
3826 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3827 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3828 ac_tool_warned=yes ;;
3829 esac
3830     CC=$ac_ct_CC
3831   fi
3832 fi
3833
3834
3835 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3836 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3837 as_fn_error $? "no acceptable C compiler found in \$PATH
3838 See \`config.log' for more details" "$LINENO" 5; }
3839
3840 # Provide some information about the compiler.
3841 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3842 set X $ac_compile
3843 ac_compiler=$2
3844 for ac_option in --version -v -V -qversion; do
3845   { { ac_try="$ac_compiler $ac_option >&5"
3846 case "(($ac_try" in
3847   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3848   *) ac_try_echo=$ac_try;;
3849 esac
3850 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3851 $as_echo "$ac_try_echo"; } >&5
3852   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3853   ac_status=$?
3854   if test -s conftest.err; then
3855     sed '10a\
3856 ... rest of stderr output deleted ...
3857          10q' conftest.err >conftest.er1
3858     cat conftest.er1 >&5
3859   fi
3860   rm -f conftest.er1 conftest.err
3861   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3862   test $ac_status = 0; }
3863 done
3864
3865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3866 /* end confdefs.h.  */
3867
3868 int
3869 main ()
3870 {
3871
3872   ;
3873   return 0;
3874 }
3875 _ACEOF
3876 ac_clean_files_save=$ac_clean_files
3877 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3878 # Try to create an executable without -o first, disregard a.out.
3879 # It will help us diagnose broken compilers, and finding out an intuition
3880 # of exeext.
3881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3882 $as_echo_n "checking whether the C compiler works... " >&6; }
3883 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3884
3885 # The possible output files:
3886 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3887
3888 ac_rmfiles=
3889 for ac_file in $ac_files
3890 do
3891   case $ac_file in
3892     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3893     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3894   esac
3895 done
3896 rm -f $ac_rmfiles
3897
3898 if { { ac_try="$ac_link_default"
3899 case "(($ac_try" in
3900   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3901   *) ac_try_echo=$ac_try;;
3902 esac
3903 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3904 $as_echo "$ac_try_echo"; } >&5
3905   (eval "$ac_link_default") 2>&5
3906   ac_status=$?
3907   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3908   test $ac_status = 0; }; then :
3909   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3910 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3911 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
3912 # so that the user can short-circuit this test for compilers unknown to
3913 # Autoconf.
3914 for ac_file in $ac_files ''
3915 do
3916   test -f "$ac_file" || continue
3917   case $ac_file in
3918     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3919         ;;
3920     [ab].out )
3921         # We found the default executable, but exeext='' is most
3922         # certainly right.
3923         break;;
3924     *.* )
3925         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3926         then :; else
3927            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3928         fi
3929         # We set ac_cv_exeext here because the later test for it is not
3930         # safe: cross compilers may not add the suffix if given an `-o'
3931         # argument, so we may need to know it at that point already.
3932         # Even if this section looks crufty: it has the advantage of
3933         # actually working.
3934         break;;
3935     * )
3936         break;;
3937   esac
3938 done
3939 test "$ac_cv_exeext" = no && ac_cv_exeext=
3940
3941 else
3942   ac_file=''
3943 fi
3944 if test -z "$ac_file"; then :
3945   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3946 $as_echo "no" >&6; }
3947 $as_echo "$as_me: failed program was:" >&5
3948 sed 's/^/| /' conftest.$ac_ext >&5
3949
3950 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3951 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3952 as_fn_error 77 "C compiler cannot create executables
3953 See \`config.log' for more details" "$LINENO" 5; }
3954 else
3955   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3956 $as_echo "yes" >&6; }
3957 fi
3958 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3959 $as_echo_n "checking for C compiler default output file name... " >&6; }
3960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3961 $as_echo "$ac_file" >&6; }
3962 ac_exeext=$ac_cv_exeext
3963
3964 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3965 ac_clean_files=$ac_clean_files_save
3966 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3967 $as_echo_n "checking for suffix of executables... " >&6; }
3968 if { { ac_try="$ac_link"
3969 case "(($ac_try" in
3970   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3971   *) ac_try_echo=$ac_try;;
3972 esac
3973 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3974 $as_echo "$ac_try_echo"; } >&5
3975   (eval "$ac_link") 2>&5
3976   ac_status=$?
3977   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3978   test $ac_status = 0; }; then :
3979   # If both `conftest.exe' and `conftest' are `present' (well, observable)
3980 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3981 # work properly (i.e., refer to `conftest.exe'), while it won't with
3982 # `rm'.
3983 for ac_file in conftest.exe conftest conftest.*; do
3984   test -f "$ac_file" || continue
3985   case $ac_file in
3986     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3987     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3988           break;;
3989     * ) break;;
3990   esac
3991 done
3992 else
3993   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3994 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3995 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3996 See \`config.log' for more details" "$LINENO" 5; }
3997 fi
3998 rm -f conftest conftest$ac_cv_exeext
3999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4000 $as_echo "$ac_cv_exeext" >&6; }
4001
4002 rm -f conftest.$ac_ext
4003 EXEEXT=$ac_cv_exeext
4004 ac_exeext=$EXEEXT
4005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4006 /* end confdefs.h.  */
4007 #include <stdio.h>
4008 int
4009 main ()
4010 {
4011 FILE *f = fopen ("conftest.out", "w");
4012  return ferror (f) || fclose (f) != 0;
4013
4014   ;
4015   return 0;
4016 }
4017 _ACEOF
4018 ac_clean_files="$ac_clean_files conftest.out"
4019 # Check that the compiler produces executables we can run.  If not, either
4020 # the compiler is broken, or we cross compile.
4021 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4022 $as_echo_n "checking whether we are cross compiling... " >&6; }
4023 if test "$cross_compiling" != yes; then
4024   { { ac_try="$ac_link"
4025 case "(($ac_try" in
4026   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4027   *) ac_try_echo=$ac_try;;
4028 esac
4029 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4030 $as_echo "$ac_try_echo"; } >&5
4031   (eval "$ac_link") 2>&5
4032   ac_status=$?
4033   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4034   test $ac_status = 0; }
4035   if { ac_try='./conftest$ac_cv_exeext'
4036   { { case "(($ac_try" in
4037   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4038   *) ac_try_echo=$ac_try;;
4039 esac
4040 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4041 $as_echo "$ac_try_echo"; } >&5
4042   (eval "$ac_try") 2>&5
4043   ac_status=$?
4044   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4045   test $ac_status = 0; }; }; then
4046     cross_compiling=no
4047   else
4048     if test "$cross_compiling" = maybe; then
4049         cross_compiling=yes
4050     else
4051         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4052 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4053 as_fn_error $? "cannot run C compiled programs.
4054 If you meant to cross compile, use \`--host'.
4055 See \`config.log' for more details" "$LINENO" 5; }
4056     fi
4057   fi
4058 fi
4059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4060 $as_echo "$cross_compiling" >&6; }
4061
4062 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4063 ac_clean_files=$ac_clean_files_save
4064 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4065 $as_echo_n "checking for suffix of object files... " >&6; }
4066 if ${ac_cv_objext+:} false; then :
4067   $as_echo_n "(cached) " >&6
4068 else
4069   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4070 /* end confdefs.h.  */
4071
4072 int
4073 main ()
4074 {
4075
4076   ;
4077   return 0;
4078 }
4079 _ACEOF
4080 rm -f conftest.o conftest.obj
4081 if { { ac_try="$ac_compile"
4082 case "(($ac_try" in
4083   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4084   *) ac_try_echo=$ac_try;;
4085 esac
4086 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4087 $as_echo "$ac_try_echo"; } >&5
4088   (eval "$ac_compile") 2>&5
4089   ac_status=$?
4090   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4091   test $ac_status = 0; }; then :
4092   for ac_file in conftest.o conftest.obj conftest.*; do
4093   test -f "$ac_file" || continue;
4094   case $ac_file in
4095     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4096     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4097        break;;
4098   esac
4099 done
4100 else
4101   $as_echo "$as_me: failed program was:" >&5
4102 sed 's/^/| /' conftest.$ac_ext >&5
4103
4104 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4105 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4106 as_fn_error $? "cannot compute suffix of object files: cannot compile
4107 See \`config.log' for more details" "$LINENO" 5; }
4108 fi
4109 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4110 fi
4111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4112 $as_echo "$ac_cv_objext" >&6; }
4113 OBJEXT=$ac_cv_objext
4114 ac_objext=$OBJEXT
4115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4116 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4117 if ${ac_cv_c_compiler_gnu+:} false; then :
4118   $as_echo_n "(cached) " >&6
4119 else
4120   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4121 /* end confdefs.h.  */
4122
4123 int
4124 main ()
4125 {
4126 #ifndef __GNUC__
4127        choke me
4128 #endif
4129
4130   ;
4131   return 0;
4132 }
4133 _ACEOF
4134 if ac_fn_c_try_compile "$LINENO"; then :
4135   ac_compiler_gnu=yes
4136 else
4137   ac_compiler_gnu=no
4138 fi
4139 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4140 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4141
4142 fi
4143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4144 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4145 if test $ac_compiler_gnu = yes; then
4146   GCC=yes
4147 else
4148   GCC=
4149 fi
4150 ac_test_CFLAGS=${CFLAGS+set}
4151 ac_save_CFLAGS=$CFLAGS
4152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4153 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4154 if ${ac_cv_prog_cc_g+:} false; then :
4155   $as_echo_n "(cached) " >&6
4156 else
4157   ac_save_c_werror_flag=$ac_c_werror_flag
4158    ac_c_werror_flag=yes
4159    ac_cv_prog_cc_g=no
4160    CFLAGS="-g"
4161    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4162 /* end confdefs.h.  */
4163
4164 int
4165 main ()
4166 {
4167
4168   ;
4169   return 0;
4170 }
4171 _ACEOF
4172 if ac_fn_c_try_compile "$LINENO"; then :
4173   ac_cv_prog_cc_g=yes
4174 else
4175   CFLAGS=""
4176       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4177 /* end confdefs.h.  */
4178
4179 int
4180 main ()
4181 {
4182
4183   ;
4184   return 0;
4185 }
4186 _ACEOF
4187 if ac_fn_c_try_compile "$LINENO"; then :
4188
4189 else
4190   ac_c_werror_flag=$ac_save_c_werror_flag
4191          CFLAGS="-g"
4192          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4193 /* end confdefs.h.  */
4194
4195 int
4196 main ()
4197 {
4198
4199   ;
4200   return 0;
4201 }
4202 _ACEOF
4203 if ac_fn_c_try_compile "$LINENO"; then :
4204   ac_cv_prog_cc_g=yes
4205 fi
4206 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4207 fi
4208 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4209 fi
4210 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4211    ac_c_werror_flag=$ac_save_c_werror_flag
4212 fi
4213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4214 $as_echo "$ac_cv_prog_cc_g" >&6; }
4215 if test "$ac_test_CFLAGS" = set; then
4216   CFLAGS=$ac_save_CFLAGS
4217 elif test $ac_cv_prog_cc_g = yes; then
4218   if test "$GCC" = yes; then
4219     CFLAGS="-g -O2"
4220   else
4221     CFLAGS="-g"
4222   fi
4223 else
4224   if test "$GCC" = yes; then
4225     CFLAGS="-O2"
4226   else
4227     CFLAGS=
4228   fi
4229 fi
4230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4231 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4232 if ${ac_cv_prog_cc_c89+:} false; then :
4233   $as_echo_n "(cached) " >&6
4234 else
4235   ac_cv_prog_cc_c89=no
4236 ac_save_CC=$CC
4237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4238 /* end confdefs.h.  */
4239 #include <stdarg.h>
4240 #include <stdio.h>
4241 struct stat;
4242 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4243 struct buf { int x; };
4244 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4245 static char *e (p, i)
4246      char **p;
4247      int i;
4248 {
4249   return p[i];
4250 }
4251 static char *f (char * (*g) (char **, int), char **p, ...)
4252 {
4253   char *s;
4254   va_list v;
4255   va_start (v,p);
4256   s = g (p, va_arg (v,int));
4257   va_end (v);
4258   return s;
4259 }
4260
4261 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
4262    function prototypes and stuff, but not '\xHH' hex character constants.
4263    These don't provoke an error unfortunately, instead are silently treated
4264    as 'x'.  The following induces an error, until -std is added to get
4265    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
4266    array size at least.  It's necessary to write '\x00'==0 to get something
4267    that's true only with -std.  */
4268 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4269
4270 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4271    inside strings and character constants.  */
4272 #define FOO(x) 'x'
4273 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4274
4275 int test (int i, double x);
4276 struct s1 {int (*f) (int a);};
4277 struct s2 {int (*f) (double a);};
4278 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4279 int argc;
4280 char **argv;
4281 int
4282 main ()
4283 {
4284 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4285   ;
4286   return 0;
4287 }
4288 _ACEOF
4289 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4290         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4291 do
4292   CC="$ac_save_CC $ac_arg"
4293   if ac_fn_c_try_compile "$LINENO"; then :
4294   ac_cv_prog_cc_c89=$ac_arg
4295 fi
4296 rm -f core conftest.err conftest.$ac_objext
4297   test "x$ac_cv_prog_cc_c89" != "xno" && break
4298 done
4299 rm -f conftest.$ac_ext
4300 CC=$ac_save_CC
4301
4302 fi
4303 # AC_CACHE_VAL
4304 case "x$ac_cv_prog_cc_c89" in
4305   x)
4306     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4307 $as_echo "none needed" >&6; } ;;
4308   xno)
4309     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4310 $as_echo "unsupported" >&6; } ;;
4311   *)
4312     CC="$CC $ac_cv_prog_cc_c89"
4313     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4314 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4315 esac
4316 if test "x$ac_cv_prog_cc_c89" != xno; then :
4317
4318 fi
4319
4320 ac_ext=c
4321 ac_cpp='$CPP $CPPFLAGS'
4322 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4323 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4324 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4325
4326
4327 # Check if it's Intel's compiler, which (usually) pretends to be gcc,
4328 # but has idiosyncrasies of its own.  We assume icc will define
4329 # __INTEL_COMPILER regardless of CFLAGS.
4330
4331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4332 /* end confdefs.h.  */
4333
4334 int
4335 main ()
4336 {
4337 #ifndef __INTEL_COMPILER
4338 choke me
4339 #endif
4340   ;
4341   return 0;
4342 }
4343 _ACEOF
4344 if ac_fn_c_try_compile "$LINENO"; then :
4345   ICC=yes
4346 else
4347   ICC=no
4348 fi
4349 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4350
4351 # Check if it's Sun Studio compiler. We assume that
4352 # __SUNPRO_C will be defined for Sun Studio compilers
4353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4354 /* end confdefs.h.  */
4355
4356 int
4357 main ()
4358 {
4359 #ifndef __SUNPRO_C
4360 choke me
4361 #endif
4362   ;
4363   return 0;
4364 }
4365 _ACEOF
4366 if ac_fn_c_try_compile "$LINENO"; then :
4367   SUN_STUDIO_CC=yes
4368 else
4369   SUN_STUDIO_CC=no
4370 fi
4371 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4372
4373
4374
4375 unset CFLAGS
4376
4377 #
4378 # Read the template
4379 #
4380 . "$srcdir/src/template/$template" || exit
4381
4382 # CFLAGS are selected so:
4383 # If the user specifies something in the environment, that is used.
4384 # else:  If the template file set something, that is used.
4385 # else:  If coverage was enabled, don't set anything.
4386 # else:  If the compiler is GCC, then we use -O2.
4387 # else:  If the compiler is something else, then we use -O, unless debugging.
4388
4389 if test "$ac_env_CFLAGS_set" = set; then
4390   CFLAGS=$ac_env_CFLAGS_value
4391 elif test "${CFLAGS+set}" = set; then
4392   : # (keep what template set)
4393 elif test "$enable_coverage" = yes; then
4394   : # no optimization by default
4395 elif test "$GCC" = yes; then
4396   CFLAGS="-O2"
4397 else
4398   # if the user selected debug mode, don't use -O
4399   if test "$enable_debug" != yes; then
4400     CFLAGS="-O"
4401   fi
4402 fi
4403
4404 # CFLAGS we determined above will be added back at the end
4405 user_CFLAGS=$CFLAGS
4406 CFLAGS=""
4407
4408 # set CFLAGS_VECTOR from the environment, if available
4409 if test "$ac_env_CFLAGS_VECTOR_set" = set; then
4410   CFLAGS_VECTOR=$ac_env_CFLAGS_VECTOR_value
4411 fi
4412
4413 # Some versions of GCC support some additional useful warning flags.
4414 # Check whether they are supported, and add them to CFLAGS if so.
4415 # ICC pretends to be GCC but it's lying; it doesn't support these flags,
4416 # but has its own.  Also check other compiler-specific flags here.
4417
4418 if test "$GCC" = yes -a "$ICC" = no; then
4419   CFLAGS="-Wall -Wmissing-prototypes -Wpointer-arith"
4420   # These work in some but not all gcc versions
4421   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wdeclaration-after-statement" >&5
4422 $as_echo_n "checking whether $CC supports -Wdeclaration-after-statement... " >&6; }
4423 if ${pgac_cv_prog_cc_cflags__Wdeclaration_after_statement+:} false; then :
4424   $as_echo_n "(cached) " >&6
4425 else
4426   pgac_save_CFLAGS=$CFLAGS
4427 CFLAGS="$pgac_save_CFLAGS -Wdeclaration-after-statement"
4428 ac_save_c_werror_flag=$ac_c_werror_flag
4429 ac_c_werror_flag=yes
4430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4431 /* end confdefs.h.  */
4432
4433 int
4434 main ()
4435 {
4436
4437   ;
4438   return 0;
4439 }
4440 _ACEOF
4441 if ac_fn_c_try_compile "$LINENO"; then :
4442   pgac_cv_prog_cc_cflags__Wdeclaration_after_statement=yes
4443 else
4444   pgac_cv_prog_cc_cflags__Wdeclaration_after_statement=no
4445 fi
4446 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4447 ac_c_werror_flag=$ac_save_c_werror_flag
4448 CFLAGS="$pgac_save_CFLAGS"
4449 fi
4450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" >&5
4451 $as_echo "$pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" >&6; }
4452 if test x"$pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" = x"yes"; then
4453   CFLAGS="$CFLAGS -Wdeclaration-after-statement"
4454 fi
4455
4456   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wendif-labels" >&5
4457 $as_echo_n "checking whether $CC supports -Wendif-labels... " >&6; }
4458 if ${pgac_cv_prog_cc_cflags__Wendif_labels+:} false; then :
4459   $as_echo_n "(cached) " >&6
4460 else
4461   pgac_save_CFLAGS=$CFLAGS
4462 CFLAGS="$pgac_save_CFLAGS -Wendif-labels"
4463 ac_save_c_werror_flag=$ac_c_werror_flag
4464 ac_c_werror_flag=yes
4465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4466 /* end confdefs.h.  */
4467
4468 int
4469 main ()
4470 {
4471
4472   ;
4473   return 0;
4474 }
4475 _ACEOF
4476 if ac_fn_c_try_compile "$LINENO"; then :
4477   pgac_cv_prog_cc_cflags__Wendif_labels=yes
4478 else
4479   pgac_cv_prog_cc_cflags__Wendif_labels=no
4480 fi
4481 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4482 ac_c_werror_flag=$ac_save_c_werror_flag
4483 CFLAGS="$pgac_save_CFLAGS"
4484 fi
4485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wendif_labels" >&5
4486 $as_echo "$pgac_cv_prog_cc_cflags__Wendif_labels" >&6; }
4487 if test x"$pgac_cv_prog_cc_cflags__Wendif_labels" = x"yes"; then
4488   CFLAGS="$CFLAGS -Wendif-labels"
4489 fi
4490
4491   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wmissing-format-attribute" >&5
4492 $as_echo_n "checking whether $CC supports -Wmissing-format-attribute... " >&6; }
4493 if ${pgac_cv_prog_cc_cflags__Wmissing_format_attribute+:} false; then :
4494   $as_echo_n "(cached) " >&6
4495 else
4496   pgac_save_CFLAGS=$CFLAGS
4497 CFLAGS="$pgac_save_CFLAGS -Wmissing-format-attribute"
4498 ac_save_c_werror_flag=$ac_c_werror_flag
4499 ac_c_werror_flag=yes
4500 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4501 /* end confdefs.h.  */
4502
4503 int
4504 main ()
4505 {
4506
4507   ;
4508   return 0;
4509 }
4510 _ACEOF
4511 if ac_fn_c_try_compile "$LINENO"; then :
4512   pgac_cv_prog_cc_cflags__Wmissing_format_attribute=yes
4513 else
4514   pgac_cv_prog_cc_cflags__Wmissing_format_attribute=no
4515 fi
4516 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4517 ac_c_werror_flag=$ac_save_c_werror_flag
4518 CFLAGS="$pgac_save_CFLAGS"
4519 fi
4520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wmissing_format_attribute" >&5
4521 $as_echo "$pgac_cv_prog_cc_cflags__Wmissing_format_attribute" >&6; }
4522 if test x"$pgac_cv_prog_cc_cflags__Wmissing_format_attribute" = x"yes"; then
4523   CFLAGS="$CFLAGS -Wmissing-format-attribute"
4524 fi
4525
4526   # This was included in -Wall/-Wformat in older GCC versions
4527   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wformat-security" >&5
4528 $as_echo_n "checking whether $CC supports -Wformat-security... " >&6; }
4529 if ${pgac_cv_prog_cc_cflags__Wformat_security+:} false; then :
4530   $as_echo_n "(cached) " >&6
4531 else
4532   pgac_save_CFLAGS=$CFLAGS
4533 CFLAGS="$pgac_save_CFLAGS -Wformat-security"
4534 ac_save_c_werror_flag=$ac_c_werror_flag
4535 ac_c_werror_flag=yes
4536 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4537 /* end confdefs.h.  */
4538
4539 int
4540 main ()
4541 {
4542
4543   ;
4544   return 0;
4545 }
4546 _ACEOF
4547 if ac_fn_c_try_compile "$LINENO"; then :
4548   pgac_cv_prog_cc_cflags__Wformat_security=yes
4549 else
4550   pgac_cv_prog_cc_cflags__Wformat_security=no
4551 fi
4552 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4553 ac_c_werror_flag=$ac_save_c_werror_flag
4554 CFLAGS="$pgac_save_CFLAGS"
4555 fi
4556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wformat_security" >&5
4557 $as_echo "$pgac_cv_prog_cc_cflags__Wformat_security" >&6; }
4558 if test x"$pgac_cv_prog_cc_cflags__Wformat_security" = x"yes"; then
4559   CFLAGS="$CFLAGS -Wformat-security"
4560 fi
4561
4562   # Disable strict-aliasing rules; needed for gcc 3.3+
4563   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fno-strict-aliasing" >&5
4564 $as_echo_n "checking whether $CC supports -fno-strict-aliasing... " >&6; }
4565 if ${pgac_cv_prog_cc_cflags__fno_strict_aliasing+:} false; then :
4566   $as_echo_n "(cached) " >&6
4567 else
4568   pgac_save_CFLAGS=$CFLAGS
4569 CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing"
4570 ac_save_c_werror_flag=$ac_c_werror_flag
4571 ac_c_werror_flag=yes
4572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4573 /* end confdefs.h.  */
4574
4575 int
4576 main ()
4577 {
4578
4579   ;
4580   return 0;
4581 }
4582 _ACEOF
4583 if ac_fn_c_try_compile "$LINENO"; then :
4584   pgac_cv_prog_cc_cflags__fno_strict_aliasing=yes
4585 else
4586   pgac_cv_prog_cc_cflags__fno_strict_aliasing=no
4587 fi
4588 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4589 ac_c_werror_flag=$ac_save_c_werror_flag
4590 CFLAGS="$pgac_save_CFLAGS"
4591 fi
4592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&5
4593 $as_echo "$pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&6; }
4594 if test x"$pgac_cv_prog_cc_cflags__fno_strict_aliasing" = x"yes"; then
4595   CFLAGS="$CFLAGS -fno-strict-aliasing"
4596 fi
4597
4598   # Disable optimizations that assume no overflow; needed for gcc 4.3+
4599   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fwrapv" >&5
4600 $as_echo_n "checking whether $CC supports -fwrapv... " >&6; }
4601 if ${pgac_cv_prog_cc_cflags__fwrapv+:} false; then :
4602   $as_echo_n "(cached) " >&6
4603 else
4604   pgac_save_CFLAGS=$CFLAGS
4605 CFLAGS="$pgac_save_CFLAGS -fwrapv"
4606 ac_save_c_werror_flag=$ac_c_werror_flag
4607 ac_c_werror_flag=yes
4608 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4609 /* end confdefs.h.  */
4610
4611 int
4612 main ()
4613 {
4614
4615   ;
4616   return 0;
4617 }
4618 _ACEOF
4619 if ac_fn_c_try_compile "$LINENO"; then :
4620   pgac_cv_prog_cc_cflags__fwrapv=yes
4621 else
4622   pgac_cv_prog_cc_cflags__fwrapv=no
4623 fi
4624 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4625 ac_c_werror_flag=$ac_save_c_werror_flag
4626 CFLAGS="$pgac_save_CFLAGS"
4627 fi
4628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fwrapv" >&5
4629 $as_echo "$pgac_cv_prog_cc_cflags__fwrapv" >&6; }
4630 if test x"$pgac_cv_prog_cc_cflags__fwrapv" = x"yes"; then
4631   CFLAGS="$CFLAGS -fwrapv"
4632 fi
4633
4634   # Disable FP optimizations that cause various errors on gcc 4.5+ or maybe 4.6+
4635   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fexcess-precision=standard" >&5
4636 $as_echo_n "checking whether $CC supports -fexcess-precision=standard... " >&6; }
4637 if ${pgac_cv_prog_cc_cflags__fexcess_precision_standard+:} false; then :
4638   $as_echo_n "(cached) " >&6
4639 else
4640   pgac_save_CFLAGS=$CFLAGS
4641 CFLAGS="$pgac_save_CFLAGS -fexcess-precision=standard"
4642 ac_save_c_werror_flag=$ac_c_werror_flag
4643 ac_c_werror_flag=yes
4644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4645 /* end confdefs.h.  */
4646
4647 int
4648 main ()
4649 {
4650
4651   ;
4652   return 0;
4653 }
4654 _ACEOF
4655 if ac_fn_c_try_compile "$LINENO"; then :
4656   pgac_cv_prog_cc_cflags__fexcess_precision_standard=yes
4657 else
4658   pgac_cv_prog_cc_cflags__fexcess_precision_standard=no
4659 fi
4660 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4661 ac_c_werror_flag=$ac_save_c_werror_flag
4662 CFLAGS="$pgac_save_CFLAGS"
4663 fi
4664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fexcess_precision_standard" >&5
4665 $as_echo "$pgac_cv_prog_cc_cflags__fexcess_precision_standard" >&6; }
4666 if test x"$pgac_cv_prog_cc_cflags__fexcess_precision_standard" = x"yes"; then
4667   CFLAGS="$CFLAGS -fexcess-precision=standard"
4668 fi
4669
4670   # Optimization flags for specific files that benefit from vectorization
4671   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -funroll-loops" >&5
4672 $as_echo_n "checking whether $CC supports -funroll-loops... " >&6; }
4673 if ${pgac_cv_prog_cc_cflags__funroll_loops+:} false; then :
4674   $as_echo_n "(cached) " >&6
4675 else
4676   pgac_save_CFLAGS=$CFLAGS
4677 CFLAGS="$pgac_save_CFLAGS -funroll-loops"
4678 ac_save_c_werror_flag=$ac_c_werror_flag
4679 ac_c_werror_flag=yes
4680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4681 /* end confdefs.h.  */
4682
4683 int
4684 main ()
4685 {
4686
4687   ;
4688   return 0;
4689 }
4690 _ACEOF
4691 if ac_fn_c_try_compile "$LINENO"; then :
4692   pgac_cv_prog_cc_cflags__funroll_loops=yes
4693 else
4694   pgac_cv_prog_cc_cflags__funroll_loops=no
4695 fi
4696 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4697 ac_c_werror_flag=$ac_save_c_werror_flag
4698 CFLAGS="$pgac_save_CFLAGS"
4699 fi
4700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__funroll_loops" >&5
4701 $as_echo "$pgac_cv_prog_cc_cflags__funroll_loops" >&6; }
4702 if test x"$pgac_cv_prog_cc_cflags__funroll_loops" = x"yes"; then
4703   CFLAGS_VECTOR="${CFLAGS_VECTOR} -funroll-loops"
4704 fi
4705
4706   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -ftree-vectorize" >&5
4707 $as_echo_n "checking whether $CC supports -ftree-vectorize... " >&6; }
4708 if ${pgac_cv_prog_cc_cflags__ftree_vectorize+:} false; then :
4709   $as_echo_n "(cached) " >&6
4710 else
4711   pgac_save_CFLAGS=$CFLAGS
4712 CFLAGS="$pgac_save_CFLAGS -ftree-vectorize"
4713 ac_save_c_werror_flag=$ac_c_werror_flag
4714 ac_c_werror_flag=yes
4715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4716 /* end confdefs.h.  */
4717
4718 int
4719 main ()
4720 {
4721
4722   ;
4723   return 0;
4724 }
4725 _ACEOF
4726 if ac_fn_c_try_compile "$LINENO"; then :
4727   pgac_cv_prog_cc_cflags__ftree_vectorize=yes
4728 else
4729   pgac_cv_prog_cc_cflags__ftree_vectorize=no
4730 fi
4731 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4732 ac_c_werror_flag=$ac_save_c_werror_flag
4733 CFLAGS="$pgac_save_CFLAGS"
4734 fi
4735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__ftree_vectorize" >&5
4736 $as_echo "$pgac_cv_prog_cc_cflags__ftree_vectorize" >&6; }
4737 if test x"$pgac_cv_prog_cc_cflags__ftree_vectorize" = x"yes"; then
4738   CFLAGS_VECTOR="${CFLAGS_VECTOR} -ftree-vectorize"
4739 fi
4740
4741   # We want to suppress clang's unhelpful unused-command-line-argument warnings
4742   # but gcc won't complain about unrecognized -Wno-foo switches, so we have to
4743   # test for the positive form and if that works, add the negative form
4744   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wunused-command-line-argument" >&5
4745 $as_echo_n "checking whether $CC supports -Wunused-command-line-argument... " >&6; }
4746 if ${pgac_cv_prog_cc_cflags__Wunused_command_line_argument+:} false; then :
4747   $as_echo_n "(cached) " >&6
4748 else
4749   pgac_save_CFLAGS=$CFLAGS
4750 CFLAGS="$pgac_save_CFLAGS -Wunused-command-line-argument"
4751 ac_save_c_werror_flag=$ac_c_werror_flag
4752 ac_c_werror_flag=yes
4753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4754 /* end confdefs.h.  */
4755
4756 int
4757 main ()
4758 {
4759
4760   ;
4761   return 0;
4762 }
4763 _ACEOF
4764 if ac_fn_c_try_compile "$LINENO"; then :
4765   pgac_cv_prog_cc_cflags__Wunused_command_line_argument=yes
4766 else
4767   pgac_cv_prog_cc_cflags__Wunused_command_line_argument=no
4768 fi
4769 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4770 ac_c_werror_flag=$ac_save_c_werror_flag
4771 CFLAGS="$pgac_save_CFLAGS"
4772 fi
4773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wunused_command_line_argument" >&5
4774 $as_echo "$pgac_cv_prog_cc_cflags__Wunused_command_line_argument" >&6; }
4775 if test x"$pgac_cv_prog_cc_cflags__Wunused_command_line_argument" = x"yes"; then
4776   NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
4777 fi
4778
4779   if test -n "$NOT_THE_CFLAGS"; then
4780     CFLAGS="$CFLAGS -Wno-unused-command-line-argument"
4781   fi
4782 elif test "$ICC" = yes; then
4783   # Intel's compiler has a bug/misoptimization in checking for
4784   # division by NAN (NaN == 0), -mp1 fixes it, so add it to the CFLAGS.
4785   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -mp1" >&5
4786 $as_echo_n "checking whether $CC supports -mp1... " >&6; }
4787 if ${pgac_cv_prog_cc_cflags__mp1+:} false; then :
4788   $as_echo_n "(cached) " >&6
4789 else
4790   pgac_save_CFLAGS=$CFLAGS
4791 CFLAGS="$pgac_save_CFLAGS -mp1"
4792 ac_save_c_werror_flag=$ac_c_werror_flag
4793 ac_c_werror_flag=yes
4794 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4795 /* end confdefs.h.  */
4796
4797 int
4798 main ()
4799 {
4800
4801   ;
4802   return 0;
4803 }
4804 _ACEOF
4805 if ac_fn_c_try_compile "$LINENO"; then :
4806   pgac_cv_prog_cc_cflags__mp1=yes
4807 else
4808   pgac_cv_prog_cc_cflags__mp1=no
4809 fi
4810 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4811 ac_c_werror_flag=$ac_save_c_werror_flag
4812 CFLAGS="$pgac_save_CFLAGS"
4813 fi
4814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__mp1" >&5
4815 $as_echo "$pgac_cv_prog_cc_cflags__mp1" >&6; }
4816 if test x"$pgac_cv_prog_cc_cflags__mp1" = x"yes"; then
4817   CFLAGS="$CFLAGS -mp1"
4818 fi
4819
4820   # Make sure strict aliasing is off (though this is said to be the default)
4821   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fno-strict-aliasing" >&5
4822 $as_echo_n "checking whether $CC supports -fno-strict-aliasing... " >&6; }
4823 if ${pgac_cv_prog_cc_cflags__fno_strict_aliasing+:} false; then :
4824   $as_echo_n "(cached) " >&6
4825 else
4826   pgac_save_CFLAGS=$CFLAGS
4827 CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing"
4828 ac_save_c_werror_flag=$ac_c_werror_flag
4829 ac_c_werror_flag=yes
4830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4831 /* end confdefs.h.  */
4832
4833 int
4834 main ()
4835 {
4836
4837   ;
4838   return 0;
4839 }
4840 _ACEOF
4841 if ac_fn_c_try_compile "$LINENO"; then :
4842   pgac_cv_prog_cc_cflags__fno_strict_aliasing=yes
4843 else
4844   pgac_cv_prog_cc_cflags__fno_strict_aliasing=no
4845 fi
4846 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4847 ac_c_werror_flag=$ac_save_c_werror_flag
4848 CFLAGS="$pgac_save_CFLAGS"
4849 fi
4850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&5
4851 $as_echo "$pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&6; }
4852 if test x"$pgac_cv_prog_cc_cflags__fno_strict_aliasing" = x"yes"; then
4853   CFLAGS="$CFLAGS -fno-strict-aliasing"
4854 fi
4855
4856 elif test "$PORTNAME" = "aix"; then
4857   # AIX's xlc has to have strict aliasing turned off too
4858   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -qnoansialias" >&5
4859 $as_echo_n "checking whether $CC supports -qnoansialias... " >&6; }
4860 if ${pgac_cv_prog_cc_cflags__qnoansialias+:} false; then :
4861   $as_echo_n "(cached) " >&6
4862 else
4863   pgac_save_CFLAGS=$CFLAGS
4864 CFLAGS="$pgac_save_CFLAGS -qnoansialias"
4865 ac_save_c_werror_flag=$ac_c_werror_flag
4866 ac_c_werror_flag=yes
4867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4868 /* end confdefs.h.  */
4869
4870 int
4871 main ()
4872 {
4873
4874   ;
4875   return 0;
4876 }
4877 _ACEOF
4878 if ac_fn_c_try_compile "$LINENO"; then :
4879   pgac_cv_prog_cc_cflags__qnoansialias=yes
4880 else
4881   pgac_cv_prog_cc_cflags__qnoansialias=no
4882 fi
4883 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4884 ac_c_werror_flag=$ac_save_c_werror_flag
4885 CFLAGS="$pgac_save_CFLAGS"
4886 fi
4887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__qnoansialias" >&5
4888 $as_echo "$pgac_cv_prog_cc_cflags__qnoansialias" >&6; }
4889 if test x"$pgac_cv_prog_cc_cflags__qnoansialias" = x"yes"; then
4890   CFLAGS="$CFLAGS -qnoansialias"
4891 fi
4892
4893   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -qlonglong" >&5
4894 $as_echo_n "checking whether $CC supports -qlonglong... " >&6; }
4895 if ${pgac_cv_prog_cc_cflags__qlonglong+:} false; then :
4896   $as_echo_n "(cached) " >&6
4897 else
4898   pgac_save_CFLAGS=$CFLAGS
4899 CFLAGS="$pgac_save_CFLAGS -qlonglong"
4900 ac_save_c_werror_flag=$ac_c_werror_flag
4901 ac_c_werror_flag=yes
4902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4903 /* end confdefs.h.  */
4904
4905 int
4906 main ()
4907 {
4908
4909   ;
4910   return 0;
4911 }
4912 _ACEOF
4913 if ac_fn_c_try_compile "$LINENO"; then :
4914   pgac_cv_prog_cc_cflags__qlonglong=yes
4915 else
4916   pgac_cv_prog_cc_cflags__qlonglong=no
4917 fi
4918 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4919 ac_c_werror_flag=$ac_save_c_werror_flag
4920 CFLAGS="$pgac_save_CFLAGS"
4921 fi
4922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__qlonglong" >&5
4923 $as_echo "$pgac_cv_prog_cc_cflags__qlonglong" >&6; }
4924 if test x"$pgac_cv_prog_cc_cflags__qlonglong" = x"yes"; then
4925   CFLAGS="$CFLAGS -qlonglong"
4926 fi
4927
4928 elif test "$PORTNAME" = "hpux"; then
4929   # On some versions of HP-UX, libm functions do not set errno by default.
4930   # Fix that by using +Olibmerrno if the compiler recognizes it.
4931   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports +Olibmerrno" >&5
4932 $as_echo_n "checking whether $CC supports +Olibmerrno... " >&6; }
4933 if ${pgac_cv_prog_cc_cflags_pOlibmerrno+:} false; then :
4934   $as_echo_n "(cached) " >&6
4935 else
4936   pgac_save_CFLAGS=$CFLAGS
4937 CFLAGS="$pgac_save_CFLAGS +Olibmerrno"
4938 ac_save_c_werror_flag=$ac_c_werror_flag
4939 ac_c_werror_flag=yes
4940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4941 /* end confdefs.h.  */
4942
4943 int
4944 main ()
4945 {
4946
4947   ;
4948   return 0;
4949 }
4950 _ACEOF
4951 if ac_fn_c_try_compile "$LINENO"; then :
4952   pgac_cv_prog_cc_cflags_pOlibmerrno=yes
4953 else
4954   pgac_cv_prog_cc_cflags_pOlibmerrno=no
4955 fi
4956 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4957 ac_c_werror_flag=$ac_save_c_werror_flag
4958 CFLAGS="$pgac_save_CFLAGS"
4959 fi
4960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags_pOlibmerrno" >&5
4961 $as_echo "$pgac_cv_prog_cc_cflags_pOlibmerrno" >&6; }
4962 if test x"$pgac_cv_prog_cc_cflags_pOlibmerrno" = x"yes"; then
4963   CFLAGS="$CFLAGS +Olibmerrno"
4964 fi
4965
4966 fi
4967
4968 CFLAGS_VECTOR=$CFLAGS_VECTOR
4969
4970
4971 # supply -g if --enable-debug
4972 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
4973   CFLAGS="$CFLAGS -g"
4974 fi
4975
4976 # enable code coverage if --enable-coverage
4977 if test "$enable_coverage" = yes; then
4978   if test "$GCC" = yes; then
4979     CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
4980   else
4981     as_fn_error $? "--enable-coverage is supported only when using GCC" "$LINENO" 5
4982   fi
4983 fi
4984
4985 # enable profiling if --enable-profiling
4986 if test "$enable_profiling" = yes && test "$ac_cv_prog_cc_g" = yes; then
4987   if test "$GCC" = yes; then
4988
4989 $as_echo "#define PROFILE_PID_DIR 1" >>confdefs.h
4990
4991     CFLAGS="$CFLAGS -pg $PLATFORM_PROFILE_FLAGS"
4992   else
4993     as_fn_error $? "--enable-profiling is supported only when using GCC" "$LINENO" 5
4994   fi
4995 fi
4996
4997 # We already have this in Makefile.win32, but configure needs it too
4998 if test "$PORTNAME" = "win32"; then
4999   CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32 -DEXEC_BACKEND"
5000 fi
5001
5002 # Now that we're done automatically adding stuff to CFLAGS, put back the
5003 # user-specified flags (if any) at the end.  This lets users override
5004 # the automatic additions.
5005 CFLAGS="$CFLAGS $user_CFLAGS"
5006
5007 # Check if the compiler still works with the final flag settings
5008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler still works" >&5
5009 $as_echo_n "checking whether the C compiler still works... " >&6; }
5010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5011 /* end confdefs.h.  */
5012
5013 int
5014 main ()
5015 {
5016 return 0;
5017   ;
5018   return 0;
5019 }
5020 _ACEOF
5021 if ac_fn_c_try_link "$LINENO"; then :
5022   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5023 $as_echo "yes" >&6; }
5024 else
5025   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5026 $as_echo "no" >&6; }
5027    as_fn_error $? "cannot proceed" "$LINENO" 5
5028 fi
5029 rm -f core conftest.err conftest.$ac_objext \
5030     conftest$ac_exeext conftest.$ac_ext
5031
5032 # Defend against gcc -ffast-math
5033 if test "$GCC" = yes; then
5034 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5035 /* end confdefs.h.  */
5036
5037 int
5038 main ()
5039 {
5040 #ifdef __FAST_MATH__
5041 choke me
5042 #endif
5043   ;
5044   return 0;
5045 }
5046 _ACEOF
5047 if ac_fn_c_try_compile "$LINENO"; then :
5048
5049 else
5050   as_fn_error $? "do not put -ffast-math in CFLAGS" "$LINENO" 5
5051 fi
5052 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5053 fi
5054
5055 ac_ext=c
5056 ac_cpp='$CPP $CPPFLAGS'
5057 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5058 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5059 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5061 $as_echo_n "checking how to run the C preprocessor... " >&6; }
5062 # On Suns, sometimes $CPP names a directory.
5063 if test -n "$CPP" && test -d "$CPP"; then
5064   CPP=
5065 fi
5066 if test -z "$CPP"; then
5067   if ${ac_cv_prog_CPP+:} false; then :
5068   $as_echo_n "(cached) " >&6
5069 else
5070       # Double quotes because CPP needs to be expanded
5071     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
5072     do
5073       ac_preproc_ok=false
5074 for ac_c_preproc_warn_flag in '' yes
5075 do
5076   # Use a header file that comes with gcc, so configuring glibc
5077   # with a fresh cross-compiler works.
5078   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5079   # <limits.h> exists even on freestanding compilers.
5080   # On the NeXT, cc -E runs the code through the compiler's parser,
5081   # not just through cpp. "Syntax error" is here to catch this case.
5082   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5083 /* end confdefs.h.  */
5084 #ifdef __STDC__
5085 # include <limits.h>
5086 #else
5087 # include <assert.h>
5088 #endif
5089                      Syntax error
5090 _ACEOF
5091 if ac_fn_c_try_cpp "$LINENO"; then :
5092
5093 else
5094   # Broken: fails on valid input.
5095 continue
5096 fi
5097 rm -f conftest.err conftest.i conftest.$ac_ext
5098
5099   # OK, works on sane cases.  Now check whether nonexistent headers
5100   # can be detected and how.
5101   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5102 /* end confdefs.h.  */
5103 #include <ac_nonexistent.h>
5104 _ACEOF
5105 if ac_fn_c_try_cpp "$LINENO"; then :
5106   # Broken: success on invalid input.
5107 continue
5108 else
5109   # Passes both tests.
5110 ac_preproc_ok=:
5111 break
5112 fi
5113 rm -f conftest.err conftest.i conftest.$ac_ext
5114
5115 done
5116 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5117 rm -f conftest.i conftest.err conftest.$ac_ext
5118 if $ac_preproc_ok; then :
5119   break
5120 fi
5121
5122     done
5123     ac_cv_prog_CPP=$CPP
5124
5125 fi
5126   CPP=$ac_cv_prog_CPP
5127 else
5128   ac_cv_prog_CPP=$CPP
5129 fi
5130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5131 $as_echo "$CPP" >&6; }
5132 ac_preproc_ok=false
5133 for ac_c_preproc_warn_flag in '' yes
5134 do
5135   # Use a header file that comes with gcc, so configuring glibc
5136   # with a fresh cross-compiler works.
5137   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5138   # <limits.h> exists even on freestanding compilers.
5139   # On the NeXT, cc -E runs the code through the compiler's parser,
5140   # not just through cpp. "Syntax error" is here to catch this case.
5141   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5142 /* end confdefs.h.  */
5143 #ifdef __STDC__
5144 # include <limits.h>
5145 #else
5146 # include <assert.h>
5147 #endif
5148                      Syntax error
5149 _ACEOF
5150 if ac_fn_c_try_cpp "$LINENO"; then :
5151
5152 else
5153   # Broken: fails on valid input.
5154 continue
5155 fi
5156 rm -f conftest.err conftest.i conftest.$ac_ext
5157
5158   # OK, works on sane cases.  Now check whether nonexistent headers
5159   # can be detected and how.
5160   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5161 /* end confdefs.h.  */
5162 #include <ac_nonexistent.h>
5163 _ACEOF
5164 if ac_fn_c_try_cpp "$LINENO"; then :
5165   # Broken: success on invalid input.
5166 continue
5167 else
5168   # Passes both tests.
5169 ac_preproc_ok=:
5170 break
5171 fi
5172 rm -f conftest.err conftest.i conftest.$ac_ext
5173
5174 done
5175 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5176 rm -f conftest.i conftest.err conftest.$ac_ext
5177 if $ac_preproc_ok; then :
5178
5179 else
5180   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5181 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5182 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
5183 See \`config.log' for more details" "$LINENO" 5; }
5184 fi
5185
5186 ac_ext=c
5187 ac_cpp='$CPP $CPPFLAGS'
5188 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5189 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5190 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5191
5192
5193
5194
5195 #
5196 # Set up TAS assembly code if needed; the template file has now had its
5197 # chance to request this.
5198 #
5199 ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
5200
5201
5202 if test "$need_tas" = yes ; then
5203   TAS=tas.o
5204 else
5205   TAS=""
5206 fi
5207
5208
5209
5210 #
5211 # Automatic dependency tracking
5212 #
5213
5214
5215 # Check whether --enable-depend was given.
5216 if test "${enable_depend+set}" = set; then :
5217   enableval=$enable_depend;
5218   case $enableval in
5219     yes)
5220       autodepend=yes
5221       ;;
5222     no)
5223       :
5224       ;;
5225     *)
5226       as_fn_error $? "no argument expected for --enable-depend option" "$LINENO" 5
5227       ;;
5228   esac
5229
5230 else
5231   enable_depend=no
5232
5233 fi
5234
5235
5236
5237
5238
5239 #
5240 # Enable assert checks
5241 #
5242
5243
5244 # Check whether --enable-cassert was given.
5245 if test "${enable_cassert+set}" = set; then :
5246   enableval=$enable_cassert;
5247   case $enableval in
5248     yes)
5249
5250 $as_echo "#define USE_ASSERT_CHECKING 1" >>confdefs.h
5251
5252       ;;
5253     no)
5254       :
5255       ;;
5256     *)
5257       as_fn_error $? "no argument expected for --enable-cassert option" "$LINENO" 5
5258       ;;
5259   esac
5260
5261 else
5262   enable_cassert=no
5263
5264 fi
5265
5266
5267
5268
5269 #
5270 # Include directories
5271 #
5272 ac_save_IFS=$IFS
5273 IFS="${IFS}${PATH_SEPARATOR}"
5274 # SRCH_INC comes from the template file
5275 for dir in $with_includes $SRCH_INC; do
5276   if test -d "$dir"; then
5277     INCLUDES="$INCLUDES -I$dir"
5278   else
5279     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Include directory $dir does not exist." >&5
5280 $as_echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
5281   fi
5282 done
5283 IFS=$ac_save_IFS
5284
5285
5286
5287 #
5288 # Library directories
5289 #
5290 ac_save_IFS=$IFS
5291 IFS="${IFS}${PATH_SEPARATOR}"
5292 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
5293 for dir in $LIBRARY_DIRS $SRCH_LIB; do
5294   if test -d "$dir"; then
5295     LIBDIRS="$LIBDIRS -L$dir"
5296   else
5297     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Library directory $dir does not exist." >&5
5298 $as_echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
5299   fi
5300 done
5301 IFS=$ac_save_IFS
5302
5303 #
5304 # Enable thread-safe client libraries
5305 #
5306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking allow thread-safe client libraries" >&5
5307 $as_echo_n "checking allow thread-safe client libraries... " >&6; }
5308
5309
5310 # Check whether --enable-thread-safety was given.
5311 if test "${enable_thread_safety+set}" = set; then :
5312   enableval=$enable_thread_safety;
5313   case $enableval in
5314     yes)
5315       :
5316       ;;
5317     no)
5318       :
5319       ;;
5320     *)
5321       as_fn_error $? "no argument expected for --enable-thread-safety option" "$LINENO" 5
5322       ;;
5323   esac
5324
5325 else
5326   enable_thread_safety=yes
5327
5328 fi
5329
5330
5331 if test "$enable_thread_safety" = yes; then
5332
5333 $as_echo "#define ENABLE_THREAD_SAFETY 1" >>confdefs.h
5334
5335 fi
5336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_thread_safety" >&5
5337 $as_echo "$enable_thread_safety" >&6; }
5338
5339
5340 #
5341 # Optionally build Tcl modules (PL/Tcl)
5342 #
5343 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Tcl" >&5
5344 $as_echo_n "checking whether to build with Tcl... " >&6; }
5345
5346
5347
5348 # Check whether --with-tcl was given.
5349 if test "${with_tcl+set}" = set; then :
5350   withval=$with_tcl;
5351   case $withval in
5352     yes)
5353       :
5354       ;;
5355     no)
5356       :
5357       ;;
5358     *)
5359       as_fn_error $? "no argument expected for --with-tcl option" "$LINENO" 5
5360       ;;
5361   esac
5362
5363 else
5364   with_tcl=no
5365
5366 fi
5367
5368
5369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcl" >&5
5370 $as_echo "$with_tcl" >&6; }
5371
5372
5373 # We see if the path to the Tcl/Tk configuration scripts is specified.
5374 # This will override the use of tclsh to find the paths to search.
5375
5376
5377
5378
5379 # Check whether --with-tclconfig was given.
5380 if test "${with_tclconfig+set}" = set; then :
5381   withval=$with_tclconfig;
5382   case $withval in
5383     yes)
5384       as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
5385       ;;
5386     no)
5387       as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
5388       ;;
5389     *)
5390
5391       ;;
5392   esac
5393
5394 fi
5395
5396
5397
5398 #
5399 # Optionally build Perl modules (PL/Perl)
5400 #
5401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Perl modules" >&5
5402 $as_echo_n "checking whether to build Perl modules... " >&6; }
5403
5404
5405
5406 # Check whether --with-perl was given.
5407 if test "${with_perl+set}" = set; then :
5408   withval=$with_perl;
5409   case $withval in
5410     yes)
5411       :
5412       ;;
5413     no)
5414       :
5415       ;;
5416     *)
5417       as_fn_error $? "no argument expected for --with-perl option" "$LINENO" 5
5418       ;;
5419   esac
5420
5421 else
5422   with_perl=no
5423
5424 fi
5425
5426
5427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_perl" >&5
5428 $as_echo "$with_perl" >&6; }
5429
5430
5431 #
5432 # Optionally build Python modules (PL/Python)
5433 #
5434 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Python modules" >&5
5435 $as_echo_n "checking whether to build Python modules... " >&6; }
5436
5437
5438
5439 # Check whether --with-python was given.
5440 if test "${with_python+set}" = set; then :
5441   withval=$with_python;
5442   case $withval in
5443     yes)
5444       :
5445       ;;
5446     no)
5447       :
5448       ;;
5449     *)
5450       as_fn_error $? "no argument expected for --with-python option" "$LINENO" 5
5451       ;;
5452   esac
5453
5454 else
5455   with_python=no
5456
5457 fi
5458
5459
5460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
5461 $as_echo "$with_python" >&6; }
5462
5463
5464 #
5465 # GSSAPI
5466 #
5467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with GSSAPI support" >&5
5468 $as_echo_n "checking whether to build with GSSAPI support... " >&6; }
5469
5470
5471
5472 # Check whether --with-gssapi was given.
5473 if test "${with_gssapi+set}" = set; then :
5474   withval=$with_gssapi;
5475   case $withval in
5476     yes)
5477
5478
5479 $as_echo "#define ENABLE_GSS 1" >>confdefs.h
5480
5481   krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
5482
5483       ;;
5484     no)
5485       :
5486       ;;
5487     *)
5488       as_fn_error $? "no argument expected for --with-gssapi option" "$LINENO" 5
5489       ;;
5490   esac
5491
5492 else
5493   with_gssapi=no
5494
5495 fi
5496
5497
5498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_gssapi" >&5
5499 $as_echo "$with_gssapi" >&6; }
5500
5501
5502
5503
5504
5505 #
5506 # Kerberos configuration parameters
5507 #
5508
5509
5510
5511 # Check whether --with-krb-srvnam was given.
5512 if test "${with_krb_srvnam+set}" = set; then :
5513   withval=$with_krb_srvnam;
5514   case $withval in
5515     yes)
5516       as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
5517       ;;
5518     no)
5519       as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
5520       ;;
5521     *)
5522
5523       ;;
5524   esac
5525
5526 else
5527   with_krb_srvnam="postgres"
5528 fi
5529
5530
5531
5532 cat >>confdefs.h <<_ACEOF
5533 #define PG_KRB_SRVNAM "$with_krb_srvnam"
5534 _ACEOF
5535
5536
5537
5538 #
5539 # PAM
5540 #
5541 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with PAM support" >&5
5542 $as_echo_n "checking whether to build with PAM support... " >&6; }
5543
5544
5545
5546 # Check whether --with-pam was given.
5547 if test "${with_pam+set}" = set; then :
5548   withval=$with_pam;
5549   case $withval in
5550     yes)
5551
5552 $as_echo "#define USE_PAM 1" >>confdefs.h
5553
5554       ;;
5555     no)
5556       :
5557       ;;
5558     *)
5559       as_fn_error $? "no argument expected for --with-pam option" "$LINENO" 5
5560       ;;
5561   esac
5562
5563 else
5564   with_pam=no
5565
5566 fi
5567
5568
5569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pam" >&5
5570 $as_echo "$with_pam" >&6; }
5571
5572
5573 #
5574 # LDAP
5575 #
5576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LDAP support" >&5
5577 $as_echo_n "checking whether to build with LDAP support... " >&6; }
5578
5579
5580
5581 # Check whether --with-ldap was given.
5582 if test "${with_ldap+set}" = set; then :
5583   withval=$with_ldap;
5584   case $withval in
5585     yes)
5586
5587 $as_echo "#define USE_LDAP 1" >>confdefs.h
5588
5589       ;;
5590     no)
5591       :
5592       ;;
5593     *)
5594       as_fn_error $? "no argument expected for --with-ldap option" "$LINENO" 5
5595       ;;
5596   esac
5597
5598 else
5599   with_ldap=no
5600
5601 fi
5602
5603
5604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_ldap" >&5
5605 $as_echo "$with_ldap" >&6; }
5606
5607
5608 #
5609 # Bonjour
5610 #
5611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Bonjour support" >&5
5612 $as_echo_n "checking whether to build with Bonjour support... " >&6; }
5613
5614
5615
5616 # Check whether --with-bonjour was given.
5617 if test "${with_bonjour+set}" = set; then :
5618   withval=$with_bonjour;
5619   case $withval in
5620     yes)
5621
5622 $as_echo "#define USE_BONJOUR 1" >>confdefs.h
5623
5624       ;;
5625     no)
5626       :
5627       ;;
5628     *)
5629       as_fn_error $? "no argument expected for --with-bonjour option" "$LINENO" 5
5630       ;;
5631   esac
5632
5633 else
5634   with_bonjour=no
5635
5636 fi
5637
5638
5639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bonjour" >&5
5640 $as_echo "$with_bonjour" >&6; }
5641
5642
5643 #
5644 # OpenSSL
5645 #
5646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with OpenSSL support" >&5
5647 $as_echo_n "checking whether to build with OpenSSL support... " >&6; }
5648
5649
5650
5651 # Check whether --with-openssl was given.
5652 if test "${with_openssl+set}" = set; then :
5653   withval=$with_openssl;
5654   case $withval in
5655     yes)
5656
5657 $as_echo "#define USE_OPENSSL 1" >>confdefs.h
5658
5659       ;;
5660     no)
5661       :
5662       ;;
5663     *)
5664       as_fn_error $? "no argument expected for --with-openssl option" "$LINENO" 5
5665       ;;
5666   esac
5667
5668 else
5669   with_openssl=no
5670
5671 fi
5672
5673
5674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_openssl" >&5
5675 $as_echo "$with_openssl" >&6; }
5676
5677
5678 #
5679 # SELinux
5680 #
5681 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with SELinux support" >&5
5682 $as_echo_n "checking whether to build with SELinux support... " >&6; }
5683
5684
5685
5686 # Check whether --with-selinux was given.
5687 if test "${with_selinux+set}" = set; then :
5688   withval=$with_selinux;
5689   case $withval in
5690     yes)
5691       :
5692       ;;
5693     no)
5694       :
5695       ;;
5696     *)
5697       as_fn_error $? "no argument expected for --with-selinux option" "$LINENO" 5
5698       ;;
5699   esac
5700
5701 else
5702   with_selinux=no
5703
5704 fi
5705
5706
5707
5708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_selinux" >&5
5709 $as_echo "$with_selinux" >&6; }
5710
5711 #
5712 # Systemd
5713 #
5714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with systemd support" >&5
5715 $as_echo_n "checking whether to build with systemd support... " >&6; }
5716
5717
5718
5719 # Check whether --with-systemd was given.
5720 if test "${with_systemd+set}" = set; then :
5721   withval=$with_systemd;
5722   case $withval in
5723     yes)
5724
5725 $as_echo "#define USE_SYSTEMD 1" >>confdefs.h
5726
5727       ;;
5728     no)
5729       :
5730       ;;
5731     *)
5732       as_fn_error $? "no argument expected for --with-systemd option" "$LINENO" 5
5733       ;;
5734   esac
5735
5736 else
5737   with_systemd=no
5738
5739 fi
5740
5741
5742
5743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_systemd" >&5
5744 $as_echo "$with_systemd" >&6; }
5745
5746 #
5747 # Readline
5748 #
5749
5750
5751
5752 # Check whether --with-readline was given.
5753 if test "${with_readline+set}" = set; then :
5754   withval=$with_readline;
5755   case $withval in
5756     yes)
5757       :
5758       ;;
5759     no)
5760       :
5761       ;;
5762     *)
5763       as_fn_error $? "no argument expected for --with-readline option" "$LINENO" 5
5764       ;;
5765   esac
5766
5767 else
5768   with_readline=yes
5769
5770 fi
5771
5772
5773 # readline on MinGW has problems with backslashes in psql and other bugs.
5774 # This is particularly a problem with non-US code pages.
5775 # Therefore disable its use until we understand the cause. 2004-07-20
5776 if test "$PORTNAME" = "win32"; then
5777   if test "$with_readline" = yes; then
5778     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Readline does not work on MinGW --- disabling" >&5
5779 $as_echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
5780     with_readline=no
5781   fi
5782 fi
5783
5784
5785 #
5786 # Prefer libedit
5787 #
5788
5789
5790
5791 # Check whether --with-libedit-preferred was given.
5792 if test "${with_libedit_preferred+set}" = set; then :
5793   withval=$with_libedit_preferred;
5794   case $withval in
5795     yes)
5796       :
5797       ;;
5798     no)
5799       :
5800       ;;
5801     *)
5802       as_fn_error $? "no argument expected for --with-libedit-preferred option" "$LINENO" 5
5803       ;;
5804   esac
5805
5806 else
5807   with_libedit_preferred=no
5808
5809 fi
5810
5811
5812
5813
5814 #
5815 # UUID library
5816 #
5817 # There are at least three UUID libraries in common use: the FreeBSD/NetBSD
5818 # library, the e2fsprogs libuuid (now part of util-linux-ng), and the OSSP
5819 # UUID library.  More than one of these might be present on a given platform,
5820 # so we make the user say which one she wants.
5821 #
5822
5823
5824
5825 # Check whether --with-uuid was given.
5826 if test "${with_uuid+set}" = set; then :
5827   withval=$with_uuid;
5828   case $withval in
5829     yes)
5830       as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
5831       ;;
5832     no)
5833       as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
5834       ;;
5835     *)
5836
5837       ;;
5838   esac
5839
5840 fi
5841
5842
5843 if test x"$with_uuid" = x"" ; then
5844   with_uuid=no
5845 fi
5846
5847
5848
5849 # Check whether --with-ossp-uuid was given.
5850 if test "${with_ossp_uuid+set}" = set; then :
5851   withval=$with_ossp_uuid;
5852   case $withval in
5853     yes)
5854       :
5855       ;;
5856     no)
5857       :
5858       ;;
5859     *)
5860       as_fn_error $? "no argument expected for --with-ossp-uuid option" "$LINENO" 5
5861       ;;
5862   esac
5863
5864 else
5865   with_ossp_uuid=no
5866
5867 fi
5868
5869
5870 if test "$with_ossp_uuid" = yes ; then
5871   with_uuid=ossp
5872 fi
5873
5874 if test "$with_uuid" = bsd ; then
5875
5876 $as_echo "#define HAVE_UUID_BSD 1" >>confdefs.h
5877
5878   UUID_EXTRA_OBJS="md5.o sha1.o"
5879 elif test "$with_uuid" = e2fs ; then
5880
5881 $as_echo "#define HAVE_UUID_E2FS 1" >>confdefs.h
5882
5883   UUID_EXTRA_OBJS="md5.o sha1.o"
5884 elif test "$with_uuid" = ossp ; then
5885
5886 $as_echo "#define HAVE_UUID_OSSP 1" >>confdefs.h
5887
5888   UUID_EXTRA_OBJS=""
5889 elif test "$with_uuid" = no ; then
5890   UUID_EXTRA_OBJS=""
5891 else
5892   as_fn_error $? "--with-uuid must specify one of bsd, e2fs, or ossp" "$LINENO" 5
5893 fi
5894
5895
5896
5897
5898 #
5899 # XML
5900 #
5901
5902
5903
5904 # Check whether --with-libxml was given.
5905 if test "${with_libxml+set}" = set; then :
5906   withval=$with_libxml;
5907   case $withval in
5908     yes)
5909
5910 $as_echo "#define USE_LIBXML 1" >>confdefs.h
5911
5912       ;;
5913     no)
5914       :
5915       ;;
5916     *)
5917       as_fn_error $? "no argument expected for --with-libxml option" "$LINENO" 5
5918       ;;
5919   esac
5920
5921 else
5922   with_libxml=no
5923
5924 fi
5925
5926
5927
5928 if test "$with_libxml" = yes ; then
5929   for ac_prog in xml2-config
5930 do
5931   # Extract the first word of "$ac_prog", so it can be a program name with args.
5932 set dummy $ac_prog; ac_word=$2
5933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5934 $as_echo_n "checking for $ac_word... " >&6; }
5935 if ${ac_cv_prog_XML2_CONFIG+:} false; then :
5936   $as_echo_n "(cached) " >&6
5937 else
5938   if test -n "$XML2_CONFIG"; then
5939   ac_cv_prog_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test.
5940 else
5941 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5942 for as_dir in $PATH
5943 do
5944   IFS=$as_save_IFS
5945   test -z "$as_dir" && as_dir=.
5946     for ac_exec_ext in '' $ac_executable_extensions; do
5947   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5948     ac_cv_prog_XML2_CONFIG="$ac_prog"
5949     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5950     break 2
5951   fi
5952 done
5953   done
5954 IFS=$as_save_IFS
5955
5956 fi
5957 fi
5958 XML2_CONFIG=$ac_cv_prog_XML2_CONFIG
5959 if test -n "$XML2_CONFIG"; then
5960   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
5961 $as_echo "$XML2_CONFIG" >&6; }
5962 else
5963   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5964 $as_echo "no" >&6; }
5965 fi
5966
5967
5968   test -n "$XML2_CONFIG" && break
5969 done
5970
5971   if test -n "$XML2_CONFIG"; then
5972     for pgac_option in `$XML2_CONFIG --cflags`; do
5973       case $pgac_option in
5974         -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
5975       esac
5976     done
5977     for pgac_option in `$XML2_CONFIG --libs`; do
5978       case $pgac_option in
5979         -L*) LDFLAGS="$LDFLAGS $pgac_option";;
5980       esac
5981     done
5982   fi
5983 fi
5984
5985
5986
5987 #
5988 # XSLT
5989 #
5990
5991
5992
5993 # Check whether --with-libxslt was given.
5994 if test "${with_libxslt+set}" = set; then :
5995   withval=$with_libxslt;
5996   case $withval in
5997     yes)
5998
5999 $as_echo "#define USE_LIBXSLT 1" >>confdefs.h
6000
6001       ;;
6002     no)
6003       :
6004       ;;
6005     *)
6006       as_fn_error $? "no argument expected for --with-libxslt option" "$LINENO" 5
6007       ;;
6008   esac
6009
6010 else
6011   with_libxslt=no
6012
6013 fi
6014
6015
6016
6017
6018
6019
6020 #
6021 # tzdata
6022 #
6023
6024
6025
6026 # Check whether --with-system-tzdata was given.
6027 if test "${with_system_tzdata+set}" = set; then :
6028   withval=$with_system_tzdata;
6029   case $withval in
6030     yes)
6031       as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
6032       ;;
6033     no)
6034       as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
6035       ;;
6036     *)
6037
6038       ;;
6039   esac
6040
6041 fi
6042
6043
6044
6045
6046 #
6047 # Zlib
6048 #
6049
6050
6051
6052 # Check whether --with-zlib was given.
6053 if test "${with_zlib+set}" = set; then :
6054   withval=$with_zlib;
6055   case $withval in
6056     yes)
6057       :
6058       ;;
6059     no)
6060       :
6061       ;;
6062     *)
6063       as_fn_error $? "no argument expected for --with-zlib option" "$LINENO" 5
6064       ;;
6065   esac
6066
6067 else
6068   with_zlib=yes
6069
6070 fi
6071
6072
6073
6074
6075 #
6076 # Elf
6077 #
6078
6079 # Assume system is ELF if it predefines __ELF__ as 1,
6080 # otherwise believe host_os based default.
6081 case $host_os in
6082     freebsd1*|freebsd2*) elf=no;;
6083     freebsd3*|freebsd4*) elf=yes;;
6084 esac
6085
6086
6087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6088 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6089 if ${ac_cv_path_GREP+:} false; then :
6090   $as_echo_n "(cached) " >&6
6091 else
6092   if test -z "$GREP"; then
6093   ac_path_GREP_found=false
6094   # Loop through the user's path and test for each of PROGNAME-LIST
6095   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6096 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6097 do
6098   IFS=$as_save_IFS
6099   test -z "$as_dir" && as_dir=.
6100     for ac_prog in grep ggrep; do
6101     for ac_exec_ext in '' $ac_executable_extensions; do
6102       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6103       as_fn_executable_p "$ac_path_GREP" || continue
6104 # Check for GNU ac_path_GREP and select it if it is found.
6105   # Check for GNU $ac_path_GREP
6106 case `"$ac_path_GREP" --version 2>&1` in
6107 *GNU*)
6108   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6109 *)
6110   ac_count=0
6111   $as_echo_n 0123456789 >"conftest.in"
6112   while :
6113   do
6114     cat "conftest.in" "conftest.in" >"conftest.tmp"
6115     mv "conftest.tmp" "conftest.in"
6116     cp "conftest.in" "conftest.nl"
6117     $as_echo 'GREP' >> "conftest.nl"
6118     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6119     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6120     as_fn_arith $ac_count + 1 && ac_count=$as_val
6121     if test $ac_count -gt ${ac_path_GREP_max-0}; then
6122       # Best one so far, save it but keep looking for a better one
6123       ac_cv_path_GREP="$ac_path_GREP"
6124       ac_path_GREP_max=$ac_count
6125     fi
6126     # 10*(2^10) chars as input seems more than enough
6127     test $ac_count -gt 10 && break
6128   done
6129   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6130 esac
6131
6132       $ac_path_GREP_found && break 3
6133     done
6134   done
6135   done
6136 IFS=$as_save_IFS
6137   if test -z "$ac_cv_path_GREP"; then
6138     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6139   fi
6140 else
6141   ac_cv_path_GREP=$GREP
6142 fi
6143
6144 fi
6145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6146 $as_echo "$ac_cv_path_GREP" >&6; }
6147  GREP="$ac_cv_path_GREP"
6148
6149
6150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6151 $as_echo_n "checking for egrep... " >&6; }
6152 if ${ac_cv_path_EGREP+:} false; then :
6153   $as_echo_n "(cached) " >&6
6154 else
6155   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6156    then ac_cv_path_EGREP="$GREP -E"
6157    else
6158      if test -z "$EGREP"; then
6159   ac_path_EGREP_found=false
6160   # Loop through the user's path and test for each of PROGNAME-LIST
6161   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6162 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6163 do
6164   IFS=$as_save_IFS
6165   test -z "$as_dir" && as_dir=.
6166     for ac_prog in egrep; do
6167     for ac_exec_ext in '' $ac_executable_extensions; do
6168       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6169       as_fn_executable_p "$ac_path_EGREP" || continue
6170 # Check for GNU ac_path_EGREP and select it if it is found.
6171   # Check for GNU $ac_path_EGREP
6172 case `"$ac_path_EGREP" --version 2>&1` in
6173 *GNU*)
6174   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6175 *)
6176   ac_count=0
6177   $as_echo_n 0123456789 >"conftest.in"
6178   while :
6179   do
6180     cat "conftest.in" "conftest.in" >"conftest.tmp"
6181     mv "conftest.tmp" "conftest.in"
6182     cp "conftest.in" "conftest.nl"
6183     $as_echo 'EGREP' >> "conftest.nl"
6184     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6185     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6186     as_fn_arith $ac_count + 1 && ac_count=$as_val
6187     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6188       # Best one so far, save it but keep looking for a better one
6189       ac_cv_path_EGREP="$ac_path_EGREP"
6190       ac_path_EGREP_max=$ac_count
6191     fi
6192     # 10*(2^10) chars as input seems more than enough
6193     test $ac_count -gt 10 && break
6194   done
6195   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6196 esac
6197
6198       $ac_path_EGREP_found && break 3
6199     done
6200   done
6201   done
6202 IFS=$as_save_IFS
6203   if test -z "$ac_cv_path_EGREP"; then
6204     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6205   fi
6206 else
6207   ac_cv_path_EGREP=$EGREP
6208 fi
6209
6210    fi
6211 fi
6212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6213 $as_echo "$ac_cv_path_EGREP" >&6; }
6214  EGREP="$ac_cv_path_EGREP"
6215
6216
6217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6218 /* end confdefs.h.  */
6219 #if __ELF__
6220   yes
6221 #endif
6222
6223 _ACEOF
6224 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6225   $EGREP "yes" >/dev/null 2>&1; then :
6226   ELF_SYS=true
6227 else
6228   if test "X$elf" = "Xyes" ; then
6229   ELF_SYS=true
6230 else
6231   ELF_SYS=
6232 fi
6233 fi
6234 rm -f conftest*
6235
6236
6237
6238 #
6239 # Assignments
6240 #
6241
6242 CPPFLAGS="$CPPFLAGS $INCLUDES"
6243 LDFLAGS="$LDFLAGS $LIBDIRS"
6244
6245
6246
6247
6248
6249 # Check whether --with-gnu-ld was given.
6250 if test "${with_gnu_ld+set}" = set; then :
6251   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
6252 else
6253   with_gnu_ld=no
6254 fi
6255
6256 ac_prog=ld
6257 if test "$GCC" = yes; then
6258   # Check if gcc -print-prog-name=ld gives a path.
6259   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
6260 $as_echo_n "checking for ld used by GCC... " >&6; }
6261   case $host in
6262   *-*-mingw*)
6263     # gcc leaves a trailing carriage return which upsets mingw
6264     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
6265   *)
6266     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
6267   esac
6268   case "$ac_prog" in
6269     # Accept absolute paths.
6270     [\\/]* | [A-Za-z]:[\\/]*)
6271       re_direlt='/[^/][^/]*/\.\./'
6272       # Canonicalize the path of ld
6273       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
6274       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
6275         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
6276       done
6277       test -z "$LD" && LD="$ac_prog"
6278       ;;
6279   "")
6280     # If it fails, then pretend we aren't using GCC.
6281     ac_prog=ld
6282     ;;
6283   *)
6284     # If it is relative, then search for the first ld in PATH.
6285     with_gnu_ld=unknown
6286     ;;
6287   esac
6288 elif test "$with_gnu_ld" = yes; then
6289   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
6290 $as_echo_n "checking for GNU ld... " >&6; }
6291 else
6292   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
6293 $as_echo_n "checking for non-GNU ld... " >&6; }
6294 fi
6295 if ${ac_cv_path_LD+:} false; then :
6296   $as_echo_n "(cached) " >&6
6297 else
6298   if test -z "$LD"; then
6299   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
6300   for ac_dir in $PATH; do
6301     test -z "$ac_dir" && ac_dir=.
6302     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
6303       ac_cv_path_LD="$ac_dir/$ac_prog"
6304       # Check to see if the program is GNU ld.  I'd rather use --version,
6305       # but apparently some GNU ld's only accept -v.
6306       # Break only if it was the GNU/non-GNU ld that we prefer.
6307       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
6308         test "$with_gnu_ld" != no && break
6309       else
6310         test "$with_gnu_ld" != yes && break
6311       fi
6312     fi
6313   done
6314   IFS="$ac_save_ifs"
6315 else
6316   ac_cv_path_LD="$LD" # Let the user override the test with a path.
6317 fi
6318 fi
6319
6320 LD="$ac_cv_path_LD"
6321 if test -n "$LD"; then
6322   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
6323 $as_echo "$LD" >&6; }
6324 else
6325   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6326 $as_echo "no" >&6; }
6327 fi
6328 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
6329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
6330 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
6331 if ${ac_cv_prog_gnu_ld+:} false; then :
6332   $as_echo_n "(cached) " >&6
6333 else
6334   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
6335 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
6336   ac_cv_prog_gnu_ld=yes
6337 else
6338   ac_cv_prog_gnu_ld=no
6339 fi
6340 fi
6341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gnu_ld" >&5
6342 $as_echo "$ac_cv_prog_gnu_ld" >&6; }
6343 with_gnu_ld=$ac_cv_prog_gnu_ld
6344
6345
6346
6347
6348 case $host_os in sysv5*)
6349   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ld -R works" >&5
6350 $as_echo_n "checking whether ld -R works... " >&6; }
6351 if ${pgac_cv_prog_ld_R+:} false; then :
6352   $as_echo_n "(cached) " >&6
6353 else
6354
6355     pgac_save_LDFLAGS=$LDFLAGS; LDFLAGS="$LDFLAGS -Wl,-R/usr/lib"
6356     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6357 /* end confdefs.h.  */
6358
6359 int
6360 main ()
6361 {
6362
6363   ;
6364   return 0;
6365 }
6366 _ACEOF
6367 if ac_fn_c_try_link "$LINENO"; then :
6368   pgac_cv_prog_ld_R=yes
6369 else
6370   pgac_cv_prog_ld_R=no
6371 fi
6372 rm -f core conftest.err conftest.$ac_objext \
6373     conftest$ac_exeext conftest.$ac_ext
6374     LDFLAGS=$pgac_save_LDFLAGS
6375
6376 fi
6377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_ld_R" >&5
6378 $as_echo "$pgac_cv_prog_ld_R" >&6; }
6379   ld_R_works=$pgac_cv_prog_ld_R
6380
6381 esac
6382 if test -n "$ac_tool_prefix"; then
6383   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6384 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6386 $as_echo_n "checking for $ac_word... " >&6; }
6387 if ${ac_cv_prog_RANLIB+:} false; then :
6388   $as_echo_n "(cached) " >&6
6389 else
6390   if test -n "$RANLIB"; then
6391   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6392 else
6393 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6394 for as_dir in $PATH
6395 do
6396   IFS=$as_save_IFS
6397   test -z "$as_dir" && as_dir=.
6398     for ac_exec_ext in '' $ac_executable_extensions; do
6399   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6400     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6401     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6402     break 2
6403   fi
6404 done
6405   done
6406 IFS=$as_save_IFS
6407
6408 fi
6409 fi
6410 RANLIB=$ac_cv_prog_RANLIB
6411 if test -n "$RANLIB"; then
6412   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6413 $as_echo "$RANLIB" >&6; }
6414 else
6415   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6416 $as_echo "no" >&6; }
6417 fi
6418
6419
6420 fi
6421 if test -z "$ac_cv_prog_RANLIB"; then
6422   ac_ct_RANLIB=$RANLIB
6423   # Extract the first word of "ranlib", so it can be a program name with args.
6424 set dummy ranlib; ac_word=$2
6425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6426 $as_echo_n "checking for $ac_word... " >&6; }
6427 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
6428   $as_echo_n "(cached) " >&6
6429 else
6430   if test -n "$ac_ct_RANLIB"; then
6431   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6432 else
6433 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6434 for as_dir in $PATH
6435 do
6436   IFS=$as_save_IFS
6437   test -z "$as_dir" && as_dir=.
6438     for ac_exec_ext in '' $ac_executable_extensions; do
6439   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6440     ac_cv_prog_ac_ct_RANLIB="ranlib"
6441     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6442     break 2
6443   fi
6444 done
6445   done
6446 IFS=$as_save_IFS
6447
6448 fi
6449 fi
6450 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6451 if test -n "$ac_ct_RANLIB"; then
6452   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6453 $as_echo "$ac_ct_RANLIB" >&6; }
6454 else
6455   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6456 $as_echo "no" >&6; }
6457 fi
6458
6459   if test "x$ac_ct_RANLIB" = x; then
6460     RANLIB=":"
6461   else
6462     case $cross_compiling:$ac_tool_warned in
6463 yes:)
6464 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6465 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6466 ac_tool_warned=yes ;;
6467 esac
6468     RANLIB=$ac_ct_RANLIB
6469   fi
6470 else
6471   RANLIB="$ac_cv_prog_RANLIB"
6472 fi
6473
6474
6475   if test -n "$ac_tool_prefix"; then
6476   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
6477 set dummy ${ac_tool_prefix}strip; ac_word=$2
6478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6479 $as_echo_n "checking for $ac_word... " >&6; }
6480 if ${ac_cv_prog_STRIP+:} false; then :
6481   $as_echo_n "(cached) " >&6
6482 else
6483   if test -n "$STRIP"; then
6484   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
6485 else
6486 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6487 for as_dir in $PATH
6488 do
6489   IFS=$as_save_IFS
6490   test -z "$as_dir" && as_dir=.
6491     for ac_exec_ext in '' $ac_executable_extensions; do
6492   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6493     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
6494     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6495     break 2
6496   fi
6497 done
6498   done
6499 IFS=$as_save_IFS
6500
6501 fi
6502 fi
6503 STRIP=$ac_cv_prog_STRIP
6504 if test -n "$STRIP"; then
6505   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
6506 $as_echo "$STRIP" >&6; }
6507 else
6508   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6509 $as_echo "no" >&6; }
6510 fi
6511
6512
6513 fi
6514 if test -z "$ac_cv_prog_STRIP"; then
6515   ac_ct_STRIP=$STRIP
6516   # Extract the first word of "strip", so it can be a program name with args.
6517 set dummy strip; ac_word=$2
6518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6519 $as_echo_n "checking for $ac_word... " >&6; }
6520 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
6521   $as_echo_n "(cached) " >&6
6522 else
6523   if test -n "$ac_ct_STRIP"; then
6524   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
6525 else
6526 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6527 for as_dir in $PATH
6528 do
6529   IFS=$as_save_IFS
6530   test -z "$as_dir" && as_dir=.
6531     for ac_exec_ext in '' $ac_executable_extensions; do
6532   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6533     ac_cv_prog_ac_ct_STRIP="strip"
6534     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6535     break 2
6536   fi
6537 done
6538   done
6539 IFS=$as_save_IFS
6540
6541 fi
6542 fi
6543 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
6544 if test -n "$ac_ct_STRIP"; then
6545   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
6546 $as_echo "$ac_ct_STRIP" >&6; }
6547 else
6548   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6549 $as_echo "no" >&6; }
6550 fi
6551
6552   if test "x$ac_ct_STRIP" = x; then
6553     STRIP=":"
6554   else
6555     case $cross_compiling:$ac_tool_warned in
6556 yes:)
6557 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6558 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6559 ac_tool_warned=yes ;;
6560 esac
6561     STRIP=$ac_ct_STRIP
6562   fi
6563 else
6564   STRIP="$ac_cv_prog_STRIP"
6565 fi
6566
6567
6568   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is possible to strip libraries" >&5
6569 $as_echo_n "checking whether it is possible to strip libraries... " >&6; }
6570   if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
6571     STRIP_STATIC_LIB="$STRIP -x"
6572     STRIP_SHARED_LIB="$STRIP --strip-unneeded"
6573     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6574 $as_echo "yes" >&6; }
6575   else
6576     case $host_os in
6577       darwin*)
6578         STRIP="$STRIP -x"
6579         STRIP_STATIC_LIB=$STRIP
6580         STRIP_SHARED_LIB=$STRIP
6581         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6582 $as_echo "yes" >&6; }
6583         ;;
6584       *)
6585         STRIP_STATIC_LIB=:
6586         STRIP_SHARED_LIB=:
6587         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6588 $as_echo "no" >&6; }
6589         ;;
6590     esac
6591   fi
6592
6593
6594
6595 if test -n "$ac_tool_prefix"; then
6596   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6597 set dummy ${ac_tool_prefix}ar; ac_word=$2
6598 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6599 $as_echo_n "checking for $ac_word... " >&6; }
6600 if ${ac_cv_prog_AR+:} false; then :
6601   $as_echo_n "(cached) " >&6
6602 else
6603   if test -n "$AR"; then
6604   ac_cv_prog_AR="$AR" # Let the user override the test.
6605 else
6606 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6607 for as_dir in $PATH
6608 do
6609   IFS=$as_save_IFS
6610   test -z "$as_dir" && as_dir=.
6611     for ac_exec_ext in '' $ac_executable_extensions; do
6612   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6613     ac_cv_prog_AR="${ac_tool_prefix}ar"
6614     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6615     break 2
6616   fi
6617 done
6618   done
6619 IFS=$as_save_IFS
6620
6621 fi
6622 fi
6623 AR=$ac_cv_prog_AR
6624 if test -n "$AR"; then
6625   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6626 $as_echo "$AR" >&6; }
6627 else
6628   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6629 $as_echo "no" >&6; }
6630 fi
6631
6632
6633 fi
6634 if test -z "$ac_cv_prog_AR"; then
6635   ac_ct_AR=$AR
6636   # Extract the first word of "ar", so it can be a program name with args.
6637 set dummy ar; ac_word=$2
6638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6639 $as_echo_n "checking for $ac_word... " >&6; }
6640 if ${ac_cv_prog_ac_ct_AR+:} false; then :
6641   $as_echo_n "(cached) " >&6
6642 else
6643   if test -n "$ac_ct_AR"; then
6644   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6645 else
6646 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6647 for as_dir in $PATH
6648 do
6649   IFS=$as_save_IFS
6650   test -z "$as_dir" && as_dir=.
6651     for ac_exec_ext in '' $ac_executable_extensions; do
6652   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6653     ac_cv_prog_ac_ct_AR="ar"
6654     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6655     break 2
6656   fi
6657 done
6658   done
6659 IFS=$as_save_IFS
6660
6661 fi
6662 fi
6663 ac_ct_AR=$ac_cv_prog_ac_ct_AR
6664 if test -n "$ac_ct_AR"; then
6665   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6666 $as_echo "$ac_ct_AR" >&6; }
6667 else
6668   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6669 $as_echo "no" >&6; }
6670 fi
6671
6672   if test "x$ac_ct_AR" = x; then
6673     AR="ar"
6674   else
6675     case $cross_compiling:$ac_tool_warned in
6676 yes:)
6677 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6678 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6679 ac_tool_warned=yes ;;
6680 esac
6681     AR=$ac_ct_AR
6682   fi
6683 else
6684   AR="$ac_cv_prog_AR"
6685 fi
6686
6687 if test "$PORTNAME" = "win32"; then
6688   if test -n "$ac_tool_prefix"; then
6689   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
6690 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
6691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6692 $as_echo_n "checking for $ac_word... " >&6; }
6693 if ${ac_cv_prog_DLLTOOL+:} false; then :
6694   $as_echo_n "(cached) " >&6
6695 else
6696   if test -n "$DLLTOOL"; then
6697   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
6698 else
6699 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6700 for as_dir in $PATH
6701 do
6702   IFS=$as_save_IFS
6703   test -z "$as_dir" && as_dir=.
6704     for ac_exec_ext in '' $ac_executable_extensions; do
6705   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6706     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
6707     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6708     break 2
6709   fi
6710 done
6711   done
6712 IFS=$as_save_IFS
6713
6714 fi
6715 fi
6716 DLLTOOL=$ac_cv_prog_DLLTOOL
6717 if test -n "$DLLTOOL"; then
6718   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
6719 $as_echo "$DLLTOOL" >&6; }
6720 else
6721   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6722 $as_echo "no" >&6; }
6723 fi
6724
6725
6726 fi
6727 if test -z "$ac_cv_prog_DLLTOOL"; then
6728   ac_ct_DLLTOOL=$DLLTOOL
6729   # Extract the first word of "dlltool", so it can be a program name with args.
6730 set dummy dlltool; ac_word=$2
6731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6732 $as_echo_n "checking for $ac_word... " >&6; }
6733 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
6734   $as_echo_n "(cached) " >&6
6735 else
6736   if test -n "$ac_ct_DLLTOOL"; then
6737   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
6738 else
6739 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6740 for as_dir in $PATH
6741 do
6742   IFS=$as_save_IFS
6743   test -z "$as_dir" && as_dir=.
6744     for ac_exec_ext in '' $ac_executable_extensions; do
6745   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6746     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
6747     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6748     break 2
6749   fi
6750 done
6751   done
6752 IFS=$as_save_IFS
6753
6754 fi
6755 fi
6756 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
6757 if test -n "$ac_ct_DLLTOOL"; then
6758   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
6759 $as_echo "$ac_ct_DLLTOOL" >&6; }
6760 else
6761   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6762 $as_echo "no" >&6; }
6763 fi
6764
6765   if test "x$ac_ct_DLLTOOL" = x; then
6766     DLLTOOL="dlltool"
6767   else
6768     case $cross_compiling:$ac_tool_warned in
6769 yes:)
6770 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6771 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6772 ac_tool_warned=yes ;;
6773 esac
6774     DLLTOOL=$ac_ct_DLLTOOL
6775   fi
6776 else
6777   DLLTOOL="$ac_cv_prog_DLLTOOL"
6778 fi
6779
6780   if test -n "$ac_tool_prefix"; then
6781   # Extract the first word of "${ac_tool_prefix}dllwrap", so it can be a program name with args.
6782 set dummy ${ac_tool_prefix}dllwrap; ac_word=$2
6783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6784 $as_echo_n "checking for $ac_word... " >&6; }
6785 if ${ac_cv_prog_DLLWRAP+:} false; then :
6786   $as_echo_n "(cached) " >&6
6787 else
6788   if test -n "$DLLWRAP"; then
6789   ac_cv_prog_DLLWRAP="$DLLWRAP" # Let the user override the test.
6790 else
6791 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6792 for as_dir in $PATH
6793 do
6794   IFS=$as_save_IFS
6795   test -z "$as_dir" && as_dir=.
6796     for ac_exec_ext in '' $ac_executable_extensions; do
6797   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6798     ac_cv_prog_DLLWRAP="${ac_tool_prefix}dllwrap"
6799     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6800     break 2
6801   fi
6802 done
6803   done
6804 IFS=$as_save_IFS
6805
6806 fi
6807 fi
6808 DLLWRAP=$ac_cv_prog_DLLWRAP
6809 if test -n "$DLLWRAP"; then
6810   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLWRAP" >&5
6811 $as_echo "$DLLWRAP" >&6; }
6812 else
6813   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6814 $as_echo "no" >&6; }
6815 fi
6816
6817
6818 fi
6819 if test -z "$ac_cv_prog_DLLWRAP"; then
6820   ac_ct_DLLWRAP=$DLLWRAP
6821   # Extract the first word of "dllwrap", so it can be a program name with args.
6822 set dummy dllwrap; ac_word=$2
6823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6824 $as_echo_n "checking for $ac_word... " >&6; }
6825 if ${ac_cv_prog_ac_ct_DLLWRAP+:} false; then :
6826   $as_echo_n "(cached) " >&6
6827 else
6828   if test -n "$ac_ct_DLLWRAP"; then
6829   ac_cv_prog_ac_ct_DLLWRAP="$ac_ct_DLLWRAP" # Let the user override the test.
6830 else
6831 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6832 for as_dir in $PATH
6833 do
6834   IFS=$as_save_IFS
6835   test -z "$as_dir" && as_dir=.
6836     for ac_exec_ext in '' $ac_executable_extensions; do
6837   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6838     ac_cv_prog_ac_ct_DLLWRAP="dllwrap"
6839     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6840     break 2
6841   fi
6842 done
6843   done
6844 IFS=$as_save_IFS
6845
6846 fi
6847 fi
6848 ac_ct_DLLWRAP=$ac_cv_prog_ac_ct_DLLWRAP
6849 if test -n "$ac_ct_DLLWRAP"; then
6850   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLWRAP" >&5
6851 $as_echo "$ac_ct_DLLWRAP" >&6; }
6852 else
6853   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6854 $as_echo "no" >&6; }
6855 fi
6856
6857   if test "x$ac_ct_DLLWRAP" = x; then
6858     DLLWRAP="dllwrap"
6859   else
6860     case $cross_compiling:$ac_tool_warned in
6861 yes:)
6862 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6863 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6864 ac_tool_warned=yes ;;
6865 esac
6866     DLLWRAP=$ac_ct_DLLWRAP
6867   fi
6868 else
6869   DLLWRAP="$ac_cv_prog_DLLWRAP"
6870 fi
6871
6872   if test -n "$ac_tool_prefix"; then
6873   # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
6874 set dummy ${ac_tool_prefix}windres; ac_word=$2
6875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6876 $as_echo_n "checking for $ac_word... " >&6; }
6877 if ${ac_cv_prog_WINDRES+:} false; then :
6878   $as_echo_n "(cached) " >&6
6879 else
6880   if test -n "$WINDRES"; then
6881   ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
6882 else
6883 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6884 for as_dir in $PATH
6885 do
6886   IFS=$as_save_IFS
6887   test -z "$as_dir" && as_dir=.
6888     for ac_exec_ext in '' $ac_executable_extensions; do
6889   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6890     ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
6891     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6892     break 2
6893   fi
6894 done
6895   done
6896 IFS=$as_save_IFS
6897
6898 fi
6899 fi
6900 WINDRES=$ac_cv_prog_WINDRES
6901 if test -n "$WINDRES"; then
6902   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
6903 $as_echo "$WINDRES" >&6; }
6904 else
6905   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6906 $as_echo "no" >&6; }
6907 fi
6908
6909
6910 fi
6911 if test -z "$ac_cv_prog_WINDRES"; then
6912   ac_ct_WINDRES=$WINDRES
6913   # Extract the first word of "windres", so it can be a program name with args.
6914 set dummy windres; ac_word=$2
6915 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6916 $as_echo_n "checking for $ac_word... " >&6; }
6917 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
6918   $as_echo_n "(cached) " >&6
6919 else
6920   if test -n "$ac_ct_WINDRES"; then
6921   ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
6922 else
6923 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6924 for as_dir in $PATH
6925 do
6926   IFS=$as_save_IFS
6927   test -z "$as_dir" && as_dir=.
6928     for ac_exec_ext in '' $ac_executable_extensions; do
6929   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6930     ac_cv_prog_ac_ct_WINDRES="windres"
6931     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6932     break 2
6933   fi
6934 done
6935   done
6936 IFS=$as_save_IFS
6937
6938 fi
6939 fi
6940 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
6941 if test -n "$ac_ct_WINDRES"; then
6942   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
6943 $as_echo "$ac_ct_WINDRES" >&6; }
6944 else
6945   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6946 $as_echo "no" >&6; }
6947 fi
6948
6949   if test "x$ac_ct_WINDRES" = x; then
6950     WINDRES="windres"
6951   else
6952     case $cross_compiling:$ac_tool_warned in
6953 yes:)
6954 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6955 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6956 ac_tool_warned=yes ;;
6957 esac
6958     WINDRES=$ac_ct_WINDRES
6959   fi
6960 else
6961   WINDRES="$ac_cv_prog_WINDRES"
6962 fi
6963
6964 fi
6965
6966 # Find a good install program.  We prefer a C program (faster),
6967 # so one script is as good as another.  But avoid the broken or
6968 # incompatible versions:
6969 # SysV /etc/install, /usr/sbin/install
6970 # SunOS /usr/etc/install
6971 # IRIX /sbin/install
6972 # AIX /bin/install
6973 # AmigaOS /C/install, which installs bootblocks on floppy discs
6974 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6975 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
6976 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6977 # OS/2's system install, which has a completely different semantic
6978 # ./install, which can be erroneously created by make from ./install.sh.
6979 # Reject install programs that cannot install multiple files.
6980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6981 $as_echo_n "checking for a BSD-compatible install... " >&6; }
6982 if test -z "$INSTALL"; then
6983 if ${ac_cv_path_install+:} false; then :
6984   $as_echo_n "(cached) " >&6
6985 else
6986   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6987 for as_dir in $PATH
6988 do
6989   IFS=$as_save_IFS
6990   test -z "$as_dir" && as_dir=.
6991     # Account for people who put trailing slashes in PATH elements.
6992 case $as_dir/ in #((
6993   ./ | .// | /[cC]/* | \
6994   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
6995   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
6996   /usr/ucb/* ) ;;
6997   *)
6998     # OSF1 and SCO ODT 3.0 have their own names for install.
6999     # Don't use installbsd from OSF since it installs stuff as root
7000     # by default.
7001     for ac_prog in ginstall scoinst install; do
7002       for ac_exec_ext in '' $ac_executable_extensions; do
7003         if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
7004           if test $ac_prog = install &&
7005             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7006             # AIX install.  It has an incompatible calling convention.
7007             :
7008           elif test $ac_prog = install &&
7009             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7010             # program-specific install script used by HP pwplus--don't use.
7011             :
7012           else
7013             rm -rf conftest.one conftest.two conftest.dir
7014             echo one > conftest.one
7015             echo two > conftest.two
7016             mkdir conftest.dir
7017             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
7018               test -s conftest.one && test -s conftest.two &&
7019               test -s conftest.dir/conftest.one &&
7020               test -s conftest.dir/conftest.two
7021             then
7022               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
7023               break 3
7024             fi
7025           fi
7026         fi
7027       done
7028     done
7029     ;;
7030 esac
7031
7032   done
7033 IFS=$as_save_IFS
7034
7035 rm -rf conftest.one conftest.two conftest.dir
7036
7037 fi
7038   if test "${ac_cv_path_install+set}" = set; then
7039     INSTALL=$ac_cv_path_install
7040   else
7041     # As a last resort, use the slow shell script.  Don't cache a
7042     # value for INSTALL within a source directory, because that will
7043     # break other packages using the cache if that directory is
7044     # removed, or if the value is a relative name.
7045     INSTALL=$ac_install_sh
7046   fi
7047 fi
7048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
7049 $as_echo "$INSTALL" >&6; }
7050
7051 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7052 # It thinks the first close brace ends the variable substitution.
7053 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7054
7055 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
7056
7057 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
7058
7059 # When Autoconf chooses install-sh as install program it tries to generate
7060 # a relative path to it in each makefile where it subsitutes it. This clashes
7061 # with our Makefile.global concept. This workaround helps.
7062 case $INSTALL in
7063   *install-sh*) install_bin='';;
7064   *) install_bin=$INSTALL;;
7065 esac
7066
7067
7068 # Extract the first word of "tar", so it can be a program name with args.
7069 set dummy tar; ac_word=$2
7070 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7071 $as_echo_n "checking for $ac_word... " >&6; }
7072 if ${ac_cv_path_TAR+:} false; then :
7073   $as_echo_n "(cached) " >&6
7074 else
7075   case $TAR in
7076   [\\/]* | ?:[\\/]*)
7077   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
7078   ;;
7079   *)
7080   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7081 for as_dir in $PATH
7082 do
7083   IFS=$as_save_IFS
7084   test -z "$as_dir" && as_dir=.
7085     for ac_exec_ext in '' $ac_executable_extensions; do
7086   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7087     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
7088     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7089     break 2
7090   fi
7091 done
7092   done
7093 IFS=$as_save_IFS
7094
7095   ;;
7096 esac
7097 fi
7098 TAR=$ac_cv_path_TAR
7099 if test -n "$TAR"; then
7100   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
7101 $as_echo "$TAR" >&6; }
7102 else
7103   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7104 $as_echo "no" >&6; }
7105 fi
7106
7107
7108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7109 $as_echo_n "checking whether ln -s works... " >&6; }
7110 LN_S=$as_ln_s
7111 if test "$LN_S" = "ln -s"; then
7112   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7113 $as_echo "yes" >&6; }
7114 else
7115   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7116 $as_echo "no, using $LN_S" >&6; }
7117 fi
7118
7119 for ac_prog in gawk mawk nawk awk
7120 do
7121   # Extract the first word of "$ac_prog", so it can be a program name with args.
7122 set dummy $ac_prog; ac_word=$2
7123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7124 $as_echo_n "checking for $ac_word... " >&6; }
7125 if ${ac_cv_prog_AWK+:} false; then :
7126   $as_echo_n "(cached) " >&6
7127 else
7128   if test -n "$AWK"; then
7129   ac_cv_prog_AWK="$AWK" # Let the user override the test.
7130 else
7131 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7132 for as_dir in $PATH
7133 do
7134   IFS=$as_save_IFS
7135   test -z "$as_dir" && as_dir=.
7136     for ac_exec_ext in '' $ac_executable_extensions; do
7137   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7138     ac_cv_prog_AWK="$ac_prog"
7139     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7140     break 2
7141   fi
7142 done
7143   done
7144 IFS=$as_save_IFS
7145
7146 fi
7147 fi
7148 AWK=$ac_cv_prog_AWK
7149 if test -n "$AWK"; then
7150   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7151 $as_echo "$AWK" >&6; }
7152 else
7153   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7154 $as_echo "no" >&6; }
7155 fi
7156
7157
7158   test -n "$AWK" && break
7159 done
7160
7161 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
7162 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
7163 if test -z "$MKDIR_P"; then
7164   if ${ac_cv_path_mkdir+:} false; then :
7165   $as_echo_n "(cached) " >&6
7166 else
7167   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7168 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
7169 do
7170   IFS=$as_save_IFS
7171   test -z "$as_dir" && as_dir=.
7172     for ac_prog in mkdir gmkdir; do
7173          for ac_exec_ext in '' $ac_executable_extensions; do
7174            as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
7175            case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
7176              'mkdir (GNU coreutils) '* | \
7177              'mkdir (coreutils) '* | \
7178              'mkdir (fileutils) '4.1*)
7179                ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
7180                break 3;;
7181            esac
7182          done
7183        done
7184   done
7185 IFS=$as_save_IFS
7186
7187 fi
7188
7189   test -d ./--version && rmdir ./--version
7190   if test "${ac_cv_path_mkdir+set}" = set; then
7191     MKDIR_P="$ac_cv_path_mkdir -p"
7192   else
7193     # As a last resort, use the slow shell script.  Don't cache a
7194     # value for MKDIR_P within a source directory, because that will
7195     # break other packages using the cache if that directory is
7196     # removed, or if the value is a relative name.
7197     MKDIR_P="$ac_install_sh -d"
7198   fi
7199 fi
7200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
7201 $as_echo "$MKDIR_P" >&6; }
7202
7203 # When Autoconf chooses install-sh as mkdir -p program it tries to generate
7204 # a relative path to it in each makefile where it subsitutes it. This clashes
7205 # with our Makefile.global concept. This workaround helps.
7206 case $MKDIR_P in
7207   *install-sh*) MKDIR_P='\${SHELL} \${top_srcdir}/config/install-sh -c -d';;
7208 esac
7209
7210 # Let the user override the search
7211 if test -z "$BISON"; then
7212   for ac_prog in bison
7213 do
7214   # Extract the first word of "$ac_prog", so it can be a program name with args.
7215 set dummy $ac_prog; ac_word=$2
7216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7217 $as_echo_n "checking for $ac_word... " >&6; }
7218 if ${ac_cv_path_BISON+:} false; then :
7219   $as_echo_n "(cached) " >&6
7220 else
7221   case $BISON in
7222   [\\/]* | ?:[\\/]*)
7223   ac_cv_path_BISON="$BISON" # Let the user override the test with a path.
7224   ;;
7225   *)
7226   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7227 for as_dir in $PATH
7228 do
7229   IFS=$as_save_IFS
7230   test -z "$as_dir" && as_dir=.
7231     for ac_exec_ext in '' $ac_executable_extensions; do
7232   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7233     ac_cv_path_BISON="$as_dir/$ac_word$ac_exec_ext"
7234     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7235     break 2
7236   fi
7237 done
7238   done
7239 IFS=$as_save_IFS
7240
7241   ;;
7242 esac
7243 fi
7244 BISON=$ac_cv_path_BISON
7245 if test -n "$BISON"; then
7246   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
7247 $as_echo "$BISON" >&6; }
7248 else
7249   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7250 $as_echo "no" >&6; }
7251 fi
7252
7253
7254   test -n "$BISON" && break
7255 done
7256
7257 fi
7258
7259 if test "$BISON"; then
7260   pgac_bison_version=`$BISON --version 2>/dev/null | sed q`
7261   { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_bison_version" >&5
7262 $as_echo "$as_me: using $pgac_bison_version" >&6;}
7263   if echo "$pgac_bison_version" | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'
7264   then
7265     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7266 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
7267 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&5
7268 $as_echo "$as_me: WARNING:
7269 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
7270 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&2;}
7271     BISON=""
7272   fi
7273   # Bison >=3.0 issues warnings about %name-prefix="base_yy", instead
7274   # of the now preferred %name-prefix "base_yy", but the latter
7275   # doesn't work with Bison 2.3 or less.  So for now we silence the
7276   # deprecation warnings.
7277   if echo "$pgac_bison_version" | $AWK '{ if ($4 >= 3) exit 0; else exit 1;}'
7278   then
7279     BISONFLAGS="$BISONFLAGS -Wno-deprecated"
7280   fi
7281 fi
7282
7283 if test -z "$BISON"; then
7284   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7285 *** Without Bison you will not be able to build PostgreSQL from Git nor
7286 *** change any of the parser definition files.  You can obtain Bison from
7287 *** a GNU mirror site.  (If you are using the official distribution of
7288 *** PostgreSQL then you do not need to worry about this, because the Bison
7289 *** output is pre-generated.)" >&5
7290 $as_echo "$as_me: WARNING:
7291 *** Without Bison you will not be able to build PostgreSQL from Git nor
7292 *** change any of the parser definition files.  You can obtain Bison from
7293 *** a GNU mirror site.  (If you are using the official distribution of
7294 *** PostgreSQL then you do not need to worry about this, because the Bison
7295 *** output is pre-generated.)" >&2;}
7296 fi
7297 # We don't need AC_SUBST(BISON) because AC_PATH_PROG did it
7298
7299
7300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flex" >&5
7301 $as_echo_n "checking for flex... " >&6; }
7302 if ${pgac_cv_path_flex+:} false; then :
7303   $as_echo_n "(cached) " >&6
7304 else
7305   # Let the user override the test
7306 if test -n "$FLEX"; then
7307   pgac_cv_path_flex=$FLEX
7308 else
7309   pgac_save_IFS=$IFS
7310   IFS=$PATH_SEPARATOR
7311   for pgac_dir in $PATH; do
7312     IFS=$pgac_save_IFS
7313     if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
7314       pgac_dir=`pwd`
7315     fi
7316     for pgac_prog in flex lex; do
7317       pgac_candidate="$pgac_dir/$pgac_prog"
7318       if test -f "$pgac_candidate" \
7319         && $pgac_candidate --version </dev/null >/dev/null 2>&1
7320       then
7321         echo '%%'  > conftest.l
7322         if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
7323           pgac_flex_version=`$pgac_candidate --version 2>/dev/null`
7324           if echo "$pgac_flex_version" | sed 's/[.a-z]/ /g' | $AWK '{ if ($1 = 2 && ($2 > 5 || ($2 = 5 && $3 >= 31))) exit 0; else exit 1;}'
7325           then
7326             pgac_cv_path_flex=$pgac_candidate
7327             break 2
7328           else
7329             { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7330 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
7331 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&5
7332 $as_echo "$as_me: WARNING:
7333 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
7334 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&2;}
7335           fi
7336         fi
7337       fi
7338     done
7339   done
7340   rm -f conftest.l lex.yy.c
7341   : ${pgac_cv_path_flex=no}
7342 fi
7343
7344 fi
7345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_path_flex" >&5
7346 $as_echo "$pgac_cv_path_flex" >&6; }
7347 if test x"$pgac_cv_path_flex" = x"no"; then
7348   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7349 *** Without Flex you will not be able to build PostgreSQL from Git nor
7350 *** change any of the scanner definition files.  You can obtain Flex from
7351 *** a GNU mirror site.  (If you are using the official distribution of
7352 *** PostgreSQL then you do not need to worry about this because the Flex
7353 *** output is pre-generated.)" >&5
7354 $as_echo "$as_me: WARNING:
7355 *** Without Flex you will not be able to build PostgreSQL from Git nor
7356 *** change any of the scanner definition files.  You can obtain Flex from
7357 *** a GNU mirror site.  (If you are using the official distribution of
7358 *** PostgreSQL then you do not need to worry about this because the Flex
7359 *** output is pre-generated.)" >&2;}
7360
7361   FLEX=
7362 else
7363   FLEX=$pgac_cv_path_flex
7364   pgac_flex_version=`$FLEX --version 2>/dev/null`
7365   { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_flex_version" >&5
7366 $as_echo "$as_me: using $pgac_flex_version" >&6;}
7367 fi
7368
7369
7370
7371
7372
7373 # Let the user override the search
7374 if test -z "$PERL"; then
7375   # Extract the first word of "perl", so it can be a program name with args.
7376 set dummy perl; ac_word=$2
7377 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7378 $as_echo_n "checking for $ac_word... " >&6; }
7379 if ${ac_cv_path_PERL+:} false; then :
7380   $as_echo_n "(cached) " >&6
7381 else
7382   case $PERL in
7383   [\\/]* | ?:[\\/]*)
7384   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
7385   ;;
7386   *)
7387   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7388 for as_dir in $PATH
7389 do
7390   IFS=$as_save_IFS
7391   test -z "$as_dir" && as_dir=.
7392     for ac_exec_ext in '' $ac_executable_extensions; do
7393   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7394     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
7395     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7396     break 2
7397   fi
7398 done
7399   done
7400 IFS=$as_save_IFS
7401
7402   ;;
7403 esac
7404 fi
7405 PERL=$ac_cv_path_PERL
7406 if test -n "$PERL"; then
7407   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
7408 $as_echo "$PERL" >&6; }
7409 else
7410   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7411 $as_echo "no" >&6; }
7412 fi
7413
7414
7415 fi
7416
7417 if test "$PERL"; then
7418   pgac_perl_version=`$PERL -v 2>/dev/null | sed -n 's/This is perl.*v[a-z ]*\([0-9]\.[0-9][0-9.]*\).*$/\1/p'`
7419   { $as_echo "$as_me:${as_lineno-$LINENO}: using perl $pgac_perl_version" >&5
7420 $as_echo "$as_me: using perl $pgac_perl_version" >&6;}
7421   if echo "$pgac_perl_version" | sed 's/[.a-z_]/ /g' | \
7422     $AWK '{ if ($1 = 5 && $2 >= 8) exit 1; else exit 0;}'
7423   then
7424     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7425 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
7426 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&5
7427 $as_echo "$as_me: WARNING:
7428 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
7429 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&2;}
7430     PERL=""
7431   fi
7432 fi
7433
7434 if test -z "$PERL"; then
7435   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7436 *** Without Perl you will not be able to build PostgreSQL from Git.
7437 *** You can obtain Perl from any CPAN mirror site.
7438 *** (If you are using the official distribution of PostgreSQL then you do not
7439 *** need to worry about this, because the Perl output is pre-generated.)" >&5
7440 $as_echo "$as_me: WARNING:
7441 *** Without Perl you will not be able to build PostgreSQL from Git.
7442 *** You can obtain Perl from any CPAN mirror site.
7443 *** (If you are using the official distribution of PostgreSQL then you do not
7444 *** need to worry about this, because the Perl output is pre-generated.)" >&2;}
7445 fi
7446
7447 if test "$with_perl" = yes; then
7448   if test -z "$PERL"; then
7449     as_fn_error $? "Perl not found" "$LINENO" 5
7450   fi
7451
7452 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl archlibexp" >&5
7453 $as_echo_n "checking for Perl archlibexp... " >&6; }
7454 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
7455 test "$PORTNAME" = "win32" && perl_archlibexp=`echo $perl_archlibexp | sed 's,\\\\,/,g'`
7456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_archlibexp" >&5
7457 $as_echo "$perl_archlibexp" >&6; }
7458 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl privlibexp" >&5
7459 $as_echo_n "checking for Perl privlibexp... " >&6; }
7460 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
7461 test "$PORTNAME" = "win32" && perl_privlibexp=`echo $perl_privlibexp | sed 's,\\\\,/,g'`
7462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_privlibexp" >&5
7463 $as_echo "$perl_privlibexp" >&6; }
7464 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl useshrplib" >&5
7465 $as_echo_n "checking for Perl useshrplib... " >&6; }
7466 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
7467 test "$PORTNAME" = "win32" && perl_useshrplib=`echo $perl_useshrplib | sed 's,\\\\,/,g'`
7468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_useshrplib" >&5
7469 $as_echo "$perl_useshrplib" >&6; }
7470   if test "$perl_useshrplib" != yes && test "$perl_useshrplib" != true; then
7471     as_fn_error $? "cannot build PL/Perl because libperl is not a shared library
7472 You might have to rebuild your Perl installation.  Refer to the
7473 documentation for details.  Use --without-perl to disable building
7474 PL/Perl." "$LINENO" 5
7475   fi
7476
7477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flags to link embedded Perl" >&5
7478 $as_echo_n "checking for flags to link embedded Perl... " >&6; }
7479 if test "$PORTNAME" = "win32" ; then
7480 perl_lib=`basename $perl_archlibexp/CORE/perl[5-9]*.lib .lib`
7481 test -e "$perl_archlibexp/CORE/$perl_lib.lib" && perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
7482 else
7483 pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
7484 pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
7485 perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%" -e "s/ -arch [-a-zA-Z0-9_]*//g"`
7486 fi
7487 if test -z "$perl_embed_ldflags" ; then
7488         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7489 $as_echo "no" >&6; }
7490         as_fn_error $? "could not determine flags for linking embedded Perl.
7491 This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not
7492 installed." "$LINENO" 5
7493 else
7494         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ldflags" >&5
7495 $as_echo "$perl_embed_ldflags" >&6; }
7496 fi
7497
7498 fi
7499
7500 if test "$with_python" = yes; then
7501   # Extract the first word of "python", so it can be a program name with args.
7502 set dummy python; ac_word=$2
7503 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7504 $as_echo_n "checking for $ac_word... " >&6; }
7505 if ${ac_cv_path_PYTHON+:} false; then :
7506   $as_echo_n "(cached) " >&6
7507 else
7508   case $PYTHON in
7509   [\\/]* | ?:[\\/]*)
7510   ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
7511   ;;
7512   *)
7513   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7514 for as_dir in $PATH
7515 do
7516   IFS=$as_save_IFS
7517   test -z "$as_dir" && as_dir=.
7518     for ac_exec_ext in '' $ac_executable_extensions; do
7519   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7520     ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
7521     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7522     break 2
7523   fi
7524 done
7525   done
7526 IFS=$as_save_IFS
7527
7528   ;;
7529 esac
7530 fi
7531 PYTHON=$ac_cv_path_PYTHON
7532 if test -n "$PYTHON"; then
7533   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
7534 $as_echo "$PYTHON" >&6; }
7535 else
7536   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7537 $as_echo "no" >&6; }
7538 fi
7539
7540
7541 if test x"$PYTHON" = x""; then
7542   as_fn_error $? "Python not found" "$LINENO" 5
7543 fi
7544
7545
7546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python distutils module" >&5
7547 $as_echo_n "checking for Python distutils module... " >&6; }
7548 if "${PYTHON}" -c 'import distutils' 2>&5
7549 then
7550     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7551 $as_echo "yes" >&6; }
7552 else
7553     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7554 $as_echo "no" >&6; }
7555     as_fn_error $? "distutils module not found" "$LINENO" 5
7556 fi
7557 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python configuration directory" >&5
7558 $as_echo_n "checking Python configuration directory... " >&6; }
7559 python_majorversion=`${PYTHON} -c "import sys; print(sys.version[0])"`
7560 python_version=`${PYTHON} -c "import sys; print(sys.version[:3])"`
7561 python_configdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBPL'))))"`
7562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_configdir" >&5
7563 $as_echo "$python_configdir" >&6; }
7564
7565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python include directories" >&5
7566 $as_echo_n "checking Python include directories... " >&6; }
7567 python_includespec=`${PYTHON} -c "
7568 import distutils.sysconfig
7569 a = '-I' + distutils.sysconfig.get_python_inc(False)
7570 b = '-I' + distutils.sysconfig.get_python_inc(True)
7571 if a == b:
7572     print(a)
7573 else:
7574     print(a + ' ' + b)"`
7575 if test "$PORTNAME" = win32 ; then
7576     python_includespec=`echo $python_includespec | sed 's,[\],/,g'`
7577 fi
7578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_includespec" >&5
7579 $as_echo "$python_includespec" >&6; }
7580
7581
7582
7583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link an embedded Python application" >&5
7584 $as_echo_n "checking how to link an embedded Python application... " >&6; }
7585
7586 python_libdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBDIR'))))"`
7587 python_ldlibrary=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDLIBRARY'))))"`
7588 python_so=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('SO'))))"`
7589 ldlibrary=`echo "${python_ldlibrary}" | sed "s/${python_so}$//"`
7590 python_enable_shared=`${PYTHON} -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_vars().get('Py_ENABLE_SHARED',0))"`
7591
7592 if test x"${python_libdir}" != x"" -a x"${python_ldlibrary}" != x"" -a x"${python_ldlibrary}" != x"${ldlibrary}"
7593 then
7594         # New way: use the official shared library
7595         ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
7596         python_libspec="-L${python_libdir} -l${ldlibrary}"
7597 else
7598         # Old way: use libpython from python_configdir
7599         python_libdir="${python_configdir}"
7600         # LDVERSION was introduced in Python 3.2.
7601         python_ldversion=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDVERSION'))))"`
7602         if test x"${python_ldversion}" = x""; then
7603                 python_ldversion=$python_version
7604         fi
7605         python_libspec="-L${python_libdir} -lpython${python_ldversion}"
7606 fi
7607
7608 python_additional_libs=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBS','LIBC','LIBM','BASEMODLIBS'))))"`
7609
7610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_libspec} ${python_additional_libs}" >&5
7611 $as_echo "${python_libspec} ${python_additional_libs}" >&6; }
7612
7613
7614
7615
7616   # We need libpython as a shared library.  With Python >=2.5, we
7617   # check the Py_ENABLE_SHARED setting.  On Debian, the setting is not
7618   # correct before the jessie release (http://bugs.debian.org/695979).
7619   # We also want to support older Python versions.  So as a fallback
7620   # we see if there is a file that is named like a shared library.
7621
7622   if test "$python_enable_shared" != 1; then
7623     if test "$PORTNAME" = darwin; then
7624       # OS X does supply a .dylib even though Py_ENABLE_SHARED does
7625       # not get set.  The file detection logic below doesn't succeed
7626       # on older OS X versions, so make it explicit.
7627       python_enable_shared=1
7628     elif test "$PORTNAME" = win32; then
7629       # Windows also needs an explicit override.
7630       python_enable_shared=1
7631     else
7632       # We don't know the platform shared library extension here yet,
7633       # so we try some candidates.
7634       for dlsuffix in .so .sl; do
7635         if ls "$python_libdir"/libpython*${dlsuffix}* >/dev/null 2>&1; then
7636           python_enable_shared=1
7637           break
7638         fi
7639       done
7640     fi
7641   fi
7642
7643   if test "$python_enable_shared" != 1; then
7644     as_fn_error $? "cannot build PL/Python because libpython is not a shared library
7645 You might have to rebuild your Python installation.  Refer to the
7646 documentation for details.  Use --without-python to disable building
7647 PL/Python." "$LINENO" 5
7648   fi
7649 fi
7650
7651 if test "$cross_compiling" = yes && test -z "$with_system_tzdata"; then
7652   # Extract the first word of "zic", so it can be a program name with args.
7653 set dummy zic; ac_word=$2
7654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7655 $as_echo_n "checking for $ac_word... " >&6; }
7656 if ${ac_cv_path_ZIC+:} false; then :
7657   $as_echo_n "(cached) " >&6
7658 else
7659   case $ZIC in
7660   [\\/]* | ?:[\\/]*)
7661   ac_cv_path_ZIC="$ZIC" # Let the user override the test with a path.
7662   ;;
7663   *)
7664   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7665 for as_dir in $PATH
7666 do
7667   IFS=$as_save_IFS
7668   test -z "$as_dir" && as_dir=.
7669     for ac_exec_ext in '' $ac_executable_extensions; do
7670   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7671     ac_cv_path_ZIC="$as_dir/$ac_word$ac_exec_ext"
7672     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7673     break 2
7674   fi
7675 done
7676   done
7677 IFS=$as_save_IFS
7678
7679   ;;
7680 esac
7681 fi
7682 ZIC=$ac_cv_path_ZIC
7683 if test -n "$ZIC"; then
7684   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
7685 $as_echo "$ZIC" >&6; }
7686 else
7687   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7688 $as_echo "no" >&6; }
7689 fi
7690
7691
7692   if test -z "$ZIC"; then
7693     as_fn_error $? "
7694 When cross-compiling, either use the option --with-system-tzdata to use
7695 existing time-zone data, or set the environment variable ZIC to a zic
7696 program to use during the build." "$LINENO" 5
7697   fi
7698 fi
7699
7700 #
7701 # Pthreads
7702 #
7703 # For each platform, we need to know about any special compile and link
7704 # libraries, and whether the normal C function names are thread-safe.
7705 # See the comment at the top of src/port/thread.c for more information.
7706 # WIN32 doesn't need the pthread tests;  it always uses threads
7707 #
7708 # These tests are run before the library-tests, because linking with the
7709 # other libraries can pull in the pthread functions as a side-effect.  We
7710 # want to use the -pthread or similar flags directly, and not rely on
7711 # the side-effects of linking with some other library.
7712 #
7713 # note: We have to use AS_IF here rather than plain if. The AC_CHECK_HEADER
7714 # invocation below is the first one in the script, and autoconf generates
7715 # additional code for that, which must not be inside the if-block. AS_IF
7716 # knows how to do that.
7717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7718 $as_echo_n "checking for ANSI C header files... " >&6; }
7719 if ${ac_cv_header_stdc+:} false; then :
7720   $as_echo_n "(cached) " >&6
7721 else
7722   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7723 /* end confdefs.h.  */
7724 #include <stdlib.h>
7725 #include <stdarg.h>
7726 #include <string.h>
7727 #include <float.h>
7728
7729 int
7730 main ()
7731 {
7732
7733   ;
7734   return 0;
7735 }
7736 _ACEOF
7737 if ac_fn_c_try_compile "$LINENO"; then :
7738   ac_cv_header_stdc=yes
7739 else
7740   ac_cv_header_stdc=no
7741 fi
7742 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7743
7744 if test $ac_cv_header_stdc = yes; then
7745   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
7746   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7747 /* end confdefs.h.  */
7748 #include <string.h>
7749
7750 _ACEOF
7751 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7752   $EGREP "memchr" >/dev/null 2>&1; then :
7753
7754 else
7755   ac_cv_header_stdc=no
7756 fi
7757 rm -f conftest*
7758
7759 fi
7760
7761 if test $ac_cv_header_stdc = yes; then
7762   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
7763   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7764 /* end confdefs.h.  */
7765 #include <stdlib.h>
7766
7767 _ACEOF
7768 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7769   $EGREP "free" >/dev/null 2>&1; then :
7770
7771 else
7772   ac_cv_header_stdc=no
7773 fi
7774 rm -f conftest*
7775
7776 fi
7777
7778 if test $ac_cv_header_stdc = yes; then
7779   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
7780   if test "$cross_compiling" = yes; then :
7781   :
7782 else
7783   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7784 /* end confdefs.h.  */
7785 #include <ctype.h>
7786 #include <stdlib.h>
7787 #if ((' ' & 0x0FF) == 0x020)
7788 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7789 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7790 #else
7791 # define ISLOWER(c) \
7792                    (('a' <= (c) && (c) <= 'i') \
7793                      || ('j' <= (c) && (c) <= 'r') \
7794                      || ('s' <= (c) && (c) <= 'z'))
7795 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7796 #endif
7797
7798 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7799 int
7800 main ()
7801 {
7802   int i;
7803   for (i = 0; i < 256; i++)
7804     if (XOR (islower (i), ISLOWER (i))
7805         || toupper (i) != TOUPPER (i))
7806       return 2;
7807   return 0;
7808 }
7809 _ACEOF
7810 if ac_fn_c_try_run "$LINENO"; then :
7811
7812 else
7813   ac_cv_header_stdc=no
7814 fi
7815 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7816   conftest.$ac_objext conftest.beam conftest.$ac_ext
7817 fi
7818
7819 fi
7820 fi
7821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7822 $as_echo "$ac_cv_header_stdc" >&6; }
7823 if test $ac_cv_header_stdc = yes; then
7824
7825 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
7826
7827 fi
7828
7829 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
7830 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
7831                   inttypes.h stdint.h unistd.h
7832 do :
7833   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7834 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
7835 "
7836 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7837   cat >>confdefs.h <<_ACEOF
7838 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7839 _ACEOF
7840
7841 fi
7842
7843 done
7844
7845
7846 if test "$enable_thread_safety" = yes -a "$PORTNAME" != "win32"; then :
7847    # then
7848
7849
7850
7851 ac_ext=c
7852 ac_cpp='$CPP $CPPFLAGS'
7853 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7854 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7855 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7856
7857 ax_pthread_ok=no
7858
7859 # We used to check for pthread.h first, but this fails if pthread.h
7860 # requires special compiler flags (e.g. on Tru64 or Sequent).
7861 # It gets checked for in the link test anyway.
7862
7863 # First of all, check if the user has set any of the PTHREAD_LIBS,
7864 # etcetera environment variables, and if threads linking works using
7865 # them:
7866 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
7867         save_CFLAGS="$CFLAGS"
7868         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
7869         save_LIBS="$LIBS"
7870         LIBS="$PTHREAD_LIBS $LIBS"
7871         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
7872 $as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
7873         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7874 /* end confdefs.h.  */
7875
7876 /* Override any GCC internal prototype to avoid an error.
7877    Use char because int might match the return type of a GCC
7878    builtin and then its argument prototype would still apply.  */
7879 #ifdef __cplusplus
7880 extern "C"
7881 #endif
7882 char pthread_join ();
7883 int
7884 main ()
7885 {
7886 return pthread_join ();
7887   ;
7888   return 0;
7889 }
7890 _ACEOF
7891 if ac_fn_c_try_link "$LINENO"; then :
7892   ax_pthread_ok=yes
7893 fi
7894 rm -f core conftest.err conftest.$ac_objext \
7895     conftest$ac_exeext conftest.$ac_ext
7896         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
7897 $as_echo "$ax_pthread_ok" >&6; }
7898         if test x"$ax_pthread_ok" = xno; then
7899                 PTHREAD_LIBS=""
7900                 PTHREAD_CFLAGS=""
7901         fi
7902         LIBS="$save_LIBS"
7903         CFLAGS="$save_CFLAGS"
7904 fi
7905
7906 # We must check for the threads library under a number of different
7907 # names; the ordering is very important because some systems
7908 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
7909 # libraries is broken (non-POSIX).
7910
7911 # Create a list of thread flags to try.  Items starting with a "-" are
7912 # C compiler flags, and other items are library names, except for "none"
7913 # which indicates that we try without any flags at all, and "pthread-config"
7914 # which is a program returning the flags for the Pth emulation library.
7915
7916 ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mt -mthreads pthread --thread-safe pthread-config"
7917
7918 # The ordering *is* (sometimes) important.  Some notes on the
7919 # individual items follow:
7920
7921 # pthreads: AIX (must check this before -lpthread)
7922 # none: in case threads are in libc; should be tried before -Kthread and
7923 #       other compiler flags to prevent continual compiler warnings
7924 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
7925 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
7926 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
7927 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
7928 # -pthreads: Solaris/gcc
7929 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
7930 #      doesn't hurt to check since this sometimes defines pthreads and
7931 #      -D_REENTRANT too), HP C (must be checked before -lpthread, which
7932 #      is present but should not be used directly)
7933 # -mthreads: Mingw32/gcc, Lynx/gcc
7934 # pthread: Linux, etcetera
7935 # --thread-safe: KAI C++
7936 # pthread-config: use pthread-config program (for GNU Pth library)
7937
7938 case $host_os in
7939
7940         hpux*)
7941
7942         # From the cc(1) man page: "[-mt] Sets various -D flags to enable
7943         # multi-threading and also sets -lpthread."
7944
7945         ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
7946         ;;
7947
7948         openedition*)
7949
7950         # IBM z/OS requires a feature-test macro to be defined in order to
7951         # enable POSIX threads at all, so give the user a hint if this is
7952         # not set. (We don't define these ourselves, as they can affect
7953         # other portions of the system API in unpredictable ways.)
7954
7955         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7956 /* end confdefs.h.  */
7957
7958 #            if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
7959              AX_PTHREAD_ZOS_MISSING
7960 #            endif
7961
7962 _ACEOF
7963 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7964   $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
7965   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
7966 $as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
7967 fi
7968 rm -f conftest*
7969
7970         ;;
7971
7972         solaris*)
7973
7974         # Newer versions of Solaris require the "-mt -lpthread" pair, and we
7975         # check that first.  On some older versions, libc contains stubbed
7976         # (non-functional) versions of the pthreads routines, so link-based
7977         # tests will erroneously succeed.  (We need to link with -pthreads/-mt/
7978         # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
7979         # a function called by this macro, so we could check for that, but
7980         # who knows whether they'll stub that too in a future libc.)  So
7981         # we'll look for -pthreads and -lpthread shortly thereafter.
7982
7983         ax_pthread_flags="-mt,pthread -pthreads -pthread pthread $ax_pthread_flags"
7984         ;;
7985 esac
7986
7987 # Older versions of Clang only give a warning instead of an error for an
7988 # unrecognized option, unless we specify -Werror. (We throw in some extra
7989 # Clang warning flags for good measure.)
7990
7991 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler needs certain flags to reject unknown flags" >&5
7992 $as_echo_n "checking if compiler needs certain flags to reject unknown flags... " >&6; }
7993 if ${ax_cv_PTHREAD_REJECT_UNKNOWN+:} false; then :
7994   $as_echo_n "(cached) " >&6
7995 else
7996   ax_cv_PTHREAD_REJECT_UNKNOWN=unknown
7997      save_CFLAGS="$CFLAGS"
7998      ax_pthread_extra_flags="-Wunknown-warning-option -Wunused-command-line-argument"
7999      CFLAGS="$CFLAGS $ax_pthread_extra_flags -Wfoobaz -foobaz"
8000      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8001 /* end confdefs.h.  */
8002 int foo(void);
8003 int
8004 main ()
8005 {
8006 foo()
8007   ;
8008   return 0;
8009 }
8010 _ACEOF
8011 if ac_fn_c_try_compile "$LINENO"; then :
8012   ax_cv_PTHREAD_REJECT_UNKNOWN="-Werror $ax_pthread_extra_flags"
8013 else
8014   ax_cv_PTHREAD_REJECT_UNKNOWN=no
8015 fi
8016 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8017      CFLAGS="$save_CFLAGS"
8018
8019 fi
8020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_REJECT_UNKNOWN" >&5
8021 $as_echo "$ax_cv_PTHREAD_REJECT_UNKNOWN" >&6; }
8022 ax_pthread_extra_flags=
8023 if test "x$ax_cv_PTHREAD_REJECT_UNKNOWN" != "xno"; then :
8024   ax_pthread_extra_flags="$ax_cv_PTHREAD_REJECT_UNKNOWN"
8025 fi
8026
8027 if test x"$ax_pthread_ok" = xno; then
8028 for flag in $ax_pthread_flags; do
8029
8030         case $flag in
8031                 none)
8032                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
8033 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
8034                 ;;
8035
8036                 -mt,pthread)
8037                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
8038 $as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
8039                 PTHREAD_CFLAGS="-mt"
8040                 PTHREAD_LIBS="-lpthread"
8041                 ;;
8042
8043                 -*)
8044                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5
8045 $as_echo_n "checking whether pthreads work with $flag... " >&6; }
8046                 PTHREAD_CFLAGS="$flag"
8047                 ;;
8048
8049                 pthread-config)
8050                 # Extract the first word of "pthread-config", so it can be a program name with args.
8051 set dummy pthread-config; ac_word=$2
8052 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8053 $as_echo_n "checking for $ac_word... " >&6; }
8054 if ${ac_cv_prog_ax_pthread_config+:} false; then :
8055   $as_echo_n "(cached) " >&6
8056 else
8057   if test -n "$ax_pthread_config"; then
8058   ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
8059 else
8060 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8061 for as_dir in $PATH
8062 do
8063   IFS=$as_save_IFS
8064   test -z "$as_dir" && as_dir=.
8065     for ac_exec_ext in '' $ac_executable_extensions; do
8066   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8067     ac_cv_prog_ax_pthread_config="yes"
8068     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8069     break 2
8070   fi
8071 done
8072   done
8073 IFS=$as_save_IFS
8074
8075   test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
8076 fi
8077 fi
8078 ax_pthread_config=$ac_cv_prog_ax_pthread_config
8079 if test -n "$ax_pthread_config"; then
8080   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
8081 $as_echo "$ax_pthread_config" >&6; }
8082 else
8083   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8084 $as_echo "no" >&6; }
8085 fi
8086
8087
8088                 if test x"$ax_pthread_config" = xno; then continue; fi
8089                 PTHREAD_CFLAGS="`pthread-config --cflags`"
8090                 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
8091                 ;;
8092
8093                 *)
8094                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5
8095 $as_echo_n "checking for the pthreads library -l$flag... " >&6; }
8096                 PTHREAD_LIBS="-l$flag"
8097                 ;;
8098         esac
8099
8100         save_LIBS="$LIBS"
8101         save_CFLAGS="$CFLAGS"
8102         LIBS="$PTHREAD_LIBS $LIBS"
8103         CFLAGS="$CFLAGS $PTHREAD_CFLAGS $ax_pthread_extra_flags"
8104
8105         # Check for various functions.  We must include pthread.h,
8106         # since some functions may be macros.  (On the Sequent, we
8107         # need a special flag -Kthread to make this header compile.)
8108         # We check for pthread_join because it is in -lpthread on IRIX
8109         # while pthread_create is in libc.  We check for pthread_attr_init
8110         # due to DEC craziness with -lpthreads.  We check for
8111         # pthread_cleanup_push because it is one of the few pthread
8112         # functions on Solaris that doesn't have a non-functional libc stub.
8113         # We try pthread_create on general principles.
8114         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8115 /* end confdefs.h.  */
8116 #include <pthread.h>
8117                         static void routine(void *a) { a = 0; }
8118                         static void *start_routine(void *a) { return a; }
8119 int
8120 main ()
8121 {
8122 pthread_t th; pthread_attr_t attr;
8123                         pthread_create(&th, 0, start_routine, 0);
8124                         pthread_join(th, 0);
8125                         pthread_attr_init(&attr);
8126                         pthread_cleanup_push(routine, 0);
8127                         pthread_cleanup_pop(0) /* ; */
8128   ;
8129   return 0;
8130 }
8131 _ACEOF
8132 if ac_fn_c_try_link "$LINENO"; then :
8133   ax_pthread_ok=yes
8134 fi
8135 rm -f core conftest.err conftest.$ac_objext \
8136     conftest$ac_exeext conftest.$ac_ext
8137
8138         LIBS="$save_LIBS"
8139         CFLAGS="$save_CFLAGS"
8140
8141         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
8142 $as_echo "$ax_pthread_ok" >&6; }
8143         if test "x$ax_pthread_ok" = xyes; then
8144                 break;
8145         fi
8146
8147         PTHREAD_LIBS=""
8148         PTHREAD_CFLAGS=""
8149 done
8150 fi
8151
8152 # Various other checks:
8153 if test "x$ax_pthread_ok" = xyes; then
8154         save_LIBS="$LIBS"
8155         LIBS="$PTHREAD_LIBS $LIBS"
8156         save_CFLAGS="$CFLAGS"
8157         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
8158
8159         # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
8160         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
8161 $as_echo_n "checking for joinable pthread attribute... " >&6; }
8162 if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
8163   $as_echo_n "(cached) " >&6
8164 else
8165   ax_cv_PTHREAD_JOINABLE_ATTR=unknown
8166              for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
8167                  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8168 /* end confdefs.h.  */
8169 #include <pthread.h>
8170 int
8171 main ()
8172 {
8173 int attr = $attr; return attr /* ; */
8174   ;
8175   return 0;
8176 }
8177 _ACEOF
8178 if ac_fn_c_try_link "$LINENO"; then :
8179   ax_cv_PTHREAD_JOINABLE_ATTR=$attr; break
8180 fi
8181 rm -f core conftest.err conftest.$ac_objext \
8182     conftest$ac_exeext conftest.$ac_ext
8183              done
8184
8185 fi
8186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
8187 $as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
8188         if test "$ax_cv_PTHREAD_JOINABLE_ATTR" != unknown && \
8189                test "$ax_cv_PTHREAD_JOINABLE_ATTR" != PTHREAD_CREATE_JOINABLE; then :
8190
8191 cat >>confdefs.h <<_ACEOF
8192 #define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
8193 _ACEOF
8194
8195 fi
8196
8197         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5
8198 $as_echo_n "checking if more special flags are required for pthreads... " >&6; }
8199 if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
8200   $as_echo_n "(cached) " >&6
8201 else
8202   ax_cv_PTHREAD_SPECIAL_FLAGS=no
8203              ax_pthread_special_flags_added=no
8204              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8205 /* end confdefs.h.  */
8206
8207 #                 if !defined(_REENTRANT) && !defined(_THREAD_SAFE)
8208                   AX_PTHREAD_NEED_SPECIAL_FLAG
8209 #                 endif
8210
8211 _ACEOF
8212 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8213   $EGREP "AX_PTHREAD_NEED_SPECIAL_FLAG" >/dev/null 2>&1; then :
8214   case $host_os in
8215                   aix* | freebsd*)
8216                   ax_cv_PTHREAD_SPECIAL_FLAGS="-D_THREAD_SAFE"
8217                   ;;
8218                   darwin* | hpux* | osf* | solaris*)
8219                   ax_cv_PTHREAD_SPECIAL_FLAGS="-D_REENTRANT"
8220                   ;;
8221                   esac
8222
8223 fi
8224 rm -f conftest*
8225
8226
8227 fi
8228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
8229 $as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
8230         if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
8231                test "x$ax_pthread_special_flags_added" != "xyes"; then :
8232   PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
8233                ax_pthread_special_flags_added=yes
8234 fi
8235
8236         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
8237 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
8238 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
8239   $as_echo_n "(cached) " >&6
8240 else
8241   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8242 /* end confdefs.h.  */
8243 #include <pthread.h>
8244 int
8245 main ()
8246 {
8247 int i = PTHREAD_PRIO_INHERIT;
8248   ;
8249   return 0;
8250 }
8251 _ACEOF
8252 if ac_fn_c_try_link "$LINENO"; then :
8253   ax_cv_PTHREAD_PRIO_INHERIT=yes
8254 else
8255   ax_cv_PTHREAD_PRIO_INHERIT=no
8256 fi
8257 rm -f core conftest.err conftest.$ac_objext \
8258     conftest$ac_exeext conftest.$ac_ext
8259
8260 fi
8261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
8262 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
8263         if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"; then :
8264
8265 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
8266
8267 fi
8268
8269         LIBS="$save_LIBS"
8270         CFLAGS="$save_CFLAGS"
8271
8272         # More AIX lossage: compile with *_r variant
8273         if test "x$GCC" != xyes; then
8274             case $host_os in
8275                 aix*)
8276                 case "x/$CC" in #(
8277   x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
8278     #handle absolute path differently from PATH based program lookup
8279                    case "x$CC" in #(
8280   x/*) :
8281     if as_fn_executable_p ${CC}_r; then :
8282   PTHREAD_CC="${CC}_r"
8283 fi ;; #(
8284   *) :
8285     for ac_prog in ${CC}_r
8286 do
8287   # Extract the first word of "$ac_prog", so it can be a program name with args.
8288 set dummy $ac_prog; ac_word=$2
8289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8290 $as_echo_n "checking for $ac_word... " >&6; }
8291 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
8292   $as_echo_n "(cached) " >&6
8293 else
8294   if test -n "$PTHREAD_CC"; then
8295   ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
8296 else
8297 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8298 for as_dir in $PATH
8299 do
8300   IFS=$as_save_IFS
8301   test -z "$as_dir" && as_dir=.
8302     for ac_exec_ext in '' $ac_executable_extensions; do
8303   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8304     ac_cv_prog_PTHREAD_CC="$ac_prog"
8305     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8306     break 2
8307   fi
8308 done
8309   done
8310 IFS=$as_save_IFS
8311
8312 fi
8313 fi
8314 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
8315 if test -n "$PTHREAD_CC"; then
8316   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
8317 $as_echo "$PTHREAD_CC" >&6; }
8318 else
8319   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8320 $as_echo "no" >&6; }
8321 fi
8322
8323
8324   test -n "$PTHREAD_CC" && break
8325 done
8326 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
8327  ;;
8328 esac ;; #(
8329   *) :
8330      ;;
8331 esac
8332                 ;;
8333             esac
8334         fi
8335 fi
8336
8337 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
8338
8339
8340
8341
8342
8343 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
8344 if test x"$ax_pthread_ok" = xyes; then
8345
8346 $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
8347
8348         :
8349 else
8350         ax_pthread_ok=no
8351
8352 fi
8353 ac_ext=c
8354 ac_cpp='$CPP $CPPFLAGS'
8355 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8356 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8357 ac_compiler_gnu=$ac_cv_c_compiler_gnu
8358
8359         # set thread flags
8360
8361 # Some platforms use these, so just define them.  They can't hurt if they
8362 # are not supported.  For example, on Solaris -D_POSIX_PTHREAD_SEMANTICS
8363 # enables 5-arg getpwuid_r, among other things.
8364 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
8365
8366 # Check for *_r functions
8367 _CFLAGS="$CFLAGS"
8368 _LIBS="$LIBS"
8369 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
8370 LIBS="$LIBS $PTHREAD_LIBS"
8371
8372 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
8373 if test "x$ac_cv_header_pthread_h" = xyes; then :
8374
8375 else
8376   as_fn_error $? "
8377 pthread.h not found;  use --disable-thread-safety to disable thread safety" "$LINENO" 5
8378 fi
8379
8380
8381
8382 for ac_func in strerror_r getpwuid_r gethostbyname_r
8383 do :
8384   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8385 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8386 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
8387   cat >>confdefs.h <<_ACEOF
8388 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
8389 _ACEOF
8390
8391 fi
8392 done
8393
8394
8395 # Do test here with the proper thread flags
8396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns int" >&5
8397 $as_echo_n "checking whether strerror_r returns int... " >&6; }
8398 if ${pgac_cv_func_strerror_r_int+:} false; then :
8399   $as_echo_n "(cached) " >&6
8400 else
8401   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8402 /* end confdefs.h.  */
8403 #include <string.h>
8404 int
8405 main ()
8406 {
8407 #ifndef _AIX
8408 int strerror_r(int, char *, size_t);
8409 #else
8410 /* Older AIX has 'int' for the third argument so we don't test the args. */
8411 int strerror_r();
8412 #endif
8413   ;
8414   return 0;
8415 }
8416 _ACEOF
8417 if ac_fn_c_try_compile "$LINENO"; then :
8418   pgac_cv_func_strerror_r_int=yes
8419 else
8420   pgac_cv_func_strerror_r_int=no
8421 fi
8422 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8423 fi
8424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_strerror_r_int" >&5
8425 $as_echo "$pgac_cv_func_strerror_r_int" >&6; }
8426 if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
8427
8428 $as_echo "#define STRERROR_R_INT 1" >>confdefs.h
8429
8430 fi
8431
8432
8433 CFLAGS="$_CFLAGS"
8434 LIBS="$_LIBS"
8435
8436
8437 else
8438    # else
8439 # do not use values from template file
8440 PTHREAD_CFLAGS=
8441 PTHREAD_LIBS=
8442
8443 fi # fi
8444
8445
8446
8447
8448
8449 ##
8450 ## Libraries
8451 ##
8452 ## Most libraries are included only if they demonstrably provide a function
8453 ## we need, but libm is an exception: always include it, because there are
8454 ## too many compilers that play cute optimization games that will break
8455 ## probes for standard functions such as pow().
8456 ##
8457
8458 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
8459 $as_echo_n "checking for main in -lm... " >&6; }
8460 if ${ac_cv_lib_m_main+:} false; then :
8461   $as_echo_n "(cached) " >&6
8462 else
8463   ac_check_lib_save_LIBS=$LIBS
8464 LIBS="-lm  $LIBS"
8465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8466 /* end confdefs.h.  */
8467
8468
8469 int
8470 main ()
8471 {
8472 return main ();
8473   ;
8474   return 0;
8475 }
8476 _ACEOF
8477 if ac_fn_c_try_link "$LINENO"; then :
8478   ac_cv_lib_m_main=yes
8479 else
8480   ac_cv_lib_m_main=no
8481 fi
8482 rm -f core conftest.err conftest.$ac_objext \
8483     conftest$ac_exeext conftest.$ac_ext
8484 LIBS=$ac_check_lib_save_LIBS
8485 fi
8486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
8487 $as_echo "$ac_cv_lib_m_main" >&6; }
8488 if test "x$ac_cv_lib_m_main" = xyes; then :
8489   cat >>confdefs.h <<_ACEOF
8490 #define HAVE_LIBM 1
8491 _ACEOF
8492
8493   LIBS="-lm $LIBS"
8494
8495 fi
8496
8497 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setproctitle" >&5
8498 $as_echo_n "checking for library containing setproctitle... " >&6; }
8499 if ${ac_cv_search_setproctitle+:} false; then :
8500   $as_echo_n "(cached) " >&6
8501 else
8502   ac_func_search_save_LIBS=$LIBS
8503 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8504 /* end confdefs.h.  */
8505
8506 /* Override any GCC internal prototype to avoid an error.
8507    Use char because int might match the return type of a GCC
8508    builtin and then its argument prototype would still apply.  */
8509 #ifdef __cplusplus
8510 extern "C"
8511 #endif
8512 char setproctitle ();
8513 int
8514 main ()
8515 {
8516 return setproctitle ();
8517   ;
8518   return 0;
8519 }
8520 _ACEOF
8521 for ac_lib in '' util; do
8522   if test -z "$ac_lib"; then
8523     ac_res="none required"
8524   else
8525     ac_res=-l$ac_lib
8526     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8527   fi
8528   if ac_fn_c_try_link "$LINENO"; then :
8529   ac_cv_search_setproctitle=$ac_res
8530 fi
8531 rm -f core conftest.err conftest.$ac_objext \
8532     conftest$ac_exeext
8533   if ${ac_cv_search_setproctitle+:} false; then :
8534   break
8535 fi
8536 done
8537 if ${ac_cv_search_setproctitle+:} false; then :
8538
8539 else
8540   ac_cv_search_setproctitle=no
8541 fi
8542 rm conftest.$ac_ext
8543 LIBS=$ac_func_search_save_LIBS
8544 fi
8545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setproctitle" >&5
8546 $as_echo "$ac_cv_search_setproctitle" >&6; }
8547 ac_res=$ac_cv_search_setproctitle
8548 if test "$ac_res" != no; then :
8549   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8550
8551 fi
8552
8553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
8554 $as_echo_n "checking for library containing dlopen... " >&6; }
8555 if ${ac_cv_search_dlopen+:} false; then :
8556   $as_echo_n "(cached) " >&6
8557 else
8558   ac_func_search_save_LIBS=$LIBS
8559 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8560 /* end confdefs.h.  */
8561
8562 /* Override any GCC internal prototype to avoid an error.
8563    Use char because int might match the return type of a GCC
8564    builtin and then its argument prototype would still apply.  */
8565 #ifdef __cplusplus
8566 extern "C"
8567 #endif
8568 char dlopen ();
8569 int
8570 main ()
8571 {
8572 return dlopen ();
8573   ;
8574   return 0;
8575 }
8576 _ACEOF
8577 for ac_lib in '' dl; do
8578   if test -z "$ac_lib"; then
8579     ac_res="none required"
8580   else
8581     ac_res=-l$ac_lib
8582     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8583   fi
8584   if ac_fn_c_try_link "$LINENO"; then :
8585   ac_cv_search_dlopen=$ac_res
8586 fi
8587 rm -f core conftest.err conftest.$ac_objext \
8588     conftest$ac_exeext
8589   if ${ac_cv_search_dlopen+:} false; then :
8590   break
8591 fi
8592 done
8593 if ${ac_cv_search_dlopen+:} false; then :
8594
8595 else
8596   ac_cv_search_dlopen=no
8597 fi
8598 rm conftest.$ac_ext
8599 LIBS=$ac_func_search_save_LIBS
8600 fi
8601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
8602 $as_echo "$ac_cv_search_dlopen" >&6; }
8603 ac_res=$ac_cv_search_dlopen
8604 if test "$ac_res" != no; then :
8605   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8606
8607 fi
8608
8609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
8610 $as_echo_n "checking for library containing socket... " >&6; }
8611 if ${ac_cv_search_socket+:} false; then :
8612   $as_echo_n "(cached) " >&6
8613 else
8614   ac_func_search_save_LIBS=$LIBS
8615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8616 /* end confdefs.h.  */
8617
8618 /* Override any GCC internal prototype to avoid an error.
8619    Use char because int might match the return type of a GCC
8620    builtin and then its argument prototype would still apply.  */
8621 #ifdef __cplusplus
8622 extern "C"
8623 #endif
8624 char socket ();
8625 int
8626 main ()
8627 {
8628 return socket ();
8629   ;
8630   return 0;
8631 }
8632 _ACEOF
8633 for ac_lib in '' socket ws2_32; do
8634   if test -z "$ac_lib"; then
8635     ac_res="none required"
8636   else
8637     ac_res=-l$ac_lib
8638     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8639   fi
8640   if ac_fn_c_try_link "$LINENO"; then :
8641   ac_cv_search_socket=$ac_res
8642 fi
8643 rm -f core conftest.err conftest.$ac_objext \
8644     conftest$ac_exeext
8645   if ${ac_cv_search_socket+:} false; then :
8646   break
8647 fi
8648 done
8649 if ${ac_cv_search_socket+:} false; then :
8650
8651 else
8652   ac_cv_search_socket=no
8653 fi
8654 rm conftest.$ac_ext
8655 LIBS=$ac_func_search_save_LIBS
8656 fi
8657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
8658 $as_echo "$ac_cv_search_socket" >&6; }
8659 ac_res=$ac_cv_search_socket
8660 if test "$ac_res" != no; then :
8661   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8662
8663 fi
8664
8665 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shl_load" >&5
8666 $as_echo_n "checking for library containing shl_load... " >&6; }
8667 if ${ac_cv_search_shl_load+:} false; then :
8668   $as_echo_n "(cached) " >&6
8669 else
8670   ac_func_search_save_LIBS=$LIBS
8671 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8672 /* end confdefs.h.  */
8673
8674 /* Override any GCC internal prototype to avoid an error.
8675    Use char because int might match the return type of a GCC
8676    builtin and then its argument prototype would still apply.  */
8677 #ifdef __cplusplus
8678 extern "C"
8679 #endif
8680 char shl_load ();
8681 int
8682 main ()
8683 {
8684 return shl_load ();
8685   ;
8686   return 0;
8687 }
8688 _ACEOF
8689 for ac_lib in '' dld; do
8690   if test -z "$ac_lib"; then
8691     ac_res="none required"
8692   else
8693     ac_res=-l$ac_lib
8694     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8695   fi
8696   if ac_fn_c_try_link "$LINENO"; then :
8697   ac_cv_search_shl_load=$ac_res
8698 fi
8699 rm -f core conftest.err conftest.$ac_objext \
8700     conftest$ac_exeext
8701   if ${ac_cv_search_shl_load+:} false; then :
8702   break
8703 fi
8704 done
8705 if ${ac_cv_search_shl_load+:} false; then :
8706
8707 else
8708   ac_cv_search_shl_load=no
8709 fi
8710 rm conftest.$ac_ext
8711 LIBS=$ac_func_search_save_LIBS
8712 fi
8713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shl_load" >&5
8714 $as_echo "$ac_cv_search_shl_load" >&6; }
8715 ac_res=$ac_cv_search_shl_load
8716 if test "$ac_res" != no; then :
8717   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8718
8719 fi
8720
8721 # We only use libld in port/dynloader/aix.c
8722 case $host_os in
8723      aix*)
8724         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing ldopen" >&5
8725 $as_echo_n "checking for library containing ldopen... " >&6; }
8726 if ${ac_cv_search_ldopen+:} false; then :
8727   $as_echo_n "(cached) " >&6
8728 else
8729   ac_func_search_save_LIBS=$LIBS
8730 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8731 /* end confdefs.h.  */
8732
8733 /* Override any GCC internal prototype to avoid an error.
8734    Use char because int might match the return type of a GCC
8735    builtin and then its argument prototype would still apply.  */
8736 #ifdef __cplusplus
8737 extern "C"
8738 #endif
8739 char ldopen ();
8740 int
8741 main ()
8742 {
8743 return ldopen ();
8744   ;
8745   return 0;
8746 }
8747 _ACEOF
8748 for ac_lib in '' ld; do
8749   if test -z "$ac_lib"; then
8750     ac_res="none required"
8751   else
8752     ac_res=-l$ac_lib
8753     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8754   fi
8755   if ac_fn_c_try_link "$LINENO"; then :
8756   ac_cv_search_ldopen=$ac_res
8757 fi
8758 rm -f core conftest.err conftest.$ac_objext \
8759     conftest$ac_exeext
8760   if ${ac_cv_search_ldopen+:} false; then :
8761   break
8762 fi
8763 done
8764 if ${ac_cv_search_ldopen+:} false; then :
8765
8766 else
8767   ac_cv_search_ldopen=no
8768 fi
8769 rm conftest.$ac_ext
8770 LIBS=$ac_func_search_save_LIBS
8771 fi
8772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_ldopen" >&5
8773 $as_echo "$ac_cv_search_ldopen" >&6; }
8774 ac_res=$ac_cv_search_ldopen
8775 if test "$ac_res" != no; then :
8776   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8777
8778 fi
8779
8780         ;;
8781 esac
8782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getopt_long" >&5
8783 $as_echo_n "checking for library containing getopt_long... " >&6; }
8784 if ${ac_cv_search_getopt_long+:} false; then :
8785   $as_echo_n "(cached) " >&6
8786 else
8787   ac_func_search_save_LIBS=$LIBS
8788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8789 /* end confdefs.h.  */
8790
8791 /* Override any GCC internal prototype to avoid an error.
8792    Use char because int might match the return type of a GCC
8793    builtin and then its argument prototype would still apply.  */
8794 #ifdef __cplusplus
8795 extern "C"
8796 #endif
8797 char getopt_long ();
8798 int
8799 main ()
8800 {
8801 return getopt_long ();
8802   ;
8803   return 0;
8804 }
8805 _ACEOF
8806 for ac_lib in '' getopt gnugetopt; do
8807   if test -z "$ac_lib"; then
8808     ac_res="none required"
8809   else
8810     ac_res=-l$ac_lib
8811     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8812   fi
8813   if ac_fn_c_try_link "$LINENO"; then :
8814   ac_cv_search_getopt_long=$ac_res
8815 fi
8816 rm -f core conftest.err conftest.$ac_objext \
8817     conftest$ac_exeext
8818   if ${ac_cv_search_getopt_long+:} false; then :
8819   break
8820 fi
8821 done
8822 if ${ac_cv_search_getopt_long+:} false; then :
8823
8824 else
8825   ac_cv_search_getopt_long=no
8826 fi
8827 rm conftest.$ac_ext
8828 LIBS=$ac_func_search_save_LIBS
8829 fi
8830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getopt_long" >&5
8831 $as_echo "$ac_cv_search_getopt_long" >&6; }
8832 ac_res=$ac_cv_search_getopt_long
8833 if test "$ac_res" != no; then :
8834   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8835
8836 fi
8837
8838 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
8839 $as_echo_n "checking for library containing crypt... " >&6; }
8840 if ${ac_cv_search_crypt+:} false; then :
8841   $as_echo_n "(cached) " >&6
8842 else
8843   ac_func_search_save_LIBS=$LIBS
8844 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8845 /* end confdefs.h.  */
8846
8847 /* Override any GCC internal prototype to avoid an error.
8848    Use char because int might match the return type of a GCC
8849    builtin and then its argument prototype would still apply.  */
8850 #ifdef __cplusplus
8851 extern "C"
8852 #endif
8853 char crypt ();
8854 int
8855 main ()
8856 {
8857 return crypt ();
8858   ;
8859   return 0;
8860 }
8861 _ACEOF
8862 for ac_lib in '' crypt; do
8863   if test -z "$ac_lib"; then
8864     ac_res="none required"
8865   else
8866     ac_res=-l$ac_lib
8867     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8868   fi
8869   if ac_fn_c_try_link "$LINENO"; then :
8870   ac_cv_search_crypt=$ac_res
8871 fi
8872 rm -f core conftest.err conftest.$ac_objext \
8873     conftest$ac_exeext
8874   if ${ac_cv_search_crypt+:} false; then :
8875   break
8876 fi
8877 done
8878 if ${ac_cv_search_crypt+:} false; then :
8879
8880 else
8881   ac_cv_search_crypt=no
8882 fi
8883 rm conftest.$ac_ext
8884 LIBS=$ac_func_search_save_LIBS
8885 fi
8886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
8887 $as_echo "$ac_cv_search_crypt" >&6; }
8888 ac_res=$ac_cv_search_crypt
8889 if test "$ac_res" != no; then :
8890   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8891
8892 fi
8893
8894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
8895 $as_echo_n "checking for library containing shm_open... " >&6; }
8896 if ${ac_cv_search_shm_open+:} false; then :
8897   $as_echo_n "(cached) " >&6
8898 else
8899   ac_func_search_save_LIBS=$LIBS
8900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8901 /* end confdefs.h.  */
8902
8903 /* Override any GCC internal prototype to avoid an error.
8904    Use char because int might match the return type of a GCC
8905    builtin and then its argument prototype would still apply.  */
8906 #ifdef __cplusplus
8907 extern "C"
8908 #endif
8909 char shm_open ();
8910 int
8911 main ()
8912 {
8913 return shm_open ();
8914   ;
8915   return 0;
8916 }
8917 _ACEOF
8918 for ac_lib in '' rt; do
8919   if test -z "$ac_lib"; then
8920     ac_res="none required"
8921   else
8922     ac_res=-l$ac_lib
8923     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8924   fi
8925   if ac_fn_c_try_link "$LINENO"; then :
8926   ac_cv_search_shm_open=$ac_res
8927 fi
8928 rm -f core conftest.err conftest.$ac_objext \
8929     conftest$ac_exeext
8930   if ${ac_cv_search_shm_open+:} false; then :
8931   break
8932 fi
8933 done
8934 if ${ac_cv_search_shm_open+:} false; then :
8935
8936 else
8937   ac_cv_search_shm_open=no
8938 fi
8939 rm conftest.$ac_ext
8940 LIBS=$ac_func_search_save_LIBS
8941 fi
8942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
8943 $as_echo "$ac_cv_search_shm_open" >&6; }
8944 ac_res=$ac_cv_search_shm_open
8945 if test "$ac_res" != no; then :
8946   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8947
8948 fi
8949
8950 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_unlink" >&5
8951 $as_echo_n "checking for library containing shm_unlink... " >&6; }
8952 if ${ac_cv_search_shm_unlink+:} false; then :
8953   $as_echo_n "(cached) " >&6
8954 else
8955   ac_func_search_save_LIBS=$LIBS
8956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8957 /* end confdefs.h.  */
8958
8959 /* Override any GCC internal prototype to avoid an error.
8960    Use char because int might match the return type of a GCC
8961    builtin and then its argument prototype would still apply.  */
8962 #ifdef __cplusplus
8963 extern "C"
8964 #endif
8965 char shm_unlink ();
8966 int
8967 main ()
8968 {
8969 return shm_unlink ();
8970   ;
8971   return 0;
8972 }
8973 _ACEOF
8974 for ac_lib in '' rt; do
8975   if test -z "$ac_lib"; then
8976     ac_res="none required"
8977   else
8978     ac_res=-l$ac_lib
8979     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8980   fi
8981   if ac_fn_c_try_link "$LINENO"; then :
8982   ac_cv_search_shm_unlink=$ac_res
8983 fi
8984 rm -f core conftest.err conftest.$ac_objext \
8985     conftest$ac_exeext
8986   if ${ac_cv_search_shm_unlink+:} false; then :
8987   break
8988 fi
8989 done
8990 if ${ac_cv_search_shm_unlink+:} false; then :
8991
8992 else
8993   ac_cv_search_shm_unlink=no
8994 fi
8995 rm conftest.$ac_ext
8996 LIBS=$ac_func_search_save_LIBS
8997 fi
8998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_unlink" >&5
8999 $as_echo "$ac_cv_search_shm_unlink" >&6; }
9000 ac_res=$ac_cv_search_shm_unlink
9001 if test "$ac_res" != no; then :
9002   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9003
9004 fi
9005
9006 # Solaris:
9007 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5
9008 $as_echo_n "checking for library containing fdatasync... " >&6; }
9009 if ${ac_cv_search_fdatasync+:} false; then :
9010   $as_echo_n "(cached) " >&6
9011 else
9012   ac_func_search_save_LIBS=$LIBS
9013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9014 /* end confdefs.h.  */
9015
9016 /* Override any GCC internal prototype to avoid an error.
9017    Use char because int might match the return type of a GCC
9018    builtin and then its argument prototype would still apply.  */
9019 #ifdef __cplusplus
9020 extern "C"
9021 #endif
9022 char fdatasync ();
9023 int
9024 main ()
9025 {
9026 return fdatasync ();
9027   ;
9028   return 0;
9029 }
9030 _ACEOF
9031 for ac_lib in '' rt posix4; do
9032   if test -z "$ac_lib"; then
9033     ac_res="none required"
9034   else
9035     ac_res=-l$ac_lib
9036     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9037   fi
9038   if ac_fn_c_try_link "$LINENO"; then :
9039   ac_cv_search_fdatasync=$ac_res
9040 fi
9041 rm -f core conftest.err conftest.$ac_objext \
9042     conftest$ac_exeext
9043   if ${ac_cv_search_fdatasync+:} false; then :
9044   break
9045 fi
9046 done
9047 if ${ac_cv_search_fdatasync+:} false; then :
9048
9049 else
9050   ac_cv_search_fdatasync=no
9051 fi
9052 rm conftest.$ac_ext
9053 LIBS=$ac_func_search_save_LIBS
9054 fi
9055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5
9056 $as_echo "$ac_cv_search_fdatasync" >&6; }
9057 ac_res=$ac_cv_search_fdatasync
9058 if test "$ac_res" != no; then :
9059   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9060
9061 fi
9062
9063 # Required for thread_test.c on Solaris
9064 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sched_yield" >&5
9065 $as_echo_n "checking for library containing sched_yield... " >&6; }
9066 if ${ac_cv_search_sched_yield+:} false; then :
9067   $as_echo_n "(cached) " >&6
9068 else
9069   ac_func_search_save_LIBS=$LIBS
9070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9071 /* end confdefs.h.  */
9072
9073 /* Override any GCC internal prototype to avoid an error.
9074    Use char because int might match the return type of a GCC
9075    builtin and then its argument prototype would still apply.  */
9076 #ifdef __cplusplus
9077 extern "C"
9078 #endif
9079 char sched_yield ();
9080 int
9081 main ()
9082 {
9083 return sched_yield ();
9084   ;
9085   return 0;
9086 }
9087 _ACEOF
9088 for ac_lib in '' rt; do
9089   if test -z "$ac_lib"; then
9090     ac_res="none required"
9091   else
9092     ac_res=-l$ac_lib
9093     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9094   fi
9095   if ac_fn_c_try_link "$LINENO"; then :
9096   ac_cv_search_sched_yield=$ac_res
9097 fi
9098 rm -f core conftest.err conftest.$ac_objext \
9099     conftest$ac_exeext
9100   if ${ac_cv_search_sched_yield+:} false; then :
9101   break
9102 fi
9103 done
9104 if ${ac_cv_search_sched_yield+:} false; then :
9105
9106 else
9107   ac_cv_search_sched_yield=no
9108 fi
9109 rm conftest.$ac_ext
9110 LIBS=$ac_func_search_save_LIBS
9111 fi
9112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sched_yield" >&5
9113 $as_echo "$ac_cv_search_sched_yield" >&6; }
9114 ac_res=$ac_cv_search_sched_yield
9115 if test "$ac_res" != no; then :
9116   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9117
9118 fi
9119
9120 # Required for thread_test.c on Solaris 2.5:
9121 # Other ports use it too (HP-UX) so test unconditionally
9122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname_r" >&5
9123 $as_echo_n "checking for library containing gethostbyname_r... " >&6; }
9124 if ${ac_cv_search_gethostbyname_r+:} false; then :
9125   $as_echo_n "(cached) " >&6
9126 else
9127   ac_func_search_save_LIBS=$LIBS
9128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9129 /* end confdefs.h.  */
9130
9131 /* Override any GCC internal prototype to avoid an error.
9132    Use char because int might match the return type of a GCC
9133    builtin and then its argument prototype would still apply.  */
9134 #ifdef __cplusplus
9135 extern "C"
9136 #endif
9137 char gethostbyname_r ();
9138 int
9139 main ()
9140 {
9141 return gethostbyname_r ();
9142   ;
9143   return 0;
9144 }
9145 _ACEOF
9146 for ac_lib in '' nsl; do
9147   if test -z "$ac_lib"; then
9148     ac_res="none required"
9149   else
9150     ac_res=-l$ac_lib
9151     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9152   fi
9153   if ac_fn_c_try_link "$LINENO"; then :
9154   ac_cv_search_gethostbyname_r=$ac_res
9155 fi
9156 rm -f core conftest.err conftest.$ac_objext \
9157     conftest$ac_exeext
9158   if ${ac_cv_search_gethostbyname_r+:} false; then :
9159   break
9160 fi
9161 done
9162 if ${ac_cv_search_gethostbyname_r+:} false; then :
9163
9164 else
9165   ac_cv_search_gethostbyname_r=no
9166 fi
9167 rm conftest.$ac_ext
9168 LIBS=$ac_func_search_save_LIBS
9169 fi
9170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname_r" >&5
9171 $as_echo "$ac_cv_search_gethostbyname_r" >&6; }
9172 ac_res=$ac_cv_search_gethostbyname_r
9173 if test "$ac_res" != no; then :
9174   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9175
9176 fi
9177
9178 # Cygwin:
9179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shmget" >&5
9180 $as_echo_n "checking for library containing shmget... " >&6; }
9181 if ${ac_cv_search_shmget+:} false; then :
9182   $as_echo_n "(cached) " >&6
9183 else
9184   ac_func_search_save_LIBS=$LIBS
9185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9186 /* end confdefs.h.  */
9187
9188 /* Override any GCC internal prototype to avoid an error.
9189    Use char because int might match the return type of a GCC
9190    builtin and then its argument prototype would still apply.  */
9191 #ifdef __cplusplus
9192 extern "C"
9193 #endif
9194 char shmget ();
9195 int
9196 main ()
9197 {
9198 return shmget ();
9199   ;
9200   return 0;
9201 }
9202 _ACEOF
9203 for ac_lib in '' cygipc; do
9204   if test -z "$ac_lib"; then
9205     ac_res="none required"
9206   else
9207     ac_res=-l$ac_lib
9208     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9209   fi
9210   if ac_fn_c_try_link "$LINENO"; then :
9211   ac_cv_search_shmget=$ac_res
9212 fi
9213 rm -f core conftest.err conftest.$ac_objext \
9214     conftest$ac_exeext
9215   if ${ac_cv_search_shmget+:} false; then :
9216   break
9217 fi
9218 done
9219 if ${ac_cv_search_shmget+:} false; then :
9220
9221 else
9222   ac_cv_search_shmget=no
9223 fi
9224 rm conftest.$ac_ext
9225 LIBS=$ac_func_search_save_LIBS
9226 fi
9227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shmget" >&5
9228 $as_echo "$ac_cv_search_shmget" >&6; }
9229 ac_res=$ac_cv_search_shmget
9230 if test "$ac_res" != no; then :
9231   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9232
9233 fi
9234
9235
9236 if test "$with_readline" = yes; then
9237
9238
9239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing readline" >&5
9240 $as_echo_n "checking for library containing readline... " >&6; }
9241 if ${pgac_cv_check_readline+:} false; then :
9242   $as_echo_n "(cached) " >&6
9243 else
9244   pgac_cv_check_readline=no
9245 pgac_save_LIBS=$LIBS
9246 if test x"$with_libedit_preferred" != x"yes"
9247 then    READLINE_ORDER="-lreadline -ledit"
9248 else    READLINE_ORDER="-ledit -lreadline"
9249 fi
9250 for pgac_rllib in $READLINE_ORDER ; do
9251   for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
9252     LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
9253     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9254 /* end confdefs.h.  */
9255
9256 /* Override any GCC internal prototype to avoid an error.
9257    Use char because int might match the return type of a GCC
9258    builtin and then its argument prototype would still apply.  */
9259 #ifdef __cplusplus
9260 extern "C"
9261 #endif
9262 char readline ();
9263 int
9264 main ()
9265 {
9266 return readline ();
9267   ;
9268   return 0;
9269 }
9270 _ACEOF
9271 if ac_fn_c_try_link "$LINENO"; then :
9272
9273       # Older NetBSD, OpenBSD, and Irix have a broken linker that does not
9274       # recognize dependent libraries; assume curses is needed if we didn't
9275       # find any dependency.
9276       case $host_os in
9277         netbsd* | openbsd* | irix*)
9278           if test x"$pgac_lib" = x"" ; then
9279             pgac_lib=" -lcurses"
9280           fi ;;
9281       esac
9282
9283       pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
9284       break
9285
9286 fi
9287 rm -f core conftest.err conftest.$ac_objext \
9288     conftest$ac_exeext conftest.$ac_ext
9289   done
9290   if test "$pgac_cv_check_readline" != no ; then
9291     break
9292   fi
9293 done
9294 LIBS=$pgac_save_LIBS
9295
9296 fi
9297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_readline" >&5
9298 $as_echo "$pgac_cv_check_readline" >&6; }
9299 if test "$pgac_cv_check_readline" != no ; then
9300   LIBS="$pgac_cv_check_readline $LIBS"
9301
9302 $as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
9303
9304 fi
9305
9306
9307   if test x"$pgac_cv_check_readline" = x"no"; then
9308     as_fn_error $? "readline library not found
9309 If you have readline already installed, see config.log for details on the
9310 failure.  It is possible the compiler isn't looking in the proper directory.
9311 Use --without-readline to disable readline support." "$LINENO" 5
9312   fi
9313 fi
9314
9315 if test "$with_zlib" = yes; then
9316   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5
9317 $as_echo_n "checking for inflate in -lz... " >&6; }
9318 if ${ac_cv_lib_z_inflate+:} false; then :
9319   $as_echo_n "(cached) " >&6
9320 else
9321   ac_check_lib_save_LIBS=$LIBS
9322 LIBS="-lz  $LIBS"
9323 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9324 /* end confdefs.h.  */
9325
9326 /* Override any GCC internal prototype to avoid an error.
9327    Use char because int might match the return type of a GCC
9328    builtin and then its argument prototype would still apply.  */
9329 #ifdef __cplusplus
9330 extern "C"
9331 #endif
9332 char inflate ();
9333 int
9334 main ()
9335 {
9336 return inflate ();
9337   ;
9338   return 0;
9339 }
9340 _ACEOF
9341 if ac_fn_c_try_link "$LINENO"; then :
9342   ac_cv_lib_z_inflate=yes
9343 else
9344   ac_cv_lib_z_inflate=no
9345 fi
9346 rm -f core conftest.err conftest.$ac_objext \
9347     conftest$ac_exeext conftest.$ac_ext
9348 LIBS=$ac_check_lib_save_LIBS
9349 fi
9350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5
9351 $as_echo "$ac_cv_lib_z_inflate" >&6; }
9352 if test "x$ac_cv_lib_z_inflate" = xyes; then :
9353   cat >>confdefs.h <<_ACEOF
9354 #define HAVE_LIBZ 1
9355 _ACEOF
9356
9357   LIBS="-lz $LIBS"
9358
9359 else
9360   as_fn_error $? "zlib library not found
9361 If you have zlib already installed, see config.log for details on the
9362 failure.  It is possible the compiler isn't looking in the proper directory.
9363 Use --without-zlib to disable zlib support." "$LINENO" 5
9364 fi
9365
9366 fi
9367
9368 if test "$enable_spinlocks" = yes; then
9369
9370 $as_echo "#define HAVE_SPINLOCKS 1" >>confdefs.h
9371
9372 else
9373   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9374 *** Not using spinlocks will cause poor performance." >&5
9375 $as_echo "$as_me: WARNING:
9376 *** Not using spinlocks will cause poor performance." >&2;}
9377 fi
9378
9379 if test "$enable_atomics" = yes; then
9380
9381 $as_echo "#define HAVE_ATOMICS 1" >>confdefs.h
9382
9383 else
9384   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9385 *** Not using atomic operations will cause poor performance." >&5
9386 $as_echo "$as_me: WARNING:
9387 *** Not using atomic operations will cause poor performance." >&2;}
9388 fi
9389
9390 if test "$with_gssapi" = yes ; then
9391   if test "$PORTNAME" != "win32"; then
9392     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gss_init_sec_context" >&5
9393 $as_echo_n "checking for library containing gss_init_sec_context... " >&6; }
9394 if ${ac_cv_search_gss_init_sec_context+:} false; then :
9395   $as_echo_n "(cached) " >&6
9396 else
9397   ac_func_search_save_LIBS=$LIBS
9398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9399 /* end confdefs.h.  */
9400
9401 /* Override any GCC internal prototype to avoid an error.
9402    Use char because int might match the return type of a GCC
9403    builtin and then its argument prototype would still apply.  */
9404 #ifdef __cplusplus
9405 extern "C"
9406 #endif
9407 char gss_init_sec_context ();
9408 int
9409 main ()
9410 {
9411 return gss_init_sec_context ();
9412   ;
9413   return 0;
9414 }
9415 _ACEOF
9416 for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'; do
9417   if test -z "$ac_lib"; then
9418     ac_res="none required"
9419   else
9420     ac_res=-l$ac_lib
9421     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9422   fi
9423   if ac_fn_c_try_link "$LINENO"; then :
9424   ac_cv_search_gss_init_sec_context=$ac_res
9425 fi
9426 rm -f core conftest.err conftest.$ac_objext \
9427     conftest$ac_exeext
9428   if ${ac_cv_search_gss_init_sec_context+:} false; then :
9429   break
9430 fi
9431 done
9432 if ${ac_cv_search_gss_init_sec_context+:} false; then :
9433
9434 else
9435   ac_cv_search_gss_init_sec_context=no
9436 fi
9437 rm conftest.$ac_ext
9438 LIBS=$ac_func_search_save_LIBS
9439 fi
9440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gss_init_sec_context" >&5
9441 $as_echo "$ac_cv_search_gss_init_sec_context" >&6; }
9442 ac_res=$ac_cv_search_gss_init_sec_context
9443 if test "$ac_res" != no; then :
9444   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9445
9446 else
9447   as_fn_error $? "could not find function 'gss_init_sec_context' required for GSSAPI" "$LINENO" 5
9448 fi
9449
9450   else
9451     LIBS="$LIBS -lgssapi32"
9452   fi
9453 fi
9454
9455 if test "$with_openssl" = yes ; then
9456     if test "$PORTNAME" != "win32"; then
9457      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_new_ex_data in -lcrypto" >&5
9458 $as_echo_n "checking for CRYPTO_new_ex_data in -lcrypto... " >&6; }
9459 if ${ac_cv_lib_crypto_CRYPTO_new_ex_data+:} false; then :
9460   $as_echo_n "(cached) " >&6
9461 else
9462   ac_check_lib_save_LIBS=$LIBS
9463 LIBS="-lcrypto  $LIBS"
9464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9465 /* end confdefs.h.  */
9466
9467 /* Override any GCC internal prototype to avoid an error.
9468    Use char because int might match the return type of a GCC
9469    builtin and then its argument prototype would still apply.  */
9470 #ifdef __cplusplus
9471 extern "C"
9472 #endif
9473 char CRYPTO_new_ex_data ();
9474 int
9475 main ()
9476 {
9477 return CRYPTO_new_ex_data ();
9478   ;
9479   return 0;
9480 }
9481 _ACEOF
9482 if ac_fn_c_try_link "$LINENO"; then :
9483   ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
9484 else
9485   ac_cv_lib_crypto_CRYPTO_new_ex_data=no
9486 fi
9487 rm -f core conftest.err conftest.$ac_objext \
9488     conftest$ac_exeext conftest.$ac_ext
9489 LIBS=$ac_check_lib_save_LIBS
9490 fi
9491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
9492 $as_echo "$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6; }
9493 if test "x$ac_cv_lib_crypto_CRYPTO_new_ex_data" = xyes; then :
9494   cat >>confdefs.h <<_ACEOF
9495 #define HAVE_LIBCRYPTO 1
9496 _ACEOF
9497
9498   LIBS="-lcrypto $LIBS"
9499
9500 else
9501   as_fn_error $? "library 'crypto' is required for OpenSSL" "$LINENO" 5
9502 fi
9503
9504      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_library_init in -lssl" >&5
9505 $as_echo_n "checking for SSL_library_init in -lssl... " >&6; }
9506 if ${ac_cv_lib_ssl_SSL_library_init+:} false; then :
9507   $as_echo_n "(cached) " >&6
9508 else
9509   ac_check_lib_save_LIBS=$LIBS
9510 LIBS="-lssl  $LIBS"
9511 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9512 /* end confdefs.h.  */
9513
9514 /* Override any GCC internal prototype to avoid an error.
9515    Use char because int might match the return type of a GCC
9516    builtin and then its argument prototype would still apply.  */
9517 #ifdef __cplusplus
9518 extern "C"
9519 #endif
9520 char SSL_library_init ();
9521 int
9522 main ()
9523 {
9524 return SSL_library_init ();
9525   ;
9526   return 0;
9527 }
9528 _ACEOF
9529 if ac_fn_c_try_link "$LINENO"; then :
9530   ac_cv_lib_ssl_SSL_library_init=yes
9531 else
9532   ac_cv_lib_ssl_SSL_library_init=no
9533 fi
9534 rm -f core conftest.err conftest.$ac_objext \
9535     conftest$ac_exeext conftest.$ac_ext
9536 LIBS=$ac_check_lib_save_LIBS
9537 fi
9538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_library_init" >&5
9539 $as_echo "$ac_cv_lib_ssl_SSL_library_init" >&6; }
9540 if test "x$ac_cv_lib_ssl_SSL_library_init" = xyes; then :
9541   cat >>confdefs.h <<_ACEOF
9542 #define HAVE_LIBSSL 1
9543 _ACEOF
9544
9545   LIBS="-lssl $LIBS"
9546
9547 else
9548   as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5
9549 fi
9550
9551   else
9552      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing CRYPTO_new_ex_data" >&5
9553 $as_echo_n "checking for library containing CRYPTO_new_ex_data... " >&6; }
9554 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
9555   $as_echo_n "(cached) " >&6
9556 else
9557   ac_func_search_save_LIBS=$LIBS
9558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9559 /* end confdefs.h.  */
9560
9561 /* Override any GCC internal prototype to avoid an error.
9562    Use char because int might match the return type of a GCC
9563    builtin and then its argument prototype would still apply.  */
9564 #ifdef __cplusplus
9565 extern "C"
9566 #endif
9567 char CRYPTO_new_ex_data ();
9568 int
9569 main ()
9570 {
9571 return CRYPTO_new_ex_data ();
9572   ;
9573   return 0;
9574 }
9575 _ACEOF
9576 for ac_lib in '' eay32 crypto; do
9577   if test -z "$ac_lib"; then
9578     ac_res="none required"
9579   else
9580     ac_res=-l$ac_lib
9581     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9582   fi
9583   if ac_fn_c_try_link "$LINENO"; then :
9584   ac_cv_search_CRYPTO_new_ex_data=$ac_res
9585 fi
9586 rm -f core conftest.err conftest.$ac_objext \
9587     conftest$ac_exeext
9588   if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
9589   break
9590 fi
9591 done
9592 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
9593
9594 else
9595   ac_cv_search_CRYPTO_new_ex_data=no
9596 fi
9597 rm conftest.$ac_ext
9598 LIBS=$ac_func_search_save_LIBS
9599 fi
9600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_CRYPTO_new_ex_data" >&5
9601 $as_echo "$ac_cv_search_CRYPTO_new_ex_data" >&6; }
9602 ac_res=$ac_cv_search_CRYPTO_new_ex_data
9603 if test "$ac_res" != no; then :
9604   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9605
9606 else
9607   as_fn_error $? "library 'eay32' or 'crypto' is required for OpenSSL" "$LINENO" 5
9608 fi
9609
9610      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_library_init" >&5
9611 $as_echo_n "checking for library containing SSL_library_init... " >&6; }
9612 if ${ac_cv_search_SSL_library_init+:} false; then :
9613   $as_echo_n "(cached) " >&6
9614 else
9615   ac_func_search_save_LIBS=$LIBS
9616 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9617 /* end confdefs.h.  */
9618
9619 /* Override any GCC internal prototype to avoid an error.
9620    Use char because int might match the return type of a GCC
9621    builtin and then its argument prototype would still apply.  */
9622 #ifdef __cplusplus
9623 extern "C"
9624 #endif
9625 char SSL_library_init ();
9626 int
9627 main ()
9628 {
9629 return SSL_library_init ();
9630   ;
9631   return 0;
9632 }
9633 _ACEOF
9634 for ac_lib in '' ssleay32 ssl; do
9635   if test -z "$ac_lib"; then
9636     ac_res="none required"
9637   else
9638     ac_res=-l$ac_lib
9639     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9640   fi
9641   if ac_fn_c_try_link "$LINENO"; then :
9642   ac_cv_search_SSL_library_init=$ac_res
9643 fi
9644 rm -f core conftest.err conftest.$ac_objext \
9645     conftest$ac_exeext
9646   if ${ac_cv_search_SSL_library_init+:} false; then :
9647   break
9648 fi
9649 done
9650 if ${ac_cv_search_SSL_library_init+:} false; then :
9651
9652 else
9653   ac_cv_search_SSL_library_init=no
9654 fi
9655 rm conftest.$ac_ext
9656 LIBS=$ac_func_search_save_LIBS
9657 fi
9658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_library_init" >&5
9659 $as_echo "$ac_cv_search_SSL_library_init" >&6; }
9660 ac_res=$ac_cv_search_SSL_library_init
9661 if test "$ac_res" != no; then :
9662   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9663
9664 else
9665   as_fn_error $? "library 'ssleay32' or 'ssl' is required for OpenSSL" "$LINENO" 5
9666 fi
9667
9668   fi
9669   for ac_func in SSL_get_current_compression
9670 do :
9671   ac_fn_c_check_func "$LINENO" "SSL_get_current_compression" "ac_cv_func_SSL_get_current_compression"
9672 if test "x$ac_cv_func_SSL_get_current_compression" = xyes; then :
9673   cat >>confdefs.h <<_ACEOF
9674 #define HAVE_SSL_GET_CURRENT_COMPRESSION 1
9675 _ACEOF
9676
9677 fi
9678 done
9679
9680 fi
9681
9682 if test "$with_pam" = yes ; then
9683   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_start in -lpam" >&5
9684 $as_echo_n "checking for pam_start in -lpam... " >&6; }
9685 if ${ac_cv_lib_pam_pam_start+:} false; then :
9686   $as_echo_n "(cached) " >&6
9687 else
9688   ac_check_lib_save_LIBS=$LIBS
9689 LIBS="-lpam  $LIBS"
9690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9691 /* end confdefs.h.  */
9692
9693 /* Override any GCC internal prototype to avoid an error.
9694    Use char because int might match the return type of a GCC
9695    builtin and then its argument prototype would still apply.  */
9696 #ifdef __cplusplus
9697 extern "C"
9698 #endif
9699 char pam_start ();
9700 int
9701 main ()
9702 {
9703 return pam_start ();
9704   ;
9705   return 0;
9706 }
9707 _ACEOF
9708 if ac_fn_c_try_link "$LINENO"; then :
9709   ac_cv_lib_pam_pam_start=yes
9710 else
9711   ac_cv_lib_pam_pam_start=no
9712 fi
9713 rm -f core conftest.err conftest.$ac_objext \
9714     conftest$ac_exeext conftest.$ac_ext
9715 LIBS=$ac_check_lib_save_LIBS
9716 fi
9717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_start" >&5
9718 $as_echo "$ac_cv_lib_pam_pam_start" >&6; }
9719 if test "x$ac_cv_lib_pam_pam_start" = xyes; then :
9720   cat >>confdefs.h <<_ACEOF
9721 #define HAVE_LIBPAM 1
9722 _ACEOF
9723
9724   LIBS="-lpam $LIBS"
9725
9726 else
9727   as_fn_error $? "library 'pam' is required for PAM" "$LINENO" 5
9728 fi
9729
9730 fi
9731
9732 if test "$with_libxml" = yes ; then
9733   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlSaveToBuffer in -lxml2" >&5
9734 $as_echo_n "checking for xmlSaveToBuffer in -lxml2... " >&6; }
9735 if ${ac_cv_lib_xml2_xmlSaveToBuffer+:} false; then :
9736   $as_echo_n "(cached) " >&6
9737 else
9738   ac_check_lib_save_LIBS=$LIBS
9739 LIBS="-lxml2  $LIBS"
9740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9741 /* end confdefs.h.  */
9742
9743 /* Override any GCC internal prototype to avoid an error.
9744    Use char because int might match the return type of a GCC
9745    builtin and then its argument prototype would still apply.  */
9746 #ifdef __cplusplus
9747 extern "C"
9748 #endif
9749 char xmlSaveToBuffer ();
9750 int
9751 main ()
9752 {
9753 return xmlSaveToBuffer ();
9754   ;
9755   return 0;
9756 }
9757 _ACEOF
9758 if ac_fn_c_try_link "$LINENO"; then :
9759   ac_cv_lib_xml2_xmlSaveToBuffer=yes
9760 else
9761   ac_cv_lib_xml2_xmlSaveToBuffer=no
9762 fi
9763 rm -f core conftest.err conftest.$ac_objext \
9764     conftest$ac_exeext conftest.$ac_ext
9765 LIBS=$ac_check_lib_save_LIBS
9766 fi
9767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlSaveToBuffer" >&5
9768 $as_echo "$ac_cv_lib_xml2_xmlSaveToBuffer" >&6; }
9769 if test "x$ac_cv_lib_xml2_xmlSaveToBuffer" = xyes; then :
9770   cat >>confdefs.h <<_ACEOF
9771 #define HAVE_LIBXML2 1
9772 _ACEOF
9773
9774   LIBS="-lxml2 $LIBS"
9775
9776 else
9777   as_fn_error $? "library 'xml2' (version >= 2.6.23) is required for XML support" "$LINENO" 5
9778 fi
9779
9780 fi
9781
9782 if test "$with_libxslt" = yes ; then
9783   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xsltCleanupGlobals in -lxslt" >&5
9784 $as_echo_n "checking for xsltCleanupGlobals in -lxslt... " >&6; }
9785 if ${ac_cv_lib_xslt_xsltCleanupGlobals+:} false; then :
9786   $as_echo_n "(cached) " >&6
9787 else
9788   ac_check_lib_save_LIBS=$LIBS
9789 LIBS="-lxslt  $LIBS"
9790 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9791 /* end confdefs.h.  */
9792
9793 /* Override any GCC internal prototype to avoid an error.
9794    Use char because int might match the return type of a GCC
9795    builtin and then its argument prototype would still apply.  */
9796 #ifdef __cplusplus
9797 extern "C"
9798 #endif
9799 char xsltCleanupGlobals ();
9800 int
9801 main ()
9802 {
9803 return xsltCleanupGlobals ();
9804   ;
9805   return 0;
9806 }
9807 _ACEOF
9808 if ac_fn_c_try_link "$LINENO"; then :
9809   ac_cv_lib_xslt_xsltCleanupGlobals=yes
9810 else
9811   ac_cv_lib_xslt_xsltCleanupGlobals=no
9812 fi
9813 rm -f core conftest.err conftest.$ac_objext \
9814     conftest$ac_exeext conftest.$ac_ext
9815 LIBS=$ac_check_lib_save_LIBS
9816 fi
9817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xslt_xsltCleanupGlobals" >&5
9818 $as_echo "$ac_cv_lib_xslt_xsltCleanupGlobals" >&6; }
9819 if test "x$ac_cv_lib_xslt_xsltCleanupGlobals" = xyes; then :
9820   cat >>confdefs.h <<_ACEOF
9821 #define HAVE_LIBXSLT 1
9822 _ACEOF
9823
9824   LIBS="-lxslt $LIBS"
9825
9826 else
9827   as_fn_error $? "library 'xslt' is required for XSLT support" "$LINENO" 5
9828 fi
9829
9830 fi
9831
9832 # Note: We can test for libldap_r only after we know PTHREAD_LIBS
9833 if test "$with_ldap" = yes ; then
9834   _LIBS="$LIBS"
9835   if test "$PORTNAME" != "win32"; then
9836     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap" >&5
9837 $as_echo_n "checking for ldap_bind in -lldap... " >&6; }
9838 if ${ac_cv_lib_ldap_ldap_bind+:} false; then :
9839   $as_echo_n "(cached) " >&6
9840 else
9841   ac_check_lib_save_LIBS=$LIBS
9842 LIBS="-lldap $EXTRA_LDAP_LIBS $LIBS"
9843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9844 /* end confdefs.h.  */
9845
9846 /* Override any GCC internal prototype to avoid an error.
9847    Use char because int might match the return type of a GCC
9848    builtin and then its argument prototype would still apply.  */
9849 #ifdef __cplusplus
9850 extern "C"
9851 #endif
9852 char ldap_bind ();
9853 int
9854 main ()
9855 {
9856 return ldap_bind ();
9857   ;
9858   return 0;
9859 }
9860 _ACEOF
9861 if ac_fn_c_try_link "$LINENO"; then :
9862   ac_cv_lib_ldap_ldap_bind=yes
9863 else
9864   ac_cv_lib_ldap_ldap_bind=no
9865 fi
9866 rm -f core conftest.err conftest.$ac_objext \
9867     conftest$ac_exeext conftest.$ac_ext
9868 LIBS=$ac_check_lib_save_LIBS
9869 fi
9870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_ldap_bind" >&5
9871 $as_echo "$ac_cv_lib_ldap_ldap_bind" >&6; }
9872 if test "x$ac_cv_lib_ldap_ldap_bind" = xyes; then :
9873   cat >>confdefs.h <<_ACEOF
9874 #define HAVE_LIBLDAP 1
9875 _ACEOF
9876
9877   LIBS="-lldap $LIBS"
9878
9879 else
9880   as_fn_error $? "library 'ldap' is required for LDAP" "$LINENO" 5
9881 fi
9882
9883     LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
9884     if test "$enable_thread_safety" = yes; then
9885       # on some platforms ldap_r fails to link without PTHREAD_LIBS
9886       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_simple_bind in -lldap_r" >&5
9887 $as_echo_n "checking for ldap_simple_bind in -lldap_r... " >&6; }
9888 if ${ac_cv_lib_ldap_r_ldap_simple_bind+:} false; then :
9889   $as_echo_n "(cached) " >&6
9890 else
9891   ac_check_lib_save_LIBS=$LIBS
9892 LIBS="-lldap_r $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
9893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9894 /* end confdefs.h.  */
9895
9896 /* Override any GCC internal prototype to avoid an error.
9897    Use char because int might match the return type of a GCC
9898    builtin and then its argument prototype would still apply.  */
9899 #ifdef __cplusplus
9900 extern "C"
9901 #endif
9902 char ldap_simple_bind ();
9903 int
9904 main ()
9905 {
9906 return ldap_simple_bind ();
9907   ;
9908   return 0;
9909 }
9910 _ACEOF
9911 if ac_fn_c_try_link "$LINENO"; then :
9912   ac_cv_lib_ldap_r_ldap_simple_bind=yes
9913 else
9914   ac_cv_lib_ldap_r_ldap_simple_bind=no
9915 fi
9916 rm -f core conftest.err conftest.$ac_objext \
9917     conftest$ac_exeext conftest.$ac_ext
9918 LIBS=$ac_check_lib_save_LIBS
9919 fi
9920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_r_ldap_simple_bind" >&5
9921 $as_echo "$ac_cv_lib_ldap_r_ldap_simple_bind" >&6; }
9922 if test "x$ac_cv_lib_ldap_r_ldap_simple_bind" = xyes; then :
9923   cat >>confdefs.h <<_ACEOF
9924 #define HAVE_LIBLDAP_R 1
9925 _ACEOF
9926
9927   LIBS="-lldap_r $LIBS"
9928
9929 else
9930   as_fn_error $? "library 'ldap_r' is required for LDAP" "$LINENO" 5
9931 fi
9932
9933       LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
9934     else
9935       LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
9936     fi
9937   else
9938     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lwldap32" >&5
9939 $as_echo_n "checking for ldap_bind in -lwldap32... " >&6; }
9940 if ${ac_cv_lib_wldap32_ldap_bind+:} false; then :
9941   $as_echo_n "(cached) " >&6
9942 else
9943   ac_check_lib_save_LIBS=$LIBS
9944 LIBS="-lwldap32  $LIBS"
9945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9946 /* end confdefs.h.  */
9947
9948 /* Override any GCC internal prototype to avoid an error.
9949    Use char because int might match the return type of a GCC
9950    builtin and then its argument prototype would still apply.  */
9951 #ifdef __cplusplus
9952 extern "C"
9953 #endif
9954 char ldap_bind ();
9955 int
9956 main ()
9957 {
9958 return ldap_bind ();
9959   ;
9960   return 0;
9961 }
9962 _ACEOF
9963 if ac_fn_c_try_link "$LINENO"; then :
9964   ac_cv_lib_wldap32_ldap_bind=yes
9965 else
9966   ac_cv_lib_wldap32_ldap_bind=no
9967 fi
9968 rm -f core conftest.err conftest.$ac_objext \
9969     conftest$ac_exeext conftest.$ac_ext
9970 LIBS=$ac_check_lib_save_LIBS
9971 fi
9972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wldap32_ldap_bind" >&5
9973 $as_echo "$ac_cv_lib_wldap32_ldap_bind" >&6; }
9974 if test "x$ac_cv_lib_wldap32_ldap_bind" = xyes; then :
9975   cat >>confdefs.h <<_ACEOF
9976 #define HAVE_LIBWLDAP32 1
9977 _ACEOF
9978
9979   LIBS="-lwldap32 $LIBS"
9980
9981 else
9982   as_fn_error $? "library 'wldap32' is required for LDAP" "$LINENO" 5
9983 fi
9984
9985     LDAP_LIBS_FE="-lwldap32"
9986     LDAP_LIBS_BE="-lwldap32"
9987   fi
9988   LIBS="$_LIBS"
9989 fi
9990
9991
9992
9993 # for contrib/sepgsql
9994 if test "$with_selinux" = yes; then
9995   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_compute_create_name in -lselinux" >&5
9996 $as_echo_n "checking for security_compute_create_name in -lselinux... " >&6; }
9997 if ${ac_cv_lib_selinux_security_compute_create_name+:} false; then :
9998   $as_echo_n "(cached) " >&6
9999 else
10000   ac_check_lib_save_LIBS=$LIBS
10001 LIBS="-lselinux  $LIBS"
10002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10003 /* end confdefs.h.  */
10004
10005 /* Override any GCC internal prototype to avoid an error.
10006    Use char because int might match the return type of a GCC
10007    builtin and then its argument prototype would still apply.  */
10008 #ifdef __cplusplus
10009 extern "C"
10010 #endif
10011 char security_compute_create_name ();
10012 int
10013 main ()
10014 {
10015 return security_compute_create_name ();
10016   ;
10017   return 0;
10018 }
10019 _ACEOF
10020 if ac_fn_c_try_link "$LINENO"; then :
10021   ac_cv_lib_selinux_security_compute_create_name=yes
10022 else
10023   ac_cv_lib_selinux_security_compute_create_name=no
10024 fi
10025 rm -f core conftest.err conftest.$ac_objext \
10026     conftest$ac_exeext conftest.$ac_ext
10027 LIBS=$ac_check_lib_save_LIBS
10028 fi
10029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_compute_create_name" >&5
10030 $as_echo "$ac_cv_lib_selinux_security_compute_create_name" >&6; }
10031 if test "x$ac_cv_lib_selinux_security_compute_create_name" = xyes; then :
10032   cat >>confdefs.h <<_ACEOF
10033 #define HAVE_LIBSELINUX 1
10034 _ACEOF
10035
10036   LIBS="-lselinux $LIBS"
10037
10038 else
10039   as_fn_error $? "library 'libselinux', version 2.1.10 or newer, is required for SELinux support" "$LINENO" 5
10040 fi
10041
10042 fi
10043
10044 # for contrib/uuid-ossp
10045 if test "$with_uuid" = bsd ; then
10046   # On BSD, the UUID functions are in libc
10047   ac_fn_c_check_func "$LINENO" "uuid_to_string" "ac_cv_func_uuid_to_string"
10048 if test "x$ac_cv_func_uuid_to_string" = xyes; then :
10049   UUID_LIBS=""
10050 else
10051   as_fn_error $? "BSD UUID functions are not present" "$LINENO" 5
10052 fi
10053
10054 elif test "$with_uuid" = e2fs ; then
10055   # On OS X, the UUID functions are in libc
10056   ac_fn_c_check_func "$LINENO" "uuid_generate" "ac_cv_func_uuid_generate"
10057 if test "x$ac_cv_func_uuid_generate" = xyes; then :
10058   UUID_LIBS=""
10059 else
10060   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5
10061 $as_echo_n "checking for uuid_generate in -luuid... " >&6; }
10062 if ${ac_cv_lib_uuid_uuid_generate+:} false; then :
10063   $as_echo_n "(cached) " >&6
10064 else
10065   ac_check_lib_save_LIBS=$LIBS
10066 LIBS="-luuid  $LIBS"
10067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10068 /* end confdefs.h.  */
10069
10070 /* Override any GCC internal prototype to avoid an error.
10071    Use char because int might match the return type of a GCC
10072    builtin and then its argument prototype would still apply.  */
10073 #ifdef __cplusplus
10074 extern "C"
10075 #endif
10076 char uuid_generate ();
10077 int
10078 main ()
10079 {
10080 return uuid_generate ();
10081   ;
10082   return 0;
10083 }
10084 _ACEOF
10085 if ac_fn_c_try_link "$LINENO"; then :
10086   ac_cv_lib_uuid_uuid_generate=yes
10087 else
10088   ac_cv_lib_uuid_uuid_generate=no
10089 fi
10090 rm -f core conftest.err conftest.$ac_objext \
10091     conftest$ac_exeext conftest.$ac_ext
10092 LIBS=$ac_check_lib_save_LIBS
10093 fi
10094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate" >&5
10095 $as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; }
10096 if test "x$ac_cv_lib_uuid_uuid_generate" = xyes; then :
10097   UUID_LIBS="-luuid"
10098 else
10099   as_fn_error $? "library 'uuid' is required for E2FS UUID" "$LINENO" 5
10100 fi
10101
10102 fi
10103
10104 elif test "$with_uuid" = ossp ; then
10105   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -lossp-uuid" >&5
10106 $as_echo_n "checking for uuid_export in -lossp-uuid... " >&6; }
10107 if ${ac_cv_lib_ossp_uuid_uuid_export+:} false; then :
10108   $as_echo_n "(cached) " >&6
10109 else
10110   ac_check_lib_save_LIBS=$LIBS
10111 LIBS="-lossp-uuid  $LIBS"
10112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10113 /* end confdefs.h.  */
10114
10115 /* Override any GCC internal prototype to avoid an error.
10116    Use char because int might match the return type of a GCC
10117    builtin and then its argument prototype would still apply.  */
10118 #ifdef __cplusplus
10119 extern "C"
10120 #endif
10121 char uuid_export ();
10122 int
10123 main ()
10124 {
10125 return uuid_export ();
10126   ;
10127   return 0;
10128 }
10129 _ACEOF
10130 if ac_fn_c_try_link "$LINENO"; then :
10131   ac_cv_lib_ossp_uuid_uuid_export=yes
10132 else
10133   ac_cv_lib_ossp_uuid_uuid_export=no
10134 fi
10135 rm -f core conftest.err conftest.$ac_objext \
10136     conftest$ac_exeext conftest.$ac_ext
10137 LIBS=$ac_check_lib_save_LIBS
10138 fi
10139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossp_uuid_uuid_export" >&5
10140 $as_echo "$ac_cv_lib_ossp_uuid_uuid_export" >&6; }
10141 if test "x$ac_cv_lib_ossp_uuid_uuid_export" = xyes; then :
10142   UUID_LIBS="-lossp-uuid"
10143 else
10144   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -luuid" >&5
10145 $as_echo_n "checking for uuid_export in -luuid... " >&6; }
10146 if ${ac_cv_lib_uuid_uuid_export+:} false; then :
10147   $as_echo_n "(cached) " >&6
10148 else
10149   ac_check_lib_save_LIBS=$LIBS
10150 LIBS="-luuid  $LIBS"
10151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10152 /* end confdefs.h.  */
10153
10154 /* Override any GCC internal prototype to avoid an error.
10155    Use char because int might match the return type of a GCC
10156    builtin and then its argument prototype would still apply.  */
10157 #ifdef __cplusplus
10158 extern "C"
10159 #endif
10160 char uuid_export ();
10161 int
10162 main ()
10163 {
10164 return uuid_export ();
10165   ;
10166   return 0;
10167 }
10168 _ACEOF
10169 if ac_fn_c_try_link "$LINENO"; then :
10170   ac_cv_lib_uuid_uuid_export=yes
10171 else
10172   ac_cv_lib_uuid_uuid_export=no
10173 fi
10174 rm -f core conftest.err conftest.$ac_objext \
10175     conftest$ac_exeext conftest.$ac_ext
10176 LIBS=$ac_check_lib_save_LIBS
10177 fi
10178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_export" >&5
10179 $as_echo "$ac_cv_lib_uuid_uuid_export" >&6; }
10180 if test "x$ac_cv_lib_uuid_uuid_export" = xyes; then :
10181   UUID_LIBS="-luuid"
10182 else
10183   as_fn_error $? "library 'ossp-uuid' or 'uuid' is required for OSSP UUID" "$LINENO" 5
10184 fi
10185
10186 fi
10187
10188 fi
10189
10190
10191
10192 ##
10193 ## Header files
10194 ##
10195
10196 for ac_header in atomic.h crypt.h dld.h fp_class.h getopt.h ieeefp.h ifaddrs.h langinfo.h mbarrier.h poll.h pwd.h sys/epoll.h sys/ioctl.h sys/ipc.h sys/poll.h sys/pstat.h sys/resource.h sys/select.h sys/sem.h sys/shm.h sys/socket.h sys/sockio.h sys/tas.h sys/time.h sys/un.h termios.h ucred.h utime.h wchar.h wctype.h
10197 do :
10198   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10199 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
10200 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
10201   cat >>confdefs.h <<_ACEOF
10202 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10203 _ACEOF
10204
10205 fi
10206
10207 done
10208
10209
10210 # On BSD, test for net/if.h will fail unless sys/socket.h
10211 # is included first.
10212 for ac_header in net/if.h
10213 do :
10214   ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
10215 #ifdef HAVE_SYS_SOCKET_H
10216 #include <sys/socket.h>
10217 #endif
10218
10219 "
10220 if test "x$ac_cv_header_net_if_h" = xyes; then :
10221   cat >>confdefs.h <<_ACEOF
10222 #define HAVE_NET_IF_H 1
10223 _ACEOF
10224
10225 fi
10226
10227 done
10228
10229
10230 # On OpenBSD, test for sys/ucred.h will fail unless sys/param.h
10231 # is included first.
10232 for ac_header in sys/ucred.h
10233 do :
10234   ac_fn_c_check_header_compile "$LINENO" "sys/ucred.h" "ac_cv_header_sys_ucred_h" "$ac_includes_default
10235 #include <sys/param.h>
10236
10237 "
10238 if test "x$ac_cv_header_sys_ucred_h" = xyes; then :
10239   cat >>confdefs.h <<_ACEOF
10240 #define HAVE_SYS_UCRED_H 1
10241 _ACEOF
10242
10243 fi
10244
10245 done
10246
10247
10248 # At least on IRIX, test for netinet/tcp.h will fail unless
10249 # netinet/in.h is included first.
10250 for ac_header in netinet/in.h
10251 do :
10252   ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
10253 if test "x$ac_cv_header_netinet_in_h" = xyes; then :
10254   cat >>confdefs.h <<_ACEOF
10255 #define HAVE_NETINET_IN_H 1
10256 _ACEOF
10257
10258 fi
10259
10260 done
10261
10262 for ac_header in netinet/tcp.h
10263 do :
10264   ac_fn_c_check_header_compile "$LINENO" "netinet/tcp.h" "ac_cv_header_netinet_tcp_h" "$ac_includes_default
10265 #ifdef HAVE_NETINET_IN_H
10266 #include <netinet/in.h>
10267 #endif
10268
10269 "
10270 if test "x$ac_cv_header_netinet_tcp_h" = xyes; then :
10271   cat >>confdefs.h <<_ACEOF
10272 #define HAVE_NETINET_TCP_H 1
10273 _ACEOF
10274
10275 fi
10276
10277 done
10278
10279
10280 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
10281   for ac_header in readline/readline.h
10282 do :
10283   ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
10284 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
10285   cat >>confdefs.h <<_ACEOF
10286 #define HAVE_READLINE_READLINE_H 1
10287 _ACEOF
10288
10289 else
10290   for ac_header in readline.h
10291 do :
10292   ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
10293 if test "x$ac_cv_header_readline_h" = xyes; then :
10294   cat >>confdefs.h <<_ACEOF
10295 #define HAVE_READLINE_H 1
10296 _ACEOF
10297
10298 else
10299   as_fn_error $? "readline header not found
10300 If you have readline already installed, see config.log for details on the
10301 failure.  It is possible the compiler isn't looking in the proper directory.
10302 Use --without-readline to disable readline support." "$LINENO" 5
10303 fi
10304
10305 done
10306
10307 fi
10308
10309 done
10310
10311   for ac_header in readline/history.h
10312 do :
10313   ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
10314 if test "x$ac_cv_header_readline_history_h" = xyes; then :
10315   cat >>confdefs.h <<_ACEOF
10316 #define HAVE_READLINE_HISTORY_H 1
10317 _ACEOF
10318
10319 else
10320   for ac_header in history.h
10321 do :
10322   ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
10323 if test "x$ac_cv_header_history_h" = xyes; then :
10324   cat >>confdefs.h <<_ACEOF
10325 #define HAVE_HISTORY_H 1
10326 _ACEOF
10327
10328 else
10329   as_fn_error $? "history header not found
10330 If you have readline already installed, see config.log for details on the
10331 failure.  It is possible the compiler isn't looking in the proper directory.
10332 Use --without-readline to disable readline support." "$LINENO" 5
10333 fi
10334
10335 done
10336
10337 fi
10338
10339 done
10340
10341 fi
10342
10343 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
10344 # Some installations of libedit usurp /usr/include/readline/, which seems
10345 # bad practice, since in combined installations readline will have its headers
10346 # there.  We might have to resort to AC_EGREP checks to make sure we found
10347 # the proper header...
10348   for ac_header in editline/readline.h
10349 do :
10350   ac_fn_c_check_header_mongrel "$LINENO" "editline/readline.h" "ac_cv_header_editline_readline_h" "$ac_includes_default"
10351 if test "x$ac_cv_header_editline_readline_h" = xyes; then :
10352   cat >>confdefs.h <<_ACEOF
10353 #define HAVE_EDITLINE_READLINE_H 1
10354 _ACEOF
10355
10356 else
10357   for ac_header in readline.h
10358 do :
10359   ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
10360 if test "x$ac_cv_header_readline_h" = xyes; then :
10361   cat >>confdefs.h <<_ACEOF
10362 #define HAVE_READLINE_H 1
10363 _ACEOF
10364
10365 else
10366   for ac_header in readline/readline.h
10367 do :
10368   ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
10369 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
10370   cat >>confdefs.h <<_ACEOF
10371 #define HAVE_READLINE_READLINE_H 1
10372 _ACEOF
10373
10374 else
10375   as_fn_error $? "readline header not found
10376 If you have libedit already installed, see config.log for details on the
10377 failure.  It is possible the compiler isn't looking in the proper directory.
10378 Use --without-readline to disable libedit support." "$LINENO" 5
10379 fi
10380
10381 done
10382
10383 fi
10384
10385 done
10386
10387 fi
10388
10389 done
10390
10391 # Note: in a libedit installation, history.h is sometimes a dummy, and may
10392 # not be there at all.  Hence, don't complain if not found.  We must check
10393 # though, since in yet other versions it is an independent header.
10394   for ac_header in editline/history.h
10395 do :
10396   ac_fn_c_check_header_mongrel "$LINENO" "editline/history.h" "ac_cv_header_editline_history_h" "$ac_includes_default"
10397 if test "x$ac_cv_header_editline_history_h" = xyes; then :
10398   cat >>confdefs.h <<_ACEOF
10399 #define HAVE_EDITLINE_HISTORY_H 1
10400 _ACEOF
10401
10402 else
10403   for ac_header in history.h
10404 do :
10405   ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
10406 if test "x$ac_cv_header_history_h" = xyes; then :
10407   cat >>confdefs.h <<_ACEOF
10408 #define HAVE_HISTORY_H 1
10409 _ACEOF
10410
10411 else
10412   for ac_header in readline/history.h
10413 do :
10414   ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
10415 if test "x$ac_cv_header_readline_history_h" = xyes; then :
10416   cat >>confdefs.h <<_ACEOF
10417 #define HAVE_READLINE_HISTORY_H 1
10418 _ACEOF
10419
10420 fi
10421
10422 done
10423
10424 fi
10425
10426 done
10427
10428 fi
10429
10430 done
10431
10432 fi
10433
10434 if test "$with_zlib" = yes; then
10435   ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
10436 if test "x$ac_cv_header_zlib_h" = xyes; then :
10437
10438 else
10439   as_fn_error $? "zlib header not found
10440 If you have zlib already installed, see config.log for details on the
10441 failure.  It is possible the compiler isn't looking in the proper directory.
10442 Use --without-zlib to disable zlib support." "$LINENO" 5
10443 fi
10444
10445
10446 fi
10447
10448 if test "$with_gssapi" = yes ; then
10449   for ac_header in gssapi/gssapi.h
10450 do :
10451   ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi.h" "ac_cv_header_gssapi_gssapi_h" "$ac_includes_default"
10452 if test "x$ac_cv_header_gssapi_gssapi_h" = xyes; then :
10453   cat >>confdefs.h <<_ACEOF
10454 #define HAVE_GSSAPI_GSSAPI_H 1
10455 _ACEOF
10456
10457 else
10458   for ac_header in gssapi.h
10459 do :
10460   ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
10461 if test "x$ac_cv_header_gssapi_h" = xyes; then :
10462   cat >>confdefs.h <<_ACEOF
10463 #define HAVE_GSSAPI_H 1
10464 _ACEOF
10465
10466 else
10467   as_fn_error $? "gssapi.h header file is required for GSSAPI" "$LINENO" 5
10468 fi
10469
10470 done
10471
10472 fi
10473
10474 done
10475
10476 fi
10477
10478 if test "$with_openssl" = yes ; then
10479   ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
10480 if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
10481
10482 else
10483   as_fn_error $? "header file <openssl/ssl.h> is required for OpenSSL" "$LINENO" 5
10484 fi
10485
10486
10487   ac_fn_c_check_header_mongrel "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default"
10488 if test "x$ac_cv_header_openssl_err_h" = xyes; then :
10489
10490 else
10491   as_fn_error $? "header file <openssl/err.h> is required for OpenSSL" "$LINENO" 5
10492 fi
10493
10494
10495 fi
10496
10497 if test "$with_pam" = yes ; then
10498   for ac_header in security/pam_appl.h
10499 do :
10500   ac_fn_c_check_header_mongrel "$LINENO" "security/pam_appl.h" "ac_cv_header_security_pam_appl_h" "$ac_includes_default"
10501 if test "x$ac_cv_header_security_pam_appl_h" = xyes; then :
10502   cat >>confdefs.h <<_ACEOF
10503 #define HAVE_SECURITY_PAM_APPL_H 1
10504 _ACEOF
10505
10506 else
10507   for ac_header in pam/pam_appl.h
10508 do :
10509   ac_fn_c_check_header_mongrel "$LINENO" "pam/pam_appl.h" "ac_cv_header_pam_pam_appl_h" "$ac_includes_default"
10510 if test "x$ac_cv_header_pam_pam_appl_h" = xyes; then :
10511   cat >>confdefs.h <<_ACEOF
10512 #define HAVE_PAM_PAM_APPL_H 1
10513 _ACEOF
10514
10515 else
10516   as_fn_error $? "header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." "$LINENO" 5
10517 fi
10518
10519 done
10520
10521 fi
10522
10523 done
10524
10525 fi
10526
10527 if test "$with_systemd" = yes ; then
10528   ac_fn_c_check_header_mongrel "$LINENO" "systemd/sd-daemon.h" "ac_cv_header_systemd_sd_daemon_h" "$ac_includes_default"
10529 if test "x$ac_cv_header_systemd_sd_daemon_h" = xyes; then :
10530
10531 else
10532   as_fn_error $? "header file <systemd/sd-daemon.h> is required for systemd support" "$LINENO" 5
10533 fi
10534
10535
10536 fi
10537
10538 if test "$with_libxml" = yes ; then
10539   ac_fn_c_check_header_mongrel "$LINENO" "libxml/parser.h" "ac_cv_header_libxml_parser_h" "$ac_includes_default"
10540 if test "x$ac_cv_header_libxml_parser_h" = xyes; then :
10541
10542 else
10543   as_fn_error $? "header file <libxml/parser.h> is required for XML support" "$LINENO" 5
10544 fi
10545
10546
10547 fi
10548
10549 if test "$with_libxslt" = yes ; then
10550   ac_fn_c_check_header_mongrel "$LINENO" "libxslt/xslt.h" "ac_cv_header_libxslt_xslt_h" "$ac_includes_default"
10551 if test "x$ac_cv_header_libxslt_xslt_h" = xyes; then :
10552
10553 else
10554   as_fn_error $? "header file <libxslt/xslt.h> is required for XSLT support" "$LINENO" 5
10555 fi
10556
10557
10558 fi
10559
10560 if test "$with_ldap" = yes ; then
10561   if test "$PORTNAME" != "win32"; then
10562      for ac_header in ldap.h
10563 do :
10564   ac_fn_c_check_header_mongrel "$LINENO" "ldap.h" "ac_cv_header_ldap_h" "$ac_includes_default"
10565 if test "x$ac_cv_header_ldap_h" = xyes; then :
10566   cat >>confdefs.h <<_ACEOF
10567 #define HAVE_LDAP_H 1
10568 _ACEOF
10569
10570 else
10571   as_fn_error $? "header file <ldap.h> is required for LDAP" "$LINENO" 5
10572 fi
10573
10574 done
10575
10576      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compatible LDAP implementation" >&5
10577 $as_echo_n "checking for compatible LDAP implementation... " >&6; }
10578 if ${pgac_cv_ldap_safe+:} false; then :
10579   $as_echo_n "(cached) " >&6
10580 else
10581   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10582 /* end confdefs.h.  */
10583 #include <ldap.h>
10584 #if !defined(LDAP_VENDOR_VERSION) || \
10585      (defined(LDAP_API_FEATURE_X_OPENLDAP) && \
10586       LDAP_VENDOR_VERSION >= 20424 && LDAP_VENDOR_VERSION <= 20431)
10587 choke me
10588 #endif
10589 int
10590 main ()
10591 {
10592
10593   ;
10594   return 0;
10595 }
10596 _ACEOF
10597 if ac_fn_c_try_compile "$LINENO"; then :
10598   pgac_cv_ldap_safe=yes
10599 else
10600   pgac_cv_ldap_safe=no
10601 fi
10602 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10603 fi
10604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_ldap_safe" >&5
10605 $as_echo "$pgac_cv_ldap_safe" >&6; }
10606
10607 if test "$pgac_cv_ldap_safe" != yes; then
10608   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
10609 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
10610 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
10611 *** also uses LDAP will crash on exit." >&5
10612 $as_echo "$as_me: WARNING:
10613 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
10614 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
10615 *** also uses LDAP will crash on exit." >&2;}
10616 fi
10617   else
10618      for ac_header in winldap.h
10619 do :
10620   ac_fn_c_check_header_compile "$LINENO" "winldap.h" "ac_cv_header_winldap_h" "$ac_includes_default
10621 #include <windows.h>
10622
10623 "
10624 if test "x$ac_cv_header_winldap_h" = xyes; then :
10625   cat >>confdefs.h <<_ACEOF
10626 #define HAVE_WINLDAP_H 1
10627 _ACEOF
10628
10629 else
10630   as_fn_error $? "header file <winldap.h> is required for LDAP" "$LINENO" 5
10631 fi
10632
10633 done
10634
10635   fi
10636 fi
10637
10638 if test "$with_bonjour" = yes ; then
10639   ac_fn_c_check_header_mongrel "$LINENO" "dns_sd.h" "ac_cv_header_dns_sd_h" "$ac_includes_default"
10640 if test "x$ac_cv_header_dns_sd_h" = xyes; then :
10641
10642 else
10643   as_fn_error $? "header file <dns_sd.h> is required for Bonjour" "$LINENO" 5
10644 fi
10645
10646
10647 fi
10648
10649 # for contrib/uuid-ossp
10650 if test "$with_uuid" = bsd ; then
10651   for ac_header in uuid.h
10652 do :
10653   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
10654 if test "x$ac_cv_header_uuid_h" = xyes; then :
10655   cat >>confdefs.h <<_ACEOF
10656 #define HAVE_UUID_H 1
10657 _ACEOF
10658  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10659 /* end confdefs.h.  */
10660 #include <uuid.h>
10661
10662 _ACEOF
10663 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10664   $EGREP "uuid_to_string" >/dev/null 2>&1; then :
10665
10666 else
10667   as_fn_error $? "header file <uuid.h> does not match BSD UUID library" "$LINENO" 5
10668 fi
10669 rm -f conftest*
10670
10671 else
10672   as_fn_error $? "header file <uuid.h> is required for BSD UUID" "$LINENO" 5
10673 fi
10674
10675 done
10676
10677 elif test "$with_uuid" = e2fs ; then
10678   for ac_header in uuid/uuid.h
10679 do :
10680   ac_fn_c_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
10681 if test "x$ac_cv_header_uuid_uuid_h" = xyes; then :
10682   cat >>confdefs.h <<_ACEOF
10683 #define HAVE_UUID_UUID_H 1
10684 _ACEOF
10685  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10686 /* end confdefs.h.  */
10687 #include <uuid/uuid.h>
10688
10689 _ACEOF
10690 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10691   $EGREP "uuid_generate" >/dev/null 2>&1; then :
10692
10693 else
10694   as_fn_error $? "header file <uuid/uuid.h> does not match E2FS UUID library" "$LINENO" 5
10695 fi
10696 rm -f conftest*
10697
10698 else
10699   for ac_header in uuid.h
10700 do :
10701   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
10702 if test "x$ac_cv_header_uuid_h" = xyes; then :
10703   cat >>confdefs.h <<_ACEOF
10704 #define HAVE_UUID_H 1
10705 _ACEOF
10706  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10707 /* end confdefs.h.  */
10708 #include <uuid.h>
10709
10710 _ACEOF
10711 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10712   $EGREP "uuid_generate" >/dev/null 2>&1; then :
10713
10714 else
10715   as_fn_error $? "header file <uuid.h> does not match E2FS UUID library" "$LINENO" 5
10716 fi
10717 rm -f conftest*
10718
10719 else
10720   as_fn_error $? "header file <uuid/uuid.h> or <uuid.h> is required for E2FS UUID" "$LINENO" 5
10721 fi
10722
10723 done
10724
10725 fi
10726
10727 done
10728
10729 elif test "$with_uuid" = ossp ; then
10730   for ac_header in ossp/uuid.h
10731 do :
10732   ac_fn_c_check_header_mongrel "$LINENO" "ossp/uuid.h" "ac_cv_header_ossp_uuid_h" "$ac_includes_default"
10733 if test "x$ac_cv_header_ossp_uuid_h" = xyes; then :
10734   cat >>confdefs.h <<_ACEOF
10735 #define HAVE_OSSP_UUID_H 1
10736 _ACEOF
10737  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10738 /* end confdefs.h.  */
10739 #include <ossp/uuid.h>
10740
10741 _ACEOF
10742 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10743   $EGREP "uuid_export" >/dev/null 2>&1; then :
10744
10745 else
10746   as_fn_error $? "header file <ossp/uuid.h> does not match OSSP UUID library" "$LINENO" 5
10747 fi
10748 rm -f conftest*
10749
10750 else
10751   for ac_header in uuid.h
10752 do :
10753   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
10754 if test "x$ac_cv_header_uuid_h" = xyes; then :
10755   cat >>confdefs.h <<_ACEOF
10756 #define HAVE_UUID_H 1
10757 _ACEOF
10758  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10759 /* end confdefs.h.  */
10760 #include <uuid.h>
10761
10762 _ACEOF
10763 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10764   $EGREP "uuid_export" >/dev/null 2>&1; then :
10765
10766 else
10767   as_fn_error $? "header file <uuid.h> does not match OSSP UUID library" "$LINENO" 5
10768 fi
10769 rm -f conftest*
10770
10771 else
10772   as_fn_error $? "header file <ossp/uuid.h> or <uuid.h> is required for OSSP UUID" "$LINENO" 5
10773 fi
10774
10775 done
10776
10777 fi
10778
10779 done
10780
10781 fi
10782
10783 if test "$PORTNAME" = "win32" ; then
10784    for ac_header in crtdefs.h
10785 do :
10786   ac_fn_c_check_header_mongrel "$LINENO" "crtdefs.h" "ac_cv_header_crtdefs_h" "$ac_includes_default"
10787 if test "x$ac_cv_header_crtdefs_h" = xyes; then :
10788   cat >>confdefs.h <<_ACEOF
10789 #define HAVE_CRTDEFS_H 1
10790 _ACEOF
10791
10792 fi
10793
10794 done
10795
10796 fi
10797
10798 ##
10799 ## Types, structures, compiler characteristics
10800 ##
10801
10802   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
10803 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
10804 if ${ac_cv_c_bigendian+:} false; then :
10805   $as_echo_n "(cached) " >&6
10806 else
10807   ac_cv_c_bigendian=unknown
10808     # See if we're dealing with a universal compiler.
10809     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10810 /* end confdefs.h.  */
10811 #ifndef __APPLE_CC__
10812                not a universal capable compiler
10813              #endif
10814              typedef int dummy;
10815
10816 _ACEOF
10817 if ac_fn_c_try_compile "$LINENO"; then :
10818
10819         # Check for potential -arch flags.  It is not universal unless
10820         # there are at least two -arch flags with different values.
10821         ac_arch=
10822         ac_prev=
10823         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
10824          if test -n "$ac_prev"; then
10825            case $ac_word in
10826              i?86 | x86_64 | ppc | ppc64)
10827                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
10828                  ac_arch=$ac_word
10829                else
10830                  ac_cv_c_bigendian=universal
10831                  break
10832                fi
10833                ;;
10834            esac
10835            ac_prev=
10836          elif test "x$ac_word" = "x-arch"; then
10837            ac_prev=arch
10838          fi
10839        done
10840 fi
10841 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10842     if test $ac_cv_c_bigendian = unknown; then
10843       # See if sys/param.h defines the BYTE_ORDER macro.
10844       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10845 /* end confdefs.h.  */
10846 #include <sys/types.h>
10847              #include <sys/param.h>
10848
10849 int
10850 main ()
10851 {
10852 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
10853                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
10854                      && LITTLE_ENDIAN)
10855               bogus endian macros
10856              #endif
10857
10858   ;
10859   return 0;
10860 }
10861 _ACEOF
10862 if ac_fn_c_try_compile "$LINENO"; then :
10863   # It does; now see whether it defined to BIG_ENDIAN or not.
10864          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10865 /* end confdefs.h.  */
10866 #include <sys/types.h>
10867                 #include <sys/param.h>
10868
10869 int
10870 main ()
10871 {
10872 #if BYTE_ORDER != BIG_ENDIAN
10873                  not big endian
10874                 #endif
10875
10876   ;
10877   return 0;
10878 }
10879 _ACEOF
10880 if ac_fn_c_try_compile "$LINENO"; then :
10881   ac_cv_c_bigendian=yes
10882 else
10883   ac_cv_c_bigendian=no
10884 fi
10885 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10886 fi
10887 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10888     fi
10889     if test $ac_cv_c_bigendian = unknown; then
10890       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
10891       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10892 /* end confdefs.h.  */
10893 #include <limits.h>
10894
10895 int
10896 main ()
10897 {
10898 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
10899               bogus endian macros
10900              #endif
10901
10902   ;
10903   return 0;
10904 }
10905 _ACEOF
10906 if ac_fn_c_try_compile "$LINENO"; then :
10907   # It does; now see whether it defined to _BIG_ENDIAN or not.
10908          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10909 /* end confdefs.h.  */
10910 #include <limits.h>
10911
10912 int
10913 main ()
10914 {
10915 #ifndef _BIG_ENDIAN
10916                  not big endian
10917                 #endif
10918
10919   ;
10920   return 0;
10921 }
10922 _ACEOF
10923 if ac_fn_c_try_compile "$LINENO"; then :
10924   ac_cv_c_bigendian=yes
10925 else
10926   ac_cv_c_bigendian=no
10927 fi
10928 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10929 fi
10930 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10931     fi
10932     if test $ac_cv_c_bigendian = unknown; then
10933       # Compile a test program.
10934       if test "$cross_compiling" = yes; then :
10935   # Try to guess by grepping values from an object file.
10936          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10937 /* end confdefs.h.  */
10938 short int ascii_mm[] =
10939                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
10940                 short int ascii_ii[] =
10941                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
10942                 int use_ascii (int i) {
10943                   return ascii_mm[i] + ascii_ii[i];
10944                 }
10945                 short int ebcdic_ii[] =
10946                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
10947                 short int ebcdic_mm[] =
10948                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
10949                 int use_ebcdic (int i) {
10950                   return ebcdic_mm[i] + ebcdic_ii[i];
10951                 }
10952                 extern int foo;
10953
10954 int
10955 main ()
10956 {
10957 return use_ascii (foo) == use_ebcdic (foo);
10958   ;
10959   return 0;
10960 }
10961 _ACEOF
10962 if ac_fn_c_try_compile "$LINENO"; then :
10963   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
10964               ac_cv_c_bigendian=yes
10965             fi
10966             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
10967               if test "$ac_cv_c_bigendian" = unknown; then
10968                 ac_cv_c_bigendian=no
10969               else
10970                 # finding both strings is unlikely to happen, but who knows?
10971                 ac_cv_c_bigendian=unknown
10972               fi
10973             fi
10974 fi
10975 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10976 else
10977   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10978 /* end confdefs.h.  */
10979 $ac_includes_default
10980 int
10981 main ()
10982 {
10983
10984              /* Are we little or big endian?  From Harbison&Steele.  */
10985              union
10986              {
10987                long int l;
10988                char c[sizeof (long int)];
10989              } u;
10990              u.l = 1;
10991              return u.c[sizeof (long int) - 1] == 1;
10992
10993   ;
10994   return 0;
10995 }
10996 _ACEOF
10997 if ac_fn_c_try_run "$LINENO"; then :
10998   ac_cv_c_bigendian=no
10999 else
11000   ac_cv_c_bigendian=yes
11001 fi
11002 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11003   conftest.$ac_objext conftest.beam conftest.$ac_ext
11004 fi
11005
11006     fi
11007 fi
11008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
11009 $as_echo "$ac_cv_c_bigendian" >&6; }
11010  case $ac_cv_c_bigendian in #(
11011    yes)
11012      $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
11013 ;; #(
11014    no)
11015       ;; #(
11016    universal)
11017
11018 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
11019
11020      ;; #(
11021    *)
11022      as_fn_error $? "unknown endianness
11023  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
11024  esac
11025
11026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
11027 $as_echo_n "checking for inline... " >&6; }
11028 if ${ac_cv_c_inline+:} false; then :
11029   $as_echo_n "(cached) " >&6
11030 else
11031   ac_cv_c_inline=no
11032 for ac_kw in inline __inline__ __inline; do
11033   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11034 /* end confdefs.h.  */
11035 #ifndef __cplusplus
11036 typedef int foo_t;
11037 static $ac_kw foo_t static_foo () {return 0; }
11038 $ac_kw foo_t foo () {return 0; }
11039 #endif
11040
11041 _ACEOF
11042 if ac_fn_c_try_compile "$LINENO"; then :
11043   ac_cv_c_inline=$ac_kw
11044 fi
11045 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11046   test "$ac_cv_c_inline" != no && break
11047 done
11048
11049 fi
11050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
11051 $as_echo "$ac_cv_c_inline" >&6; }
11052
11053 case $ac_cv_c_inline in
11054   inline | yes) ;;
11055   *)
11056     case $ac_cv_c_inline in
11057       no) ac_val=;;
11058       *) ac_val=$ac_cv_c_inline;;
11059     esac
11060     cat >>confdefs.h <<_ACEOF
11061 #ifndef __cplusplus
11062 #define inline $ac_val
11063 #endif
11064 _ACEOF
11065     ;;
11066 esac
11067
11068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for printf format archetype" >&5
11069 $as_echo_n "checking for printf format archetype... " >&6; }
11070 if ${pgac_cv_printf_archetype+:} false; then :
11071   $as_echo_n "(cached) " >&6
11072 else
11073   ac_save_c_werror_flag=$ac_c_werror_flag
11074 ac_c_werror_flag=yes
11075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11076 /* end confdefs.h.  */
11077 extern int
11078 pgac_write(int ignore, const char *fmt,...)
11079 __attribute__((format(gnu_printf, 2, 3)));
11080 int
11081 main ()
11082 {
11083
11084   ;
11085   return 0;
11086 }
11087 _ACEOF
11088 if ac_fn_c_try_compile "$LINENO"; then :
11089   pgac_cv_printf_archetype=gnu_printf
11090 else
11091   pgac_cv_printf_archetype=printf
11092 fi
11093 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11094 ac_c_werror_flag=$ac_save_c_werror_flag
11095 fi
11096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_printf_archetype" >&5
11097 $as_echo "$pgac_cv_printf_archetype" >&6; }
11098
11099 cat >>confdefs.h <<_ACEOF
11100 #define PG_PRINTF_ATTRIBUTE $pgac_cv_printf_archetype
11101 _ACEOF
11102
11103
11104
11105   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array members" >&5
11106 $as_echo_n "checking for flexible array members... " >&6; }
11107 if ${ac_cv_c_flexmember+:} false; then :
11108   $as_echo_n "(cached) " >&6
11109 else
11110   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11111 /* end confdefs.h.  */
11112 #include <stdlib.h>
11113             #include <stdio.h>
11114             #include <stddef.h>
11115             struct s { int n; double d[]; };
11116 int
11117 main ()
11118 {
11119 int m = getchar ();
11120             struct s *p = malloc (offsetof (struct s, d)
11121                                   + m * sizeof (double));
11122             p->d[0] = 0.0;
11123             return p->d != (double *) NULL;
11124   ;
11125   return 0;
11126 }
11127 _ACEOF
11128 if ac_fn_c_try_compile "$LINENO"; then :
11129   ac_cv_c_flexmember=yes
11130 else
11131   ac_cv_c_flexmember=no
11132 fi
11133 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11134 fi
11135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
11136 $as_echo "$ac_cv_c_flexmember" >&6; }
11137   if test $ac_cv_c_flexmember = yes; then
11138
11139 $as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
11140
11141   else
11142     $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
11143
11144   fi
11145
11146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signed types" >&5
11147 $as_echo_n "checking for signed types... " >&6; }
11148 if ${pgac_cv_c_signed+:} false; then :
11149   $as_echo_n "(cached) " >&6
11150 else
11151   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11152 /* end confdefs.h.  */
11153
11154 int
11155 main ()
11156 {
11157 signed char c; signed short s; signed int i;
11158   ;
11159   return 0;
11160 }
11161 _ACEOF
11162 if ac_fn_c_try_compile "$LINENO"; then :
11163   pgac_cv_c_signed=yes
11164 else
11165   pgac_cv_c_signed=no
11166 fi
11167 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11168 fi
11169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_signed" >&5
11170 $as_echo "$pgac_cv_c_signed" >&6; }
11171 if test x"$pgac_cv_c_signed" = xno ; then
11172
11173 $as_echo "#define signed /**/" >>confdefs.h
11174
11175 fi
11176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __func__" >&5
11177 $as_echo_n "checking for __func__... " >&6; }
11178 if ${pgac_cv_funcname_func_support+:} false; then :
11179   $as_echo_n "(cached) " >&6
11180 else
11181   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11182 /* end confdefs.h.  */
11183 #include <stdio.h>
11184 int
11185 main ()
11186 {
11187 printf("%s\n", __func__);
11188   ;
11189   return 0;
11190 }
11191 _ACEOF
11192 if ac_fn_c_try_compile "$LINENO"; then :
11193   pgac_cv_funcname_func_support=yes
11194 else
11195   pgac_cv_funcname_func_support=no
11196 fi
11197 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11198 fi
11199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_func_support" >&5
11200 $as_echo "$pgac_cv_funcname_func_support" >&6; }
11201 if test x"$pgac_cv_funcname_func_support" = xyes ; then
11202
11203 $as_echo "#define HAVE_FUNCNAME__FUNC 1" >>confdefs.h
11204
11205 else
11206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __FUNCTION__" >&5
11207 $as_echo_n "checking for __FUNCTION__... " >&6; }
11208 if ${pgac_cv_funcname_function_support+:} false; then :
11209   $as_echo_n "(cached) " >&6
11210 else
11211   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11212 /* end confdefs.h.  */
11213 #include <stdio.h>
11214 int
11215 main ()
11216 {
11217 printf("%s\n", __FUNCTION__);
11218   ;
11219   return 0;
11220 }
11221 _ACEOF
11222 if ac_fn_c_try_compile "$LINENO"; then :
11223   pgac_cv_funcname_function_support=yes
11224 else
11225   pgac_cv_funcname_function_support=no
11226 fi
11227 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11228 fi
11229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_function_support" >&5
11230 $as_echo "$pgac_cv_funcname_function_support" >&6; }
11231 if test x"$pgac_cv_funcname_function_support" = xyes ; then
11232
11233 $as_echo "#define HAVE_FUNCNAME__FUNCTION 1" >>confdefs.h
11234
11235 fi
11236 fi
11237 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Static_assert" >&5
11238 $as_echo_n "checking for _Static_assert... " >&6; }
11239 if ${pgac_cv__static_assert+:} false; then :
11240   $as_echo_n "(cached) " >&6
11241 else
11242   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11243 /* end confdefs.h.  */
11244
11245 int
11246 main ()
11247 {
11248 ({ _Static_assert(1, "foo"); })
11249   ;
11250   return 0;
11251 }
11252 _ACEOF
11253 if ac_fn_c_try_link "$LINENO"; then :
11254   pgac_cv__static_assert=yes
11255 else
11256   pgac_cv__static_assert=no
11257 fi
11258 rm -f core conftest.err conftest.$ac_objext \
11259     conftest$ac_exeext conftest.$ac_ext
11260 fi
11261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__static_assert" >&5
11262 $as_echo "$pgac_cv__static_assert" >&6; }
11263 if test x"$pgac_cv__static_assert" = xyes ; then
11264
11265 $as_echo "#define HAVE__STATIC_ASSERT 1" >>confdefs.h
11266
11267 fi
11268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_types_compatible_p" >&5
11269 $as_echo_n "checking for __builtin_types_compatible_p... " >&6; }
11270 if ${pgac_cv__types_compatible+:} false; then :
11271   $as_echo_n "(cached) " >&6
11272 else
11273   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11274 /* end confdefs.h.  */
11275
11276 int
11277 main ()
11278 {
11279  int x; static int y[__builtin_types_compatible_p(__typeof__(x), int)];
11280   ;
11281   return 0;
11282 }
11283 _ACEOF
11284 if ac_fn_c_try_compile "$LINENO"; then :
11285   pgac_cv__types_compatible=yes
11286 else
11287   pgac_cv__types_compatible=no
11288 fi
11289 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11290 fi
11291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__types_compatible" >&5
11292 $as_echo "$pgac_cv__types_compatible" >&6; }
11293 if test x"$pgac_cv__types_compatible" = xyes ; then
11294
11295 $as_echo "#define HAVE__BUILTIN_TYPES_COMPATIBLE_P 1" >>confdefs.h
11296
11297 fi
11298 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap32" >&5
11299 $as_echo_n "checking for __builtin_bswap32... " >&6; }
11300 if ${pgac_cv__builtin_bswap32+:} false; then :
11301   $as_echo_n "(cached) " >&6
11302 else
11303   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11304 /* end confdefs.h.  */
11305 static unsigned long int x = __builtin_bswap32(0xaabbccdd);
11306
11307 _ACEOF
11308 if ac_fn_c_try_compile "$LINENO"; then :
11309   pgac_cv__builtin_bswap32=yes
11310 else
11311   pgac_cv__builtin_bswap32=no
11312 fi
11313 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11314 fi
11315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap32" >&5
11316 $as_echo "$pgac_cv__builtin_bswap32" >&6; }
11317 if test x"$pgac_cv__builtin_bswap32" = xyes ; then
11318
11319 $as_echo "#define HAVE__BUILTIN_BSWAP32 1" >>confdefs.h
11320
11321 fi
11322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap64" >&5
11323 $as_echo_n "checking for __builtin_bswap64... " >&6; }
11324 if ${pgac_cv__builtin_bswap64+:} false; then :
11325   $as_echo_n "(cached) " >&6
11326 else
11327   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11328 /* end confdefs.h.  */
11329 static unsigned long int x = __builtin_bswap64(0xaabbccddeeff0011);
11330
11331 _ACEOF
11332 if ac_fn_c_try_compile "$LINENO"; then :
11333   pgac_cv__builtin_bswap64=yes
11334 else
11335   pgac_cv__builtin_bswap64=no
11336 fi
11337 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11338 fi
11339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap64" >&5
11340 $as_echo "$pgac_cv__builtin_bswap64" >&6; }
11341 if test x"$pgac_cv__builtin_bswap64" = xyes ; then
11342
11343 $as_echo "#define HAVE__BUILTIN_BSWAP64 1" >>confdefs.h
11344
11345 fi
11346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_constant_p" >&5
11347 $as_echo_n "checking for __builtin_constant_p... " >&6; }
11348 if ${pgac_cv__builtin_constant_p+:} false; then :
11349   $as_echo_n "(cached) " >&6
11350 else
11351   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11352 /* end confdefs.h.  */
11353 static int x; static int y[__builtin_constant_p(x) ? x : 1];
11354
11355 _ACEOF
11356 if ac_fn_c_try_compile "$LINENO"; then :
11357   pgac_cv__builtin_constant_p=yes
11358 else
11359   pgac_cv__builtin_constant_p=no
11360 fi
11361 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11362 fi
11363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_constant_p" >&5
11364 $as_echo "$pgac_cv__builtin_constant_p" >&6; }
11365 if test x"$pgac_cv__builtin_constant_p" = xyes ; then
11366
11367 $as_echo "#define HAVE__BUILTIN_CONSTANT_P 1" >>confdefs.h
11368
11369 fi
11370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unreachable" >&5
11371 $as_echo_n "checking for __builtin_unreachable... " >&6; }
11372 if ${pgac_cv__builtin_unreachable+:} false; then :
11373   $as_echo_n "(cached) " >&6
11374 else
11375   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11376 /* end confdefs.h.  */
11377
11378 int
11379 main ()
11380 {
11381 __builtin_unreachable();
11382   ;
11383   return 0;
11384 }
11385 _ACEOF
11386 if ac_fn_c_try_link "$LINENO"; then :
11387   pgac_cv__builtin_unreachable=yes
11388 else
11389   pgac_cv__builtin_unreachable=no
11390 fi
11391 rm -f core conftest.err conftest.$ac_objext \
11392     conftest$ac_exeext conftest.$ac_ext
11393 fi
11394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_unreachable" >&5
11395 $as_echo "$pgac_cv__builtin_unreachable" >&6; }
11396 if test x"$pgac_cv__builtin_unreachable" = xyes ; then
11397
11398 $as_echo "#define HAVE__BUILTIN_UNREACHABLE 1" >>confdefs.h
11399
11400 fi
11401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __VA_ARGS__" >&5
11402 $as_echo_n "checking for __VA_ARGS__... " >&6; }
11403 if ${pgac_cv__va_args+:} false; then :
11404   $as_echo_n "(cached) " >&6
11405 else
11406   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11407 /* end confdefs.h.  */
11408 #include <stdio.h>
11409 int
11410 main ()
11411 {
11412 #define debug(...) fprintf(stderr, __VA_ARGS__)
11413 debug("%s", "blarg");
11414
11415   ;
11416   return 0;
11417 }
11418 _ACEOF
11419 if ac_fn_c_try_compile "$LINENO"; then :
11420   pgac_cv__va_args=yes
11421 else
11422   pgac_cv__va_args=no
11423 fi
11424 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11425 fi
11426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__va_args" >&5
11427 $as_echo "$pgac_cv__va_args" >&6; }
11428 if test x"$pgac_cv__va_args" = xyes ; then
11429
11430 $as_echo "#define HAVE__VA_ARGS 1" >>confdefs.h
11431
11432 fi
11433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
11434 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
11435 if ${ac_cv_struct_tm+:} false; then :
11436   $as_echo_n "(cached) " >&6
11437 else
11438   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11439 /* end confdefs.h.  */
11440 #include <sys/types.h>
11441 #include <time.h>
11442
11443 int
11444 main ()
11445 {
11446 struct tm tm;
11447                                      int *p = &tm.tm_sec;
11448                                      return !p;
11449   ;
11450   return 0;
11451 }
11452 _ACEOF
11453 if ac_fn_c_try_compile "$LINENO"; then :
11454   ac_cv_struct_tm=time.h
11455 else
11456   ac_cv_struct_tm=sys/time.h
11457 fi
11458 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11459 fi
11460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
11461 $as_echo "$ac_cv_struct_tm" >&6; }
11462 if test $ac_cv_struct_tm = sys/time.h; then
11463
11464 $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
11465
11466 fi
11467
11468 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
11469 #include <$ac_cv_struct_tm>
11470
11471 "
11472 if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
11473
11474 cat >>confdefs.h <<_ACEOF
11475 #define HAVE_STRUCT_TM_TM_ZONE 1
11476 _ACEOF
11477
11478
11479 fi
11480
11481 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11482
11483 $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
11484
11485 fi
11486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11487 $as_echo_n "checking for tzname... " >&6; }
11488 if ${ac_cv_var_tzname+:} false; then :
11489   $as_echo_n "(cached) " >&6
11490 else
11491   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11492 /* end confdefs.h.  */
11493 #include <time.h>
11494 #ifndef tzname /* For SGI.  */
11495 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
11496 #endif
11497
11498 int
11499 main ()
11500 {
11501 atoi(*tzname);
11502   ;
11503   return 0;
11504 }
11505 _ACEOF
11506 if ac_fn_c_try_link "$LINENO"; then :
11507   ac_cv_var_tzname=yes
11508 else
11509   ac_cv_var_tzname=no
11510 fi
11511 rm -f core conftest.err conftest.$ac_objext \
11512     conftest$ac_exeext conftest.$ac_ext
11513 fi
11514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11515 $as_echo "$ac_cv_var_tzname" >&6; }
11516 if test $ac_cv_var_tzname = yes; then
11517
11518 $as_echo "#define HAVE_TZNAME 1" >>confdefs.h
11519
11520 fi
11521
11522 ac_fn_c_check_type "$LINENO" "union semun" "ac_cv_type_union_semun" "#include <sys/types.h>
11523 #include <sys/ipc.h>
11524 #include <sys/sem.h>
11525 "
11526 if test "x$ac_cv_type_union_semun" = xyes; then :
11527
11528 cat >>confdefs.h <<_ACEOF
11529 #define HAVE_UNION_SEMUN 1
11530 _ACEOF
11531
11532
11533 fi
11534
11535 ac_fn_c_check_type "$LINENO" "struct sockaddr_un" "ac_cv_type_struct_sockaddr_un" "#include <sys/types.h>
11536 #ifdef HAVE_SYS_UN_H
11537 #include <sys/un.h>
11538 #endif
11539
11540 "
11541 if test "x$ac_cv_type_struct_sockaddr_un" = xyes; then :
11542
11543 $as_echo "#define HAVE_UNIX_SOCKETS 1" >>confdefs.h
11544
11545 fi
11546
11547 ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "#include <sys/types.h>
11548 #ifdef HAVE_SYS_SOCKET_H
11549 #include <sys/socket.h>
11550 #endif
11551
11552 "
11553 if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
11554
11555 cat >>confdefs.h <<_ACEOF
11556 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
11557 _ACEOF
11558
11559
11560 fi
11561
11562 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
11563 #ifdef HAVE_SYS_SOCKET_H
11564 #include <sys/socket.h>
11565 #endif
11566
11567 "
11568 if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then :
11569
11570 cat >>confdefs.h <<_ACEOF
11571 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
11572 _ACEOF
11573
11574
11575 fi
11576 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_family" "ac_cv_member_struct_sockaddr_storage___ss_family" "#include <sys/types.h>
11577 #ifdef HAVE_SYS_SOCKET_H
11578 #include <sys/socket.h>
11579 #endif
11580
11581 "
11582 if test "x$ac_cv_member_struct_sockaddr_storage___ss_family" = xyes; then :
11583
11584 cat >>confdefs.h <<_ACEOF
11585 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1
11586 _ACEOF
11587
11588
11589 fi
11590 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_len" "ac_cv_member_struct_sockaddr_storage_ss_len" "#include <sys/types.h>
11591 #ifdef HAVE_SYS_SOCKET_H
11592 #include <sys/socket.h>
11593 #endif
11594
11595 "
11596 if test "x$ac_cv_member_struct_sockaddr_storage_ss_len" = xyes; then :
11597
11598 cat >>confdefs.h <<_ACEOF
11599 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1
11600 _ACEOF
11601
11602
11603 fi
11604 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_len" "ac_cv_member_struct_sockaddr_storage___ss_len" "#include <sys/types.h>
11605 #ifdef HAVE_SYS_SOCKET_H
11606 #include <sys/socket.h>
11607 #endif
11608
11609 "
11610 if test "x$ac_cv_member_struct_sockaddr_storage___ss_len" = xyes; then :
11611
11612 cat >>confdefs.h <<_ACEOF
11613 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN 1
11614 _ACEOF
11615
11616
11617 fi
11618 ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/types.h>
11619 #ifdef HAVE_SYS_SOCKET_H
11620 #include <sys/socket.h>
11621 #endif
11622
11623 "
11624 if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
11625
11626 cat >>confdefs.h <<_ACEOF
11627 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
11628 _ACEOF
11629
11630
11631 fi
11632
11633 ac_fn_c_check_type "$LINENO" "struct addrinfo" "ac_cv_type_struct_addrinfo" "#include <sys/types.h>
11634 #include <sys/socket.h>
11635 #include <netdb.h>
11636
11637 "
11638 if test "x$ac_cv_type_struct_addrinfo" = xyes; then :
11639
11640 cat >>confdefs.h <<_ACEOF
11641 #define HAVE_STRUCT_ADDRINFO 1
11642 _ACEOF
11643
11644
11645 fi
11646
11647
11648   ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
11649 if test "x$ac_cv_type_intptr_t" = xyes; then :
11650
11651 $as_echo "#define HAVE_INTPTR_T 1" >>confdefs.h
11652
11653 else
11654   for ac_type in 'int' 'long int' 'long long int'; do
11655        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11656 /* end confdefs.h.  */
11657 $ac_includes_default
11658 int
11659 main ()
11660 {
11661 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
11662 test_array [0] = 0;
11663 return test_array [0];
11664
11665   ;
11666   return 0;
11667 }
11668 _ACEOF
11669 if ac_fn_c_try_compile "$LINENO"; then :
11670
11671 cat >>confdefs.h <<_ACEOF
11672 #define intptr_t $ac_type
11673 _ACEOF
11674
11675           ac_type=
11676 fi
11677 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11678        test -z "$ac_type" && break
11679      done
11680 fi
11681
11682
11683
11684   ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
11685 if test "x$ac_cv_type_uintptr_t" = xyes; then :
11686
11687 $as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h
11688
11689 else
11690   for ac_type in 'unsigned int' 'unsigned long int' \
11691         'unsigned long long int'; do
11692        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11693 /* end confdefs.h.  */
11694 $ac_includes_default
11695 int
11696 main ()
11697 {
11698 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
11699 test_array [0] = 0;
11700 return test_array [0];
11701
11702   ;
11703   return 0;
11704 }
11705 _ACEOF
11706 if ac_fn_c_try_compile "$LINENO"; then :
11707
11708 cat >>confdefs.h <<_ACEOF
11709 #define uintptr_t $ac_type
11710 _ACEOF
11711
11712           ac_type=
11713 fi
11714 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11715        test -z "$ac_type" && break
11716      done
11717 fi
11718
11719
11720
11721   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
11722 $as_echo_n "checking for unsigned long long int... " >&6; }
11723 if ${ac_cv_type_unsigned_long_long_int+:} false; then :
11724   $as_echo_n "(cached) " >&6
11725 else
11726   ac_cv_type_unsigned_long_long_int=yes
11727      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
11728        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11729 /* end confdefs.h.  */
11730
11731   /* For now, do not test the preprocessor; as of 2007 there are too many
11732          implementations with broken preprocessors.  Perhaps this can
11733          be revisited in 2012.  In the meantime, code should not expect
11734          #if to work with literals wider than 32 bits.  */
11735       /* Test literals.  */
11736       long long int ll = 9223372036854775807ll;
11737       long long int nll = -9223372036854775807LL;
11738       unsigned long long int ull = 18446744073709551615ULL;
11739       /* Test constant expressions.   */
11740       typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
11741                      ? 1 : -1)];
11742       typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
11743                      ? 1 : -1)];
11744       int i = 63;
11745 int
11746 main ()
11747 {
11748 /* Test availability of runtime routines for shift and division.  */
11749       long long int llmax = 9223372036854775807ll;
11750       unsigned long long int ullmax = 18446744073709551615ull;
11751       return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
11752               | (llmax / ll) | (llmax % ll)
11753               | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
11754               | (ullmax / ull) | (ullmax % ull));
11755   ;
11756   return 0;
11757 }
11758
11759 _ACEOF
11760 if ac_fn_c_try_link "$LINENO"; then :
11761
11762 else
11763   ac_cv_type_unsigned_long_long_int=no
11764 fi
11765 rm -f core conftest.err conftest.$ac_objext \
11766     conftest$ac_exeext conftest.$ac_ext
11767      fi
11768 fi
11769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
11770 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
11771   if test $ac_cv_type_unsigned_long_long_int = yes; then
11772
11773 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
11774
11775   fi
11776
11777
11778
11779   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
11780 $as_echo_n "checking for long long int... " >&6; }
11781 if ${ac_cv_type_long_long_int+:} false; then :
11782   $as_echo_n "(cached) " >&6
11783 else
11784   ac_cv_type_long_long_int=yes
11785       if test "x${ac_cv_prog_cc_c99-no}" = xno; then
11786         ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
11787         if test $ac_cv_type_long_long_int = yes; then
11788                                   if test "$cross_compiling" = yes; then :
11789   :
11790 else
11791   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11792 /* end confdefs.h.  */
11793 #include <limits.h>
11794                  #ifndef LLONG_MAX
11795                  # define HALF \
11796                           (1LL << (sizeof (long long int) * CHAR_BIT - 2))
11797                  # define LLONG_MAX (HALF - 1 + HALF)
11798                  #endif
11799 int
11800 main ()
11801 {
11802 long long int n = 1;
11803                  int i;
11804                  for (i = 0; ; i++)
11805                    {
11806                      long long int m = n << i;
11807                      if (m >> i != n)
11808                        return 1;
11809                      if (LLONG_MAX / 2 < m)
11810                        break;
11811                    }
11812                  return 0;
11813   ;
11814   return 0;
11815 }
11816 _ACEOF
11817 if ac_fn_c_try_run "$LINENO"; then :
11818
11819 else
11820   ac_cv_type_long_long_int=no
11821 fi
11822 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11823   conftest.$ac_objext conftest.beam conftest.$ac_ext
11824 fi
11825
11826         fi
11827       fi
11828 fi
11829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
11830 $as_echo "$ac_cv_type_long_long_int" >&6; }
11831   if test $ac_cv_type_long_long_int = yes; then
11832
11833 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
11834
11835   fi
11836
11837
11838 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for locale_t" >&5
11839 $as_echo_n "checking for locale_t... " >&6; }
11840 if ${pgac_cv_type_locale_t+:} false; then :
11841   $as_echo_n "(cached) " >&6
11842 else
11843   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11844 /* end confdefs.h.  */
11845 #include <locale.h>
11846 locale_t x;
11847 int
11848 main ()
11849 {
11850
11851   ;
11852   return 0;
11853 }
11854 _ACEOF
11855 if ac_fn_c_try_compile "$LINENO"; then :
11856   pgac_cv_type_locale_t=yes
11857 else
11858   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11859 /* end confdefs.h.  */
11860 #include <xlocale.h>
11861 locale_t x;
11862 int
11863 main ()
11864 {
11865
11866   ;
11867   return 0;
11868 }
11869 _ACEOF
11870 if ac_fn_c_try_compile "$LINENO"; then :
11871   pgac_cv_type_locale_t='yes (in xlocale.h)'
11872 else
11873   pgac_cv_type_locale_t=no
11874 fi
11875 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11876 fi
11877 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11878 fi
11879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_locale_t" >&5
11880 $as_echo "$pgac_cv_type_locale_t" >&6; }
11881 if test "$pgac_cv_type_locale_t" != no; then
11882
11883 $as_echo "#define HAVE_LOCALE_T 1" >>confdefs.h
11884
11885 fi
11886 if test "$pgac_cv_type_locale_t" = 'yes (in xlocale.h)'; then
11887
11888 $as_echo "#define LOCALE_T_IN_XLOCALE 1" >>confdefs.h
11889
11890 fi
11891
11892 ac_fn_c_check_type "$LINENO" "struct cmsgcred" "ac_cv_type_struct_cmsgcred" "#include <sys/socket.h>
11893 #include <sys/param.h>
11894 #ifdef HAVE_SYS_UCRED_H
11895 #include <sys/ucred.h>
11896 #endif
11897 "
11898 if test "x$ac_cv_type_struct_cmsgcred" = xyes; then :
11899
11900 cat >>confdefs.h <<_ACEOF
11901 #define HAVE_STRUCT_CMSGCRED 1
11902 _ACEOF
11903
11904
11905 fi
11906
11907
11908 ac_fn_c_check_type "$LINENO" "struct option" "ac_cv_type_struct_option" "#ifdef HAVE_GETOPT_H
11909 #include <getopt.h>
11910 #endif
11911 "
11912 if test "x$ac_cv_type_struct_option" = xyes; then :
11913
11914 cat >>confdefs.h <<_ACEOF
11915 #define HAVE_STRUCT_OPTION 1
11916 _ACEOF
11917
11918
11919 fi
11920
11921
11922 if test "$with_zlib" = yes; then
11923   # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
11924   # did not).  While we could work around the lack of z_streamp, it
11925   # seems unwise to encourage people to use such old zlib versions...
11926   ac_fn_c_check_type "$LINENO" "z_streamp" "ac_cv_type_z_streamp" "#include <zlib.h>
11927 "
11928 if test "x$ac_cv_type_z_streamp" = xyes; then :
11929
11930 else
11931   as_fn_error $? "zlib version is too old
11932 Use --without-zlib to disable zlib support." "$LINENO" 5
11933 fi
11934
11935 fi
11936
11937 # On PPC, check if assembler supports LWARX instruction's mutex hint bit
11938 case $host_cpu in
11939   ppc*|powerpc*)
11940     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports lwarx hint bit" >&5
11941 $as_echo_n "checking whether assembler supports lwarx hint bit... " >&6; }
11942     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11943 /* end confdefs.h.  */
11944
11945 int
11946 main ()
11947 {
11948 int a = 0; int *p = &a; int r;
11949          __asm__ __volatile__ (" lwarx %0,0,%1,1\n" : "=&r"(r) : "r"(p));
11950   ;
11951   return 0;
11952 }
11953 _ACEOF
11954 if ac_fn_c_try_compile "$LINENO"; then :
11955   pgac_cv_have_ppc_mutex_hint=yes
11956 else
11957   pgac_cv_have_ppc_mutex_hint=no
11958 fi
11959 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11960     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_ppc_mutex_hint" >&5
11961 $as_echo "$pgac_cv_have_ppc_mutex_hint" >&6; }
11962     if test x"$pgac_cv_have_ppc_mutex_hint" = xyes ; then
11963
11964 $as_echo "#define HAVE_PPC_LWARX_MUTEX_HINT 1" >>confdefs.h
11965
11966     fi
11967   ;;
11968 esac
11969
11970 # Check largefile support.  You might think this is a system service not a
11971 # compiler characteristic, but you'd be wrong.  We must check this before
11972 # probing existence of related functions such as fseeko, since the largefile
11973 # defines can affect what is generated for that.
11974 if test "$PORTNAME" != "win32"; then
11975    # Check whether --enable-largefile was given.
11976 if test "${enable_largefile+set}" = set; then :
11977   enableval=$enable_largefile;
11978 fi
11979
11980 if test "$enable_largefile" != no; then
11981
11982   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
11983 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
11984 if ${ac_cv_sys_largefile_CC+:} false; then :
11985   $as_echo_n "(cached) " >&6
11986 else
11987   ac_cv_sys_largefile_CC=no
11988      if test "$GCC" != yes; then
11989        ac_save_CC=$CC
11990        while :; do
11991          # IRIX 6.2 and later do not support large files by default,
11992          # so use the C compiler's -n32 option if that helps.
11993          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11994 /* end confdefs.h.  */
11995 #include <sys/types.h>
11996  /* Check that off_t can represent 2**63 - 1 correctly.
11997     We can't simply define LARGE_OFF_T to be 9223372036854775807,
11998     since some C++ compilers masquerading as C compilers
11999     incorrectly reject 9223372036854775807.  */
12000 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12001   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12002                        && LARGE_OFF_T % 2147483647 == 1)
12003                       ? 1 : -1];
12004 int
12005 main ()
12006 {
12007
12008   ;
12009   return 0;
12010 }
12011 _ACEOF
12012          if ac_fn_c_try_compile "$LINENO"; then :
12013   break
12014 fi
12015 rm -f core conftest.err conftest.$ac_objext
12016          CC="$CC -n32"
12017          if ac_fn_c_try_compile "$LINENO"; then :
12018   ac_cv_sys_largefile_CC=' -n32'; break
12019 fi
12020 rm -f core conftest.err conftest.$ac_objext
12021          break
12022        done
12023        CC=$ac_save_CC
12024        rm -f conftest.$ac_ext
12025     fi
12026 fi
12027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
12028 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
12029   if test "$ac_cv_sys_largefile_CC" != no; then
12030     CC=$CC$ac_cv_sys_largefile_CC
12031   fi
12032
12033   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
12034 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
12035 if ${ac_cv_sys_file_offset_bits+:} false; then :
12036   $as_echo_n "(cached) " >&6
12037 else
12038   while :; do
12039   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12040 /* end confdefs.h.  */
12041 #include <sys/types.h>
12042  /* Check that off_t can represent 2**63 - 1 correctly.
12043     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12044     since some C++ compilers masquerading as C compilers
12045     incorrectly reject 9223372036854775807.  */
12046 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12047   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12048                        && LARGE_OFF_T % 2147483647 == 1)
12049                       ? 1 : -1];
12050 int
12051 main ()
12052 {
12053
12054   ;
12055   return 0;
12056 }
12057 _ACEOF
12058 if ac_fn_c_try_compile "$LINENO"; then :
12059   ac_cv_sys_file_offset_bits=no; break
12060 fi
12061 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12062   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12063 /* end confdefs.h.  */
12064 #define _FILE_OFFSET_BITS 64
12065 #include <sys/types.h>
12066  /* Check that off_t can represent 2**63 - 1 correctly.
12067     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12068     since some C++ compilers masquerading as C compilers
12069     incorrectly reject 9223372036854775807.  */
12070 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12071   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12072                        && LARGE_OFF_T % 2147483647 == 1)
12073                       ? 1 : -1];
12074 int
12075 main ()
12076 {
12077
12078   ;
12079   return 0;
12080 }
12081 _ACEOF
12082 if ac_fn_c_try_compile "$LINENO"; then :
12083   ac_cv_sys_file_offset_bits=64; break
12084 fi
12085 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12086   ac_cv_sys_file_offset_bits=unknown
12087   break
12088 done
12089 fi
12090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
12091 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
12092 case $ac_cv_sys_file_offset_bits in #(
12093   no | unknown) ;;
12094   *)
12095 cat >>confdefs.h <<_ACEOF
12096 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
12097 _ACEOF
12098 ;;
12099 esac
12100 rm -rf conftest*
12101   if test $ac_cv_sys_file_offset_bits = unknown; then
12102     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
12103 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
12104 if ${ac_cv_sys_large_files+:} false; then :
12105   $as_echo_n "(cached) " >&6
12106 else
12107   while :; do
12108   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12109 /* end confdefs.h.  */
12110 #include <sys/types.h>
12111  /* Check that off_t can represent 2**63 - 1 correctly.
12112     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12113     since some C++ compilers masquerading as C compilers
12114     incorrectly reject 9223372036854775807.  */
12115 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12116   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12117                        && LARGE_OFF_T % 2147483647 == 1)
12118                       ? 1 : -1];
12119 int
12120 main ()
12121 {
12122
12123   ;
12124   return 0;
12125 }
12126 _ACEOF
12127 if ac_fn_c_try_compile "$LINENO"; then :
12128   ac_cv_sys_large_files=no; break
12129 fi
12130 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12131   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12132 /* end confdefs.h.  */
12133 #define _LARGE_FILES 1
12134 #include <sys/types.h>
12135  /* Check that off_t can represent 2**63 - 1 correctly.
12136     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12137     since some C++ compilers masquerading as C compilers
12138     incorrectly reject 9223372036854775807.  */
12139 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12140   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12141                        && LARGE_OFF_T % 2147483647 == 1)
12142                       ? 1 : -1];
12143 int
12144 main ()
12145 {
12146
12147   ;
12148   return 0;
12149 }
12150 _ACEOF
12151 if ac_fn_c_try_compile "$LINENO"; then :
12152   ac_cv_sys_large_files=1; break
12153 fi
12154 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12155   ac_cv_sys_large_files=unknown
12156   break
12157 done
12158 fi
12159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
12160 $as_echo "$ac_cv_sys_large_files" >&6; }
12161 case $ac_cv_sys_large_files in #(
12162   no | unknown) ;;
12163   *)
12164 cat >>confdefs.h <<_ACEOF
12165 #define _LARGE_FILES $ac_cv_sys_large_files
12166 _ACEOF
12167 ;;
12168 esac
12169 rm -rf conftest*
12170   fi
12171
12172
12173 fi
12174
12175
12176 fi
12177
12178 # Check for largefile support (must be after AC_SYS_LARGEFILE)
12179 # The cast to long int works around a bug in the HP C Compiler
12180 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12181 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12182 # This bug is HP SR number 8606223364.
12183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
12184 $as_echo_n "checking size of off_t... " >&6; }
12185 if ${ac_cv_sizeof_off_t+:} false; then :
12186   $as_echo_n "(cached) " >&6
12187 else
12188   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t"        "$ac_includes_default"; then :
12189
12190 else
12191   if test "$ac_cv_type_off_t" = yes; then
12192      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12193 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12194 as_fn_error 77 "cannot compute sizeof (off_t)
12195 See \`config.log' for more details" "$LINENO" 5; }
12196    else
12197      ac_cv_sizeof_off_t=0
12198    fi
12199 fi
12200
12201 fi
12202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
12203 $as_echo "$ac_cv_sizeof_off_t" >&6; }
12204
12205
12206
12207 cat >>confdefs.h <<_ACEOF
12208 #define SIZEOF_OFF_T $ac_cv_sizeof_off_t
12209 _ACEOF
12210
12211
12212
12213 # If we don't have largefile support, can't handle segsize >= 2GB.
12214 if test "$ac_cv_sizeof_off_t" -lt 8 -a "$segsize" != "1"; then
12215    as_fn_error $? "Large file support is not enabled. Segment size cannot be larger than 1GB." "$LINENO" 5
12216 fi
12217
12218
12219 ##
12220 ## Functions, global variables
12221 ##
12222
12223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int timezone" >&5
12224 $as_echo_n "checking for int timezone... " >&6; }
12225 if ${pgac_cv_var_int_timezone+:} false; then :
12226   $as_echo_n "(cached) " >&6
12227 else
12228   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12229 /* end confdefs.h.  */
12230 #include <time.h>
12231 int res;
12232 int
12233 main ()
12234 {
12235 #ifndef __CYGWIN__
12236 res = timezone / 60;
12237 #else
12238 res = _timezone / 60;
12239 #endif
12240   ;
12241   return 0;
12242 }
12243 _ACEOF
12244 if ac_fn_c_try_link "$LINENO"; then :
12245   pgac_cv_var_int_timezone=yes
12246 else
12247   pgac_cv_var_int_timezone=no
12248 fi
12249 rm -f core conftest.err conftest.$ac_objext \
12250     conftest$ac_exeext conftest.$ac_ext
12251 fi
12252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_timezone" >&5
12253 $as_echo "$pgac_cv_var_int_timezone" >&6; }
12254 if test x"$pgac_cv_var_int_timezone" = xyes ; then
12255
12256 $as_echo "#define HAVE_INT_TIMEZONE 1" >>confdefs.h
12257
12258 fi
12259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for accept()" >&5
12260 $as_echo_n "checking types of arguments for accept()... " >&6; }
12261  if ${ac_cv_func_accept_return+:} false; then :
12262   $as_echo_n "(cached) " >&6
12263 else
12264    if ${ac_cv_func_accept_arg1+:} false; then :
12265   $as_echo_n "(cached) " >&6
12266 else
12267     if ${ac_cv_func_accept_arg2+:} false; then :
12268   $as_echo_n "(cached) " >&6
12269 else
12270      if ${ac_cv_func_accept_arg3+:} false; then :
12271   $as_echo_n "(cached) " >&6
12272 else
12273       for ac_cv_func_accept_return in 'int' 'unsigned int PASCAL' 'SOCKET WSAAPI'; do
12274       for ac_cv_func_accept_arg1 in 'int' 'unsigned int' 'SOCKET'; do
12275        for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
12276         for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
12277          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12278 /* end confdefs.h.  */
12279 #ifdef HAVE_SYS_TYPES_H
12280 #include <sys/types.h>
12281 #endif
12282 #ifdef HAVE_SYS_SOCKET_H
12283 #include <sys/socket.h>
12284 #endif
12285 extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
12286 _ACEOF
12287 if ac_fn_c_try_compile "$LINENO"; then :
12288   ac_not_found=no; break 4
12289 else
12290   ac_not_found=yes
12291 fi
12292 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12293        done
12294       done
12295      done
12296     done
12297     if test "$ac_not_found" = yes; then
12298       as_fn_error $? "could not determine argument types" "$LINENO" 5
12299     fi
12300     if test "$ac_cv_func_accept_arg3" = "void"; then
12301       ac_cv_func_accept_arg3=int
12302     fi
12303
12304 fi
12305
12306 fi
12307
12308 fi
12309
12310 fi
12311  { $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
12312 $as_echo "$ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&6; }
12313
12314 cat >>confdefs.h <<_ACEOF
12315 #define ACCEPT_TYPE_RETURN $ac_cv_func_accept_return
12316 _ACEOF
12317
12318
12319 cat >>confdefs.h <<_ACEOF
12320 #define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
12321 _ACEOF
12322
12323
12324 cat >>confdefs.h <<_ACEOF
12325 #define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
12326 _ACEOF
12327
12328
12329 cat >>confdefs.h <<_ACEOF
12330 #define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
12331 _ACEOF
12332
12333
12334 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday takes only one argument" >&5
12335 $as_echo_n "checking whether gettimeofday takes only one argument... " >&6; }
12336 if ${pgac_cv_func_gettimeofday_1arg+:} false; then :
12337   $as_echo_n "(cached) " >&6
12338 else
12339   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12340 /* end confdefs.h.  */
12341 #include <sys/time.h>
12342 int
12343 main ()
12344 {
12345 struct timeval *tp;
12346 struct timezone *tzp;
12347 gettimeofday(tp,tzp);
12348   ;
12349   return 0;
12350 }
12351 _ACEOF
12352 if ac_fn_c_try_compile "$LINENO"; then :
12353   pgac_cv_func_gettimeofday_1arg=no
12354 else
12355   pgac_cv_func_gettimeofday_1arg=yes
12356 fi
12357 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12358 fi
12359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_gettimeofday_1arg" >&5
12360 $as_echo "$pgac_cv_func_gettimeofday_1arg" >&6; }
12361 if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
12362
12363 $as_echo "#define GETTIMEOFDAY_1ARG 1" >>confdefs.h
12364
12365 fi
12366
12367 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wcstombs_l declaration" >&5
12368 $as_echo_n "checking for wcstombs_l declaration... " >&6; }
12369 if ${pgac_cv_func_wcstombs_l+:} false; then :
12370   $as_echo_n "(cached) " >&6
12371 else
12372   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12373 /* end confdefs.h.  */
12374 #include <stdlib.h>
12375 #include <locale.h>
12376 int
12377 main ()
12378 {
12379 #ifndef wcstombs_l
12380 (void) wcstombs_l;
12381 #endif
12382   ;
12383   return 0;
12384 }
12385 _ACEOF
12386 if ac_fn_c_try_compile "$LINENO"; then :
12387   pgac_cv_func_wcstombs_l='yes'
12388 else
12389   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12390 /* end confdefs.h.  */
12391 #include <stdlib.h>
12392 #include <locale.h>
12393 #include <xlocale.h>
12394 int
12395 main ()
12396 {
12397 #ifndef wcstombs_l
12398 (void) wcstombs_l;
12399 #endif
12400   ;
12401   return 0;
12402 }
12403 _ACEOF
12404 if ac_fn_c_try_compile "$LINENO"; then :
12405   pgac_cv_func_wcstombs_l='yes (in xlocale.h)'
12406 else
12407   pgac_cv_func_wcstombs_l='no'
12408 fi
12409 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12410 fi
12411 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12412 fi
12413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_wcstombs_l" >&5
12414 $as_echo "$pgac_cv_func_wcstombs_l" >&6; }
12415 if test "$pgac_cv_func_wcstombs_l" = 'yes (in xlocale.h)'; then
12416
12417 $as_echo "#define WCSTOMBS_L_IN_XLOCALE 1" >>confdefs.h
12418
12419 fi
12420
12421 # Some versions of libedit contain strlcpy(), setproctitle(), and other
12422 # symbols that that library has no business exposing to the world.  Pending
12423 # acquisition of a clue by those developers, ignore libedit (including its
12424 # possible alias of libreadline) while checking for everything else.
12425 LIBS_including_readline="$LIBS"
12426 LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
12427
12428 for ac_func in cbrt dlopen fdatasync getifaddrs getpeerucred getrlimit mbstowcs_l memmove poll pstat pthread_is_threaded_np readlink setproctitle setsid shm_open symlink sync_file_range towlower utime utimes wcstombs wcstombs_l
12429 do :
12430   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12431 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12432 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12433   cat >>confdefs.h <<_ACEOF
12434 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12435 _ACEOF
12436
12437 fi
12438 done
12439
12440
12441 ac_fn_c_check_func "$LINENO" "fseeko" "ac_cv_func_fseeko"
12442 if test "x$ac_cv_func_fseeko" = xyes; then :
12443   $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
12444
12445 else
12446   case " $LIBOBJS " in
12447   *" fseeko.$ac_objext "* ) ;;
12448   *) LIBOBJS="$LIBOBJS fseeko.$ac_objext"
12449  ;;
12450 esac
12451
12452 fi
12453
12454
12455 case $host_os in
12456         # NetBSD uses a custom fseeko/ftello built on fsetpos/fgetpos
12457         # Mingw uses macros to access Win32 API calls
12458         netbsd*|mingw*)
12459
12460 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
12461
12462                 ac_cv_func_fseeko=yes;;
12463         *)
12464                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
12465 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
12466 if ${ac_cv_sys_largefile_source+:} false; then :
12467   $as_echo_n "(cached) " >&6
12468 else
12469   while :; do
12470   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12471 /* end confdefs.h.  */
12472 #include <sys/types.h> /* for off_t */
12473      #include <stdio.h>
12474 int
12475 main ()
12476 {
12477 int (*fp) (FILE *, off_t, int) = fseeko;
12478      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
12479   ;
12480   return 0;
12481 }
12482 _ACEOF
12483 if ac_fn_c_try_link "$LINENO"; then :
12484   ac_cv_sys_largefile_source=no; break
12485 fi
12486 rm -f core conftest.err conftest.$ac_objext \
12487     conftest$ac_exeext conftest.$ac_ext
12488   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12489 /* end confdefs.h.  */
12490 #define _LARGEFILE_SOURCE 1
12491 #include <sys/types.h> /* for off_t */
12492      #include <stdio.h>
12493 int
12494 main ()
12495 {
12496 int (*fp) (FILE *, off_t, int) = fseeko;
12497      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
12498   ;
12499   return 0;
12500 }
12501 _ACEOF
12502 if ac_fn_c_try_link "$LINENO"; then :
12503   ac_cv_sys_largefile_source=1; break
12504 fi
12505 rm -f core conftest.err conftest.$ac_objext \
12506     conftest$ac_exeext conftest.$ac_ext
12507   ac_cv_sys_largefile_source=unknown
12508   break
12509 done
12510 fi
12511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
12512 $as_echo "$ac_cv_sys_largefile_source" >&6; }
12513 case $ac_cv_sys_largefile_source in #(
12514   no | unknown) ;;
12515   *)
12516 cat >>confdefs.h <<_ACEOF
12517 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
12518 _ACEOF
12519 ;;
12520 esac
12521 rm -rf conftest*
12522
12523 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
12524 # in glibc 2.1.3, but that breaks too many other things.
12525 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
12526 if test $ac_cv_sys_largefile_source != unknown; then
12527
12528 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
12529
12530 fi
12531 ;;
12532 esac
12533
12534 # posix_fadvise() is a no-op on Solaris, so don't incur function overhead
12535 # by calling it, 2009-04-02
12536 # http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/posix_fadvise.c
12537 if test "$PORTNAME" != "solaris"; then
12538 for ac_func in posix_fadvise
12539 do :
12540   ac_fn_c_check_func "$LINENO" "posix_fadvise" "ac_cv_func_posix_fadvise"
12541 if test "x$ac_cv_func_posix_fadvise" = xyes; then :
12542   cat >>confdefs.h <<_ACEOF
12543 #define HAVE_POSIX_FADVISE 1
12544 _ACEOF
12545
12546 fi
12547 done
12548
12549 ac_fn_c_check_decl "$LINENO" "posix_fadvise" "ac_cv_have_decl_posix_fadvise" "#include <fcntl.h>
12550 "
12551 if test "x$ac_cv_have_decl_posix_fadvise" = xyes; then :
12552   ac_have_decl=1
12553 else
12554   ac_have_decl=0
12555 fi
12556
12557 cat >>confdefs.h <<_ACEOF
12558 #define HAVE_DECL_POSIX_FADVISE $ac_have_decl
12559 _ACEOF
12560
12561 fi
12562
12563 ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "#include <unistd.h>
12564 "
12565 if test "x$ac_cv_have_decl_fdatasync" = xyes; then :
12566   ac_have_decl=1
12567 else
12568   ac_have_decl=0
12569 fi
12570
12571 cat >>confdefs.h <<_ACEOF
12572 #define HAVE_DECL_FDATASYNC $ac_have_decl
12573 _ACEOF
12574
12575 ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
12576 if test "x$ac_cv_have_decl_strlcat" = xyes; then :
12577   ac_have_decl=1
12578 else
12579   ac_have_decl=0
12580 fi
12581
12582 cat >>confdefs.h <<_ACEOF
12583 #define HAVE_DECL_STRLCAT $ac_have_decl
12584 _ACEOF
12585 ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
12586 if test "x$ac_cv_have_decl_strlcpy" = xyes; then :
12587   ac_have_decl=1
12588 else
12589   ac_have_decl=0
12590 fi
12591
12592 cat >>confdefs.h <<_ACEOF
12593 #define HAVE_DECL_STRLCPY $ac_have_decl
12594 _ACEOF
12595
12596 # This is probably only present on Darwin, but may as well check always
12597 ac_fn_c_check_decl "$LINENO" "F_FULLFSYNC" "ac_cv_have_decl_F_FULLFSYNC" "#include <fcntl.h>
12598 "
12599 if test "x$ac_cv_have_decl_F_FULLFSYNC" = xyes; then :
12600   ac_have_decl=1
12601 else
12602   ac_have_decl=0
12603 fi
12604
12605 cat >>confdefs.h <<_ACEOF
12606 #define HAVE_DECL_F_FULLFSYNC $ac_have_decl
12607 _ACEOF
12608
12609
12610 HAVE_IPV6=no
12611 ac_fn_c_check_type "$LINENO" "struct sockaddr_in6" "ac_cv_type_struct_sockaddr_in6" "$ac_includes_default
12612 #include <netinet/in.h>
12613 "
12614 if test "x$ac_cv_type_struct_sockaddr_in6" = xyes; then :
12615
12616 $as_echo "#define HAVE_IPV6 1" >>confdefs.h
12617
12618          HAVE_IPV6=yes
12619 fi
12620
12621
12622
12623 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PS_STRINGS" >&5
12624 $as_echo_n "checking for PS_STRINGS... " >&6; }
12625 if ${pgac_cv_var_PS_STRINGS+:} false; then :
12626   $as_echo_n "(cached) " >&6
12627 else
12628   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12629 /* end confdefs.h.  */
12630 #include <machine/vmparam.h>
12631 #include <sys/exec.h>
12632
12633 int
12634 main ()
12635 {
12636 PS_STRINGS->ps_nargvstr = 1;
12637 PS_STRINGS->ps_argvstr = "foo";
12638   ;
12639   return 0;
12640 }
12641 _ACEOF
12642 if ac_fn_c_try_link "$LINENO"; then :
12643   pgac_cv_var_PS_STRINGS=yes
12644 else
12645   pgac_cv_var_PS_STRINGS=no
12646 fi
12647 rm -f core conftest.err conftest.$ac_objext \
12648     conftest$ac_exeext conftest.$ac_ext
12649 fi
12650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_PS_STRINGS" >&5
12651 $as_echo "$pgac_cv_var_PS_STRINGS" >&6; }
12652 if test "$pgac_cv_var_PS_STRINGS" = yes ; then
12653
12654 $as_echo "#define HAVE_PS_STRINGS 1" >>confdefs.h
12655
12656 fi
12657
12658
12659 # We use our snprintf.c emulation if either snprintf() or vsnprintf()
12660 # is missing.  Yes, there are machines that have only one.  We may
12661 # also decide to use snprintf.c if snprintf() is present but does not
12662 # have all the features we need --- see below.
12663
12664 if test "$PORTNAME" = "win32"; then
12665   # Win32 gets snprintf.c built unconditionally.
12666   #
12667   # To properly translate all NLS languages strings, we must support the
12668   # *printf() %$ format, which allows *printf() arguments to be selected
12669   # by position in the translated string.
12670   #
12671   # libintl versions < 0.13 use the native *printf() functions, and Win32
12672   # *printf() doesn't understand %$, so we must use our /port versions,
12673   # which do understand %$. libintl versions >= 0.13 include their own
12674   # *printf versions on Win32.  The libintl 0.13 release note text is:
12675   #
12676   #   C format strings with positions, as they arise when a translator
12677   #   needs to reorder a sentence, are now supported on all platforms.
12678   #   On those few platforms (NetBSD and Woe32) for which the native
12679   #   printf()/fprintf()/... functions don't support such format
12680   #   strings, replacements are provided through <libintl.h>.
12681   #
12682   # We could use libintl >= 0.13's *printf() if we were sure that we had
12683   # a litint >= 0.13 at runtime, but seeing that there is no clean way
12684   # to guarantee that, it is best to just use our own, so we are sure to
12685   # get %$ support. In include/port.h we disable the *printf() macros
12686   # that might have been defined by libintl.
12687   #
12688   # We do this unconditionally whether NLS is used or not so we are sure
12689   # that all Win32 libraries and binaries behave the same.
12690   pgac_need_repl_snprintf=yes
12691 else
12692   pgac_need_repl_snprintf=no
12693   for ac_func in snprintf
12694 do :
12695   ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
12696 if test "x$ac_cv_func_snprintf" = xyes; then :
12697   cat >>confdefs.h <<_ACEOF
12698 #define HAVE_SNPRINTF 1
12699 _ACEOF
12700
12701 else
12702   pgac_need_repl_snprintf=yes
12703 fi
12704 done
12705
12706   for ac_func in vsnprintf
12707 do :
12708   ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
12709 if test "x$ac_cv_func_vsnprintf" = xyes; then :
12710   cat >>confdefs.h <<_ACEOF
12711 #define HAVE_VSNPRINTF 1
12712 _ACEOF
12713
12714 else
12715   pgac_need_repl_snprintf=yes
12716 fi
12717 done
12718
12719 fi
12720
12721
12722 # Check whether <stdio.h> declares snprintf() and vsnprintf(); if not,
12723 # include/c.h will provide declarations.  Note this is a separate test
12724 # from whether the functions exist in the C library --- there are
12725 # systems that have the functions but don't bother to declare them :-(
12726
12727 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
12728 if test "x$ac_cv_have_decl_snprintf" = xyes; then :
12729   ac_have_decl=1
12730 else
12731   ac_have_decl=0
12732 fi
12733
12734 cat >>confdefs.h <<_ACEOF
12735 #define HAVE_DECL_SNPRINTF $ac_have_decl
12736 _ACEOF
12737 ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
12738 if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
12739   ac_have_decl=1
12740 else
12741   ac_have_decl=0
12742 fi
12743
12744 cat >>confdefs.h <<_ACEOF
12745 #define HAVE_DECL_VSNPRINTF $ac_have_decl
12746 _ACEOF
12747
12748
12749
12750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for isinf" >&5
12751 $as_echo_n "checking for isinf... " >&6; }
12752 if ${ac_cv_func_isinf+:} false; then :
12753   $as_echo_n "(cached) " >&6
12754 else
12755   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12756 /* end confdefs.h.  */
12757
12758 #include <math.h>
12759 double glob_double;
12760
12761 int
12762 main ()
12763 {
12764 return isinf(glob_double) ? 0 : 1;
12765   ;
12766   return 0;
12767 }
12768 _ACEOF
12769 if ac_fn_c_try_link "$LINENO"; then :
12770   ac_cv_func_isinf=yes
12771 else
12772   ac_cv_func_isinf=no
12773 fi
12774 rm -f core conftest.err conftest.$ac_objext \
12775     conftest$ac_exeext conftest.$ac_ext
12776 fi
12777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_isinf" >&5
12778 $as_echo "$ac_cv_func_isinf" >&6; }
12779
12780 if test $ac_cv_func_isinf = yes ; then
12781
12782 $as_echo "#define HAVE_ISINF 1" >>confdefs.h
12783
12784 else
12785   case " $LIBOBJS " in
12786   *" isinf.$ac_objext "* ) ;;
12787   *) LIBOBJS="$LIBOBJS isinf.$ac_objext"
12788  ;;
12789 esac
12790
12791   # Look for a way to implement a substitute for isinf()
12792   for ac_func in fpclass fp_class fp_class_d class
12793 do :
12794   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12795 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12796 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12797   cat >>confdefs.h <<_ACEOF
12798 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12799 _ACEOF
12800  break
12801 fi
12802 done
12803
12804 fi
12805
12806 ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt"
12807 if test "x$ac_cv_func_crypt" = xyes; then :
12808   $as_echo "#define HAVE_CRYPT 1" >>confdefs.h
12809
12810 else
12811   case " $LIBOBJS " in
12812   *" crypt.$ac_objext "* ) ;;
12813   *) LIBOBJS="$LIBOBJS crypt.$ac_objext"
12814  ;;
12815 esac
12816
12817 fi
12818
12819 ac_fn_c_check_func "$LINENO" "fls" "ac_cv_func_fls"
12820 if test "x$ac_cv_func_fls" = xyes; then :
12821   $as_echo "#define HAVE_FLS 1" >>confdefs.h
12822
12823 else
12824   case " $LIBOBJS " in
12825   *" fls.$ac_objext "* ) ;;
12826   *) LIBOBJS="$LIBOBJS fls.$ac_objext"
12827  ;;
12828 esac
12829
12830 fi
12831
12832 ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt"
12833 if test "x$ac_cv_func_getopt" = xyes; then :
12834   $as_echo "#define HAVE_GETOPT 1" >>confdefs.h
12835
12836 else
12837   case " $LIBOBJS " in
12838   *" getopt.$ac_objext "* ) ;;
12839   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
12840  ;;
12841 esac
12842
12843 fi
12844
12845 ac_fn_c_check_func "$LINENO" "getrusage" "ac_cv_func_getrusage"
12846 if test "x$ac_cv_func_getrusage" = xyes; then :
12847   $as_echo "#define HAVE_GETRUSAGE 1" >>confdefs.h
12848
12849 else
12850   case " $LIBOBJS " in
12851   *" getrusage.$ac_objext "* ) ;;
12852   *) LIBOBJS="$LIBOBJS getrusage.$ac_objext"
12853  ;;
12854 esac
12855
12856 fi
12857
12858 ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
12859 if test "x$ac_cv_func_inet_aton" = xyes; then :
12860   $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
12861
12862 else
12863   case " $LIBOBJS " in
12864   *" inet_aton.$ac_objext "* ) ;;
12865   *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
12866  ;;
12867 esac
12868
12869 fi
12870
12871 ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
12872 if test "x$ac_cv_func_mkdtemp" = xyes; then :
12873   $as_echo "#define HAVE_MKDTEMP 1" >>confdefs.h
12874
12875 else
12876   case " $LIBOBJS " in
12877   *" mkdtemp.$ac_objext "* ) ;;
12878   *) LIBOBJS="$LIBOBJS mkdtemp.$ac_objext"
12879  ;;
12880 esac
12881
12882 fi
12883
12884 ac_fn_c_check_func "$LINENO" "random" "ac_cv_func_random"
12885 if test "x$ac_cv_func_random" = xyes; then :
12886   $as_echo "#define HAVE_RANDOM 1" >>confdefs.h
12887
12888 else
12889   case " $LIBOBJS " in
12890   *" random.$ac_objext "* ) ;;
12891   *) LIBOBJS="$LIBOBJS random.$ac_objext"
12892  ;;
12893 esac
12894
12895 fi
12896
12897 ac_fn_c_check_func "$LINENO" "rint" "ac_cv_func_rint"
12898 if test "x$ac_cv_func_rint" = xyes; then :
12899   $as_echo "#define HAVE_RINT 1" >>confdefs.h
12900
12901 else
12902   case " $LIBOBJS " in
12903   *" rint.$ac_objext "* ) ;;
12904   *) LIBOBJS="$LIBOBJS rint.$ac_objext"
12905  ;;
12906 esac
12907
12908 fi
12909
12910 ac_fn_c_check_func "$LINENO" "srandom" "ac_cv_func_srandom"
12911 if test "x$ac_cv_func_srandom" = xyes; then :
12912   $as_echo "#define HAVE_SRANDOM 1" >>confdefs.h
12913
12914 else
12915   case " $LIBOBJS " in
12916   *" srandom.$ac_objext "* ) ;;
12917   *) LIBOBJS="$LIBOBJS srandom.$ac_objext"
12918  ;;
12919 esac
12920
12921 fi
12922
12923 ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror"
12924 if test "x$ac_cv_func_strerror" = xyes; then :
12925   $as_echo "#define HAVE_STRERROR 1" >>confdefs.h
12926
12927 else
12928   case " $LIBOBJS " in
12929   *" strerror.$ac_objext "* ) ;;
12930   *) LIBOBJS="$LIBOBJS strerror.$ac_objext"
12931  ;;
12932 esac
12933
12934 fi
12935
12936 ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
12937 if test "x$ac_cv_func_strlcat" = xyes; then :
12938   $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
12939
12940 else
12941   case " $LIBOBJS " in
12942   *" strlcat.$ac_objext "* ) ;;
12943   *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
12944  ;;
12945 esac
12946
12947 fi
12948
12949 ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
12950 if test "x$ac_cv_func_strlcpy" = xyes; then :
12951   $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
12952
12953 else
12954   case " $LIBOBJS " in
12955   *" strlcpy.$ac_objext "* ) ;;
12956   *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
12957  ;;
12958 esac
12959
12960 fi
12961
12962
12963
12964 case $host_os in
12965
12966         # Windows uses a specialised env handler
12967         # and doesn't need a replacement getpeereid because it doesn't use
12968         # Unix sockets.
12969         mingw*)
12970
12971 $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
12972
12973
12974 $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
12975
12976                 ac_cv_func_unsetenv=yes
12977                 ac_cv_func_getpeereid=yes;;
12978         *)
12979                 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
12980 if test "x$ac_cv_func_unsetenv" = xyes; then :
12981   $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
12982
12983 else
12984   case " $LIBOBJS " in
12985   *" unsetenv.$ac_objext "* ) ;;
12986   *) LIBOBJS="$LIBOBJS unsetenv.$ac_objext"
12987  ;;
12988 esac
12989
12990 fi
12991
12992 ac_fn_c_check_func "$LINENO" "getpeereid" "ac_cv_func_getpeereid"
12993 if test "x$ac_cv_func_getpeereid" = xyes; then :
12994   $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
12995
12996 else
12997   case " $LIBOBJS " in
12998   *" getpeereid.$ac_objext "* ) ;;
12999   *) LIBOBJS="$LIBOBJS getpeereid.$ac_objext"
13000  ;;
13001 esac
13002
13003 fi
13004
13005
13006                 ;;
13007 esac
13008
13009 # System's version of getaddrinfo(), if any, may be used only if we found
13010 # a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
13011 # We use only our own getaddrinfo.c on Windows, but it's time to revisit that.
13012 if test x"$ac_cv_type_struct_addrinfo" = xyes && \
13013    test "$PORTNAME" != "win32"; then
13014   ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo"
13015 if test "x$ac_cv_func_getaddrinfo" = xyes; then :
13016   $as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
13017
13018 else
13019   case " $LIBOBJS " in
13020   *" getaddrinfo.$ac_objext "* ) ;;
13021   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
13022  ;;
13023 esac
13024
13025 fi
13026
13027
13028 else
13029   case " $LIBOBJS " in
13030   *" getaddrinfo.$ac_objext "* ) ;;
13031   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
13032  ;;
13033 esac
13034
13035 fi
13036
13037 # Similarly, use system's getopt_long() only if system provides struct option.
13038 if test x"$ac_cv_type_struct_option" = xyes ; then
13039   ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long"
13040 if test "x$ac_cv_func_getopt_long" = xyes; then :
13041   $as_echo "#define HAVE_GETOPT_LONG 1" >>confdefs.h
13042
13043 else
13044   case " $LIBOBJS " in
13045   *" getopt_long.$ac_objext "* ) ;;
13046   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
13047  ;;
13048 esac
13049
13050 fi
13051
13052
13053 else
13054   case " $LIBOBJS " in
13055   *" getopt_long.$ac_objext "* ) ;;
13056   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
13057  ;;
13058 esac
13059
13060 fi
13061
13062 # Solaris' getopt() doesn't do what we want for long options, so always use
13063 # our version on that platform.
13064 if test "$PORTNAME" = "solaris"; then
13065   case " $LIBOBJS " in
13066   *" getopt.$ac_objext "* ) ;;
13067   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
13068  ;;
13069 esac
13070
13071 fi
13072
13073 # mingw has adopted a GNU-centric interpretation of optind/optreset,
13074 # so always use our version on Windows.
13075 if test "$PORTNAME" = "win32"; then
13076   case " $LIBOBJS " in
13077   *" getopt.$ac_objext "* ) ;;
13078   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
13079  ;;
13080 esac
13081
13082   case " $LIBOBJS " in
13083   *" getopt_long.$ac_objext "* ) ;;
13084   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
13085  ;;
13086 esac
13087
13088 fi
13089
13090 # Win32 (really MinGW) support
13091 if test "$PORTNAME" = "win32"; then
13092   ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
13093 if test "x$ac_cv_func_gettimeofday" = xyes; then :
13094   $as_echo "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
13095
13096 else
13097   case " $LIBOBJS " in
13098   *" gettimeofday.$ac_objext "* ) ;;
13099   *) LIBOBJS="$LIBOBJS gettimeofday.$ac_objext"
13100  ;;
13101 esac
13102
13103 fi
13104
13105
13106   case " $LIBOBJS " in
13107   *" dirmod.$ac_objext "* ) ;;
13108   *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
13109  ;;
13110 esac
13111
13112   case " $LIBOBJS " in
13113   *" kill.$ac_objext "* ) ;;
13114   *) LIBOBJS="$LIBOBJS kill.$ac_objext"
13115  ;;
13116 esac
13117
13118   case " $LIBOBJS " in
13119   *" open.$ac_objext "* ) ;;
13120   *) LIBOBJS="$LIBOBJS open.$ac_objext"
13121  ;;
13122 esac
13123
13124   case " $LIBOBJS " in
13125   *" system.$ac_objext "* ) ;;
13126   *) LIBOBJS="$LIBOBJS system.$ac_objext"
13127  ;;
13128 esac
13129
13130   case " $LIBOBJS " in
13131   *" win32env.$ac_objext "* ) ;;
13132   *) LIBOBJS="$LIBOBJS win32env.$ac_objext"
13133  ;;
13134 esac
13135
13136   case " $LIBOBJS " in
13137   *" win32error.$ac_objext "* ) ;;
13138   *) LIBOBJS="$LIBOBJS win32error.$ac_objext"
13139  ;;
13140 esac
13141
13142   case " $LIBOBJS " in
13143   *" win32security.$ac_objext "* ) ;;
13144   *) LIBOBJS="$LIBOBJS win32security.$ac_objext"
13145  ;;
13146 esac
13147
13148   case " $LIBOBJS " in
13149   *" win32setlocale.$ac_objext "* ) ;;
13150   *) LIBOBJS="$LIBOBJS win32setlocale.$ac_objext"
13151  ;;
13152 esac
13153
13154
13155 $as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
13156
13157   ac_fn_c_check_type "$LINENO" "MINIDUMP_TYPE" "ac_cv_type_MINIDUMP_TYPE" "
13158 #define WIN32_LEAN_AND_MEAN
13159 #include <windows.h>
13160 #include <string.h>
13161 #include <dbghelp.h>
13162 "
13163 if test "x$ac_cv_type_MINIDUMP_TYPE" = xyes; then :
13164
13165 cat >>confdefs.h <<_ACEOF
13166 #define HAVE_MINIDUMP_TYPE 1
13167 _ACEOF
13168
13169 pgac_minidump_type=yes
13170 else
13171   pgac_minidump_type=no
13172 fi
13173
13174 fi
13175 if test x"$pgac_minidump_type" = x"yes" ; then
13176   have_win32_dbghelp=yes
13177
13178 else
13179   have_win32_dbghelp=no
13180
13181 fi
13182
13183 # Cygwin needs only a bit of that
13184 if test "$PORTNAME" = "cygwin"; then
13185   case " $LIBOBJS " in
13186   *" dirmod.$ac_objext "* ) ;;
13187   *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
13188  ;;
13189 esac
13190
13191 fi
13192
13193 ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "#include <signal.h>
13194 /* NetBSD declares sys_siglist in unistd.h.  */
13195 #ifdef HAVE_UNISTD_H
13196 # include <unistd.h>
13197 #endif
13198
13199 "
13200 if test "x$ac_cv_have_decl_sys_siglist" = xyes; then :
13201   ac_have_decl=1
13202 else
13203   ac_have_decl=0
13204 fi
13205
13206 cat >>confdefs.h <<_ACEOF
13207 #define HAVE_DECL_SYS_SIGLIST $ac_have_decl
13208 _ACEOF
13209
13210
13211 ac_fn_c_check_func "$LINENO" "syslog" "ac_cv_func_syslog"
13212 if test "x$ac_cv_func_syslog" = xyes; then :
13213   ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default"
13214 if test "x$ac_cv_header_syslog_h" = xyes; then :
13215
13216 $as_echo "#define HAVE_SYSLOG 1" >>confdefs.h
13217
13218 fi
13219
13220
13221 fi
13222
13223
13224 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opterr" >&5
13225 $as_echo_n "checking for opterr... " >&6; }
13226 if ${pgac_cv_var_int_opterr+:} false; then :
13227   $as_echo_n "(cached) " >&6
13228 else
13229   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13230 /* end confdefs.h.  */
13231 #include <unistd.h>
13232 int
13233 main ()
13234 {
13235 extern int opterr; opterr = 1;
13236   ;
13237   return 0;
13238 }
13239 _ACEOF
13240 if ac_fn_c_try_link "$LINENO"; then :
13241   pgac_cv_var_int_opterr=yes
13242 else
13243   pgac_cv_var_int_opterr=no
13244 fi
13245 rm -f core conftest.err conftest.$ac_objext \
13246     conftest$ac_exeext conftest.$ac_ext
13247 fi
13248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_opterr" >&5
13249 $as_echo "$pgac_cv_var_int_opterr" >&6; }
13250 if test x"$pgac_cv_var_int_opterr" = x"yes"; then
13251
13252 $as_echo "#define HAVE_INT_OPTERR 1" >>confdefs.h
13253
13254 fi
13255
13256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for optreset" >&5
13257 $as_echo_n "checking for optreset... " >&6; }
13258 if ${pgac_cv_var_int_optreset+:} false; then :
13259   $as_echo_n "(cached) " >&6
13260 else
13261   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13262 /* end confdefs.h.  */
13263 #include <unistd.h>
13264 int
13265 main ()
13266 {
13267 extern int optreset; optreset = 1;
13268   ;
13269   return 0;
13270 }
13271 _ACEOF
13272 if ac_fn_c_try_link "$LINENO"; then :
13273   pgac_cv_var_int_optreset=yes
13274 else
13275   pgac_cv_var_int_optreset=no
13276 fi
13277 rm -f core conftest.err conftest.$ac_objext \
13278     conftest$ac_exeext conftest.$ac_ext
13279 fi
13280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_optreset" >&5
13281 $as_echo "$pgac_cv_var_int_optreset" >&6; }
13282 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
13283
13284 $as_echo "#define HAVE_INT_OPTRESET 1" >>confdefs.h
13285
13286 fi
13287
13288 for ac_func in strtoll strtoq
13289 do :
13290   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13291 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13292 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13293   cat >>confdefs.h <<_ACEOF
13294 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13295 _ACEOF
13296  break
13297 fi
13298 done
13299
13300 for ac_func in strtoull strtouq
13301 do :
13302   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13303 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13304 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13305   cat >>confdefs.h <<_ACEOF
13306 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13307 _ACEOF
13308  break
13309 fi
13310 done
13311
13312
13313 # Lastly, restore full LIBS list and check for readline/libedit symbols
13314 LIBS="$LIBS_including_readline"
13315
13316 if test "$with_readline" = yes; then
13317   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_append_character" >&5
13318 $as_echo_n "checking for rl_completion_append_character... " >&6; }
13319 if ${pgac_cv_var_rl_completion_append_character+:} false; then :
13320   $as_echo_n "(cached) " >&6
13321 else
13322   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13323 /* end confdefs.h.  */
13324 #include <stdio.h>
13325 #ifdef HAVE_READLINE_READLINE_H
13326 # include <readline/readline.h>
13327 #elif defined(HAVE_READLINE_H)
13328 # include <readline.h>
13329 #endif
13330
13331 int
13332 main ()
13333 {
13334 rl_completion_append_character = 'x';
13335   ;
13336   return 0;
13337 }
13338 _ACEOF
13339 if ac_fn_c_try_link "$LINENO"; then :
13340   pgac_cv_var_rl_completion_append_character=yes
13341 else
13342   pgac_cv_var_rl_completion_append_character=no
13343 fi
13344 rm -f core conftest.err conftest.$ac_objext \
13345     conftest$ac_exeext conftest.$ac_ext
13346 fi
13347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_completion_append_character" >&5
13348 $as_echo "$pgac_cv_var_rl_completion_append_character" >&6; }
13349 if test x"$pgac_cv_var_rl_completion_append_character" = x"yes"; then
13350
13351 $as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
13352
13353 fi
13354   for ac_func in rl_completion_matches rl_filename_completion_function rl_reset_screen_size
13355 do :
13356   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13357 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13358 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13359   cat >>confdefs.h <<_ACEOF
13360 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13361 _ACEOF
13362
13363 fi
13364 done
13365
13366   for ac_func in append_history history_truncate_file
13367 do :
13368   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13369 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13370 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13371   cat >>confdefs.h <<_ACEOF
13372 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13373 _ACEOF
13374
13375 fi
13376 done
13377
13378 fi
13379
13380
13381 # This test makes sure that run tests work at all.  Sometimes a shared
13382 # library is found by the linker, but the runtime linker can't find it.
13383 # This check should come after all modifications of compiler or linker
13384 # variables, and before any other run tests.
13385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking test program" >&5
13386 $as_echo_n "checking test program... " >&6; }
13387 if test "$cross_compiling" = yes; then :
13388   { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling" >&5
13389 $as_echo "cross-compiling" >&6; }
13390 else
13391   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13392 /* end confdefs.h.  */
13393 int main() { return 0; }
13394 _ACEOF
13395 if ac_fn_c_try_run "$LINENO"; then :
13396   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
13397 $as_echo "ok" >&6; }
13398 else
13399   { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
13400 $as_echo "failed" >&6; }
13401 as_fn_error $? "
13402 Could not execute a simple test program.  This may be a problem
13403 related to locating shared libraries.  Check the file 'config.log'
13404 for the exact reason." "$LINENO" 5
13405 fi
13406 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13407   conftest.$ac_objext conftest.beam conftest.$ac_ext
13408 fi
13409
13410
13411 # --------------------
13412 # Run tests below here
13413 # --------------------
13414
13415 # Force use of our snprintf if system's doesn't do arg control
13416 # See comment above at snprintf test for details.
13417 if test "$enable_nls" = yes -a "$pgac_need_repl_snprintf" = no; then
13418   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf supports argument control" >&5
13419 $as_echo_n "checking whether snprintf supports argument control... " >&6; }
13420 if ${pgac_cv_snprintf_arg_control+:} false; then :
13421   $as_echo_n "(cached) " >&6
13422 else
13423   if test "$cross_compiling" = yes; then :
13424   pgac_cv_snprintf_arg_control=cross
13425 else
13426   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13427 /* end confdefs.h.  */
13428 #include <stdio.h>
13429 #include <string.h>
13430
13431 int main()
13432 {
13433   char buf[100];
13434
13435   /* can it swap arguments? */
13436   snprintf(buf, 100, "%2\$d %1\$d", 3, 4);
13437   if (strcmp(buf, "4 3") != 0)
13438     return 1;
13439   return 0;
13440 }
13441 _ACEOF
13442 if ac_fn_c_try_run "$LINENO"; then :
13443   pgac_cv_snprintf_arg_control=yes
13444 else
13445   pgac_cv_snprintf_arg_control=no
13446 fi
13447 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13448   conftest.$ac_objext conftest.beam conftest.$ac_ext
13449 fi
13450
13451
13452 fi
13453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_arg_control" >&5
13454 $as_echo "$pgac_cv_snprintf_arg_control" >&6; }
13455
13456   if test $pgac_cv_snprintf_arg_control != yes ; then
13457     pgac_need_repl_snprintf=yes
13458   fi
13459 fi
13460
13461
13462
13463
13464 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long int is 64 bits" >&5
13465 $as_echo_n "checking whether long int is 64 bits... " >&6; }
13466 if ${pgac_cv_type_long_int_64+:} false; then :
13467   $as_echo_n "(cached) " >&6
13468 else
13469   if test "$cross_compiling" = yes; then :
13470   # If cross-compiling, check the size reported by the compiler and
13471 # trust that the arithmetic works.
13472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13473 /* end confdefs.h.  */
13474
13475 int
13476 main ()
13477 {
13478 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
13479 test_array [0] = 0;
13480 return test_array [0];
13481
13482   ;
13483   return 0;
13484 }
13485 _ACEOF
13486 if ac_fn_c_try_compile "$LINENO"; then :
13487   pgac_cv_type_long_int_64=yes
13488 else
13489   pgac_cv_type_long_int_64=no
13490 fi
13491 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13492 else
13493   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13494 /* end confdefs.h.  */
13495 typedef long int ac_int64;
13496
13497 /*
13498  * These are globals to discourage the compiler from folding all the
13499  * arithmetic tests down to compile-time constants.
13500  */
13501 ac_int64 a = 20000001;
13502 ac_int64 b = 40000005;
13503
13504 int does_int64_work()
13505 {
13506   ac_int64 c,d;
13507
13508   if (sizeof(ac_int64) != 8)
13509     return 0;                   /* definitely not the right size */
13510
13511   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
13512   c = a * b;
13513   d = (c + b) / b;
13514   if (d != a+1)
13515     return 0;
13516   return 1;
13517 }
13518 main() {
13519   exit(! does_int64_work());
13520 }
13521 _ACEOF
13522 if ac_fn_c_try_run "$LINENO"; then :
13523   pgac_cv_type_long_int_64=yes
13524 else
13525   pgac_cv_type_long_int_64=no
13526 fi
13527 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13528   conftest.$ac_objext conftest.beam conftest.$ac_ext
13529 fi
13530
13531 fi
13532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_int_64" >&5
13533 $as_echo "$pgac_cv_type_long_int_64" >&6; }
13534
13535 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
13536 if test x"$pgac_cv_type_long_int_64" = xyes ; then
13537
13538 $as_echo "#define HAVE_LONG_INT_64 1" >>confdefs.h
13539
13540 fi
13541
13542
13543 if test x"$HAVE_LONG_INT_64" = x"yes" ; then
13544   pg_int64_type="long int"
13545 else
13546   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long long int is 64 bits" >&5
13547 $as_echo_n "checking whether long long int is 64 bits... " >&6; }
13548 if ${pgac_cv_type_long_long_int_64+:} false; then :
13549   $as_echo_n "(cached) " >&6
13550 else
13551   if test "$cross_compiling" = yes; then :
13552   # If cross-compiling, check the size reported by the compiler and
13553 # trust that the arithmetic works.
13554 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13555 /* end confdefs.h.  */
13556
13557 int
13558 main ()
13559 {
13560 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
13561 test_array [0] = 0;
13562 return test_array [0];
13563
13564   ;
13565   return 0;
13566 }
13567 _ACEOF
13568 if ac_fn_c_try_compile "$LINENO"; then :
13569   pgac_cv_type_long_long_int_64=yes
13570 else
13571   pgac_cv_type_long_long_int_64=no
13572 fi
13573 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13574 else
13575   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13576 /* end confdefs.h.  */
13577 typedef long long int ac_int64;
13578
13579 /*
13580  * These are globals to discourage the compiler from folding all the
13581  * arithmetic tests down to compile-time constants.
13582  */
13583 ac_int64 a = 20000001;
13584 ac_int64 b = 40000005;
13585
13586 int does_int64_work()
13587 {
13588   ac_int64 c,d;
13589
13590   if (sizeof(ac_int64) != 8)
13591     return 0;                   /* definitely not the right size */
13592
13593   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
13594   c = a * b;
13595   d = (c + b) / b;
13596   if (d != a+1)
13597     return 0;
13598   return 1;
13599 }
13600 main() {
13601   exit(! does_int64_work());
13602 }
13603 _ACEOF
13604 if ac_fn_c_try_run "$LINENO"; then :
13605   pgac_cv_type_long_long_int_64=yes
13606 else
13607   pgac_cv_type_long_long_int_64=no
13608 fi
13609 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13610   conftest.$ac_objext conftest.beam conftest.$ac_ext
13611 fi
13612
13613 fi
13614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_long_int_64" >&5
13615 $as_echo "$pgac_cv_type_long_long_int_64" >&6; }
13616
13617 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
13618 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
13619
13620 $as_echo "#define HAVE_LONG_LONG_INT_64 1" >>confdefs.h
13621
13622 fi
13623
13624   if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
13625     pg_int64_type="long long int"
13626   else
13627     as_fn_error $? "Cannot find a working 64-bit integer type." "$LINENO" 5
13628   fi
13629 fi
13630
13631
13632 cat >>confdefs.h <<_ACEOF
13633 #define PG_INT64_TYPE $pg_int64_type
13634 _ACEOF
13635
13636
13637
13638 if test x"$HAVE_LONG_LONG_INT_64" = xyes ; then
13639   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13640 /* end confdefs.h.  */
13641
13642 #define INT64CONST(x)  x##LL
13643 long long int foo = INT64CONST(0x1234567890123456);
13644
13645 _ACEOF
13646 if ac_fn_c_try_compile "$LINENO"; then :
13647
13648 $as_echo "#define HAVE_LL_CONSTANTS 1" >>confdefs.h
13649
13650 fi
13651 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13652 fi
13653
13654
13655 # If we found "long int" is 64 bits, assume snprintf handles it.  If
13656 # we found we need to use "long long int", better check.  We cope with
13657 # snprintfs that use %lld, %qd, or %I64d as the format.  If none of these
13658 # work, fall back to our own snprintf emulation (which we know uses %lld).
13659
13660 if test "$HAVE_LONG_LONG_INT_64" = yes ; then
13661   if test $pgac_need_repl_snprintf = no; then
13662     { $as_echo "$as_me:${as_lineno-$LINENO}: checking snprintf length modifier for long long int" >&5
13663 $as_echo_n "checking snprintf length modifier for long long int... " >&6; }
13664 if ${pgac_cv_snprintf_long_long_int_modifier+:} false; then :
13665   $as_echo_n "(cached) " >&6
13666 else
13667   for pgac_modifier in 'll' 'q' 'I64'; do
13668 if test "$cross_compiling" = yes; then :
13669   pgac_cv_snprintf_long_long_int_modifier=cross; break
13670 else
13671   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13672 /* end confdefs.h.  */
13673 #include <stdio.h>
13674 typedef long long int ac_int64;
13675 #define INT64_FORMAT "%${pgac_modifier}d"
13676
13677 ac_int64 a = 20000001;
13678 ac_int64 b = 40000005;
13679
13680 int does_int64_snprintf_work()
13681 {
13682   ac_int64 c;
13683   char buf[100];
13684
13685   if (sizeof(ac_int64) != 8)
13686     return 0;                   /* doesn't look like the right size */
13687
13688   c = a * b;
13689   snprintf(buf, 100, INT64_FORMAT, c);
13690   if (strcmp(buf, "800000140000005") != 0)
13691     return 0;                   /* either multiply or snprintf is busted */
13692   return 1;
13693 }
13694 main() {
13695   exit(! does_int64_snprintf_work());
13696 }
13697 _ACEOF
13698 if ac_fn_c_try_run "$LINENO"; then :
13699   pgac_cv_snprintf_long_long_int_modifier=$pgac_modifier; break
13700 fi
13701 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13702   conftest.$ac_objext conftest.beam conftest.$ac_ext
13703 fi
13704
13705 done
13706 fi
13707
13708 LONG_LONG_INT_MODIFIER=''
13709
13710 case $pgac_cv_snprintf_long_long_int_modifier in
13711   cross) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot test (not on host machine)" >&5
13712 $as_echo "cannot test (not on host machine)" >&6; };;
13713   ?*)    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_long_long_int_modifier" >&5
13714 $as_echo "$pgac_cv_snprintf_long_long_int_modifier" >&6; }
13715          LONG_LONG_INT_MODIFIER=$pgac_cv_snprintf_long_long_int_modifier;;
13716   *)     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13717 $as_echo "none" >&6; };;
13718 esac
13719     if test "$LONG_LONG_INT_MODIFIER" = ""; then
13720       # Force usage of our own snprintf, since system snprintf is broken
13721       pgac_need_repl_snprintf=yes
13722       LONG_LONG_INT_MODIFIER='ll'
13723     fi
13724   else
13725     # Here if we previously decided we needed to use our own snprintf
13726     LONG_LONG_INT_MODIFIER='ll'
13727   fi
13728 else
13729   # Here if we are not using 'long long int' at all
13730   LONG_LONG_INT_MODIFIER='l'
13731 fi
13732
13733 INT64_MODIFIER="\"$LONG_LONG_INT_MODIFIER\""
13734
13735
13736 cat >>confdefs.h <<_ACEOF
13737 #define INT64_MODIFIER $INT64_MODIFIER
13738 _ACEOF
13739
13740
13741 # Also force use of our snprintf if the system's doesn't support the %z flag.
13742 if test "$pgac_need_repl_snprintf" = no; then
13743   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf supports the %z modifier" >&5
13744 $as_echo_n "checking whether snprintf supports the %z modifier... " >&6; }
13745 if ${pgac_cv_snprintf_size_t_support+:} false; then :
13746   $as_echo_n "(cached) " >&6
13747 else
13748   if test "$cross_compiling" = yes; then :
13749   pgac_cv_snprintf_size_t_support=cross
13750 else
13751   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13752 /* end confdefs.h.  */
13753 #include <stdio.h>
13754 #include <string.h>
13755
13756 int main()
13757 {
13758   char bufz[100];
13759   char buf64[100];
13760
13761   /*
13762    * Print the largest unsigned number fitting in a size_t using both %zu
13763    * and the previously-determined format for 64-bit integers.  Note that
13764    * we don't run this code unless we know snprintf handles 64-bit ints.
13765    */
13766   bufz[0] = '\0';  /* in case snprintf fails to emit anything */
13767   snprintf(bufz, sizeof(bufz), "%zu", ~((size_t) 0));
13768   snprintf(buf64, sizeof(buf64), "%" INT64_MODIFIER "u",
13769     (unsigned PG_INT64_TYPE) ~((size_t) 0));
13770   if (strcmp(bufz, buf64) != 0)
13771     return 1;
13772   return 0;
13773 }
13774 _ACEOF
13775 if ac_fn_c_try_run "$LINENO"; then :
13776   pgac_cv_snprintf_size_t_support=yes
13777 else
13778   pgac_cv_snprintf_size_t_support=no
13779 fi
13780 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13781   conftest.$ac_objext conftest.beam conftest.$ac_ext
13782 fi
13783
13784
13785 fi
13786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_size_t_support" >&5
13787 $as_echo "$pgac_cv_snprintf_size_t_support" >&6; }
13788
13789   if test "$pgac_cv_snprintf_size_t_support" != yes; then
13790     pgac_need_repl_snprintf=yes
13791   fi
13792 fi
13793
13794 # Now we have checked all the reasons to replace snprintf
13795 if test $pgac_need_repl_snprintf = yes; then
13796
13797 $as_echo "#define USE_REPL_SNPRINTF 1" >>confdefs.h
13798
13799   case " $LIBOBJS " in
13800   *" snprintf.$ac_objext "* ) ;;
13801   *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
13802  ;;
13803 esac
13804
13805 fi
13806
13807 # Check size of void *, size_t (enables tweaks for > 32bit address space)
13808 # The cast to long int works around a bug in the HP C Compiler
13809 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13810 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13811 # This bug is HP SR number 8606223364.
13812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
13813 $as_echo_n "checking size of void *... " >&6; }
13814 if ${ac_cv_sizeof_void_p+:} false; then :
13815   $as_echo_n "(cached) " >&6
13816 else
13817   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p"        "$ac_includes_default"; then :
13818
13819 else
13820   if test "$ac_cv_type_void_p" = yes; then
13821      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13822 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13823 as_fn_error 77 "cannot compute sizeof (void *)
13824 See \`config.log' for more details" "$LINENO" 5; }
13825    else
13826      ac_cv_sizeof_void_p=0
13827    fi
13828 fi
13829
13830 fi
13831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
13832 $as_echo "$ac_cv_sizeof_void_p" >&6; }
13833
13834
13835
13836 cat >>confdefs.h <<_ACEOF
13837 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
13838 _ACEOF
13839
13840
13841 # The cast to long int works around a bug in the HP C Compiler
13842 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13843 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13844 # This bug is HP SR number 8606223364.
13845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
13846 $as_echo_n "checking size of size_t... " >&6; }
13847 if ${ac_cv_sizeof_size_t+:} false; then :
13848   $as_echo_n "(cached) " >&6
13849 else
13850   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t"        "$ac_includes_default"; then :
13851
13852 else
13853   if test "$ac_cv_type_size_t" = yes; then
13854      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13855 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13856 as_fn_error 77 "cannot compute sizeof (size_t)
13857 See \`config.log' for more details" "$LINENO" 5; }
13858    else
13859      ac_cv_sizeof_size_t=0
13860    fi
13861 fi
13862
13863 fi
13864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
13865 $as_echo "$ac_cv_sizeof_size_t" >&6; }
13866
13867
13868
13869 cat >>confdefs.h <<_ACEOF
13870 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
13871 _ACEOF
13872
13873
13874 # The cast to long int works around a bug in the HP C Compiler
13875 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13876 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13877 # This bug is HP SR number 8606223364.
13878 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
13879 $as_echo_n "checking size of long... " >&6; }
13880 if ${ac_cv_sizeof_long+:} false; then :
13881   $as_echo_n "(cached) " >&6
13882 else
13883   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
13884
13885 else
13886   if test "$ac_cv_type_long" = yes; then
13887      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13888 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13889 as_fn_error 77 "cannot compute sizeof (long)
13890 See \`config.log' for more details" "$LINENO" 5; }
13891    else
13892      ac_cv_sizeof_long=0
13893    fi
13894 fi
13895
13896 fi
13897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
13898 $as_echo "$ac_cv_sizeof_long" >&6; }
13899
13900
13901
13902 cat >>confdefs.h <<_ACEOF
13903 #define SIZEOF_LONG $ac_cv_sizeof_long
13904 _ACEOF
13905
13906
13907
13908 # Decide whether float4 is passed by value: user-selectable, enabled by default
13909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float4 passed by value" >&5
13910 $as_echo_n "checking whether to build with float4 passed by value... " >&6; }
13911
13912
13913 # Check whether --enable-float4-byval was given.
13914 if test "${enable_float4_byval+set}" = set; then :
13915   enableval=$enable_float4_byval;
13916   case $enableval in
13917     yes)
13918
13919 $as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
13920
13921                float4passbyval=true
13922       ;;
13923     no)
13924       float4passbyval=false
13925       ;;
13926     *)
13927       as_fn_error $? "no argument expected for --enable-float4-byval option" "$LINENO" 5
13928       ;;
13929   esac
13930
13931 else
13932   enable_float4_byval=yes
13933
13934 $as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
13935
13936                float4passbyval=true
13937 fi
13938
13939
13940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float4_byval" >&5
13941 $as_echo "$enable_float4_byval" >&6; }
13942
13943 cat >>confdefs.h <<_ACEOF
13944 #define FLOAT4PASSBYVAL $float4passbyval
13945 _ACEOF
13946
13947
13948 # Decide whether float8 is passed by value.
13949 # Note: this setting also controls int8 and related types such as timestamp.
13950 # If sizeof(Datum) >= 8, this is user-selectable, enabled by default.
13951 # If not, trying to select it is an error.
13952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float8 passed by value" >&5
13953 $as_echo_n "checking whether to build with float8 passed by value... " >&6; }
13954 if test $ac_cv_sizeof_void_p -ge 8 ; then
13955
13956
13957 # Check whether --enable-float8-byval was given.
13958 if test "${enable_float8_byval+set}" = set; then :
13959   enableval=$enable_float8_byval;
13960   case $enableval in
13961     yes)
13962       :
13963       ;;
13964     no)
13965       :
13966       ;;
13967     *)
13968       as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
13969       ;;
13970   esac
13971
13972 else
13973   enable_float8_byval=yes
13974
13975 fi
13976
13977
13978 else
13979
13980
13981 # Check whether --enable-float8-byval was given.
13982 if test "${enable_float8_byval+set}" = set; then :
13983   enableval=$enable_float8_byval;
13984   case $enableval in
13985     yes)
13986       :
13987       ;;
13988     no)
13989       :
13990       ;;
13991     *)
13992       as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
13993       ;;
13994   esac
13995
13996 else
13997   enable_float8_byval=no
13998
13999 fi
14000
14001
14002   if test "$enable_float8_byval" = yes ; then
14003     as_fn_error $? "--enable-float8-byval is not supported on 32-bit platforms." "$LINENO" 5
14004   fi
14005 fi
14006 if test "$enable_float8_byval" = yes ; then
14007
14008 $as_echo "#define USE_FLOAT8_BYVAL 1" >>confdefs.h
14009
14010   float8passbyval=true
14011 else
14012   float8passbyval=false
14013 fi
14014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float8_byval" >&5
14015 $as_echo "$enable_float8_byval" >&6; }
14016
14017 cat >>confdefs.h <<_ACEOF
14018 #define FLOAT8PASSBYVAL $float8passbyval
14019 _ACEOF
14020
14021
14022 # Determine memory alignment requirements for the basic C data types.
14023
14024 # The cast to long int works around a bug in the HP C Compiler,
14025 # see AC_CHECK_SIZEOF for more information.
14026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of short" >&5
14027 $as_echo_n "checking alignment of short... " >&6; }
14028 if ${ac_cv_alignof_short+:} false; then :
14029   $as_echo_n "(cached) " >&6
14030 else
14031   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_short"        "$ac_includes_default
14032 #ifndef offsetof
14033 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
14034 #endif
14035 typedef struct { char x; short y; } ac__type_alignof_;"; then :
14036
14037 else
14038   if test "$ac_cv_type_short" = yes; then
14039      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14040 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14041 as_fn_error 77 "cannot compute alignment of short
14042 See \`config.log' for more details" "$LINENO" 5; }
14043    else
14044      ac_cv_alignof_short=0
14045    fi
14046 fi
14047
14048 fi
14049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_short" >&5
14050 $as_echo "$ac_cv_alignof_short" >&6; }
14051
14052
14053
14054 cat >>confdefs.h <<_ACEOF
14055 #define ALIGNOF_SHORT $ac_cv_alignof_short
14056 _ACEOF
14057
14058
14059 # The cast to long int works around a bug in the HP C Compiler,
14060 # see AC_CHECK_SIZEOF for more information.
14061 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of int" >&5
14062 $as_echo_n "checking alignment of int... " >&6; }
14063 if ${ac_cv_alignof_int+:} false; then :
14064   $as_echo_n "(cached) " >&6
14065 else
14066   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_int"        "$ac_includes_default
14067 #ifndef offsetof
14068 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
14069 #endif
14070 typedef struct { char x; int y; } ac__type_alignof_;"; then :
14071
14072 else
14073   if test "$ac_cv_type_int" = yes; then
14074      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14075 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14076 as_fn_error 77 "cannot compute alignment of int
14077 See \`config.log' for more details" "$LINENO" 5; }
14078    else
14079      ac_cv_alignof_int=0
14080    fi
14081 fi
14082
14083 fi
14084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_int" >&5
14085 $as_echo "$ac_cv_alignof_int" >&6; }
14086
14087
14088
14089 cat >>confdefs.h <<_ACEOF
14090 #define ALIGNOF_INT $ac_cv_alignof_int
14091 _ACEOF
14092
14093
14094 # The cast to long int works around a bug in the HP C Compiler,
14095 # see AC_CHECK_SIZEOF for more information.
14096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long" >&5
14097 $as_echo_n "checking alignment of long... " >&6; }
14098 if ${ac_cv_alignof_long+:} false; then :
14099   $as_echo_n "(cached) " >&6
14100 else
14101   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long"        "$ac_includes_default
14102 #ifndef offsetof
14103 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
14104 #endif
14105 typedef struct { char x; long y; } ac__type_alignof_;"; then :
14106
14107 else
14108   if test "$ac_cv_type_long" = yes; then
14109      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14110 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14111 as_fn_error 77 "cannot compute alignment of long
14112 See \`config.log' for more details" "$LINENO" 5; }
14113    else
14114      ac_cv_alignof_long=0
14115    fi
14116 fi
14117
14118 fi
14119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long" >&5
14120 $as_echo "$ac_cv_alignof_long" >&6; }
14121
14122
14123
14124 cat >>confdefs.h <<_ACEOF
14125 #define ALIGNOF_LONG $ac_cv_alignof_long
14126 _ACEOF
14127
14128
14129 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
14130   # The cast to long int works around a bug in the HP C Compiler,
14131 # see AC_CHECK_SIZEOF for more information.
14132 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long long int" >&5
14133 $as_echo_n "checking alignment of long long int... " >&6; }
14134 if ${ac_cv_alignof_long_long_int+:} false; then :
14135   $as_echo_n "(cached) " >&6
14136 else
14137   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long_long_int"        "$ac_includes_default
14138 #ifndef offsetof
14139 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
14140 #endif
14141 typedef struct { char x; long long int y; } ac__type_alignof_;"; then :
14142
14143 else
14144   if test "$ac_cv_type_long_long_int" = yes; then
14145      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14146 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14147 as_fn_error 77 "cannot compute alignment of long long int
14148 See \`config.log' for more details" "$LINENO" 5; }
14149    else
14150      ac_cv_alignof_long_long_int=0
14151    fi
14152 fi
14153
14154 fi
14155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long_long_int" >&5
14156 $as_echo "$ac_cv_alignof_long_long_int" >&6; }
14157
14158
14159
14160 cat >>confdefs.h <<_ACEOF
14161 #define ALIGNOF_LONG_LONG_INT $ac_cv_alignof_long_long_int
14162 _ACEOF
14163
14164
14165 fi
14166 # The cast to long int works around a bug in the HP C Compiler,
14167 # see AC_CHECK_SIZEOF for more information.
14168 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of double" >&5
14169 $as_echo_n "checking alignment of double... " >&6; }
14170 if ${ac_cv_alignof_double+:} false; then :
14171   $as_echo_n "(cached) " >&6
14172 else
14173   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_double"        "$ac_includes_default
14174 #ifndef offsetof
14175 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
14176 #endif
14177 typedef struct { char x; double y; } ac__type_alignof_;"; then :
14178
14179 else
14180   if test "$ac_cv_type_double" = yes; then
14181      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14182 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14183 as_fn_error 77 "cannot compute alignment of double
14184 See \`config.log' for more details" "$LINENO" 5; }
14185    else
14186      ac_cv_alignof_double=0
14187    fi
14188 fi
14189
14190 fi
14191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_double" >&5
14192 $as_echo "$ac_cv_alignof_double" >&6; }
14193
14194
14195
14196 cat >>confdefs.h <<_ACEOF
14197 #define ALIGNOF_DOUBLE $ac_cv_alignof_double
14198 _ACEOF
14199
14200
14201
14202 # Compute maximum alignment of any basic type.
14203 # We assume long's alignment is at least as strong as char, short, or int;
14204 # but we must check long long (if it exists) and double.
14205
14206 MAX_ALIGNOF=$ac_cv_alignof_long
14207 if test $MAX_ALIGNOF -lt $ac_cv_alignof_double ; then
14208   MAX_ALIGNOF=$ac_cv_alignof_double
14209 fi
14210 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $ac_cv_alignof_long_long_int ; then
14211   MAX_ALIGNOF="$ac_cv_alignof_long_long_int"
14212 fi
14213
14214 cat >>confdefs.h <<_ACEOF
14215 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
14216 _ACEOF
14217
14218
14219
14220 # Some platforms predefine the types int8, int16, etc.  Only check
14221 # a (hopefully) representative subset.
14222 ac_fn_c_check_type "$LINENO" "int8" "ac_cv_type_int8" "#include <stdio.h>
14223 "
14224 if test "x$ac_cv_type_int8" = xyes; then :
14225
14226 cat >>confdefs.h <<_ACEOF
14227 #define HAVE_INT8 1
14228 _ACEOF
14229
14230
14231 fi
14232 ac_fn_c_check_type "$LINENO" "uint8" "ac_cv_type_uint8" "#include <stdio.h>
14233 "
14234 if test "x$ac_cv_type_uint8" = xyes; then :
14235
14236 cat >>confdefs.h <<_ACEOF
14237 #define HAVE_UINT8 1
14238 _ACEOF
14239
14240
14241 fi
14242 ac_fn_c_check_type "$LINENO" "int64" "ac_cv_type_int64" "#include <stdio.h>
14243 "
14244 if test "x$ac_cv_type_int64" = xyes; then :
14245
14246 cat >>confdefs.h <<_ACEOF
14247 #define HAVE_INT64 1
14248 _ACEOF
14249
14250
14251 fi
14252 ac_fn_c_check_type "$LINENO" "uint64" "ac_cv_type_uint64" "#include <stdio.h>
14253 "
14254 if test "x$ac_cv_type_uint64" = xyes; then :
14255
14256 cat >>confdefs.h <<_ACEOF
14257 #define HAVE_UINT64 1
14258 _ACEOF
14259
14260
14261 fi
14262
14263
14264 # Check for extensions offering the integer scalar type __int128.
14265 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128" >&5
14266 $as_echo_n "checking for __int128... " >&6; }
14267 if ${pgac_cv__128bit_int+:} false; then :
14268   $as_echo_n "(cached) " >&6
14269 else
14270   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14271 /* end confdefs.h.  */
14272
14273 /*
14274  * These are globals to discourage the compiler from folding all the
14275  * arithmetic tests down to compile-time constants.  We do not have
14276  * convenient support for 64bit literals at this point...
14277  */
14278 __int128 a = 48828125;
14279 __int128 b = 97656255;
14280
14281 int
14282 main ()
14283 {
14284
14285 __int128 c,d;
14286 a = (a << 12) + 1; /* 200000000001 */
14287 b = (b << 12) + 5; /* 400000000005 */
14288 /* use the most relevant arithmetic ops */
14289 c = a * b;
14290 d = (c + b) / b;
14291 /* return different values, to prevent optimizations */
14292 if (d != a+1)
14293   return 0;
14294 return 1;
14295
14296   ;
14297   return 0;
14298 }
14299 _ACEOF
14300 if ac_fn_c_try_link "$LINENO"; then :
14301   pgac_cv__128bit_int=yes
14302 else
14303   pgac_cv__128bit_int=no
14304 fi
14305 rm -f core conftest.err conftest.$ac_objext \
14306     conftest$ac_exeext conftest.$ac_ext
14307 fi
14308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int" >&5
14309 $as_echo "$pgac_cv__128bit_int" >&6; }
14310 if test x"$pgac_cv__128bit_int" = xyes ; then
14311
14312 $as_echo "#define PG_INT128_TYPE __int128" >>confdefs.h
14313
14314 fi
14315
14316 # Check for various atomic operations now that we have checked how to declare
14317 # 64bit integers.
14318 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync char locking functions" >&5
14319 $as_echo_n "checking for builtin __sync char locking functions... " >&6; }
14320 if ${pgac_cv_gcc_sync_char_tas+:} false; then :
14321   $as_echo_n "(cached) " >&6
14322 else
14323   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14324 /* end confdefs.h.  */
14325
14326 int
14327 main ()
14328 {
14329 char lock = 0;
14330    __sync_lock_test_and_set(&lock, 1);
14331    __sync_lock_release(&lock);
14332   ;
14333   return 0;
14334 }
14335 _ACEOF
14336 if ac_fn_c_try_link "$LINENO"; then :
14337   pgac_cv_gcc_sync_char_tas="yes"
14338 else
14339   pgac_cv_gcc_sync_char_tas="no"
14340 fi
14341 rm -f core conftest.err conftest.$ac_objext \
14342     conftest$ac_exeext conftest.$ac_ext
14343 fi
14344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_char_tas" >&5
14345 $as_echo "$pgac_cv_gcc_sync_char_tas" >&6; }
14346 if test x"$pgac_cv_gcc_sync_char_tas" = x"yes"; then
14347
14348 $as_echo "#define HAVE_GCC__SYNC_CHAR_TAS 1" >>confdefs.h
14349
14350 fi
14351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 locking functions" >&5
14352 $as_echo_n "checking for builtin __sync int32 locking functions... " >&6; }
14353 if ${pgac_cv_gcc_sync_int32_tas+:} false; then :
14354   $as_echo_n "(cached) " >&6
14355 else
14356   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14357 /* end confdefs.h.  */
14358
14359 int
14360 main ()
14361 {
14362 int lock = 0;
14363    __sync_lock_test_and_set(&lock, 1);
14364    __sync_lock_release(&lock);
14365   ;
14366   return 0;
14367 }
14368 _ACEOF
14369 if ac_fn_c_try_link "$LINENO"; then :
14370   pgac_cv_gcc_sync_int32_tas="yes"
14371 else
14372   pgac_cv_gcc_sync_int32_tas="no"
14373 fi
14374 rm -f core conftest.err conftest.$ac_objext \
14375     conftest$ac_exeext conftest.$ac_ext
14376 fi
14377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_tas" >&5
14378 $as_echo "$pgac_cv_gcc_sync_int32_tas" >&6; }
14379 if test x"$pgac_cv_gcc_sync_int32_tas" = x"yes"; then
14380
14381 $as_echo "#define HAVE_GCC__SYNC_INT32_TAS 1" >>confdefs.h
14382
14383 fi
14384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 atomic operations" >&5
14385 $as_echo_n "checking for builtin __sync int32 atomic operations... " >&6; }
14386 if ${pgac_cv_gcc_sync_int32_cas+:} false; then :
14387   $as_echo_n "(cached) " >&6
14388 else
14389   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14390 /* end confdefs.h.  */
14391
14392 int
14393 main ()
14394 {
14395 int val = 0;
14396    __sync_val_compare_and_swap(&val, 0, 37);
14397   ;
14398   return 0;
14399 }
14400 _ACEOF
14401 if ac_fn_c_try_link "$LINENO"; then :
14402   pgac_cv_gcc_sync_int32_cas="yes"
14403 else
14404   pgac_cv_gcc_sync_int32_cas="no"
14405 fi
14406 rm -f core conftest.err conftest.$ac_objext \
14407     conftest$ac_exeext conftest.$ac_ext
14408 fi
14409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_cas" >&5
14410 $as_echo "$pgac_cv_gcc_sync_int32_cas" >&6; }
14411 if test x"$pgac_cv_gcc_sync_int32_cas" = x"yes"; then
14412
14413 $as_echo "#define HAVE_GCC__SYNC_INT32_CAS 1" >>confdefs.h
14414
14415 fi
14416 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int64 atomic operations" >&5
14417 $as_echo_n "checking for builtin __sync int64 atomic operations... " >&6; }
14418 if ${pgac_cv_gcc_sync_int64_cas+:} false; then :
14419   $as_echo_n "(cached) " >&6
14420 else
14421   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14422 /* end confdefs.h.  */
14423
14424 int
14425 main ()
14426 {
14427 PG_INT64_TYPE lock = 0;
14428    __sync_val_compare_and_swap(&lock, 0, (PG_INT64_TYPE) 37);
14429   ;
14430   return 0;
14431 }
14432 _ACEOF
14433 if ac_fn_c_try_link "$LINENO"; then :
14434   pgac_cv_gcc_sync_int64_cas="yes"
14435 else
14436   pgac_cv_gcc_sync_int64_cas="no"
14437 fi
14438 rm -f core conftest.err conftest.$ac_objext \
14439     conftest$ac_exeext conftest.$ac_ext
14440 fi
14441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int64_cas" >&5
14442 $as_echo "$pgac_cv_gcc_sync_int64_cas" >&6; }
14443 if test x"$pgac_cv_gcc_sync_int64_cas" = x"yes"; then
14444
14445 $as_echo "#define HAVE_GCC__SYNC_INT64_CAS 1" >>confdefs.h
14446
14447 fi
14448 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int32 atomic operations" >&5
14449 $as_echo_n "checking for builtin __atomic int32 atomic operations... " >&6; }
14450 if ${pgac_cv_gcc_atomic_int32_cas+:} false; then :
14451   $as_echo_n "(cached) " >&6
14452 else
14453   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14454 /* end confdefs.h.  */
14455
14456 int
14457 main ()
14458 {
14459 int val = 0;
14460    int expect = 0;
14461    __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
14462   ;
14463   return 0;
14464 }
14465 _ACEOF
14466 if ac_fn_c_try_link "$LINENO"; then :
14467   pgac_cv_gcc_atomic_int32_cas="yes"
14468 else
14469   pgac_cv_gcc_atomic_int32_cas="no"
14470 fi
14471 rm -f core conftest.err conftest.$ac_objext \
14472     conftest$ac_exeext conftest.$ac_ext
14473 fi
14474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int32_cas" >&5
14475 $as_echo "$pgac_cv_gcc_atomic_int32_cas" >&6; }
14476 if test x"$pgac_cv_gcc_atomic_int32_cas" = x"yes"; then
14477
14478 $as_echo "#define HAVE_GCC__ATOMIC_INT32_CAS 1" >>confdefs.h
14479
14480 fi
14481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int64 atomic operations" >&5
14482 $as_echo_n "checking for builtin __atomic int64 atomic operations... " >&6; }
14483 if ${pgac_cv_gcc_atomic_int64_cas+:} false; then :
14484   $as_echo_n "(cached) " >&6
14485 else
14486   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14487 /* end confdefs.h.  */
14488
14489 int
14490 main ()
14491 {
14492 PG_INT64_TYPE val = 0;
14493    PG_INT64_TYPE expect = 0;
14494    __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
14495   ;
14496   return 0;
14497 }
14498 _ACEOF
14499 if ac_fn_c_try_link "$LINENO"; then :
14500   pgac_cv_gcc_atomic_int64_cas="yes"
14501 else
14502   pgac_cv_gcc_atomic_int64_cas="no"
14503 fi
14504 rm -f core conftest.err conftest.$ac_objext \
14505     conftest$ac_exeext conftest.$ac_ext
14506 fi
14507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int64_cas" >&5
14508 $as_echo "$pgac_cv_gcc_atomic_int64_cas" >&6; }
14509 if test x"$pgac_cv_gcc_atomic_int64_cas" = x"yes"; then
14510
14511 $as_echo "#define HAVE_GCC__ATOMIC_INT64_CAS 1" >>confdefs.h
14512
14513 fi
14514
14515
14516 # Check for x86 cpuid instruction
14517 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __get_cpuid" >&5
14518 $as_echo_n "checking for __get_cpuid... " >&6; }
14519 if ${pgac_cv__get_cpuid+:} false; then :
14520   $as_echo_n "(cached) " >&6
14521 else
14522   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14523 /* end confdefs.h.  */
14524 #include <cpuid.h>
14525 int
14526 main ()
14527 {
14528 unsigned int exx[4] = {0, 0, 0, 0};
14529   __get_cpuid(1, &exx[0], &exx[1], &exx[2], &exx[3]);
14530
14531   ;
14532   return 0;
14533 }
14534 _ACEOF
14535 if ac_fn_c_try_link "$LINENO"; then :
14536   pgac_cv__get_cpuid="yes"
14537 else
14538   pgac_cv__get_cpuid="no"
14539 fi
14540 rm -f core conftest.err conftest.$ac_objext \
14541     conftest$ac_exeext conftest.$ac_ext
14542 fi
14543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__get_cpuid" >&5
14544 $as_echo "$pgac_cv__get_cpuid" >&6; }
14545 if test x"$pgac_cv__get_cpuid" = x"yes"; then
14546
14547 $as_echo "#define HAVE__GET_CPUID 1" >>confdefs.h
14548
14549 fi
14550
14551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __cpuid" >&5
14552 $as_echo_n "checking for __cpuid... " >&6; }
14553 if ${pgac_cv__cpuid+:} false; then :
14554   $as_echo_n "(cached) " >&6
14555 else
14556   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14557 /* end confdefs.h.  */
14558 #include <intrin.h>
14559 int
14560 main ()
14561 {
14562 unsigned int exx[4] = {0, 0, 0, 0};
14563   __get_cpuid(exx[0], 1);
14564
14565   ;
14566   return 0;
14567 }
14568 _ACEOF
14569 if ac_fn_c_try_link "$LINENO"; then :
14570   pgac_cv__cpuid="yes"
14571 else
14572   pgac_cv__cpuid="no"
14573 fi
14574 rm -f core conftest.err conftest.$ac_objext \
14575     conftest$ac_exeext conftest.$ac_ext
14576 fi
14577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__cpuid" >&5
14578 $as_echo "$pgac_cv__cpuid" >&6; }
14579 if test x"$pgac_cv__cpuid" = x"yes"; then
14580
14581 $as_echo "#define HAVE__CPUID 1" >>confdefs.h
14582
14583 fi
14584
14585 # Check for Intel SSE 4.2 intrinsics to do CRC calculations.
14586 #
14587 # First check if the _mm_crc32_u8 and _mm_crc32_u64 intrinsics can be used
14588 # with the default compiler flags. If not, check if adding the -msse4.2
14589 # flag helps. CFLAGS_SSE42 is set to -msse4.2 if that's required.
14590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=" >&5
14591 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=... " >&6; }
14592 if ${pgac_cv_sse42_crc32_intrinsics_+:} false; then :
14593   $as_echo_n "(cached) " >&6
14594 else
14595   pgac_save_CFLAGS=$CFLAGS
14596 CFLAGS="$pgac_save_CFLAGS "
14597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14598 /* end confdefs.h.  */
14599 #include <nmmintrin.h>
14600 int
14601 main ()
14602 {
14603 unsigned int crc = 0;
14604    crc = _mm_crc32_u8(crc, 0);
14605    crc = _mm_crc32_u32(crc, 0);
14606    /* return computed value, to prevent the above being optimized away */
14607    return crc == 0;
14608   ;
14609   return 0;
14610 }
14611 _ACEOF
14612 if ac_fn_c_try_link "$LINENO"; then :
14613   pgac_cv_sse42_crc32_intrinsics_=yes
14614 else
14615   pgac_cv_sse42_crc32_intrinsics_=no
14616 fi
14617 rm -f core conftest.err conftest.$ac_objext \
14618     conftest$ac_exeext conftest.$ac_ext
14619 CFLAGS="$pgac_save_CFLAGS"
14620 fi
14621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics_" >&5
14622 $as_echo "$pgac_cv_sse42_crc32_intrinsics_" >&6; }
14623 if test x"$pgac_cv_sse42_crc32_intrinsics_" = x"yes"; then
14624   CFLAGS_SSE42=""
14625   pgac_sse42_crc32_intrinsics=yes
14626 fi
14627
14628 if test x"$pgac_sse42_crc32_intrinsics" != x"yes"; then
14629   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2" >&5
14630 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2... " >&6; }
14631 if ${pgac_cv_sse42_crc32_intrinsics__msse4_2+:} false; then :
14632   $as_echo_n "(cached) " >&6
14633 else
14634   pgac_save_CFLAGS=$CFLAGS
14635 CFLAGS="$pgac_save_CFLAGS -msse4.2"
14636 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14637 /* end confdefs.h.  */
14638 #include <nmmintrin.h>
14639 int
14640 main ()
14641 {
14642 unsigned int crc = 0;
14643    crc = _mm_crc32_u8(crc, 0);
14644    crc = _mm_crc32_u32(crc, 0);
14645    /* return computed value, to prevent the above being optimized away */
14646    return crc == 0;
14647   ;
14648   return 0;
14649 }
14650 _ACEOF
14651 if ac_fn_c_try_link "$LINENO"; then :
14652   pgac_cv_sse42_crc32_intrinsics__msse4_2=yes
14653 else
14654   pgac_cv_sse42_crc32_intrinsics__msse4_2=no
14655 fi
14656 rm -f core conftest.err conftest.$ac_objext \
14657     conftest$ac_exeext conftest.$ac_ext
14658 CFLAGS="$pgac_save_CFLAGS"
14659 fi
14660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics__msse4_2" >&5
14661 $as_echo "$pgac_cv_sse42_crc32_intrinsics__msse4_2" >&6; }
14662 if test x"$pgac_cv_sse42_crc32_intrinsics__msse4_2" = x"yes"; then
14663   CFLAGS_SSE42="-msse4.2"
14664   pgac_sse42_crc32_intrinsics=yes
14665 fi
14666
14667 fi
14668
14669
14670 # Are we targeting a processor that supports SSE 4.2? gcc, clang and icc all
14671 # define __SSE4_2__ in that case.
14672 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14673 /* end confdefs.h.  */
14674
14675 int
14676 main ()
14677 {
14678
14679 #ifndef __SSE4_2__
14680 #error __SSE4_2__ not defined
14681 #endif
14682
14683   ;
14684   return 0;
14685 }
14686 _ACEOF
14687 if ac_fn_c_try_compile "$LINENO"; then :
14688   SSE4_2_TARGETED=1
14689 fi
14690 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14691
14692 # Select CRC-32C implementation.
14693 #
14694 # If we are targeting a processor that has SSE 4.2 instructions, we can use the
14695 # special CRC instructions for calculating CRC-32C. If we're not targeting such
14696 # a processor, but we can nevertheless produce code that uses the SSE
14697 # intrinsics, perhaps with some extra CFLAGS, compile both implementations and
14698 # select which one to use at runtime, depending on whether SSE 4.2 is supported
14699 # by the processor we're running on.
14700 #
14701 # You can override this logic by setting the appropriate USE_*_CRC32 flag to 1
14702 # in the template or configure command line.
14703 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
14704   if test x"$pgac_sse42_crc32_intrinsics" = x"yes" && test x"$SSE4_2_TARGETED" = x"1" ; then
14705     USE_SSE42_CRC32C=1
14706   else
14707     # the CPUID instruction is needed for the runtime check.
14708     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
14709       USE_SSE42_CRC32C_WITH_RUNTIME_CHECK=1
14710     else
14711       # fall back to slicing-by-8 algorithm which doesn't require any special
14712       # CPU support.
14713       USE_SLICING_BY_8_CRC32C=1
14714     fi
14715   fi
14716 fi
14717
14718 # Set PG_CRC32C_OBJS appropriately depending on the selected implementation.
14719 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which CRC-32C implementation to use" >&5
14720 $as_echo_n "checking which CRC-32C implementation to use... " >&6; }
14721 if test x"$USE_SSE42_CRC32C" = x"1"; then
14722
14723 $as_echo "#define USE_SSE42_CRC32C 1" >>confdefs.h
14724
14725   PG_CRC32C_OBJS="pg_crc32c_sse42.o"
14726   { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2" >&5
14727 $as_echo "SSE 4.2" >&6; }
14728 else
14729   if test x"$USE_SSE42_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
14730
14731 $as_echo "#define USE_SSE42_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
14732
14733     PG_CRC32C_OBJS="pg_crc32c_sse42.o pg_crc32c_sb8.o pg_crc32c_choose.o"
14734     { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2 with runtime check" >&5
14735 $as_echo "SSE 4.2 with runtime check" >&6; }
14736   else
14737
14738 $as_echo "#define USE_SLICING_BY_8_CRC32C 1" >>confdefs.h
14739
14740     PG_CRC32C_OBJS="pg_crc32c_sb8.o"
14741     { $as_echo "$as_me:${as_lineno-$LINENO}: result: slicing-by-8" >&5
14742 $as_echo "slicing-by-8" >&6; }
14743   fi
14744 fi
14745
14746
14747
14748 # Select semaphore implementation type.
14749 if test "$PORTNAME" != "win32"; then
14750   if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
14751
14752 $as_echo "#define USE_NAMED_POSIX_SEMAPHORES 1" >>confdefs.h
14753
14754     SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
14755   else
14756     if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
14757
14758 $as_echo "#define USE_UNNAMED_POSIX_SEMAPHORES 1" >>confdefs.h
14759
14760       SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
14761     else
14762
14763 $as_echo "#define USE_SYSV_SEMAPHORES 1" >>confdefs.h
14764
14765       SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
14766     fi
14767   fi
14768 else
14769
14770 $as_echo "#define USE_WIN32_SEMAPHORES 1" >>confdefs.h
14771
14772   SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
14773 fi
14774
14775
14776 # Select shared-memory implementation type.
14777 if test "$PORTNAME" != "win32"; then
14778
14779 $as_echo "#define USE_SYSV_SHARED_MEMORY 1" >>confdefs.h
14780
14781   SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
14782 else
14783
14784 $as_echo "#define USE_WIN32_SHARED_MEMORY 1" >>confdefs.h
14785
14786   SHMEM_IMPLEMENTATION="src/backend/port/win32_shmem.c"
14787 fi
14788
14789 # If not set in template file, set bytes to use libc memset()
14790 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
14791   MEMSET_LOOP_LIMIT=1024
14792 fi
14793
14794 cat >>confdefs.h <<_ACEOF
14795 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
14796 _ACEOF
14797
14798
14799
14800 if test "$enable_nls" = yes ; then
14801
14802   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bind_textdomain_codeset" >&5
14803 $as_echo_n "checking for library containing bind_textdomain_codeset... " >&6; }
14804 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
14805   $as_echo_n "(cached) " >&6
14806 else
14807   ac_func_search_save_LIBS=$LIBS
14808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14809 /* end confdefs.h.  */
14810
14811 /* Override any GCC internal prototype to avoid an error.
14812    Use char because int might match the return type of a GCC
14813    builtin and then its argument prototype would still apply.  */
14814 #ifdef __cplusplus
14815 extern "C"
14816 #endif
14817 char bind_textdomain_codeset ();
14818 int
14819 main ()
14820 {
14821 return bind_textdomain_codeset ();
14822   ;
14823   return 0;
14824 }
14825 _ACEOF
14826 for ac_lib in '' intl; do
14827   if test -z "$ac_lib"; then
14828     ac_res="none required"
14829   else
14830     ac_res=-l$ac_lib
14831     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
14832   fi
14833   if ac_fn_c_try_link "$LINENO"; then :
14834   ac_cv_search_bind_textdomain_codeset=$ac_res
14835 fi
14836 rm -f core conftest.err conftest.$ac_objext \
14837     conftest$ac_exeext
14838   if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
14839   break
14840 fi
14841 done
14842 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
14843
14844 else
14845   ac_cv_search_bind_textdomain_codeset=no
14846 fi
14847 rm conftest.$ac_ext
14848 LIBS=$ac_func_search_save_LIBS
14849 fi
14850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bind_textdomain_codeset" >&5
14851 $as_echo "$ac_cv_search_bind_textdomain_codeset" >&6; }
14852 ac_res=$ac_cv_search_bind_textdomain_codeset
14853 if test "$ac_res" != no; then :
14854   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14855
14856 else
14857   as_fn_error $? "a gettext implementation is required for NLS" "$LINENO" 5
14858 fi
14859
14860   ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
14861 if test "x$ac_cv_header_libintl_h" = xyes; then :
14862
14863 else
14864   as_fn_error $? "header file <libintl.h> is required for NLS" "$LINENO" 5
14865 fi
14866
14867
14868   for ac_prog in msgfmt
14869 do
14870   # Extract the first word of "$ac_prog", so it can be a program name with args.
14871 set dummy $ac_prog; ac_word=$2
14872 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14873 $as_echo_n "checking for $ac_word... " >&6; }
14874 if ${ac_cv_prog_MSGFMT+:} false; then :
14875   $as_echo_n "(cached) " >&6
14876 else
14877   if test -n "$MSGFMT"; then
14878   ac_cv_prog_MSGFMT="$MSGFMT" # Let the user override the test.
14879 else
14880 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14881 for as_dir in $PATH
14882 do
14883   IFS=$as_save_IFS
14884   test -z "$as_dir" && as_dir=.
14885     for ac_exec_ext in '' $ac_executable_extensions; do
14886   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14887     ac_cv_prog_MSGFMT="$ac_prog"
14888     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14889     break 2
14890   fi
14891 done
14892   done
14893 IFS=$as_save_IFS
14894
14895 fi
14896 fi
14897 MSGFMT=$ac_cv_prog_MSGFMT
14898 if test -n "$MSGFMT"; then
14899   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
14900 $as_echo "$MSGFMT" >&6; }
14901 else
14902   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14903 $as_echo "no" >&6; }
14904 fi
14905
14906
14907   test -n "$MSGFMT" && break
14908 done
14909
14910   if test -z "$MSGFMT"; then
14911     as_fn_error $? "msgfmt is required for NLS" "$LINENO" 5
14912   fi
14913   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msgfmt flags" >&5
14914 $as_echo_n "checking for msgfmt flags... " >&6; }
14915 if ${pgac_cv_msgfmt_flags+:} false; then :
14916   $as_echo_n "(cached) " >&6
14917 else
14918   if test x"$MSGFMT" != x"" && "$MSGFMT" --version 2>&1 | grep "GNU" >/dev/null; then
14919     pgac_cv_msgfmt_flags=-c
14920 fi
14921 fi
14922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_msgfmt_flags" >&5
14923 $as_echo "$pgac_cv_msgfmt_flags" >&6; }
14924   MSGFMT_FLAGS=$pgac_cv_msgfmt_flags
14925
14926   for ac_prog in msgmerge
14927 do
14928   # Extract the first word of "$ac_prog", so it can be a program name with args.
14929 set dummy $ac_prog; ac_word=$2
14930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14931 $as_echo_n "checking for $ac_word... " >&6; }
14932 if ${ac_cv_prog_MSGMERGE+:} false; then :
14933   $as_echo_n "(cached) " >&6
14934 else
14935   if test -n "$MSGMERGE"; then
14936   ac_cv_prog_MSGMERGE="$MSGMERGE" # Let the user override the test.
14937 else
14938 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14939 for as_dir in $PATH
14940 do
14941   IFS=$as_save_IFS
14942   test -z "$as_dir" && as_dir=.
14943     for ac_exec_ext in '' $ac_executable_extensions; do
14944   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14945     ac_cv_prog_MSGMERGE="$ac_prog"
14946     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14947     break 2
14948   fi
14949 done
14950   done
14951 IFS=$as_save_IFS
14952
14953 fi
14954 fi
14955 MSGMERGE=$ac_cv_prog_MSGMERGE
14956 if test -n "$MSGMERGE"; then
14957   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
14958 $as_echo "$MSGMERGE" >&6; }
14959 else
14960   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14961 $as_echo "no" >&6; }
14962 fi
14963
14964
14965   test -n "$MSGMERGE" && break
14966 done
14967
14968   for ac_prog in xgettext
14969 do
14970   # Extract the first word of "$ac_prog", so it can be a program name with args.
14971 set dummy $ac_prog; ac_word=$2
14972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14973 $as_echo_n "checking for $ac_word... " >&6; }
14974 if ${ac_cv_prog_XGETTEXT+:} false; then :
14975   $as_echo_n "(cached) " >&6
14976 else
14977   if test -n "$XGETTEXT"; then
14978   ac_cv_prog_XGETTEXT="$XGETTEXT" # Let the user override the test.
14979 else
14980 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14981 for as_dir in $PATH
14982 do
14983   IFS=$as_save_IFS
14984   test -z "$as_dir" && as_dir=.
14985     for ac_exec_ext in '' $ac_executable_extensions; do
14986   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14987     ac_cv_prog_XGETTEXT="$ac_prog"
14988     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14989     break 2
14990   fi
14991 done
14992   done
14993 IFS=$as_save_IFS
14994
14995 fi
14996 fi
14997 XGETTEXT=$ac_cv_prog_XGETTEXT
14998 if test -n "$XGETTEXT"; then
14999   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
15000 $as_echo "$XGETTEXT" >&6; }
15001 else
15002   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15003 $as_echo "no" >&6; }
15004 fi
15005
15006
15007   test -n "$XGETTEXT" && break
15008 done
15009
15010
15011 fi
15012
15013 # Check for Tcl configuration script tclConfig.sh
15014 if test "$with_tcl" = yes; then
15015     for ac_prog in tclsh tcl tclsh8.6 tclsh86 tclsh8.5 tclsh85 tclsh8.4 tclsh84
15016 do
15017   # Extract the first word of "$ac_prog", so it can be a program name with args.
15018 set dummy $ac_prog; ac_word=$2
15019 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15020 $as_echo_n "checking for $ac_word... " >&6; }
15021 if ${ac_cv_path_TCLSH+:} false; then :
15022   $as_echo_n "(cached) " >&6
15023 else
15024   case $TCLSH in
15025   [\\/]* | ?:[\\/]*)
15026   ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
15027   ;;
15028   *)
15029   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15030 for as_dir in $PATH
15031 do
15032   IFS=$as_save_IFS
15033   test -z "$as_dir" && as_dir=.
15034     for ac_exec_ext in '' $ac_executable_extensions; do
15035   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15036     ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
15037     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15038     break 2
15039   fi
15040 done
15041   done
15042 IFS=$as_save_IFS
15043
15044   ;;
15045 esac
15046 fi
15047 TCLSH=$ac_cv_path_TCLSH
15048 if test -n "$TCLSH"; then
15049   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
15050 $as_echo "$TCLSH" >&6; }
15051 else
15052   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15053 $as_echo "no" >&6; }
15054 fi
15055
15056
15057   test -n "$TCLSH" && break
15058 done
15059
15060 if test x"$TCLSH" = x""; then
15061   as_fn_error $? "Tcl shell not found" "$LINENO" 5
15062 fi
15063
15064 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclConfig.sh" >&5
15065 $as_echo_n "checking for tclConfig.sh... " >&6; }
15066 # Let user override test
15067 if test -z "$TCL_CONFIG_SH"; then
15068     pgac_test_dirs="$with_tclconfig"
15069
15070     set X $pgac_test_dirs; shift
15071     if test $# -eq 0; then
15072         test -z "$TCLSH" && as_fn_error $? "unable to locate tclConfig.sh because no Tcl shell was found" "$LINENO" 5
15073         set X `echo 'puts $auto_path' | $TCLSH`; shift
15074     fi
15075
15076     for pgac_dir do
15077         if test -r "$pgac_dir/tclConfig.sh"; then
15078             TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
15079             break
15080         fi
15081     done
15082 fi
15083
15084 if test -z "$TCL_CONFIG_SH"; then
15085     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15086 $as_echo "no" >&6; }
15087     as_fn_error $? "file 'tclConfig.sh' is required for Tcl" "$LINENO" 5
15088 else
15089     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCL_CONFIG_SH" >&5
15090 $as_echo "$TCL_CONFIG_SH" >&6; }
15091 fi
15092
15093
15094
15095     . "$TCL_CONFIG_SH"
15096 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
15097 eval TCL_LIBS=\"$TCL_LIBS\"
15098 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
15099 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
15100
15101         if test "$TCL_SHARED_BUILD" != 1; then
15102       as_fn_error $? "cannot build PL/Tcl because Tcl is not a shared library
15103 Use --without-tcl to disable building PL/Tcl." "$LINENO" 5
15104     fi
15105     # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
15106     ac_save_CPPFLAGS=$CPPFLAGS
15107     CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
15108     ac_fn_c_check_header_mongrel "$LINENO" "tcl.h" "ac_cv_header_tcl_h" "$ac_includes_default"
15109 if test "x$ac_cv_header_tcl_h" = xyes; then :
15110
15111 else
15112   as_fn_error $? "header file <tcl.h> is required for Tcl" "$LINENO" 5
15113 fi
15114
15115
15116     CPPFLAGS=$ac_save_CPPFLAGS
15117 fi
15118
15119 # check for <perl.h>
15120 if test "$with_perl" = yes; then
15121   ac_save_CPPFLAGS=$CPPFLAGS
15122   CPPFLAGS="$CPPFLAGS -I$perl_archlibexp/CORE"
15123   ac_fn_c_check_header_compile "$LINENO" "perl.h" "ac_cv_header_perl_h" "#include <EXTERN.h>
15124 "
15125 if test "x$ac_cv_header_perl_h" = xyes; then :
15126
15127 else
15128   as_fn_error $? "header file <perl.h> is required for Perl" "$LINENO" 5
15129 fi
15130
15131
15132   # While we're at it, check that we can link to libperl.
15133   # On most platforms, if perl.h is there then libperl.so will be too, but at
15134   # this writing Debian packages them separately.  There is no known reason to
15135   # waste cycles on separate probes for the Tcl or Python libraries, though.
15136   pgac_save_LIBS=$LIBS
15137   LIBS="$perl_embed_ldflags"
15138   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libperl" >&5
15139 $as_echo_n "checking for libperl... " >&6; }
15140   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15141 /* end confdefs.h.  */
15142
15143 #include <EXTERN.h>
15144 #include <perl.h>
15145
15146 int
15147 main ()
15148 {
15149 perl_alloc();
15150   ;
15151   return 0;
15152 }
15153 _ACEOF
15154 if ac_fn_c_try_link "$LINENO"; then :
15155   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15156 $as_echo "yes" >&6; }
15157 else
15158   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15159 $as_echo "no" >&6; }
15160      as_fn_error $? "libperl library is required for Perl" "$LINENO" 5
15161 fi
15162 rm -f core conftest.err conftest.$ac_objext \
15163     conftest$ac_exeext conftest.$ac_ext
15164   LIBS=$pgac_save_LIBS
15165   CPPFLAGS=$ac_save_CPPFLAGS
15166 fi
15167
15168 # check for <Python.h>
15169 if test "$with_python" = yes; then
15170   ac_save_CPPFLAGS=$CPPFLAGS
15171   CPPFLAGS="$python_includespec $CPPFLAGS"
15172   ac_fn_c_check_header_mongrel "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default"
15173 if test "x$ac_cv_header_Python_h" = xyes; then :
15174
15175 else
15176   as_fn_error $? "header file <Python.h> is required for Python" "$LINENO" 5
15177 fi
15178
15179
15180   CPPFLAGS=$ac_save_CPPFLAGS
15181 fi
15182
15183 #
15184 # Check for DocBook and tools
15185 #
15186 for ac_prog in onsgmls nsgmls
15187 do
15188   # Extract the first word of "$ac_prog", so it can be a program name with args.
15189 set dummy $ac_prog; ac_word=$2
15190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15191 $as_echo_n "checking for $ac_word... " >&6; }
15192 if ${ac_cv_prog_NSGMLS+:} false; then :
15193   $as_echo_n "(cached) " >&6
15194 else
15195   if test -n "$NSGMLS"; then
15196   ac_cv_prog_NSGMLS="$NSGMLS" # Let the user override the test.
15197 else
15198 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15199 for as_dir in $PATH
15200 do
15201   IFS=$as_save_IFS
15202   test -z "$as_dir" && as_dir=.
15203     for ac_exec_ext in '' $ac_executable_extensions; do
15204   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15205     ac_cv_prog_NSGMLS="$ac_prog"
15206     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15207     break 2
15208   fi
15209 done
15210   done
15211 IFS=$as_save_IFS
15212
15213 fi
15214 fi
15215 NSGMLS=$ac_cv_prog_NSGMLS
15216 if test -n "$NSGMLS"; then
15217   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NSGMLS" >&5
15218 $as_echo "$NSGMLS" >&6; }
15219 else
15220   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15221 $as_echo "no" >&6; }
15222 fi
15223
15224
15225   test -n "$NSGMLS" && break
15226 done
15227
15228 for ac_prog in openjade jade
15229 do
15230   # Extract the first word of "$ac_prog", so it can be a program name with args.
15231 set dummy $ac_prog; ac_word=$2
15232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15233 $as_echo_n "checking for $ac_word... " >&6; }
15234 if ${ac_cv_prog_JADE+:} false; then :
15235   $as_echo_n "(cached) " >&6
15236 else
15237   if test -n "$JADE"; then
15238   ac_cv_prog_JADE="$JADE" # Let the user override the test.
15239 else
15240 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15241 for as_dir in $PATH
15242 do
15243   IFS=$as_save_IFS
15244   test -z "$as_dir" && as_dir=.
15245     for ac_exec_ext in '' $ac_executable_extensions; do
15246   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15247     ac_cv_prog_JADE="$ac_prog"
15248     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15249     break 2
15250   fi
15251 done
15252   done
15253 IFS=$as_save_IFS
15254
15255 fi
15256 fi
15257 JADE=$ac_cv_prog_JADE
15258 if test -n "$JADE"; then
15259   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JADE" >&5
15260 $as_echo "$JADE" >&6; }
15261 else
15262   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15263 $as_echo "no" >&6; }
15264 fi
15265
15266
15267   test -n "$JADE" && break
15268 done
15269
15270
15271 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DocBook V4.2" >&5
15272 $as_echo_n "checking for DocBook V4.2... " >&6; }
15273 if ${pgac_cv_check_docbook+:} false; then :
15274   $as_echo_n "(cached) " >&6
15275 else
15276   cat >conftest.sgml <<EOF
15277 <!doctype book PUBLIC "-//OASIS//DTD DocBook V4.2//EN">
15278 <book>
15279  <title>test</title>
15280  <chapter>
15281   <title>random</title>
15282    <sect1>
15283     <title>testsect</title>
15284     <para>text</para>
15285   </sect1>
15286  </chapter>
15287 </book>
15288 EOF
15289
15290 pgac_cv_check_docbook=no
15291
15292 if test -n "$NSGMLS"; then
15293   $NSGMLS -s conftest.sgml 1>&5 2>&1
15294   if test $? -eq 0; then
15295     pgac_cv_check_docbook=yes
15296   fi
15297 fi
15298 rm -f conftest.sgml
15299 fi
15300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_docbook" >&5
15301 $as_echo "$pgac_cv_check_docbook" >&6; }
15302
15303 have_docbook=$pgac_cv_check_docbook
15304
15305
15306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DocBook stylesheets" >&5
15307 $as_echo_n "checking for DocBook stylesheets... " >&6; }
15308 if ${pgac_cv_path_stylesheets+:} false; then :
15309   $as_echo_n "(cached) " >&6
15310 else
15311   if test -n "$DOCBOOKSTYLE"; then
15312   pgac_cv_path_stylesheets=$DOCBOOKSTYLE
15313 else
15314   for pgac_prefix in /usr /usr/local /opt /sw; do
15315     for pgac_infix in share lib; do
15316       for pgac_postfix in \
15317         sgml/stylesheets/nwalsh-modular \
15318         sgml/stylesheets/docbook \
15319         sgml/stylesheets/dsssl/docbook \
15320         sgml/docbook-dsssl \
15321         sgml/docbook/dsssl/modular \
15322         sgml/docbook/stylesheet/dsssl/modular \
15323         sgml/docbook/dsssl-stylesheets \
15324         sgml/dsssl/docbook-dsssl-nwalsh
15325       do
15326         pgac_candidate=$pgac_prefix/$pgac_infix/$pgac_postfix
15327         if test -r "$pgac_candidate/html/docbook.dsl" \
15328            && test -r "$pgac_candidate/print/docbook.dsl"
15329         then
15330           pgac_cv_path_stylesheets=$pgac_candidate
15331           break 3
15332         fi
15333       done
15334     done
15335   done
15336 fi
15337 fi
15338
15339 DOCBOOKSTYLE=$pgac_cv_path_stylesheets
15340
15341 if test -n "$DOCBOOKSTYLE"; then
15342   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOCBOOKSTYLE" >&5
15343 $as_echo "$DOCBOOKSTYLE" >&6; }
15344 else
15345   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15346 $as_echo "no" >&6; }
15347 fi
15348 if test -n "$DOCBOOKSTYLE" -a -r "$DOCBOOKSTYLE/bin/collateindex.pl"; then
15349   COLLATEINDEX="$DOCBOOKSTYLE/bin/collateindex.pl"
15350
15351 else
15352   # Extract the first word of "collateindex.pl", so it can be a program name with args.
15353 set dummy collateindex.pl; ac_word=$2
15354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15355 $as_echo_n "checking for $ac_word... " >&6; }
15356 if ${ac_cv_path_COLLATEINDEX+:} false; then :
15357   $as_echo_n "(cached) " >&6
15358 else
15359   case $COLLATEINDEX in
15360   [\\/]* | ?:[\\/]*)
15361   ac_cv_path_COLLATEINDEX="$COLLATEINDEX" # Let the user override the test with a path.
15362   ;;
15363   *)
15364   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15365 for as_dir in $PATH
15366 do
15367   IFS=$as_save_IFS
15368   test -z "$as_dir" && as_dir=.
15369     for ac_exec_ext in '' $ac_executable_extensions; do
15370   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15371     ac_cv_path_COLLATEINDEX="$as_dir/$ac_word$ac_exec_ext"
15372     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15373     break 2
15374   fi
15375 done
15376   done
15377 IFS=$as_save_IFS
15378
15379   ;;
15380 esac
15381 fi
15382 COLLATEINDEX=$ac_cv_path_COLLATEINDEX
15383 if test -n "$COLLATEINDEX"; then
15384   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COLLATEINDEX" >&5
15385 $as_echo "$COLLATEINDEX" >&6; }
15386 else
15387   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15388 $as_echo "no" >&6; }
15389 fi
15390
15391
15392 fi
15393 for ac_prog in dbtoepub
15394 do
15395   # Extract the first word of "$ac_prog", so it can be a program name with args.
15396 set dummy $ac_prog; ac_word=$2
15397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15398 $as_echo_n "checking for $ac_word... " >&6; }
15399 if ${ac_cv_prog_DBTOEPUB+:} false; then :
15400   $as_echo_n "(cached) " >&6
15401 else
15402   if test -n "$DBTOEPUB"; then
15403   ac_cv_prog_DBTOEPUB="$DBTOEPUB" # Let the user override the test.
15404 else
15405 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15406 for as_dir in $PATH
15407 do
15408   IFS=$as_save_IFS
15409   test -z "$as_dir" && as_dir=.
15410     for ac_exec_ext in '' $ac_executable_extensions; do
15411   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15412     ac_cv_prog_DBTOEPUB="$ac_prog"
15413     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15414     break 2
15415   fi
15416 done
15417   done
15418 IFS=$as_save_IFS
15419
15420 fi
15421 fi
15422 DBTOEPUB=$ac_cv_prog_DBTOEPUB
15423 if test -n "$DBTOEPUB"; then
15424   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
15425 $as_echo "$DBTOEPUB" >&6; }
15426 else
15427   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15428 $as_echo "no" >&6; }
15429 fi
15430
15431
15432   test -n "$DBTOEPUB" && break
15433 done
15434
15435 for ac_prog in xmllint
15436 do
15437   # Extract the first word of "$ac_prog", so it can be a program name with args.
15438 set dummy $ac_prog; ac_word=$2
15439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15440 $as_echo_n "checking for $ac_word... " >&6; }
15441 if ${ac_cv_prog_XMLLINT+:} false; then :
15442   $as_echo_n "(cached) " >&6
15443 else
15444   if test -n "$XMLLINT"; then
15445   ac_cv_prog_XMLLINT="$XMLLINT" # Let the user override the test.
15446 else
15447 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15448 for as_dir in $PATH
15449 do
15450   IFS=$as_save_IFS
15451   test -z "$as_dir" && as_dir=.
15452     for ac_exec_ext in '' $ac_executable_extensions; do
15453   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15454     ac_cv_prog_XMLLINT="$ac_prog"
15455     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15456     break 2
15457   fi
15458 done
15459   done
15460 IFS=$as_save_IFS
15461
15462 fi
15463 fi
15464 XMLLINT=$ac_cv_prog_XMLLINT
15465 if test -n "$XMLLINT"; then
15466   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
15467 $as_echo "$XMLLINT" >&6; }
15468 else
15469   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15470 $as_echo "no" >&6; }
15471 fi
15472
15473
15474   test -n "$XMLLINT" && break
15475 done
15476
15477 for ac_prog in xsltproc
15478 do
15479   # Extract the first word of "$ac_prog", so it can be a program name with args.
15480 set dummy $ac_prog; ac_word=$2
15481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15482 $as_echo_n "checking for $ac_word... " >&6; }
15483 if ${ac_cv_prog_XSLTPROC+:} false; then :
15484   $as_echo_n "(cached) " >&6
15485 else
15486   if test -n "$XSLTPROC"; then
15487   ac_cv_prog_XSLTPROC="$XSLTPROC" # Let the user override the test.
15488 else
15489 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15490 for as_dir in $PATH
15491 do
15492   IFS=$as_save_IFS
15493   test -z "$as_dir" && as_dir=.
15494     for ac_exec_ext in '' $ac_executable_extensions; do
15495   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15496     ac_cv_prog_XSLTPROC="$ac_prog"
15497     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15498     break 2
15499   fi
15500 done
15501   done
15502 IFS=$as_save_IFS
15503
15504 fi
15505 fi
15506 XSLTPROC=$ac_cv_prog_XSLTPROC
15507 if test -n "$XSLTPROC"; then
15508   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
15509 $as_echo "$XSLTPROC" >&6; }
15510 else
15511   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15512 $as_echo "no" >&6; }
15513 fi
15514
15515
15516   test -n "$XSLTPROC" && break
15517 done
15518
15519 for ac_prog in osx sgml2xml sx
15520 do
15521   # Extract the first word of "$ac_prog", so it can be a program name with args.
15522 set dummy $ac_prog; ac_word=$2
15523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15524 $as_echo_n "checking for $ac_word... " >&6; }
15525 if ${ac_cv_prog_OSX+:} false; then :
15526   $as_echo_n "(cached) " >&6
15527 else
15528   if test -n "$OSX"; then
15529   ac_cv_prog_OSX="$OSX" # Let the user override the test.
15530 else
15531 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15532 for as_dir in $PATH
15533 do
15534   IFS=$as_save_IFS
15535   test -z "$as_dir" && as_dir=.
15536     for ac_exec_ext in '' $ac_executable_extensions; do
15537   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15538     ac_cv_prog_OSX="$ac_prog"
15539     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15540     break 2
15541   fi
15542 done
15543   done
15544 IFS=$as_save_IFS
15545
15546 fi
15547 fi
15548 OSX=$ac_cv_prog_OSX
15549 if test -n "$OSX"; then
15550   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OSX" >&5
15551 $as_echo "$OSX" >&6; }
15552 else
15553   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15554 $as_echo "no" >&6; }
15555 fi
15556
15557
15558   test -n "$OSX" && break
15559 done
15560
15561
15562 #
15563 # Check for test tools
15564 #
15565 if test "$enable_tap_tests" = yes; then
15566   for ac_prog in prove
15567 do
15568   # Extract the first word of "$ac_prog", so it can be a program name with args.
15569 set dummy $ac_prog; ac_word=$2
15570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15571 $as_echo_n "checking for $ac_word... " >&6; }
15572 if ${ac_cv_prog_PROVE+:} false; then :
15573   $as_echo_n "(cached) " >&6
15574 else
15575   if test -n "$PROVE"; then
15576   ac_cv_prog_PROVE="$PROVE" # Let the user override the test.
15577 else
15578 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15579 for as_dir in $PATH
15580 do
15581   IFS=$as_save_IFS
15582   test -z "$as_dir" && as_dir=.
15583     for ac_exec_ext in '' $ac_executable_extensions; do
15584   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15585     ac_cv_prog_PROVE="$ac_prog"
15586     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15587     break 2
15588   fi
15589 done
15590   done
15591 IFS=$as_save_IFS
15592
15593 fi
15594 fi
15595 PROVE=$ac_cv_prog_PROVE
15596 if test -n "$PROVE"; then
15597   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
15598 $as_echo "$PROVE" >&6; }
15599 else
15600   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15601 $as_echo "no" >&6; }
15602 fi
15603
15604
15605   test -n "$PROVE" && break
15606 done
15607
15608   if test -z "$PROVE"; then
15609     as_fn_error $? "prove not found" "$LINENO" 5
15610   fi
15611   if test -z "$PERL"; then
15612     as_fn_error $? "Perl not found" "$LINENO" 5
15613   fi
15614 fi
15615
15616 # Thread testing
15617
15618 # We have to run the thread test near the end so we have all our symbols
15619 # defined.  Cross compiling throws a warning.
15620 #
15621 if test "$enable_thread_safety" = yes; then
15622 if test "$PORTNAME" != "win32"
15623 then
15624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking thread safety of required library functions" >&5
15625 $as_echo_n "checking thread safety of required library functions... " >&6; }
15626
15627 _CFLAGS="$CFLAGS"
15628 _LIBS="$LIBS"
15629 CFLAGS="$CFLAGS $PTHREAD_CFLAGS -DIN_CONFIGURE"
15630 LIBS="$LIBS $PTHREAD_LIBS"
15631 if test "$cross_compiling" = yes; then :
15632   { $as_echo "$as_me:${as_lineno-$LINENO}: result: maybe" >&5
15633 $as_echo "maybe" >&6; }
15634   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
15635 *** Skipping thread test program because of cross-compile build.
15636 *** Run the program in src/test/thread on the target machine.
15637 " >&5
15638 $as_echo "$as_me: WARNING:
15639 *** Skipping thread test program because of cross-compile build.
15640 *** Run the program in src/test/thread on the target machine.
15641 " >&2;}
15642 else
15643   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15644 /* end confdefs.h.  */
15645 #include "$srcdir/src/test/thread/thread_test.c"
15646 _ACEOF
15647 if ac_fn_c_try_run "$LINENO"; then :
15648   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15649 $as_echo "yes" >&6; }
15650 else
15651   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15652 $as_echo "no" >&6; }
15653   as_fn_error $? "thread test program failed
15654 This platform is not thread-safe.  Check the file 'config.log' or compile
15655 and run src/test/thread/thread_test for the exact reason.
15656 Use --disable-thread-safety to disable thread safety." "$LINENO" 5
15657 fi
15658 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15659   conftest.$ac_objext conftest.beam conftest.$ac_ext
15660 fi
15661
15662 CFLAGS="$_CFLAGS"
15663 LIBS="$_LIBS"
15664 else
15665 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** skipping thread test on Win32" >&5
15666 $as_echo "$as_me: WARNING: *** skipping thread test on Win32" >&2;}
15667 fi
15668 fi
15669
15670 # If compiler will take -Wl,--as-needed (or various platform-specific
15671 # spellings thereof) then add that to LDFLAGS.  This is much easier than
15672 # trying to filter LIBS to the minimum for each executable.
15673 # On (at least) some Red-Hat-derived systems, this switch breaks linking to
15674 # libreadline; therefore we postpone testing it until we know what library
15675 # dependencies readline has.  The test code will try to link with $LIBS.
15676 if test "$with_readline" = yes; then
15677   link_test_func=readline
15678 else
15679   link_test_func=exit
15680 fi
15681
15682 if test "$PORTNAME" = "darwin"; then
15683   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-dead_strip_dylibs" >&5
15684 $as_echo_n "checking whether $CC supports -Wl,-dead_strip_dylibs... " >&6; }
15685 if ${pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs+:} false; then :
15686   $as_echo_n "(cached) " >&6
15687 else
15688   pgac_save_LDFLAGS=$LDFLAGS
15689 LDFLAGS="$pgac_save_LDFLAGS -Wl,-dead_strip_dylibs"
15690 if test "$cross_compiling" = yes; then :
15691   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs="assuming no"
15692 else
15693   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15694 /* end confdefs.h.  */
15695 extern void $link_test_func (); void (*fptr) () = $link_test_func;
15696 int
15697 main ()
15698 {
15699
15700   ;
15701   return 0;
15702 }
15703 _ACEOF
15704 if ac_fn_c_try_run "$LINENO"; then :
15705   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=yes
15706 else
15707   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=no
15708 fi
15709 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15710   conftest.$ac_objext conftest.beam conftest.$ac_ext
15711 fi
15712
15713 LDFLAGS="$pgac_save_LDFLAGS"
15714 fi
15715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&5
15716 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&6; }
15717 if test x"$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" = x"yes"; then
15718   LDFLAGS="$LDFLAGS -Wl,-dead_strip_dylibs"
15719 fi
15720
15721 elif test "$PORTNAME" = "openbsd"; then
15722   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-Bdynamic" >&5
15723 $as_echo_n "checking whether $CC supports -Wl,-Bdynamic... " >&6; }
15724 if ${pgac_cv_prog_cc_ldflags__Wl__Bdynamic+:} false; then :
15725   $as_echo_n "(cached) " >&6
15726 else
15727   pgac_save_LDFLAGS=$LDFLAGS
15728 LDFLAGS="$pgac_save_LDFLAGS -Wl,-Bdynamic"
15729 if test "$cross_compiling" = yes; then :
15730   pgac_cv_prog_cc_ldflags__Wl__Bdynamic="assuming no"
15731 else
15732   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15733 /* end confdefs.h.  */
15734 extern void $link_test_func (); void (*fptr) () = $link_test_func;
15735 int
15736 main ()
15737 {
15738
15739   ;
15740   return 0;
15741 }
15742 _ACEOF
15743 if ac_fn_c_try_run "$LINENO"; then :
15744   pgac_cv_prog_cc_ldflags__Wl__Bdynamic=yes
15745 else
15746   pgac_cv_prog_cc_ldflags__Wl__Bdynamic=no
15747 fi
15748 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15749   conftest.$ac_objext conftest.beam conftest.$ac_ext
15750 fi
15751
15752 LDFLAGS="$pgac_save_LDFLAGS"
15753 fi
15754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&5
15755 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&6; }
15756 if test x"$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" = x"yes"; then
15757   LDFLAGS="$LDFLAGS -Wl,-Bdynamic"
15758 fi
15759
15760 else
15761   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,--as-needed" >&5
15762 $as_echo_n "checking whether $CC supports -Wl,--as-needed... " >&6; }
15763 if ${pgac_cv_prog_cc_ldflags__Wl___as_needed+:} false; then :
15764   $as_echo_n "(cached) " >&6
15765 else
15766   pgac_save_LDFLAGS=$LDFLAGS
15767 LDFLAGS="$pgac_save_LDFLAGS -Wl,--as-needed"
15768 if test "$cross_compiling" = yes; then :
15769   pgac_cv_prog_cc_ldflags__Wl___as_needed="assuming no"
15770 else
15771   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15772 /* end confdefs.h.  */
15773 extern void $link_test_func (); void (*fptr) () = $link_test_func;
15774 int
15775 main ()
15776 {
15777
15778   ;
15779   return 0;
15780 }
15781 _ACEOF
15782 if ac_fn_c_try_run "$LINENO"; then :
15783   pgac_cv_prog_cc_ldflags__Wl___as_needed=yes
15784 else
15785   pgac_cv_prog_cc_ldflags__Wl___as_needed=no
15786 fi
15787 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15788   conftest.$ac_objext conftest.beam conftest.$ac_ext
15789 fi
15790
15791 LDFLAGS="$pgac_save_LDFLAGS"
15792 fi
15793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl___as_needed" >&5
15794 $as_echo "$pgac_cv_prog_cc_ldflags__Wl___as_needed" >&6; }
15795 if test x"$pgac_cv_prog_cc_ldflags__Wl___as_needed" = x"yes"; then
15796   LDFLAGS="$LDFLAGS -Wl,--as-needed"
15797 fi
15798
15799 fi
15800
15801 # Create compiler version string
15802 if test x"$GCC" = x"yes" ; then
15803   cc_string=`${CC} --version | sed q`
15804   case $cc_string in [A-Za-z]*) ;; *) cc_string="GCC $cc_string";; esac
15805 elif test x"$SUN_STUDIO_CC" = x"yes" ; then
15806   cc_string=`${CC} -V 2>&1 | sed q`
15807 else
15808   cc_string=$CC
15809 fi
15810
15811
15812 cat >>confdefs.h <<_ACEOF
15813 #define PG_VERSION_STR "PostgreSQL $PG_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"
15814 _ACEOF
15815
15816
15817 # Supply a numeric version string for use by 3rd party add-ons
15818 # awk -F is a regex on some platforms, and not on others, so make "." a tab
15819 PG_VERSION_NUM="`echo "$PACKAGE_VERSION" | sed 's/[A-Za-z].*$//' |
15820 tr '.' '        ' |
15821 $AWK '{printf "%d%02d%02d", $1, $2, (NF >= 3) ? $3 : 0}'`"
15822
15823 cat >>confdefs.h <<_ACEOF
15824 #define PG_VERSION_NUM $PG_VERSION_NUM
15825 _ACEOF
15826
15827
15828
15829
15830 # Begin output steps
15831
15832 { $as_echo "$as_me:${as_lineno-$LINENO}: using compiler=$cc_string" >&5
15833 $as_echo "$as_me: using compiler=$cc_string" >&6;}
15834 { $as_echo "$as_me:${as_lineno-$LINENO}: using CFLAGS=$CFLAGS" >&5
15835 $as_echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
15836 { $as_echo "$as_me:${as_lineno-$LINENO}: using CPPFLAGS=$CPPFLAGS" >&5
15837 $as_echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
15838 { $as_echo "$as_me:${as_lineno-$LINENO}: using LDFLAGS=$LDFLAGS" >&5
15839 $as_echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
15840
15841 # prepare build tree if outside source tree
15842 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
15843 # Note 2: /bin/pwd might be better than shell's built-in at getting
15844 #         a symlink-free name.
15845 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
15846   vpath_build=no
15847 else
15848   vpath_build=yes
15849   if test "$no_create" != yes; then
15850     $as_echo_n "preparing build tree... " >&6
15851     pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
15852     $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
15853       || as_fn_error $? "failed" "$LINENO" 5
15854     { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
15855 $as_echo "done" >&6; }
15856   fi
15857 fi
15858
15859
15860
15861 ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
15862
15863
15864 ac_config_links="$ac_config_links src/backend/port/dynloader.c:src/backend/port/dynloader/${template}.c src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION} src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION} src/include/dynloader.h:src/backend/port/dynloader/${template}.h src/include/pg_config_os.h:src/include/port/${template}.h src/Makefile.port:src/makefiles/Makefile.${template}"
15865
15866
15867 if test "$PORTNAME" = "win32"; then
15868 ac_config_commands="$ac_config_commands check_win32_symlinks"
15869
15870 fi
15871
15872 ac_config_headers="$ac_config_headers src/include/pg_config.h"
15873
15874
15875 ac_config_headers="$ac_config_headers src/include/pg_config_ext.h"
15876
15877
15878 ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
15879
15880
15881 cat >confcache <<\_ACEOF
15882 # This file is a shell script that caches the results of configure
15883 # tests run on this system so they can be shared between configure
15884 # scripts and configure runs, see configure's option --config-cache.
15885 # It is not useful on other systems.  If it contains results you don't
15886 # want to keep, you may remove or edit it.
15887 #
15888 # config.status only pays attention to the cache file if you give it
15889 # the --recheck option to rerun configure.
15890 #
15891 # `ac_cv_env_foo' variables (set or unset) will be overridden when
15892 # loading this file, other *unset* `ac_cv_foo' will be assigned the
15893 # following values.
15894
15895 _ACEOF
15896
15897 # The following way of writing the cache mishandles newlines in values,
15898 # but we know of no workaround that is simple, portable, and efficient.
15899 # So, we kill variables containing newlines.
15900 # Ultrix sh set writes to stderr and can't be redirected directly,
15901 # and sets the high bit in the cache file unless we assign to the vars.
15902 (
15903   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15904     eval ac_val=\$$ac_var
15905     case $ac_val in #(
15906     *${as_nl}*)
15907       case $ac_var in #(
15908       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15909 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
15910       esac
15911       case $ac_var in #(
15912       _ | IFS | as_nl) ;; #(
15913       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15914       *) { eval $ac_var=; unset $ac_var;} ;;
15915       esac ;;
15916     esac
15917   done
15918
15919   (set) 2>&1 |
15920     case $as_nl`(ac_space=' '; set) 2>&1` in #(
15921     *${as_nl}ac_space=\ *)
15922       # `set' does not quote correctly, so add quotes: double-quote
15923       # substitution turns \\\\ into \\, and sed turns \\ into \.
15924       sed -n \
15925         "s/'/'\\\\''/g;
15926           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
15927       ;; #(
15928     *)
15929       # `set' quotes correctly as required by POSIX, so do not add quotes.
15930       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
15931       ;;
15932     esac |
15933     sort
15934 ) |
15935   sed '
15936      /^ac_cv_env_/b end
15937      t clear
15938      :clear
15939      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15940      t end
15941      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15942      :end' >>confcache
15943 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15944   if test -w "$cache_file"; then
15945     if test "x$cache_file" != "x/dev/null"; then
15946       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15947 $as_echo "$as_me: updating cache $cache_file" >&6;}
15948       if test ! -f "$cache_file" || test -h "$cache_file"; then
15949         cat confcache >"$cache_file"
15950       else
15951         case $cache_file in #(
15952         */* | ?:*)
15953           mv -f confcache "$cache_file"$$ &&
15954           mv -f "$cache_file"$$ "$cache_file" ;; #(
15955         *)
15956           mv -f confcache "$cache_file" ;;
15957         esac
15958       fi
15959     fi
15960   else
15961     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15962 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
15963   fi
15964 fi
15965 rm -f confcache
15966
15967 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15968 # Let make expand exec_prefix.
15969 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15970
15971 DEFS=-DHAVE_CONFIG_H
15972
15973 ac_libobjs=
15974 ac_ltlibobjs=
15975 U=
15976 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15977   # 1. Remove the extension, and $U if already installed.
15978   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
15979   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
15980   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
15981   #    will be set to the directory where LIBOBJS objects are built.
15982   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15983   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
15984 done
15985 LIBOBJS=$ac_libobjs
15986
15987 LTLIBOBJS=$ac_ltlibobjs
15988
15989
15990
15991
15992 : "${CONFIG_STATUS=./config.status}"
15993 ac_write_fail=0
15994 ac_clean_files_save=$ac_clean_files
15995 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
15996 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15997 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15998 as_write_fail=0
15999 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
16000 #! $SHELL
16001 # Generated by $as_me.
16002 # Run this file to recreate the current configuration.
16003 # Compiler output produced by configure, useful for debugging
16004 # configure, is in config.log if it exists.
16005
16006 debug=false
16007 ac_cs_recheck=false
16008 ac_cs_silent=false
16009
16010 SHELL=\${CONFIG_SHELL-$SHELL}
16011 export SHELL
16012 _ASEOF
16013 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16014 ## -------------------- ##
16015 ## M4sh Initialization. ##
16016 ## -------------------- ##
16017
16018 # Be more Bourne compatible
16019 DUALCASE=1; export DUALCASE # for MKS sh
16020 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
16021   emulate sh
16022   NULLCMD=:
16023   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
16024   # is contrary to our usage.  Disable this feature.
16025   alias -g '${1+"$@"}'='"$@"'
16026   setopt NO_GLOB_SUBST
16027 else
16028   case `(set -o) 2>/dev/null` in #(
16029   *posix*) :
16030     set -o posix ;; #(
16031   *) :
16032      ;;
16033 esac
16034 fi
16035
16036
16037 as_nl='
16038 '
16039 export as_nl
16040 # Printing a long string crashes Solaris 7 /usr/bin/printf.
16041 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16042 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16043 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16044 # Prefer a ksh shell builtin over an external printf program on Solaris,
16045 # but without wasting forks for bash or zsh.
16046 if test -z "$BASH_VERSION$ZSH_VERSION" \
16047     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16048   as_echo='print -r --'
16049   as_echo_n='print -rn --'
16050 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16051   as_echo='printf %s\n'
16052   as_echo_n='printf %s'
16053 else
16054   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16055     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16056     as_echo_n='/usr/ucb/echo -n'
16057   else
16058     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16059     as_echo_n_body='eval
16060       arg=$1;
16061       case $arg in #(
16062       *"$as_nl"*)
16063         expr "X$arg" : "X\\(.*\\)$as_nl";
16064         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16065       esac;
16066       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16067     '
16068     export as_echo_n_body
16069     as_echo_n='sh -c $as_echo_n_body as_echo'
16070   fi
16071   export as_echo_body
16072   as_echo='sh -c $as_echo_body as_echo'
16073 fi
16074
16075 # The user is always right.
16076 if test "${PATH_SEPARATOR+set}" != set; then
16077   PATH_SEPARATOR=:
16078   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16079     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16080       PATH_SEPARATOR=';'
16081   }
16082 fi
16083
16084
16085 # IFS
16086 # We need space, tab and new line, in precisely that order.  Quoting is
16087 # there to prevent editors from complaining about space-tab.
16088 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
16089 # splitting by setting IFS to empty value.)
16090 IFS=" ""        $as_nl"
16091
16092 # Find who we are.  Look in the path if we contain no directory separator.
16093 as_myself=
16094 case $0 in #((
16095   *[\\/]* ) as_myself=$0 ;;
16096   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16097 for as_dir in $PATH
16098 do
16099   IFS=$as_save_IFS
16100   test -z "$as_dir" && as_dir=.
16101     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16102   done
16103 IFS=$as_save_IFS
16104
16105      ;;
16106 esac
16107 # We did not find ourselves, most probably we were run as `sh COMMAND'
16108 # in which case we are not to be found in the path.
16109 if test "x$as_myself" = x; then
16110   as_myself=$0
16111 fi
16112 if test ! -f "$as_myself"; then
16113   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16114   exit 1
16115 fi
16116
16117 # Unset variables that we do not need and which cause bugs (e.g. in
16118 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
16119 # suppresses any "Segmentation fault" message there.  '((' could
16120 # trigger a bug in pdksh 5.2.14.
16121 for as_var in BASH_ENV ENV MAIL MAILPATH
16122 do eval test x\${$as_var+set} = xset \
16123   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
16124 done
16125 PS1='$ '
16126 PS2='> '
16127 PS4='+ '
16128
16129 # NLS nuisances.
16130 LC_ALL=C
16131 export LC_ALL
16132 LANGUAGE=C
16133 export LANGUAGE
16134
16135 # CDPATH.
16136 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16137
16138
16139 # as_fn_error STATUS ERROR [LINENO LOG_FD]
16140 # ----------------------------------------
16141 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16142 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
16143 # script with STATUS, using 1 if that was 0.
16144 as_fn_error ()
16145 {
16146   as_status=$1; test $as_status -eq 0 && as_status=1
16147   if test "$4"; then
16148     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16149     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
16150   fi
16151   $as_echo "$as_me: error: $2" >&2
16152   as_fn_exit $as_status
16153 } # as_fn_error
16154
16155
16156 # as_fn_set_status STATUS
16157 # -----------------------
16158 # Set $? to STATUS, without forking.
16159 as_fn_set_status ()
16160 {
16161   return $1
16162 } # as_fn_set_status
16163
16164 # as_fn_exit STATUS
16165 # -----------------
16166 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16167 as_fn_exit ()
16168 {
16169   set +e
16170   as_fn_set_status $1
16171   exit $1
16172 } # as_fn_exit
16173
16174 # as_fn_unset VAR
16175 # ---------------
16176 # Portably unset VAR.
16177 as_fn_unset ()
16178 {
16179   { eval $1=; unset $1;}
16180 }
16181 as_unset=as_fn_unset
16182 # as_fn_append VAR VALUE
16183 # ----------------------
16184 # Append the text in VALUE to the end of the definition contained in VAR. Take
16185 # advantage of any shell optimizations that allow amortized linear growth over
16186 # repeated appends, instead of the typical quadratic growth present in naive
16187 # implementations.
16188 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16189   eval 'as_fn_append ()
16190   {
16191     eval $1+=\$2
16192   }'
16193 else
16194   as_fn_append ()
16195   {
16196     eval $1=\$$1\$2
16197   }
16198 fi # as_fn_append
16199
16200 # as_fn_arith ARG...
16201 # ------------------
16202 # Perform arithmetic evaluation on the ARGs, and store the result in the
16203 # global $as_val. Take advantage of shells that can avoid forks. The arguments
16204 # must be portable across $(()) and expr.
16205 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16206   eval 'as_fn_arith ()
16207   {
16208     as_val=$(( $* ))
16209   }'
16210 else
16211   as_fn_arith ()
16212   {
16213     as_val=`expr "$@" || test $? -eq 1`
16214   }
16215 fi # as_fn_arith
16216
16217
16218 if expr a : '\(a\)' >/dev/null 2>&1 &&
16219    test "X`expr 00001 : '.*\(...\)'`" = X001; then
16220   as_expr=expr
16221 else
16222   as_expr=false
16223 fi
16224
16225 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
16226   as_basename=basename
16227 else
16228   as_basename=false
16229 fi
16230
16231 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16232   as_dirname=dirname
16233 else
16234   as_dirname=false
16235 fi
16236
16237 as_me=`$as_basename -- "$0" ||
16238 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16239          X"$0" : 'X\(//\)$' \| \
16240          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
16241 $as_echo X/"$0" |
16242     sed '/^.*\/\([^/][^/]*\)\/*$/{
16243             s//\1/
16244             q
16245           }
16246           /^X\/\(\/\/\)$/{
16247             s//\1/
16248             q
16249           }
16250           /^X\/\(\/\).*/{
16251             s//\1/
16252             q
16253           }
16254           s/.*/./; q'`
16255
16256 # Avoid depending upon Character Ranges.
16257 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16258 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16259 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16260 as_cr_digits='0123456789'
16261 as_cr_alnum=$as_cr_Letters$as_cr_digits
16262
16263 ECHO_C= ECHO_N= ECHO_T=
16264 case `echo -n x` in #(((((
16265 -n*)
16266   case `echo 'xy\c'` in
16267   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
16268   xy)  ECHO_C='\c';;
16269   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
16270        ECHO_T=' ';;
16271   esac;;
16272 *)
16273   ECHO_N='-n';;
16274 esac
16275
16276 rm -f conf$$ conf$$.exe conf$$.file
16277 if test -d conf$$.dir; then
16278   rm -f conf$$.dir/conf$$.file
16279 else
16280   rm -f conf$$.dir
16281   mkdir conf$$.dir 2>/dev/null
16282 fi
16283 if (echo >conf$$.file) 2>/dev/null; then
16284   if ln -s conf$$.file conf$$ 2>/dev/null; then
16285     as_ln_s='ln -s'
16286     # ... but there are two gotchas:
16287     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16288     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
16289     # In both cases, we have to default to `cp -pR'.
16290     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
16291       as_ln_s='cp -pR'
16292   elif ln conf$$.file conf$$ 2>/dev/null; then
16293     as_ln_s=ln
16294   else
16295     as_ln_s='cp -pR'
16296   fi
16297 else
16298   as_ln_s='cp -pR'
16299 fi
16300 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16301 rmdir conf$$.dir 2>/dev/null
16302
16303
16304 # as_fn_mkdir_p
16305 # -------------
16306 # Create "$as_dir" as a directory, including parents if necessary.
16307 as_fn_mkdir_p ()
16308 {
16309
16310   case $as_dir in #(
16311   -*) as_dir=./$as_dir;;
16312   esac
16313   test -d "$as_dir" || eval $as_mkdir_p || {
16314     as_dirs=
16315     while :; do
16316       case $as_dir in #(
16317       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16318       *) as_qdir=$as_dir;;
16319       esac
16320       as_dirs="'$as_qdir' $as_dirs"
16321       as_dir=`$as_dirname -- "$as_dir" ||
16322 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16323          X"$as_dir" : 'X\(//\)[^/]' \| \
16324          X"$as_dir" : 'X\(//\)$' \| \
16325          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16326 $as_echo X"$as_dir" |
16327     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16328             s//\1/
16329             q
16330           }
16331           /^X\(\/\/\)[^/].*/{
16332             s//\1/
16333             q
16334           }
16335           /^X\(\/\/\)$/{
16336             s//\1/
16337             q
16338           }
16339           /^X\(\/\).*/{
16340             s//\1/
16341             q
16342           }
16343           s/.*/./; q'`
16344       test -d "$as_dir" && break
16345     done
16346     test -z "$as_dirs" || eval "mkdir $as_dirs"
16347   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
16348
16349
16350 } # as_fn_mkdir_p
16351 if mkdir -p . 2>/dev/null; then
16352   as_mkdir_p='mkdir -p "$as_dir"'
16353 else
16354   test -d ./-p && rmdir ./-p
16355   as_mkdir_p=false
16356 fi
16357
16358
16359 # as_fn_executable_p FILE
16360 # -----------------------
16361 # Test if FILE is an executable regular file.
16362 as_fn_executable_p ()
16363 {
16364   test -f "$1" && test -x "$1"
16365 } # as_fn_executable_p
16366 as_test_x='test -x'
16367 as_executable_p=as_fn_executable_p
16368
16369 # Sed expression to map a string onto a valid CPP name.
16370 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
16371
16372 # Sed expression to map a string onto a valid variable name.
16373 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
16374
16375
16376 exec 6>&1
16377 ## ----------------------------------- ##
16378 ## Main body of $CONFIG_STATUS script. ##
16379 ## ----------------------------------- ##
16380 _ASEOF
16381 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
16382
16383 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16384 # Save the log message, to keep $0 and so on meaningful, and to
16385 # report actual input values of CONFIG_FILES etc. instead of their
16386 # values after options handling.
16387 ac_log="
16388 This file was extended by PostgreSQL $as_me 9.6devel, which was
16389 generated by GNU Autoconf 2.69.  Invocation command line was
16390
16391   CONFIG_FILES    = $CONFIG_FILES
16392   CONFIG_HEADERS  = $CONFIG_HEADERS
16393   CONFIG_LINKS    = $CONFIG_LINKS
16394   CONFIG_COMMANDS = $CONFIG_COMMANDS
16395   $ $0 $@
16396
16397 on `(hostname || uname -n) 2>/dev/null | sed 1q`
16398 "
16399
16400 _ACEOF
16401
16402 case $ac_config_files in *"
16403 "*) set x $ac_config_files; shift; ac_config_files=$*;;
16404 esac
16405
16406 case $ac_config_headers in *"
16407 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
16408 esac
16409
16410
16411 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16412 # Files that config.status was made for.
16413 config_files="$ac_config_files"
16414 config_headers="$ac_config_headers"
16415 config_links="$ac_config_links"
16416 config_commands="$ac_config_commands"
16417
16418 _ACEOF
16419
16420 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16421 ac_cs_usage="\
16422 \`$as_me' instantiates files and other configuration actions
16423 from templates according to the current configuration.  Unless the files
16424 and actions are specified as TAGs, all are instantiated by default.
16425
16426 Usage: $0 [OPTION]... [TAG]...
16427
16428   -h, --help       print this help, then exit
16429   -V, --version    print version number and configuration settings, then exit
16430       --config     print configuration, then exit
16431   -q, --quiet, --silent
16432                    do not print progress messages
16433   -d, --debug      don't remove temporary files
16434       --recheck    update $as_me by reconfiguring in the same conditions
16435       --file=FILE[:TEMPLATE]
16436                    instantiate the configuration file FILE
16437       --header=FILE[:TEMPLATE]
16438                    instantiate the configuration header FILE
16439
16440 Configuration files:
16441 $config_files
16442
16443 Configuration headers:
16444 $config_headers
16445
16446 Configuration links:
16447 $config_links
16448
16449 Configuration commands:
16450 $config_commands
16451
16452 Report bugs to <pgsql-bugs@postgresql.org>."
16453
16454 _ACEOF
16455 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16456 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
16457 ac_cs_version="\\
16458 PostgreSQL config.status 9.6devel
16459 configured by $0, generated by GNU Autoconf 2.69,
16460   with options \\"\$ac_cs_config\\"
16461
16462 Copyright (C) 2012 Free Software Foundation, Inc.
16463 This config.status script is free software; the Free Software Foundation
16464 gives unlimited permission to copy, distribute and modify it."
16465
16466 ac_pwd='$ac_pwd'
16467 srcdir='$srcdir'
16468 INSTALL='$INSTALL'
16469 MKDIR_P='$MKDIR_P'
16470 AWK='$AWK'
16471 test -n "\$AWK" || AWK=awk
16472 _ACEOF
16473
16474 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16475 # The default lists apply if the user does not specify any file.
16476 ac_need_defaults=:
16477 while test $# != 0
16478 do
16479   case $1 in
16480   --*=?*)
16481     ac_option=`expr "X$1" : 'X\([^=]*\)='`
16482     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
16483     ac_shift=:
16484     ;;
16485   --*=)
16486     ac_option=`expr "X$1" : 'X\([^=]*\)='`
16487     ac_optarg=
16488     ac_shift=:
16489     ;;
16490   *)
16491     ac_option=$1
16492     ac_optarg=$2
16493     ac_shift=shift
16494     ;;
16495   esac
16496
16497   case $ac_option in
16498   # Handling of the options.
16499   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16500     ac_cs_recheck=: ;;
16501   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
16502     $as_echo "$ac_cs_version"; exit ;;
16503   --config | --confi | --conf | --con | --co | --c )
16504     $as_echo "$ac_cs_config"; exit ;;
16505   --debug | --debu | --deb | --de | --d | -d )
16506     debug=: ;;
16507   --file | --fil | --fi | --f )
16508     $ac_shift
16509     case $ac_optarg in
16510     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16511     '') as_fn_error $? "missing file argument" ;;
16512     esac
16513     as_fn_append CONFIG_FILES " '$ac_optarg'"
16514     ac_need_defaults=false;;
16515   --header | --heade | --head | --hea )
16516     $ac_shift
16517     case $ac_optarg in
16518     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16519     esac
16520     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
16521     ac_need_defaults=false;;
16522   --he | --h)
16523     # Conflict between --help and --header
16524     as_fn_error $? "ambiguous option: \`$1'
16525 Try \`$0 --help' for more information.";;
16526   --help | --hel | -h )
16527     $as_echo "$ac_cs_usage"; exit ;;
16528   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16529   | -silent | --silent | --silen | --sile | --sil | --si | --s)
16530     ac_cs_silent=: ;;
16531
16532   # This is an error.
16533   -*) as_fn_error $? "unrecognized option: \`$1'
16534 Try \`$0 --help' for more information." ;;
16535
16536   *) as_fn_append ac_config_targets " $1"
16537      ac_need_defaults=false ;;
16538
16539   esac
16540   shift
16541 done
16542
16543 ac_configure_extra_args=
16544
16545 if $ac_cs_silent; then
16546   exec 6>/dev/null
16547   ac_configure_extra_args="$ac_configure_extra_args --silent"
16548 fi
16549
16550 _ACEOF
16551 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16552 if \$ac_cs_recheck; then
16553   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
16554   shift
16555   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
16556   CONFIG_SHELL='$SHELL'
16557   export CONFIG_SHELL
16558   exec "\$@"
16559 fi
16560
16561 _ACEOF
16562 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16563 exec 5>>config.log
16564 {
16565   echo
16566   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16567 ## Running $as_me. ##
16568 _ASBOX
16569   $as_echo "$ac_log"
16570 } >&5
16571
16572 _ACEOF
16573 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16574 _ACEOF
16575
16576 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16577
16578 # Handling of arguments.
16579 for ac_config_target in $ac_config_targets
16580 do
16581   case $ac_config_target in
16582     "src/backend/port/tas.s") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
16583     "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
16584     "src/Makefile.global") CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
16585     "src/backend/port/dynloader.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/dynloader.c:src/backend/port/dynloader/${template}.c" ;;
16586     "src/backend/port/pg_sema.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
16587     "src/backend/port/pg_shmem.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
16588     "src/include/dynloader.h") CONFIG_LINKS="$CONFIG_LINKS src/include/dynloader.h:src/backend/port/dynloader/${template}.h" ;;
16589     "src/include/pg_config_os.h") CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
16590     "src/Makefile.port") CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
16591     "check_win32_symlinks") CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
16592     "src/include/pg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
16593     "src/include/pg_config_ext.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config_ext.h" ;;
16594     "src/interfaces/ecpg/include/ecpg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
16595
16596   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
16597   esac
16598 done
16599
16600
16601 # If the user did not use the arguments to specify the items to instantiate,
16602 # then the envvar interface is used.  Set only those that are not.
16603 # We use the long form for the default assignment because of an extremely
16604 # bizarre bug on SunOS 4.1.3.
16605 if $ac_need_defaults; then
16606   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16607   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16608   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
16609   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
16610 fi
16611
16612 # Have a temporary directory for convenience.  Make it in the build tree
16613 # simply because there is no reason against having it here, and in addition,
16614 # creating and moving files from /tmp can sometimes cause problems.
16615 # Hook for its removal unless debugging.
16616 # Note that there is a small window in which the directory will not be cleaned:
16617 # after its creation but before its name has been assigned to `$tmp'.
16618 $debug ||
16619 {
16620   tmp= ac_tmp=
16621   trap 'exit_status=$?
16622   : "${ac_tmp:=$tmp}"
16623   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
16624 ' 0
16625   trap 'as_fn_exit 1' 1 2 13 15
16626 }
16627 # Create a (secure) tmp directory for tmp files.
16628
16629 {
16630   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
16631   test -d "$tmp"
16632 }  ||
16633 {
16634   tmp=./conf$$-$RANDOM
16635   (umask 077 && mkdir "$tmp")
16636 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
16637 ac_tmp=$tmp
16638
16639 # Set up the scripts for CONFIG_FILES section.
16640 # No need to generate them if there are no CONFIG_FILES.
16641 # This happens for instance with `./config.status config.h'.
16642 if test -n "$CONFIG_FILES"; then
16643
16644
16645 ac_cr=`echo X | tr X '\015'`
16646 # On cygwin, bash can eat \r inside `` if the user requested igncr.
16647 # But we know of no other shell where ac_cr would be empty at this
16648 # point, so we can use a bashism as a fallback.
16649 if test "x$ac_cr" = x; then
16650   eval ac_cr=\$\'\\r\'
16651 fi
16652 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
16653 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
16654   ac_cs_awk_cr='\\r'
16655 else
16656   ac_cs_awk_cr=$ac_cr
16657 fi
16658
16659 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
16660 _ACEOF
16661
16662
16663 {
16664   echo "cat >conf$$subs.awk <<_ACEOF" &&
16665   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
16666   echo "_ACEOF"
16667 } >conf$$subs.sh ||
16668   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
16669 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
16670 ac_delim='%!_!# '
16671 for ac_last_try in false false false false false :; do
16672   . ./conf$$subs.sh ||
16673     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
16674
16675   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
16676   if test $ac_delim_n = $ac_delim_num; then
16677     break
16678   elif $ac_last_try; then
16679     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
16680   else
16681     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16682   fi
16683 done
16684 rm -f conf$$subs.sh
16685
16686 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16687 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
16688 _ACEOF
16689 sed -n '
16690 h
16691 s/^/S["/; s/!.*/"]=/
16692 p
16693 g
16694 s/^[^!]*!//
16695 :repl
16696 t repl
16697 s/'"$ac_delim"'$//
16698 t delim
16699 :nl
16700 h
16701 s/\(.\{148\}\)..*/\1/
16702 t more1
16703 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
16704 p
16705 n
16706 b repl
16707 :more1
16708 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16709 p
16710 g
16711 s/.\{148\}//
16712 t nl
16713 :delim
16714 h
16715 s/\(.\{148\}\)..*/\1/
16716 t more2
16717 s/["\\]/\\&/g; s/^/"/; s/$/"/
16718 p
16719 b
16720 :more2
16721 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16722 p
16723 g
16724 s/.\{148\}//
16725 t delim
16726 ' <conf$$subs.awk | sed '
16727 /^[^""]/{
16728   N
16729   s/\n//
16730 }
16731 ' >>$CONFIG_STATUS || ac_write_fail=1
16732 rm -f conf$$subs.awk
16733 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16734 _ACAWK
16735 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
16736   for (key in S) S_is_set[key] = 1
16737   FS = "\a"
16738
16739 }
16740 {
16741   line = $ 0
16742   nfields = split(line, field, "@")
16743   substed = 0
16744   len = length(field[1])
16745   for (i = 2; i < nfields; i++) {
16746     key = field[i]
16747     keylen = length(key)
16748     if (S_is_set[key]) {
16749       value = S[key]
16750       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
16751       len += length(value) + length(field[++i])
16752       substed = 1
16753     } else
16754       len += 1 + keylen
16755   }
16756
16757   print line
16758 }
16759
16760 _ACAWK
16761 _ACEOF
16762 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16763 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16764   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16765 else
16766   cat
16767 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
16768   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
16769 _ACEOF
16770
16771 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
16772 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
16773 # trailing colons and then remove the whole line if VPATH becomes empty
16774 # (actually we leave an empty line to preserve line numbers).
16775 if test "x$srcdir" = x.; then
16776   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
16777 h
16778 s///
16779 s/^/:/
16780 s/[      ]*$/:/
16781 s/:\$(srcdir):/:/g
16782 s/:\${srcdir}:/:/g
16783 s/:@srcdir@:/:/g
16784 s/^:*//
16785 s/:*$//
16786 x
16787 s/\(=[   ]*\).*/\1/
16788 G
16789 s/\n//
16790 s/^[^=]*=[       ]*$//
16791 }'
16792 fi
16793
16794 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16795 fi # test -n "$CONFIG_FILES"
16796
16797 # Set up the scripts for CONFIG_HEADERS section.
16798 # No need to generate them if there are no CONFIG_HEADERS.
16799 # This happens for instance with `./config.status Makefile'.
16800 if test -n "$CONFIG_HEADERS"; then
16801 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
16802 BEGIN {
16803 _ACEOF
16804
16805 # Transform confdefs.h into an awk script `defines.awk', embedded as
16806 # here-document in config.status, that substitutes the proper values into
16807 # config.h.in to produce config.h.
16808
16809 # Create a delimiter string that does not exist in confdefs.h, to ease
16810 # handling of long lines.
16811 ac_delim='%!_!# '
16812 for ac_last_try in false false :; do
16813   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
16814   if test -z "$ac_tt"; then
16815     break
16816   elif $ac_last_try; then
16817     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
16818   else
16819     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16820   fi
16821 done
16822
16823 # For the awk script, D is an array of macro values keyed by name,
16824 # likewise P contains macro parameters if any.  Preserve backslash
16825 # newline sequences.
16826
16827 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16828 sed -n '
16829 s/.\{148\}/&'"$ac_delim"'/g
16830 t rset
16831 :rset
16832 s/^[     ]*#[    ]*define[       ][      ]*/ /
16833 t def
16834 d
16835 :def
16836 s/\\$//
16837 t bsnl
16838 s/["\\]/\\&/g
16839 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
16840 D["\1"]=" \3"/p
16841 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
16842 d
16843 :bsnl
16844 s/["\\]/\\&/g
16845 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
16846 D["\1"]=" \3\\\\\\n"\\/p
16847 t cont
16848 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16849 t cont
16850 d
16851 :cont
16852 n
16853 s/.\{148\}/&'"$ac_delim"'/g
16854 t clear
16855 :clear
16856 s/\\$//
16857 t bsnlc
16858 s/["\\]/\\&/g; s/^/"/; s/$/"/p
16859 d
16860 :bsnlc
16861 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16862 b cont
16863 ' <confdefs.h | sed '
16864 s/'"$ac_delim"'/"\\\
16865 "/g' >>$CONFIG_STATUS || ac_write_fail=1
16866
16867 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16868   for (key in D) D_is_set[key] = 1
16869   FS = "\a"
16870 }
16871 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16872   line = \$ 0
16873   split(line, arg, " ")
16874   if (arg[1] == "#") {
16875     defundef = arg[2]
16876     mac1 = arg[3]
16877   } else {
16878     defundef = substr(arg[1], 2)
16879     mac1 = arg[2]
16880   }
16881   split(mac1, mac2, "(") #)
16882   macro = mac2[1]
16883   prefix = substr(line, 1, index(line, defundef) - 1)
16884   if (D_is_set[macro]) {
16885     # Preserve the white space surrounding the "#".
16886     print prefix "define", macro P[macro] D[macro]
16887     next
16888   } else {
16889     # Replace #undef with comments.  This is necessary, for example,
16890     # in the case of _POSIX_SOURCE, which is predefined and required
16891     # on some systems where configure will not decide to define it.
16892     if (defundef == "undef") {
16893       print "/*", prefix defundef, macro, "*/"
16894       next
16895     }
16896   }
16897 }
16898 { print }
16899 _ACAWK
16900 _ACEOF
16901 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16902   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
16903 fi # test -n "$CONFIG_HEADERS"
16904
16905
16906 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS  :L $CONFIG_LINKS  :C $CONFIG_COMMANDS"
16907 shift
16908 for ac_tag
16909 do
16910   case $ac_tag in
16911   :[FHLC]) ac_mode=$ac_tag; continue;;
16912   esac
16913   case $ac_mode$ac_tag in
16914   :[FHL]*:*);;
16915   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
16916   :[FH]-) ac_tag=-:-;;
16917   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16918   esac
16919   ac_save_IFS=$IFS
16920   IFS=:
16921   set x $ac_tag
16922   IFS=$ac_save_IFS
16923   shift
16924   ac_file=$1
16925   shift
16926
16927   case $ac_mode in
16928   :L) ac_source=$1;;
16929   :[FH])
16930     ac_file_inputs=
16931     for ac_f
16932     do
16933       case $ac_f in
16934       -) ac_f="$ac_tmp/stdin";;
16935       *) # Look for the file first in the build tree, then in the source tree
16936          # (if the path is not absolute).  The absolute path cannot be DOS-style,
16937          # because $ac_f cannot contain `:'.
16938          test -f "$ac_f" ||
16939            case $ac_f in
16940            [\\/$]*) false;;
16941            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16942            esac ||
16943            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
16944       esac
16945       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16946       as_fn_append ac_file_inputs " '$ac_f'"
16947     done
16948
16949     # Let's still pretend it is `configure' which instantiates (i.e., don't
16950     # use $as_me), people would be surprised to read:
16951     #    /* config.h.  Generated by config.status.  */
16952     configure_input='Generated from '`
16953           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16954         `' by configure.'
16955     if test x"$ac_file" != x-; then
16956       configure_input="$ac_file.  $configure_input"
16957       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16958 $as_echo "$as_me: creating $ac_file" >&6;}
16959     fi
16960     # Neutralize special characters interpreted by sed in replacement strings.
16961     case $configure_input in #(
16962     *\&* | *\|* | *\\* )
16963        ac_sed_conf_input=`$as_echo "$configure_input" |
16964        sed 's/[\\\\&|]/\\\\&/g'`;; #(
16965     *) ac_sed_conf_input=$configure_input;;
16966     esac
16967
16968     case $ac_tag in
16969     *:-:* | *:-) cat >"$ac_tmp/stdin" \
16970       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
16971     esac
16972     ;;
16973   esac
16974
16975   ac_dir=`$as_dirname -- "$ac_file" ||
16976 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16977          X"$ac_file" : 'X\(//\)[^/]' \| \
16978          X"$ac_file" : 'X\(//\)$' \| \
16979          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
16980 $as_echo X"$ac_file" |
16981     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16982             s//\1/
16983             q
16984           }
16985           /^X\(\/\/\)[^/].*/{
16986             s//\1/
16987             q
16988           }
16989           /^X\(\/\/\)$/{
16990             s//\1/
16991             q
16992           }
16993           /^X\(\/\).*/{
16994             s//\1/
16995             q
16996           }
16997           s/.*/./; q'`
16998   as_dir="$ac_dir"; as_fn_mkdir_p
16999   ac_builddir=.
17000
17001 case "$ac_dir" in
17002 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17003 *)
17004   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
17005   # A ".." for each directory in $ac_dir_suffix.
17006   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
17007   case $ac_top_builddir_sub in
17008   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17009   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17010   esac ;;
17011 esac
17012 ac_abs_top_builddir=$ac_pwd
17013 ac_abs_builddir=$ac_pwd$ac_dir_suffix
17014 # for backward compatibility:
17015 ac_top_builddir=$ac_top_build_prefix
17016
17017 case $srcdir in
17018   .)  # We are building in place.
17019     ac_srcdir=.
17020     ac_top_srcdir=$ac_top_builddir_sub
17021     ac_abs_top_srcdir=$ac_pwd ;;
17022   [\\/]* | ?:[\\/]* )  # Absolute name.
17023     ac_srcdir=$srcdir$ac_dir_suffix;
17024     ac_top_srcdir=$srcdir
17025     ac_abs_top_srcdir=$srcdir ;;
17026   *) # Relative name.
17027     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17028     ac_top_srcdir=$ac_top_build_prefix$srcdir
17029     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
17030 esac
17031 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
17032
17033
17034   case $ac_mode in
17035   :F)
17036   #
17037   # CONFIG_FILE
17038   #
17039
17040   case $INSTALL in
17041   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
17042   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
17043   esac
17044   ac_MKDIR_P=$MKDIR_P
17045   case $MKDIR_P in
17046   [\\/$]* | ?:[\\/]* ) ;;
17047   */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17048   esac
17049 _ACEOF
17050
17051 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17052 # If the template does not know about datarootdir, expand it.
17053 # FIXME: This hack should be removed a few years after 2.60.
17054 ac_datarootdir_hack=; ac_datarootdir_seen=
17055 ac_sed_dataroot='
17056 /datarootdir/ {
17057   p
17058   q
17059 }
17060 /@datadir@/p
17061 /@docdir@/p
17062 /@infodir@/p
17063 /@localedir@/p
17064 /@mandir@/p'
17065 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
17066 *datarootdir*) ac_datarootdir_seen=yes;;
17067 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
17068   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17069 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
17070 _ACEOF
17071 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17072   ac_datarootdir_hack='
17073   s&@datadir@&$datadir&g
17074   s&@docdir@&$docdir&g
17075   s&@infodir@&$infodir&g
17076   s&@localedir@&$localedir&g
17077   s&@mandir@&$mandir&g
17078   s&\\\${datarootdir}&$datarootdir&g' ;;
17079 esac
17080 _ACEOF
17081
17082 # Neutralize VPATH when `$srcdir' = `.'.
17083 # Shell code in configure.ac might set extrasub.
17084 # FIXME: do we really want to maintain this feature?
17085 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17086 ac_sed_extra="$ac_vpsub
17087 $extrasub
17088 _ACEOF
17089 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17090 :t
17091 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
17092 s|@configure_input@|$ac_sed_conf_input|;t t
17093 s&@top_builddir@&$ac_top_builddir_sub&;t t
17094 s&@top_build_prefix@&$ac_top_build_prefix&;t t
17095 s&@srcdir@&$ac_srcdir&;t t
17096 s&@abs_srcdir@&$ac_abs_srcdir&;t t
17097 s&@top_srcdir@&$ac_top_srcdir&;t t
17098 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17099 s&@builddir@&$ac_builddir&;t t
17100 s&@abs_builddir@&$ac_abs_builddir&;t t
17101 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17102 s&@INSTALL@&$ac_INSTALL&;t t
17103 s&@MKDIR_P@&$ac_MKDIR_P&;t t
17104 $ac_datarootdir_hack
17105 "
17106 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17107   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
17108
17109 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
17110   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17111   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
17112       "$ac_tmp/out"`; test -z "$ac_out"; } &&
17113   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
17114 which seems to be undefined.  Please make sure it is defined" >&5
17115 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
17116 which seems to be undefined.  Please make sure it is defined" >&2;}
17117
17118   rm -f "$ac_tmp/stdin"
17119   case $ac_file in
17120   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17121   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
17122   esac \
17123   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
17124  ;;
17125   :H)
17126   #
17127   # CONFIG_HEADER
17128   #
17129   if test x"$ac_file" != x-; then
17130     {
17131       $as_echo "/* $configure_input  */" \
17132       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17133     } >"$ac_tmp/config.h" \
17134       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
17135     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
17136       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17137 $as_echo "$as_me: $ac_file is unchanged" >&6;}
17138     else
17139       rm -f "$ac_file"
17140       mv "$ac_tmp/config.h" "$ac_file" \
17141         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
17142     fi
17143   else
17144     $as_echo "/* $configure_input  */" \
17145       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
17146       || as_fn_error $? "could not create -" "$LINENO" 5
17147   fi
17148  ;;
17149   :L)
17150   #
17151   # CONFIG_LINK
17152   #
17153
17154   if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
17155     :
17156   else
17157     # Prefer the file from the source tree if names are identical.
17158     if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
17159       ac_source=$srcdir/$ac_source
17160     fi
17161
17162     { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
17163 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
17164
17165     if test ! -r "$ac_source"; then
17166       as_fn_error $? "$ac_source: file not found" "$LINENO" 5
17167     fi
17168     rm -f "$ac_file"
17169
17170     # Try a relative symlink, then a hard link, then a copy.
17171     case $ac_source in
17172     [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
17173         *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
17174     esac
17175     ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
17176       ln "$ac_source" "$ac_file" 2>/dev/null ||
17177       cp -p "$ac_source" "$ac_file" ||
17178       as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
17179   fi
17180  ;;
17181   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
17182 $as_echo "$as_me: executing $ac_file commands" >&6;}
17183  ;;
17184   esac
17185
17186
17187   case $ac_file$ac_mode in
17188     "check_win32_symlinks":C)
17189 # Links sometimes fail undetected on Mingw -
17190 # so here we detect it and warn the user
17191 for FILE in $CONFIG_LINKS
17192  do
17193         # test -e works for symlinks in the MinGW console
17194         test -e `expr "$FILE" : '\([^:]*\)'` || { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** link for $FILE -- please fix by hand" >&5
17195 $as_echo "$as_me: WARNING: *** link for $FILE -- please fix by hand" >&2;}
17196  done
17197  ;;
17198     "src/include/pg_config.h":H)
17199 # Update timestamp for pg_config.h (see Makefile.global)
17200 echo >src/include/stamp-h
17201  ;;
17202     "src/include/pg_config_ext.h":H)
17203 # Update timestamp for pg_config_ext.h (see Makefile.global)
17204 echo >src/include/stamp-ext-h
17205  ;;
17206     "src/interfaces/ecpg/include/ecpg_config.h":H) echo >src/interfaces/ecpg/include/stamp-h ;;
17207
17208   esac
17209 done # for ac_tag
17210
17211
17212 as_fn_exit 0
17213 _ACEOF
17214 ac_clean_files=$ac_clean_files_save
17215
17216 test $ac_write_fail = 0 ||
17217   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
17218
17219
17220 # configure is writing to config.log, and then calls config.status.
17221 # config.status does its own redirection, appending to config.log.
17222 # Unfortunately, on DOS this fails, as config.log is still kept open
17223 # by configure, so config.status won't be able to write to it; its
17224 # output is simply discarded.  So we exec the FD to /dev/null,
17225 # effectively closing config.log, so it can be properly (re)opened and
17226 # appended to by config.status.  When coming back to configure, we
17227 # need to make the FD available again.
17228 if test "$no_create" != yes; then
17229   ac_cs_success=:
17230   ac_config_status_args=
17231   test "$silent" = yes &&
17232     ac_config_status_args="$ac_config_status_args --quiet"
17233   exec 5>/dev/null
17234   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
17235   exec 5>>config.log
17236   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17237   # would make configure fail if this is the last instruction.
17238   $ac_cs_success || as_fn_exit 1
17239 fi
17240 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17241   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17242 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
17243 fi
17244