]> granicus.if.org Git - postgresql/blob - configure
Silence a couple of spurious valgrind warnings in inval.c.
[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 OSSP_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 with_ossp_uuid
709 with_selinux
710 with_openssl
711 krb_srvtab
712 with_python
713 with_perl
714 with_tcl
715 enable_thread_safety
716 INCLUDES
717 autodepend
718 TAS
719 GCC
720 CPP
721 CFLAGS_VECTOR
722 SUN_STUDIO_CC
723 OBJEXT
724 EXEEXT
725 ac_ct_CC
726 CPPFLAGS
727 LDFLAGS
728 CFLAGS
729 CC
730 enable_dtrace
731 DTRACEFLAGS
732 DTRACE
733 enable_coverage
734 GENHTML
735 LCOV
736 GCOV
737 enable_debug
738 enable_rpath
739 default_port
740 WANTED_LANGUAGES
741 enable_nls
742 PORTNAME
743 host_os
744 host_vendor
745 host_cpu
746 host
747 build_os
748 build_vendor
749 build_cpu
750 build
751 PG_MAJORVERSION
752 configure_args
753 target_alias
754 host_alias
755 build_alias
756 LIBS
757 ECHO_T
758 ECHO_N
759 ECHO_C
760 DEFS
761 mandir
762 localedir
763 libdir
764 psdir
765 pdfdir
766 dvidir
767 htmldir
768 infodir
769 docdir
770 oldincludedir
771 includedir
772 localstatedir
773 sharedstatedir
774 sysconfdir
775 datadir
776 datarootdir
777 libexecdir
778 sbindir
779 bindir
780 program_transform_name
781 prefix
782 exec_prefix
783 PACKAGE_URL
784 PACKAGE_BUGREPORT
785 PACKAGE_STRING
786 PACKAGE_VERSION
787 PACKAGE_TARNAME
788 PACKAGE_NAME
789 PATH_SEPARATOR
790 SHELL'
791 ac_subst_files=''
792 ac_user_opts='
793 enable_option_checking
794 with_extra_version
795 with_template
796 with_includes
797 with_libraries
798 with_libs
799 enable_integer_datetimes
800 enable_nls
801 with_pgport
802 enable_rpath
803 enable_spinlocks
804 enable_debug
805 enable_profiling
806 enable_coverage
807 enable_dtrace
808 with_blocksize
809 with_segsize
810 with_wal_blocksize
811 with_wal_segsize
812 with_CC
813 enable_depend
814 enable_cassert
815 enable_thread_safety
816 with_tcl
817 with_tclconfig
818 with_perl
819 with_python
820 with_gssapi
821 with_krb_srvnam
822 with_pam
823 with_ldap
824 with_bonjour
825 with_openssl
826 with_selinux
827 with_readline
828 with_libedit_preferred
829 with_ossp_uuid
830 with_libxml
831 with_libxslt
832 with_system_tzdata
833 with_zlib
834 with_gnu_ld
835 enable_largefile
836 enable_float4_byval
837 enable_float8_byval
838 '
839       ac_precious_vars='build_alias
840 host_alias
841 target_alias
842 CC
843 CFLAGS
844 LDFLAGS
845 LIBS
846 CPPFLAGS
847 CPP
848 LDFLAGS_EX
849 LDFLAGS_SL
850 DOCBOOKSTYLE'
851
852
853 # Initialize some variables set by options.
854 ac_init_help=
855 ac_init_version=false
856 ac_unrecognized_opts=
857 ac_unrecognized_sep=
858 # The variables have the same names as the options, with
859 # dashes changed to underlines.
860 cache_file=/dev/null
861 exec_prefix=NONE
862 no_create=
863 no_recursion=
864 prefix=NONE
865 program_prefix=NONE
866 program_suffix=NONE
867 program_transform_name=s,x,x,
868 silent=
869 site=
870 srcdir=
871 verbose=
872 x_includes=NONE
873 x_libraries=NONE
874
875 # Installation directory options.
876 # These are left unexpanded so users can "make install exec_prefix=/foo"
877 # and all the variables that are supposed to be based on exec_prefix
878 # by default will actually change.
879 # Use braces instead of parens because sh, perl, etc. also accept them.
880 # (The list follows the same order as the GNU Coding Standards.)
881 bindir='${exec_prefix}/bin'
882 sbindir='${exec_prefix}/sbin'
883 libexecdir='${exec_prefix}/libexec'
884 datarootdir='${prefix}/share'
885 datadir='${datarootdir}'
886 sysconfdir='${prefix}/etc'
887 sharedstatedir='${prefix}/com'
888 localstatedir='${prefix}/var'
889 includedir='${prefix}/include'
890 oldincludedir='/usr/include'
891 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
892 infodir='${datarootdir}/info'
893 htmldir='${docdir}'
894 dvidir='${docdir}'
895 pdfdir='${docdir}'
896 psdir='${docdir}'
897 libdir='${exec_prefix}/lib'
898 localedir='${datarootdir}/locale'
899 mandir='${datarootdir}/man'
900
901 ac_prev=
902 ac_dashdash=
903 for ac_option
904 do
905   # If the previous option needs an argument, assign it.
906   if test -n "$ac_prev"; then
907     eval $ac_prev=\$ac_option
908     ac_prev=
909     continue
910   fi
911
912   case $ac_option in
913   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
914   *=)   ac_optarg= ;;
915   *)    ac_optarg=yes ;;
916   esac
917
918   # Accept the important Cygnus configure options, so we can diagnose typos.
919
920   case $ac_dashdash$ac_option in
921   --)
922     ac_dashdash=yes ;;
923
924   -bindir | --bindir | --bindi | --bind | --bin | --bi)
925     ac_prev=bindir ;;
926   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
927     bindir=$ac_optarg ;;
928
929   -build | --build | --buil | --bui | --bu)
930     ac_prev=build_alias ;;
931   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
932     build_alias=$ac_optarg ;;
933
934   -cache-file | --cache-file | --cache-fil | --cache-fi \
935   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
936     ac_prev=cache_file ;;
937   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
938   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
939     cache_file=$ac_optarg ;;
940
941   --config-cache | -C)
942     cache_file=config.cache ;;
943
944   -datadir | --datadir | --datadi | --datad)
945     ac_prev=datadir ;;
946   -datadir=* | --datadir=* | --datadi=* | --datad=*)
947     datadir=$ac_optarg ;;
948
949   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
950   | --dataroo | --dataro | --datar)
951     ac_prev=datarootdir ;;
952   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
953   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
954     datarootdir=$ac_optarg ;;
955
956   -disable-* | --disable-*)
957     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
958     # Reject names that are not valid shell variable names.
959     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
960       as_fn_error $? "invalid feature name: $ac_useropt"
961     ac_useropt_orig=$ac_useropt
962     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
963     case $ac_user_opts in
964       *"
965 "enable_$ac_useropt"
966 "*) ;;
967       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
968          ac_unrecognized_sep=', ';;
969     esac
970     eval enable_$ac_useropt=no ;;
971
972   -docdir | --docdir | --docdi | --doc | --do)
973     ac_prev=docdir ;;
974   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
975     docdir=$ac_optarg ;;
976
977   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
978     ac_prev=dvidir ;;
979   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
980     dvidir=$ac_optarg ;;
981
982   -enable-* | --enable-*)
983     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
984     # Reject names that are not valid shell variable names.
985     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
986       as_fn_error $? "invalid feature name: $ac_useropt"
987     ac_useropt_orig=$ac_useropt
988     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
989     case $ac_user_opts in
990       *"
991 "enable_$ac_useropt"
992 "*) ;;
993       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
994          ac_unrecognized_sep=', ';;
995     esac
996     eval enable_$ac_useropt=\$ac_optarg ;;
997
998   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
999   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1000   | --exec | --exe | --ex)
1001     ac_prev=exec_prefix ;;
1002   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1003   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1004   | --exec=* | --exe=* | --ex=*)
1005     exec_prefix=$ac_optarg ;;
1006
1007   -gas | --gas | --ga | --g)
1008     # Obsolete; use --with-gas.
1009     with_gas=yes ;;
1010
1011   -help | --help | --hel | --he | -h)
1012     ac_init_help=long ;;
1013   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1014     ac_init_help=recursive ;;
1015   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1016     ac_init_help=short ;;
1017
1018   -host | --host | --hos | --ho)
1019     ac_prev=host_alias ;;
1020   -host=* | --host=* | --hos=* | --ho=*)
1021     host_alias=$ac_optarg ;;
1022
1023   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1024     ac_prev=htmldir ;;
1025   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1026   | --ht=*)
1027     htmldir=$ac_optarg ;;
1028
1029   -includedir | --includedir | --includedi | --included | --include \
1030   | --includ | --inclu | --incl | --inc)
1031     ac_prev=includedir ;;
1032   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1033   | --includ=* | --inclu=* | --incl=* | --inc=*)
1034     includedir=$ac_optarg ;;
1035
1036   -infodir | --infodir | --infodi | --infod | --info | --inf)
1037     ac_prev=infodir ;;
1038   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1039     infodir=$ac_optarg ;;
1040
1041   -libdir | --libdir | --libdi | --libd)
1042     ac_prev=libdir ;;
1043   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1044     libdir=$ac_optarg ;;
1045
1046   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1047   | --libexe | --libex | --libe)
1048     ac_prev=libexecdir ;;
1049   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1050   | --libexe=* | --libex=* | --libe=*)
1051     libexecdir=$ac_optarg ;;
1052
1053   -localedir | --localedir | --localedi | --localed | --locale)
1054     ac_prev=localedir ;;
1055   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1056     localedir=$ac_optarg ;;
1057
1058   -localstatedir | --localstatedir | --localstatedi | --localstated \
1059   | --localstate | --localstat | --localsta | --localst | --locals)
1060     ac_prev=localstatedir ;;
1061   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1062   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1063     localstatedir=$ac_optarg ;;
1064
1065   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1066     ac_prev=mandir ;;
1067   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1068     mandir=$ac_optarg ;;
1069
1070   -nfp | --nfp | --nf)
1071     # Obsolete; use --without-fp.
1072     with_fp=no ;;
1073
1074   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1075   | --no-cr | --no-c | -n)
1076     no_create=yes ;;
1077
1078   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1079   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1080     no_recursion=yes ;;
1081
1082   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1083   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1084   | --oldin | --oldi | --old | --ol | --o)
1085     ac_prev=oldincludedir ;;
1086   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1087   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1088   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1089     oldincludedir=$ac_optarg ;;
1090
1091   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1092     ac_prev=prefix ;;
1093   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1094     prefix=$ac_optarg ;;
1095
1096   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1097   | --program-pre | --program-pr | --program-p)
1098     ac_prev=program_prefix ;;
1099   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1100   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1101     program_prefix=$ac_optarg ;;
1102
1103   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1104   | --program-suf | --program-su | --program-s)
1105     ac_prev=program_suffix ;;
1106   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1107   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1108     program_suffix=$ac_optarg ;;
1109
1110   -program-transform-name | --program-transform-name \
1111   | --program-transform-nam | --program-transform-na \
1112   | --program-transform-n | --program-transform- \
1113   | --program-transform | --program-transfor \
1114   | --program-transfo | --program-transf \
1115   | --program-trans | --program-tran \
1116   | --progr-tra | --program-tr | --program-t)
1117     ac_prev=program_transform_name ;;
1118   -program-transform-name=* | --program-transform-name=* \
1119   | --program-transform-nam=* | --program-transform-na=* \
1120   | --program-transform-n=* | --program-transform-=* \
1121   | --program-transform=* | --program-transfor=* \
1122   | --program-transfo=* | --program-transf=* \
1123   | --program-trans=* | --program-tran=* \
1124   | --progr-tra=* | --program-tr=* | --program-t=*)
1125     program_transform_name=$ac_optarg ;;
1126
1127   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1128     ac_prev=pdfdir ;;
1129   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1130     pdfdir=$ac_optarg ;;
1131
1132   -psdir | --psdir | --psdi | --psd | --ps)
1133     ac_prev=psdir ;;
1134   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1135     psdir=$ac_optarg ;;
1136
1137   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1138   | -silent | --silent | --silen | --sile | --sil)
1139     silent=yes ;;
1140
1141   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1142     ac_prev=sbindir ;;
1143   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1144   | --sbi=* | --sb=*)
1145     sbindir=$ac_optarg ;;
1146
1147   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1148   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1149   | --sharedst | --shareds | --shared | --share | --shar \
1150   | --sha | --sh)
1151     ac_prev=sharedstatedir ;;
1152   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1153   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1154   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1155   | --sha=* | --sh=*)
1156     sharedstatedir=$ac_optarg ;;
1157
1158   -site | --site | --sit)
1159     ac_prev=site ;;
1160   -site=* | --site=* | --sit=*)
1161     site=$ac_optarg ;;
1162
1163   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1164     ac_prev=srcdir ;;
1165   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1166     srcdir=$ac_optarg ;;
1167
1168   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1169   | --syscon | --sysco | --sysc | --sys | --sy)
1170     ac_prev=sysconfdir ;;
1171   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1172   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1173     sysconfdir=$ac_optarg ;;
1174
1175   -target | --target | --targe | --targ | --tar | --ta | --t)
1176     ac_prev=target_alias ;;
1177   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1178     target_alias=$ac_optarg ;;
1179
1180   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1181     verbose=yes ;;
1182
1183   -version | --version | --versio | --versi | --vers | -V)
1184     ac_init_version=: ;;
1185
1186   -with-* | --with-*)
1187     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1188     # Reject names that are not valid shell variable names.
1189     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1190       as_fn_error $? "invalid package name: $ac_useropt"
1191     ac_useropt_orig=$ac_useropt
1192     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1193     case $ac_user_opts in
1194       *"
1195 "with_$ac_useropt"
1196 "*) ;;
1197       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1198          ac_unrecognized_sep=', ';;
1199     esac
1200     eval with_$ac_useropt=\$ac_optarg ;;
1201
1202   -without-* | --without-*)
1203     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1204     # Reject names that are not valid shell variable names.
1205     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1206       as_fn_error $? "invalid package name: $ac_useropt"
1207     ac_useropt_orig=$ac_useropt
1208     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1209     case $ac_user_opts in
1210       *"
1211 "with_$ac_useropt"
1212 "*) ;;
1213       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1214          ac_unrecognized_sep=', ';;
1215     esac
1216     eval with_$ac_useropt=no ;;
1217
1218   --x)
1219     # Obsolete; use --with-x.
1220     with_x=yes ;;
1221
1222   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1223   | --x-incl | --x-inc | --x-in | --x-i)
1224     ac_prev=x_includes ;;
1225   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1226   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1227     x_includes=$ac_optarg ;;
1228
1229   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1230   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1231     ac_prev=x_libraries ;;
1232   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1233   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1234     x_libraries=$ac_optarg ;;
1235
1236   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1237 Try \`$0 --help' for more information"
1238     ;;
1239
1240   *=*)
1241     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1242     # Reject names that are not valid shell variable names.
1243     case $ac_envvar in #(
1244       '' | [0-9]* | *[!_$as_cr_alnum]* )
1245       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1246     esac
1247     eval $ac_envvar=\$ac_optarg
1248     export $ac_envvar ;;
1249
1250   *)
1251     # FIXME: should be removed in autoconf 3.0.
1252     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1253     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1254       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1255     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1256     ;;
1257
1258   esac
1259 done
1260
1261 if test -n "$ac_prev"; then
1262   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1263   as_fn_error $? "missing argument to $ac_option"
1264 fi
1265
1266 if test -n "$ac_unrecognized_opts"; then
1267   case $enable_option_checking in
1268     no) ;;
1269     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1270     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1271   esac
1272 fi
1273
1274 # Check all directory arguments for consistency.
1275 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1276                 datadir sysconfdir sharedstatedir localstatedir includedir \
1277                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1278                 libdir localedir mandir
1279 do
1280   eval ac_val=\$$ac_var
1281   # Remove trailing slashes.
1282   case $ac_val in
1283     */ )
1284       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1285       eval $ac_var=\$ac_val;;
1286   esac
1287   # Be sure to have absolute directory names.
1288   case $ac_val in
1289     [\\/$]* | ?:[\\/]* )  continue;;
1290     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1291   esac
1292   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1293 done
1294
1295 # There might be people who depend on the old broken behavior: `$host'
1296 # used to hold the argument of --host etc.
1297 # FIXME: To remove some day.
1298 build=$build_alias
1299 host=$host_alias
1300 target=$target_alias
1301
1302 # FIXME: To remove some day.
1303 if test "x$host_alias" != x; then
1304   if test "x$build_alias" = x; then
1305     cross_compiling=maybe
1306   elif test "x$build_alias" != "x$host_alias"; then
1307     cross_compiling=yes
1308   fi
1309 fi
1310
1311 ac_tool_prefix=
1312 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1313
1314 test "$silent" = yes && exec 6>/dev/null
1315
1316
1317 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1318 ac_ls_di=`ls -di .` &&
1319 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1320   as_fn_error $? "working directory cannot be determined"
1321 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1322   as_fn_error $? "pwd does not report name of working directory"
1323
1324
1325 # Find the source files, if location was not specified.
1326 if test -z "$srcdir"; then
1327   ac_srcdir_defaulted=yes
1328   # Try the directory containing this script, then the parent directory.
1329   ac_confdir=`$as_dirname -- "$as_myself" ||
1330 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1331          X"$as_myself" : 'X\(//\)[^/]' \| \
1332          X"$as_myself" : 'X\(//\)$' \| \
1333          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1334 $as_echo X"$as_myself" |
1335     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1336             s//\1/
1337             q
1338           }
1339           /^X\(\/\/\)[^/].*/{
1340             s//\1/
1341             q
1342           }
1343           /^X\(\/\/\)$/{
1344             s//\1/
1345             q
1346           }
1347           /^X\(\/\).*/{
1348             s//\1/
1349             q
1350           }
1351           s/.*/./; q'`
1352   srcdir=$ac_confdir
1353   if test ! -r "$srcdir/$ac_unique_file"; then
1354     srcdir=..
1355   fi
1356 else
1357   ac_srcdir_defaulted=no
1358 fi
1359 if test ! -r "$srcdir/$ac_unique_file"; then
1360   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1361   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1362 fi
1363 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1364 ac_abs_confdir=`(
1365         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1366         pwd)`
1367 # When building in place, set srcdir=.
1368 if test "$ac_abs_confdir" = "$ac_pwd"; then
1369   srcdir=.
1370 fi
1371 # Remove unnecessary trailing slashes from srcdir.
1372 # Double slashes in file names in object file debugging info
1373 # mess up M-x gdb in Emacs.
1374 case $srcdir in
1375 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1376 esac
1377 for ac_var in $ac_precious_vars; do
1378   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1379   eval ac_env_${ac_var}_value=\$${ac_var}
1380   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1381   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1382 done
1383
1384 #
1385 # Report the --help message.
1386 #
1387 if test "$ac_init_help" = "long"; then
1388   # Omit some internal or obsolete options to make the list less imposing.
1389   # This message is too long to be a string in the A/UX 3.1 sh.
1390   cat <<_ACEOF
1391 \`configure' configures PostgreSQL 9.4beta1 to adapt to many kinds of systems.
1392
1393 Usage: $0 [OPTION]... [VAR=VALUE]...
1394
1395 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1396 VAR=VALUE.  See below for descriptions of some of the useful variables.
1397
1398 Defaults for the options are specified in brackets.
1399
1400 Configuration:
1401   -h, --help              display this help and exit
1402       --help=short        display options specific to this package
1403       --help=recursive    display the short help of all the included packages
1404   -V, --version           display version information and exit
1405   -q, --quiet, --silent   do not print \`checking ...' messages
1406       --cache-file=FILE   cache test results in FILE [disabled]
1407   -C, --config-cache      alias for \`--cache-file=config.cache'
1408   -n, --no-create         do not create output files
1409       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1410
1411 Installation directories:
1412   --prefix=PREFIX         install architecture-independent files in PREFIX
1413                           [$ac_default_prefix]
1414   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1415                           [PREFIX]
1416
1417 By default, \`make install' will install all the files in
1418 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1419 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1420 for instance \`--prefix=\$HOME'.
1421
1422 For better control, use the options below.
1423
1424 Fine tuning of the installation directories:
1425   --bindir=DIR            user executables [EPREFIX/bin]
1426   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1427   --libexecdir=DIR        program executables [EPREFIX/libexec]
1428   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1429   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1430   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1431   --libdir=DIR            object code libraries [EPREFIX/lib]
1432   --includedir=DIR        C header files [PREFIX/include]
1433   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1434   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1435   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1436   --infodir=DIR           info documentation [DATAROOTDIR/info]
1437   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1438   --mandir=DIR            man documentation [DATAROOTDIR/man]
1439   --docdir=DIR            documentation root [DATAROOTDIR/doc/postgresql]
1440   --htmldir=DIR           html documentation [DOCDIR]
1441   --dvidir=DIR            dvi documentation [DOCDIR]
1442   --pdfdir=DIR            pdf documentation [DOCDIR]
1443   --psdir=DIR             ps documentation [DOCDIR]
1444 _ACEOF
1445
1446   cat <<\_ACEOF
1447
1448 System types:
1449   --build=BUILD     configure for building on BUILD [guessed]
1450   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1451 _ACEOF
1452 fi
1453
1454 if test -n "$ac_init_help"; then
1455   case $ac_init_help in
1456      short | recursive ) echo "Configuration of PostgreSQL 9.4beta1:";;
1457    esac
1458   cat <<\_ACEOF
1459
1460 Optional Features:
1461   --disable-option-checking  ignore unrecognized --enable/--with options
1462   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1463   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1464   --disable-integer-datetimes
1465                           disable 64-bit integer date/time support
1466   --enable-nls[=LANGUAGES]
1467                           enable Native Language Support
1468   --disable-rpath         do not embed shared library search path in
1469                           executables
1470   --disable-spinlocks     do not use spinlocks
1471   --enable-debug          build with debugging symbols (-g)
1472   --enable-profiling      build with profiling enabled
1473   --enable-coverage       build with coverage testing instrumentation
1474   --enable-dtrace         build with DTrace support
1475   --enable-depend         turn on automatic dependency tracking
1476   --enable-cassert        enable assertion checks (for debugging)
1477   --disable-thread-safety disable thread-safety in client libraries
1478   --disable-largefile     omit support for large files
1479   --disable-float4-byval  disable float4 passed by value
1480   --disable-float8-byval  disable float8 passed by value
1481
1482 Optional Packages:
1483   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1484   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1485   --with-extra-version=STRING
1486                           append STRING to version
1487   --with-template=NAME    override operating system template
1488   --with-includes=DIRS    look for additional header files in DIRS
1489   --with-libraries=DIRS   look for additional libraries in DIRS
1490   --with-libs=DIRS        alternative spelling of --with-libraries
1491   --with-pgport=PORTNUM   set default port number [5432]
1492   --with-blocksize=BLOCKSIZE
1493                           set table block size in kB [8]
1494   --with-segsize=SEGSIZE  set table segment size in GB [1]
1495   --with-wal-blocksize=BLOCKSIZE
1496                           set WAL block size in kB [8]
1497   --with-wal-segsize=SEGSIZE
1498                           set WAL segment size in MB [16]
1499   --with-CC=CMD           set compiler (deprecated)
1500   --with-tcl              build Tcl modules (PL/Tcl)
1501   --with-tclconfig=DIR    tclConfig.sh is in DIR
1502   --with-perl             build Perl modules (PL/Perl)
1503   --with-python           build Python modules (PL/Python)
1504   --with-gssapi           build with GSSAPI support
1505   --with-krb-srvnam=NAME  default service principal name in Kerberos (GSSAPI)
1506                           [postgres]
1507   --with-pam              build with PAM support
1508   --with-ldap             build with LDAP support
1509   --with-bonjour          build with Bonjour support
1510   --with-openssl          build with OpenSSL support
1511   --with-selinux          build with SELinux support
1512   --without-readline      do not use GNU Readline nor BSD Libedit for editing
1513   --with-libedit-preferred
1514                           prefer BSD Libedit over GNU Readline
1515   --with-ossp-uuid        build contrib/uuid-ossp, requires OSSP UUID library
1516   --with-libxml           build with XML support
1517   --with-libxslt          use XSLT support when building contrib/xml2
1518   --with-system-tzdata=DIR
1519                           use system time zone data in DIR
1520   --without-zlib          do not use Zlib
1521   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1522
1523 Some influential environment variables:
1524   CC          C compiler command
1525   CFLAGS      C compiler flags
1526   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1527               nonstandard directory <lib dir>
1528   LIBS        libraries to pass to the linker, e.g. -l<library>
1529   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1530               you have headers in a nonstandard directory <include dir>
1531   CPP         C preprocessor
1532   LDFLAGS_EX  extra linker flags for linking executables only
1533   LDFLAGS_SL  extra linker flags for linking shared libraries only
1534   DOCBOOKSTYLE
1535               location of DocBook stylesheets
1536
1537 Use these variables to override the choices made by `configure' or to help
1538 it to find libraries and programs with nonstandard names/locations.
1539
1540 Report bugs to <pgsql-bugs@postgresql.org>.
1541 _ACEOF
1542 ac_status=$?
1543 fi
1544
1545 if test "$ac_init_help" = "recursive"; then
1546   # If there are subdirs, report their specific --help.
1547   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1548     test -d "$ac_dir" ||
1549       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1550       continue
1551     ac_builddir=.
1552
1553 case "$ac_dir" in
1554 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1555 *)
1556   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1557   # A ".." for each directory in $ac_dir_suffix.
1558   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1559   case $ac_top_builddir_sub in
1560   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1561   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1562   esac ;;
1563 esac
1564 ac_abs_top_builddir=$ac_pwd
1565 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1566 # for backward compatibility:
1567 ac_top_builddir=$ac_top_build_prefix
1568
1569 case $srcdir in
1570   .)  # We are building in place.
1571     ac_srcdir=.
1572     ac_top_srcdir=$ac_top_builddir_sub
1573     ac_abs_top_srcdir=$ac_pwd ;;
1574   [\\/]* | ?:[\\/]* )  # Absolute name.
1575     ac_srcdir=$srcdir$ac_dir_suffix;
1576     ac_top_srcdir=$srcdir
1577     ac_abs_top_srcdir=$srcdir ;;
1578   *) # Relative name.
1579     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1580     ac_top_srcdir=$ac_top_build_prefix$srcdir
1581     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1582 esac
1583 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1584
1585     cd "$ac_dir" || { ac_status=$?; continue; }
1586     # Check for guested configure.
1587     if test -f "$ac_srcdir/configure.gnu"; then
1588       echo &&
1589       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1590     elif test -f "$ac_srcdir/configure"; then
1591       echo &&
1592       $SHELL "$ac_srcdir/configure" --help=recursive
1593     else
1594       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1595     fi || ac_status=$?
1596     cd "$ac_pwd" || { ac_status=$?; break; }
1597   done
1598 fi
1599
1600 test -n "$ac_init_help" && exit $ac_status
1601 if $ac_init_version; then
1602   cat <<\_ACEOF
1603 PostgreSQL configure 9.4beta1
1604 generated by GNU Autoconf 2.69
1605
1606 Copyright (C) 2012 Free Software Foundation, Inc.
1607 This configure script is free software; the Free Software Foundation
1608 gives unlimited permission to copy, distribute and modify it.
1609
1610 Copyright (c) 1996-2014, PostgreSQL Global Development Group
1611 _ACEOF
1612   exit
1613 fi
1614
1615 ## ------------------------ ##
1616 ## Autoconf initialization. ##
1617 ## ------------------------ ##
1618
1619 # ac_fn_c_try_compile LINENO
1620 # --------------------------
1621 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1622 ac_fn_c_try_compile ()
1623 {
1624   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1625   rm -f conftest.$ac_objext
1626   if { { ac_try="$ac_compile"
1627 case "(($ac_try" in
1628   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1629   *) ac_try_echo=$ac_try;;
1630 esac
1631 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1632 $as_echo "$ac_try_echo"; } >&5
1633   (eval "$ac_compile") 2>conftest.err
1634   ac_status=$?
1635   if test -s conftest.err; then
1636     grep -v '^ *+' conftest.err >conftest.er1
1637     cat conftest.er1 >&5
1638     mv -f conftest.er1 conftest.err
1639   fi
1640   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1641   test $ac_status = 0; } && {
1642          test -z "$ac_c_werror_flag" ||
1643          test ! -s conftest.err
1644        } && test -s conftest.$ac_objext; then :
1645   ac_retval=0
1646 else
1647   $as_echo "$as_me: failed program was:" >&5
1648 sed 's/^/| /' conftest.$ac_ext >&5
1649
1650         ac_retval=1
1651 fi
1652   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1653   as_fn_set_status $ac_retval
1654
1655 } # ac_fn_c_try_compile
1656
1657 # ac_fn_c_try_link LINENO
1658 # -----------------------
1659 # Try to link conftest.$ac_ext, and return whether this succeeded.
1660 ac_fn_c_try_link ()
1661 {
1662   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1663   rm -f conftest.$ac_objext conftest$ac_exeext
1664   if { { ac_try="$ac_link"
1665 case "(($ac_try" in
1666   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1667   *) ac_try_echo=$ac_try;;
1668 esac
1669 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1670 $as_echo "$ac_try_echo"; } >&5
1671   (eval "$ac_link") 2>conftest.err
1672   ac_status=$?
1673   if test -s conftest.err; then
1674     grep -v '^ *+' conftest.err >conftest.er1
1675     cat conftest.er1 >&5
1676     mv -f conftest.er1 conftest.err
1677   fi
1678   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1679   test $ac_status = 0; } && {
1680          test -z "$ac_c_werror_flag" ||
1681          test ! -s conftest.err
1682        } && test -s conftest$ac_exeext && {
1683          test "$cross_compiling" = yes ||
1684          test -x conftest$ac_exeext
1685        }; then :
1686   ac_retval=0
1687 else
1688   $as_echo "$as_me: failed program was:" >&5
1689 sed 's/^/| /' conftest.$ac_ext >&5
1690
1691         ac_retval=1
1692 fi
1693   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1694   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1695   # interfere with the next link command; also delete a directory that is
1696   # left behind by Apple's compiler.  We do this before executing the actions.
1697   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1698   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1699   as_fn_set_status $ac_retval
1700
1701 } # ac_fn_c_try_link
1702
1703 # ac_fn_c_try_cpp LINENO
1704 # ----------------------
1705 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1706 ac_fn_c_try_cpp ()
1707 {
1708   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1709   if { { ac_try="$ac_cpp conftest.$ac_ext"
1710 case "(($ac_try" in
1711   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1712   *) ac_try_echo=$ac_try;;
1713 esac
1714 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1715 $as_echo "$ac_try_echo"; } >&5
1716   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1717   ac_status=$?
1718   if test -s conftest.err; then
1719     grep -v '^ *+' conftest.err >conftest.er1
1720     cat conftest.er1 >&5
1721     mv -f conftest.er1 conftest.err
1722   fi
1723   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1724   test $ac_status = 0; } > conftest.i && {
1725          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1726          test ! -s conftest.err
1727        }; then :
1728   ac_retval=0
1729 else
1730   $as_echo "$as_me: failed program was:" >&5
1731 sed 's/^/| /' conftest.$ac_ext >&5
1732
1733     ac_retval=1
1734 fi
1735   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1736   as_fn_set_status $ac_retval
1737
1738 } # ac_fn_c_try_cpp
1739
1740 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1741 # -------------------------------------------------------
1742 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1743 # the include files in INCLUDES and setting the cache variable VAR
1744 # accordingly.
1745 ac_fn_c_check_header_mongrel ()
1746 {
1747   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1748   if eval \${$3+:} false; then :
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 fi
1754 eval ac_res=\$$3
1755                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1756 $as_echo "$ac_res" >&6; }
1757 else
1758   # Is the header compilable?
1759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1760 $as_echo_n "checking $2 usability... " >&6; }
1761 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1762 /* end confdefs.h.  */
1763 $4
1764 #include <$2>
1765 _ACEOF
1766 if ac_fn_c_try_compile "$LINENO"; then :
1767   ac_header_compiler=yes
1768 else
1769   ac_header_compiler=no
1770 fi
1771 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1773 $as_echo "$ac_header_compiler" >&6; }
1774
1775 # Is the header present?
1776 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1777 $as_echo_n "checking $2 presence... " >&6; }
1778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1779 /* end confdefs.h.  */
1780 #include <$2>
1781 _ACEOF
1782 if ac_fn_c_try_cpp "$LINENO"; then :
1783   ac_header_preproc=yes
1784 else
1785   ac_header_preproc=no
1786 fi
1787 rm -f conftest.err conftest.i conftest.$ac_ext
1788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1789 $as_echo "$ac_header_preproc" >&6; }
1790
1791 # So?  What about this header?
1792 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1793   yes:no: )
1794     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1795 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1796     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1797 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1798     ;;
1799   no:yes:* )
1800     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1801 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1802     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1803 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1804     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1805 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1806     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1807 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1808     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1809 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1810 ( $as_echo "## ---------------------------------------- ##
1811 ## Report this to pgsql-bugs@postgresql.org ##
1812 ## ---------------------------------------- ##"
1813      ) | sed "s/^/$as_me: WARNING:     /" >&2
1814     ;;
1815 esac
1816   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1817 $as_echo_n "checking for $2... " >&6; }
1818 if eval \${$3+:} false; then :
1819   $as_echo_n "(cached) " >&6
1820 else
1821   eval "$3=\$ac_header_compiler"
1822 fi
1823 eval ac_res=\$$3
1824                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1825 $as_echo "$ac_res" >&6; }
1826 fi
1827   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1828
1829 } # ac_fn_c_check_header_mongrel
1830
1831 # ac_fn_c_try_run LINENO
1832 # ----------------------
1833 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1834 # that executables *can* be run.
1835 ac_fn_c_try_run ()
1836 {
1837   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1838   if { { ac_try="$ac_link"
1839 case "(($ac_try" in
1840   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1841   *) ac_try_echo=$ac_try;;
1842 esac
1843 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1844 $as_echo "$ac_try_echo"; } >&5
1845   (eval "$ac_link") 2>&5
1846   ac_status=$?
1847   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1848   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1849   { { case "(($ac_try" in
1850   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1851   *) ac_try_echo=$ac_try;;
1852 esac
1853 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1854 $as_echo "$ac_try_echo"; } >&5
1855   (eval "$ac_try") 2>&5
1856   ac_status=$?
1857   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1858   test $ac_status = 0; }; }; then :
1859   ac_retval=0
1860 else
1861   $as_echo "$as_me: program exited with status $ac_status" >&5
1862        $as_echo "$as_me: failed program was:" >&5
1863 sed 's/^/| /' conftest.$ac_ext >&5
1864
1865        ac_retval=$ac_status
1866 fi
1867   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1868   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1869   as_fn_set_status $ac_retval
1870
1871 } # ac_fn_c_try_run
1872
1873 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1874 # -------------------------------------------------------
1875 # Tests whether HEADER exists and can be compiled using the include files in
1876 # INCLUDES, setting the cache variable VAR accordingly.
1877 ac_fn_c_check_header_compile ()
1878 {
1879   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1880   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1881 $as_echo_n "checking for $2... " >&6; }
1882 if eval \${$3+:} false; then :
1883   $as_echo_n "(cached) " >&6
1884 else
1885   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1886 /* end confdefs.h.  */
1887 $4
1888 #include <$2>
1889 _ACEOF
1890 if ac_fn_c_try_compile "$LINENO"; then :
1891   eval "$3=yes"
1892 else
1893   eval "$3=no"
1894 fi
1895 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1896 fi
1897 eval ac_res=\$$3
1898                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1899 $as_echo "$ac_res" >&6; }
1900   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1901
1902 } # ac_fn_c_check_header_compile
1903
1904 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
1905 # ----------------------------------------------------
1906 # Tries to find if the field MEMBER exists in type AGGR, after including
1907 # INCLUDES, setting cache variable VAR accordingly.
1908 ac_fn_c_check_member ()
1909 {
1910   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1911   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
1912 $as_echo_n "checking for $2.$3... " >&6; }
1913 if eval \${$4+:} false; then :
1914   $as_echo_n "(cached) " >&6
1915 else
1916   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1917 /* end confdefs.h.  */
1918 $5
1919 int
1920 main ()
1921 {
1922 static $2 ac_aggr;
1923 if (ac_aggr.$3)
1924 return 0;
1925   ;
1926   return 0;
1927 }
1928 _ACEOF
1929 if ac_fn_c_try_compile "$LINENO"; then :
1930   eval "$4=yes"
1931 else
1932   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1933 /* end confdefs.h.  */
1934 $5
1935 int
1936 main ()
1937 {
1938 static $2 ac_aggr;
1939 if (sizeof ac_aggr.$3)
1940 return 0;
1941   ;
1942   return 0;
1943 }
1944 _ACEOF
1945 if ac_fn_c_try_compile "$LINENO"; then :
1946   eval "$4=yes"
1947 else
1948   eval "$4=no"
1949 fi
1950 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1951 fi
1952 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1953 fi
1954 eval ac_res=\$$4
1955                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1956 $as_echo "$ac_res" >&6; }
1957   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1958
1959 } # ac_fn_c_check_member
1960
1961 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1962 # -------------------------------------------
1963 # Tests whether TYPE exists after having included INCLUDES, setting cache
1964 # variable VAR accordingly.
1965 ac_fn_c_check_type ()
1966 {
1967   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1968   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1969 $as_echo_n "checking for $2... " >&6; }
1970 if eval \${$3+:} false; then :
1971   $as_echo_n "(cached) " >&6
1972 else
1973   eval "$3=no"
1974   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1975 /* end confdefs.h.  */
1976 $4
1977 int
1978 main ()
1979 {
1980 if (sizeof ($2))
1981          return 0;
1982   ;
1983   return 0;
1984 }
1985 _ACEOF
1986 if ac_fn_c_try_compile "$LINENO"; then :
1987   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1988 /* end confdefs.h.  */
1989 $4
1990 int
1991 main ()
1992 {
1993 if (sizeof (($2)))
1994             return 0;
1995   ;
1996   return 0;
1997 }
1998 _ACEOF
1999 if ac_fn_c_try_compile "$LINENO"; then :
2000
2001 else
2002   eval "$3=yes"
2003 fi
2004 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2005 fi
2006 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2007 fi
2008 eval ac_res=\$$3
2009                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2010 $as_echo "$ac_res" >&6; }
2011   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2012
2013 } # ac_fn_c_check_type
2014
2015 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2016 # --------------------------------------------
2017 # Tries to find the compile-time value of EXPR in a program that includes
2018 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2019 # computed
2020 ac_fn_c_compute_int ()
2021 {
2022   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2023   if test "$cross_compiling" = yes; then
2024     # Depending upon the size, compute the lo and hi bounds.
2025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2026 /* end confdefs.h.  */
2027 $4
2028 int
2029 main ()
2030 {
2031 static int test_array [1 - 2 * !(($2) >= 0)];
2032 test_array [0] = 0;
2033 return test_array [0];
2034
2035   ;
2036   return 0;
2037 }
2038 _ACEOF
2039 if ac_fn_c_try_compile "$LINENO"; then :
2040   ac_lo=0 ac_mid=0
2041   while :; do
2042     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2043 /* end confdefs.h.  */
2044 $4
2045 int
2046 main ()
2047 {
2048 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2049 test_array [0] = 0;
2050 return test_array [0];
2051
2052   ;
2053   return 0;
2054 }
2055 _ACEOF
2056 if ac_fn_c_try_compile "$LINENO"; then :
2057   ac_hi=$ac_mid; break
2058 else
2059   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2060                         if test $ac_lo -le $ac_mid; then
2061                           ac_lo= ac_hi=
2062                           break
2063                         fi
2064                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2065 fi
2066 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2067   done
2068 else
2069   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2070 /* end confdefs.h.  */
2071 $4
2072 int
2073 main ()
2074 {
2075 static int test_array [1 - 2 * !(($2) < 0)];
2076 test_array [0] = 0;
2077 return test_array [0];
2078
2079   ;
2080   return 0;
2081 }
2082 _ACEOF
2083 if ac_fn_c_try_compile "$LINENO"; then :
2084   ac_hi=-1 ac_mid=-1
2085   while :; do
2086     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2087 /* end confdefs.h.  */
2088 $4
2089 int
2090 main ()
2091 {
2092 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2093 test_array [0] = 0;
2094 return test_array [0];
2095
2096   ;
2097   return 0;
2098 }
2099 _ACEOF
2100 if ac_fn_c_try_compile "$LINENO"; then :
2101   ac_lo=$ac_mid; break
2102 else
2103   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2104                         if test $ac_mid -le $ac_hi; then
2105                           ac_lo= ac_hi=
2106                           break
2107                         fi
2108                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2109 fi
2110 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2111   done
2112 else
2113   ac_lo= ac_hi=
2114 fi
2115 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2116 fi
2117 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2118 # Binary search between lo and hi bounds.
2119 while test "x$ac_lo" != "x$ac_hi"; do
2120   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2121   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2122 /* end confdefs.h.  */
2123 $4
2124 int
2125 main ()
2126 {
2127 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2128 test_array [0] = 0;
2129 return test_array [0];
2130
2131   ;
2132   return 0;
2133 }
2134 _ACEOF
2135 if ac_fn_c_try_compile "$LINENO"; then :
2136   ac_hi=$ac_mid
2137 else
2138   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2139 fi
2140 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2141 done
2142 case $ac_lo in #((
2143 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2144 '') ac_retval=1 ;;
2145 esac
2146   else
2147     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2148 /* end confdefs.h.  */
2149 $4
2150 static long int longval () { return $2; }
2151 static unsigned long int ulongval () { return $2; }
2152 #include <stdio.h>
2153 #include <stdlib.h>
2154 int
2155 main ()
2156 {
2157
2158   FILE *f = fopen ("conftest.val", "w");
2159   if (! f)
2160     return 1;
2161   if (($2) < 0)
2162     {
2163       long int i = longval ();
2164       if (i != ($2))
2165         return 1;
2166       fprintf (f, "%ld", i);
2167     }
2168   else
2169     {
2170       unsigned long int i = ulongval ();
2171       if (i != ($2))
2172         return 1;
2173       fprintf (f, "%lu", i);
2174     }
2175   /* Do not output a trailing newline, as this causes \r\n confusion
2176      on some platforms.  */
2177   return ferror (f) || fclose (f) != 0;
2178
2179   ;
2180   return 0;
2181 }
2182 _ACEOF
2183 if ac_fn_c_try_run "$LINENO"; then :
2184   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2185 else
2186   ac_retval=1
2187 fi
2188 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2189   conftest.$ac_objext conftest.beam conftest.$ac_ext
2190 rm -f conftest.val
2191
2192   fi
2193   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2194   as_fn_set_status $ac_retval
2195
2196 } # ac_fn_c_compute_int
2197
2198 # ac_fn_c_check_func LINENO FUNC VAR
2199 # ----------------------------------
2200 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2201 ac_fn_c_check_func ()
2202 {
2203   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2204   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2205 $as_echo_n "checking for $2... " >&6; }
2206 if eval \${$3+:} false; then :
2207   $as_echo_n "(cached) " >&6
2208 else
2209   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2210 /* end confdefs.h.  */
2211 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2212    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2213 #define $2 innocuous_$2
2214
2215 /* System header to define __stub macros and hopefully few prototypes,
2216     which can conflict with char $2 (); below.
2217     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2218     <limits.h> exists even on freestanding compilers.  */
2219
2220 #ifdef __STDC__
2221 # include <limits.h>
2222 #else
2223 # include <assert.h>
2224 #endif
2225
2226 #undef $2
2227
2228 /* Override any GCC internal prototype to avoid an error.
2229    Use char because int might match the return type of a GCC
2230    builtin and then its argument prototype would still apply.  */
2231 #ifdef __cplusplus
2232 extern "C"
2233 #endif
2234 char $2 ();
2235 /* The GNU C library defines this for functions which it implements
2236     to always fail with ENOSYS.  Some functions are actually named
2237     something starting with __ and the normal name is an alias.  */
2238 #if defined __stub_$2 || defined __stub___$2
2239 choke me
2240 #endif
2241
2242 int
2243 main ()
2244 {
2245 return $2 ();
2246   ;
2247   return 0;
2248 }
2249 _ACEOF
2250 if ac_fn_c_try_link "$LINENO"; then :
2251   eval "$3=yes"
2252 else
2253   eval "$3=no"
2254 fi
2255 rm -f core conftest.err conftest.$ac_objext \
2256     conftest$ac_exeext conftest.$ac_ext
2257 fi
2258 eval ac_res=\$$3
2259                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2260 $as_echo "$ac_res" >&6; }
2261   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2262
2263 } # ac_fn_c_check_func
2264
2265 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2266 # ---------------------------------------------
2267 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2268 # accordingly.
2269 ac_fn_c_check_decl ()
2270 {
2271   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2272   as_decl_name=`echo $2|sed 's/ *(.*//'`
2273   as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2274   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2275 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2276 if eval \${$3+:} false; then :
2277   $as_echo_n "(cached) " >&6
2278 else
2279   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2280 /* end confdefs.h.  */
2281 $4
2282 int
2283 main ()
2284 {
2285 #ifndef $as_decl_name
2286 #ifdef __cplusplus
2287   (void) $as_decl_use;
2288 #else
2289   (void) $as_decl_name;
2290 #endif
2291 #endif
2292
2293   ;
2294   return 0;
2295 }
2296 _ACEOF
2297 if ac_fn_c_try_compile "$LINENO"; then :
2298   eval "$3=yes"
2299 else
2300   eval "$3=no"
2301 fi
2302 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2303 fi
2304 eval ac_res=\$$3
2305                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2306 $as_echo "$ac_res" >&6; }
2307   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2308
2309 } # ac_fn_c_check_decl
2310 cat >config.log <<_ACEOF
2311 This file contains any messages produced by compilers while
2312 running configure, to aid debugging if configure makes a mistake.
2313
2314 It was created by PostgreSQL $as_me 9.4beta1, which was
2315 generated by GNU Autoconf 2.69.  Invocation command line was
2316
2317   $ $0 $@
2318
2319 _ACEOF
2320 exec 5>>config.log
2321 {
2322 cat <<_ASUNAME
2323 ## --------- ##
2324 ## Platform. ##
2325 ## --------- ##
2326
2327 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2328 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2329 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2330 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2331 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2332
2333 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2334 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2335
2336 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2337 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2338 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2339 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2340 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2341 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2342 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2343
2344 _ASUNAME
2345
2346 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2347 for as_dir in $PATH
2348 do
2349   IFS=$as_save_IFS
2350   test -z "$as_dir" && as_dir=.
2351     $as_echo "PATH: $as_dir"
2352   done
2353 IFS=$as_save_IFS
2354
2355 } >&5
2356
2357 cat >&5 <<_ACEOF
2358
2359
2360 ## ----------- ##
2361 ## Core tests. ##
2362 ## ----------- ##
2363
2364 _ACEOF
2365
2366
2367 # Keep a trace of the command line.
2368 # Strip out --no-create and --no-recursion so they do not pile up.
2369 # Strip out --silent because we don't want to record it for future runs.
2370 # Also quote any args containing shell meta-characters.
2371 # Make two passes to allow for proper duplicate-argument suppression.
2372 ac_configure_args=
2373 ac_configure_args0=
2374 ac_configure_args1=
2375 ac_must_keep_next=false
2376 for ac_pass in 1 2
2377 do
2378   for ac_arg
2379   do
2380     case $ac_arg in
2381     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2382     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2383     | -silent | --silent | --silen | --sile | --sil)
2384       continue ;;
2385     *\'*)
2386       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2387     esac
2388     case $ac_pass in
2389     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2390     2)
2391       as_fn_append ac_configure_args1 " '$ac_arg'"
2392       if test $ac_must_keep_next = true; then
2393         ac_must_keep_next=false # Got value, back to normal.
2394       else
2395         case $ac_arg in
2396           *=* | --config-cache | -C | -disable-* | --disable-* \
2397           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2398           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2399           | -with-* | --with-* | -without-* | --without-* | --x)
2400             case "$ac_configure_args0 " in
2401               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2402             esac
2403             ;;
2404           -* ) ac_must_keep_next=true ;;
2405         esac
2406       fi
2407       as_fn_append ac_configure_args " '$ac_arg'"
2408       ;;
2409     esac
2410   done
2411 done
2412 { ac_configure_args0=; unset ac_configure_args0;}
2413 { ac_configure_args1=; unset ac_configure_args1;}
2414
2415 # When interrupted or exit'd, cleanup temporary files, and complete
2416 # config.log.  We remove comments because anyway the quotes in there
2417 # would cause problems or look ugly.
2418 # WARNING: Use '\'' to represent an apostrophe within the trap.
2419 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2420 trap 'exit_status=$?
2421   # Save into config.log some information that might help in debugging.
2422   {
2423     echo
2424
2425     $as_echo "## ---------------- ##
2426 ## Cache variables. ##
2427 ## ---------------- ##"
2428     echo
2429     # The following way of writing the cache mishandles newlines in values,
2430 (
2431   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2432     eval ac_val=\$$ac_var
2433     case $ac_val in #(
2434     *${as_nl}*)
2435       case $ac_var in #(
2436       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2437 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2438       esac
2439       case $ac_var in #(
2440       _ | IFS | as_nl) ;; #(
2441       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2442       *) { eval $ac_var=; unset $ac_var;} ;;
2443       esac ;;
2444     esac
2445   done
2446   (set) 2>&1 |
2447     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2448     *${as_nl}ac_space=\ *)
2449       sed -n \
2450         "s/'\''/'\''\\\\'\'''\''/g;
2451           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2452       ;; #(
2453     *)
2454       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2455       ;;
2456     esac |
2457     sort
2458 )
2459     echo
2460
2461     $as_echo "## ----------------- ##
2462 ## Output variables. ##
2463 ## ----------------- ##"
2464     echo
2465     for ac_var in $ac_subst_vars
2466     do
2467       eval ac_val=\$$ac_var
2468       case $ac_val in
2469       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2470       esac
2471       $as_echo "$ac_var='\''$ac_val'\''"
2472     done | sort
2473     echo
2474
2475     if test -n "$ac_subst_files"; then
2476       $as_echo "## ------------------- ##
2477 ## File substitutions. ##
2478 ## ------------------- ##"
2479       echo
2480       for ac_var in $ac_subst_files
2481       do
2482         eval ac_val=\$$ac_var
2483         case $ac_val in
2484         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2485         esac
2486         $as_echo "$ac_var='\''$ac_val'\''"
2487       done | sort
2488       echo
2489     fi
2490
2491     if test -s confdefs.h; then
2492       $as_echo "## ----------- ##
2493 ## confdefs.h. ##
2494 ## ----------- ##"
2495       echo
2496       cat confdefs.h
2497       echo
2498     fi
2499     test "$ac_signal" != 0 &&
2500       $as_echo "$as_me: caught signal $ac_signal"
2501     $as_echo "$as_me: exit $exit_status"
2502   } >&5
2503   rm -f core *.core core.conftest.* &&
2504     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2505     exit $exit_status
2506 ' 0
2507 for ac_signal in 1 2 13 15; do
2508   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2509 done
2510 ac_signal=0
2511
2512 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2513 rm -f -r conftest* confdefs.h
2514
2515 $as_echo "/* confdefs.h */" > confdefs.h
2516
2517 # Predefined preprocessor variables.
2518
2519 cat >>confdefs.h <<_ACEOF
2520 #define PACKAGE_NAME "$PACKAGE_NAME"
2521 _ACEOF
2522
2523 cat >>confdefs.h <<_ACEOF
2524 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2525 _ACEOF
2526
2527 cat >>confdefs.h <<_ACEOF
2528 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2529 _ACEOF
2530
2531 cat >>confdefs.h <<_ACEOF
2532 #define PACKAGE_STRING "$PACKAGE_STRING"
2533 _ACEOF
2534
2535 cat >>confdefs.h <<_ACEOF
2536 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2537 _ACEOF
2538
2539 cat >>confdefs.h <<_ACEOF
2540 #define PACKAGE_URL "$PACKAGE_URL"
2541 _ACEOF
2542
2543
2544 # Let the site file select an alternate cache file if it wants to.
2545 # Prefer an explicitly selected file to automatically selected ones.
2546 ac_site_file1=NONE
2547 ac_site_file2=NONE
2548 if test -n "$CONFIG_SITE"; then
2549   # We do not want a PATH search for config.site.
2550   case $CONFIG_SITE in #((
2551     -*)  ac_site_file1=./$CONFIG_SITE;;
2552     */*) ac_site_file1=$CONFIG_SITE;;
2553     *)   ac_site_file1=./$CONFIG_SITE;;
2554   esac
2555 elif test "x$prefix" != xNONE; then
2556   ac_site_file1=$prefix/share/config.site
2557   ac_site_file2=$prefix/etc/config.site
2558 else
2559   ac_site_file1=$ac_default_prefix/share/config.site
2560   ac_site_file2=$ac_default_prefix/etc/config.site
2561 fi
2562 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2563 do
2564   test "x$ac_site_file" = xNONE && continue
2565   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2566     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2567 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2568     sed 's/^/| /' "$ac_site_file" >&5
2569     . "$ac_site_file" \
2570       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2571 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2572 as_fn_error $? "failed to load site script $ac_site_file
2573 See \`config.log' for more details" "$LINENO" 5; }
2574   fi
2575 done
2576
2577 if test -r "$cache_file"; then
2578   # Some versions of bash will fail to source /dev/null (special files
2579   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2580   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2581     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2582 $as_echo "$as_me: loading cache $cache_file" >&6;}
2583     case $cache_file in
2584       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2585       *)                      . "./$cache_file";;
2586     esac
2587   fi
2588 else
2589   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2590 $as_echo "$as_me: creating cache $cache_file" >&6;}
2591   >$cache_file
2592 fi
2593
2594 # Check that the precious variables saved in the cache have kept the same
2595 # value.
2596 ac_cache_corrupted=false
2597 for ac_var in $ac_precious_vars; do
2598   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2599   eval ac_new_set=\$ac_env_${ac_var}_set
2600   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2601   eval ac_new_val=\$ac_env_${ac_var}_value
2602   case $ac_old_set,$ac_new_set in
2603     set,)
2604       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2605 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2606       ac_cache_corrupted=: ;;
2607     ,set)
2608       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2609 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2610       ac_cache_corrupted=: ;;
2611     ,);;
2612     *)
2613       if test "x$ac_old_val" != "x$ac_new_val"; then
2614         # differences in whitespace do not lead to failure.
2615         ac_old_val_w=`echo x $ac_old_val`
2616         ac_new_val_w=`echo x $ac_new_val`
2617         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2618           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2619 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2620           ac_cache_corrupted=:
2621         else
2622           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2623 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2624           eval $ac_var=\$ac_old_val
2625         fi
2626         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2627 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2628         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2629 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2630       fi;;
2631   esac
2632   # Pass precious variables to config.status.
2633   if test "$ac_new_set" = set; then
2634     case $ac_new_val in
2635     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2636     *) ac_arg=$ac_var=$ac_new_val ;;
2637     esac
2638     case " $ac_configure_args " in
2639       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2640       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2641     esac
2642   fi
2643 done
2644 if $ac_cache_corrupted; then
2645   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2646 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2647   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2648 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2649   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2650 fi
2651 ## -------------------- ##
2652 ## Main body of script. ##
2653 ## -------------------- ##
2654
2655 ac_ext=c
2656 ac_cpp='$CPP $CPPFLAGS'
2657 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2658 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2659 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2660
2661
2662
2663
2664
2665
2666 ac_aux_dir=
2667 for ac_dir in config "$srcdir"/config; do
2668   if test -f "$ac_dir/install-sh"; then
2669     ac_aux_dir=$ac_dir
2670     ac_install_sh="$ac_aux_dir/install-sh -c"
2671     break
2672   elif test -f "$ac_dir/install.sh"; then
2673     ac_aux_dir=$ac_dir
2674     ac_install_sh="$ac_aux_dir/install.sh -c"
2675     break
2676   elif test -f "$ac_dir/shtool"; then
2677     ac_aux_dir=$ac_dir
2678     ac_install_sh="$ac_aux_dir/shtool install -c"
2679     break
2680   fi
2681 done
2682 if test -z "$ac_aux_dir"; then
2683   as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5
2684 fi
2685
2686 # These three variables are undocumented and unsupported,
2687 # and are intended to be withdrawn in a future Autoconf release.
2688 # They can cause serious problems if a builder's source tree is in a directory
2689 # whose full name contains unusual characters.
2690 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2691 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2692 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2693
2694
2695
2696 configure_args=$ac_configure_args
2697
2698
2699 PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\.[0-9][0-9]*\)'`
2700
2701
2702 cat >>confdefs.h <<_ACEOF
2703 #define PG_MAJORVERSION "$PG_MAJORVERSION"
2704 _ACEOF
2705
2706
2707
2708
2709
2710 # Check whether --with-extra-version was given.
2711 if test "${with_extra_version+set}" = set; then :
2712   withval=$with_extra_version;
2713   case $withval in
2714     yes)
2715       as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2716       ;;
2717     no)
2718       as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2719       ;;
2720     *)
2721       PG_VERSION="$PACKAGE_VERSION$withval"
2722       ;;
2723   esac
2724
2725 else
2726   PG_VERSION="$PACKAGE_VERSION"
2727 fi
2728
2729
2730
2731 cat >>confdefs.h <<_ACEOF
2732 #define PG_VERSION "$PG_VERSION"
2733 _ACEOF
2734
2735
2736 # Make sure we can run config.sub.
2737 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2738   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2739
2740 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2741 $as_echo_n "checking build system type... " >&6; }
2742 if ${ac_cv_build+:} false; then :
2743   $as_echo_n "(cached) " >&6
2744 else
2745   ac_build_alias=$build_alias
2746 test "x$ac_build_alias" = x &&
2747   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2748 test "x$ac_build_alias" = x &&
2749   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2750 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2751   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2752
2753 fi
2754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2755 $as_echo "$ac_cv_build" >&6; }
2756 case $ac_cv_build in
2757 *-*-*) ;;
2758 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2759 esac
2760 build=$ac_cv_build
2761 ac_save_IFS=$IFS; IFS='-'
2762 set x $ac_cv_build
2763 shift
2764 build_cpu=$1
2765 build_vendor=$2
2766 shift; shift
2767 # Remember, the first character of IFS is used to create $*,
2768 # except with old shells:
2769 build_os=$*
2770 IFS=$ac_save_IFS
2771 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2772
2773
2774 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2775 $as_echo_n "checking host system type... " >&6; }
2776 if ${ac_cv_host+:} false; then :
2777   $as_echo_n "(cached) " >&6
2778 else
2779   if test "x$host_alias" = x; then
2780   ac_cv_host=$ac_cv_build
2781 else
2782   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2783     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2784 fi
2785
2786 fi
2787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2788 $as_echo "$ac_cv_host" >&6; }
2789 case $ac_cv_host in
2790 *-*-*) ;;
2791 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2792 esac
2793 host=$ac_cv_host
2794 ac_save_IFS=$IFS; IFS='-'
2795 set x $ac_cv_host
2796 shift
2797 host_cpu=$1
2798 host_vendor=$2
2799 shift; shift
2800 # Remember, the first character of IFS is used to create $*,
2801 # except with old shells:
2802 host_os=$*
2803 IFS=$ac_save_IFS
2804 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2805
2806
2807
2808 template=
2809 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which template to use" >&5
2810 $as_echo_n "checking which template to use... " >&6; }
2811
2812
2813
2814
2815 # Check whether --with-template was given.
2816 if test "${with_template+set}" = set; then :
2817   withval=$with_template;
2818   case $withval in
2819     yes)
2820       as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2821       ;;
2822     no)
2823       as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2824       ;;
2825     *)
2826
2827   case $withval in
2828     list)   echo; ls "$srcdir/src/template"; exit;;
2829     *)      if test -f "$srcdir/src/template/$with_template" ; then
2830               template=$withval
2831             else
2832               as_fn_error $? "'$withval' is not a valid template name. Use 'list' for a list." "$LINENO" 5
2833             fi;;
2834   esac
2835
2836       ;;
2837   esac
2838
2839 else
2840
2841 # --with-template not given
2842
2843 case $host_os in
2844      aix*) template=aix ;;
2845   cygwin*) template=cygwin ;;
2846   darwin*) template=darwin ;;
2847 dragonfly*) template=netbsd ;;
2848  freebsd*) template=freebsd ;;
2849     hpux*) template=hpux ;;
2850  linux*|gnu*|k*bsd*-gnu)
2851            template=linux ;;
2852    mingw*) template=win32 ;;
2853   netbsd*) template=netbsd ;;
2854  openbsd*) template=openbsd ;;
2855      osf*) template=osf ;;
2856      sco*) template=sco ;;
2857  solaris*) template=solaris ;;
2858    sysv5*) template=unixware ;;
2859 esac
2860
2861   if test x"$template" = x"" ; then
2862     as_fn_error $? "
2863 *******************************************************************
2864 PostgreSQL has apparently not been ported to your platform yet.
2865 To try a manual configuration, look into the src/template directory
2866 for a similar platform and use the '--with-template=' option.
2867
2868 Please also contact <pgsql-bugs@postgresql.org> to see about
2869 rectifying this.  Include the above 'checking host system type...'
2870 line.
2871 *******************************************************************
2872 " "$LINENO" 5
2873   fi
2874
2875
2876 fi
2877
2878
2879
2880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $template" >&5
2881 $as_echo "$template" >&6; }
2882
2883 PORTNAME=$template
2884
2885
2886 # Initialize default assumption that we do not need separate assembly code
2887 # for TAS (test-and-set).  This can be overridden by the template file
2888 # when it's executed.
2889 need_tas=no
2890 tas_file=dummy.s
2891
2892
2893
2894 ##
2895 ## Command line options
2896 ##
2897
2898 #
2899 # Add non-standard directories to the include path
2900 #
2901
2902
2903
2904 # Check whether --with-includes was given.
2905 if test "${with_includes+set}" = set; then :
2906   withval=$with_includes;
2907   case $withval in
2908     yes)
2909       as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
2910       ;;
2911     no)
2912       as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
2913       ;;
2914     *)
2915
2916       ;;
2917   esac
2918
2919 fi
2920
2921
2922
2923
2924 #
2925 # Add non-standard directories to the library search path
2926 #
2927
2928
2929
2930 # Check whether --with-libraries was given.
2931 if test "${with_libraries+set}" = set; then :
2932   withval=$with_libraries;
2933   case $withval in
2934     yes)
2935       as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
2936       ;;
2937     no)
2938       as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
2939       ;;
2940     *)
2941       LIBRARY_DIRS=$withval
2942       ;;
2943   esac
2944
2945 fi
2946
2947
2948
2949
2950
2951
2952 # Check whether --with-libs was given.
2953 if test "${with_libs+set}" = set; then :
2954   withval=$with_libs;
2955   case $withval in
2956     yes)
2957       as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
2958       ;;
2959     no)
2960       as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
2961       ;;
2962     *)
2963       LIBRARY_DIRS=$withval
2964       ;;
2965   esac
2966
2967 fi
2968
2969
2970
2971
2972 #
2973 # 64-bit integer date/time storage: enabled by default.
2974 #
2975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with 64-bit integer date/time support" >&5
2976 $as_echo_n "checking whether to build with 64-bit integer date/time support... " >&6; }
2977
2978
2979 # Check whether --enable-integer-datetimes was given.
2980 if test "${enable_integer_datetimes+set}" = set; then :
2981   enableval=$enable_integer_datetimes;
2982   case $enableval in
2983     yes)
2984
2985 $as_echo "#define USE_INTEGER_DATETIMES 1" >>confdefs.h
2986
2987       ;;
2988     no)
2989       :
2990       ;;
2991     *)
2992       as_fn_error $? "no argument expected for --enable-integer-datetimes option" "$LINENO" 5
2993       ;;
2994   esac
2995
2996 else
2997   enable_integer_datetimes=yes
2998
2999 $as_echo "#define USE_INTEGER_DATETIMES 1" >>confdefs.h
3000
3001 fi
3002
3003
3004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_integer_datetimes" >&5
3005 $as_echo "$enable_integer_datetimes" >&6; }
3006
3007
3008 #
3009 # NLS
3010 #
3011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is wanted" >&5
3012 $as_echo_n "checking whether NLS is wanted... " >&6; }
3013
3014
3015 # Check whether --enable-nls was given.
3016 if test "${enable_nls+set}" = set; then :
3017   enableval=$enable_nls;
3018   case $enableval in
3019     yes)
3020       :
3021       ;;
3022     no)
3023       :
3024       ;;
3025     *)
3026       enable_nls=yes
3027 WANTED_LANGUAGES=$enableval
3028       ;;
3029   esac
3030
3031 else
3032   enable_nls=no
3033 fi
3034
3035
3036
3037 if test "$enable_nls" = yes; then
3038
3039 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
3040
3041 fi
3042
3043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_nls" >&5
3044 $as_echo "$enable_nls" >&6; }
3045
3046
3047
3048 #
3049 # Default port number (--with-pgport), default 5432
3050 #
3051 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default port number" >&5
3052 $as_echo_n "checking for default port number... " >&6; }
3053
3054
3055
3056 # Check whether --with-pgport was given.
3057 if test "${with_pgport+set}" = set; then :
3058   withval=$with_pgport;
3059   case $withval in
3060     yes)
3061       as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3062       ;;
3063     no)
3064       as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3065       ;;
3066     *)
3067       default_port=$withval
3068       ;;
3069   esac
3070
3071 else
3072   default_port=5432
3073 fi
3074
3075
3076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_port" >&5
3077 $as_echo "$default_port" >&6; }
3078 # Need both of these because some places want an integer and some a string
3079
3080 cat >>confdefs.h <<_ACEOF
3081 #define DEF_PGPORT ${default_port}
3082 _ACEOF
3083
3084
3085 cat >>confdefs.h <<_ACEOF
3086 #define DEF_PGPORT_STR "${default_port}"
3087 _ACEOF
3088
3089
3090
3091 #
3092 # '-rpath'-like feature can be disabled
3093 #
3094
3095
3096 # Check whether --enable-rpath was given.
3097 if test "${enable_rpath+set}" = set; then :
3098   enableval=$enable_rpath;
3099   case $enableval in
3100     yes)
3101       :
3102       ;;
3103     no)
3104       :
3105       ;;
3106     *)
3107       as_fn_error $? "no argument expected for --enable-rpath option" "$LINENO" 5
3108       ;;
3109   esac
3110
3111 else
3112   enable_rpath=yes
3113
3114 fi
3115
3116
3117
3118
3119 #
3120 # Spinlocks
3121 #
3122
3123
3124 # Check whether --enable-spinlocks was given.
3125 if test "${enable_spinlocks+set}" = set; then :
3126   enableval=$enable_spinlocks;
3127   case $enableval in
3128     yes)
3129       :
3130       ;;
3131     no)
3132       :
3133       ;;
3134     *)
3135       as_fn_error $? "no argument expected for --enable-spinlocks option" "$LINENO" 5
3136       ;;
3137   esac
3138
3139 else
3140   enable_spinlocks=yes
3141
3142 fi
3143
3144
3145
3146 #
3147 # --enable-debug adds -g to compiler flags
3148 #
3149
3150
3151 # Check whether --enable-debug was given.
3152 if test "${enable_debug+set}" = set; then :
3153   enableval=$enable_debug;
3154   case $enableval in
3155     yes)
3156       :
3157       ;;
3158     no)
3159       :
3160       ;;
3161     *)
3162       as_fn_error $? "no argument expected for --enable-debug option" "$LINENO" 5
3163       ;;
3164   esac
3165
3166 else
3167   enable_debug=no
3168
3169 fi
3170
3171
3172
3173
3174 #
3175 # --enable-profiling enables gcc profiling
3176 #
3177
3178
3179 # Check whether --enable-profiling was given.
3180 if test "${enable_profiling+set}" = set; then :
3181   enableval=$enable_profiling;
3182   case $enableval in
3183     yes)
3184       :
3185       ;;
3186     no)
3187       :
3188       ;;
3189     *)
3190       as_fn_error $? "no argument expected for --enable-profiling option" "$LINENO" 5
3191       ;;
3192   esac
3193
3194 else
3195   enable_profiling=no
3196
3197 fi
3198
3199
3200
3201 #
3202 # --enable-coverage enables generation of code coverage metrics with gcov
3203 #
3204
3205
3206 # Check whether --enable-coverage was given.
3207 if test "${enable_coverage+set}" = set; then :
3208   enableval=$enable_coverage;
3209   case $enableval in
3210     yes)
3211       for ac_prog in gcov
3212 do
3213   # Extract the first word of "$ac_prog", so it can be a program name with args.
3214 set dummy $ac_prog; ac_word=$2
3215 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3216 $as_echo_n "checking for $ac_word... " >&6; }
3217 if ${ac_cv_prog_GCOV+:} false; then :
3218   $as_echo_n "(cached) " >&6
3219 else
3220   if test -n "$GCOV"; then
3221   ac_cv_prog_GCOV="$GCOV" # Let the user override the test.
3222 else
3223 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3224 for as_dir in $PATH
3225 do
3226   IFS=$as_save_IFS
3227   test -z "$as_dir" && as_dir=.
3228     for ac_exec_ext in '' $ac_executable_extensions; do
3229   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3230     ac_cv_prog_GCOV="$ac_prog"
3231     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3232     break 2
3233   fi
3234 done
3235   done
3236 IFS=$as_save_IFS
3237
3238 fi
3239 fi
3240 GCOV=$ac_cv_prog_GCOV
3241 if test -n "$GCOV"; then
3242   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3243 $as_echo "$GCOV" >&6; }
3244 else
3245   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3246 $as_echo "no" >&6; }
3247 fi
3248
3249
3250   test -n "$GCOV" && break
3251 done
3252
3253 if test -z "$GCOV"; then
3254   as_fn_error $? "gcov not found" "$LINENO" 5
3255 fi
3256 for ac_prog in lcov
3257 do
3258   # Extract the first word of "$ac_prog", so it can be a program name with args.
3259 set dummy $ac_prog; ac_word=$2
3260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3261 $as_echo_n "checking for $ac_word... " >&6; }
3262 if ${ac_cv_prog_LCOV+:} false; then :
3263   $as_echo_n "(cached) " >&6
3264 else
3265   if test -n "$LCOV"; then
3266   ac_cv_prog_LCOV="$LCOV" # Let the user override the test.
3267 else
3268 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3269 for as_dir in $PATH
3270 do
3271   IFS=$as_save_IFS
3272   test -z "$as_dir" && as_dir=.
3273     for ac_exec_ext in '' $ac_executable_extensions; do
3274   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3275     ac_cv_prog_LCOV="$ac_prog"
3276     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3277     break 2
3278   fi
3279 done
3280   done
3281 IFS=$as_save_IFS
3282
3283 fi
3284 fi
3285 LCOV=$ac_cv_prog_LCOV
3286 if test -n "$LCOV"; then
3287   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3288 $as_echo "$LCOV" >&6; }
3289 else
3290   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3291 $as_echo "no" >&6; }
3292 fi
3293
3294
3295   test -n "$LCOV" && break
3296 done
3297
3298 if test -z "$LCOV"; then
3299   as_fn_error $? "lcov not found" "$LINENO" 5
3300 fi
3301 for ac_prog in genhtml
3302 do
3303   # Extract the first word of "$ac_prog", so it can be a program name with args.
3304 set dummy $ac_prog; ac_word=$2
3305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3306 $as_echo_n "checking for $ac_word... " >&6; }
3307 if ${ac_cv_prog_GENHTML+:} false; then :
3308   $as_echo_n "(cached) " >&6
3309 else
3310   if test -n "$GENHTML"; then
3311   ac_cv_prog_GENHTML="$GENHTML" # Let the user override the test.
3312 else
3313 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3314 for as_dir in $PATH
3315 do
3316   IFS=$as_save_IFS
3317   test -z "$as_dir" && as_dir=.
3318     for ac_exec_ext in '' $ac_executable_extensions; do
3319   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3320     ac_cv_prog_GENHTML="$ac_prog"
3321     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3322     break 2
3323   fi
3324 done
3325   done
3326 IFS=$as_save_IFS
3327
3328 fi
3329 fi
3330 GENHTML=$ac_cv_prog_GENHTML
3331 if test -n "$GENHTML"; then
3332   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3333 $as_echo "$GENHTML" >&6; }
3334 else
3335   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3336 $as_echo "no" >&6; }
3337 fi
3338
3339
3340   test -n "$GENHTML" && break
3341 done
3342
3343 if test -z "$GENHTML"; then
3344   as_fn_error $? "genhtml not found" "$LINENO" 5
3345 fi
3346       ;;
3347     no)
3348       :
3349       ;;
3350     *)
3351       as_fn_error $? "no argument expected for --enable-coverage option" "$LINENO" 5
3352       ;;
3353   esac
3354
3355 else
3356   enable_coverage=no
3357
3358 fi
3359
3360
3361
3362
3363 #
3364 # DTrace
3365 #
3366
3367
3368 # Check whether --enable-dtrace was given.
3369 if test "${enable_dtrace+set}" = set; then :
3370   enableval=$enable_dtrace;
3371   case $enableval in
3372     yes)
3373       for ac_prog in dtrace
3374 do
3375   # Extract the first word of "$ac_prog", so it can be a program name with args.
3376 set dummy $ac_prog; ac_word=$2
3377 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3378 $as_echo_n "checking for $ac_word... " >&6; }
3379 if ${ac_cv_prog_DTRACE+:} false; then :
3380   $as_echo_n "(cached) " >&6
3381 else
3382   if test -n "$DTRACE"; then
3383   ac_cv_prog_DTRACE="$DTRACE" # Let the user override the test.
3384 else
3385 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3386 for as_dir in $PATH
3387 do
3388   IFS=$as_save_IFS
3389   test -z "$as_dir" && as_dir=.
3390     for ac_exec_ext in '' $ac_executable_extensions; do
3391   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3392     ac_cv_prog_DTRACE="$ac_prog"
3393     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3394     break 2
3395   fi
3396 done
3397   done
3398 IFS=$as_save_IFS
3399
3400 fi
3401 fi
3402 DTRACE=$ac_cv_prog_DTRACE
3403 if test -n "$DTRACE"; then
3404   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3405 $as_echo "$DTRACE" >&6; }
3406 else
3407   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3408 $as_echo "no" >&6; }
3409 fi
3410
3411
3412   test -n "$DTRACE" && break
3413 done
3414
3415 if test -z "$DTRACE"; then
3416   as_fn_error $? "dtrace not found" "$LINENO" 5
3417 fi
3418
3419       ;;
3420     no)
3421       :
3422       ;;
3423     *)
3424       as_fn_error $? "no argument expected for --enable-dtrace option" "$LINENO" 5
3425       ;;
3426   esac
3427
3428 else
3429   enable_dtrace=no
3430
3431 fi
3432
3433
3434
3435
3436 #
3437 # Block size
3438 #
3439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for block size" >&5
3440 $as_echo_n "checking for block size... " >&6; }
3441
3442
3443
3444 # Check whether --with-blocksize was given.
3445 if test "${with_blocksize+set}" = set; then :
3446   withval=$with_blocksize;
3447   case $withval in
3448     yes)
3449       as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3450       ;;
3451     no)
3452       as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3453       ;;
3454     *)
3455       blocksize=$withval
3456       ;;
3457   esac
3458
3459 else
3460   blocksize=8
3461 fi
3462
3463
3464 case ${blocksize} in
3465   1) BLCKSZ=1024;;
3466   2) BLCKSZ=2048;;
3467   4) BLCKSZ=4096;;
3468   8) BLCKSZ=8192;;
3469  16) BLCKSZ=16384;;
3470  32) BLCKSZ=32768;;
3471   *) as_fn_error $? "Invalid block size. Allowed values are 1,2,4,8,16,32." "$LINENO" 5
3472 esac
3473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${blocksize}kB" >&5
3474 $as_echo "${blocksize}kB" >&6; }
3475
3476
3477 cat >>confdefs.h <<_ACEOF
3478 #define BLCKSZ ${BLCKSZ}
3479 _ACEOF
3480
3481
3482 #
3483 # Relation segment size
3484 #
3485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for segment size" >&5
3486 $as_echo_n "checking for segment size... " >&6; }
3487
3488
3489
3490 # Check whether --with-segsize was given.
3491 if test "${with_segsize+set}" = set; then :
3492   withval=$with_segsize;
3493   case $withval in
3494     yes)
3495       as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3496       ;;
3497     no)
3498       as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3499       ;;
3500     *)
3501       segsize=$withval
3502       ;;
3503   esac
3504
3505 else
3506   segsize=1
3507 fi
3508
3509
3510 # this expression is set up to avoid unnecessary integer overflow
3511 # blocksize is already guaranteed to be a factor of 1024
3512 RELSEG_SIZE=`expr '(' 1024 / ${blocksize} ')' '*' ${segsize} '*' 1024`
3513 test $? -eq 0 || exit 1
3514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${segsize}GB" >&5
3515 $as_echo "${segsize}GB" >&6; }
3516
3517
3518 cat >>confdefs.h <<_ACEOF
3519 #define RELSEG_SIZE ${RELSEG_SIZE}
3520 _ACEOF
3521
3522
3523 #
3524 # WAL block size
3525 #
3526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAL block size" >&5
3527 $as_echo_n "checking for WAL block size... " >&6; }
3528
3529
3530
3531 # Check whether --with-wal-blocksize was given.
3532 if test "${with_wal_blocksize+set}" = set; then :
3533   withval=$with_wal_blocksize;
3534   case $withval in
3535     yes)
3536       as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3537       ;;
3538     no)
3539       as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3540       ;;
3541     *)
3542       wal_blocksize=$withval
3543       ;;
3544   esac
3545
3546 else
3547   wal_blocksize=8
3548 fi
3549
3550
3551 case ${wal_blocksize} in
3552   1) XLOG_BLCKSZ=1024;;
3553   2) XLOG_BLCKSZ=2048;;
3554   4) XLOG_BLCKSZ=4096;;
3555   8) XLOG_BLCKSZ=8192;;
3556  16) XLOG_BLCKSZ=16384;;
3557  32) XLOG_BLCKSZ=32768;;
3558  64) XLOG_BLCKSZ=65536;;
3559   *) as_fn_error $? "Invalid WAL block size. Allowed values are 1,2,4,8,16,32,64." "$LINENO" 5
3560 esac
3561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${wal_blocksize}kB" >&5
3562 $as_echo "${wal_blocksize}kB" >&6; }
3563
3564
3565 cat >>confdefs.h <<_ACEOF
3566 #define XLOG_BLCKSZ ${XLOG_BLCKSZ}
3567 _ACEOF
3568
3569
3570 #
3571 # WAL segment size
3572 #
3573 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAL segment size" >&5
3574 $as_echo_n "checking for WAL segment size... " >&6; }
3575
3576
3577
3578 # Check whether --with-wal-segsize was given.
3579 if test "${with_wal_segsize+set}" = set; then :
3580   withval=$with_wal_segsize;
3581   case $withval in
3582     yes)
3583       as_fn_error $? "argument required for --with-wal-segsize option" "$LINENO" 5
3584       ;;
3585     no)
3586       as_fn_error $? "argument required for --with-wal-segsize option" "$LINENO" 5
3587       ;;
3588     *)
3589       wal_segsize=$withval
3590       ;;
3591   esac
3592
3593 else
3594   wal_segsize=16
3595 fi
3596
3597
3598 case ${wal_segsize} in
3599   1) ;;
3600   2) ;;
3601   4) ;;
3602   8) ;;
3603  16) ;;
3604  32) ;;
3605  64) ;;
3606   *) as_fn_error $? "Invalid WAL segment size. Allowed values are 1,2,4,8,16,32,64." "$LINENO" 5
3607 esac
3608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${wal_segsize}MB" >&5
3609 $as_echo "${wal_segsize}MB" >&6; }
3610
3611
3612 cat >>confdefs.h <<_ACEOF
3613 #define XLOG_SEG_SIZE (${wal_segsize} * 1024 * 1024)
3614 _ACEOF
3615
3616
3617 #
3618 # C compiler
3619 #
3620
3621 # For historical reasons you can also use --with-CC to specify the C compiler
3622 # to use, although the standard way to do this is to set the CC environment
3623 # variable.
3624
3625
3626
3627 # Check whether --with-CC was given.
3628 if test "${with_CC+set}" = set; then :
3629   withval=$with_CC;
3630   case $withval in
3631     yes)
3632       as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3633       ;;
3634     no)
3635       as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3636       ;;
3637     *)
3638       CC=$with_CC
3639       ;;
3640   esac
3641
3642 fi
3643
3644
3645
3646 case $template in
3647   aix) pgac_cc_list="gcc xlc";;
3648     *) pgac_cc_list="gcc cc";;
3649 esac
3650
3651 ac_ext=c
3652 ac_cpp='$CPP $CPPFLAGS'
3653 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3654 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3655 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3656 if test -n "$ac_tool_prefix"; then
3657   for ac_prog in $pgac_cc_list
3658   do
3659     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3660 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3662 $as_echo_n "checking for $ac_word... " >&6; }
3663 if ${ac_cv_prog_CC+:} false; then :
3664   $as_echo_n "(cached) " >&6
3665 else
3666   if test -n "$CC"; then
3667   ac_cv_prog_CC="$CC" # Let the user override the test.
3668 else
3669 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3670 for as_dir in $PATH
3671 do
3672   IFS=$as_save_IFS
3673   test -z "$as_dir" && as_dir=.
3674     for ac_exec_ext in '' $ac_executable_extensions; do
3675   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3676     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3677     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3678     break 2
3679   fi
3680 done
3681   done
3682 IFS=$as_save_IFS
3683
3684 fi
3685 fi
3686 CC=$ac_cv_prog_CC
3687 if test -n "$CC"; then
3688   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3689 $as_echo "$CC" >&6; }
3690 else
3691   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3692 $as_echo "no" >&6; }
3693 fi
3694
3695
3696     test -n "$CC" && break
3697   done
3698 fi
3699 if test -z "$CC"; then
3700   ac_ct_CC=$CC
3701   for ac_prog in $pgac_cc_list
3702 do
3703   # Extract the first word of "$ac_prog", so it can be a program name with args.
3704 set dummy $ac_prog; ac_word=$2
3705 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3706 $as_echo_n "checking for $ac_word... " >&6; }
3707 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3708   $as_echo_n "(cached) " >&6
3709 else
3710   if test -n "$ac_ct_CC"; then
3711   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3712 else
3713 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3714 for as_dir in $PATH
3715 do
3716   IFS=$as_save_IFS
3717   test -z "$as_dir" && as_dir=.
3718     for ac_exec_ext in '' $ac_executable_extensions; do
3719   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3720     ac_cv_prog_ac_ct_CC="$ac_prog"
3721     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3722     break 2
3723   fi
3724 done
3725   done
3726 IFS=$as_save_IFS
3727
3728 fi
3729 fi
3730 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3731 if test -n "$ac_ct_CC"; then
3732   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3733 $as_echo "$ac_ct_CC" >&6; }
3734 else
3735   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3736 $as_echo "no" >&6; }
3737 fi
3738
3739
3740   test -n "$ac_ct_CC" && break
3741 done
3742
3743   if test "x$ac_ct_CC" = x; then
3744     CC=""
3745   else
3746     case $cross_compiling:$ac_tool_warned in
3747 yes:)
3748 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3749 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3750 ac_tool_warned=yes ;;
3751 esac
3752     CC=$ac_ct_CC
3753   fi
3754 fi
3755
3756
3757 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3758 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3759 as_fn_error $? "no acceptable C compiler found in \$PATH
3760 See \`config.log' for more details" "$LINENO" 5; }
3761
3762 # Provide some information about the compiler.
3763 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3764 set X $ac_compile
3765 ac_compiler=$2
3766 for ac_option in --version -v -V -qversion; do
3767   { { ac_try="$ac_compiler $ac_option >&5"
3768 case "(($ac_try" in
3769   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3770   *) ac_try_echo=$ac_try;;
3771 esac
3772 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3773 $as_echo "$ac_try_echo"; } >&5
3774   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3775   ac_status=$?
3776   if test -s conftest.err; then
3777     sed '10a\
3778 ... rest of stderr output deleted ...
3779          10q' conftest.err >conftest.er1
3780     cat conftest.er1 >&5
3781   fi
3782   rm -f conftest.er1 conftest.err
3783   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3784   test $ac_status = 0; }
3785 done
3786
3787 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3788 /* end confdefs.h.  */
3789
3790 int
3791 main ()
3792 {
3793
3794   ;
3795   return 0;
3796 }
3797 _ACEOF
3798 ac_clean_files_save=$ac_clean_files
3799 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3800 # Try to create an executable without -o first, disregard a.out.
3801 # It will help us diagnose broken compilers, and finding out an intuition
3802 # of exeext.
3803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3804 $as_echo_n "checking whether the C compiler works... " >&6; }
3805 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3806
3807 # The possible output files:
3808 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3809
3810 ac_rmfiles=
3811 for ac_file in $ac_files
3812 do
3813   case $ac_file in
3814     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3815     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3816   esac
3817 done
3818 rm -f $ac_rmfiles
3819
3820 if { { ac_try="$ac_link_default"
3821 case "(($ac_try" in
3822   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3823   *) ac_try_echo=$ac_try;;
3824 esac
3825 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3826 $as_echo "$ac_try_echo"; } >&5
3827   (eval "$ac_link_default") 2>&5
3828   ac_status=$?
3829   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3830   test $ac_status = 0; }; then :
3831   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3832 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3833 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
3834 # so that the user can short-circuit this test for compilers unknown to
3835 # Autoconf.
3836 for ac_file in $ac_files ''
3837 do
3838   test -f "$ac_file" || continue
3839   case $ac_file in
3840     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3841         ;;
3842     [ab].out )
3843         # We found the default executable, but exeext='' is most
3844         # certainly right.
3845         break;;
3846     *.* )
3847         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3848         then :; else
3849            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3850         fi
3851         # We set ac_cv_exeext here because the later test for it is not
3852         # safe: cross compilers may not add the suffix if given an `-o'
3853         # argument, so we may need to know it at that point already.
3854         # Even if this section looks crufty: it has the advantage of
3855         # actually working.
3856         break;;
3857     * )
3858         break;;
3859   esac
3860 done
3861 test "$ac_cv_exeext" = no && ac_cv_exeext=
3862
3863 else
3864   ac_file=''
3865 fi
3866 if test -z "$ac_file"; then :
3867   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3868 $as_echo "no" >&6; }
3869 $as_echo "$as_me: failed program was:" >&5
3870 sed 's/^/| /' conftest.$ac_ext >&5
3871
3872 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3873 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3874 as_fn_error 77 "C compiler cannot create executables
3875 See \`config.log' for more details" "$LINENO" 5; }
3876 else
3877   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3878 $as_echo "yes" >&6; }
3879 fi
3880 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3881 $as_echo_n "checking for C compiler default output file name... " >&6; }
3882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3883 $as_echo "$ac_file" >&6; }
3884 ac_exeext=$ac_cv_exeext
3885
3886 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3887 ac_clean_files=$ac_clean_files_save
3888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3889 $as_echo_n "checking for suffix of executables... " >&6; }
3890 if { { ac_try="$ac_link"
3891 case "(($ac_try" in
3892   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3893   *) ac_try_echo=$ac_try;;
3894 esac
3895 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3896 $as_echo "$ac_try_echo"; } >&5
3897   (eval "$ac_link") 2>&5
3898   ac_status=$?
3899   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3900   test $ac_status = 0; }; then :
3901   # If both `conftest.exe' and `conftest' are `present' (well, observable)
3902 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3903 # work properly (i.e., refer to `conftest.exe'), while it won't with
3904 # `rm'.
3905 for ac_file in conftest.exe conftest conftest.*; do
3906   test -f "$ac_file" || continue
3907   case $ac_file in
3908     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3909     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3910           break;;
3911     * ) break;;
3912   esac
3913 done
3914 else
3915   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3916 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3917 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3918 See \`config.log' for more details" "$LINENO" 5; }
3919 fi
3920 rm -f conftest conftest$ac_cv_exeext
3921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3922 $as_echo "$ac_cv_exeext" >&6; }
3923
3924 rm -f conftest.$ac_ext
3925 EXEEXT=$ac_cv_exeext
3926 ac_exeext=$EXEEXT
3927 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3928 /* end confdefs.h.  */
3929 #include <stdio.h>
3930 int
3931 main ()
3932 {
3933 FILE *f = fopen ("conftest.out", "w");
3934  return ferror (f) || fclose (f) != 0;
3935
3936   ;
3937   return 0;
3938 }
3939 _ACEOF
3940 ac_clean_files="$ac_clean_files conftest.out"
3941 # Check that the compiler produces executables we can run.  If not, either
3942 # the compiler is broken, or we cross compile.
3943 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3944 $as_echo_n "checking whether we are cross compiling... " >&6; }
3945 if test "$cross_compiling" != yes; then
3946   { { ac_try="$ac_link"
3947 case "(($ac_try" in
3948   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3949   *) ac_try_echo=$ac_try;;
3950 esac
3951 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3952 $as_echo "$ac_try_echo"; } >&5
3953   (eval "$ac_link") 2>&5
3954   ac_status=$?
3955   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3956   test $ac_status = 0; }
3957   if { ac_try='./conftest$ac_cv_exeext'
3958   { { case "(($ac_try" in
3959   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3960   *) ac_try_echo=$ac_try;;
3961 esac
3962 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3963 $as_echo "$ac_try_echo"; } >&5
3964   (eval "$ac_try") 2>&5
3965   ac_status=$?
3966   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3967   test $ac_status = 0; }; }; then
3968     cross_compiling=no
3969   else
3970     if test "$cross_compiling" = maybe; then
3971         cross_compiling=yes
3972     else
3973         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3974 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3975 as_fn_error $? "cannot run C compiled programs.
3976 If you meant to cross compile, use \`--host'.
3977 See \`config.log' for more details" "$LINENO" 5; }
3978     fi
3979   fi
3980 fi
3981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3982 $as_echo "$cross_compiling" >&6; }
3983
3984 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3985 ac_clean_files=$ac_clean_files_save
3986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3987 $as_echo_n "checking for suffix of object files... " >&6; }
3988 if ${ac_cv_objext+:} false; then :
3989   $as_echo_n "(cached) " >&6
3990 else
3991   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3992 /* end confdefs.h.  */
3993
3994 int
3995 main ()
3996 {
3997
3998   ;
3999   return 0;
4000 }
4001 _ACEOF
4002 rm -f conftest.o conftest.obj
4003 if { { ac_try="$ac_compile"
4004 case "(($ac_try" in
4005   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4006   *) ac_try_echo=$ac_try;;
4007 esac
4008 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4009 $as_echo "$ac_try_echo"; } >&5
4010   (eval "$ac_compile") 2>&5
4011   ac_status=$?
4012   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4013   test $ac_status = 0; }; then :
4014   for ac_file in conftest.o conftest.obj conftest.*; do
4015   test -f "$ac_file" || continue;
4016   case $ac_file in
4017     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4018     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4019        break;;
4020   esac
4021 done
4022 else
4023   $as_echo "$as_me: failed program was:" >&5
4024 sed 's/^/| /' conftest.$ac_ext >&5
4025
4026 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4027 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4028 as_fn_error $? "cannot compute suffix of object files: cannot compile
4029 See \`config.log' for more details" "$LINENO" 5; }
4030 fi
4031 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4032 fi
4033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4034 $as_echo "$ac_cv_objext" >&6; }
4035 OBJEXT=$ac_cv_objext
4036 ac_objext=$OBJEXT
4037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4038 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4039 if ${ac_cv_c_compiler_gnu+:} false; then :
4040   $as_echo_n "(cached) " >&6
4041 else
4042   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4043 /* end confdefs.h.  */
4044
4045 int
4046 main ()
4047 {
4048 #ifndef __GNUC__
4049        choke me
4050 #endif
4051
4052   ;
4053   return 0;
4054 }
4055 _ACEOF
4056 if ac_fn_c_try_compile "$LINENO"; then :
4057   ac_compiler_gnu=yes
4058 else
4059   ac_compiler_gnu=no
4060 fi
4061 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4062 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4063
4064 fi
4065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4066 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4067 if test $ac_compiler_gnu = yes; then
4068   GCC=yes
4069 else
4070   GCC=
4071 fi
4072 ac_test_CFLAGS=${CFLAGS+set}
4073 ac_save_CFLAGS=$CFLAGS
4074 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4075 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4076 if ${ac_cv_prog_cc_g+:} false; then :
4077   $as_echo_n "(cached) " >&6
4078 else
4079   ac_save_c_werror_flag=$ac_c_werror_flag
4080    ac_c_werror_flag=yes
4081    ac_cv_prog_cc_g=no
4082    CFLAGS="-g"
4083    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4084 /* end confdefs.h.  */
4085
4086 int
4087 main ()
4088 {
4089
4090   ;
4091   return 0;
4092 }
4093 _ACEOF
4094 if ac_fn_c_try_compile "$LINENO"; then :
4095   ac_cv_prog_cc_g=yes
4096 else
4097   CFLAGS=""
4098       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4099 /* end confdefs.h.  */
4100
4101 int
4102 main ()
4103 {
4104
4105   ;
4106   return 0;
4107 }
4108 _ACEOF
4109 if ac_fn_c_try_compile "$LINENO"; then :
4110
4111 else
4112   ac_c_werror_flag=$ac_save_c_werror_flag
4113          CFLAGS="-g"
4114          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4115 /* end confdefs.h.  */
4116
4117 int
4118 main ()
4119 {
4120
4121   ;
4122   return 0;
4123 }
4124 _ACEOF
4125 if ac_fn_c_try_compile "$LINENO"; then :
4126   ac_cv_prog_cc_g=yes
4127 fi
4128 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4129 fi
4130 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4131 fi
4132 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4133    ac_c_werror_flag=$ac_save_c_werror_flag
4134 fi
4135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4136 $as_echo "$ac_cv_prog_cc_g" >&6; }
4137 if test "$ac_test_CFLAGS" = set; then
4138   CFLAGS=$ac_save_CFLAGS
4139 elif test $ac_cv_prog_cc_g = yes; then
4140   if test "$GCC" = yes; then
4141     CFLAGS="-g -O2"
4142   else
4143     CFLAGS="-g"
4144   fi
4145 else
4146   if test "$GCC" = yes; then
4147     CFLAGS="-O2"
4148   else
4149     CFLAGS=
4150   fi
4151 fi
4152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4153 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4154 if ${ac_cv_prog_cc_c89+:} false; then :
4155   $as_echo_n "(cached) " >&6
4156 else
4157   ac_cv_prog_cc_c89=no
4158 ac_save_CC=$CC
4159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4160 /* end confdefs.h.  */
4161 #include <stdarg.h>
4162 #include <stdio.h>
4163 struct stat;
4164 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4165 struct buf { int x; };
4166 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4167 static char *e (p, i)
4168      char **p;
4169      int i;
4170 {
4171   return p[i];
4172 }
4173 static char *f (char * (*g) (char **, int), char **p, ...)
4174 {
4175   char *s;
4176   va_list v;
4177   va_start (v,p);
4178   s = g (p, va_arg (v,int));
4179   va_end (v);
4180   return s;
4181 }
4182
4183 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
4184    function prototypes and stuff, but not '\xHH' hex character constants.
4185    These don't provoke an error unfortunately, instead are silently treated
4186    as 'x'.  The following induces an error, until -std is added to get
4187    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
4188    array size at least.  It's necessary to write '\x00'==0 to get something
4189    that's true only with -std.  */
4190 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4191
4192 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4193    inside strings and character constants.  */
4194 #define FOO(x) 'x'
4195 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4196
4197 int test (int i, double x);
4198 struct s1 {int (*f) (int a);};
4199 struct s2 {int (*f) (double a);};
4200 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4201 int argc;
4202 char **argv;
4203 int
4204 main ()
4205 {
4206 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4207   ;
4208   return 0;
4209 }
4210 _ACEOF
4211 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4212         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4213 do
4214   CC="$ac_save_CC $ac_arg"
4215   if ac_fn_c_try_compile "$LINENO"; then :
4216   ac_cv_prog_cc_c89=$ac_arg
4217 fi
4218 rm -f core conftest.err conftest.$ac_objext
4219   test "x$ac_cv_prog_cc_c89" != "xno" && break
4220 done
4221 rm -f conftest.$ac_ext
4222 CC=$ac_save_CC
4223
4224 fi
4225 # AC_CACHE_VAL
4226 case "x$ac_cv_prog_cc_c89" in
4227   x)
4228     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4229 $as_echo "none needed" >&6; } ;;
4230   xno)
4231     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4232 $as_echo "unsupported" >&6; } ;;
4233   *)
4234     CC="$CC $ac_cv_prog_cc_c89"
4235     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4236 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4237 esac
4238 if test "x$ac_cv_prog_cc_c89" != xno; then :
4239
4240 fi
4241
4242 ac_ext=c
4243 ac_cpp='$CPP $CPPFLAGS'
4244 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4245 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4246 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4247
4248
4249 # Check if it's Intel's compiler, which (usually) pretends to be gcc,
4250 # but has idiosyncrasies of its own.  We assume icc will define
4251 # __INTEL_COMPILER regardless of CFLAGS.
4252
4253 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4254 /* end confdefs.h.  */
4255
4256 int
4257 main ()
4258 {
4259 #ifndef __INTEL_COMPILER
4260 choke me
4261 #endif
4262   ;
4263   return 0;
4264 }
4265 _ACEOF
4266 if ac_fn_c_try_compile "$LINENO"; then :
4267   ICC=yes
4268 else
4269   ICC=no
4270 fi
4271 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4272
4273 # Check if it's Sun Studio compiler. We assume that
4274 # __SUNPRO_C will be defined for Sun Studio compilers
4275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4276 /* end confdefs.h.  */
4277
4278 int
4279 main ()
4280 {
4281 #ifndef __SUNPRO_C
4282 choke me
4283 #endif
4284   ;
4285   return 0;
4286 }
4287 _ACEOF
4288 if ac_fn_c_try_compile "$LINENO"; then :
4289   SUN_STUDIO_CC=yes
4290 else
4291   SUN_STUDIO_CC=no
4292 fi
4293 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4294
4295
4296
4297 unset CFLAGS
4298
4299 #
4300 # Read the template
4301 #
4302 . "$srcdir/src/template/$template" || exit
4303
4304 # CFLAGS are selected so:
4305 # If the user specifies something in the environment, that is used.
4306 # else:  If the template file set something, that is used.
4307 # else:  If coverage was enabled, don't set anything.
4308 # else:  If the compiler is GCC, then we use -O2.
4309 # else:  If the compiler is something else, then we use -O, unless debugging.
4310
4311 if test "$ac_env_CFLAGS_set" = set; then
4312   CFLAGS=$ac_env_CFLAGS_value
4313 elif test "${CFLAGS+set}" = set; then
4314   : # (keep what template set)
4315 elif test "$enable_coverage" = yes; then
4316   : # no optimization by default
4317 elif test "$GCC" = yes; then
4318   CFLAGS="-O2"
4319 else
4320   # if the user selected debug mode, don't use -O
4321   if test "$enable_debug" != yes; then
4322     CFLAGS="-O"
4323   fi
4324 fi
4325
4326 # set CFLAGS_VECTOR from the environment, if available
4327 if test "$ac_env_CFLAGS_VECTOR_set" = set; then
4328   CFLAGS_VECTOR=$ac_env_CFLAGS_VECTOR_value
4329 fi
4330
4331 # Some versions of GCC support some additional useful warning flags.
4332 # Check whether they are supported, and add them to CFLAGS if so.
4333 # ICC pretends to be GCC but it's lying; it doesn't support these flags,
4334 # but has its own.  Also check other compiler-specific flags here.
4335
4336 if test "$GCC" = yes -a "$ICC" = no; then
4337   CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wpointer-arith"
4338   # These work in some but not all gcc versions
4339   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wdeclaration-after-statement" >&5
4340 $as_echo_n "checking whether $CC supports -Wdeclaration-after-statement... " >&6; }
4341 if ${pgac_cv_prog_cc_cflags__Wdeclaration_after_statement+:} false; then :
4342   $as_echo_n "(cached) " >&6
4343 else
4344   pgac_save_CFLAGS=$CFLAGS
4345 CFLAGS="$pgac_save_CFLAGS -Wdeclaration-after-statement"
4346 ac_save_c_werror_flag=$ac_c_werror_flag
4347 ac_c_werror_flag=yes
4348 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4349 /* end confdefs.h.  */
4350
4351 int
4352 main ()
4353 {
4354
4355   ;
4356   return 0;
4357 }
4358 _ACEOF
4359 if ac_fn_c_try_compile "$LINENO"; then :
4360   pgac_cv_prog_cc_cflags__Wdeclaration_after_statement=yes
4361 else
4362   pgac_cv_prog_cc_cflags__Wdeclaration_after_statement=no
4363 fi
4364 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4365 ac_c_werror_flag=$ac_save_c_werror_flag
4366 CFLAGS="$pgac_save_CFLAGS"
4367 fi
4368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" >&5
4369 $as_echo "$pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" >&6; }
4370 if test x"$pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" = x"yes"; then
4371   CFLAGS="$CFLAGS -Wdeclaration-after-statement"
4372 fi
4373
4374   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wendif-labels" >&5
4375 $as_echo_n "checking whether $CC supports -Wendif-labels... " >&6; }
4376 if ${pgac_cv_prog_cc_cflags__Wendif_labels+:} false; then :
4377   $as_echo_n "(cached) " >&6
4378 else
4379   pgac_save_CFLAGS=$CFLAGS
4380 CFLAGS="$pgac_save_CFLAGS -Wendif-labels"
4381 ac_save_c_werror_flag=$ac_c_werror_flag
4382 ac_c_werror_flag=yes
4383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4384 /* end confdefs.h.  */
4385
4386 int
4387 main ()
4388 {
4389
4390   ;
4391   return 0;
4392 }
4393 _ACEOF
4394 if ac_fn_c_try_compile "$LINENO"; then :
4395   pgac_cv_prog_cc_cflags__Wendif_labels=yes
4396 else
4397   pgac_cv_prog_cc_cflags__Wendif_labels=no
4398 fi
4399 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4400 ac_c_werror_flag=$ac_save_c_werror_flag
4401 CFLAGS="$pgac_save_CFLAGS"
4402 fi
4403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wendif_labels" >&5
4404 $as_echo "$pgac_cv_prog_cc_cflags__Wendif_labels" >&6; }
4405 if test x"$pgac_cv_prog_cc_cflags__Wendif_labels" = x"yes"; then
4406   CFLAGS="$CFLAGS -Wendif-labels"
4407 fi
4408
4409   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wmissing-format-attribute" >&5
4410 $as_echo_n "checking whether $CC supports -Wmissing-format-attribute... " >&6; }
4411 if ${pgac_cv_prog_cc_cflags__Wmissing_format_attribute+:} false; then :
4412   $as_echo_n "(cached) " >&6
4413 else
4414   pgac_save_CFLAGS=$CFLAGS
4415 CFLAGS="$pgac_save_CFLAGS -Wmissing-format-attribute"
4416 ac_save_c_werror_flag=$ac_c_werror_flag
4417 ac_c_werror_flag=yes
4418 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4419 /* end confdefs.h.  */
4420
4421 int
4422 main ()
4423 {
4424
4425   ;
4426   return 0;
4427 }
4428 _ACEOF
4429 if ac_fn_c_try_compile "$LINENO"; then :
4430   pgac_cv_prog_cc_cflags__Wmissing_format_attribute=yes
4431 else
4432   pgac_cv_prog_cc_cflags__Wmissing_format_attribute=no
4433 fi
4434 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4435 ac_c_werror_flag=$ac_save_c_werror_flag
4436 CFLAGS="$pgac_save_CFLAGS"
4437 fi
4438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wmissing_format_attribute" >&5
4439 $as_echo "$pgac_cv_prog_cc_cflags__Wmissing_format_attribute" >&6; }
4440 if test x"$pgac_cv_prog_cc_cflags__Wmissing_format_attribute" = x"yes"; then
4441   CFLAGS="$CFLAGS -Wmissing-format-attribute"
4442 fi
4443
4444   # This was included in -Wall/-Wformat in older GCC versions
4445   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wformat-security" >&5
4446 $as_echo_n "checking whether $CC supports -Wformat-security... " >&6; }
4447 if ${pgac_cv_prog_cc_cflags__Wformat_security+:} false; then :
4448   $as_echo_n "(cached) " >&6
4449 else
4450   pgac_save_CFLAGS=$CFLAGS
4451 CFLAGS="$pgac_save_CFLAGS -Wformat-security"
4452 ac_save_c_werror_flag=$ac_c_werror_flag
4453 ac_c_werror_flag=yes
4454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4455 /* end confdefs.h.  */
4456
4457 int
4458 main ()
4459 {
4460
4461   ;
4462   return 0;
4463 }
4464 _ACEOF
4465 if ac_fn_c_try_compile "$LINENO"; then :
4466   pgac_cv_prog_cc_cflags__Wformat_security=yes
4467 else
4468   pgac_cv_prog_cc_cflags__Wformat_security=no
4469 fi
4470 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4471 ac_c_werror_flag=$ac_save_c_werror_flag
4472 CFLAGS="$pgac_save_CFLAGS"
4473 fi
4474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wformat_security" >&5
4475 $as_echo "$pgac_cv_prog_cc_cflags__Wformat_security" >&6; }
4476 if test x"$pgac_cv_prog_cc_cflags__Wformat_security" = x"yes"; then
4477   CFLAGS="$CFLAGS -Wformat-security"
4478 fi
4479
4480   # Disable strict-aliasing rules; needed for gcc 3.3+
4481   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fno-strict-aliasing" >&5
4482 $as_echo_n "checking whether $CC supports -fno-strict-aliasing... " >&6; }
4483 if ${pgac_cv_prog_cc_cflags__fno_strict_aliasing+:} false; then :
4484   $as_echo_n "(cached) " >&6
4485 else
4486   pgac_save_CFLAGS=$CFLAGS
4487 CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing"
4488 ac_save_c_werror_flag=$ac_c_werror_flag
4489 ac_c_werror_flag=yes
4490 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4491 /* end confdefs.h.  */
4492
4493 int
4494 main ()
4495 {
4496
4497   ;
4498   return 0;
4499 }
4500 _ACEOF
4501 if ac_fn_c_try_compile "$LINENO"; then :
4502   pgac_cv_prog_cc_cflags__fno_strict_aliasing=yes
4503 else
4504   pgac_cv_prog_cc_cflags__fno_strict_aliasing=no
4505 fi
4506 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4507 ac_c_werror_flag=$ac_save_c_werror_flag
4508 CFLAGS="$pgac_save_CFLAGS"
4509 fi
4510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&5
4511 $as_echo "$pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&6; }
4512 if test x"$pgac_cv_prog_cc_cflags__fno_strict_aliasing" = x"yes"; then
4513   CFLAGS="$CFLAGS -fno-strict-aliasing"
4514 fi
4515
4516   # Disable optimizations that assume no overflow; needed for gcc 4.3+
4517   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fwrapv" >&5
4518 $as_echo_n "checking whether $CC supports -fwrapv... " >&6; }
4519 if ${pgac_cv_prog_cc_cflags__fwrapv+:} false; then :
4520   $as_echo_n "(cached) " >&6
4521 else
4522   pgac_save_CFLAGS=$CFLAGS
4523 CFLAGS="$pgac_save_CFLAGS -fwrapv"
4524 ac_save_c_werror_flag=$ac_c_werror_flag
4525 ac_c_werror_flag=yes
4526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4527 /* end confdefs.h.  */
4528
4529 int
4530 main ()
4531 {
4532
4533   ;
4534   return 0;
4535 }
4536 _ACEOF
4537 if ac_fn_c_try_compile "$LINENO"; then :
4538   pgac_cv_prog_cc_cflags__fwrapv=yes
4539 else
4540   pgac_cv_prog_cc_cflags__fwrapv=no
4541 fi
4542 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4543 ac_c_werror_flag=$ac_save_c_werror_flag
4544 CFLAGS="$pgac_save_CFLAGS"
4545 fi
4546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fwrapv" >&5
4547 $as_echo "$pgac_cv_prog_cc_cflags__fwrapv" >&6; }
4548 if test x"$pgac_cv_prog_cc_cflags__fwrapv" = x"yes"; then
4549   CFLAGS="$CFLAGS -fwrapv"
4550 fi
4551
4552   # Disable FP optimizations that cause various errors on gcc 4.5+ or maybe 4.6+
4553   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fexcess-precision=standard" >&5
4554 $as_echo_n "checking whether $CC supports -fexcess-precision=standard... " >&6; }
4555 if ${pgac_cv_prog_cc_cflags__fexcess_precision_standard+:} false; then :
4556   $as_echo_n "(cached) " >&6
4557 else
4558   pgac_save_CFLAGS=$CFLAGS
4559 CFLAGS="$pgac_save_CFLAGS -fexcess-precision=standard"
4560 ac_save_c_werror_flag=$ac_c_werror_flag
4561 ac_c_werror_flag=yes
4562 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4563 /* end confdefs.h.  */
4564
4565 int
4566 main ()
4567 {
4568
4569   ;
4570   return 0;
4571 }
4572 _ACEOF
4573 if ac_fn_c_try_compile "$LINENO"; then :
4574   pgac_cv_prog_cc_cflags__fexcess_precision_standard=yes
4575 else
4576   pgac_cv_prog_cc_cflags__fexcess_precision_standard=no
4577 fi
4578 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4579 ac_c_werror_flag=$ac_save_c_werror_flag
4580 CFLAGS="$pgac_save_CFLAGS"
4581 fi
4582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fexcess_precision_standard" >&5
4583 $as_echo "$pgac_cv_prog_cc_cflags__fexcess_precision_standard" >&6; }
4584 if test x"$pgac_cv_prog_cc_cflags__fexcess_precision_standard" = x"yes"; then
4585   CFLAGS="$CFLAGS -fexcess-precision=standard"
4586 fi
4587
4588   # Optimization flags for specific files that benefit from vectorization
4589   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -funroll-loops" >&5
4590 $as_echo_n "checking whether $CC supports -funroll-loops... " >&6; }
4591 if ${pgac_cv_prog_cc_cflags__funroll_loops+:} false; then :
4592   $as_echo_n "(cached) " >&6
4593 else
4594   pgac_save_CFLAGS=$CFLAGS
4595 CFLAGS="$pgac_save_CFLAGS -funroll-loops"
4596 ac_save_c_werror_flag=$ac_c_werror_flag
4597 ac_c_werror_flag=yes
4598 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4599 /* end confdefs.h.  */
4600
4601 int
4602 main ()
4603 {
4604
4605   ;
4606   return 0;
4607 }
4608 _ACEOF
4609 if ac_fn_c_try_compile "$LINENO"; then :
4610   pgac_cv_prog_cc_cflags__funroll_loops=yes
4611 else
4612   pgac_cv_prog_cc_cflags__funroll_loops=no
4613 fi
4614 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4615 ac_c_werror_flag=$ac_save_c_werror_flag
4616 CFLAGS="$pgac_save_CFLAGS"
4617 fi
4618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__funroll_loops" >&5
4619 $as_echo "$pgac_cv_prog_cc_cflags__funroll_loops" >&6; }
4620 if test x"$pgac_cv_prog_cc_cflags__funroll_loops" = x"yes"; then
4621   CFLAGS_VECTOR="${CFLAGS_VECTOR} -funroll-loops"
4622 fi
4623
4624   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -ftree-vectorize" >&5
4625 $as_echo_n "checking whether $CC supports -ftree-vectorize... " >&6; }
4626 if ${pgac_cv_prog_cc_cflags__ftree_vectorize+:} false; then :
4627   $as_echo_n "(cached) " >&6
4628 else
4629   pgac_save_CFLAGS=$CFLAGS
4630 CFLAGS="$pgac_save_CFLAGS -ftree-vectorize"
4631 ac_save_c_werror_flag=$ac_c_werror_flag
4632 ac_c_werror_flag=yes
4633 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4634 /* end confdefs.h.  */
4635
4636 int
4637 main ()
4638 {
4639
4640   ;
4641   return 0;
4642 }
4643 _ACEOF
4644 if ac_fn_c_try_compile "$LINENO"; then :
4645   pgac_cv_prog_cc_cflags__ftree_vectorize=yes
4646 else
4647   pgac_cv_prog_cc_cflags__ftree_vectorize=no
4648 fi
4649 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4650 ac_c_werror_flag=$ac_save_c_werror_flag
4651 CFLAGS="$pgac_save_CFLAGS"
4652 fi
4653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__ftree_vectorize" >&5
4654 $as_echo "$pgac_cv_prog_cc_cflags__ftree_vectorize" >&6; }
4655 if test x"$pgac_cv_prog_cc_cflags__ftree_vectorize" = x"yes"; then
4656   CFLAGS_VECTOR="${CFLAGS_VECTOR} -ftree-vectorize"
4657 fi
4658
4659 elif test "$ICC" = yes; then
4660   # Intel's compiler has a bug/misoptimization in checking for
4661   # division by NAN (NaN == 0), -mp1 fixes it, so add it to the CFLAGS.
4662   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -mp1" >&5
4663 $as_echo_n "checking whether $CC supports -mp1... " >&6; }
4664 if ${pgac_cv_prog_cc_cflags__mp1+:} false; then :
4665   $as_echo_n "(cached) " >&6
4666 else
4667   pgac_save_CFLAGS=$CFLAGS
4668 CFLAGS="$pgac_save_CFLAGS -mp1"
4669 ac_save_c_werror_flag=$ac_c_werror_flag
4670 ac_c_werror_flag=yes
4671 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4672 /* end confdefs.h.  */
4673
4674 int
4675 main ()
4676 {
4677
4678   ;
4679   return 0;
4680 }
4681 _ACEOF
4682 if ac_fn_c_try_compile "$LINENO"; then :
4683   pgac_cv_prog_cc_cflags__mp1=yes
4684 else
4685   pgac_cv_prog_cc_cflags__mp1=no
4686 fi
4687 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4688 ac_c_werror_flag=$ac_save_c_werror_flag
4689 CFLAGS="$pgac_save_CFLAGS"
4690 fi
4691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__mp1" >&5
4692 $as_echo "$pgac_cv_prog_cc_cflags__mp1" >&6; }
4693 if test x"$pgac_cv_prog_cc_cflags__mp1" = x"yes"; then
4694   CFLAGS="$CFLAGS -mp1"
4695 fi
4696
4697   # Make sure strict aliasing is off (though this is said to be the default)
4698   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fno-strict-aliasing" >&5
4699 $as_echo_n "checking whether $CC supports -fno-strict-aliasing... " >&6; }
4700 if ${pgac_cv_prog_cc_cflags__fno_strict_aliasing+:} false; then :
4701   $as_echo_n "(cached) " >&6
4702 else
4703   pgac_save_CFLAGS=$CFLAGS
4704 CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing"
4705 ac_save_c_werror_flag=$ac_c_werror_flag
4706 ac_c_werror_flag=yes
4707 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4708 /* end confdefs.h.  */
4709
4710 int
4711 main ()
4712 {
4713
4714   ;
4715   return 0;
4716 }
4717 _ACEOF
4718 if ac_fn_c_try_compile "$LINENO"; then :
4719   pgac_cv_prog_cc_cflags__fno_strict_aliasing=yes
4720 else
4721   pgac_cv_prog_cc_cflags__fno_strict_aliasing=no
4722 fi
4723 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4724 ac_c_werror_flag=$ac_save_c_werror_flag
4725 CFLAGS="$pgac_save_CFLAGS"
4726 fi
4727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&5
4728 $as_echo "$pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&6; }
4729 if test x"$pgac_cv_prog_cc_cflags__fno_strict_aliasing" = x"yes"; then
4730   CFLAGS="$CFLAGS -fno-strict-aliasing"
4731 fi
4732
4733 elif test "$PORTNAME" = "aix"; then
4734   # AIX's xlc has to have strict aliasing turned off too
4735   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -qnoansialias" >&5
4736 $as_echo_n "checking whether $CC supports -qnoansialias... " >&6; }
4737 if ${pgac_cv_prog_cc_cflags__qnoansialias+:} false; then :
4738   $as_echo_n "(cached) " >&6
4739 else
4740   pgac_save_CFLAGS=$CFLAGS
4741 CFLAGS="$pgac_save_CFLAGS -qnoansialias"
4742 ac_save_c_werror_flag=$ac_c_werror_flag
4743 ac_c_werror_flag=yes
4744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4745 /* end confdefs.h.  */
4746
4747 int
4748 main ()
4749 {
4750
4751   ;
4752   return 0;
4753 }
4754 _ACEOF
4755 if ac_fn_c_try_compile "$LINENO"; then :
4756   pgac_cv_prog_cc_cflags__qnoansialias=yes
4757 else
4758   pgac_cv_prog_cc_cflags__qnoansialias=no
4759 fi
4760 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4761 ac_c_werror_flag=$ac_save_c_werror_flag
4762 CFLAGS="$pgac_save_CFLAGS"
4763 fi
4764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__qnoansialias" >&5
4765 $as_echo "$pgac_cv_prog_cc_cflags__qnoansialias" >&6; }
4766 if test x"$pgac_cv_prog_cc_cflags__qnoansialias" = x"yes"; then
4767   CFLAGS="$CFLAGS -qnoansialias"
4768 fi
4769
4770 elif test "$PORTNAME" = "hpux"; then
4771   # On some versions of HP-UX, libm functions do not set errno by default.
4772   # Fix that by using +Olibmerrno if the compiler recognizes it.
4773   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports +Olibmerrno" >&5
4774 $as_echo_n "checking whether $CC supports +Olibmerrno... " >&6; }
4775 if ${pgac_cv_prog_cc_cflags_pOlibmerrno+:} false; then :
4776   $as_echo_n "(cached) " >&6
4777 else
4778   pgac_save_CFLAGS=$CFLAGS
4779 CFLAGS="$pgac_save_CFLAGS +Olibmerrno"
4780 ac_save_c_werror_flag=$ac_c_werror_flag
4781 ac_c_werror_flag=yes
4782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4783 /* end confdefs.h.  */
4784
4785 int
4786 main ()
4787 {
4788
4789   ;
4790   return 0;
4791 }
4792 _ACEOF
4793 if ac_fn_c_try_compile "$LINENO"; then :
4794   pgac_cv_prog_cc_cflags_pOlibmerrno=yes
4795 else
4796   pgac_cv_prog_cc_cflags_pOlibmerrno=no
4797 fi
4798 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4799 ac_c_werror_flag=$ac_save_c_werror_flag
4800 CFLAGS="$pgac_save_CFLAGS"
4801 fi
4802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags_pOlibmerrno" >&5
4803 $as_echo "$pgac_cv_prog_cc_cflags_pOlibmerrno" >&6; }
4804 if test x"$pgac_cv_prog_cc_cflags_pOlibmerrno" = x"yes"; then
4805   CFLAGS="$CFLAGS +Olibmerrno"
4806 fi
4807
4808 fi
4809
4810 CFLAGS_VECTOR=$CFLAGS_VECTOR
4811
4812
4813 # supply -g if --enable-debug
4814 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
4815   CFLAGS="$CFLAGS -g"
4816 fi
4817
4818 # enable code coverage if --enable-coverage
4819 if test "$enable_coverage" = yes; then
4820   if test "$GCC" = yes; then
4821     CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
4822   else
4823     as_fn_error $? "--enable-coverage is supported only when using GCC" "$LINENO" 5
4824   fi
4825 fi
4826
4827 # enable profiling if --enable-profiling
4828 if test "$enable_profiling" = yes && test "$ac_cv_prog_cc_g" = yes; then
4829   if test "$GCC" = yes; then
4830
4831 $as_echo "#define PROFILE_PID_DIR 1" >>confdefs.h
4832
4833     CFLAGS="$CFLAGS -pg $PLATFORM_PROFILE_FLAGS"
4834   else
4835     as_fn_error $? "--enable-profiling is supported only when using GCC" "$LINENO" 5
4836   fi
4837 fi
4838
4839 # We already have this in Makefile.win32, but configure needs it too
4840 if test "$PORTNAME" = "win32"; then
4841   CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32 -DEXEC_BACKEND"
4842 fi
4843
4844 # Check if the compiler still works with the template settings
4845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler still works" >&5
4846 $as_echo_n "checking whether the C compiler still works... " >&6; }
4847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4848 /* end confdefs.h.  */
4849
4850 int
4851 main ()
4852 {
4853 return 0;
4854   ;
4855   return 0;
4856 }
4857 _ACEOF
4858 if ac_fn_c_try_link "$LINENO"; then :
4859   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4860 $as_echo "yes" >&6; }
4861 else
4862   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4863 $as_echo "no" >&6; }
4864    as_fn_error $? "cannot proceed" "$LINENO" 5
4865 fi
4866 rm -f core conftest.err conftest.$ac_objext \
4867     conftest$ac_exeext conftest.$ac_ext
4868
4869 # Defend against gcc -ffast-math
4870 if test "$GCC" = yes; then
4871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4872 /* end confdefs.h.  */
4873
4874 int
4875 main ()
4876 {
4877 #ifdef __FAST_MATH__
4878 choke me
4879 #endif
4880   ;
4881   return 0;
4882 }
4883 _ACEOF
4884 if ac_fn_c_try_compile "$LINENO"; then :
4885
4886 else
4887   as_fn_error $? "do not put -ffast-math in CFLAGS" "$LINENO" 5
4888 fi
4889 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4890 fi
4891
4892 ac_ext=c
4893 ac_cpp='$CPP $CPPFLAGS'
4894 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4895 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4896 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4898 $as_echo_n "checking how to run the C preprocessor... " >&6; }
4899 # On Suns, sometimes $CPP names a directory.
4900 if test -n "$CPP" && test -d "$CPP"; then
4901   CPP=
4902 fi
4903 if test -z "$CPP"; then
4904   if ${ac_cv_prog_CPP+:} false; then :
4905   $as_echo_n "(cached) " >&6
4906 else
4907       # Double quotes because CPP needs to be expanded
4908     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4909     do
4910       ac_preproc_ok=false
4911 for ac_c_preproc_warn_flag in '' yes
4912 do
4913   # Use a header file that comes with gcc, so configuring glibc
4914   # with a fresh cross-compiler works.
4915   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4916   # <limits.h> exists even on freestanding compilers.
4917   # On the NeXT, cc -E runs the code through the compiler's parser,
4918   # not just through cpp. "Syntax error" is here to catch this case.
4919   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4920 /* end confdefs.h.  */
4921 #ifdef __STDC__
4922 # include <limits.h>
4923 #else
4924 # include <assert.h>
4925 #endif
4926                      Syntax error
4927 _ACEOF
4928 if ac_fn_c_try_cpp "$LINENO"; then :
4929
4930 else
4931   # Broken: fails on valid input.
4932 continue
4933 fi
4934 rm -f conftest.err conftest.i conftest.$ac_ext
4935
4936   # OK, works on sane cases.  Now check whether nonexistent headers
4937   # can be detected and how.
4938   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4939 /* end confdefs.h.  */
4940 #include <ac_nonexistent.h>
4941 _ACEOF
4942 if ac_fn_c_try_cpp "$LINENO"; then :
4943   # Broken: success on invalid input.
4944 continue
4945 else
4946   # Passes both tests.
4947 ac_preproc_ok=:
4948 break
4949 fi
4950 rm -f conftest.err conftest.i conftest.$ac_ext
4951
4952 done
4953 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4954 rm -f conftest.i conftest.err conftest.$ac_ext
4955 if $ac_preproc_ok; then :
4956   break
4957 fi
4958
4959     done
4960     ac_cv_prog_CPP=$CPP
4961
4962 fi
4963   CPP=$ac_cv_prog_CPP
4964 else
4965   ac_cv_prog_CPP=$CPP
4966 fi
4967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4968 $as_echo "$CPP" >&6; }
4969 ac_preproc_ok=false
4970 for ac_c_preproc_warn_flag in '' yes
4971 do
4972   # Use a header file that comes with gcc, so configuring glibc
4973   # with a fresh cross-compiler works.
4974   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4975   # <limits.h> exists even on freestanding compilers.
4976   # On the NeXT, cc -E runs the code through the compiler's parser,
4977   # not just through cpp. "Syntax error" is here to catch this case.
4978   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4979 /* end confdefs.h.  */
4980 #ifdef __STDC__
4981 # include <limits.h>
4982 #else
4983 # include <assert.h>
4984 #endif
4985                      Syntax error
4986 _ACEOF
4987 if ac_fn_c_try_cpp "$LINENO"; then :
4988
4989 else
4990   # Broken: fails on valid input.
4991 continue
4992 fi
4993 rm -f conftest.err conftest.i conftest.$ac_ext
4994
4995   # OK, works on sane cases.  Now check whether nonexistent headers
4996   # can be detected and how.
4997   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4998 /* end confdefs.h.  */
4999 #include <ac_nonexistent.h>
5000 _ACEOF
5001 if ac_fn_c_try_cpp "$LINENO"; then :
5002   # Broken: success on invalid input.
5003 continue
5004 else
5005   # Passes both tests.
5006 ac_preproc_ok=:
5007 break
5008 fi
5009 rm -f conftest.err conftest.i conftest.$ac_ext
5010
5011 done
5012 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5013 rm -f conftest.i conftest.err conftest.$ac_ext
5014 if $ac_preproc_ok; then :
5015
5016 else
5017   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5018 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5019 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
5020 See \`config.log' for more details" "$LINENO" 5; }
5021 fi
5022
5023 ac_ext=c
5024 ac_cpp='$CPP $CPPFLAGS'
5025 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5026 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5027 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5028
5029
5030
5031
5032 #
5033 # Set up TAS assembly code if needed; the template file has now had its
5034 # chance to request this.
5035 #
5036 ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
5037
5038
5039 if test "$need_tas" = yes ; then
5040   TAS=tas.o
5041 else
5042   TAS=""
5043 fi
5044
5045
5046
5047 #
5048 # Automatic dependency tracking
5049 #
5050
5051
5052 # Check whether --enable-depend was given.
5053 if test "${enable_depend+set}" = set; then :
5054   enableval=$enable_depend;
5055   case $enableval in
5056     yes)
5057       autodepend=yes
5058       ;;
5059     no)
5060       :
5061       ;;
5062     *)
5063       as_fn_error $? "no argument expected for --enable-depend option" "$LINENO" 5
5064       ;;
5065   esac
5066
5067 else
5068   enable_depend=no
5069
5070 fi
5071
5072
5073
5074
5075
5076 #
5077 # Enable assert checks
5078 #
5079
5080
5081 # Check whether --enable-cassert was given.
5082 if test "${enable_cassert+set}" = set; then :
5083   enableval=$enable_cassert;
5084   case $enableval in
5085     yes)
5086
5087 $as_echo "#define USE_ASSERT_CHECKING 1" >>confdefs.h
5088
5089       ;;
5090     no)
5091       :
5092       ;;
5093     *)
5094       as_fn_error $? "no argument expected for --enable-cassert option" "$LINENO" 5
5095       ;;
5096   esac
5097
5098 else
5099   enable_cassert=no
5100
5101 fi
5102
5103
5104
5105
5106 #
5107 # Include directories
5108 #
5109 ac_save_IFS=$IFS
5110 IFS="${IFS}${PATH_SEPARATOR}"
5111 # SRCH_INC comes from the template file
5112 for dir in $with_includes $SRCH_INC; do
5113   if test -d "$dir"; then
5114     INCLUDES="$INCLUDES -I$dir"
5115   else
5116     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Include directory $dir does not exist." >&5
5117 $as_echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
5118   fi
5119 done
5120 IFS=$ac_save_IFS
5121
5122
5123
5124 #
5125 # Library directories
5126 #
5127 ac_save_IFS=$IFS
5128 IFS="${IFS}${PATH_SEPARATOR}"
5129 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
5130 for dir in $LIBRARY_DIRS $SRCH_LIB; do
5131   if test -d "$dir"; then
5132     LIBDIRS="$LIBDIRS -L$dir"
5133   else
5134     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Library directory $dir does not exist." >&5
5135 $as_echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
5136   fi
5137 done
5138 IFS=$ac_save_IFS
5139
5140 #
5141 # Enable thread-safe client libraries
5142 #
5143 { $as_echo "$as_me:${as_lineno-$LINENO}: checking allow thread-safe client libraries" >&5
5144 $as_echo_n "checking allow thread-safe client libraries... " >&6; }
5145
5146
5147 # Check whether --enable-thread-safety was given.
5148 if test "${enable_thread_safety+set}" = set; then :
5149   enableval=$enable_thread_safety;
5150   case $enableval in
5151     yes)
5152       :
5153       ;;
5154     no)
5155       :
5156       ;;
5157     *)
5158       as_fn_error $? "no argument expected for --enable-thread-safety option" "$LINENO" 5
5159       ;;
5160   esac
5161
5162 else
5163   enable_thread_safety=yes
5164
5165 fi
5166
5167
5168 if test "$enable_thread_safety" = yes; then
5169
5170 $as_echo "#define ENABLE_THREAD_SAFETY 1" >>confdefs.h
5171
5172 fi
5173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_thread_safety" >&5
5174 $as_echo "$enable_thread_safety" >&6; }
5175
5176
5177 #
5178 # Optionally build Tcl modules (PL/Tcl)
5179 #
5180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Tcl" >&5
5181 $as_echo_n "checking whether to build with Tcl... " >&6; }
5182
5183
5184
5185 # Check whether --with-tcl was given.
5186 if test "${with_tcl+set}" = set; then :
5187   withval=$with_tcl;
5188   case $withval in
5189     yes)
5190       :
5191       ;;
5192     no)
5193       :
5194       ;;
5195     *)
5196       as_fn_error $? "no argument expected for --with-tcl option" "$LINENO" 5
5197       ;;
5198   esac
5199
5200 else
5201   with_tcl=no
5202
5203 fi
5204
5205
5206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcl" >&5
5207 $as_echo "$with_tcl" >&6; }
5208
5209
5210 # We see if the path to the Tcl/Tk configuration scripts is specified.
5211 # This will override the use of tclsh to find the paths to search.
5212
5213
5214
5215
5216 # Check whether --with-tclconfig was given.
5217 if test "${with_tclconfig+set}" = set; then :
5218   withval=$with_tclconfig;
5219   case $withval in
5220     yes)
5221       as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
5222       ;;
5223     no)
5224       as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
5225       ;;
5226     *)
5227
5228       ;;
5229   esac
5230
5231 fi
5232
5233
5234
5235 #
5236 # Optionally build Perl modules (PL/Perl)
5237 #
5238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Perl modules" >&5
5239 $as_echo_n "checking whether to build Perl modules... " >&6; }
5240
5241
5242
5243 # Check whether --with-perl was given.
5244 if test "${with_perl+set}" = set; then :
5245   withval=$with_perl;
5246   case $withval in
5247     yes)
5248       :
5249       ;;
5250     no)
5251       :
5252       ;;
5253     *)
5254       as_fn_error $? "no argument expected for --with-perl option" "$LINENO" 5
5255       ;;
5256   esac
5257
5258 else
5259   with_perl=no
5260
5261 fi
5262
5263
5264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_perl" >&5
5265 $as_echo "$with_perl" >&6; }
5266
5267
5268 #
5269 # Optionally build Python modules (PL/Python)
5270 #
5271 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Python modules" >&5
5272 $as_echo_n "checking whether to build Python modules... " >&6; }
5273
5274
5275
5276 # Check whether --with-python was given.
5277 if test "${with_python+set}" = set; then :
5278   withval=$with_python;
5279   case $withval in
5280     yes)
5281       :
5282       ;;
5283     no)
5284       :
5285       ;;
5286     *)
5287       as_fn_error $? "no argument expected for --with-python option" "$LINENO" 5
5288       ;;
5289   esac
5290
5291 else
5292   with_python=no
5293
5294 fi
5295
5296
5297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
5298 $as_echo "$with_python" >&6; }
5299
5300
5301 #
5302 # GSSAPI
5303 #
5304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with GSSAPI support" >&5
5305 $as_echo_n "checking whether to build with GSSAPI support... " >&6; }
5306
5307
5308
5309 # Check whether --with-gssapi was given.
5310 if test "${with_gssapi+set}" = set; then :
5311   withval=$with_gssapi;
5312   case $withval in
5313     yes)
5314
5315
5316 $as_echo "#define ENABLE_GSS 1" >>confdefs.h
5317
5318   krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
5319
5320       ;;
5321     no)
5322       :
5323       ;;
5324     *)
5325       as_fn_error $? "no argument expected for --with-gssapi option" "$LINENO" 5
5326       ;;
5327   esac
5328
5329 else
5330   with_gssapi=no
5331
5332 fi
5333
5334
5335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_gssapi" >&5
5336 $as_echo "$with_gssapi" >&6; }
5337
5338
5339
5340
5341
5342 #
5343 # Kerberos configuration parameters
5344 #
5345
5346
5347
5348 # Check whether --with-krb-srvnam was given.
5349 if test "${with_krb_srvnam+set}" = set; then :
5350   withval=$with_krb_srvnam;
5351   case $withval in
5352     yes)
5353       as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
5354       ;;
5355     no)
5356       as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
5357       ;;
5358     *)
5359
5360       ;;
5361   esac
5362
5363 else
5364   with_krb_srvnam="postgres"
5365 fi
5366
5367
5368
5369 cat >>confdefs.h <<_ACEOF
5370 #define PG_KRB_SRVNAM "$with_krb_srvnam"
5371 _ACEOF
5372
5373
5374
5375 #
5376 # PAM
5377 #
5378 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with PAM support" >&5
5379 $as_echo_n "checking whether to build with PAM support... " >&6; }
5380
5381
5382
5383 # Check whether --with-pam was given.
5384 if test "${with_pam+set}" = set; then :
5385   withval=$with_pam;
5386   case $withval in
5387     yes)
5388
5389 $as_echo "#define USE_PAM 1" >>confdefs.h
5390
5391       ;;
5392     no)
5393       :
5394       ;;
5395     *)
5396       as_fn_error $? "no argument expected for --with-pam option" "$LINENO" 5
5397       ;;
5398   esac
5399
5400 else
5401   with_pam=no
5402
5403 fi
5404
5405
5406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pam" >&5
5407 $as_echo "$with_pam" >&6; }
5408
5409
5410 #
5411 # LDAP
5412 #
5413 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LDAP support" >&5
5414 $as_echo_n "checking whether to build with LDAP support... " >&6; }
5415
5416
5417
5418 # Check whether --with-ldap was given.
5419 if test "${with_ldap+set}" = set; then :
5420   withval=$with_ldap;
5421   case $withval in
5422     yes)
5423
5424 $as_echo "#define USE_LDAP 1" >>confdefs.h
5425
5426       ;;
5427     no)
5428       :
5429       ;;
5430     *)
5431       as_fn_error $? "no argument expected for --with-ldap option" "$LINENO" 5
5432       ;;
5433   esac
5434
5435 else
5436   with_ldap=no
5437
5438 fi
5439
5440
5441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_ldap" >&5
5442 $as_echo "$with_ldap" >&6; }
5443
5444
5445 #
5446 # Bonjour
5447 #
5448 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Bonjour support" >&5
5449 $as_echo_n "checking whether to build with Bonjour support... " >&6; }
5450
5451
5452
5453 # Check whether --with-bonjour was given.
5454 if test "${with_bonjour+set}" = set; then :
5455   withval=$with_bonjour;
5456   case $withval in
5457     yes)
5458
5459 $as_echo "#define USE_BONJOUR 1" >>confdefs.h
5460
5461       ;;
5462     no)
5463       :
5464       ;;
5465     *)
5466       as_fn_error $? "no argument expected for --with-bonjour option" "$LINENO" 5
5467       ;;
5468   esac
5469
5470 else
5471   with_bonjour=no
5472
5473 fi
5474
5475
5476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bonjour" >&5
5477 $as_echo "$with_bonjour" >&6; }
5478
5479
5480 #
5481 # OpenSSL
5482 #
5483 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with OpenSSL support" >&5
5484 $as_echo_n "checking whether to build with OpenSSL support... " >&6; }
5485
5486
5487
5488 # Check whether --with-openssl was given.
5489 if test "${with_openssl+set}" = set; then :
5490   withval=$with_openssl;
5491   case $withval in
5492     yes)
5493
5494 $as_echo "#define USE_SSL 1" >>confdefs.h
5495
5496       ;;
5497     no)
5498       :
5499       ;;
5500     *)
5501       as_fn_error $? "no argument expected for --with-openssl option" "$LINENO" 5
5502       ;;
5503   esac
5504
5505 else
5506   with_openssl=no
5507
5508 fi
5509
5510
5511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_openssl" >&5
5512 $as_echo "$with_openssl" >&6; }
5513
5514
5515 #
5516 # SELinux
5517 #
5518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with SELinux support" >&5
5519 $as_echo_n "checking whether to build with SELinux support... " >&6; }
5520
5521
5522
5523 # Check whether --with-selinux was given.
5524 if test "${with_selinux+set}" = set; then :
5525   withval=$with_selinux;
5526   case $withval in
5527     yes)
5528       :
5529       ;;
5530     no)
5531       :
5532       ;;
5533     *)
5534       as_fn_error $? "no argument expected for --with-selinux option" "$LINENO" 5
5535       ;;
5536   esac
5537
5538 else
5539   with_selinux=no
5540
5541 fi
5542
5543
5544
5545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_selinux" >&5
5546 $as_echo "$with_selinux" >&6; }
5547
5548 #
5549 # Readline
5550 #
5551
5552
5553
5554 # Check whether --with-readline was given.
5555 if test "${with_readline+set}" = set; then :
5556   withval=$with_readline;
5557   case $withval in
5558     yes)
5559       :
5560       ;;
5561     no)
5562       :
5563       ;;
5564     *)
5565       as_fn_error $? "no argument expected for --with-readline option" "$LINENO" 5
5566       ;;
5567   esac
5568
5569 else
5570   with_readline=yes
5571
5572 fi
5573
5574
5575 # readline on MinGW has problems with backslashes in psql and other bugs.
5576 # This is particularly a problem with non-US code pages.
5577 # Therefore disable its use until we understand the cause. 2004-07-20
5578 if test "$PORTNAME" = "win32"; then
5579   if test "$with_readline" = yes; then
5580     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Readline does not work on MinGW --- disabling" >&5
5581 $as_echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
5582     with_readline=no
5583   fi
5584 fi
5585
5586
5587 #
5588 # Prefer libedit
5589 #
5590
5591
5592
5593 # Check whether --with-libedit-preferred was given.
5594 if test "${with_libedit_preferred+set}" = set; then :
5595   withval=$with_libedit_preferred;
5596   case $withval in
5597     yes)
5598       :
5599       ;;
5600     no)
5601       :
5602       ;;
5603     *)
5604       as_fn_error $? "no argument expected for --with-libedit-preferred option" "$LINENO" 5
5605       ;;
5606   esac
5607
5608 else
5609   with_libedit_preferred=no
5610
5611 fi
5612
5613
5614
5615
5616 #
5617 # OSSP UUID library
5618 #
5619
5620
5621
5622 # Check whether --with-ossp-uuid was given.
5623 if test "${with_ossp_uuid+set}" = set; then :
5624   withval=$with_ossp_uuid;
5625   case $withval in
5626     yes)
5627       :
5628       ;;
5629     no)
5630       :
5631       ;;
5632     *)
5633       as_fn_error $? "no argument expected for --with-ossp-uuid option" "$LINENO" 5
5634       ;;
5635   esac
5636
5637 else
5638   with_ossp_uuid=no
5639
5640 fi
5641
5642
5643
5644
5645
5646 #
5647 # XML
5648 #
5649
5650
5651
5652 # Check whether --with-libxml was given.
5653 if test "${with_libxml+set}" = set; then :
5654   withval=$with_libxml;
5655   case $withval in
5656     yes)
5657
5658 $as_echo "#define USE_LIBXML 1" >>confdefs.h
5659
5660       ;;
5661     no)
5662       :
5663       ;;
5664     *)
5665       as_fn_error $? "no argument expected for --with-libxml option" "$LINENO" 5
5666       ;;
5667   esac
5668
5669 else
5670   with_libxml=no
5671
5672 fi
5673
5674
5675
5676 if test "$with_libxml" = yes ; then
5677   for ac_prog in xml2-config
5678 do
5679   # Extract the first word of "$ac_prog", so it can be a program name with args.
5680 set dummy $ac_prog; ac_word=$2
5681 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5682 $as_echo_n "checking for $ac_word... " >&6; }
5683 if ${ac_cv_prog_XML2_CONFIG+:} false; then :
5684   $as_echo_n "(cached) " >&6
5685 else
5686   if test -n "$XML2_CONFIG"; then
5687   ac_cv_prog_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test.
5688 else
5689 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5690 for as_dir in $PATH
5691 do
5692   IFS=$as_save_IFS
5693   test -z "$as_dir" && as_dir=.
5694     for ac_exec_ext in '' $ac_executable_extensions; do
5695   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5696     ac_cv_prog_XML2_CONFIG="$ac_prog"
5697     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5698     break 2
5699   fi
5700 done
5701   done
5702 IFS=$as_save_IFS
5703
5704 fi
5705 fi
5706 XML2_CONFIG=$ac_cv_prog_XML2_CONFIG
5707 if test -n "$XML2_CONFIG"; then
5708   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
5709 $as_echo "$XML2_CONFIG" >&6; }
5710 else
5711   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5712 $as_echo "no" >&6; }
5713 fi
5714
5715
5716   test -n "$XML2_CONFIG" && break
5717 done
5718
5719   if test -n "$XML2_CONFIG"; then
5720     for pgac_option in `$XML2_CONFIG --cflags`; do
5721       case $pgac_option in
5722         -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
5723       esac
5724     done
5725     for pgac_option in `$XML2_CONFIG --libs`; do
5726       case $pgac_option in
5727         -L*) LDFLAGS="$LDFLAGS $pgac_option";;
5728       esac
5729     done
5730   fi
5731 fi
5732
5733
5734
5735 #
5736 # XSLT
5737 #
5738
5739
5740
5741 # Check whether --with-libxslt was given.
5742 if test "${with_libxslt+set}" = set; then :
5743   withval=$with_libxslt;
5744   case $withval in
5745     yes)
5746
5747 $as_echo "#define USE_LIBXSLT 1" >>confdefs.h
5748
5749       ;;
5750     no)
5751       :
5752       ;;
5753     *)
5754       as_fn_error $? "no argument expected for --with-libxslt option" "$LINENO" 5
5755       ;;
5756   esac
5757
5758 else
5759   with_libxslt=no
5760
5761 fi
5762
5763
5764
5765
5766
5767
5768 #
5769 # tzdata
5770 #
5771
5772
5773
5774 # Check whether --with-system-tzdata was given.
5775 if test "${with_system_tzdata+set}" = set; then :
5776   withval=$with_system_tzdata;
5777   case $withval in
5778     yes)
5779       as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
5780       ;;
5781     no)
5782       as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
5783       ;;
5784     *)
5785
5786       ;;
5787   esac
5788
5789 fi
5790
5791
5792
5793
5794 #
5795 # Zlib
5796 #
5797
5798
5799
5800 # Check whether --with-zlib was given.
5801 if test "${with_zlib+set}" = set; then :
5802   withval=$with_zlib;
5803   case $withval in
5804     yes)
5805       :
5806       ;;
5807     no)
5808       :
5809       ;;
5810     *)
5811       as_fn_error $? "no argument expected for --with-zlib option" "$LINENO" 5
5812       ;;
5813   esac
5814
5815 else
5816   with_zlib=yes
5817
5818 fi
5819
5820
5821
5822
5823 #
5824 # Elf
5825 #
5826
5827 # Assume system is ELF if it predefines __ELF__ as 1,
5828 # otherwise believe host_os based default.
5829 case $host_os in
5830     freebsd1*|freebsd2*) elf=no;;
5831     freebsd3*|freebsd4*) elf=yes;;
5832 esac
5833
5834
5835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5836 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5837 if ${ac_cv_path_GREP+:} false; then :
5838   $as_echo_n "(cached) " >&6
5839 else
5840   if test -z "$GREP"; then
5841   ac_path_GREP_found=false
5842   # Loop through the user's path and test for each of PROGNAME-LIST
5843   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5844 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5845 do
5846   IFS=$as_save_IFS
5847   test -z "$as_dir" && as_dir=.
5848     for ac_prog in grep ggrep; do
5849     for ac_exec_ext in '' $ac_executable_extensions; do
5850       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5851       as_fn_executable_p "$ac_path_GREP" || continue
5852 # Check for GNU ac_path_GREP and select it if it is found.
5853   # Check for GNU $ac_path_GREP
5854 case `"$ac_path_GREP" --version 2>&1` in
5855 *GNU*)
5856   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5857 *)
5858   ac_count=0
5859   $as_echo_n 0123456789 >"conftest.in"
5860   while :
5861   do
5862     cat "conftest.in" "conftest.in" >"conftest.tmp"
5863     mv "conftest.tmp" "conftest.in"
5864     cp "conftest.in" "conftest.nl"
5865     $as_echo 'GREP' >> "conftest.nl"
5866     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5867     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5868     as_fn_arith $ac_count + 1 && ac_count=$as_val
5869     if test $ac_count -gt ${ac_path_GREP_max-0}; then
5870       # Best one so far, save it but keep looking for a better one
5871       ac_cv_path_GREP="$ac_path_GREP"
5872       ac_path_GREP_max=$ac_count
5873     fi
5874     # 10*(2^10) chars as input seems more than enough
5875     test $ac_count -gt 10 && break
5876   done
5877   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5878 esac
5879
5880       $ac_path_GREP_found && break 3
5881     done
5882   done
5883   done
5884 IFS=$as_save_IFS
5885   if test -z "$ac_cv_path_GREP"; then
5886     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5887   fi
5888 else
5889   ac_cv_path_GREP=$GREP
5890 fi
5891
5892 fi
5893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5894 $as_echo "$ac_cv_path_GREP" >&6; }
5895  GREP="$ac_cv_path_GREP"
5896
5897
5898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5899 $as_echo_n "checking for egrep... " >&6; }
5900 if ${ac_cv_path_EGREP+:} false; then :
5901   $as_echo_n "(cached) " >&6
5902 else
5903   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5904    then ac_cv_path_EGREP="$GREP -E"
5905    else
5906      if test -z "$EGREP"; then
5907   ac_path_EGREP_found=false
5908   # Loop through the user's path and test for each of PROGNAME-LIST
5909   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5910 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5911 do
5912   IFS=$as_save_IFS
5913   test -z "$as_dir" && as_dir=.
5914     for ac_prog in egrep; do
5915     for ac_exec_ext in '' $ac_executable_extensions; do
5916       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5917       as_fn_executable_p "$ac_path_EGREP" || continue
5918 # Check for GNU ac_path_EGREP and select it if it is found.
5919   # Check for GNU $ac_path_EGREP
5920 case `"$ac_path_EGREP" --version 2>&1` in
5921 *GNU*)
5922   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5923 *)
5924   ac_count=0
5925   $as_echo_n 0123456789 >"conftest.in"
5926   while :
5927   do
5928     cat "conftest.in" "conftest.in" >"conftest.tmp"
5929     mv "conftest.tmp" "conftest.in"
5930     cp "conftest.in" "conftest.nl"
5931     $as_echo 'EGREP' >> "conftest.nl"
5932     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5933     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5934     as_fn_arith $ac_count + 1 && ac_count=$as_val
5935     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5936       # Best one so far, save it but keep looking for a better one
5937       ac_cv_path_EGREP="$ac_path_EGREP"
5938       ac_path_EGREP_max=$ac_count
5939     fi
5940     # 10*(2^10) chars as input seems more than enough
5941     test $ac_count -gt 10 && break
5942   done
5943   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5944 esac
5945
5946       $ac_path_EGREP_found && break 3
5947     done
5948   done
5949   done
5950 IFS=$as_save_IFS
5951   if test -z "$ac_cv_path_EGREP"; then
5952     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5953   fi
5954 else
5955   ac_cv_path_EGREP=$EGREP
5956 fi
5957
5958    fi
5959 fi
5960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5961 $as_echo "$ac_cv_path_EGREP" >&6; }
5962  EGREP="$ac_cv_path_EGREP"
5963
5964
5965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5966 /* end confdefs.h.  */
5967 #if __ELF__
5968   yes
5969 #endif
5970
5971 _ACEOF
5972 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5973   $EGREP "yes" >/dev/null 2>&1; then :
5974   ELF_SYS=true
5975 else
5976   if test "X$elf" = "Xyes" ; then
5977   ELF_SYS=true
5978 else
5979   ELF_SYS=
5980 fi
5981 fi
5982 rm -f conftest*
5983
5984
5985
5986 #
5987 # Assignments
5988 #
5989
5990 CPPFLAGS="$CPPFLAGS $INCLUDES"
5991 LDFLAGS="$LDFLAGS $LIBDIRS"
5992
5993
5994
5995
5996
5997 # Check whether --with-gnu-ld was given.
5998 if test "${with_gnu_ld+set}" = set; then :
5999   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
6000 else
6001   with_gnu_ld=no
6002 fi
6003
6004 ac_prog=ld
6005 if test "$GCC" = yes; then
6006   # Check if gcc -print-prog-name=ld gives a path.
6007   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
6008 $as_echo_n "checking for ld used by GCC... " >&6; }
6009   case $host in
6010   *-*-mingw*)
6011     # gcc leaves a trailing carriage return which upsets mingw
6012     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
6013   *)
6014     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
6015   esac
6016   case "$ac_prog" in
6017     # Accept absolute paths.
6018     [\\/]* | [A-Za-z]:[\\/]*)
6019       re_direlt='/[^/][^/]*/\.\./'
6020       # Canonicalize the path of ld
6021       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
6022       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
6023         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
6024       done
6025       test -z "$LD" && LD="$ac_prog"
6026       ;;
6027   "")
6028     # If it fails, then pretend we aren't using GCC.
6029     ac_prog=ld
6030     ;;
6031   *)
6032     # If it is relative, then search for the first ld in PATH.
6033     with_gnu_ld=unknown
6034     ;;
6035   esac
6036 elif test "$with_gnu_ld" = yes; then
6037   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
6038 $as_echo_n "checking for GNU ld... " >&6; }
6039 else
6040   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
6041 $as_echo_n "checking for non-GNU ld... " >&6; }
6042 fi
6043 if ${ac_cv_path_LD+:} false; then :
6044   $as_echo_n "(cached) " >&6
6045 else
6046   if test -z "$LD"; then
6047   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
6048   for ac_dir in $PATH; do
6049     test -z "$ac_dir" && ac_dir=.
6050     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
6051       ac_cv_path_LD="$ac_dir/$ac_prog"
6052       # Check to see if the program is GNU ld.  I'd rather use --version,
6053       # but apparently some GNU ld's only accept -v.
6054       # Break only if it was the GNU/non-GNU ld that we prefer.
6055       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
6056         test "$with_gnu_ld" != no && break
6057       else
6058         test "$with_gnu_ld" != yes && break
6059       fi
6060     fi
6061   done
6062   IFS="$ac_save_ifs"
6063 else
6064   ac_cv_path_LD="$LD" # Let the user override the test with a path.
6065 fi
6066 fi
6067
6068 LD="$ac_cv_path_LD"
6069 if test -n "$LD"; then
6070   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
6071 $as_echo "$LD" >&6; }
6072 else
6073   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6074 $as_echo "no" >&6; }
6075 fi
6076 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
6077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
6078 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
6079 if ${ac_cv_prog_gnu_ld+:} false; then :
6080   $as_echo_n "(cached) " >&6
6081 else
6082   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
6083 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
6084   ac_cv_prog_gnu_ld=yes
6085 else
6086   ac_cv_prog_gnu_ld=no
6087 fi
6088 fi
6089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gnu_ld" >&5
6090 $as_echo "$ac_cv_prog_gnu_ld" >&6; }
6091 with_gnu_ld=$ac_cv_prog_gnu_ld
6092
6093
6094
6095
6096 case $host_os in sysv5*)
6097   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ld -R works" >&5
6098 $as_echo_n "checking whether ld -R works... " >&6; }
6099 if ${pgac_cv_prog_ld_R+:} false; then :
6100   $as_echo_n "(cached) " >&6
6101 else
6102
6103     pgac_save_LDFLAGS=$LDFLAGS; LDFLAGS="$LDFLAGS -Wl,-R/usr/lib"
6104     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6105 /* end confdefs.h.  */
6106
6107 int
6108 main ()
6109 {
6110
6111   ;
6112   return 0;
6113 }
6114 _ACEOF
6115 if ac_fn_c_try_link "$LINENO"; then :
6116   pgac_cv_prog_ld_R=yes
6117 else
6118   pgac_cv_prog_ld_R=no
6119 fi
6120 rm -f core conftest.err conftest.$ac_objext \
6121     conftest$ac_exeext conftest.$ac_ext
6122     LDFLAGS=$pgac_save_LDFLAGS
6123
6124 fi
6125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_ld_R" >&5
6126 $as_echo "$pgac_cv_prog_ld_R" >&6; }
6127   ld_R_works=$pgac_cv_prog_ld_R
6128
6129 esac
6130 if test -n "$ac_tool_prefix"; then
6131   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6132 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6133 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6134 $as_echo_n "checking for $ac_word... " >&6; }
6135 if ${ac_cv_prog_RANLIB+:} false; then :
6136   $as_echo_n "(cached) " >&6
6137 else
6138   if test -n "$RANLIB"; then
6139   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6140 else
6141 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6142 for as_dir in $PATH
6143 do
6144   IFS=$as_save_IFS
6145   test -z "$as_dir" && as_dir=.
6146     for ac_exec_ext in '' $ac_executable_extensions; do
6147   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6148     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6149     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6150     break 2
6151   fi
6152 done
6153   done
6154 IFS=$as_save_IFS
6155
6156 fi
6157 fi
6158 RANLIB=$ac_cv_prog_RANLIB
6159 if test -n "$RANLIB"; then
6160   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6161 $as_echo "$RANLIB" >&6; }
6162 else
6163   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6164 $as_echo "no" >&6; }
6165 fi
6166
6167
6168 fi
6169 if test -z "$ac_cv_prog_RANLIB"; then
6170   ac_ct_RANLIB=$RANLIB
6171   # Extract the first word of "ranlib", so it can be a program name with args.
6172 set dummy ranlib; ac_word=$2
6173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6174 $as_echo_n "checking for $ac_word... " >&6; }
6175 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
6176   $as_echo_n "(cached) " >&6
6177 else
6178   if test -n "$ac_ct_RANLIB"; then
6179   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6180 else
6181 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6182 for as_dir in $PATH
6183 do
6184   IFS=$as_save_IFS
6185   test -z "$as_dir" && as_dir=.
6186     for ac_exec_ext in '' $ac_executable_extensions; do
6187   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6188     ac_cv_prog_ac_ct_RANLIB="ranlib"
6189     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6190     break 2
6191   fi
6192 done
6193   done
6194 IFS=$as_save_IFS
6195
6196 fi
6197 fi
6198 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6199 if test -n "$ac_ct_RANLIB"; then
6200   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6201 $as_echo "$ac_ct_RANLIB" >&6; }
6202 else
6203   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6204 $as_echo "no" >&6; }
6205 fi
6206
6207   if test "x$ac_ct_RANLIB" = x; then
6208     RANLIB=":"
6209   else
6210     case $cross_compiling:$ac_tool_warned in
6211 yes:)
6212 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6213 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6214 ac_tool_warned=yes ;;
6215 esac
6216     RANLIB=$ac_ct_RANLIB
6217   fi
6218 else
6219   RANLIB="$ac_cv_prog_RANLIB"
6220 fi
6221
6222
6223   if test -n "$ac_tool_prefix"; then
6224   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
6225 set dummy ${ac_tool_prefix}strip; ac_word=$2
6226 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6227 $as_echo_n "checking for $ac_word... " >&6; }
6228 if ${ac_cv_prog_STRIP+:} false; then :
6229   $as_echo_n "(cached) " >&6
6230 else
6231   if test -n "$STRIP"; then
6232   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
6233 else
6234 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6235 for as_dir in $PATH
6236 do
6237   IFS=$as_save_IFS
6238   test -z "$as_dir" && as_dir=.
6239     for ac_exec_ext in '' $ac_executable_extensions; do
6240   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6241     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
6242     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6243     break 2
6244   fi
6245 done
6246   done
6247 IFS=$as_save_IFS
6248
6249 fi
6250 fi
6251 STRIP=$ac_cv_prog_STRIP
6252 if test -n "$STRIP"; then
6253   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
6254 $as_echo "$STRIP" >&6; }
6255 else
6256   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6257 $as_echo "no" >&6; }
6258 fi
6259
6260
6261 fi
6262 if test -z "$ac_cv_prog_STRIP"; then
6263   ac_ct_STRIP=$STRIP
6264   # Extract the first word of "strip", so it can be a program name with args.
6265 set dummy strip; ac_word=$2
6266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6267 $as_echo_n "checking for $ac_word... " >&6; }
6268 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
6269   $as_echo_n "(cached) " >&6
6270 else
6271   if test -n "$ac_ct_STRIP"; then
6272   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
6273 else
6274 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6275 for as_dir in $PATH
6276 do
6277   IFS=$as_save_IFS
6278   test -z "$as_dir" && as_dir=.
6279     for ac_exec_ext in '' $ac_executable_extensions; do
6280   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6281     ac_cv_prog_ac_ct_STRIP="strip"
6282     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6283     break 2
6284   fi
6285 done
6286   done
6287 IFS=$as_save_IFS
6288
6289 fi
6290 fi
6291 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
6292 if test -n "$ac_ct_STRIP"; then
6293   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
6294 $as_echo "$ac_ct_STRIP" >&6; }
6295 else
6296   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6297 $as_echo "no" >&6; }
6298 fi
6299
6300   if test "x$ac_ct_STRIP" = x; then
6301     STRIP=":"
6302   else
6303     case $cross_compiling:$ac_tool_warned in
6304 yes:)
6305 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6306 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6307 ac_tool_warned=yes ;;
6308 esac
6309     STRIP=$ac_ct_STRIP
6310   fi
6311 else
6312   STRIP="$ac_cv_prog_STRIP"
6313 fi
6314
6315
6316   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is possible to strip libraries" >&5
6317 $as_echo_n "checking whether it is possible to strip libraries... " >&6; }
6318   if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
6319     STRIP_STATIC_LIB="$STRIP -x"
6320     STRIP_SHARED_LIB="$STRIP --strip-unneeded"
6321     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6322 $as_echo "yes" >&6; }
6323   else
6324     case $host_os in
6325       darwin*)
6326         STRIP="$STRIP -x"
6327         STRIP_STATIC_LIB=$STRIP
6328         STRIP_SHARED_LIB=$STRIP
6329         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6330 $as_echo "yes" >&6; }
6331         ;;
6332       *)
6333         STRIP_STATIC_LIB=:
6334         STRIP_SHARED_LIB=:
6335         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6336 $as_echo "no" >&6; }
6337         ;;
6338     esac
6339   fi
6340
6341
6342
6343 if test -n "$ac_tool_prefix"; then
6344   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6345 set dummy ${ac_tool_prefix}ar; ac_word=$2
6346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6347 $as_echo_n "checking for $ac_word... " >&6; }
6348 if ${ac_cv_prog_AR+:} false; then :
6349   $as_echo_n "(cached) " >&6
6350 else
6351   if test -n "$AR"; then
6352   ac_cv_prog_AR="$AR" # Let the user override the test.
6353 else
6354 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6355 for as_dir in $PATH
6356 do
6357   IFS=$as_save_IFS
6358   test -z "$as_dir" && as_dir=.
6359     for ac_exec_ext in '' $ac_executable_extensions; do
6360   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6361     ac_cv_prog_AR="${ac_tool_prefix}ar"
6362     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6363     break 2
6364   fi
6365 done
6366   done
6367 IFS=$as_save_IFS
6368
6369 fi
6370 fi
6371 AR=$ac_cv_prog_AR
6372 if test -n "$AR"; then
6373   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6374 $as_echo "$AR" >&6; }
6375 else
6376   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6377 $as_echo "no" >&6; }
6378 fi
6379
6380
6381 fi
6382 if test -z "$ac_cv_prog_AR"; then
6383   ac_ct_AR=$AR
6384   # Extract the first word of "ar", so it can be a program name with args.
6385 set dummy ar; ac_word=$2
6386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6387 $as_echo_n "checking for $ac_word... " >&6; }
6388 if ${ac_cv_prog_ac_ct_AR+:} false; then :
6389   $as_echo_n "(cached) " >&6
6390 else
6391   if test -n "$ac_ct_AR"; then
6392   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6393 else
6394 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6395 for as_dir in $PATH
6396 do
6397   IFS=$as_save_IFS
6398   test -z "$as_dir" && as_dir=.
6399     for ac_exec_ext in '' $ac_executable_extensions; do
6400   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6401     ac_cv_prog_ac_ct_AR="ar"
6402     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6403     break 2
6404   fi
6405 done
6406   done
6407 IFS=$as_save_IFS
6408
6409 fi
6410 fi
6411 ac_ct_AR=$ac_cv_prog_ac_ct_AR
6412 if test -n "$ac_ct_AR"; then
6413   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6414 $as_echo "$ac_ct_AR" >&6; }
6415 else
6416   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6417 $as_echo "no" >&6; }
6418 fi
6419
6420   if test "x$ac_ct_AR" = x; then
6421     AR="ar"
6422   else
6423     case $cross_compiling:$ac_tool_warned in
6424 yes:)
6425 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6426 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6427 ac_tool_warned=yes ;;
6428 esac
6429     AR=$ac_ct_AR
6430   fi
6431 else
6432   AR="$ac_cv_prog_AR"
6433 fi
6434
6435 if test "$PORTNAME" = "win32"; then
6436   if test -n "$ac_tool_prefix"; then
6437   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
6438 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
6439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6440 $as_echo_n "checking for $ac_word... " >&6; }
6441 if ${ac_cv_prog_DLLTOOL+:} false; then :
6442   $as_echo_n "(cached) " >&6
6443 else
6444   if test -n "$DLLTOOL"; then
6445   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
6446 else
6447 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6448 for as_dir in $PATH
6449 do
6450   IFS=$as_save_IFS
6451   test -z "$as_dir" && as_dir=.
6452     for ac_exec_ext in '' $ac_executable_extensions; do
6453   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6454     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
6455     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6456     break 2
6457   fi
6458 done
6459   done
6460 IFS=$as_save_IFS
6461
6462 fi
6463 fi
6464 DLLTOOL=$ac_cv_prog_DLLTOOL
6465 if test -n "$DLLTOOL"; then
6466   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
6467 $as_echo "$DLLTOOL" >&6; }
6468 else
6469   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6470 $as_echo "no" >&6; }
6471 fi
6472
6473
6474 fi
6475 if test -z "$ac_cv_prog_DLLTOOL"; then
6476   ac_ct_DLLTOOL=$DLLTOOL
6477   # Extract the first word of "dlltool", so it can be a program name with args.
6478 set dummy dlltool; ac_word=$2
6479 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6480 $as_echo_n "checking for $ac_word... " >&6; }
6481 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
6482   $as_echo_n "(cached) " >&6
6483 else
6484   if test -n "$ac_ct_DLLTOOL"; then
6485   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
6486 else
6487 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6488 for as_dir in $PATH
6489 do
6490   IFS=$as_save_IFS
6491   test -z "$as_dir" && as_dir=.
6492     for ac_exec_ext in '' $ac_executable_extensions; do
6493   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6494     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
6495     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6496     break 2
6497   fi
6498 done
6499   done
6500 IFS=$as_save_IFS
6501
6502 fi
6503 fi
6504 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
6505 if test -n "$ac_ct_DLLTOOL"; then
6506   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
6507 $as_echo "$ac_ct_DLLTOOL" >&6; }
6508 else
6509   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6510 $as_echo "no" >&6; }
6511 fi
6512
6513   if test "x$ac_ct_DLLTOOL" = x; then
6514     DLLTOOL="dlltool"
6515   else
6516     case $cross_compiling:$ac_tool_warned in
6517 yes:)
6518 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6519 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6520 ac_tool_warned=yes ;;
6521 esac
6522     DLLTOOL=$ac_ct_DLLTOOL
6523   fi
6524 else
6525   DLLTOOL="$ac_cv_prog_DLLTOOL"
6526 fi
6527
6528   if test -n "$ac_tool_prefix"; then
6529   # Extract the first word of "${ac_tool_prefix}dllwrap", so it can be a program name with args.
6530 set dummy ${ac_tool_prefix}dllwrap; ac_word=$2
6531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6532 $as_echo_n "checking for $ac_word... " >&6; }
6533 if ${ac_cv_prog_DLLWRAP+:} false; then :
6534   $as_echo_n "(cached) " >&6
6535 else
6536   if test -n "$DLLWRAP"; then
6537   ac_cv_prog_DLLWRAP="$DLLWRAP" # Let the user override the test.
6538 else
6539 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6540 for as_dir in $PATH
6541 do
6542   IFS=$as_save_IFS
6543   test -z "$as_dir" && as_dir=.
6544     for ac_exec_ext in '' $ac_executable_extensions; do
6545   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6546     ac_cv_prog_DLLWRAP="${ac_tool_prefix}dllwrap"
6547     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6548     break 2
6549   fi
6550 done
6551   done
6552 IFS=$as_save_IFS
6553
6554 fi
6555 fi
6556 DLLWRAP=$ac_cv_prog_DLLWRAP
6557 if test -n "$DLLWRAP"; then
6558   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLWRAP" >&5
6559 $as_echo "$DLLWRAP" >&6; }
6560 else
6561   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6562 $as_echo "no" >&6; }
6563 fi
6564
6565
6566 fi
6567 if test -z "$ac_cv_prog_DLLWRAP"; then
6568   ac_ct_DLLWRAP=$DLLWRAP
6569   # Extract the first word of "dllwrap", so it can be a program name with args.
6570 set dummy dllwrap; ac_word=$2
6571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6572 $as_echo_n "checking for $ac_word... " >&6; }
6573 if ${ac_cv_prog_ac_ct_DLLWRAP+:} false; then :
6574   $as_echo_n "(cached) " >&6
6575 else
6576   if test -n "$ac_ct_DLLWRAP"; then
6577   ac_cv_prog_ac_ct_DLLWRAP="$ac_ct_DLLWRAP" # Let the user override the test.
6578 else
6579 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6580 for as_dir in $PATH
6581 do
6582   IFS=$as_save_IFS
6583   test -z "$as_dir" && as_dir=.
6584     for ac_exec_ext in '' $ac_executable_extensions; do
6585   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6586     ac_cv_prog_ac_ct_DLLWRAP="dllwrap"
6587     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6588     break 2
6589   fi
6590 done
6591   done
6592 IFS=$as_save_IFS
6593
6594 fi
6595 fi
6596 ac_ct_DLLWRAP=$ac_cv_prog_ac_ct_DLLWRAP
6597 if test -n "$ac_ct_DLLWRAP"; then
6598   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLWRAP" >&5
6599 $as_echo "$ac_ct_DLLWRAP" >&6; }
6600 else
6601   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6602 $as_echo "no" >&6; }
6603 fi
6604
6605   if test "x$ac_ct_DLLWRAP" = x; then
6606     DLLWRAP="dllwrap"
6607   else
6608     case $cross_compiling:$ac_tool_warned in
6609 yes:)
6610 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6611 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6612 ac_tool_warned=yes ;;
6613 esac
6614     DLLWRAP=$ac_ct_DLLWRAP
6615   fi
6616 else
6617   DLLWRAP="$ac_cv_prog_DLLWRAP"
6618 fi
6619
6620   if test -n "$ac_tool_prefix"; then
6621   # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
6622 set dummy ${ac_tool_prefix}windres; ac_word=$2
6623 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6624 $as_echo_n "checking for $ac_word... " >&6; }
6625 if ${ac_cv_prog_WINDRES+:} false; then :
6626   $as_echo_n "(cached) " >&6
6627 else
6628   if test -n "$WINDRES"; then
6629   ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
6630 else
6631 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6632 for as_dir in $PATH
6633 do
6634   IFS=$as_save_IFS
6635   test -z "$as_dir" && as_dir=.
6636     for ac_exec_ext in '' $ac_executable_extensions; do
6637   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6638     ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
6639     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6640     break 2
6641   fi
6642 done
6643   done
6644 IFS=$as_save_IFS
6645
6646 fi
6647 fi
6648 WINDRES=$ac_cv_prog_WINDRES
6649 if test -n "$WINDRES"; then
6650   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
6651 $as_echo "$WINDRES" >&6; }
6652 else
6653   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6654 $as_echo "no" >&6; }
6655 fi
6656
6657
6658 fi
6659 if test -z "$ac_cv_prog_WINDRES"; then
6660   ac_ct_WINDRES=$WINDRES
6661   # Extract the first word of "windres", so it can be a program name with args.
6662 set dummy windres; ac_word=$2
6663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6664 $as_echo_n "checking for $ac_word... " >&6; }
6665 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
6666   $as_echo_n "(cached) " >&6
6667 else
6668   if test -n "$ac_ct_WINDRES"; then
6669   ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
6670 else
6671 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6672 for as_dir in $PATH
6673 do
6674   IFS=$as_save_IFS
6675   test -z "$as_dir" && as_dir=.
6676     for ac_exec_ext in '' $ac_executable_extensions; do
6677   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6678     ac_cv_prog_ac_ct_WINDRES="windres"
6679     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6680     break 2
6681   fi
6682 done
6683   done
6684 IFS=$as_save_IFS
6685
6686 fi
6687 fi
6688 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
6689 if test -n "$ac_ct_WINDRES"; then
6690   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
6691 $as_echo "$ac_ct_WINDRES" >&6; }
6692 else
6693   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6694 $as_echo "no" >&6; }
6695 fi
6696
6697   if test "x$ac_ct_WINDRES" = x; then
6698     WINDRES="windres"
6699   else
6700     case $cross_compiling:$ac_tool_warned in
6701 yes:)
6702 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6703 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6704 ac_tool_warned=yes ;;
6705 esac
6706     WINDRES=$ac_ct_WINDRES
6707   fi
6708 else
6709   WINDRES="$ac_cv_prog_WINDRES"
6710 fi
6711
6712 fi
6713
6714 # Find a good install program.  We prefer a C program (faster),
6715 # so one script is as good as another.  But avoid the broken or
6716 # incompatible versions:
6717 # SysV /etc/install, /usr/sbin/install
6718 # SunOS /usr/etc/install
6719 # IRIX /sbin/install
6720 # AIX /bin/install
6721 # AmigaOS /C/install, which installs bootblocks on floppy discs
6722 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6723 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
6724 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6725 # OS/2's system install, which has a completely different semantic
6726 # ./install, which can be erroneously created by make from ./install.sh.
6727 # Reject install programs that cannot install multiple files.
6728 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6729 $as_echo_n "checking for a BSD-compatible install... " >&6; }
6730 if test -z "$INSTALL"; then
6731 if ${ac_cv_path_install+:} false; then :
6732   $as_echo_n "(cached) " >&6
6733 else
6734   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6735 for as_dir in $PATH
6736 do
6737   IFS=$as_save_IFS
6738   test -z "$as_dir" && as_dir=.
6739     # Account for people who put trailing slashes in PATH elements.
6740 case $as_dir/ in #((
6741   ./ | .// | /[cC]/* | \
6742   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
6743   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
6744   /usr/ucb/* ) ;;
6745   *)
6746     # OSF1 and SCO ODT 3.0 have their own names for install.
6747     # Don't use installbsd from OSF since it installs stuff as root
6748     # by default.
6749     for ac_prog in ginstall scoinst install; do
6750       for ac_exec_ext in '' $ac_executable_extensions; do
6751         if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
6752           if test $ac_prog = install &&
6753             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6754             # AIX install.  It has an incompatible calling convention.
6755             :
6756           elif test $ac_prog = install &&
6757             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6758             # program-specific install script used by HP pwplus--don't use.
6759             :
6760           else
6761             rm -rf conftest.one conftest.two conftest.dir
6762             echo one > conftest.one
6763             echo two > conftest.two
6764             mkdir conftest.dir
6765             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6766               test -s conftest.one && test -s conftest.two &&
6767               test -s conftest.dir/conftest.one &&
6768               test -s conftest.dir/conftest.two
6769             then
6770               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6771               break 3
6772             fi
6773           fi
6774         fi
6775       done
6776     done
6777     ;;
6778 esac
6779
6780   done
6781 IFS=$as_save_IFS
6782
6783 rm -rf conftest.one conftest.two conftest.dir
6784
6785 fi
6786   if test "${ac_cv_path_install+set}" = set; then
6787     INSTALL=$ac_cv_path_install
6788   else
6789     # As a last resort, use the slow shell script.  Don't cache a
6790     # value for INSTALL within a source directory, because that will
6791     # break other packages using the cache if that directory is
6792     # removed, or if the value is a relative name.
6793     INSTALL=$ac_install_sh
6794   fi
6795 fi
6796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6797 $as_echo "$INSTALL" >&6; }
6798
6799 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6800 # It thinks the first close brace ends the variable substitution.
6801 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6802
6803 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6804
6805 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6806
6807 # When Autoconf chooses install-sh as install program it tries to generate
6808 # a relative path to it in each makefile where it subsitutes it. This clashes
6809 # with our Makefile.global concept. This workaround helps.
6810 case $INSTALL in
6811   *install-sh*) install_bin='';;
6812   *) install_bin=$INSTALL;;
6813 esac
6814
6815
6816 # Extract the first word of "tar", so it can be a program name with args.
6817 set dummy tar; ac_word=$2
6818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6819 $as_echo_n "checking for $ac_word... " >&6; }
6820 if ${ac_cv_path_TAR+:} false; then :
6821   $as_echo_n "(cached) " >&6
6822 else
6823   case $TAR in
6824   [\\/]* | ?:[\\/]*)
6825   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
6826   ;;
6827   *)
6828   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6829 for as_dir in $PATH
6830 do
6831   IFS=$as_save_IFS
6832   test -z "$as_dir" && as_dir=.
6833     for ac_exec_ext in '' $ac_executable_extensions; do
6834   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6835     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
6836     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6837     break 2
6838   fi
6839 done
6840   done
6841 IFS=$as_save_IFS
6842
6843   ;;
6844 esac
6845 fi
6846 TAR=$ac_cv_path_TAR
6847 if test -n "$TAR"; then
6848   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
6849 $as_echo "$TAR" >&6; }
6850 else
6851   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6852 $as_echo "no" >&6; }
6853 fi
6854
6855
6856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
6857 $as_echo_n "checking whether ln -s works... " >&6; }
6858 LN_S=$as_ln_s
6859 if test "$LN_S" = "ln -s"; then
6860   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6861 $as_echo "yes" >&6; }
6862 else
6863   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
6864 $as_echo "no, using $LN_S" >&6; }
6865 fi
6866
6867 for ac_prog in gawk mawk nawk awk
6868 do
6869   # Extract the first word of "$ac_prog", so it can be a program name with args.
6870 set dummy $ac_prog; ac_word=$2
6871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6872 $as_echo_n "checking for $ac_word... " >&6; }
6873 if ${ac_cv_prog_AWK+:} false; then :
6874   $as_echo_n "(cached) " >&6
6875 else
6876   if test -n "$AWK"; then
6877   ac_cv_prog_AWK="$AWK" # Let the user override the test.
6878 else
6879 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6880 for as_dir in $PATH
6881 do
6882   IFS=$as_save_IFS
6883   test -z "$as_dir" && as_dir=.
6884     for ac_exec_ext in '' $ac_executable_extensions; do
6885   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6886     ac_cv_prog_AWK="$ac_prog"
6887     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6888     break 2
6889   fi
6890 done
6891   done
6892 IFS=$as_save_IFS
6893
6894 fi
6895 fi
6896 AWK=$ac_cv_prog_AWK
6897 if test -n "$AWK"; then
6898   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
6899 $as_echo "$AWK" >&6; }
6900 else
6901   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6902 $as_echo "no" >&6; }
6903 fi
6904
6905
6906   test -n "$AWK" && break
6907 done
6908
6909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6910 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6911 if test -z "$MKDIR_P"; then
6912   if ${ac_cv_path_mkdir+:} false; then :
6913   $as_echo_n "(cached) " >&6
6914 else
6915   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6916 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6917 do
6918   IFS=$as_save_IFS
6919   test -z "$as_dir" && as_dir=.
6920     for ac_prog in mkdir gmkdir; do
6921          for ac_exec_ext in '' $ac_executable_extensions; do
6922            as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
6923            case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6924              'mkdir (GNU coreutils) '* | \
6925              'mkdir (coreutils) '* | \
6926              'mkdir (fileutils) '4.1*)
6927                ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6928                break 3;;
6929            esac
6930          done
6931        done
6932   done
6933 IFS=$as_save_IFS
6934
6935 fi
6936
6937   test -d ./--version && rmdir ./--version
6938   if test "${ac_cv_path_mkdir+set}" = set; then
6939     MKDIR_P="$ac_cv_path_mkdir -p"
6940   else
6941     # As a last resort, use the slow shell script.  Don't cache a
6942     # value for MKDIR_P within a source directory, because that will
6943     # break other packages using the cache if that directory is
6944     # removed, or if the value is a relative name.
6945     MKDIR_P="$ac_install_sh -d"
6946   fi
6947 fi
6948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6949 $as_echo "$MKDIR_P" >&6; }
6950
6951 # When Autoconf chooses install-sh as mkdir -p program it tries to generate
6952 # a relative path to it in each makefile where it subsitutes it. This clashes
6953 # with our Makefile.global concept. This workaround helps.
6954 case $MKDIR_P in
6955   *install-sh*) MKDIR_P='\${SHELL} \${top_srcdir}/config/install-sh -c -d';;
6956 esac
6957
6958 # Let the user override the search
6959 if test -z "$BISON"; then
6960   for ac_prog in bison
6961 do
6962   # Extract the first word of "$ac_prog", so it can be a program name with args.
6963 set dummy $ac_prog; ac_word=$2
6964 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6965 $as_echo_n "checking for $ac_word... " >&6; }
6966 if ${ac_cv_path_BISON+:} false; then :
6967   $as_echo_n "(cached) " >&6
6968 else
6969   case $BISON in
6970   [\\/]* | ?:[\\/]*)
6971   ac_cv_path_BISON="$BISON" # Let the user override the test with a path.
6972   ;;
6973   *)
6974   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6975 for as_dir in $PATH
6976 do
6977   IFS=$as_save_IFS
6978   test -z "$as_dir" && as_dir=.
6979     for ac_exec_ext in '' $ac_executable_extensions; do
6980   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6981     ac_cv_path_BISON="$as_dir/$ac_word$ac_exec_ext"
6982     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6983     break 2
6984   fi
6985 done
6986   done
6987 IFS=$as_save_IFS
6988
6989   ;;
6990 esac
6991 fi
6992 BISON=$ac_cv_path_BISON
6993 if test -n "$BISON"; then
6994   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
6995 $as_echo "$BISON" >&6; }
6996 else
6997   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6998 $as_echo "no" >&6; }
6999 fi
7000
7001
7002   test -n "$BISON" && break
7003 done
7004
7005 fi
7006
7007 if test "$BISON"; then
7008   pgac_bison_version=`$BISON --version 2>/dev/null | sed q`
7009   { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_bison_version" >&5
7010 $as_echo "$as_me: using $pgac_bison_version" >&6;}
7011   if echo "$pgac_bison_version" | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'
7012   then
7013     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7014 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
7015 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&5
7016 $as_echo "$as_me: WARNING:
7017 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
7018 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&2;}
7019     BISON=""
7020   fi
7021 fi
7022
7023 if test -z "$BISON"; then
7024   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7025 *** Without Bison you will not be able to build PostgreSQL from Git nor
7026 *** change any of the parser definition files.  You can obtain Bison from
7027 *** a GNU mirror site.  (If you are using the official distribution of
7028 *** PostgreSQL then you do not need to worry about this, because the Bison
7029 *** output is pre-generated.)" >&5
7030 $as_echo "$as_me: WARNING:
7031 *** Without Bison you will not be able to build PostgreSQL from Git nor
7032 *** change any of the parser definition files.  You can obtain Bison from
7033 *** a GNU mirror site.  (If you are using the official distribution of
7034 *** PostgreSQL then you do not need to worry about this, because the Bison
7035 *** output is pre-generated.)" >&2;}
7036 fi
7037 # We don't need AC_SUBST(BISON) because AC_PATH_PROG did it
7038
7039
7040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flex" >&5
7041 $as_echo_n "checking for flex... " >&6; }
7042 if ${pgac_cv_path_flex+:} false; then :
7043   $as_echo_n "(cached) " >&6
7044 else
7045   # Let the user override the test
7046 if test -n "$FLEX"; then
7047   pgac_cv_path_flex=$FLEX
7048 else
7049   pgac_save_IFS=$IFS
7050   IFS=$PATH_SEPARATOR
7051   for pgac_dir in $PATH; do
7052     IFS=$pgac_save_IFS
7053     if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
7054       pgac_dir=`pwd`
7055     fi
7056     for pgac_prog in flex lex; do
7057       pgac_candidate="$pgac_dir/$pgac_prog"
7058       if test -f "$pgac_candidate" \
7059         && $pgac_candidate --version </dev/null >/dev/null 2>&1
7060       then
7061         echo '%%'  > conftest.l
7062         if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
7063           pgac_flex_version=`$pgac_candidate --version 2>/dev/null`
7064           if echo "$pgac_flex_version" | sed 's/[.a-z]/ /g' | $AWK '{ if ($1 = 2 && $2 = 5 && $3 >= 31) exit 0; else exit 1;}'
7065           then
7066             pgac_cv_path_flex=$pgac_candidate
7067             break 2
7068           else
7069             { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7070 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
7071 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&5
7072 $as_echo "$as_me: WARNING:
7073 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
7074 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&2;}
7075           fi
7076         fi
7077       fi
7078     done
7079   done
7080   rm -f conftest.l lex.yy.c
7081   : ${pgac_cv_path_flex=no}
7082 fi
7083
7084 fi
7085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_path_flex" >&5
7086 $as_echo "$pgac_cv_path_flex" >&6; }
7087 if test x"$pgac_cv_path_flex" = x"no"; then
7088   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7089 *** Without Flex you will not be able to build PostgreSQL from Git nor
7090 *** change any of the scanner definition files.  You can obtain Flex from
7091 *** a GNU mirror site.  (If you are using the official distribution of
7092 *** PostgreSQL then you do not need to worry about this because the Flex
7093 *** output is pre-generated.)" >&5
7094 $as_echo "$as_me: WARNING:
7095 *** Without Flex you will not be able to build PostgreSQL from Git nor
7096 *** change any of the scanner definition files.  You can obtain Flex from
7097 *** a GNU mirror site.  (If you are using the official distribution of
7098 *** PostgreSQL then you do not need to worry about this because the Flex
7099 *** output is pre-generated.)" >&2;}
7100
7101   FLEX=
7102 else
7103   FLEX=$pgac_cv_path_flex
7104   pgac_flex_version=`$FLEX --version 2>/dev/null`
7105   { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_flex_version" >&5
7106 $as_echo "$as_me: using $pgac_flex_version" >&6;}
7107 fi
7108
7109
7110
7111
7112
7113 # Let the user override the search
7114 if test -z "$PERL"; then
7115   # Extract the first word of "perl", so it can be a program name with args.
7116 set dummy perl; ac_word=$2
7117 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7118 $as_echo_n "checking for $ac_word... " >&6; }
7119 if ${ac_cv_path_PERL+:} false; then :
7120   $as_echo_n "(cached) " >&6
7121 else
7122   case $PERL in
7123   [\\/]* | ?:[\\/]*)
7124   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
7125   ;;
7126   *)
7127   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7128 for as_dir in $PATH
7129 do
7130   IFS=$as_save_IFS
7131   test -z "$as_dir" && as_dir=.
7132     for ac_exec_ext in '' $ac_executable_extensions; do
7133   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7134     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
7135     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7136     break 2
7137   fi
7138 done
7139   done
7140 IFS=$as_save_IFS
7141
7142   ;;
7143 esac
7144 fi
7145 PERL=$ac_cv_path_PERL
7146 if test -n "$PERL"; then
7147   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
7148 $as_echo "$PERL" >&6; }
7149 else
7150   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7151 $as_echo "no" >&6; }
7152 fi
7153
7154
7155 fi
7156
7157 if test "$PERL"; then
7158   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'`
7159   { $as_echo "$as_me:${as_lineno-$LINENO}: using perl $pgac_perl_version" >&5
7160 $as_echo "$as_me: using perl $pgac_perl_version" >&6;}
7161   if echo "$pgac_perl_version" | sed 's/[.a-z_]/ /g' | \
7162     $AWK '{ if ($1 = 5 && $2 >= 8) exit 1; else exit 0;}'
7163   then
7164     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7165 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
7166 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&5
7167 $as_echo "$as_me: WARNING:
7168 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
7169 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&2;}
7170     PERL=""
7171   fi
7172 fi
7173
7174 if test -z "$PERL"; then
7175   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7176 *** Without Perl you will not be able to build PostgreSQL from Git.
7177 *** You can obtain Perl from any CPAN mirror site.
7178 *** (If you are using the official distribution of PostgreSQL then you do not
7179 *** need to worry about this, because the Perl output is pre-generated.)" >&5
7180 $as_echo "$as_me: WARNING:
7181 *** Without Perl you will not be able to build PostgreSQL from Git.
7182 *** You can obtain Perl from any CPAN mirror site.
7183 *** (If you are using the official distribution of PostgreSQL then you do not
7184 *** need to worry about this, because the Perl output is pre-generated.)" >&2;}
7185 fi
7186
7187 if test "$with_perl" = yes; then
7188   if test -z "$PERL"; then
7189     as_fn_error $? "Perl not found" "$LINENO" 5
7190   fi
7191
7192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl archlibexp" >&5
7193 $as_echo_n "checking for Perl archlibexp... " >&6; }
7194 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
7195 test "$PORTNAME" = "win32" && perl_archlibexp=`echo $perl_archlibexp | sed 's,\\\\,/,g'`
7196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_archlibexp" >&5
7197 $as_echo "$perl_archlibexp" >&6; }
7198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl privlibexp" >&5
7199 $as_echo_n "checking for Perl privlibexp... " >&6; }
7200 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
7201 test "$PORTNAME" = "win32" && perl_privlibexp=`echo $perl_privlibexp | sed 's,\\\\,/,g'`
7202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_privlibexp" >&5
7203 $as_echo "$perl_privlibexp" >&6; }
7204 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl useshrplib" >&5
7205 $as_echo_n "checking for Perl useshrplib... " >&6; }
7206 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
7207 test "$PORTNAME" = "win32" && perl_useshrplib=`echo $perl_useshrplib | sed 's,\\\\,/,g'`
7208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_useshrplib" >&5
7209 $as_echo "$perl_useshrplib" >&6; }
7210
7211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flags to link embedded Perl" >&5
7212 $as_echo_n "checking for flags to link embedded Perl... " >&6; }
7213 if test "$PORTNAME" = "win32" ; then
7214 perl_lib=`basename $perl_archlibexp/CORE/perl[5-9]*.lib .lib`
7215 test -e "$perl_archlibexp/CORE/$perl_lib.lib" && perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
7216 else
7217 pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
7218 pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
7219 perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%" -e "s/ -arch [-a-zA-Z0-9_]*//g"`
7220 fi
7221 if test -z "$perl_embed_ldflags" ; then
7222         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7223 $as_echo "no" >&6; }
7224         as_fn_error $? "could not determine flags for linking embedded Perl.
7225 This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not
7226 installed." "$LINENO" 5
7227 else
7228         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ldflags" >&5
7229 $as_echo "$perl_embed_ldflags" >&6; }
7230 fi
7231
7232 fi
7233
7234 if test "$with_python" = yes; then
7235   # Extract the first word of "python", so it can be a program name with args.
7236 set dummy python; ac_word=$2
7237 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7238 $as_echo_n "checking for $ac_word... " >&6; }
7239 if ${ac_cv_path_PYTHON+:} false; then :
7240   $as_echo_n "(cached) " >&6
7241 else
7242   case $PYTHON in
7243   [\\/]* | ?:[\\/]*)
7244   ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
7245   ;;
7246   *)
7247   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7248 for as_dir in $PATH
7249 do
7250   IFS=$as_save_IFS
7251   test -z "$as_dir" && as_dir=.
7252     for ac_exec_ext in '' $ac_executable_extensions; do
7253   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7254     ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
7255     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7256     break 2
7257   fi
7258 done
7259   done
7260 IFS=$as_save_IFS
7261
7262   ;;
7263 esac
7264 fi
7265 PYTHON=$ac_cv_path_PYTHON
7266 if test -n "$PYTHON"; then
7267   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
7268 $as_echo "$PYTHON" >&6; }
7269 else
7270   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7271 $as_echo "no" >&6; }
7272 fi
7273
7274
7275 if test x"$PYTHON" = x""; then
7276   as_fn_error $? "Python not found" "$LINENO" 5
7277 fi
7278
7279
7280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python distutils module" >&5
7281 $as_echo_n "checking for Python distutils module... " >&6; }
7282 if "${PYTHON}" -c 'import distutils' 2>&5
7283 then
7284     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7285 $as_echo "yes" >&6; }
7286 else
7287     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7288 $as_echo "no" >&6; }
7289     as_fn_error $? "distutils module not found" "$LINENO" 5
7290 fi
7291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python configuration directory" >&5
7292 $as_echo_n "checking Python configuration directory... " >&6; }
7293 python_majorversion=`${PYTHON} -c "import sys; print(sys.version[0])"`
7294 python_version=`${PYTHON} -c "import sys; print(sys.version[:3])"`
7295 python_configdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBPL'))))"`
7296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_configdir" >&5
7297 $as_echo "$python_configdir" >&6; }
7298
7299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python include directories" >&5
7300 $as_echo_n "checking Python include directories... " >&6; }
7301 python_includespec=`${PYTHON} -c "
7302 import distutils.sysconfig
7303 a = '-I' + distutils.sysconfig.get_python_inc(False)
7304 b = '-I' + distutils.sysconfig.get_python_inc(True)
7305 if a == b:
7306     print(a)
7307 else:
7308     print(a + ' ' + b)"`
7309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_includespec" >&5
7310 $as_echo "$python_includespec" >&6; }
7311
7312
7313
7314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link an embedded Python application" >&5
7315 $as_echo_n "checking how to link an embedded Python application... " >&6; }
7316
7317 python_libdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBDIR'))))"`
7318 python_ldlibrary=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDLIBRARY'))))"`
7319 python_so=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('SO'))))"`
7320 ldlibrary=`echo "${python_ldlibrary}" | sed "s/${python_so}$//"`
7321 python_framework=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('PYTHONFRAMEWORK'))))"`
7322 python_enable_shared=`${PYTHON} -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_vars().get('Py_ENABLE_SHARED',0))"`
7323
7324 if test -n "$python_framework"; then
7325         python_frameworkprefix=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('PYTHONFRAMEWORKPREFIX'))))"`
7326         python_libspec="-F${python_frameworkprefix} -framework $python_framework"
7327         python_enable_shared=1
7328 elif test x"${python_libdir}" != x"" -a x"${python_ldlibrary}" != x"" -a x"${python_ldlibrary}" != x"${ldlibrary}"
7329 then
7330         # New way: use the official shared library
7331         ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
7332         python_libspec="-L${python_libdir} -l${ldlibrary}"
7333 else
7334         # Old way: use libpython from python_configdir
7335         python_libdir="${python_configdir}"
7336         # LDVERSION was introduced in Python 3.2.
7337         python_ldversion=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDVERSION'))))"`
7338         if test x"${python_ldversion}" = x""; then
7339                 python_ldversion=$python_version
7340         fi
7341         python_libspec="-L${python_libdir} -lpython${python_ldversion}"
7342 fi
7343
7344 if test -z "$python_framework"; then
7345         python_additional_libs=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBS','LIBC','LIBM','BASEMODLIBS'))))"`
7346 fi
7347
7348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_libspec} ${python_additional_libs}" >&5
7349 $as_echo "${python_libspec} ${python_additional_libs}" >&6; }
7350
7351
7352 # threaded python is not supported on OpenBSD
7353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Python is compiled with thread support" >&5
7354 $as_echo_n "checking whether Python is compiled with thread support... " >&6; }
7355 pythreads=`${PYTHON} -c "import sys; print(int('thread' in sys.builtin_module_names))"`
7356 if test "$pythreads" = "1"; then
7357   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7358 $as_echo "yes" >&6; }
7359   case $host_os in
7360   openbsd*)
7361     as_fn_error $? "threaded Python not supported on this platform" "$LINENO" 5
7362     ;;
7363   esac
7364 else
7365   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7366 $as_echo "no" >&6; }
7367 fi
7368
7369
7370 fi
7371
7372 if test "$cross_compiling" = yes && test -z "$with_system_tzdata"; then
7373   # Extract the first word of "zic", so it can be a program name with args.
7374 set dummy zic; ac_word=$2
7375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7376 $as_echo_n "checking for $ac_word... " >&6; }
7377 if ${ac_cv_path_ZIC+:} false; then :
7378   $as_echo_n "(cached) " >&6
7379 else
7380   case $ZIC in
7381   [\\/]* | ?:[\\/]*)
7382   ac_cv_path_ZIC="$ZIC" # Let the user override the test with a path.
7383   ;;
7384   *)
7385   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7386 for as_dir in $PATH
7387 do
7388   IFS=$as_save_IFS
7389   test -z "$as_dir" && as_dir=.
7390     for ac_exec_ext in '' $ac_executable_extensions; do
7391   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7392     ac_cv_path_ZIC="$as_dir/$ac_word$ac_exec_ext"
7393     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7394     break 2
7395   fi
7396 done
7397   done
7398 IFS=$as_save_IFS
7399
7400   ;;
7401 esac
7402 fi
7403 ZIC=$ac_cv_path_ZIC
7404 if test -n "$ZIC"; then
7405   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
7406 $as_echo "$ZIC" >&6; }
7407 else
7408   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7409 $as_echo "no" >&6; }
7410 fi
7411
7412
7413   if test -z "$ZIC"; then
7414     as_fn_error $? "
7415 When cross-compiling, either use the option --with-system-tzdata to use
7416 existing time-zone data, or set the environment variable ZIC to a zic
7417 program to use during the build." "$LINENO" 5
7418   fi
7419 fi
7420
7421
7422 ##
7423 ## Libraries
7424 ##
7425 ## Most libraries are included only if they demonstrably provide a function
7426 ## we need, but libm is an exception: always include it, because there are
7427 ## too many compilers that play cute optimization games that will break
7428 ## probes for standard functions such as pow().
7429 ##
7430
7431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
7432 $as_echo_n "checking for main in -lm... " >&6; }
7433 if ${ac_cv_lib_m_main+:} false; then :
7434   $as_echo_n "(cached) " >&6
7435 else
7436   ac_check_lib_save_LIBS=$LIBS
7437 LIBS="-lm  $LIBS"
7438 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7439 /* end confdefs.h.  */
7440
7441
7442 int
7443 main ()
7444 {
7445 return main ();
7446   ;
7447   return 0;
7448 }
7449 _ACEOF
7450 if ac_fn_c_try_link "$LINENO"; then :
7451   ac_cv_lib_m_main=yes
7452 else
7453   ac_cv_lib_m_main=no
7454 fi
7455 rm -f core conftest.err conftest.$ac_objext \
7456     conftest$ac_exeext conftest.$ac_ext
7457 LIBS=$ac_check_lib_save_LIBS
7458 fi
7459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
7460 $as_echo "$ac_cv_lib_m_main" >&6; }
7461 if test "x$ac_cv_lib_m_main" = xyes; then :
7462   cat >>confdefs.h <<_ACEOF
7463 #define HAVE_LIBM 1
7464 _ACEOF
7465
7466   LIBS="-lm $LIBS"
7467
7468 fi
7469
7470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setproctitle" >&5
7471 $as_echo_n "checking for library containing setproctitle... " >&6; }
7472 if ${ac_cv_search_setproctitle+:} false; then :
7473   $as_echo_n "(cached) " >&6
7474 else
7475   ac_func_search_save_LIBS=$LIBS
7476 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7477 /* end confdefs.h.  */
7478
7479 /* Override any GCC internal prototype to avoid an error.
7480    Use char because int might match the return type of a GCC
7481    builtin and then its argument prototype would still apply.  */
7482 #ifdef __cplusplus
7483 extern "C"
7484 #endif
7485 char setproctitle ();
7486 int
7487 main ()
7488 {
7489 return setproctitle ();
7490   ;
7491   return 0;
7492 }
7493 _ACEOF
7494 for ac_lib in '' util; do
7495   if test -z "$ac_lib"; then
7496     ac_res="none required"
7497   else
7498     ac_res=-l$ac_lib
7499     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7500   fi
7501   if ac_fn_c_try_link "$LINENO"; then :
7502   ac_cv_search_setproctitle=$ac_res
7503 fi
7504 rm -f core conftest.err conftest.$ac_objext \
7505     conftest$ac_exeext
7506   if ${ac_cv_search_setproctitle+:} false; then :
7507   break
7508 fi
7509 done
7510 if ${ac_cv_search_setproctitle+:} false; then :
7511
7512 else
7513   ac_cv_search_setproctitle=no
7514 fi
7515 rm conftest.$ac_ext
7516 LIBS=$ac_func_search_save_LIBS
7517 fi
7518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setproctitle" >&5
7519 $as_echo "$ac_cv_search_setproctitle" >&6; }
7520 ac_res=$ac_cv_search_setproctitle
7521 if test "$ac_res" != no; then :
7522   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7523
7524 fi
7525
7526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
7527 $as_echo_n "checking for library containing dlopen... " >&6; }
7528 if ${ac_cv_search_dlopen+:} false; then :
7529   $as_echo_n "(cached) " >&6
7530 else
7531   ac_func_search_save_LIBS=$LIBS
7532 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7533 /* end confdefs.h.  */
7534
7535 /* Override any GCC internal prototype to avoid an error.
7536    Use char because int might match the return type of a GCC
7537    builtin and then its argument prototype would still apply.  */
7538 #ifdef __cplusplus
7539 extern "C"
7540 #endif
7541 char dlopen ();
7542 int
7543 main ()
7544 {
7545 return dlopen ();
7546   ;
7547   return 0;
7548 }
7549 _ACEOF
7550 for ac_lib in '' dl; do
7551   if test -z "$ac_lib"; then
7552     ac_res="none required"
7553   else
7554     ac_res=-l$ac_lib
7555     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7556   fi
7557   if ac_fn_c_try_link "$LINENO"; then :
7558   ac_cv_search_dlopen=$ac_res
7559 fi
7560 rm -f core conftest.err conftest.$ac_objext \
7561     conftest$ac_exeext
7562   if ${ac_cv_search_dlopen+:} false; then :
7563   break
7564 fi
7565 done
7566 if ${ac_cv_search_dlopen+:} false; then :
7567
7568 else
7569   ac_cv_search_dlopen=no
7570 fi
7571 rm conftest.$ac_ext
7572 LIBS=$ac_func_search_save_LIBS
7573 fi
7574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
7575 $as_echo "$ac_cv_search_dlopen" >&6; }
7576 ac_res=$ac_cv_search_dlopen
7577 if test "$ac_res" != no; then :
7578   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7579
7580 fi
7581
7582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
7583 $as_echo_n "checking for library containing socket... " >&6; }
7584 if ${ac_cv_search_socket+:} false; then :
7585   $as_echo_n "(cached) " >&6
7586 else
7587   ac_func_search_save_LIBS=$LIBS
7588 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7589 /* end confdefs.h.  */
7590
7591 /* Override any GCC internal prototype to avoid an error.
7592    Use char because int might match the return type of a GCC
7593    builtin and then its argument prototype would still apply.  */
7594 #ifdef __cplusplus
7595 extern "C"
7596 #endif
7597 char socket ();
7598 int
7599 main ()
7600 {
7601 return socket ();
7602   ;
7603   return 0;
7604 }
7605 _ACEOF
7606 for ac_lib in '' socket wsock32; do
7607   if test -z "$ac_lib"; then
7608     ac_res="none required"
7609   else
7610     ac_res=-l$ac_lib
7611     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7612   fi
7613   if ac_fn_c_try_link "$LINENO"; then :
7614   ac_cv_search_socket=$ac_res
7615 fi
7616 rm -f core conftest.err conftest.$ac_objext \
7617     conftest$ac_exeext
7618   if ${ac_cv_search_socket+:} false; then :
7619   break
7620 fi
7621 done
7622 if ${ac_cv_search_socket+:} false; then :
7623
7624 else
7625   ac_cv_search_socket=no
7626 fi
7627 rm conftest.$ac_ext
7628 LIBS=$ac_func_search_save_LIBS
7629 fi
7630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
7631 $as_echo "$ac_cv_search_socket" >&6; }
7632 ac_res=$ac_cv_search_socket
7633 if test "$ac_res" != no; then :
7634   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7635
7636 fi
7637
7638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shl_load" >&5
7639 $as_echo_n "checking for library containing shl_load... " >&6; }
7640 if ${ac_cv_search_shl_load+:} false; then :
7641   $as_echo_n "(cached) " >&6
7642 else
7643   ac_func_search_save_LIBS=$LIBS
7644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7645 /* end confdefs.h.  */
7646
7647 /* Override any GCC internal prototype to avoid an error.
7648    Use char because int might match the return type of a GCC
7649    builtin and then its argument prototype would still apply.  */
7650 #ifdef __cplusplus
7651 extern "C"
7652 #endif
7653 char shl_load ();
7654 int
7655 main ()
7656 {
7657 return shl_load ();
7658   ;
7659   return 0;
7660 }
7661 _ACEOF
7662 for ac_lib in '' dld; do
7663   if test -z "$ac_lib"; then
7664     ac_res="none required"
7665   else
7666     ac_res=-l$ac_lib
7667     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7668   fi
7669   if ac_fn_c_try_link "$LINENO"; then :
7670   ac_cv_search_shl_load=$ac_res
7671 fi
7672 rm -f core conftest.err conftest.$ac_objext \
7673     conftest$ac_exeext
7674   if ${ac_cv_search_shl_load+:} false; then :
7675   break
7676 fi
7677 done
7678 if ${ac_cv_search_shl_load+:} false; then :
7679
7680 else
7681   ac_cv_search_shl_load=no
7682 fi
7683 rm conftest.$ac_ext
7684 LIBS=$ac_func_search_save_LIBS
7685 fi
7686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shl_load" >&5
7687 $as_echo "$ac_cv_search_shl_load" >&6; }
7688 ac_res=$ac_cv_search_shl_load
7689 if test "$ac_res" != no; then :
7690   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7691
7692 fi
7693
7694 # We only use libld in port/dynloader/aix.c
7695 case $host_os in
7696      aix*)
7697         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing ldopen" >&5
7698 $as_echo_n "checking for library containing ldopen... " >&6; }
7699 if ${ac_cv_search_ldopen+:} false; then :
7700   $as_echo_n "(cached) " >&6
7701 else
7702   ac_func_search_save_LIBS=$LIBS
7703 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7704 /* end confdefs.h.  */
7705
7706 /* Override any GCC internal prototype to avoid an error.
7707    Use char because int might match the return type of a GCC
7708    builtin and then its argument prototype would still apply.  */
7709 #ifdef __cplusplus
7710 extern "C"
7711 #endif
7712 char ldopen ();
7713 int
7714 main ()
7715 {
7716 return ldopen ();
7717   ;
7718   return 0;
7719 }
7720 _ACEOF
7721 for ac_lib in '' ld; do
7722   if test -z "$ac_lib"; then
7723     ac_res="none required"
7724   else
7725     ac_res=-l$ac_lib
7726     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7727   fi
7728   if ac_fn_c_try_link "$LINENO"; then :
7729   ac_cv_search_ldopen=$ac_res
7730 fi
7731 rm -f core conftest.err conftest.$ac_objext \
7732     conftest$ac_exeext
7733   if ${ac_cv_search_ldopen+:} false; then :
7734   break
7735 fi
7736 done
7737 if ${ac_cv_search_ldopen+:} false; then :
7738
7739 else
7740   ac_cv_search_ldopen=no
7741 fi
7742 rm conftest.$ac_ext
7743 LIBS=$ac_func_search_save_LIBS
7744 fi
7745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_ldopen" >&5
7746 $as_echo "$ac_cv_search_ldopen" >&6; }
7747 ac_res=$ac_cv_search_ldopen
7748 if test "$ac_res" != no; then :
7749   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7750
7751 fi
7752
7753         ;;
7754 esac
7755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getopt_long" >&5
7756 $as_echo_n "checking for library containing getopt_long... " >&6; }
7757 if ${ac_cv_search_getopt_long+:} false; then :
7758   $as_echo_n "(cached) " >&6
7759 else
7760   ac_func_search_save_LIBS=$LIBS
7761 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7762 /* end confdefs.h.  */
7763
7764 /* Override any GCC internal prototype to avoid an error.
7765    Use char because int might match the return type of a GCC
7766    builtin and then its argument prototype would still apply.  */
7767 #ifdef __cplusplus
7768 extern "C"
7769 #endif
7770 char getopt_long ();
7771 int
7772 main ()
7773 {
7774 return getopt_long ();
7775   ;
7776   return 0;
7777 }
7778 _ACEOF
7779 for ac_lib in '' getopt gnugetopt; do
7780   if test -z "$ac_lib"; then
7781     ac_res="none required"
7782   else
7783     ac_res=-l$ac_lib
7784     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7785   fi
7786   if ac_fn_c_try_link "$LINENO"; then :
7787   ac_cv_search_getopt_long=$ac_res
7788 fi
7789 rm -f core conftest.err conftest.$ac_objext \
7790     conftest$ac_exeext
7791   if ${ac_cv_search_getopt_long+:} false; then :
7792   break
7793 fi
7794 done
7795 if ${ac_cv_search_getopt_long+:} false; then :
7796
7797 else
7798   ac_cv_search_getopt_long=no
7799 fi
7800 rm conftest.$ac_ext
7801 LIBS=$ac_func_search_save_LIBS
7802 fi
7803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getopt_long" >&5
7804 $as_echo "$ac_cv_search_getopt_long" >&6; }
7805 ac_res=$ac_cv_search_getopt_long
7806 if test "$ac_res" != no; then :
7807   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7808
7809 fi
7810
7811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
7812 $as_echo_n "checking for library containing crypt... " >&6; }
7813 if ${ac_cv_search_crypt+:} false; then :
7814   $as_echo_n "(cached) " >&6
7815 else
7816   ac_func_search_save_LIBS=$LIBS
7817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7818 /* end confdefs.h.  */
7819
7820 /* Override any GCC internal prototype to avoid an error.
7821    Use char because int might match the return type of a GCC
7822    builtin and then its argument prototype would still apply.  */
7823 #ifdef __cplusplus
7824 extern "C"
7825 #endif
7826 char crypt ();
7827 int
7828 main ()
7829 {
7830 return crypt ();
7831   ;
7832   return 0;
7833 }
7834 _ACEOF
7835 for ac_lib in '' crypt; do
7836   if test -z "$ac_lib"; then
7837     ac_res="none required"
7838   else
7839     ac_res=-l$ac_lib
7840     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7841   fi
7842   if ac_fn_c_try_link "$LINENO"; then :
7843   ac_cv_search_crypt=$ac_res
7844 fi
7845 rm -f core conftest.err conftest.$ac_objext \
7846     conftest$ac_exeext
7847   if ${ac_cv_search_crypt+:} false; then :
7848   break
7849 fi
7850 done
7851 if ${ac_cv_search_crypt+:} false; then :
7852
7853 else
7854   ac_cv_search_crypt=no
7855 fi
7856 rm conftest.$ac_ext
7857 LIBS=$ac_func_search_save_LIBS
7858 fi
7859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
7860 $as_echo "$ac_cv_search_crypt" >&6; }
7861 ac_res=$ac_cv_search_crypt
7862 if test "$ac_res" != no; then :
7863   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7864
7865 fi
7866
7867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
7868 $as_echo_n "checking for library containing shm_open... " >&6; }
7869 if ${ac_cv_search_shm_open+:} false; then :
7870   $as_echo_n "(cached) " >&6
7871 else
7872   ac_func_search_save_LIBS=$LIBS
7873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7874 /* end confdefs.h.  */
7875
7876 /* Override any GCC internal prototype to avoid an error.
7877    Use char because int might match the return type of a GCC
7878    builtin and then its argument prototype would still apply.  */
7879 #ifdef __cplusplus
7880 extern "C"
7881 #endif
7882 char shm_open ();
7883 int
7884 main ()
7885 {
7886 return shm_open ();
7887   ;
7888   return 0;
7889 }
7890 _ACEOF
7891 for ac_lib in '' rt; do
7892   if test -z "$ac_lib"; then
7893     ac_res="none required"
7894   else
7895     ac_res=-l$ac_lib
7896     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7897   fi
7898   if ac_fn_c_try_link "$LINENO"; then :
7899   ac_cv_search_shm_open=$ac_res
7900 fi
7901 rm -f core conftest.err conftest.$ac_objext \
7902     conftest$ac_exeext
7903   if ${ac_cv_search_shm_open+:} false; then :
7904   break
7905 fi
7906 done
7907 if ${ac_cv_search_shm_open+:} false; then :
7908
7909 else
7910   ac_cv_search_shm_open=no
7911 fi
7912 rm conftest.$ac_ext
7913 LIBS=$ac_func_search_save_LIBS
7914 fi
7915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
7916 $as_echo "$ac_cv_search_shm_open" >&6; }
7917 ac_res=$ac_cv_search_shm_open
7918 if test "$ac_res" != no; then :
7919   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7920
7921 fi
7922
7923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_unlink" >&5
7924 $as_echo_n "checking for library containing shm_unlink... " >&6; }
7925 if ${ac_cv_search_shm_unlink+:} false; then :
7926   $as_echo_n "(cached) " >&6
7927 else
7928   ac_func_search_save_LIBS=$LIBS
7929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7930 /* end confdefs.h.  */
7931
7932 /* Override any GCC internal prototype to avoid an error.
7933    Use char because int might match the return type of a GCC
7934    builtin and then its argument prototype would still apply.  */
7935 #ifdef __cplusplus
7936 extern "C"
7937 #endif
7938 char shm_unlink ();
7939 int
7940 main ()
7941 {
7942 return shm_unlink ();
7943   ;
7944   return 0;
7945 }
7946 _ACEOF
7947 for ac_lib in '' rt; do
7948   if test -z "$ac_lib"; then
7949     ac_res="none required"
7950   else
7951     ac_res=-l$ac_lib
7952     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7953   fi
7954   if ac_fn_c_try_link "$LINENO"; then :
7955   ac_cv_search_shm_unlink=$ac_res
7956 fi
7957 rm -f core conftest.err conftest.$ac_objext \
7958     conftest$ac_exeext
7959   if ${ac_cv_search_shm_unlink+:} false; then :
7960   break
7961 fi
7962 done
7963 if ${ac_cv_search_shm_unlink+:} false; then :
7964
7965 else
7966   ac_cv_search_shm_unlink=no
7967 fi
7968 rm conftest.$ac_ext
7969 LIBS=$ac_func_search_save_LIBS
7970 fi
7971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_unlink" >&5
7972 $as_echo "$ac_cv_search_shm_unlink" >&6; }
7973 ac_res=$ac_cv_search_shm_unlink
7974 if test "$ac_res" != no; then :
7975   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7976
7977 fi
7978
7979 # Solaris:
7980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5
7981 $as_echo_n "checking for library containing fdatasync... " >&6; }
7982 if ${ac_cv_search_fdatasync+:} 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 fdatasync ();
7996 int
7997 main ()
7998 {
7999 return fdatasync ();
8000   ;
8001   return 0;
8002 }
8003 _ACEOF
8004 for ac_lib in '' rt posix4; 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_fdatasync=$ac_res
8013 fi
8014 rm -f core conftest.err conftest.$ac_objext \
8015     conftest$ac_exeext
8016   if ${ac_cv_search_fdatasync+:} false; then :
8017   break
8018 fi
8019 done
8020 if ${ac_cv_search_fdatasync+:} false; then :
8021
8022 else
8023   ac_cv_search_fdatasync=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_fdatasync" >&5
8029 $as_echo "$ac_cv_search_fdatasync" >&6; }
8030 ac_res=$ac_cv_search_fdatasync
8031 if test "$ac_res" != no; then :
8032   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8033
8034 fi
8035
8036 # Required for thread_test.c on Solaris 2.5:
8037 # Other ports use it too (HP-UX) so test unconditionally
8038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname_r" >&5
8039 $as_echo_n "checking for library containing gethostbyname_r... " >&6; }
8040 if ${ac_cv_search_gethostbyname_r+:} false; then :
8041   $as_echo_n "(cached) " >&6
8042 else
8043   ac_func_search_save_LIBS=$LIBS
8044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8045 /* end confdefs.h.  */
8046
8047 /* Override any GCC internal prototype to avoid an error.
8048    Use char because int might match the return type of a GCC
8049    builtin and then its argument prototype would still apply.  */
8050 #ifdef __cplusplus
8051 extern "C"
8052 #endif
8053 char gethostbyname_r ();
8054 int
8055 main ()
8056 {
8057 return gethostbyname_r ();
8058   ;
8059   return 0;
8060 }
8061 _ACEOF
8062 for ac_lib in '' nsl; do
8063   if test -z "$ac_lib"; then
8064     ac_res="none required"
8065   else
8066     ac_res=-l$ac_lib
8067     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8068   fi
8069   if ac_fn_c_try_link "$LINENO"; then :
8070   ac_cv_search_gethostbyname_r=$ac_res
8071 fi
8072 rm -f core conftest.err conftest.$ac_objext \
8073     conftest$ac_exeext
8074   if ${ac_cv_search_gethostbyname_r+:} false; then :
8075   break
8076 fi
8077 done
8078 if ${ac_cv_search_gethostbyname_r+:} false; then :
8079
8080 else
8081   ac_cv_search_gethostbyname_r=no
8082 fi
8083 rm conftest.$ac_ext
8084 LIBS=$ac_func_search_save_LIBS
8085 fi
8086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname_r" >&5
8087 $as_echo "$ac_cv_search_gethostbyname_r" >&6; }
8088 ac_res=$ac_cv_search_gethostbyname_r
8089 if test "$ac_res" != no; then :
8090   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8091
8092 fi
8093
8094 # Cygwin:
8095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shmget" >&5
8096 $as_echo_n "checking for library containing shmget... " >&6; }
8097 if ${ac_cv_search_shmget+:} 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 shmget ();
8111 int
8112 main ()
8113 {
8114 return shmget ();
8115   ;
8116   return 0;
8117 }
8118 _ACEOF
8119 for ac_lib in '' cygipc; 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_shmget=$ac_res
8128 fi
8129 rm -f core conftest.err conftest.$ac_objext \
8130     conftest$ac_exeext
8131   if ${ac_cv_search_shmget+:} false; then :
8132   break
8133 fi
8134 done
8135 if ${ac_cv_search_shmget+:} false; then :
8136
8137 else
8138   ac_cv_search_shmget=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_shmget" >&5
8144 $as_echo "$ac_cv_search_shmget" >&6; }
8145 ac_res=$ac_cv_search_shmget
8146 if test "$ac_res" != no; then :
8147   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8148
8149 fi
8150
8151
8152 if test "$with_readline" = yes; then
8153
8154
8155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing readline" >&5
8156 $as_echo_n "checking for library containing readline... " >&6; }
8157 if ${pgac_cv_check_readline+:} false; then :
8158   $as_echo_n "(cached) " >&6
8159 else
8160   pgac_cv_check_readline=no
8161 pgac_save_LIBS=$LIBS
8162 if test x"$with_libedit_preferred" != x"yes"
8163 then    READLINE_ORDER="-lreadline -ledit"
8164 else    READLINE_ORDER="-ledit -lreadline"
8165 fi
8166 for pgac_rllib in $READLINE_ORDER ; do
8167   for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
8168     LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
8169     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8170 /* end confdefs.h.  */
8171
8172 /* Override any GCC internal prototype to avoid an error.
8173    Use char because int might match the return type of a GCC
8174    builtin and then its argument prototype would still apply.  */
8175 #ifdef __cplusplus
8176 extern "C"
8177 #endif
8178 char readline ();
8179 int
8180 main ()
8181 {
8182 return readline ();
8183   ;
8184   return 0;
8185 }
8186 _ACEOF
8187 if ac_fn_c_try_link "$LINENO"; then :
8188
8189       # Older NetBSD, OpenBSD, and Irix have a broken linker that does not
8190       # recognize dependent libraries; assume curses is needed if we didn't
8191       # find any dependency.
8192       case $host_os in
8193         netbsd* | openbsd* | irix*)
8194           if test x"$pgac_lib" = x"" ; then
8195             pgac_lib=" -lcurses"
8196           fi ;;
8197       esac
8198
8199       pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
8200       break
8201
8202 fi
8203 rm -f core conftest.err conftest.$ac_objext \
8204     conftest$ac_exeext conftest.$ac_ext
8205   done
8206   if test "$pgac_cv_check_readline" != no ; then
8207     break
8208   fi
8209 done
8210 LIBS=$pgac_save_LIBS
8211
8212 fi
8213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_readline" >&5
8214 $as_echo "$pgac_cv_check_readline" >&6; }
8215 if test "$pgac_cv_check_readline" != no ; then
8216   LIBS="$pgac_cv_check_readline $LIBS"
8217
8218 $as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
8219
8220 fi
8221
8222
8223   if test x"$pgac_cv_check_readline" = x"no"; then
8224     as_fn_error $? "readline library not found
8225 If you have readline already installed, see config.log for details on the
8226 failure.  It is possible the compiler isn't looking in the proper directory.
8227 Use --without-readline to disable readline support." "$LINENO" 5
8228   fi
8229 fi
8230
8231 if test "$with_zlib" = yes; then
8232   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5
8233 $as_echo_n "checking for inflate in -lz... " >&6; }
8234 if ${ac_cv_lib_z_inflate+:} false; then :
8235   $as_echo_n "(cached) " >&6
8236 else
8237   ac_check_lib_save_LIBS=$LIBS
8238 LIBS="-lz  $LIBS"
8239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8240 /* end confdefs.h.  */
8241
8242 /* Override any GCC internal prototype to avoid an error.
8243    Use char because int might match the return type of a GCC
8244    builtin and then its argument prototype would still apply.  */
8245 #ifdef __cplusplus
8246 extern "C"
8247 #endif
8248 char inflate ();
8249 int
8250 main ()
8251 {
8252 return inflate ();
8253   ;
8254   return 0;
8255 }
8256 _ACEOF
8257 if ac_fn_c_try_link "$LINENO"; then :
8258   ac_cv_lib_z_inflate=yes
8259 else
8260   ac_cv_lib_z_inflate=no
8261 fi
8262 rm -f core conftest.err conftest.$ac_objext \
8263     conftest$ac_exeext conftest.$ac_ext
8264 LIBS=$ac_check_lib_save_LIBS
8265 fi
8266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5
8267 $as_echo "$ac_cv_lib_z_inflate" >&6; }
8268 if test "x$ac_cv_lib_z_inflate" = xyes; then :
8269   cat >>confdefs.h <<_ACEOF
8270 #define HAVE_LIBZ 1
8271 _ACEOF
8272
8273   LIBS="-lz $LIBS"
8274
8275 else
8276   as_fn_error $? "zlib library not found
8277 If you have zlib already installed, see config.log for details on the
8278 failure.  It is possible the compiler isn't looking in the proper directory.
8279 Use --without-zlib to disable zlib support." "$LINENO" 5
8280 fi
8281
8282 fi
8283
8284 if test "$enable_spinlocks" = yes; then
8285
8286 $as_echo "#define HAVE_SPINLOCKS 1" >>confdefs.h
8287
8288 else
8289   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
8290 *** Not using spinlocks will cause poor performance." >&5
8291 $as_echo "$as_me: WARNING:
8292 *** Not using spinlocks will cause poor performance." >&2;}
8293 fi
8294
8295 if test "$with_gssapi" = yes ; then
8296   if test "$PORTNAME" != "win32"; then
8297     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gss_init_sec_context" >&5
8298 $as_echo_n "checking for library containing gss_init_sec_context... " >&6; }
8299 if ${ac_cv_search_gss_init_sec_context+:} false; then :
8300   $as_echo_n "(cached) " >&6
8301 else
8302   ac_func_search_save_LIBS=$LIBS
8303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8304 /* end confdefs.h.  */
8305
8306 /* Override any GCC internal prototype to avoid an error.
8307    Use char because int might match the return type of a GCC
8308    builtin and then its argument prototype would still apply.  */
8309 #ifdef __cplusplus
8310 extern "C"
8311 #endif
8312 char gss_init_sec_context ();
8313 int
8314 main ()
8315 {
8316 return gss_init_sec_context ();
8317   ;
8318   return 0;
8319 }
8320 _ACEOF
8321 for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'; do
8322   if test -z "$ac_lib"; then
8323     ac_res="none required"
8324   else
8325     ac_res=-l$ac_lib
8326     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8327   fi
8328   if ac_fn_c_try_link "$LINENO"; then :
8329   ac_cv_search_gss_init_sec_context=$ac_res
8330 fi
8331 rm -f core conftest.err conftest.$ac_objext \
8332     conftest$ac_exeext
8333   if ${ac_cv_search_gss_init_sec_context+:} false; then :
8334   break
8335 fi
8336 done
8337 if ${ac_cv_search_gss_init_sec_context+:} false; then :
8338
8339 else
8340   ac_cv_search_gss_init_sec_context=no
8341 fi
8342 rm conftest.$ac_ext
8343 LIBS=$ac_func_search_save_LIBS
8344 fi
8345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gss_init_sec_context" >&5
8346 $as_echo "$ac_cv_search_gss_init_sec_context" >&6; }
8347 ac_res=$ac_cv_search_gss_init_sec_context
8348 if test "$ac_res" != no; then :
8349   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8350
8351 else
8352   as_fn_error $? "could not find function 'gss_init_sec_context' required for GSSAPI" "$LINENO" 5
8353 fi
8354
8355   else
8356     LIBS="$LIBS -lgssapi32"
8357   fi
8358 fi
8359
8360 if test "$with_openssl" = yes ; then
8361     if test "$PORTNAME" != "win32"; then
8362      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_new_ex_data in -lcrypto" >&5
8363 $as_echo_n "checking for CRYPTO_new_ex_data in -lcrypto... " >&6; }
8364 if ${ac_cv_lib_crypto_CRYPTO_new_ex_data+:} false; then :
8365   $as_echo_n "(cached) " >&6
8366 else
8367   ac_check_lib_save_LIBS=$LIBS
8368 LIBS="-lcrypto  $LIBS"
8369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8370 /* end confdefs.h.  */
8371
8372 /* Override any GCC internal prototype to avoid an error.
8373    Use char because int might match the return type of a GCC
8374    builtin and then its argument prototype would still apply.  */
8375 #ifdef __cplusplus
8376 extern "C"
8377 #endif
8378 char CRYPTO_new_ex_data ();
8379 int
8380 main ()
8381 {
8382 return CRYPTO_new_ex_data ();
8383   ;
8384   return 0;
8385 }
8386 _ACEOF
8387 if ac_fn_c_try_link "$LINENO"; then :
8388   ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
8389 else
8390   ac_cv_lib_crypto_CRYPTO_new_ex_data=no
8391 fi
8392 rm -f core conftest.err conftest.$ac_objext \
8393     conftest$ac_exeext conftest.$ac_ext
8394 LIBS=$ac_check_lib_save_LIBS
8395 fi
8396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
8397 $as_echo "$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6; }
8398 if test "x$ac_cv_lib_crypto_CRYPTO_new_ex_data" = xyes; then :
8399   cat >>confdefs.h <<_ACEOF
8400 #define HAVE_LIBCRYPTO 1
8401 _ACEOF
8402
8403   LIBS="-lcrypto $LIBS"
8404
8405 else
8406   as_fn_error $? "library 'crypto' is required for OpenSSL" "$LINENO" 5
8407 fi
8408
8409      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_library_init in -lssl" >&5
8410 $as_echo_n "checking for SSL_library_init in -lssl... " >&6; }
8411 if ${ac_cv_lib_ssl_SSL_library_init+:} false; then :
8412   $as_echo_n "(cached) " >&6
8413 else
8414   ac_check_lib_save_LIBS=$LIBS
8415 LIBS="-lssl  $LIBS"
8416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8417 /* end confdefs.h.  */
8418
8419 /* Override any GCC internal prototype to avoid an error.
8420    Use char because int might match the return type of a GCC
8421    builtin and then its argument prototype would still apply.  */
8422 #ifdef __cplusplus
8423 extern "C"
8424 #endif
8425 char SSL_library_init ();
8426 int
8427 main ()
8428 {
8429 return SSL_library_init ();
8430   ;
8431   return 0;
8432 }
8433 _ACEOF
8434 if ac_fn_c_try_link "$LINENO"; then :
8435   ac_cv_lib_ssl_SSL_library_init=yes
8436 else
8437   ac_cv_lib_ssl_SSL_library_init=no
8438 fi
8439 rm -f core conftest.err conftest.$ac_objext \
8440     conftest$ac_exeext conftest.$ac_ext
8441 LIBS=$ac_check_lib_save_LIBS
8442 fi
8443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_library_init" >&5
8444 $as_echo "$ac_cv_lib_ssl_SSL_library_init" >&6; }
8445 if test "x$ac_cv_lib_ssl_SSL_library_init" = xyes; then :
8446   cat >>confdefs.h <<_ACEOF
8447 #define HAVE_LIBSSL 1
8448 _ACEOF
8449
8450   LIBS="-lssl $LIBS"
8451
8452 else
8453   as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5
8454 fi
8455
8456   else
8457      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing CRYPTO_new_ex_data" >&5
8458 $as_echo_n "checking for library containing CRYPTO_new_ex_data... " >&6; }
8459 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
8460   $as_echo_n "(cached) " >&6
8461 else
8462   ac_func_search_save_LIBS=$LIBS
8463 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8464 /* end confdefs.h.  */
8465
8466 /* Override any GCC internal prototype to avoid an error.
8467    Use char because int might match the return type of a GCC
8468    builtin and then its argument prototype would still apply.  */
8469 #ifdef __cplusplus
8470 extern "C"
8471 #endif
8472 char CRYPTO_new_ex_data ();
8473 int
8474 main ()
8475 {
8476 return CRYPTO_new_ex_data ();
8477   ;
8478   return 0;
8479 }
8480 _ACEOF
8481 for ac_lib in '' eay32 crypto; do
8482   if test -z "$ac_lib"; then
8483     ac_res="none required"
8484   else
8485     ac_res=-l$ac_lib
8486     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8487   fi
8488   if ac_fn_c_try_link "$LINENO"; then :
8489   ac_cv_search_CRYPTO_new_ex_data=$ac_res
8490 fi
8491 rm -f core conftest.err conftest.$ac_objext \
8492     conftest$ac_exeext
8493   if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
8494   break
8495 fi
8496 done
8497 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
8498
8499 else
8500   ac_cv_search_CRYPTO_new_ex_data=no
8501 fi
8502 rm conftest.$ac_ext
8503 LIBS=$ac_func_search_save_LIBS
8504 fi
8505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_CRYPTO_new_ex_data" >&5
8506 $as_echo "$ac_cv_search_CRYPTO_new_ex_data" >&6; }
8507 ac_res=$ac_cv_search_CRYPTO_new_ex_data
8508 if test "$ac_res" != no; then :
8509   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8510
8511 else
8512   as_fn_error $? "library 'eay32' or 'crypto' is required for OpenSSL" "$LINENO" 5
8513 fi
8514
8515      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_library_init" >&5
8516 $as_echo_n "checking for library containing SSL_library_init... " >&6; }
8517 if ${ac_cv_search_SSL_library_init+:} false; then :
8518   $as_echo_n "(cached) " >&6
8519 else
8520   ac_func_search_save_LIBS=$LIBS
8521 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8522 /* end confdefs.h.  */
8523
8524 /* Override any GCC internal prototype to avoid an error.
8525    Use char because int might match the return type of a GCC
8526    builtin and then its argument prototype would still apply.  */
8527 #ifdef __cplusplus
8528 extern "C"
8529 #endif
8530 char SSL_library_init ();
8531 int
8532 main ()
8533 {
8534 return SSL_library_init ();
8535   ;
8536   return 0;
8537 }
8538 _ACEOF
8539 for ac_lib in '' ssleay32 ssl; do
8540   if test -z "$ac_lib"; then
8541     ac_res="none required"
8542   else
8543     ac_res=-l$ac_lib
8544     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8545   fi
8546   if ac_fn_c_try_link "$LINENO"; then :
8547   ac_cv_search_SSL_library_init=$ac_res
8548 fi
8549 rm -f core conftest.err conftest.$ac_objext \
8550     conftest$ac_exeext
8551   if ${ac_cv_search_SSL_library_init+:} false; then :
8552   break
8553 fi
8554 done
8555 if ${ac_cv_search_SSL_library_init+:} false; then :
8556
8557 else
8558   ac_cv_search_SSL_library_init=no
8559 fi
8560 rm conftest.$ac_ext
8561 LIBS=$ac_func_search_save_LIBS
8562 fi
8563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_library_init" >&5
8564 $as_echo "$ac_cv_search_SSL_library_init" >&6; }
8565 ac_res=$ac_cv_search_SSL_library_init
8566 if test "$ac_res" != no; then :
8567   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8568
8569 else
8570   as_fn_error $? "library 'ssleay32' or 'ssl' is required for OpenSSL" "$LINENO" 5
8571 fi
8572
8573   fi
8574 fi
8575
8576 if test "$with_pam" = yes ; then
8577   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_start in -lpam" >&5
8578 $as_echo_n "checking for pam_start in -lpam... " >&6; }
8579 if ${ac_cv_lib_pam_pam_start+:} false; then :
8580   $as_echo_n "(cached) " >&6
8581 else
8582   ac_check_lib_save_LIBS=$LIBS
8583 LIBS="-lpam  $LIBS"
8584 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8585 /* end confdefs.h.  */
8586
8587 /* Override any GCC internal prototype to avoid an error.
8588    Use char because int might match the return type of a GCC
8589    builtin and then its argument prototype would still apply.  */
8590 #ifdef __cplusplus
8591 extern "C"
8592 #endif
8593 char pam_start ();
8594 int
8595 main ()
8596 {
8597 return pam_start ();
8598   ;
8599   return 0;
8600 }
8601 _ACEOF
8602 if ac_fn_c_try_link "$LINENO"; then :
8603   ac_cv_lib_pam_pam_start=yes
8604 else
8605   ac_cv_lib_pam_pam_start=no
8606 fi
8607 rm -f core conftest.err conftest.$ac_objext \
8608     conftest$ac_exeext conftest.$ac_ext
8609 LIBS=$ac_check_lib_save_LIBS
8610 fi
8611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_start" >&5
8612 $as_echo "$ac_cv_lib_pam_pam_start" >&6; }
8613 if test "x$ac_cv_lib_pam_pam_start" = xyes; then :
8614   cat >>confdefs.h <<_ACEOF
8615 #define HAVE_LIBPAM 1
8616 _ACEOF
8617
8618   LIBS="-lpam $LIBS"
8619
8620 else
8621   as_fn_error $? "library 'pam' is required for PAM" "$LINENO" 5
8622 fi
8623
8624 fi
8625
8626 if test "$with_libxml" = yes ; then
8627   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlSaveToBuffer in -lxml2" >&5
8628 $as_echo_n "checking for xmlSaveToBuffer in -lxml2... " >&6; }
8629 if ${ac_cv_lib_xml2_xmlSaveToBuffer+:} false; then :
8630   $as_echo_n "(cached) " >&6
8631 else
8632   ac_check_lib_save_LIBS=$LIBS
8633 LIBS="-lxml2  $LIBS"
8634 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8635 /* end confdefs.h.  */
8636
8637 /* Override any GCC internal prototype to avoid an error.
8638    Use char because int might match the return type of a GCC
8639    builtin and then its argument prototype would still apply.  */
8640 #ifdef __cplusplus
8641 extern "C"
8642 #endif
8643 char xmlSaveToBuffer ();
8644 int
8645 main ()
8646 {
8647 return xmlSaveToBuffer ();
8648   ;
8649   return 0;
8650 }
8651 _ACEOF
8652 if ac_fn_c_try_link "$LINENO"; then :
8653   ac_cv_lib_xml2_xmlSaveToBuffer=yes
8654 else
8655   ac_cv_lib_xml2_xmlSaveToBuffer=no
8656 fi
8657 rm -f core conftest.err conftest.$ac_objext \
8658     conftest$ac_exeext conftest.$ac_ext
8659 LIBS=$ac_check_lib_save_LIBS
8660 fi
8661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlSaveToBuffer" >&5
8662 $as_echo "$ac_cv_lib_xml2_xmlSaveToBuffer" >&6; }
8663 if test "x$ac_cv_lib_xml2_xmlSaveToBuffer" = xyes; then :
8664   cat >>confdefs.h <<_ACEOF
8665 #define HAVE_LIBXML2 1
8666 _ACEOF
8667
8668   LIBS="-lxml2 $LIBS"
8669
8670 else
8671   as_fn_error $? "library 'xml2' (version >= 2.6.23) is required for XML support" "$LINENO" 5
8672 fi
8673
8674 fi
8675
8676 if test "$with_libxslt" = yes ; then
8677   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xsltCleanupGlobals in -lxslt" >&5
8678 $as_echo_n "checking for xsltCleanupGlobals in -lxslt... " >&6; }
8679 if ${ac_cv_lib_xslt_xsltCleanupGlobals+:} false; then :
8680   $as_echo_n "(cached) " >&6
8681 else
8682   ac_check_lib_save_LIBS=$LIBS
8683 LIBS="-lxslt  $LIBS"
8684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8685 /* end confdefs.h.  */
8686
8687 /* Override any GCC internal prototype to avoid an error.
8688    Use char because int might match the return type of a GCC
8689    builtin and then its argument prototype would still apply.  */
8690 #ifdef __cplusplus
8691 extern "C"
8692 #endif
8693 char xsltCleanupGlobals ();
8694 int
8695 main ()
8696 {
8697 return xsltCleanupGlobals ();
8698   ;
8699   return 0;
8700 }
8701 _ACEOF
8702 if ac_fn_c_try_link "$LINENO"; then :
8703   ac_cv_lib_xslt_xsltCleanupGlobals=yes
8704 else
8705   ac_cv_lib_xslt_xsltCleanupGlobals=no
8706 fi
8707 rm -f core conftest.err conftest.$ac_objext \
8708     conftest$ac_exeext conftest.$ac_ext
8709 LIBS=$ac_check_lib_save_LIBS
8710 fi
8711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xslt_xsltCleanupGlobals" >&5
8712 $as_echo "$ac_cv_lib_xslt_xsltCleanupGlobals" >&6; }
8713 if test "x$ac_cv_lib_xslt_xsltCleanupGlobals" = xyes; then :
8714   cat >>confdefs.h <<_ACEOF
8715 #define HAVE_LIBXSLT 1
8716 _ACEOF
8717
8718   LIBS="-lxslt $LIBS"
8719
8720 else
8721   as_fn_error $? "library 'xslt' is required for XSLT support" "$LINENO" 5
8722 fi
8723
8724 fi
8725
8726 # for contrib/sepgsql
8727 if test "$with_selinux" = yes; then
8728   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_compute_create_name in -lselinux" >&5
8729 $as_echo_n "checking for security_compute_create_name in -lselinux... " >&6; }
8730 if ${ac_cv_lib_selinux_security_compute_create_name+:} false; then :
8731   $as_echo_n "(cached) " >&6
8732 else
8733   ac_check_lib_save_LIBS=$LIBS
8734 LIBS="-lselinux  $LIBS"
8735 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8736 /* end confdefs.h.  */
8737
8738 /* Override any GCC internal prototype to avoid an error.
8739    Use char because int might match the return type of a GCC
8740    builtin and then its argument prototype would still apply.  */
8741 #ifdef __cplusplus
8742 extern "C"
8743 #endif
8744 char security_compute_create_name ();
8745 int
8746 main ()
8747 {
8748 return security_compute_create_name ();
8749   ;
8750   return 0;
8751 }
8752 _ACEOF
8753 if ac_fn_c_try_link "$LINENO"; then :
8754   ac_cv_lib_selinux_security_compute_create_name=yes
8755 else
8756   ac_cv_lib_selinux_security_compute_create_name=no
8757 fi
8758 rm -f core conftest.err conftest.$ac_objext \
8759     conftest$ac_exeext conftest.$ac_ext
8760 LIBS=$ac_check_lib_save_LIBS
8761 fi
8762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_compute_create_name" >&5
8763 $as_echo "$ac_cv_lib_selinux_security_compute_create_name" >&6; }
8764 if test "x$ac_cv_lib_selinux_security_compute_create_name" = xyes; then :
8765   cat >>confdefs.h <<_ACEOF
8766 #define HAVE_LIBSELINUX 1
8767 _ACEOF
8768
8769   LIBS="-lselinux $LIBS"
8770
8771 else
8772   as_fn_error $? "library 'libselinux', version 2.1.10 or newer, is required for SELinux support" "$LINENO" 5
8773 fi
8774
8775 fi
8776
8777 # for contrib/uuid-ossp
8778 if test "$with_ossp_uuid" = yes ; then
8779   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -lossp-uuid" >&5
8780 $as_echo_n "checking for uuid_export in -lossp-uuid... " >&6; }
8781 if ${ac_cv_lib_ossp_uuid_uuid_export+:} false; then :
8782   $as_echo_n "(cached) " >&6
8783 else
8784   ac_check_lib_save_LIBS=$LIBS
8785 LIBS="-lossp-uuid  $LIBS"
8786 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8787 /* end confdefs.h.  */
8788
8789 /* Override any GCC internal prototype to avoid an error.
8790    Use char because int might match the return type of a GCC
8791    builtin and then its argument prototype would still apply.  */
8792 #ifdef __cplusplus
8793 extern "C"
8794 #endif
8795 char uuid_export ();
8796 int
8797 main ()
8798 {
8799 return uuid_export ();
8800   ;
8801   return 0;
8802 }
8803 _ACEOF
8804 if ac_fn_c_try_link "$LINENO"; then :
8805   ac_cv_lib_ossp_uuid_uuid_export=yes
8806 else
8807   ac_cv_lib_ossp_uuid_uuid_export=no
8808 fi
8809 rm -f core conftest.err conftest.$ac_objext \
8810     conftest$ac_exeext conftest.$ac_ext
8811 LIBS=$ac_check_lib_save_LIBS
8812 fi
8813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossp_uuid_uuid_export" >&5
8814 $as_echo "$ac_cv_lib_ossp_uuid_uuid_export" >&6; }
8815 if test "x$ac_cv_lib_ossp_uuid_uuid_export" = xyes; then :
8816   OSSP_UUID_LIBS="-lossp-uuid"
8817 else
8818   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -luuid" >&5
8819 $as_echo_n "checking for uuid_export in -luuid... " >&6; }
8820 if ${ac_cv_lib_uuid_uuid_export+:} false; then :
8821   $as_echo_n "(cached) " >&6
8822 else
8823   ac_check_lib_save_LIBS=$LIBS
8824 LIBS="-luuid  $LIBS"
8825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8826 /* end confdefs.h.  */
8827
8828 /* Override any GCC internal prototype to avoid an error.
8829    Use char because int might match the return type of a GCC
8830    builtin and then its argument prototype would still apply.  */
8831 #ifdef __cplusplus
8832 extern "C"
8833 #endif
8834 char uuid_export ();
8835 int
8836 main ()
8837 {
8838 return uuid_export ();
8839   ;
8840   return 0;
8841 }
8842 _ACEOF
8843 if ac_fn_c_try_link "$LINENO"; then :
8844   ac_cv_lib_uuid_uuid_export=yes
8845 else
8846   ac_cv_lib_uuid_uuid_export=no
8847 fi
8848 rm -f core conftest.err conftest.$ac_objext \
8849     conftest$ac_exeext conftest.$ac_ext
8850 LIBS=$ac_check_lib_save_LIBS
8851 fi
8852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_export" >&5
8853 $as_echo "$ac_cv_lib_uuid_uuid_export" >&6; }
8854 if test "x$ac_cv_lib_uuid_uuid_export" = xyes; then :
8855   OSSP_UUID_LIBS="-luuid"
8856 else
8857   as_fn_error $? "library 'ossp-uuid' or 'uuid' is required for OSSP-UUID" "$LINENO" 5
8858 fi
8859
8860 fi
8861
8862 fi
8863
8864
8865
8866 ##
8867 ## Header files
8868 ##
8869
8870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
8871 $as_echo_n "checking for ANSI C header files... " >&6; }
8872 if ${ac_cv_header_stdc+:} false; then :
8873   $as_echo_n "(cached) " >&6
8874 else
8875   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8876 /* end confdefs.h.  */
8877 #include <stdlib.h>
8878 #include <stdarg.h>
8879 #include <string.h>
8880 #include <float.h>
8881
8882 int
8883 main ()
8884 {
8885
8886   ;
8887   return 0;
8888 }
8889 _ACEOF
8890 if ac_fn_c_try_compile "$LINENO"; then :
8891   ac_cv_header_stdc=yes
8892 else
8893   ac_cv_header_stdc=no
8894 fi
8895 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8896
8897 if test $ac_cv_header_stdc = yes; then
8898   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8899   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8900 /* end confdefs.h.  */
8901 #include <string.h>
8902
8903 _ACEOF
8904 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8905   $EGREP "memchr" >/dev/null 2>&1; then :
8906
8907 else
8908   ac_cv_header_stdc=no
8909 fi
8910 rm -f conftest*
8911
8912 fi
8913
8914 if test $ac_cv_header_stdc = yes; then
8915   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8916   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8917 /* end confdefs.h.  */
8918 #include <stdlib.h>
8919
8920 _ACEOF
8921 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8922   $EGREP "free" >/dev/null 2>&1; then :
8923
8924 else
8925   ac_cv_header_stdc=no
8926 fi
8927 rm -f conftest*
8928
8929 fi
8930
8931 if test $ac_cv_header_stdc = yes; then
8932   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8933   if test "$cross_compiling" = yes; then :
8934   :
8935 else
8936   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8937 /* end confdefs.h.  */
8938 #include <ctype.h>
8939 #include <stdlib.h>
8940 #if ((' ' & 0x0FF) == 0x020)
8941 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8942 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8943 #else
8944 # define ISLOWER(c) \
8945                    (('a' <= (c) && (c) <= 'i') \
8946                      || ('j' <= (c) && (c) <= 'r') \
8947                      || ('s' <= (c) && (c) <= 'z'))
8948 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8949 #endif
8950
8951 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8952 int
8953 main ()
8954 {
8955   int i;
8956   for (i = 0; i < 256; i++)
8957     if (XOR (islower (i), ISLOWER (i))
8958         || toupper (i) != TOUPPER (i))
8959       return 2;
8960   return 0;
8961 }
8962 _ACEOF
8963 if ac_fn_c_try_run "$LINENO"; then :
8964
8965 else
8966   ac_cv_header_stdc=no
8967 fi
8968 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8969   conftest.$ac_objext conftest.beam conftest.$ac_ext
8970 fi
8971
8972 fi
8973 fi
8974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
8975 $as_echo "$ac_cv_header_stdc" >&6; }
8976 if test $ac_cv_header_stdc = yes; then
8977
8978 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
8979
8980 fi
8981
8982 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
8983 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
8984                   inttypes.h stdint.h unistd.h
8985 do :
8986   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8987 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
8988 "
8989 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8990   cat >>confdefs.h <<_ACEOF
8991 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8992 _ACEOF
8993
8994 fi
8995
8996 done
8997
8998
8999 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
9000 do :
9001   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9002 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9003 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9004   cat >>confdefs.h <<_ACEOF
9005 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9006 _ACEOF
9007
9008 fi
9009
9010 done
9011
9012
9013 # On BSD, test for net/if.h will fail unless sys/socket.h
9014 # is included first.
9015 for ac_header in net/if.h
9016 do :
9017   ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
9018 #ifdef HAVE_SYS_SOCKET_H
9019 #include <sys/socket.h>
9020 #endif
9021
9022 "
9023 if test "x$ac_cv_header_net_if_h" = xyes; then :
9024   cat >>confdefs.h <<_ACEOF
9025 #define HAVE_NET_IF_H 1
9026 _ACEOF
9027
9028 fi
9029
9030 done
9031
9032
9033 # On OpenBSD, test for sys/ucred.h will fail unless sys/param.h
9034 # is included first.
9035 for ac_header in sys/ucred.h
9036 do :
9037   ac_fn_c_check_header_compile "$LINENO" "sys/ucred.h" "ac_cv_header_sys_ucred_h" "$ac_includes_default
9038 #include <sys/param.h>
9039
9040 "
9041 if test "x$ac_cv_header_sys_ucred_h" = xyes; then :
9042   cat >>confdefs.h <<_ACEOF
9043 #define HAVE_SYS_UCRED_H 1
9044 _ACEOF
9045
9046 fi
9047
9048 done
9049
9050
9051 # At least on IRIX, test for netinet/tcp.h will fail unless
9052 # netinet/in.h is included first.
9053 for ac_header in netinet/in.h
9054 do :
9055   ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
9056 if test "x$ac_cv_header_netinet_in_h" = xyes; then :
9057   cat >>confdefs.h <<_ACEOF
9058 #define HAVE_NETINET_IN_H 1
9059 _ACEOF
9060
9061 fi
9062
9063 done
9064
9065 for ac_header in netinet/tcp.h
9066 do :
9067   ac_fn_c_check_header_compile "$LINENO" "netinet/tcp.h" "ac_cv_header_netinet_tcp_h" "$ac_includes_default
9068 #ifdef HAVE_NETINET_IN_H
9069 #include <netinet/in.h>
9070 #endif
9071
9072 "
9073 if test "x$ac_cv_header_netinet_tcp_h" = xyes; then :
9074   cat >>confdefs.h <<_ACEOF
9075 #define HAVE_NETINET_TCP_H 1
9076 _ACEOF
9077
9078 fi
9079
9080 done
9081
9082
9083 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
9084   for ac_header in readline/readline.h
9085 do :
9086   ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
9087 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
9088   cat >>confdefs.h <<_ACEOF
9089 #define HAVE_READLINE_READLINE_H 1
9090 _ACEOF
9091
9092 else
9093   for ac_header in readline.h
9094 do :
9095   ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
9096 if test "x$ac_cv_header_readline_h" = xyes; then :
9097   cat >>confdefs.h <<_ACEOF
9098 #define HAVE_READLINE_H 1
9099 _ACEOF
9100
9101 else
9102   as_fn_error $? "readline header not found
9103 If you have readline already installed, see config.log for details on the
9104 failure.  It is possible the compiler isn't looking in the proper directory.
9105 Use --without-readline to disable readline support." "$LINENO" 5
9106 fi
9107
9108 done
9109
9110 fi
9111
9112 done
9113
9114   for ac_header in readline/history.h
9115 do :
9116   ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
9117 if test "x$ac_cv_header_readline_history_h" = xyes; then :
9118   cat >>confdefs.h <<_ACEOF
9119 #define HAVE_READLINE_HISTORY_H 1
9120 _ACEOF
9121
9122 else
9123   for ac_header in history.h
9124 do :
9125   ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
9126 if test "x$ac_cv_header_history_h" = xyes; then :
9127   cat >>confdefs.h <<_ACEOF
9128 #define HAVE_HISTORY_H 1
9129 _ACEOF
9130
9131 else
9132   as_fn_error $? "history header not found
9133 If you have readline already installed, see config.log for details on the
9134 failure.  It is possible the compiler isn't looking in the proper directory.
9135 Use --without-readline to disable readline support." "$LINENO" 5
9136 fi
9137
9138 done
9139
9140 fi
9141
9142 done
9143
9144 fi
9145
9146 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
9147 # Some installations of libedit usurp /usr/include/readline/, which seems
9148 # bad practice, since in combined installations readline will have its headers
9149 # there.  We might have to resort to AC_EGREP checks to make sure we found
9150 # the proper header...
9151   for ac_header in editline/readline.h
9152 do :
9153   ac_fn_c_check_header_mongrel "$LINENO" "editline/readline.h" "ac_cv_header_editline_readline_h" "$ac_includes_default"
9154 if test "x$ac_cv_header_editline_readline_h" = xyes; then :
9155   cat >>confdefs.h <<_ACEOF
9156 #define HAVE_EDITLINE_READLINE_H 1
9157 _ACEOF
9158
9159 else
9160   for ac_header in readline.h
9161 do :
9162   ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
9163 if test "x$ac_cv_header_readline_h" = xyes; then :
9164   cat >>confdefs.h <<_ACEOF
9165 #define HAVE_READLINE_H 1
9166 _ACEOF
9167
9168 else
9169   for ac_header in readline/readline.h
9170 do :
9171   ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
9172 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
9173   cat >>confdefs.h <<_ACEOF
9174 #define HAVE_READLINE_READLINE_H 1
9175 _ACEOF
9176
9177 else
9178   as_fn_error $? "readline header not found
9179 If you have libedit already installed, see config.log for details on the
9180 failure.  It is possible the compiler isn't looking in the proper directory.
9181 Use --without-readline to disable libedit support." "$LINENO" 5
9182 fi
9183
9184 done
9185
9186 fi
9187
9188 done
9189
9190 fi
9191
9192 done
9193
9194 # Note: in a libedit installation, history.h is sometimes a dummy, and may
9195 # not be there at all.  Hence, don't complain if not found.  We must check
9196 # though, since in yet other versions it is an independent header.
9197   for ac_header in editline/history.h
9198 do :
9199   ac_fn_c_check_header_mongrel "$LINENO" "editline/history.h" "ac_cv_header_editline_history_h" "$ac_includes_default"
9200 if test "x$ac_cv_header_editline_history_h" = xyes; then :
9201   cat >>confdefs.h <<_ACEOF
9202 #define HAVE_EDITLINE_HISTORY_H 1
9203 _ACEOF
9204
9205 else
9206   for ac_header in history.h
9207 do :
9208   ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
9209 if test "x$ac_cv_header_history_h" = xyes; then :
9210   cat >>confdefs.h <<_ACEOF
9211 #define HAVE_HISTORY_H 1
9212 _ACEOF
9213
9214 else
9215   for ac_header in readline/history.h
9216 do :
9217   ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
9218 if test "x$ac_cv_header_readline_history_h" = xyes; then :
9219   cat >>confdefs.h <<_ACEOF
9220 #define HAVE_READLINE_HISTORY_H 1
9221 _ACEOF
9222
9223 fi
9224
9225 done
9226
9227 fi
9228
9229 done
9230
9231 fi
9232
9233 done
9234
9235 fi
9236
9237 if test "$with_zlib" = yes; then
9238   ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
9239 if test "x$ac_cv_header_zlib_h" = xyes; then :
9240
9241 else
9242   as_fn_error $? "zlib header not found
9243 If you have zlib already installed, see config.log for details on the
9244 failure.  It is possible the compiler isn't looking in the proper directory.
9245 Use --without-zlib to disable zlib support." "$LINENO" 5
9246 fi
9247
9248
9249 fi
9250
9251 if test "$with_gssapi" = yes ; then
9252   for ac_header in gssapi/gssapi.h
9253 do :
9254   ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi.h" "ac_cv_header_gssapi_gssapi_h" "$ac_includes_default"
9255 if test "x$ac_cv_header_gssapi_gssapi_h" = xyes; then :
9256   cat >>confdefs.h <<_ACEOF
9257 #define HAVE_GSSAPI_GSSAPI_H 1
9258 _ACEOF
9259
9260 else
9261   for ac_header in gssapi.h
9262 do :
9263   ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
9264 if test "x$ac_cv_header_gssapi_h" = xyes; then :
9265   cat >>confdefs.h <<_ACEOF
9266 #define HAVE_GSSAPI_H 1
9267 _ACEOF
9268
9269 else
9270   as_fn_error $? "gssapi.h header file is required for GSSAPI" "$LINENO" 5
9271 fi
9272
9273 done
9274
9275 fi
9276
9277 done
9278
9279 fi
9280
9281 if test "$with_openssl" = yes ; then
9282   ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
9283 if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
9284
9285 else
9286   as_fn_error $? "header file <openssl/ssl.h> is required for OpenSSL" "$LINENO" 5
9287 fi
9288
9289
9290   ac_fn_c_check_header_mongrel "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default"
9291 if test "x$ac_cv_header_openssl_err_h" = xyes; then :
9292
9293 else
9294   as_fn_error $? "header file <openssl/err.h> is required for OpenSSL" "$LINENO" 5
9295 fi
9296
9297
9298 fi
9299
9300 if test "$with_pam" = yes ; then
9301   for ac_header in security/pam_appl.h
9302 do :
9303   ac_fn_c_check_header_mongrel "$LINENO" "security/pam_appl.h" "ac_cv_header_security_pam_appl_h" "$ac_includes_default"
9304 if test "x$ac_cv_header_security_pam_appl_h" = xyes; then :
9305   cat >>confdefs.h <<_ACEOF
9306 #define HAVE_SECURITY_PAM_APPL_H 1
9307 _ACEOF
9308
9309 else
9310   for ac_header in pam/pam_appl.h
9311 do :
9312   ac_fn_c_check_header_mongrel "$LINENO" "pam/pam_appl.h" "ac_cv_header_pam_pam_appl_h" "$ac_includes_default"
9313 if test "x$ac_cv_header_pam_pam_appl_h" = xyes; then :
9314   cat >>confdefs.h <<_ACEOF
9315 #define HAVE_PAM_PAM_APPL_H 1
9316 _ACEOF
9317
9318 else
9319   as_fn_error $? "header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." "$LINENO" 5
9320 fi
9321
9322 done
9323
9324 fi
9325
9326 done
9327
9328 fi
9329
9330 if test "$with_libxml" = yes ; then
9331   ac_fn_c_check_header_mongrel "$LINENO" "libxml/parser.h" "ac_cv_header_libxml_parser_h" "$ac_includes_default"
9332 if test "x$ac_cv_header_libxml_parser_h" = xyes; then :
9333
9334 else
9335   as_fn_error $? "header file <libxml/parser.h> is required for XML support" "$LINENO" 5
9336 fi
9337
9338
9339 fi
9340
9341 if test "$with_libxslt" = yes ; then
9342   ac_fn_c_check_header_mongrel "$LINENO" "libxslt/xslt.h" "ac_cv_header_libxslt_xslt_h" "$ac_includes_default"
9343 if test "x$ac_cv_header_libxslt_xslt_h" = xyes; then :
9344
9345 else
9346   as_fn_error $? "header file <libxslt/xslt.h> is required for XSLT support" "$LINENO" 5
9347 fi
9348
9349
9350 fi
9351
9352 if test "$with_ldap" = yes ; then
9353   if test "$PORTNAME" != "win32"; then
9354      for ac_header in ldap.h
9355 do :
9356   ac_fn_c_check_header_mongrel "$LINENO" "ldap.h" "ac_cv_header_ldap_h" "$ac_includes_default"
9357 if test "x$ac_cv_header_ldap_h" = xyes; then :
9358   cat >>confdefs.h <<_ACEOF
9359 #define HAVE_LDAP_H 1
9360 _ACEOF
9361
9362 else
9363   as_fn_error $? "header file <ldap.h> is required for LDAP" "$LINENO" 5
9364 fi
9365
9366 done
9367
9368   else
9369      for ac_header in winldap.h
9370 do :
9371   ac_fn_c_check_header_compile "$LINENO" "winldap.h" "ac_cv_header_winldap_h" "$ac_includes_default
9372 #include <windows.h>
9373
9374 "
9375 if test "x$ac_cv_header_winldap_h" = xyes; then :
9376   cat >>confdefs.h <<_ACEOF
9377 #define HAVE_WINLDAP_H 1
9378 _ACEOF
9379
9380 else
9381   as_fn_error $? "header file <winldap.h> is required for LDAP" "$LINENO" 5
9382 fi
9383
9384 done
9385
9386   fi
9387 fi
9388
9389 if test "$with_bonjour" = yes ; then
9390   ac_fn_c_check_header_mongrel "$LINENO" "dns_sd.h" "ac_cv_header_dns_sd_h" "$ac_includes_default"
9391 if test "x$ac_cv_header_dns_sd_h" = xyes; then :
9392
9393 else
9394   as_fn_error $? "header file <dns_sd.h> is required for Bonjour" "$LINENO" 5
9395 fi
9396
9397
9398 fi
9399
9400 # for contrib/uuid-ossp
9401 if test "$with_ossp_uuid" = yes ; then
9402   for ac_header in ossp/uuid.h
9403 do :
9404   ac_fn_c_check_header_mongrel "$LINENO" "ossp/uuid.h" "ac_cv_header_ossp_uuid_h" "$ac_includes_default"
9405 if test "x$ac_cv_header_ossp_uuid_h" = xyes; then :
9406   cat >>confdefs.h <<_ACEOF
9407 #define HAVE_OSSP_UUID_H 1
9408 _ACEOF
9409
9410 else
9411
9412     for ac_header in uuid.h
9413 do :
9414   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
9415 if test "x$ac_cv_header_uuid_h" = xyes; then :
9416   cat >>confdefs.h <<_ACEOF
9417 #define HAVE_UUID_H 1
9418 _ACEOF
9419
9420 else
9421   as_fn_error $? "header file <ossp/uuid.h> or <uuid.h> is required for OSSP-UUID" "$LINENO" 5
9422 fi
9423
9424 done
9425
9426 fi
9427
9428 done
9429
9430 fi
9431
9432 if test "$PORTNAME" = "win32" ; then
9433    for ac_header in crtdefs.h
9434 do :
9435   ac_fn_c_check_header_mongrel "$LINENO" "crtdefs.h" "ac_cv_header_crtdefs_h" "$ac_includes_default"
9436 if test "x$ac_cv_header_crtdefs_h" = xyes; then :
9437   cat >>confdefs.h <<_ACEOF
9438 #define HAVE_CRTDEFS_H 1
9439 _ACEOF
9440
9441 fi
9442
9443 done
9444
9445 fi
9446
9447 ##
9448 ## Types, structures, compiler characteristics
9449 ##
9450
9451   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
9452 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
9453 if ${ac_cv_c_bigendian+:} false; then :
9454   $as_echo_n "(cached) " >&6
9455 else
9456   ac_cv_c_bigendian=unknown
9457     # See if we're dealing with a universal compiler.
9458     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9459 /* end confdefs.h.  */
9460 #ifndef __APPLE_CC__
9461                not a universal capable compiler
9462              #endif
9463              typedef int dummy;
9464
9465 _ACEOF
9466 if ac_fn_c_try_compile "$LINENO"; then :
9467
9468         # Check for potential -arch flags.  It is not universal unless
9469         # there are at least two -arch flags with different values.
9470         ac_arch=
9471         ac_prev=
9472         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
9473          if test -n "$ac_prev"; then
9474            case $ac_word in
9475              i?86 | x86_64 | ppc | ppc64)
9476                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
9477                  ac_arch=$ac_word
9478                else
9479                  ac_cv_c_bigendian=universal
9480                  break
9481                fi
9482                ;;
9483            esac
9484            ac_prev=
9485          elif test "x$ac_word" = "x-arch"; then
9486            ac_prev=arch
9487          fi
9488        done
9489 fi
9490 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9491     if test $ac_cv_c_bigendian = unknown; then
9492       # See if sys/param.h defines the BYTE_ORDER macro.
9493       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9494 /* end confdefs.h.  */
9495 #include <sys/types.h>
9496              #include <sys/param.h>
9497
9498 int
9499 main ()
9500 {
9501 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
9502                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
9503                      && LITTLE_ENDIAN)
9504               bogus endian macros
9505              #endif
9506
9507   ;
9508   return 0;
9509 }
9510 _ACEOF
9511 if ac_fn_c_try_compile "$LINENO"; then :
9512   # It does; now see whether it defined to BIG_ENDIAN or not.
9513          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9514 /* end confdefs.h.  */
9515 #include <sys/types.h>
9516                 #include <sys/param.h>
9517
9518 int
9519 main ()
9520 {
9521 #if BYTE_ORDER != BIG_ENDIAN
9522                  not big endian
9523                 #endif
9524
9525   ;
9526   return 0;
9527 }
9528 _ACEOF
9529 if ac_fn_c_try_compile "$LINENO"; then :
9530   ac_cv_c_bigendian=yes
9531 else
9532   ac_cv_c_bigendian=no
9533 fi
9534 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9535 fi
9536 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9537     fi
9538     if test $ac_cv_c_bigendian = unknown; then
9539       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
9540       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9541 /* end confdefs.h.  */
9542 #include <limits.h>
9543
9544 int
9545 main ()
9546 {
9547 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
9548               bogus endian macros
9549              #endif
9550
9551   ;
9552   return 0;
9553 }
9554 _ACEOF
9555 if ac_fn_c_try_compile "$LINENO"; then :
9556   # It does; now see whether it defined to _BIG_ENDIAN or not.
9557          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9558 /* end confdefs.h.  */
9559 #include <limits.h>
9560
9561 int
9562 main ()
9563 {
9564 #ifndef _BIG_ENDIAN
9565                  not big endian
9566                 #endif
9567
9568   ;
9569   return 0;
9570 }
9571 _ACEOF
9572 if ac_fn_c_try_compile "$LINENO"; then :
9573   ac_cv_c_bigendian=yes
9574 else
9575   ac_cv_c_bigendian=no
9576 fi
9577 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9578 fi
9579 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9580     fi
9581     if test $ac_cv_c_bigendian = unknown; then
9582       # Compile a test program.
9583       if test "$cross_compiling" = yes; then :
9584   # Try to guess by grepping values from an object file.
9585          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9586 /* end confdefs.h.  */
9587 short int ascii_mm[] =
9588                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
9589                 short int ascii_ii[] =
9590                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
9591                 int use_ascii (int i) {
9592                   return ascii_mm[i] + ascii_ii[i];
9593                 }
9594                 short int ebcdic_ii[] =
9595                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
9596                 short int ebcdic_mm[] =
9597                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
9598                 int use_ebcdic (int i) {
9599                   return ebcdic_mm[i] + ebcdic_ii[i];
9600                 }
9601                 extern int foo;
9602
9603 int
9604 main ()
9605 {
9606 return use_ascii (foo) == use_ebcdic (foo);
9607   ;
9608   return 0;
9609 }
9610 _ACEOF
9611 if ac_fn_c_try_compile "$LINENO"; then :
9612   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
9613               ac_cv_c_bigendian=yes
9614             fi
9615             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
9616               if test "$ac_cv_c_bigendian" = unknown; then
9617                 ac_cv_c_bigendian=no
9618               else
9619                 # finding both strings is unlikely to happen, but who knows?
9620                 ac_cv_c_bigendian=unknown
9621               fi
9622             fi
9623 fi
9624 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9625 else
9626   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9627 /* end confdefs.h.  */
9628 $ac_includes_default
9629 int
9630 main ()
9631 {
9632
9633              /* Are we little or big endian?  From Harbison&Steele.  */
9634              union
9635              {
9636                long int l;
9637                char c[sizeof (long int)];
9638              } u;
9639              u.l = 1;
9640              return u.c[sizeof (long int) - 1] == 1;
9641
9642   ;
9643   return 0;
9644 }
9645 _ACEOF
9646 if ac_fn_c_try_run "$LINENO"; then :
9647   ac_cv_c_bigendian=no
9648 else
9649   ac_cv_c_bigendian=yes
9650 fi
9651 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9652   conftest.$ac_objext conftest.beam conftest.$ac_ext
9653 fi
9654
9655     fi
9656 fi
9657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
9658 $as_echo "$ac_cv_c_bigendian" >&6; }
9659  case $ac_cv_c_bigendian in #(
9660    yes)
9661      $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
9662 ;; #(
9663    no)
9664       ;; #(
9665    universal)
9666
9667 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
9668
9669      ;; #(
9670    *)
9671      as_fn_error $? "unknown endianness
9672  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
9673  esac
9674
9675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
9676 $as_echo_n "checking for inline... " >&6; }
9677 if ${ac_cv_c_inline+:} false; then :
9678   $as_echo_n "(cached) " >&6
9679 else
9680   ac_cv_c_inline=no
9681 for ac_kw in inline __inline__ __inline; do
9682   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9683 /* end confdefs.h.  */
9684 #ifndef __cplusplus
9685 typedef int foo_t;
9686 static $ac_kw foo_t static_foo () {return 0; }
9687 $ac_kw foo_t foo () {return 0; }
9688 #endif
9689
9690 _ACEOF
9691 if ac_fn_c_try_compile "$LINENO"; then :
9692   ac_cv_c_inline=$ac_kw
9693 fi
9694 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9695   test "$ac_cv_c_inline" != no && break
9696 done
9697
9698 fi
9699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
9700 $as_echo "$ac_cv_c_inline" >&6; }
9701
9702 case $ac_cv_c_inline in
9703   inline | yes) ;;
9704   *)
9705     case $ac_cv_c_inline in
9706       no) ac_val=;;
9707       *) ac_val=$ac_cv_c_inline;;
9708     esac
9709     cat >>confdefs.h <<_ACEOF
9710 #ifndef __cplusplus
9711 #define inline $ac_val
9712 #endif
9713 _ACEOF
9714     ;;
9715 esac
9716
9717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for quiet inline (no complaint if unreferenced)" >&5
9718 $as_echo_n "checking for quiet inline (no complaint if unreferenced)... " >&6; }
9719 if ${pgac_cv_c_inline_quietly+:} false; then :
9720   $as_echo_n "(cached) " >&6
9721 else
9722   pgac_cv_c_inline_quietly=no
9723   if test "$ac_cv_c_inline" != no; then
9724     pgac_c_inline_save_werror=$ac_c_werror_flag
9725     ac_c_werror_flag=yes
9726     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9727 /* end confdefs.h.  */
9728 #include "$srcdir/config/test_quiet_include.h"
9729 int
9730 main ()
9731 {
9732
9733   ;
9734   return 0;
9735 }
9736 _ACEOF
9737 if ac_fn_c_try_link "$LINENO"; then :
9738   pgac_cv_c_inline_quietly=yes
9739 fi
9740 rm -f core conftest.err conftest.$ac_objext \
9741     conftest$ac_exeext conftest.$ac_ext
9742     ac_c_werror_flag=$pgac_c_inline_save_werror
9743   fi
9744 fi
9745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_inline_quietly" >&5
9746 $as_echo "$pgac_cv_c_inline_quietly" >&6; }
9747 if test "$pgac_cv_c_inline_quietly" != no; then
9748
9749 cat >>confdefs.h <<_ACEOF
9750 #define PG_USE_INLINE 1
9751 _ACEOF
9752
9753 fi
9754
9755
9756   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array members" >&5
9757 $as_echo_n "checking for flexible array members... " >&6; }
9758 if ${ac_cv_c_flexmember+:} false; then :
9759   $as_echo_n "(cached) " >&6
9760 else
9761   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9762 /* end confdefs.h.  */
9763 #include <stdlib.h>
9764             #include <stdio.h>
9765             #include <stddef.h>
9766             struct s { int n; double d[]; };
9767 int
9768 main ()
9769 {
9770 int m = getchar ();
9771             struct s *p = malloc (offsetof (struct s, d)
9772                                   + m * sizeof (double));
9773             p->d[0] = 0.0;
9774             return p->d != (double *) NULL;
9775   ;
9776   return 0;
9777 }
9778 _ACEOF
9779 if ac_fn_c_try_compile "$LINENO"; then :
9780   ac_cv_c_flexmember=yes
9781 else
9782   ac_cv_c_flexmember=no
9783 fi
9784 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9785 fi
9786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
9787 $as_echo "$ac_cv_c_flexmember" >&6; }
9788   if test $ac_cv_c_flexmember = yes; then
9789
9790 $as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
9791
9792   else
9793     $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
9794
9795   fi
9796
9797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signed types" >&5
9798 $as_echo_n "checking for signed types... " >&6; }
9799 if ${pgac_cv_c_signed+:} false; then :
9800   $as_echo_n "(cached) " >&6
9801 else
9802   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9803 /* end confdefs.h.  */
9804
9805 int
9806 main ()
9807 {
9808 signed char c; signed short s; signed int i;
9809   ;
9810   return 0;
9811 }
9812 _ACEOF
9813 if ac_fn_c_try_compile "$LINENO"; then :
9814   pgac_cv_c_signed=yes
9815 else
9816   pgac_cv_c_signed=no
9817 fi
9818 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9819 fi
9820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_signed" >&5
9821 $as_echo "$pgac_cv_c_signed" >&6; }
9822 if test x"$pgac_cv_c_signed" = xno ; then
9823
9824 $as_echo "#define signed /**/" >>confdefs.h
9825
9826 fi
9827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __func__" >&5
9828 $as_echo_n "checking for __func__... " >&6; }
9829 if ${pgac_cv_funcname_func_support+:} false; then :
9830   $as_echo_n "(cached) " >&6
9831 else
9832   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9833 /* end confdefs.h.  */
9834 #include <stdio.h>
9835 int
9836 main ()
9837 {
9838 printf("%s\n", __func__);
9839   ;
9840   return 0;
9841 }
9842 _ACEOF
9843 if ac_fn_c_try_compile "$LINENO"; then :
9844   pgac_cv_funcname_func_support=yes
9845 else
9846   pgac_cv_funcname_func_support=no
9847 fi
9848 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9849 fi
9850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_func_support" >&5
9851 $as_echo "$pgac_cv_funcname_func_support" >&6; }
9852 if test x"$pgac_cv_funcname_func_support" = xyes ; then
9853
9854 $as_echo "#define HAVE_FUNCNAME__FUNC 1" >>confdefs.h
9855
9856 else
9857 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __FUNCTION__" >&5
9858 $as_echo_n "checking for __FUNCTION__... " >&6; }
9859 if ${pgac_cv_funcname_function_support+:} false; then :
9860   $as_echo_n "(cached) " >&6
9861 else
9862   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9863 /* end confdefs.h.  */
9864 #include <stdio.h>
9865 int
9866 main ()
9867 {
9868 printf("%s\n", __FUNCTION__);
9869   ;
9870   return 0;
9871 }
9872 _ACEOF
9873 if ac_fn_c_try_compile "$LINENO"; then :
9874   pgac_cv_funcname_function_support=yes
9875 else
9876   pgac_cv_funcname_function_support=no
9877 fi
9878 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9879 fi
9880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_function_support" >&5
9881 $as_echo "$pgac_cv_funcname_function_support" >&6; }
9882 if test x"$pgac_cv_funcname_function_support" = xyes ; then
9883
9884 $as_echo "#define HAVE_FUNCNAME__FUNCTION 1" >>confdefs.h
9885
9886 fi
9887 fi
9888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Static_assert" >&5
9889 $as_echo_n "checking for _Static_assert... " >&6; }
9890 if ${pgac_cv__static_assert+:} false; then :
9891   $as_echo_n "(cached) " >&6
9892 else
9893   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9894 /* end confdefs.h.  */
9895
9896 int
9897 main ()
9898 {
9899 ({ _Static_assert(1, "foo"); })
9900   ;
9901   return 0;
9902 }
9903 _ACEOF
9904 if ac_fn_c_try_link "$LINENO"; then :
9905   pgac_cv__static_assert=yes
9906 else
9907   pgac_cv__static_assert=no
9908 fi
9909 rm -f core conftest.err conftest.$ac_objext \
9910     conftest$ac_exeext conftest.$ac_ext
9911 fi
9912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__static_assert" >&5
9913 $as_echo "$pgac_cv__static_assert" >&6; }
9914 if test x"$pgac_cv__static_assert" = xyes ; then
9915
9916 $as_echo "#define HAVE__STATIC_ASSERT 1" >>confdefs.h
9917
9918 fi
9919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_types_compatible_p" >&5
9920 $as_echo_n "checking for __builtin_types_compatible_p... " >&6; }
9921 if ${pgac_cv__types_compatible+:} false; then :
9922   $as_echo_n "(cached) " >&6
9923 else
9924   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9925 /* end confdefs.h.  */
9926
9927 int
9928 main ()
9929 {
9930  int x; static int y[__builtin_types_compatible_p(__typeof__(x), int)];
9931   ;
9932   return 0;
9933 }
9934 _ACEOF
9935 if ac_fn_c_try_compile "$LINENO"; then :
9936   pgac_cv__types_compatible=yes
9937 else
9938   pgac_cv__types_compatible=no
9939 fi
9940 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9941 fi
9942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__types_compatible" >&5
9943 $as_echo "$pgac_cv__types_compatible" >&6; }
9944 if test x"$pgac_cv__types_compatible" = xyes ; then
9945
9946 $as_echo "#define HAVE__BUILTIN_TYPES_COMPATIBLE_P 1" >>confdefs.h
9947
9948 fi
9949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_constant_p" >&5
9950 $as_echo_n "checking for __builtin_constant_p... " >&6; }
9951 if ${pgac_cv__builtin_constant_p+:} false; then :
9952   $as_echo_n "(cached) " >&6
9953 else
9954   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9955 /* end confdefs.h.  */
9956 static int x; static int y[__builtin_constant_p(x) ? x : 1];
9957 int
9958 main ()
9959 {
9960
9961   ;
9962   return 0;
9963 }
9964 _ACEOF
9965 if ac_fn_c_try_compile "$LINENO"; then :
9966   pgac_cv__builtin_constant_p=yes
9967 else
9968   pgac_cv__builtin_constant_p=no
9969 fi
9970 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9971 fi
9972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_constant_p" >&5
9973 $as_echo "$pgac_cv__builtin_constant_p" >&6; }
9974 if test x"$pgac_cv__builtin_constant_p" = xyes ; then
9975
9976 $as_echo "#define HAVE__BUILTIN_CONSTANT_P 1" >>confdefs.h
9977
9978 fi
9979 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unreachable" >&5
9980 $as_echo_n "checking for __builtin_unreachable... " >&6; }
9981 if ${pgac_cv__builtin_unreachable+:} false; then :
9982   $as_echo_n "(cached) " >&6
9983 else
9984   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9985 /* end confdefs.h.  */
9986
9987 int
9988 main ()
9989 {
9990 __builtin_unreachable();
9991   ;
9992   return 0;
9993 }
9994 _ACEOF
9995 if ac_fn_c_try_link "$LINENO"; then :
9996   pgac_cv__builtin_unreachable=yes
9997 else
9998   pgac_cv__builtin_unreachable=no
9999 fi
10000 rm -f core conftest.err conftest.$ac_objext \
10001     conftest$ac_exeext conftest.$ac_ext
10002 fi
10003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_unreachable" >&5
10004 $as_echo "$pgac_cv__builtin_unreachable" >&6; }
10005 if test x"$pgac_cv__builtin_unreachable" = xyes ; then
10006
10007 $as_echo "#define HAVE__BUILTIN_UNREACHABLE 1" >>confdefs.h
10008
10009 fi
10010 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __VA_ARGS__" >&5
10011 $as_echo_n "checking for __VA_ARGS__... " >&6; }
10012 if ${pgac_cv__va_args+:} false; then :
10013   $as_echo_n "(cached) " >&6
10014 else
10015   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10016 /* end confdefs.h.  */
10017 #include <stdio.h>
10018 int
10019 main ()
10020 {
10021 #define debug(...) fprintf(stderr, __VA_ARGS__)
10022 debug("%s", "blarg");
10023
10024   ;
10025   return 0;
10026 }
10027 _ACEOF
10028 if ac_fn_c_try_compile "$LINENO"; then :
10029   pgac_cv__va_args=yes
10030 else
10031   pgac_cv__va_args=no
10032 fi
10033 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10034 fi
10035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__va_args" >&5
10036 $as_echo "$pgac_cv__va_args" >&6; }
10037 if test x"$pgac_cv__va_args" = xyes ; then
10038
10039 $as_echo "#define HAVE__VA_ARGS 1" >>confdefs.h
10040
10041 fi
10042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10043 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
10044 if ${ac_cv_struct_tm+:} false; then :
10045   $as_echo_n "(cached) " >&6
10046 else
10047   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10048 /* end confdefs.h.  */
10049 #include <sys/types.h>
10050 #include <time.h>
10051
10052 int
10053 main ()
10054 {
10055 struct tm tm;
10056                                      int *p = &tm.tm_sec;
10057                                      return !p;
10058   ;
10059   return 0;
10060 }
10061 _ACEOF
10062 if ac_fn_c_try_compile "$LINENO"; then :
10063   ac_cv_struct_tm=time.h
10064 else
10065   ac_cv_struct_tm=sys/time.h
10066 fi
10067 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10068 fi
10069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10070 $as_echo "$ac_cv_struct_tm" >&6; }
10071 if test $ac_cv_struct_tm = sys/time.h; then
10072
10073 $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
10074
10075 fi
10076
10077 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
10078 #include <$ac_cv_struct_tm>
10079
10080 "
10081 if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
10082
10083 cat >>confdefs.h <<_ACEOF
10084 #define HAVE_STRUCT_TM_TM_ZONE 1
10085 _ACEOF
10086
10087
10088 fi
10089
10090 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10091
10092 $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
10093
10094 fi
10095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
10096 $as_echo_n "checking for tzname... " >&6; }
10097 if ${ac_cv_var_tzname+:} false; then :
10098   $as_echo_n "(cached) " >&6
10099 else
10100   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10101 /* end confdefs.h.  */
10102 #include <time.h>
10103 #ifndef tzname /* For SGI.  */
10104 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
10105 #endif
10106
10107 int
10108 main ()
10109 {
10110 atoi(*tzname);
10111   ;
10112   return 0;
10113 }
10114 _ACEOF
10115 if ac_fn_c_try_link "$LINENO"; then :
10116   ac_cv_var_tzname=yes
10117 else
10118   ac_cv_var_tzname=no
10119 fi
10120 rm -f core conftest.err conftest.$ac_objext \
10121     conftest$ac_exeext conftest.$ac_ext
10122 fi
10123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
10124 $as_echo "$ac_cv_var_tzname" >&6; }
10125 if test $ac_cv_var_tzname = yes; then
10126
10127 $as_echo "#define HAVE_TZNAME 1" >>confdefs.h
10128
10129 fi
10130
10131 ac_fn_c_check_type "$LINENO" "union semun" "ac_cv_type_union_semun" "#include <sys/types.h>
10132 #include <sys/ipc.h>
10133 #include <sys/sem.h>
10134 "
10135 if test "x$ac_cv_type_union_semun" = xyes; then :
10136
10137 cat >>confdefs.h <<_ACEOF
10138 #define HAVE_UNION_SEMUN 1
10139 _ACEOF
10140
10141
10142 fi
10143
10144 ac_fn_c_check_type "$LINENO" "struct sockaddr_un" "ac_cv_type_struct_sockaddr_un" "#include <sys/types.h>
10145 #ifdef HAVE_SYS_UN_H
10146 #include <sys/un.h>
10147 #endif
10148
10149 "
10150 if test "x$ac_cv_type_struct_sockaddr_un" = xyes; then :
10151
10152 $as_echo "#define HAVE_UNIX_SOCKETS 1" >>confdefs.h
10153
10154 fi
10155
10156 ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "#include <sys/types.h>
10157 #ifdef HAVE_SYS_SOCKET_H
10158 #include <sys/socket.h>
10159 #endif
10160
10161 "
10162 if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
10163
10164 cat >>confdefs.h <<_ACEOF
10165 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
10166 _ACEOF
10167
10168
10169 fi
10170
10171 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
10172 #ifdef HAVE_SYS_SOCKET_H
10173 #include <sys/socket.h>
10174 #endif
10175
10176 "
10177 if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then :
10178
10179 cat >>confdefs.h <<_ACEOF
10180 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
10181 _ACEOF
10182
10183
10184 fi
10185 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_family" "ac_cv_member_struct_sockaddr_storage___ss_family" "#include <sys/types.h>
10186 #ifdef HAVE_SYS_SOCKET_H
10187 #include <sys/socket.h>
10188 #endif
10189
10190 "
10191 if test "x$ac_cv_member_struct_sockaddr_storage___ss_family" = xyes; then :
10192
10193 cat >>confdefs.h <<_ACEOF
10194 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1
10195 _ACEOF
10196
10197
10198 fi
10199 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_len" "ac_cv_member_struct_sockaddr_storage_ss_len" "#include <sys/types.h>
10200 #ifdef HAVE_SYS_SOCKET_H
10201 #include <sys/socket.h>
10202 #endif
10203
10204 "
10205 if test "x$ac_cv_member_struct_sockaddr_storage_ss_len" = xyes; then :
10206
10207 cat >>confdefs.h <<_ACEOF
10208 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1
10209 _ACEOF
10210
10211
10212 fi
10213 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_len" "ac_cv_member_struct_sockaddr_storage___ss_len" "#include <sys/types.h>
10214 #ifdef HAVE_SYS_SOCKET_H
10215 #include <sys/socket.h>
10216 #endif
10217
10218 "
10219 if test "x$ac_cv_member_struct_sockaddr_storage___ss_len" = xyes; then :
10220
10221 cat >>confdefs.h <<_ACEOF
10222 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN 1
10223 _ACEOF
10224
10225
10226 fi
10227 ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/types.h>
10228 #ifdef HAVE_SYS_SOCKET_H
10229 #include <sys/socket.h>
10230 #endif
10231
10232 "
10233 if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
10234
10235 cat >>confdefs.h <<_ACEOF
10236 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
10237 _ACEOF
10238
10239
10240 fi
10241
10242 ac_fn_c_check_type "$LINENO" "struct addrinfo" "ac_cv_type_struct_addrinfo" "#include <sys/types.h>
10243 #include <sys/socket.h>
10244 #include <netdb.h>
10245
10246 "
10247 if test "x$ac_cv_type_struct_addrinfo" = xyes; then :
10248
10249 cat >>confdefs.h <<_ACEOF
10250 #define HAVE_STRUCT_ADDRINFO 1
10251 _ACEOF
10252
10253
10254 fi
10255
10256
10257   ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
10258 if test "x$ac_cv_type_intptr_t" = xyes; then :
10259
10260 $as_echo "#define HAVE_INTPTR_T 1" >>confdefs.h
10261
10262 else
10263   for ac_type in 'int' 'long int' 'long long int'; do
10264        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10265 /* end confdefs.h.  */
10266 $ac_includes_default
10267 int
10268 main ()
10269 {
10270 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
10271 test_array [0] = 0;
10272 return test_array [0];
10273
10274   ;
10275   return 0;
10276 }
10277 _ACEOF
10278 if ac_fn_c_try_compile "$LINENO"; then :
10279
10280 cat >>confdefs.h <<_ACEOF
10281 #define intptr_t $ac_type
10282 _ACEOF
10283
10284           ac_type=
10285 fi
10286 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10287        test -z "$ac_type" && break
10288      done
10289 fi
10290
10291
10292
10293   ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
10294 if test "x$ac_cv_type_uintptr_t" = xyes; then :
10295
10296 $as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h
10297
10298 else
10299   for ac_type in 'unsigned int' 'unsigned long int' \
10300         'unsigned long long int'; do
10301        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10302 /* end confdefs.h.  */
10303 $ac_includes_default
10304 int
10305 main ()
10306 {
10307 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
10308 test_array [0] = 0;
10309 return test_array [0];
10310
10311   ;
10312   return 0;
10313 }
10314 _ACEOF
10315 if ac_fn_c_try_compile "$LINENO"; then :
10316
10317 cat >>confdefs.h <<_ACEOF
10318 #define uintptr_t $ac_type
10319 _ACEOF
10320
10321           ac_type=
10322 fi
10323 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10324        test -z "$ac_type" && break
10325      done
10326 fi
10327
10328
10329
10330   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
10331 $as_echo_n "checking for unsigned long long int... " >&6; }
10332 if ${ac_cv_type_unsigned_long_long_int+:} false; then :
10333   $as_echo_n "(cached) " >&6
10334 else
10335   ac_cv_type_unsigned_long_long_int=yes
10336      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
10337        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10338 /* end confdefs.h.  */
10339
10340   /* For now, do not test the preprocessor; as of 2007 there are too many
10341          implementations with broken preprocessors.  Perhaps this can
10342          be revisited in 2012.  In the meantime, code should not expect
10343          #if to work with literals wider than 32 bits.  */
10344       /* Test literals.  */
10345       long long int ll = 9223372036854775807ll;
10346       long long int nll = -9223372036854775807LL;
10347       unsigned long long int ull = 18446744073709551615ULL;
10348       /* Test constant expressions.   */
10349       typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
10350                      ? 1 : -1)];
10351       typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
10352                      ? 1 : -1)];
10353       int i = 63;
10354 int
10355 main ()
10356 {
10357 /* Test availability of runtime routines for shift and division.  */
10358       long long int llmax = 9223372036854775807ll;
10359       unsigned long long int ullmax = 18446744073709551615ull;
10360       return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
10361               | (llmax / ll) | (llmax % ll)
10362               | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
10363               | (ullmax / ull) | (ullmax % ull));
10364   ;
10365   return 0;
10366 }
10367
10368 _ACEOF
10369 if ac_fn_c_try_link "$LINENO"; then :
10370
10371 else
10372   ac_cv_type_unsigned_long_long_int=no
10373 fi
10374 rm -f core conftest.err conftest.$ac_objext \
10375     conftest$ac_exeext conftest.$ac_ext
10376      fi
10377 fi
10378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
10379 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
10380   if test $ac_cv_type_unsigned_long_long_int = yes; then
10381
10382 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
10383
10384   fi
10385
10386
10387
10388   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
10389 $as_echo_n "checking for long long int... " >&6; }
10390 if ${ac_cv_type_long_long_int+:} false; then :
10391   $as_echo_n "(cached) " >&6
10392 else
10393   ac_cv_type_long_long_int=yes
10394       if test "x${ac_cv_prog_cc_c99-no}" = xno; then
10395         ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
10396         if test $ac_cv_type_long_long_int = yes; then
10397                                   if test "$cross_compiling" = yes; then :
10398   :
10399 else
10400   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10401 /* end confdefs.h.  */
10402 #include <limits.h>
10403                  #ifndef LLONG_MAX
10404                  # define HALF \
10405                           (1LL << (sizeof (long long int) * CHAR_BIT - 2))
10406                  # define LLONG_MAX (HALF - 1 + HALF)
10407                  #endif
10408 int
10409 main ()
10410 {
10411 long long int n = 1;
10412                  int i;
10413                  for (i = 0; ; i++)
10414                    {
10415                      long long int m = n << i;
10416                      if (m >> i != n)
10417                        return 1;
10418                      if (LLONG_MAX / 2 < m)
10419                        break;
10420                    }
10421                  return 0;
10422   ;
10423   return 0;
10424 }
10425 _ACEOF
10426 if ac_fn_c_try_run "$LINENO"; then :
10427
10428 else
10429   ac_cv_type_long_long_int=no
10430 fi
10431 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10432   conftest.$ac_objext conftest.beam conftest.$ac_ext
10433 fi
10434
10435         fi
10436       fi
10437 fi
10438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
10439 $as_echo "$ac_cv_type_long_long_int" >&6; }
10440   if test $ac_cv_type_long_long_int = yes; then
10441
10442 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
10443
10444   fi
10445
10446
10447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for locale_t" >&5
10448 $as_echo_n "checking for locale_t... " >&6; }
10449 if ${pgac_cv_type_locale_t+:} false; then :
10450   $as_echo_n "(cached) " >&6
10451 else
10452   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10453 /* end confdefs.h.  */
10454 #include <locale.h>
10455 locale_t x;
10456 int
10457 main ()
10458 {
10459
10460   ;
10461   return 0;
10462 }
10463 _ACEOF
10464 if ac_fn_c_try_compile "$LINENO"; then :
10465   pgac_cv_type_locale_t=yes
10466 else
10467   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10468 /* end confdefs.h.  */
10469 #include <xlocale.h>
10470 locale_t x;
10471 int
10472 main ()
10473 {
10474
10475   ;
10476   return 0;
10477 }
10478 _ACEOF
10479 if ac_fn_c_try_compile "$LINENO"; then :
10480   pgac_cv_type_locale_t='yes (in xlocale.h)'
10481 else
10482   pgac_cv_type_locale_t=no
10483 fi
10484 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10485 fi
10486 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10487 fi
10488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_locale_t" >&5
10489 $as_echo "$pgac_cv_type_locale_t" >&6; }
10490 if test "$pgac_cv_type_locale_t" != no; then
10491
10492 $as_echo "#define HAVE_LOCALE_T 1" >>confdefs.h
10493
10494 fi
10495 if test "$pgac_cv_type_locale_t" = 'yes (in xlocale.h)'; then
10496
10497 $as_echo "#define LOCALE_T_IN_XLOCALE 1" >>confdefs.h
10498
10499 fi
10500
10501 ac_fn_c_check_type "$LINENO" "struct cmsgcred" "ac_cv_type_struct_cmsgcred" "#include <sys/socket.h>
10502 #include <sys/param.h>
10503 #ifdef HAVE_SYS_UCRED_H
10504 #include <sys/ucred.h>
10505 #endif
10506 "
10507 if test "x$ac_cv_type_struct_cmsgcred" = xyes; then :
10508
10509 cat >>confdefs.h <<_ACEOF
10510 #define HAVE_STRUCT_CMSGCRED 1
10511 _ACEOF
10512
10513
10514 fi
10515
10516
10517 ac_fn_c_check_type "$LINENO" "struct option" "ac_cv_type_struct_option" "#ifdef HAVE_GETOPT_H
10518 #include <getopt.h>
10519 #endif
10520 "
10521 if test "x$ac_cv_type_struct_option" = xyes; then :
10522
10523 cat >>confdefs.h <<_ACEOF
10524 #define HAVE_STRUCT_OPTION 1
10525 _ACEOF
10526
10527
10528 fi
10529
10530
10531 if test "$with_zlib" = yes; then
10532   # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
10533   # did not).  While we could work around the lack of z_streamp, it
10534   # seems unwise to encourage people to use such old zlib versions...
10535   ac_fn_c_check_type "$LINENO" "z_streamp" "ac_cv_type_z_streamp" "#include <zlib.h>
10536 "
10537 if test "x$ac_cv_type_z_streamp" = xyes; then :
10538
10539 else
10540   as_fn_error $? "zlib version is too old
10541 Use --without-zlib to disable zlib support." "$LINENO" 5
10542 fi
10543
10544 fi
10545
10546 # On PPC, check if assembler supports LWARX instruction's mutex hint bit
10547 case $host_cpu in
10548   ppc*|powerpc*)
10549     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports lwarx hint bit" >&5
10550 $as_echo_n "checking whether assembler supports lwarx hint bit... " >&6; }
10551     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10552 /* end confdefs.h.  */
10553
10554 int
10555 main ()
10556 {
10557 int a = 0; int *p = &a; int r;
10558          __asm__ __volatile__ (" lwarx %0,0,%1,1\n" : "=&r"(r) : "r"(p));
10559   ;
10560   return 0;
10561 }
10562 _ACEOF
10563 if ac_fn_c_try_compile "$LINENO"; then :
10564   pgac_cv_have_ppc_mutex_hint=yes
10565 else
10566   pgac_cv_have_ppc_mutex_hint=no
10567 fi
10568 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10569     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_ppc_mutex_hint" >&5
10570 $as_echo "$pgac_cv_have_ppc_mutex_hint" >&6; }
10571     if test x"$pgac_cv_have_ppc_mutex_hint" = xyes ; then
10572
10573 $as_echo "#define HAVE_PPC_LWARX_MUTEX_HINT 1" >>confdefs.h
10574
10575     fi
10576   ;;
10577 esac
10578
10579 # Check largefile support.  You might think this is a system service not a
10580 # compiler characteristic, but you'd be wrong.  We must check this before
10581 # probing existence of related functions such as fseeko, since the largefile
10582 # defines can affect what is generated for that.
10583 if test "$PORTNAME" != "win32"; then
10584    # Check whether --enable-largefile was given.
10585 if test "${enable_largefile+set}" = set; then :
10586   enableval=$enable_largefile;
10587 fi
10588
10589 if test "$enable_largefile" != no; then
10590
10591   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
10592 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
10593 if ${ac_cv_sys_largefile_CC+:} false; then :
10594   $as_echo_n "(cached) " >&6
10595 else
10596   ac_cv_sys_largefile_CC=no
10597      if test "$GCC" != yes; then
10598        ac_save_CC=$CC
10599        while :; do
10600          # IRIX 6.2 and later do not support large files by default,
10601          # so use the C compiler's -n32 option if that helps.
10602          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10603 /* end confdefs.h.  */
10604 #include <sys/types.h>
10605  /* Check that off_t can represent 2**63 - 1 correctly.
10606     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10607     since some C++ compilers masquerading as C compilers
10608     incorrectly reject 9223372036854775807.  */
10609 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10610   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10611                        && LARGE_OFF_T % 2147483647 == 1)
10612                       ? 1 : -1];
10613 int
10614 main ()
10615 {
10616
10617   ;
10618   return 0;
10619 }
10620 _ACEOF
10621          if ac_fn_c_try_compile "$LINENO"; then :
10622   break
10623 fi
10624 rm -f core conftest.err conftest.$ac_objext
10625          CC="$CC -n32"
10626          if ac_fn_c_try_compile "$LINENO"; then :
10627   ac_cv_sys_largefile_CC=' -n32'; break
10628 fi
10629 rm -f core conftest.err conftest.$ac_objext
10630          break
10631        done
10632        CC=$ac_save_CC
10633        rm -f conftest.$ac_ext
10634     fi
10635 fi
10636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
10637 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
10638   if test "$ac_cv_sys_largefile_CC" != no; then
10639     CC=$CC$ac_cv_sys_largefile_CC
10640   fi
10641
10642   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
10643 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
10644 if ${ac_cv_sys_file_offset_bits+:} false; then :
10645   $as_echo_n "(cached) " >&6
10646 else
10647   while :; do
10648   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10649 /* end confdefs.h.  */
10650 #include <sys/types.h>
10651  /* Check that off_t can represent 2**63 - 1 correctly.
10652     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10653     since some C++ compilers masquerading as C compilers
10654     incorrectly reject 9223372036854775807.  */
10655 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10656   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10657                        && LARGE_OFF_T % 2147483647 == 1)
10658                       ? 1 : -1];
10659 int
10660 main ()
10661 {
10662
10663   ;
10664   return 0;
10665 }
10666 _ACEOF
10667 if ac_fn_c_try_compile "$LINENO"; then :
10668   ac_cv_sys_file_offset_bits=no; break
10669 fi
10670 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10671   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10672 /* end confdefs.h.  */
10673 #define _FILE_OFFSET_BITS 64
10674 #include <sys/types.h>
10675  /* Check that off_t can represent 2**63 - 1 correctly.
10676     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10677     since some C++ compilers masquerading as C compilers
10678     incorrectly reject 9223372036854775807.  */
10679 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10680   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10681                        && LARGE_OFF_T % 2147483647 == 1)
10682                       ? 1 : -1];
10683 int
10684 main ()
10685 {
10686
10687   ;
10688   return 0;
10689 }
10690 _ACEOF
10691 if ac_fn_c_try_compile "$LINENO"; then :
10692   ac_cv_sys_file_offset_bits=64; break
10693 fi
10694 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10695   ac_cv_sys_file_offset_bits=unknown
10696   break
10697 done
10698 fi
10699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
10700 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
10701 case $ac_cv_sys_file_offset_bits in #(
10702   no | unknown) ;;
10703   *)
10704 cat >>confdefs.h <<_ACEOF
10705 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
10706 _ACEOF
10707 ;;
10708 esac
10709 rm -rf conftest*
10710   if test $ac_cv_sys_file_offset_bits = unknown; then
10711     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
10712 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
10713 if ${ac_cv_sys_large_files+:} false; then :
10714   $as_echo_n "(cached) " >&6
10715 else
10716   while :; do
10717   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10718 /* end confdefs.h.  */
10719 #include <sys/types.h>
10720  /* Check that off_t can represent 2**63 - 1 correctly.
10721     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10722     since some C++ compilers masquerading as C compilers
10723     incorrectly reject 9223372036854775807.  */
10724 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10725   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10726                        && LARGE_OFF_T % 2147483647 == 1)
10727                       ? 1 : -1];
10728 int
10729 main ()
10730 {
10731
10732   ;
10733   return 0;
10734 }
10735 _ACEOF
10736 if ac_fn_c_try_compile "$LINENO"; then :
10737   ac_cv_sys_large_files=no; break
10738 fi
10739 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10740   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10741 /* end confdefs.h.  */
10742 #define _LARGE_FILES 1
10743 #include <sys/types.h>
10744  /* Check that off_t can represent 2**63 - 1 correctly.
10745     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10746     since some C++ compilers masquerading as C compilers
10747     incorrectly reject 9223372036854775807.  */
10748 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10749   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10750                        && LARGE_OFF_T % 2147483647 == 1)
10751                       ? 1 : -1];
10752 int
10753 main ()
10754 {
10755
10756   ;
10757   return 0;
10758 }
10759 _ACEOF
10760 if ac_fn_c_try_compile "$LINENO"; then :
10761   ac_cv_sys_large_files=1; break
10762 fi
10763 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10764   ac_cv_sys_large_files=unknown
10765   break
10766 done
10767 fi
10768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
10769 $as_echo "$ac_cv_sys_large_files" >&6; }
10770 case $ac_cv_sys_large_files in #(
10771   no | unknown) ;;
10772   *)
10773 cat >>confdefs.h <<_ACEOF
10774 #define _LARGE_FILES $ac_cv_sys_large_files
10775 _ACEOF
10776 ;;
10777 esac
10778 rm -rf conftest*
10779   fi
10780
10781
10782 fi
10783
10784
10785 fi
10786
10787 # Check for largefile support (must be after AC_SYS_LARGEFILE)
10788 # The cast to long int works around a bug in the HP C Compiler
10789 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10790 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10791 # This bug is HP SR number 8606223364.
10792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
10793 $as_echo_n "checking size of off_t... " >&6; }
10794 if ${ac_cv_sizeof_off_t+:} false; then :
10795   $as_echo_n "(cached) " >&6
10796 else
10797   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t"        "$ac_includes_default"; then :
10798
10799 else
10800   if test "$ac_cv_type_off_t" = yes; then
10801      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10802 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10803 as_fn_error 77 "cannot compute sizeof (off_t)
10804 See \`config.log' for more details" "$LINENO" 5; }
10805    else
10806      ac_cv_sizeof_off_t=0
10807    fi
10808 fi
10809
10810 fi
10811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
10812 $as_echo "$ac_cv_sizeof_off_t" >&6; }
10813
10814
10815
10816 cat >>confdefs.h <<_ACEOF
10817 #define SIZEOF_OFF_T $ac_cv_sizeof_off_t
10818 _ACEOF
10819
10820
10821
10822 # If we don't have largefile support, can't handle segsize >= 2GB.
10823 if test "$ac_cv_sizeof_off_t" -lt 8 -a "$segsize" != "1"; then
10824    as_fn_error $? "Large file support is not enabled. Segment size cannot be larger than 1GB." "$LINENO" 5
10825 fi
10826
10827
10828 ##
10829 ## Functions, global variables
10830 ##
10831
10832 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int timezone" >&5
10833 $as_echo_n "checking for int timezone... " >&6; }
10834 if ${pgac_cv_var_int_timezone+:} false; then :
10835   $as_echo_n "(cached) " >&6
10836 else
10837   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10838 /* end confdefs.h.  */
10839 #include <time.h>
10840 int res;
10841 int
10842 main ()
10843 {
10844 #ifndef __CYGWIN__
10845 res = timezone / 60;
10846 #else
10847 res = _timezone / 60;
10848 #endif
10849   ;
10850   return 0;
10851 }
10852 _ACEOF
10853 if ac_fn_c_try_link "$LINENO"; then :
10854   pgac_cv_var_int_timezone=yes
10855 else
10856   pgac_cv_var_int_timezone=no
10857 fi
10858 rm -f core conftest.err conftest.$ac_objext \
10859     conftest$ac_exeext conftest.$ac_ext
10860 fi
10861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_timezone" >&5
10862 $as_echo "$pgac_cv_var_int_timezone" >&6; }
10863 if test x"$pgac_cv_var_int_timezone" = xyes ; then
10864
10865 $as_echo "#define HAVE_INT_TIMEZONE 1" >>confdefs.h
10866
10867 fi
10868 { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for accept()" >&5
10869 $as_echo_n "checking types of arguments for accept()... " >&6; }
10870  if ${ac_cv_func_accept_return+:} false; then :
10871   $as_echo_n "(cached) " >&6
10872 else
10873    if ${ac_cv_func_accept_arg1+:} false; then :
10874   $as_echo_n "(cached) " >&6
10875 else
10876     if ${ac_cv_func_accept_arg2+:} false; then :
10877   $as_echo_n "(cached) " >&6
10878 else
10879      if ${ac_cv_func_accept_arg3+:} false; then :
10880   $as_echo_n "(cached) " >&6
10881 else
10882       for ac_cv_func_accept_return in 'int' 'unsigned int PASCAL' 'SOCKET WSAAPI'; do
10883       for ac_cv_func_accept_arg1 in 'int' 'unsigned int' 'SOCKET'; do
10884        for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
10885         for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
10886          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10887 /* end confdefs.h.  */
10888 #ifdef HAVE_SYS_TYPES_H
10889 #include <sys/types.h>
10890 #endif
10891 #ifdef HAVE_SYS_SOCKET_H
10892 #include <sys/socket.h>
10893 #endif
10894 extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
10895 int
10896 main ()
10897 {
10898
10899   ;
10900   return 0;
10901 }
10902 _ACEOF
10903 if ac_fn_c_try_compile "$LINENO"; then :
10904   ac_not_found=no; break 4
10905 else
10906   ac_not_found=yes
10907 fi
10908 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10909        done
10910       done
10911      done
10912     done
10913     if test "$ac_not_found" = yes; then
10914       as_fn_error $? "could not determine argument types" "$LINENO" 5
10915     fi
10916     if test "$ac_cv_func_accept_arg3" = "void"; then
10917       ac_cv_func_accept_arg3=int
10918     fi
10919
10920 fi
10921
10922 fi
10923
10924 fi
10925
10926 fi
10927  { $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
10928 $as_echo "$ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&6; }
10929
10930 cat >>confdefs.h <<_ACEOF
10931 #define ACCEPT_TYPE_RETURN $ac_cv_func_accept_return
10932 _ACEOF
10933
10934
10935 cat >>confdefs.h <<_ACEOF
10936 #define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
10937 _ACEOF
10938
10939
10940 cat >>confdefs.h <<_ACEOF
10941 #define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
10942 _ACEOF
10943
10944
10945 cat >>confdefs.h <<_ACEOF
10946 #define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
10947 _ACEOF
10948
10949
10950 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday takes only one argument" >&5
10951 $as_echo_n "checking whether gettimeofday takes only one argument... " >&6; }
10952 if ${pgac_cv_func_gettimeofday_1arg+:} false; then :
10953   $as_echo_n "(cached) " >&6
10954 else
10955   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10956 /* end confdefs.h.  */
10957 #include <sys/time.h>
10958 int
10959 main ()
10960 {
10961 struct timeval *tp;
10962 struct timezone *tzp;
10963 gettimeofday(tp,tzp);
10964   ;
10965   return 0;
10966 }
10967 _ACEOF
10968 if ac_fn_c_try_compile "$LINENO"; then :
10969   pgac_cv_func_gettimeofday_1arg=no
10970 else
10971   pgac_cv_func_gettimeofday_1arg=yes
10972 fi
10973 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10974 fi
10975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_gettimeofday_1arg" >&5
10976 $as_echo "$pgac_cv_func_gettimeofday_1arg" >&6; }
10977 if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
10978
10979 $as_echo "#define GETTIMEOFDAY_1ARG 1" >>confdefs.h
10980
10981 fi
10982
10983
10984 # Some versions of libedit contain strlcpy(), setproctitle(), and other
10985 # symbols that that library has no business exposing to the world.  Pending
10986 # acquisition of a clue by those developers, ignore libedit (including its
10987 # possible alias of libreadline) while checking for everything else.
10988 LIBS_including_readline="$LIBS"
10989 LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
10990
10991 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
10992 do :
10993   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10994 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10995 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
10996   cat >>confdefs.h <<_ACEOF
10997 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10998 _ACEOF
10999
11000 fi
11001 done
11002
11003
11004 ac_fn_c_check_func "$LINENO" "fseeko" "ac_cv_func_fseeko"
11005 if test "x$ac_cv_func_fseeko" = xyes; then :
11006   $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
11007
11008 else
11009   case " $LIBOBJS " in
11010   *" fseeko.$ac_objext "* ) ;;
11011   *) LIBOBJS="$LIBOBJS fseeko.$ac_objext"
11012  ;;
11013 esac
11014
11015 fi
11016
11017
11018 case $host_os in
11019         # NetBSD uses a custom fseeko/ftello built on fsetpos/fgetpos
11020         # Mingw uses macros to access Win32 API calls
11021         netbsd*|mingw*)
11022
11023 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
11024
11025                 ac_cv_func_fseeko=yes;;
11026         *)
11027                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
11028 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
11029 if ${ac_cv_sys_largefile_source+:} false; then :
11030   $as_echo_n "(cached) " >&6
11031 else
11032   while :; do
11033   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11034 /* end confdefs.h.  */
11035 #include <sys/types.h> /* for off_t */
11036      #include <stdio.h>
11037 int
11038 main ()
11039 {
11040 int (*fp) (FILE *, off_t, int) = fseeko;
11041      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
11042   ;
11043   return 0;
11044 }
11045 _ACEOF
11046 if ac_fn_c_try_link "$LINENO"; then :
11047   ac_cv_sys_largefile_source=no; break
11048 fi
11049 rm -f core conftest.err conftest.$ac_objext \
11050     conftest$ac_exeext conftest.$ac_ext
11051   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11052 /* end confdefs.h.  */
11053 #define _LARGEFILE_SOURCE 1
11054 #include <sys/types.h> /* for off_t */
11055      #include <stdio.h>
11056 int
11057 main ()
11058 {
11059 int (*fp) (FILE *, off_t, int) = fseeko;
11060      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
11061   ;
11062   return 0;
11063 }
11064 _ACEOF
11065 if ac_fn_c_try_link "$LINENO"; then :
11066   ac_cv_sys_largefile_source=1; break
11067 fi
11068 rm -f core conftest.err conftest.$ac_objext \
11069     conftest$ac_exeext conftest.$ac_ext
11070   ac_cv_sys_largefile_source=unknown
11071   break
11072 done
11073 fi
11074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
11075 $as_echo "$ac_cv_sys_largefile_source" >&6; }
11076 case $ac_cv_sys_largefile_source in #(
11077   no | unknown) ;;
11078   *)
11079 cat >>confdefs.h <<_ACEOF
11080 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
11081 _ACEOF
11082 ;;
11083 esac
11084 rm -rf conftest*
11085
11086 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
11087 # in glibc 2.1.3, but that breaks too many other things.
11088 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
11089 if test $ac_cv_sys_largefile_source != unknown; then
11090
11091 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
11092
11093 fi
11094 ;;
11095 esac
11096
11097 # posix_fadvise() is a no-op on Solaris, so don't incur function overhead
11098 # by calling it, 2009-04-02
11099 # http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/posix_fadvise.c
11100 if test "$PORTNAME" != "solaris"; then
11101 for ac_func in posix_fadvise
11102 do :
11103   ac_fn_c_check_func "$LINENO" "posix_fadvise" "ac_cv_func_posix_fadvise"
11104 if test "x$ac_cv_func_posix_fadvise" = xyes; then :
11105   cat >>confdefs.h <<_ACEOF
11106 #define HAVE_POSIX_FADVISE 1
11107 _ACEOF
11108
11109 fi
11110 done
11111
11112 ac_fn_c_check_decl "$LINENO" "posix_fadvise" "ac_cv_have_decl_posix_fadvise" "#include <fcntl.h>
11113 "
11114 if test "x$ac_cv_have_decl_posix_fadvise" = xyes; then :
11115   ac_have_decl=1
11116 else
11117   ac_have_decl=0
11118 fi
11119
11120 cat >>confdefs.h <<_ACEOF
11121 #define HAVE_DECL_POSIX_FADVISE $ac_have_decl
11122 _ACEOF
11123
11124 fi
11125
11126 ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "#include <unistd.h>
11127 "
11128 if test "x$ac_cv_have_decl_fdatasync" = xyes; then :
11129   ac_have_decl=1
11130 else
11131   ac_have_decl=0
11132 fi
11133
11134 cat >>confdefs.h <<_ACEOF
11135 #define HAVE_DECL_FDATASYNC $ac_have_decl
11136 _ACEOF
11137
11138 ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
11139 if test "x$ac_cv_have_decl_strlcat" = xyes; then :
11140   ac_have_decl=1
11141 else
11142   ac_have_decl=0
11143 fi
11144
11145 cat >>confdefs.h <<_ACEOF
11146 #define HAVE_DECL_STRLCAT $ac_have_decl
11147 _ACEOF
11148 ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
11149 if test "x$ac_cv_have_decl_strlcpy" = xyes; then :
11150   ac_have_decl=1
11151 else
11152   ac_have_decl=0
11153 fi
11154
11155 cat >>confdefs.h <<_ACEOF
11156 #define HAVE_DECL_STRLCPY $ac_have_decl
11157 _ACEOF
11158
11159 # This is probably only present on Darwin, but may as well check always
11160 ac_fn_c_check_decl "$LINENO" "F_FULLFSYNC" "ac_cv_have_decl_F_FULLFSYNC" "#include <fcntl.h>
11161 "
11162 if test "x$ac_cv_have_decl_F_FULLFSYNC" = xyes; then :
11163   ac_have_decl=1
11164 else
11165   ac_have_decl=0
11166 fi
11167
11168 cat >>confdefs.h <<_ACEOF
11169 #define HAVE_DECL_F_FULLFSYNC $ac_have_decl
11170 _ACEOF
11171
11172
11173 HAVE_IPV6=no
11174 ac_fn_c_check_type "$LINENO" "struct sockaddr_in6" "ac_cv_type_struct_sockaddr_in6" "$ac_includes_default
11175 #include <netinet/in.h>
11176 "
11177 if test "x$ac_cv_type_struct_sockaddr_in6" = xyes; then :
11178
11179 $as_echo "#define HAVE_IPV6 1" >>confdefs.h
11180
11181          HAVE_IPV6=yes
11182 fi
11183
11184
11185
11186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PS_STRINGS" >&5
11187 $as_echo_n "checking for PS_STRINGS... " >&6; }
11188 if ${pgac_cv_var_PS_STRINGS+:} false; then :
11189   $as_echo_n "(cached) " >&6
11190 else
11191   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11192 /* end confdefs.h.  */
11193 #include <machine/vmparam.h>
11194 #include <sys/exec.h>
11195
11196 int
11197 main ()
11198 {
11199 PS_STRINGS->ps_nargvstr = 1;
11200 PS_STRINGS->ps_argvstr = "foo";
11201   ;
11202   return 0;
11203 }
11204 _ACEOF
11205 if ac_fn_c_try_link "$LINENO"; then :
11206   pgac_cv_var_PS_STRINGS=yes
11207 else
11208   pgac_cv_var_PS_STRINGS=no
11209 fi
11210 rm -f core conftest.err conftest.$ac_objext \
11211     conftest$ac_exeext conftest.$ac_ext
11212 fi
11213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_PS_STRINGS" >&5
11214 $as_echo "$pgac_cv_var_PS_STRINGS" >&6; }
11215 if test "$pgac_cv_var_PS_STRINGS" = yes ; then
11216
11217 $as_echo "#define HAVE_PS_STRINGS 1" >>confdefs.h
11218
11219 fi
11220
11221
11222 # We use our snprintf.c emulation if either snprintf() or vsnprintf()
11223 # is missing.  Yes, there are machines that have only one.  We may
11224 # also decide to use snprintf.c if snprintf() is present but does not
11225 # have all the features we need --- see below.
11226
11227 if test "$PORTNAME" = "win32"; then
11228   # Win32 gets snprintf.c built unconditionally.
11229   #
11230   # To properly translate all NLS languages strings, we must support the
11231   # *printf() %$ format, which allows *printf() arguments to be selected
11232   # by position in the translated string.
11233   #
11234   # libintl versions < 0.13 use the native *printf() functions, and Win32
11235   # *printf() doesn't understand %$, so we must use our /port versions,
11236   # which do understand %$. libintl versions >= 0.13 include their own
11237   # *printf versions on Win32.  The libintl 0.13 release note text is:
11238   #
11239   #   C format strings with positions, as they arise when a translator
11240   #   needs to reorder a sentence, are now supported on all platforms.
11241   #   On those few platforms (NetBSD and Woe32) for which the native
11242   #   printf()/fprintf()/... functions don't support such format
11243   #   strings, replacements are provided through <libintl.h>.
11244   #
11245   # We could use libintl >= 0.13's *printf() if we were sure that we had
11246   # a litint >= 0.13 at runtime, but seeing that there is no clean way
11247   # to guarantee that, it is best to just use our own, so we are sure to
11248   # get %$ support. In include/port.h we disable the *printf() macros
11249   # that might have been defined by libintl.
11250   #
11251   # We do this unconditionally whether NLS is used or not so we are sure
11252   # that all Win32 libraries and binaries behave the same.
11253   pgac_need_repl_snprintf=yes
11254 else
11255   pgac_need_repl_snprintf=no
11256   for ac_func in snprintf
11257 do :
11258   ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
11259 if test "x$ac_cv_func_snprintf" = xyes; then :
11260   cat >>confdefs.h <<_ACEOF
11261 #define HAVE_SNPRINTF 1
11262 _ACEOF
11263
11264 else
11265   pgac_need_repl_snprintf=yes
11266 fi
11267 done
11268
11269   for ac_func in vsnprintf
11270 do :
11271   ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
11272 if test "x$ac_cv_func_vsnprintf" = xyes; then :
11273   cat >>confdefs.h <<_ACEOF
11274 #define HAVE_VSNPRINTF 1
11275 _ACEOF
11276
11277 else
11278   pgac_need_repl_snprintf=yes
11279 fi
11280 done
11281
11282 fi
11283
11284
11285 # Check whether <stdio.h> declares snprintf() and vsnprintf(); if not,
11286 # include/c.h will provide declarations.  Note this is a separate test
11287 # from whether the functions exist in the C library --- there are
11288 # systems that have the functions but don't bother to declare them :-(
11289
11290 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
11291 if test "x$ac_cv_have_decl_snprintf" = xyes; then :
11292   ac_have_decl=1
11293 else
11294   ac_have_decl=0
11295 fi
11296
11297 cat >>confdefs.h <<_ACEOF
11298 #define HAVE_DECL_SNPRINTF $ac_have_decl
11299 _ACEOF
11300 ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
11301 if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
11302   ac_have_decl=1
11303 else
11304   ac_have_decl=0
11305 fi
11306
11307 cat >>confdefs.h <<_ACEOF
11308 #define HAVE_DECL_VSNPRINTF $ac_have_decl
11309 _ACEOF
11310
11311
11312
11313 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for isinf" >&5
11314 $as_echo_n "checking for isinf... " >&6; }
11315 if ${ac_cv_func_isinf+:} false; then :
11316   $as_echo_n "(cached) " >&6
11317 else
11318   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11319 /* end confdefs.h.  */
11320
11321 #include <math.h>
11322 double glob_double;
11323
11324 int
11325 main ()
11326 {
11327 return isinf(glob_double) ? 0 : 1;
11328   ;
11329   return 0;
11330 }
11331 _ACEOF
11332 if ac_fn_c_try_link "$LINENO"; then :
11333   ac_cv_func_isinf=yes
11334 else
11335   ac_cv_func_isinf=no
11336 fi
11337 rm -f core conftest.err conftest.$ac_objext \
11338     conftest$ac_exeext conftest.$ac_ext
11339 fi
11340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_isinf" >&5
11341 $as_echo "$ac_cv_func_isinf" >&6; }
11342
11343 if test $ac_cv_func_isinf = yes ; then
11344
11345 $as_echo "#define HAVE_ISINF 1" >>confdefs.h
11346
11347 else
11348   case " $LIBOBJS " in
11349   *" isinf.$ac_objext "* ) ;;
11350   *) LIBOBJS="$LIBOBJS isinf.$ac_objext"
11351  ;;
11352 esac
11353
11354   # Look for a way to implement a substitute for isinf()
11355   for ac_func in fpclass fp_class fp_class_d class
11356 do :
11357   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11358 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11359 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11360   cat >>confdefs.h <<_ACEOF
11361 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11362 _ACEOF
11363  break
11364 fi
11365 done
11366
11367 fi
11368
11369 ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt"
11370 if test "x$ac_cv_func_crypt" = xyes; then :
11371   $as_echo "#define HAVE_CRYPT 1" >>confdefs.h
11372
11373 else
11374   case " $LIBOBJS " in
11375   *" crypt.$ac_objext "* ) ;;
11376   *) LIBOBJS="$LIBOBJS crypt.$ac_objext"
11377  ;;
11378 esac
11379
11380 fi
11381
11382 ac_fn_c_check_func "$LINENO" "fls" "ac_cv_func_fls"
11383 if test "x$ac_cv_func_fls" = xyes; then :
11384   $as_echo "#define HAVE_FLS 1" >>confdefs.h
11385
11386 else
11387   case " $LIBOBJS " in
11388   *" fls.$ac_objext "* ) ;;
11389   *) LIBOBJS="$LIBOBJS fls.$ac_objext"
11390  ;;
11391 esac
11392
11393 fi
11394
11395 ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt"
11396 if test "x$ac_cv_func_getopt" = xyes; then :
11397   $as_echo "#define HAVE_GETOPT 1" >>confdefs.h
11398
11399 else
11400   case " $LIBOBJS " in
11401   *" getopt.$ac_objext "* ) ;;
11402   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
11403  ;;
11404 esac
11405
11406 fi
11407
11408 ac_fn_c_check_func "$LINENO" "getrusage" "ac_cv_func_getrusage"
11409 if test "x$ac_cv_func_getrusage" = xyes; then :
11410   $as_echo "#define HAVE_GETRUSAGE 1" >>confdefs.h
11411
11412 else
11413   case " $LIBOBJS " in
11414   *" getrusage.$ac_objext "* ) ;;
11415   *) LIBOBJS="$LIBOBJS getrusage.$ac_objext"
11416  ;;
11417 esac
11418
11419 fi
11420
11421 ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
11422 if test "x$ac_cv_func_inet_aton" = xyes; then :
11423   $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
11424
11425 else
11426   case " $LIBOBJS " in
11427   *" inet_aton.$ac_objext "* ) ;;
11428   *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
11429  ;;
11430 esac
11431
11432 fi
11433
11434 ac_fn_c_check_func "$LINENO" "random" "ac_cv_func_random"
11435 if test "x$ac_cv_func_random" = xyes; then :
11436   $as_echo "#define HAVE_RANDOM 1" >>confdefs.h
11437
11438 else
11439   case " $LIBOBJS " in
11440   *" random.$ac_objext "* ) ;;
11441   *) LIBOBJS="$LIBOBJS random.$ac_objext"
11442  ;;
11443 esac
11444
11445 fi
11446
11447 ac_fn_c_check_func "$LINENO" "rint" "ac_cv_func_rint"
11448 if test "x$ac_cv_func_rint" = xyes; then :
11449   $as_echo "#define HAVE_RINT 1" >>confdefs.h
11450
11451 else
11452   case " $LIBOBJS " in
11453   *" rint.$ac_objext "* ) ;;
11454   *) LIBOBJS="$LIBOBJS rint.$ac_objext"
11455  ;;
11456 esac
11457
11458 fi
11459
11460 ac_fn_c_check_func "$LINENO" "srandom" "ac_cv_func_srandom"
11461 if test "x$ac_cv_func_srandom" = xyes; then :
11462   $as_echo "#define HAVE_SRANDOM 1" >>confdefs.h
11463
11464 else
11465   case " $LIBOBJS " in
11466   *" srandom.$ac_objext "* ) ;;
11467   *) LIBOBJS="$LIBOBJS srandom.$ac_objext"
11468  ;;
11469 esac
11470
11471 fi
11472
11473 ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror"
11474 if test "x$ac_cv_func_strerror" = xyes; then :
11475   $as_echo "#define HAVE_STRERROR 1" >>confdefs.h
11476
11477 else
11478   case " $LIBOBJS " in
11479   *" strerror.$ac_objext "* ) ;;
11480   *) LIBOBJS="$LIBOBJS strerror.$ac_objext"
11481  ;;
11482 esac
11483
11484 fi
11485
11486 ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
11487 if test "x$ac_cv_func_strlcat" = xyes; then :
11488   $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
11489
11490 else
11491   case " $LIBOBJS " in
11492   *" strlcat.$ac_objext "* ) ;;
11493   *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
11494  ;;
11495 esac
11496
11497 fi
11498
11499 ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
11500 if test "x$ac_cv_func_strlcpy" = xyes; then :
11501   $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
11502
11503 else
11504   case " $LIBOBJS " in
11505   *" strlcpy.$ac_objext "* ) ;;
11506   *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
11507  ;;
11508 esac
11509
11510 fi
11511
11512
11513
11514 case $host_os in
11515
11516         # Windows uses a specialised env handler
11517         # and doesn't need a replacement getpeereid because it doesn't use
11518         # Unix sockets.
11519         mingw*)
11520
11521 $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
11522
11523
11524 $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
11525
11526                 ac_cv_func_unsetenv=yes
11527                 ac_cv_func_getpeereid=yes;;
11528         *)
11529                 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
11530 if test "x$ac_cv_func_unsetenv" = xyes; then :
11531   $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
11532
11533 else
11534   case " $LIBOBJS " in
11535   *" unsetenv.$ac_objext "* ) ;;
11536   *) LIBOBJS="$LIBOBJS unsetenv.$ac_objext"
11537  ;;
11538 esac
11539
11540 fi
11541
11542 ac_fn_c_check_func "$LINENO" "getpeereid" "ac_cv_func_getpeereid"
11543 if test "x$ac_cv_func_getpeereid" = xyes; then :
11544   $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
11545
11546 else
11547   case " $LIBOBJS " in
11548   *" getpeereid.$ac_objext "* ) ;;
11549   *) LIBOBJS="$LIBOBJS getpeereid.$ac_objext"
11550  ;;
11551 esac
11552
11553 fi
11554
11555
11556                 ;;
11557 esac
11558
11559 # System's version of getaddrinfo(), if any, may be used only if we found
11560 # a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
11561 # (Note: the AC_REPLACE_FUNCS probe fails on Windows, where the available
11562 # versions of getaddrinfo don't follow normal C call protocol.  This is OK
11563 # because we want to use our own getaddrinfo.c on Windows anyway.)
11564 if test x"$ac_cv_type_struct_addrinfo" = xyes ; then
11565   ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo"
11566 if test "x$ac_cv_func_getaddrinfo" = xyes; then :
11567   $as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
11568
11569 else
11570   case " $LIBOBJS " in
11571   *" getaddrinfo.$ac_objext "* ) ;;
11572   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
11573  ;;
11574 esac
11575
11576 fi
11577
11578
11579 else
11580   case " $LIBOBJS " in
11581   *" getaddrinfo.$ac_objext "* ) ;;
11582   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
11583  ;;
11584 esac
11585
11586 fi
11587
11588 # Similarly, use system's getopt_long() only if system provides struct option.
11589 if test x"$ac_cv_type_struct_option" = xyes ; then
11590   ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long"
11591 if test "x$ac_cv_func_getopt_long" = xyes; then :
11592   $as_echo "#define HAVE_GETOPT_LONG 1" >>confdefs.h
11593
11594 else
11595   case " $LIBOBJS " in
11596   *" getopt_long.$ac_objext "* ) ;;
11597   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
11598  ;;
11599 esac
11600
11601 fi
11602
11603
11604 else
11605   case " $LIBOBJS " in
11606   *" getopt_long.$ac_objext "* ) ;;
11607   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
11608  ;;
11609 esac
11610
11611 fi
11612
11613 # Solaris' getopt() doesn't do what we want for long options, so always use
11614 # our version on that platform.
11615 if test "$PORTNAME" = "solaris"; then
11616   case " $LIBOBJS " in
11617   *" getopt.$ac_objext "* ) ;;
11618   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
11619  ;;
11620 esac
11621
11622 fi
11623
11624 # mingw has adopted a GNU-centric interpretation of optind/optreset,
11625 # so always use our version on Windows.
11626 if test "$PORTNAME" = "win32"; then
11627   case " $LIBOBJS " in
11628   *" getopt.$ac_objext "* ) ;;
11629   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
11630  ;;
11631 esac
11632
11633   case " $LIBOBJS " in
11634   *" getopt_long.$ac_objext "* ) ;;
11635   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
11636  ;;
11637 esac
11638
11639 fi
11640
11641 # Win32 support
11642 if test "$PORTNAME" = "win32"; then
11643   ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
11644 if test "x$ac_cv_func_gettimeofday" = xyes; then :
11645   $as_echo "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
11646
11647 else
11648   case " $LIBOBJS " in
11649   *" gettimeofday.$ac_objext "* ) ;;
11650   *) LIBOBJS="$LIBOBJS gettimeofday.$ac_objext"
11651  ;;
11652 esac
11653
11654 fi
11655
11656
11657   case " $LIBOBJS " in
11658   *" kill.$ac_objext "* ) ;;
11659   *) LIBOBJS="$LIBOBJS kill.$ac_objext"
11660  ;;
11661 esac
11662
11663   case " $LIBOBJS " in
11664   *" open.$ac_objext "* ) ;;
11665   *) LIBOBJS="$LIBOBJS open.$ac_objext"
11666  ;;
11667 esac
11668
11669   case " $LIBOBJS " in
11670   *" system.$ac_objext "* ) ;;
11671   *) LIBOBJS="$LIBOBJS system.$ac_objext"
11672  ;;
11673 esac
11674
11675   case " $LIBOBJS " in
11676   *" win32env.$ac_objext "* ) ;;
11677   *) LIBOBJS="$LIBOBJS win32env.$ac_objext"
11678  ;;
11679 esac
11680
11681   case " $LIBOBJS " in
11682   *" win32error.$ac_objext "* ) ;;
11683   *) LIBOBJS="$LIBOBJS win32error.$ac_objext"
11684  ;;
11685 esac
11686
11687   case " $LIBOBJS " in
11688   *" win32setlocale.$ac_objext "* ) ;;
11689   *) LIBOBJS="$LIBOBJS win32setlocale.$ac_objext"
11690  ;;
11691 esac
11692
11693
11694 $as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
11695
11696   ac_fn_c_check_type "$LINENO" "MINIDUMP_TYPE" "ac_cv_type_MINIDUMP_TYPE" "
11697 #define WIN32_LEAN_AND_MEAN
11698 #include <windows.h>
11699 #include <string.h>
11700 #include <dbghelp.h>
11701 "
11702 if test "x$ac_cv_type_MINIDUMP_TYPE" = xyes; then :
11703
11704 cat >>confdefs.h <<_ACEOF
11705 #define HAVE_MINIDUMP_TYPE 1
11706 _ACEOF
11707
11708 pgac_minidump_type=yes
11709 else
11710   pgac_minidump_type=no
11711 fi
11712
11713 fi
11714 if test x"$pgac_minidump_type" = x"yes" ; then
11715   have_win32_dbghelp=yes
11716
11717 else
11718   have_win32_dbghelp=no
11719
11720 fi
11721
11722 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
11723 $as_echo_n "checking for sigsetjmp... " >&6; }
11724 if ${pgac_cv_func_sigsetjmp+:} false; then :
11725   $as_echo_n "(cached) " >&6
11726 else
11727   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11728 /* end confdefs.h.  */
11729 #include <setjmp.h>
11730 int
11731 main ()
11732 {
11733 sigjmp_buf x; sigsetjmp(x, 1);
11734   ;
11735   return 0;
11736 }
11737 _ACEOF
11738 if ac_fn_c_try_link "$LINENO"; then :
11739   pgac_cv_func_sigsetjmp=yes
11740 else
11741   pgac_cv_func_sigsetjmp=no
11742 fi
11743 rm -f core conftest.err conftest.$ac_objext \
11744     conftest$ac_exeext conftest.$ac_ext
11745 fi
11746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_sigsetjmp" >&5
11747 $as_echo "$pgac_cv_func_sigsetjmp" >&6; }
11748 if test x"$pgac_cv_func_sigsetjmp" = x"yes"; then
11749
11750 $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
11751
11752 fi
11753
11754 ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "#include <signal.h>
11755 /* NetBSD declares sys_siglist in unistd.h.  */
11756 #ifdef HAVE_UNISTD_H
11757 # include <unistd.h>
11758 #endif
11759
11760 "
11761 if test "x$ac_cv_have_decl_sys_siglist" = xyes; then :
11762   ac_have_decl=1
11763 else
11764   ac_have_decl=0
11765 fi
11766
11767 cat >>confdefs.h <<_ACEOF
11768 #define HAVE_DECL_SYS_SIGLIST $ac_have_decl
11769 _ACEOF
11770
11771
11772
11773 ac_fn_c_check_func "$LINENO" "syslog" "ac_cv_func_syslog"
11774 if test "x$ac_cv_func_syslog" = xyes; then :
11775   ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default"
11776 if test "x$ac_cv_header_syslog_h" = xyes; then :
11777
11778 $as_echo "#define HAVE_SYSLOG 1" >>confdefs.h
11779
11780 fi
11781
11782
11783 fi
11784
11785
11786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opterr" >&5
11787 $as_echo_n "checking for opterr... " >&6; }
11788 if ${pgac_cv_var_int_opterr+:} false; then :
11789   $as_echo_n "(cached) " >&6
11790 else
11791   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11792 /* end confdefs.h.  */
11793 #include <unistd.h>
11794 int
11795 main ()
11796 {
11797 extern int opterr; opterr = 1;
11798   ;
11799   return 0;
11800 }
11801 _ACEOF
11802 if ac_fn_c_try_link "$LINENO"; then :
11803   pgac_cv_var_int_opterr=yes
11804 else
11805   pgac_cv_var_int_opterr=no
11806 fi
11807 rm -f core conftest.err conftest.$ac_objext \
11808     conftest$ac_exeext conftest.$ac_ext
11809 fi
11810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_opterr" >&5
11811 $as_echo "$pgac_cv_var_int_opterr" >&6; }
11812 if test x"$pgac_cv_var_int_opterr" = x"yes"; then
11813
11814 $as_echo "#define HAVE_INT_OPTERR 1" >>confdefs.h
11815
11816 fi
11817
11818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for optreset" >&5
11819 $as_echo_n "checking for optreset... " >&6; }
11820 if ${pgac_cv_var_int_optreset+:} false; then :
11821   $as_echo_n "(cached) " >&6
11822 else
11823   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11824 /* end confdefs.h.  */
11825 #include <unistd.h>
11826 int
11827 main ()
11828 {
11829 extern int optreset; optreset = 1;
11830   ;
11831   return 0;
11832 }
11833 _ACEOF
11834 if ac_fn_c_try_link "$LINENO"; then :
11835   pgac_cv_var_int_optreset=yes
11836 else
11837   pgac_cv_var_int_optreset=no
11838 fi
11839 rm -f core conftest.err conftest.$ac_objext \
11840     conftest$ac_exeext conftest.$ac_ext
11841 fi
11842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_optreset" >&5
11843 $as_echo "$pgac_cv_var_int_optreset" >&6; }
11844 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
11845
11846 $as_echo "#define HAVE_INT_OPTRESET 1" >>confdefs.h
11847
11848 fi
11849
11850 for ac_func in strtoll strtoq
11851 do :
11852   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11853 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11854 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11855   cat >>confdefs.h <<_ACEOF
11856 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11857 _ACEOF
11858  break
11859 fi
11860 done
11861
11862 for ac_func in strtoull strtouq
11863 do :
11864   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11865 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11866 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11867   cat >>confdefs.h <<_ACEOF
11868 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11869 _ACEOF
11870  break
11871 fi
11872 done
11873
11874
11875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin locking functions" >&5
11876 $as_echo_n "checking for builtin locking functions... " >&6; }
11877 if ${pgac_cv_gcc_int_atomics+:} false; then :
11878   $as_echo_n "(cached) " >&6
11879 else
11880   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11881 /* end confdefs.h.  */
11882
11883 int
11884 main ()
11885 {
11886 int lock = 0;
11887    __sync_lock_test_and_set(&lock, 1);
11888    __sync_lock_release(&lock);
11889   ;
11890   return 0;
11891 }
11892 _ACEOF
11893 if ac_fn_c_try_link "$LINENO"; then :
11894   pgac_cv_gcc_int_atomics="yes"
11895 else
11896   pgac_cv_gcc_int_atomics="no"
11897 fi
11898 rm -f core conftest.err conftest.$ac_objext \
11899     conftest$ac_exeext conftest.$ac_ext
11900 fi
11901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_int_atomics" >&5
11902 $as_echo "$pgac_cv_gcc_int_atomics" >&6; }
11903 if test x"$pgac_cv_gcc_int_atomics" = x"yes"; then
11904
11905 $as_echo "#define HAVE_GCC_INT_ATOMICS 1" >>confdefs.h
11906
11907 fi
11908
11909 # Lastly, restore full LIBS list and check for readline/libedit symbols
11910 LIBS="$LIBS_including_readline"
11911
11912 if test "$with_readline" = yes; then
11913   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_append_character" >&5
11914 $as_echo_n "checking for rl_completion_append_character... " >&6; }
11915 if ${pgac_cv_var_rl_completion_append_character+:} false; then :
11916   $as_echo_n "(cached) " >&6
11917 else
11918   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11919 /* end confdefs.h.  */
11920 #include <stdio.h>
11921 #ifdef HAVE_READLINE_READLINE_H
11922 # include <readline/readline.h>
11923 #elif defined(HAVE_READLINE_H)
11924 # include <readline.h>
11925 #endif
11926
11927 int
11928 main ()
11929 {
11930 rl_completion_append_character = 'x';
11931   ;
11932   return 0;
11933 }
11934 _ACEOF
11935 if ac_fn_c_try_link "$LINENO"; then :
11936   pgac_cv_var_rl_completion_append_character=yes
11937 else
11938   pgac_cv_var_rl_completion_append_character=no
11939 fi
11940 rm -f core conftest.err conftest.$ac_objext \
11941     conftest$ac_exeext conftest.$ac_ext
11942 fi
11943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_completion_append_character" >&5
11944 $as_echo "$pgac_cv_var_rl_completion_append_character" >&6; }
11945 if test x"$pgac_cv_var_rl_completion_append_character" = x"yes"; then
11946
11947 $as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
11948
11949 fi
11950   for ac_func in rl_completion_matches rl_filename_completion_function
11951 do :
11952   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11953 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11954 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11955   cat >>confdefs.h <<_ACEOF
11956 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11957 _ACEOF
11958
11959 fi
11960 done
11961
11962   for ac_func in append_history history_truncate_file
11963 do :
11964   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11965 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11966 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11967   cat >>confdefs.h <<_ACEOF
11968 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11969 _ACEOF
11970
11971 fi
11972 done
11973
11974 fi
11975
11976
11977 #
11978 # Pthreads
11979 #
11980 # For each platform, we need to know about any special compile and link
11981 # libraries, and whether the normal C function names are thread-safe.
11982 # See the comment at the top of src/port/thread.c for more information.
11983 # WIN32 doesn't need the pthread tests;  it always uses threads
11984 if test "$enable_thread_safety" = yes -a "$PORTNAME" != "win32"; then
11985
11986
11987
11988 ac_ext=c
11989 ac_cpp='$CPP $CPPFLAGS'
11990 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11991 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11992 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11993
11994 acx_pthread_ok=no
11995
11996 # We used to check for pthread.h first, but this fails if pthread.h
11997 # requires special compiler flags (e.g. on True64 or Sequent).
11998 # It gets checked for in the link test anyway.
11999
12000 # First of all, check if the user has set any of the PTHREAD_LIBS,
12001 # etcetera environment variables, and if threads linking works using
12002 # them:
12003 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
12004         save_CFLAGS="$CFLAGS"
12005         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
12006         save_LIBS="$LIBS"
12007         LIBS="$PTHREAD_LIBS $LIBS"
12008         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
12009 $as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; }
12010         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12011 /* end confdefs.h.  */
12012
12013 /* Override any GCC internal prototype to avoid an error.
12014    Use char because int might match the return type of a GCC
12015    builtin and then its argument prototype would still apply.  */
12016 #ifdef __cplusplus
12017 extern "C"
12018 #endif
12019 char pthread_join ();
12020 int
12021 main ()
12022 {
12023 return pthread_join ();
12024   ;
12025   return 0;
12026 }
12027 _ACEOF
12028 if ac_fn_c_try_link "$LINENO"; then :
12029   acx_pthread_ok=yes
12030 fi
12031 rm -f core conftest.err conftest.$ac_objext \
12032     conftest$ac_exeext conftest.$ac_ext
12033         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_ok" >&5
12034 $as_echo "$acx_pthread_ok" >&6; }
12035         if test x"$acx_pthread_ok" = xno; then
12036                 PTHREAD_LIBS=""
12037                 PTHREAD_CFLAGS=""
12038         fi
12039         LIBS="$save_LIBS"
12040         CFLAGS="$save_CFLAGS"
12041 fi
12042
12043 # We must check for the threads library under a number of different
12044 # names; the ordering is very important because some systems
12045 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
12046 # libraries is broken (non-POSIX).
12047
12048 # Create a list of thread flags to try.  Items starting with a "-" are
12049 # C compiler flags, and other items are library names, except for "none"
12050 # which indicates that we try without any flags at all, and "pthread-config"
12051 # which is a program returning the flags for the Pth emulation library.
12052
12053 acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config pthreadGC2"
12054
12055 # The ordering *is* (sometimes) important.  Some notes on the
12056 # individual items follow:
12057
12058 # pthreads: AIX (must check this before -lpthread)
12059 # none: in case threads are in libc; should be tried before -Kthread and
12060 #       other compiler flags to prevent continual compiler warnings
12061 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
12062 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
12063 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
12064 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
12065 # -pthreads: Solaris/gcc
12066 # -mthreads: Mingw32/gcc, Lynx/gcc
12067 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
12068 #      doesn't hurt to check since this sometimes defines pthreads too;
12069 #      also defines -D_REENTRANT)
12070 # pthread: Linux, etcetera
12071 # --thread-safe: KAI C++
12072 # pthread-config: use pthread-config program (for GNU Pth library)
12073
12074 case "${host_cpu}-${host_os}" in
12075         *solaris*)
12076
12077         # On Solaris (at least, for some versions), libc contains stubbed
12078         # (non-functional) versions of the pthreads routines, so link-based
12079         # tests will erroneously succeed.  (We need to link with -pthread or
12080         # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
12081         # a function called by this macro, so we could check for that, but
12082         # who knows whether they'll stub that too in a future libc.)  So,
12083         # we'll just look for -pthreads and -lpthread first:
12084
12085         acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags"
12086         ;;
12087 esac
12088
12089 if test x"$acx_pthread_ok" = xno; then
12090 for flag in $acx_pthread_flags; do
12091
12092         tryPTHREAD_CFLAGS=""
12093         tryPTHREAD_LIBS=""
12094         case $flag in
12095                 none)
12096                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
12097 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
12098                 ;;
12099
12100                 -*)
12101                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5
12102 $as_echo_n "checking whether pthreads work with $flag... " >&6; }
12103                 tryPTHREAD_CFLAGS="$flag"
12104                 ;;
12105
12106                 pthread-config)
12107                 # skip this if we already have flags defined, for PostgreSQL
12108                 if test x"$PTHREAD_CFLAGS" != x -o x"$PTHREAD_LIBS" != x; then continue; fi
12109                 # Extract the first word of "pthread-config", so it can be a program name with args.
12110 set dummy pthread-config; ac_word=$2
12111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12112 $as_echo_n "checking for $ac_word... " >&6; }
12113 if ${ac_cv_prog_acx_pthread_config+:} false; then :
12114   $as_echo_n "(cached) " >&6
12115 else
12116   if test -n "$acx_pthread_config"; then
12117   ac_cv_prog_acx_pthread_config="$acx_pthread_config" # Let the user override the test.
12118 else
12119 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12120 for as_dir in $PATH
12121 do
12122   IFS=$as_save_IFS
12123   test -z "$as_dir" && as_dir=.
12124     for ac_exec_ext in '' $ac_executable_extensions; do
12125   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12126     ac_cv_prog_acx_pthread_config="yes"
12127     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12128     break 2
12129   fi
12130 done
12131   done
12132 IFS=$as_save_IFS
12133
12134   test -z "$ac_cv_prog_acx_pthread_config" && ac_cv_prog_acx_pthread_config="no"
12135 fi
12136 fi
12137 acx_pthread_config=$ac_cv_prog_acx_pthread_config
12138 if test -n "$acx_pthread_config"; then
12139   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_config" >&5
12140 $as_echo "$acx_pthread_config" >&6; }
12141 else
12142   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12143 $as_echo "no" >&6; }
12144 fi
12145
12146
12147                 if test x"$acx_pthread_config" = xno; then continue; fi
12148                 tryPTHREAD_CFLAGS="`pthread-config --cflags`"
12149                 tryPTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
12150                 ;;
12151
12152                 *)
12153                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5
12154 $as_echo_n "checking for the pthreads library -l$flag... " >&6; }
12155                 tryPTHREAD_LIBS="-l$flag"
12156                 ;;
12157         esac
12158
12159         save_LIBS="$LIBS"
12160         save_CFLAGS="$CFLAGS"
12161         LIBS="$tryPTHREAD_LIBS $PTHREAD_LIBS $LIBS"
12162         CFLAGS="$CFLAGS $PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
12163
12164         # Check for various functions.  We must include pthread.h,
12165         # since some functions may be macros.  (On the Sequent, we
12166         # need a special flag -Kthread to make this header compile.)
12167         # We check for pthread_join because it is in -lpthread on IRIX
12168         # while pthread_create is in libc.  We check for pthread_attr_init
12169         # due to DEC craziness with -lpthreads.  We check for
12170         # pthread_cleanup_push because it is one of the few pthread
12171         # functions on Solaris that doesn't have a non-functional libc stub.
12172         # We try pthread_create on general principles.
12173         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12174 /* end confdefs.h.  */
12175 #include <pthread.h>
12176 int
12177 main ()
12178 {
12179 pthread_t th; pthread_join(th, 0);
12180                      pthread_attr_init(0); pthread_cleanup_push(0, 0);
12181                      pthread_create(0,0,0,0); pthread_cleanup_pop(0);
12182   ;
12183   return 0;
12184 }
12185 _ACEOF
12186 if ac_fn_c_try_link "$LINENO"; then :
12187   acx_pthread_ok=yes
12188 else
12189   acx_pthread_ok=no
12190 fi
12191 rm -f core conftest.err conftest.$ac_objext \
12192     conftest$ac_exeext conftest.$ac_ext
12193
12194         if test "x$acx_pthread_ok" = xyes; then
12195             # Don't use options that are ignored by the compiler.
12196             # We find them by checking stderror.
12197             cat >conftest.$ac_ext <<_ACEOF
12198 int
12199 main (int argc, char **argv)
12200 {
12201   (void) argc;
12202   (void) argv;
12203   return 0;
12204 }
12205 _ACEOF
12206             rm -f conftest.$ac_objext conftest$ac_exeext
12207             # Check both linking and compiling, because they might tolerate different options.
12208             if test "`(eval $ac_link 2>&1 1>&5)`" = "" && test "`(eval $ac_compile 2>&1 1>&5)`" = ""; then
12209                 # we continue with more flags because Linux needs -lpthread
12210                 # for libpq builds on PostgreSQL.  The test above only
12211                 # tests for building binaries, not shared libraries.
12212                 PTHREAD_LIBS=" $tryPTHREAD_LIBS $PTHREAD_LIBS"
12213                 PTHREAD_CFLAGS="$PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
12214             else   acx_pthread_ok=no
12215             fi
12216         fi
12217
12218         LIBS="$save_LIBS"
12219         CFLAGS="$save_CFLAGS"
12220
12221         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_ok" >&5
12222 $as_echo "$acx_pthread_ok" >&6; }
12223 done
12224 fi
12225
12226 # Various other checks:
12227 if test "x$acx_pthread_ok" = xyes; then
12228         save_LIBS="$LIBS"
12229         LIBS="$PTHREAD_LIBS $LIBS"
12230         save_CFLAGS="$CFLAGS"
12231         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
12232
12233         # Detect AIX lossage: threads are created detached by default
12234         # and the JOINABLE attribute has a nonstandard name (UNDETACHED).
12235         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
12236 $as_echo_n "checking for joinable pthread attribute... " >&6; }
12237         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12238 /* end confdefs.h.  */
12239 #include <pthread.h>
12240 int
12241 main ()
12242 {
12243 int attr=PTHREAD_CREATE_JOINABLE;
12244   ;
12245   return 0;
12246 }
12247 _ACEOF
12248 if ac_fn_c_try_link "$LINENO"; then :
12249   ok=PTHREAD_CREATE_JOINABLE
12250 else
12251   ok=unknown
12252 fi
12253 rm -f core conftest.err conftest.$ac_objext \
12254     conftest$ac_exeext conftest.$ac_ext
12255         if test x"$ok" = xunknown; then
12256                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12257 /* end confdefs.h.  */
12258 #include <pthread.h>
12259 int
12260 main ()
12261 {
12262 int attr=PTHREAD_CREATE_UNDETACHED;
12263   ;
12264   return 0;
12265 }
12266 _ACEOF
12267 if ac_fn_c_try_link "$LINENO"; then :
12268   ok=PTHREAD_CREATE_UNDETACHED
12269 else
12270   ok=unknown
12271 fi
12272 rm -f core conftest.err conftest.$ac_objext \
12273     conftest$ac_exeext conftest.$ac_ext
12274         fi
12275         if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then
12276
12277 $as_echo "#define PTHREAD_CREATE_JOINABLE \$ok" >>confdefs.h
12278
12279         fi
12280         { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ok}" >&5
12281 $as_echo "${ok}" >&6; }
12282         if test x"$ok" = xunknown; then
12283                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: we do not know how to create joinable pthreads" >&5
12284 $as_echo "$as_me: WARNING: we do not know how to create joinable pthreads" >&2;}
12285         fi
12286
12287         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5
12288 $as_echo_n "checking if more special flags are required for pthreads... " >&6; }
12289         flag=no
12290 # We always add these in PostgreSQL
12291 #       case "${host_cpu}-${host_os}" in
12292 #               *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
12293 #               *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
12294 #       esac
12295         { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${flag}" >&5
12296 $as_echo "${flag}" >&6; }
12297         if test "x$flag" != xno; then
12298                 PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
12299         fi
12300
12301         LIBS="$save_LIBS"
12302         CFLAGS="$save_CFLAGS"
12303
12304 # Supporting cc_r would require a special CC in all places that
12305 # use libpq, and that is ugly, so we don't do it.  Users can still
12306 # define their compiler as cc_r to do thread builds of everything.
12307         # More AIX lossage: must compile with cc_r
12308         # Extract the first word of "cc_r", so it can be a program name with args.
12309 set dummy cc_r; ac_word=$2
12310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12311 $as_echo_n "checking for $ac_word... " >&6; }
12312 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
12313   $as_echo_n "(cached) " >&6
12314 else
12315   if test -n "$PTHREAD_CC"; then
12316   ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
12317 else
12318 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12319 for as_dir in $PATH
12320 do
12321   IFS=$as_save_IFS
12322   test -z "$as_dir" && as_dir=.
12323     for ac_exec_ext in '' $ac_executable_extensions; do
12324   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12325     ac_cv_prog_PTHREAD_CC="cc_r"
12326     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12327     break 2
12328   fi
12329 done
12330   done
12331 IFS=$as_save_IFS
12332
12333   test -z "$ac_cv_prog_PTHREAD_CC" && ac_cv_prog_PTHREAD_CC="${CC}"
12334 fi
12335 fi
12336 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
12337 if test -n "$PTHREAD_CC"; then
12338   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
12339 $as_echo "$PTHREAD_CC" >&6; }
12340 else
12341   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12342 $as_echo "no" >&6; }
12343 fi
12344
12345
12346 else
12347         PTHREAD_CC="$CC"
12348 fi
12349
12350
12351
12352
12353
12354 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
12355 if test x"$acx_pthread_ok" = xyes; then
12356
12357 $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
12358
12359         :
12360 else
12361         acx_pthread_ok=no
12362
12363 fi
12364 ac_ext=c
12365 ac_cpp='$CPP $CPPFLAGS'
12366 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12367 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12368 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12369
12370         # set thread flags
12371
12372 # Some platforms use these, so just define them.  They can't hurt if they
12373 # are not supported.  For example, on Solaris -D_POSIX_PTHREAD_SEMANTICS
12374 # enables 5-arg getpwuid_r, among other things.
12375 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
12376
12377
12378 # At this point, we don't want to muck with the compiler name for threading.
12379 # Let's see who fails, perhaps AIX.  2004-04-23
12380 if test "$PTHREAD_CC" != "$CC"; then
12381 as_fn_error $? "
12382 PostgreSQL does not support platforms that require a special compiler
12383 for thread safety;  use --disable-thread-safety to disable thread safety." "$LINENO" 5
12384 fi
12385
12386 # Check for *_r functions
12387 _CFLAGS="$CFLAGS"
12388 _LIBS="$LIBS"
12389 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
12390 LIBS="$LIBS $PTHREAD_LIBS"
12391
12392 if test "$PORTNAME" != "win32"; then
12393 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
12394 if test "x$ac_cv_header_pthread_h" = xyes; then :
12395
12396 else
12397   as_fn_error $? "
12398 pthread.h not found;  use --disable-thread-safety to disable thread safety" "$LINENO" 5
12399 fi
12400
12401
12402 fi
12403
12404 for ac_func in strerror_r getpwuid_r gethostbyname_r
12405 do :
12406   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12407 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12408 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12409   cat >>confdefs.h <<_ACEOF
12410 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12411 _ACEOF
12412
12413 fi
12414 done
12415
12416
12417 # Do test here with the proper thread flags
12418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getpwuid_r takes a fifth argument" >&5
12419 $as_echo_n "checking whether getpwuid_r takes a fifth argument... " >&6; }
12420 if ${pgac_cv_func_getpwuid_r_5arg+:} false; then :
12421   $as_echo_n "(cached) " >&6
12422 else
12423   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12424 /* end confdefs.h.  */
12425 #include <sys/types.h>
12426 #include <pwd.h>
12427 int
12428 main ()
12429 {
12430 uid_t uid;
12431 struct passwd *space;
12432 char *buf;
12433 size_t bufsize;
12434 struct passwd **result;
12435 getpwuid_r(uid, space, buf, bufsize, result);
12436   ;
12437   return 0;
12438 }
12439 _ACEOF
12440 if ac_fn_c_try_compile "$LINENO"; then :
12441   pgac_cv_func_getpwuid_r_5arg=yes
12442 else
12443   pgac_cv_func_getpwuid_r_5arg=no
12444 fi
12445 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12446 fi
12447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_getpwuid_r_5arg" >&5
12448 $as_echo "$pgac_cv_func_getpwuid_r_5arg" >&6; }
12449 if test x"$pgac_cv_func_getpwuid_r_5arg" = xyes ; then
12450
12451 $as_echo "#define GETPWUID_R_5ARG 1" >>confdefs.h
12452
12453 fi
12454
12455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns int" >&5
12456 $as_echo_n "checking whether strerror_r returns int... " >&6; }
12457 if ${pgac_cv_func_strerror_r_int+:} false; then :
12458   $as_echo_n "(cached) " >&6
12459 else
12460   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12461 /* end confdefs.h.  */
12462 #include <string.h>
12463 int
12464 main ()
12465 {
12466 #ifndef _AIX
12467 int strerror_r(int, char *, size_t);
12468 #else
12469 /* Older AIX has 'int' for the third argument so we don't test the args. */
12470 int strerror_r();
12471 #endif
12472   ;
12473   return 0;
12474 }
12475 _ACEOF
12476 if ac_fn_c_try_compile "$LINENO"; then :
12477   pgac_cv_func_strerror_r_int=yes
12478 else
12479   pgac_cv_func_strerror_r_int=no
12480 fi
12481 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12482 fi
12483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_strerror_r_int" >&5
12484 $as_echo "$pgac_cv_func_strerror_r_int" >&6; }
12485 if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
12486
12487 $as_echo "#define STRERROR_R_INT 1" >>confdefs.h
12488
12489 fi
12490
12491
12492 CFLAGS="$_CFLAGS"
12493 LIBS="$_LIBS"
12494
12495 else
12496 # do not use values from template file
12497 PTHREAD_CFLAGS=
12498 PTHREAD_LIBS=
12499 fi
12500
12501
12502
12503
12504
12505 # We can test for libldap_r only after we know PTHREAD_LIBS
12506 if test "$with_ldap" = yes ; then
12507   _LIBS="$LIBS"
12508   if test "$PORTNAME" != "win32"; then
12509     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap" >&5
12510 $as_echo_n "checking for ldap_bind in -lldap... " >&6; }
12511 if ${ac_cv_lib_ldap_ldap_bind+:} false; then :
12512   $as_echo_n "(cached) " >&6
12513 else
12514   ac_check_lib_save_LIBS=$LIBS
12515 LIBS="-lldap $EXTRA_LDAP_LIBS $LIBS"
12516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12517 /* end confdefs.h.  */
12518
12519 /* Override any GCC internal prototype to avoid an error.
12520    Use char because int might match the return type of a GCC
12521    builtin and then its argument prototype would still apply.  */
12522 #ifdef __cplusplus
12523 extern "C"
12524 #endif
12525 char ldap_bind ();
12526 int
12527 main ()
12528 {
12529 return ldap_bind ();
12530   ;
12531   return 0;
12532 }
12533 _ACEOF
12534 if ac_fn_c_try_link "$LINENO"; then :
12535   ac_cv_lib_ldap_ldap_bind=yes
12536 else
12537   ac_cv_lib_ldap_ldap_bind=no
12538 fi
12539 rm -f core conftest.err conftest.$ac_objext \
12540     conftest$ac_exeext conftest.$ac_ext
12541 LIBS=$ac_check_lib_save_LIBS
12542 fi
12543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_ldap_bind" >&5
12544 $as_echo "$ac_cv_lib_ldap_ldap_bind" >&6; }
12545 if test "x$ac_cv_lib_ldap_ldap_bind" = xyes; then :
12546   cat >>confdefs.h <<_ACEOF
12547 #define HAVE_LIBLDAP 1
12548 _ACEOF
12549
12550   LIBS="-lldap $LIBS"
12551
12552 else
12553   as_fn_error $? "library 'ldap' is required for LDAP" "$LINENO" 5
12554 fi
12555
12556     LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
12557     if test "$enable_thread_safety" = yes; then
12558       # on some platforms ldap_r fails to link without PTHREAD_LIBS
12559       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_simple_bind in -lldap_r" >&5
12560 $as_echo_n "checking for ldap_simple_bind in -lldap_r... " >&6; }
12561 if ${ac_cv_lib_ldap_r_ldap_simple_bind+:} false; then :
12562   $as_echo_n "(cached) " >&6
12563 else
12564   ac_check_lib_save_LIBS=$LIBS
12565 LIBS="-lldap_r $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
12566 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12567 /* end confdefs.h.  */
12568
12569 /* Override any GCC internal prototype to avoid an error.
12570    Use char because int might match the return type of a GCC
12571    builtin and then its argument prototype would still apply.  */
12572 #ifdef __cplusplus
12573 extern "C"
12574 #endif
12575 char ldap_simple_bind ();
12576 int
12577 main ()
12578 {
12579 return ldap_simple_bind ();
12580   ;
12581   return 0;
12582 }
12583 _ACEOF
12584 if ac_fn_c_try_link "$LINENO"; then :
12585   ac_cv_lib_ldap_r_ldap_simple_bind=yes
12586 else
12587   ac_cv_lib_ldap_r_ldap_simple_bind=no
12588 fi
12589 rm -f core conftest.err conftest.$ac_objext \
12590     conftest$ac_exeext conftest.$ac_ext
12591 LIBS=$ac_check_lib_save_LIBS
12592 fi
12593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_r_ldap_simple_bind" >&5
12594 $as_echo "$ac_cv_lib_ldap_r_ldap_simple_bind" >&6; }
12595 if test "x$ac_cv_lib_ldap_r_ldap_simple_bind" = xyes; then :
12596   cat >>confdefs.h <<_ACEOF
12597 #define HAVE_LIBLDAP_R 1
12598 _ACEOF
12599
12600   LIBS="-lldap_r $LIBS"
12601
12602 else
12603   as_fn_error $? "library 'ldap_r' is required for LDAP" "$LINENO" 5
12604 fi
12605
12606       LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
12607     else
12608       LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
12609     fi
12610   else
12611     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lwldap32" >&5
12612 $as_echo_n "checking for ldap_bind in -lwldap32... " >&6; }
12613 if ${ac_cv_lib_wldap32_ldap_bind+:} false; then :
12614   $as_echo_n "(cached) " >&6
12615 else
12616   ac_check_lib_save_LIBS=$LIBS
12617 LIBS="-lwldap32  $LIBS"
12618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12619 /* end confdefs.h.  */
12620
12621 /* Override any GCC internal prototype to avoid an error.
12622    Use char because int might match the return type of a GCC
12623    builtin and then its argument prototype would still apply.  */
12624 #ifdef __cplusplus
12625 extern "C"
12626 #endif
12627 char ldap_bind ();
12628 int
12629 main ()
12630 {
12631 return ldap_bind ();
12632   ;
12633   return 0;
12634 }
12635 _ACEOF
12636 if ac_fn_c_try_link "$LINENO"; then :
12637   ac_cv_lib_wldap32_ldap_bind=yes
12638 else
12639   ac_cv_lib_wldap32_ldap_bind=no
12640 fi
12641 rm -f core conftest.err conftest.$ac_objext \
12642     conftest$ac_exeext conftest.$ac_ext
12643 LIBS=$ac_check_lib_save_LIBS
12644 fi
12645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wldap32_ldap_bind" >&5
12646 $as_echo "$ac_cv_lib_wldap32_ldap_bind" >&6; }
12647 if test "x$ac_cv_lib_wldap32_ldap_bind" = xyes; then :
12648   cat >>confdefs.h <<_ACEOF
12649 #define HAVE_LIBWLDAP32 1
12650 _ACEOF
12651
12652   LIBS="-lwldap32 $LIBS"
12653
12654 else
12655   as_fn_error $? "library 'wldap32' is required for LDAP" "$LINENO" 5
12656 fi
12657
12658     LDAP_LIBS_FE="-lwldap32"
12659     LDAP_LIBS_BE="-lwldap32"
12660   fi
12661   LIBS="$_LIBS"
12662 fi
12663
12664
12665
12666
12667 # This test makes sure that run tests work at all.  Sometimes a shared
12668 # library is found by the linker, but the runtime linker can't find it.
12669 # This check should come after all modifications of compiler or linker
12670 # variables, and before any other run tests.
12671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking test program" >&5
12672 $as_echo_n "checking test program... " >&6; }
12673 if test "$cross_compiling" = yes; then :
12674   { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling" >&5
12675 $as_echo "cross-compiling" >&6; }
12676 else
12677   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12678 /* end confdefs.h.  */
12679 int main() { return 0; }
12680 _ACEOF
12681 if ac_fn_c_try_run "$LINENO"; then :
12682   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
12683 $as_echo "ok" >&6; }
12684 else
12685   { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
12686 $as_echo "failed" >&6; }
12687 as_fn_error $? "
12688 Could not execute a simple test program.  This may be a problem
12689 related to locating shared libraries.  Check the file 'config.log'
12690 for the exact reason." "$LINENO" 5
12691 fi
12692 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12693   conftest.$ac_objext conftest.beam conftest.$ac_ext
12694 fi
12695
12696
12697 # --------------------
12698 # Run tests below here
12699 # --------------------
12700
12701 # Force use of our snprintf if system's doesn't do arg control
12702 # See comment above at snprintf test for details.
12703 if test "$enable_nls" = yes -a "$pgac_need_repl_snprintf" = no; then
12704   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf supports argument control" >&5
12705 $as_echo_n "checking whether snprintf supports argument control... " >&6; }
12706 if ${pgac_cv_snprintf_arg_control+:} false; then :
12707   $as_echo_n "(cached) " >&6
12708 else
12709   if test "$cross_compiling" = yes; then :
12710   pgac_cv_snprintf_arg_control=cross
12711 else
12712   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12713 /* end confdefs.h.  */
12714 #include <stdio.h>
12715 #include <string.h>
12716
12717 int main()
12718 {
12719   char buf[100];
12720
12721   /* can it swap arguments? */
12722   snprintf(buf, 100, "%2\$d %1\$d", 3, 4);
12723   if (strcmp(buf, "4 3") != 0)
12724     return 1;
12725   return 0;
12726 }
12727 _ACEOF
12728 if ac_fn_c_try_run "$LINENO"; then :
12729   pgac_cv_snprintf_arg_control=yes
12730 else
12731   pgac_cv_snprintf_arg_control=no
12732 fi
12733 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12734   conftest.$ac_objext conftest.beam conftest.$ac_ext
12735 fi
12736
12737
12738 fi
12739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_arg_control" >&5
12740 $as_echo "$pgac_cv_snprintf_arg_control" >&6; }
12741
12742   if test $pgac_cv_snprintf_arg_control != yes ; then
12743     pgac_need_repl_snprintf=yes
12744   fi
12745 fi
12746
12747
12748
12749
12750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long int is 64 bits" >&5
12751 $as_echo_n "checking whether long int is 64 bits... " >&6; }
12752 if ${pgac_cv_type_long_int_64+:} false; then :
12753   $as_echo_n "(cached) " >&6
12754 else
12755   if test "$cross_compiling" = yes; then :
12756   # If cross-compiling, check the size reported by the compiler and
12757 # trust that the arithmetic works.
12758 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12759 /* end confdefs.h.  */
12760
12761 int
12762 main ()
12763 {
12764 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
12765 test_array [0] = 0;
12766 return test_array [0];
12767
12768   ;
12769   return 0;
12770 }
12771 _ACEOF
12772 if ac_fn_c_try_compile "$LINENO"; then :
12773   pgac_cv_type_long_int_64=yes
12774 else
12775   pgac_cv_type_long_int_64=no
12776 fi
12777 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12778 else
12779   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12780 /* end confdefs.h.  */
12781 typedef long int ac_int64;
12782
12783 /*
12784  * These are globals to discourage the compiler from folding all the
12785  * arithmetic tests down to compile-time constants.
12786  */
12787 ac_int64 a = 20000001;
12788 ac_int64 b = 40000005;
12789
12790 int does_int64_work()
12791 {
12792   ac_int64 c,d;
12793
12794   if (sizeof(ac_int64) != 8)
12795     return 0;                   /* definitely not the right size */
12796
12797   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
12798   c = a * b;
12799   d = (c + b) / b;
12800   if (d != a+1)
12801     return 0;
12802   return 1;
12803 }
12804 main() {
12805   exit(! does_int64_work());
12806 }
12807 _ACEOF
12808 if ac_fn_c_try_run "$LINENO"; then :
12809   pgac_cv_type_long_int_64=yes
12810 else
12811   pgac_cv_type_long_int_64=no
12812 fi
12813 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12814   conftest.$ac_objext conftest.beam conftest.$ac_ext
12815 fi
12816
12817 fi
12818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_int_64" >&5
12819 $as_echo "$pgac_cv_type_long_int_64" >&6; }
12820
12821 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
12822 if test x"$pgac_cv_type_long_int_64" = xyes ; then
12823
12824 $as_echo "#define HAVE_LONG_INT_64 1" >>confdefs.h
12825
12826 fi
12827
12828
12829 if test x"$HAVE_LONG_INT_64" = x"yes" ; then
12830   pg_int64_type="long int"
12831 else
12832   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long long int is 64 bits" >&5
12833 $as_echo_n "checking whether long long int is 64 bits... " >&6; }
12834 if ${pgac_cv_type_long_long_int_64+:} false; then :
12835   $as_echo_n "(cached) " >&6
12836 else
12837   if test "$cross_compiling" = yes; then :
12838   # If cross-compiling, check the size reported by the compiler and
12839 # trust that the arithmetic works.
12840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12841 /* end confdefs.h.  */
12842
12843 int
12844 main ()
12845 {
12846 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
12847 test_array [0] = 0;
12848 return test_array [0];
12849
12850   ;
12851   return 0;
12852 }
12853 _ACEOF
12854 if ac_fn_c_try_compile "$LINENO"; then :
12855   pgac_cv_type_long_long_int_64=yes
12856 else
12857   pgac_cv_type_long_long_int_64=no
12858 fi
12859 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12860 else
12861   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12862 /* end confdefs.h.  */
12863 typedef long long int ac_int64;
12864
12865 /*
12866  * These are globals to discourage the compiler from folding all the
12867  * arithmetic tests down to compile-time constants.
12868  */
12869 ac_int64 a = 20000001;
12870 ac_int64 b = 40000005;
12871
12872 int does_int64_work()
12873 {
12874   ac_int64 c,d;
12875
12876   if (sizeof(ac_int64) != 8)
12877     return 0;                   /* definitely not the right size */
12878
12879   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
12880   c = a * b;
12881   d = (c + b) / b;
12882   if (d != a+1)
12883     return 0;
12884   return 1;
12885 }
12886 main() {
12887   exit(! does_int64_work());
12888 }
12889 _ACEOF
12890 if ac_fn_c_try_run "$LINENO"; then :
12891   pgac_cv_type_long_long_int_64=yes
12892 else
12893   pgac_cv_type_long_long_int_64=no
12894 fi
12895 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12896   conftest.$ac_objext conftest.beam conftest.$ac_ext
12897 fi
12898
12899 fi
12900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_long_int_64" >&5
12901 $as_echo "$pgac_cv_type_long_long_int_64" >&6; }
12902
12903 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
12904 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
12905
12906 $as_echo "#define HAVE_LONG_LONG_INT_64 1" >>confdefs.h
12907
12908 fi
12909
12910   if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
12911     pg_int64_type="long long int"
12912   else
12913     as_fn_error $? "Cannot find a working 64-bit integer type." "$LINENO" 5
12914   fi
12915 fi
12916
12917
12918 cat >>confdefs.h <<_ACEOF
12919 #define PG_INT64_TYPE $pg_int64_type
12920 _ACEOF
12921
12922
12923
12924 if test x"$HAVE_LONG_LONG_INT_64" = xyes ; then
12925   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12926 /* end confdefs.h.  */
12927
12928 #define INT64CONST(x)  x##LL
12929 long long int foo = INT64CONST(0x1234567890123456);
12930
12931 int
12932 main ()
12933 {
12934
12935   ;
12936   return 0;
12937 }
12938 _ACEOF
12939 if ac_fn_c_try_compile "$LINENO"; then :
12940
12941 $as_echo "#define HAVE_LL_CONSTANTS 1" >>confdefs.h
12942
12943 fi
12944 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12945 fi
12946
12947
12948 # If we found "long int" is 64 bits, assume snprintf handles it.  If
12949 # we found we need to use "long long int", better check.  We cope with
12950 # snprintfs that use %lld, %qd, or %I64d as the format.  If none of these
12951 # work, fall back to our own snprintf emulation (which we know uses %lld).
12952
12953 if test "$HAVE_LONG_LONG_INT_64" = yes ; then
12954   if test $pgac_need_repl_snprintf = no; then
12955     { $as_echo "$as_me:${as_lineno-$LINENO}: checking snprintf format for long long int" >&5
12956 $as_echo_n "checking snprintf format for long long int... " >&6; }
12957 if ${pgac_cv_snprintf_long_long_int_format+:} false; then :
12958   $as_echo_n "(cached) " >&6
12959 else
12960   for pgac_format in '%lld' '%qd' '%I64d'; do
12961 if test "$cross_compiling" = yes; then :
12962   pgac_cv_snprintf_long_long_int_format=cross; break
12963 else
12964   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12965 /* end confdefs.h.  */
12966 #include <stdio.h>
12967 typedef long long int ac_int64;
12968 #define INT64_FORMAT "$pgac_format"
12969
12970 ac_int64 a = 20000001;
12971 ac_int64 b = 40000005;
12972
12973 int does_int64_snprintf_work()
12974 {
12975   ac_int64 c;
12976   char buf[100];
12977
12978   if (sizeof(ac_int64) != 8)
12979     return 0;                   /* doesn't look like the right size */
12980
12981   c = a * b;
12982   snprintf(buf, 100, INT64_FORMAT, c);
12983   if (strcmp(buf, "800000140000005") != 0)
12984     return 0;                   /* either multiply or snprintf is busted */
12985   return 1;
12986 }
12987 main() {
12988   exit(! does_int64_snprintf_work());
12989 }
12990 _ACEOF
12991 if ac_fn_c_try_run "$LINENO"; then :
12992   pgac_cv_snprintf_long_long_int_format=$pgac_format; break
12993 fi
12994 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12995   conftest.$ac_objext conftest.beam conftest.$ac_ext
12996 fi
12997
12998 done
12999 fi
13000
13001 LONG_LONG_INT_FORMAT=''
13002
13003 case $pgac_cv_snprintf_long_long_int_format in
13004   cross) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot test (not on host machine)" >&5
13005 $as_echo "cannot test (not on host machine)" >&6; };;
13006   ?*)    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_long_long_int_format" >&5
13007 $as_echo "$pgac_cv_snprintf_long_long_int_format" >&6; }
13008          LONG_LONG_INT_FORMAT=$pgac_cv_snprintf_long_long_int_format;;
13009   *)     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13010 $as_echo "none" >&6; };;
13011 esac
13012     if test "$LONG_LONG_INT_FORMAT" = ""; then
13013       # Force usage of our own snprintf, since system snprintf is broken
13014       pgac_need_repl_snprintf=yes
13015       LONG_LONG_INT_FORMAT='%lld'
13016     fi
13017   else
13018     # Here if we previously decided we needed to use our own snprintf
13019     LONG_LONG_INT_FORMAT='%lld'
13020   fi
13021   LONG_LONG_UINT_FORMAT=`echo "$LONG_LONG_INT_FORMAT" | sed 's/d$/u/'`
13022   INT64_FORMAT="\"$LONG_LONG_INT_FORMAT\""
13023   UINT64_FORMAT="\"$LONG_LONG_UINT_FORMAT\""
13024 else
13025   # Here if we are not using 'long long int' at all
13026   INT64_FORMAT='"%ld"'
13027   UINT64_FORMAT='"%lu"'
13028 fi
13029
13030
13031 cat >>confdefs.h <<_ACEOF
13032 #define INT64_FORMAT $INT64_FORMAT
13033 _ACEOF
13034
13035
13036
13037 cat >>confdefs.h <<_ACEOF
13038 #define UINT64_FORMAT $UINT64_FORMAT
13039 _ACEOF
13040
13041
13042 # Also force use of our snprintf if the system's doesn't support the %z flag.
13043 if test "$pgac_need_repl_snprintf" = no; then
13044   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf supports the %z modifier" >&5
13045 $as_echo_n "checking whether snprintf supports the %z modifier... " >&6; }
13046 if ${pgac_cv_snprintf_size_t_support+:} false; then :
13047   $as_echo_n "(cached) " >&6
13048 else
13049   if test "$cross_compiling" = yes; then :
13050   pgac_cv_snprintf_size_t_support=cross
13051 else
13052   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13053 /* end confdefs.h.  */
13054 #include <stdio.h>
13055 #include <string.h>
13056
13057 int main()
13058 {
13059   char bufz[100];
13060   char buf64[100];
13061
13062   /*
13063    * Print the largest unsigned number fitting in a size_t using both %zu
13064    * and the previously-determined format for 64-bit integers.  Note that
13065    * we don't run this code unless we know snprintf handles 64-bit ints.
13066    */
13067   bufz[0] = '\0';  /* in case snprintf fails to emit anything */
13068   snprintf(bufz, sizeof(bufz), "%zu", ~((size_t) 0));
13069   snprintf(buf64, sizeof(buf64), UINT64_FORMAT, (PG_INT64_TYPE) ~((size_t) 0));
13070   if (strcmp(bufz, buf64) != 0)
13071     return 1;
13072   return 0;
13073 }
13074 _ACEOF
13075 if ac_fn_c_try_run "$LINENO"; then :
13076   pgac_cv_snprintf_size_t_support=yes
13077 else
13078   pgac_cv_snprintf_size_t_support=no
13079 fi
13080 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13081   conftest.$ac_objext conftest.beam conftest.$ac_ext
13082 fi
13083
13084
13085 fi
13086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_size_t_support" >&5
13087 $as_echo "$pgac_cv_snprintf_size_t_support" >&6; }
13088
13089   if test "$pgac_cv_snprintf_size_t_support" != yes; then
13090     pgac_need_repl_snprintf=yes
13091   fi
13092 fi
13093
13094 # Now we have checked all the reasons to replace snprintf
13095 if test $pgac_need_repl_snprintf = yes; then
13096
13097 $as_echo "#define USE_REPL_SNPRINTF 1" >>confdefs.h
13098
13099   case " $LIBOBJS " in
13100   *" snprintf.$ac_objext "* ) ;;
13101   *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
13102  ;;
13103 esac
13104
13105 fi
13106
13107 # Check size of void *, size_t (enables tweaks for > 32bit address space)
13108 # The cast to long int works around a bug in the HP C Compiler
13109 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13110 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13111 # This bug is HP SR number 8606223364.
13112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
13113 $as_echo_n "checking size of void *... " >&6; }
13114 if ${ac_cv_sizeof_void_p+:} false; then :
13115   $as_echo_n "(cached) " >&6
13116 else
13117   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p"        "$ac_includes_default"; then :
13118
13119 else
13120   if test "$ac_cv_type_void_p" = yes; then
13121      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13122 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13123 as_fn_error 77 "cannot compute sizeof (void *)
13124 See \`config.log' for more details" "$LINENO" 5; }
13125    else
13126      ac_cv_sizeof_void_p=0
13127    fi
13128 fi
13129
13130 fi
13131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
13132 $as_echo "$ac_cv_sizeof_void_p" >&6; }
13133
13134
13135
13136 cat >>confdefs.h <<_ACEOF
13137 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
13138 _ACEOF
13139
13140
13141 # The cast to long int works around a bug in the HP C Compiler
13142 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13143 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13144 # This bug is HP SR number 8606223364.
13145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
13146 $as_echo_n "checking size of size_t... " >&6; }
13147 if ${ac_cv_sizeof_size_t+:} false; then :
13148   $as_echo_n "(cached) " >&6
13149 else
13150   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t"        "$ac_includes_default"; then :
13151
13152 else
13153   if test "$ac_cv_type_size_t" = yes; then
13154      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13155 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13156 as_fn_error 77 "cannot compute sizeof (size_t)
13157 See \`config.log' for more details" "$LINENO" 5; }
13158    else
13159      ac_cv_sizeof_size_t=0
13160    fi
13161 fi
13162
13163 fi
13164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
13165 $as_echo "$ac_cv_sizeof_size_t" >&6; }
13166
13167
13168
13169 cat >>confdefs.h <<_ACEOF
13170 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
13171 _ACEOF
13172
13173
13174 # The cast to long int works around a bug in the HP C Compiler
13175 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13176 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13177 # This bug is HP SR number 8606223364.
13178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
13179 $as_echo_n "checking size of long... " >&6; }
13180 if ${ac_cv_sizeof_long+:} false; then :
13181   $as_echo_n "(cached) " >&6
13182 else
13183   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
13184
13185 else
13186   if test "$ac_cv_type_long" = yes; then
13187      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13188 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13189 as_fn_error 77 "cannot compute sizeof (long)
13190 See \`config.log' for more details" "$LINENO" 5; }
13191    else
13192      ac_cv_sizeof_long=0
13193    fi
13194 fi
13195
13196 fi
13197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
13198 $as_echo "$ac_cv_sizeof_long" >&6; }
13199
13200
13201
13202 cat >>confdefs.h <<_ACEOF
13203 #define SIZEOF_LONG $ac_cv_sizeof_long
13204 _ACEOF
13205
13206
13207
13208 # Decide whether float4 is passed by value: user-selectable, enabled by default
13209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float4 passed by value" >&5
13210 $as_echo_n "checking whether to build with float4 passed by value... " >&6; }
13211
13212
13213 # Check whether --enable-float4-byval was given.
13214 if test "${enable_float4_byval+set}" = set; then :
13215   enableval=$enable_float4_byval;
13216   case $enableval in
13217     yes)
13218
13219 $as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
13220
13221                float4passbyval=true
13222       ;;
13223     no)
13224       float4passbyval=false
13225       ;;
13226     *)
13227       as_fn_error $? "no argument expected for --enable-float4-byval option" "$LINENO" 5
13228       ;;
13229   esac
13230
13231 else
13232   enable_float4_byval=yes
13233
13234 $as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
13235
13236                float4passbyval=true
13237 fi
13238
13239
13240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float4_byval" >&5
13241 $as_echo "$enable_float4_byval" >&6; }
13242
13243 cat >>confdefs.h <<_ACEOF
13244 #define FLOAT4PASSBYVAL $float4passbyval
13245 _ACEOF
13246
13247
13248 # Decide whether float8 is passed by value.
13249 # Note: this setting also controls int8 and related types such as timestamp.
13250 # If sizeof(Datum) >= 8, this is user-selectable, enabled by default.
13251 # If not, trying to select it is an error.
13252 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float8 passed by value" >&5
13253 $as_echo_n "checking whether to build with float8 passed by value... " >&6; }
13254 if test $ac_cv_sizeof_void_p -ge 8 ; then
13255
13256
13257 # Check whether --enable-float8-byval was given.
13258 if test "${enable_float8_byval+set}" = set; then :
13259   enableval=$enable_float8_byval;
13260   case $enableval in
13261     yes)
13262       :
13263       ;;
13264     no)
13265       :
13266       ;;
13267     *)
13268       as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
13269       ;;
13270   esac
13271
13272 else
13273   enable_float8_byval=yes
13274
13275 fi
13276
13277
13278 else
13279
13280
13281 # Check whether --enable-float8-byval was given.
13282 if test "${enable_float8_byval+set}" = set; then :
13283   enableval=$enable_float8_byval;
13284   case $enableval in
13285     yes)
13286       :
13287       ;;
13288     no)
13289       :
13290       ;;
13291     *)
13292       as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
13293       ;;
13294   esac
13295
13296 else
13297   enable_float8_byval=no
13298
13299 fi
13300
13301
13302   if test "$enable_float8_byval" = yes ; then
13303     as_fn_error $? "--enable-float8-byval is not supported on 32-bit platforms." "$LINENO" 5
13304   fi
13305 fi
13306 if test "$enable_float8_byval" = yes ; then
13307
13308 $as_echo "#define USE_FLOAT8_BYVAL 1" >>confdefs.h
13309
13310   float8passbyval=true
13311 else
13312   float8passbyval=false
13313 fi
13314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float8_byval" >&5
13315 $as_echo "$enable_float8_byval" >&6; }
13316
13317 cat >>confdefs.h <<_ACEOF
13318 #define FLOAT8PASSBYVAL $float8passbyval
13319 _ACEOF
13320
13321
13322 # Determine memory alignment requirements for the basic C data types.
13323
13324 # The cast to long int works around a bug in the HP C Compiler,
13325 # see AC_CHECK_SIZEOF for more information.
13326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of short" >&5
13327 $as_echo_n "checking alignment of short... " >&6; }
13328 if ${ac_cv_alignof_short+:} false; then :
13329   $as_echo_n "(cached) " >&6
13330 else
13331   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_short"        "$ac_includes_default
13332 #ifndef offsetof
13333 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
13334 #endif
13335 typedef struct { char x; short y; } ac__type_alignof_;"; then :
13336
13337 else
13338   if test "$ac_cv_type_short" = 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 alignment of short
13342 See \`config.log' for more details" "$LINENO" 5; }
13343    else
13344      ac_cv_alignof_short=0
13345    fi
13346 fi
13347
13348 fi
13349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_short" >&5
13350 $as_echo "$ac_cv_alignof_short" >&6; }
13351
13352
13353
13354 cat >>confdefs.h <<_ACEOF
13355 #define ALIGNOF_SHORT $ac_cv_alignof_short
13356 _ACEOF
13357
13358
13359 # The cast to long int works around a bug in the HP C Compiler,
13360 # see AC_CHECK_SIZEOF for more information.
13361 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of int" >&5
13362 $as_echo_n "checking alignment of int... " >&6; }
13363 if ${ac_cv_alignof_int+:} false; then :
13364   $as_echo_n "(cached) " >&6
13365 else
13366   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_int"        "$ac_includes_default
13367 #ifndef offsetof
13368 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
13369 #endif
13370 typedef struct { char x; int y; } ac__type_alignof_;"; then :
13371
13372 else
13373   if test "$ac_cv_type_int" = yes; then
13374      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13375 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13376 as_fn_error 77 "cannot compute alignment of int
13377 See \`config.log' for more details" "$LINENO" 5; }
13378    else
13379      ac_cv_alignof_int=0
13380    fi
13381 fi
13382
13383 fi
13384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_int" >&5
13385 $as_echo "$ac_cv_alignof_int" >&6; }
13386
13387
13388
13389 cat >>confdefs.h <<_ACEOF
13390 #define ALIGNOF_INT $ac_cv_alignof_int
13391 _ACEOF
13392
13393
13394 # The cast to long int works around a bug in the HP C Compiler,
13395 # see AC_CHECK_SIZEOF for more information.
13396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long" >&5
13397 $as_echo_n "checking alignment of long... " >&6; }
13398 if ${ac_cv_alignof_long+:} false; then :
13399   $as_echo_n "(cached) " >&6
13400 else
13401   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long"        "$ac_includes_default
13402 #ifndef offsetof
13403 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
13404 #endif
13405 typedef struct { char x; long y; } ac__type_alignof_;"; then :
13406
13407 else
13408   if test "$ac_cv_type_long" = yes; then
13409      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13410 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13411 as_fn_error 77 "cannot compute alignment of long
13412 See \`config.log' for more details" "$LINENO" 5; }
13413    else
13414      ac_cv_alignof_long=0
13415    fi
13416 fi
13417
13418 fi
13419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long" >&5
13420 $as_echo "$ac_cv_alignof_long" >&6; }
13421
13422
13423
13424 cat >>confdefs.h <<_ACEOF
13425 #define ALIGNOF_LONG $ac_cv_alignof_long
13426 _ACEOF
13427
13428
13429 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
13430   # The cast to long int works around a bug in the HP C Compiler,
13431 # see AC_CHECK_SIZEOF for more information.
13432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long long int" >&5
13433 $as_echo_n "checking alignment of long long int... " >&6; }
13434 if ${ac_cv_alignof_long_long_int+:} false; then :
13435   $as_echo_n "(cached) " >&6
13436 else
13437   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long_long_int"        "$ac_includes_default
13438 #ifndef offsetof
13439 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
13440 #endif
13441 typedef struct { char x; long long int y; } ac__type_alignof_;"; then :
13442
13443 else
13444   if test "$ac_cv_type_long_long_int" = yes; then
13445      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13446 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13447 as_fn_error 77 "cannot compute alignment of long long int
13448 See \`config.log' for more details" "$LINENO" 5; }
13449    else
13450      ac_cv_alignof_long_long_int=0
13451    fi
13452 fi
13453
13454 fi
13455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long_long_int" >&5
13456 $as_echo "$ac_cv_alignof_long_long_int" >&6; }
13457
13458
13459
13460 cat >>confdefs.h <<_ACEOF
13461 #define ALIGNOF_LONG_LONG_INT $ac_cv_alignof_long_long_int
13462 _ACEOF
13463
13464
13465 fi
13466 # The cast to long int works around a bug in the HP C Compiler,
13467 # see AC_CHECK_SIZEOF for more information.
13468 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of double" >&5
13469 $as_echo_n "checking alignment of double... " >&6; }
13470 if ${ac_cv_alignof_double+:} false; then :
13471   $as_echo_n "(cached) " >&6
13472 else
13473   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_double"        "$ac_includes_default
13474 #ifndef offsetof
13475 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
13476 #endif
13477 typedef struct { char x; double y; } ac__type_alignof_;"; then :
13478
13479 else
13480   if test "$ac_cv_type_double" = yes; then
13481      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13482 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13483 as_fn_error 77 "cannot compute alignment of double
13484 See \`config.log' for more details" "$LINENO" 5; }
13485    else
13486      ac_cv_alignof_double=0
13487    fi
13488 fi
13489
13490 fi
13491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_double" >&5
13492 $as_echo "$ac_cv_alignof_double" >&6; }
13493
13494
13495
13496 cat >>confdefs.h <<_ACEOF
13497 #define ALIGNOF_DOUBLE $ac_cv_alignof_double
13498 _ACEOF
13499
13500
13501
13502 # Compute maximum alignment of any basic type.
13503 # We assume long's alignment is at least as strong as char, short, or int;
13504 # but we must check long long (if it exists) and double.
13505
13506 MAX_ALIGNOF=$ac_cv_alignof_long
13507 if test $MAX_ALIGNOF -lt $ac_cv_alignof_double ; then
13508   MAX_ALIGNOF=$ac_cv_alignof_double
13509 fi
13510 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $ac_cv_alignof_long_long_int ; then
13511   MAX_ALIGNOF="$ac_cv_alignof_long_long_int"
13512 fi
13513
13514 cat >>confdefs.h <<_ACEOF
13515 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
13516 _ACEOF
13517
13518
13519
13520 # Some platforms predefine the types int8, int16, etc.  Only check
13521 # a (hopefully) representative subset.
13522 ac_fn_c_check_type "$LINENO" "int8" "ac_cv_type_int8" "#include <stdio.h>
13523 "
13524 if test "x$ac_cv_type_int8" = xyes; then :
13525
13526 cat >>confdefs.h <<_ACEOF
13527 #define HAVE_INT8 1
13528 _ACEOF
13529
13530
13531 fi
13532 ac_fn_c_check_type "$LINENO" "uint8" "ac_cv_type_uint8" "#include <stdio.h>
13533 "
13534 if test "x$ac_cv_type_uint8" = xyes; then :
13535
13536 cat >>confdefs.h <<_ACEOF
13537 #define HAVE_UINT8 1
13538 _ACEOF
13539
13540
13541 fi
13542 ac_fn_c_check_type "$LINENO" "int64" "ac_cv_type_int64" "#include <stdio.h>
13543 "
13544 if test "x$ac_cv_type_int64" = xyes; then :
13545
13546 cat >>confdefs.h <<_ACEOF
13547 #define HAVE_INT64 1
13548 _ACEOF
13549
13550
13551 fi
13552 ac_fn_c_check_type "$LINENO" "uint64" "ac_cv_type_uint64" "#include <stdio.h>
13553 "
13554 if test "x$ac_cv_type_uint64" = xyes; then :
13555
13556 cat >>confdefs.h <<_ACEOF
13557 #define HAVE_UINT64 1
13558 _ACEOF
13559
13560
13561 fi
13562
13563
13564 # We also check for sig_atomic_t, which *should* be defined per ANSI
13565 # C, but is missing on some old platforms.
13566 ac_fn_c_check_type "$LINENO" "sig_atomic_t" "ac_cv_type_sig_atomic_t" "#include <signal.h>
13567 "
13568 if test "x$ac_cv_type_sig_atomic_t" = xyes; then :
13569
13570 cat >>confdefs.h <<_ACEOF
13571 #define HAVE_SIG_ATOMIC_T 1
13572 _ACEOF
13573
13574
13575 fi
13576
13577
13578
13579 if test "$PORTNAME" != "win32"
13580 then
13581 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for POSIX signal interface" >&5
13582 $as_echo_n "checking for POSIX signal interface... " >&6; }
13583 if ${pgac_cv_func_posix_signals+:} false; then :
13584   $as_echo_n "(cached) " >&6
13585 else
13586   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13587 /* end confdefs.h.  */
13588 #include <signal.h>
13589
13590 int
13591 main ()
13592 {
13593 struct sigaction act, oact;
13594 sigemptyset(&act.sa_mask);
13595 act.sa_flags = SA_RESTART;
13596 sigaction(0, &act, &oact);
13597   ;
13598   return 0;
13599 }
13600 _ACEOF
13601 if ac_fn_c_try_link "$LINENO"; then :
13602   pgac_cv_func_posix_signals=yes
13603 else
13604   pgac_cv_func_posix_signals=no
13605 fi
13606 rm -f core conftest.err conftest.$ac_objext \
13607     conftest$ac_exeext conftest.$ac_ext
13608 fi
13609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_posix_signals" >&5
13610 $as_echo "$pgac_cv_func_posix_signals" >&6; }
13611 if test x"$pgac_cv_func_posix_signals" = xyes ; then
13612
13613 $as_echo "#define HAVE_POSIX_SIGNALS 1" >>confdefs.h
13614
13615 fi
13616 HAVE_POSIX_SIGNALS=$pgac_cv_func_posix_signals
13617
13618 if test "$pgac_cv_func_posix_signals" != yes -a "$enable_thread_safety" = yes; then
13619   as_fn_error $? "
13620 Thread-safety requires POSIX signals, which are not supported by this
13621 operating system;  use --disable-thread-safety to disable thread safety." "$LINENO" 5
13622 fi
13623 fi
13624
13625
13626 # Select semaphore implementation type.
13627 if test "$PORTNAME" != "win32"; then
13628   if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
13629
13630 $as_echo "#define USE_NAMED_POSIX_SEMAPHORES 1" >>confdefs.h
13631
13632     SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
13633   else
13634     if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
13635
13636 $as_echo "#define USE_UNNAMED_POSIX_SEMAPHORES 1" >>confdefs.h
13637
13638       SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
13639     else
13640
13641 $as_echo "#define USE_SYSV_SEMAPHORES 1" >>confdefs.h
13642
13643       SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
13644     fi
13645   fi
13646 else
13647
13648 $as_echo "#define USE_WIN32_SEMAPHORES 1" >>confdefs.h
13649
13650   SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
13651 fi
13652
13653
13654 # Select shared-memory implementation type.
13655 if test "$PORTNAME" != "win32"; then
13656
13657 $as_echo "#define USE_SYSV_SHARED_MEMORY 1" >>confdefs.h
13658
13659   SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
13660 else
13661
13662 $as_echo "#define USE_WIN32_SHARED_MEMORY 1" >>confdefs.h
13663
13664   SHMEM_IMPLEMENTATION="src/backend/port/win32_shmem.c"
13665 fi
13666
13667 # Select latch implementation type.
13668 if test "$PORTNAME" != "win32"; then
13669   LATCH_IMPLEMENTATION="src/backend/port/unix_latch.c"
13670 else
13671   LATCH_IMPLEMENTATION="src/backend/port/win32_latch.c"
13672 fi
13673
13674 # If not set in template file, set bytes to use libc memset()
13675 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
13676   MEMSET_LOOP_LIMIT=1024
13677 fi
13678
13679 cat >>confdefs.h <<_ACEOF
13680 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
13681 _ACEOF
13682
13683
13684
13685 if test "$enable_nls" = yes ; then
13686
13687   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bind_textdomain_codeset" >&5
13688 $as_echo_n "checking for library containing bind_textdomain_codeset... " >&6; }
13689 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
13690   $as_echo_n "(cached) " >&6
13691 else
13692   ac_func_search_save_LIBS=$LIBS
13693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13694 /* end confdefs.h.  */
13695
13696 /* Override any GCC internal prototype to avoid an error.
13697    Use char because int might match the return type of a GCC
13698    builtin and then its argument prototype would still apply.  */
13699 #ifdef __cplusplus
13700 extern "C"
13701 #endif
13702 char bind_textdomain_codeset ();
13703 int
13704 main ()
13705 {
13706 return bind_textdomain_codeset ();
13707   ;
13708   return 0;
13709 }
13710 _ACEOF
13711 for ac_lib in '' intl; do
13712   if test -z "$ac_lib"; then
13713     ac_res="none required"
13714   else
13715     ac_res=-l$ac_lib
13716     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
13717   fi
13718   if ac_fn_c_try_link "$LINENO"; then :
13719   ac_cv_search_bind_textdomain_codeset=$ac_res
13720 fi
13721 rm -f core conftest.err conftest.$ac_objext \
13722     conftest$ac_exeext
13723   if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
13724   break
13725 fi
13726 done
13727 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
13728
13729 else
13730   ac_cv_search_bind_textdomain_codeset=no
13731 fi
13732 rm conftest.$ac_ext
13733 LIBS=$ac_func_search_save_LIBS
13734 fi
13735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bind_textdomain_codeset" >&5
13736 $as_echo "$ac_cv_search_bind_textdomain_codeset" >&6; }
13737 ac_res=$ac_cv_search_bind_textdomain_codeset
13738 if test "$ac_res" != no; then :
13739   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13740
13741 else
13742   as_fn_error $? "a gettext implementation is required for NLS" "$LINENO" 5
13743 fi
13744
13745   ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
13746 if test "x$ac_cv_header_libintl_h" = xyes; then :
13747
13748 else
13749   as_fn_error $? "header file <libintl.h> is required for NLS" "$LINENO" 5
13750 fi
13751
13752
13753   for ac_prog in msgfmt
13754 do
13755   # Extract the first word of "$ac_prog", so it can be a program name with args.
13756 set dummy $ac_prog; ac_word=$2
13757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13758 $as_echo_n "checking for $ac_word... " >&6; }
13759 if ${ac_cv_prog_MSGFMT+:} false; then :
13760   $as_echo_n "(cached) " >&6
13761 else
13762   if test -n "$MSGFMT"; then
13763   ac_cv_prog_MSGFMT="$MSGFMT" # Let the user override the test.
13764 else
13765 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13766 for as_dir in $PATH
13767 do
13768   IFS=$as_save_IFS
13769   test -z "$as_dir" && as_dir=.
13770     for ac_exec_ext in '' $ac_executable_extensions; do
13771   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13772     ac_cv_prog_MSGFMT="$ac_prog"
13773     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13774     break 2
13775   fi
13776 done
13777   done
13778 IFS=$as_save_IFS
13779
13780 fi
13781 fi
13782 MSGFMT=$ac_cv_prog_MSGFMT
13783 if test -n "$MSGFMT"; then
13784   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
13785 $as_echo "$MSGFMT" >&6; }
13786 else
13787   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13788 $as_echo "no" >&6; }
13789 fi
13790
13791
13792   test -n "$MSGFMT" && break
13793 done
13794
13795   if test -z "$MSGFMT"; then
13796     as_fn_error $? "msgfmt is required for NLS" "$LINENO" 5
13797   fi
13798   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msgfmt flags" >&5
13799 $as_echo_n "checking for msgfmt flags... " >&6; }
13800 if ${pgac_cv_msgfmt_flags+:} false; then :
13801   $as_echo_n "(cached) " >&6
13802 else
13803   if test x"$MSGFMT" != x"" && "$MSGFMT" --version 2>&1 | grep "GNU" >/dev/null; then
13804     pgac_cv_msgfmt_flags=-c
13805 fi
13806 fi
13807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_msgfmt_flags" >&5
13808 $as_echo "$pgac_cv_msgfmt_flags" >&6; }
13809   MSGFMT_FLAGS=$pgac_cv_msgfmt_flags
13810
13811   for ac_prog in msgmerge
13812 do
13813   # Extract the first word of "$ac_prog", so it can be a program name with args.
13814 set dummy $ac_prog; ac_word=$2
13815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13816 $as_echo_n "checking for $ac_word... " >&6; }
13817 if ${ac_cv_prog_MSGMERGE+:} false; then :
13818   $as_echo_n "(cached) " >&6
13819 else
13820   if test -n "$MSGMERGE"; then
13821   ac_cv_prog_MSGMERGE="$MSGMERGE" # Let the user override the test.
13822 else
13823 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13824 for as_dir in $PATH
13825 do
13826   IFS=$as_save_IFS
13827   test -z "$as_dir" && as_dir=.
13828     for ac_exec_ext in '' $ac_executable_extensions; do
13829   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13830     ac_cv_prog_MSGMERGE="$ac_prog"
13831     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13832     break 2
13833   fi
13834 done
13835   done
13836 IFS=$as_save_IFS
13837
13838 fi
13839 fi
13840 MSGMERGE=$ac_cv_prog_MSGMERGE
13841 if test -n "$MSGMERGE"; then
13842   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
13843 $as_echo "$MSGMERGE" >&6; }
13844 else
13845   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13846 $as_echo "no" >&6; }
13847 fi
13848
13849
13850   test -n "$MSGMERGE" && break
13851 done
13852
13853   for ac_prog in xgettext
13854 do
13855   # Extract the first word of "$ac_prog", so it can be a program name with args.
13856 set dummy $ac_prog; ac_word=$2
13857 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13858 $as_echo_n "checking for $ac_word... " >&6; }
13859 if ${ac_cv_prog_XGETTEXT+:} false; then :
13860   $as_echo_n "(cached) " >&6
13861 else
13862   if test -n "$XGETTEXT"; then
13863   ac_cv_prog_XGETTEXT="$XGETTEXT" # Let the user override the test.
13864 else
13865 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13866 for as_dir in $PATH
13867 do
13868   IFS=$as_save_IFS
13869   test -z "$as_dir" && as_dir=.
13870     for ac_exec_ext in '' $ac_executable_extensions; do
13871   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13872     ac_cv_prog_XGETTEXT="$ac_prog"
13873     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13874     break 2
13875   fi
13876 done
13877   done
13878 IFS=$as_save_IFS
13879
13880 fi
13881 fi
13882 XGETTEXT=$ac_cv_prog_XGETTEXT
13883 if test -n "$XGETTEXT"; then
13884   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
13885 $as_echo "$XGETTEXT" >&6; }
13886 else
13887   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13888 $as_echo "no" >&6; }
13889 fi
13890
13891
13892   test -n "$XGETTEXT" && break
13893 done
13894
13895
13896 fi
13897
13898 # Check for Tcl configuration script tclConfig.sh
13899 if test "$with_tcl" = yes; then
13900     for ac_prog in tclsh tcl tclsh8.6 tclsh86 tclsh8.5 tclsh85 tclsh8.4 tclsh84 tclsh8.3 tclsh83
13901 do
13902   # Extract the first word of "$ac_prog", so it can be a program name with args.
13903 set dummy $ac_prog; ac_word=$2
13904 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13905 $as_echo_n "checking for $ac_word... " >&6; }
13906 if ${ac_cv_path_TCLSH+:} false; then :
13907   $as_echo_n "(cached) " >&6
13908 else
13909   case $TCLSH in
13910   [\\/]* | ?:[\\/]*)
13911   ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
13912   ;;
13913   *)
13914   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13915 for as_dir in $PATH
13916 do
13917   IFS=$as_save_IFS
13918   test -z "$as_dir" && as_dir=.
13919     for ac_exec_ext in '' $ac_executable_extensions; do
13920   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13921     ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
13922     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13923     break 2
13924   fi
13925 done
13926   done
13927 IFS=$as_save_IFS
13928
13929   ;;
13930 esac
13931 fi
13932 TCLSH=$ac_cv_path_TCLSH
13933 if test -n "$TCLSH"; then
13934   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
13935 $as_echo "$TCLSH" >&6; }
13936 else
13937   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13938 $as_echo "no" >&6; }
13939 fi
13940
13941
13942   test -n "$TCLSH" && break
13943 done
13944
13945 if test x"$TCLSH" = x""; then
13946   as_fn_error $? "Tcl shell not found" "$LINENO" 5
13947 fi
13948
13949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclConfig.sh" >&5
13950 $as_echo_n "checking for tclConfig.sh... " >&6; }
13951 # Let user override test
13952 if test -z "$TCL_CONFIG_SH"; then
13953     pgac_test_dirs="$with_tclconfig"
13954
13955     set X $pgac_test_dirs; shift
13956     if test $# -eq 0; then
13957         test -z "$TCLSH" && as_fn_error $? "unable to locate tclConfig.sh because no Tcl shell was found" "$LINENO" 5
13958         set X `echo 'puts $auto_path' | $TCLSH`; shift
13959     fi
13960
13961     for pgac_dir do
13962         if test -r "$pgac_dir/tclConfig.sh"; then
13963             TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
13964             break
13965         fi
13966     done
13967 fi
13968
13969 if test -z "$TCL_CONFIG_SH"; then
13970     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13971 $as_echo "no" >&6; }
13972     as_fn_error $? "file 'tclConfig.sh' is required for Tcl" "$LINENO" 5
13973 else
13974     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCL_CONFIG_SH" >&5
13975 $as_echo "$TCL_CONFIG_SH" >&6; }
13976 fi
13977
13978
13979
13980     . "$TCL_CONFIG_SH"
13981 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
13982 eval TCL_LIB_FILE=\"$TCL_LIB_FILE\"
13983 eval TCL_LIBS=\"$TCL_LIBS\"
13984 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
13985 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
13986
13987         # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
13988     ac_save_CPPFLAGS=$CPPFLAGS
13989     CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
13990     ac_fn_c_check_header_mongrel "$LINENO" "tcl.h" "ac_cv_header_tcl_h" "$ac_includes_default"
13991 if test "x$ac_cv_header_tcl_h" = xyes; then :
13992
13993 else
13994   as_fn_error $? "header file <tcl.h> is required for Tcl" "$LINENO" 5
13995 fi
13996
13997
13998     CPPFLAGS=$ac_save_CPPFLAGS
13999 fi
14000
14001 # check for <perl.h>
14002 if test "$with_perl" = yes; then
14003   ac_save_CPPFLAGS=$CPPFLAGS
14004   CPPFLAGS="$CPPFLAGS -I$perl_archlibexp/CORE"
14005   ac_fn_c_check_header_compile "$LINENO" "perl.h" "ac_cv_header_perl_h" "#include <EXTERN.h>
14006 "
14007 if test "x$ac_cv_header_perl_h" = xyes; then :
14008
14009 else
14010   as_fn_error $? "header file <perl.h> is required for Perl" "$LINENO" 5
14011 fi
14012
14013
14014   # While we're at it, check that we can link to libperl.
14015   # On most platforms, if perl.h is there then libperl.so will be too, but at
14016   # this writing Debian packages them separately.  There is no known reason to
14017   # waste cycles on separate probes for the Tcl or Python libraries, though.
14018   pgac_save_LIBS=$LIBS
14019   LIBS="$perl_embed_ldflags"
14020   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libperl" >&5
14021 $as_echo_n "checking for libperl... " >&6; }
14022   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14023 /* end confdefs.h.  */
14024
14025 #include <EXTERN.h>
14026 #include <perl.h>
14027
14028 int
14029 main ()
14030 {
14031 perl_alloc();
14032   ;
14033   return 0;
14034 }
14035 _ACEOF
14036 if ac_fn_c_try_link "$LINENO"; then :
14037   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14038 $as_echo "yes" >&6; }
14039 else
14040   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14041 $as_echo "no" >&6; }
14042      as_fn_error $? "libperl library is required for Perl" "$LINENO" 5
14043 fi
14044 rm -f core conftest.err conftest.$ac_objext \
14045     conftest$ac_exeext conftest.$ac_ext
14046   LIBS=$pgac_save_LIBS
14047   CPPFLAGS=$ac_save_CPPFLAGS
14048 fi
14049
14050 # check for <Python.h>
14051 if test "$with_python" = yes; then
14052   ac_save_CPPFLAGS=$CPPFLAGS
14053   CPPFLAGS="$python_includespec $CPPFLAGS"
14054   ac_fn_c_check_header_mongrel "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default"
14055 if test "x$ac_cv_header_Python_h" = xyes; then :
14056
14057 else
14058   as_fn_error $? "header file <Python.h> is required for Python" "$LINENO" 5
14059 fi
14060
14061
14062   CPPFLAGS=$ac_save_CPPFLAGS
14063 fi
14064
14065 #
14066 # Check for DocBook and tools
14067 #
14068 for ac_prog in onsgmls nsgmls
14069 do
14070   # Extract the first word of "$ac_prog", so it can be a program name with args.
14071 set dummy $ac_prog; ac_word=$2
14072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14073 $as_echo_n "checking for $ac_word... " >&6; }
14074 if ${ac_cv_prog_NSGMLS+:} false; then :
14075   $as_echo_n "(cached) " >&6
14076 else
14077   if test -n "$NSGMLS"; then
14078   ac_cv_prog_NSGMLS="$NSGMLS" # Let the user override the test.
14079 else
14080 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14081 for as_dir in $PATH
14082 do
14083   IFS=$as_save_IFS
14084   test -z "$as_dir" && as_dir=.
14085     for ac_exec_ext in '' $ac_executable_extensions; do
14086   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14087     ac_cv_prog_NSGMLS="$ac_prog"
14088     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14089     break 2
14090   fi
14091 done
14092   done
14093 IFS=$as_save_IFS
14094
14095 fi
14096 fi
14097 NSGMLS=$ac_cv_prog_NSGMLS
14098 if test -n "$NSGMLS"; then
14099   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NSGMLS" >&5
14100 $as_echo "$NSGMLS" >&6; }
14101 else
14102   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14103 $as_echo "no" >&6; }
14104 fi
14105
14106
14107   test -n "$NSGMLS" && break
14108 done
14109
14110 for ac_prog in openjade jade
14111 do
14112   # Extract the first word of "$ac_prog", so it can be a program name with args.
14113 set dummy $ac_prog; ac_word=$2
14114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14115 $as_echo_n "checking for $ac_word... " >&6; }
14116 if ${ac_cv_prog_JADE+:} false; then :
14117   $as_echo_n "(cached) " >&6
14118 else
14119   if test -n "$JADE"; then
14120   ac_cv_prog_JADE="$JADE" # Let the user override the test.
14121 else
14122 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14123 for as_dir in $PATH
14124 do
14125   IFS=$as_save_IFS
14126   test -z "$as_dir" && as_dir=.
14127     for ac_exec_ext in '' $ac_executable_extensions; do
14128   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14129     ac_cv_prog_JADE="$ac_prog"
14130     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14131     break 2
14132   fi
14133 done
14134   done
14135 IFS=$as_save_IFS
14136
14137 fi
14138 fi
14139 JADE=$ac_cv_prog_JADE
14140 if test -n "$JADE"; then
14141   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JADE" >&5
14142 $as_echo "$JADE" >&6; }
14143 else
14144   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14145 $as_echo "no" >&6; }
14146 fi
14147
14148
14149   test -n "$JADE" && break
14150 done
14151
14152
14153 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DocBook V4.2" >&5
14154 $as_echo_n "checking for DocBook V4.2... " >&6; }
14155 if ${pgac_cv_check_docbook+:} false; then :
14156   $as_echo_n "(cached) " >&6
14157 else
14158   cat >conftest.sgml <<EOF
14159 <!doctype book PUBLIC "-//OASIS//DTD DocBook V4.2//EN">
14160 <book>
14161  <title>test</title>
14162  <chapter>
14163   <title>random</title>
14164    <sect1>
14165     <title>testsect</title>
14166     <para>text</para>
14167   </sect1>
14168  </chapter>
14169 </book>
14170 EOF
14171
14172 pgac_cv_check_docbook=no
14173
14174 if test -n "$NSGMLS"; then
14175   $NSGMLS -s conftest.sgml 1>&5 2>&1
14176   if test $? -eq 0; then
14177     pgac_cv_check_docbook=yes
14178   fi
14179 fi
14180 rm -f conftest.sgml
14181 fi
14182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_docbook" >&5
14183 $as_echo "$pgac_cv_check_docbook" >&6; }
14184
14185 have_docbook=$pgac_cv_check_docbook
14186
14187
14188 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DocBook stylesheets" >&5
14189 $as_echo_n "checking for DocBook stylesheets... " >&6; }
14190 if ${pgac_cv_path_stylesheets+:} false; then :
14191   $as_echo_n "(cached) " >&6
14192 else
14193   if test -n "$DOCBOOKSTYLE"; then
14194   pgac_cv_path_stylesheets=$DOCBOOKSTYLE
14195 else
14196   for pgac_prefix in /usr /usr/local /opt /sw; do
14197     for pgac_infix in share lib; do
14198       for pgac_postfix in \
14199         sgml/stylesheets/nwalsh-modular \
14200         sgml/stylesheets/docbook \
14201         sgml/stylesheets/dsssl/docbook \
14202         sgml/docbook-dsssl \
14203         sgml/docbook/dsssl/modular \
14204         sgml/docbook/stylesheet/dsssl/modular \
14205         sgml/docbook/dsssl-stylesheets \
14206         sgml/dsssl/docbook-dsssl-nwalsh
14207       do
14208         pgac_candidate=$pgac_prefix/$pgac_infix/$pgac_postfix
14209         if test -r "$pgac_candidate/html/docbook.dsl" \
14210            && test -r "$pgac_candidate/print/docbook.dsl"
14211         then
14212           pgac_cv_path_stylesheets=$pgac_candidate
14213           break 3
14214         fi
14215       done
14216     done
14217   done
14218 fi
14219 fi
14220
14221 DOCBOOKSTYLE=$pgac_cv_path_stylesheets
14222
14223 if test -n "$DOCBOOKSTYLE"; then
14224   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOCBOOKSTYLE" >&5
14225 $as_echo "$DOCBOOKSTYLE" >&6; }
14226 else
14227   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14228 $as_echo "no" >&6; }
14229 fi
14230 if test -n "$DOCBOOKSTYLE" -a -r "$DOCBOOKSTYLE/bin/collateindex.pl"; then
14231   COLLATEINDEX="$DOCBOOKSTYLE/bin/collateindex.pl"
14232
14233 else
14234   # Extract the first word of "collateindex.pl", so it can be a program name with args.
14235 set dummy collateindex.pl; ac_word=$2
14236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14237 $as_echo_n "checking for $ac_word... " >&6; }
14238 if ${ac_cv_path_COLLATEINDEX+:} false; then :
14239   $as_echo_n "(cached) " >&6
14240 else
14241   case $COLLATEINDEX in
14242   [\\/]* | ?:[\\/]*)
14243   ac_cv_path_COLLATEINDEX="$COLLATEINDEX" # Let the user override the test with a path.
14244   ;;
14245   *)
14246   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14247 for as_dir in $PATH
14248 do
14249   IFS=$as_save_IFS
14250   test -z "$as_dir" && as_dir=.
14251     for ac_exec_ext in '' $ac_executable_extensions; do
14252   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14253     ac_cv_path_COLLATEINDEX="$as_dir/$ac_word$ac_exec_ext"
14254     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14255     break 2
14256   fi
14257 done
14258   done
14259 IFS=$as_save_IFS
14260
14261   ;;
14262 esac
14263 fi
14264 COLLATEINDEX=$ac_cv_path_COLLATEINDEX
14265 if test -n "$COLLATEINDEX"; then
14266   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COLLATEINDEX" >&5
14267 $as_echo "$COLLATEINDEX" >&6; }
14268 else
14269   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14270 $as_echo "no" >&6; }
14271 fi
14272
14273
14274 fi
14275 for ac_prog in xsltproc
14276 do
14277   # Extract the first word of "$ac_prog", so it can be a program name with args.
14278 set dummy $ac_prog; ac_word=$2
14279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14280 $as_echo_n "checking for $ac_word... " >&6; }
14281 if ${ac_cv_prog_XSLTPROC+:} false; then :
14282   $as_echo_n "(cached) " >&6
14283 else
14284   if test -n "$XSLTPROC"; then
14285   ac_cv_prog_XSLTPROC="$XSLTPROC" # Let the user override the test.
14286 else
14287 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14288 for as_dir in $PATH
14289 do
14290   IFS=$as_save_IFS
14291   test -z "$as_dir" && as_dir=.
14292     for ac_exec_ext in '' $ac_executable_extensions; do
14293   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14294     ac_cv_prog_XSLTPROC="$ac_prog"
14295     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14296     break 2
14297   fi
14298 done
14299   done
14300 IFS=$as_save_IFS
14301
14302 fi
14303 fi
14304 XSLTPROC=$ac_cv_prog_XSLTPROC
14305 if test -n "$XSLTPROC"; then
14306   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
14307 $as_echo "$XSLTPROC" >&6; }
14308 else
14309   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14310 $as_echo "no" >&6; }
14311 fi
14312
14313
14314   test -n "$XSLTPROC" && break
14315 done
14316
14317 for ac_prog in osx sgml2xml sx
14318 do
14319   # Extract the first word of "$ac_prog", so it can be a program name with args.
14320 set dummy $ac_prog; ac_word=$2
14321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14322 $as_echo_n "checking for $ac_word... " >&6; }
14323 if ${ac_cv_prog_OSX+:} false; then :
14324   $as_echo_n "(cached) " >&6
14325 else
14326   if test -n "$OSX"; then
14327   ac_cv_prog_OSX="$OSX" # Let the user override the test.
14328 else
14329 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14330 for as_dir in $PATH
14331 do
14332   IFS=$as_save_IFS
14333   test -z "$as_dir" && as_dir=.
14334     for ac_exec_ext in '' $ac_executable_extensions; do
14335   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14336     ac_cv_prog_OSX="$ac_prog"
14337     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14338     break 2
14339   fi
14340 done
14341   done
14342 IFS=$as_save_IFS
14343
14344 fi
14345 fi
14346 OSX=$ac_cv_prog_OSX
14347 if test -n "$OSX"; then
14348   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OSX" >&5
14349 $as_echo "$OSX" >&6; }
14350 else
14351   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14352 $as_echo "no" >&6; }
14353 fi
14354
14355
14356   test -n "$OSX" && break
14357 done
14358
14359
14360 #
14361 # Check for test tools
14362 #
14363 for ac_prog in prove
14364 do
14365   # Extract the first word of "$ac_prog", so it can be a program name with args.
14366 set dummy $ac_prog; ac_word=$2
14367 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14368 $as_echo_n "checking for $ac_word... " >&6; }
14369 if ${ac_cv_prog_PROVE+:} false; then :
14370   $as_echo_n "(cached) " >&6
14371 else
14372   if test -n "$PROVE"; then
14373   ac_cv_prog_PROVE="$PROVE" # Let the user override the test.
14374 else
14375 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14376 for as_dir in $PATH
14377 do
14378   IFS=$as_save_IFS
14379   test -z "$as_dir" && as_dir=.
14380     for ac_exec_ext in '' $ac_executable_extensions; do
14381   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14382     ac_cv_prog_PROVE="$ac_prog"
14383     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14384     break 2
14385   fi
14386 done
14387   done
14388 IFS=$as_save_IFS
14389
14390 fi
14391 fi
14392 PROVE=$ac_cv_prog_PROVE
14393 if test -n "$PROVE"; then
14394   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
14395 $as_echo "$PROVE" >&6; }
14396 else
14397   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14398 $as_echo "no" >&6; }
14399 fi
14400
14401
14402   test -n "$PROVE" && break
14403 done
14404
14405
14406 # Thread testing
14407
14408 # We have to run the thread test near the end so we have all our symbols
14409 # defined.  Cross compiling throws a warning.
14410 #
14411 if test "$enable_thread_safety" = yes; then
14412 if test "$PORTNAME" != "win32"
14413 then
14414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking thread safety of required library functions" >&5
14415 $as_echo_n "checking thread safety of required library functions... " >&6; }
14416
14417 _CFLAGS="$CFLAGS"
14418 _LIBS="$LIBS"
14419 CFLAGS="$CFLAGS $PTHREAD_CFLAGS -DIN_CONFIGURE"
14420 LIBS="$LIBS $PTHREAD_LIBS"
14421 if test "$cross_compiling" = yes; then :
14422   { $as_echo "$as_me:${as_lineno-$LINENO}: result: maybe" >&5
14423 $as_echo "maybe" >&6; }
14424   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
14425 *** Skipping thread test program because of cross-compile build.
14426 *** Run the program in src/test/thread on the target machine.
14427 " >&5
14428 $as_echo "$as_me: WARNING:
14429 *** Skipping thread test program because of cross-compile build.
14430 *** Run the program in src/test/thread on the target machine.
14431 " >&2;}
14432 else
14433   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14434 /* end confdefs.h.  */
14435 #include "$srcdir/src/test/thread/thread_test.c"
14436 _ACEOF
14437 if ac_fn_c_try_run "$LINENO"; then :
14438   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14439 $as_echo "yes" >&6; }
14440 else
14441   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14442 $as_echo "no" >&6; }
14443   as_fn_error $? "thread test program failed
14444 This platform is not thread-safe.  Check the file 'config.log' or compile
14445 and run src/test/thread/thread_test for the exact reason.
14446 Use --disable-thread-safety to disable thread safety." "$LINENO" 5
14447 fi
14448 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14449   conftest.$ac_objext conftest.beam conftest.$ac_ext
14450 fi
14451
14452 CFLAGS="$_CFLAGS"
14453 LIBS="$_LIBS"
14454 else
14455 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** skipping thread test on Win32" >&5
14456 $as_echo "$as_me: WARNING: *** skipping thread test on Win32" >&2;}
14457 fi
14458 fi
14459
14460 # If compiler will take -Wl,--as-needed (or various platform-specific
14461 # spellings thereof) then add that to LDFLAGS.  This is much easier than
14462 # trying to filter LIBS to the minimum for each executable.
14463 # On (at least) some Red-Hat-derived systems, this switch breaks linking to
14464 # libreadline; therefore we postpone testing it until we know what library
14465 # dependencies readline has.  The test code will try to link with $LIBS.
14466 if test "$with_readline" = yes; then
14467   link_test_func=readline
14468 else
14469   link_test_func=exit
14470 fi
14471
14472 if test "$PORTNAME" = "darwin"; then
14473   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-dead_strip_dylibs" >&5
14474 $as_echo_n "checking whether $CC supports -Wl,-dead_strip_dylibs... " >&6; }
14475 if ${pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs+:} false; then :
14476   $as_echo_n "(cached) " >&6
14477 else
14478   pgac_save_LDFLAGS=$LDFLAGS
14479 LDFLAGS="$pgac_save_LDFLAGS -Wl,-dead_strip_dylibs"
14480 if test "$cross_compiling" = yes; then :
14481   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs="assuming no"
14482 else
14483   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14484 /* end confdefs.h.  */
14485 extern void $link_test_func (); void (*fptr) () = $link_test_func;
14486 int
14487 main ()
14488 {
14489
14490   ;
14491   return 0;
14492 }
14493 _ACEOF
14494 if ac_fn_c_try_run "$LINENO"; then :
14495   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=yes
14496 else
14497   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=no
14498 fi
14499 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14500   conftest.$ac_objext conftest.beam conftest.$ac_ext
14501 fi
14502
14503 LDFLAGS="$pgac_save_LDFLAGS"
14504 fi
14505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&5
14506 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&6; }
14507 if test x"$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" = x"yes"; then
14508   LDFLAGS="$LDFLAGS -Wl,-dead_strip_dylibs"
14509 fi
14510
14511 elif test "$PORTNAME" = "openbsd"; then
14512   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-Bdynamic" >&5
14513 $as_echo_n "checking whether $CC supports -Wl,-Bdynamic... " >&6; }
14514 if ${pgac_cv_prog_cc_ldflags__Wl__Bdynamic+:} false; then :
14515   $as_echo_n "(cached) " >&6
14516 else
14517   pgac_save_LDFLAGS=$LDFLAGS
14518 LDFLAGS="$pgac_save_LDFLAGS -Wl,-Bdynamic"
14519 if test "$cross_compiling" = yes; then :
14520   pgac_cv_prog_cc_ldflags__Wl__Bdynamic="assuming no"
14521 else
14522   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14523 /* end confdefs.h.  */
14524 extern void $link_test_func (); void (*fptr) () = $link_test_func;
14525 int
14526 main ()
14527 {
14528
14529   ;
14530   return 0;
14531 }
14532 _ACEOF
14533 if ac_fn_c_try_run "$LINENO"; then :
14534   pgac_cv_prog_cc_ldflags__Wl__Bdynamic=yes
14535 else
14536   pgac_cv_prog_cc_ldflags__Wl__Bdynamic=no
14537 fi
14538 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14539   conftest.$ac_objext conftest.beam conftest.$ac_ext
14540 fi
14541
14542 LDFLAGS="$pgac_save_LDFLAGS"
14543 fi
14544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&5
14545 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&6; }
14546 if test x"$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" = x"yes"; then
14547   LDFLAGS="$LDFLAGS -Wl,-Bdynamic"
14548 fi
14549
14550 else
14551   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,--as-needed" >&5
14552 $as_echo_n "checking whether $CC supports -Wl,--as-needed... " >&6; }
14553 if ${pgac_cv_prog_cc_ldflags__Wl___as_needed+:} false; then :
14554   $as_echo_n "(cached) " >&6
14555 else
14556   pgac_save_LDFLAGS=$LDFLAGS
14557 LDFLAGS="$pgac_save_LDFLAGS -Wl,--as-needed"
14558 if test "$cross_compiling" = yes; then :
14559   pgac_cv_prog_cc_ldflags__Wl___as_needed="assuming no"
14560 else
14561   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14562 /* end confdefs.h.  */
14563 extern void $link_test_func (); void (*fptr) () = $link_test_func;
14564 int
14565 main ()
14566 {
14567
14568   ;
14569   return 0;
14570 }
14571 _ACEOF
14572 if ac_fn_c_try_run "$LINENO"; then :
14573   pgac_cv_prog_cc_ldflags__Wl___as_needed=yes
14574 else
14575   pgac_cv_prog_cc_ldflags__Wl___as_needed=no
14576 fi
14577 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14578   conftest.$ac_objext conftest.beam conftest.$ac_ext
14579 fi
14580
14581 LDFLAGS="$pgac_save_LDFLAGS"
14582 fi
14583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl___as_needed" >&5
14584 $as_echo "$pgac_cv_prog_cc_ldflags__Wl___as_needed" >&6; }
14585 if test x"$pgac_cv_prog_cc_ldflags__Wl___as_needed" = x"yes"; then
14586   LDFLAGS="$LDFLAGS -Wl,--as-needed"
14587 fi
14588
14589 fi
14590
14591 # Create compiler version string
14592 if test x"$GCC" = x"yes" ; then
14593   cc_string=`${CC} --version | sed q`
14594   case $cc_string in [A-Za-z]*) ;; *) cc_string="GCC $cc_string";; esac
14595 elif test x"$SUN_STUDIO_CC" = x"yes" ; then
14596   cc_string=`${CC} -V 2>&1 | sed q`
14597 else
14598   cc_string=$CC
14599 fi
14600
14601
14602 cat >>confdefs.h <<_ACEOF
14603 #define PG_VERSION_STR "PostgreSQL $PG_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"
14604 _ACEOF
14605
14606
14607 # Supply a numeric version string for use by 3rd party add-ons
14608 # awk -F is a regex on some platforms, and not on others, so make "." a tab
14609 PG_VERSION_NUM="`echo "$PACKAGE_VERSION" | sed 's/[A-Za-z].*$//' |
14610 tr '.' '        ' |
14611 $AWK '{printf "%d%02d%02d", $1, $2, (NF >= 3) ? $3 : 0}'`"
14612
14613 cat >>confdefs.h <<_ACEOF
14614 #define PG_VERSION_NUM $PG_VERSION_NUM
14615 _ACEOF
14616
14617
14618
14619 # Begin output steps
14620
14621 { $as_echo "$as_me:${as_lineno-$LINENO}: using compiler=$cc_string" >&5
14622 $as_echo "$as_me: using compiler=$cc_string" >&6;}
14623 { $as_echo "$as_me:${as_lineno-$LINENO}: using CFLAGS=$CFLAGS" >&5
14624 $as_echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
14625 { $as_echo "$as_me:${as_lineno-$LINENO}: using CPPFLAGS=$CPPFLAGS" >&5
14626 $as_echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
14627 { $as_echo "$as_me:${as_lineno-$LINENO}: using LDFLAGS=$LDFLAGS" >&5
14628 $as_echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
14629
14630 # prepare build tree if outside source tree
14631 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
14632 # Note 2: /bin/pwd might be better than shell's built-in at getting
14633 #         a symlink-free name.
14634 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
14635   vpath_build=no
14636 else
14637   vpath_build=yes
14638   if test "$no_create" != yes; then
14639     $as_echo_n "preparing build tree... " >&6
14640     pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
14641     $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
14642       || as_fn_error $? "failed" "$LINENO" 5
14643     { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
14644 $as_echo "done" >&6; }
14645   fi
14646 fi
14647
14648
14649
14650 ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
14651
14652
14653 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}"
14654
14655
14656 if test "$PORTNAME" = "win32"; then
14657 ac_config_commands="$ac_config_commands check_win32_symlinks"
14658
14659 fi
14660
14661 ac_config_headers="$ac_config_headers src/include/pg_config.h"
14662
14663
14664 ac_config_headers="$ac_config_headers src/include/pg_config_ext.h"
14665
14666
14667 ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
14668
14669
14670 cat >confcache <<\_ACEOF
14671 # This file is a shell script that caches the results of configure
14672 # tests run on this system so they can be shared between configure
14673 # scripts and configure runs, see configure's option --config-cache.
14674 # It is not useful on other systems.  If it contains results you don't
14675 # want to keep, you may remove or edit it.
14676 #
14677 # config.status only pays attention to the cache file if you give it
14678 # the --recheck option to rerun configure.
14679 #
14680 # `ac_cv_env_foo' variables (set or unset) will be overridden when
14681 # loading this file, other *unset* `ac_cv_foo' will be assigned the
14682 # following values.
14683
14684 _ACEOF
14685
14686 # The following way of writing the cache mishandles newlines in values,
14687 # but we know of no workaround that is simple, portable, and efficient.
14688 # So, we kill variables containing newlines.
14689 # Ultrix sh set writes to stderr and can't be redirected directly,
14690 # and sets the high bit in the cache file unless we assign to the vars.
14691 (
14692   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
14693     eval ac_val=\$$ac_var
14694     case $ac_val in #(
14695     *${as_nl}*)
14696       case $ac_var in #(
14697       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
14698 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
14699       esac
14700       case $ac_var in #(
14701       _ | IFS | as_nl) ;; #(
14702       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
14703       *) { eval $ac_var=; unset $ac_var;} ;;
14704       esac ;;
14705     esac
14706   done
14707
14708   (set) 2>&1 |
14709     case $as_nl`(ac_space=' '; set) 2>&1` in #(
14710     *${as_nl}ac_space=\ *)
14711       # `set' does not quote correctly, so add quotes: double-quote
14712       # substitution turns \\\\ into \\, and sed turns \\ into \.
14713       sed -n \
14714         "s/'/'\\\\''/g;
14715           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
14716       ;; #(
14717     *)
14718       # `set' quotes correctly as required by POSIX, so do not add quotes.
14719       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
14720       ;;
14721     esac |
14722     sort
14723 ) |
14724   sed '
14725      /^ac_cv_env_/b end
14726      t clear
14727      :clear
14728      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
14729      t end
14730      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
14731      :end' >>confcache
14732 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
14733   if test -w "$cache_file"; then
14734     if test "x$cache_file" != "x/dev/null"; then
14735       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
14736 $as_echo "$as_me: updating cache $cache_file" >&6;}
14737       if test ! -f "$cache_file" || test -h "$cache_file"; then
14738         cat confcache >"$cache_file"
14739       else
14740         case $cache_file in #(
14741         */* | ?:*)
14742           mv -f confcache "$cache_file"$$ &&
14743           mv -f "$cache_file"$$ "$cache_file" ;; #(
14744         *)
14745           mv -f confcache "$cache_file" ;;
14746         esac
14747       fi
14748     fi
14749   else
14750     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
14751 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
14752   fi
14753 fi
14754 rm -f confcache
14755
14756 test "x$prefix" = xNONE && prefix=$ac_default_prefix
14757 # Let make expand exec_prefix.
14758 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14759
14760 DEFS=-DHAVE_CONFIG_H
14761
14762 ac_libobjs=
14763 ac_ltlibobjs=
14764 U=
14765 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
14766   # 1. Remove the extension, and $U if already installed.
14767   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
14768   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
14769   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
14770   #    will be set to the directory where LIBOBJS objects are built.
14771   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
14772   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
14773 done
14774 LIBOBJS=$ac_libobjs
14775
14776 LTLIBOBJS=$ac_ltlibobjs
14777
14778
14779
14780
14781 : "${CONFIG_STATUS=./config.status}"
14782 ac_write_fail=0
14783 ac_clean_files_save=$ac_clean_files
14784 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
14785 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
14786 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
14787 as_write_fail=0
14788 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
14789 #! $SHELL
14790 # Generated by $as_me.
14791 # Run this file to recreate the current configuration.
14792 # Compiler output produced by configure, useful for debugging
14793 # configure, is in config.log if it exists.
14794
14795 debug=false
14796 ac_cs_recheck=false
14797 ac_cs_silent=false
14798
14799 SHELL=\${CONFIG_SHELL-$SHELL}
14800 export SHELL
14801 _ASEOF
14802 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14803 ## -------------------- ##
14804 ## M4sh Initialization. ##
14805 ## -------------------- ##
14806
14807 # Be more Bourne compatible
14808 DUALCASE=1; export DUALCASE # for MKS sh
14809 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
14810   emulate sh
14811   NULLCMD=:
14812   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
14813   # is contrary to our usage.  Disable this feature.
14814   alias -g '${1+"$@"}'='"$@"'
14815   setopt NO_GLOB_SUBST
14816 else
14817   case `(set -o) 2>/dev/null` in #(
14818   *posix*) :
14819     set -o posix ;; #(
14820   *) :
14821      ;;
14822 esac
14823 fi
14824
14825
14826 as_nl='
14827 '
14828 export as_nl
14829 # Printing a long string crashes Solaris 7 /usr/bin/printf.
14830 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14831 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14832 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14833 # Prefer a ksh shell builtin over an external printf program on Solaris,
14834 # but without wasting forks for bash or zsh.
14835 if test -z "$BASH_VERSION$ZSH_VERSION" \
14836     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14837   as_echo='print -r --'
14838   as_echo_n='print -rn --'
14839 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14840   as_echo='printf %s\n'
14841   as_echo_n='printf %s'
14842 else
14843   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14844     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14845     as_echo_n='/usr/ucb/echo -n'
14846   else
14847     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14848     as_echo_n_body='eval
14849       arg=$1;
14850       case $arg in #(
14851       *"$as_nl"*)
14852         expr "X$arg" : "X\\(.*\\)$as_nl";
14853         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14854       esac;
14855       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14856     '
14857     export as_echo_n_body
14858     as_echo_n='sh -c $as_echo_n_body as_echo'
14859   fi
14860   export as_echo_body
14861   as_echo='sh -c $as_echo_body as_echo'
14862 fi
14863
14864 # The user is always right.
14865 if test "${PATH_SEPARATOR+set}" != set; then
14866   PATH_SEPARATOR=:
14867   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14868     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14869       PATH_SEPARATOR=';'
14870   }
14871 fi
14872
14873
14874 # IFS
14875 # We need space, tab and new line, in precisely that order.  Quoting is
14876 # there to prevent editors from complaining about space-tab.
14877 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
14878 # splitting by setting IFS to empty value.)
14879 IFS=" ""        $as_nl"
14880
14881 # Find who we are.  Look in the path if we contain no directory separator.
14882 as_myself=
14883 case $0 in #((
14884   *[\\/]* ) as_myself=$0 ;;
14885   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14886 for as_dir in $PATH
14887 do
14888   IFS=$as_save_IFS
14889   test -z "$as_dir" && as_dir=.
14890     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14891   done
14892 IFS=$as_save_IFS
14893
14894      ;;
14895 esac
14896 # We did not find ourselves, most probably we were run as `sh COMMAND'
14897 # in which case we are not to be found in the path.
14898 if test "x$as_myself" = x; then
14899   as_myself=$0
14900 fi
14901 if test ! -f "$as_myself"; then
14902   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14903   exit 1
14904 fi
14905
14906 # Unset variables that we do not need and which cause bugs (e.g. in
14907 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
14908 # suppresses any "Segmentation fault" message there.  '((' could
14909 # trigger a bug in pdksh 5.2.14.
14910 for as_var in BASH_ENV ENV MAIL MAILPATH
14911 do eval test x\${$as_var+set} = xset \
14912   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
14913 done
14914 PS1='$ '
14915 PS2='> '
14916 PS4='+ '
14917
14918 # NLS nuisances.
14919 LC_ALL=C
14920 export LC_ALL
14921 LANGUAGE=C
14922 export LANGUAGE
14923
14924 # CDPATH.
14925 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14926
14927
14928 # as_fn_error STATUS ERROR [LINENO LOG_FD]
14929 # ----------------------------------------
14930 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14931 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
14932 # script with STATUS, using 1 if that was 0.
14933 as_fn_error ()
14934 {
14935   as_status=$1; test $as_status -eq 0 && as_status=1
14936   if test "$4"; then
14937     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14938     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
14939   fi
14940   $as_echo "$as_me: error: $2" >&2
14941   as_fn_exit $as_status
14942 } # as_fn_error
14943
14944
14945 # as_fn_set_status STATUS
14946 # -----------------------
14947 # Set $? to STATUS, without forking.
14948 as_fn_set_status ()
14949 {
14950   return $1
14951 } # as_fn_set_status
14952
14953 # as_fn_exit STATUS
14954 # -----------------
14955 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14956 as_fn_exit ()
14957 {
14958   set +e
14959   as_fn_set_status $1
14960   exit $1
14961 } # as_fn_exit
14962
14963 # as_fn_unset VAR
14964 # ---------------
14965 # Portably unset VAR.
14966 as_fn_unset ()
14967 {
14968   { eval $1=; unset $1;}
14969 }
14970 as_unset=as_fn_unset
14971 # as_fn_append VAR VALUE
14972 # ----------------------
14973 # Append the text in VALUE to the end of the definition contained in VAR. Take
14974 # advantage of any shell optimizations that allow amortized linear growth over
14975 # repeated appends, instead of the typical quadratic growth present in naive
14976 # implementations.
14977 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14978   eval 'as_fn_append ()
14979   {
14980     eval $1+=\$2
14981   }'
14982 else
14983   as_fn_append ()
14984   {
14985     eval $1=\$$1\$2
14986   }
14987 fi # as_fn_append
14988
14989 # as_fn_arith ARG...
14990 # ------------------
14991 # Perform arithmetic evaluation on the ARGs, and store the result in the
14992 # global $as_val. Take advantage of shells that can avoid forks. The arguments
14993 # must be portable across $(()) and expr.
14994 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14995   eval 'as_fn_arith ()
14996   {
14997     as_val=$(( $* ))
14998   }'
14999 else
15000   as_fn_arith ()
15001   {
15002     as_val=`expr "$@" || test $? -eq 1`
15003   }
15004 fi # as_fn_arith
15005
15006
15007 if expr a : '\(a\)' >/dev/null 2>&1 &&
15008    test "X`expr 00001 : '.*\(...\)'`" = X001; then
15009   as_expr=expr
15010 else
15011   as_expr=false
15012 fi
15013
15014 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15015   as_basename=basename
15016 else
15017   as_basename=false
15018 fi
15019
15020 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15021   as_dirname=dirname
15022 else
15023   as_dirname=false
15024 fi
15025
15026 as_me=`$as_basename -- "$0" ||
15027 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15028          X"$0" : 'X\(//\)$' \| \
15029          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
15030 $as_echo X/"$0" |
15031     sed '/^.*\/\([^/][^/]*\)\/*$/{
15032             s//\1/
15033             q
15034           }
15035           /^X\/\(\/\/\)$/{
15036             s//\1/
15037             q
15038           }
15039           /^X\/\(\/\).*/{
15040             s//\1/
15041             q
15042           }
15043           s/.*/./; q'`
15044
15045 # Avoid depending upon Character Ranges.
15046 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15047 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15048 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15049 as_cr_digits='0123456789'
15050 as_cr_alnum=$as_cr_Letters$as_cr_digits
15051
15052 ECHO_C= ECHO_N= ECHO_T=
15053 case `echo -n x` in #(((((
15054 -n*)
15055   case `echo 'xy\c'` in
15056   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
15057   xy)  ECHO_C='\c';;
15058   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
15059        ECHO_T=' ';;
15060   esac;;
15061 *)
15062   ECHO_N='-n';;
15063 esac
15064
15065 rm -f conf$$ conf$$.exe conf$$.file
15066 if test -d conf$$.dir; then
15067   rm -f conf$$.dir/conf$$.file
15068 else
15069   rm -f conf$$.dir
15070   mkdir conf$$.dir 2>/dev/null
15071 fi
15072 if (echo >conf$$.file) 2>/dev/null; then
15073   if ln -s conf$$.file conf$$ 2>/dev/null; then
15074     as_ln_s='ln -s'
15075     # ... but there are two gotchas:
15076     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15077     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
15078     # In both cases, we have to default to `cp -pR'.
15079     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
15080       as_ln_s='cp -pR'
15081   elif ln conf$$.file conf$$ 2>/dev/null; then
15082     as_ln_s=ln
15083   else
15084     as_ln_s='cp -pR'
15085   fi
15086 else
15087   as_ln_s='cp -pR'
15088 fi
15089 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15090 rmdir conf$$.dir 2>/dev/null
15091
15092
15093 # as_fn_mkdir_p
15094 # -------------
15095 # Create "$as_dir" as a directory, including parents if necessary.
15096 as_fn_mkdir_p ()
15097 {
15098
15099   case $as_dir in #(
15100   -*) as_dir=./$as_dir;;
15101   esac
15102   test -d "$as_dir" || eval $as_mkdir_p || {
15103     as_dirs=
15104     while :; do
15105       case $as_dir in #(
15106       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15107       *) as_qdir=$as_dir;;
15108       esac
15109       as_dirs="'$as_qdir' $as_dirs"
15110       as_dir=`$as_dirname -- "$as_dir" ||
15111 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15112          X"$as_dir" : 'X\(//\)[^/]' \| \
15113          X"$as_dir" : 'X\(//\)$' \| \
15114          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15115 $as_echo X"$as_dir" |
15116     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15117             s//\1/
15118             q
15119           }
15120           /^X\(\/\/\)[^/].*/{
15121             s//\1/
15122             q
15123           }
15124           /^X\(\/\/\)$/{
15125             s//\1/
15126             q
15127           }
15128           /^X\(\/\).*/{
15129             s//\1/
15130             q
15131           }
15132           s/.*/./; q'`
15133       test -d "$as_dir" && break
15134     done
15135     test -z "$as_dirs" || eval "mkdir $as_dirs"
15136   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
15137
15138
15139 } # as_fn_mkdir_p
15140 if mkdir -p . 2>/dev/null; then
15141   as_mkdir_p='mkdir -p "$as_dir"'
15142 else
15143   test -d ./-p && rmdir ./-p
15144   as_mkdir_p=false
15145 fi
15146
15147
15148 # as_fn_executable_p FILE
15149 # -----------------------
15150 # Test if FILE is an executable regular file.
15151 as_fn_executable_p ()
15152 {
15153   test -f "$1" && test -x "$1"
15154 } # as_fn_executable_p
15155 as_test_x='test -x'
15156 as_executable_p=as_fn_executable_p
15157
15158 # Sed expression to map a string onto a valid CPP name.
15159 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
15160
15161 # Sed expression to map a string onto a valid variable name.
15162 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
15163
15164
15165 exec 6>&1
15166 ## ----------------------------------- ##
15167 ## Main body of $CONFIG_STATUS script. ##
15168 ## ----------------------------------- ##
15169 _ASEOF
15170 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
15171
15172 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15173 # Save the log message, to keep $0 and so on meaningful, and to
15174 # report actual input values of CONFIG_FILES etc. instead of their
15175 # values after options handling.
15176 ac_log="
15177 This file was extended by PostgreSQL $as_me 9.4beta1, which was
15178 generated by GNU Autoconf 2.69.  Invocation command line was
15179
15180   CONFIG_FILES    = $CONFIG_FILES
15181   CONFIG_HEADERS  = $CONFIG_HEADERS
15182   CONFIG_LINKS    = $CONFIG_LINKS
15183   CONFIG_COMMANDS = $CONFIG_COMMANDS
15184   $ $0 $@
15185
15186 on `(hostname || uname -n) 2>/dev/null | sed 1q`
15187 "
15188
15189 _ACEOF
15190
15191 case $ac_config_files in *"
15192 "*) set x $ac_config_files; shift; ac_config_files=$*;;
15193 esac
15194
15195 case $ac_config_headers in *"
15196 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15197 esac
15198
15199
15200 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15201 # Files that config.status was made for.
15202 config_files="$ac_config_files"
15203 config_headers="$ac_config_headers"
15204 config_links="$ac_config_links"
15205 config_commands="$ac_config_commands"
15206
15207 _ACEOF
15208
15209 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15210 ac_cs_usage="\
15211 \`$as_me' instantiates files and other configuration actions
15212 from templates according to the current configuration.  Unless the files
15213 and actions are specified as TAGs, all are instantiated by default.
15214
15215 Usage: $0 [OPTION]... [TAG]...
15216
15217   -h, --help       print this help, then exit
15218   -V, --version    print version number and configuration settings, then exit
15219       --config     print configuration, then exit
15220   -q, --quiet, --silent
15221                    do not print progress messages
15222   -d, --debug      don't remove temporary files
15223       --recheck    update $as_me by reconfiguring in the same conditions
15224       --file=FILE[:TEMPLATE]
15225                    instantiate the configuration file FILE
15226       --header=FILE[:TEMPLATE]
15227                    instantiate the configuration header FILE
15228
15229 Configuration files:
15230 $config_files
15231
15232 Configuration headers:
15233 $config_headers
15234
15235 Configuration links:
15236 $config_links
15237
15238 Configuration commands:
15239 $config_commands
15240
15241 Report bugs to <pgsql-bugs@postgresql.org>."
15242
15243 _ACEOF
15244 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15245 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
15246 ac_cs_version="\\
15247 PostgreSQL config.status 9.4beta1
15248 configured by $0, generated by GNU Autoconf 2.69,
15249   with options \\"\$ac_cs_config\\"
15250
15251 Copyright (C) 2012 Free Software Foundation, Inc.
15252 This config.status script is free software; the Free Software Foundation
15253 gives unlimited permission to copy, distribute and modify it."
15254
15255 ac_pwd='$ac_pwd'
15256 srcdir='$srcdir'
15257 INSTALL='$INSTALL'
15258 MKDIR_P='$MKDIR_P'
15259 AWK='$AWK'
15260 test -n "\$AWK" || AWK=awk
15261 _ACEOF
15262
15263 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15264 # The default lists apply if the user does not specify any file.
15265 ac_need_defaults=:
15266 while test $# != 0
15267 do
15268   case $1 in
15269   --*=?*)
15270     ac_option=`expr "X$1" : 'X\([^=]*\)='`
15271     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
15272     ac_shift=:
15273     ;;
15274   --*=)
15275     ac_option=`expr "X$1" : 'X\([^=]*\)='`
15276     ac_optarg=
15277     ac_shift=:
15278     ;;
15279   *)
15280     ac_option=$1
15281     ac_optarg=$2
15282     ac_shift=shift
15283     ;;
15284   esac
15285
15286   case $ac_option in
15287   # Handling of the options.
15288   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15289     ac_cs_recheck=: ;;
15290   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
15291     $as_echo "$ac_cs_version"; exit ;;
15292   --config | --confi | --conf | --con | --co | --c )
15293     $as_echo "$ac_cs_config"; exit ;;
15294   --debug | --debu | --deb | --de | --d | -d )
15295     debug=: ;;
15296   --file | --fil | --fi | --f )
15297     $ac_shift
15298     case $ac_optarg in
15299     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15300     '') as_fn_error $? "missing file argument" ;;
15301     esac
15302     as_fn_append CONFIG_FILES " '$ac_optarg'"
15303     ac_need_defaults=false;;
15304   --header | --heade | --head | --hea )
15305     $ac_shift
15306     case $ac_optarg in
15307     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15308     esac
15309     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
15310     ac_need_defaults=false;;
15311   --he | --h)
15312     # Conflict between --help and --header
15313     as_fn_error $? "ambiguous option: \`$1'
15314 Try \`$0 --help' for more information.";;
15315   --help | --hel | -h )
15316     $as_echo "$ac_cs_usage"; exit ;;
15317   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15318   | -silent | --silent | --silen | --sile | --sil | --si | --s)
15319     ac_cs_silent=: ;;
15320
15321   # This is an error.
15322   -*) as_fn_error $? "unrecognized option: \`$1'
15323 Try \`$0 --help' for more information." ;;
15324
15325   *) as_fn_append ac_config_targets " $1"
15326      ac_need_defaults=false ;;
15327
15328   esac
15329   shift
15330 done
15331
15332 ac_configure_extra_args=
15333
15334 if $ac_cs_silent; then
15335   exec 6>/dev/null
15336   ac_configure_extra_args="$ac_configure_extra_args --silent"
15337 fi
15338
15339 _ACEOF
15340 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15341 if \$ac_cs_recheck; then
15342   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
15343   shift
15344   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15345   CONFIG_SHELL='$SHELL'
15346   export CONFIG_SHELL
15347   exec "\$@"
15348 fi
15349
15350 _ACEOF
15351 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15352 exec 5>>config.log
15353 {
15354   echo
15355   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15356 ## Running $as_me. ##
15357 _ASBOX
15358   $as_echo "$ac_log"
15359 } >&5
15360
15361 _ACEOF
15362 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15363 _ACEOF
15364
15365 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15366
15367 # Handling of arguments.
15368 for ac_config_target in $ac_config_targets
15369 do
15370   case $ac_config_target in
15371     "src/backend/port/tas.s") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
15372     "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
15373     "src/Makefile.global") CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
15374     "src/backend/port/dynloader.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/dynloader.c:src/backend/port/dynloader/${template}.c" ;;
15375     "src/backend/port/pg_sema.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
15376     "src/backend/port/pg_shmem.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
15377     "src/backend/port/pg_latch.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_latch.c:${LATCH_IMPLEMENTATION}" ;;
15378     "src/include/dynloader.h") CONFIG_LINKS="$CONFIG_LINKS src/include/dynloader.h:src/backend/port/dynloader/${template}.h" ;;
15379     "src/include/pg_config_os.h") CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
15380     "src/Makefile.port") CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
15381     "check_win32_symlinks") CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
15382     "src/include/pg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
15383     "src/include/pg_config_ext.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config_ext.h" ;;
15384     "src/interfaces/ecpg/include/ecpg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
15385
15386   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
15387   esac
15388 done
15389
15390
15391 # If the user did not use the arguments to specify the items to instantiate,
15392 # then the envvar interface is used.  Set only those that are not.
15393 # We use the long form for the default assignment because of an extremely
15394 # bizarre bug on SunOS 4.1.3.
15395 if $ac_need_defaults; then
15396   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15397   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15398   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
15399   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
15400 fi
15401
15402 # Have a temporary directory for convenience.  Make it in the build tree
15403 # simply because there is no reason against having it here, and in addition,
15404 # creating and moving files from /tmp can sometimes cause problems.
15405 # Hook for its removal unless debugging.
15406 # Note that there is a small window in which the directory will not be cleaned:
15407 # after its creation but before its name has been assigned to `$tmp'.
15408 $debug ||
15409 {
15410   tmp= ac_tmp=
15411   trap 'exit_status=$?
15412   : "${ac_tmp:=$tmp}"
15413   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
15414 ' 0
15415   trap 'as_fn_exit 1' 1 2 13 15
15416 }
15417 # Create a (secure) tmp directory for tmp files.
15418
15419 {
15420   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
15421   test -d "$tmp"
15422 }  ||
15423 {
15424   tmp=./conf$$-$RANDOM
15425   (umask 077 && mkdir "$tmp")
15426 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
15427 ac_tmp=$tmp
15428
15429 # Set up the scripts for CONFIG_FILES section.
15430 # No need to generate them if there are no CONFIG_FILES.
15431 # This happens for instance with `./config.status config.h'.
15432 if test -n "$CONFIG_FILES"; then
15433
15434
15435 ac_cr=`echo X | tr X '\015'`
15436 # On cygwin, bash can eat \r inside `` if the user requested igncr.
15437 # But we know of no other shell where ac_cr would be empty at this
15438 # point, so we can use a bashism as a fallback.
15439 if test "x$ac_cr" = x; then
15440   eval ac_cr=\$\'\\r\'
15441 fi
15442 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15443 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
15444   ac_cs_awk_cr='\\r'
15445 else
15446   ac_cs_awk_cr=$ac_cr
15447 fi
15448
15449 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
15450 _ACEOF
15451
15452
15453 {
15454   echo "cat >conf$$subs.awk <<_ACEOF" &&
15455   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15456   echo "_ACEOF"
15457 } >conf$$subs.sh ||
15458   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15459 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
15460 ac_delim='%!_!# '
15461 for ac_last_try in false false false false false :; do
15462   . ./conf$$subs.sh ||
15463     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15464
15465   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15466   if test $ac_delim_n = $ac_delim_num; then
15467     break
15468   elif $ac_last_try; then
15469     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15470   else
15471     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15472   fi
15473 done
15474 rm -f conf$$subs.sh
15475
15476 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15477 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
15478 _ACEOF
15479 sed -n '
15480 h
15481 s/^/S["/; s/!.*/"]=/
15482 p
15483 g
15484 s/^[^!]*!//
15485 :repl
15486 t repl
15487 s/'"$ac_delim"'$//
15488 t delim
15489 :nl
15490 h
15491 s/\(.\{148\}\)..*/\1/
15492 t more1
15493 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15494 p
15495 n
15496 b repl
15497 :more1
15498 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15499 p
15500 g
15501 s/.\{148\}//
15502 t nl
15503 :delim
15504 h
15505 s/\(.\{148\}\)..*/\1/
15506 t more2
15507 s/["\\]/\\&/g; s/^/"/; s/$/"/
15508 p
15509 b
15510 :more2
15511 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15512 p
15513 g
15514 s/.\{148\}//
15515 t delim
15516 ' <conf$$subs.awk | sed '
15517 /^[^""]/{
15518   N
15519   s/\n//
15520 }
15521 ' >>$CONFIG_STATUS || ac_write_fail=1
15522 rm -f conf$$subs.awk
15523 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15524 _ACAWK
15525 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
15526   for (key in S) S_is_set[key] = 1
15527   FS = "\a"
15528
15529 }
15530 {
15531   line = $ 0
15532   nfields = split(line, field, "@")
15533   substed = 0
15534   len = length(field[1])
15535   for (i = 2; i < nfields; i++) {
15536     key = field[i]
15537     keylen = length(key)
15538     if (S_is_set[key]) {
15539       value = S[key]
15540       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
15541       len += length(value) + length(field[++i])
15542       substed = 1
15543     } else
15544       len += 1 + keylen
15545   }
15546
15547   print line
15548 }
15549
15550 _ACAWK
15551 _ACEOF
15552 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15553 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
15554   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
15555 else
15556   cat
15557 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
15558   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
15559 _ACEOF
15560
15561 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
15562 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
15563 # trailing colons and then remove the whole line if VPATH becomes empty
15564 # (actually we leave an empty line to preserve line numbers).
15565 if test "x$srcdir" = x.; then
15566   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
15567 h
15568 s///
15569 s/^/:/
15570 s/[      ]*$/:/
15571 s/:\$(srcdir):/:/g
15572 s/:\${srcdir}:/:/g
15573 s/:@srcdir@:/:/g
15574 s/^:*//
15575 s/:*$//
15576 x
15577 s/\(=[   ]*\).*/\1/
15578 G
15579 s/\n//
15580 s/^[^=]*=[       ]*$//
15581 }'
15582 fi
15583
15584 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15585 fi # test -n "$CONFIG_FILES"
15586
15587 # Set up the scripts for CONFIG_HEADERS section.
15588 # No need to generate them if there are no CONFIG_HEADERS.
15589 # This happens for instance with `./config.status Makefile'.
15590 if test -n "$CONFIG_HEADERS"; then
15591 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
15592 BEGIN {
15593 _ACEOF
15594
15595 # Transform confdefs.h into an awk script `defines.awk', embedded as
15596 # here-document in config.status, that substitutes the proper values into
15597 # config.h.in to produce config.h.
15598
15599 # Create a delimiter string that does not exist in confdefs.h, to ease
15600 # handling of long lines.
15601 ac_delim='%!_!# '
15602 for ac_last_try in false false :; do
15603   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
15604   if test -z "$ac_tt"; then
15605     break
15606   elif $ac_last_try; then
15607     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
15608   else
15609     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15610   fi
15611 done
15612
15613 # For the awk script, D is an array of macro values keyed by name,
15614 # likewise P contains macro parameters if any.  Preserve backslash
15615 # newline sequences.
15616
15617 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
15618 sed -n '
15619 s/.\{148\}/&'"$ac_delim"'/g
15620 t rset
15621 :rset
15622 s/^[     ]*#[    ]*define[       ][      ]*/ /
15623 t def
15624 d
15625 :def
15626 s/\\$//
15627 t bsnl
15628 s/["\\]/\\&/g
15629 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
15630 D["\1"]=" \3"/p
15631 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
15632 d
15633 :bsnl
15634 s/["\\]/\\&/g
15635 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
15636 D["\1"]=" \3\\\\\\n"\\/p
15637 t cont
15638 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
15639 t cont
15640 d
15641 :cont
15642 n
15643 s/.\{148\}/&'"$ac_delim"'/g
15644 t clear
15645 :clear
15646 s/\\$//
15647 t bsnlc
15648 s/["\\]/\\&/g; s/^/"/; s/$/"/p
15649 d
15650 :bsnlc
15651 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
15652 b cont
15653 ' <confdefs.h | sed '
15654 s/'"$ac_delim"'/"\\\
15655 "/g' >>$CONFIG_STATUS || ac_write_fail=1
15656
15657 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15658   for (key in D) D_is_set[key] = 1
15659   FS = "\a"
15660 }
15661 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
15662   line = \$ 0
15663   split(line, arg, " ")
15664   if (arg[1] == "#") {
15665     defundef = arg[2]
15666     mac1 = arg[3]
15667   } else {
15668     defundef = substr(arg[1], 2)
15669     mac1 = arg[2]
15670   }
15671   split(mac1, mac2, "(") #)
15672   macro = mac2[1]
15673   prefix = substr(line, 1, index(line, defundef) - 1)
15674   if (D_is_set[macro]) {
15675     # Preserve the white space surrounding the "#".
15676     print prefix "define", macro P[macro] D[macro]
15677     next
15678   } else {
15679     # Replace #undef with comments.  This is necessary, for example,
15680     # in the case of _POSIX_SOURCE, which is predefined and required
15681     # on some systems where configure will not decide to define it.
15682     if (defundef == "undef") {
15683       print "/*", prefix defundef, macro, "*/"
15684       next
15685     }
15686   }
15687 }
15688 { print }
15689 _ACAWK
15690 _ACEOF
15691 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15692   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
15693 fi # test -n "$CONFIG_HEADERS"
15694
15695
15696 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS  :L $CONFIG_LINKS  :C $CONFIG_COMMANDS"
15697 shift
15698 for ac_tag
15699 do
15700   case $ac_tag in
15701   :[FHLC]) ac_mode=$ac_tag; continue;;
15702   esac
15703   case $ac_mode$ac_tag in
15704   :[FHL]*:*);;
15705   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
15706   :[FH]-) ac_tag=-:-;;
15707   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
15708   esac
15709   ac_save_IFS=$IFS
15710   IFS=:
15711   set x $ac_tag
15712   IFS=$ac_save_IFS
15713   shift
15714   ac_file=$1
15715   shift
15716
15717   case $ac_mode in
15718   :L) ac_source=$1;;
15719   :[FH])
15720     ac_file_inputs=
15721     for ac_f
15722     do
15723       case $ac_f in
15724       -) ac_f="$ac_tmp/stdin";;
15725       *) # Look for the file first in the build tree, then in the source tree
15726          # (if the path is not absolute).  The absolute path cannot be DOS-style,
15727          # because $ac_f cannot contain `:'.
15728          test -f "$ac_f" ||
15729            case $ac_f in
15730            [\\/$]*) false;;
15731            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
15732            esac ||
15733            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
15734       esac
15735       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
15736       as_fn_append ac_file_inputs " '$ac_f'"
15737     done
15738
15739     # Let's still pretend it is `configure' which instantiates (i.e., don't
15740     # use $as_me), people would be surprised to read:
15741     #    /* config.h.  Generated by config.status.  */
15742     configure_input='Generated from '`
15743           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
15744         `' by configure.'
15745     if test x"$ac_file" != x-; then
15746       configure_input="$ac_file.  $configure_input"
15747       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
15748 $as_echo "$as_me: creating $ac_file" >&6;}
15749     fi
15750     # Neutralize special characters interpreted by sed in replacement strings.
15751     case $configure_input in #(
15752     *\&* | *\|* | *\\* )
15753        ac_sed_conf_input=`$as_echo "$configure_input" |
15754        sed 's/[\\\\&|]/\\\\&/g'`;; #(
15755     *) ac_sed_conf_input=$configure_input;;
15756     esac
15757
15758     case $ac_tag in
15759     *:-:* | *:-) cat >"$ac_tmp/stdin" \
15760       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
15761     esac
15762     ;;
15763   esac
15764
15765   ac_dir=`$as_dirname -- "$ac_file" ||
15766 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15767          X"$ac_file" : 'X\(//\)[^/]' \| \
15768          X"$ac_file" : 'X\(//\)$' \| \
15769          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
15770 $as_echo X"$ac_file" |
15771     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15772             s//\1/
15773             q
15774           }
15775           /^X\(\/\/\)[^/].*/{
15776             s//\1/
15777             q
15778           }
15779           /^X\(\/\/\)$/{
15780             s//\1/
15781             q
15782           }
15783           /^X\(\/\).*/{
15784             s//\1/
15785             q
15786           }
15787           s/.*/./; q'`
15788   as_dir="$ac_dir"; as_fn_mkdir_p
15789   ac_builddir=.
15790
15791 case "$ac_dir" in
15792 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15793 *)
15794   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
15795   # A ".." for each directory in $ac_dir_suffix.
15796   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
15797   case $ac_top_builddir_sub in
15798   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15799   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15800   esac ;;
15801 esac
15802 ac_abs_top_builddir=$ac_pwd
15803 ac_abs_builddir=$ac_pwd$ac_dir_suffix
15804 # for backward compatibility:
15805 ac_top_builddir=$ac_top_build_prefix
15806
15807 case $srcdir in
15808   .)  # We are building in place.
15809     ac_srcdir=.
15810     ac_top_srcdir=$ac_top_builddir_sub
15811     ac_abs_top_srcdir=$ac_pwd ;;
15812   [\\/]* | ?:[\\/]* )  # Absolute name.
15813     ac_srcdir=$srcdir$ac_dir_suffix;
15814     ac_top_srcdir=$srcdir
15815     ac_abs_top_srcdir=$srcdir ;;
15816   *) # Relative name.
15817     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15818     ac_top_srcdir=$ac_top_build_prefix$srcdir
15819     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
15820 esac
15821 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
15822
15823
15824   case $ac_mode in
15825   :F)
15826   #
15827   # CONFIG_FILE
15828   #
15829
15830   case $INSTALL in
15831   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
15832   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
15833   esac
15834   ac_MKDIR_P=$MKDIR_P
15835   case $MKDIR_P in
15836   [\\/$]* | ?:[\\/]* ) ;;
15837   */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
15838   esac
15839 _ACEOF
15840
15841 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15842 # If the template does not know about datarootdir, expand it.
15843 # FIXME: This hack should be removed a few years after 2.60.
15844 ac_datarootdir_hack=; ac_datarootdir_seen=
15845 ac_sed_dataroot='
15846 /datarootdir/ {
15847   p
15848   q
15849 }
15850 /@datadir@/p
15851 /@docdir@/p
15852 /@infodir@/p
15853 /@localedir@/p
15854 /@mandir@/p'
15855 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
15856 *datarootdir*) ac_datarootdir_seen=yes;;
15857 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
15858   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15859 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
15860 _ACEOF
15861 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15862   ac_datarootdir_hack='
15863   s&@datadir@&$datadir&g
15864   s&@docdir@&$docdir&g
15865   s&@infodir@&$infodir&g
15866   s&@localedir@&$localedir&g
15867   s&@mandir@&$mandir&g
15868   s&\\\${datarootdir}&$datarootdir&g' ;;
15869 esac
15870 _ACEOF
15871
15872 # Neutralize VPATH when `$srcdir' = `.'.
15873 # Shell code in configure.ac might set extrasub.
15874 # FIXME: do we really want to maintain this feature?
15875 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15876 ac_sed_extra="$ac_vpsub
15877 $extrasub
15878 _ACEOF
15879 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15880 :t
15881 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
15882 s|@configure_input@|$ac_sed_conf_input|;t t
15883 s&@top_builddir@&$ac_top_builddir_sub&;t t
15884 s&@top_build_prefix@&$ac_top_build_prefix&;t t
15885 s&@srcdir@&$ac_srcdir&;t t
15886 s&@abs_srcdir@&$ac_abs_srcdir&;t t
15887 s&@top_srcdir@&$ac_top_srcdir&;t t
15888 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15889 s&@builddir@&$ac_builddir&;t t
15890 s&@abs_builddir@&$ac_abs_builddir&;t t
15891 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15892 s&@INSTALL@&$ac_INSTALL&;t t
15893 s&@MKDIR_P@&$ac_MKDIR_P&;t t
15894 $ac_datarootdir_hack
15895 "
15896 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
15897   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
15898
15899 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
15900   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
15901   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
15902       "$ac_tmp/out"`; test -z "$ac_out"; } &&
15903   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
15904 which seems to be undefined.  Please make sure it is defined" >&5
15905 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
15906 which seems to be undefined.  Please make sure it is defined" >&2;}
15907
15908   rm -f "$ac_tmp/stdin"
15909   case $ac_file in
15910   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
15911   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
15912   esac \
15913   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
15914  ;;
15915   :H)
15916   #
15917   # CONFIG_HEADER
15918   #
15919   if test x"$ac_file" != x-; then
15920     {
15921       $as_echo "/* $configure_input  */" \
15922       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
15923     } >"$ac_tmp/config.h" \
15924       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
15925     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
15926       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15927 $as_echo "$as_me: $ac_file is unchanged" >&6;}
15928     else
15929       rm -f "$ac_file"
15930       mv "$ac_tmp/config.h" "$ac_file" \
15931         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
15932     fi
15933   else
15934     $as_echo "/* $configure_input  */" \
15935       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
15936       || as_fn_error $? "could not create -" "$LINENO" 5
15937   fi
15938  ;;
15939   :L)
15940   #
15941   # CONFIG_LINK
15942   #
15943
15944   if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
15945     :
15946   else
15947     # Prefer the file from the source tree if names are identical.
15948     if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
15949       ac_source=$srcdir/$ac_source
15950     fi
15951
15952     { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
15953 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
15954
15955     if test ! -r "$ac_source"; then
15956       as_fn_error $? "$ac_source: file not found" "$LINENO" 5
15957     fi
15958     rm -f "$ac_file"
15959
15960     # Try a relative symlink, then a hard link, then a copy.
15961     case $ac_source in
15962     [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
15963         *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
15964     esac
15965     ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
15966       ln "$ac_source" "$ac_file" 2>/dev/null ||
15967       cp -p "$ac_source" "$ac_file" ||
15968       as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
15969   fi
15970  ;;
15971   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
15972 $as_echo "$as_me: executing $ac_file commands" >&6;}
15973  ;;
15974   esac
15975
15976
15977   case $ac_file$ac_mode in
15978     "check_win32_symlinks":C)
15979 # Links sometimes fail undetected on Mingw -
15980 # so here we detect it and warn the user
15981 for FILE in $CONFIG_LINKS
15982  do
15983         # test -e works for symlinks in the MinGW console
15984         test -e `expr "$FILE" : '\([^:]*\)'` || { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** link for $FILE -- please fix by hand" >&5
15985 $as_echo "$as_me: WARNING: *** link for $FILE -- please fix by hand" >&2;}
15986  done
15987  ;;
15988     "src/include/pg_config.h":H)
15989 # Update timestamp for pg_config.h (see Makefile.global)
15990 echo >src/include/stamp-h
15991  ;;
15992     "src/include/pg_config_ext.h":H)
15993 # Update timestamp for pg_config_ext.h (see Makefile.global)
15994 echo >src/include/stamp-ext-h
15995  ;;
15996     "src/interfaces/ecpg/include/ecpg_config.h":H) echo >src/interfaces/ecpg/include/stamp-h ;;
15997
15998   esac
15999 done # for ac_tag
16000
16001
16002 as_fn_exit 0
16003 _ACEOF
16004 ac_clean_files=$ac_clean_files_save
16005
16006 test $ac_write_fail = 0 ||
16007   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
16008
16009
16010 # configure is writing to config.log, and then calls config.status.
16011 # config.status does its own redirection, appending to config.log.
16012 # Unfortunately, on DOS this fails, as config.log is still kept open
16013 # by configure, so config.status won't be able to write to it; its
16014 # output is simply discarded.  So we exec the FD to /dev/null,
16015 # effectively closing config.log, so it can be properly (re)opened and
16016 # appended to by config.status.  When coming back to configure, we
16017 # need to make the FD available again.
16018 if test "$no_create" != yes; then
16019   ac_cs_success=:
16020   ac_config_status_args=
16021   test "$silent" = yes &&
16022     ac_config_status_args="$ac_config_status_args --quiet"
16023   exec 5>/dev/null
16024   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
16025   exec 5>>config.log
16026   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16027   # would make configure fail if this is the last instruction.
16028   $ac_cs_success || as_fn_exit 1
16029 fi
16030 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16031   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16032 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
16033 fi
16034