]> granicus.if.org Git - postgresql/blob - configure
Propagate system identifier generation improvement into pg_resetxlog.
[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.4beta1.
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-2014, 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.4beta1'
586 PACKAGE_STRING='PostgreSQL 9.4beta1'
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 PROVE
631 OSX
632 XSLTPROC
633 COLLATEINDEX
634 DOCBOOKSTYLE
635 have_docbook
636 JADE
637 NSGMLS
638 TCL_SHLIB_LD_LIBS
639 TCL_SHARED_BUILD
640 TCL_LIB_SPEC
641 TCL_LIBS
642 TCL_LIB_FILE
643 TCL_INCLUDE_SPEC
644 TCL_CONFIG_SH
645 TCLSH
646 XGETTEXT
647 MSGMERGE
648 MSGFMT_FLAGS
649 MSGFMT
650 HAVE_POSIX_SIGNALS
651 LDAP_LIBS_BE
652 LDAP_LIBS_FE
653 PTHREAD_CFLAGS
654 PTHREAD_LIBS
655 PTHREAD_CC
656 acx_pthread_config
657 have_win32_dbghelp
658 HAVE_IPV6
659 LIBOBJS
660 UUID_LIBS
661 ZIC
662 python_enable_shared
663 python_additional_libs
664 python_libspec
665 python_libdir
666 python_includespec
667 python_version
668 python_majorversion
669 PYTHON
670 perl_embed_ldflags
671 perl_useshrplib
672 perl_privlibexp
673 perl_archlibexp
674 PERL
675 FLEXFLAGS
676 FLEX
677 BISONFLAGS
678 BISON
679 MKDIR_P
680 AWK
681 LN_S
682 TAR
683 install_bin
684 INSTALL_DATA
685 INSTALL_SCRIPT
686 INSTALL_PROGRAM
687 WINDRES
688 DLLWRAP
689 DLLTOOL
690 AR
691 STRIP_SHARED_LIB
692 STRIP_STATIC_LIB
693 STRIP
694 RANLIB
695 ld_R_works
696 with_gnu_ld
697 LD
698 LDFLAGS_SL
699 LDFLAGS_EX
700 ELF_SYS
701 EGREP
702 GREP
703 with_zlib
704 with_system_tzdata
705 with_libxslt
706 with_libxml
707 XML2_CONFIG
708 UUID_EXTRA_OBJS
709 with_uuid
710 with_selinux
711 with_openssl
712 krb_srvtab
713 with_python
714 with_perl
715 with_tcl
716 enable_thread_safety
717 INCLUDES
718 autodepend
719 TAS
720 GCC
721 CPP
722 CFLAGS_VECTOR
723 SUN_STUDIO_CC
724 OBJEXT
725 EXEEXT
726 ac_ct_CC
727 CPPFLAGS
728 LDFLAGS
729 CFLAGS
730 CC
731 enable_dtrace
732 DTRACEFLAGS
733 DTRACE
734 enable_coverage
735 GENHTML
736 LCOV
737 GCOV
738 enable_debug
739 enable_rpath
740 default_port
741 WANTED_LANGUAGES
742 enable_nls
743 PORTNAME
744 host_os
745 host_vendor
746 host_cpu
747 host
748 build_os
749 build_vendor
750 build_cpu
751 build
752 PG_MAJORVERSION
753 configure_args
754 target_alias
755 host_alias
756 build_alias
757 LIBS
758 ECHO_T
759 ECHO_N
760 ECHO_C
761 DEFS
762 mandir
763 localedir
764 libdir
765 psdir
766 pdfdir
767 dvidir
768 htmldir
769 infodir
770 docdir
771 oldincludedir
772 includedir
773 localstatedir
774 sharedstatedir
775 sysconfdir
776 datadir
777 datarootdir
778 libexecdir
779 sbindir
780 bindir
781 program_transform_name
782 prefix
783 exec_prefix
784 PACKAGE_URL
785 PACKAGE_BUGREPORT
786 PACKAGE_STRING
787 PACKAGE_VERSION
788 PACKAGE_TARNAME
789 PACKAGE_NAME
790 PATH_SEPARATOR
791 SHELL'
792 ac_subst_files=''
793 ac_user_opts='
794 enable_option_checking
795 with_extra_version
796 with_template
797 with_includes
798 with_libraries
799 with_libs
800 enable_integer_datetimes
801 enable_nls
802 with_pgport
803 enable_rpath
804 enable_spinlocks
805 enable_debug
806 enable_profiling
807 enable_coverage
808 enable_dtrace
809 with_blocksize
810 with_segsize
811 with_wal_blocksize
812 with_wal_segsize
813 with_CC
814 enable_depend
815 enable_cassert
816 enable_thread_safety
817 with_tcl
818 with_tclconfig
819 with_perl
820 with_python
821 with_gssapi
822 with_krb_srvnam
823 with_pam
824 with_ldap
825 with_bonjour
826 with_openssl
827 with_selinux
828 with_readline
829 with_libedit_preferred
830 with_uuid
831 with_ossp_uuid
832 with_libxml
833 with_libxslt
834 with_system_tzdata
835 with_zlib
836 with_gnu_ld
837 enable_largefile
838 enable_float4_byval
839 enable_float8_byval
840 '
841       ac_precious_vars='build_alias
842 host_alias
843 target_alias
844 CC
845 CFLAGS
846 LDFLAGS
847 LIBS
848 CPPFLAGS
849 CPP
850 LDFLAGS_EX
851 LDFLAGS_SL
852 DOCBOOKSTYLE'
853
854
855 # Initialize some variables set by options.
856 ac_init_help=
857 ac_init_version=false
858 ac_unrecognized_opts=
859 ac_unrecognized_sep=
860 # The variables have the same names as the options, with
861 # dashes changed to underlines.
862 cache_file=/dev/null
863 exec_prefix=NONE
864 no_create=
865 no_recursion=
866 prefix=NONE
867 program_prefix=NONE
868 program_suffix=NONE
869 program_transform_name=s,x,x,
870 silent=
871 site=
872 srcdir=
873 verbose=
874 x_includes=NONE
875 x_libraries=NONE
876
877 # Installation directory options.
878 # These are left unexpanded so users can "make install exec_prefix=/foo"
879 # and all the variables that are supposed to be based on exec_prefix
880 # by default will actually change.
881 # Use braces instead of parens because sh, perl, etc. also accept them.
882 # (The list follows the same order as the GNU Coding Standards.)
883 bindir='${exec_prefix}/bin'
884 sbindir='${exec_prefix}/sbin'
885 libexecdir='${exec_prefix}/libexec'
886 datarootdir='${prefix}/share'
887 datadir='${datarootdir}'
888 sysconfdir='${prefix}/etc'
889 sharedstatedir='${prefix}/com'
890 localstatedir='${prefix}/var'
891 includedir='${prefix}/include'
892 oldincludedir='/usr/include'
893 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
894 infodir='${datarootdir}/info'
895 htmldir='${docdir}'
896 dvidir='${docdir}'
897 pdfdir='${docdir}'
898 psdir='${docdir}'
899 libdir='${exec_prefix}/lib'
900 localedir='${datarootdir}/locale'
901 mandir='${datarootdir}/man'
902
903 ac_prev=
904 ac_dashdash=
905 for ac_option
906 do
907   # If the previous option needs an argument, assign it.
908   if test -n "$ac_prev"; then
909     eval $ac_prev=\$ac_option
910     ac_prev=
911     continue
912   fi
913
914   case $ac_option in
915   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
916   *=)   ac_optarg= ;;
917   *)    ac_optarg=yes ;;
918   esac
919
920   # Accept the important Cygnus configure options, so we can diagnose typos.
921
922   case $ac_dashdash$ac_option in
923   --)
924     ac_dashdash=yes ;;
925
926   -bindir | --bindir | --bindi | --bind | --bin | --bi)
927     ac_prev=bindir ;;
928   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
929     bindir=$ac_optarg ;;
930
931   -build | --build | --buil | --bui | --bu)
932     ac_prev=build_alias ;;
933   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
934     build_alias=$ac_optarg ;;
935
936   -cache-file | --cache-file | --cache-fil | --cache-fi \
937   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
938     ac_prev=cache_file ;;
939   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
940   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
941     cache_file=$ac_optarg ;;
942
943   --config-cache | -C)
944     cache_file=config.cache ;;
945
946   -datadir | --datadir | --datadi | --datad)
947     ac_prev=datadir ;;
948   -datadir=* | --datadir=* | --datadi=* | --datad=*)
949     datadir=$ac_optarg ;;
950
951   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
952   | --dataroo | --dataro | --datar)
953     ac_prev=datarootdir ;;
954   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
955   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
956     datarootdir=$ac_optarg ;;
957
958   -disable-* | --disable-*)
959     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
960     # Reject names that are not valid shell variable names.
961     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
962       as_fn_error $? "invalid feature name: $ac_useropt"
963     ac_useropt_orig=$ac_useropt
964     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
965     case $ac_user_opts in
966       *"
967 "enable_$ac_useropt"
968 "*) ;;
969       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
970          ac_unrecognized_sep=', ';;
971     esac
972     eval enable_$ac_useropt=no ;;
973
974   -docdir | --docdir | --docdi | --doc | --do)
975     ac_prev=docdir ;;
976   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
977     docdir=$ac_optarg ;;
978
979   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
980     ac_prev=dvidir ;;
981   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
982     dvidir=$ac_optarg ;;
983
984   -enable-* | --enable-*)
985     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
986     # Reject names that are not valid shell variable names.
987     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
988       as_fn_error $? "invalid feature name: $ac_useropt"
989     ac_useropt_orig=$ac_useropt
990     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
991     case $ac_user_opts in
992       *"
993 "enable_$ac_useropt"
994 "*) ;;
995       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
996          ac_unrecognized_sep=', ';;
997     esac
998     eval enable_$ac_useropt=\$ac_optarg ;;
999
1000   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1001   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1002   | --exec | --exe | --ex)
1003     ac_prev=exec_prefix ;;
1004   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1005   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1006   | --exec=* | --exe=* | --ex=*)
1007     exec_prefix=$ac_optarg ;;
1008
1009   -gas | --gas | --ga | --g)
1010     # Obsolete; use --with-gas.
1011     with_gas=yes ;;
1012
1013   -help | --help | --hel | --he | -h)
1014     ac_init_help=long ;;
1015   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1016     ac_init_help=recursive ;;
1017   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1018     ac_init_help=short ;;
1019
1020   -host | --host | --hos | --ho)
1021     ac_prev=host_alias ;;
1022   -host=* | --host=* | --hos=* | --ho=*)
1023     host_alias=$ac_optarg ;;
1024
1025   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1026     ac_prev=htmldir ;;
1027   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1028   | --ht=*)
1029     htmldir=$ac_optarg ;;
1030
1031   -includedir | --includedir | --includedi | --included | --include \
1032   | --includ | --inclu | --incl | --inc)
1033     ac_prev=includedir ;;
1034   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1035   | --includ=* | --inclu=* | --incl=* | --inc=*)
1036     includedir=$ac_optarg ;;
1037
1038   -infodir | --infodir | --infodi | --infod | --info | --inf)
1039     ac_prev=infodir ;;
1040   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1041     infodir=$ac_optarg ;;
1042
1043   -libdir | --libdir | --libdi | --libd)
1044     ac_prev=libdir ;;
1045   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1046     libdir=$ac_optarg ;;
1047
1048   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1049   | --libexe | --libex | --libe)
1050     ac_prev=libexecdir ;;
1051   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1052   | --libexe=* | --libex=* | --libe=*)
1053     libexecdir=$ac_optarg ;;
1054
1055   -localedir | --localedir | --localedi | --localed | --locale)
1056     ac_prev=localedir ;;
1057   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1058     localedir=$ac_optarg ;;
1059
1060   -localstatedir | --localstatedir | --localstatedi | --localstated \
1061   | --localstate | --localstat | --localsta | --localst | --locals)
1062     ac_prev=localstatedir ;;
1063   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1064   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1065     localstatedir=$ac_optarg ;;
1066
1067   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1068     ac_prev=mandir ;;
1069   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1070     mandir=$ac_optarg ;;
1071
1072   -nfp | --nfp | --nf)
1073     # Obsolete; use --without-fp.
1074     with_fp=no ;;
1075
1076   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1077   | --no-cr | --no-c | -n)
1078     no_create=yes ;;
1079
1080   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1081   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1082     no_recursion=yes ;;
1083
1084   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1085   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1086   | --oldin | --oldi | --old | --ol | --o)
1087     ac_prev=oldincludedir ;;
1088   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1089   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1090   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1091     oldincludedir=$ac_optarg ;;
1092
1093   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1094     ac_prev=prefix ;;
1095   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1096     prefix=$ac_optarg ;;
1097
1098   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1099   | --program-pre | --program-pr | --program-p)
1100     ac_prev=program_prefix ;;
1101   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1102   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1103     program_prefix=$ac_optarg ;;
1104
1105   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1106   | --program-suf | --program-su | --program-s)
1107     ac_prev=program_suffix ;;
1108   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1109   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1110     program_suffix=$ac_optarg ;;
1111
1112   -program-transform-name | --program-transform-name \
1113   | --program-transform-nam | --program-transform-na \
1114   | --program-transform-n | --program-transform- \
1115   | --program-transform | --program-transfor \
1116   | --program-transfo | --program-transf \
1117   | --program-trans | --program-tran \
1118   | --progr-tra | --program-tr | --program-t)
1119     ac_prev=program_transform_name ;;
1120   -program-transform-name=* | --program-transform-name=* \
1121   | --program-transform-nam=* | --program-transform-na=* \
1122   | --program-transform-n=* | --program-transform-=* \
1123   | --program-transform=* | --program-transfor=* \
1124   | --program-transfo=* | --program-transf=* \
1125   | --program-trans=* | --program-tran=* \
1126   | --progr-tra=* | --program-tr=* | --program-t=*)
1127     program_transform_name=$ac_optarg ;;
1128
1129   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1130     ac_prev=pdfdir ;;
1131   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1132     pdfdir=$ac_optarg ;;
1133
1134   -psdir | --psdir | --psdi | --psd | --ps)
1135     ac_prev=psdir ;;
1136   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1137     psdir=$ac_optarg ;;
1138
1139   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1140   | -silent | --silent | --silen | --sile | --sil)
1141     silent=yes ;;
1142
1143   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1144     ac_prev=sbindir ;;
1145   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1146   | --sbi=* | --sb=*)
1147     sbindir=$ac_optarg ;;
1148
1149   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1150   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1151   | --sharedst | --shareds | --shared | --share | --shar \
1152   | --sha | --sh)
1153     ac_prev=sharedstatedir ;;
1154   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1155   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1156   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1157   | --sha=* | --sh=*)
1158     sharedstatedir=$ac_optarg ;;
1159
1160   -site | --site | --sit)
1161     ac_prev=site ;;
1162   -site=* | --site=* | --sit=*)
1163     site=$ac_optarg ;;
1164
1165   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1166     ac_prev=srcdir ;;
1167   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1168     srcdir=$ac_optarg ;;
1169
1170   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1171   | --syscon | --sysco | --sysc | --sys | --sy)
1172     ac_prev=sysconfdir ;;
1173   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1174   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1175     sysconfdir=$ac_optarg ;;
1176
1177   -target | --target | --targe | --targ | --tar | --ta | --t)
1178     ac_prev=target_alias ;;
1179   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1180     target_alias=$ac_optarg ;;
1181
1182   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1183     verbose=yes ;;
1184
1185   -version | --version | --versio | --versi | --vers | -V)
1186     ac_init_version=: ;;
1187
1188   -with-* | --with-*)
1189     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1190     # Reject names that are not valid shell variable names.
1191     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1192       as_fn_error $? "invalid package name: $ac_useropt"
1193     ac_useropt_orig=$ac_useropt
1194     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1195     case $ac_user_opts in
1196       *"
1197 "with_$ac_useropt"
1198 "*) ;;
1199       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1200          ac_unrecognized_sep=', ';;
1201     esac
1202     eval with_$ac_useropt=\$ac_optarg ;;
1203
1204   -without-* | --without-*)
1205     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1206     # Reject names that are not valid shell variable names.
1207     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1208       as_fn_error $? "invalid package name: $ac_useropt"
1209     ac_useropt_orig=$ac_useropt
1210     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1211     case $ac_user_opts in
1212       *"
1213 "with_$ac_useropt"
1214 "*) ;;
1215       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1216          ac_unrecognized_sep=', ';;
1217     esac
1218     eval with_$ac_useropt=no ;;
1219
1220   --x)
1221     # Obsolete; use --with-x.
1222     with_x=yes ;;
1223
1224   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1225   | --x-incl | --x-inc | --x-in | --x-i)
1226     ac_prev=x_includes ;;
1227   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1228   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1229     x_includes=$ac_optarg ;;
1230
1231   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1232   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1233     ac_prev=x_libraries ;;
1234   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1235   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1236     x_libraries=$ac_optarg ;;
1237
1238   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1239 Try \`$0 --help' for more information"
1240     ;;
1241
1242   *=*)
1243     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1244     # Reject names that are not valid shell variable names.
1245     case $ac_envvar in #(
1246       '' | [0-9]* | *[!_$as_cr_alnum]* )
1247       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1248     esac
1249     eval $ac_envvar=\$ac_optarg
1250     export $ac_envvar ;;
1251
1252   *)
1253     # FIXME: should be removed in autoconf 3.0.
1254     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1255     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1256       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1257     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1258     ;;
1259
1260   esac
1261 done
1262
1263 if test -n "$ac_prev"; then
1264   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1265   as_fn_error $? "missing argument to $ac_option"
1266 fi
1267
1268 if test -n "$ac_unrecognized_opts"; then
1269   case $enable_option_checking in
1270     no) ;;
1271     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1272     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1273   esac
1274 fi
1275
1276 # Check all directory arguments for consistency.
1277 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1278                 datadir sysconfdir sharedstatedir localstatedir includedir \
1279                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1280                 libdir localedir mandir
1281 do
1282   eval ac_val=\$$ac_var
1283   # Remove trailing slashes.
1284   case $ac_val in
1285     */ )
1286       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1287       eval $ac_var=\$ac_val;;
1288   esac
1289   # Be sure to have absolute directory names.
1290   case $ac_val in
1291     [\\/$]* | ?:[\\/]* )  continue;;
1292     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1293   esac
1294   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1295 done
1296
1297 # There might be people who depend on the old broken behavior: `$host'
1298 # used to hold the argument of --host etc.
1299 # FIXME: To remove some day.
1300 build=$build_alias
1301 host=$host_alias
1302 target=$target_alias
1303
1304 # FIXME: To remove some day.
1305 if test "x$host_alias" != x; then
1306   if test "x$build_alias" = x; then
1307     cross_compiling=maybe
1308   elif test "x$build_alias" != "x$host_alias"; then
1309     cross_compiling=yes
1310   fi
1311 fi
1312
1313 ac_tool_prefix=
1314 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1315
1316 test "$silent" = yes && exec 6>/dev/null
1317
1318
1319 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1320 ac_ls_di=`ls -di .` &&
1321 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1322   as_fn_error $? "working directory cannot be determined"
1323 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1324   as_fn_error $? "pwd does not report name of working directory"
1325
1326
1327 # Find the source files, if location was not specified.
1328 if test -z "$srcdir"; then
1329   ac_srcdir_defaulted=yes
1330   # Try the directory containing this script, then the parent directory.
1331   ac_confdir=`$as_dirname -- "$as_myself" ||
1332 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1333          X"$as_myself" : 'X\(//\)[^/]' \| \
1334          X"$as_myself" : 'X\(//\)$' \| \
1335          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1336 $as_echo X"$as_myself" |
1337     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1338             s//\1/
1339             q
1340           }
1341           /^X\(\/\/\)[^/].*/{
1342             s//\1/
1343             q
1344           }
1345           /^X\(\/\/\)$/{
1346             s//\1/
1347             q
1348           }
1349           /^X\(\/\).*/{
1350             s//\1/
1351             q
1352           }
1353           s/.*/./; q'`
1354   srcdir=$ac_confdir
1355   if test ! -r "$srcdir/$ac_unique_file"; then
1356     srcdir=..
1357   fi
1358 else
1359   ac_srcdir_defaulted=no
1360 fi
1361 if test ! -r "$srcdir/$ac_unique_file"; then
1362   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1363   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1364 fi
1365 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1366 ac_abs_confdir=`(
1367         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1368         pwd)`
1369 # When building in place, set srcdir=.
1370 if test "$ac_abs_confdir" = "$ac_pwd"; then
1371   srcdir=.
1372 fi
1373 # Remove unnecessary trailing slashes from srcdir.
1374 # Double slashes in file names in object file debugging info
1375 # mess up M-x gdb in Emacs.
1376 case $srcdir in
1377 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1378 esac
1379 for ac_var in $ac_precious_vars; do
1380   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1381   eval ac_env_${ac_var}_value=\$${ac_var}
1382   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1383   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1384 done
1385
1386 #
1387 # Report the --help message.
1388 #
1389 if test "$ac_init_help" = "long"; then
1390   # Omit some internal or obsolete options to make the list less imposing.
1391   # This message is too long to be a string in the A/UX 3.1 sh.
1392   cat <<_ACEOF
1393 \`configure' configures PostgreSQL 9.4beta1 to adapt to many kinds of systems.
1394
1395 Usage: $0 [OPTION]... [VAR=VALUE]...
1396
1397 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1398 VAR=VALUE.  See below for descriptions of some of the useful variables.
1399
1400 Defaults for the options are specified in brackets.
1401
1402 Configuration:
1403   -h, --help              display this help and exit
1404       --help=short        display options specific to this package
1405       --help=recursive    display the short help of all the included packages
1406   -V, --version           display version information and exit
1407   -q, --quiet, --silent   do not print \`checking ...' messages
1408       --cache-file=FILE   cache test results in FILE [disabled]
1409   -C, --config-cache      alias for \`--cache-file=config.cache'
1410   -n, --no-create         do not create output files
1411       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1412
1413 Installation directories:
1414   --prefix=PREFIX         install architecture-independent files in PREFIX
1415                           [$ac_default_prefix]
1416   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1417                           [PREFIX]
1418
1419 By default, \`make install' will install all the files in
1420 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1421 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1422 for instance \`--prefix=\$HOME'.
1423
1424 For better control, use the options below.
1425
1426 Fine tuning of the installation directories:
1427   --bindir=DIR            user executables [EPREFIX/bin]
1428   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1429   --libexecdir=DIR        program executables [EPREFIX/libexec]
1430   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1431   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1432   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1433   --libdir=DIR            object code libraries [EPREFIX/lib]
1434   --includedir=DIR        C header files [PREFIX/include]
1435   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1436   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1437   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1438   --infodir=DIR           info documentation [DATAROOTDIR/info]
1439   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1440   --mandir=DIR            man documentation [DATAROOTDIR/man]
1441   --docdir=DIR            documentation root [DATAROOTDIR/doc/postgresql]
1442   --htmldir=DIR           html documentation [DOCDIR]
1443   --dvidir=DIR            dvi documentation [DOCDIR]
1444   --pdfdir=DIR            pdf documentation [DOCDIR]
1445   --psdir=DIR             ps documentation [DOCDIR]
1446 _ACEOF
1447
1448   cat <<\_ACEOF
1449
1450 System types:
1451   --build=BUILD     configure for building on BUILD [guessed]
1452   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1453 _ACEOF
1454 fi
1455
1456 if test -n "$ac_init_help"; then
1457   case $ac_init_help in
1458      short | recursive ) echo "Configuration of PostgreSQL 9.4beta1:";;
1459    esac
1460   cat <<\_ACEOF
1461
1462 Optional Features:
1463   --disable-option-checking  ignore unrecognized --enable/--with options
1464   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1465   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1466   --disable-integer-datetimes
1467                           disable 64-bit integer date/time support
1468   --enable-nls[=LANGUAGES]
1469                           enable Native Language Support
1470   --disable-rpath         do not embed shared library search path in
1471                           executables
1472   --disable-spinlocks     do not use spinlocks
1473   --enable-debug          build with debugging symbols (-g)
1474   --enable-profiling      build with profiling enabled
1475   --enable-coverage       build with coverage testing instrumentation
1476   --enable-dtrace         build with DTrace support
1477   --enable-depend         turn on automatic dependency tracking
1478   --enable-cassert        enable assertion checks (for debugging)
1479   --disable-thread-safety disable thread-safety in client libraries
1480   --disable-largefile     omit support for large files
1481   --disable-float4-byval  disable float4 passed by value
1482   --disable-float8-byval  disable float8 passed by value
1483
1484 Optional Packages:
1485   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1486   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1487   --with-extra-version=STRING
1488                           append STRING to version
1489   --with-template=NAME    override operating system template
1490   --with-includes=DIRS    look for additional header files in DIRS
1491   --with-libraries=DIRS   look for additional libraries in DIRS
1492   --with-libs=DIRS        alternative spelling of --with-libraries
1493   --with-pgport=PORTNUM   set default port number [5432]
1494   --with-blocksize=BLOCKSIZE
1495                           set table block size in kB [8]
1496   --with-segsize=SEGSIZE  set table segment size in GB [1]
1497   --with-wal-blocksize=BLOCKSIZE
1498                           set WAL block size in kB [8]
1499   --with-wal-segsize=SEGSIZE
1500                           set WAL segment size in MB [16]
1501   --with-CC=CMD           set compiler (deprecated)
1502   --with-tcl              build Tcl modules (PL/Tcl)
1503   --with-tclconfig=DIR    tclConfig.sh is in DIR
1504   --with-perl             build Perl modules (PL/Perl)
1505   --with-python           build Python modules (PL/Python)
1506   --with-gssapi           build with GSSAPI support
1507   --with-krb-srvnam=NAME  default service principal name in Kerberos (GSSAPI)
1508                           [postgres]
1509   --with-pam              build with PAM support
1510   --with-ldap             build with LDAP support
1511   --with-bonjour          build with Bonjour support
1512   --with-openssl          build with OpenSSL support
1513   --with-selinux          build with SELinux support
1514   --without-readline      do not use GNU Readline nor BSD Libedit for editing
1515   --with-libedit-preferred
1516                           prefer BSD Libedit over GNU Readline
1517   --with-uuid=LIB         build contrib/uuid-ossp using LIB (bsd,e2fs,ossp)
1518   --with-ossp-uuid        obsolete spelling of --with-uuid=ossp
1519   --with-libxml           build with XML support
1520   --with-libxslt          use XSLT support when building contrib/xml2
1521   --with-system-tzdata=DIR
1522                           use system time zone data in DIR
1523   --without-zlib          do not use Zlib
1524   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1525
1526 Some influential environment variables:
1527   CC          C compiler command
1528   CFLAGS      C compiler flags
1529   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1530               nonstandard directory <lib dir>
1531   LIBS        libraries to pass to the linker, e.g. -l<library>
1532   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1533               you have headers in a nonstandard directory <include dir>
1534   CPP         C preprocessor
1535   LDFLAGS_EX  extra linker flags for linking executables only
1536   LDFLAGS_SL  extra linker flags for linking shared libraries only
1537   DOCBOOKSTYLE
1538               location of DocBook stylesheets
1539
1540 Use these variables to override the choices made by `configure' or to help
1541 it to find libraries and programs with nonstandard names/locations.
1542
1543 Report bugs to <pgsql-bugs@postgresql.org>.
1544 _ACEOF
1545 ac_status=$?
1546 fi
1547
1548 if test "$ac_init_help" = "recursive"; then
1549   # If there are subdirs, report their specific --help.
1550   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1551     test -d "$ac_dir" ||
1552       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1553       continue
1554     ac_builddir=.
1555
1556 case "$ac_dir" in
1557 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1558 *)
1559   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1560   # A ".." for each directory in $ac_dir_suffix.
1561   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1562   case $ac_top_builddir_sub in
1563   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1564   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1565   esac ;;
1566 esac
1567 ac_abs_top_builddir=$ac_pwd
1568 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1569 # for backward compatibility:
1570 ac_top_builddir=$ac_top_build_prefix
1571
1572 case $srcdir in
1573   .)  # We are building in place.
1574     ac_srcdir=.
1575     ac_top_srcdir=$ac_top_builddir_sub
1576     ac_abs_top_srcdir=$ac_pwd ;;
1577   [\\/]* | ?:[\\/]* )  # Absolute name.
1578     ac_srcdir=$srcdir$ac_dir_suffix;
1579     ac_top_srcdir=$srcdir
1580     ac_abs_top_srcdir=$srcdir ;;
1581   *) # Relative name.
1582     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1583     ac_top_srcdir=$ac_top_build_prefix$srcdir
1584     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1585 esac
1586 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1587
1588     cd "$ac_dir" || { ac_status=$?; continue; }
1589     # Check for guested configure.
1590     if test -f "$ac_srcdir/configure.gnu"; then
1591       echo &&
1592       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1593     elif test -f "$ac_srcdir/configure"; then
1594       echo &&
1595       $SHELL "$ac_srcdir/configure" --help=recursive
1596     else
1597       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1598     fi || ac_status=$?
1599     cd "$ac_pwd" || { ac_status=$?; break; }
1600   done
1601 fi
1602
1603 test -n "$ac_init_help" && exit $ac_status
1604 if $ac_init_version; then
1605   cat <<\_ACEOF
1606 PostgreSQL configure 9.4beta1
1607 generated by GNU Autoconf 2.69
1608
1609 Copyright (C) 2012 Free Software Foundation, Inc.
1610 This configure script is free software; the Free Software Foundation
1611 gives unlimited permission to copy, distribute and modify it.
1612
1613 Copyright (c) 1996-2014, PostgreSQL Global Development Group
1614 _ACEOF
1615   exit
1616 fi
1617
1618 ## ------------------------ ##
1619 ## Autoconf initialization. ##
1620 ## ------------------------ ##
1621
1622 # ac_fn_c_try_compile LINENO
1623 # --------------------------
1624 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1625 ac_fn_c_try_compile ()
1626 {
1627   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1628   rm -f conftest.$ac_objext
1629   if { { ac_try="$ac_compile"
1630 case "(($ac_try" in
1631   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1632   *) ac_try_echo=$ac_try;;
1633 esac
1634 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1635 $as_echo "$ac_try_echo"; } >&5
1636   (eval "$ac_compile") 2>conftest.err
1637   ac_status=$?
1638   if test -s conftest.err; then
1639     grep -v '^ *+' conftest.err >conftest.er1
1640     cat conftest.er1 >&5
1641     mv -f conftest.er1 conftest.err
1642   fi
1643   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1644   test $ac_status = 0; } && {
1645          test -z "$ac_c_werror_flag" ||
1646          test ! -s conftest.err
1647        } && test -s conftest.$ac_objext; then :
1648   ac_retval=0
1649 else
1650   $as_echo "$as_me: failed program was:" >&5
1651 sed 's/^/| /' conftest.$ac_ext >&5
1652
1653         ac_retval=1
1654 fi
1655   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1656   as_fn_set_status $ac_retval
1657
1658 } # ac_fn_c_try_compile
1659
1660 # ac_fn_c_try_link LINENO
1661 # -----------------------
1662 # Try to link conftest.$ac_ext, and return whether this succeeded.
1663 ac_fn_c_try_link ()
1664 {
1665   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1666   rm -f conftest.$ac_objext conftest$ac_exeext
1667   if { { ac_try="$ac_link"
1668 case "(($ac_try" in
1669   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1670   *) ac_try_echo=$ac_try;;
1671 esac
1672 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1673 $as_echo "$ac_try_echo"; } >&5
1674   (eval "$ac_link") 2>conftest.err
1675   ac_status=$?
1676   if test -s conftest.err; then
1677     grep -v '^ *+' conftest.err >conftest.er1
1678     cat conftest.er1 >&5
1679     mv -f conftest.er1 conftest.err
1680   fi
1681   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1682   test $ac_status = 0; } && {
1683          test -z "$ac_c_werror_flag" ||
1684          test ! -s conftest.err
1685        } && test -s conftest$ac_exeext && {
1686          test "$cross_compiling" = yes ||
1687          test -x conftest$ac_exeext
1688        }; then :
1689   ac_retval=0
1690 else
1691   $as_echo "$as_me: failed program was:" >&5
1692 sed 's/^/| /' conftest.$ac_ext >&5
1693
1694         ac_retval=1
1695 fi
1696   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1697   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1698   # interfere with the next link command; also delete a directory that is
1699   # left behind by Apple's compiler.  We do this before executing the actions.
1700   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1701   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1702   as_fn_set_status $ac_retval
1703
1704 } # ac_fn_c_try_link
1705
1706 # ac_fn_c_try_cpp LINENO
1707 # ----------------------
1708 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1709 ac_fn_c_try_cpp ()
1710 {
1711   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1712   if { { ac_try="$ac_cpp conftest.$ac_ext"
1713 case "(($ac_try" in
1714   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1715   *) ac_try_echo=$ac_try;;
1716 esac
1717 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1718 $as_echo "$ac_try_echo"; } >&5
1719   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1720   ac_status=$?
1721   if test -s conftest.err; then
1722     grep -v '^ *+' conftest.err >conftest.er1
1723     cat conftest.er1 >&5
1724     mv -f conftest.er1 conftest.err
1725   fi
1726   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1727   test $ac_status = 0; } > conftest.i && {
1728          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1729          test ! -s conftest.err
1730        }; then :
1731   ac_retval=0
1732 else
1733   $as_echo "$as_me: failed program was:" >&5
1734 sed 's/^/| /' conftest.$ac_ext >&5
1735
1736     ac_retval=1
1737 fi
1738   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1739   as_fn_set_status $ac_retval
1740
1741 } # ac_fn_c_try_cpp
1742
1743 # ac_fn_c_check_func LINENO FUNC VAR
1744 # ----------------------------------
1745 # Tests whether FUNC exists, setting the cache variable VAR accordingly
1746 ac_fn_c_check_func ()
1747 {
1748   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1749   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1750 $as_echo_n "checking for $2... " >&6; }
1751 if eval \${$3+:} false; then :
1752   $as_echo_n "(cached) " >&6
1753 else
1754   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1755 /* end confdefs.h.  */
1756 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1757    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
1758 #define $2 innocuous_$2
1759
1760 /* System header to define __stub macros and hopefully few prototypes,
1761     which can conflict with char $2 (); below.
1762     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1763     <limits.h> exists even on freestanding compilers.  */
1764
1765 #ifdef __STDC__
1766 # include <limits.h>
1767 #else
1768 # include <assert.h>
1769 #endif
1770
1771 #undef $2
1772
1773 /* Override any GCC internal prototype to avoid an error.
1774    Use char because int might match the return type of a GCC
1775    builtin and then its argument prototype would still apply.  */
1776 #ifdef __cplusplus
1777 extern "C"
1778 #endif
1779 char $2 ();
1780 /* The GNU C library defines this for functions which it implements
1781     to always fail with ENOSYS.  Some functions are actually named
1782     something starting with __ and the normal name is an alias.  */
1783 #if defined __stub_$2 || defined __stub___$2
1784 choke me
1785 #endif
1786
1787 int
1788 main ()
1789 {
1790 return $2 ();
1791   ;
1792   return 0;
1793 }
1794 _ACEOF
1795 if ac_fn_c_try_link "$LINENO"; then :
1796   eval "$3=yes"
1797 else
1798   eval "$3=no"
1799 fi
1800 rm -f core conftest.err conftest.$ac_objext \
1801     conftest$ac_exeext conftest.$ac_ext
1802 fi
1803 eval ac_res=\$$3
1804                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1805 $as_echo "$ac_res" >&6; }
1806   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1807
1808 } # ac_fn_c_check_func
1809
1810 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1811 # -------------------------------------------------------
1812 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1813 # the include files in INCLUDES and setting the cache variable VAR
1814 # accordingly.
1815 ac_fn_c_check_header_mongrel ()
1816 {
1817   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1818   if eval \${$3+:} false; then :
1819   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1820 $as_echo_n "checking for $2... " >&6; }
1821 if eval \${$3+:} false; then :
1822   $as_echo_n "(cached) " >&6
1823 fi
1824 eval ac_res=\$$3
1825                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1826 $as_echo "$ac_res" >&6; }
1827 else
1828   # Is the header compilable?
1829 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1830 $as_echo_n "checking $2 usability... " >&6; }
1831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1832 /* end confdefs.h.  */
1833 $4
1834 #include <$2>
1835 _ACEOF
1836 if ac_fn_c_try_compile "$LINENO"; then :
1837   ac_header_compiler=yes
1838 else
1839   ac_header_compiler=no
1840 fi
1841 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1843 $as_echo "$ac_header_compiler" >&6; }
1844
1845 # Is the header present?
1846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1847 $as_echo_n "checking $2 presence... " >&6; }
1848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1849 /* end confdefs.h.  */
1850 #include <$2>
1851 _ACEOF
1852 if ac_fn_c_try_cpp "$LINENO"; then :
1853   ac_header_preproc=yes
1854 else
1855   ac_header_preproc=no
1856 fi
1857 rm -f conftest.err conftest.i conftest.$ac_ext
1858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1859 $as_echo "$ac_header_preproc" >&6; }
1860
1861 # So?  What about this header?
1862 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1863   yes:no: )
1864     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1865 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1866     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1867 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1868     ;;
1869   no:yes:* )
1870     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1871 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1872     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1873 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1874     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1875 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1876     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1877 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1878     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1879 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1880 ( $as_echo "## ---------------------------------------- ##
1881 ## Report this to pgsql-bugs@postgresql.org ##
1882 ## ---------------------------------------- ##"
1883      ) | sed "s/^/$as_me: WARNING:     /" >&2
1884     ;;
1885 esac
1886   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1887 $as_echo_n "checking for $2... " >&6; }
1888 if eval \${$3+:} false; then :
1889   $as_echo_n "(cached) " >&6
1890 else
1891   eval "$3=\$ac_header_compiler"
1892 fi
1893 eval ac_res=\$$3
1894                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1895 $as_echo "$ac_res" >&6; }
1896 fi
1897   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1898
1899 } # ac_fn_c_check_header_mongrel
1900
1901 # ac_fn_c_try_run LINENO
1902 # ----------------------
1903 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1904 # that executables *can* be run.
1905 ac_fn_c_try_run ()
1906 {
1907   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1908   if { { ac_try="$ac_link"
1909 case "(($ac_try" in
1910   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1911   *) ac_try_echo=$ac_try;;
1912 esac
1913 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1914 $as_echo "$ac_try_echo"; } >&5
1915   (eval "$ac_link") 2>&5
1916   ac_status=$?
1917   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1918   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1919   { { case "(($ac_try" in
1920   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1921   *) ac_try_echo=$ac_try;;
1922 esac
1923 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1924 $as_echo "$ac_try_echo"; } >&5
1925   (eval "$ac_try") 2>&5
1926   ac_status=$?
1927   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1928   test $ac_status = 0; }; }; then :
1929   ac_retval=0
1930 else
1931   $as_echo "$as_me: program exited with status $ac_status" >&5
1932        $as_echo "$as_me: failed program was:" >&5
1933 sed 's/^/| /' conftest.$ac_ext >&5
1934
1935        ac_retval=$ac_status
1936 fi
1937   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1938   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1939   as_fn_set_status $ac_retval
1940
1941 } # ac_fn_c_try_run
1942
1943 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1944 # -------------------------------------------------------
1945 # Tests whether HEADER exists and can be compiled using the include files in
1946 # INCLUDES, setting the cache variable VAR accordingly.
1947 ac_fn_c_check_header_compile ()
1948 {
1949   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1950   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1951 $as_echo_n "checking for $2... " >&6; }
1952 if eval \${$3+:} false; then :
1953   $as_echo_n "(cached) " >&6
1954 else
1955   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1956 /* end confdefs.h.  */
1957 $4
1958 #include <$2>
1959 _ACEOF
1960 if ac_fn_c_try_compile "$LINENO"; then :
1961   eval "$3=yes"
1962 else
1963   eval "$3=no"
1964 fi
1965 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1966 fi
1967 eval ac_res=\$$3
1968                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1969 $as_echo "$ac_res" >&6; }
1970   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1971
1972 } # ac_fn_c_check_header_compile
1973
1974 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
1975 # ----------------------------------------------------
1976 # Tries to find if the field MEMBER exists in type AGGR, after including
1977 # INCLUDES, setting cache variable VAR accordingly.
1978 ac_fn_c_check_member ()
1979 {
1980   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1981   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
1982 $as_echo_n "checking for $2.$3... " >&6; }
1983 if eval \${$4+:} false; then :
1984   $as_echo_n "(cached) " >&6
1985 else
1986   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1987 /* end confdefs.h.  */
1988 $5
1989 int
1990 main ()
1991 {
1992 static $2 ac_aggr;
1993 if (ac_aggr.$3)
1994 return 0;
1995   ;
1996   return 0;
1997 }
1998 _ACEOF
1999 if ac_fn_c_try_compile "$LINENO"; then :
2000   eval "$4=yes"
2001 else
2002   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2003 /* end confdefs.h.  */
2004 $5
2005 int
2006 main ()
2007 {
2008 static $2 ac_aggr;
2009 if (sizeof ac_aggr.$3)
2010 return 0;
2011   ;
2012   return 0;
2013 }
2014 _ACEOF
2015 if ac_fn_c_try_compile "$LINENO"; then :
2016   eval "$4=yes"
2017 else
2018   eval "$4=no"
2019 fi
2020 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2021 fi
2022 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2023 fi
2024 eval ac_res=\$$4
2025                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2026 $as_echo "$ac_res" >&6; }
2027   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2028
2029 } # ac_fn_c_check_member
2030
2031 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2032 # -------------------------------------------
2033 # Tests whether TYPE exists after having included INCLUDES, setting cache
2034 # variable VAR accordingly.
2035 ac_fn_c_check_type ()
2036 {
2037   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2038   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2039 $as_echo_n "checking for $2... " >&6; }
2040 if eval \${$3+:} false; then :
2041   $as_echo_n "(cached) " >&6
2042 else
2043   eval "$3=no"
2044   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2045 /* end confdefs.h.  */
2046 $4
2047 int
2048 main ()
2049 {
2050 if (sizeof ($2))
2051          return 0;
2052   ;
2053   return 0;
2054 }
2055 _ACEOF
2056 if ac_fn_c_try_compile "$LINENO"; then :
2057   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2058 /* end confdefs.h.  */
2059 $4
2060 int
2061 main ()
2062 {
2063 if (sizeof (($2)))
2064             return 0;
2065   ;
2066   return 0;
2067 }
2068 _ACEOF
2069 if ac_fn_c_try_compile "$LINENO"; then :
2070
2071 else
2072   eval "$3=yes"
2073 fi
2074 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2075 fi
2076 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2077 fi
2078 eval ac_res=\$$3
2079                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2080 $as_echo "$ac_res" >&6; }
2081   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2082
2083 } # ac_fn_c_check_type
2084
2085 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2086 # --------------------------------------------
2087 # Tries to find the compile-time value of EXPR in a program that includes
2088 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2089 # computed
2090 ac_fn_c_compute_int ()
2091 {
2092   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2093   if test "$cross_compiling" = yes; then
2094     # Depending upon the size, compute the lo and hi bounds.
2095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2096 /* end confdefs.h.  */
2097 $4
2098 int
2099 main ()
2100 {
2101 static int test_array [1 - 2 * !(($2) >= 0)];
2102 test_array [0] = 0;
2103 return test_array [0];
2104
2105   ;
2106   return 0;
2107 }
2108 _ACEOF
2109 if ac_fn_c_try_compile "$LINENO"; then :
2110   ac_lo=0 ac_mid=0
2111   while :; do
2112     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2113 /* end confdefs.h.  */
2114 $4
2115 int
2116 main ()
2117 {
2118 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2119 test_array [0] = 0;
2120 return test_array [0];
2121
2122   ;
2123   return 0;
2124 }
2125 _ACEOF
2126 if ac_fn_c_try_compile "$LINENO"; then :
2127   ac_hi=$ac_mid; break
2128 else
2129   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2130                         if test $ac_lo -le $ac_mid; then
2131                           ac_lo= ac_hi=
2132                           break
2133                         fi
2134                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2135 fi
2136 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2137   done
2138 else
2139   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2140 /* end confdefs.h.  */
2141 $4
2142 int
2143 main ()
2144 {
2145 static int test_array [1 - 2 * !(($2) < 0)];
2146 test_array [0] = 0;
2147 return test_array [0];
2148
2149   ;
2150   return 0;
2151 }
2152 _ACEOF
2153 if ac_fn_c_try_compile "$LINENO"; then :
2154   ac_hi=-1 ac_mid=-1
2155   while :; do
2156     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2157 /* end confdefs.h.  */
2158 $4
2159 int
2160 main ()
2161 {
2162 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2163 test_array [0] = 0;
2164 return test_array [0];
2165
2166   ;
2167   return 0;
2168 }
2169 _ACEOF
2170 if ac_fn_c_try_compile "$LINENO"; then :
2171   ac_lo=$ac_mid; break
2172 else
2173   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2174                         if test $ac_mid -le $ac_hi; then
2175                           ac_lo= ac_hi=
2176                           break
2177                         fi
2178                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2179 fi
2180 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2181   done
2182 else
2183   ac_lo= ac_hi=
2184 fi
2185 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2186 fi
2187 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2188 # Binary search between lo and hi bounds.
2189 while test "x$ac_lo" != "x$ac_hi"; do
2190   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2191   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2192 /* end confdefs.h.  */
2193 $4
2194 int
2195 main ()
2196 {
2197 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2198 test_array [0] = 0;
2199 return test_array [0];
2200
2201   ;
2202   return 0;
2203 }
2204 _ACEOF
2205 if ac_fn_c_try_compile "$LINENO"; then :
2206   ac_hi=$ac_mid
2207 else
2208   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2209 fi
2210 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2211 done
2212 case $ac_lo in #((
2213 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2214 '') ac_retval=1 ;;
2215 esac
2216   else
2217     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2218 /* end confdefs.h.  */
2219 $4
2220 static long int longval () { return $2; }
2221 static unsigned long int ulongval () { return $2; }
2222 #include <stdio.h>
2223 #include <stdlib.h>
2224 int
2225 main ()
2226 {
2227
2228   FILE *f = fopen ("conftest.val", "w");
2229   if (! f)
2230     return 1;
2231   if (($2) < 0)
2232     {
2233       long int i = longval ();
2234       if (i != ($2))
2235         return 1;
2236       fprintf (f, "%ld", i);
2237     }
2238   else
2239     {
2240       unsigned long int i = ulongval ();
2241       if (i != ($2))
2242         return 1;
2243       fprintf (f, "%lu", i);
2244     }
2245   /* Do not output a trailing newline, as this causes \r\n confusion
2246      on some platforms.  */
2247   return ferror (f) || fclose (f) != 0;
2248
2249   ;
2250   return 0;
2251 }
2252 _ACEOF
2253 if ac_fn_c_try_run "$LINENO"; then :
2254   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2255 else
2256   ac_retval=1
2257 fi
2258 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2259   conftest.$ac_objext conftest.beam conftest.$ac_ext
2260 rm -f conftest.val
2261
2262   fi
2263   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2264   as_fn_set_status $ac_retval
2265
2266 } # ac_fn_c_compute_int
2267
2268 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2269 # ---------------------------------------------
2270 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2271 # accordingly.
2272 ac_fn_c_check_decl ()
2273 {
2274   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2275   as_decl_name=`echo $2|sed 's/ *(.*//'`
2276   as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2277   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2278 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2279 if eval \${$3+:} false; then :
2280   $as_echo_n "(cached) " >&6
2281 else
2282   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2283 /* end confdefs.h.  */
2284 $4
2285 int
2286 main ()
2287 {
2288 #ifndef $as_decl_name
2289 #ifdef __cplusplus
2290   (void) $as_decl_use;
2291 #else
2292   (void) $as_decl_name;
2293 #endif
2294 #endif
2295
2296   ;
2297   return 0;
2298 }
2299 _ACEOF
2300 if ac_fn_c_try_compile "$LINENO"; then :
2301   eval "$3=yes"
2302 else
2303   eval "$3=no"
2304 fi
2305 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2306 fi
2307 eval ac_res=\$$3
2308                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2309 $as_echo "$ac_res" >&6; }
2310   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2311
2312 } # ac_fn_c_check_decl
2313 cat >config.log <<_ACEOF
2314 This file contains any messages produced by compilers while
2315 running configure, to aid debugging if configure makes a mistake.
2316
2317 It was created by PostgreSQL $as_me 9.4beta1, which was
2318 generated by GNU Autoconf 2.69.  Invocation command line was
2319
2320   $ $0 $@
2321
2322 _ACEOF
2323 exec 5>>config.log
2324 {
2325 cat <<_ASUNAME
2326 ## --------- ##
2327 ## Platform. ##
2328 ## --------- ##
2329
2330 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2331 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2332 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2333 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2334 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2335
2336 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2337 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2338
2339 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2340 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2341 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2342 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2343 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2344 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2345 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2346
2347 _ASUNAME
2348
2349 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2350 for as_dir in $PATH
2351 do
2352   IFS=$as_save_IFS
2353   test -z "$as_dir" && as_dir=.
2354     $as_echo "PATH: $as_dir"
2355   done
2356 IFS=$as_save_IFS
2357
2358 } >&5
2359
2360 cat >&5 <<_ACEOF
2361
2362
2363 ## ----------- ##
2364 ## Core tests. ##
2365 ## ----------- ##
2366
2367 _ACEOF
2368
2369
2370 # Keep a trace of the command line.
2371 # Strip out --no-create and --no-recursion so they do not pile up.
2372 # Strip out --silent because we don't want to record it for future runs.
2373 # Also quote any args containing shell meta-characters.
2374 # Make two passes to allow for proper duplicate-argument suppression.
2375 ac_configure_args=
2376 ac_configure_args0=
2377 ac_configure_args1=
2378 ac_must_keep_next=false
2379 for ac_pass in 1 2
2380 do
2381   for ac_arg
2382   do
2383     case $ac_arg in
2384     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2385     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2386     | -silent | --silent | --silen | --sile | --sil)
2387       continue ;;
2388     *\'*)
2389       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2390     esac
2391     case $ac_pass in
2392     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2393     2)
2394       as_fn_append ac_configure_args1 " '$ac_arg'"
2395       if test $ac_must_keep_next = true; then
2396         ac_must_keep_next=false # Got value, back to normal.
2397       else
2398         case $ac_arg in
2399           *=* | --config-cache | -C | -disable-* | --disable-* \
2400           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2401           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2402           | -with-* | --with-* | -without-* | --without-* | --x)
2403             case "$ac_configure_args0 " in
2404               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2405             esac
2406             ;;
2407           -* ) ac_must_keep_next=true ;;
2408         esac
2409       fi
2410       as_fn_append ac_configure_args " '$ac_arg'"
2411       ;;
2412     esac
2413   done
2414 done
2415 { ac_configure_args0=; unset ac_configure_args0;}
2416 { ac_configure_args1=; unset ac_configure_args1;}
2417
2418 # When interrupted or exit'd, cleanup temporary files, and complete
2419 # config.log.  We remove comments because anyway the quotes in there
2420 # would cause problems or look ugly.
2421 # WARNING: Use '\'' to represent an apostrophe within the trap.
2422 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2423 trap 'exit_status=$?
2424   # Save into config.log some information that might help in debugging.
2425   {
2426     echo
2427
2428     $as_echo "## ---------------- ##
2429 ## Cache variables. ##
2430 ## ---------------- ##"
2431     echo
2432     # The following way of writing the cache mishandles newlines in values,
2433 (
2434   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2435     eval ac_val=\$$ac_var
2436     case $ac_val in #(
2437     *${as_nl}*)
2438       case $ac_var in #(
2439       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2440 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2441       esac
2442       case $ac_var in #(
2443       _ | IFS | as_nl) ;; #(
2444       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2445       *) { eval $ac_var=; unset $ac_var;} ;;
2446       esac ;;
2447     esac
2448   done
2449   (set) 2>&1 |
2450     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2451     *${as_nl}ac_space=\ *)
2452       sed -n \
2453         "s/'\''/'\''\\\\'\'''\''/g;
2454           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2455       ;; #(
2456     *)
2457       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2458       ;;
2459     esac |
2460     sort
2461 )
2462     echo
2463
2464     $as_echo "## ----------------- ##
2465 ## Output variables. ##
2466 ## ----------------- ##"
2467     echo
2468     for ac_var in $ac_subst_vars
2469     do
2470       eval ac_val=\$$ac_var
2471       case $ac_val in
2472       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2473       esac
2474       $as_echo "$ac_var='\''$ac_val'\''"
2475     done | sort
2476     echo
2477
2478     if test -n "$ac_subst_files"; then
2479       $as_echo "## ------------------- ##
2480 ## File substitutions. ##
2481 ## ------------------- ##"
2482       echo
2483       for ac_var in $ac_subst_files
2484       do
2485         eval ac_val=\$$ac_var
2486         case $ac_val in
2487         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2488         esac
2489         $as_echo "$ac_var='\''$ac_val'\''"
2490       done | sort
2491       echo
2492     fi
2493
2494     if test -s confdefs.h; then
2495       $as_echo "## ----------- ##
2496 ## confdefs.h. ##
2497 ## ----------- ##"
2498       echo
2499       cat confdefs.h
2500       echo
2501     fi
2502     test "$ac_signal" != 0 &&
2503       $as_echo "$as_me: caught signal $ac_signal"
2504     $as_echo "$as_me: exit $exit_status"
2505   } >&5
2506   rm -f core *.core core.conftest.* &&
2507     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2508     exit $exit_status
2509 ' 0
2510 for ac_signal in 1 2 13 15; do
2511   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2512 done
2513 ac_signal=0
2514
2515 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2516 rm -f -r conftest* confdefs.h
2517
2518 $as_echo "/* confdefs.h */" > confdefs.h
2519
2520 # Predefined preprocessor variables.
2521
2522 cat >>confdefs.h <<_ACEOF
2523 #define PACKAGE_NAME "$PACKAGE_NAME"
2524 _ACEOF
2525
2526 cat >>confdefs.h <<_ACEOF
2527 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2528 _ACEOF
2529
2530 cat >>confdefs.h <<_ACEOF
2531 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2532 _ACEOF
2533
2534 cat >>confdefs.h <<_ACEOF
2535 #define PACKAGE_STRING "$PACKAGE_STRING"
2536 _ACEOF
2537
2538 cat >>confdefs.h <<_ACEOF
2539 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2540 _ACEOF
2541
2542 cat >>confdefs.h <<_ACEOF
2543 #define PACKAGE_URL "$PACKAGE_URL"
2544 _ACEOF
2545
2546
2547 # Let the site file select an alternate cache file if it wants to.
2548 # Prefer an explicitly selected file to automatically selected ones.
2549 ac_site_file1=NONE
2550 ac_site_file2=NONE
2551 if test -n "$CONFIG_SITE"; then
2552   # We do not want a PATH search for config.site.
2553   case $CONFIG_SITE in #((
2554     -*)  ac_site_file1=./$CONFIG_SITE;;
2555     */*) ac_site_file1=$CONFIG_SITE;;
2556     *)   ac_site_file1=./$CONFIG_SITE;;
2557   esac
2558 elif test "x$prefix" != xNONE; then
2559   ac_site_file1=$prefix/share/config.site
2560   ac_site_file2=$prefix/etc/config.site
2561 else
2562   ac_site_file1=$ac_default_prefix/share/config.site
2563   ac_site_file2=$ac_default_prefix/etc/config.site
2564 fi
2565 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2566 do
2567   test "x$ac_site_file" = xNONE && continue
2568   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2569     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2570 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2571     sed 's/^/| /' "$ac_site_file" >&5
2572     . "$ac_site_file" \
2573       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2574 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2575 as_fn_error $? "failed to load site script $ac_site_file
2576 See \`config.log' for more details" "$LINENO" 5; }
2577   fi
2578 done
2579
2580 if test -r "$cache_file"; then
2581   # Some versions of bash will fail to source /dev/null (special files
2582   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2583   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2584     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2585 $as_echo "$as_me: loading cache $cache_file" >&6;}
2586     case $cache_file in
2587       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2588       *)                      . "./$cache_file";;
2589     esac
2590   fi
2591 else
2592   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2593 $as_echo "$as_me: creating cache $cache_file" >&6;}
2594   >$cache_file
2595 fi
2596
2597 # Check that the precious variables saved in the cache have kept the same
2598 # value.
2599 ac_cache_corrupted=false
2600 for ac_var in $ac_precious_vars; do
2601   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2602   eval ac_new_set=\$ac_env_${ac_var}_set
2603   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2604   eval ac_new_val=\$ac_env_${ac_var}_value
2605   case $ac_old_set,$ac_new_set in
2606     set,)
2607       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2608 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2609       ac_cache_corrupted=: ;;
2610     ,set)
2611       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2612 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2613       ac_cache_corrupted=: ;;
2614     ,);;
2615     *)
2616       if test "x$ac_old_val" != "x$ac_new_val"; then
2617         # differences in whitespace do not lead to failure.
2618         ac_old_val_w=`echo x $ac_old_val`
2619         ac_new_val_w=`echo x $ac_new_val`
2620         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2621           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2622 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2623           ac_cache_corrupted=:
2624         else
2625           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2626 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2627           eval $ac_var=\$ac_old_val
2628         fi
2629         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2630 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2631         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2632 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2633       fi;;
2634   esac
2635   # Pass precious variables to config.status.
2636   if test "$ac_new_set" = set; then
2637     case $ac_new_val in
2638     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2639     *) ac_arg=$ac_var=$ac_new_val ;;
2640     esac
2641     case " $ac_configure_args " in
2642       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2643       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2644     esac
2645   fi
2646 done
2647 if $ac_cache_corrupted; then
2648   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2649 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2650   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2651 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2652   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2653 fi
2654 ## -------------------- ##
2655 ## Main body of script. ##
2656 ## -------------------- ##
2657
2658 ac_ext=c
2659 ac_cpp='$CPP $CPPFLAGS'
2660 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2661 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2662 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2663
2664
2665
2666
2667
2668
2669 ac_aux_dir=
2670 for ac_dir in config "$srcdir"/config; do
2671   if test -f "$ac_dir/install-sh"; then
2672     ac_aux_dir=$ac_dir
2673     ac_install_sh="$ac_aux_dir/install-sh -c"
2674     break
2675   elif test -f "$ac_dir/install.sh"; then
2676     ac_aux_dir=$ac_dir
2677     ac_install_sh="$ac_aux_dir/install.sh -c"
2678     break
2679   elif test -f "$ac_dir/shtool"; then
2680     ac_aux_dir=$ac_dir
2681     ac_install_sh="$ac_aux_dir/shtool install -c"
2682     break
2683   fi
2684 done
2685 if test -z "$ac_aux_dir"; then
2686   as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5
2687 fi
2688
2689 # These three variables are undocumented and unsupported,
2690 # and are intended to be withdrawn in a future Autoconf release.
2691 # They can cause serious problems if a builder's source tree is in a directory
2692 # whose full name contains unusual characters.
2693 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2694 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2695 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2696
2697
2698
2699 configure_args=$ac_configure_args
2700
2701
2702 PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\.[0-9][0-9]*\)'`
2703
2704
2705 cat >>confdefs.h <<_ACEOF
2706 #define PG_MAJORVERSION "$PG_MAJORVERSION"
2707 _ACEOF
2708
2709
2710
2711
2712
2713 # Check whether --with-extra-version was given.
2714 if test "${with_extra_version+set}" = set; then :
2715   withval=$with_extra_version;
2716   case $withval in
2717     yes)
2718       as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2719       ;;
2720     no)
2721       as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2722       ;;
2723     *)
2724       PG_VERSION="$PACKAGE_VERSION$withval"
2725       ;;
2726   esac
2727
2728 else
2729   PG_VERSION="$PACKAGE_VERSION"
2730 fi
2731
2732
2733
2734 cat >>confdefs.h <<_ACEOF
2735 #define PG_VERSION "$PG_VERSION"
2736 _ACEOF
2737
2738
2739 # Make sure we can run config.sub.
2740 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2741   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2742
2743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2744 $as_echo_n "checking build system type... " >&6; }
2745 if ${ac_cv_build+:} false; then :
2746   $as_echo_n "(cached) " >&6
2747 else
2748   ac_build_alias=$build_alias
2749 test "x$ac_build_alias" = x &&
2750   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2751 test "x$ac_build_alias" = x &&
2752   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2753 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2754   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2755
2756 fi
2757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2758 $as_echo "$ac_cv_build" >&6; }
2759 case $ac_cv_build in
2760 *-*-*) ;;
2761 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2762 esac
2763 build=$ac_cv_build
2764 ac_save_IFS=$IFS; IFS='-'
2765 set x $ac_cv_build
2766 shift
2767 build_cpu=$1
2768 build_vendor=$2
2769 shift; shift
2770 # Remember, the first character of IFS is used to create $*,
2771 # except with old shells:
2772 build_os=$*
2773 IFS=$ac_save_IFS
2774 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2775
2776
2777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2778 $as_echo_n "checking host system type... " >&6; }
2779 if ${ac_cv_host+:} false; then :
2780   $as_echo_n "(cached) " >&6
2781 else
2782   if test "x$host_alias" = x; then
2783   ac_cv_host=$ac_cv_build
2784 else
2785   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2786     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2787 fi
2788
2789 fi
2790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2791 $as_echo "$ac_cv_host" >&6; }
2792 case $ac_cv_host in
2793 *-*-*) ;;
2794 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2795 esac
2796 host=$ac_cv_host
2797 ac_save_IFS=$IFS; IFS='-'
2798 set x $ac_cv_host
2799 shift
2800 host_cpu=$1
2801 host_vendor=$2
2802 shift; shift
2803 # Remember, the first character of IFS is used to create $*,
2804 # except with old shells:
2805 host_os=$*
2806 IFS=$ac_save_IFS
2807 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2808
2809
2810
2811 template=
2812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which template to use" >&5
2813 $as_echo_n "checking which template to use... " >&6; }
2814
2815
2816
2817
2818 # Check whether --with-template was given.
2819 if test "${with_template+set}" = set; then :
2820   withval=$with_template;
2821   case $withval in
2822     yes)
2823       as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2824       ;;
2825     no)
2826       as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2827       ;;
2828     *)
2829
2830   case $withval in
2831     list)   echo; ls "$srcdir/src/template"; exit;;
2832     *)      if test -f "$srcdir/src/template/$with_template" ; then
2833               template=$withval
2834             else
2835               as_fn_error $? "'$withval' is not a valid template name. Use 'list' for a list." "$LINENO" 5
2836             fi;;
2837   esac
2838
2839       ;;
2840   esac
2841
2842 else
2843
2844 # --with-template not given
2845
2846 case $host_os in
2847      aix*) template=aix ;;
2848   cygwin*) template=cygwin ;;
2849   darwin*) template=darwin ;;
2850 dragonfly*) template=netbsd ;;
2851  freebsd*) template=freebsd ;;
2852     hpux*) template=hpux ;;
2853  linux*|gnu*|k*bsd*-gnu)
2854            template=linux ;;
2855    mingw*) template=win32 ;;
2856   netbsd*) template=netbsd ;;
2857  openbsd*) template=openbsd ;;
2858      osf*) template=osf ;;
2859      sco*) template=sco ;;
2860  solaris*) template=solaris ;;
2861    sysv5*) template=unixware ;;
2862 esac
2863
2864   if test x"$template" = x"" ; then
2865     as_fn_error $? "
2866 *******************************************************************
2867 PostgreSQL has apparently not been ported to your platform yet.
2868 To try a manual configuration, look into the src/template directory
2869 for a similar platform and use the '--with-template=' option.
2870
2871 Please also contact <pgsql-bugs@postgresql.org> to see about
2872 rectifying this.  Include the above 'checking host system type...'
2873 line.
2874 *******************************************************************
2875 " "$LINENO" 5
2876   fi
2877
2878
2879 fi
2880
2881
2882
2883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $template" >&5
2884 $as_echo "$template" >&6; }
2885
2886 PORTNAME=$template
2887
2888
2889 # Initialize default assumption that we do not need separate assembly code
2890 # for TAS (test-and-set).  This can be overridden by the template file
2891 # when it's executed.
2892 need_tas=no
2893 tas_file=dummy.s
2894
2895
2896
2897 ##
2898 ## Command line options
2899 ##
2900
2901 #
2902 # Add non-standard directories to the include path
2903 #
2904
2905
2906
2907 # Check whether --with-includes was given.
2908 if test "${with_includes+set}" = set; then :
2909   withval=$with_includes;
2910   case $withval in
2911     yes)
2912       as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
2913       ;;
2914     no)
2915       as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
2916       ;;
2917     *)
2918
2919       ;;
2920   esac
2921
2922 fi
2923
2924
2925
2926
2927 #
2928 # Add non-standard directories to the library search path
2929 #
2930
2931
2932
2933 # Check whether --with-libraries was given.
2934 if test "${with_libraries+set}" = set; then :
2935   withval=$with_libraries;
2936   case $withval in
2937     yes)
2938       as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
2939       ;;
2940     no)
2941       as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
2942       ;;
2943     *)
2944       LIBRARY_DIRS=$withval
2945       ;;
2946   esac
2947
2948 fi
2949
2950
2951
2952
2953
2954
2955 # Check whether --with-libs was given.
2956 if test "${with_libs+set}" = set; then :
2957   withval=$with_libs;
2958   case $withval in
2959     yes)
2960       as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
2961       ;;
2962     no)
2963       as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
2964       ;;
2965     *)
2966       LIBRARY_DIRS=$withval
2967       ;;
2968   esac
2969
2970 fi
2971
2972
2973
2974
2975 #
2976 # 64-bit integer date/time storage: enabled by default.
2977 #
2978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with 64-bit integer date/time support" >&5
2979 $as_echo_n "checking whether to build with 64-bit integer date/time support... " >&6; }
2980
2981
2982 # Check whether --enable-integer-datetimes was given.
2983 if test "${enable_integer_datetimes+set}" = set; then :
2984   enableval=$enable_integer_datetimes;
2985   case $enableval in
2986     yes)
2987
2988 $as_echo "#define USE_INTEGER_DATETIMES 1" >>confdefs.h
2989
2990       ;;
2991     no)
2992       :
2993       ;;
2994     *)
2995       as_fn_error $? "no argument expected for --enable-integer-datetimes option" "$LINENO" 5
2996       ;;
2997   esac
2998
2999 else
3000   enable_integer_datetimes=yes
3001
3002 $as_echo "#define USE_INTEGER_DATETIMES 1" >>confdefs.h
3003
3004 fi
3005
3006
3007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_integer_datetimes" >&5
3008 $as_echo "$enable_integer_datetimes" >&6; }
3009
3010
3011 #
3012 # NLS
3013 #
3014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is wanted" >&5
3015 $as_echo_n "checking whether NLS is wanted... " >&6; }
3016
3017
3018 # Check whether --enable-nls was given.
3019 if test "${enable_nls+set}" = set; then :
3020   enableval=$enable_nls;
3021   case $enableval in
3022     yes)
3023       :
3024       ;;
3025     no)
3026       :
3027       ;;
3028     *)
3029       enable_nls=yes
3030 WANTED_LANGUAGES=$enableval
3031       ;;
3032   esac
3033
3034 else
3035   enable_nls=no
3036 fi
3037
3038
3039
3040 if test "$enable_nls" = yes; then
3041
3042 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
3043
3044 fi
3045
3046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_nls" >&5
3047 $as_echo "$enable_nls" >&6; }
3048
3049
3050
3051 #
3052 # Default port number (--with-pgport), default 5432
3053 #
3054 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default port number" >&5
3055 $as_echo_n "checking for default port number... " >&6; }
3056
3057
3058
3059 # Check whether --with-pgport was given.
3060 if test "${with_pgport+set}" = set; then :
3061   withval=$with_pgport;
3062   case $withval in
3063     yes)
3064       as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3065       ;;
3066     no)
3067       as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3068       ;;
3069     *)
3070       default_port=$withval
3071       ;;
3072   esac
3073
3074 else
3075   default_port=5432
3076 fi
3077
3078
3079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_port" >&5
3080 $as_echo "$default_port" >&6; }
3081 # Need both of these because some places want an integer and some a string
3082
3083 cat >>confdefs.h <<_ACEOF
3084 #define DEF_PGPORT ${default_port}
3085 _ACEOF
3086
3087
3088 cat >>confdefs.h <<_ACEOF
3089 #define DEF_PGPORT_STR "${default_port}"
3090 _ACEOF
3091
3092
3093
3094 #
3095 # '-rpath'-like feature can be disabled
3096 #
3097
3098
3099 # Check whether --enable-rpath was given.
3100 if test "${enable_rpath+set}" = set; then :
3101   enableval=$enable_rpath;
3102   case $enableval in
3103     yes)
3104       :
3105       ;;
3106     no)
3107       :
3108       ;;
3109     *)
3110       as_fn_error $? "no argument expected for --enable-rpath option" "$LINENO" 5
3111       ;;
3112   esac
3113
3114 else
3115   enable_rpath=yes
3116
3117 fi
3118
3119
3120
3121
3122 #
3123 # Spinlocks
3124 #
3125
3126
3127 # Check whether --enable-spinlocks was given.
3128 if test "${enable_spinlocks+set}" = set; then :
3129   enableval=$enable_spinlocks;
3130   case $enableval in
3131     yes)
3132       :
3133       ;;
3134     no)
3135       :
3136       ;;
3137     *)
3138       as_fn_error $? "no argument expected for --enable-spinlocks option" "$LINENO" 5
3139       ;;
3140   esac
3141
3142 else
3143   enable_spinlocks=yes
3144
3145 fi
3146
3147
3148
3149 #
3150 # --enable-debug adds -g to compiler flags
3151 #
3152
3153
3154 # Check whether --enable-debug was given.
3155 if test "${enable_debug+set}" = set; then :
3156   enableval=$enable_debug;
3157   case $enableval in
3158     yes)
3159       :
3160       ;;
3161     no)
3162       :
3163       ;;
3164     *)
3165       as_fn_error $? "no argument expected for --enable-debug option" "$LINENO" 5
3166       ;;
3167   esac
3168
3169 else
3170   enable_debug=no
3171
3172 fi
3173
3174
3175
3176
3177 #
3178 # --enable-profiling enables gcc profiling
3179 #
3180
3181
3182 # Check whether --enable-profiling was given.
3183 if test "${enable_profiling+set}" = set; then :
3184   enableval=$enable_profiling;
3185   case $enableval in
3186     yes)
3187       :
3188       ;;
3189     no)
3190       :
3191       ;;
3192     *)
3193       as_fn_error $? "no argument expected for --enable-profiling option" "$LINENO" 5
3194       ;;
3195   esac
3196
3197 else
3198   enable_profiling=no
3199
3200 fi
3201
3202
3203
3204 #
3205 # --enable-coverage enables generation of code coverage metrics with gcov
3206 #
3207
3208
3209 # Check whether --enable-coverage was given.
3210 if test "${enable_coverage+set}" = set; then :
3211   enableval=$enable_coverage;
3212   case $enableval in
3213     yes)
3214       for ac_prog in gcov
3215 do
3216   # Extract the first word of "$ac_prog", so it can be a program name with args.
3217 set dummy $ac_prog; ac_word=$2
3218 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3219 $as_echo_n "checking for $ac_word... " >&6; }
3220 if ${ac_cv_prog_GCOV+:} false; then :
3221   $as_echo_n "(cached) " >&6
3222 else
3223   if test -n "$GCOV"; then
3224   ac_cv_prog_GCOV="$GCOV" # Let the user override the test.
3225 else
3226 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3227 for as_dir in $PATH
3228 do
3229   IFS=$as_save_IFS
3230   test -z "$as_dir" && as_dir=.
3231     for ac_exec_ext in '' $ac_executable_extensions; do
3232   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3233     ac_cv_prog_GCOV="$ac_prog"
3234     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3235     break 2
3236   fi
3237 done
3238   done
3239 IFS=$as_save_IFS
3240
3241 fi
3242 fi
3243 GCOV=$ac_cv_prog_GCOV
3244 if test -n "$GCOV"; then
3245   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3246 $as_echo "$GCOV" >&6; }
3247 else
3248   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3249 $as_echo "no" >&6; }
3250 fi
3251
3252
3253   test -n "$GCOV" && break
3254 done
3255
3256 if test -z "$GCOV"; then
3257   as_fn_error $? "gcov not found" "$LINENO" 5
3258 fi
3259 for ac_prog in lcov
3260 do
3261   # Extract the first word of "$ac_prog", so it can be a program name with args.
3262 set dummy $ac_prog; ac_word=$2
3263 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3264 $as_echo_n "checking for $ac_word... " >&6; }
3265 if ${ac_cv_prog_LCOV+:} false; then :
3266   $as_echo_n "(cached) " >&6
3267 else
3268   if test -n "$LCOV"; then
3269   ac_cv_prog_LCOV="$LCOV" # Let the user override the test.
3270 else
3271 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3272 for as_dir in $PATH
3273 do
3274   IFS=$as_save_IFS
3275   test -z "$as_dir" && as_dir=.
3276     for ac_exec_ext in '' $ac_executable_extensions; do
3277   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3278     ac_cv_prog_LCOV="$ac_prog"
3279     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3280     break 2
3281   fi
3282 done
3283   done
3284 IFS=$as_save_IFS
3285
3286 fi
3287 fi
3288 LCOV=$ac_cv_prog_LCOV
3289 if test -n "$LCOV"; then
3290   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3291 $as_echo "$LCOV" >&6; }
3292 else
3293   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3294 $as_echo "no" >&6; }
3295 fi
3296
3297
3298   test -n "$LCOV" && break
3299 done
3300
3301 if test -z "$LCOV"; then
3302   as_fn_error $? "lcov not found" "$LINENO" 5
3303 fi
3304 for ac_prog in genhtml
3305 do
3306   # Extract the first word of "$ac_prog", so it can be a program name with args.
3307 set dummy $ac_prog; ac_word=$2
3308 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3309 $as_echo_n "checking for $ac_word... " >&6; }
3310 if ${ac_cv_prog_GENHTML+:} false; then :
3311   $as_echo_n "(cached) " >&6
3312 else
3313   if test -n "$GENHTML"; then
3314   ac_cv_prog_GENHTML="$GENHTML" # Let the user override the test.
3315 else
3316 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3317 for as_dir in $PATH
3318 do
3319   IFS=$as_save_IFS
3320   test -z "$as_dir" && as_dir=.
3321     for ac_exec_ext in '' $ac_executable_extensions; do
3322   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3323     ac_cv_prog_GENHTML="$ac_prog"
3324     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3325     break 2
3326   fi
3327 done
3328   done
3329 IFS=$as_save_IFS
3330
3331 fi
3332 fi
3333 GENHTML=$ac_cv_prog_GENHTML
3334 if test -n "$GENHTML"; then
3335   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3336 $as_echo "$GENHTML" >&6; }
3337 else
3338   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3339 $as_echo "no" >&6; }
3340 fi
3341
3342
3343   test -n "$GENHTML" && break
3344 done
3345
3346 if test -z "$GENHTML"; then
3347   as_fn_error $? "genhtml not found" "$LINENO" 5
3348 fi
3349       ;;
3350     no)
3351       :
3352       ;;
3353     *)
3354       as_fn_error $? "no argument expected for --enable-coverage option" "$LINENO" 5
3355       ;;
3356   esac
3357
3358 else
3359   enable_coverage=no
3360
3361 fi
3362
3363
3364
3365
3366 #
3367 # DTrace
3368 #
3369
3370
3371 # Check whether --enable-dtrace was given.
3372 if test "${enable_dtrace+set}" = set; then :
3373   enableval=$enable_dtrace;
3374   case $enableval in
3375     yes)
3376       for ac_prog in dtrace
3377 do
3378   # Extract the first word of "$ac_prog", so it can be a program name with args.
3379 set dummy $ac_prog; ac_word=$2
3380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3381 $as_echo_n "checking for $ac_word... " >&6; }
3382 if ${ac_cv_prog_DTRACE+:} false; then :
3383   $as_echo_n "(cached) " >&6
3384 else
3385   if test -n "$DTRACE"; then
3386   ac_cv_prog_DTRACE="$DTRACE" # Let the user override the test.
3387 else
3388 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3389 for as_dir in $PATH
3390 do
3391   IFS=$as_save_IFS
3392   test -z "$as_dir" && as_dir=.
3393     for ac_exec_ext in '' $ac_executable_extensions; do
3394   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3395     ac_cv_prog_DTRACE="$ac_prog"
3396     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3397     break 2
3398   fi
3399 done
3400   done
3401 IFS=$as_save_IFS
3402
3403 fi
3404 fi
3405 DTRACE=$ac_cv_prog_DTRACE
3406 if test -n "$DTRACE"; then
3407   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3408 $as_echo "$DTRACE" >&6; }
3409 else
3410   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3411 $as_echo "no" >&6; }
3412 fi
3413
3414
3415   test -n "$DTRACE" && break
3416 done
3417
3418 if test -z "$DTRACE"; then
3419   as_fn_error $? "dtrace not found" "$LINENO" 5
3420 fi
3421
3422       ;;
3423     no)
3424       :
3425       ;;
3426     *)
3427       as_fn_error $? "no argument expected for --enable-dtrace option" "$LINENO" 5
3428       ;;
3429   esac
3430
3431 else
3432   enable_dtrace=no
3433
3434 fi
3435
3436
3437
3438
3439 #
3440 # Block size
3441 #
3442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for block size" >&5
3443 $as_echo_n "checking for block size... " >&6; }
3444
3445
3446
3447 # Check whether --with-blocksize was given.
3448 if test "${with_blocksize+set}" = set; then :
3449   withval=$with_blocksize;
3450   case $withval in
3451     yes)
3452       as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3453       ;;
3454     no)
3455       as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3456       ;;
3457     *)
3458       blocksize=$withval
3459       ;;
3460   esac
3461
3462 else
3463   blocksize=8
3464 fi
3465
3466
3467 case ${blocksize} in
3468   1) BLCKSZ=1024;;
3469   2) BLCKSZ=2048;;
3470   4) BLCKSZ=4096;;
3471   8) BLCKSZ=8192;;
3472  16) BLCKSZ=16384;;
3473  32) BLCKSZ=32768;;
3474   *) as_fn_error $? "Invalid block size. Allowed values are 1,2,4,8,16,32." "$LINENO" 5
3475 esac
3476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${blocksize}kB" >&5
3477 $as_echo "${blocksize}kB" >&6; }
3478
3479
3480 cat >>confdefs.h <<_ACEOF
3481 #define BLCKSZ ${BLCKSZ}
3482 _ACEOF
3483
3484
3485 #
3486 # Relation segment size
3487 #
3488 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for segment size" >&5
3489 $as_echo_n "checking for segment size... " >&6; }
3490
3491
3492
3493 # Check whether --with-segsize was given.
3494 if test "${with_segsize+set}" = set; then :
3495   withval=$with_segsize;
3496   case $withval in
3497     yes)
3498       as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3499       ;;
3500     no)
3501       as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3502       ;;
3503     *)
3504       segsize=$withval
3505       ;;
3506   esac
3507
3508 else
3509   segsize=1
3510 fi
3511
3512
3513 # this expression is set up to avoid unnecessary integer overflow
3514 # blocksize is already guaranteed to be a factor of 1024
3515 RELSEG_SIZE=`expr '(' 1024 / ${blocksize} ')' '*' ${segsize} '*' 1024`
3516 test $? -eq 0 || exit 1
3517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${segsize}GB" >&5
3518 $as_echo "${segsize}GB" >&6; }
3519
3520
3521 cat >>confdefs.h <<_ACEOF
3522 #define RELSEG_SIZE ${RELSEG_SIZE}
3523 _ACEOF
3524
3525
3526 #
3527 # WAL block size
3528 #
3529 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAL block size" >&5
3530 $as_echo_n "checking for WAL block size... " >&6; }
3531
3532
3533
3534 # Check whether --with-wal-blocksize was given.
3535 if test "${with_wal_blocksize+set}" = set; then :
3536   withval=$with_wal_blocksize;
3537   case $withval in
3538     yes)
3539       as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3540       ;;
3541     no)
3542       as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3543       ;;
3544     *)
3545       wal_blocksize=$withval
3546       ;;
3547   esac
3548
3549 else
3550   wal_blocksize=8
3551 fi
3552
3553
3554 case ${wal_blocksize} in
3555   1) XLOG_BLCKSZ=1024;;
3556   2) XLOG_BLCKSZ=2048;;
3557   4) XLOG_BLCKSZ=4096;;
3558   8) XLOG_BLCKSZ=8192;;
3559  16) XLOG_BLCKSZ=16384;;
3560  32) XLOG_BLCKSZ=32768;;
3561  64) XLOG_BLCKSZ=65536;;
3562   *) as_fn_error $? "Invalid WAL block size. Allowed values are 1,2,4,8,16,32,64." "$LINENO" 5
3563 esac
3564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${wal_blocksize}kB" >&5
3565 $as_echo "${wal_blocksize}kB" >&6; }
3566
3567
3568 cat >>confdefs.h <<_ACEOF
3569 #define XLOG_BLCKSZ ${XLOG_BLCKSZ}
3570 _ACEOF
3571
3572
3573 #
3574 # WAL segment size
3575 #
3576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAL segment size" >&5
3577 $as_echo_n "checking for WAL segment size... " >&6; }
3578
3579
3580
3581 # Check whether --with-wal-segsize was given.
3582 if test "${with_wal_segsize+set}" = set; then :
3583   withval=$with_wal_segsize;
3584   case $withval in
3585     yes)
3586       as_fn_error $? "argument required for --with-wal-segsize option" "$LINENO" 5
3587       ;;
3588     no)
3589       as_fn_error $? "argument required for --with-wal-segsize option" "$LINENO" 5
3590       ;;
3591     *)
3592       wal_segsize=$withval
3593       ;;
3594   esac
3595
3596 else
3597   wal_segsize=16
3598 fi
3599
3600
3601 case ${wal_segsize} in
3602   1) ;;
3603   2) ;;
3604   4) ;;
3605   8) ;;
3606  16) ;;
3607  32) ;;
3608  64) ;;
3609   *) as_fn_error $? "Invalid WAL segment size. Allowed values are 1,2,4,8,16,32,64." "$LINENO" 5
3610 esac
3611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${wal_segsize}MB" >&5
3612 $as_echo "${wal_segsize}MB" >&6; }
3613
3614
3615 cat >>confdefs.h <<_ACEOF
3616 #define XLOG_SEG_SIZE (${wal_segsize} * 1024 * 1024)
3617 _ACEOF
3618
3619
3620 #
3621 # C compiler
3622 #
3623
3624 # For historical reasons you can also use --with-CC to specify the C compiler
3625 # to use, although the standard way to do this is to set the CC environment
3626 # variable.
3627
3628
3629
3630 # Check whether --with-CC was given.
3631 if test "${with_CC+set}" = set; then :
3632   withval=$with_CC;
3633   case $withval in
3634     yes)
3635       as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3636       ;;
3637     no)
3638       as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3639       ;;
3640     *)
3641       CC=$with_CC
3642       ;;
3643   esac
3644
3645 fi
3646
3647
3648
3649 case $template in
3650   aix) pgac_cc_list="gcc xlc";;
3651     *) pgac_cc_list="gcc cc";;
3652 esac
3653
3654 ac_ext=c
3655 ac_cpp='$CPP $CPPFLAGS'
3656 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3657 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3658 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3659 if test -n "$ac_tool_prefix"; then
3660   for ac_prog in $pgac_cc_list
3661   do
3662     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3663 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3665 $as_echo_n "checking for $ac_word... " >&6; }
3666 if ${ac_cv_prog_CC+:} false; then :
3667   $as_echo_n "(cached) " >&6
3668 else
3669   if test -n "$CC"; then
3670   ac_cv_prog_CC="$CC" # Let the user override the test.
3671 else
3672 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3673 for as_dir in $PATH
3674 do
3675   IFS=$as_save_IFS
3676   test -z "$as_dir" && as_dir=.
3677     for ac_exec_ext in '' $ac_executable_extensions; do
3678   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3679     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3680     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3681     break 2
3682   fi
3683 done
3684   done
3685 IFS=$as_save_IFS
3686
3687 fi
3688 fi
3689 CC=$ac_cv_prog_CC
3690 if test -n "$CC"; then
3691   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3692 $as_echo "$CC" >&6; }
3693 else
3694   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3695 $as_echo "no" >&6; }
3696 fi
3697
3698
3699     test -n "$CC" && break
3700   done
3701 fi
3702 if test -z "$CC"; then
3703   ac_ct_CC=$CC
3704   for ac_prog in $pgac_cc_list
3705 do
3706   # Extract the first word of "$ac_prog", so it can be a program name with args.
3707 set dummy $ac_prog; ac_word=$2
3708 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3709 $as_echo_n "checking for $ac_word... " >&6; }
3710 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3711   $as_echo_n "(cached) " >&6
3712 else
3713   if test -n "$ac_ct_CC"; then
3714   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3715 else
3716 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3717 for as_dir in $PATH
3718 do
3719   IFS=$as_save_IFS
3720   test -z "$as_dir" && as_dir=.
3721     for ac_exec_ext in '' $ac_executable_extensions; do
3722   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3723     ac_cv_prog_ac_ct_CC="$ac_prog"
3724     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3725     break 2
3726   fi
3727 done
3728   done
3729 IFS=$as_save_IFS
3730
3731 fi
3732 fi
3733 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3734 if test -n "$ac_ct_CC"; then
3735   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3736 $as_echo "$ac_ct_CC" >&6; }
3737 else
3738   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3739 $as_echo "no" >&6; }
3740 fi
3741
3742
3743   test -n "$ac_ct_CC" && break
3744 done
3745
3746   if test "x$ac_ct_CC" = x; then
3747     CC=""
3748   else
3749     case $cross_compiling:$ac_tool_warned in
3750 yes:)
3751 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3752 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3753 ac_tool_warned=yes ;;
3754 esac
3755     CC=$ac_ct_CC
3756   fi
3757 fi
3758
3759
3760 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3761 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3762 as_fn_error $? "no acceptable C compiler found in \$PATH
3763 See \`config.log' for more details" "$LINENO" 5; }
3764
3765 # Provide some information about the compiler.
3766 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3767 set X $ac_compile
3768 ac_compiler=$2
3769 for ac_option in --version -v -V -qversion; do
3770   { { ac_try="$ac_compiler $ac_option >&5"
3771 case "(($ac_try" in
3772   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3773   *) ac_try_echo=$ac_try;;
3774 esac
3775 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3776 $as_echo "$ac_try_echo"; } >&5
3777   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3778   ac_status=$?
3779   if test -s conftest.err; then
3780     sed '10a\
3781 ... rest of stderr output deleted ...
3782          10q' conftest.err >conftest.er1
3783     cat conftest.er1 >&5
3784   fi
3785   rm -f conftest.er1 conftest.err
3786   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3787   test $ac_status = 0; }
3788 done
3789
3790 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3791 /* end confdefs.h.  */
3792
3793 int
3794 main ()
3795 {
3796
3797   ;
3798   return 0;
3799 }
3800 _ACEOF
3801 ac_clean_files_save=$ac_clean_files
3802 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3803 # Try to create an executable without -o first, disregard a.out.
3804 # It will help us diagnose broken compilers, and finding out an intuition
3805 # of exeext.
3806 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3807 $as_echo_n "checking whether the C compiler works... " >&6; }
3808 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3809
3810 # The possible output files:
3811 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3812
3813 ac_rmfiles=
3814 for ac_file in $ac_files
3815 do
3816   case $ac_file in
3817     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3818     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3819   esac
3820 done
3821 rm -f $ac_rmfiles
3822
3823 if { { ac_try="$ac_link_default"
3824 case "(($ac_try" in
3825   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3826   *) ac_try_echo=$ac_try;;
3827 esac
3828 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3829 $as_echo "$ac_try_echo"; } >&5
3830   (eval "$ac_link_default") 2>&5
3831   ac_status=$?
3832   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3833   test $ac_status = 0; }; then :
3834   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3835 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3836 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
3837 # so that the user can short-circuit this test for compilers unknown to
3838 # Autoconf.
3839 for ac_file in $ac_files ''
3840 do
3841   test -f "$ac_file" || continue
3842   case $ac_file in
3843     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3844         ;;
3845     [ab].out )
3846         # We found the default executable, but exeext='' is most
3847         # certainly right.
3848         break;;
3849     *.* )
3850         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3851         then :; else
3852            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3853         fi
3854         # We set ac_cv_exeext here because the later test for it is not
3855         # safe: cross compilers may not add the suffix if given an `-o'
3856         # argument, so we may need to know it at that point already.
3857         # Even if this section looks crufty: it has the advantage of
3858         # actually working.
3859         break;;
3860     * )
3861         break;;
3862   esac
3863 done
3864 test "$ac_cv_exeext" = no && ac_cv_exeext=
3865
3866 else
3867   ac_file=''
3868 fi
3869 if test -z "$ac_file"; then :
3870   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3871 $as_echo "no" >&6; }
3872 $as_echo "$as_me: failed program was:" >&5
3873 sed 's/^/| /' conftest.$ac_ext >&5
3874
3875 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3876 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3877 as_fn_error 77 "C compiler cannot create executables
3878 See \`config.log' for more details" "$LINENO" 5; }
3879 else
3880   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3881 $as_echo "yes" >&6; }
3882 fi
3883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3884 $as_echo_n "checking for C compiler default output file name... " >&6; }
3885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3886 $as_echo "$ac_file" >&6; }
3887 ac_exeext=$ac_cv_exeext
3888
3889 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3890 ac_clean_files=$ac_clean_files_save
3891 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3892 $as_echo_n "checking for suffix of executables... " >&6; }
3893 if { { ac_try="$ac_link"
3894 case "(($ac_try" in
3895   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3896   *) ac_try_echo=$ac_try;;
3897 esac
3898 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3899 $as_echo "$ac_try_echo"; } >&5
3900   (eval "$ac_link") 2>&5
3901   ac_status=$?
3902   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3903   test $ac_status = 0; }; then :
3904   # If both `conftest.exe' and `conftest' are `present' (well, observable)
3905 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3906 # work properly (i.e., refer to `conftest.exe'), while it won't with
3907 # `rm'.
3908 for ac_file in conftest.exe conftest conftest.*; do
3909   test -f "$ac_file" || continue
3910   case $ac_file in
3911     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3912     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3913           break;;
3914     * ) break;;
3915   esac
3916 done
3917 else
3918   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3919 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3920 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3921 See \`config.log' for more details" "$LINENO" 5; }
3922 fi
3923 rm -f conftest conftest$ac_cv_exeext
3924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3925 $as_echo "$ac_cv_exeext" >&6; }
3926
3927 rm -f conftest.$ac_ext
3928 EXEEXT=$ac_cv_exeext
3929 ac_exeext=$EXEEXT
3930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3931 /* end confdefs.h.  */
3932 #include <stdio.h>
3933 int
3934 main ()
3935 {
3936 FILE *f = fopen ("conftest.out", "w");
3937  return ferror (f) || fclose (f) != 0;
3938
3939   ;
3940   return 0;
3941 }
3942 _ACEOF
3943 ac_clean_files="$ac_clean_files conftest.out"
3944 # Check that the compiler produces executables we can run.  If not, either
3945 # the compiler is broken, or we cross compile.
3946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3947 $as_echo_n "checking whether we are cross compiling... " >&6; }
3948 if test "$cross_compiling" != yes; then
3949   { { ac_try="$ac_link"
3950 case "(($ac_try" in
3951   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3952   *) ac_try_echo=$ac_try;;
3953 esac
3954 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3955 $as_echo "$ac_try_echo"; } >&5
3956   (eval "$ac_link") 2>&5
3957   ac_status=$?
3958   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3959   test $ac_status = 0; }
3960   if { ac_try='./conftest$ac_cv_exeext'
3961   { { case "(($ac_try" in
3962   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3963   *) ac_try_echo=$ac_try;;
3964 esac
3965 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3966 $as_echo "$ac_try_echo"; } >&5
3967   (eval "$ac_try") 2>&5
3968   ac_status=$?
3969   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3970   test $ac_status = 0; }; }; then
3971     cross_compiling=no
3972   else
3973     if test "$cross_compiling" = maybe; then
3974         cross_compiling=yes
3975     else
3976         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3977 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3978 as_fn_error $? "cannot run C compiled programs.
3979 If you meant to cross compile, use \`--host'.
3980 See \`config.log' for more details" "$LINENO" 5; }
3981     fi
3982   fi
3983 fi
3984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3985 $as_echo "$cross_compiling" >&6; }
3986
3987 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3988 ac_clean_files=$ac_clean_files_save
3989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3990 $as_echo_n "checking for suffix of object files... " >&6; }
3991 if ${ac_cv_objext+:} false; then :
3992   $as_echo_n "(cached) " >&6
3993 else
3994   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3995 /* end confdefs.h.  */
3996
3997 int
3998 main ()
3999 {
4000
4001   ;
4002   return 0;
4003 }
4004 _ACEOF
4005 rm -f conftest.o conftest.obj
4006 if { { ac_try="$ac_compile"
4007 case "(($ac_try" in
4008   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4009   *) ac_try_echo=$ac_try;;
4010 esac
4011 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4012 $as_echo "$ac_try_echo"; } >&5
4013   (eval "$ac_compile") 2>&5
4014   ac_status=$?
4015   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4016   test $ac_status = 0; }; then :
4017   for ac_file in conftest.o conftest.obj conftest.*; do
4018   test -f "$ac_file" || continue;
4019   case $ac_file in
4020     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4021     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4022        break;;
4023   esac
4024 done
4025 else
4026   $as_echo "$as_me: failed program was:" >&5
4027 sed 's/^/| /' conftest.$ac_ext >&5
4028
4029 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4030 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4031 as_fn_error $? "cannot compute suffix of object files: cannot compile
4032 See \`config.log' for more details" "$LINENO" 5; }
4033 fi
4034 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4035 fi
4036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4037 $as_echo "$ac_cv_objext" >&6; }
4038 OBJEXT=$ac_cv_objext
4039 ac_objext=$OBJEXT
4040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4041 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4042 if ${ac_cv_c_compiler_gnu+:} false; then :
4043   $as_echo_n "(cached) " >&6
4044 else
4045   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4046 /* end confdefs.h.  */
4047
4048 int
4049 main ()
4050 {
4051 #ifndef __GNUC__
4052        choke me
4053 #endif
4054
4055   ;
4056   return 0;
4057 }
4058 _ACEOF
4059 if ac_fn_c_try_compile "$LINENO"; then :
4060   ac_compiler_gnu=yes
4061 else
4062   ac_compiler_gnu=no
4063 fi
4064 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4065 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4066
4067 fi
4068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4069 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4070 if test $ac_compiler_gnu = yes; then
4071   GCC=yes
4072 else
4073   GCC=
4074 fi
4075 ac_test_CFLAGS=${CFLAGS+set}
4076 ac_save_CFLAGS=$CFLAGS
4077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4078 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4079 if ${ac_cv_prog_cc_g+:} false; then :
4080   $as_echo_n "(cached) " >&6
4081 else
4082   ac_save_c_werror_flag=$ac_c_werror_flag
4083    ac_c_werror_flag=yes
4084    ac_cv_prog_cc_g=no
4085    CFLAGS="-g"
4086    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4087 /* end confdefs.h.  */
4088
4089 int
4090 main ()
4091 {
4092
4093   ;
4094   return 0;
4095 }
4096 _ACEOF
4097 if ac_fn_c_try_compile "$LINENO"; then :
4098   ac_cv_prog_cc_g=yes
4099 else
4100   CFLAGS=""
4101       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4102 /* end confdefs.h.  */
4103
4104 int
4105 main ()
4106 {
4107
4108   ;
4109   return 0;
4110 }
4111 _ACEOF
4112 if ac_fn_c_try_compile "$LINENO"; then :
4113
4114 else
4115   ac_c_werror_flag=$ac_save_c_werror_flag
4116          CFLAGS="-g"
4117          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4118 /* end confdefs.h.  */
4119
4120 int
4121 main ()
4122 {
4123
4124   ;
4125   return 0;
4126 }
4127 _ACEOF
4128 if ac_fn_c_try_compile "$LINENO"; then :
4129   ac_cv_prog_cc_g=yes
4130 fi
4131 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4132 fi
4133 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4134 fi
4135 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4136    ac_c_werror_flag=$ac_save_c_werror_flag
4137 fi
4138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4139 $as_echo "$ac_cv_prog_cc_g" >&6; }
4140 if test "$ac_test_CFLAGS" = set; then
4141   CFLAGS=$ac_save_CFLAGS
4142 elif test $ac_cv_prog_cc_g = yes; then
4143   if test "$GCC" = yes; then
4144     CFLAGS="-g -O2"
4145   else
4146     CFLAGS="-g"
4147   fi
4148 else
4149   if test "$GCC" = yes; then
4150     CFLAGS="-O2"
4151   else
4152     CFLAGS=
4153   fi
4154 fi
4155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4156 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4157 if ${ac_cv_prog_cc_c89+:} false; then :
4158   $as_echo_n "(cached) " >&6
4159 else
4160   ac_cv_prog_cc_c89=no
4161 ac_save_CC=$CC
4162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4163 /* end confdefs.h.  */
4164 #include <stdarg.h>
4165 #include <stdio.h>
4166 struct stat;
4167 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4168 struct buf { int x; };
4169 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4170 static char *e (p, i)
4171      char **p;
4172      int i;
4173 {
4174   return p[i];
4175 }
4176 static char *f (char * (*g) (char **, int), char **p, ...)
4177 {
4178   char *s;
4179   va_list v;
4180   va_start (v,p);
4181   s = g (p, va_arg (v,int));
4182   va_end (v);
4183   return s;
4184 }
4185
4186 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
4187    function prototypes and stuff, but not '\xHH' hex character constants.
4188    These don't provoke an error unfortunately, instead are silently treated
4189    as 'x'.  The following induces an error, until -std is added to get
4190    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
4191    array size at least.  It's necessary to write '\x00'==0 to get something
4192    that's true only with -std.  */
4193 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4194
4195 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4196    inside strings and character constants.  */
4197 #define FOO(x) 'x'
4198 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4199
4200 int test (int i, double x);
4201 struct s1 {int (*f) (int a);};
4202 struct s2 {int (*f) (double a);};
4203 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4204 int argc;
4205 char **argv;
4206 int
4207 main ()
4208 {
4209 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4210   ;
4211   return 0;
4212 }
4213 _ACEOF
4214 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4215         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4216 do
4217   CC="$ac_save_CC $ac_arg"
4218   if ac_fn_c_try_compile "$LINENO"; then :
4219   ac_cv_prog_cc_c89=$ac_arg
4220 fi
4221 rm -f core conftest.err conftest.$ac_objext
4222   test "x$ac_cv_prog_cc_c89" != "xno" && break
4223 done
4224 rm -f conftest.$ac_ext
4225 CC=$ac_save_CC
4226
4227 fi
4228 # AC_CACHE_VAL
4229 case "x$ac_cv_prog_cc_c89" in
4230   x)
4231     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4232 $as_echo "none needed" >&6; } ;;
4233   xno)
4234     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4235 $as_echo "unsupported" >&6; } ;;
4236   *)
4237     CC="$CC $ac_cv_prog_cc_c89"
4238     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4239 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4240 esac
4241 if test "x$ac_cv_prog_cc_c89" != xno; then :
4242
4243 fi
4244
4245 ac_ext=c
4246 ac_cpp='$CPP $CPPFLAGS'
4247 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4248 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4249 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4250
4251
4252 # Check if it's Intel's compiler, which (usually) pretends to be gcc,
4253 # but has idiosyncrasies of its own.  We assume icc will define
4254 # __INTEL_COMPILER regardless of CFLAGS.
4255
4256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4257 /* end confdefs.h.  */
4258
4259 int
4260 main ()
4261 {
4262 #ifndef __INTEL_COMPILER
4263 choke me
4264 #endif
4265   ;
4266   return 0;
4267 }
4268 _ACEOF
4269 if ac_fn_c_try_compile "$LINENO"; then :
4270   ICC=yes
4271 else
4272   ICC=no
4273 fi
4274 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4275
4276 # Check if it's Sun Studio compiler. We assume that
4277 # __SUNPRO_C will be defined for Sun Studio compilers
4278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4279 /* end confdefs.h.  */
4280
4281 int
4282 main ()
4283 {
4284 #ifndef __SUNPRO_C
4285 choke me
4286 #endif
4287   ;
4288   return 0;
4289 }
4290 _ACEOF
4291 if ac_fn_c_try_compile "$LINENO"; then :
4292   SUN_STUDIO_CC=yes
4293 else
4294   SUN_STUDIO_CC=no
4295 fi
4296 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4297
4298
4299
4300 unset CFLAGS
4301
4302 #
4303 # Read the template
4304 #
4305 . "$srcdir/src/template/$template" || exit
4306
4307 # CFLAGS are selected so:
4308 # If the user specifies something in the environment, that is used.
4309 # else:  If the template file set something, that is used.
4310 # else:  If coverage was enabled, don't set anything.
4311 # else:  If the compiler is GCC, then we use -O2.
4312 # else:  If the compiler is something else, then we use -O, unless debugging.
4313
4314 if test "$ac_env_CFLAGS_set" = set; then
4315   CFLAGS=$ac_env_CFLAGS_value
4316 elif test "${CFLAGS+set}" = set; then
4317   : # (keep what template set)
4318 elif test "$enable_coverage" = yes; then
4319   : # no optimization by default
4320 elif test "$GCC" = yes; then
4321   CFLAGS="-O2"
4322 else
4323   # if the user selected debug mode, don't use -O
4324   if test "$enable_debug" != yes; then
4325     CFLAGS="-O"
4326   fi
4327 fi
4328
4329 # set CFLAGS_VECTOR from the environment, if available
4330 if test "$ac_env_CFLAGS_VECTOR_set" = set; then
4331   CFLAGS_VECTOR=$ac_env_CFLAGS_VECTOR_value
4332 fi
4333
4334 # Some versions of GCC support some additional useful warning flags.
4335 # Check whether they are supported, and add them to CFLAGS if so.
4336 # ICC pretends to be GCC but it's lying; it doesn't support these flags,
4337 # but has its own.  Also check other compiler-specific flags here.
4338
4339 if test "$GCC" = yes -a "$ICC" = no; then
4340   CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wpointer-arith"
4341   # These work in some but not all gcc versions
4342   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wdeclaration-after-statement" >&5
4343 $as_echo_n "checking whether $CC supports -Wdeclaration-after-statement... " >&6; }
4344 if ${pgac_cv_prog_cc_cflags__Wdeclaration_after_statement+:} false; then :
4345   $as_echo_n "(cached) " >&6
4346 else
4347   pgac_save_CFLAGS=$CFLAGS
4348 CFLAGS="$pgac_save_CFLAGS -Wdeclaration-after-statement"
4349 ac_save_c_werror_flag=$ac_c_werror_flag
4350 ac_c_werror_flag=yes
4351 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4352 /* end confdefs.h.  */
4353
4354 int
4355 main ()
4356 {
4357
4358   ;
4359   return 0;
4360 }
4361 _ACEOF
4362 if ac_fn_c_try_compile "$LINENO"; then :
4363   pgac_cv_prog_cc_cflags__Wdeclaration_after_statement=yes
4364 else
4365   pgac_cv_prog_cc_cflags__Wdeclaration_after_statement=no
4366 fi
4367 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4368 ac_c_werror_flag=$ac_save_c_werror_flag
4369 CFLAGS="$pgac_save_CFLAGS"
4370 fi
4371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" >&5
4372 $as_echo "$pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" >&6; }
4373 if test x"$pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" = x"yes"; then
4374   CFLAGS="$CFLAGS -Wdeclaration-after-statement"
4375 fi
4376
4377   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wendif-labels" >&5
4378 $as_echo_n "checking whether $CC supports -Wendif-labels... " >&6; }
4379 if ${pgac_cv_prog_cc_cflags__Wendif_labels+:} false; then :
4380   $as_echo_n "(cached) " >&6
4381 else
4382   pgac_save_CFLAGS=$CFLAGS
4383 CFLAGS="$pgac_save_CFLAGS -Wendif-labels"
4384 ac_save_c_werror_flag=$ac_c_werror_flag
4385 ac_c_werror_flag=yes
4386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4387 /* end confdefs.h.  */
4388
4389 int
4390 main ()
4391 {
4392
4393   ;
4394   return 0;
4395 }
4396 _ACEOF
4397 if ac_fn_c_try_compile "$LINENO"; then :
4398   pgac_cv_prog_cc_cflags__Wendif_labels=yes
4399 else
4400   pgac_cv_prog_cc_cflags__Wendif_labels=no
4401 fi
4402 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4403 ac_c_werror_flag=$ac_save_c_werror_flag
4404 CFLAGS="$pgac_save_CFLAGS"
4405 fi
4406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wendif_labels" >&5
4407 $as_echo "$pgac_cv_prog_cc_cflags__Wendif_labels" >&6; }
4408 if test x"$pgac_cv_prog_cc_cflags__Wendif_labels" = x"yes"; then
4409   CFLAGS="$CFLAGS -Wendif-labels"
4410 fi
4411
4412   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wmissing-format-attribute" >&5
4413 $as_echo_n "checking whether $CC supports -Wmissing-format-attribute... " >&6; }
4414 if ${pgac_cv_prog_cc_cflags__Wmissing_format_attribute+:} false; then :
4415   $as_echo_n "(cached) " >&6
4416 else
4417   pgac_save_CFLAGS=$CFLAGS
4418 CFLAGS="$pgac_save_CFLAGS -Wmissing-format-attribute"
4419 ac_save_c_werror_flag=$ac_c_werror_flag
4420 ac_c_werror_flag=yes
4421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4422 /* end confdefs.h.  */
4423
4424 int
4425 main ()
4426 {
4427
4428   ;
4429   return 0;
4430 }
4431 _ACEOF
4432 if ac_fn_c_try_compile "$LINENO"; then :
4433   pgac_cv_prog_cc_cflags__Wmissing_format_attribute=yes
4434 else
4435   pgac_cv_prog_cc_cflags__Wmissing_format_attribute=no
4436 fi
4437 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4438 ac_c_werror_flag=$ac_save_c_werror_flag
4439 CFLAGS="$pgac_save_CFLAGS"
4440 fi
4441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wmissing_format_attribute" >&5
4442 $as_echo "$pgac_cv_prog_cc_cflags__Wmissing_format_attribute" >&6; }
4443 if test x"$pgac_cv_prog_cc_cflags__Wmissing_format_attribute" = x"yes"; then
4444   CFLAGS="$CFLAGS -Wmissing-format-attribute"
4445 fi
4446
4447   # This was included in -Wall/-Wformat in older GCC versions
4448   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wformat-security" >&5
4449 $as_echo_n "checking whether $CC supports -Wformat-security... " >&6; }
4450 if ${pgac_cv_prog_cc_cflags__Wformat_security+:} false; then :
4451   $as_echo_n "(cached) " >&6
4452 else
4453   pgac_save_CFLAGS=$CFLAGS
4454 CFLAGS="$pgac_save_CFLAGS -Wformat-security"
4455 ac_save_c_werror_flag=$ac_c_werror_flag
4456 ac_c_werror_flag=yes
4457 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4458 /* end confdefs.h.  */
4459
4460 int
4461 main ()
4462 {
4463
4464   ;
4465   return 0;
4466 }
4467 _ACEOF
4468 if ac_fn_c_try_compile "$LINENO"; then :
4469   pgac_cv_prog_cc_cflags__Wformat_security=yes
4470 else
4471   pgac_cv_prog_cc_cflags__Wformat_security=no
4472 fi
4473 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4474 ac_c_werror_flag=$ac_save_c_werror_flag
4475 CFLAGS="$pgac_save_CFLAGS"
4476 fi
4477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wformat_security" >&5
4478 $as_echo "$pgac_cv_prog_cc_cflags__Wformat_security" >&6; }
4479 if test x"$pgac_cv_prog_cc_cflags__Wformat_security" = x"yes"; then
4480   CFLAGS="$CFLAGS -Wformat-security"
4481 fi
4482
4483   # Disable strict-aliasing rules; needed for gcc 3.3+
4484   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fno-strict-aliasing" >&5
4485 $as_echo_n "checking whether $CC supports -fno-strict-aliasing... " >&6; }
4486 if ${pgac_cv_prog_cc_cflags__fno_strict_aliasing+:} false; then :
4487   $as_echo_n "(cached) " >&6
4488 else
4489   pgac_save_CFLAGS=$CFLAGS
4490 CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing"
4491 ac_save_c_werror_flag=$ac_c_werror_flag
4492 ac_c_werror_flag=yes
4493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4494 /* end confdefs.h.  */
4495
4496 int
4497 main ()
4498 {
4499
4500   ;
4501   return 0;
4502 }
4503 _ACEOF
4504 if ac_fn_c_try_compile "$LINENO"; then :
4505   pgac_cv_prog_cc_cflags__fno_strict_aliasing=yes
4506 else
4507   pgac_cv_prog_cc_cflags__fno_strict_aliasing=no
4508 fi
4509 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4510 ac_c_werror_flag=$ac_save_c_werror_flag
4511 CFLAGS="$pgac_save_CFLAGS"
4512 fi
4513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&5
4514 $as_echo "$pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&6; }
4515 if test x"$pgac_cv_prog_cc_cflags__fno_strict_aliasing" = x"yes"; then
4516   CFLAGS="$CFLAGS -fno-strict-aliasing"
4517 fi
4518
4519   # Disable optimizations that assume no overflow; needed for gcc 4.3+
4520   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fwrapv" >&5
4521 $as_echo_n "checking whether $CC supports -fwrapv... " >&6; }
4522 if ${pgac_cv_prog_cc_cflags__fwrapv+:} false; then :
4523   $as_echo_n "(cached) " >&6
4524 else
4525   pgac_save_CFLAGS=$CFLAGS
4526 CFLAGS="$pgac_save_CFLAGS -fwrapv"
4527 ac_save_c_werror_flag=$ac_c_werror_flag
4528 ac_c_werror_flag=yes
4529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4530 /* end confdefs.h.  */
4531
4532 int
4533 main ()
4534 {
4535
4536   ;
4537   return 0;
4538 }
4539 _ACEOF
4540 if ac_fn_c_try_compile "$LINENO"; then :
4541   pgac_cv_prog_cc_cflags__fwrapv=yes
4542 else
4543   pgac_cv_prog_cc_cflags__fwrapv=no
4544 fi
4545 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4546 ac_c_werror_flag=$ac_save_c_werror_flag
4547 CFLAGS="$pgac_save_CFLAGS"
4548 fi
4549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fwrapv" >&5
4550 $as_echo "$pgac_cv_prog_cc_cflags__fwrapv" >&6; }
4551 if test x"$pgac_cv_prog_cc_cflags__fwrapv" = x"yes"; then
4552   CFLAGS="$CFLAGS -fwrapv"
4553 fi
4554
4555   # Disable FP optimizations that cause various errors on gcc 4.5+ or maybe 4.6+
4556   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fexcess-precision=standard" >&5
4557 $as_echo_n "checking whether $CC supports -fexcess-precision=standard... " >&6; }
4558 if ${pgac_cv_prog_cc_cflags__fexcess_precision_standard+:} false; then :
4559   $as_echo_n "(cached) " >&6
4560 else
4561   pgac_save_CFLAGS=$CFLAGS
4562 CFLAGS="$pgac_save_CFLAGS -fexcess-precision=standard"
4563 ac_save_c_werror_flag=$ac_c_werror_flag
4564 ac_c_werror_flag=yes
4565 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4566 /* end confdefs.h.  */
4567
4568 int
4569 main ()
4570 {
4571
4572   ;
4573   return 0;
4574 }
4575 _ACEOF
4576 if ac_fn_c_try_compile "$LINENO"; then :
4577   pgac_cv_prog_cc_cflags__fexcess_precision_standard=yes
4578 else
4579   pgac_cv_prog_cc_cflags__fexcess_precision_standard=no
4580 fi
4581 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4582 ac_c_werror_flag=$ac_save_c_werror_flag
4583 CFLAGS="$pgac_save_CFLAGS"
4584 fi
4585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fexcess_precision_standard" >&5
4586 $as_echo "$pgac_cv_prog_cc_cflags__fexcess_precision_standard" >&6; }
4587 if test x"$pgac_cv_prog_cc_cflags__fexcess_precision_standard" = x"yes"; then
4588   CFLAGS="$CFLAGS -fexcess-precision=standard"
4589 fi
4590
4591   # Optimization flags for specific files that benefit from vectorization
4592   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -funroll-loops" >&5
4593 $as_echo_n "checking whether $CC supports -funroll-loops... " >&6; }
4594 if ${pgac_cv_prog_cc_cflags__funroll_loops+:} false; then :
4595   $as_echo_n "(cached) " >&6
4596 else
4597   pgac_save_CFLAGS=$CFLAGS
4598 CFLAGS="$pgac_save_CFLAGS -funroll-loops"
4599 ac_save_c_werror_flag=$ac_c_werror_flag
4600 ac_c_werror_flag=yes
4601 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4602 /* end confdefs.h.  */
4603
4604 int
4605 main ()
4606 {
4607
4608   ;
4609   return 0;
4610 }
4611 _ACEOF
4612 if ac_fn_c_try_compile "$LINENO"; then :
4613   pgac_cv_prog_cc_cflags__funroll_loops=yes
4614 else
4615   pgac_cv_prog_cc_cflags__funroll_loops=no
4616 fi
4617 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4618 ac_c_werror_flag=$ac_save_c_werror_flag
4619 CFLAGS="$pgac_save_CFLAGS"
4620 fi
4621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__funroll_loops" >&5
4622 $as_echo "$pgac_cv_prog_cc_cflags__funroll_loops" >&6; }
4623 if test x"$pgac_cv_prog_cc_cflags__funroll_loops" = x"yes"; then
4624   CFLAGS_VECTOR="${CFLAGS_VECTOR} -funroll-loops"
4625 fi
4626
4627   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -ftree-vectorize" >&5
4628 $as_echo_n "checking whether $CC supports -ftree-vectorize... " >&6; }
4629 if ${pgac_cv_prog_cc_cflags__ftree_vectorize+:} false; then :
4630   $as_echo_n "(cached) " >&6
4631 else
4632   pgac_save_CFLAGS=$CFLAGS
4633 CFLAGS="$pgac_save_CFLAGS -ftree-vectorize"
4634 ac_save_c_werror_flag=$ac_c_werror_flag
4635 ac_c_werror_flag=yes
4636 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4637 /* end confdefs.h.  */
4638
4639 int
4640 main ()
4641 {
4642
4643   ;
4644   return 0;
4645 }
4646 _ACEOF
4647 if ac_fn_c_try_compile "$LINENO"; then :
4648   pgac_cv_prog_cc_cflags__ftree_vectorize=yes
4649 else
4650   pgac_cv_prog_cc_cflags__ftree_vectorize=no
4651 fi
4652 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4653 ac_c_werror_flag=$ac_save_c_werror_flag
4654 CFLAGS="$pgac_save_CFLAGS"
4655 fi
4656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__ftree_vectorize" >&5
4657 $as_echo "$pgac_cv_prog_cc_cflags__ftree_vectorize" >&6; }
4658 if test x"$pgac_cv_prog_cc_cflags__ftree_vectorize" = x"yes"; then
4659   CFLAGS_VECTOR="${CFLAGS_VECTOR} -ftree-vectorize"
4660 fi
4661
4662 elif test "$ICC" = yes; then
4663   # Intel's compiler has a bug/misoptimization in checking for
4664   # division by NAN (NaN == 0), -mp1 fixes it, so add it to the CFLAGS.
4665   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -mp1" >&5
4666 $as_echo_n "checking whether $CC supports -mp1... " >&6; }
4667 if ${pgac_cv_prog_cc_cflags__mp1+:} false; then :
4668   $as_echo_n "(cached) " >&6
4669 else
4670   pgac_save_CFLAGS=$CFLAGS
4671 CFLAGS="$pgac_save_CFLAGS -mp1"
4672 ac_save_c_werror_flag=$ac_c_werror_flag
4673 ac_c_werror_flag=yes
4674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4675 /* end confdefs.h.  */
4676
4677 int
4678 main ()
4679 {
4680
4681   ;
4682   return 0;
4683 }
4684 _ACEOF
4685 if ac_fn_c_try_compile "$LINENO"; then :
4686   pgac_cv_prog_cc_cflags__mp1=yes
4687 else
4688   pgac_cv_prog_cc_cflags__mp1=no
4689 fi
4690 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4691 ac_c_werror_flag=$ac_save_c_werror_flag
4692 CFLAGS="$pgac_save_CFLAGS"
4693 fi
4694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__mp1" >&5
4695 $as_echo "$pgac_cv_prog_cc_cflags__mp1" >&6; }
4696 if test x"$pgac_cv_prog_cc_cflags__mp1" = x"yes"; then
4697   CFLAGS="$CFLAGS -mp1"
4698 fi
4699
4700   # Make sure strict aliasing is off (though this is said to be the default)
4701   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fno-strict-aliasing" >&5
4702 $as_echo_n "checking whether $CC supports -fno-strict-aliasing... " >&6; }
4703 if ${pgac_cv_prog_cc_cflags__fno_strict_aliasing+:} false; then :
4704   $as_echo_n "(cached) " >&6
4705 else
4706   pgac_save_CFLAGS=$CFLAGS
4707 CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing"
4708 ac_save_c_werror_flag=$ac_c_werror_flag
4709 ac_c_werror_flag=yes
4710 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4711 /* end confdefs.h.  */
4712
4713 int
4714 main ()
4715 {
4716
4717   ;
4718   return 0;
4719 }
4720 _ACEOF
4721 if ac_fn_c_try_compile "$LINENO"; then :
4722   pgac_cv_prog_cc_cflags__fno_strict_aliasing=yes
4723 else
4724   pgac_cv_prog_cc_cflags__fno_strict_aliasing=no
4725 fi
4726 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4727 ac_c_werror_flag=$ac_save_c_werror_flag
4728 CFLAGS="$pgac_save_CFLAGS"
4729 fi
4730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&5
4731 $as_echo "$pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&6; }
4732 if test x"$pgac_cv_prog_cc_cflags__fno_strict_aliasing" = x"yes"; then
4733   CFLAGS="$CFLAGS -fno-strict-aliasing"
4734 fi
4735
4736 elif test "$PORTNAME" = "aix"; then
4737   # AIX's xlc has to have strict aliasing turned off too
4738   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -qnoansialias" >&5
4739 $as_echo_n "checking whether $CC supports -qnoansialias... " >&6; }
4740 if ${pgac_cv_prog_cc_cflags__qnoansialias+:} false; then :
4741   $as_echo_n "(cached) " >&6
4742 else
4743   pgac_save_CFLAGS=$CFLAGS
4744 CFLAGS="$pgac_save_CFLAGS -qnoansialias"
4745 ac_save_c_werror_flag=$ac_c_werror_flag
4746 ac_c_werror_flag=yes
4747 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4748 /* end confdefs.h.  */
4749
4750 int
4751 main ()
4752 {
4753
4754   ;
4755   return 0;
4756 }
4757 _ACEOF
4758 if ac_fn_c_try_compile "$LINENO"; then :
4759   pgac_cv_prog_cc_cflags__qnoansialias=yes
4760 else
4761   pgac_cv_prog_cc_cflags__qnoansialias=no
4762 fi
4763 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4764 ac_c_werror_flag=$ac_save_c_werror_flag
4765 CFLAGS="$pgac_save_CFLAGS"
4766 fi
4767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__qnoansialias" >&5
4768 $as_echo "$pgac_cv_prog_cc_cflags__qnoansialias" >&6; }
4769 if test x"$pgac_cv_prog_cc_cflags__qnoansialias" = x"yes"; then
4770   CFLAGS="$CFLAGS -qnoansialias"
4771 fi
4772
4773 elif test "$PORTNAME" = "hpux"; then
4774   # On some versions of HP-UX, libm functions do not set errno by default.
4775   # Fix that by using +Olibmerrno if the compiler recognizes it.
4776   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports +Olibmerrno" >&5
4777 $as_echo_n "checking whether $CC supports +Olibmerrno... " >&6; }
4778 if ${pgac_cv_prog_cc_cflags_pOlibmerrno+:} false; then :
4779   $as_echo_n "(cached) " >&6
4780 else
4781   pgac_save_CFLAGS=$CFLAGS
4782 CFLAGS="$pgac_save_CFLAGS +Olibmerrno"
4783 ac_save_c_werror_flag=$ac_c_werror_flag
4784 ac_c_werror_flag=yes
4785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4786 /* end confdefs.h.  */
4787
4788 int
4789 main ()
4790 {
4791
4792   ;
4793   return 0;
4794 }
4795 _ACEOF
4796 if ac_fn_c_try_compile "$LINENO"; then :
4797   pgac_cv_prog_cc_cflags_pOlibmerrno=yes
4798 else
4799   pgac_cv_prog_cc_cflags_pOlibmerrno=no
4800 fi
4801 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4802 ac_c_werror_flag=$ac_save_c_werror_flag
4803 CFLAGS="$pgac_save_CFLAGS"
4804 fi
4805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags_pOlibmerrno" >&5
4806 $as_echo "$pgac_cv_prog_cc_cflags_pOlibmerrno" >&6; }
4807 if test x"$pgac_cv_prog_cc_cflags_pOlibmerrno" = x"yes"; then
4808   CFLAGS="$CFLAGS +Olibmerrno"
4809 fi
4810
4811 fi
4812
4813 CFLAGS_VECTOR=$CFLAGS_VECTOR
4814
4815
4816 # supply -g if --enable-debug
4817 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
4818   CFLAGS="$CFLAGS -g"
4819 fi
4820
4821 # enable code coverage if --enable-coverage
4822 if test "$enable_coverage" = yes; then
4823   if test "$GCC" = yes; then
4824     CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
4825   else
4826     as_fn_error $? "--enable-coverage is supported only when using GCC" "$LINENO" 5
4827   fi
4828 fi
4829
4830 # enable profiling if --enable-profiling
4831 if test "$enable_profiling" = yes && test "$ac_cv_prog_cc_g" = yes; then
4832   if test "$GCC" = yes; then
4833
4834 $as_echo "#define PROFILE_PID_DIR 1" >>confdefs.h
4835
4836     CFLAGS="$CFLAGS -pg $PLATFORM_PROFILE_FLAGS"
4837   else
4838     as_fn_error $? "--enable-profiling is supported only when using GCC" "$LINENO" 5
4839   fi
4840 fi
4841
4842 # We already have this in Makefile.win32, but configure needs it too
4843 if test "$PORTNAME" = "win32"; then
4844   CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32 -DEXEC_BACKEND"
4845 fi
4846
4847 # Check if the compiler still works with the template settings
4848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler still works" >&5
4849 $as_echo_n "checking whether the C compiler still works... " >&6; }
4850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4851 /* end confdefs.h.  */
4852
4853 int
4854 main ()
4855 {
4856 return 0;
4857   ;
4858   return 0;
4859 }
4860 _ACEOF
4861 if ac_fn_c_try_link "$LINENO"; then :
4862   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4863 $as_echo "yes" >&6; }
4864 else
4865   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4866 $as_echo "no" >&6; }
4867    as_fn_error $? "cannot proceed" "$LINENO" 5
4868 fi
4869 rm -f core conftest.err conftest.$ac_objext \
4870     conftest$ac_exeext conftest.$ac_ext
4871
4872 # Defend against gcc -ffast-math
4873 if test "$GCC" = yes; then
4874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4875 /* end confdefs.h.  */
4876
4877 int
4878 main ()
4879 {
4880 #ifdef __FAST_MATH__
4881 choke me
4882 #endif
4883   ;
4884   return 0;
4885 }
4886 _ACEOF
4887 if ac_fn_c_try_compile "$LINENO"; then :
4888
4889 else
4890   as_fn_error $? "do not put -ffast-math in CFLAGS" "$LINENO" 5
4891 fi
4892 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4893 fi
4894
4895 ac_ext=c
4896 ac_cpp='$CPP $CPPFLAGS'
4897 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4898 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4899 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4900 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4901 $as_echo_n "checking how to run the C preprocessor... " >&6; }
4902 # On Suns, sometimes $CPP names a directory.
4903 if test -n "$CPP" && test -d "$CPP"; then
4904   CPP=
4905 fi
4906 if test -z "$CPP"; then
4907   if ${ac_cv_prog_CPP+:} false; then :
4908   $as_echo_n "(cached) " >&6
4909 else
4910       # Double quotes because CPP needs to be expanded
4911     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4912     do
4913       ac_preproc_ok=false
4914 for ac_c_preproc_warn_flag in '' yes
4915 do
4916   # Use a header file that comes with gcc, so configuring glibc
4917   # with a fresh cross-compiler works.
4918   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4919   # <limits.h> exists even on freestanding compilers.
4920   # On the NeXT, cc -E runs the code through the compiler's parser,
4921   # not just through cpp. "Syntax error" is here to catch this case.
4922   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4923 /* end confdefs.h.  */
4924 #ifdef __STDC__
4925 # include <limits.h>
4926 #else
4927 # include <assert.h>
4928 #endif
4929                      Syntax error
4930 _ACEOF
4931 if ac_fn_c_try_cpp "$LINENO"; then :
4932
4933 else
4934   # Broken: fails on valid input.
4935 continue
4936 fi
4937 rm -f conftest.err conftest.i conftest.$ac_ext
4938
4939   # OK, works on sane cases.  Now check whether nonexistent headers
4940   # can be detected and how.
4941   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4942 /* end confdefs.h.  */
4943 #include <ac_nonexistent.h>
4944 _ACEOF
4945 if ac_fn_c_try_cpp "$LINENO"; then :
4946   # Broken: success on invalid input.
4947 continue
4948 else
4949   # Passes both tests.
4950 ac_preproc_ok=:
4951 break
4952 fi
4953 rm -f conftest.err conftest.i conftest.$ac_ext
4954
4955 done
4956 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4957 rm -f conftest.i conftest.err conftest.$ac_ext
4958 if $ac_preproc_ok; then :
4959   break
4960 fi
4961
4962     done
4963     ac_cv_prog_CPP=$CPP
4964
4965 fi
4966   CPP=$ac_cv_prog_CPP
4967 else
4968   ac_cv_prog_CPP=$CPP
4969 fi
4970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4971 $as_echo "$CPP" >&6; }
4972 ac_preproc_ok=false
4973 for ac_c_preproc_warn_flag in '' yes
4974 do
4975   # Use a header file that comes with gcc, so configuring glibc
4976   # with a fresh cross-compiler works.
4977   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4978   # <limits.h> exists even on freestanding compilers.
4979   # On the NeXT, cc -E runs the code through the compiler's parser,
4980   # not just through cpp. "Syntax error" is here to catch this case.
4981   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4982 /* end confdefs.h.  */
4983 #ifdef __STDC__
4984 # include <limits.h>
4985 #else
4986 # include <assert.h>
4987 #endif
4988                      Syntax error
4989 _ACEOF
4990 if ac_fn_c_try_cpp "$LINENO"; then :
4991
4992 else
4993   # Broken: fails on valid input.
4994 continue
4995 fi
4996 rm -f conftest.err conftest.i conftest.$ac_ext
4997
4998   # OK, works on sane cases.  Now check whether nonexistent headers
4999   # can be detected and how.
5000   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5001 /* end confdefs.h.  */
5002 #include <ac_nonexistent.h>
5003 _ACEOF
5004 if ac_fn_c_try_cpp "$LINENO"; then :
5005   # Broken: success on invalid input.
5006 continue
5007 else
5008   # Passes both tests.
5009 ac_preproc_ok=:
5010 break
5011 fi
5012 rm -f conftest.err conftest.i conftest.$ac_ext
5013
5014 done
5015 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5016 rm -f conftest.i conftest.err conftest.$ac_ext
5017 if $ac_preproc_ok; then :
5018
5019 else
5020   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5021 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5022 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
5023 See \`config.log' for more details" "$LINENO" 5; }
5024 fi
5025
5026 ac_ext=c
5027 ac_cpp='$CPP $CPPFLAGS'
5028 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5029 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5030 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5031
5032
5033
5034
5035 #
5036 # Set up TAS assembly code if needed; the template file has now had its
5037 # chance to request this.
5038 #
5039 ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
5040
5041
5042 if test "$need_tas" = yes ; then
5043   TAS=tas.o
5044 else
5045   TAS=""
5046 fi
5047
5048
5049
5050 #
5051 # Automatic dependency tracking
5052 #
5053
5054
5055 # Check whether --enable-depend was given.
5056 if test "${enable_depend+set}" = set; then :
5057   enableval=$enable_depend;
5058   case $enableval in
5059     yes)
5060       autodepend=yes
5061       ;;
5062     no)
5063       :
5064       ;;
5065     *)
5066       as_fn_error $? "no argument expected for --enable-depend option" "$LINENO" 5
5067       ;;
5068   esac
5069
5070 else
5071   enable_depend=no
5072
5073 fi
5074
5075
5076
5077
5078
5079 #
5080 # Enable assert checks
5081 #
5082
5083
5084 # Check whether --enable-cassert was given.
5085 if test "${enable_cassert+set}" = set; then :
5086   enableval=$enable_cassert;
5087   case $enableval in
5088     yes)
5089
5090 $as_echo "#define USE_ASSERT_CHECKING 1" >>confdefs.h
5091
5092       ;;
5093     no)
5094       :
5095       ;;
5096     *)
5097       as_fn_error $? "no argument expected for --enable-cassert option" "$LINENO" 5
5098       ;;
5099   esac
5100
5101 else
5102   enable_cassert=no
5103
5104 fi
5105
5106
5107
5108
5109 #
5110 # Include directories
5111 #
5112 ac_save_IFS=$IFS
5113 IFS="${IFS}${PATH_SEPARATOR}"
5114 # SRCH_INC comes from the template file
5115 for dir in $with_includes $SRCH_INC; do
5116   if test -d "$dir"; then
5117     INCLUDES="$INCLUDES -I$dir"
5118   else
5119     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Include directory $dir does not exist." >&5
5120 $as_echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
5121   fi
5122 done
5123 IFS=$ac_save_IFS
5124
5125
5126
5127 #
5128 # Library directories
5129 #
5130 ac_save_IFS=$IFS
5131 IFS="${IFS}${PATH_SEPARATOR}"
5132 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
5133 for dir in $LIBRARY_DIRS $SRCH_LIB; do
5134   if test -d "$dir"; then
5135     LIBDIRS="$LIBDIRS -L$dir"
5136   else
5137     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Library directory $dir does not exist." >&5
5138 $as_echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
5139   fi
5140 done
5141 IFS=$ac_save_IFS
5142
5143 #
5144 # Enable thread-safe client libraries
5145 #
5146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking allow thread-safe client libraries" >&5
5147 $as_echo_n "checking allow thread-safe client libraries... " >&6; }
5148
5149
5150 # Check whether --enable-thread-safety was given.
5151 if test "${enable_thread_safety+set}" = set; then :
5152   enableval=$enable_thread_safety;
5153   case $enableval in
5154     yes)
5155       :
5156       ;;
5157     no)
5158       :
5159       ;;
5160     *)
5161       as_fn_error $? "no argument expected for --enable-thread-safety option" "$LINENO" 5
5162       ;;
5163   esac
5164
5165 else
5166   enable_thread_safety=yes
5167
5168 fi
5169
5170
5171 if test "$enable_thread_safety" = yes; then
5172
5173 $as_echo "#define ENABLE_THREAD_SAFETY 1" >>confdefs.h
5174
5175 fi
5176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_thread_safety" >&5
5177 $as_echo "$enable_thread_safety" >&6; }
5178
5179
5180 #
5181 # Optionally build Tcl modules (PL/Tcl)
5182 #
5183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Tcl" >&5
5184 $as_echo_n "checking whether to build with Tcl... " >&6; }
5185
5186
5187
5188 # Check whether --with-tcl was given.
5189 if test "${with_tcl+set}" = set; then :
5190   withval=$with_tcl;
5191   case $withval in
5192     yes)
5193       :
5194       ;;
5195     no)
5196       :
5197       ;;
5198     *)
5199       as_fn_error $? "no argument expected for --with-tcl option" "$LINENO" 5
5200       ;;
5201   esac
5202
5203 else
5204   with_tcl=no
5205
5206 fi
5207
5208
5209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcl" >&5
5210 $as_echo "$with_tcl" >&6; }
5211
5212
5213 # We see if the path to the Tcl/Tk configuration scripts is specified.
5214 # This will override the use of tclsh to find the paths to search.
5215
5216
5217
5218
5219 # Check whether --with-tclconfig was given.
5220 if test "${with_tclconfig+set}" = set; then :
5221   withval=$with_tclconfig;
5222   case $withval in
5223     yes)
5224       as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
5225       ;;
5226     no)
5227       as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
5228       ;;
5229     *)
5230
5231       ;;
5232   esac
5233
5234 fi
5235
5236
5237
5238 #
5239 # Optionally build Perl modules (PL/Perl)
5240 #
5241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Perl modules" >&5
5242 $as_echo_n "checking whether to build Perl modules... " >&6; }
5243
5244
5245
5246 # Check whether --with-perl was given.
5247 if test "${with_perl+set}" = set; then :
5248   withval=$with_perl;
5249   case $withval in
5250     yes)
5251       :
5252       ;;
5253     no)
5254       :
5255       ;;
5256     *)
5257       as_fn_error $? "no argument expected for --with-perl option" "$LINENO" 5
5258       ;;
5259   esac
5260
5261 else
5262   with_perl=no
5263
5264 fi
5265
5266
5267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_perl" >&5
5268 $as_echo "$with_perl" >&6; }
5269
5270
5271 #
5272 # Optionally build Python modules (PL/Python)
5273 #
5274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Python modules" >&5
5275 $as_echo_n "checking whether to build Python modules... " >&6; }
5276
5277
5278
5279 # Check whether --with-python was given.
5280 if test "${with_python+set}" = set; then :
5281   withval=$with_python;
5282   case $withval in
5283     yes)
5284       :
5285       ;;
5286     no)
5287       :
5288       ;;
5289     *)
5290       as_fn_error $? "no argument expected for --with-python option" "$LINENO" 5
5291       ;;
5292   esac
5293
5294 else
5295   with_python=no
5296
5297 fi
5298
5299
5300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
5301 $as_echo "$with_python" >&6; }
5302
5303
5304 #
5305 # GSSAPI
5306 #
5307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with GSSAPI support" >&5
5308 $as_echo_n "checking whether to build with GSSAPI support... " >&6; }
5309
5310
5311
5312 # Check whether --with-gssapi was given.
5313 if test "${with_gssapi+set}" = set; then :
5314   withval=$with_gssapi;
5315   case $withval in
5316     yes)
5317
5318
5319 $as_echo "#define ENABLE_GSS 1" >>confdefs.h
5320
5321   krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
5322
5323       ;;
5324     no)
5325       :
5326       ;;
5327     *)
5328       as_fn_error $? "no argument expected for --with-gssapi option" "$LINENO" 5
5329       ;;
5330   esac
5331
5332 else
5333   with_gssapi=no
5334
5335 fi
5336
5337
5338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_gssapi" >&5
5339 $as_echo "$with_gssapi" >&6; }
5340
5341
5342
5343
5344
5345 #
5346 # Kerberos configuration parameters
5347 #
5348
5349
5350
5351 # Check whether --with-krb-srvnam was given.
5352 if test "${with_krb_srvnam+set}" = set; then :
5353   withval=$with_krb_srvnam;
5354   case $withval in
5355     yes)
5356       as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
5357       ;;
5358     no)
5359       as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
5360       ;;
5361     *)
5362
5363       ;;
5364   esac
5365
5366 else
5367   with_krb_srvnam="postgres"
5368 fi
5369
5370
5371
5372 cat >>confdefs.h <<_ACEOF
5373 #define PG_KRB_SRVNAM "$with_krb_srvnam"
5374 _ACEOF
5375
5376
5377
5378 #
5379 # PAM
5380 #
5381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with PAM support" >&5
5382 $as_echo_n "checking whether to build with PAM support... " >&6; }
5383
5384
5385
5386 # Check whether --with-pam was given.
5387 if test "${with_pam+set}" = set; then :
5388   withval=$with_pam;
5389   case $withval in
5390     yes)
5391
5392 $as_echo "#define USE_PAM 1" >>confdefs.h
5393
5394       ;;
5395     no)
5396       :
5397       ;;
5398     *)
5399       as_fn_error $? "no argument expected for --with-pam option" "$LINENO" 5
5400       ;;
5401   esac
5402
5403 else
5404   with_pam=no
5405
5406 fi
5407
5408
5409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pam" >&5
5410 $as_echo "$with_pam" >&6; }
5411
5412
5413 #
5414 # LDAP
5415 #
5416 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LDAP support" >&5
5417 $as_echo_n "checking whether to build with LDAP support... " >&6; }
5418
5419
5420
5421 # Check whether --with-ldap was given.
5422 if test "${with_ldap+set}" = set; then :
5423   withval=$with_ldap;
5424   case $withval in
5425     yes)
5426
5427 $as_echo "#define USE_LDAP 1" >>confdefs.h
5428
5429       ;;
5430     no)
5431       :
5432       ;;
5433     *)
5434       as_fn_error $? "no argument expected for --with-ldap option" "$LINENO" 5
5435       ;;
5436   esac
5437
5438 else
5439   with_ldap=no
5440
5441 fi
5442
5443
5444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_ldap" >&5
5445 $as_echo "$with_ldap" >&6; }
5446
5447
5448 #
5449 # Bonjour
5450 #
5451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Bonjour support" >&5
5452 $as_echo_n "checking whether to build with Bonjour support... " >&6; }
5453
5454
5455
5456 # Check whether --with-bonjour was given.
5457 if test "${with_bonjour+set}" = set; then :
5458   withval=$with_bonjour;
5459   case $withval in
5460     yes)
5461
5462 $as_echo "#define USE_BONJOUR 1" >>confdefs.h
5463
5464       ;;
5465     no)
5466       :
5467       ;;
5468     *)
5469       as_fn_error $? "no argument expected for --with-bonjour option" "$LINENO" 5
5470       ;;
5471   esac
5472
5473 else
5474   with_bonjour=no
5475
5476 fi
5477
5478
5479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bonjour" >&5
5480 $as_echo "$with_bonjour" >&6; }
5481
5482
5483 #
5484 # OpenSSL
5485 #
5486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with OpenSSL support" >&5
5487 $as_echo_n "checking whether to build with OpenSSL support... " >&6; }
5488
5489
5490
5491 # Check whether --with-openssl was given.
5492 if test "${with_openssl+set}" = set; then :
5493   withval=$with_openssl;
5494   case $withval in
5495     yes)
5496
5497 $as_echo "#define USE_SSL 1" >>confdefs.h
5498
5499       ;;
5500     no)
5501       :
5502       ;;
5503     *)
5504       as_fn_error $? "no argument expected for --with-openssl option" "$LINENO" 5
5505       ;;
5506   esac
5507
5508 else
5509   with_openssl=no
5510
5511 fi
5512
5513
5514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_openssl" >&5
5515 $as_echo "$with_openssl" >&6; }
5516
5517
5518 #
5519 # SELinux
5520 #
5521 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with SELinux support" >&5
5522 $as_echo_n "checking whether to build with SELinux support... " >&6; }
5523
5524
5525
5526 # Check whether --with-selinux was given.
5527 if test "${with_selinux+set}" = set; then :
5528   withval=$with_selinux;
5529   case $withval in
5530     yes)
5531       :
5532       ;;
5533     no)
5534       :
5535       ;;
5536     *)
5537       as_fn_error $? "no argument expected for --with-selinux option" "$LINENO" 5
5538       ;;
5539   esac
5540
5541 else
5542   with_selinux=no
5543
5544 fi
5545
5546
5547
5548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_selinux" >&5
5549 $as_echo "$with_selinux" >&6; }
5550
5551 #
5552 # Readline
5553 #
5554
5555
5556
5557 # Check whether --with-readline was given.
5558 if test "${with_readline+set}" = set; then :
5559   withval=$with_readline;
5560   case $withval in
5561     yes)
5562       :
5563       ;;
5564     no)
5565       :
5566       ;;
5567     *)
5568       as_fn_error $? "no argument expected for --with-readline option" "$LINENO" 5
5569       ;;
5570   esac
5571
5572 else
5573   with_readline=yes
5574
5575 fi
5576
5577
5578 # readline on MinGW has problems with backslashes in psql and other bugs.
5579 # This is particularly a problem with non-US code pages.
5580 # Therefore disable its use until we understand the cause. 2004-07-20
5581 if test "$PORTNAME" = "win32"; then
5582   if test "$with_readline" = yes; then
5583     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Readline does not work on MinGW --- disabling" >&5
5584 $as_echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
5585     with_readline=no
5586   fi
5587 fi
5588
5589
5590 #
5591 # Prefer libedit
5592 #
5593
5594
5595
5596 # Check whether --with-libedit-preferred was given.
5597 if test "${with_libedit_preferred+set}" = set; then :
5598   withval=$with_libedit_preferred;
5599   case $withval in
5600     yes)
5601       :
5602       ;;
5603     no)
5604       :
5605       ;;
5606     *)
5607       as_fn_error $? "no argument expected for --with-libedit-preferred option" "$LINENO" 5
5608       ;;
5609   esac
5610
5611 else
5612   with_libedit_preferred=no
5613
5614 fi
5615
5616
5617
5618
5619 #
5620 # UUID library
5621 #
5622 # There are at least three UUID libraries in common use: the FreeBSD/NetBSD
5623 # library, the e2fsprogs libuuid (now part of util-linux-ng), and the OSSP
5624 # UUID library.  More than one of these might be present on a given platform,
5625 # so we make the user say which one she wants.
5626 #
5627
5628
5629
5630 # Check whether --with-uuid was given.
5631 if test "${with_uuid+set}" = set; then :
5632   withval=$with_uuid;
5633   case $withval in
5634     yes)
5635       as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
5636       ;;
5637     no)
5638       as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
5639       ;;
5640     *)
5641
5642       ;;
5643   esac
5644
5645 fi
5646
5647
5648 if test x"$with_uuid" = x"" ; then
5649   with_uuid=no
5650 fi
5651
5652
5653
5654 # Check whether --with-ossp-uuid was given.
5655 if test "${with_ossp_uuid+set}" = set; then :
5656   withval=$with_ossp_uuid;
5657   case $withval in
5658     yes)
5659       :
5660       ;;
5661     no)
5662       :
5663       ;;
5664     *)
5665       as_fn_error $? "no argument expected for --with-ossp-uuid option" "$LINENO" 5
5666       ;;
5667   esac
5668
5669 else
5670   with_ossp_uuid=no
5671
5672 fi
5673
5674
5675 if test "$with_ossp_uuid" = yes ; then
5676   with_uuid=ossp
5677 fi
5678
5679 if test "$with_uuid" = bsd ; then
5680
5681 $as_echo "#define HAVE_UUID_BSD 1" >>confdefs.h
5682
5683   UUID_EXTRA_OBJS="md5.o sha1.o"
5684 elif test "$with_uuid" = e2fs ; then
5685
5686 $as_echo "#define HAVE_UUID_E2FS 1" >>confdefs.h
5687
5688   UUID_EXTRA_OBJS="md5.o sha1.o"
5689 elif test "$with_uuid" = ossp ; then
5690
5691 $as_echo "#define HAVE_UUID_OSSP 1" >>confdefs.h
5692
5693   UUID_EXTRA_OBJS=""
5694 elif test "$with_uuid" = no ; then
5695   UUID_EXTRA_OBJS=""
5696 else
5697   as_fn_error $? "--with-uuid must specify one of bsd, e2fs, or ossp" "$LINENO" 5
5698 fi
5699
5700
5701
5702
5703 #
5704 # XML
5705 #
5706
5707
5708
5709 # Check whether --with-libxml was given.
5710 if test "${with_libxml+set}" = set; then :
5711   withval=$with_libxml;
5712   case $withval in
5713     yes)
5714
5715 $as_echo "#define USE_LIBXML 1" >>confdefs.h
5716
5717       ;;
5718     no)
5719       :
5720       ;;
5721     *)
5722       as_fn_error $? "no argument expected for --with-libxml option" "$LINENO" 5
5723       ;;
5724   esac
5725
5726 else
5727   with_libxml=no
5728
5729 fi
5730
5731
5732
5733 if test "$with_libxml" = yes ; then
5734   for ac_prog in xml2-config
5735 do
5736   # Extract the first word of "$ac_prog", so it can be a program name with args.
5737 set dummy $ac_prog; ac_word=$2
5738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5739 $as_echo_n "checking for $ac_word... " >&6; }
5740 if ${ac_cv_prog_XML2_CONFIG+:} false; then :
5741   $as_echo_n "(cached) " >&6
5742 else
5743   if test -n "$XML2_CONFIG"; then
5744   ac_cv_prog_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test.
5745 else
5746 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5747 for as_dir in $PATH
5748 do
5749   IFS=$as_save_IFS
5750   test -z "$as_dir" && as_dir=.
5751     for ac_exec_ext in '' $ac_executable_extensions; do
5752   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5753     ac_cv_prog_XML2_CONFIG="$ac_prog"
5754     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5755     break 2
5756   fi
5757 done
5758   done
5759 IFS=$as_save_IFS
5760
5761 fi
5762 fi
5763 XML2_CONFIG=$ac_cv_prog_XML2_CONFIG
5764 if test -n "$XML2_CONFIG"; then
5765   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
5766 $as_echo "$XML2_CONFIG" >&6; }
5767 else
5768   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5769 $as_echo "no" >&6; }
5770 fi
5771
5772
5773   test -n "$XML2_CONFIG" && break
5774 done
5775
5776   if test -n "$XML2_CONFIG"; then
5777     for pgac_option in `$XML2_CONFIG --cflags`; do
5778       case $pgac_option in
5779         -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
5780       esac
5781     done
5782     for pgac_option in `$XML2_CONFIG --libs`; do
5783       case $pgac_option in
5784         -L*) LDFLAGS="$LDFLAGS $pgac_option";;
5785       esac
5786     done
5787   fi
5788 fi
5789
5790
5791
5792 #
5793 # XSLT
5794 #
5795
5796
5797
5798 # Check whether --with-libxslt was given.
5799 if test "${with_libxslt+set}" = set; then :
5800   withval=$with_libxslt;
5801   case $withval in
5802     yes)
5803
5804 $as_echo "#define USE_LIBXSLT 1" >>confdefs.h
5805
5806       ;;
5807     no)
5808       :
5809       ;;
5810     *)
5811       as_fn_error $? "no argument expected for --with-libxslt option" "$LINENO" 5
5812       ;;
5813   esac
5814
5815 else
5816   with_libxslt=no
5817
5818 fi
5819
5820
5821
5822
5823
5824
5825 #
5826 # tzdata
5827 #
5828
5829
5830
5831 # Check whether --with-system-tzdata was given.
5832 if test "${with_system_tzdata+set}" = set; then :
5833   withval=$with_system_tzdata;
5834   case $withval in
5835     yes)
5836       as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
5837       ;;
5838     no)
5839       as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
5840       ;;
5841     *)
5842
5843       ;;
5844   esac
5845
5846 fi
5847
5848
5849
5850
5851 #
5852 # Zlib
5853 #
5854
5855
5856
5857 # Check whether --with-zlib was given.
5858 if test "${with_zlib+set}" = set; then :
5859   withval=$with_zlib;
5860   case $withval in
5861     yes)
5862       :
5863       ;;
5864     no)
5865       :
5866       ;;
5867     *)
5868       as_fn_error $? "no argument expected for --with-zlib option" "$LINENO" 5
5869       ;;
5870   esac
5871
5872 else
5873   with_zlib=yes
5874
5875 fi
5876
5877
5878
5879
5880 #
5881 # Elf
5882 #
5883
5884 # Assume system is ELF if it predefines __ELF__ as 1,
5885 # otherwise believe host_os based default.
5886 case $host_os in
5887     freebsd1*|freebsd2*) elf=no;;
5888     freebsd3*|freebsd4*) elf=yes;;
5889 esac
5890
5891
5892 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5893 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5894 if ${ac_cv_path_GREP+:} false; then :
5895   $as_echo_n "(cached) " >&6
5896 else
5897   if test -z "$GREP"; then
5898   ac_path_GREP_found=false
5899   # Loop through the user's path and test for each of PROGNAME-LIST
5900   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5901 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5902 do
5903   IFS=$as_save_IFS
5904   test -z "$as_dir" && as_dir=.
5905     for ac_prog in grep ggrep; do
5906     for ac_exec_ext in '' $ac_executable_extensions; do
5907       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5908       as_fn_executable_p "$ac_path_GREP" || continue
5909 # Check for GNU ac_path_GREP and select it if it is found.
5910   # Check for GNU $ac_path_GREP
5911 case `"$ac_path_GREP" --version 2>&1` in
5912 *GNU*)
5913   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5914 *)
5915   ac_count=0
5916   $as_echo_n 0123456789 >"conftest.in"
5917   while :
5918   do
5919     cat "conftest.in" "conftest.in" >"conftest.tmp"
5920     mv "conftest.tmp" "conftest.in"
5921     cp "conftest.in" "conftest.nl"
5922     $as_echo 'GREP' >> "conftest.nl"
5923     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5924     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5925     as_fn_arith $ac_count + 1 && ac_count=$as_val
5926     if test $ac_count -gt ${ac_path_GREP_max-0}; then
5927       # Best one so far, save it but keep looking for a better one
5928       ac_cv_path_GREP="$ac_path_GREP"
5929       ac_path_GREP_max=$ac_count
5930     fi
5931     # 10*(2^10) chars as input seems more than enough
5932     test $ac_count -gt 10 && break
5933   done
5934   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5935 esac
5936
5937       $ac_path_GREP_found && break 3
5938     done
5939   done
5940   done
5941 IFS=$as_save_IFS
5942   if test -z "$ac_cv_path_GREP"; then
5943     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5944   fi
5945 else
5946   ac_cv_path_GREP=$GREP
5947 fi
5948
5949 fi
5950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5951 $as_echo "$ac_cv_path_GREP" >&6; }
5952  GREP="$ac_cv_path_GREP"
5953
5954
5955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5956 $as_echo_n "checking for egrep... " >&6; }
5957 if ${ac_cv_path_EGREP+:} false; then :
5958   $as_echo_n "(cached) " >&6
5959 else
5960   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5961    then ac_cv_path_EGREP="$GREP -E"
5962    else
5963      if test -z "$EGREP"; then
5964   ac_path_EGREP_found=false
5965   # Loop through the user's path and test for each of PROGNAME-LIST
5966   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5967 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5968 do
5969   IFS=$as_save_IFS
5970   test -z "$as_dir" && as_dir=.
5971     for ac_prog in egrep; do
5972     for ac_exec_ext in '' $ac_executable_extensions; do
5973       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5974       as_fn_executable_p "$ac_path_EGREP" || continue
5975 # Check for GNU ac_path_EGREP and select it if it is found.
5976   # Check for GNU $ac_path_EGREP
5977 case `"$ac_path_EGREP" --version 2>&1` in
5978 *GNU*)
5979   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5980 *)
5981   ac_count=0
5982   $as_echo_n 0123456789 >"conftest.in"
5983   while :
5984   do
5985     cat "conftest.in" "conftest.in" >"conftest.tmp"
5986     mv "conftest.tmp" "conftest.in"
5987     cp "conftest.in" "conftest.nl"
5988     $as_echo 'EGREP' >> "conftest.nl"
5989     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5990     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5991     as_fn_arith $ac_count + 1 && ac_count=$as_val
5992     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5993       # Best one so far, save it but keep looking for a better one
5994       ac_cv_path_EGREP="$ac_path_EGREP"
5995       ac_path_EGREP_max=$ac_count
5996     fi
5997     # 10*(2^10) chars as input seems more than enough
5998     test $ac_count -gt 10 && break
5999   done
6000   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6001 esac
6002
6003       $ac_path_EGREP_found && break 3
6004     done
6005   done
6006   done
6007 IFS=$as_save_IFS
6008   if test -z "$ac_cv_path_EGREP"; then
6009     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6010   fi
6011 else
6012   ac_cv_path_EGREP=$EGREP
6013 fi
6014
6015    fi
6016 fi
6017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6018 $as_echo "$ac_cv_path_EGREP" >&6; }
6019  EGREP="$ac_cv_path_EGREP"
6020
6021
6022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6023 /* end confdefs.h.  */
6024 #if __ELF__
6025   yes
6026 #endif
6027
6028 _ACEOF
6029 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6030   $EGREP "yes" >/dev/null 2>&1; then :
6031   ELF_SYS=true
6032 else
6033   if test "X$elf" = "Xyes" ; then
6034   ELF_SYS=true
6035 else
6036   ELF_SYS=
6037 fi
6038 fi
6039 rm -f conftest*
6040
6041
6042
6043 #
6044 # Assignments
6045 #
6046
6047 CPPFLAGS="$CPPFLAGS $INCLUDES"
6048 LDFLAGS="$LDFLAGS $LIBDIRS"
6049
6050
6051
6052
6053
6054 # Check whether --with-gnu-ld was given.
6055 if test "${with_gnu_ld+set}" = set; then :
6056   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
6057 else
6058   with_gnu_ld=no
6059 fi
6060
6061 ac_prog=ld
6062 if test "$GCC" = yes; then
6063   # Check if gcc -print-prog-name=ld gives a path.
6064   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
6065 $as_echo_n "checking for ld used by GCC... " >&6; }
6066   case $host in
6067   *-*-mingw*)
6068     # gcc leaves a trailing carriage return which upsets mingw
6069     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
6070   *)
6071     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
6072   esac
6073   case "$ac_prog" in
6074     # Accept absolute paths.
6075     [\\/]* | [A-Za-z]:[\\/]*)
6076       re_direlt='/[^/][^/]*/\.\./'
6077       # Canonicalize the path of ld
6078       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
6079       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
6080         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
6081       done
6082       test -z "$LD" && LD="$ac_prog"
6083       ;;
6084   "")
6085     # If it fails, then pretend we aren't using GCC.
6086     ac_prog=ld
6087     ;;
6088   *)
6089     # If it is relative, then search for the first ld in PATH.
6090     with_gnu_ld=unknown
6091     ;;
6092   esac
6093 elif test "$with_gnu_ld" = yes; then
6094   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
6095 $as_echo_n "checking for GNU ld... " >&6; }
6096 else
6097   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
6098 $as_echo_n "checking for non-GNU ld... " >&6; }
6099 fi
6100 if ${ac_cv_path_LD+:} false; then :
6101   $as_echo_n "(cached) " >&6
6102 else
6103   if test -z "$LD"; then
6104   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
6105   for ac_dir in $PATH; do
6106     test -z "$ac_dir" && ac_dir=.
6107     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
6108       ac_cv_path_LD="$ac_dir/$ac_prog"
6109       # Check to see if the program is GNU ld.  I'd rather use --version,
6110       # but apparently some GNU ld's only accept -v.
6111       # Break only if it was the GNU/non-GNU ld that we prefer.
6112       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
6113         test "$with_gnu_ld" != no && break
6114       else
6115         test "$with_gnu_ld" != yes && break
6116       fi
6117     fi
6118   done
6119   IFS="$ac_save_ifs"
6120 else
6121   ac_cv_path_LD="$LD" # Let the user override the test with a path.
6122 fi
6123 fi
6124
6125 LD="$ac_cv_path_LD"
6126 if test -n "$LD"; then
6127   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
6128 $as_echo "$LD" >&6; }
6129 else
6130   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6131 $as_echo "no" >&6; }
6132 fi
6133 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
6134 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
6135 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
6136 if ${ac_cv_prog_gnu_ld+:} false; then :
6137   $as_echo_n "(cached) " >&6
6138 else
6139   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
6140 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
6141   ac_cv_prog_gnu_ld=yes
6142 else
6143   ac_cv_prog_gnu_ld=no
6144 fi
6145 fi
6146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gnu_ld" >&5
6147 $as_echo "$ac_cv_prog_gnu_ld" >&6; }
6148 with_gnu_ld=$ac_cv_prog_gnu_ld
6149
6150
6151
6152
6153 case $host_os in sysv5*)
6154   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ld -R works" >&5
6155 $as_echo_n "checking whether ld -R works... " >&6; }
6156 if ${pgac_cv_prog_ld_R+:} false; then :
6157   $as_echo_n "(cached) " >&6
6158 else
6159
6160     pgac_save_LDFLAGS=$LDFLAGS; LDFLAGS="$LDFLAGS -Wl,-R/usr/lib"
6161     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6162 /* end confdefs.h.  */
6163
6164 int
6165 main ()
6166 {
6167
6168   ;
6169   return 0;
6170 }
6171 _ACEOF
6172 if ac_fn_c_try_link "$LINENO"; then :
6173   pgac_cv_prog_ld_R=yes
6174 else
6175   pgac_cv_prog_ld_R=no
6176 fi
6177 rm -f core conftest.err conftest.$ac_objext \
6178     conftest$ac_exeext conftest.$ac_ext
6179     LDFLAGS=$pgac_save_LDFLAGS
6180
6181 fi
6182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_ld_R" >&5
6183 $as_echo "$pgac_cv_prog_ld_R" >&6; }
6184   ld_R_works=$pgac_cv_prog_ld_R
6185
6186 esac
6187 if test -n "$ac_tool_prefix"; then
6188   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6189 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6191 $as_echo_n "checking for $ac_word... " >&6; }
6192 if ${ac_cv_prog_RANLIB+:} false; then :
6193   $as_echo_n "(cached) " >&6
6194 else
6195   if test -n "$RANLIB"; then
6196   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6197 else
6198 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6199 for as_dir in $PATH
6200 do
6201   IFS=$as_save_IFS
6202   test -z "$as_dir" && as_dir=.
6203     for ac_exec_ext in '' $ac_executable_extensions; do
6204   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6205     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6206     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6207     break 2
6208   fi
6209 done
6210   done
6211 IFS=$as_save_IFS
6212
6213 fi
6214 fi
6215 RANLIB=$ac_cv_prog_RANLIB
6216 if test -n "$RANLIB"; then
6217   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6218 $as_echo "$RANLIB" >&6; }
6219 else
6220   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6221 $as_echo "no" >&6; }
6222 fi
6223
6224
6225 fi
6226 if test -z "$ac_cv_prog_RANLIB"; then
6227   ac_ct_RANLIB=$RANLIB
6228   # Extract the first word of "ranlib", so it can be a program name with args.
6229 set dummy ranlib; ac_word=$2
6230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6231 $as_echo_n "checking for $ac_word... " >&6; }
6232 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
6233   $as_echo_n "(cached) " >&6
6234 else
6235   if test -n "$ac_ct_RANLIB"; then
6236   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6237 else
6238 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6239 for as_dir in $PATH
6240 do
6241   IFS=$as_save_IFS
6242   test -z "$as_dir" && as_dir=.
6243     for ac_exec_ext in '' $ac_executable_extensions; do
6244   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6245     ac_cv_prog_ac_ct_RANLIB="ranlib"
6246     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6247     break 2
6248   fi
6249 done
6250   done
6251 IFS=$as_save_IFS
6252
6253 fi
6254 fi
6255 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6256 if test -n "$ac_ct_RANLIB"; then
6257   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6258 $as_echo "$ac_ct_RANLIB" >&6; }
6259 else
6260   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6261 $as_echo "no" >&6; }
6262 fi
6263
6264   if test "x$ac_ct_RANLIB" = x; then
6265     RANLIB=":"
6266   else
6267     case $cross_compiling:$ac_tool_warned in
6268 yes:)
6269 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6270 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6271 ac_tool_warned=yes ;;
6272 esac
6273     RANLIB=$ac_ct_RANLIB
6274   fi
6275 else
6276   RANLIB="$ac_cv_prog_RANLIB"
6277 fi
6278
6279
6280   if test -n "$ac_tool_prefix"; then
6281   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
6282 set dummy ${ac_tool_prefix}strip; ac_word=$2
6283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6284 $as_echo_n "checking for $ac_word... " >&6; }
6285 if ${ac_cv_prog_STRIP+:} false; then :
6286   $as_echo_n "(cached) " >&6
6287 else
6288   if test -n "$STRIP"; then
6289   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
6290 else
6291 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6292 for as_dir in $PATH
6293 do
6294   IFS=$as_save_IFS
6295   test -z "$as_dir" && as_dir=.
6296     for ac_exec_ext in '' $ac_executable_extensions; do
6297   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6298     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
6299     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6300     break 2
6301   fi
6302 done
6303   done
6304 IFS=$as_save_IFS
6305
6306 fi
6307 fi
6308 STRIP=$ac_cv_prog_STRIP
6309 if test -n "$STRIP"; then
6310   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
6311 $as_echo "$STRIP" >&6; }
6312 else
6313   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6314 $as_echo "no" >&6; }
6315 fi
6316
6317
6318 fi
6319 if test -z "$ac_cv_prog_STRIP"; then
6320   ac_ct_STRIP=$STRIP
6321   # Extract the first word of "strip", so it can be a program name with args.
6322 set dummy strip; ac_word=$2
6323 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6324 $as_echo_n "checking for $ac_word... " >&6; }
6325 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
6326   $as_echo_n "(cached) " >&6
6327 else
6328   if test -n "$ac_ct_STRIP"; then
6329   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
6330 else
6331 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6332 for as_dir in $PATH
6333 do
6334   IFS=$as_save_IFS
6335   test -z "$as_dir" && as_dir=.
6336     for ac_exec_ext in '' $ac_executable_extensions; do
6337   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6338     ac_cv_prog_ac_ct_STRIP="strip"
6339     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6340     break 2
6341   fi
6342 done
6343   done
6344 IFS=$as_save_IFS
6345
6346 fi
6347 fi
6348 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
6349 if test -n "$ac_ct_STRIP"; then
6350   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
6351 $as_echo "$ac_ct_STRIP" >&6; }
6352 else
6353   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6354 $as_echo "no" >&6; }
6355 fi
6356
6357   if test "x$ac_ct_STRIP" = x; then
6358     STRIP=":"
6359   else
6360     case $cross_compiling:$ac_tool_warned in
6361 yes:)
6362 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6363 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6364 ac_tool_warned=yes ;;
6365 esac
6366     STRIP=$ac_ct_STRIP
6367   fi
6368 else
6369   STRIP="$ac_cv_prog_STRIP"
6370 fi
6371
6372
6373   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is possible to strip libraries" >&5
6374 $as_echo_n "checking whether it is possible to strip libraries... " >&6; }
6375   if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
6376     STRIP_STATIC_LIB="$STRIP -x"
6377     STRIP_SHARED_LIB="$STRIP --strip-unneeded"
6378     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6379 $as_echo "yes" >&6; }
6380   else
6381     case $host_os in
6382       darwin*)
6383         STRIP="$STRIP -x"
6384         STRIP_STATIC_LIB=$STRIP
6385         STRIP_SHARED_LIB=$STRIP
6386         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6387 $as_echo "yes" >&6; }
6388         ;;
6389       *)
6390         STRIP_STATIC_LIB=:
6391         STRIP_SHARED_LIB=:
6392         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6393 $as_echo "no" >&6; }
6394         ;;
6395     esac
6396   fi
6397
6398
6399
6400 if test -n "$ac_tool_prefix"; then
6401   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6402 set dummy ${ac_tool_prefix}ar; ac_word=$2
6403 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6404 $as_echo_n "checking for $ac_word... " >&6; }
6405 if ${ac_cv_prog_AR+:} false; then :
6406   $as_echo_n "(cached) " >&6
6407 else
6408   if test -n "$AR"; then
6409   ac_cv_prog_AR="$AR" # Let the user override the test.
6410 else
6411 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6412 for as_dir in $PATH
6413 do
6414   IFS=$as_save_IFS
6415   test -z "$as_dir" && as_dir=.
6416     for ac_exec_ext in '' $ac_executable_extensions; do
6417   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6418     ac_cv_prog_AR="${ac_tool_prefix}ar"
6419     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6420     break 2
6421   fi
6422 done
6423   done
6424 IFS=$as_save_IFS
6425
6426 fi
6427 fi
6428 AR=$ac_cv_prog_AR
6429 if test -n "$AR"; then
6430   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6431 $as_echo "$AR" >&6; }
6432 else
6433   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6434 $as_echo "no" >&6; }
6435 fi
6436
6437
6438 fi
6439 if test -z "$ac_cv_prog_AR"; then
6440   ac_ct_AR=$AR
6441   # Extract the first word of "ar", so it can be a program name with args.
6442 set dummy ar; ac_word=$2
6443 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6444 $as_echo_n "checking for $ac_word... " >&6; }
6445 if ${ac_cv_prog_ac_ct_AR+:} false; then :
6446   $as_echo_n "(cached) " >&6
6447 else
6448   if test -n "$ac_ct_AR"; then
6449   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6450 else
6451 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6452 for as_dir in $PATH
6453 do
6454   IFS=$as_save_IFS
6455   test -z "$as_dir" && as_dir=.
6456     for ac_exec_ext in '' $ac_executable_extensions; do
6457   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6458     ac_cv_prog_ac_ct_AR="ar"
6459     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6460     break 2
6461   fi
6462 done
6463   done
6464 IFS=$as_save_IFS
6465
6466 fi
6467 fi
6468 ac_ct_AR=$ac_cv_prog_ac_ct_AR
6469 if test -n "$ac_ct_AR"; then
6470   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6471 $as_echo "$ac_ct_AR" >&6; }
6472 else
6473   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6474 $as_echo "no" >&6; }
6475 fi
6476
6477   if test "x$ac_ct_AR" = x; then
6478     AR="ar"
6479   else
6480     case $cross_compiling:$ac_tool_warned in
6481 yes:)
6482 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6483 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6484 ac_tool_warned=yes ;;
6485 esac
6486     AR=$ac_ct_AR
6487   fi
6488 else
6489   AR="$ac_cv_prog_AR"
6490 fi
6491
6492 if test "$PORTNAME" = "win32"; then
6493   if test -n "$ac_tool_prefix"; then
6494   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
6495 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
6496 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6497 $as_echo_n "checking for $ac_word... " >&6; }
6498 if ${ac_cv_prog_DLLTOOL+:} false; then :
6499   $as_echo_n "(cached) " >&6
6500 else
6501   if test -n "$DLLTOOL"; then
6502   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
6503 else
6504 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6505 for as_dir in $PATH
6506 do
6507   IFS=$as_save_IFS
6508   test -z "$as_dir" && as_dir=.
6509     for ac_exec_ext in '' $ac_executable_extensions; do
6510   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6511     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
6512     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6513     break 2
6514   fi
6515 done
6516   done
6517 IFS=$as_save_IFS
6518
6519 fi
6520 fi
6521 DLLTOOL=$ac_cv_prog_DLLTOOL
6522 if test -n "$DLLTOOL"; then
6523   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
6524 $as_echo "$DLLTOOL" >&6; }
6525 else
6526   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6527 $as_echo "no" >&6; }
6528 fi
6529
6530
6531 fi
6532 if test -z "$ac_cv_prog_DLLTOOL"; then
6533   ac_ct_DLLTOOL=$DLLTOOL
6534   # Extract the first word of "dlltool", so it can be a program name with args.
6535 set dummy dlltool; ac_word=$2
6536 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6537 $as_echo_n "checking for $ac_word... " >&6; }
6538 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
6539   $as_echo_n "(cached) " >&6
6540 else
6541   if test -n "$ac_ct_DLLTOOL"; then
6542   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
6543 else
6544 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6545 for as_dir in $PATH
6546 do
6547   IFS=$as_save_IFS
6548   test -z "$as_dir" && as_dir=.
6549     for ac_exec_ext in '' $ac_executable_extensions; do
6550   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6551     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
6552     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6553     break 2
6554   fi
6555 done
6556   done
6557 IFS=$as_save_IFS
6558
6559 fi
6560 fi
6561 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
6562 if test -n "$ac_ct_DLLTOOL"; then
6563   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
6564 $as_echo "$ac_ct_DLLTOOL" >&6; }
6565 else
6566   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6567 $as_echo "no" >&6; }
6568 fi
6569
6570   if test "x$ac_ct_DLLTOOL" = x; then
6571     DLLTOOL="dlltool"
6572   else
6573     case $cross_compiling:$ac_tool_warned in
6574 yes:)
6575 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6576 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6577 ac_tool_warned=yes ;;
6578 esac
6579     DLLTOOL=$ac_ct_DLLTOOL
6580   fi
6581 else
6582   DLLTOOL="$ac_cv_prog_DLLTOOL"
6583 fi
6584
6585   if test -n "$ac_tool_prefix"; then
6586   # Extract the first word of "${ac_tool_prefix}dllwrap", so it can be a program name with args.
6587 set dummy ${ac_tool_prefix}dllwrap; ac_word=$2
6588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6589 $as_echo_n "checking for $ac_word... " >&6; }
6590 if ${ac_cv_prog_DLLWRAP+:} false; then :
6591   $as_echo_n "(cached) " >&6
6592 else
6593   if test -n "$DLLWRAP"; then
6594   ac_cv_prog_DLLWRAP="$DLLWRAP" # Let the user override the test.
6595 else
6596 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6597 for as_dir in $PATH
6598 do
6599   IFS=$as_save_IFS
6600   test -z "$as_dir" && as_dir=.
6601     for ac_exec_ext in '' $ac_executable_extensions; do
6602   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6603     ac_cv_prog_DLLWRAP="${ac_tool_prefix}dllwrap"
6604     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6605     break 2
6606   fi
6607 done
6608   done
6609 IFS=$as_save_IFS
6610
6611 fi
6612 fi
6613 DLLWRAP=$ac_cv_prog_DLLWRAP
6614 if test -n "$DLLWRAP"; then
6615   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLWRAP" >&5
6616 $as_echo "$DLLWRAP" >&6; }
6617 else
6618   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6619 $as_echo "no" >&6; }
6620 fi
6621
6622
6623 fi
6624 if test -z "$ac_cv_prog_DLLWRAP"; then
6625   ac_ct_DLLWRAP=$DLLWRAP
6626   # Extract the first word of "dllwrap", so it can be a program name with args.
6627 set dummy dllwrap; ac_word=$2
6628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6629 $as_echo_n "checking for $ac_word... " >&6; }
6630 if ${ac_cv_prog_ac_ct_DLLWRAP+:} false; then :
6631   $as_echo_n "(cached) " >&6
6632 else
6633   if test -n "$ac_ct_DLLWRAP"; then
6634   ac_cv_prog_ac_ct_DLLWRAP="$ac_ct_DLLWRAP" # Let the user override the test.
6635 else
6636 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6637 for as_dir in $PATH
6638 do
6639   IFS=$as_save_IFS
6640   test -z "$as_dir" && as_dir=.
6641     for ac_exec_ext in '' $ac_executable_extensions; do
6642   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6643     ac_cv_prog_ac_ct_DLLWRAP="dllwrap"
6644     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6645     break 2
6646   fi
6647 done
6648   done
6649 IFS=$as_save_IFS
6650
6651 fi
6652 fi
6653 ac_ct_DLLWRAP=$ac_cv_prog_ac_ct_DLLWRAP
6654 if test -n "$ac_ct_DLLWRAP"; then
6655   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLWRAP" >&5
6656 $as_echo "$ac_ct_DLLWRAP" >&6; }
6657 else
6658   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6659 $as_echo "no" >&6; }
6660 fi
6661
6662   if test "x$ac_ct_DLLWRAP" = x; then
6663     DLLWRAP="dllwrap"
6664   else
6665     case $cross_compiling:$ac_tool_warned in
6666 yes:)
6667 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6668 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6669 ac_tool_warned=yes ;;
6670 esac
6671     DLLWRAP=$ac_ct_DLLWRAP
6672   fi
6673 else
6674   DLLWRAP="$ac_cv_prog_DLLWRAP"
6675 fi
6676
6677   if test -n "$ac_tool_prefix"; then
6678   # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
6679 set dummy ${ac_tool_prefix}windres; ac_word=$2
6680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6681 $as_echo_n "checking for $ac_word... " >&6; }
6682 if ${ac_cv_prog_WINDRES+:} false; then :
6683   $as_echo_n "(cached) " >&6
6684 else
6685   if test -n "$WINDRES"; then
6686   ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
6687 else
6688 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6689 for as_dir in $PATH
6690 do
6691   IFS=$as_save_IFS
6692   test -z "$as_dir" && as_dir=.
6693     for ac_exec_ext in '' $ac_executable_extensions; do
6694   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6695     ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
6696     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6697     break 2
6698   fi
6699 done
6700   done
6701 IFS=$as_save_IFS
6702
6703 fi
6704 fi
6705 WINDRES=$ac_cv_prog_WINDRES
6706 if test -n "$WINDRES"; then
6707   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
6708 $as_echo "$WINDRES" >&6; }
6709 else
6710   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6711 $as_echo "no" >&6; }
6712 fi
6713
6714
6715 fi
6716 if test -z "$ac_cv_prog_WINDRES"; then
6717   ac_ct_WINDRES=$WINDRES
6718   # Extract the first word of "windres", so it can be a program name with args.
6719 set dummy windres; ac_word=$2
6720 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6721 $as_echo_n "checking for $ac_word... " >&6; }
6722 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
6723   $as_echo_n "(cached) " >&6
6724 else
6725   if test -n "$ac_ct_WINDRES"; then
6726   ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
6727 else
6728 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6729 for as_dir in $PATH
6730 do
6731   IFS=$as_save_IFS
6732   test -z "$as_dir" && as_dir=.
6733     for ac_exec_ext in '' $ac_executable_extensions; do
6734   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6735     ac_cv_prog_ac_ct_WINDRES="windres"
6736     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6737     break 2
6738   fi
6739 done
6740   done
6741 IFS=$as_save_IFS
6742
6743 fi
6744 fi
6745 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
6746 if test -n "$ac_ct_WINDRES"; then
6747   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
6748 $as_echo "$ac_ct_WINDRES" >&6; }
6749 else
6750   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6751 $as_echo "no" >&6; }
6752 fi
6753
6754   if test "x$ac_ct_WINDRES" = x; then
6755     WINDRES="windres"
6756   else
6757     case $cross_compiling:$ac_tool_warned in
6758 yes:)
6759 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6760 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6761 ac_tool_warned=yes ;;
6762 esac
6763     WINDRES=$ac_ct_WINDRES
6764   fi
6765 else
6766   WINDRES="$ac_cv_prog_WINDRES"
6767 fi
6768
6769 fi
6770
6771 # Find a good install program.  We prefer a C program (faster),
6772 # so one script is as good as another.  But avoid the broken or
6773 # incompatible versions:
6774 # SysV /etc/install, /usr/sbin/install
6775 # SunOS /usr/etc/install
6776 # IRIX /sbin/install
6777 # AIX /bin/install
6778 # AmigaOS /C/install, which installs bootblocks on floppy discs
6779 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6780 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
6781 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6782 # OS/2's system install, which has a completely different semantic
6783 # ./install, which can be erroneously created by make from ./install.sh.
6784 # Reject install programs that cannot install multiple files.
6785 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6786 $as_echo_n "checking for a BSD-compatible install... " >&6; }
6787 if test -z "$INSTALL"; then
6788 if ${ac_cv_path_install+:} false; then :
6789   $as_echo_n "(cached) " >&6
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     # Account for people who put trailing slashes in PATH elements.
6797 case $as_dir/ in #((
6798   ./ | .// | /[cC]/* | \
6799   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
6800   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
6801   /usr/ucb/* ) ;;
6802   *)
6803     # OSF1 and SCO ODT 3.0 have their own names for install.
6804     # Don't use installbsd from OSF since it installs stuff as root
6805     # by default.
6806     for ac_prog in ginstall scoinst install; do
6807       for ac_exec_ext in '' $ac_executable_extensions; do
6808         if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
6809           if test $ac_prog = install &&
6810             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6811             # AIX install.  It has an incompatible calling convention.
6812             :
6813           elif test $ac_prog = install &&
6814             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6815             # program-specific install script used by HP pwplus--don't use.
6816             :
6817           else
6818             rm -rf conftest.one conftest.two conftest.dir
6819             echo one > conftest.one
6820             echo two > conftest.two
6821             mkdir conftest.dir
6822             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6823               test -s conftest.one && test -s conftest.two &&
6824               test -s conftest.dir/conftest.one &&
6825               test -s conftest.dir/conftest.two
6826             then
6827               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6828               break 3
6829             fi
6830           fi
6831         fi
6832       done
6833     done
6834     ;;
6835 esac
6836
6837   done
6838 IFS=$as_save_IFS
6839
6840 rm -rf conftest.one conftest.two conftest.dir
6841
6842 fi
6843   if test "${ac_cv_path_install+set}" = set; then
6844     INSTALL=$ac_cv_path_install
6845   else
6846     # As a last resort, use the slow shell script.  Don't cache a
6847     # value for INSTALL within a source directory, because that will
6848     # break other packages using the cache if that directory is
6849     # removed, or if the value is a relative name.
6850     INSTALL=$ac_install_sh
6851   fi
6852 fi
6853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6854 $as_echo "$INSTALL" >&6; }
6855
6856 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6857 # It thinks the first close brace ends the variable substitution.
6858 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6859
6860 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6861
6862 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6863
6864 # When Autoconf chooses install-sh as install program it tries to generate
6865 # a relative path to it in each makefile where it subsitutes it. This clashes
6866 # with our Makefile.global concept. This workaround helps.
6867 case $INSTALL in
6868   *install-sh*) install_bin='';;
6869   *) install_bin=$INSTALL;;
6870 esac
6871
6872
6873 # Extract the first word of "tar", so it can be a program name with args.
6874 set dummy tar; 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_path_TAR+:} false; then :
6878   $as_echo_n "(cached) " >&6
6879 else
6880   case $TAR in
6881   [\\/]* | ?:[\\/]*)
6882   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
6883   ;;
6884   *)
6885   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6886 for as_dir in $PATH
6887 do
6888   IFS=$as_save_IFS
6889   test -z "$as_dir" && as_dir=.
6890     for ac_exec_ext in '' $ac_executable_extensions; do
6891   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6892     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
6893     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6894     break 2
6895   fi
6896 done
6897   done
6898 IFS=$as_save_IFS
6899
6900   ;;
6901 esac
6902 fi
6903 TAR=$ac_cv_path_TAR
6904 if test -n "$TAR"; then
6905   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
6906 $as_echo "$TAR" >&6; }
6907 else
6908   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6909 $as_echo "no" >&6; }
6910 fi
6911
6912
6913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
6914 $as_echo_n "checking whether ln -s works... " >&6; }
6915 LN_S=$as_ln_s
6916 if test "$LN_S" = "ln -s"; then
6917   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6918 $as_echo "yes" >&6; }
6919 else
6920   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
6921 $as_echo "no, using $LN_S" >&6; }
6922 fi
6923
6924 for ac_prog in gawk mawk nawk awk
6925 do
6926   # Extract the first word of "$ac_prog", so it can be a program name with args.
6927 set dummy $ac_prog; ac_word=$2
6928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6929 $as_echo_n "checking for $ac_word... " >&6; }
6930 if ${ac_cv_prog_AWK+:} false; then :
6931   $as_echo_n "(cached) " >&6
6932 else
6933   if test -n "$AWK"; then
6934   ac_cv_prog_AWK="$AWK" # Let the user override the test.
6935 else
6936 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6937 for as_dir in $PATH
6938 do
6939   IFS=$as_save_IFS
6940   test -z "$as_dir" && as_dir=.
6941     for ac_exec_ext in '' $ac_executable_extensions; do
6942   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6943     ac_cv_prog_AWK="$ac_prog"
6944     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6945     break 2
6946   fi
6947 done
6948   done
6949 IFS=$as_save_IFS
6950
6951 fi
6952 fi
6953 AWK=$ac_cv_prog_AWK
6954 if test -n "$AWK"; then
6955   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
6956 $as_echo "$AWK" >&6; }
6957 else
6958   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6959 $as_echo "no" >&6; }
6960 fi
6961
6962
6963   test -n "$AWK" && break
6964 done
6965
6966 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6967 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6968 if test -z "$MKDIR_P"; then
6969   if ${ac_cv_path_mkdir+:} false; then :
6970   $as_echo_n "(cached) " >&6
6971 else
6972   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6973 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6974 do
6975   IFS=$as_save_IFS
6976   test -z "$as_dir" && as_dir=.
6977     for ac_prog in mkdir gmkdir; do
6978          for ac_exec_ext in '' $ac_executable_extensions; do
6979            as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
6980            case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6981              'mkdir (GNU coreutils) '* | \
6982              'mkdir (coreutils) '* | \
6983              'mkdir (fileutils) '4.1*)
6984                ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6985                break 3;;
6986            esac
6987          done
6988        done
6989   done
6990 IFS=$as_save_IFS
6991
6992 fi
6993
6994   test -d ./--version && rmdir ./--version
6995   if test "${ac_cv_path_mkdir+set}" = set; then
6996     MKDIR_P="$ac_cv_path_mkdir -p"
6997   else
6998     # As a last resort, use the slow shell script.  Don't cache a
6999     # value for MKDIR_P within a source directory, because that will
7000     # break other packages using the cache if that directory is
7001     # removed, or if the value is a relative name.
7002     MKDIR_P="$ac_install_sh -d"
7003   fi
7004 fi
7005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
7006 $as_echo "$MKDIR_P" >&6; }
7007
7008 # When Autoconf chooses install-sh as mkdir -p program it tries to generate
7009 # a relative path to it in each makefile where it subsitutes it. This clashes
7010 # with our Makefile.global concept. This workaround helps.
7011 case $MKDIR_P in
7012   *install-sh*) MKDIR_P='\${SHELL} \${top_srcdir}/config/install-sh -c -d';;
7013 esac
7014
7015 # Let the user override the search
7016 if test -z "$BISON"; then
7017   for ac_prog in bison
7018 do
7019   # Extract the first word of "$ac_prog", so it can be a program name with args.
7020 set dummy $ac_prog; ac_word=$2
7021 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7022 $as_echo_n "checking for $ac_word... " >&6; }
7023 if ${ac_cv_path_BISON+:} false; then :
7024   $as_echo_n "(cached) " >&6
7025 else
7026   case $BISON in
7027   [\\/]* | ?:[\\/]*)
7028   ac_cv_path_BISON="$BISON" # Let the user override the test with a path.
7029   ;;
7030   *)
7031   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7032 for as_dir in $PATH
7033 do
7034   IFS=$as_save_IFS
7035   test -z "$as_dir" && as_dir=.
7036     for ac_exec_ext in '' $ac_executable_extensions; do
7037   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7038     ac_cv_path_BISON="$as_dir/$ac_word$ac_exec_ext"
7039     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7040     break 2
7041   fi
7042 done
7043   done
7044 IFS=$as_save_IFS
7045
7046   ;;
7047 esac
7048 fi
7049 BISON=$ac_cv_path_BISON
7050 if test -n "$BISON"; then
7051   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
7052 $as_echo "$BISON" >&6; }
7053 else
7054   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7055 $as_echo "no" >&6; }
7056 fi
7057
7058
7059   test -n "$BISON" && break
7060 done
7061
7062 fi
7063
7064 if test "$BISON"; then
7065   pgac_bison_version=`$BISON --version 2>/dev/null | sed q`
7066   { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_bison_version" >&5
7067 $as_echo "$as_me: using $pgac_bison_version" >&6;}
7068   if echo "$pgac_bison_version" | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'
7069   then
7070     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7071 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
7072 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&5
7073 $as_echo "$as_me: WARNING:
7074 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
7075 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&2;}
7076     BISON=""
7077   fi
7078 fi
7079
7080 if test -z "$BISON"; then
7081   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7082 *** Without Bison you will not be able to build PostgreSQL from Git nor
7083 *** change any of the parser definition files.  You can obtain Bison from
7084 *** a GNU mirror site.  (If you are using the official distribution of
7085 *** PostgreSQL then you do not need to worry about this, because the Bison
7086 *** output is pre-generated.)" >&5
7087 $as_echo "$as_me: WARNING:
7088 *** Without Bison you will not be able to build PostgreSQL from Git nor
7089 *** change any of the parser definition files.  You can obtain Bison from
7090 *** a GNU mirror site.  (If you are using the official distribution of
7091 *** PostgreSQL then you do not need to worry about this, because the Bison
7092 *** output is pre-generated.)" >&2;}
7093 fi
7094 # We don't need AC_SUBST(BISON) because AC_PATH_PROG did it
7095
7096
7097 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flex" >&5
7098 $as_echo_n "checking for flex... " >&6; }
7099 if ${pgac_cv_path_flex+:} false; then :
7100   $as_echo_n "(cached) " >&6
7101 else
7102   # Let the user override the test
7103 if test -n "$FLEX"; then
7104   pgac_cv_path_flex=$FLEX
7105 else
7106   pgac_save_IFS=$IFS
7107   IFS=$PATH_SEPARATOR
7108   for pgac_dir in $PATH; do
7109     IFS=$pgac_save_IFS
7110     if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
7111       pgac_dir=`pwd`
7112     fi
7113     for pgac_prog in flex lex; do
7114       pgac_candidate="$pgac_dir/$pgac_prog"
7115       if test -f "$pgac_candidate" \
7116         && $pgac_candidate --version </dev/null >/dev/null 2>&1
7117       then
7118         echo '%%'  > conftest.l
7119         if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
7120           pgac_flex_version=`$pgac_candidate --version 2>/dev/null`
7121           if echo "$pgac_flex_version" | sed 's/[.a-z]/ /g' | $AWK '{ if ($1 = 2 && $2 = 5 && $3 >= 31) exit 0; else exit 1;}'
7122           then
7123             pgac_cv_path_flex=$pgac_candidate
7124             break 2
7125           else
7126             { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7127 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
7128 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&5
7129 $as_echo "$as_me: WARNING:
7130 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
7131 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&2;}
7132           fi
7133         fi
7134       fi
7135     done
7136   done
7137   rm -f conftest.l lex.yy.c
7138   : ${pgac_cv_path_flex=no}
7139 fi
7140
7141 fi
7142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_path_flex" >&5
7143 $as_echo "$pgac_cv_path_flex" >&6; }
7144 if test x"$pgac_cv_path_flex" = x"no"; then
7145   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7146 *** Without Flex you will not be able to build PostgreSQL from Git nor
7147 *** change any of the scanner definition files.  You can obtain Flex from
7148 *** a GNU mirror site.  (If you are using the official distribution of
7149 *** PostgreSQL then you do not need to worry about this because the Flex
7150 *** output is pre-generated.)" >&5
7151 $as_echo "$as_me: WARNING:
7152 *** Without Flex you will not be able to build PostgreSQL from Git nor
7153 *** change any of the scanner definition files.  You can obtain Flex from
7154 *** a GNU mirror site.  (If you are using the official distribution of
7155 *** PostgreSQL then you do not need to worry about this because the Flex
7156 *** output is pre-generated.)" >&2;}
7157
7158   FLEX=
7159 else
7160   FLEX=$pgac_cv_path_flex
7161   pgac_flex_version=`$FLEX --version 2>/dev/null`
7162   { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_flex_version" >&5
7163 $as_echo "$as_me: using $pgac_flex_version" >&6;}
7164 fi
7165
7166
7167
7168
7169
7170 # Let the user override the search
7171 if test -z "$PERL"; then
7172   # Extract the first word of "perl", so it can be a program name with args.
7173 set dummy perl; ac_word=$2
7174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7175 $as_echo_n "checking for $ac_word... " >&6; }
7176 if ${ac_cv_path_PERL+:} false; then :
7177   $as_echo_n "(cached) " >&6
7178 else
7179   case $PERL in
7180   [\\/]* | ?:[\\/]*)
7181   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
7182   ;;
7183   *)
7184   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7185 for as_dir in $PATH
7186 do
7187   IFS=$as_save_IFS
7188   test -z "$as_dir" && as_dir=.
7189     for ac_exec_ext in '' $ac_executable_extensions; do
7190   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7191     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
7192     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7193     break 2
7194   fi
7195 done
7196   done
7197 IFS=$as_save_IFS
7198
7199   ;;
7200 esac
7201 fi
7202 PERL=$ac_cv_path_PERL
7203 if test -n "$PERL"; then
7204   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
7205 $as_echo "$PERL" >&6; }
7206 else
7207   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7208 $as_echo "no" >&6; }
7209 fi
7210
7211
7212 fi
7213
7214 if test "$PERL"; then
7215   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'`
7216   { $as_echo "$as_me:${as_lineno-$LINENO}: using perl $pgac_perl_version" >&5
7217 $as_echo "$as_me: using perl $pgac_perl_version" >&6;}
7218   if echo "$pgac_perl_version" | sed 's/[.a-z_]/ /g' | \
7219     $AWK '{ if ($1 = 5 && $2 >= 8) exit 1; else exit 0;}'
7220   then
7221     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7222 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
7223 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&5
7224 $as_echo "$as_me: WARNING:
7225 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
7226 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&2;}
7227     PERL=""
7228   fi
7229 fi
7230
7231 if test -z "$PERL"; then
7232   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7233 *** Without Perl you will not be able to build PostgreSQL from Git.
7234 *** You can obtain Perl from any CPAN mirror site.
7235 *** (If you are using the official distribution of PostgreSQL then you do not
7236 *** need to worry about this, because the Perl output is pre-generated.)" >&5
7237 $as_echo "$as_me: WARNING:
7238 *** Without Perl you will not be able to build PostgreSQL from Git.
7239 *** You can obtain Perl from any CPAN mirror site.
7240 *** (If you are using the official distribution of PostgreSQL then you do not
7241 *** need to worry about this, because the Perl output is pre-generated.)" >&2;}
7242 fi
7243
7244 if test "$with_perl" = yes; then
7245   if test -z "$PERL"; then
7246     as_fn_error $? "Perl not found" "$LINENO" 5
7247   fi
7248
7249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl archlibexp" >&5
7250 $as_echo_n "checking for Perl archlibexp... " >&6; }
7251 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
7252 test "$PORTNAME" = "win32" && perl_archlibexp=`echo $perl_archlibexp | sed 's,\\\\,/,g'`
7253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_archlibexp" >&5
7254 $as_echo "$perl_archlibexp" >&6; }
7255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl privlibexp" >&5
7256 $as_echo_n "checking for Perl privlibexp... " >&6; }
7257 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
7258 test "$PORTNAME" = "win32" && perl_privlibexp=`echo $perl_privlibexp | sed 's,\\\\,/,g'`
7259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_privlibexp" >&5
7260 $as_echo "$perl_privlibexp" >&6; }
7261 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl useshrplib" >&5
7262 $as_echo_n "checking for Perl useshrplib... " >&6; }
7263 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
7264 test "$PORTNAME" = "win32" && perl_useshrplib=`echo $perl_useshrplib | sed 's,\\\\,/,g'`
7265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_useshrplib" >&5
7266 $as_echo "$perl_useshrplib" >&6; }
7267
7268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flags to link embedded Perl" >&5
7269 $as_echo_n "checking for flags to link embedded Perl... " >&6; }
7270 if test "$PORTNAME" = "win32" ; then
7271 perl_lib=`basename $perl_archlibexp/CORE/perl[5-9]*.lib .lib`
7272 test -e "$perl_archlibexp/CORE/$perl_lib.lib" && perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
7273 else
7274 pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
7275 pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
7276 perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%" -e "s/ -arch [-a-zA-Z0-9_]*//g"`
7277 fi
7278 if test -z "$perl_embed_ldflags" ; then
7279         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7280 $as_echo "no" >&6; }
7281         as_fn_error $? "could not determine flags for linking embedded Perl.
7282 This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not
7283 installed." "$LINENO" 5
7284 else
7285         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ldflags" >&5
7286 $as_echo "$perl_embed_ldflags" >&6; }
7287 fi
7288
7289 fi
7290
7291 if test "$with_python" = yes; then
7292   # Extract the first word of "python", so it can be a program name with args.
7293 set dummy python; ac_word=$2
7294 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7295 $as_echo_n "checking for $ac_word... " >&6; }
7296 if ${ac_cv_path_PYTHON+:} false; then :
7297   $as_echo_n "(cached) " >&6
7298 else
7299   case $PYTHON in
7300   [\\/]* | ?:[\\/]*)
7301   ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
7302   ;;
7303   *)
7304   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7305 for as_dir in $PATH
7306 do
7307   IFS=$as_save_IFS
7308   test -z "$as_dir" && as_dir=.
7309     for ac_exec_ext in '' $ac_executable_extensions; do
7310   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7311     ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
7312     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7313     break 2
7314   fi
7315 done
7316   done
7317 IFS=$as_save_IFS
7318
7319   ;;
7320 esac
7321 fi
7322 PYTHON=$ac_cv_path_PYTHON
7323 if test -n "$PYTHON"; then
7324   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
7325 $as_echo "$PYTHON" >&6; }
7326 else
7327   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7328 $as_echo "no" >&6; }
7329 fi
7330
7331
7332 if test x"$PYTHON" = x""; then
7333   as_fn_error $? "Python not found" "$LINENO" 5
7334 fi
7335
7336
7337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python distutils module" >&5
7338 $as_echo_n "checking for Python distutils module... " >&6; }
7339 if "${PYTHON}" -c 'import distutils' 2>&5
7340 then
7341     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7342 $as_echo "yes" >&6; }
7343 else
7344     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7345 $as_echo "no" >&6; }
7346     as_fn_error $? "distutils module not found" "$LINENO" 5
7347 fi
7348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python configuration directory" >&5
7349 $as_echo_n "checking Python configuration directory... " >&6; }
7350 python_majorversion=`${PYTHON} -c "import sys; print(sys.version[0])"`
7351 python_version=`${PYTHON} -c "import sys; print(sys.version[:3])"`
7352 python_configdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBPL'))))"`
7353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_configdir" >&5
7354 $as_echo "$python_configdir" >&6; }
7355
7356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python include directories" >&5
7357 $as_echo_n "checking Python include directories... " >&6; }
7358 python_includespec=`${PYTHON} -c "
7359 import distutils.sysconfig
7360 a = '-I' + distutils.sysconfig.get_python_inc(False)
7361 b = '-I' + distutils.sysconfig.get_python_inc(True)
7362 if a == b:
7363     print(a)
7364 else:
7365     print(a + ' ' + b)"`
7366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_includespec" >&5
7367 $as_echo "$python_includespec" >&6; }
7368
7369
7370
7371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link an embedded Python application" >&5
7372 $as_echo_n "checking how to link an embedded Python application... " >&6; }
7373
7374 python_libdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBDIR'))))"`
7375 python_ldlibrary=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDLIBRARY'))))"`
7376 python_so=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('SO'))))"`
7377 ldlibrary=`echo "${python_ldlibrary}" | sed "s/${python_so}$//"`
7378 python_framework=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('PYTHONFRAMEWORK'))))"`
7379 python_enable_shared=`${PYTHON} -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_vars().get('Py_ENABLE_SHARED',0))"`
7380
7381 if test -n "$python_framework"; then
7382         python_frameworkprefix=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('PYTHONFRAMEWORKPREFIX'))))"`
7383         python_libspec="-F${python_frameworkprefix} -framework $python_framework"
7384         python_enable_shared=1
7385 elif test x"${python_libdir}" != x"" -a x"${python_ldlibrary}" != x"" -a x"${python_ldlibrary}" != x"${ldlibrary}"
7386 then
7387         # New way: use the official shared library
7388         ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
7389         python_libspec="-L${python_libdir} -l${ldlibrary}"
7390 else
7391         # Old way: use libpython from python_configdir
7392         python_libdir="${python_configdir}"
7393         # LDVERSION was introduced in Python 3.2.
7394         python_ldversion=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDVERSION'))))"`
7395         if test x"${python_ldversion}" = x""; then
7396                 python_ldversion=$python_version
7397         fi
7398         python_libspec="-L${python_libdir} -lpython${python_ldversion}"
7399 fi
7400
7401 if test -z "$python_framework"; then
7402         python_additional_libs=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBS','LIBC','LIBM','BASEMODLIBS'))))"`
7403 fi
7404
7405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_libspec} ${python_additional_libs}" >&5
7406 $as_echo "${python_libspec} ${python_additional_libs}" >&6; }
7407
7408
7409 # threaded python is not supported on OpenBSD
7410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Python is compiled with thread support" >&5
7411 $as_echo_n "checking whether Python is compiled with thread support... " >&6; }
7412 pythreads=`${PYTHON} -c "import sys; print(int('thread' in sys.builtin_module_names))"`
7413 if test "$pythreads" = "1"; then
7414   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7415 $as_echo "yes" >&6; }
7416   case $host_os in
7417   openbsd*)
7418     as_fn_error $? "threaded Python not supported on this platform" "$LINENO" 5
7419     ;;
7420   esac
7421 else
7422   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7423 $as_echo "no" >&6; }
7424 fi
7425
7426
7427 fi
7428
7429 if test "$cross_compiling" = yes && test -z "$with_system_tzdata"; then
7430   # Extract the first word of "zic", so it can be a program name with args.
7431 set dummy zic; ac_word=$2
7432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7433 $as_echo_n "checking for $ac_word... " >&6; }
7434 if ${ac_cv_path_ZIC+:} false; then :
7435   $as_echo_n "(cached) " >&6
7436 else
7437   case $ZIC in
7438   [\\/]* | ?:[\\/]*)
7439   ac_cv_path_ZIC="$ZIC" # Let the user override the test with a path.
7440   ;;
7441   *)
7442   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7443 for as_dir in $PATH
7444 do
7445   IFS=$as_save_IFS
7446   test -z "$as_dir" && as_dir=.
7447     for ac_exec_ext in '' $ac_executable_extensions; do
7448   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7449     ac_cv_path_ZIC="$as_dir/$ac_word$ac_exec_ext"
7450     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7451     break 2
7452   fi
7453 done
7454   done
7455 IFS=$as_save_IFS
7456
7457   ;;
7458 esac
7459 fi
7460 ZIC=$ac_cv_path_ZIC
7461 if test -n "$ZIC"; then
7462   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
7463 $as_echo "$ZIC" >&6; }
7464 else
7465   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7466 $as_echo "no" >&6; }
7467 fi
7468
7469
7470   if test -z "$ZIC"; then
7471     as_fn_error $? "
7472 When cross-compiling, either use the option --with-system-tzdata to use
7473 existing time-zone data, or set the environment variable ZIC to a zic
7474 program to use during the build." "$LINENO" 5
7475   fi
7476 fi
7477
7478
7479 ##
7480 ## Libraries
7481 ##
7482 ## Most libraries are included only if they demonstrably provide a function
7483 ## we need, but libm is an exception: always include it, because there are
7484 ## too many compilers that play cute optimization games that will break
7485 ## probes for standard functions such as pow().
7486 ##
7487
7488 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
7489 $as_echo_n "checking for main in -lm... " >&6; }
7490 if ${ac_cv_lib_m_main+:} false; then :
7491   $as_echo_n "(cached) " >&6
7492 else
7493   ac_check_lib_save_LIBS=$LIBS
7494 LIBS="-lm  $LIBS"
7495 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7496 /* end confdefs.h.  */
7497
7498
7499 int
7500 main ()
7501 {
7502 return main ();
7503   ;
7504   return 0;
7505 }
7506 _ACEOF
7507 if ac_fn_c_try_link "$LINENO"; then :
7508   ac_cv_lib_m_main=yes
7509 else
7510   ac_cv_lib_m_main=no
7511 fi
7512 rm -f core conftest.err conftest.$ac_objext \
7513     conftest$ac_exeext conftest.$ac_ext
7514 LIBS=$ac_check_lib_save_LIBS
7515 fi
7516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
7517 $as_echo "$ac_cv_lib_m_main" >&6; }
7518 if test "x$ac_cv_lib_m_main" = xyes; then :
7519   cat >>confdefs.h <<_ACEOF
7520 #define HAVE_LIBM 1
7521 _ACEOF
7522
7523   LIBS="-lm $LIBS"
7524
7525 fi
7526
7527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setproctitle" >&5
7528 $as_echo_n "checking for library containing setproctitle... " >&6; }
7529 if ${ac_cv_search_setproctitle+:} false; then :
7530   $as_echo_n "(cached) " >&6
7531 else
7532   ac_func_search_save_LIBS=$LIBS
7533 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7534 /* end confdefs.h.  */
7535
7536 /* Override any GCC internal prototype to avoid an error.
7537    Use char because int might match the return type of a GCC
7538    builtin and then its argument prototype would still apply.  */
7539 #ifdef __cplusplus
7540 extern "C"
7541 #endif
7542 char setproctitle ();
7543 int
7544 main ()
7545 {
7546 return setproctitle ();
7547   ;
7548   return 0;
7549 }
7550 _ACEOF
7551 for ac_lib in '' util; do
7552   if test -z "$ac_lib"; then
7553     ac_res="none required"
7554   else
7555     ac_res=-l$ac_lib
7556     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7557   fi
7558   if ac_fn_c_try_link "$LINENO"; then :
7559   ac_cv_search_setproctitle=$ac_res
7560 fi
7561 rm -f core conftest.err conftest.$ac_objext \
7562     conftest$ac_exeext
7563   if ${ac_cv_search_setproctitle+:} false; then :
7564   break
7565 fi
7566 done
7567 if ${ac_cv_search_setproctitle+:} false; then :
7568
7569 else
7570   ac_cv_search_setproctitle=no
7571 fi
7572 rm conftest.$ac_ext
7573 LIBS=$ac_func_search_save_LIBS
7574 fi
7575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setproctitle" >&5
7576 $as_echo "$ac_cv_search_setproctitle" >&6; }
7577 ac_res=$ac_cv_search_setproctitle
7578 if test "$ac_res" != no; then :
7579   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7580
7581 fi
7582
7583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
7584 $as_echo_n "checking for library containing dlopen... " >&6; }
7585 if ${ac_cv_search_dlopen+:} false; then :
7586   $as_echo_n "(cached) " >&6
7587 else
7588   ac_func_search_save_LIBS=$LIBS
7589 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7590 /* end confdefs.h.  */
7591
7592 /* Override any GCC internal prototype to avoid an error.
7593    Use char because int might match the return type of a GCC
7594    builtin and then its argument prototype would still apply.  */
7595 #ifdef __cplusplus
7596 extern "C"
7597 #endif
7598 char dlopen ();
7599 int
7600 main ()
7601 {
7602 return dlopen ();
7603   ;
7604   return 0;
7605 }
7606 _ACEOF
7607 for ac_lib in '' dl; do
7608   if test -z "$ac_lib"; then
7609     ac_res="none required"
7610   else
7611     ac_res=-l$ac_lib
7612     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7613   fi
7614   if ac_fn_c_try_link "$LINENO"; then :
7615   ac_cv_search_dlopen=$ac_res
7616 fi
7617 rm -f core conftest.err conftest.$ac_objext \
7618     conftest$ac_exeext
7619   if ${ac_cv_search_dlopen+:} false; then :
7620   break
7621 fi
7622 done
7623 if ${ac_cv_search_dlopen+:} false; then :
7624
7625 else
7626   ac_cv_search_dlopen=no
7627 fi
7628 rm conftest.$ac_ext
7629 LIBS=$ac_func_search_save_LIBS
7630 fi
7631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
7632 $as_echo "$ac_cv_search_dlopen" >&6; }
7633 ac_res=$ac_cv_search_dlopen
7634 if test "$ac_res" != no; then :
7635   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7636
7637 fi
7638
7639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
7640 $as_echo_n "checking for library containing socket... " >&6; }
7641 if ${ac_cv_search_socket+:} false; then :
7642   $as_echo_n "(cached) " >&6
7643 else
7644   ac_func_search_save_LIBS=$LIBS
7645 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7646 /* end confdefs.h.  */
7647
7648 /* Override any GCC internal prototype to avoid an error.
7649    Use char because int might match the return type of a GCC
7650    builtin and then its argument prototype would still apply.  */
7651 #ifdef __cplusplus
7652 extern "C"
7653 #endif
7654 char socket ();
7655 int
7656 main ()
7657 {
7658 return socket ();
7659   ;
7660   return 0;
7661 }
7662 _ACEOF
7663 for ac_lib in '' socket wsock32; do
7664   if test -z "$ac_lib"; then
7665     ac_res="none required"
7666   else
7667     ac_res=-l$ac_lib
7668     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7669   fi
7670   if ac_fn_c_try_link "$LINENO"; then :
7671   ac_cv_search_socket=$ac_res
7672 fi
7673 rm -f core conftest.err conftest.$ac_objext \
7674     conftest$ac_exeext
7675   if ${ac_cv_search_socket+:} false; then :
7676   break
7677 fi
7678 done
7679 if ${ac_cv_search_socket+:} false; then :
7680
7681 else
7682   ac_cv_search_socket=no
7683 fi
7684 rm conftest.$ac_ext
7685 LIBS=$ac_func_search_save_LIBS
7686 fi
7687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
7688 $as_echo "$ac_cv_search_socket" >&6; }
7689 ac_res=$ac_cv_search_socket
7690 if test "$ac_res" != no; then :
7691   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7692
7693 fi
7694
7695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shl_load" >&5
7696 $as_echo_n "checking for library containing shl_load... " >&6; }
7697 if ${ac_cv_search_shl_load+:} false; then :
7698   $as_echo_n "(cached) " >&6
7699 else
7700   ac_func_search_save_LIBS=$LIBS
7701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7702 /* end confdefs.h.  */
7703
7704 /* Override any GCC internal prototype to avoid an error.
7705    Use char because int might match the return type of a GCC
7706    builtin and then its argument prototype would still apply.  */
7707 #ifdef __cplusplus
7708 extern "C"
7709 #endif
7710 char shl_load ();
7711 int
7712 main ()
7713 {
7714 return shl_load ();
7715   ;
7716   return 0;
7717 }
7718 _ACEOF
7719 for ac_lib in '' dld; do
7720   if test -z "$ac_lib"; then
7721     ac_res="none required"
7722   else
7723     ac_res=-l$ac_lib
7724     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7725   fi
7726   if ac_fn_c_try_link "$LINENO"; then :
7727   ac_cv_search_shl_load=$ac_res
7728 fi
7729 rm -f core conftest.err conftest.$ac_objext \
7730     conftest$ac_exeext
7731   if ${ac_cv_search_shl_load+:} false; then :
7732   break
7733 fi
7734 done
7735 if ${ac_cv_search_shl_load+:} false; then :
7736
7737 else
7738   ac_cv_search_shl_load=no
7739 fi
7740 rm conftest.$ac_ext
7741 LIBS=$ac_func_search_save_LIBS
7742 fi
7743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shl_load" >&5
7744 $as_echo "$ac_cv_search_shl_load" >&6; }
7745 ac_res=$ac_cv_search_shl_load
7746 if test "$ac_res" != no; then :
7747   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7748
7749 fi
7750
7751 # We only use libld in port/dynloader/aix.c
7752 case $host_os in
7753      aix*)
7754         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing ldopen" >&5
7755 $as_echo_n "checking for library containing ldopen... " >&6; }
7756 if ${ac_cv_search_ldopen+:} false; then :
7757   $as_echo_n "(cached) " >&6
7758 else
7759   ac_func_search_save_LIBS=$LIBS
7760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7761 /* end confdefs.h.  */
7762
7763 /* Override any GCC internal prototype to avoid an error.
7764    Use char because int might match the return type of a GCC
7765    builtin and then its argument prototype would still apply.  */
7766 #ifdef __cplusplus
7767 extern "C"
7768 #endif
7769 char ldopen ();
7770 int
7771 main ()
7772 {
7773 return ldopen ();
7774   ;
7775   return 0;
7776 }
7777 _ACEOF
7778 for ac_lib in '' ld; do
7779   if test -z "$ac_lib"; then
7780     ac_res="none required"
7781   else
7782     ac_res=-l$ac_lib
7783     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7784   fi
7785   if ac_fn_c_try_link "$LINENO"; then :
7786   ac_cv_search_ldopen=$ac_res
7787 fi
7788 rm -f core conftest.err conftest.$ac_objext \
7789     conftest$ac_exeext
7790   if ${ac_cv_search_ldopen+:} false; then :
7791   break
7792 fi
7793 done
7794 if ${ac_cv_search_ldopen+:} false; then :
7795
7796 else
7797   ac_cv_search_ldopen=no
7798 fi
7799 rm conftest.$ac_ext
7800 LIBS=$ac_func_search_save_LIBS
7801 fi
7802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_ldopen" >&5
7803 $as_echo "$ac_cv_search_ldopen" >&6; }
7804 ac_res=$ac_cv_search_ldopen
7805 if test "$ac_res" != no; then :
7806   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7807
7808 fi
7809
7810         ;;
7811 esac
7812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getopt_long" >&5
7813 $as_echo_n "checking for library containing getopt_long... " >&6; }
7814 if ${ac_cv_search_getopt_long+:} false; then :
7815   $as_echo_n "(cached) " >&6
7816 else
7817   ac_func_search_save_LIBS=$LIBS
7818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7819 /* end confdefs.h.  */
7820
7821 /* Override any GCC internal prototype to avoid an error.
7822    Use char because int might match the return type of a GCC
7823    builtin and then its argument prototype would still apply.  */
7824 #ifdef __cplusplus
7825 extern "C"
7826 #endif
7827 char getopt_long ();
7828 int
7829 main ()
7830 {
7831 return getopt_long ();
7832   ;
7833   return 0;
7834 }
7835 _ACEOF
7836 for ac_lib in '' getopt gnugetopt; do
7837   if test -z "$ac_lib"; then
7838     ac_res="none required"
7839   else
7840     ac_res=-l$ac_lib
7841     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7842   fi
7843   if ac_fn_c_try_link "$LINENO"; then :
7844   ac_cv_search_getopt_long=$ac_res
7845 fi
7846 rm -f core conftest.err conftest.$ac_objext \
7847     conftest$ac_exeext
7848   if ${ac_cv_search_getopt_long+:} false; then :
7849   break
7850 fi
7851 done
7852 if ${ac_cv_search_getopt_long+:} false; then :
7853
7854 else
7855   ac_cv_search_getopt_long=no
7856 fi
7857 rm conftest.$ac_ext
7858 LIBS=$ac_func_search_save_LIBS
7859 fi
7860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getopt_long" >&5
7861 $as_echo "$ac_cv_search_getopt_long" >&6; }
7862 ac_res=$ac_cv_search_getopt_long
7863 if test "$ac_res" != no; then :
7864   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7865
7866 fi
7867
7868 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
7869 $as_echo_n "checking for library containing crypt... " >&6; }
7870 if ${ac_cv_search_crypt+:} false; then :
7871   $as_echo_n "(cached) " >&6
7872 else
7873   ac_func_search_save_LIBS=$LIBS
7874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7875 /* end confdefs.h.  */
7876
7877 /* Override any GCC internal prototype to avoid an error.
7878    Use char because int might match the return type of a GCC
7879    builtin and then its argument prototype would still apply.  */
7880 #ifdef __cplusplus
7881 extern "C"
7882 #endif
7883 char crypt ();
7884 int
7885 main ()
7886 {
7887 return crypt ();
7888   ;
7889   return 0;
7890 }
7891 _ACEOF
7892 for ac_lib in '' crypt; do
7893   if test -z "$ac_lib"; then
7894     ac_res="none required"
7895   else
7896     ac_res=-l$ac_lib
7897     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7898   fi
7899   if ac_fn_c_try_link "$LINENO"; then :
7900   ac_cv_search_crypt=$ac_res
7901 fi
7902 rm -f core conftest.err conftest.$ac_objext \
7903     conftest$ac_exeext
7904   if ${ac_cv_search_crypt+:} false; then :
7905   break
7906 fi
7907 done
7908 if ${ac_cv_search_crypt+:} false; then :
7909
7910 else
7911   ac_cv_search_crypt=no
7912 fi
7913 rm conftest.$ac_ext
7914 LIBS=$ac_func_search_save_LIBS
7915 fi
7916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
7917 $as_echo "$ac_cv_search_crypt" >&6; }
7918 ac_res=$ac_cv_search_crypt
7919 if test "$ac_res" != no; then :
7920   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7921
7922 fi
7923
7924 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
7925 $as_echo_n "checking for library containing shm_open... " >&6; }
7926 if ${ac_cv_search_shm_open+:} false; then :
7927   $as_echo_n "(cached) " >&6
7928 else
7929   ac_func_search_save_LIBS=$LIBS
7930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7931 /* end confdefs.h.  */
7932
7933 /* Override any GCC internal prototype to avoid an error.
7934    Use char because int might match the return type of a GCC
7935    builtin and then its argument prototype would still apply.  */
7936 #ifdef __cplusplus
7937 extern "C"
7938 #endif
7939 char shm_open ();
7940 int
7941 main ()
7942 {
7943 return shm_open ();
7944   ;
7945   return 0;
7946 }
7947 _ACEOF
7948 for ac_lib in '' rt; do
7949   if test -z "$ac_lib"; then
7950     ac_res="none required"
7951   else
7952     ac_res=-l$ac_lib
7953     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7954   fi
7955   if ac_fn_c_try_link "$LINENO"; then :
7956   ac_cv_search_shm_open=$ac_res
7957 fi
7958 rm -f core conftest.err conftest.$ac_objext \
7959     conftest$ac_exeext
7960   if ${ac_cv_search_shm_open+:} false; then :
7961   break
7962 fi
7963 done
7964 if ${ac_cv_search_shm_open+:} false; then :
7965
7966 else
7967   ac_cv_search_shm_open=no
7968 fi
7969 rm conftest.$ac_ext
7970 LIBS=$ac_func_search_save_LIBS
7971 fi
7972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
7973 $as_echo "$ac_cv_search_shm_open" >&6; }
7974 ac_res=$ac_cv_search_shm_open
7975 if test "$ac_res" != no; then :
7976   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7977
7978 fi
7979
7980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_unlink" >&5
7981 $as_echo_n "checking for library containing shm_unlink... " >&6; }
7982 if ${ac_cv_search_shm_unlink+:} false; then :
7983   $as_echo_n "(cached) " >&6
7984 else
7985   ac_func_search_save_LIBS=$LIBS
7986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7987 /* end confdefs.h.  */
7988
7989 /* Override any GCC internal prototype to avoid an error.
7990    Use char because int might match the return type of a GCC
7991    builtin and then its argument prototype would still apply.  */
7992 #ifdef __cplusplus
7993 extern "C"
7994 #endif
7995 char shm_unlink ();
7996 int
7997 main ()
7998 {
7999 return shm_unlink ();
8000   ;
8001   return 0;
8002 }
8003 _ACEOF
8004 for ac_lib in '' rt; do
8005   if test -z "$ac_lib"; then
8006     ac_res="none required"
8007   else
8008     ac_res=-l$ac_lib
8009     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8010   fi
8011   if ac_fn_c_try_link "$LINENO"; then :
8012   ac_cv_search_shm_unlink=$ac_res
8013 fi
8014 rm -f core conftest.err conftest.$ac_objext \
8015     conftest$ac_exeext
8016   if ${ac_cv_search_shm_unlink+:} false; then :
8017   break
8018 fi
8019 done
8020 if ${ac_cv_search_shm_unlink+:} false; then :
8021
8022 else
8023   ac_cv_search_shm_unlink=no
8024 fi
8025 rm conftest.$ac_ext
8026 LIBS=$ac_func_search_save_LIBS
8027 fi
8028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_unlink" >&5
8029 $as_echo "$ac_cv_search_shm_unlink" >&6; }
8030 ac_res=$ac_cv_search_shm_unlink
8031 if test "$ac_res" != no; then :
8032   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8033
8034 fi
8035
8036 # Solaris:
8037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5
8038 $as_echo_n "checking for library containing fdatasync... " >&6; }
8039 if ${ac_cv_search_fdatasync+:} false; then :
8040   $as_echo_n "(cached) " >&6
8041 else
8042   ac_func_search_save_LIBS=$LIBS
8043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8044 /* end confdefs.h.  */
8045
8046 /* Override any GCC internal prototype to avoid an error.
8047    Use char because int might match the return type of a GCC
8048    builtin and then its argument prototype would still apply.  */
8049 #ifdef __cplusplus
8050 extern "C"
8051 #endif
8052 char fdatasync ();
8053 int
8054 main ()
8055 {
8056 return fdatasync ();
8057   ;
8058   return 0;
8059 }
8060 _ACEOF
8061 for ac_lib in '' rt posix4; do
8062   if test -z "$ac_lib"; then
8063     ac_res="none required"
8064   else
8065     ac_res=-l$ac_lib
8066     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8067   fi
8068   if ac_fn_c_try_link "$LINENO"; then :
8069   ac_cv_search_fdatasync=$ac_res
8070 fi
8071 rm -f core conftest.err conftest.$ac_objext \
8072     conftest$ac_exeext
8073   if ${ac_cv_search_fdatasync+:} false; then :
8074   break
8075 fi
8076 done
8077 if ${ac_cv_search_fdatasync+:} false; then :
8078
8079 else
8080   ac_cv_search_fdatasync=no
8081 fi
8082 rm conftest.$ac_ext
8083 LIBS=$ac_func_search_save_LIBS
8084 fi
8085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5
8086 $as_echo "$ac_cv_search_fdatasync" >&6; }
8087 ac_res=$ac_cv_search_fdatasync
8088 if test "$ac_res" != no; then :
8089   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8090
8091 fi
8092
8093 # Required for thread_test.c on Solaris 2.5:
8094 # Other ports use it too (HP-UX) so test unconditionally
8095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname_r" >&5
8096 $as_echo_n "checking for library containing gethostbyname_r... " >&6; }
8097 if ${ac_cv_search_gethostbyname_r+:} false; then :
8098   $as_echo_n "(cached) " >&6
8099 else
8100   ac_func_search_save_LIBS=$LIBS
8101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8102 /* end confdefs.h.  */
8103
8104 /* Override any GCC internal prototype to avoid an error.
8105    Use char because int might match the return type of a GCC
8106    builtin and then its argument prototype would still apply.  */
8107 #ifdef __cplusplus
8108 extern "C"
8109 #endif
8110 char gethostbyname_r ();
8111 int
8112 main ()
8113 {
8114 return gethostbyname_r ();
8115   ;
8116   return 0;
8117 }
8118 _ACEOF
8119 for ac_lib in '' nsl; do
8120   if test -z "$ac_lib"; then
8121     ac_res="none required"
8122   else
8123     ac_res=-l$ac_lib
8124     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8125   fi
8126   if ac_fn_c_try_link "$LINENO"; then :
8127   ac_cv_search_gethostbyname_r=$ac_res
8128 fi
8129 rm -f core conftest.err conftest.$ac_objext \
8130     conftest$ac_exeext
8131   if ${ac_cv_search_gethostbyname_r+:} false; then :
8132   break
8133 fi
8134 done
8135 if ${ac_cv_search_gethostbyname_r+:} false; then :
8136
8137 else
8138   ac_cv_search_gethostbyname_r=no
8139 fi
8140 rm conftest.$ac_ext
8141 LIBS=$ac_func_search_save_LIBS
8142 fi
8143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname_r" >&5
8144 $as_echo "$ac_cv_search_gethostbyname_r" >&6; }
8145 ac_res=$ac_cv_search_gethostbyname_r
8146 if test "$ac_res" != no; then :
8147   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8148
8149 fi
8150
8151 # Cygwin:
8152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shmget" >&5
8153 $as_echo_n "checking for library containing shmget... " >&6; }
8154 if ${ac_cv_search_shmget+:} false; then :
8155   $as_echo_n "(cached) " >&6
8156 else
8157   ac_func_search_save_LIBS=$LIBS
8158 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8159 /* end confdefs.h.  */
8160
8161 /* Override any GCC internal prototype to avoid an error.
8162    Use char because int might match the return type of a GCC
8163    builtin and then its argument prototype would still apply.  */
8164 #ifdef __cplusplus
8165 extern "C"
8166 #endif
8167 char shmget ();
8168 int
8169 main ()
8170 {
8171 return shmget ();
8172   ;
8173   return 0;
8174 }
8175 _ACEOF
8176 for ac_lib in '' cygipc; do
8177   if test -z "$ac_lib"; then
8178     ac_res="none required"
8179   else
8180     ac_res=-l$ac_lib
8181     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8182   fi
8183   if ac_fn_c_try_link "$LINENO"; then :
8184   ac_cv_search_shmget=$ac_res
8185 fi
8186 rm -f core conftest.err conftest.$ac_objext \
8187     conftest$ac_exeext
8188   if ${ac_cv_search_shmget+:} false; then :
8189   break
8190 fi
8191 done
8192 if ${ac_cv_search_shmget+:} false; then :
8193
8194 else
8195   ac_cv_search_shmget=no
8196 fi
8197 rm conftest.$ac_ext
8198 LIBS=$ac_func_search_save_LIBS
8199 fi
8200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shmget" >&5
8201 $as_echo "$ac_cv_search_shmget" >&6; }
8202 ac_res=$ac_cv_search_shmget
8203 if test "$ac_res" != no; then :
8204   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8205
8206 fi
8207
8208
8209 if test "$with_readline" = yes; then
8210
8211
8212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing readline" >&5
8213 $as_echo_n "checking for library containing readline... " >&6; }
8214 if ${pgac_cv_check_readline+:} false; then :
8215   $as_echo_n "(cached) " >&6
8216 else
8217   pgac_cv_check_readline=no
8218 pgac_save_LIBS=$LIBS
8219 if test x"$with_libedit_preferred" != x"yes"
8220 then    READLINE_ORDER="-lreadline -ledit"
8221 else    READLINE_ORDER="-ledit -lreadline"
8222 fi
8223 for pgac_rllib in $READLINE_ORDER ; do
8224   for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
8225     LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
8226     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8227 /* end confdefs.h.  */
8228
8229 /* Override any GCC internal prototype to avoid an error.
8230    Use char because int might match the return type of a GCC
8231    builtin and then its argument prototype would still apply.  */
8232 #ifdef __cplusplus
8233 extern "C"
8234 #endif
8235 char readline ();
8236 int
8237 main ()
8238 {
8239 return readline ();
8240   ;
8241   return 0;
8242 }
8243 _ACEOF
8244 if ac_fn_c_try_link "$LINENO"; then :
8245
8246       # Older NetBSD, OpenBSD, and Irix have a broken linker that does not
8247       # recognize dependent libraries; assume curses is needed if we didn't
8248       # find any dependency.
8249       case $host_os in
8250         netbsd* | openbsd* | irix*)
8251           if test x"$pgac_lib" = x"" ; then
8252             pgac_lib=" -lcurses"
8253           fi ;;
8254       esac
8255
8256       pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
8257       break
8258
8259 fi
8260 rm -f core conftest.err conftest.$ac_objext \
8261     conftest$ac_exeext conftest.$ac_ext
8262   done
8263   if test "$pgac_cv_check_readline" != no ; then
8264     break
8265   fi
8266 done
8267 LIBS=$pgac_save_LIBS
8268
8269 fi
8270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_readline" >&5
8271 $as_echo "$pgac_cv_check_readline" >&6; }
8272 if test "$pgac_cv_check_readline" != no ; then
8273   LIBS="$pgac_cv_check_readline $LIBS"
8274
8275 $as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
8276
8277 fi
8278
8279
8280   if test x"$pgac_cv_check_readline" = x"no"; then
8281     as_fn_error $? "readline library not found
8282 If you have readline already installed, see config.log for details on the
8283 failure.  It is possible the compiler isn't looking in the proper directory.
8284 Use --without-readline to disable readline support." "$LINENO" 5
8285   fi
8286 fi
8287
8288 if test "$with_zlib" = yes; then
8289   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5
8290 $as_echo_n "checking for inflate in -lz... " >&6; }
8291 if ${ac_cv_lib_z_inflate+:} false; then :
8292   $as_echo_n "(cached) " >&6
8293 else
8294   ac_check_lib_save_LIBS=$LIBS
8295 LIBS="-lz  $LIBS"
8296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8297 /* end confdefs.h.  */
8298
8299 /* Override any GCC internal prototype to avoid an error.
8300    Use char because int might match the return type of a GCC
8301    builtin and then its argument prototype would still apply.  */
8302 #ifdef __cplusplus
8303 extern "C"
8304 #endif
8305 char inflate ();
8306 int
8307 main ()
8308 {
8309 return inflate ();
8310   ;
8311   return 0;
8312 }
8313 _ACEOF
8314 if ac_fn_c_try_link "$LINENO"; then :
8315   ac_cv_lib_z_inflate=yes
8316 else
8317   ac_cv_lib_z_inflate=no
8318 fi
8319 rm -f core conftest.err conftest.$ac_objext \
8320     conftest$ac_exeext conftest.$ac_ext
8321 LIBS=$ac_check_lib_save_LIBS
8322 fi
8323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5
8324 $as_echo "$ac_cv_lib_z_inflate" >&6; }
8325 if test "x$ac_cv_lib_z_inflate" = xyes; then :
8326   cat >>confdefs.h <<_ACEOF
8327 #define HAVE_LIBZ 1
8328 _ACEOF
8329
8330   LIBS="-lz $LIBS"
8331
8332 else
8333   as_fn_error $? "zlib library not found
8334 If you have zlib already installed, see config.log for details on the
8335 failure.  It is possible the compiler isn't looking in the proper directory.
8336 Use --without-zlib to disable zlib support." "$LINENO" 5
8337 fi
8338
8339 fi
8340
8341 if test "$enable_spinlocks" = yes; then
8342
8343 $as_echo "#define HAVE_SPINLOCKS 1" >>confdefs.h
8344
8345 else
8346   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
8347 *** Not using spinlocks will cause poor performance." >&5
8348 $as_echo "$as_me: WARNING:
8349 *** Not using spinlocks will cause poor performance." >&2;}
8350 fi
8351
8352 if test "$with_gssapi" = yes ; then
8353   if test "$PORTNAME" != "win32"; then
8354     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gss_init_sec_context" >&5
8355 $as_echo_n "checking for library containing gss_init_sec_context... " >&6; }
8356 if ${ac_cv_search_gss_init_sec_context+:} false; then :
8357   $as_echo_n "(cached) " >&6
8358 else
8359   ac_func_search_save_LIBS=$LIBS
8360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8361 /* end confdefs.h.  */
8362
8363 /* Override any GCC internal prototype to avoid an error.
8364    Use char because int might match the return type of a GCC
8365    builtin and then its argument prototype would still apply.  */
8366 #ifdef __cplusplus
8367 extern "C"
8368 #endif
8369 char gss_init_sec_context ();
8370 int
8371 main ()
8372 {
8373 return gss_init_sec_context ();
8374   ;
8375   return 0;
8376 }
8377 _ACEOF
8378 for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'; do
8379   if test -z "$ac_lib"; then
8380     ac_res="none required"
8381   else
8382     ac_res=-l$ac_lib
8383     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8384   fi
8385   if ac_fn_c_try_link "$LINENO"; then :
8386   ac_cv_search_gss_init_sec_context=$ac_res
8387 fi
8388 rm -f core conftest.err conftest.$ac_objext \
8389     conftest$ac_exeext
8390   if ${ac_cv_search_gss_init_sec_context+:} false; then :
8391   break
8392 fi
8393 done
8394 if ${ac_cv_search_gss_init_sec_context+:} false; then :
8395
8396 else
8397   ac_cv_search_gss_init_sec_context=no
8398 fi
8399 rm conftest.$ac_ext
8400 LIBS=$ac_func_search_save_LIBS
8401 fi
8402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gss_init_sec_context" >&5
8403 $as_echo "$ac_cv_search_gss_init_sec_context" >&6; }
8404 ac_res=$ac_cv_search_gss_init_sec_context
8405 if test "$ac_res" != no; then :
8406   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8407
8408 else
8409   as_fn_error $? "could not find function 'gss_init_sec_context' required for GSSAPI" "$LINENO" 5
8410 fi
8411
8412   else
8413     LIBS="$LIBS -lgssapi32"
8414   fi
8415 fi
8416
8417 if test "$with_openssl" = yes ; then
8418     if test "$PORTNAME" != "win32"; then
8419      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_new_ex_data in -lcrypto" >&5
8420 $as_echo_n "checking for CRYPTO_new_ex_data in -lcrypto... " >&6; }
8421 if ${ac_cv_lib_crypto_CRYPTO_new_ex_data+:} false; then :
8422   $as_echo_n "(cached) " >&6
8423 else
8424   ac_check_lib_save_LIBS=$LIBS
8425 LIBS="-lcrypto  $LIBS"
8426 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8427 /* end confdefs.h.  */
8428
8429 /* Override any GCC internal prototype to avoid an error.
8430    Use char because int might match the return type of a GCC
8431    builtin and then its argument prototype would still apply.  */
8432 #ifdef __cplusplus
8433 extern "C"
8434 #endif
8435 char CRYPTO_new_ex_data ();
8436 int
8437 main ()
8438 {
8439 return CRYPTO_new_ex_data ();
8440   ;
8441   return 0;
8442 }
8443 _ACEOF
8444 if ac_fn_c_try_link "$LINENO"; then :
8445   ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
8446 else
8447   ac_cv_lib_crypto_CRYPTO_new_ex_data=no
8448 fi
8449 rm -f core conftest.err conftest.$ac_objext \
8450     conftest$ac_exeext conftest.$ac_ext
8451 LIBS=$ac_check_lib_save_LIBS
8452 fi
8453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
8454 $as_echo "$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6; }
8455 if test "x$ac_cv_lib_crypto_CRYPTO_new_ex_data" = xyes; then :
8456   cat >>confdefs.h <<_ACEOF
8457 #define HAVE_LIBCRYPTO 1
8458 _ACEOF
8459
8460   LIBS="-lcrypto $LIBS"
8461
8462 else
8463   as_fn_error $? "library 'crypto' is required for OpenSSL" "$LINENO" 5
8464 fi
8465
8466      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_library_init in -lssl" >&5
8467 $as_echo_n "checking for SSL_library_init in -lssl... " >&6; }
8468 if ${ac_cv_lib_ssl_SSL_library_init+:} false; then :
8469   $as_echo_n "(cached) " >&6
8470 else
8471   ac_check_lib_save_LIBS=$LIBS
8472 LIBS="-lssl  $LIBS"
8473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8474 /* end confdefs.h.  */
8475
8476 /* Override any GCC internal prototype to avoid an error.
8477    Use char because int might match the return type of a GCC
8478    builtin and then its argument prototype would still apply.  */
8479 #ifdef __cplusplus
8480 extern "C"
8481 #endif
8482 char SSL_library_init ();
8483 int
8484 main ()
8485 {
8486 return SSL_library_init ();
8487   ;
8488   return 0;
8489 }
8490 _ACEOF
8491 if ac_fn_c_try_link "$LINENO"; then :
8492   ac_cv_lib_ssl_SSL_library_init=yes
8493 else
8494   ac_cv_lib_ssl_SSL_library_init=no
8495 fi
8496 rm -f core conftest.err conftest.$ac_objext \
8497     conftest$ac_exeext conftest.$ac_ext
8498 LIBS=$ac_check_lib_save_LIBS
8499 fi
8500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_library_init" >&5
8501 $as_echo "$ac_cv_lib_ssl_SSL_library_init" >&6; }
8502 if test "x$ac_cv_lib_ssl_SSL_library_init" = xyes; then :
8503   cat >>confdefs.h <<_ACEOF
8504 #define HAVE_LIBSSL 1
8505 _ACEOF
8506
8507   LIBS="-lssl $LIBS"
8508
8509 else
8510   as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5
8511 fi
8512
8513   else
8514      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing CRYPTO_new_ex_data" >&5
8515 $as_echo_n "checking for library containing CRYPTO_new_ex_data... " >&6; }
8516 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
8517   $as_echo_n "(cached) " >&6
8518 else
8519   ac_func_search_save_LIBS=$LIBS
8520 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8521 /* end confdefs.h.  */
8522
8523 /* Override any GCC internal prototype to avoid an error.
8524    Use char because int might match the return type of a GCC
8525    builtin and then its argument prototype would still apply.  */
8526 #ifdef __cplusplus
8527 extern "C"
8528 #endif
8529 char CRYPTO_new_ex_data ();
8530 int
8531 main ()
8532 {
8533 return CRYPTO_new_ex_data ();
8534   ;
8535   return 0;
8536 }
8537 _ACEOF
8538 for ac_lib in '' eay32 crypto; do
8539   if test -z "$ac_lib"; then
8540     ac_res="none required"
8541   else
8542     ac_res=-l$ac_lib
8543     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8544   fi
8545   if ac_fn_c_try_link "$LINENO"; then :
8546   ac_cv_search_CRYPTO_new_ex_data=$ac_res
8547 fi
8548 rm -f core conftest.err conftest.$ac_objext \
8549     conftest$ac_exeext
8550   if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
8551   break
8552 fi
8553 done
8554 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
8555
8556 else
8557   ac_cv_search_CRYPTO_new_ex_data=no
8558 fi
8559 rm conftest.$ac_ext
8560 LIBS=$ac_func_search_save_LIBS
8561 fi
8562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_CRYPTO_new_ex_data" >&5
8563 $as_echo "$ac_cv_search_CRYPTO_new_ex_data" >&6; }
8564 ac_res=$ac_cv_search_CRYPTO_new_ex_data
8565 if test "$ac_res" != no; then :
8566   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8567
8568 else
8569   as_fn_error $? "library 'eay32' or 'crypto' is required for OpenSSL" "$LINENO" 5
8570 fi
8571
8572      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_library_init" >&5
8573 $as_echo_n "checking for library containing SSL_library_init... " >&6; }
8574 if ${ac_cv_search_SSL_library_init+:} false; then :
8575   $as_echo_n "(cached) " >&6
8576 else
8577   ac_func_search_save_LIBS=$LIBS
8578 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8579 /* end confdefs.h.  */
8580
8581 /* Override any GCC internal prototype to avoid an error.
8582    Use char because int might match the return type of a GCC
8583    builtin and then its argument prototype would still apply.  */
8584 #ifdef __cplusplus
8585 extern "C"
8586 #endif
8587 char SSL_library_init ();
8588 int
8589 main ()
8590 {
8591 return SSL_library_init ();
8592   ;
8593   return 0;
8594 }
8595 _ACEOF
8596 for ac_lib in '' ssleay32 ssl; do
8597   if test -z "$ac_lib"; then
8598     ac_res="none required"
8599   else
8600     ac_res=-l$ac_lib
8601     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8602   fi
8603   if ac_fn_c_try_link "$LINENO"; then :
8604   ac_cv_search_SSL_library_init=$ac_res
8605 fi
8606 rm -f core conftest.err conftest.$ac_objext \
8607     conftest$ac_exeext
8608   if ${ac_cv_search_SSL_library_init+:} false; then :
8609   break
8610 fi
8611 done
8612 if ${ac_cv_search_SSL_library_init+:} false; then :
8613
8614 else
8615   ac_cv_search_SSL_library_init=no
8616 fi
8617 rm conftest.$ac_ext
8618 LIBS=$ac_func_search_save_LIBS
8619 fi
8620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_library_init" >&5
8621 $as_echo "$ac_cv_search_SSL_library_init" >&6; }
8622 ac_res=$ac_cv_search_SSL_library_init
8623 if test "$ac_res" != no; then :
8624   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8625
8626 else
8627   as_fn_error $? "library 'ssleay32' or 'ssl' is required for OpenSSL" "$LINENO" 5
8628 fi
8629
8630   fi
8631 fi
8632
8633 if test "$with_pam" = yes ; then
8634   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_start in -lpam" >&5
8635 $as_echo_n "checking for pam_start in -lpam... " >&6; }
8636 if ${ac_cv_lib_pam_pam_start+:} false; then :
8637   $as_echo_n "(cached) " >&6
8638 else
8639   ac_check_lib_save_LIBS=$LIBS
8640 LIBS="-lpam  $LIBS"
8641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8642 /* end confdefs.h.  */
8643
8644 /* Override any GCC internal prototype to avoid an error.
8645    Use char because int might match the return type of a GCC
8646    builtin and then its argument prototype would still apply.  */
8647 #ifdef __cplusplus
8648 extern "C"
8649 #endif
8650 char pam_start ();
8651 int
8652 main ()
8653 {
8654 return pam_start ();
8655   ;
8656   return 0;
8657 }
8658 _ACEOF
8659 if ac_fn_c_try_link "$LINENO"; then :
8660   ac_cv_lib_pam_pam_start=yes
8661 else
8662   ac_cv_lib_pam_pam_start=no
8663 fi
8664 rm -f core conftest.err conftest.$ac_objext \
8665     conftest$ac_exeext conftest.$ac_ext
8666 LIBS=$ac_check_lib_save_LIBS
8667 fi
8668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_start" >&5
8669 $as_echo "$ac_cv_lib_pam_pam_start" >&6; }
8670 if test "x$ac_cv_lib_pam_pam_start" = xyes; then :
8671   cat >>confdefs.h <<_ACEOF
8672 #define HAVE_LIBPAM 1
8673 _ACEOF
8674
8675   LIBS="-lpam $LIBS"
8676
8677 else
8678   as_fn_error $? "library 'pam' is required for PAM" "$LINENO" 5
8679 fi
8680
8681 fi
8682
8683 if test "$with_libxml" = yes ; then
8684   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlSaveToBuffer in -lxml2" >&5
8685 $as_echo_n "checking for xmlSaveToBuffer in -lxml2... " >&6; }
8686 if ${ac_cv_lib_xml2_xmlSaveToBuffer+:} false; then :
8687   $as_echo_n "(cached) " >&6
8688 else
8689   ac_check_lib_save_LIBS=$LIBS
8690 LIBS="-lxml2  $LIBS"
8691 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8692 /* end confdefs.h.  */
8693
8694 /* Override any GCC internal prototype to avoid an error.
8695    Use char because int might match the return type of a GCC
8696    builtin and then its argument prototype would still apply.  */
8697 #ifdef __cplusplus
8698 extern "C"
8699 #endif
8700 char xmlSaveToBuffer ();
8701 int
8702 main ()
8703 {
8704 return xmlSaveToBuffer ();
8705   ;
8706   return 0;
8707 }
8708 _ACEOF
8709 if ac_fn_c_try_link "$LINENO"; then :
8710   ac_cv_lib_xml2_xmlSaveToBuffer=yes
8711 else
8712   ac_cv_lib_xml2_xmlSaveToBuffer=no
8713 fi
8714 rm -f core conftest.err conftest.$ac_objext \
8715     conftest$ac_exeext conftest.$ac_ext
8716 LIBS=$ac_check_lib_save_LIBS
8717 fi
8718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlSaveToBuffer" >&5
8719 $as_echo "$ac_cv_lib_xml2_xmlSaveToBuffer" >&6; }
8720 if test "x$ac_cv_lib_xml2_xmlSaveToBuffer" = xyes; then :
8721   cat >>confdefs.h <<_ACEOF
8722 #define HAVE_LIBXML2 1
8723 _ACEOF
8724
8725   LIBS="-lxml2 $LIBS"
8726
8727 else
8728   as_fn_error $? "library 'xml2' (version >= 2.6.23) is required for XML support" "$LINENO" 5
8729 fi
8730
8731 fi
8732
8733 if test "$with_libxslt" = yes ; then
8734   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xsltCleanupGlobals in -lxslt" >&5
8735 $as_echo_n "checking for xsltCleanupGlobals in -lxslt... " >&6; }
8736 if ${ac_cv_lib_xslt_xsltCleanupGlobals+:} false; then :
8737   $as_echo_n "(cached) " >&6
8738 else
8739   ac_check_lib_save_LIBS=$LIBS
8740 LIBS="-lxslt  $LIBS"
8741 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8742 /* end confdefs.h.  */
8743
8744 /* Override any GCC internal prototype to avoid an error.
8745    Use char because int might match the return type of a GCC
8746    builtin and then its argument prototype would still apply.  */
8747 #ifdef __cplusplus
8748 extern "C"
8749 #endif
8750 char xsltCleanupGlobals ();
8751 int
8752 main ()
8753 {
8754 return xsltCleanupGlobals ();
8755   ;
8756   return 0;
8757 }
8758 _ACEOF
8759 if ac_fn_c_try_link "$LINENO"; then :
8760   ac_cv_lib_xslt_xsltCleanupGlobals=yes
8761 else
8762   ac_cv_lib_xslt_xsltCleanupGlobals=no
8763 fi
8764 rm -f core conftest.err conftest.$ac_objext \
8765     conftest$ac_exeext conftest.$ac_ext
8766 LIBS=$ac_check_lib_save_LIBS
8767 fi
8768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xslt_xsltCleanupGlobals" >&5
8769 $as_echo "$ac_cv_lib_xslt_xsltCleanupGlobals" >&6; }
8770 if test "x$ac_cv_lib_xslt_xsltCleanupGlobals" = xyes; then :
8771   cat >>confdefs.h <<_ACEOF
8772 #define HAVE_LIBXSLT 1
8773 _ACEOF
8774
8775   LIBS="-lxslt $LIBS"
8776
8777 else
8778   as_fn_error $? "library 'xslt' is required for XSLT support" "$LINENO" 5
8779 fi
8780
8781 fi
8782
8783 # for contrib/sepgsql
8784 if test "$with_selinux" = yes; then
8785   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_compute_create_name in -lselinux" >&5
8786 $as_echo_n "checking for security_compute_create_name in -lselinux... " >&6; }
8787 if ${ac_cv_lib_selinux_security_compute_create_name+:} false; then :
8788   $as_echo_n "(cached) " >&6
8789 else
8790   ac_check_lib_save_LIBS=$LIBS
8791 LIBS="-lselinux  $LIBS"
8792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8793 /* end confdefs.h.  */
8794
8795 /* Override any GCC internal prototype to avoid an error.
8796    Use char because int might match the return type of a GCC
8797    builtin and then its argument prototype would still apply.  */
8798 #ifdef __cplusplus
8799 extern "C"
8800 #endif
8801 char security_compute_create_name ();
8802 int
8803 main ()
8804 {
8805 return security_compute_create_name ();
8806   ;
8807   return 0;
8808 }
8809 _ACEOF
8810 if ac_fn_c_try_link "$LINENO"; then :
8811   ac_cv_lib_selinux_security_compute_create_name=yes
8812 else
8813   ac_cv_lib_selinux_security_compute_create_name=no
8814 fi
8815 rm -f core conftest.err conftest.$ac_objext \
8816     conftest$ac_exeext conftest.$ac_ext
8817 LIBS=$ac_check_lib_save_LIBS
8818 fi
8819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_compute_create_name" >&5
8820 $as_echo "$ac_cv_lib_selinux_security_compute_create_name" >&6; }
8821 if test "x$ac_cv_lib_selinux_security_compute_create_name" = xyes; then :
8822   cat >>confdefs.h <<_ACEOF
8823 #define HAVE_LIBSELINUX 1
8824 _ACEOF
8825
8826   LIBS="-lselinux $LIBS"
8827
8828 else
8829   as_fn_error $? "library 'libselinux', version 2.1.10 or newer, is required for SELinux support" "$LINENO" 5
8830 fi
8831
8832 fi
8833
8834 # for contrib/uuid-ossp
8835 if test "$with_uuid" = bsd ; then
8836   # On BSD, the UUID functions are in libc
8837   ac_fn_c_check_func "$LINENO" "uuid_to_string" "ac_cv_func_uuid_to_string"
8838 if test "x$ac_cv_func_uuid_to_string" = xyes; then :
8839   UUID_LIBS=""
8840 else
8841   as_fn_error $? "BSD UUID functions are not present" "$LINENO" 5
8842 fi
8843
8844 elif test "$with_uuid" = e2fs ; then
8845   # On OS X, the UUID functions are in libc
8846   ac_fn_c_check_func "$LINENO" "uuid_generate" "ac_cv_func_uuid_generate"
8847 if test "x$ac_cv_func_uuid_generate" = xyes; then :
8848   UUID_LIBS=""
8849 else
8850   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5
8851 $as_echo_n "checking for uuid_generate in -luuid... " >&6; }
8852 if ${ac_cv_lib_uuid_uuid_generate+:} false; then :
8853   $as_echo_n "(cached) " >&6
8854 else
8855   ac_check_lib_save_LIBS=$LIBS
8856 LIBS="-luuid  $LIBS"
8857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8858 /* end confdefs.h.  */
8859
8860 /* Override any GCC internal prototype to avoid an error.
8861    Use char because int might match the return type of a GCC
8862    builtin and then its argument prototype would still apply.  */
8863 #ifdef __cplusplus
8864 extern "C"
8865 #endif
8866 char uuid_generate ();
8867 int
8868 main ()
8869 {
8870 return uuid_generate ();
8871   ;
8872   return 0;
8873 }
8874 _ACEOF
8875 if ac_fn_c_try_link "$LINENO"; then :
8876   ac_cv_lib_uuid_uuid_generate=yes
8877 else
8878   ac_cv_lib_uuid_uuid_generate=no
8879 fi
8880 rm -f core conftest.err conftest.$ac_objext \
8881     conftest$ac_exeext conftest.$ac_ext
8882 LIBS=$ac_check_lib_save_LIBS
8883 fi
8884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate" >&5
8885 $as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; }
8886 if test "x$ac_cv_lib_uuid_uuid_generate" = xyes; then :
8887   UUID_LIBS="-luuid"
8888 else
8889   as_fn_error $? "library 'uuid' is required for E2FS UUID" "$LINENO" 5
8890 fi
8891
8892 fi
8893
8894 elif test "$with_uuid" = ossp ; then
8895   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -lossp-uuid" >&5
8896 $as_echo_n "checking for uuid_export in -lossp-uuid... " >&6; }
8897 if ${ac_cv_lib_ossp_uuid_uuid_export+:} false; then :
8898   $as_echo_n "(cached) " >&6
8899 else
8900   ac_check_lib_save_LIBS=$LIBS
8901 LIBS="-lossp-uuid  $LIBS"
8902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8903 /* end confdefs.h.  */
8904
8905 /* Override any GCC internal prototype to avoid an error.
8906    Use char because int might match the return type of a GCC
8907    builtin and then its argument prototype would still apply.  */
8908 #ifdef __cplusplus
8909 extern "C"
8910 #endif
8911 char uuid_export ();
8912 int
8913 main ()
8914 {
8915 return uuid_export ();
8916   ;
8917   return 0;
8918 }
8919 _ACEOF
8920 if ac_fn_c_try_link "$LINENO"; then :
8921   ac_cv_lib_ossp_uuid_uuid_export=yes
8922 else
8923   ac_cv_lib_ossp_uuid_uuid_export=no
8924 fi
8925 rm -f core conftest.err conftest.$ac_objext \
8926     conftest$ac_exeext conftest.$ac_ext
8927 LIBS=$ac_check_lib_save_LIBS
8928 fi
8929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossp_uuid_uuid_export" >&5
8930 $as_echo "$ac_cv_lib_ossp_uuid_uuid_export" >&6; }
8931 if test "x$ac_cv_lib_ossp_uuid_uuid_export" = xyes; then :
8932   UUID_LIBS="-lossp-uuid"
8933 else
8934   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -luuid" >&5
8935 $as_echo_n "checking for uuid_export in -luuid... " >&6; }
8936 if ${ac_cv_lib_uuid_uuid_export+:} false; then :
8937   $as_echo_n "(cached) " >&6
8938 else
8939   ac_check_lib_save_LIBS=$LIBS
8940 LIBS="-luuid  $LIBS"
8941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8942 /* end confdefs.h.  */
8943
8944 /* Override any GCC internal prototype to avoid an error.
8945    Use char because int might match the return type of a GCC
8946    builtin and then its argument prototype would still apply.  */
8947 #ifdef __cplusplus
8948 extern "C"
8949 #endif
8950 char uuid_export ();
8951 int
8952 main ()
8953 {
8954 return uuid_export ();
8955   ;
8956   return 0;
8957 }
8958 _ACEOF
8959 if ac_fn_c_try_link "$LINENO"; then :
8960   ac_cv_lib_uuid_uuid_export=yes
8961 else
8962   ac_cv_lib_uuid_uuid_export=no
8963 fi
8964 rm -f core conftest.err conftest.$ac_objext \
8965     conftest$ac_exeext conftest.$ac_ext
8966 LIBS=$ac_check_lib_save_LIBS
8967 fi
8968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_export" >&5
8969 $as_echo "$ac_cv_lib_uuid_uuid_export" >&6; }
8970 if test "x$ac_cv_lib_uuid_uuid_export" = xyes; then :
8971   UUID_LIBS="-luuid"
8972 else
8973   as_fn_error $? "library 'ossp-uuid' or 'uuid' is required for OSSP UUID" "$LINENO" 5
8974 fi
8975
8976 fi
8977
8978 fi
8979
8980
8981
8982 ##
8983 ## Header files
8984 ##
8985
8986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
8987 $as_echo_n "checking for ANSI C header files... " >&6; }
8988 if ${ac_cv_header_stdc+:} false; then :
8989   $as_echo_n "(cached) " >&6
8990 else
8991   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8992 /* end confdefs.h.  */
8993 #include <stdlib.h>
8994 #include <stdarg.h>
8995 #include <string.h>
8996 #include <float.h>
8997
8998 int
8999 main ()
9000 {
9001
9002   ;
9003   return 0;
9004 }
9005 _ACEOF
9006 if ac_fn_c_try_compile "$LINENO"; then :
9007   ac_cv_header_stdc=yes
9008 else
9009   ac_cv_header_stdc=no
9010 fi
9011 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9012
9013 if test $ac_cv_header_stdc = yes; then
9014   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
9015   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9016 /* end confdefs.h.  */
9017 #include <string.h>
9018
9019 _ACEOF
9020 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9021   $EGREP "memchr" >/dev/null 2>&1; then :
9022
9023 else
9024   ac_cv_header_stdc=no
9025 fi
9026 rm -f conftest*
9027
9028 fi
9029
9030 if test $ac_cv_header_stdc = yes; then
9031   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
9032   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9033 /* end confdefs.h.  */
9034 #include <stdlib.h>
9035
9036 _ACEOF
9037 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9038   $EGREP "free" >/dev/null 2>&1; then :
9039
9040 else
9041   ac_cv_header_stdc=no
9042 fi
9043 rm -f conftest*
9044
9045 fi
9046
9047 if test $ac_cv_header_stdc = yes; then
9048   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
9049   if test "$cross_compiling" = yes; then :
9050   :
9051 else
9052   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9053 /* end confdefs.h.  */
9054 #include <ctype.h>
9055 #include <stdlib.h>
9056 #if ((' ' & 0x0FF) == 0x020)
9057 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
9058 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
9059 #else
9060 # define ISLOWER(c) \
9061                    (('a' <= (c) && (c) <= 'i') \
9062                      || ('j' <= (c) && (c) <= 'r') \
9063                      || ('s' <= (c) && (c) <= 'z'))
9064 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
9065 #endif
9066
9067 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
9068 int
9069 main ()
9070 {
9071   int i;
9072   for (i = 0; i < 256; i++)
9073     if (XOR (islower (i), ISLOWER (i))
9074         || toupper (i) != TOUPPER (i))
9075       return 2;
9076   return 0;
9077 }
9078 _ACEOF
9079 if ac_fn_c_try_run "$LINENO"; then :
9080
9081 else
9082   ac_cv_header_stdc=no
9083 fi
9084 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9085   conftest.$ac_objext conftest.beam conftest.$ac_ext
9086 fi
9087
9088 fi
9089 fi
9090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
9091 $as_echo "$ac_cv_header_stdc" >&6; }
9092 if test $ac_cv_header_stdc = yes; then
9093
9094 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
9095
9096 fi
9097
9098 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
9099 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
9100                   inttypes.h stdint.h unistd.h
9101 do :
9102   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9103 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
9104 "
9105 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9106   cat >>confdefs.h <<_ACEOF
9107 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9108 _ACEOF
9109
9110 fi
9111
9112 done
9113
9114
9115 for ac_header in crypt.h dld.h fp_class.h getopt.h ieeefp.h ifaddrs.h langinfo.h poll.h pwd.h sys/ioctl.h sys/ipc.h sys/poll.h sys/pstat.h sys/resource.h sys/select.h sys/sem.h sys/shm.h sys/socket.h sys/sockio.h sys/tas.h sys/time.h sys/un.h termios.h ucred.h utime.h wchar.h wctype.h
9116 do :
9117   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9118 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9119 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9120   cat >>confdefs.h <<_ACEOF
9121 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9122 _ACEOF
9123
9124 fi
9125
9126 done
9127
9128
9129 # On BSD, test for net/if.h will fail unless sys/socket.h
9130 # is included first.
9131 for ac_header in net/if.h
9132 do :
9133   ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
9134 #ifdef HAVE_SYS_SOCKET_H
9135 #include <sys/socket.h>
9136 #endif
9137
9138 "
9139 if test "x$ac_cv_header_net_if_h" = xyes; then :
9140   cat >>confdefs.h <<_ACEOF
9141 #define HAVE_NET_IF_H 1
9142 _ACEOF
9143
9144 fi
9145
9146 done
9147
9148
9149 # On OpenBSD, test for sys/ucred.h will fail unless sys/param.h
9150 # is included first.
9151 for ac_header in sys/ucred.h
9152 do :
9153   ac_fn_c_check_header_compile "$LINENO" "sys/ucred.h" "ac_cv_header_sys_ucred_h" "$ac_includes_default
9154 #include <sys/param.h>
9155
9156 "
9157 if test "x$ac_cv_header_sys_ucred_h" = xyes; then :
9158   cat >>confdefs.h <<_ACEOF
9159 #define HAVE_SYS_UCRED_H 1
9160 _ACEOF
9161
9162 fi
9163
9164 done
9165
9166
9167 # At least on IRIX, test for netinet/tcp.h will fail unless
9168 # netinet/in.h is included first.
9169 for ac_header in netinet/in.h
9170 do :
9171   ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
9172 if test "x$ac_cv_header_netinet_in_h" = xyes; then :
9173   cat >>confdefs.h <<_ACEOF
9174 #define HAVE_NETINET_IN_H 1
9175 _ACEOF
9176
9177 fi
9178
9179 done
9180
9181 for ac_header in netinet/tcp.h
9182 do :
9183   ac_fn_c_check_header_compile "$LINENO" "netinet/tcp.h" "ac_cv_header_netinet_tcp_h" "$ac_includes_default
9184 #ifdef HAVE_NETINET_IN_H
9185 #include <netinet/in.h>
9186 #endif
9187
9188 "
9189 if test "x$ac_cv_header_netinet_tcp_h" = xyes; then :
9190   cat >>confdefs.h <<_ACEOF
9191 #define HAVE_NETINET_TCP_H 1
9192 _ACEOF
9193
9194 fi
9195
9196 done
9197
9198
9199 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
9200   for ac_header in readline/readline.h
9201 do :
9202   ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
9203 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
9204   cat >>confdefs.h <<_ACEOF
9205 #define HAVE_READLINE_READLINE_H 1
9206 _ACEOF
9207
9208 else
9209   for ac_header in readline.h
9210 do :
9211   ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
9212 if test "x$ac_cv_header_readline_h" = xyes; then :
9213   cat >>confdefs.h <<_ACEOF
9214 #define HAVE_READLINE_H 1
9215 _ACEOF
9216
9217 else
9218   as_fn_error $? "readline header not found
9219 If you have readline already installed, see config.log for details on the
9220 failure.  It is possible the compiler isn't looking in the proper directory.
9221 Use --without-readline to disable readline support." "$LINENO" 5
9222 fi
9223
9224 done
9225
9226 fi
9227
9228 done
9229
9230   for ac_header in readline/history.h
9231 do :
9232   ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
9233 if test "x$ac_cv_header_readline_history_h" = xyes; then :
9234   cat >>confdefs.h <<_ACEOF
9235 #define HAVE_READLINE_HISTORY_H 1
9236 _ACEOF
9237
9238 else
9239   for ac_header in history.h
9240 do :
9241   ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
9242 if test "x$ac_cv_header_history_h" = xyes; then :
9243   cat >>confdefs.h <<_ACEOF
9244 #define HAVE_HISTORY_H 1
9245 _ACEOF
9246
9247 else
9248   as_fn_error $? "history header not found
9249 If you have readline already installed, see config.log for details on the
9250 failure.  It is possible the compiler isn't looking in the proper directory.
9251 Use --without-readline to disable readline support." "$LINENO" 5
9252 fi
9253
9254 done
9255
9256 fi
9257
9258 done
9259
9260 fi
9261
9262 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
9263 # Some installations of libedit usurp /usr/include/readline/, which seems
9264 # bad practice, since in combined installations readline will have its headers
9265 # there.  We might have to resort to AC_EGREP checks to make sure we found
9266 # the proper header...
9267   for ac_header in editline/readline.h
9268 do :
9269   ac_fn_c_check_header_mongrel "$LINENO" "editline/readline.h" "ac_cv_header_editline_readline_h" "$ac_includes_default"
9270 if test "x$ac_cv_header_editline_readline_h" = xyes; then :
9271   cat >>confdefs.h <<_ACEOF
9272 #define HAVE_EDITLINE_READLINE_H 1
9273 _ACEOF
9274
9275 else
9276   for ac_header in readline.h
9277 do :
9278   ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
9279 if test "x$ac_cv_header_readline_h" = xyes; then :
9280   cat >>confdefs.h <<_ACEOF
9281 #define HAVE_READLINE_H 1
9282 _ACEOF
9283
9284 else
9285   for ac_header in readline/readline.h
9286 do :
9287   ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
9288 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
9289   cat >>confdefs.h <<_ACEOF
9290 #define HAVE_READLINE_READLINE_H 1
9291 _ACEOF
9292
9293 else
9294   as_fn_error $? "readline header not found
9295 If you have libedit already installed, see config.log for details on the
9296 failure.  It is possible the compiler isn't looking in the proper directory.
9297 Use --without-readline to disable libedit support." "$LINENO" 5
9298 fi
9299
9300 done
9301
9302 fi
9303
9304 done
9305
9306 fi
9307
9308 done
9309
9310 # Note: in a libedit installation, history.h is sometimes a dummy, and may
9311 # not be there at all.  Hence, don't complain if not found.  We must check
9312 # though, since in yet other versions it is an independent header.
9313   for ac_header in editline/history.h
9314 do :
9315   ac_fn_c_check_header_mongrel "$LINENO" "editline/history.h" "ac_cv_header_editline_history_h" "$ac_includes_default"
9316 if test "x$ac_cv_header_editline_history_h" = xyes; then :
9317   cat >>confdefs.h <<_ACEOF
9318 #define HAVE_EDITLINE_HISTORY_H 1
9319 _ACEOF
9320
9321 else
9322   for ac_header in history.h
9323 do :
9324   ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
9325 if test "x$ac_cv_header_history_h" = xyes; then :
9326   cat >>confdefs.h <<_ACEOF
9327 #define HAVE_HISTORY_H 1
9328 _ACEOF
9329
9330 else
9331   for ac_header in readline/history.h
9332 do :
9333   ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
9334 if test "x$ac_cv_header_readline_history_h" = xyes; then :
9335   cat >>confdefs.h <<_ACEOF
9336 #define HAVE_READLINE_HISTORY_H 1
9337 _ACEOF
9338
9339 fi
9340
9341 done
9342
9343 fi
9344
9345 done
9346
9347 fi
9348
9349 done
9350
9351 fi
9352
9353 if test "$with_zlib" = yes; then
9354   ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
9355 if test "x$ac_cv_header_zlib_h" = xyes; then :
9356
9357 else
9358   as_fn_error $? "zlib header not found
9359 If you have zlib already installed, see config.log for details on the
9360 failure.  It is possible the compiler isn't looking in the proper directory.
9361 Use --without-zlib to disable zlib support." "$LINENO" 5
9362 fi
9363
9364
9365 fi
9366
9367 if test "$with_gssapi" = yes ; then
9368   for ac_header in gssapi/gssapi.h
9369 do :
9370   ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi.h" "ac_cv_header_gssapi_gssapi_h" "$ac_includes_default"
9371 if test "x$ac_cv_header_gssapi_gssapi_h" = xyes; then :
9372   cat >>confdefs.h <<_ACEOF
9373 #define HAVE_GSSAPI_GSSAPI_H 1
9374 _ACEOF
9375
9376 else
9377   for ac_header in gssapi.h
9378 do :
9379   ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
9380 if test "x$ac_cv_header_gssapi_h" = xyes; then :
9381   cat >>confdefs.h <<_ACEOF
9382 #define HAVE_GSSAPI_H 1
9383 _ACEOF
9384
9385 else
9386   as_fn_error $? "gssapi.h header file is required for GSSAPI" "$LINENO" 5
9387 fi
9388
9389 done
9390
9391 fi
9392
9393 done
9394
9395 fi
9396
9397 if test "$with_openssl" = yes ; then
9398   ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
9399 if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
9400
9401 else
9402   as_fn_error $? "header file <openssl/ssl.h> is required for OpenSSL" "$LINENO" 5
9403 fi
9404
9405
9406   ac_fn_c_check_header_mongrel "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default"
9407 if test "x$ac_cv_header_openssl_err_h" = xyes; then :
9408
9409 else
9410   as_fn_error $? "header file <openssl/err.h> is required for OpenSSL" "$LINENO" 5
9411 fi
9412
9413
9414 fi
9415
9416 if test "$with_pam" = yes ; then
9417   for ac_header in security/pam_appl.h
9418 do :
9419   ac_fn_c_check_header_mongrel "$LINENO" "security/pam_appl.h" "ac_cv_header_security_pam_appl_h" "$ac_includes_default"
9420 if test "x$ac_cv_header_security_pam_appl_h" = xyes; then :
9421   cat >>confdefs.h <<_ACEOF
9422 #define HAVE_SECURITY_PAM_APPL_H 1
9423 _ACEOF
9424
9425 else
9426   for ac_header in pam/pam_appl.h
9427 do :
9428   ac_fn_c_check_header_mongrel "$LINENO" "pam/pam_appl.h" "ac_cv_header_pam_pam_appl_h" "$ac_includes_default"
9429 if test "x$ac_cv_header_pam_pam_appl_h" = xyes; then :
9430   cat >>confdefs.h <<_ACEOF
9431 #define HAVE_PAM_PAM_APPL_H 1
9432 _ACEOF
9433
9434 else
9435   as_fn_error $? "header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." "$LINENO" 5
9436 fi
9437
9438 done
9439
9440 fi
9441
9442 done
9443
9444 fi
9445
9446 if test "$with_libxml" = yes ; then
9447   ac_fn_c_check_header_mongrel "$LINENO" "libxml/parser.h" "ac_cv_header_libxml_parser_h" "$ac_includes_default"
9448 if test "x$ac_cv_header_libxml_parser_h" = xyes; then :
9449
9450 else
9451   as_fn_error $? "header file <libxml/parser.h> is required for XML support" "$LINENO" 5
9452 fi
9453
9454
9455 fi
9456
9457 if test "$with_libxslt" = yes ; then
9458   ac_fn_c_check_header_mongrel "$LINENO" "libxslt/xslt.h" "ac_cv_header_libxslt_xslt_h" "$ac_includes_default"
9459 if test "x$ac_cv_header_libxslt_xslt_h" = xyes; then :
9460
9461 else
9462   as_fn_error $? "header file <libxslt/xslt.h> is required for XSLT support" "$LINENO" 5
9463 fi
9464
9465
9466 fi
9467
9468 if test "$with_ldap" = yes ; then
9469   if test "$PORTNAME" != "win32"; then
9470      for ac_header in ldap.h
9471 do :
9472   ac_fn_c_check_header_mongrel "$LINENO" "ldap.h" "ac_cv_header_ldap_h" "$ac_includes_default"
9473 if test "x$ac_cv_header_ldap_h" = xyes; then :
9474   cat >>confdefs.h <<_ACEOF
9475 #define HAVE_LDAP_H 1
9476 _ACEOF
9477
9478 else
9479   as_fn_error $? "header file <ldap.h> is required for LDAP" "$LINENO" 5
9480 fi
9481
9482 done
9483
9484   else
9485      for ac_header in winldap.h
9486 do :
9487   ac_fn_c_check_header_compile "$LINENO" "winldap.h" "ac_cv_header_winldap_h" "$ac_includes_default
9488 #include <windows.h>
9489
9490 "
9491 if test "x$ac_cv_header_winldap_h" = xyes; then :
9492   cat >>confdefs.h <<_ACEOF
9493 #define HAVE_WINLDAP_H 1
9494 _ACEOF
9495
9496 else
9497   as_fn_error $? "header file <winldap.h> is required for LDAP" "$LINENO" 5
9498 fi
9499
9500 done
9501
9502   fi
9503 fi
9504
9505 if test "$with_bonjour" = yes ; then
9506   ac_fn_c_check_header_mongrel "$LINENO" "dns_sd.h" "ac_cv_header_dns_sd_h" "$ac_includes_default"
9507 if test "x$ac_cv_header_dns_sd_h" = xyes; then :
9508
9509 else
9510   as_fn_error $? "header file <dns_sd.h> is required for Bonjour" "$LINENO" 5
9511 fi
9512
9513
9514 fi
9515
9516 # for contrib/uuid-ossp
9517 if test "$with_uuid" = bsd ; then
9518   for ac_header in uuid.h
9519 do :
9520   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
9521 if test "x$ac_cv_header_uuid_h" = xyes; then :
9522   cat >>confdefs.h <<_ACEOF
9523 #define HAVE_UUID_H 1
9524 _ACEOF
9525  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9526 /* end confdefs.h.  */
9527 #include <uuid.h>
9528
9529 _ACEOF
9530 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9531   $EGREP "uuid_to_string" >/dev/null 2>&1; then :
9532
9533 else
9534   as_fn_error $? "header file <uuid.h> does not match BSD UUID library" "$LINENO" 5
9535 fi
9536 rm -f conftest*
9537
9538 else
9539   as_fn_error $? "header file <uuid.h> is required for BSD UUID" "$LINENO" 5
9540 fi
9541
9542 done
9543
9544 elif test "$with_uuid" = e2fs ; then
9545   for ac_header in uuid/uuid.h
9546 do :
9547   ac_fn_c_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
9548 if test "x$ac_cv_header_uuid_uuid_h" = xyes; then :
9549   cat >>confdefs.h <<_ACEOF
9550 #define HAVE_UUID_UUID_H 1
9551 _ACEOF
9552  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9553 /* end confdefs.h.  */
9554 #include <uuid/uuid.h>
9555
9556 _ACEOF
9557 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9558   $EGREP "uuid_generate" >/dev/null 2>&1; then :
9559
9560 else
9561   as_fn_error $? "header file <uuid/uuid.h> does not match E2FS UUID library" "$LINENO" 5
9562 fi
9563 rm -f conftest*
9564
9565 else
9566   for ac_header in uuid.h
9567 do :
9568   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
9569 if test "x$ac_cv_header_uuid_h" = xyes; then :
9570   cat >>confdefs.h <<_ACEOF
9571 #define HAVE_UUID_H 1
9572 _ACEOF
9573  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9574 /* end confdefs.h.  */
9575 #include <uuid.h>
9576
9577 _ACEOF
9578 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9579   $EGREP "uuid_generate" >/dev/null 2>&1; then :
9580
9581 else
9582   as_fn_error $? "header file <uuid.h> does not match E2FS UUID library" "$LINENO" 5
9583 fi
9584 rm -f conftest*
9585
9586 else
9587   as_fn_error $? "header file <uuid/uuid.h> or <uuid.h> is required for E2FS UUID" "$LINENO" 5
9588 fi
9589
9590 done
9591
9592 fi
9593
9594 done
9595
9596 elif test "$with_uuid" = ossp ; then
9597   for ac_header in ossp/uuid.h
9598 do :
9599   ac_fn_c_check_header_mongrel "$LINENO" "ossp/uuid.h" "ac_cv_header_ossp_uuid_h" "$ac_includes_default"
9600 if test "x$ac_cv_header_ossp_uuid_h" = xyes; then :
9601   cat >>confdefs.h <<_ACEOF
9602 #define HAVE_OSSP_UUID_H 1
9603 _ACEOF
9604  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9605 /* end confdefs.h.  */
9606 #include <ossp/uuid.h>
9607
9608 _ACEOF
9609 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9610   $EGREP "uuid_export" >/dev/null 2>&1; then :
9611
9612 else
9613   as_fn_error $? "header file <ossp/uuid.h> does not match OSSP UUID library" "$LINENO" 5
9614 fi
9615 rm -f conftest*
9616
9617 else
9618   for ac_header in uuid.h
9619 do :
9620   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
9621 if test "x$ac_cv_header_uuid_h" = xyes; then :
9622   cat >>confdefs.h <<_ACEOF
9623 #define HAVE_UUID_H 1
9624 _ACEOF
9625  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9626 /* end confdefs.h.  */
9627 #include <uuid.h>
9628
9629 _ACEOF
9630 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9631   $EGREP "uuid_export" >/dev/null 2>&1; then :
9632
9633 else
9634   as_fn_error $? "header file <uuid.h> does not match OSSP UUID library" "$LINENO" 5
9635 fi
9636 rm -f conftest*
9637
9638 else
9639   as_fn_error $? "header file <ossp/uuid.h> or <uuid.h> is required for OSSP UUID" "$LINENO" 5
9640 fi
9641
9642 done
9643
9644 fi
9645
9646 done
9647
9648 fi
9649
9650 if test "$PORTNAME" = "win32" ; then
9651    for ac_header in crtdefs.h
9652 do :
9653   ac_fn_c_check_header_mongrel "$LINENO" "crtdefs.h" "ac_cv_header_crtdefs_h" "$ac_includes_default"
9654 if test "x$ac_cv_header_crtdefs_h" = xyes; then :
9655   cat >>confdefs.h <<_ACEOF
9656 #define HAVE_CRTDEFS_H 1
9657 _ACEOF
9658
9659 fi
9660
9661 done
9662
9663 fi
9664
9665 ##
9666 ## Types, structures, compiler characteristics
9667 ##
9668
9669   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
9670 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
9671 if ${ac_cv_c_bigendian+:} false; then :
9672   $as_echo_n "(cached) " >&6
9673 else
9674   ac_cv_c_bigendian=unknown
9675     # See if we're dealing with a universal compiler.
9676     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9677 /* end confdefs.h.  */
9678 #ifndef __APPLE_CC__
9679                not a universal capable compiler
9680              #endif
9681              typedef int dummy;
9682
9683 _ACEOF
9684 if ac_fn_c_try_compile "$LINENO"; then :
9685
9686         # Check for potential -arch flags.  It is not universal unless
9687         # there are at least two -arch flags with different values.
9688         ac_arch=
9689         ac_prev=
9690         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
9691          if test -n "$ac_prev"; then
9692            case $ac_word in
9693              i?86 | x86_64 | ppc | ppc64)
9694                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
9695                  ac_arch=$ac_word
9696                else
9697                  ac_cv_c_bigendian=universal
9698                  break
9699                fi
9700                ;;
9701            esac
9702            ac_prev=
9703          elif test "x$ac_word" = "x-arch"; then
9704            ac_prev=arch
9705          fi
9706        done
9707 fi
9708 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9709     if test $ac_cv_c_bigendian = unknown; then
9710       # See if sys/param.h defines the BYTE_ORDER macro.
9711       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9712 /* end confdefs.h.  */
9713 #include <sys/types.h>
9714              #include <sys/param.h>
9715
9716 int
9717 main ()
9718 {
9719 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
9720                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
9721                      && LITTLE_ENDIAN)
9722               bogus endian macros
9723              #endif
9724
9725   ;
9726   return 0;
9727 }
9728 _ACEOF
9729 if ac_fn_c_try_compile "$LINENO"; then :
9730   # It does; now see whether it defined to BIG_ENDIAN or not.
9731          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9732 /* end confdefs.h.  */
9733 #include <sys/types.h>
9734                 #include <sys/param.h>
9735
9736 int
9737 main ()
9738 {
9739 #if BYTE_ORDER != BIG_ENDIAN
9740                  not big endian
9741                 #endif
9742
9743   ;
9744   return 0;
9745 }
9746 _ACEOF
9747 if ac_fn_c_try_compile "$LINENO"; then :
9748   ac_cv_c_bigendian=yes
9749 else
9750   ac_cv_c_bigendian=no
9751 fi
9752 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9753 fi
9754 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9755     fi
9756     if test $ac_cv_c_bigendian = unknown; then
9757       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
9758       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9759 /* end confdefs.h.  */
9760 #include <limits.h>
9761
9762 int
9763 main ()
9764 {
9765 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
9766               bogus endian macros
9767              #endif
9768
9769   ;
9770   return 0;
9771 }
9772 _ACEOF
9773 if ac_fn_c_try_compile "$LINENO"; then :
9774   # It does; now see whether it defined to _BIG_ENDIAN or not.
9775          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9776 /* end confdefs.h.  */
9777 #include <limits.h>
9778
9779 int
9780 main ()
9781 {
9782 #ifndef _BIG_ENDIAN
9783                  not big endian
9784                 #endif
9785
9786   ;
9787   return 0;
9788 }
9789 _ACEOF
9790 if ac_fn_c_try_compile "$LINENO"; then :
9791   ac_cv_c_bigendian=yes
9792 else
9793   ac_cv_c_bigendian=no
9794 fi
9795 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9796 fi
9797 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9798     fi
9799     if test $ac_cv_c_bigendian = unknown; then
9800       # Compile a test program.
9801       if test "$cross_compiling" = yes; then :
9802   # Try to guess by grepping values from an object file.
9803          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9804 /* end confdefs.h.  */
9805 short int ascii_mm[] =
9806                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
9807                 short int ascii_ii[] =
9808                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
9809                 int use_ascii (int i) {
9810                   return ascii_mm[i] + ascii_ii[i];
9811                 }
9812                 short int ebcdic_ii[] =
9813                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
9814                 short int ebcdic_mm[] =
9815                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
9816                 int use_ebcdic (int i) {
9817                   return ebcdic_mm[i] + ebcdic_ii[i];
9818                 }
9819                 extern int foo;
9820
9821 int
9822 main ()
9823 {
9824 return use_ascii (foo) == use_ebcdic (foo);
9825   ;
9826   return 0;
9827 }
9828 _ACEOF
9829 if ac_fn_c_try_compile "$LINENO"; then :
9830   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
9831               ac_cv_c_bigendian=yes
9832             fi
9833             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
9834               if test "$ac_cv_c_bigendian" = unknown; then
9835                 ac_cv_c_bigendian=no
9836               else
9837                 # finding both strings is unlikely to happen, but who knows?
9838                 ac_cv_c_bigendian=unknown
9839               fi
9840             fi
9841 fi
9842 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9843 else
9844   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9845 /* end confdefs.h.  */
9846 $ac_includes_default
9847 int
9848 main ()
9849 {
9850
9851              /* Are we little or big endian?  From Harbison&Steele.  */
9852              union
9853              {
9854                long int l;
9855                char c[sizeof (long int)];
9856              } u;
9857              u.l = 1;
9858              return u.c[sizeof (long int) - 1] == 1;
9859
9860   ;
9861   return 0;
9862 }
9863 _ACEOF
9864 if ac_fn_c_try_run "$LINENO"; then :
9865   ac_cv_c_bigendian=no
9866 else
9867   ac_cv_c_bigendian=yes
9868 fi
9869 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9870   conftest.$ac_objext conftest.beam conftest.$ac_ext
9871 fi
9872
9873     fi
9874 fi
9875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
9876 $as_echo "$ac_cv_c_bigendian" >&6; }
9877  case $ac_cv_c_bigendian in #(
9878    yes)
9879      $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
9880 ;; #(
9881    no)
9882       ;; #(
9883    universal)
9884
9885 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
9886
9887      ;; #(
9888    *)
9889      as_fn_error $? "unknown endianness
9890  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
9891  esac
9892
9893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
9894 $as_echo_n "checking for inline... " >&6; }
9895 if ${ac_cv_c_inline+:} false; then :
9896   $as_echo_n "(cached) " >&6
9897 else
9898   ac_cv_c_inline=no
9899 for ac_kw in inline __inline__ __inline; do
9900   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9901 /* end confdefs.h.  */
9902 #ifndef __cplusplus
9903 typedef int foo_t;
9904 static $ac_kw foo_t static_foo () {return 0; }
9905 $ac_kw foo_t foo () {return 0; }
9906 #endif
9907
9908 _ACEOF
9909 if ac_fn_c_try_compile "$LINENO"; then :
9910   ac_cv_c_inline=$ac_kw
9911 fi
9912 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9913   test "$ac_cv_c_inline" != no && break
9914 done
9915
9916 fi
9917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
9918 $as_echo "$ac_cv_c_inline" >&6; }
9919
9920 case $ac_cv_c_inline in
9921   inline | yes) ;;
9922   *)
9923     case $ac_cv_c_inline in
9924       no) ac_val=;;
9925       *) ac_val=$ac_cv_c_inline;;
9926     esac
9927     cat >>confdefs.h <<_ACEOF
9928 #ifndef __cplusplus
9929 #define inline $ac_val
9930 #endif
9931 _ACEOF
9932     ;;
9933 esac
9934
9935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for quiet inline (no complaint if unreferenced)" >&5
9936 $as_echo_n "checking for quiet inline (no complaint if unreferenced)... " >&6; }
9937 if ${pgac_cv_c_inline_quietly+:} false; then :
9938   $as_echo_n "(cached) " >&6
9939 else
9940   pgac_cv_c_inline_quietly=no
9941   if test "$ac_cv_c_inline" != no; then
9942     pgac_c_inline_save_werror=$ac_c_werror_flag
9943     ac_c_werror_flag=yes
9944     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9945 /* end confdefs.h.  */
9946 #include "$srcdir/config/test_quiet_include.h"
9947 int
9948 main ()
9949 {
9950
9951   ;
9952   return 0;
9953 }
9954 _ACEOF
9955 if ac_fn_c_try_link "$LINENO"; then :
9956   pgac_cv_c_inline_quietly=yes
9957 fi
9958 rm -f core conftest.err conftest.$ac_objext \
9959     conftest$ac_exeext conftest.$ac_ext
9960     ac_c_werror_flag=$pgac_c_inline_save_werror
9961   fi
9962 fi
9963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_inline_quietly" >&5
9964 $as_echo "$pgac_cv_c_inline_quietly" >&6; }
9965 if test "$pgac_cv_c_inline_quietly" != no; then
9966
9967 cat >>confdefs.h <<_ACEOF
9968 #define PG_USE_INLINE 1
9969 _ACEOF
9970
9971 fi
9972
9973
9974   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array members" >&5
9975 $as_echo_n "checking for flexible array members... " >&6; }
9976 if ${ac_cv_c_flexmember+:} false; then :
9977   $as_echo_n "(cached) " >&6
9978 else
9979   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9980 /* end confdefs.h.  */
9981 #include <stdlib.h>
9982             #include <stdio.h>
9983             #include <stddef.h>
9984             struct s { int n; double d[]; };
9985 int
9986 main ()
9987 {
9988 int m = getchar ();
9989             struct s *p = malloc (offsetof (struct s, d)
9990                                   + m * sizeof (double));
9991             p->d[0] = 0.0;
9992             return p->d != (double *) NULL;
9993   ;
9994   return 0;
9995 }
9996 _ACEOF
9997 if ac_fn_c_try_compile "$LINENO"; then :
9998   ac_cv_c_flexmember=yes
9999 else
10000   ac_cv_c_flexmember=no
10001 fi
10002 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10003 fi
10004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
10005 $as_echo "$ac_cv_c_flexmember" >&6; }
10006   if test $ac_cv_c_flexmember = yes; then
10007
10008 $as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
10009
10010   else
10011     $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
10012
10013   fi
10014
10015 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signed types" >&5
10016 $as_echo_n "checking for signed types... " >&6; }
10017 if ${pgac_cv_c_signed+:} false; then :
10018   $as_echo_n "(cached) " >&6
10019 else
10020   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10021 /* end confdefs.h.  */
10022
10023 int
10024 main ()
10025 {
10026 signed char c; signed short s; signed int i;
10027   ;
10028   return 0;
10029 }
10030 _ACEOF
10031 if ac_fn_c_try_compile "$LINENO"; then :
10032   pgac_cv_c_signed=yes
10033 else
10034   pgac_cv_c_signed=no
10035 fi
10036 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10037 fi
10038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_signed" >&5
10039 $as_echo "$pgac_cv_c_signed" >&6; }
10040 if test x"$pgac_cv_c_signed" = xno ; then
10041
10042 $as_echo "#define signed /**/" >>confdefs.h
10043
10044 fi
10045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __func__" >&5
10046 $as_echo_n "checking for __func__... " >&6; }
10047 if ${pgac_cv_funcname_func_support+:} false; then :
10048   $as_echo_n "(cached) " >&6
10049 else
10050   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10051 /* end confdefs.h.  */
10052 #include <stdio.h>
10053 int
10054 main ()
10055 {
10056 printf("%s\n", __func__);
10057   ;
10058   return 0;
10059 }
10060 _ACEOF
10061 if ac_fn_c_try_compile "$LINENO"; then :
10062   pgac_cv_funcname_func_support=yes
10063 else
10064   pgac_cv_funcname_func_support=no
10065 fi
10066 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10067 fi
10068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_func_support" >&5
10069 $as_echo "$pgac_cv_funcname_func_support" >&6; }
10070 if test x"$pgac_cv_funcname_func_support" = xyes ; then
10071
10072 $as_echo "#define HAVE_FUNCNAME__FUNC 1" >>confdefs.h
10073
10074 else
10075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __FUNCTION__" >&5
10076 $as_echo_n "checking for __FUNCTION__... " >&6; }
10077 if ${pgac_cv_funcname_function_support+:} false; then :
10078   $as_echo_n "(cached) " >&6
10079 else
10080   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10081 /* end confdefs.h.  */
10082 #include <stdio.h>
10083 int
10084 main ()
10085 {
10086 printf("%s\n", __FUNCTION__);
10087   ;
10088   return 0;
10089 }
10090 _ACEOF
10091 if ac_fn_c_try_compile "$LINENO"; then :
10092   pgac_cv_funcname_function_support=yes
10093 else
10094   pgac_cv_funcname_function_support=no
10095 fi
10096 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10097 fi
10098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_function_support" >&5
10099 $as_echo "$pgac_cv_funcname_function_support" >&6; }
10100 if test x"$pgac_cv_funcname_function_support" = xyes ; then
10101
10102 $as_echo "#define HAVE_FUNCNAME__FUNCTION 1" >>confdefs.h
10103
10104 fi
10105 fi
10106 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Static_assert" >&5
10107 $as_echo_n "checking for _Static_assert... " >&6; }
10108 if ${pgac_cv__static_assert+:} false; then :
10109   $as_echo_n "(cached) " >&6
10110 else
10111   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10112 /* end confdefs.h.  */
10113
10114 int
10115 main ()
10116 {
10117 ({ _Static_assert(1, "foo"); })
10118   ;
10119   return 0;
10120 }
10121 _ACEOF
10122 if ac_fn_c_try_link "$LINENO"; then :
10123   pgac_cv__static_assert=yes
10124 else
10125   pgac_cv__static_assert=no
10126 fi
10127 rm -f core conftest.err conftest.$ac_objext \
10128     conftest$ac_exeext conftest.$ac_ext
10129 fi
10130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__static_assert" >&5
10131 $as_echo "$pgac_cv__static_assert" >&6; }
10132 if test x"$pgac_cv__static_assert" = xyes ; then
10133
10134 $as_echo "#define HAVE__STATIC_ASSERT 1" >>confdefs.h
10135
10136 fi
10137 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_types_compatible_p" >&5
10138 $as_echo_n "checking for __builtin_types_compatible_p... " >&6; }
10139 if ${pgac_cv__types_compatible+:} false; then :
10140   $as_echo_n "(cached) " >&6
10141 else
10142   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10143 /* end confdefs.h.  */
10144
10145 int
10146 main ()
10147 {
10148  int x; static int y[__builtin_types_compatible_p(__typeof__(x), int)];
10149   ;
10150   return 0;
10151 }
10152 _ACEOF
10153 if ac_fn_c_try_compile "$LINENO"; then :
10154   pgac_cv__types_compatible=yes
10155 else
10156   pgac_cv__types_compatible=no
10157 fi
10158 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10159 fi
10160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__types_compatible" >&5
10161 $as_echo "$pgac_cv__types_compatible" >&6; }
10162 if test x"$pgac_cv__types_compatible" = xyes ; then
10163
10164 $as_echo "#define HAVE__BUILTIN_TYPES_COMPATIBLE_P 1" >>confdefs.h
10165
10166 fi
10167 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_constant_p" >&5
10168 $as_echo_n "checking for __builtin_constant_p... " >&6; }
10169 if ${pgac_cv__builtin_constant_p+:} false; then :
10170   $as_echo_n "(cached) " >&6
10171 else
10172   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10173 /* end confdefs.h.  */
10174 static int x; static int y[__builtin_constant_p(x) ? x : 1];
10175 int
10176 main ()
10177 {
10178
10179   ;
10180   return 0;
10181 }
10182 _ACEOF
10183 if ac_fn_c_try_compile "$LINENO"; then :
10184   pgac_cv__builtin_constant_p=yes
10185 else
10186   pgac_cv__builtin_constant_p=no
10187 fi
10188 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10189 fi
10190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_constant_p" >&5
10191 $as_echo "$pgac_cv__builtin_constant_p" >&6; }
10192 if test x"$pgac_cv__builtin_constant_p" = xyes ; then
10193
10194 $as_echo "#define HAVE__BUILTIN_CONSTANT_P 1" >>confdefs.h
10195
10196 fi
10197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unreachable" >&5
10198 $as_echo_n "checking for __builtin_unreachable... " >&6; }
10199 if ${pgac_cv__builtin_unreachable+:} false; then :
10200   $as_echo_n "(cached) " >&6
10201 else
10202   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10203 /* end confdefs.h.  */
10204
10205 int
10206 main ()
10207 {
10208 __builtin_unreachable();
10209   ;
10210   return 0;
10211 }
10212 _ACEOF
10213 if ac_fn_c_try_link "$LINENO"; then :
10214   pgac_cv__builtin_unreachable=yes
10215 else
10216   pgac_cv__builtin_unreachable=no
10217 fi
10218 rm -f core conftest.err conftest.$ac_objext \
10219     conftest$ac_exeext conftest.$ac_ext
10220 fi
10221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_unreachable" >&5
10222 $as_echo "$pgac_cv__builtin_unreachable" >&6; }
10223 if test x"$pgac_cv__builtin_unreachable" = xyes ; then
10224
10225 $as_echo "#define HAVE__BUILTIN_UNREACHABLE 1" >>confdefs.h
10226
10227 fi
10228 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __VA_ARGS__" >&5
10229 $as_echo_n "checking for __VA_ARGS__... " >&6; }
10230 if ${pgac_cv__va_args+:} false; then :
10231   $as_echo_n "(cached) " >&6
10232 else
10233   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10234 /* end confdefs.h.  */
10235 #include <stdio.h>
10236 int
10237 main ()
10238 {
10239 #define debug(...) fprintf(stderr, __VA_ARGS__)
10240 debug("%s", "blarg");
10241
10242   ;
10243   return 0;
10244 }
10245 _ACEOF
10246 if ac_fn_c_try_compile "$LINENO"; then :
10247   pgac_cv__va_args=yes
10248 else
10249   pgac_cv__va_args=no
10250 fi
10251 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10252 fi
10253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__va_args" >&5
10254 $as_echo "$pgac_cv__va_args" >&6; }
10255 if test x"$pgac_cv__va_args" = xyes ; then
10256
10257 $as_echo "#define HAVE__VA_ARGS 1" >>confdefs.h
10258
10259 fi
10260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10261 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
10262 if ${ac_cv_struct_tm+:} false; then :
10263   $as_echo_n "(cached) " >&6
10264 else
10265   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10266 /* end confdefs.h.  */
10267 #include <sys/types.h>
10268 #include <time.h>
10269
10270 int
10271 main ()
10272 {
10273 struct tm tm;
10274                                      int *p = &tm.tm_sec;
10275                                      return !p;
10276   ;
10277   return 0;
10278 }
10279 _ACEOF
10280 if ac_fn_c_try_compile "$LINENO"; then :
10281   ac_cv_struct_tm=time.h
10282 else
10283   ac_cv_struct_tm=sys/time.h
10284 fi
10285 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10286 fi
10287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10288 $as_echo "$ac_cv_struct_tm" >&6; }
10289 if test $ac_cv_struct_tm = sys/time.h; then
10290
10291 $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
10292
10293 fi
10294
10295 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
10296 #include <$ac_cv_struct_tm>
10297
10298 "
10299 if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
10300
10301 cat >>confdefs.h <<_ACEOF
10302 #define HAVE_STRUCT_TM_TM_ZONE 1
10303 _ACEOF
10304
10305
10306 fi
10307
10308 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10309
10310 $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
10311
10312 fi
10313 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
10314 $as_echo_n "checking for tzname... " >&6; }
10315 if ${ac_cv_var_tzname+:} false; then :
10316   $as_echo_n "(cached) " >&6
10317 else
10318   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10319 /* end confdefs.h.  */
10320 #include <time.h>
10321 #ifndef tzname /* For SGI.  */
10322 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
10323 #endif
10324
10325 int
10326 main ()
10327 {
10328 atoi(*tzname);
10329   ;
10330   return 0;
10331 }
10332 _ACEOF
10333 if ac_fn_c_try_link "$LINENO"; then :
10334   ac_cv_var_tzname=yes
10335 else
10336   ac_cv_var_tzname=no
10337 fi
10338 rm -f core conftest.err conftest.$ac_objext \
10339     conftest$ac_exeext conftest.$ac_ext
10340 fi
10341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
10342 $as_echo "$ac_cv_var_tzname" >&6; }
10343 if test $ac_cv_var_tzname = yes; then
10344
10345 $as_echo "#define HAVE_TZNAME 1" >>confdefs.h
10346
10347 fi
10348
10349 ac_fn_c_check_type "$LINENO" "union semun" "ac_cv_type_union_semun" "#include <sys/types.h>
10350 #include <sys/ipc.h>
10351 #include <sys/sem.h>
10352 "
10353 if test "x$ac_cv_type_union_semun" = xyes; then :
10354
10355 cat >>confdefs.h <<_ACEOF
10356 #define HAVE_UNION_SEMUN 1
10357 _ACEOF
10358
10359
10360 fi
10361
10362 ac_fn_c_check_type "$LINENO" "struct sockaddr_un" "ac_cv_type_struct_sockaddr_un" "#include <sys/types.h>
10363 #ifdef HAVE_SYS_UN_H
10364 #include <sys/un.h>
10365 #endif
10366
10367 "
10368 if test "x$ac_cv_type_struct_sockaddr_un" = xyes; then :
10369
10370 $as_echo "#define HAVE_UNIX_SOCKETS 1" >>confdefs.h
10371
10372 fi
10373
10374 ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "#include <sys/types.h>
10375 #ifdef HAVE_SYS_SOCKET_H
10376 #include <sys/socket.h>
10377 #endif
10378
10379 "
10380 if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
10381
10382 cat >>confdefs.h <<_ACEOF
10383 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
10384 _ACEOF
10385
10386
10387 fi
10388
10389 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
10390 #ifdef HAVE_SYS_SOCKET_H
10391 #include <sys/socket.h>
10392 #endif
10393
10394 "
10395 if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then :
10396
10397 cat >>confdefs.h <<_ACEOF
10398 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
10399 _ACEOF
10400
10401
10402 fi
10403 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_family" "ac_cv_member_struct_sockaddr_storage___ss_family" "#include <sys/types.h>
10404 #ifdef HAVE_SYS_SOCKET_H
10405 #include <sys/socket.h>
10406 #endif
10407
10408 "
10409 if test "x$ac_cv_member_struct_sockaddr_storage___ss_family" = xyes; then :
10410
10411 cat >>confdefs.h <<_ACEOF
10412 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1
10413 _ACEOF
10414
10415
10416 fi
10417 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_len" "ac_cv_member_struct_sockaddr_storage_ss_len" "#include <sys/types.h>
10418 #ifdef HAVE_SYS_SOCKET_H
10419 #include <sys/socket.h>
10420 #endif
10421
10422 "
10423 if test "x$ac_cv_member_struct_sockaddr_storage_ss_len" = xyes; then :
10424
10425 cat >>confdefs.h <<_ACEOF
10426 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1
10427 _ACEOF
10428
10429
10430 fi
10431 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_len" "ac_cv_member_struct_sockaddr_storage___ss_len" "#include <sys/types.h>
10432 #ifdef HAVE_SYS_SOCKET_H
10433 #include <sys/socket.h>
10434 #endif
10435
10436 "
10437 if test "x$ac_cv_member_struct_sockaddr_storage___ss_len" = xyes; then :
10438
10439 cat >>confdefs.h <<_ACEOF
10440 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN 1
10441 _ACEOF
10442
10443
10444 fi
10445 ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/types.h>
10446 #ifdef HAVE_SYS_SOCKET_H
10447 #include <sys/socket.h>
10448 #endif
10449
10450 "
10451 if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
10452
10453 cat >>confdefs.h <<_ACEOF
10454 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
10455 _ACEOF
10456
10457
10458 fi
10459
10460 ac_fn_c_check_type "$LINENO" "struct addrinfo" "ac_cv_type_struct_addrinfo" "#include <sys/types.h>
10461 #include <sys/socket.h>
10462 #include <netdb.h>
10463
10464 "
10465 if test "x$ac_cv_type_struct_addrinfo" = xyes; then :
10466
10467 cat >>confdefs.h <<_ACEOF
10468 #define HAVE_STRUCT_ADDRINFO 1
10469 _ACEOF
10470
10471
10472 fi
10473
10474
10475   ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
10476 if test "x$ac_cv_type_intptr_t" = xyes; then :
10477
10478 $as_echo "#define HAVE_INTPTR_T 1" >>confdefs.h
10479
10480 else
10481   for ac_type in 'int' 'long int' 'long long int'; do
10482        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10483 /* end confdefs.h.  */
10484 $ac_includes_default
10485 int
10486 main ()
10487 {
10488 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
10489 test_array [0] = 0;
10490 return test_array [0];
10491
10492   ;
10493   return 0;
10494 }
10495 _ACEOF
10496 if ac_fn_c_try_compile "$LINENO"; then :
10497
10498 cat >>confdefs.h <<_ACEOF
10499 #define intptr_t $ac_type
10500 _ACEOF
10501
10502           ac_type=
10503 fi
10504 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10505        test -z "$ac_type" && break
10506      done
10507 fi
10508
10509
10510
10511   ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
10512 if test "x$ac_cv_type_uintptr_t" = xyes; then :
10513
10514 $as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h
10515
10516 else
10517   for ac_type in 'unsigned int' 'unsigned long int' \
10518         'unsigned long long int'; do
10519        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10520 /* end confdefs.h.  */
10521 $ac_includes_default
10522 int
10523 main ()
10524 {
10525 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
10526 test_array [0] = 0;
10527 return test_array [0];
10528
10529   ;
10530   return 0;
10531 }
10532 _ACEOF
10533 if ac_fn_c_try_compile "$LINENO"; then :
10534
10535 cat >>confdefs.h <<_ACEOF
10536 #define uintptr_t $ac_type
10537 _ACEOF
10538
10539           ac_type=
10540 fi
10541 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10542        test -z "$ac_type" && break
10543      done
10544 fi
10545
10546
10547
10548   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
10549 $as_echo_n "checking for unsigned long long int... " >&6; }
10550 if ${ac_cv_type_unsigned_long_long_int+:} false; then :
10551   $as_echo_n "(cached) " >&6
10552 else
10553   ac_cv_type_unsigned_long_long_int=yes
10554      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
10555        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10556 /* end confdefs.h.  */
10557
10558   /* For now, do not test the preprocessor; as of 2007 there are too many
10559          implementations with broken preprocessors.  Perhaps this can
10560          be revisited in 2012.  In the meantime, code should not expect
10561          #if to work with literals wider than 32 bits.  */
10562       /* Test literals.  */
10563       long long int ll = 9223372036854775807ll;
10564       long long int nll = -9223372036854775807LL;
10565       unsigned long long int ull = 18446744073709551615ULL;
10566       /* Test constant expressions.   */
10567       typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
10568                      ? 1 : -1)];
10569       typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
10570                      ? 1 : -1)];
10571       int i = 63;
10572 int
10573 main ()
10574 {
10575 /* Test availability of runtime routines for shift and division.  */
10576       long long int llmax = 9223372036854775807ll;
10577       unsigned long long int ullmax = 18446744073709551615ull;
10578       return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
10579               | (llmax / ll) | (llmax % ll)
10580               | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
10581               | (ullmax / ull) | (ullmax % ull));
10582   ;
10583   return 0;
10584 }
10585
10586 _ACEOF
10587 if ac_fn_c_try_link "$LINENO"; then :
10588
10589 else
10590   ac_cv_type_unsigned_long_long_int=no
10591 fi
10592 rm -f core conftest.err conftest.$ac_objext \
10593     conftest$ac_exeext conftest.$ac_ext
10594      fi
10595 fi
10596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
10597 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
10598   if test $ac_cv_type_unsigned_long_long_int = yes; then
10599
10600 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
10601
10602   fi
10603
10604
10605
10606   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
10607 $as_echo_n "checking for long long int... " >&6; }
10608 if ${ac_cv_type_long_long_int+:} false; then :
10609   $as_echo_n "(cached) " >&6
10610 else
10611   ac_cv_type_long_long_int=yes
10612       if test "x${ac_cv_prog_cc_c99-no}" = xno; then
10613         ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
10614         if test $ac_cv_type_long_long_int = yes; then
10615                                   if test "$cross_compiling" = yes; then :
10616   :
10617 else
10618   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10619 /* end confdefs.h.  */
10620 #include <limits.h>
10621                  #ifndef LLONG_MAX
10622                  # define HALF \
10623                           (1LL << (sizeof (long long int) * CHAR_BIT - 2))
10624                  # define LLONG_MAX (HALF - 1 + HALF)
10625                  #endif
10626 int
10627 main ()
10628 {
10629 long long int n = 1;
10630                  int i;
10631                  for (i = 0; ; i++)
10632                    {
10633                      long long int m = n << i;
10634                      if (m >> i != n)
10635                        return 1;
10636                      if (LLONG_MAX / 2 < m)
10637                        break;
10638                    }
10639                  return 0;
10640   ;
10641   return 0;
10642 }
10643 _ACEOF
10644 if ac_fn_c_try_run "$LINENO"; then :
10645
10646 else
10647   ac_cv_type_long_long_int=no
10648 fi
10649 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10650   conftest.$ac_objext conftest.beam conftest.$ac_ext
10651 fi
10652
10653         fi
10654       fi
10655 fi
10656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
10657 $as_echo "$ac_cv_type_long_long_int" >&6; }
10658   if test $ac_cv_type_long_long_int = yes; then
10659
10660 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
10661
10662   fi
10663
10664
10665 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for locale_t" >&5
10666 $as_echo_n "checking for locale_t... " >&6; }
10667 if ${pgac_cv_type_locale_t+:} false; then :
10668   $as_echo_n "(cached) " >&6
10669 else
10670   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10671 /* end confdefs.h.  */
10672 #include <locale.h>
10673 locale_t x;
10674 int
10675 main ()
10676 {
10677
10678   ;
10679   return 0;
10680 }
10681 _ACEOF
10682 if ac_fn_c_try_compile "$LINENO"; then :
10683   pgac_cv_type_locale_t=yes
10684 else
10685   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10686 /* end confdefs.h.  */
10687 #include <xlocale.h>
10688 locale_t x;
10689 int
10690 main ()
10691 {
10692
10693   ;
10694   return 0;
10695 }
10696 _ACEOF
10697 if ac_fn_c_try_compile "$LINENO"; then :
10698   pgac_cv_type_locale_t='yes (in xlocale.h)'
10699 else
10700   pgac_cv_type_locale_t=no
10701 fi
10702 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10703 fi
10704 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10705 fi
10706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_locale_t" >&5
10707 $as_echo "$pgac_cv_type_locale_t" >&6; }
10708 if test "$pgac_cv_type_locale_t" != no; then
10709
10710 $as_echo "#define HAVE_LOCALE_T 1" >>confdefs.h
10711
10712 fi
10713 if test "$pgac_cv_type_locale_t" = 'yes (in xlocale.h)'; then
10714
10715 $as_echo "#define LOCALE_T_IN_XLOCALE 1" >>confdefs.h
10716
10717 fi
10718
10719 ac_fn_c_check_type "$LINENO" "struct cmsgcred" "ac_cv_type_struct_cmsgcred" "#include <sys/socket.h>
10720 #include <sys/param.h>
10721 #ifdef HAVE_SYS_UCRED_H
10722 #include <sys/ucred.h>
10723 #endif
10724 "
10725 if test "x$ac_cv_type_struct_cmsgcred" = xyes; then :
10726
10727 cat >>confdefs.h <<_ACEOF
10728 #define HAVE_STRUCT_CMSGCRED 1
10729 _ACEOF
10730
10731
10732 fi
10733
10734
10735 ac_fn_c_check_type "$LINENO" "struct option" "ac_cv_type_struct_option" "#ifdef HAVE_GETOPT_H
10736 #include <getopt.h>
10737 #endif
10738 "
10739 if test "x$ac_cv_type_struct_option" = xyes; then :
10740
10741 cat >>confdefs.h <<_ACEOF
10742 #define HAVE_STRUCT_OPTION 1
10743 _ACEOF
10744
10745
10746 fi
10747
10748
10749 if test "$with_zlib" = yes; then
10750   # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
10751   # did not).  While we could work around the lack of z_streamp, it
10752   # seems unwise to encourage people to use such old zlib versions...
10753   ac_fn_c_check_type "$LINENO" "z_streamp" "ac_cv_type_z_streamp" "#include <zlib.h>
10754 "
10755 if test "x$ac_cv_type_z_streamp" = xyes; then :
10756
10757 else
10758   as_fn_error $? "zlib version is too old
10759 Use --without-zlib to disable zlib support." "$LINENO" 5
10760 fi
10761
10762 fi
10763
10764 # On PPC, check if assembler supports LWARX instruction's mutex hint bit
10765 case $host_cpu in
10766   ppc*|powerpc*)
10767     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports lwarx hint bit" >&5
10768 $as_echo_n "checking whether assembler supports lwarx hint bit... " >&6; }
10769     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10770 /* end confdefs.h.  */
10771
10772 int
10773 main ()
10774 {
10775 int a = 0; int *p = &a; int r;
10776          __asm__ __volatile__ (" lwarx %0,0,%1,1\n" : "=&r"(r) : "r"(p));
10777   ;
10778   return 0;
10779 }
10780 _ACEOF
10781 if ac_fn_c_try_compile "$LINENO"; then :
10782   pgac_cv_have_ppc_mutex_hint=yes
10783 else
10784   pgac_cv_have_ppc_mutex_hint=no
10785 fi
10786 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10787     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_ppc_mutex_hint" >&5
10788 $as_echo "$pgac_cv_have_ppc_mutex_hint" >&6; }
10789     if test x"$pgac_cv_have_ppc_mutex_hint" = xyes ; then
10790
10791 $as_echo "#define HAVE_PPC_LWARX_MUTEX_HINT 1" >>confdefs.h
10792
10793     fi
10794   ;;
10795 esac
10796
10797 # Check largefile support.  You might think this is a system service not a
10798 # compiler characteristic, but you'd be wrong.  We must check this before
10799 # probing existence of related functions such as fseeko, since the largefile
10800 # defines can affect what is generated for that.
10801 if test "$PORTNAME" != "win32"; then
10802    # Check whether --enable-largefile was given.
10803 if test "${enable_largefile+set}" = set; then :
10804   enableval=$enable_largefile;
10805 fi
10806
10807 if test "$enable_largefile" != no; then
10808
10809   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
10810 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
10811 if ${ac_cv_sys_largefile_CC+:} false; then :
10812   $as_echo_n "(cached) " >&6
10813 else
10814   ac_cv_sys_largefile_CC=no
10815      if test "$GCC" != yes; then
10816        ac_save_CC=$CC
10817        while :; do
10818          # IRIX 6.2 and later do not support large files by default,
10819          # so use the C compiler's -n32 option if that helps.
10820          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10821 /* end confdefs.h.  */
10822 #include <sys/types.h>
10823  /* Check that off_t can represent 2**63 - 1 correctly.
10824     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10825     since some C++ compilers masquerading as C compilers
10826     incorrectly reject 9223372036854775807.  */
10827 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10828   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10829                        && LARGE_OFF_T % 2147483647 == 1)
10830                       ? 1 : -1];
10831 int
10832 main ()
10833 {
10834
10835   ;
10836   return 0;
10837 }
10838 _ACEOF
10839          if ac_fn_c_try_compile "$LINENO"; then :
10840   break
10841 fi
10842 rm -f core conftest.err conftest.$ac_objext
10843          CC="$CC -n32"
10844          if ac_fn_c_try_compile "$LINENO"; then :
10845   ac_cv_sys_largefile_CC=' -n32'; break
10846 fi
10847 rm -f core conftest.err conftest.$ac_objext
10848          break
10849        done
10850        CC=$ac_save_CC
10851        rm -f conftest.$ac_ext
10852     fi
10853 fi
10854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
10855 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
10856   if test "$ac_cv_sys_largefile_CC" != no; then
10857     CC=$CC$ac_cv_sys_largefile_CC
10858   fi
10859
10860   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
10861 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
10862 if ${ac_cv_sys_file_offset_bits+:} false; then :
10863   $as_echo_n "(cached) " >&6
10864 else
10865   while :; do
10866   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10867 /* end confdefs.h.  */
10868 #include <sys/types.h>
10869  /* Check that off_t can represent 2**63 - 1 correctly.
10870     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10871     since some C++ compilers masquerading as C compilers
10872     incorrectly reject 9223372036854775807.  */
10873 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10874   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10875                        && LARGE_OFF_T % 2147483647 == 1)
10876                       ? 1 : -1];
10877 int
10878 main ()
10879 {
10880
10881   ;
10882   return 0;
10883 }
10884 _ACEOF
10885 if ac_fn_c_try_compile "$LINENO"; then :
10886   ac_cv_sys_file_offset_bits=no; break
10887 fi
10888 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10889   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10890 /* end confdefs.h.  */
10891 #define _FILE_OFFSET_BITS 64
10892 #include <sys/types.h>
10893  /* Check that off_t can represent 2**63 - 1 correctly.
10894     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10895     since some C++ compilers masquerading as C compilers
10896     incorrectly reject 9223372036854775807.  */
10897 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10898   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10899                        && LARGE_OFF_T % 2147483647 == 1)
10900                       ? 1 : -1];
10901 int
10902 main ()
10903 {
10904
10905   ;
10906   return 0;
10907 }
10908 _ACEOF
10909 if ac_fn_c_try_compile "$LINENO"; then :
10910   ac_cv_sys_file_offset_bits=64; break
10911 fi
10912 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10913   ac_cv_sys_file_offset_bits=unknown
10914   break
10915 done
10916 fi
10917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
10918 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
10919 case $ac_cv_sys_file_offset_bits in #(
10920   no | unknown) ;;
10921   *)
10922 cat >>confdefs.h <<_ACEOF
10923 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
10924 _ACEOF
10925 ;;
10926 esac
10927 rm -rf conftest*
10928   if test $ac_cv_sys_file_offset_bits = unknown; then
10929     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
10930 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
10931 if ${ac_cv_sys_large_files+:} false; then :
10932   $as_echo_n "(cached) " >&6
10933 else
10934   while :; do
10935   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10936 /* end confdefs.h.  */
10937 #include <sys/types.h>
10938  /* Check that off_t can represent 2**63 - 1 correctly.
10939     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10940     since some C++ compilers masquerading as C compilers
10941     incorrectly reject 9223372036854775807.  */
10942 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10943   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10944                        && LARGE_OFF_T % 2147483647 == 1)
10945                       ? 1 : -1];
10946 int
10947 main ()
10948 {
10949
10950   ;
10951   return 0;
10952 }
10953 _ACEOF
10954 if ac_fn_c_try_compile "$LINENO"; then :
10955   ac_cv_sys_large_files=no; break
10956 fi
10957 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10958   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10959 /* end confdefs.h.  */
10960 #define _LARGE_FILES 1
10961 #include <sys/types.h>
10962  /* Check that off_t can represent 2**63 - 1 correctly.
10963     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10964     since some C++ compilers masquerading as C compilers
10965     incorrectly reject 9223372036854775807.  */
10966 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10967   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10968                        && LARGE_OFF_T % 2147483647 == 1)
10969                       ? 1 : -1];
10970 int
10971 main ()
10972 {
10973
10974   ;
10975   return 0;
10976 }
10977 _ACEOF
10978 if ac_fn_c_try_compile "$LINENO"; then :
10979   ac_cv_sys_large_files=1; break
10980 fi
10981 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10982   ac_cv_sys_large_files=unknown
10983   break
10984 done
10985 fi
10986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
10987 $as_echo "$ac_cv_sys_large_files" >&6; }
10988 case $ac_cv_sys_large_files in #(
10989   no | unknown) ;;
10990   *)
10991 cat >>confdefs.h <<_ACEOF
10992 #define _LARGE_FILES $ac_cv_sys_large_files
10993 _ACEOF
10994 ;;
10995 esac
10996 rm -rf conftest*
10997   fi
10998
10999
11000 fi
11001
11002
11003 fi
11004
11005 # Check for largefile support (must be after AC_SYS_LARGEFILE)
11006 # The cast to long int works around a bug in the HP C Compiler
11007 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11008 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11009 # This bug is HP SR number 8606223364.
11010 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
11011 $as_echo_n "checking size of off_t... " >&6; }
11012 if ${ac_cv_sizeof_off_t+:} false; then :
11013   $as_echo_n "(cached) " >&6
11014 else
11015   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t"        "$ac_includes_default"; then :
11016
11017 else
11018   if test "$ac_cv_type_off_t" = yes; then
11019      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11020 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11021 as_fn_error 77 "cannot compute sizeof (off_t)
11022 See \`config.log' for more details" "$LINENO" 5; }
11023    else
11024      ac_cv_sizeof_off_t=0
11025    fi
11026 fi
11027
11028 fi
11029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
11030 $as_echo "$ac_cv_sizeof_off_t" >&6; }
11031
11032
11033
11034 cat >>confdefs.h <<_ACEOF
11035 #define SIZEOF_OFF_T $ac_cv_sizeof_off_t
11036 _ACEOF
11037
11038
11039
11040 # If we don't have largefile support, can't handle segsize >= 2GB.
11041 if test "$ac_cv_sizeof_off_t" -lt 8 -a "$segsize" != "1"; then
11042    as_fn_error $? "Large file support is not enabled. Segment size cannot be larger than 1GB." "$LINENO" 5
11043 fi
11044
11045
11046 ##
11047 ## Functions, global variables
11048 ##
11049
11050 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int timezone" >&5
11051 $as_echo_n "checking for int timezone... " >&6; }
11052 if ${pgac_cv_var_int_timezone+:} false; then :
11053   $as_echo_n "(cached) " >&6
11054 else
11055   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11056 /* end confdefs.h.  */
11057 #include <time.h>
11058 int res;
11059 int
11060 main ()
11061 {
11062 #ifndef __CYGWIN__
11063 res = timezone / 60;
11064 #else
11065 res = _timezone / 60;
11066 #endif
11067   ;
11068   return 0;
11069 }
11070 _ACEOF
11071 if ac_fn_c_try_link "$LINENO"; then :
11072   pgac_cv_var_int_timezone=yes
11073 else
11074   pgac_cv_var_int_timezone=no
11075 fi
11076 rm -f core conftest.err conftest.$ac_objext \
11077     conftest$ac_exeext conftest.$ac_ext
11078 fi
11079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_timezone" >&5
11080 $as_echo "$pgac_cv_var_int_timezone" >&6; }
11081 if test x"$pgac_cv_var_int_timezone" = xyes ; then
11082
11083 $as_echo "#define HAVE_INT_TIMEZONE 1" >>confdefs.h
11084
11085 fi
11086 { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for accept()" >&5
11087 $as_echo_n "checking types of arguments for accept()... " >&6; }
11088  if ${ac_cv_func_accept_return+:} false; then :
11089   $as_echo_n "(cached) " >&6
11090 else
11091    if ${ac_cv_func_accept_arg1+:} false; then :
11092   $as_echo_n "(cached) " >&6
11093 else
11094     if ${ac_cv_func_accept_arg2+:} false; then :
11095   $as_echo_n "(cached) " >&6
11096 else
11097      if ${ac_cv_func_accept_arg3+:} false; then :
11098   $as_echo_n "(cached) " >&6
11099 else
11100       for ac_cv_func_accept_return in 'int' 'unsigned int PASCAL' 'SOCKET WSAAPI'; do
11101       for ac_cv_func_accept_arg1 in 'int' 'unsigned int' 'SOCKET'; do
11102        for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
11103         for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
11104          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11105 /* end confdefs.h.  */
11106 #ifdef HAVE_SYS_TYPES_H
11107 #include <sys/types.h>
11108 #endif
11109 #ifdef HAVE_SYS_SOCKET_H
11110 #include <sys/socket.h>
11111 #endif
11112 extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
11113 int
11114 main ()
11115 {
11116
11117   ;
11118   return 0;
11119 }
11120 _ACEOF
11121 if ac_fn_c_try_compile "$LINENO"; then :
11122   ac_not_found=no; break 4
11123 else
11124   ac_not_found=yes
11125 fi
11126 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11127        done
11128       done
11129      done
11130     done
11131     if test "$ac_not_found" = yes; then
11132       as_fn_error $? "could not determine argument types" "$LINENO" 5
11133     fi
11134     if test "$ac_cv_func_accept_arg3" = "void"; then
11135       ac_cv_func_accept_arg3=int
11136     fi
11137
11138 fi
11139
11140 fi
11141
11142 fi
11143
11144 fi
11145  { $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
11146 $as_echo "$ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&6; }
11147
11148 cat >>confdefs.h <<_ACEOF
11149 #define ACCEPT_TYPE_RETURN $ac_cv_func_accept_return
11150 _ACEOF
11151
11152
11153 cat >>confdefs.h <<_ACEOF
11154 #define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
11155 _ACEOF
11156
11157
11158 cat >>confdefs.h <<_ACEOF
11159 #define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
11160 _ACEOF
11161
11162
11163 cat >>confdefs.h <<_ACEOF
11164 #define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
11165 _ACEOF
11166
11167
11168 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday takes only one argument" >&5
11169 $as_echo_n "checking whether gettimeofday takes only one argument... " >&6; }
11170 if ${pgac_cv_func_gettimeofday_1arg+:} false; then :
11171   $as_echo_n "(cached) " >&6
11172 else
11173   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11174 /* end confdefs.h.  */
11175 #include <sys/time.h>
11176 int
11177 main ()
11178 {
11179 struct timeval *tp;
11180 struct timezone *tzp;
11181 gettimeofday(tp,tzp);
11182   ;
11183   return 0;
11184 }
11185 _ACEOF
11186 if ac_fn_c_try_compile "$LINENO"; then :
11187   pgac_cv_func_gettimeofday_1arg=no
11188 else
11189   pgac_cv_func_gettimeofday_1arg=yes
11190 fi
11191 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11192 fi
11193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_gettimeofday_1arg" >&5
11194 $as_echo "$pgac_cv_func_gettimeofday_1arg" >&6; }
11195 if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
11196
11197 $as_echo "#define GETTIMEOFDAY_1ARG 1" >>confdefs.h
11198
11199 fi
11200
11201
11202 # Some versions of libedit contain strlcpy(), setproctitle(), and other
11203 # symbols that that library has no business exposing to the world.  Pending
11204 # acquisition of a clue by those developers, ignore libedit (including its
11205 # possible alias of libreadline) while checking for everything else.
11206 LIBS_including_readline="$LIBS"
11207 LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
11208
11209 for ac_func in cbrt dlopen fdatasync getifaddrs getpeerucred getrlimit mbstowcs_l memmove poll pstat readlink setproctitle setsid shm_open sigprocmask symlink sync_file_range towlower utime utimes wcstombs wcstombs_l
11210 do :
11211   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11212 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11213 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11214   cat >>confdefs.h <<_ACEOF
11215 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11216 _ACEOF
11217
11218 fi
11219 done
11220
11221
11222 ac_fn_c_check_func "$LINENO" "fseeko" "ac_cv_func_fseeko"
11223 if test "x$ac_cv_func_fseeko" = xyes; then :
11224   $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
11225
11226 else
11227   case " $LIBOBJS " in
11228   *" fseeko.$ac_objext "* ) ;;
11229   *) LIBOBJS="$LIBOBJS fseeko.$ac_objext"
11230  ;;
11231 esac
11232
11233 fi
11234
11235
11236 case $host_os in
11237         # NetBSD uses a custom fseeko/ftello built on fsetpos/fgetpos
11238         # Mingw uses macros to access Win32 API calls
11239         netbsd*|mingw*)
11240
11241 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
11242
11243                 ac_cv_func_fseeko=yes;;
11244         *)
11245                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
11246 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
11247 if ${ac_cv_sys_largefile_source+:} false; then :
11248   $as_echo_n "(cached) " >&6
11249 else
11250   while :; do
11251   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11252 /* end confdefs.h.  */
11253 #include <sys/types.h> /* for off_t */
11254      #include <stdio.h>
11255 int
11256 main ()
11257 {
11258 int (*fp) (FILE *, off_t, int) = fseeko;
11259      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
11260   ;
11261   return 0;
11262 }
11263 _ACEOF
11264 if ac_fn_c_try_link "$LINENO"; then :
11265   ac_cv_sys_largefile_source=no; break
11266 fi
11267 rm -f core conftest.err conftest.$ac_objext \
11268     conftest$ac_exeext conftest.$ac_ext
11269   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11270 /* end confdefs.h.  */
11271 #define _LARGEFILE_SOURCE 1
11272 #include <sys/types.h> /* for off_t */
11273      #include <stdio.h>
11274 int
11275 main ()
11276 {
11277 int (*fp) (FILE *, off_t, int) = fseeko;
11278      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
11279   ;
11280   return 0;
11281 }
11282 _ACEOF
11283 if ac_fn_c_try_link "$LINENO"; then :
11284   ac_cv_sys_largefile_source=1; break
11285 fi
11286 rm -f core conftest.err conftest.$ac_objext \
11287     conftest$ac_exeext conftest.$ac_ext
11288   ac_cv_sys_largefile_source=unknown
11289   break
11290 done
11291 fi
11292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
11293 $as_echo "$ac_cv_sys_largefile_source" >&6; }
11294 case $ac_cv_sys_largefile_source in #(
11295   no | unknown) ;;
11296   *)
11297 cat >>confdefs.h <<_ACEOF
11298 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
11299 _ACEOF
11300 ;;
11301 esac
11302 rm -rf conftest*
11303
11304 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
11305 # in glibc 2.1.3, but that breaks too many other things.
11306 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
11307 if test $ac_cv_sys_largefile_source != unknown; then
11308
11309 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
11310
11311 fi
11312 ;;
11313 esac
11314
11315 # posix_fadvise() is a no-op on Solaris, so don't incur function overhead
11316 # by calling it, 2009-04-02
11317 # http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/posix_fadvise.c
11318 if test "$PORTNAME" != "solaris"; then
11319 for ac_func in posix_fadvise
11320 do :
11321   ac_fn_c_check_func "$LINENO" "posix_fadvise" "ac_cv_func_posix_fadvise"
11322 if test "x$ac_cv_func_posix_fadvise" = xyes; then :
11323   cat >>confdefs.h <<_ACEOF
11324 #define HAVE_POSIX_FADVISE 1
11325 _ACEOF
11326
11327 fi
11328 done
11329
11330 ac_fn_c_check_decl "$LINENO" "posix_fadvise" "ac_cv_have_decl_posix_fadvise" "#include <fcntl.h>
11331 "
11332 if test "x$ac_cv_have_decl_posix_fadvise" = xyes; then :
11333   ac_have_decl=1
11334 else
11335   ac_have_decl=0
11336 fi
11337
11338 cat >>confdefs.h <<_ACEOF
11339 #define HAVE_DECL_POSIX_FADVISE $ac_have_decl
11340 _ACEOF
11341
11342 fi
11343
11344 ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "#include <unistd.h>
11345 "
11346 if test "x$ac_cv_have_decl_fdatasync" = xyes; then :
11347   ac_have_decl=1
11348 else
11349   ac_have_decl=0
11350 fi
11351
11352 cat >>confdefs.h <<_ACEOF
11353 #define HAVE_DECL_FDATASYNC $ac_have_decl
11354 _ACEOF
11355
11356 ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
11357 if test "x$ac_cv_have_decl_strlcat" = xyes; then :
11358   ac_have_decl=1
11359 else
11360   ac_have_decl=0
11361 fi
11362
11363 cat >>confdefs.h <<_ACEOF
11364 #define HAVE_DECL_STRLCAT $ac_have_decl
11365 _ACEOF
11366 ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
11367 if test "x$ac_cv_have_decl_strlcpy" = xyes; then :
11368   ac_have_decl=1
11369 else
11370   ac_have_decl=0
11371 fi
11372
11373 cat >>confdefs.h <<_ACEOF
11374 #define HAVE_DECL_STRLCPY $ac_have_decl
11375 _ACEOF
11376
11377 # This is probably only present on Darwin, but may as well check always
11378 ac_fn_c_check_decl "$LINENO" "F_FULLFSYNC" "ac_cv_have_decl_F_FULLFSYNC" "#include <fcntl.h>
11379 "
11380 if test "x$ac_cv_have_decl_F_FULLFSYNC" = xyes; then :
11381   ac_have_decl=1
11382 else
11383   ac_have_decl=0
11384 fi
11385
11386 cat >>confdefs.h <<_ACEOF
11387 #define HAVE_DECL_F_FULLFSYNC $ac_have_decl
11388 _ACEOF
11389
11390
11391 HAVE_IPV6=no
11392 ac_fn_c_check_type "$LINENO" "struct sockaddr_in6" "ac_cv_type_struct_sockaddr_in6" "$ac_includes_default
11393 #include <netinet/in.h>
11394 "
11395 if test "x$ac_cv_type_struct_sockaddr_in6" = xyes; then :
11396
11397 $as_echo "#define HAVE_IPV6 1" >>confdefs.h
11398
11399          HAVE_IPV6=yes
11400 fi
11401
11402
11403
11404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PS_STRINGS" >&5
11405 $as_echo_n "checking for PS_STRINGS... " >&6; }
11406 if ${pgac_cv_var_PS_STRINGS+:} false; then :
11407   $as_echo_n "(cached) " >&6
11408 else
11409   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11410 /* end confdefs.h.  */
11411 #include <machine/vmparam.h>
11412 #include <sys/exec.h>
11413
11414 int
11415 main ()
11416 {
11417 PS_STRINGS->ps_nargvstr = 1;
11418 PS_STRINGS->ps_argvstr = "foo";
11419   ;
11420   return 0;
11421 }
11422 _ACEOF
11423 if ac_fn_c_try_link "$LINENO"; then :
11424   pgac_cv_var_PS_STRINGS=yes
11425 else
11426   pgac_cv_var_PS_STRINGS=no
11427 fi
11428 rm -f core conftest.err conftest.$ac_objext \
11429     conftest$ac_exeext conftest.$ac_ext
11430 fi
11431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_PS_STRINGS" >&5
11432 $as_echo "$pgac_cv_var_PS_STRINGS" >&6; }
11433 if test "$pgac_cv_var_PS_STRINGS" = yes ; then
11434
11435 $as_echo "#define HAVE_PS_STRINGS 1" >>confdefs.h
11436
11437 fi
11438
11439
11440 # We use our snprintf.c emulation if either snprintf() or vsnprintf()
11441 # is missing.  Yes, there are machines that have only one.  We may
11442 # also decide to use snprintf.c if snprintf() is present but does not
11443 # have all the features we need --- see below.
11444
11445 if test "$PORTNAME" = "win32"; then
11446   # Win32 gets snprintf.c built unconditionally.
11447   #
11448   # To properly translate all NLS languages strings, we must support the
11449   # *printf() %$ format, which allows *printf() arguments to be selected
11450   # by position in the translated string.
11451   #
11452   # libintl versions < 0.13 use the native *printf() functions, and Win32
11453   # *printf() doesn't understand %$, so we must use our /port versions,
11454   # which do understand %$. libintl versions >= 0.13 include their own
11455   # *printf versions on Win32.  The libintl 0.13 release note text is:
11456   #
11457   #   C format strings with positions, as they arise when a translator
11458   #   needs to reorder a sentence, are now supported on all platforms.
11459   #   On those few platforms (NetBSD and Woe32) for which the native
11460   #   printf()/fprintf()/... functions don't support such format
11461   #   strings, replacements are provided through <libintl.h>.
11462   #
11463   # We could use libintl >= 0.13's *printf() if we were sure that we had
11464   # a litint >= 0.13 at runtime, but seeing that there is no clean way
11465   # to guarantee that, it is best to just use our own, so we are sure to
11466   # get %$ support. In include/port.h we disable the *printf() macros
11467   # that might have been defined by libintl.
11468   #
11469   # We do this unconditionally whether NLS is used or not so we are sure
11470   # that all Win32 libraries and binaries behave the same.
11471   pgac_need_repl_snprintf=yes
11472 else
11473   pgac_need_repl_snprintf=no
11474   for ac_func in snprintf
11475 do :
11476   ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
11477 if test "x$ac_cv_func_snprintf" = xyes; then :
11478   cat >>confdefs.h <<_ACEOF
11479 #define HAVE_SNPRINTF 1
11480 _ACEOF
11481
11482 else
11483   pgac_need_repl_snprintf=yes
11484 fi
11485 done
11486
11487   for ac_func in vsnprintf
11488 do :
11489   ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
11490 if test "x$ac_cv_func_vsnprintf" = xyes; then :
11491   cat >>confdefs.h <<_ACEOF
11492 #define HAVE_VSNPRINTF 1
11493 _ACEOF
11494
11495 else
11496   pgac_need_repl_snprintf=yes
11497 fi
11498 done
11499
11500 fi
11501
11502
11503 # Check whether <stdio.h> declares snprintf() and vsnprintf(); if not,
11504 # include/c.h will provide declarations.  Note this is a separate test
11505 # from whether the functions exist in the C library --- there are
11506 # systems that have the functions but don't bother to declare them :-(
11507
11508 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
11509 if test "x$ac_cv_have_decl_snprintf" = xyes; then :
11510   ac_have_decl=1
11511 else
11512   ac_have_decl=0
11513 fi
11514
11515 cat >>confdefs.h <<_ACEOF
11516 #define HAVE_DECL_SNPRINTF $ac_have_decl
11517 _ACEOF
11518 ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
11519 if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
11520   ac_have_decl=1
11521 else
11522   ac_have_decl=0
11523 fi
11524
11525 cat >>confdefs.h <<_ACEOF
11526 #define HAVE_DECL_VSNPRINTF $ac_have_decl
11527 _ACEOF
11528
11529
11530
11531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for isinf" >&5
11532 $as_echo_n "checking for isinf... " >&6; }
11533 if ${ac_cv_func_isinf+:} false; then :
11534   $as_echo_n "(cached) " >&6
11535 else
11536   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11537 /* end confdefs.h.  */
11538
11539 #include <math.h>
11540 double glob_double;
11541
11542 int
11543 main ()
11544 {
11545 return isinf(glob_double) ? 0 : 1;
11546   ;
11547   return 0;
11548 }
11549 _ACEOF
11550 if ac_fn_c_try_link "$LINENO"; then :
11551   ac_cv_func_isinf=yes
11552 else
11553   ac_cv_func_isinf=no
11554 fi
11555 rm -f core conftest.err conftest.$ac_objext \
11556     conftest$ac_exeext conftest.$ac_ext
11557 fi
11558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_isinf" >&5
11559 $as_echo "$ac_cv_func_isinf" >&6; }
11560
11561 if test $ac_cv_func_isinf = yes ; then
11562
11563 $as_echo "#define HAVE_ISINF 1" >>confdefs.h
11564
11565 else
11566   case " $LIBOBJS " in
11567   *" isinf.$ac_objext "* ) ;;
11568   *) LIBOBJS="$LIBOBJS isinf.$ac_objext"
11569  ;;
11570 esac
11571
11572   # Look for a way to implement a substitute for isinf()
11573   for ac_func in fpclass fp_class fp_class_d class
11574 do :
11575   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11576 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11577 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11578   cat >>confdefs.h <<_ACEOF
11579 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11580 _ACEOF
11581  break
11582 fi
11583 done
11584
11585 fi
11586
11587 ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt"
11588 if test "x$ac_cv_func_crypt" = xyes; then :
11589   $as_echo "#define HAVE_CRYPT 1" >>confdefs.h
11590
11591 else
11592   case " $LIBOBJS " in
11593   *" crypt.$ac_objext "* ) ;;
11594   *) LIBOBJS="$LIBOBJS crypt.$ac_objext"
11595  ;;
11596 esac
11597
11598 fi
11599
11600 ac_fn_c_check_func "$LINENO" "fls" "ac_cv_func_fls"
11601 if test "x$ac_cv_func_fls" = xyes; then :
11602   $as_echo "#define HAVE_FLS 1" >>confdefs.h
11603
11604 else
11605   case " $LIBOBJS " in
11606   *" fls.$ac_objext "* ) ;;
11607   *) LIBOBJS="$LIBOBJS fls.$ac_objext"
11608  ;;
11609 esac
11610
11611 fi
11612
11613 ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt"
11614 if test "x$ac_cv_func_getopt" = xyes; then :
11615   $as_echo "#define HAVE_GETOPT 1" >>confdefs.h
11616
11617 else
11618   case " $LIBOBJS " in
11619   *" getopt.$ac_objext "* ) ;;
11620   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
11621  ;;
11622 esac
11623
11624 fi
11625
11626 ac_fn_c_check_func "$LINENO" "getrusage" "ac_cv_func_getrusage"
11627 if test "x$ac_cv_func_getrusage" = xyes; then :
11628   $as_echo "#define HAVE_GETRUSAGE 1" >>confdefs.h
11629
11630 else
11631   case " $LIBOBJS " in
11632   *" getrusage.$ac_objext "* ) ;;
11633   *) LIBOBJS="$LIBOBJS getrusage.$ac_objext"
11634  ;;
11635 esac
11636
11637 fi
11638
11639 ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
11640 if test "x$ac_cv_func_inet_aton" = xyes; then :
11641   $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
11642
11643 else
11644   case " $LIBOBJS " in
11645   *" inet_aton.$ac_objext "* ) ;;
11646   *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
11647  ;;
11648 esac
11649
11650 fi
11651
11652 ac_fn_c_check_func "$LINENO" "random" "ac_cv_func_random"
11653 if test "x$ac_cv_func_random" = xyes; then :
11654   $as_echo "#define HAVE_RANDOM 1" >>confdefs.h
11655
11656 else
11657   case " $LIBOBJS " in
11658   *" random.$ac_objext "* ) ;;
11659   *) LIBOBJS="$LIBOBJS random.$ac_objext"
11660  ;;
11661 esac
11662
11663 fi
11664
11665 ac_fn_c_check_func "$LINENO" "rint" "ac_cv_func_rint"
11666 if test "x$ac_cv_func_rint" = xyes; then :
11667   $as_echo "#define HAVE_RINT 1" >>confdefs.h
11668
11669 else
11670   case " $LIBOBJS " in
11671   *" rint.$ac_objext "* ) ;;
11672   *) LIBOBJS="$LIBOBJS rint.$ac_objext"
11673  ;;
11674 esac
11675
11676 fi
11677
11678 ac_fn_c_check_func "$LINENO" "srandom" "ac_cv_func_srandom"
11679 if test "x$ac_cv_func_srandom" = xyes; then :
11680   $as_echo "#define HAVE_SRANDOM 1" >>confdefs.h
11681
11682 else
11683   case " $LIBOBJS " in
11684   *" srandom.$ac_objext "* ) ;;
11685   *) LIBOBJS="$LIBOBJS srandom.$ac_objext"
11686  ;;
11687 esac
11688
11689 fi
11690
11691 ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror"
11692 if test "x$ac_cv_func_strerror" = xyes; then :
11693   $as_echo "#define HAVE_STRERROR 1" >>confdefs.h
11694
11695 else
11696   case " $LIBOBJS " in
11697   *" strerror.$ac_objext "* ) ;;
11698   *) LIBOBJS="$LIBOBJS strerror.$ac_objext"
11699  ;;
11700 esac
11701
11702 fi
11703
11704 ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
11705 if test "x$ac_cv_func_strlcat" = xyes; then :
11706   $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
11707
11708 else
11709   case " $LIBOBJS " in
11710   *" strlcat.$ac_objext "* ) ;;
11711   *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
11712  ;;
11713 esac
11714
11715 fi
11716
11717 ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
11718 if test "x$ac_cv_func_strlcpy" = xyes; then :
11719   $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
11720
11721 else
11722   case " $LIBOBJS " in
11723   *" strlcpy.$ac_objext "* ) ;;
11724   *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
11725  ;;
11726 esac
11727
11728 fi
11729
11730
11731
11732 case $host_os in
11733
11734         # Windows uses a specialised env handler
11735         # and doesn't need a replacement getpeereid because it doesn't use
11736         # Unix sockets.
11737         mingw*)
11738
11739 $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
11740
11741
11742 $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
11743
11744                 ac_cv_func_unsetenv=yes
11745                 ac_cv_func_getpeereid=yes;;
11746         *)
11747                 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
11748 if test "x$ac_cv_func_unsetenv" = xyes; then :
11749   $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
11750
11751 else
11752   case " $LIBOBJS " in
11753   *" unsetenv.$ac_objext "* ) ;;
11754   *) LIBOBJS="$LIBOBJS unsetenv.$ac_objext"
11755  ;;
11756 esac
11757
11758 fi
11759
11760 ac_fn_c_check_func "$LINENO" "getpeereid" "ac_cv_func_getpeereid"
11761 if test "x$ac_cv_func_getpeereid" = xyes; then :
11762   $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
11763
11764 else
11765   case " $LIBOBJS " in
11766   *" getpeereid.$ac_objext "* ) ;;
11767   *) LIBOBJS="$LIBOBJS getpeereid.$ac_objext"
11768  ;;
11769 esac
11770
11771 fi
11772
11773
11774                 ;;
11775 esac
11776
11777 # System's version of getaddrinfo(), if any, may be used only if we found
11778 # a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
11779 # (Note: the AC_REPLACE_FUNCS probe fails on Windows, where the available
11780 # versions of getaddrinfo don't follow normal C call protocol.  This is OK
11781 # because we want to use our own getaddrinfo.c on Windows anyway.)
11782 if test x"$ac_cv_type_struct_addrinfo" = xyes ; then
11783   ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo"
11784 if test "x$ac_cv_func_getaddrinfo" = xyes; then :
11785   $as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
11786
11787 else
11788   case " $LIBOBJS " in
11789   *" getaddrinfo.$ac_objext "* ) ;;
11790   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
11791  ;;
11792 esac
11793
11794 fi
11795
11796
11797 else
11798   case " $LIBOBJS " in
11799   *" getaddrinfo.$ac_objext "* ) ;;
11800   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
11801  ;;
11802 esac
11803
11804 fi
11805
11806 # Similarly, use system's getopt_long() only if system provides struct option.
11807 if test x"$ac_cv_type_struct_option" = xyes ; then
11808   ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long"
11809 if test "x$ac_cv_func_getopt_long" = xyes; then :
11810   $as_echo "#define HAVE_GETOPT_LONG 1" >>confdefs.h
11811
11812 else
11813   case " $LIBOBJS " in
11814   *" getopt_long.$ac_objext "* ) ;;
11815   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
11816  ;;
11817 esac
11818
11819 fi
11820
11821
11822 else
11823   case " $LIBOBJS " in
11824   *" getopt_long.$ac_objext "* ) ;;
11825   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
11826  ;;
11827 esac
11828
11829 fi
11830
11831 # Solaris' getopt() doesn't do what we want for long options, so always use
11832 # our version on that platform.
11833 if test "$PORTNAME" = "solaris"; then
11834   case " $LIBOBJS " in
11835   *" getopt.$ac_objext "* ) ;;
11836   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
11837  ;;
11838 esac
11839
11840 fi
11841
11842 # mingw has adopted a GNU-centric interpretation of optind/optreset,
11843 # so always use our version on Windows.
11844 if test "$PORTNAME" = "win32"; then
11845   case " $LIBOBJS " in
11846   *" getopt.$ac_objext "* ) ;;
11847   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
11848  ;;
11849 esac
11850
11851   case " $LIBOBJS " in
11852   *" getopt_long.$ac_objext "* ) ;;
11853   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
11854  ;;
11855 esac
11856
11857 fi
11858
11859 # Win32 support
11860 if test "$PORTNAME" = "win32"; then
11861   ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
11862 if test "x$ac_cv_func_gettimeofday" = xyes; then :
11863   $as_echo "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
11864
11865 else
11866   case " $LIBOBJS " in
11867   *" gettimeofday.$ac_objext "* ) ;;
11868   *) LIBOBJS="$LIBOBJS gettimeofday.$ac_objext"
11869  ;;
11870 esac
11871
11872 fi
11873
11874
11875   case " $LIBOBJS " in
11876   *" kill.$ac_objext "* ) ;;
11877   *) LIBOBJS="$LIBOBJS kill.$ac_objext"
11878  ;;
11879 esac
11880
11881   case " $LIBOBJS " in
11882   *" open.$ac_objext "* ) ;;
11883   *) LIBOBJS="$LIBOBJS open.$ac_objext"
11884  ;;
11885 esac
11886
11887   case " $LIBOBJS " in
11888   *" system.$ac_objext "* ) ;;
11889   *) LIBOBJS="$LIBOBJS system.$ac_objext"
11890  ;;
11891 esac
11892
11893   case " $LIBOBJS " in
11894   *" win32env.$ac_objext "* ) ;;
11895   *) LIBOBJS="$LIBOBJS win32env.$ac_objext"
11896  ;;
11897 esac
11898
11899   case " $LIBOBJS " in
11900   *" win32error.$ac_objext "* ) ;;
11901   *) LIBOBJS="$LIBOBJS win32error.$ac_objext"
11902  ;;
11903 esac
11904
11905   case " $LIBOBJS " in
11906   *" win32setlocale.$ac_objext "* ) ;;
11907   *) LIBOBJS="$LIBOBJS win32setlocale.$ac_objext"
11908  ;;
11909 esac
11910
11911
11912 $as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
11913
11914   ac_fn_c_check_type "$LINENO" "MINIDUMP_TYPE" "ac_cv_type_MINIDUMP_TYPE" "
11915 #define WIN32_LEAN_AND_MEAN
11916 #include <windows.h>
11917 #include <string.h>
11918 #include <dbghelp.h>
11919 "
11920 if test "x$ac_cv_type_MINIDUMP_TYPE" = xyes; then :
11921
11922 cat >>confdefs.h <<_ACEOF
11923 #define HAVE_MINIDUMP_TYPE 1
11924 _ACEOF
11925
11926 pgac_minidump_type=yes
11927 else
11928   pgac_minidump_type=no
11929 fi
11930
11931 fi
11932 if test x"$pgac_minidump_type" = x"yes" ; then
11933   have_win32_dbghelp=yes
11934
11935 else
11936   have_win32_dbghelp=no
11937
11938 fi
11939
11940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
11941 $as_echo_n "checking for sigsetjmp... " >&6; }
11942 if ${pgac_cv_func_sigsetjmp+:} false; then :
11943   $as_echo_n "(cached) " >&6
11944 else
11945   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11946 /* end confdefs.h.  */
11947 #include <setjmp.h>
11948 int
11949 main ()
11950 {
11951 sigjmp_buf x; sigsetjmp(x, 1);
11952   ;
11953   return 0;
11954 }
11955 _ACEOF
11956 if ac_fn_c_try_link "$LINENO"; then :
11957   pgac_cv_func_sigsetjmp=yes
11958 else
11959   pgac_cv_func_sigsetjmp=no
11960 fi
11961 rm -f core conftest.err conftest.$ac_objext \
11962     conftest$ac_exeext conftest.$ac_ext
11963 fi
11964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_sigsetjmp" >&5
11965 $as_echo "$pgac_cv_func_sigsetjmp" >&6; }
11966 if test x"$pgac_cv_func_sigsetjmp" = x"yes"; then
11967
11968 $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
11969
11970 fi
11971
11972 ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "#include <signal.h>
11973 /* NetBSD declares sys_siglist in unistd.h.  */
11974 #ifdef HAVE_UNISTD_H
11975 # include <unistd.h>
11976 #endif
11977
11978 "
11979 if test "x$ac_cv_have_decl_sys_siglist" = xyes; then :
11980   ac_have_decl=1
11981 else
11982   ac_have_decl=0
11983 fi
11984
11985 cat >>confdefs.h <<_ACEOF
11986 #define HAVE_DECL_SYS_SIGLIST $ac_have_decl
11987 _ACEOF
11988
11989
11990
11991 ac_fn_c_check_func "$LINENO" "syslog" "ac_cv_func_syslog"
11992 if test "x$ac_cv_func_syslog" = xyes; then :
11993   ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default"
11994 if test "x$ac_cv_header_syslog_h" = xyes; then :
11995
11996 $as_echo "#define HAVE_SYSLOG 1" >>confdefs.h
11997
11998 fi
11999
12000
12001 fi
12002
12003
12004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opterr" >&5
12005 $as_echo_n "checking for opterr... " >&6; }
12006 if ${pgac_cv_var_int_opterr+:} false; then :
12007   $as_echo_n "(cached) " >&6
12008 else
12009   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12010 /* end confdefs.h.  */
12011 #include <unistd.h>
12012 int
12013 main ()
12014 {
12015 extern int opterr; opterr = 1;
12016   ;
12017   return 0;
12018 }
12019 _ACEOF
12020 if ac_fn_c_try_link "$LINENO"; then :
12021   pgac_cv_var_int_opterr=yes
12022 else
12023   pgac_cv_var_int_opterr=no
12024 fi
12025 rm -f core conftest.err conftest.$ac_objext \
12026     conftest$ac_exeext conftest.$ac_ext
12027 fi
12028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_opterr" >&5
12029 $as_echo "$pgac_cv_var_int_opterr" >&6; }
12030 if test x"$pgac_cv_var_int_opterr" = x"yes"; then
12031
12032 $as_echo "#define HAVE_INT_OPTERR 1" >>confdefs.h
12033
12034 fi
12035
12036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for optreset" >&5
12037 $as_echo_n "checking for optreset... " >&6; }
12038 if ${pgac_cv_var_int_optreset+:} false; then :
12039   $as_echo_n "(cached) " >&6
12040 else
12041   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12042 /* end confdefs.h.  */
12043 #include <unistd.h>
12044 int
12045 main ()
12046 {
12047 extern int optreset; optreset = 1;
12048   ;
12049   return 0;
12050 }
12051 _ACEOF
12052 if ac_fn_c_try_link "$LINENO"; then :
12053   pgac_cv_var_int_optreset=yes
12054 else
12055   pgac_cv_var_int_optreset=no
12056 fi
12057 rm -f core conftest.err conftest.$ac_objext \
12058     conftest$ac_exeext conftest.$ac_ext
12059 fi
12060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_optreset" >&5
12061 $as_echo "$pgac_cv_var_int_optreset" >&6; }
12062 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
12063
12064 $as_echo "#define HAVE_INT_OPTRESET 1" >>confdefs.h
12065
12066 fi
12067
12068 for ac_func in strtoll strtoq
12069 do :
12070   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12071 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12072 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12073   cat >>confdefs.h <<_ACEOF
12074 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12075 _ACEOF
12076  break
12077 fi
12078 done
12079
12080 for ac_func in strtoull strtouq
12081 do :
12082   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12083 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12084 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12085   cat >>confdefs.h <<_ACEOF
12086 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12087 _ACEOF
12088  break
12089 fi
12090 done
12091
12092
12093 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin locking functions" >&5
12094 $as_echo_n "checking for builtin locking functions... " >&6; }
12095 if ${pgac_cv_gcc_int_atomics+:} false; then :
12096   $as_echo_n "(cached) " >&6
12097 else
12098   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12099 /* end confdefs.h.  */
12100
12101 int
12102 main ()
12103 {
12104 int lock = 0;
12105    __sync_lock_test_and_set(&lock, 1);
12106    __sync_lock_release(&lock);
12107   ;
12108   return 0;
12109 }
12110 _ACEOF
12111 if ac_fn_c_try_link "$LINENO"; then :
12112   pgac_cv_gcc_int_atomics="yes"
12113 else
12114   pgac_cv_gcc_int_atomics="no"
12115 fi
12116 rm -f core conftest.err conftest.$ac_objext \
12117     conftest$ac_exeext conftest.$ac_ext
12118 fi
12119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_int_atomics" >&5
12120 $as_echo "$pgac_cv_gcc_int_atomics" >&6; }
12121 if test x"$pgac_cv_gcc_int_atomics" = x"yes"; then
12122
12123 $as_echo "#define HAVE_GCC_INT_ATOMICS 1" >>confdefs.h
12124
12125 fi
12126
12127 # Lastly, restore full LIBS list and check for readline/libedit symbols
12128 LIBS="$LIBS_including_readline"
12129
12130 if test "$with_readline" = yes; then
12131   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_append_character" >&5
12132 $as_echo_n "checking for rl_completion_append_character... " >&6; }
12133 if ${pgac_cv_var_rl_completion_append_character+:} false; then :
12134   $as_echo_n "(cached) " >&6
12135 else
12136   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12137 /* end confdefs.h.  */
12138 #include <stdio.h>
12139 #ifdef HAVE_READLINE_READLINE_H
12140 # include <readline/readline.h>
12141 #elif defined(HAVE_READLINE_H)
12142 # include <readline.h>
12143 #endif
12144
12145 int
12146 main ()
12147 {
12148 rl_completion_append_character = 'x';
12149   ;
12150   return 0;
12151 }
12152 _ACEOF
12153 if ac_fn_c_try_link "$LINENO"; then :
12154   pgac_cv_var_rl_completion_append_character=yes
12155 else
12156   pgac_cv_var_rl_completion_append_character=no
12157 fi
12158 rm -f core conftest.err conftest.$ac_objext \
12159     conftest$ac_exeext conftest.$ac_ext
12160 fi
12161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_completion_append_character" >&5
12162 $as_echo "$pgac_cv_var_rl_completion_append_character" >&6; }
12163 if test x"$pgac_cv_var_rl_completion_append_character" = x"yes"; then
12164
12165 $as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
12166
12167 fi
12168   for ac_func in rl_completion_matches rl_filename_completion_function
12169 do :
12170   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12171 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12172 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12173   cat >>confdefs.h <<_ACEOF
12174 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12175 _ACEOF
12176
12177 fi
12178 done
12179
12180   for ac_func in append_history history_truncate_file
12181 do :
12182   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12183 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12184 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12185   cat >>confdefs.h <<_ACEOF
12186 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12187 _ACEOF
12188
12189 fi
12190 done
12191
12192 fi
12193
12194
12195 #
12196 # Pthreads
12197 #
12198 # For each platform, we need to know about any special compile and link
12199 # libraries, and whether the normal C function names are thread-safe.
12200 # See the comment at the top of src/port/thread.c for more information.
12201 # WIN32 doesn't need the pthread tests;  it always uses threads
12202 if test "$enable_thread_safety" = yes -a "$PORTNAME" != "win32"; then
12203
12204
12205
12206 ac_ext=c
12207 ac_cpp='$CPP $CPPFLAGS'
12208 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12209 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12210 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12211
12212 acx_pthread_ok=no
12213
12214 # We used to check for pthread.h first, but this fails if pthread.h
12215 # requires special compiler flags (e.g. on True64 or Sequent).
12216 # It gets checked for in the link test anyway.
12217
12218 # First of all, check if the user has set any of the PTHREAD_LIBS,
12219 # etcetera environment variables, and if threads linking works using
12220 # them:
12221 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
12222         save_CFLAGS="$CFLAGS"
12223         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
12224         save_LIBS="$LIBS"
12225         LIBS="$PTHREAD_LIBS $LIBS"
12226         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
12227 $as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; }
12228         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12229 /* end confdefs.h.  */
12230
12231 /* Override any GCC internal prototype to avoid an error.
12232    Use char because int might match the return type of a GCC
12233    builtin and then its argument prototype would still apply.  */
12234 #ifdef __cplusplus
12235 extern "C"
12236 #endif
12237 char pthread_join ();
12238 int
12239 main ()
12240 {
12241 return pthread_join ();
12242   ;
12243   return 0;
12244 }
12245 _ACEOF
12246 if ac_fn_c_try_link "$LINENO"; then :
12247   acx_pthread_ok=yes
12248 fi
12249 rm -f core conftest.err conftest.$ac_objext \
12250     conftest$ac_exeext conftest.$ac_ext
12251         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_ok" >&5
12252 $as_echo "$acx_pthread_ok" >&6; }
12253         if test x"$acx_pthread_ok" = xno; then
12254                 PTHREAD_LIBS=""
12255                 PTHREAD_CFLAGS=""
12256         fi
12257         LIBS="$save_LIBS"
12258         CFLAGS="$save_CFLAGS"
12259 fi
12260
12261 # We must check for the threads library under a number of different
12262 # names; the ordering is very important because some systems
12263 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
12264 # libraries is broken (non-POSIX).
12265
12266 # Create a list of thread flags to try.  Items starting with a "-" are
12267 # C compiler flags, and other items are library names, except for "none"
12268 # which indicates that we try without any flags at all, and "pthread-config"
12269 # which is a program returning the flags for the Pth emulation library.
12270
12271 acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config pthreadGC2"
12272
12273 # The ordering *is* (sometimes) important.  Some notes on the
12274 # individual items follow:
12275
12276 # pthreads: AIX (must check this before -lpthread)
12277 # none: in case threads are in libc; should be tried before -Kthread and
12278 #       other compiler flags to prevent continual compiler warnings
12279 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
12280 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
12281 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
12282 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
12283 # -pthreads: Solaris/gcc
12284 # -mthreads: Mingw32/gcc, Lynx/gcc
12285 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
12286 #      doesn't hurt to check since this sometimes defines pthreads too;
12287 #      also defines -D_REENTRANT)
12288 # pthread: Linux, etcetera
12289 # --thread-safe: KAI C++
12290 # pthread-config: use pthread-config program (for GNU Pth library)
12291
12292 case "${host_cpu}-${host_os}" in
12293         *solaris*)
12294
12295         # On Solaris (at least, for some versions), libc contains stubbed
12296         # (non-functional) versions of the pthreads routines, so link-based
12297         # tests will erroneously succeed.  (We need to link with -pthread or
12298         # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
12299         # a function called by this macro, so we could check for that, but
12300         # who knows whether they'll stub that too in a future libc.)  So,
12301         # we'll just look for -pthreads and -lpthread first:
12302
12303         acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags"
12304         ;;
12305 esac
12306
12307 if test x"$acx_pthread_ok" = xno; then
12308 for flag in $acx_pthread_flags; do
12309
12310         tryPTHREAD_CFLAGS=""
12311         tryPTHREAD_LIBS=""
12312         case $flag in
12313                 none)
12314                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
12315 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
12316                 ;;
12317
12318                 -*)
12319                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5
12320 $as_echo_n "checking whether pthreads work with $flag... " >&6; }
12321                 tryPTHREAD_CFLAGS="$flag"
12322                 ;;
12323
12324                 pthread-config)
12325                 # skip this if we already have flags defined, for PostgreSQL
12326                 if test x"$PTHREAD_CFLAGS" != x -o x"$PTHREAD_LIBS" != x; then continue; fi
12327                 # Extract the first word of "pthread-config", so it can be a program name with args.
12328 set dummy pthread-config; ac_word=$2
12329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12330 $as_echo_n "checking for $ac_word... " >&6; }
12331 if ${ac_cv_prog_acx_pthread_config+:} false; then :
12332   $as_echo_n "(cached) " >&6
12333 else
12334   if test -n "$acx_pthread_config"; then
12335   ac_cv_prog_acx_pthread_config="$acx_pthread_config" # Let the user override the test.
12336 else
12337 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12338 for as_dir in $PATH
12339 do
12340   IFS=$as_save_IFS
12341   test -z "$as_dir" && as_dir=.
12342     for ac_exec_ext in '' $ac_executable_extensions; do
12343   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12344     ac_cv_prog_acx_pthread_config="yes"
12345     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12346     break 2
12347   fi
12348 done
12349   done
12350 IFS=$as_save_IFS
12351
12352   test -z "$ac_cv_prog_acx_pthread_config" && ac_cv_prog_acx_pthread_config="no"
12353 fi
12354 fi
12355 acx_pthread_config=$ac_cv_prog_acx_pthread_config
12356 if test -n "$acx_pthread_config"; then
12357   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_config" >&5
12358 $as_echo "$acx_pthread_config" >&6; }
12359 else
12360   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12361 $as_echo "no" >&6; }
12362 fi
12363
12364
12365                 if test x"$acx_pthread_config" = xno; then continue; fi
12366                 tryPTHREAD_CFLAGS="`pthread-config --cflags`"
12367                 tryPTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
12368                 ;;
12369
12370                 *)
12371                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5
12372 $as_echo_n "checking for the pthreads library -l$flag... " >&6; }
12373                 tryPTHREAD_LIBS="-l$flag"
12374                 ;;
12375         esac
12376
12377         save_LIBS="$LIBS"
12378         save_CFLAGS="$CFLAGS"
12379         LIBS="$tryPTHREAD_LIBS $PTHREAD_LIBS $LIBS"
12380         CFLAGS="$CFLAGS $PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
12381
12382         # Check for various functions.  We must include pthread.h,
12383         # since some functions may be macros.  (On the Sequent, we
12384         # need a special flag -Kthread to make this header compile.)
12385         # We check for pthread_join because it is in -lpthread on IRIX
12386         # while pthread_create is in libc.  We check for pthread_attr_init
12387         # due to DEC craziness with -lpthreads.  We check for
12388         # pthread_cleanup_push because it is one of the few pthread
12389         # functions on Solaris that doesn't have a non-functional libc stub.
12390         # We try pthread_create on general principles.
12391         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12392 /* end confdefs.h.  */
12393 #include <pthread.h>
12394 int
12395 main ()
12396 {
12397 pthread_t th; pthread_join(th, 0);
12398                      pthread_attr_init(0); pthread_cleanup_push(0, 0);
12399                      pthread_create(0,0,0,0); pthread_cleanup_pop(0);
12400   ;
12401   return 0;
12402 }
12403 _ACEOF
12404 if ac_fn_c_try_link "$LINENO"; then :
12405   acx_pthread_ok=yes
12406 else
12407   acx_pthread_ok=no
12408 fi
12409 rm -f core conftest.err conftest.$ac_objext \
12410     conftest$ac_exeext conftest.$ac_ext
12411
12412         if test "x$acx_pthread_ok" = xyes; then
12413             # Don't use options that are ignored by the compiler.
12414             # We find them by checking stderror.
12415             cat >conftest.$ac_ext <<_ACEOF
12416 int
12417 main (int argc, char **argv)
12418 {
12419   (void) argc;
12420   (void) argv;
12421   return 0;
12422 }
12423 _ACEOF
12424             rm -f conftest.$ac_objext conftest$ac_exeext
12425             # Check both linking and compiling, because they might tolerate different options.
12426             if test "`(eval $ac_link 2>&1 1>&5)`" = "" && test "`(eval $ac_compile 2>&1 1>&5)`" = ""; then
12427                 # we continue with more flags because Linux needs -lpthread
12428                 # for libpq builds on PostgreSQL.  The test above only
12429                 # tests for building binaries, not shared libraries.
12430                 PTHREAD_LIBS=" $tryPTHREAD_LIBS $PTHREAD_LIBS"
12431                 PTHREAD_CFLAGS="$PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
12432             else   acx_pthread_ok=no
12433             fi
12434         fi
12435
12436         LIBS="$save_LIBS"
12437         CFLAGS="$save_CFLAGS"
12438
12439         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_ok" >&5
12440 $as_echo "$acx_pthread_ok" >&6; }
12441 done
12442 fi
12443
12444 # Various other checks:
12445 if test "x$acx_pthread_ok" = xyes; then
12446         save_LIBS="$LIBS"
12447         LIBS="$PTHREAD_LIBS $LIBS"
12448         save_CFLAGS="$CFLAGS"
12449         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
12450
12451         # Detect AIX lossage: threads are created detached by default
12452         # and the JOINABLE attribute has a nonstandard name (UNDETACHED).
12453         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
12454 $as_echo_n "checking for joinable pthread attribute... " >&6; }
12455         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12456 /* end confdefs.h.  */
12457 #include <pthread.h>
12458 int
12459 main ()
12460 {
12461 int attr=PTHREAD_CREATE_JOINABLE;
12462   ;
12463   return 0;
12464 }
12465 _ACEOF
12466 if ac_fn_c_try_link "$LINENO"; then :
12467   ok=PTHREAD_CREATE_JOINABLE
12468 else
12469   ok=unknown
12470 fi
12471 rm -f core conftest.err conftest.$ac_objext \
12472     conftest$ac_exeext conftest.$ac_ext
12473         if test x"$ok" = xunknown; then
12474                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12475 /* end confdefs.h.  */
12476 #include <pthread.h>
12477 int
12478 main ()
12479 {
12480 int attr=PTHREAD_CREATE_UNDETACHED;
12481   ;
12482   return 0;
12483 }
12484 _ACEOF
12485 if ac_fn_c_try_link "$LINENO"; then :
12486   ok=PTHREAD_CREATE_UNDETACHED
12487 else
12488   ok=unknown
12489 fi
12490 rm -f core conftest.err conftest.$ac_objext \
12491     conftest$ac_exeext conftest.$ac_ext
12492         fi
12493         if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then
12494
12495 $as_echo "#define PTHREAD_CREATE_JOINABLE \$ok" >>confdefs.h
12496
12497         fi
12498         { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ok}" >&5
12499 $as_echo "${ok}" >&6; }
12500         if test x"$ok" = xunknown; then
12501                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: we do not know how to create joinable pthreads" >&5
12502 $as_echo "$as_me: WARNING: we do not know how to create joinable pthreads" >&2;}
12503         fi
12504
12505         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5
12506 $as_echo_n "checking if more special flags are required for pthreads... " >&6; }
12507         flag=no
12508 # We always add these in PostgreSQL
12509 #       case "${host_cpu}-${host_os}" in
12510 #               *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
12511 #               *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
12512 #       esac
12513         { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${flag}" >&5
12514 $as_echo "${flag}" >&6; }
12515         if test "x$flag" != xno; then
12516                 PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
12517         fi
12518
12519         LIBS="$save_LIBS"
12520         CFLAGS="$save_CFLAGS"
12521
12522 # Supporting cc_r would require a special CC in all places that
12523 # use libpq, and that is ugly, so we don't do it.  Users can still
12524 # define their compiler as cc_r to do thread builds of everything.
12525         # More AIX lossage: must compile with cc_r
12526         # Extract the first word of "cc_r", so it can be a program name with args.
12527 set dummy cc_r; ac_word=$2
12528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12529 $as_echo_n "checking for $ac_word... " >&6; }
12530 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
12531   $as_echo_n "(cached) " >&6
12532 else
12533   if test -n "$PTHREAD_CC"; then
12534   ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
12535 else
12536 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12537 for as_dir in $PATH
12538 do
12539   IFS=$as_save_IFS
12540   test -z "$as_dir" && as_dir=.
12541     for ac_exec_ext in '' $ac_executable_extensions; do
12542   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12543     ac_cv_prog_PTHREAD_CC="cc_r"
12544     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12545     break 2
12546   fi
12547 done
12548   done
12549 IFS=$as_save_IFS
12550
12551   test -z "$ac_cv_prog_PTHREAD_CC" && ac_cv_prog_PTHREAD_CC="${CC}"
12552 fi
12553 fi
12554 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
12555 if test -n "$PTHREAD_CC"; then
12556   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
12557 $as_echo "$PTHREAD_CC" >&6; }
12558 else
12559   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12560 $as_echo "no" >&6; }
12561 fi
12562
12563
12564 else
12565         PTHREAD_CC="$CC"
12566 fi
12567
12568
12569
12570
12571
12572 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
12573 if test x"$acx_pthread_ok" = xyes; then
12574
12575 $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
12576
12577         :
12578 else
12579         acx_pthread_ok=no
12580
12581 fi
12582 ac_ext=c
12583 ac_cpp='$CPP $CPPFLAGS'
12584 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12585 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12586 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12587
12588         # set thread flags
12589
12590 # Some platforms use these, so just define them.  They can't hurt if they
12591 # are not supported.  For example, on Solaris -D_POSIX_PTHREAD_SEMANTICS
12592 # enables 5-arg getpwuid_r, among other things.
12593 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
12594
12595
12596 # At this point, we don't want to muck with the compiler name for threading.
12597 # Let's see who fails, perhaps AIX.  2004-04-23
12598 if test "$PTHREAD_CC" != "$CC"; then
12599 as_fn_error $? "
12600 PostgreSQL does not support platforms that require a special compiler
12601 for thread safety;  use --disable-thread-safety to disable thread safety." "$LINENO" 5
12602 fi
12603
12604 # Check for *_r functions
12605 _CFLAGS="$CFLAGS"
12606 _LIBS="$LIBS"
12607 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
12608 LIBS="$LIBS $PTHREAD_LIBS"
12609
12610 if test "$PORTNAME" != "win32"; then
12611 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
12612 if test "x$ac_cv_header_pthread_h" = xyes; then :
12613
12614 else
12615   as_fn_error $? "
12616 pthread.h not found;  use --disable-thread-safety to disable thread safety" "$LINENO" 5
12617 fi
12618
12619
12620 fi
12621
12622 for ac_func in strerror_r getpwuid_r gethostbyname_r
12623 do :
12624   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12625 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12626 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12627   cat >>confdefs.h <<_ACEOF
12628 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12629 _ACEOF
12630
12631 fi
12632 done
12633
12634
12635 # Do test here with the proper thread flags
12636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getpwuid_r takes a fifth argument" >&5
12637 $as_echo_n "checking whether getpwuid_r takes a fifth argument... " >&6; }
12638 if ${pgac_cv_func_getpwuid_r_5arg+:} false; then :
12639   $as_echo_n "(cached) " >&6
12640 else
12641   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12642 /* end confdefs.h.  */
12643 #include <sys/types.h>
12644 #include <pwd.h>
12645 int
12646 main ()
12647 {
12648 uid_t uid;
12649 struct passwd *space;
12650 char *buf;
12651 size_t bufsize;
12652 struct passwd **result;
12653 getpwuid_r(uid, space, buf, bufsize, result);
12654   ;
12655   return 0;
12656 }
12657 _ACEOF
12658 if ac_fn_c_try_compile "$LINENO"; then :
12659   pgac_cv_func_getpwuid_r_5arg=yes
12660 else
12661   pgac_cv_func_getpwuid_r_5arg=no
12662 fi
12663 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12664 fi
12665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_getpwuid_r_5arg" >&5
12666 $as_echo "$pgac_cv_func_getpwuid_r_5arg" >&6; }
12667 if test x"$pgac_cv_func_getpwuid_r_5arg" = xyes ; then
12668
12669 $as_echo "#define GETPWUID_R_5ARG 1" >>confdefs.h
12670
12671 fi
12672
12673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns int" >&5
12674 $as_echo_n "checking whether strerror_r returns int... " >&6; }
12675 if ${pgac_cv_func_strerror_r_int+:} false; then :
12676   $as_echo_n "(cached) " >&6
12677 else
12678   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12679 /* end confdefs.h.  */
12680 #include <string.h>
12681 int
12682 main ()
12683 {
12684 #ifndef _AIX
12685 int strerror_r(int, char *, size_t);
12686 #else
12687 /* Older AIX has 'int' for the third argument so we don't test the args. */
12688 int strerror_r();
12689 #endif
12690   ;
12691   return 0;
12692 }
12693 _ACEOF
12694 if ac_fn_c_try_compile "$LINENO"; then :
12695   pgac_cv_func_strerror_r_int=yes
12696 else
12697   pgac_cv_func_strerror_r_int=no
12698 fi
12699 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12700 fi
12701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_strerror_r_int" >&5
12702 $as_echo "$pgac_cv_func_strerror_r_int" >&6; }
12703 if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
12704
12705 $as_echo "#define STRERROR_R_INT 1" >>confdefs.h
12706
12707 fi
12708
12709
12710 CFLAGS="$_CFLAGS"
12711 LIBS="$_LIBS"
12712
12713 else
12714 # do not use values from template file
12715 PTHREAD_CFLAGS=
12716 PTHREAD_LIBS=
12717 fi
12718
12719
12720
12721
12722
12723 # We can test for libldap_r only after we know PTHREAD_LIBS
12724 if test "$with_ldap" = yes ; then
12725   _LIBS="$LIBS"
12726   if test "$PORTNAME" != "win32"; then
12727     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap" >&5
12728 $as_echo_n "checking for ldap_bind in -lldap... " >&6; }
12729 if ${ac_cv_lib_ldap_ldap_bind+:} false; then :
12730   $as_echo_n "(cached) " >&6
12731 else
12732   ac_check_lib_save_LIBS=$LIBS
12733 LIBS="-lldap $EXTRA_LDAP_LIBS $LIBS"
12734 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12735 /* end confdefs.h.  */
12736
12737 /* Override any GCC internal prototype to avoid an error.
12738    Use char because int might match the return type of a GCC
12739    builtin and then its argument prototype would still apply.  */
12740 #ifdef __cplusplus
12741 extern "C"
12742 #endif
12743 char ldap_bind ();
12744 int
12745 main ()
12746 {
12747 return ldap_bind ();
12748   ;
12749   return 0;
12750 }
12751 _ACEOF
12752 if ac_fn_c_try_link "$LINENO"; then :
12753   ac_cv_lib_ldap_ldap_bind=yes
12754 else
12755   ac_cv_lib_ldap_ldap_bind=no
12756 fi
12757 rm -f core conftest.err conftest.$ac_objext \
12758     conftest$ac_exeext conftest.$ac_ext
12759 LIBS=$ac_check_lib_save_LIBS
12760 fi
12761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_ldap_bind" >&5
12762 $as_echo "$ac_cv_lib_ldap_ldap_bind" >&6; }
12763 if test "x$ac_cv_lib_ldap_ldap_bind" = xyes; then :
12764   cat >>confdefs.h <<_ACEOF
12765 #define HAVE_LIBLDAP 1
12766 _ACEOF
12767
12768   LIBS="-lldap $LIBS"
12769
12770 else
12771   as_fn_error $? "library 'ldap' is required for LDAP" "$LINENO" 5
12772 fi
12773
12774     LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
12775     if test "$enable_thread_safety" = yes; then
12776       # on some platforms ldap_r fails to link without PTHREAD_LIBS
12777       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_simple_bind in -lldap_r" >&5
12778 $as_echo_n "checking for ldap_simple_bind in -lldap_r... " >&6; }
12779 if ${ac_cv_lib_ldap_r_ldap_simple_bind+:} false; then :
12780   $as_echo_n "(cached) " >&6
12781 else
12782   ac_check_lib_save_LIBS=$LIBS
12783 LIBS="-lldap_r $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
12784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12785 /* end confdefs.h.  */
12786
12787 /* Override any GCC internal prototype to avoid an error.
12788    Use char because int might match the return type of a GCC
12789    builtin and then its argument prototype would still apply.  */
12790 #ifdef __cplusplus
12791 extern "C"
12792 #endif
12793 char ldap_simple_bind ();
12794 int
12795 main ()
12796 {
12797 return ldap_simple_bind ();
12798   ;
12799   return 0;
12800 }
12801 _ACEOF
12802 if ac_fn_c_try_link "$LINENO"; then :
12803   ac_cv_lib_ldap_r_ldap_simple_bind=yes
12804 else
12805   ac_cv_lib_ldap_r_ldap_simple_bind=no
12806 fi
12807 rm -f core conftest.err conftest.$ac_objext \
12808     conftest$ac_exeext conftest.$ac_ext
12809 LIBS=$ac_check_lib_save_LIBS
12810 fi
12811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_r_ldap_simple_bind" >&5
12812 $as_echo "$ac_cv_lib_ldap_r_ldap_simple_bind" >&6; }
12813 if test "x$ac_cv_lib_ldap_r_ldap_simple_bind" = xyes; then :
12814   cat >>confdefs.h <<_ACEOF
12815 #define HAVE_LIBLDAP_R 1
12816 _ACEOF
12817
12818   LIBS="-lldap_r $LIBS"
12819
12820 else
12821   as_fn_error $? "library 'ldap_r' is required for LDAP" "$LINENO" 5
12822 fi
12823
12824       LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
12825     else
12826       LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
12827     fi
12828   else
12829     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lwldap32" >&5
12830 $as_echo_n "checking for ldap_bind in -lwldap32... " >&6; }
12831 if ${ac_cv_lib_wldap32_ldap_bind+:} false; then :
12832   $as_echo_n "(cached) " >&6
12833 else
12834   ac_check_lib_save_LIBS=$LIBS
12835 LIBS="-lwldap32  $LIBS"
12836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12837 /* end confdefs.h.  */
12838
12839 /* Override any GCC internal prototype to avoid an error.
12840    Use char because int might match the return type of a GCC
12841    builtin and then its argument prototype would still apply.  */
12842 #ifdef __cplusplus
12843 extern "C"
12844 #endif
12845 char ldap_bind ();
12846 int
12847 main ()
12848 {
12849 return ldap_bind ();
12850   ;
12851   return 0;
12852 }
12853 _ACEOF
12854 if ac_fn_c_try_link "$LINENO"; then :
12855   ac_cv_lib_wldap32_ldap_bind=yes
12856 else
12857   ac_cv_lib_wldap32_ldap_bind=no
12858 fi
12859 rm -f core conftest.err conftest.$ac_objext \
12860     conftest$ac_exeext conftest.$ac_ext
12861 LIBS=$ac_check_lib_save_LIBS
12862 fi
12863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wldap32_ldap_bind" >&5
12864 $as_echo "$ac_cv_lib_wldap32_ldap_bind" >&6; }
12865 if test "x$ac_cv_lib_wldap32_ldap_bind" = xyes; then :
12866   cat >>confdefs.h <<_ACEOF
12867 #define HAVE_LIBWLDAP32 1
12868 _ACEOF
12869
12870   LIBS="-lwldap32 $LIBS"
12871
12872 else
12873   as_fn_error $? "library 'wldap32' is required for LDAP" "$LINENO" 5
12874 fi
12875
12876     LDAP_LIBS_FE="-lwldap32"
12877     LDAP_LIBS_BE="-lwldap32"
12878   fi
12879   LIBS="$_LIBS"
12880 fi
12881
12882
12883
12884
12885 # This test makes sure that run tests work at all.  Sometimes a shared
12886 # library is found by the linker, but the runtime linker can't find it.
12887 # This check should come after all modifications of compiler or linker
12888 # variables, and before any other run tests.
12889 { $as_echo "$as_me:${as_lineno-$LINENO}: checking test program" >&5
12890 $as_echo_n "checking test program... " >&6; }
12891 if test "$cross_compiling" = yes; then :
12892   { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling" >&5
12893 $as_echo "cross-compiling" >&6; }
12894 else
12895   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12896 /* end confdefs.h.  */
12897 int main() { return 0; }
12898 _ACEOF
12899 if ac_fn_c_try_run "$LINENO"; then :
12900   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
12901 $as_echo "ok" >&6; }
12902 else
12903   { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
12904 $as_echo "failed" >&6; }
12905 as_fn_error $? "
12906 Could not execute a simple test program.  This may be a problem
12907 related to locating shared libraries.  Check the file 'config.log'
12908 for the exact reason." "$LINENO" 5
12909 fi
12910 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12911   conftest.$ac_objext conftest.beam conftest.$ac_ext
12912 fi
12913
12914
12915 # --------------------
12916 # Run tests below here
12917 # --------------------
12918
12919 # Force use of our snprintf if system's doesn't do arg control
12920 # See comment above at snprintf test for details.
12921 if test "$enable_nls" = yes -a "$pgac_need_repl_snprintf" = no; then
12922   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf supports argument control" >&5
12923 $as_echo_n "checking whether snprintf supports argument control... " >&6; }
12924 if ${pgac_cv_snprintf_arg_control+:} false; then :
12925   $as_echo_n "(cached) " >&6
12926 else
12927   if test "$cross_compiling" = yes; then :
12928   pgac_cv_snprintf_arg_control=cross
12929 else
12930   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12931 /* end confdefs.h.  */
12932 #include <stdio.h>
12933 #include <string.h>
12934
12935 int main()
12936 {
12937   char buf[100];
12938
12939   /* can it swap arguments? */
12940   snprintf(buf, 100, "%2\$d %1\$d", 3, 4);
12941   if (strcmp(buf, "4 3") != 0)
12942     return 1;
12943   return 0;
12944 }
12945 _ACEOF
12946 if ac_fn_c_try_run "$LINENO"; then :
12947   pgac_cv_snprintf_arg_control=yes
12948 else
12949   pgac_cv_snprintf_arg_control=no
12950 fi
12951 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12952   conftest.$ac_objext conftest.beam conftest.$ac_ext
12953 fi
12954
12955
12956 fi
12957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_arg_control" >&5
12958 $as_echo "$pgac_cv_snprintf_arg_control" >&6; }
12959
12960   if test $pgac_cv_snprintf_arg_control != yes ; then
12961     pgac_need_repl_snprintf=yes
12962   fi
12963 fi
12964
12965
12966
12967
12968 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long int is 64 bits" >&5
12969 $as_echo_n "checking whether long int is 64 bits... " >&6; }
12970 if ${pgac_cv_type_long_int_64+:} false; then :
12971   $as_echo_n "(cached) " >&6
12972 else
12973   if test "$cross_compiling" = yes; then :
12974   # If cross-compiling, check the size reported by the compiler and
12975 # trust that the arithmetic works.
12976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12977 /* end confdefs.h.  */
12978
12979 int
12980 main ()
12981 {
12982 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
12983 test_array [0] = 0;
12984 return test_array [0];
12985
12986   ;
12987   return 0;
12988 }
12989 _ACEOF
12990 if ac_fn_c_try_compile "$LINENO"; then :
12991   pgac_cv_type_long_int_64=yes
12992 else
12993   pgac_cv_type_long_int_64=no
12994 fi
12995 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12996 else
12997   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12998 /* end confdefs.h.  */
12999 typedef long int ac_int64;
13000
13001 /*
13002  * These are globals to discourage the compiler from folding all the
13003  * arithmetic tests down to compile-time constants.
13004  */
13005 ac_int64 a = 20000001;
13006 ac_int64 b = 40000005;
13007
13008 int does_int64_work()
13009 {
13010   ac_int64 c,d;
13011
13012   if (sizeof(ac_int64) != 8)
13013     return 0;                   /* definitely not the right size */
13014
13015   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
13016   c = a * b;
13017   d = (c + b) / b;
13018   if (d != a+1)
13019     return 0;
13020   return 1;
13021 }
13022 main() {
13023   exit(! does_int64_work());
13024 }
13025 _ACEOF
13026 if ac_fn_c_try_run "$LINENO"; then :
13027   pgac_cv_type_long_int_64=yes
13028 else
13029   pgac_cv_type_long_int_64=no
13030 fi
13031 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13032   conftest.$ac_objext conftest.beam conftest.$ac_ext
13033 fi
13034
13035 fi
13036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_int_64" >&5
13037 $as_echo "$pgac_cv_type_long_int_64" >&6; }
13038
13039 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
13040 if test x"$pgac_cv_type_long_int_64" = xyes ; then
13041
13042 $as_echo "#define HAVE_LONG_INT_64 1" >>confdefs.h
13043
13044 fi
13045
13046
13047 if test x"$HAVE_LONG_INT_64" = x"yes" ; then
13048   pg_int64_type="long int"
13049 else
13050   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long long int is 64 bits" >&5
13051 $as_echo_n "checking whether long long int is 64 bits... " >&6; }
13052 if ${pgac_cv_type_long_long_int_64+:} false; then :
13053   $as_echo_n "(cached) " >&6
13054 else
13055   if test "$cross_compiling" = yes; then :
13056   # If cross-compiling, check the size reported by the compiler and
13057 # trust that the arithmetic works.
13058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13059 /* end confdefs.h.  */
13060
13061 int
13062 main ()
13063 {
13064 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
13065 test_array [0] = 0;
13066 return test_array [0];
13067
13068   ;
13069   return 0;
13070 }
13071 _ACEOF
13072 if ac_fn_c_try_compile "$LINENO"; then :
13073   pgac_cv_type_long_long_int_64=yes
13074 else
13075   pgac_cv_type_long_long_int_64=no
13076 fi
13077 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13078 else
13079   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13080 /* end confdefs.h.  */
13081 typedef long long int ac_int64;
13082
13083 /*
13084  * These are globals to discourage the compiler from folding all the
13085  * arithmetic tests down to compile-time constants.
13086  */
13087 ac_int64 a = 20000001;
13088 ac_int64 b = 40000005;
13089
13090 int does_int64_work()
13091 {
13092   ac_int64 c,d;
13093
13094   if (sizeof(ac_int64) != 8)
13095     return 0;                   /* definitely not the right size */
13096
13097   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
13098   c = a * b;
13099   d = (c + b) / b;
13100   if (d != a+1)
13101     return 0;
13102   return 1;
13103 }
13104 main() {
13105   exit(! does_int64_work());
13106 }
13107 _ACEOF
13108 if ac_fn_c_try_run "$LINENO"; then :
13109   pgac_cv_type_long_long_int_64=yes
13110 else
13111   pgac_cv_type_long_long_int_64=no
13112 fi
13113 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13114   conftest.$ac_objext conftest.beam conftest.$ac_ext
13115 fi
13116
13117 fi
13118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_long_int_64" >&5
13119 $as_echo "$pgac_cv_type_long_long_int_64" >&6; }
13120
13121 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
13122 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
13123
13124 $as_echo "#define HAVE_LONG_LONG_INT_64 1" >>confdefs.h
13125
13126 fi
13127
13128   if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
13129     pg_int64_type="long long int"
13130   else
13131     as_fn_error $? "Cannot find a working 64-bit integer type." "$LINENO" 5
13132   fi
13133 fi
13134
13135
13136 cat >>confdefs.h <<_ACEOF
13137 #define PG_INT64_TYPE $pg_int64_type
13138 _ACEOF
13139
13140
13141
13142 if test x"$HAVE_LONG_LONG_INT_64" = xyes ; then
13143   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13144 /* end confdefs.h.  */
13145
13146 #define INT64CONST(x)  x##LL
13147 long long int foo = INT64CONST(0x1234567890123456);
13148
13149 int
13150 main ()
13151 {
13152
13153   ;
13154   return 0;
13155 }
13156 _ACEOF
13157 if ac_fn_c_try_compile "$LINENO"; then :
13158
13159 $as_echo "#define HAVE_LL_CONSTANTS 1" >>confdefs.h
13160
13161 fi
13162 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13163 fi
13164
13165
13166 # If we found "long int" is 64 bits, assume snprintf handles it.  If
13167 # we found we need to use "long long int", better check.  We cope with
13168 # snprintfs that use %lld, %qd, or %I64d as the format.  If none of these
13169 # work, fall back to our own snprintf emulation (which we know uses %lld).
13170
13171 if test "$HAVE_LONG_LONG_INT_64" = yes ; then
13172   if test $pgac_need_repl_snprintf = no; then
13173     { $as_echo "$as_me:${as_lineno-$LINENO}: checking snprintf format for long long int" >&5
13174 $as_echo_n "checking snprintf format for long long int... " >&6; }
13175 if ${pgac_cv_snprintf_long_long_int_format+:} false; then :
13176   $as_echo_n "(cached) " >&6
13177 else
13178   for pgac_format in '%lld' '%qd' '%I64d'; do
13179 if test "$cross_compiling" = yes; then :
13180   pgac_cv_snprintf_long_long_int_format=cross; break
13181 else
13182   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13183 /* end confdefs.h.  */
13184 #include <stdio.h>
13185 typedef long long int ac_int64;
13186 #define INT64_FORMAT "$pgac_format"
13187
13188 ac_int64 a = 20000001;
13189 ac_int64 b = 40000005;
13190
13191 int does_int64_snprintf_work()
13192 {
13193   ac_int64 c;
13194   char buf[100];
13195
13196   if (sizeof(ac_int64) != 8)
13197     return 0;                   /* doesn't look like the right size */
13198
13199   c = a * b;
13200   snprintf(buf, 100, INT64_FORMAT, c);
13201   if (strcmp(buf, "800000140000005") != 0)
13202     return 0;                   /* either multiply or snprintf is busted */
13203   return 1;
13204 }
13205 main() {
13206   exit(! does_int64_snprintf_work());
13207 }
13208 _ACEOF
13209 if ac_fn_c_try_run "$LINENO"; then :
13210   pgac_cv_snprintf_long_long_int_format=$pgac_format; break
13211 fi
13212 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13213   conftest.$ac_objext conftest.beam conftest.$ac_ext
13214 fi
13215
13216 done
13217 fi
13218
13219 LONG_LONG_INT_FORMAT=''
13220
13221 case $pgac_cv_snprintf_long_long_int_format in
13222   cross) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot test (not on host machine)" >&5
13223 $as_echo "cannot test (not on host machine)" >&6; };;
13224   ?*)    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_long_long_int_format" >&5
13225 $as_echo "$pgac_cv_snprintf_long_long_int_format" >&6; }
13226          LONG_LONG_INT_FORMAT=$pgac_cv_snprintf_long_long_int_format;;
13227   *)     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13228 $as_echo "none" >&6; };;
13229 esac
13230     if test "$LONG_LONG_INT_FORMAT" = ""; then
13231       # Force usage of our own snprintf, since system snprintf is broken
13232       pgac_need_repl_snprintf=yes
13233       LONG_LONG_INT_FORMAT='%lld'
13234     fi
13235   else
13236     # Here if we previously decided we needed to use our own snprintf
13237     LONG_LONG_INT_FORMAT='%lld'
13238   fi
13239   LONG_LONG_UINT_FORMAT=`echo "$LONG_LONG_INT_FORMAT" | sed 's/d$/u/'`
13240   INT64_FORMAT="\"$LONG_LONG_INT_FORMAT\""
13241   UINT64_FORMAT="\"$LONG_LONG_UINT_FORMAT\""
13242 else
13243   # Here if we are not using 'long long int' at all
13244   INT64_FORMAT='"%ld"'
13245   UINT64_FORMAT='"%lu"'
13246 fi
13247
13248
13249 cat >>confdefs.h <<_ACEOF
13250 #define INT64_FORMAT $INT64_FORMAT
13251 _ACEOF
13252
13253
13254
13255 cat >>confdefs.h <<_ACEOF
13256 #define UINT64_FORMAT $UINT64_FORMAT
13257 _ACEOF
13258
13259
13260 # Also force use of our snprintf if the system's doesn't support the %z flag.
13261 if test "$pgac_need_repl_snprintf" = no; then
13262   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf supports the %z modifier" >&5
13263 $as_echo_n "checking whether snprintf supports the %z modifier... " >&6; }
13264 if ${pgac_cv_snprintf_size_t_support+:} false; then :
13265   $as_echo_n "(cached) " >&6
13266 else
13267   if test "$cross_compiling" = yes; then :
13268   pgac_cv_snprintf_size_t_support=cross
13269 else
13270   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13271 /* end confdefs.h.  */
13272 #include <stdio.h>
13273 #include <string.h>
13274
13275 int main()
13276 {
13277   char bufz[100];
13278   char buf64[100];
13279
13280   /*
13281    * Print the largest unsigned number fitting in a size_t using both %zu
13282    * and the previously-determined format for 64-bit integers.  Note that
13283    * we don't run this code unless we know snprintf handles 64-bit ints.
13284    */
13285   bufz[0] = '\0';  /* in case snprintf fails to emit anything */
13286   snprintf(bufz, sizeof(bufz), "%zu", ~((size_t) 0));
13287   snprintf(buf64, sizeof(buf64), UINT64_FORMAT, (PG_INT64_TYPE) ~((size_t) 0));
13288   if (strcmp(bufz, buf64) != 0)
13289     return 1;
13290   return 0;
13291 }
13292 _ACEOF
13293 if ac_fn_c_try_run "$LINENO"; then :
13294   pgac_cv_snprintf_size_t_support=yes
13295 else
13296   pgac_cv_snprintf_size_t_support=no
13297 fi
13298 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13299   conftest.$ac_objext conftest.beam conftest.$ac_ext
13300 fi
13301
13302
13303 fi
13304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_size_t_support" >&5
13305 $as_echo "$pgac_cv_snprintf_size_t_support" >&6; }
13306
13307   if test "$pgac_cv_snprintf_size_t_support" != yes; then
13308     pgac_need_repl_snprintf=yes
13309   fi
13310 fi
13311
13312 # Now we have checked all the reasons to replace snprintf
13313 if test $pgac_need_repl_snprintf = yes; then
13314
13315 $as_echo "#define USE_REPL_SNPRINTF 1" >>confdefs.h
13316
13317   case " $LIBOBJS " in
13318   *" snprintf.$ac_objext "* ) ;;
13319   *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
13320  ;;
13321 esac
13322
13323 fi
13324
13325 # Check size of void *, size_t (enables tweaks for > 32bit address space)
13326 # The cast to long int works around a bug in the HP C Compiler
13327 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13328 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13329 # This bug is HP SR number 8606223364.
13330 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
13331 $as_echo_n "checking size of void *... " >&6; }
13332 if ${ac_cv_sizeof_void_p+:} false; then :
13333   $as_echo_n "(cached) " >&6
13334 else
13335   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p"        "$ac_includes_default"; then :
13336
13337 else
13338   if test "$ac_cv_type_void_p" = yes; then
13339      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13340 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13341 as_fn_error 77 "cannot compute sizeof (void *)
13342 See \`config.log' for more details" "$LINENO" 5; }
13343    else
13344      ac_cv_sizeof_void_p=0
13345    fi
13346 fi
13347
13348 fi
13349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
13350 $as_echo "$ac_cv_sizeof_void_p" >&6; }
13351
13352
13353
13354 cat >>confdefs.h <<_ACEOF
13355 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
13356 _ACEOF
13357
13358
13359 # The cast to long int works around a bug in the HP C Compiler
13360 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13361 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13362 # This bug is HP SR number 8606223364.
13363 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
13364 $as_echo_n "checking size of size_t... " >&6; }
13365 if ${ac_cv_sizeof_size_t+:} false; then :
13366   $as_echo_n "(cached) " >&6
13367 else
13368   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t"        "$ac_includes_default"; then :
13369
13370 else
13371   if test "$ac_cv_type_size_t" = yes; then
13372      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13373 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13374 as_fn_error 77 "cannot compute sizeof (size_t)
13375 See \`config.log' for more details" "$LINENO" 5; }
13376    else
13377      ac_cv_sizeof_size_t=0
13378    fi
13379 fi
13380
13381 fi
13382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
13383 $as_echo "$ac_cv_sizeof_size_t" >&6; }
13384
13385
13386
13387 cat >>confdefs.h <<_ACEOF
13388 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
13389 _ACEOF
13390
13391
13392 # The cast to long int works around a bug in the HP C Compiler
13393 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13394 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13395 # This bug is HP SR number 8606223364.
13396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
13397 $as_echo_n "checking size of long... " >&6; }
13398 if ${ac_cv_sizeof_long+:} false; then :
13399   $as_echo_n "(cached) " >&6
13400 else
13401   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
13402
13403 else
13404   if test "$ac_cv_type_long" = yes; then
13405      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13406 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13407 as_fn_error 77 "cannot compute sizeof (long)
13408 See \`config.log' for more details" "$LINENO" 5; }
13409    else
13410      ac_cv_sizeof_long=0
13411    fi
13412 fi
13413
13414 fi
13415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
13416 $as_echo "$ac_cv_sizeof_long" >&6; }
13417
13418
13419
13420 cat >>confdefs.h <<_ACEOF
13421 #define SIZEOF_LONG $ac_cv_sizeof_long
13422 _ACEOF
13423
13424
13425
13426 # Decide whether float4 is passed by value: user-selectable, enabled by default
13427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float4 passed by value" >&5
13428 $as_echo_n "checking whether to build with float4 passed by value... " >&6; }
13429
13430
13431 # Check whether --enable-float4-byval was given.
13432 if test "${enable_float4_byval+set}" = set; then :
13433   enableval=$enable_float4_byval;
13434   case $enableval in
13435     yes)
13436
13437 $as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
13438
13439                float4passbyval=true
13440       ;;
13441     no)
13442       float4passbyval=false
13443       ;;
13444     *)
13445       as_fn_error $? "no argument expected for --enable-float4-byval option" "$LINENO" 5
13446       ;;
13447   esac
13448
13449 else
13450   enable_float4_byval=yes
13451
13452 $as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
13453
13454                float4passbyval=true
13455 fi
13456
13457
13458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float4_byval" >&5
13459 $as_echo "$enable_float4_byval" >&6; }
13460
13461 cat >>confdefs.h <<_ACEOF
13462 #define FLOAT4PASSBYVAL $float4passbyval
13463 _ACEOF
13464
13465
13466 # Decide whether float8 is passed by value.
13467 # Note: this setting also controls int8 and related types such as timestamp.
13468 # If sizeof(Datum) >= 8, this is user-selectable, enabled by default.
13469 # If not, trying to select it is an error.
13470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float8 passed by value" >&5
13471 $as_echo_n "checking whether to build with float8 passed by value... " >&6; }
13472 if test $ac_cv_sizeof_void_p -ge 8 ; then
13473
13474
13475 # Check whether --enable-float8-byval was given.
13476 if test "${enable_float8_byval+set}" = set; then :
13477   enableval=$enable_float8_byval;
13478   case $enableval in
13479     yes)
13480       :
13481       ;;
13482     no)
13483       :
13484       ;;
13485     *)
13486       as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
13487       ;;
13488   esac
13489
13490 else
13491   enable_float8_byval=yes
13492
13493 fi
13494
13495
13496 else
13497
13498
13499 # Check whether --enable-float8-byval was given.
13500 if test "${enable_float8_byval+set}" = set; then :
13501   enableval=$enable_float8_byval;
13502   case $enableval in
13503     yes)
13504       :
13505       ;;
13506     no)
13507       :
13508       ;;
13509     *)
13510       as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
13511       ;;
13512   esac
13513
13514 else
13515   enable_float8_byval=no
13516
13517 fi
13518
13519
13520   if test "$enable_float8_byval" = yes ; then
13521     as_fn_error $? "--enable-float8-byval is not supported on 32-bit platforms." "$LINENO" 5
13522   fi
13523 fi
13524 if test "$enable_float8_byval" = yes ; then
13525
13526 $as_echo "#define USE_FLOAT8_BYVAL 1" >>confdefs.h
13527
13528   float8passbyval=true
13529 else
13530   float8passbyval=false
13531 fi
13532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float8_byval" >&5
13533 $as_echo "$enable_float8_byval" >&6; }
13534
13535 cat >>confdefs.h <<_ACEOF
13536 #define FLOAT8PASSBYVAL $float8passbyval
13537 _ACEOF
13538
13539
13540 # Determine memory alignment requirements for the basic C data types.
13541
13542 # The cast to long int works around a bug in the HP C Compiler,
13543 # see AC_CHECK_SIZEOF for more information.
13544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of short" >&5
13545 $as_echo_n "checking alignment of short... " >&6; }
13546 if ${ac_cv_alignof_short+:} false; then :
13547   $as_echo_n "(cached) " >&6
13548 else
13549   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_short"        "$ac_includes_default
13550 #ifndef offsetof
13551 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
13552 #endif
13553 typedef struct { char x; short y; } ac__type_alignof_;"; then :
13554
13555 else
13556   if test "$ac_cv_type_short" = yes; then
13557      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13558 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13559 as_fn_error 77 "cannot compute alignment of short
13560 See \`config.log' for more details" "$LINENO" 5; }
13561    else
13562      ac_cv_alignof_short=0
13563    fi
13564 fi
13565
13566 fi
13567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_short" >&5
13568 $as_echo "$ac_cv_alignof_short" >&6; }
13569
13570
13571
13572 cat >>confdefs.h <<_ACEOF
13573 #define ALIGNOF_SHORT $ac_cv_alignof_short
13574 _ACEOF
13575
13576
13577 # The cast to long int works around a bug in the HP C Compiler,
13578 # see AC_CHECK_SIZEOF for more information.
13579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of int" >&5
13580 $as_echo_n "checking alignment of int... " >&6; }
13581 if ${ac_cv_alignof_int+:} false; then :
13582   $as_echo_n "(cached) " >&6
13583 else
13584   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_int"        "$ac_includes_default
13585 #ifndef offsetof
13586 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
13587 #endif
13588 typedef struct { char x; int y; } ac__type_alignof_;"; then :
13589
13590 else
13591   if test "$ac_cv_type_int" = yes; then
13592      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13593 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13594 as_fn_error 77 "cannot compute alignment of int
13595 See \`config.log' for more details" "$LINENO" 5; }
13596    else
13597      ac_cv_alignof_int=0
13598    fi
13599 fi
13600
13601 fi
13602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_int" >&5
13603 $as_echo "$ac_cv_alignof_int" >&6; }
13604
13605
13606
13607 cat >>confdefs.h <<_ACEOF
13608 #define ALIGNOF_INT $ac_cv_alignof_int
13609 _ACEOF
13610
13611
13612 # The cast to long int works around a bug in the HP C Compiler,
13613 # see AC_CHECK_SIZEOF for more information.
13614 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long" >&5
13615 $as_echo_n "checking alignment of long... " >&6; }
13616 if ${ac_cv_alignof_long+:} false; then :
13617   $as_echo_n "(cached) " >&6
13618 else
13619   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long"        "$ac_includes_default
13620 #ifndef offsetof
13621 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
13622 #endif
13623 typedef struct { char x; long y; } ac__type_alignof_;"; then :
13624
13625 else
13626   if test "$ac_cv_type_long" = yes; then
13627      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13628 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13629 as_fn_error 77 "cannot compute alignment of long
13630 See \`config.log' for more details" "$LINENO" 5; }
13631    else
13632      ac_cv_alignof_long=0
13633    fi
13634 fi
13635
13636 fi
13637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long" >&5
13638 $as_echo "$ac_cv_alignof_long" >&6; }
13639
13640
13641
13642 cat >>confdefs.h <<_ACEOF
13643 #define ALIGNOF_LONG $ac_cv_alignof_long
13644 _ACEOF
13645
13646
13647 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
13648   # The cast to long int works around a bug in the HP C Compiler,
13649 # see AC_CHECK_SIZEOF for more information.
13650 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long long int" >&5
13651 $as_echo_n "checking alignment of long long int... " >&6; }
13652 if ${ac_cv_alignof_long_long_int+:} false; then :
13653   $as_echo_n "(cached) " >&6
13654 else
13655   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long_long_int"        "$ac_includes_default
13656 #ifndef offsetof
13657 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
13658 #endif
13659 typedef struct { char x; long long int y; } ac__type_alignof_;"; then :
13660
13661 else
13662   if test "$ac_cv_type_long_long_int" = yes; then
13663      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13664 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13665 as_fn_error 77 "cannot compute alignment of long long int
13666 See \`config.log' for more details" "$LINENO" 5; }
13667    else
13668      ac_cv_alignof_long_long_int=0
13669    fi
13670 fi
13671
13672 fi
13673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long_long_int" >&5
13674 $as_echo "$ac_cv_alignof_long_long_int" >&6; }
13675
13676
13677
13678 cat >>confdefs.h <<_ACEOF
13679 #define ALIGNOF_LONG_LONG_INT $ac_cv_alignof_long_long_int
13680 _ACEOF
13681
13682
13683 fi
13684 # The cast to long int works around a bug in the HP C Compiler,
13685 # see AC_CHECK_SIZEOF for more information.
13686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of double" >&5
13687 $as_echo_n "checking alignment of double... " >&6; }
13688 if ${ac_cv_alignof_double+:} false; then :
13689   $as_echo_n "(cached) " >&6
13690 else
13691   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_double"        "$ac_includes_default
13692 #ifndef offsetof
13693 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
13694 #endif
13695 typedef struct { char x; double y; } ac__type_alignof_;"; then :
13696
13697 else
13698   if test "$ac_cv_type_double" = yes; then
13699      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13700 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13701 as_fn_error 77 "cannot compute alignment of double
13702 See \`config.log' for more details" "$LINENO" 5; }
13703    else
13704      ac_cv_alignof_double=0
13705    fi
13706 fi
13707
13708 fi
13709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_double" >&5
13710 $as_echo "$ac_cv_alignof_double" >&6; }
13711
13712
13713
13714 cat >>confdefs.h <<_ACEOF
13715 #define ALIGNOF_DOUBLE $ac_cv_alignof_double
13716 _ACEOF
13717
13718
13719
13720 # Compute maximum alignment of any basic type.
13721 # We assume long's alignment is at least as strong as char, short, or int;
13722 # but we must check long long (if it exists) and double.
13723
13724 MAX_ALIGNOF=$ac_cv_alignof_long
13725 if test $MAX_ALIGNOF -lt $ac_cv_alignof_double ; then
13726   MAX_ALIGNOF=$ac_cv_alignof_double
13727 fi
13728 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $ac_cv_alignof_long_long_int ; then
13729   MAX_ALIGNOF="$ac_cv_alignof_long_long_int"
13730 fi
13731
13732 cat >>confdefs.h <<_ACEOF
13733 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
13734 _ACEOF
13735
13736
13737
13738 # Some platforms predefine the types int8, int16, etc.  Only check
13739 # a (hopefully) representative subset.
13740 ac_fn_c_check_type "$LINENO" "int8" "ac_cv_type_int8" "#include <stdio.h>
13741 "
13742 if test "x$ac_cv_type_int8" = xyes; then :
13743
13744 cat >>confdefs.h <<_ACEOF
13745 #define HAVE_INT8 1
13746 _ACEOF
13747
13748
13749 fi
13750 ac_fn_c_check_type "$LINENO" "uint8" "ac_cv_type_uint8" "#include <stdio.h>
13751 "
13752 if test "x$ac_cv_type_uint8" = xyes; then :
13753
13754 cat >>confdefs.h <<_ACEOF
13755 #define HAVE_UINT8 1
13756 _ACEOF
13757
13758
13759 fi
13760 ac_fn_c_check_type "$LINENO" "int64" "ac_cv_type_int64" "#include <stdio.h>
13761 "
13762 if test "x$ac_cv_type_int64" = xyes; then :
13763
13764 cat >>confdefs.h <<_ACEOF
13765 #define HAVE_INT64 1
13766 _ACEOF
13767
13768
13769 fi
13770 ac_fn_c_check_type "$LINENO" "uint64" "ac_cv_type_uint64" "#include <stdio.h>
13771 "
13772 if test "x$ac_cv_type_uint64" = xyes; then :
13773
13774 cat >>confdefs.h <<_ACEOF
13775 #define HAVE_UINT64 1
13776 _ACEOF
13777
13778
13779 fi
13780
13781
13782 # We also check for sig_atomic_t, which *should* be defined per ANSI
13783 # C, but is missing on some old platforms.
13784 ac_fn_c_check_type "$LINENO" "sig_atomic_t" "ac_cv_type_sig_atomic_t" "#include <signal.h>
13785 "
13786 if test "x$ac_cv_type_sig_atomic_t" = xyes; then :
13787
13788 cat >>confdefs.h <<_ACEOF
13789 #define HAVE_SIG_ATOMIC_T 1
13790 _ACEOF
13791
13792
13793 fi
13794
13795
13796
13797 if test "$PORTNAME" != "win32"
13798 then
13799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for POSIX signal interface" >&5
13800 $as_echo_n "checking for POSIX signal interface... " >&6; }
13801 if ${pgac_cv_func_posix_signals+:} false; then :
13802   $as_echo_n "(cached) " >&6
13803 else
13804   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13805 /* end confdefs.h.  */
13806 #include <signal.h>
13807
13808 int
13809 main ()
13810 {
13811 struct sigaction act, oact;
13812 sigemptyset(&act.sa_mask);
13813 act.sa_flags = SA_RESTART;
13814 sigaction(0, &act, &oact);
13815   ;
13816   return 0;
13817 }
13818 _ACEOF
13819 if ac_fn_c_try_link "$LINENO"; then :
13820   pgac_cv_func_posix_signals=yes
13821 else
13822   pgac_cv_func_posix_signals=no
13823 fi
13824 rm -f core conftest.err conftest.$ac_objext \
13825     conftest$ac_exeext conftest.$ac_ext
13826 fi
13827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_posix_signals" >&5
13828 $as_echo "$pgac_cv_func_posix_signals" >&6; }
13829 if test x"$pgac_cv_func_posix_signals" = xyes ; then
13830
13831 $as_echo "#define HAVE_POSIX_SIGNALS 1" >>confdefs.h
13832
13833 fi
13834 HAVE_POSIX_SIGNALS=$pgac_cv_func_posix_signals
13835
13836 if test "$pgac_cv_func_posix_signals" != yes -a "$enable_thread_safety" = yes; then
13837   as_fn_error $? "
13838 Thread-safety requires POSIX signals, which are not supported by this
13839 operating system;  use --disable-thread-safety to disable thread safety." "$LINENO" 5
13840 fi
13841 fi
13842
13843
13844 # Select semaphore implementation type.
13845 if test "$PORTNAME" != "win32"; then
13846   if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
13847
13848 $as_echo "#define USE_NAMED_POSIX_SEMAPHORES 1" >>confdefs.h
13849
13850     SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
13851   else
13852     if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
13853
13854 $as_echo "#define USE_UNNAMED_POSIX_SEMAPHORES 1" >>confdefs.h
13855
13856       SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
13857     else
13858
13859 $as_echo "#define USE_SYSV_SEMAPHORES 1" >>confdefs.h
13860
13861       SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
13862     fi
13863   fi
13864 else
13865
13866 $as_echo "#define USE_WIN32_SEMAPHORES 1" >>confdefs.h
13867
13868   SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
13869 fi
13870
13871
13872 # Select shared-memory implementation type.
13873 if test "$PORTNAME" != "win32"; then
13874
13875 $as_echo "#define USE_SYSV_SHARED_MEMORY 1" >>confdefs.h
13876
13877   SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
13878 else
13879
13880 $as_echo "#define USE_WIN32_SHARED_MEMORY 1" >>confdefs.h
13881
13882   SHMEM_IMPLEMENTATION="src/backend/port/win32_shmem.c"
13883 fi
13884
13885 # Select latch implementation type.
13886 if test "$PORTNAME" != "win32"; then
13887   LATCH_IMPLEMENTATION="src/backend/port/unix_latch.c"
13888 else
13889   LATCH_IMPLEMENTATION="src/backend/port/win32_latch.c"
13890 fi
13891
13892 # If not set in template file, set bytes to use libc memset()
13893 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
13894   MEMSET_LOOP_LIMIT=1024
13895 fi
13896
13897 cat >>confdefs.h <<_ACEOF
13898 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
13899 _ACEOF
13900
13901
13902
13903 if test "$enable_nls" = yes ; then
13904
13905   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bind_textdomain_codeset" >&5
13906 $as_echo_n "checking for library containing bind_textdomain_codeset... " >&6; }
13907 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
13908   $as_echo_n "(cached) " >&6
13909 else
13910   ac_func_search_save_LIBS=$LIBS
13911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13912 /* end confdefs.h.  */
13913
13914 /* Override any GCC internal prototype to avoid an error.
13915    Use char because int might match the return type of a GCC
13916    builtin and then its argument prototype would still apply.  */
13917 #ifdef __cplusplus
13918 extern "C"
13919 #endif
13920 char bind_textdomain_codeset ();
13921 int
13922 main ()
13923 {
13924 return bind_textdomain_codeset ();
13925   ;
13926   return 0;
13927 }
13928 _ACEOF
13929 for ac_lib in '' intl; do
13930   if test -z "$ac_lib"; then
13931     ac_res="none required"
13932   else
13933     ac_res=-l$ac_lib
13934     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
13935   fi
13936   if ac_fn_c_try_link "$LINENO"; then :
13937   ac_cv_search_bind_textdomain_codeset=$ac_res
13938 fi
13939 rm -f core conftest.err conftest.$ac_objext \
13940     conftest$ac_exeext
13941   if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
13942   break
13943 fi
13944 done
13945 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
13946
13947 else
13948   ac_cv_search_bind_textdomain_codeset=no
13949 fi
13950 rm conftest.$ac_ext
13951 LIBS=$ac_func_search_save_LIBS
13952 fi
13953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bind_textdomain_codeset" >&5
13954 $as_echo "$ac_cv_search_bind_textdomain_codeset" >&6; }
13955 ac_res=$ac_cv_search_bind_textdomain_codeset
13956 if test "$ac_res" != no; then :
13957   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13958
13959 else
13960   as_fn_error $? "a gettext implementation is required for NLS" "$LINENO" 5
13961 fi
13962
13963   ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
13964 if test "x$ac_cv_header_libintl_h" = xyes; then :
13965
13966 else
13967   as_fn_error $? "header file <libintl.h> is required for NLS" "$LINENO" 5
13968 fi
13969
13970
13971   for ac_prog in msgfmt
13972 do
13973   # Extract the first word of "$ac_prog", so it can be a program name with args.
13974 set dummy $ac_prog; ac_word=$2
13975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13976 $as_echo_n "checking for $ac_word... " >&6; }
13977 if ${ac_cv_prog_MSGFMT+:} false; then :
13978   $as_echo_n "(cached) " >&6
13979 else
13980   if test -n "$MSGFMT"; then
13981   ac_cv_prog_MSGFMT="$MSGFMT" # Let the user override the test.
13982 else
13983 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13984 for as_dir in $PATH
13985 do
13986   IFS=$as_save_IFS
13987   test -z "$as_dir" && as_dir=.
13988     for ac_exec_ext in '' $ac_executable_extensions; do
13989   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13990     ac_cv_prog_MSGFMT="$ac_prog"
13991     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13992     break 2
13993   fi
13994 done
13995   done
13996 IFS=$as_save_IFS
13997
13998 fi
13999 fi
14000 MSGFMT=$ac_cv_prog_MSGFMT
14001 if test -n "$MSGFMT"; then
14002   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
14003 $as_echo "$MSGFMT" >&6; }
14004 else
14005   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14006 $as_echo "no" >&6; }
14007 fi
14008
14009
14010   test -n "$MSGFMT" && break
14011 done
14012
14013   if test -z "$MSGFMT"; then
14014     as_fn_error $? "msgfmt is required for NLS" "$LINENO" 5
14015   fi
14016   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msgfmt flags" >&5
14017 $as_echo_n "checking for msgfmt flags... " >&6; }
14018 if ${pgac_cv_msgfmt_flags+:} false; then :
14019   $as_echo_n "(cached) " >&6
14020 else
14021   if test x"$MSGFMT" != x"" && "$MSGFMT" --version 2>&1 | grep "GNU" >/dev/null; then
14022     pgac_cv_msgfmt_flags=-c
14023 fi
14024 fi
14025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_msgfmt_flags" >&5
14026 $as_echo "$pgac_cv_msgfmt_flags" >&6; }
14027   MSGFMT_FLAGS=$pgac_cv_msgfmt_flags
14028
14029   for ac_prog in msgmerge
14030 do
14031   # Extract the first word of "$ac_prog", so it can be a program name with args.
14032 set dummy $ac_prog; ac_word=$2
14033 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14034 $as_echo_n "checking for $ac_word... " >&6; }
14035 if ${ac_cv_prog_MSGMERGE+:} false; then :
14036   $as_echo_n "(cached) " >&6
14037 else
14038   if test -n "$MSGMERGE"; then
14039   ac_cv_prog_MSGMERGE="$MSGMERGE" # Let the user override the test.
14040 else
14041 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14042 for as_dir in $PATH
14043 do
14044   IFS=$as_save_IFS
14045   test -z "$as_dir" && as_dir=.
14046     for ac_exec_ext in '' $ac_executable_extensions; do
14047   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14048     ac_cv_prog_MSGMERGE="$ac_prog"
14049     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14050     break 2
14051   fi
14052 done
14053   done
14054 IFS=$as_save_IFS
14055
14056 fi
14057 fi
14058 MSGMERGE=$ac_cv_prog_MSGMERGE
14059 if test -n "$MSGMERGE"; then
14060   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
14061 $as_echo "$MSGMERGE" >&6; }
14062 else
14063   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14064 $as_echo "no" >&6; }
14065 fi
14066
14067
14068   test -n "$MSGMERGE" && break
14069 done
14070
14071   for ac_prog in xgettext
14072 do
14073   # Extract the first word of "$ac_prog", so it can be a program name with args.
14074 set dummy $ac_prog; ac_word=$2
14075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14076 $as_echo_n "checking for $ac_word... " >&6; }
14077 if ${ac_cv_prog_XGETTEXT+:} false; then :
14078   $as_echo_n "(cached) " >&6
14079 else
14080   if test -n "$XGETTEXT"; then
14081   ac_cv_prog_XGETTEXT="$XGETTEXT" # Let the user override the test.
14082 else
14083 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14084 for as_dir in $PATH
14085 do
14086   IFS=$as_save_IFS
14087   test -z "$as_dir" && as_dir=.
14088     for ac_exec_ext in '' $ac_executable_extensions; do
14089   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14090     ac_cv_prog_XGETTEXT="$ac_prog"
14091     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14092     break 2
14093   fi
14094 done
14095   done
14096 IFS=$as_save_IFS
14097
14098 fi
14099 fi
14100 XGETTEXT=$ac_cv_prog_XGETTEXT
14101 if test -n "$XGETTEXT"; then
14102   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
14103 $as_echo "$XGETTEXT" >&6; }
14104 else
14105   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14106 $as_echo "no" >&6; }
14107 fi
14108
14109
14110   test -n "$XGETTEXT" && break
14111 done
14112
14113
14114 fi
14115
14116 # Check for Tcl configuration script tclConfig.sh
14117 if test "$with_tcl" = yes; then
14118     for ac_prog in tclsh tcl tclsh8.6 tclsh86 tclsh8.5 tclsh85 tclsh8.4 tclsh84 tclsh8.3 tclsh83
14119 do
14120   # Extract the first word of "$ac_prog", so it can be a program name with args.
14121 set dummy $ac_prog; ac_word=$2
14122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14123 $as_echo_n "checking for $ac_word... " >&6; }
14124 if ${ac_cv_path_TCLSH+:} false; then :
14125   $as_echo_n "(cached) " >&6
14126 else
14127   case $TCLSH in
14128   [\\/]* | ?:[\\/]*)
14129   ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
14130   ;;
14131   *)
14132   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14133 for as_dir in $PATH
14134 do
14135   IFS=$as_save_IFS
14136   test -z "$as_dir" && as_dir=.
14137     for ac_exec_ext in '' $ac_executable_extensions; do
14138   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14139     ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
14140     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14141     break 2
14142   fi
14143 done
14144   done
14145 IFS=$as_save_IFS
14146
14147   ;;
14148 esac
14149 fi
14150 TCLSH=$ac_cv_path_TCLSH
14151 if test -n "$TCLSH"; then
14152   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
14153 $as_echo "$TCLSH" >&6; }
14154 else
14155   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14156 $as_echo "no" >&6; }
14157 fi
14158
14159
14160   test -n "$TCLSH" && break
14161 done
14162
14163 if test x"$TCLSH" = x""; then
14164   as_fn_error $? "Tcl shell not found" "$LINENO" 5
14165 fi
14166
14167 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclConfig.sh" >&5
14168 $as_echo_n "checking for tclConfig.sh... " >&6; }
14169 # Let user override test
14170 if test -z "$TCL_CONFIG_SH"; then
14171     pgac_test_dirs="$with_tclconfig"
14172
14173     set X $pgac_test_dirs; shift
14174     if test $# -eq 0; then
14175         test -z "$TCLSH" && as_fn_error $? "unable to locate tclConfig.sh because no Tcl shell was found" "$LINENO" 5
14176         set X `echo 'puts $auto_path' | $TCLSH`; shift
14177     fi
14178
14179     for pgac_dir do
14180         if test -r "$pgac_dir/tclConfig.sh"; then
14181             TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
14182             break
14183         fi
14184     done
14185 fi
14186
14187 if test -z "$TCL_CONFIG_SH"; then
14188     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14189 $as_echo "no" >&6; }
14190     as_fn_error $? "file 'tclConfig.sh' is required for Tcl" "$LINENO" 5
14191 else
14192     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCL_CONFIG_SH" >&5
14193 $as_echo "$TCL_CONFIG_SH" >&6; }
14194 fi
14195
14196
14197
14198     . "$TCL_CONFIG_SH"
14199 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
14200 eval TCL_LIB_FILE=\"$TCL_LIB_FILE\"
14201 eval TCL_LIBS=\"$TCL_LIBS\"
14202 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
14203 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
14204
14205         # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
14206     ac_save_CPPFLAGS=$CPPFLAGS
14207     CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
14208     ac_fn_c_check_header_mongrel "$LINENO" "tcl.h" "ac_cv_header_tcl_h" "$ac_includes_default"
14209 if test "x$ac_cv_header_tcl_h" = xyes; then :
14210
14211 else
14212   as_fn_error $? "header file <tcl.h> is required for Tcl" "$LINENO" 5
14213 fi
14214
14215
14216     CPPFLAGS=$ac_save_CPPFLAGS
14217 fi
14218
14219 # check for <perl.h>
14220 if test "$with_perl" = yes; then
14221   ac_save_CPPFLAGS=$CPPFLAGS
14222   CPPFLAGS="$CPPFLAGS -I$perl_archlibexp/CORE"
14223   ac_fn_c_check_header_compile "$LINENO" "perl.h" "ac_cv_header_perl_h" "#include <EXTERN.h>
14224 "
14225 if test "x$ac_cv_header_perl_h" = xyes; then :
14226
14227 else
14228   as_fn_error $? "header file <perl.h> is required for Perl" "$LINENO" 5
14229 fi
14230
14231
14232   # While we're at it, check that we can link to libperl.
14233   # On most platforms, if perl.h is there then libperl.so will be too, but at
14234   # this writing Debian packages them separately.  There is no known reason to
14235   # waste cycles on separate probes for the Tcl or Python libraries, though.
14236   pgac_save_LIBS=$LIBS
14237   LIBS="$perl_embed_ldflags"
14238   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libperl" >&5
14239 $as_echo_n "checking for libperl... " >&6; }
14240   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14241 /* end confdefs.h.  */
14242
14243 #include <EXTERN.h>
14244 #include <perl.h>
14245
14246 int
14247 main ()
14248 {
14249 perl_alloc();
14250   ;
14251   return 0;
14252 }
14253 _ACEOF
14254 if ac_fn_c_try_link "$LINENO"; then :
14255   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14256 $as_echo "yes" >&6; }
14257 else
14258   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14259 $as_echo "no" >&6; }
14260      as_fn_error $? "libperl library is required for Perl" "$LINENO" 5
14261 fi
14262 rm -f core conftest.err conftest.$ac_objext \
14263     conftest$ac_exeext conftest.$ac_ext
14264   LIBS=$pgac_save_LIBS
14265   CPPFLAGS=$ac_save_CPPFLAGS
14266 fi
14267
14268 # check for <Python.h>
14269 if test "$with_python" = yes; then
14270   ac_save_CPPFLAGS=$CPPFLAGS
14271   CPPFLAGS="$python_includespec $CPPFLAGS"
14272   ac_fn_c_check_header_mongrel "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default"
14273 if test "x$ac_cv_header_Python_h" = xyes; then :
14274
14275 else
14276   as_fn_error $? "header file <Python.h> is required for Python" "$LINENO" 5
14277 fi
14278
14279
14280   CPPFLAGS=$ac_save_CPPFLAGS
14281 fi
14282
14283 #
14284 # Check for DocBook and tools
14285 #
14286 for ac_prog in onsgmls nsgmls
14287 do
14288   # Extract the first word of "$ac_prog", so it can be a program name with args.
14289 set dummy $ac_prog; ac_word=$2
14290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14291 $as_echo_n "checking for $ac_word... " >&6; }
14292 if ${ac_cv_prog_NSGMLS+:} false; then :
14293   $as_echo_n "(cached) " >&6
14294 else
14295   if test -n "$NSGMLS"; then
14296   ac_cv_prog_NSGMLS="$NSGMLS" # Let the user override the test.
14297 else
14298 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14299 for as_dir in $PATH
14300 do
14301   IFS=$as_save_IFS
14302   test -z "$as_dir" && as_dir=.
14303     for ac_exec_ext in '' $ac_executable_extensions; do
14304   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14305     ac_cv_prog_NSGMLS="$ac_prog"
14306     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14307     break 2
14308   fi
14309 done
14310   done
14311 IFS=$as_save_IFS
14312
14313 fi
14314 fi
14315 NSGMLS=$ac_cv_prog_NSGMLS
14316 if test -n "$NSGMLS"; then
14317   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NSGMLS" >&5
14318 $as_echo "$NSGMLS" >&6; }
14319 else
14320   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14321 $as_echo "no" >&6; }
14322 fi
14323
14324
14325   test -n "$NSGMLS" && break
14326 done
14327
14328 for ac_prog in openjade jade
14329 do
14330   # Extract the first word of "$ac_prog", so it can be a program name with args.
14331 set dummy $ac_prog; ac_word=$2
14332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14333 $as_echo_n "checking for $ac_word... " >&6; }
14334 if ${ac_cv_prog_JADE+:} false; then :
14335   $as_echo_n "(cached) " >&6
14336 else
14337   if test -n "$JADE"; then
14338   ac_cv_prog_JADE="$JADE" # Let the user override the test.
14339 else
14340 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14341 for as_dir in $PATH
14342 do
14343   IFS=$as_save_IFS
14344   test -z "$as_dir" && as_dir=.
14345     for ac_exec_ext in '' $ac_executable_extensions; do
14346   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14347     ac_cv_prog_JADE="$ac_prog"
14348     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14349     break 2
14350   fi
14351 done
14352   done
14353 IFS=$as_save_IFS
14354
14355 fi
14356 fi
14357 JADE=$ac_cv_prog_JADE
14358 if test -n "$JADE"; then
14359   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JADE" >&5
14360 $as_echo "$JADE" >&6; }
14361 else
14362   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14363 $as_echo "no" >&6; }
14364 fi
14365
14366
14367   test -n "$JADE" && break
14368 done
14369
14370
14371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DocBook V4.2" >&5
14372 $as_echo_n "checking for DocBook V4.2... " >&6; }
14373 if ${pgac_cv_check_docbook+:} false; then :
14374   $as_echo_n "(cached) " >&6
14375 else
14376   cat >conftest.sgml <<EOF
14377 <!doctype book PUBLIC "-//OASIS//DTD DocBook V4.2//EN">
14378 <book>
14379  <title>test</title>
14380  <chapter>
14381   <title>random</title>
14382    <sect1>
14383     <title>testsect</title>
14384     <para>text</para>
14385   </sect1>
14386  </chapter>
14387 </book>
14388 EOF
14389
14390 pgac_cv_check_docbook=no
14391
14392 if test -n "$NSGMLS"; then
14393   $NSGMLS -s conftest.sgml 1>&5 2>&1
14394   if test $? -eq 0; then
14395     pgac_cv_check_docbook=yes
14396   fi
14397 fi
14398 rm -f conftest.sgml
14399 fi
14400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_docbook" >&5
14401 $as_echo "$pgac_cv_check_docbook" >&6; }
14402
14403 have_docbook=$pgac_cv_check_docbook
14404
14405
14406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DocBook stylesheets" >&5
14407 $as_echo_n "checking for DocBook stylesheets... " >&6; }
14408 if ${pgac_cv_path_stylesheets+:} false; then :
14409   $as_echo_n "(cached) " >&6
14410 else
14411   if test -n "$DOCBOOKSTYLE"; then
14412   pgac_cv_path_stylesheets=$DOCBOOKSTYLE
14413 else
14414   for pgac_prefix in /usr /usr/local /opt /sw; do
14415     for pgac_infix in share lib; do
14416       for pgac_postfix in \
14417         sgml/stylesheets/nwalsh-modular \
14418         sgml/stylesheets/docbook \
14419         sgml/stylesheets/dsssl/docbook \
14420         sgml/docbook-dsssl \
14421         sgml/docbook/dsssl/modular \
14422         sgml/docbook/stylesheet/dsssl/modular \
14423         sgml/docbook/dsssl-stylesheets \
14424         sgml/dsssl/docbook-dsssl-nwalsh
14425       do
14426         pgac_candidate=$pgac_prefix/$pgac_infix/$pgac_postfix
14427         if test -r "$pgac_candidate/html/docbook.dsl" \
14428            && test -r "$pgac_candidate/print/docbook.dsl"
14429         then
14430           pgac_cv_path_stylesheets=$pgac_candidate
14431           break 3
14432         fi
14433       done
14434     done
14435   done
14436 fi
14437 fi
14438
14439 DOCBOOKSTYLE=$pgac_cv_path_stylesheets
14440
14441 if test -n "$DOCBOOKSTYLE"; then
14442   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOCBOOKSTYLE" >&5
14443 $as_echo "$DOCBOOKSTYLE" >&6; }
14444 else
14445   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14446 $as_echo "no" >&6; }
14447 fi
14448 if test -n "$DOCBOOKSTYLE" -a -r "$DOCBOOKSTYLE/bin/collateindex.pl"; then
14449   COLLATEINDEX="$DOCBOOKSTYLE/bin/collateindex.pl"
14450
14451 else
14452   # Extract the first word of "collateindex.pl", so it can be a program name with args.
14453 set dummy collateindex.pl; ac_word=$2
14454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14455 $as_echo_n "checking for $ac_word... " >&6; }
14456 if ${ac_cv_path_COLLATEINDEX+:} false; then :
14457   $as_echo_n "(cached) " >&6
14458 else
14459   case $COLLATEINDEX in
14460   [\\/]* | ?:[\\/]*)
14461   ac_cv_path_COLLATEINDEX="$COLLATEINDEX" # Let the user override the test with a path.
14462   ;;
14463   *)
14464   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14465 for as_dir in $PATH
14466 do
14467   IFS=$as_save_IFS
14468   test -z "$as_dir" && as_dir=.
14469     for ac_exec_ext in '' $ac_executable_extensions; do
14470   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14471     ac_cv_path_COLLATEINDEX="$as_dir/$ac_word$ac_exec_ext"
14472     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14473     break 2
14474   fi
14475 done
14476   done
14477 IFS=$as_save_IFS
14478
14479   ;;
14480 esac
14481 fi
14482 COLLATEINDEX=$ac_cv_path_COLLATEINDEX
14483 if test -n "$COLLATEINDEX"; then
14484   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COLLATEINDEX" >&5
14485 $as_echo "$COLLATEINDEX" >&6; }
14486 else
14487   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14488 $as_echo "no" >&6; }
14489 fi
14490
14491
14492 fi
14493 for ac_prog in xsltproc
14494 do
14495   # Extract the first word of "$ac_prog", so it can be a program name with args.
14496 set dummy $ac_prog; ac_word=$2
14497 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14498 $as_echo_n "checking for $ac_word... " >&6; }
14499 if ${ac_cv_prog_XSLTPROC+:} false; then :
14500   $as_echo_n "(cached) " >&6
14501 else
14502   if test -n "$XSLTPROC"; then
14503   ac_cv_prog_XSLTPROC="$XSLTPROC" # Let the user override the test.
14504 else
14505 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14506 for as_dir in $PATH
14507 do
14508   IFS=$as_save_IFS
14509   test -z "$as_dir" && as_dir=.
14510     for ac_exec_ext in '' $ac_executable_extensions; do
14511   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14512     ac_cv_prog_XSLTPROC="$ac_prog"
14513     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14514     break 2
14515   fi
14516 done
14517   done
14518 IFS=$as_save_IFS
14519
14520 fi
14521 fi
14522 XSLTPROC=$ac_cv_prog_XSLTPROC
14523 if test -n "$XSLTPROC"; then
14524   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
14525 $as_echo "$XSLTPROC" >&6; }
14526 else
14527   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14528 $as_echo "no" >&6; }
14529 fi
14530
14531
14532   test -n "$XSLTPROC" && break
14533 done
14534
14535 for ac_prog in osx sgml2xml sx
14536 do
14537   # Extract the first word of "$ac_prog", so it can be a program name with args.
14538 set dummy $ac_prog; ac_word=$2
14539 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14540 $as_echo_n "checking for $ac_word... " >&6; }
14541 if ${ac_cv_prog_OSX+:} false; then :
14542   $as_echo_n "(cached) " >&6
14543 else
14544   if test -n "$OSX"; then
14545   ac_cv_prog_OSX="$OSX" # Let the user override the test.
14546 else
14547 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14548 for as_dir in $PATH
14549 do
14550   IFS=$as_save_IFS
14551   test -z "$as_dir" && as_dir=.
14552     for ac_exec_ext in '' $ac_executable_extensions; do
14553   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14554     ac_cv_prog_OSX="$ac_prog"
14555     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14556     break 2
14557   fi
14558 done
14559   done
14560 IFS=$as_save_IFS
14561
14562 fi
14563 fi
14564 OSX=$ac_cv_prog_OSX
14565 if test -n "$OSX"; then
14566   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OSX" >&5
14567 $as_echo "$OSX" >&6; }
14568 else
14569   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14570 $as_echo "no" >&6; }
14571 fi
14572
14573
14574   test -n "$OSX" && break
14575 done
14576
14577
14578 #
14579 # Check for test tools
14580 #
14581 for ac_prog in prove
14582 do
14583   # Extract the first word of "$ac_prog", so it can be a program name with args.
14584 set dummy $ac_prog; ac_word=$2
14585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14586 $as_echo_n "checking for $ac_word... " >&6; }
14587 if ${ac_cv_prog_PROVE+:} false; then :
14588   $as_echo_n "(cached) " >&6
14589 else
14590   if test -n "$PROVE"; then
14591   ac_cv_prog_PROVE="$PROVE" # Let the user override the test.
14592 else
14593 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14594 for as_dir in $PATH
14595 do
14596   IFS=$as_save_IFS
14597   test -z "$as_dir" && as_dir=.
14598     for ac_exec_ext in '' $ac_executable_extensions; do
14599   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14600     ac_cv_prog_PROVE="$ac_prog"
14601     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14602     break 2
14603   fi
14604 done
14605   done
14606 IFS=$as_save_IFS
14607
14608 fi
14609 fi
14610 PROVE=$ac_cv_prog_PROVE
14611 if test -n "$PROVE"; then
14612   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
14613 $as_echo "$PROVE" >&6; }
14614 else
14615   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14616 $as_echo "no" >&6; }
14617 fi
14618
14619
14620   test -n "$PROVE" && break
14621 done
14622
14623
14624 # Thread testing
14625
14626 # We have to run the thread test near the end so we have all our symbols
14627 # defined.  Cross compiling throws a warning.
14628 #
14629 if test "$enable_thread_safety" = yes; then
14630 if test "$PORTNAME" != "win32"
14631 then
14632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking thread safety of required library functions" >&5
14633 $as_echo_n "checking thread safety of required library functions... " >&6; }
14634
14635 _CFLAGS="$CFLAGS"
14636 _LIBS="$LIBS"
14637 CFLAGS="$CFLAGS $PTHREAD_CFLAGS -DIN_CONFIGURE"
14638 LIBS="$LIBS $PTHREAD_LIBS"
14639 if test "$cross_compiling" = yes; then :
14640   { $as_echo "$as_me:${as_lineno-$LINENO}: result: maybe" >&5
14641 $as_echo "maybe" >&6; }
14642   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
14643 *** Skipping thread test program because of cross-compile build.
14644 *** Run the program in src/test/thread on the target machine.
14645 " >&5
14646 $as_echo "$as_me: WARNING:
14647 *** Skipping thread test program because of cross-compile build.
14648 *** Run the program in src/test/thread on the target machine.
14649 " >&2;}
14650 else
14651   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14652 /* end confdefs.h.  */
14653 #include "$srcdir/src/test/thread/thread_test.c"
14654 _ACEOF
14655 if ac_fn_c_try_run "$LINENO"; then :
14656   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14657 $as_echo "yes" >&6; }
14658 else
14659   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14660 $as_echo "no" >&6; }
14661   as_fn_error $? "thread test program failed
14662 This platform is not thread-safe.  Check the file 'config.log' or compile
14663 and run src/test/thread/thread_test for the exact reason.
14664 Use --disable-thread-safety to disable thread safety." "$LINENO" 5
14665 fi
14666 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14667   conftest.$ac_objext conftest.beam conftest.$ac_ext
14668 fi
14669
14670 CFLAGS="$_CFLAGS"
14671 LIBS="$_LIBS"
14672 else
14673 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** skipping thread test on Win32" >&5
14674 $as_echo "$as_me: WARNING: *** skipping thread test on Win32" >&2;}
14675 fi
14676 fi
14677
14678 # If compiler will take -Wl,--as-needed (or various platform-specific
14679 # spellings thereof) then add that to LDFLAGS.  This is much easier than
14680 # trying to filter LIBS to the minimum for each executable.
14681 # On (at least) some Red-Hat-derived systems, this switch breaks linking to
14682 # libreadline; therefore we postpone testing it until we know what library
14683 # dependencies readline has.  The test code will try to link with $LIBS.
14684 if test "$with_readline" = yes; then
14685   link_test_func=readline
14686 else
14687   link_test_func=exit
14688 fi
14689
14690 if test "$PORTNAME" = "darwin"; then
14691   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-dead_strip_dylibs" >&5
14692 $as_echo_n "checking whether $CC supports -Wl,-dead_strip_dylibs... " >&6; }
14693 if ${pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs+:} false; then :
14694   $as_echo_n "(cached) " >&6
14695 else
14696   pgac_save_LDFLAGS=$LDFLAGS
14697 LDFLAGS="$pgac_save_LDFLAGS -Wl,-dead_strip_dylibs"
14698 if test "$cross_compiling" = yes; then :
14699   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs="assuming no"
14700 else
14701   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14702 /* end confdefs.h.  */
14703 extern void $link_test_func (); void (*fptr) () = $link_test_func;
14704 int
14705 main ()
14706 {
14707
14708   ;
14709   return 0;
14710 }
14711 _ACEOF
14712 if ac_fn_c_try_run "$LINENO"; then :
14713   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=yes
14714 else
14715   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=no
14716 fi
14717 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14718   conftest.$ac_objext conftest.beam conftest.$ac_ext
14719 fi
14720
14721 LDFLAGS="$pgac_save_LDFLAGS"
14722 fi
14723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&5
14724 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&6; }
14725 if test x"$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" = x"yes"; then
14726   LDFLAGS="$LDFLAGS -Wl,-dead_strip_dylibs"
14727 fi
14728
14729 elif test "$PORTNAME" = "openbsd"; then
14730   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-Bdynamic" >&5
14731 $as_echo_n "checking whether $CC supports -Wl,-Bdynamic... " >&6; }
14732 if ${pgac_cv_prog_cc_ldflags__Wl__Bdynamic+:} false; then :
14733   $as_echo_n "(cached) " >&6
14734 else
14735   pgac_save_LDFLAGS=$LDFLAGS
14736 LDFLAGS="$pgac_save_LDFLAGS -Wl,-Bdynamic"
14737 if test "$cross_compiling" = yes; then :
14738   pgac_cv_prog_cc_ldflags__Wl__Bdynamic="assuming no"
14739 else
14740   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14741 /* end confdefs.h.  */
14742 extern void $link_test_func (); void (*fptr) () = $link_test_func;
14743 int
14744 main ()
14745 {
14746
14747   ;
14748   return 0;
14749 }
14750 _ACEOF
14751 if ac_fn_c_try_run "$LINENO"; then :
14752   pgac_cv_prog_cc_ldflags__Wl__Bdynamic=yes
14753 else
14754   pgac_cv_prog_cc_ldflags__Wl__Bdynamic=no
14755 fi
14756 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14757   conftest.$ac_objext conftest.beam conftest.$ac_ext
14758 fi
14759
14760 LDFLAGS="$pgac_save_LDFLAGS"
14761 fi
14762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&5
14763 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&6; }
14764 if test x"$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" = x"yes"; then
14765   LDFLAGS="$LDFLAGS -Wl,-Bdynamic"
14766 fi
14767
14768 else
14769   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,--as-needed" >&5
14770 $as_echo_n "checking whether $CC supports -Wl,--as-needed... " >&6; }
14771 if ${pgac_cv_prog_cc_ldflags__Wl___as_needed+:} false; then :
14772   $as_echo_n "(cached) " >&6
14773 else
14774   pgac_save_LDFLAGS=$LDFLAGS
14775 LDFLAGS="$pgac_save_LDFLAGS -Wl,--as-needed"
14776 if test "$cross_compiling" = yes; then :
14777   pgac_cv_prog_cc_ldflags__Wl___as_needed="assuming no"
14778 else
14779   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14780 /* end confdefs.h.  */
14781 extern void $link_test_func (); void (*fptr) () = $link_test_func;
14782 int
14783 main ()
14784 {
14785
14786   ;
14787   return 0;
14788 }
14789 _ACEOF
14790 if ac_fn_c_try_run "$LINENO"; then :
14791   pgac_cv_prog_cc_ldflags__Wl___as_needed=yes
14792 else
14793   pgac_cv_prog_cc_ldflags__Wl___as_needed=no
14794 fi
14795 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14796   conftest.$ac_objext conftest.beam conftest.$ac_ext
14797 fi
14798
14799 LDFLAGS="$pgac_save_LDFLAGS"
14800 fi
14801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl___as_needed" >&5
14802 $as_echo "$pgac_cv_prog_cc_ldflags__Wl___as_needed" >&6; }
14803 if test x"$pgac_cv_prog_cc_ldflags__Wl___as_needed" = x"yes"; then
14804   LDFLAGS="$LDFLAGS -Wl,--as-needed"
14805 fi
14806
14807 fi
14808
14809 # Create compiler version string
14810 if test x"$GCC" = x"yes" ; then
14811   cc_string=`${CC} --version | sed q`
14812   case $cc_string in [A-Za-z]*) ;; *) cc_string="GCC $cc_string";; esac
14813 elif test x"$SUN_STUDIO_CC" = x"yes" ; then
14814   cc_string=`${CC} -V 2>&1 | sed q`
14815 else
14816   cc_string=$CC
14817 fi
14818
14819
14820 cat >>confdefs.h <<_ACEOF
14821 #define PG_VERSION_STR "PostgreSQL $PG_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"
14822 _ACEOF
14823
14824
14825 # Supply a numeric version string for use by 3rd party add-ons
14826 # awk -F is a regex on some platforms, and not on others, so make "." a tab
14827 PG_VERSION_NUM="`echo "$PACKAGE_VERSION" | sed 's/[A-Za-z].*$//' |
14828 tr '.' '        ' |
14829 $AWK '{printf "%d%02d%02d", $1, $2, (NF >= 3) ? $3 : 0}'`"
14830
14831 cat >>confdefs.h <<_ACEOF
14832 #define PG_VERSION_NUM $PG_VERSION_NUM
14833 _ACEOF
14834
14835
14836
14837 # Begin output steps
14838
14839 { $as_echo "$as_me:${as_lineno-$LINENO}: using compiler=$cc_string" >&5
14840 $as_echo "$as_me: using compiler=$cc_string" >&6;}
14841 { $as_echo "$as_me:${as_lineno-$LINENO}: using CFLAGS=$CFLAGS" >&5
14842 $as_echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
14843 { $as_echo "$as_me:${as_lineno-$LINENO}: using CPPFLAGS=$CPPFLAGS" >&5
14844 $as_echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
14845 { $as_echo "$as_me:${as_lineno-$LINENO}: using LDFLAGS=$LDFLAGS" >&5
14846 $as_echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
14847
14848 # prepare build tree if outside source tree
14849 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
14850 # Note 2: /bin/pwd might be better than shell's built-in at getting
14851 #         a symlink-free name.
14852 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
14853   vpath_build=no
14854 else
14855   vpath_build=yes
14856   if test "$no_create" != yes; then
14857     $as_echo_n "preparing build tree... " >&6
14858     pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
14859     $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
14860       || as_fn_error $? "failed" "$LINENO" 5
14861     { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
14862 $as_echo "done" >&6; }
14863   fi
14864 fi
14865
14866
14867
14868 ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
14869
14870
14871 ac_config_links="$ac_config_links src/backend/port/dynloader.c:src/backend/port/dynloader/${template}.c src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION} src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION} src/backend/port/pg_latch.c:${LATCH_IMPLEMENTATION} src/include/dynloader.h:src/backend/port/dynloader/${template}.h src/include/pg_config_os.h:src/include/port/${template}.h src/Makefile.port:src/makefiles/Makefile.${template}"
14872
14873
14874 if test "$PORTNAME" = "win32"; then
14875 ac_config_commands="$ac_config_commands check_win32_symlinks"
14876
14877 fi
14878
14879 ac_config_headers="$ac_config_headers src/include/pg_config.h"
14880
14881
14882 ac_config_headers="$ac_config_headers src/include/pg_config_ext.h"
14883
14884
14885 ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
14886
14887
14888 cat >confcache <<\_ACEOF
14889 # This file is a shell script that caches the results of configure
14890 # tests run on this system so they can be shared between configure
14891 # scripts and configure runs, see configure's option --config-cache.
14892 # It is not useful on other systems.  If it contains results you don't
14893 # want to keep, you may remove or edit it.
14894 #
14895 # config.status only pays attention to the cache file if you give it
14896 # the --recheck option to rerun configure.
14897 #
14898 # `ac_cv_env_foo' variables (set or unset) will be overridden when
14899 # loading this file, other *unset* `ac_cv_foo' will be assigned the
14900 # following values.
14901
14902 _ACEOF
14903
14904 # The following way of writing the cache mishandles newlines in values,
14905 # but we know of no workaround that is simple, portable, and efficient.
14906 # So, we kill variables containing newlines.
14907 # Ultrix sh set writes to stderr and can't be redirected directly,
14908 # and sets the high bit in the cache file unless we assign to the vars.
14909 (
14910   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
14911     eval ac_val=\$$ac_var
14912     case $ac_val in #(
14913     *${as_nl}*)
14914       case $ac_var in #(
14915       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
14916 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
14917       esac
14918       case $ac_var in #(
14919       _ | IFS | as_nl) ;; #(
14920       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
14921       *) { eval $ac_var=; unset $ac_var;} ;;
14922       esac ;;
14923     esac
14924   done
14925
14926   (set) 2>&1 |
14927     case $as_nl`(ac_space=' '; set) 2>&1` in #(
14928     *${as_nl}ac_space=\ *)
14929       # `set' does not quote correctly, so add quotes: double-quote
14930       # substitution turns \\\\ into \\, and sed turns \\ into \.
14931       sed -n \
14932         "s/'/'\\\\''/g;
14933           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
14934       ;; #(
14935     *)
14936       # `set' quotes correctly as required by POSIX, so do not add quotes.
14937       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
14938       ;;
14939     esac |
14940     sort
14941 ) |
14942   sed '
14943      /^ac_cv_env_/b end
14944      t clear
14945      :clear
14946      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
14947      t end
14948      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
14949      :end' >>confcache
14950 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
14951   if test -w "$cache_file"; then
14952     if test "x$cache_file" != "x/dev/null"; then
14953       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
14954 $as_echo "$as_me: updating cache $cache_file" >&6;}
14955       if test ! -f "$cache_file" || test -h "$cache_file"; then
14956         cat confcache >"$cache_file"
14957       else
14958         case $cache_file in #(
14959         */* | ?:*)
14960           mv -f confcache "$cache_file"$$ &&
14961           mv -f "$cache_file"$$ "$cache_file" ;; #(
14962         *)
14963           mv -f confcache "$cache_file" ;;
14964         esac
14965       fi
14966     fi
14967   else
14968     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
14969 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
14970   fi
14971 fi
14972 rm -f confcache
14973
14974 test "x$prefix" = xNONE && prefix=$ac_default_prefix
14975 # Let make expand exec_prefix.
14976 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14977
14978 DEFS=-DHAVE_CONFIG_H
14979
14980 ac_libobjs=
14981 ac_ltlibobjs=
14982 U=
14983 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
14984   # 1. Remove the extension, and $U if already installed.
14985   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
14986   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
14987   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
14988   #    will be set to the directory where LIBOBJS objects are built.
14989   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
14990   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
14991 done
14992 LIBOBJS=$ac_libobjs
14993
14994 LTLIBOBJS=$ac_ltlibobjs
14995
14996
14997
14998
14999 : "${CONFIG_STATUS=./config.status}"
15000 ac_write_fail=0
15001 ac_clean_files_save=$ac_clean_files
15002 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
15003 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15004 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15005 as_write_fail=0
15006 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
15007 #! $SHELL
15008 # Generated by $as_me.
15009 # Run this file to recreate the current configuration.
15010 # Compiler output produced by configure, useful for debugging
15011 # configure, is in config.log if it exists.
15012
15013 debug=false
15014 ac_cs_recheck=false
15015 ac_cs_silent=false
15016
15017 SHELL=\${CONFIG_SHELL-$SHELL}
15018 export SHELL
15019 _ASEOF
15020 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15021 ## -------------------- ##
15022 ## M4sh Initialization. ##
15023 ## -------------------- ##
15024
15025 # Be more Bourne compatible
15026 DUALCASE=1; export DUALCASE # for MKS sh
15027 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
15028   emulate sh
15029   NULLCMD=:
15030   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
15031   # is contrary to our usage.  Disable this feature.
15032   alias -g '${1+"$@"}'='"$@"'
15033   setopt NO_GLOB_SUBST
15034 else
15035   case `(set -o) 2>/dev/null` in #(
15036   *posix*) :
15037     set -o posix ;; #(
15038   *) :
15039      ;;
15040 esac
15041 fi
15042
15043
15044 as_nl='
15045 '
15046 export as_nl
15047 # Printing a long string crashes Solaris 7 /usr/bin/printf.
15048 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15049 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15050 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15051 # Prefer a ksh shell builtin over an external printf program on Solaris,
15052 # but without wasting forks for bash or zsh.
15053 if test -z "$BASH_VERSION$ZSH_VERSION" \
15054     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15055   as_echo='print -r --'
15056   as_echo_n='print -rn --'
15057 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15058   as_echo='printf %s\n'
15059   as_echo_n='printf %s'
15060 else
15061   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15062     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15063     as_echo_n='/usr/ucb/echo -n'
15064   else
15065     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15066     as_echo_n_body='eval
15067       arg=$1;
15068       case $arg in #(
15069       *"$as_nl"*)
15070         expr "X$arg" : "X\\(.*\\)$as_nl";
15071         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15072       esac;
15073       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15074     '
15075     export as_echo_n_body
15076     as_echo_n='sh -c $as_echo_n_body as_echo'
15077   fi
15078   export as_echo_body
15079   as_echo='sh -c $as_echo_body as_echo'
15080 fi
15081
15082 # The user is always right.
15083 if test "${PATH_SEPARATOR+set}" != set; then
15084   PATH_SEPARATOR=:
15085   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15086     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15087       PATH_SEPARATOR=';'
15088   }
15089 fi
15090
15091
15092 # IFS
15093 # We need space, tab and new line, in precisely that order.  Quoting is
15094 # there to prevent editors from complaining about space-tab.
15095 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
15096 # splitting by setting IFS to empty value.)
15097 IFS=" ""        $as_nl"
15098
15099 # Find who we are.  Look in the path if we contain no directory separator.
15100 as_myself=
15101 case $0 in #((
15102   *[\\/]* ) as_myself=$0 ;;
15103   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15104 for as_dir in $PATH
15105 do
15106   IFS=$as_save_IFS
15107   test -z "$as_dir" && as_dir=.
15108     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15109   done
15110 IFS=$as_save_IFS
15111
15112      ;;
15113 esac
15114 # We did not find ourselves, most probably we were run as `sh COMMAND'
15115 # in which case we are not to be found in the path.
15116 if test "x$as_myself" = x; then
15117   as_myself=$0
15118 fi
15119 if test ! -f "$as_myself"; then
15120   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15121   exit 1
15122 fi
15123
15124 # Unset variables that we do not need and which cause bugs (e.g. in
15125 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
15126 # suppresses any "Segmentation fault" message there.  '((' could
15127 # trigger a bug in pdksh 5.2.14.
15128 for as_var in BASH_ENV ENV MAIL MAILPATH
15129 do eval test x\${$as_var+set} = xset \
15130   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
15131 done
15132 PS1='$ '
15133 PS2='> '
15134 PS4='+ '
15135
15136 # NLS nuisances.
15137 LC_ALL=C
15138 export LC_ALL
15139 LANGUAGE=C
15140 export LANGUAGE
15141
15142 # CDPATH.
15143 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15144
15145
15146 # as_fn_error STATUS ERROR [LINENO LOG_FD]
15147 # ----------------------------------------
15148 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15149 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
15150 # script with STATUS, using 1 if that was 0.
15151 as_fn_error ()
15152 {
15153   as_status=$1; test $as_status -eq 0 && as_status=1
15154   if test "$4"; then
15155     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15156     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
15157   fi
15158   $as_echo "$as_me: error: $2" >&2
15159   as_fn_exit $as_status
15160 } # as_fn_error
15161
15162
15163 # as_fn_set_status STATUS
15164 # -----------------------
15165 # Set $? to STATUS, without forking.
15166 as_fn_set_status ()
15167 {
15168   return $1
15169 } # as_fn_set_status
15170
15171 # as_fn_exit STATUS
15172 # -----------------
15173 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15174 as_fn_exit ()
15175 {
15176   set +e
15177   as_fn_set_status $1
15178   exit $1
15179 } # as_fn_exit
15180
15181 # as_fn_unset VAR
15182 # ---------------
15183 # Portably unset VAR.
15184 as_fn_unset ()
15185 {
15186   { eval $1=; unset $1;}
15187 }
15188 as_unset=as_fn_unset
15189 # as_fn_append VAR VALUE
15190 # ----------------------
15191 # Append the text in VALUE to the end of the definition contained in VAR. Take
15192 # advantage of any shell optimizations that allow amortized linear growth over
15193 # repeated appends, instead of the typical quadratic growth present in naive
15194 # implementations.
15195 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15196   eval 'as_fn_append ()
15197   {
15198     eval $1+=\$2
15199   }'
15200 else
15201   as_fn_append ()
15202   {
15203     eval $1=\$$1\$2
15204   }
15205 fi # as_fn_append
15206
15207 # as_fn_arith ARG...
15208 # ------------------
15209 # Perform arithmetic evaluation on the ARGs, and store the result in the
15210 # global $as_val. Take advantage of shells that can avoid forks. The arguments
15211 # must be portable across $(()) and expr.
15212 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15213   eval 'as_fn_arith ()
15214   {
15215     as_val=$(( $* ))
15216   }'
15217 else
15218   as_fn_arith ()
15219   {
15220     as_val=`expr "$@" || test $? -eq 1`
15221   }
15222 fi # as_fn_arith
15223
15224
15225 if expr a : '\(a\)' >/dev/null 2>&1 &&
15226    test "X`expr 00001 : '.*\(...\)'`" = X001; then
15227   as_expr=expr
15228 else
15229   as_expr=false
15230 fi
15231
15232 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15233   as_basename=basename
15234 else
15235   as_basename=false
15236 fi
15237
15238 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15239   as_dirname=dirname
15240 else
15241   as_dirname=false
15242 fi
15243
15244 as_me=`$as_basename -- "$0" ||
15245 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15246          X"$0" : 'X\(//\)$' \| \
15247          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
15248 $as_echo X/"$0" |
15249     sed '/^.*\/\([^/][^/]*\)\/*$/{
15250             s//\1/
15251             q
15252           }
15253           /^X\/\(\/\/\)$/{
15254             s//\1/
15255             q
15256           }
15257           /^X\/\(\/\).*/{
15258             s//\1/
15259             q
15260           }
15261           s/.*/./; q'`
15262
15263 # Avoid depending upon Character Ranges.
15264 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15265 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15266 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15267 as_cr_digits='0123456789'
15268 as_cr_alnum=$as_cr_Letters$as_cr_digits
15269
15270 ECHO_C= ECHO_N= ECHO_T=
15271 case `echo -n x` in #(((((
15272 -n*)
15273   case `echo 'xy\c'` in
15274   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
15275   xy)  ECHO_C='\c';;
15276   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
15277        ECHO_T=' ';;
15278   esac;;
15279 *)
15280   ECHO_N='-n';;
15281 esac
15282
15283 rm -f conf$$ conf$$.exe conf$$.file
15284 if test -d conf$$.dir; then
15285   rm -f conf$$.dir/conf$$.file
15286 else
15287   rm -f conf$$.dir
15288   mkdir conf$$.dir 2>/dev/null
15289 fi
15290 if (echo >conf$$.file) 2>/dev/null; then
15291   if ln -s conf$$.file conf$$ 2>/dev/null; then
15292     as_ln_s='ln -s'
15293     # ... but there are two gotchas:
15294     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15295     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
15296     # In both cases, we have to default to `cp -pR'.
15297     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
15298       as_ln_s='cp -pR'
15299   elif ln conf$$.file conf$$ 2>/dev/null; then
15300     as_ln_s=ln
15301   else
15302     as_ln_s='cp -pR'
15303   fi
15304 else
15305   as_ln_s='cp -pR'
15306 fi
15307 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15308 rmdir conf$$.dir 2>/dev/null
15309
15310
15311 # as_fn_mkdir_p
15312 # -------------
15313 # Create "$as_dir" as a directory, including parents if necessary.
15314 as_fn_mkdir_p ()
15315 {
15316
15317   case $as_dir in #(
15318   -*) as_dir=./$as_dir;;
15319   esac
15320   test -d "$as_dir" || eval $as_mkdir_p || {
15321     as_dirs=
15322     while :; do
15323       case $as_dir in #(
15324       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15325       *) as_qdir=$as_dir;;
15326       esac
15327       as_dirs="'$as_qdir' $as_dirs"
15328       as_dir=`$as_dirname -- "$as_dir" ||
15329 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15330          X"$as_dir" : 'X\(//\)[^/]' \| \
15331          X"$as_dir" : 'X\(//\)$' \| \
15332          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15333 $as_echo X"$as_dir" |
15334     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15335             s//\1/
15336             q
15337           }
15338           /^X\(\/\/\)[^/].*/{
15339             s//\1/
15340             q
15341           }
15342           /^X\(\/\/\)$/{
15343             s//\1/
15344             q
15345           }
15346           /^X\(\/\).*/{
15347             s//\1/
15348             q
15349           }
15350           s/.*/./; q'`
15351       test -d "$as_dir" && break
15352     done
15353     test -z "$as_dirs" || eval "mkdir $as_dirs"
15354   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
15355
15356
15357 } # as_fn_mkdir_p
15358 if mkdir -p . 2>/dev/null; then
15359   as_mkdir_p='mkdir -p "$as_dir"'
15360 else
15361   test -d ./-p && rmdir ./-p
15362   as_mkdir_p=false
15363 fi
15364
15365
15366 # as_fn_executable_p FILE
15367 # -----------------------
15368 # Test if FILE is an executable regular file.
15369 as_fn_executable_p ()
15370 {
15371   test -f "$1" && test -x "$1"
15372 } # as_fn_executable_p
15373 as_test_x='test -x'
15374 as_executable_p=as_fn_executable_p
15375
15376 # Sed expression to map a string onto a valid CPP name.
15377 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
15378
15379 # Sed expression to map a string onto a valid variable name.
15380 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
15381
15382
15383 exec 6>&1
15384 ## ----------------------------------- ##
15385 ## Main body of $CONFIG_STATUS script. ##
15386 ## ----------------------------------- ##
15387 _ASEOF
15388 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
15389
15390 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15391 # Save the log message, to keep $0 and so on meaningful, and to
15392 # report actual input values of CONFIG_FILES etc. instead of their
15393 # values after options handling.
15394 ac_log="
15395 This file was extended by PostgreSQL $as_me 9.4beta1, which was
15396 generated by GNU Autoconf 2.69.  Invocation command line was
15397
15398   CONFIG_FILES    = $CONFIG_FILES
15399   CONFIG_HEADERS  = $CONFIG_HEADERS
15400   CONFIG_LINKS    = $CONFIG_LINKS
15401   CONFIG_COMMANDS = $CONFIG_COMMANDS
15402   $ $0 $@
15403
15404 on `(hostname || uname -n) 2>/dev/null | sed 1q`
15405 "
15406
15407 _ACEOF
15408
15409 case $ac_config_files in *"
15410 "*) set x $ac_config_files; shift; ac_config_files=$*;;
15411 esac
15412
15413 case $ac_config_headers in *"
15414 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15415 esac
15416
15417
15418 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15419 # Files that config.status was made for.
15420 config_files="$ac_config_files"
15421 config_headers="$ac_config_headers"
15422 config_links="$ac_config_links"
15423 config_commands="$ac_config_commands"
15424
15425 _ACEOF
15426
15427 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15428 ac_cs_usage="\
15429 \`$as_me' instantiates files and other configuration actions
15430 from templates according to the current configuration.  Unless the files
15431 and actions are specified as TAGs, all are instantiated by default.
15432
15433 Usage: $0 [OPTION]... [TAG]...
15434
15435   -h, --help       print this help, then exit
15436   -V, --version    print version number and configuration settings, then exit
15437       --config     print configuration, then exit
15438   -q, --quiet, --silent
15439                    do not print progress messages
15440   -d, --debug      don't remove temporary files
15441       --recheck    update $as_me by reconfiguring in the same conditions
15442       --file=FILE[:TEMPLATE]
15443                    instantiate the configuration file FILE
15444       --header=FILE[:TEMPLATE]
15445                    instantiate the configuration header FILE
15446
15447 Configuration files:
15448 $config_files
15449
15450 Configuration headers:
15451 $config_headers
15452
15453 Configuration links:
15454 $config_links
15455
15456 Configuration commands:
15457 $config_commands
15458
15459 Report bugs to <pgsql-bugs@postgresql.org>."
15460
15461 _ACEOF
15462 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15463 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
15464 ac_cs_version="\\
15465 PostgreSQL config.status 9.4beta1
15466 configured by $0, generated by GNU Autoconf 2.69,
15467   with options \\"\$ac_cs_config\\"
15468
15469 Copyright (C) 2012 Free Software Foundation, Inc.
15470 This config.status script is free software; the Free Software Foundation
15471 gives unlimited permission to copy, distribute and modify it."
15472
15473 ac_pwd='$ac_pwd'
15474 srcdir='$srcdir'
15475 INSTALL='$INSTALL'
15476 MKDIR_P='$MKDIR_P'
15477 AWK='$AWK'
15478 test -n "\$AWK" || AWK=awk
15479 _ACEOF
15480
15481 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15482 # The default lists apply if the user does not specify any file.
15483 ac_need_defaults=:
15484 while test $# != 0
15485 do
15486   case $1 in
15487   --*=?*)
15488     ac_option=`expr "X$1" : 'X\([^=]*\)='`
15489     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
15490     ac_shift=:
15491     ;;
15492   --*=)
15493     ac_option=`expr "X$1" : 'X\([^=]*\)='`
15494     ac_optarg=
15495     ac_shift=:
15496     ;;
15497   *)
15498     ac_option=$1
15499     ac_optarg=$2
15500     ac_shift=shift
15501     ;;
15502   esac
15503
15504   case $ac_option in
15505   # Handling of the options.
15506   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15507     ac_cs_recheck=: ;;
15508   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
15509     $as_echo "$ac_cs_version"; exit ;;
15510   --config | --confi | --conf | --con | --co | --c )
15511     $as_echo "$ac_cs_config"; exit ;;
15512   --debug | --debu | --deb | --de | --d | -d )
15513     debug=: ;;
15514   --file | --fil | --fi | --f )
15515     $ac_shift
15516     case $ac_optarg in
15517     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15518     '') as_fn_error $? "missing file argument" ;;
15519     esac
15520     as_fn_append CONFIG_FILES " '$ac_optarg'"
15521     ac_need_defaults=false;;
15522   --header | --heade | --head | --hea )
15523     $ac_shift
15524     case $ac_optarg in
15525     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15526     esac
15527     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
15528     ac_need_defaults=false;;
15529   --he | --h)
15530     # Conflict between --help and --header
15531     as_fn_error $? "ambiguous option: \`$1'
15532 Try \`$0 --help' for more information.";;
15533   --help | --hel | -h )
15534     $as_echo "$ac_cs_usage"; exit ;;
15535   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15536   | -silent | --silent | --silen | --sile | --sil | --si | --s)
15537     ac_cs_silent=: ;;
15538
15539   # This is an error.
15540   -*) as_fn_error $? "unrecognized option: \`$1'
15541 Try \`$0 --help' for more information." ;;
15542
15543   *) as_fn_append ac_config_targets " $1"
15544      ac_need_defaults=false ;;
15545
15546   esac
15547   shift
15548 done
15549
15550 ac_configure_extra_args=
15551
15552 if $ac_cs_silent; then
15553   exec 6>/dev/null
15554   ac_configure_extra_args="$ac_configure_extra_args --silent"
15555 fi
15556
15557 _ACEOF
15558 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15559 if \$ac_cs_recheck; then
15560   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
15561   shift
15562   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15563   CONFIG_SHELL='$SHELL'
15564   export CONFIG_SHELL
15565   exec "\$@"
15566 fi
15567
15568 _ACEOF
15569 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15570 exec 5>>config.log
15571 {
15572   echo
15573   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15574 ## Running $as_me. ##
15575 _ASBOX
15576   $as_echo "$ac_log"
15577 } >&5
15578
15579 _ACEOF
15580 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15581 _ACEOF
15582
15583 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15584
15585 # Handling of arguments.
15586 for ac_config_target in $ac_config_targets
15587 do
15588   case $ac_config_target in
15589     "src/backend/port/tas.s") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
15590     "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
15591     "src/Makefile.global") CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
15592     "src/backend/port/dynloader.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/dynloader.c:src/backend/port/dynloader/${template}.c" ;;
15593     "src/backend/port/pg_sema.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
15594     "src/backend/port/pg_shmem.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
15595     "src/backend/port/pg_latch.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_latch.c:${LATCH_IMPLEMENTATION}" ;;
15596     "src/include/dynloader.h") CONFIG_LINKS="$CONFIG_LINKS src/include/dynloader.h:src/backend/port/dynloader/${template}.h" ;;
15597     "src/include/pg_config_os.h") CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
15598     "src/Makefile.port") CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
15599     "check_win32_symlinks") CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
15600     "src/include/pg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
15601     "src/include/pg_config_ext.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config_ext.h" ;;
15602     "src/interfaces/ecpg/include/ecpg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
15603
15604   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
15605   esac
15606 done
15607
15608
15609 # If the user did not use the arguments to specify the items to instantiate,
15610 # then the envvar interface is used.  Set only those that are not.
15611 # We use the long form for the default assignment because of an extremely
15612 # bizarre bug on SunOS 4.1.3.
15613 if $ac_need_defaults; then
15614   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15615   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15616   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
15617   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
15618 fi
15619
15620 # Have a temporary directory for convenience.  Make it in the build tree
15621 # simply because there is no reason against having it here, and in addition,
15622 # creating and moving files from /tmp can sometimes cause problems.
15623 # Hook for its removal unless debugging.
15624 # Note that there is a small window in which the directory will not be cleaned:
15625 # after its creation but before its name has been assigned to `$tmp'.
15626 $debug ||
15627 {
15628   tmp= ac_tmp=
15629   trap 'exit_status=$?
15630   : "${ac_tmp:=$tmp}"
15631   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
15632 ' 0
15633   trap 'as_fn_exit 1' 1 2 13 15
15634 }
15635 # Create a (secure) tmp directory for tmp files.
15636
15637 {
15638   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
15639   test -d "$tmp"
15640 }  ||
15641 {
15642   tmp=./conf$$-$RANDOM
15643   (umask 077 && mkdir "$tmp")
15644 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
15645 ac_tmp=$tmp
15646
15647 # Set up the scripts for CONFIG_FILES section.
15648 # No need to generate them if there are no CONFIG_FILES.
15649 # This happens for instance with `./config.status config.h'.
15650 if test -n "$CONFIG_FILES"; then
15651
15652
15653 ac_cr=`echo X | tr X '\015'`
15654 # On cygwin, bash can eat \r inside `` if the user requested igncr.
15655 # But we know of no other shell where ac_cr would be empty at this
15656 # point, so we can use a bashism as a fallback.
15657 if test "x$ac_cr" = x; then
15658   eval ac_cr=\$\'\\r\'
15659 fi
15660 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15661 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
15662   ac_cs_awk_cr='\\r'
15663 else
15664   ac_cs_awk_cr=$ac_cr
15665 fi
15666
15667 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
15668 _ACEOF
15669
15670
15671 {
15672   echo "cat >conf$$subs.awk <<_ACEOF" &&
15673   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15674   echo "_ACEOF"
15675 } >conf$$subs.sh ||
15676   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15677 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
15678 ac_delim='%!_!# '
15679 for ac_last_try in false false false false false :; do
15680   . ./conf$$subs.sh ||
15681     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15682
15683   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15684   if test $ac_delim_n = $ac_delim_num; then
15685     break
15686   elif $ac_last_try; then
15687     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15688   else
15689     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15690   fi
15691 done
15692 rm -f conf$$subs.sh
15693
15694 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15695 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
15696 _ACEOF
15697 sed -n '
15698 h
15699 s/^/S["/; s/!.*/"]=/
15700 p
15701 g
15702 s/^[^!]*!//
15703 :repl
15704 t repl
15705 s/'"$ac_delim"'$//
15706 t delim
15707 :nl
15708 h
15709 s/\(.\{148\}\)..*/\1/
15710 t more1
15711 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15712 p
15713 n
15714 b repl
15715 :more1
15716 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15717 p
15718 g
15719 s/.\{148\}//
15720 t nl
15721 :delim
15722 h
15723 s/\(.\{148\}\)..*/\1/
15724 t more2
15725 s/["\\]/\\&/g; s/^/"/; s/$/"/
15726 p
15727 b
15728 :more2
15729 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15730 p
15731 g
15732 s/.\{148\}//
15733 t delim
15734 ' <conf$$subs.awk | sed '
15735 /^[^""]/{
15736   N
15737   s/\n//
15738 }
15739 ' >>$CONFIG_STATUS || ac_write_fail=1
15740 rm -f conf$$subs.awk
15741 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15742 _ACAWK
15743 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
15744   for (key in S) S_is_set[key] = 1
15745   FS = "\a"
15746
15747 }
15748 {
15749   line = $ 0
15750   nfields = split(line, field, "@")
15751   substed = 0
15752   len = length(field[1])
15753   for (i = 2; i < nfields; i++) {
15754     key = field[i]
15755     keylen = length(key)
15756     if (S_is_set[key]) {
15757       value = S[key]
15758       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
15759       len += length(value) + length(field[++i])
15760       substed = 1
15761     } else
15762       len += 1 + keylen
15763   }
15764
15765   print line
15766 }
15767
15768 _ACAWK
15769 _ACEOF
15770 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15771 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
15772   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
15773 else
15774   cat
15775 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
15776   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
15777 _ACEOF
15778
15779 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
15780 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
15781 # trailing colons and then remove the whole line if VPATH becomes empty
15782 # (actually we leave an empty line to preserve line numbers).
15783 if test "x$srcdir" = x.; then
15784   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
15785 h
15786 s///
15787 s/^/:/
15788 s/[      ]*$/:/
15789 s/:\$(srcdir):/:/g
15790 s/:\${srcdir}:/:/g
15791 s/:@srcdir@:/:/g
15792 s/^:*//
15793 s/:*$//
15794 x
15795 s/\(=[   ]*\).*/\1/
15796 G
15797 s/\n//
15798 s/^[^=]*=[       ]*$//
15799 }'
15800 fi
15801
15802 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15803 fi # test -n "$CONFIG_FILES"
15804
15805 # Set up the scripts for CONFIG_HEADERS section.
15806 # No need to generate them if there are no CONFIG_HEADERS.
15807 # This happens for instance with `./config.status Makefile'.
15808 if test -n "$CONFIG_HEADERS"; then
15809 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
15810 BEGIN {
15811 _ACEOF
15812
15813 # Transform confdefs.h into an awk script `defines.awk', embedded as
15814 # here-document in config.status, that substitutes the proper values into
15815 # config.h.in to produce config.h.
15816
15817 # Create a delimiter string that does not exist in confdefs.h, to ease
15818 # handling of long lines.
15819 ac_delim='%!_!# '
15820 for ac_last_try in false false :; do
15821   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
15822   if test -z "$ac_tt"; then
15823     break
15824   elif $ac_last_try; then
15825     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
15826   else
15827     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15828   fi
15829 done
15830
15831 # For the awk script, D is an array of macro values keyed by name,
15832 # likewise P contains macro parameters if any.  Preserve backslash
15833 # newline sequences.
15834
15835 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
15836 sed -n '
15837 s/.\{148\}/&'"$ac_delim"'/g
15838 t rset
15839 :rset
15840 s/^[     ]*#[    ]*define[       ][      ]*/ /
15841 t def
15842 d
15843 :def
15844 s/\\$//
15845 t bsnl
15846 s/["\\]/\\&/g
15847 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
15848 D["\1"]=" \3"/p
15849 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
15850 d
15851 :bsnl
15852 s/["\\]/\\&/g
15853 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
15854 D["\1"]=" \3\\\\\\n"\\/p
15855 t cont
15856 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
15857 t cont
15858 d
15859 :cont
15860 n
15861 s/.\{148\}/&'"$ac_delim"'/g
15862 t clear
15863 :clear
15864 s/\\$//
15865 t bsnlc
15866 s/["\\]/\\&/g; s/^/"/; s/$/"/p
15867 d
15868 :bsnlc
15869 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
15870 b cont
15871 ' <confdefs.h | sed '
15872 s/'"$ac_delim"'/"\\\
15873 "/g' >>$CONFIG_STATUS || ac_write_fail=1
15874
15875 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15876   for (key in D) D_is_set[key] = 1
15877   FS = "\a"
15878 }
15879 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
15880   line = \$ 0
15881   split(line, arg, " ")
15882   if (arg[1] == "#") {
15883     defundef = arg[2]
15884     mac1 = arg[3]
15885   } else {
15886     defundef = substr(arg[1], 2)
15887     mac1 = arg[2]
15888   }
15889   split(mac1, mac2, "(") #)
15890   macro = mac2[1]
15891   prefix = substr(line, 1, index(line, defundef) - 1)
15892   if (D_is_set[macro]) {
15893     # Preserve the white space surrounding the "#".
15894     print prefix "define", macro P[macro] D[macro]
15895     next
15896   } else {
15897     # Replace #undef with comments.  This is necessary, for example,
15898     # in the case of _POSIX_SOURCE, which is predefined and required
15899     # on some systems where configure will not decide to define it.
15900     if (defundef == "undef") {
15901       print "/*", prefix defundef, macro, "*/"
15902       next
15903     }
15904   }
15905 }
15906 { print }
15907 _ACAWK
15908 _ACEOF
15909 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15910   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
15911 fi # test -n "$CONFIG_HEADERS"
15912
15913
15914 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS  :L $CONFIG_LINKS  :C $CONFIG_COMMANDS"
15915 shift
15916 for ac_tag
15917 do
15918   case $ac_tag in
15919   :[FHLC]) ac_mode=$ac_tag; continue;;
15920   esac
15921   case $ac_mode$ac_tag in
15922   :[FHL]*:*);;
15923   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
15924   :[FH]-) ac_tag=-:-;;
15925   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
15926   esac
15927   ac_save_IFS=$IFS
15928   IFS=:
15929   set x $ac_tag
15930   IFS=$ac_save_IFS
15931   shift
15932   ac_file=$1
15933   shift
15934
15935   case $ac_mode in
15936   :L) ac_source=$1;;
15937   :[FH])
15938     ac_file_inputs=
15939     for ac_f
15940     do
15941       case $ac_f in
15942       -) ac_f="$ac_tmp/stdin";;
15943       *) # Look for the file first in the build tree, then in the source tree
15944          # (if the path is not absolute).  The absolute path cannot be DOS-style,
15945          # because $ac_f cannot contain `:'.
15946          test -f "$ac_f" ||
15947            case $ac_f in
15948            [\\/$]*) false;;
15949            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
15950            esac ||
15951            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
15952       esac
15953       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
15954       as_fn_append ac_file_inputs " '$ac_f'"
15955     done
15956
15957     # Let's still pretend it is `configure' which instantiates (i.e., don't
15958     # use $as_me), people would be surprised to read:
15959     #    /* config.h.  Generated by config.status.  */
15960     configure_input='Generated from '`
15961           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
15962         `' by configure.'
15963     if test x"$ac_file" != x-; then
15964       configure_input="$ac_file.  $configure_input"
15965       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
15966 $as_echo "$as_me: creating $ac_file" >&6;}
15967     fi
15968     # Neutralize special characters interpreted by sed in replacement strings.
15969     case $configure_input in #(
15970     *\&* | *\|* | *\\* )
15971        ac_sed_conf_input=`$as_echo "$configure_input" |
15972        sed 's/[\\\\&|]/\\\\&/g'`;; #(
15973     *) ac_sed_conf_input=$configure_input;;
15974     esac
15975
15976     case $ac_tag in
15977     *:-:* | *:-) cat >"$ac_tmp/stdin" \
15978       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
15979     esac
15980     ;;
15981   esac
15982
15983   ac_dir=`$as_dirname -- "$ac_file" ||
15984 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15985          X"$ac_file" : 'X\(//\)[^/]' \| \
15986          X"$ac_file" : 'X\(//\)$' \| \
15987          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
15988 $as_echo X"$ac_file" |
15989     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15990             s//\1/
15991             q
15992           }
15993           /^X\(\/\/\)[^/].*/{
15994             s//\1/
15995             q
15996           }
15997           /^X\(\/\/\)$/{
15998             s//\1/
15999             q
16000           }
16001           /^X\(\/\).*/{
16002             s//\1/
16003             q
16004           }
16005           s/.*/./; q'`
16006   as_dir="$ac_dir"; as_fn_mkdir_p
16007   ac_builddir=.
16008
16009 case "$ac_dir" in
16010 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16011 *)
16012   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
16013   # A ".." for each directory in $ac_dir_suffix.
16014   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
16015   case $ac_top_builddir_sub in
16016   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16017   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16018   esac ;;
16019 esac
16020 ac_abs_top_builddir=$ac_pwd
16021 ac_abs_builddir=$ac_pwd$ac_dir_suffix
16022 # for backward compatibility:
16023 ac_top_builddir=$ac_top_build_prefix
16024
16025 case $srcdir in
16026   .)  # We are building in place.
16027     ac_srcdir=.
16028     ac_top_srcdir=$ac_top_builddir_sub
16029     ac_abs_top_srcdir=$ac_pwd ;;
16030   [\\/]* | ?:[\\/]* )  # Absolute name.
16031     ac_srcdir=$srcdir$ac_dir_suffix;
16032     ac_top_srcdir=$srcdir
16033     ac_abs_top_srcdir=$srcdir ;;
16034   *) # Relative name.
16035     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16036     ac_top_srcdir=$ac_top_build_prefix$srcdir
16037     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
16038 esac
16039 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
16040
16041
16042   case $ac_mode in
16043   :F)
16044   #
16045   # CONFIG_FILE
16046   #
16047
16048   case $INSTALL in
16049   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
16050   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
16051   esac
16052   ac_MKDIR_P=$MKDIR_P
16053   case $MKDIR_P in
16054   [\\/$]* | ?:[\\/]* ) ;;
16055   */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
16056   esac
16057 _ACEOF
16058
16059 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16060 # If the template does not know about datarootdir, expand it.
16061 # FIXME: This hack should be removed a few years after 2.60.
16062 ac_datarootdir_hack=; ac_datarootdir_seen=
16063 ac_sed_dataroot='
16064 /datarootdir/ {
16065   p
16066   q
16067 }
16068 /@datadir@/p
16069 /@docdir@/p
16070 /@infodir@/p
16071 /@localedir@/p
16072 /@mandir@/p'
16073 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
16074 *datarootdir*) ac_datarootdir_seen=yes;;
16075 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
16076   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16077 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
16078 _ACEOF
16079 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16080   ac_datarootdir_hack='
16081   s&@datadir@&$datadir&g
16082   s&@docdir@&$docdir&g
16083   s&@infodir@&$infodir&g
16084   s&@localedir@&$localedir&g
16085   s&@mandir@&$mandir&g
16086   s&\\\${datarootdir}&$datarootdir&g' ;;
16087 esac
16088 _ACEOF
16089
16090 # Neutralize VPATH when `$srcdir' = `.'.
16091 # Shell code in configure.ac might set extrasub.
16092 # FIXME: do we really want to maintain this feature?
16093 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16094 ac_sed_extra="$ac_vpsub
16095 $extrasub
16096 _ACEOF
16097 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16098 :t
16099 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
16100 s|@configure_input@|$ac_sed_conf_input|;t t
16101 s&@top_builddir@&$ac_top_builddir_sub&;t t
16102 s&@top_build_prefix@&$ac_top_build_prefix&;t t
16103 s&@srcdir@&$ac_srcdir&;t t
16104 s&@abs_srcdir@&$ac_abs_srcdir&;t t
16105 s&@top_srcdir@&$ac_top_srcdir&;t t
16106 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16107 s&@builddir@&$ac_builddir&;t t
16108 s&@abs_builddir@&$ac_abs_builddir&;t t
16109 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16110 s&@INSTALL@&$ac_INSTALL&;t t
16111 s&@MKDIR_P@&$ac_MKDIR_P&;t t
16112 $ac_datarootdir_hack
16113 "
16114 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16115   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16116
16117 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
16118   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16119   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
16120       "$ac_tmp/out"`; test -z "$ac_out"; } &&
16121   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
16122 which seems to be undefined.  Please make sure it is defined" >&5
16123 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
16124 which seems to be undefined.  Please make sure it is defined" >&2;}
16125
16126   rm -f "$ac_tmp/stdin"
16127   case $ac_file in
16128   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16129   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
16130   esac \
16131   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16132  ;;
16133   :H)
16134   #
16135   # CONFIG_HEADER
16136   #
16137   if test x"$ac_file" != x-; then
16138     {
16139       $as_echo "/* $configure_input  */" \
16140       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16141     } >"$ac_tmp/config.h" \
16142       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16143     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
16144       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16145 $as_echo "$as_me: $ac_file is unchanged" >&6;}
16146     else
16147       rm -f "$ac_file"
16148       mv "$ac_tmp/config.h" "$ac_file" \
16149         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16150     fi
16151   else
16152     $as_echo "/* $configure_input  */" \
16153       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
16154       || as_fn_error $? "could not create -" "$LINENO" 5
16155   fi
16156  ;;
16157   :L)
16158   #
16159   # CONFIG_LINK
16160   #
16161
16162   if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
16163     :
16164   else
16165     # Prefer the file from the source tree if names are identical.
16166     if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
16167       ac_source=$srcdir/$ac_source
16168     fi
16169
16170     { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
16171 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
16172
16173     if test ! -r "$ac_source"; then
16174       as_fn_error $? "$ac_source: file not found" "$LINENO" 5
16175     fi
16176     rm -f "$ac_file"
16177
16178     # Try a relative symlink, then a hard link, then a copy.
16179     case $ac_source in
16180     [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
16181         *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
16182     esac
16183     ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
16184       ln "$ac_source" "$ac_file" 2>/dev/null ||
16185       cp -p "$ac_source" "$ac_file" ||
16186       as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
16187   fi
16188  ;;
16189   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
16190 $as_echo "$as_me: executing $ac_file commands" >&6;}
16191  ;;
16192   esac
16193
16194
16195   case $ac_file$ac_mode in
16196     "check_win32_symlinks":C)
16197 # Links sometimes fail undetected on Mingw -
16198 # so here we detect it and warn the user
16199 for FILE in $CONFIG_LINKS
16200  do
16201         # test -e works for symlinks in the MinGW console
16202         test -e `expr "$FILE" : '\([^:]*\)'` || { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** link for $FILE -- please fix by hand" >&5
16203 $as_echo "$as_me: WARNING: *** link for $FILE -- please fix by hand" >&2;}
16204  done
16205  ;;
16206     "src/include/pg_config.h":H)
16207 # Update timestamp for pg_config.h (see Makefile.global)
16208 echo >src/include/stamp-h
16209  ;;
16210     "src/include/pg_config_ext.h":H)
16211 # Update timestamp for pg_config_ext.h (see Makefile.global)
16212 echo >src/include/stamp-ext-h
16213  ;;
16214     "src/interfaces/ecpg/include/ecpg_config.h":H) echo >src/interfaces/ecpg/include/stamp-h ;;
16215
16216   esac
16217 done # for ac_tag
16218
16219
16220 as_fn_exit 0
16221 _ACEOF
16222 ac_clean_files=$ac_clean_files_save
16223
16224 test $ac_write_fail = 0 ||
16225   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
16226
16227
16228 # configure is writing to config.log, and then calls config.status.
16229 # config.status does its own redirection, appending to config.log.
16230 # Unfortunately, on DOS this fails, as config.log is still kept open
16231 # by configure, so config.status won't be able to write to it; its
16232 # output is simply discarded.  So we exec the FD to /dev/null,
16233 # effectively closing config.log, so it can be properly (re)opened and
16234 # appended to by config.status.  When coming back to configure, we
16235 # need to make the FD available again.
16236 if test "$no_create" != yes; then
16237   ac_cs_success=:
16238   ac_config_status_args=
16239   test "$silent" = yes &&
16240     ac_config_status_args="$ac_config_status_args --quiet"
16241   exec 5>/dev/null
16242   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
16243   exec 5>>config.log
16244   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16245   # would make configure fail if this is the last instruction.
16246   $ac_cs_success || as_fn_exit 1
16247 fi
16248 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16249   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16250 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
16251 fi
16252