]> granicus.if.org Git - postgresql/blob - configure
Fix handling of wide datetime input/output.
[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.4devel.
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.4devel'
586 PACKAGE_STRING='PostgreSQL 9.4devel'
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 OSX
631 XSLTPROC
632 COLLATEINDEX
633 DOCBOOKSTYLE
634 have_docbook
635 JADE
636 NSGMLS
637 TCL_SHLIB_LD_LIBS
638 TCL_SHARED_BUILD
639 TCL_LIB_SPEC
640 TCL_LIBS
641 TCL_LIB_FILE
642 TCL_INCLUDE_SPEC
643 TCL_CONFIG_SH
644 TCLSH
645 XGETTEXT
646 MSGMERGE
647 MSGFMT_FLAGS
648 MSGFMT
649 HAVE_POSIX_SIGNALS
650 LDAP_LIBS_BE
651 LDAP_LIBS_FE
652 PTHREAD_CFLAGS
653 PTHREAD_LIBS
654 PTHREAD_CC
655 acx_pthread_config
656 have_win32_dbghelp
657 HAVE_IPV6
658 LIBOBJS
659 OSSP_UUID_LIBS
660 ZIC
661 python_enable_shared
662 python_additional_libs
663 python_libspec
664 python_libdir
665 python_includespec
666 python_version
667 python_majorversion
668 PYTHON
669 perl_embed_ldflags
670 perl_useshrplib
671 perl_privlibexp
672 perl_archlibexp
673 PERL
674 FLEXFLAGS
675 FLEX
676 BISONFLAGS
677 BISON
678 MKDIR_P
679 AWK
680 LN_S
681 TAR
682 install_bin
683 INSTALL_DATA
684 INSTALL_SCRIPT
685 INSTALL_PROGRAM
686 WINDRES
687 DLLWRAP
688 DLLTOOL
689 AR
690 STRIP_SHARED_LIB
691 STRIP_STATIC_LIB
692 STRIP
693 RANLIB
694 ld_R_works
695 with_gnu_ld
696 LD
697 LDFLAGS_SL
698 LDFLAGS_EX
699 ELF_SYS
700 EGREP
701 GREP
702 with_zlib
703 with_system_tzdata
704 with_libxslt
705 with_libxml
706 XML2_CONFIG
707 with_ossp_uuid
708 with_selinux
709 with_openssl
710 krb_srvtab
711 with_python
712 with_perl
713 with_tcl
714 enable_thread_safety
715 INCLUDES
716 autodepend
717 TAS
718 GCC
719 CPP
720 CFLAGS_VECTOR
721 SUN_STUDIO_CC
722 OBJEXT
723 EXEEXT
724 ac_ct_CC
725 CPPFLAGS
726 LDFLAGS
727 CFLAGS
728 CC
729 enable_dtrace
730 DTRACEFLAGS
731 DTRACE
732 enable_coverage
733 GENHTML
734 LCOV
735 GCOV
736 enable_debug
737 enable_rpath
738 default_port
739 WANTED_LANGUAGES
740 enable_nls
741 PORTNAME
742 host_os
743 host_vendor
744 host_cpu
745 host
746 build_os
747 build_vendor
748 build_cpu
749 build
750 PG_MAJORVERSION
751 configure_args
752 target_alias
753 host_alias
754 build_alias
755 LIBS
756 ECHO_T
757 ECHO_N
758 ECHO_C
759 DEFS
760 mandir
761 localedir
762 libdir
763 psdir
764 pdfdir
765 dvidir
766 htmldir
767 infodir
768 docdir
769 oldincludedir
770 includedir
771 localstatedir
772 sharedstatedir
773 sysconfdir
774 datadir
775 datarootdir
776 libexecdir
777 sbindir
778 bindir
779 program_transform_name
780 prefix
781 exec_prefix
782 PACKAGE_URL
783 PACKAGE_BUGREPORT
784 PACKAGE_STRING
785 PACKAGE_VERSION
786 PACKAGE_TARNAME
787 PACKAGE_NAME
788 PATH_SEPARATOR
789 SHELL'
790 ac_subst_files=''
791 ac_user_opts='
792 enable_option_checking
793 with_extra_version
794 with_template
795 with_includes
796 with_libraries
797 with_libs
798 enable_integer_datetimes
799 enable_nls
800 with_pgport
801 enable_rpath
802 enable_spinlocks
803 enable_debug
804 enable_profiling
805 enable_coverage
806 enable_dtrace
807 with_blocksize
808 with_segsize
809 with_wal_blocksize
810 with_wal_segsize
811 with_CC
812 enable_depend
813 enable_cassert
814 enable_thread_safety
815 with_tcl
816 with_tclconfig
817 with_perl
818 with_python
819 with_gssapi
820 with_krb_srvnam
821 with_pam
822 with_ldap
823 with_bonjour
824 with_openssl
825 with_selinux
826 with_readline
827 with_libedit_preferred
828 with_ossp_uuid
829 with_libxml
830 with_libxslt
831 with_system_tzdata
832 with_zlib
833 with_gnu_ld
834 enable_largefile
835 enable_float4_byval
836 enable_float8_byval
837 '
838       ac_precious_vars='build_alias
839 host_alias
840 target_alias
841 CC
842 CFLAGS
843 LDFLAGS
844 LIBS
845 CPPFLAGS
846 CPP
847 LDFLAGS_EX
848 LDFLAGS_SL
849 DOCBOOKSTYLE'
850
851
852 # Initialize some variables set by options.
853 ac_init_help=
854 ac_init_version=false
855 ac_unrecognized_opts=
856 ac_unrecognized_sep=
857 # The variables have the same names as the options, with
858 # dashes changed to underlines.
859 cache_file=/dev/null
860 exec_prefix=NONE
861 no_create=
862 no_recursion=
863 prefix=NONE
864 program_prefix=NONE
865 program_suffix=NONE
866 program_transform_name=s,x,x,
867 silent=
868 site=
869 srcdir=
870 verbose=
871 x_includes=NONE
872 x_libraries=NONE
873
874 # Installation directory options.
875 # These are left unexpanded so users can "make install exec_prefix=/foo"
876 # and all the variables that are supposed to be based on exec_prefix
877 # by default will actually change.
878 # Use braces instead of parens because sh, perl, etc. also accept them.
879 # (The list follows the same order as the GNU Coding Standards.)
880 bindir='${exec_prefix}/bin'
881 sbindir='${exec_prefix}/sbin'
882 libexecdir='${exec_prefix}/libexec'
883 datarootdir='${prefix}/share'
884 datadir='${datarootdir}'
885 sysconfdir='${prefix}/etc'
886 sharedstatedir='${prefix}/com'
887 localstatedir='${prefix}/var'
888 includedir='${prefix}/include'
889 oldincludedir='/usr/include'
890 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
891 infodir='${datarootdir}/info'
892 htmldir='${docdir}'
893 dvidir='${docdir}'
894 pdfdir='${docdir}'
895 psdir='${docdir}'
896 libdir='${exec_prefix}/lib'
897 localedir='${datarootdir}/locale'
898 mandir='${datarootdir}/man'
899
900 ac_prev=
901 ac_dashdash=
902 for ac_option
903 do
904   # If the previous option needs an argument, assign it.
905   if test -n "$ac_prev"; then
906     eval $ac_prev=\$ac_option
907     ac_prev=
908     continue
909   fi
910
911   case $ac_option in
912   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
913   *=)   ac_optarg= ;;
914   *)    ac_optarg=yes ;;
915   esac
916
917   # Accept the important Cygnus configure options, so we can diagnose typos.
918
919   case $ac_dashdash$ac_option in
920   --)
921     ac_dashdash=yes ;;
922
923   -bindir | --bindir | --bindi | --bind | --bin | --bi)
924     ac_prev=bindir ;;
925   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
926     bindir=$ac_optarg ;;
927
928   -build | --build | --buil | --bui | --bu)
929     ac_prev=build_alias ;;
930   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
931     build_alias=$ac_optarg ;;
932
933   -cache-file | --cache-file | --cache-fil | --cache-fi \
934   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
935     ac_prev=cache_file ;;
936   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
937   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
938     cache_file=$ac_optarg ;;
939
940   --config-cache | -C)
941     cache_file=config.cache ;;
942
943   -datadir | --datadir | --datadi | --datad)
944     ac_prev=datadir ;;
945   -datadir=* | --datadir=* | --datadi=* | --datad=*)
946     datadir=$ac_optarg ;;
947
948   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
949   | --dataroo | --dataro | --datar)
950     ac_prev=datarootdir ;;
951   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
952   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
953     datarootdir=$ac_optarg ;;
954
955   -disable-* | --disable-*)
956     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
957     # Reject names that are not valid shell variable names.
958     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
959       as_fn_error $? "invalid feature name: $ac_useropt"
960     ac_useropt_orig=$ac_useropt
961     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
962     case $ac_user_opts in
963       *"
964 "enable_$ac_useropt"
965 "*) ;;
966       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
967          ac_unrecognized_sep=', ';;
968     esac
969     eval enable_$ac_useropt=no ;;
970
971   -docdir | --docdir | --docdi | --doc | --do)
972     ac_prev=docdir ;;
973   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
974     docdir=$ac_optarg ;;
975
976   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
977     ac_prev=dvidir ;;
978   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
979     dvidir=$ac_optarg ;;
980
981   -enable-* | --enable-*)
982     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
983     # Reject names that are not valid shell variable names.
984     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
985       as_fn_error $? "invalid feature name: $ac_useropt"
986     ac_useropt_orig=$ac_useropt
987     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
988     case $ac_user_opts in
989       *"
990 "enable_$ac_useropt"
991 "*) ;;
992       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
993          ac_unrecognized_sep=', ';;
994     esac
995     eval enable_$ac_useropt=\$ac_optarg ;;
996
997   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
998   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
999   | --exec | --exe | --ex)
1000     ac_prev=exec_prefix ;;
1001   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1002   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1003   | --exec=* | --exe=* | --ex=*)
1004     exec_prefix=$ac_optarg ;;
1005
1006   -gas | --gas | --ga | --g)
1007     # Obsolete; use --with-gas.
1008     with_gas=yes ;;
1009
1010   -help | --help | --hel | --he | -h)
1011     ac_init_help=long ;;
1012   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1013     ac_init_help=recursive ;;
1014   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1015     ac_init_help=short ;;
1016
1017   -host | --host | --hos | --ho)
1018     ac_prev=host_alias ;;
1019   -host=* | --host=* | --hos=* | --ho=*)
1020     host_alias=$ac_optarg ;;
1021
1022   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1023     ac_prev=htmldir ;;
1024   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1025   | --ht=*)
1026     htmldir=$ac_optarg ;;
1027
1028   -includedir | --includedir | --includedi | --included | --include \
1029   | --includ | --inclu | --incl | --inc)
1030     ac_prev=includedir ;;
1031   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1032   | --includ=* | --inclu=* | --incl=* | --inc=*)
1033     includedir=$ac_optarg ;;
1034
1035   -infodir | --infodir | --infodi | --infod | --info | --inf)
1036     ac_prev=infodir ;;
1037   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1038     infodir=$ac_optarg ;;
1039
1040   -libdir | --libdir | --libdi | --libd)
1041     ac_prev=libdir ;;
1042   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1043     libdir=$ac_optarg ;;
1044
1045   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1046   | --libexe | --libex | --libe)
1047     ac_prev=libexecdir ;;
1048   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1049   | --libexe=* | --libex=* | --libe=*)
1050     libexecdir=$ac_optarg ;;
1051
1052   -localedir | --localedir | --localedi | --localed | --locale)
1053     ac_prev=localedir ;;
1054   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1055     localedir=$ac_optarg ;;
1056
1057   -localstatedir | --localstatedir | --localstatedi | --localstated \
1058   | --localstate | --localstat | --localsta | --localst | --locals)
1059     ac_prev=localstatedir ;;
1060   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1061   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1062     localstatedir=$ac_optarg ;;
1063
1064   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1065     ac_prev=mandir ;;
1066   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1067     mandir=$ac_optarg ;;
1068
1069   -nfp | --nfp | --nf)
1070     # Obsolete; use --without-fp.
1071     with_fp=no ;;
1072
1073   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1074   | --no-cr | --no-c | -n)
1075     no_create=yes ;;
1076
1077   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1078   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1079     no_recursion=yes ;;
1080
1081   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1082   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1083   | --oldin | --oldi | --old | --ol | --o)
1084     ac_prev=oldincludedir ;;
1085   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1086   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1087   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1088     oldincludedir=$ac_optarg ;;
1089
1090   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1091     ac_prev=prefix ;;
1092   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1093     prefix=$ac_optarg ;;
1094
1095   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1096   | --program-pre | --program-pr | --program-p)
1097     ac_prev=program_prefix ;;
1098   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1099   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1100     program_prefix=$ac_optarg ;;
1101
1102   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1103   | --program-suf | --program-su | --program-s)
1104     ac_prev=program_suffix ;;
1105   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1106   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1107     program_suffix=$ac_optarg ;;
1108
1109   -program-transform-name | --program-transform-name \
1110   | --program-transform-nam | --program-transform-na \
1111   | --program-transform-n | --program-transform- \
1112   | --program-transform | --program-transfor \
1113   | --program-transfo | --program-transf \
1114   | --program-trans | --program-tran \
1115   | --progr-tra | --program-tr | --program-t)
1116     ac_prev=program_transform_name ;;
1117   -program-transform-name=* | --program-transform-name=* \
1118   | --program-transform-nam=* | --program-transform-na=* \
1119   | --program-transform-n=* | --program-transform-=* \
1120   | --program-transform=* | --program-transfor=* \
1121   | --program-transfo=* | --program-transf=* \
1122   | --program-trans=* | --program-tran=* \
1123   | --progr-tra=* | --program-tr=* | --program-t=*)
1124     program_transform_name=$ac_optarg ;;
1125
1126   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1127     ac_prev=pdfdir ;;
1128   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1129     pdfdir=$ac_optarg ;;
1130
1131   -psdir | --psdir | --psdi | --psd | --ps)
1132     ac_prev=psdir ;;
1133   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1134     psdir=$ac_optarg ;;
1135
1136   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1137   | -silent | --silent | --silen | --sile | --sil)
1138     silent=yes ;;
1139
1140   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1141     ac_prev=sbindir ;;
1142   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1143   | --sbi=* | --sb=*)
1144     sbindir=$ac_optarg ;;
1145
1146   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1147   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1148   | --sharedst | --shareds | --shared | --share | --shar \
1149   | --sha | --sh)
1150     ac_prev=sharedstatedir ;;
1151   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1152   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1153   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1154   | --sha=* | --sh=*)
1155     sharedstatedir=$ac_optarg ;;
1156
1157   -site | --site | --sit)
1158     ac_prev=site ;;
1159   -site=* | --site=* | --sit=*)
1160     site=$ac_optarg ;;
1161
1162   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1163     ac_prev=srcdir ;;
1164   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1165     srcdir=$ac_optarg ;;
1166
1167   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1168   | --syscon | --sysco | --sysc | --sys | --sy)
1169     ac_prev=sysconfdir ;;
1170   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1171   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1172     sysconfdir=$ac_optarg ;;
1173
1174   -target | --target | --targe | --targ | --tar | --ta | --t)
1175     ac_prev=target_alias ;;
1176   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1177     target_alias=$ac_optarg ;;
1178
1179   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1180     verbose=yes ;;
1181
1182   -version | --version | --versio | --versi | --vers | -V)
1183     ac_init_version=: ;;
1184
1185   -with-* | --with-*)
1186     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1187     # Reject names that are not valid shell variable names.
1188     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1189       as_fn_error $? "invalid package name: $ac_useropt"
1190     ac_useropt_orig=$ac_useropt
1191     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1192     case $ac_user_opts in
1193       *"
1194 "with_$ac_useropt"
1195 "*) ;;
1196       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1197          ac_unrecognized_sep=', ';;
1198     esac
1199     eval with_$ac_useropt=\$ac_optarg ;;
1200
1201   -without-* | --without-*)
1202     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1203     # Reject names that are not valid shell variable names.
1204     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1205       as_fn_error $? "invalid package name: $ac_useropt"
1206     ac_useropt_orig=$ac_useropt
1207     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1208     case $ac_user_opts in
1209       *"
1210 "with_$ac_useropt"
1211 "*) ;;
1212       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1213          ac_unrecognized_sep=', ';;
1214     esac
1215     eval with_$ac_useropt=no ;;
1216
1217   --x)
1218     # Obsolete; use --with-x.
1219     with_x=yes ;;
1220
1221   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1222   | --x-incl | --x-inc | --x-in | --x-i)
1223     ac_prev=x_includes ;;
1224   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1225   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1226     x_includes=$ac_optarg ;;
1227
1228   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1229   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1230     ac_prev=x_libraries ;;
1231   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1232   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1233     x_libraries=$ac_optarg ;;
1234
1235   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1236 Try \`$0 --help' for more information"
1237     ;;
1238
1239   *=*)
1240     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1241     # Reject names that are not valid shell variable names.
1242     case $ac_envvar in #(
1243       '' | [0-9]* | *[!_$as_cr_alnum]* )
1244       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1245     esac
1246     eval $ac_envvar=\$ac_optarg
1247     export $ac_envvar ;;
1248
1249   *)
1250     # FIXME: should be removed in autoconf 3.0.
1251     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1252     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1253       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1254     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1255     ;;
1256
1257   esac
1258 done
1259
1260 if test -n "$ac_prev"; then
1261   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1262   as_fn_error $? "missing argument to $ac_option"
1263 fi
1264
1265 if test -n "$ac_unrecognized_opts"; then
1266   case $enable_option_checking in
1267     no) ;;
1268     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1269     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1270   esac
1271 fi
1272
1273 # Check all directory arguments for consistency.
1274 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1275                 datadir sysconfdir sharedstatedir localstatedir includedir \
1276                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1277                 libdir localedir mandir
1278 do
1279   eval ac_val=\$$ac_var
1280   # Remove trailing slashes.
1281   case $ac_val in
1282     */ )
1283       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1284       eval $ac_var=\$ac_val;;
1285   esac
1286   # Be sure to have absolute directory names.
1287   case $ac_val in
1288     [\\/$]* | ?:[\\/]* )  continue;;
1289     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1290   esac
1291   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1292 done
1293
1294 # There might be people who depend on the old broken behavior: `$host'
1295 # used to hold the argument of --host etc.
1296 # FIXME: To remove some day.
1297 build=$build_alias
1298 host=$host_alias
1299 target=$target_alias
1300
1301 # FIXME: To remove some day.
1302 if test "x$host_alias" != x; then
1303   if test "x$build_alias" = x; then
1304     cross_compiling=maybe
1305   elif test "x$build_alias" != "x$host_alias"; then
1306     cross_compiling=yes
1307   fi
1308 fi
1309
1310 ac_tool_prefix=
1311 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1312
1313 test "$silent" = yes && exec 6>/dev/null
1314
1315
1316 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1317 ac_ls_di=`ls -di .` &&
1318 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1319   as_fn_error $? "working directory cannot be determined"
1320 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1321   as_fn_error $? "pwd does not report name of working directory"
1322
1323
1324 # Find the source files, if location was not specified.
1325 if test -z "$srcdir"; then
1326   ac_srcdir_defaulted=yes
1327   # Try the directory containing this script, then the parent directory.
1328   ac_confdir=`$as_dirname -- "$as_myself" ||
1329 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1330          X"$as_myself" : 'X\(//\)[^/]' \| \
1331          X"$as_myself" : 'X\(//\)$' \| \
1332          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1333 $as_echo X"$as_myself" |
1334     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1335             s//\1/
1336             q
1337           }
1338           /^X\(\/\/\)[^/].*/{
1339             s//\1/
1340             q
1341           }
1342           /^X\(\/\/\)$/{
1343             s//\1/
1344             q
1345           }
1346           /^X\(\/\).*/{
1347             s//\1/
1348             q
1349           }
1350           s/.*/./; q'`
1351   srcdir=$ac_confdir
1352   if test ! -r "$srcdir/$ac_unique_file"; then
1353     srcdir=..
1354   fi
1355 else
1356   ac_srcdir_defaulted=no
1357 fi
1358 if test ! -r "$srcdir/$ac_unique_file"; then
1359   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1360   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1361 fi
1362 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1363 ac_abs_confdir=`(
1364         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1365         pwd)`
1366 # When building in place, set srcdir=.
1367 if test "$ac_abs_confdir" = "$ac_pwd"; then
1368   srcdir=.
1369 fi
1370 # Remove unnecessary trailing slashes from srcdir.
1371 # Double slashes in file names in object file debugging info
1372 # mess up M-x gdb in Emacs.
1373 case $srcdir in
1374 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1375 esac
1376 for ac_var in $ac_precious_vars; do
1377   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1378   eval ac_env_${ac_var}_value=\$${ac_var}
1379   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1380   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1381 done
1382
1383 #
1384 # Report the --help message.
1385 #
1386 if test "$ac_init_help" = "long"; then
1387   # Omit some internal or obsolete options to make the list less imposing.
1388   # This message is too long to be a string in the A/UX 3.1 sh.
1389   cat <<_ACEOF
1390 \`configure' configures PostgreSQL 9.4devel to adapt to many kinds of systems.
1391
1392 Usage: $0 [OPTION]... [VAR=VALUE]...
1393
1394 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1395 VAR=VALUE.  See below for descriptions of some of the useful variables.
1396
1397 Defaults for the options are specified in brackets.
1398
1399 Configuration:
1400   -h, --help              display this help and exit
1401       --help=short        display options specific to this package
1402       --help=recursive    display the short help of all the included packages
1403   -V, --version           display version information and exit
1404   -q, --quiet, --silent   do not print \`checking ...' messages
1405       --cache-file=FILE   cache test results in FILE [disabled]
1406   -C, --config-cache      alias for \`--cache-file=config.cache'
1407   -n, --no-create         do not create output files
1408       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1409
1410 Installation directories:
1411   --prefix=PREFIX         install architecture-independent files in PREFIX
1412                           [$ac_default_prefix]
1413   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1414                           [PREFIX]
1415
1416 By default, \`make install' will install all the files in
1417 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1418 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1419 for instance \`--prefix=\$HOME'.
1420
1421 For better control, use the options below.
1422
1423 Fine tuning of the installation directories:
1424   --bindir=DIR            user executables [EPREFIX/bin]
1425   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1426   --libexecdir=DIR        program executables [EPREFIX/libexec]
1427   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1428   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1429   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1430   --libdir=DIR            object code libraries [EPREFIX/lib]
1431   --includedir=DIR        C header files [PREFIX/include]
1432   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1433   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1434   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1435   --infodir=DIR           info documentation [DATAROOTDIR/info]
1436   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1437   --mandir=DIR            man documentation [DATAROOTDIR/man]
1438   --docdir=DIR            documentation root [DATAROOTDIR/doc/postgresql]
1439   --htmldir=DIR           html documentation [DOCDIR]
1440   --dvidir=DIR            dvi documentation [DOCDIR]
1441   --pdfdir=DIR            pdf documentation [DOCDIR]
1442   --psdir=DIR             ps documentation [DOCDIR]
1443 _ACEOF
1444
1445   cat <<\_ACEOF
1446
1447 System types:
1448   --build=BUILD     configure for building on BUILD [guessed]
1449   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1450 _ACEOF
1451 fi
1452
1453 if test -n "$ac_init_help"; then
1454   case $ac_init_help in
1455      short | recursive ) echo "Configuration of PostgreSQL 9.4devel:";;
1456    esac
1457   cat <<\_ACEOF
1458
1459 Optional Features:
1460   --disable-option-checking  ignore unrecognized --enable/--with options
1461   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1462   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1463   --disable-integer-datetimes
1464                           disable 64-bit integer date/time support
1465   --enable-nls[=LANGUAGES]
1466                           enable Native Language Support
1467   --disable-rpath         do not embed shared library search path in
1468                           executables
1469   --disable-spinlocks     do not use spinlocks
1470   --enable-debug          build with debugging symbols (-g)
1471   --enable-profiling      build with profiling enabled
1472   --enable-coverage       build with coverage testing instrumentation
1473   --enable-dtrace         build with DTrace support
1474   --enable-depend         turn on automatic dependency tracking
1475   --enable-cassert        enable assertion checks (for debugging)
1476   --disable-thread-safety disable thread-safety in client libraries
1477   --disable-largefile     omit support for large files
1478   --disable-float4-byval  disable float4 passed by value
1479   --disable-float8-byval  disable float8 passed by value
1480
1481 Optional Packages:
1482   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1483   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1484   --with-extra-version=STRING
1485                           append STRING to version
1486   --with-template=NAME    override operating system template
1487   --with-includes=DIRS    look for additional header files in DIRS
1488   --with-libraries=DIRS   look for additional libraries in DIRS
1489   --with-libs=DIRS        alternative spelling of --with-libraries
1490   --with-pgport=PORTNUM   set default port number [5432]
1491   --with-blocksize=BLOCKSIZE
1492                           set table block size in kB [8]
1493   --with-segsize=SEGSIZE  set table segment size in GB [1]
1494   --with-wal-blocksize=BLOCKSIZE
1495                           set WAL block size in kB [8]
1496   --with-wal-segsize=SEGSIZE
1497                           set WAL segment size in MB [16]
1498   --with-CC=CMD           set compiler (deprecated)
1499   --with-tcl              build Tcl modules (PL/Tcl)
1500   --with-tclconfig=DIR    tclConfig.sh is in DIR
1501   --with-perl             build Perl modules (PL/Perl)
1502   --with-python           build Python modules (PL/Python)
1503   --with-gssapi           build with GSSAPI support
1504   --with-krb-srvnam=NAME  default service principal name in Kerberos (GSSAPI)
1505                           [postgres]
1506   --with-pam              build with PAM support
1507   --with-ldap             build with LDAP support
1508   --with-bonjour          build with Bonjour support
1509   --with-openssl          build with OpenSSL support
1510   --with-selinux          build with SELinux support
1511   --without-readline      do not use GNU Readline nor BSD Libedit for editing
1512   --with-libedit-preferred
1513                           prefer BSD Libedit over GNU Readline
1514   --with-ossp-uuid        build contrib/uuid-ossp, requires OSSP UUID library
1515   --with-libxml           build with XML support
1516   --with-libxslt          use XSLT support when building contrib/xml2
1517   --with-system-tzdata=DIR
1518                           use system time zone data in DIR
1519   --without-zlib          do not use Zlib
1520   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1521
1522 Some influential environment variables:
1523   CC          C compiler command
1524   CFLAGS      C compiler flags
1525   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1526               nonstandard directory <lib dir>
1527   LIBS        libraries to pass to the linker, e.g. -l<library>
1528   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1529               you have headers in a nonstandard directory <include dir>
1530   CPP         C preprocessor
1531   LDFLAGS_EX  extra linker flags for linking executables only
1532   LDFLAGS_SL  extra linker flags for linking shared libraries only
1533   DOCBOOKSTYLE
1534               location of DocBook stylesheets
1535
1536 Use these variables to override the choices made by `configure' or to help
1537 it to find libraries and programs with nonstandard names/locations.
1538
1539 Report bugs to <pgsql-bugs@postgresql.org>.
1540 _ACEOF
1541 ac_status=$?
1542 fi
1543
1544 if test "$ac_init_help" = "recursive"; then
1545   # If there are subdirs, report their specific --help.
1546   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1547     test -d "$ac_dir" ||
1548       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1549       continue
1550     ac_builddir=.
1551
1552 case "$ac_dir" in
1553 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1554 *)
1555   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1556   # A ".." for each directory in $ac_dir_suffix.
1557   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1558   case $ac_top_builddir_sub in
1559   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1560   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1561   esac ;;
1562 esac
1563 ac_abs_top_builddir=$ac_pwd
1564 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1565 # for backward compatibility:
1566 ac_top_builddir=$ac_top_build_prefix
1567
1568 case $srcdir in
1569   .)  # We are building in place.
1570     ac_srcdir=.
1571     ac_top_srcdir=$ac_top_builddir_sub
1572     ac_abs_top_srcdir=$ac_pwd ;;
1573   [\\/]* | ?:[\\/]* )  # Absolute name.
1574     ac_srcdir=$srcdir$ac_dir_suffix;
1575     ac_top_srcdir=$srcdir
1576     ac_abs_top_srcdir=$srcdir ;;
1577   *) # Relative name.
1578     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1579     ac_top_srcdir=$ac_top_build_prefix$srcdir
1580     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1581 esac
1582 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1583
1584     cd "$ac_dir" || { ac_status=$?; continue; }
1585     # Check for guested configure.
1586     if test -f "$ac_srcdir/configure.gnu"; then
1587       echo &&
1588       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1589     elif test -f "$ac_srcdir/configure"; then
1590       echo &&
1591       $SHELL "$ac_srcdir/configure" --help=recursive
1592     else
1593       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1594     fi || ac_status=$?
1595     cd "$ac_pwd" || { ac_status=$?; break; }
1596   done
1597 fi
1598
1599 test -n "$ac_init_help" && exit $ac_status
1600 if $ac_init_version; then
1601   cat <<\_ACEOF
1602 PostgreSQL configure 9.4devel
1603 generated by GNU Autoconf 2.69
1604
1605 Copyright (C) 2012 Free Software Foundation, Inc.
1606 This configure script is free software; the Free Software Foundation
1607 gives unlimited permission to copy, distribute and modify it.
1608
1609 Copyright (c) 1996-2014, PostgreSQL Global Development Group
1610 _ACEOF
1611   exit
1612 fi
1613
1614 ## ------------------------ ##
1615 ## Autoconf initialization. ##
1616 ## ------------------------ ##
1617
1618 # ac_fn_c_try_compile LINENO
1619 # --------------------------
1620 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1621 ac_fn_c_try_compile ()
1622 {
1623   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1624   rm -f conftest.$ac_objext
1625   if { { ac_try="$ac_compile"
1626 case "(($ac_try" in
1627   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1628   *) ac_try_echo=$ac_try;;
1629 esac
1630 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1631 $as_echo "$ac_try_echo"; } >&5
1632   (eval "$ac_compile") 2>conftest.err
1633   ac_status=$?
1634   if test -s conftest.err; then
1635     grep -v '^ *+' conftest.err >conftest.er1
1636     cat conftest.er1 >&5
1637     mv -f conftest.er1 conftest.err
1638   fi
1639   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1640   test $ac_status = 0; } && {
1641          test -z "$ac_c_werror_flag" ||
1642          test ! -s conftest.err
1643        } && test -s conftest.$ac_objext; then :
1644   ac_retval=0
1645 else
1646   $as_echo "$as_me: failed program was:" >&5
1647 sed 's/^/| /' conftest.$ac_ext >&5
1648
1649         ac_retval=1
1650 fi
1651   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1652   as_fn_set_status $ac_retval
1653
1654 } # ac_fn_c_try_compile
1655
1656 # ac_fn_c_try_link LINENO
1657 # -----------------------
1658 # Try to link conftest.$ac_ext, and return whether this succeeded.
1659 ac_fn_c_try_link ()
1660 {
1661   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1662   rm -f conftest.$ac_objext conftest$ac_exeext
1663   if { { ac_try="$ac_link"
1664 case "(($ac_try" in
1665   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1666   *) ac_try_echo=$ac_try;;
1667 esac
1668 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1669 $as_echo "$ac_try_echo"; } >&5
1670   (eval "$ac_link") 2>conftest.err
1671   ac_status=$?
1672   if test -s conftest.err; then
1673     grep -v '^ *+' conftest.err >conftest.er1
1674     cat conftest.er1 >&5
1675     mv -f conftest.er1 conftest.err
1676   fi
1677   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1678   test $ac_status = 0; } && {
1679          test -z "$ac_c_werror_flag" ||
1680          test ! -s conftest.err
1681        } && test -s conftest$ac_exeext && {
1682          test "$cross_compiling" = yes ||
1683          test -x conftest$ac_exeext
1684        }; then :
1685   ac_retval=0
1686 else
1687   $as_echo "$as_me: failed program was:" >&5
1688 sed 's/^/| /' conftest.$ac_ext >&5
1689
1690         ac_retval=1
1691 fi
1692   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1693   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1694   # interfere with the next link command; also delete a directory that is
1695   # left behind by Apple's compiler.  We do this before executing the actions.
1696   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1697   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1698   as_fn_set_status $ac_retval
1699
1700 } # ac_fn_c_try_link
1701
1702 # ac_fn_c_try_cpp LINENO
1703 # ----------------------
1704 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1705 ac_fn_c_try_cpp ()
1706 {
1707   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1708   if { { ac_try="$ac_cpp conftest.$ac_ext"
1709 case "(($ac_try" in
1710   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1711   *) ac_try_echo=$ac_try;;
1712 esac
1713 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1714 $as_echo "$ac_try_echo"; } >&5
1715   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1716   ac_status=$?
1717   if test -s conftest.err; then
1718     grep -v '^ *+' conftest.err >conftest.er1
1719     cat conftest.er1 >&5
1720     mv -f conftest.er1 conftest.err
1721   fi
1722   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1723   test $ac_status = 0; } > conftest.i && {
1724          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1725          test ! -s conftest.err
1726        }; then :
1727   ac_retval=0
1728 else
1729   $as_echo "$as_me: failed program was:" >&5
1730 sed 's/^/| /' conftest.$ac_ext >&5
1731
1732     ac_retval=1
1733 fi
1734   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1735   as_fn_set_status $ac_retval
1736
1737 } # ac_fn_c_try_cpp
1738
1739 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1740 # -------------------------------------------------------
1741 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1742 # the include files in INCLUDES and setting the cache variable VAR
1743 # accordingly.
1744 ac_fn_c_check_header_mongrel ()
1745 {
1746   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1747   if eval \${$3+:} false; then :
1748   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1749 $as_echo_n "checking for $2... " >&6; }
1750 if eval \${$3+:} false; then :
1751   $as_echo_n "(cached) " >&6
1752 fi
1753 eval ac_res=\$$3
1754                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1755 $as_echo "$ac_res" >&6; }
1756 else
1757   # Is the header compilable?
1758 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1759 $as_echo_n "checking $2 usability... " >&6; }
1760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1761 /* end confdefs.h.  */
1762 $4
1763 #include <$2>
1764 _ACEOF
1765 if ac_fn_c_try_compile "$LINENO"; then :
1766   ac_header_compiler=yes
1767 else
1768   ac_header_compiler=no
1769 fi
1770 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1772 $as_echo "$ac_header_compiler" >&6; }
1773
1774 # Is the header present?
1775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1776 $as_echo_n "checking $2 presence... " >&6; }
1777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1778 /* end confdefs.h.  */
1779 #include <$2>
1780 _ACEOF
1781 if ac_fn_c_try_cpp "$LINENO"; then :
1782   ac_header_preproc=yes
1783 else
1784   ac_header_preproc=no
1785 fi
1786 rm -f conftest.err conftest.i conftest.$ac_ext
1787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1788 $as_echo "$ac_header_preproc" >&6; }
1789
1790 # So?  What about this header?
1791 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1792   yes:no: )
1793     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1794 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1795     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1796 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1797     ;;
1798   no:yes:* )
1799     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1800 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1801     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1802 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1803     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1804 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1805     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1806 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1807     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1808 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1809 ( $as_echo "## ---------------------------------------- ##
1810 ## Report this to pgsql-bugs@postgresql.org ##
1811 ## ---------------------------------------- ##"
1812      ) | sed "s/^/$as_me: WARNING:     /" >&2
1813     ;;
1814 esac
1815   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1816 $as_echo_n "checking for $2... " >&6; }
1817 if eval \${$3+:} false; then :
1818   $as_echo_n "(cached) " >&6
1819 else
1820   eval "$3=\$ac_header_compiler"
1821 fi
1822 eval ac_res=\$$3
1823                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1824 $as_echo "$ac_res" >&6; }
1825 fi
1826   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1827
1828 } # ac_fn_c_check_header_mongrel
1829
1830 # ac_fn_c_try_run LINENO
1831 # ----------------------
1832 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1833 # that executables *can* be run.
1834 ac_fn_c_try_run ()
1835 {
1836   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1837   if { { ac_try="$ac_link"
1838 case "(($ac_try" in
1839   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1840   *) ac_try_echo=$ac_try;;
1841 esac
1842 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1843 $as_echo "$ac_try_echo"; } >&5
1844   (eval "$ac_link") 2>&5
1845   ac_status=$?
1846   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1847   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1848   { { case "(($ac_try" in
1849   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1850   *) ac_try_echo=$ac_try;;
1851 esac
1852 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1853 $as_echo "$ac_try_echo"; } >&5
1854   (eval "$ac_try") 2>&5
1855   ac_status=$?
1856   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1857   test $ac_status = 0; }; }; then :
1858   ac_retval=0
1859 else
1860   $as_echo "$as_me: program exited with status $ac_status" >&5
1861        $as_echo "$as_me: failed program was:" >&5
1862 sed 's/^/| /' conftest.$ac_ext >&5
1863
1864        ac_retval=$ac_status
1865 fi
1866   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1867   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1868   as_fn_set_status $ac_retval
1869
1870 } # ac_fn_c_try_run
1871
1872 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1873 # -------------------------------------------------------
1874 # Tests whether HEADER exists and can be compiled using the include files in
1875 # INCLUDES, setting the cache variable VAR accordingly.
1876 ac_fn_c_check_header_compile ()
1877 {
1878   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1879   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1880 $as_echo_n "checking for $2... " >&6; }
1881 if eval \${$3+:} false; then :
1882   $as_echo_n "(cached) " >&6
1883 else
1884   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1885 /* end confdefs.h.  */
1886 $4
1887 #include <$2>
1888 _ACEOF
1889 if ac_fn_c_try_compile "$LINENO"; then :
1890   eval "$3=yes"
1891 else
1892   eval "$3=no"
1893 fi
1894 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1895 fi
1896 eval ac_res=\$$3
1897                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1898 $as_echo "$ac_res" >&6; }
1899   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1900
1901 } # ac_fn_c_check_header_compile
1902
1903 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
1904 # ----------------------------------------------------
1905 # Tries to find if the field MEMBER exists in type AGGR, after including
1906 # INCLUDES, setting cache variable VAR accordingly.
1907 ac_fn_c_check_member ()
1908 {
1909   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1910   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
1911 $as_echo_n "checking for $2.$3... " >&6; }
1912 if eval \${$4+:} false; then :
1913   $as_echo_n "(cached) " >&6
1914 else
1915   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1916 /* end confdefs.h.  */
1917 $5
1918 int
1919 main ()
1920 {
1921 static $2 ac_aggr;
1922 if (ac_aggr.$3)
1923 return 0;
1924   ;
1925   return 0;
1926 }
1927 _ACEOF
1928 if ac_fn_c_try_compile "$LINENO"; then :
1929   eval "$4=yes"
1930 else
1931   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1932 /* end confdefs.h.  */
1933 $5
1934 int
1935 main ()
1936 {
1937 static $2 ac_aggr;
1938 if (sizeof ac_aggr.$3)
1939 return 0;
1940   ;
1941   return 0;
1942 }
1943 _ACEOF
1944 if ac_fn_c_try_compile "$LINENO"; then :
1945   eval "$4=yes"
1946 else
1947   eval "$4=no"
1948 fi
1949 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1950 fi
1951 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1952 fi
1953 eval ac_res=\$$4
1954                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1955 $as_echo "$ac_res" >&6; }
1956   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1957
1958 } # ac_fn_c_check_member
1959
1960 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1961 # -------------------------------------------
1962 # Tests whether TYPE exists after having included INCLUDES, setting cache
1963 # variable VAR accordingly.
1964 ac_fn_c_check_type ()
1965 {
1966   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1967   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1968 $as_echo_n "checking for $2... " >&6; }
1969 if eval \${$3+:} false; then :
1970   $as_echo_n "(cached) " >&6
1971 else
1972   eval "$3=no"
1973   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1974 /* end confdefs.h.  */
1975 $4
1976 int
1977 main ()
1978 {
1979 if (sizeof ($2))
1980          return 0;
1981   ;
1982   return 0;
1983 }
1984 _ACEOF
1985 if ac_fn_c_try_compile "$LINENO"; then :
1986   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1987 /* end confdefs.h.  */
1988 $4
1989 int
1990 main ()
1991 {
1992 if (sizeof (($2)))
1993             return 0;
1994   ;
1995   return 0;
1996 }
1997 _ACEOF
1998 if ac_fn_c_try_compile "$LINENO"; then :
1999
2000 else
2001   eval "$3=yes"
2002 fi
2003 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2004 fi
2005 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2006 fi
2007 eval ac_res=\$$3
2008                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2009 $as_echo "$ac_res" >&6; }
2010   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2011
2012 } # ac_fn_c_check_type
2013
2014 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2015 # --------------------------------------------
2016 # Tries to find the compile-time value of EXPR in a program that includes
2017 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2018 # computed
2019 ac_fn_c_compute_int ()
2020 {
2021   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2022   if test "$cross_compiling" = yes; then
2023     # Depending upon the size, compute the lo and hi bounds.
2024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2025 /* end confdefs.h.  */
2026 $4
2027 int
2028 main ()
2029 {
2030 static int test_array [1 - 2 * !(($2) >= 0)];
2031 test_array [0] = 0;
2032 return test_array [0];
2033
2034   ;
2035   return 0;
2036 }
2037 _ACEOF
2038 if ac_fn_c_try_compile "$LINENO"; then :
2039   ac_lo=0 ac_mid=0
2040   while :; do
2041     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2042 /* end confdefs.h.  */
2043 $4
2044 int
2045 main ()
2046 {
2047 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2048 test_array [0] = 0;
2049 return test_array [0];
2050
2051   ;
2052   return 0;
2053 }
2054 _ACEOF
2055 if ac_fn_c_try_compile "$LINENO"; then :
2056   ac_hi=$ac_mid; break
2057 else
2058   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2059                         if test $ac_lo -le $ac_mid; then
2060                           ac_lo= ac_hi=
2061                           break
2062                         fi
2063                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2064 fi
2065 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2066   done
2067 else
2068   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2069 /* end confdefs.h.  */
2070 $4
2071 int
2072 main ()
2073 {
2074 static int test_array [1 - 2 * !(($2) < 0)];
2075 test_array [0] = 0;
2076 return test_array [0];
2077
2078   ;
2079   return 0;
2080 }
2081 _ACEOF
2082 if ac_fn_c_try_compile "$LINENO"; then :
2083   ac_hi=-1 ac_mid=-1
2084   while :; do
2085     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2086 /* end confdefs.h.  */
2087 $4
2088 int
2089 main ()
2090 {
2091 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2092 test_array [0] = 0;
2093 return test_array [0];
2094
2095   ;
2096   return 0;
2097 }
2098 _ACEOF
2099 if ac_fn_c_try_compile "$LINENO"; then :
2100   ac_lo=$ac_mid; break
2101 else
2102   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2103                         if test $ac_mid -le $ac_hi; then
2104                           ac_lo= ac_hi=
2105                           break
2106                         fi
2107                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2108 fi
2109 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2110   done
2111 else
2112   ac_lo= ac_hi=
2113 fi
2114 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2115 fi
2116 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2117 # Binary search between lo and hi bounds.
2118 while test "x$ac_lo" != "x$ac_hi"; do
2119   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2120   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2121 /* end confdefs.h.  */
2122 $4
2123 int
2124 main ()
2125 {
2126 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2127 test_array [0] = 0;
2128 return test_array [0];
2129
2130   ;
2131   return 0;
2132 }
2133 _ACEOF
2134 if ac_fn_c_try_compile "$LINENO"; then :
2135   ac_hi=$ac_mid
2136 else
2137   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2138 fi
2139 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2140 done
2141 case $ac_lo in #((
2142 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2143 '') ac_retval=1 ;;
2144 esac
2145   else
2146     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2147 /* end confdefs.h.  */
2148 $4
2149 static long int longval () { return $2; }
2150 static unsigned long int ulongval () { return $2; }
2151 #include <stdio.h>
2152 #include <stdlib.h>
2153 int
2154 main ()
2155 {
2156
2157   FILE *f = fopen ("conftest.val", "w");
2158   if (! f)
2159     return 1;
2160   if (($2) < 0)
2161     {
2162       long int i = longval ();
2163       if (i != ($2))
2164         return 1;
2165       fprintf (f, "%ld", i);
2166     }
2167   else
2168     {
2169       unsigned long int i = ulongval ();
2170       if (i != ($2))
2171         return 1;
2172       fprintf (f, "%lu", i);
2173     }
2174   /* Do not output a trailing newline, as this causes \r\n confusion
2175      on some platforms.  */
2176   return ferror (f) || fclose (f) != 0;
2177
2178   ;
2179   return 0;
2180 }
2181 _ACEOF
2182 if ac_fn_c_try_run "$LINENO"; then :
2183   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2184 else
2185   ac_retval=1
2186 fi
2187 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2188   conftest.$ac_objext conftest.beam conftest.$ac_ext
2189 rm -f conftest.val
2190
2191   fi
2192   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2193   as_fn_set_status $ac_retval
2194
2195 } # ac_fn_c_compute_int
2196
2197 # ac_fn_c_check_func LINENO FUNC VAR
2198 # ----------------------------------
2199 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2200 ac_fn_c_check_func ()
2201 {
2202   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2203   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2204 $as_echo_n "checking for $2... " >&6; }
2205 if eval \${$3+:} false; then :
2206   $as_echo_n "(cached) " >&6
2207 else
2208   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2209 /* end confdefs.h.  */
2210 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2211    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2212 #define $2 innocuous_$2
2213
2214 /* System header to define __stub macros and hopefully few prototypes,
2215     which can conflict with char $2 (); below.
2216     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2217     <limits.h> exists even on freestanding compilers.  */
2218
2219 #ifdef __STDC__
2220 # include <limits.h>
2221 #else
2222 # include <assert.h>
2223 #endif
2224
2225 #undef $2
2226
2227 /* Override any GCC internal prototype to avoid an error.
2228    Use char because int might match the return type of a GCC
2229    builtin and then its argument prototype would still apply.  */
2230 #ifdef __cplusplus
2231 extern "C"
2232 #endif
2233 char $2 ();
2234 /* The GNU C library defines this for functions which it implements
2235     to always fail with ENOSYS.  Some functions are actually named
2236     something starting with __ and the normal name is an alias.  */
2237 #if defined __stub_$2 || defined __stub___$2
2238 choke me
2239 #endif
2240
2241 int
2242 main ()
2243 {
2244 return $2 ();
2245   ;
2246   return 0;
2247 }
2248 _ACEOF
2249 if ac_fn_c_try_link "$LINENO"; then :
2250   eval "$3=yes"
2251 else
2252   eval "$3=no"
2253 fi
2254 rm -f core conftest.err conftest.$ac_objext \
2255     conftest$ac_exeext conftest.$ac_ext
2256 fi
2257 eval ac_res=\$$3
2258                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2259 $as_echo "$ac_res" >&6; }
2260   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2261
2262 } # ac_fn_c_check_func
2263
2264 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2265 # ---------------------------------------------
2266 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2267 # accordingly.
2268 ac_fn_c_check_decl ()
2269 {
2270   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2271   as_decl_name=`echo $2|sed 's/ *(.*//'`
2272   as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2273   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2274 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2275 if eval \${$3+:} false; then :
2276   $as_echo_n "(cached) " >&6
2277 else
2278   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2279 /* end confdefs.h.  */
2280 $4
2281 int
2282 main ()
2283 {
2284 #ifndef $as_decl_name
2285 #ifdef __cplusplus
2286   (void) $as_decl_use;
2287 #else
2288   (void) $as_decl_name;
2289 #endif
2290 #endif
2291
2292   ;
2293   return 0;
2294 }
2295 _ACEOF
2296 if ac_fn_c_try_compile "$LINENO"; then :
2297   eval "$3=yes"
2298 else
2299   eval "$3=no"
2300 fi
2301 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2302 fi
2303 eval ac_res=\$$3
2304                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2305 $as_echo "$ac_res" >&6; }
2306   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2307
2308 } # ac_fn_c_check_decl
2309 cat >config.log <<_ACEOF
2310 This file contains any messages produced by compilers while
2311 running configure, to aid debugging if configure makes a mistake.
2312
2313 It was created by PostgreSQL $as_me 9.4devel, which was
2314 generated by GNU Autoconf 2.69.  Invocation command line was
2315
2316   $ $0 $@
2317
2318 _ACEOF
2319 exec 5>>config.log
2320 {
2321 cat <<_ASUNAME
2322 ## --------- ##
2323 ## Platform. ##
2324 ## --------- ##
2325
2326 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2327 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2328 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2329 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2330 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2331
2332 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2333 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2334
2335 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2336 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2337 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2338 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2339 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2340 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2341 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2342
2343 _ASUNAME
2344
2345 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2346 for as_dir in $PATH
2347 do
2348   IFS=$as_save_IFS
2349   test -z "$as_dir" && as_dir=.
2350     $as_echo "PATH: $as_dir"
2351   done
2352 IFS=$as_save_IFS
2353
2354 } >&5
2355
2356 cat >&5 <<_ACEOF
2357
2358
2359 ## ----------- ##
2360 ## Core tests. ##
2361 ## ----------- ##
2362
2363 _ACEOF
2364
2365
2366 # Keep a trace of the command line.
2367 # Strip out --no-create and --no-recursion so they do not pile up.
2368 # Strip out --silent because we don't want to record it for future runs.
2369 # Also quote any args containing shell meta-characters.
2370 # Make two passes to allow for proper duplicate-argument suppression.
2371 ac_configure_args=
2372 ac_configure_args0=
2373 ac_configure_args1=
2374 ac_must_keep_next=false
2375 for ac_pass in 1 2
2376 do
2377   for ac_arg
2378   do
2379     case $ac_arg in
2380     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2381     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2382     | -silent | --silent | --silen | --sile | --sil)
2383       continue ;;
2384     *\'*)
2385       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2386     esac
2387     case $ac_pass in
2388     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2389     2)
2390       as_fn_append ac_configure_args1 " '$ac_arg'"
2391       if test $ac_must_keep_next = true; then
2392         ac_must_keep_next=false # Got value, back to normal.
2393       else
2394         case $ac_arg in
2395           *=* | --config-cache | -C | -disable-* | --disable-* \
2396           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2397           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2398           | -with-* | --with-* | -without-* | --without-* | --x)
2399             case "$ac_configure_args0 " in
2400               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2401             esac
2402             ;;
2403           -* ) ac_must_keep_next=true ;;
2404         esac
2405       fi
2406       as_fn_append ac_configure_args " '$ac_arg'"
2407       ;;
2408     esac
2409   done
2410 done
2411 { ac_configure_args0=; unset ac_configure_args0;}
2412 { ac_configure_args1=; unset ac_configure_args1;}
2413
2414 # When interrupted or exit'd, cleanup temporary files, and complete
2415 # config.log.  We remove comments because anyway the quotes in there
2416 # would cause problems or look ugly.
2417 # WARNING: Use '\'' to represent an apostrophe within the trap.
2418 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2419 trap 'exit_status=$?
2420   # Save into config.log some information that might help in debugging.
2421   {
2422     echo
2423
2424     $as_echo "## ---------------- ##
2425 ## Cache variables. ##
2426 ## ---------------- ##"
2427     echo
2428     # The following way of writing the cache mishandles newlines in values,
2429 (
2430   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2431     eval ac_val=\$$ac_var
2432     case $ac_val in #(
2433     *${as_nl}*)
2434       case $ac_var in #(
2435       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2436 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2437       esac
2438       case $ac_var in #(
2439       _ | IFS | as_nl) ;; #(
2440       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2441       *) { eval $ac_var=; unset $ac_var;} ;;
2442       esac ;;
2443     esac
2444   done
2445   (set) 2>&1 |
2446     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2447     *${as_nl}ac_space=\ *)
2448       sed -n \
2449         "s/'\''/'\''\\\\'\'''\''/g;
2450           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2451       ;; #(
2452     *)
2453       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2454       ;;
2455     esac |
2456     sort
2457 )
2458     echo
2459
2460     $as_echo "## ----------------- ##
2461 ## Output variables. ##
2462 ## ----------------- ##"
2463     echo
2464     for ac_var in $ac_subst_vars
2465     do
2466       eval ac_val=\$$ac_var
2467       case $ac_val in
2468       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2469       esac
2470       $as_echo "$ac_var='\''$ac_val'\''"
2471     done | sort
2472     echo
2473
2474     if test -n "$ac_subst_files"; then
2475       $as_echo "## ------------------- ##
2476 ## File substitutions. ##
2477 ## ------------------- ##"
2478       echo
2479       for ac_var in $ac_subst_files
2480       do
2481         eval ac_val=\$$ac_var
2482         case $ac_val in
2483         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2484         esac
2485         $as_echo "$ac_var='\''$ac_val'\''"
2486       done | sort
2487       echo
2488     fi
2489
2490     if test -s confdefs.h; then
2491       $as_echo "## ----------- ##
2492 ## confdefs.h. ##
2493 ## ----------- ##"
2494       echo
2495       cat confdefs.h
2496       echo
2497     fi
2498     test "$ac_signal" != 0 &&
2499       $as_echo "$as_me: caught signal $ac_signal"
2500     $as_echo "$as_me: exit $exit_status"
2501   } >&5
2502   rm -f core *.core core.conftest.* &&
2503     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2504     exit $exit_status
2505 ' 0
2506 for ac_signal in 1 2 13 15; do
2507   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2508 done
2509 ac_signal=0
2510
2511 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2512 rm -f -r conftest* confdefs.h
2513
2514 $as_echo "/* confdefs.h */" > confdefs.h
2515
2516 # Predefined preprocessor variables.
2517
2518 cat >>confdefs.h <<_ACEOF
2519 #define PACKAGE_NAME "$PACKAGE_NAME"
2520 _ACEOF
2521
2522 cat >>confdefs.h <<_ACEOF
2523 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2524 _ACEOF
2525
2526 cat >>confdefs.h <<_ACEOF
2527 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2528 _ACEOF
2529
2530 cat >>confdefs.h <<_ACEOF
2531 #define PACKAGE_STRING "$PACKAGE_STRING"
2532 _ACEOF
2533
2534 cat >>confdefs.h <<_ACEOF
2535 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2536 _ACEOF
2537
2538 cat >>confdefs.h <<_ACEOF
2539 #define PACKAGE_URL "$PACKAGE_URL"
2540 _ACEOF
2541
2542
2543 # Let the site file select an alternate cache file if it wants to.
2544 # Prefer an explicitly selected file to automatically selected ones.
2545 ac_site_file1=NONE
2546 ac_site_file2=NONE
2547 if test -n "$CONFIG_SITE"; then
2548   # We do not want a PATH search for config.site.
2549   case $CONFIG_SITE in #((
2550     -*)  ac_site_file1=./$CONFIG_SITE;;
2551     */*) ac_site_file1=$CONFIG_SITE;;
2552     *)   ac_site_file1=./$CONFIG_SITE;;
2553   esac
2554 elif test "x$prefix" != xNONE; then
2555   ac_site_file1=$prefix/share/config.site
2556   ac_site_file2=$prefix/etc/config.site
2557 else
2558   ac_site_file1=$ac_default_prefix/share/config.site
2559   ac_site_file2=$ac_default_prefix/etc/config.site
2560 fi
2561 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2562 do
2563   test "x$ac_site_file" = xNONE && continue
2564   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2565     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2566 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2567     sed 's/^/| /' "$ac_site_file" >&5
2568     . "$ac_site_file" \
2569       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2570 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2571 as_fn_error $? "failed to load site script $ac_site_file
2572 See \`config.log' for more details" "$LINENO" 5; }
2573   fi
2574 done
2575
2576 if test -r "$cache_file"; then
2577   # Some versions of bash will fail to source /dev/null (special files
2578   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2579   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2580     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2581 $as_echo "$as_me: loading cache $cache_file" >&6;}
2582     case $cache_file in
2583       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2584       *)                      . "./$cache_file";;
2585     esac
2586   fi
2587 else
2588   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2589 $as_echo "$as_me: creating cache $cache_file" >&6;}
2590   >$cache_file
2591 fi
2592
2593 # Check that the precious variables saved in the cache have kept the same
2594 # value.
2595 ac_cache_corrupted=false
2596 for ac_var in $ac_precious_vars; do
2597   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2598   eval ac_new_set=\$ac_env_${ac_var}_set
2599   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2600   eval ac_new_val=\$ac_env_${ac_var}_value
2601   case $ac_old_set,$ac_new_set in
2602     set,)
2603       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2604 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2605       ac_cache_corrupted=: ;;
2606     ,set)
2607       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2608 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2609       ac_cache_corrupted=: ;;
2610     ,);;
2611     *)
2612       if test "x$ac_old_val" != "x$ac_new_val"; then
2613         # differences in whitespace do not lead to failure.
2614         ac_old_val_w=`echo x $ac_old_val`
2615         ac_new_val_w=`echo x $ac_new_val`
2616         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2617           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2618 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2619           ac_cache_corrupted=:
2620         else
2621           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2622 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2623           eval $ac_var=\$ac_old_val
2624         fi
2625         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2626 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2627         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2628 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2629       fi;;
2630   esac
2631   # Pass precious variables to config.status.
2632   if test "$ac_new_set" = set; then
2633     case $ac_new_val in
2634     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2635     *) ac_arg=$ac_var=$ac_new_val ;;
2636     esac
2637     case " $ac_configure_args " in
2638       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2639       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2640     esac
2641   fi
2642 done
2643 if $ac_cache_corrupted; then
2644   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2645 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2646   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2647 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2648   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2649 fi
2650 ## -------------------- ##
2651 ## Main body of script. ##
2652 ## -------------------- ##
2653
2654 ac_ext=c
2655 ac_cpp='$CPP $CPPFLAGS'
2656 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2657 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2658 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2659
2660
2661
2662
2663
2664
2665 ac_aux_dir=
2666 for ac_dir in config "$srcdir"/config; do
2667   if test -f "$ac_dir/install-sh"; then
2668     ac_aux_dir=$ac_dir
2669     ac_install_sh="$ac_aux_dir/install-sh -c"
2670     break
2671   elif test -f "$ac_dir/install.sh"; then
2672     ac_aux_dir=$ac_dir
2673     ac_install_sh="$ac_aux_dir/install.sh -c"
2674     break
2675   elif test -f "$ac_dir/shtool"; then
2676     ac_aux_dir=$ac_dir
2677     ac_install_sh="$ac_aux_dir/shtool install -c"
2678     break
2679   fi
2680 done
2681 if test -z "$ac_aux_dir"; then
2682   as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5
2683 fi
2684
2685 # These three variables are undocumented and unsupported,
2686 # and are intended to be withdrawn in a future Autoconf release.
2687 # They can cause serious problems if a builder's source tree is in a directory
2688 # whose full name contains unusual characters.
2689 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2690 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2691 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2692
2693
2694
2695 configure_args=$ac_configure_args
2696
2697
2698 PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\.[0-9][0-9]*\)'`
2699
2700
2701 cat >>confdefs.h <<_ACEOF
2702 #define PG_MAJORVERSION "$PG_MAJORVERSION"
2703 _ACEOF
2704
2705
2706
2707
2708
2709 # Check whether --with-extra-version was given.
2710 if test "${with_extra_version+set}" = set; then :
2711   withval=$with_extra_version;
2712   case $withval in
2713     yes)
2714       as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2715       ;;
2716     no)
2717       as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2718       ;;
2719     *)
2720       PG_VERSION="$PACKAGE_VERSION$withval"
2721       ;;
2722   esac
2723
2724 else
2725   PG_VERSION="$PACKAGE_VERSION"
2726 fi
2727
2728
2729
2730 cat >>confdefs.h <<_ACEOF
2731 #define PG_VERSION "$PG_VERSION"
2732 _ACEOF
2733
2734
2735 # Make sure we can run config.sub.
2736 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2737   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2738
2739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2740 $as_echo_n "checking build system type... " >&6; }
2741 if ${ac_cv_build+:} false; then :
2742   $as_echo_n "(cached) " >&6
2743 else
2744   ac_build_alias=$build_alias
2745 test "x$ac_build_alias" = x &&
2746   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2747 test "x$ac_build_alias" = x &&
2748   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2749 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2750   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2751
2752 fi
2753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2754 $as_echo "$ac_cv_build" >&6; }
2755 case $ac_cv_build in
2756 *-*-*) ;;
2757 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2758 esac
2759 build=$ac_cv_build
2760 ac_save_IFS=$IFS; IFS='-'
2761 set x $ac_cv_build
2762 shift
2763 build_cpu=$1
2764 build_vendor=$2
2765 shift; shift
2766 # Remember, the first character of IFS is used to create $*,
2767 # except with old shells:
2768 build_os=$*
2769 IFS=$ac_save_IFS
2770 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2771
2772
2773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2774 $as_echo_n "checking host system type... " >&6; }
2775 if ${ac_cv_host+:} false; then :
2776   $as_echo_n "(cached) " >&6
2777 else
2778   if test "x$host_alias" = x; then
2779   ac_cv_host=$ac_cv_build
2780 else
2781   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2782     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2783 fi
2784
2785 fi
2786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2787 $as_echo "$ac_cv_host" >&6; }
2788 case $ac_cv_host in
2789 *-*-*) ;;
2790 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2791 esac
2792 host=$ac_cv_host
2793 ac_save_IFS=$IFS; IFS='-'
2794 set x $ac_cv_host
2795 shift
2796 host_cpu=$1
2797 host_vendor=$2
2798 shift; shift
2799 # Remember, the first character of IFS is used to create $*,
2800 # except with old shells:
2801 host_os=$*
2802 IFS=$ac_save_IFS
2803 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2804
2805
2806
2807 template=
2808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which template to use" >&5
2809 $as_echo_n "checking which template to use... " >&6; }
2810
2811
2812
2813
2814 # Check whether --with-template was given.
2815 if test "${with_template+set}" = set; then :
2816   withval=$with_template;
2817   case $withval in
2818     yes)
2819       as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2820       ;;
2821     no)
2822       as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2823       ;;
2824     *)
2825
2826   case $withval in
2827     list)   echo; ls "$srcdir/src/template"; exit;;
2828     *)      if test -f "$srcdir/src/template/$with_template" ; then
2829               template=$withval
2830             else
2831               as_fn_error $? "'$withval' is not a valid template name. Use 'list' for a list." "$LINENO" 5
2832             fi;;
2833   esac
2834
2835       ;;
2836   esac
2837
2838 else
2839
2840 # --with-template not given
2841
2842 case $host_os in
2843      aix*) template=aix ;;
2844   cygwin*) template=cygwin ;;
2845   darwin*) template=darwin ;;
2846 dragonfly*) template=netbsd ;;
2847  freebsd*) template=freebsd ;;
2848     hpux*) template=hpux ;;
2849  linux*|gnu*|k*bsd*-gnu)
2850            template=linux ;;
2851    mingw*) template=win32 ;;
2852   netbsd*) template=netbsd ;;
2853  openbsd*) template=openbsd ;;
2854      osf*) template=osf ;;
2855      sco*) template=sco ;;
2856  solaris*) template=solaris ;;
2857    sysv5*) template=unixware ;;
2858 esac
2859
2860   if test x"$template" = x"" ; then
2861     as_fn_error $? "
2862 *******************************************************************
2863 PostgreSQL has apparently not been ported to your platform yet.
2864 To try a manual configuration, look into the src/template directory
2865 for a similar platform and use the '--with-template=' option.
2866
2867 Please also contact <pgsql-bugs@postgresql.org> to see about
2868 rectifying this.  Include the above 'checking host system type...'
2869 line.
2870 *******************************************************************
2871 " "$LINENO" 5
2872   fi
2873
2874
2875 fi
2876
2877
2878
2879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $template" >&5
2880 $as_echo "$template" >&6; }
2881
2882 PORTNAME=$template
2883
2884
2885 # Initialize default assumption that we do not need separate assembly code
2886 # for TAS (test-and-set).  This can be overridden by the template file
2887 # when it's executed.
2888 need_tas=no
2889 tas_file=dummy.s
2890
2891
2892
2893 ##
2894 ## Command line options
2895 ##
2896
2897 #
2898 # Add non-standard directories to the include path
2899 #
2900
2901
2902
2903 # Check whether --with-includes was given.
2904 if test "${with_includes+set}" = set; then :
2905   withval=$with_includes;
2906   case $withval in
2907     yes)
2908       as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
2909       ;;
2910     no)
2911       as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
2912       ;;
2913     *)
2914
2915       ;;
2916   esac
2917
2918 fi
2919
2920
2921
2922
2923 #
2924 # Add non-standard directories to the library search path
2925 #
2926
2927
2928
2929 # Check whether --with-libraries was given.
2930 if test "${with_libraries+set}" = set; then :
2931   withval=$with_libraries;
2932   case $withval in
2933     yes)
2934       as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
2935       ;;
2936     no)
2937       as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
2938       ;;
2939     *)
2940       LIBRARY_DIRS=$withval
2941       ;;
2942   esac
2943
2944 fi
2945
2946
2947
2948
2949
2950
2951 # Check whether --with-libs was given.
2952 if test "${with_libs+set}" = set; then :
2953   withval=$with_libs;
2954   case $withval in
2955     yes)
2956       as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
2957       ;;
2958     no)
2959       as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
2960       ;;
2961     *)
2962       LIBRARY_DIRS=$withval
2963       ;;
2964   esac
2965
2966 fi
2967
2968
2969
2970
2971 #
2972 # 64-bit integer date/time storage: enabled by default.
2973 #
2974 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with 64-bit integer date/time support" >&5
2975 $as_echo_n "checking whether to build with 64-bit integer date/time support... " >&6; }
2976
2977
2978 # Check whether --enable-integer-datetimes was given.
2979 if test "${enable_integer_datetimes+set}" = set; then :
2980   enableval=$enable_integer_datetimes;
2981   case $enableval in
2982     yes)
2983
2984 $as_echo "#define USE_INTEGER_DATETIMES 1" >>confdefs.h
2985
2986       ;;
2987     no)
2988       :
2989       ;;
2990     *)
2991       as_fn_error $? "no argument expected for --enable-integer-datetimes option" "$LINENO" 5
2992       ;;
2993   esac
2994
2995 else
2996   enable_integer_datetimes=yes
2997
2998 $as_echo "#define USE_INTEGER_DATETIMES 1" >>confdefs.h
2999
3000 fi
3001
3002
3003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_integer_datetimes" >&5
3004 $as_echo "$enable_integer_datetimes" >&6; }
3005
3006
3007 #
3008 # NLS
3009 #
3010 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is wanted" >&5
3011 $as_echo_n "checking whether NLS is wanted... " >&6; }
3012
3013
3014 # Check whether --enable-nls was given.
3015 if test "${enable_nls+set}" = set; then :
3016   enableval=$enable_nls;
3017   case $enableval in
3018     yes)
3019       :
3020       ;;
3021     no)
3022       :
3023       ;;
3024     *)
3025       enable_nls=yes
3026 WANTED_LANGUAGES=$enableval
3027       ;;
3028   esac
3029
3030 else
3031   enable_nls=no
3032 fi
3033
3034
3035
3036 if test "$enable_nls" = yes; then
3037
3038 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
3039
3040 fi
3041
3042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_nls" >&5
3043 $as_echo "$enable_nls" >&6; }
3044
3045
3046
3047 #
3048 # Default port number (--with-pgport), default 5432
3049 #
3050 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default port number" >&5
3051 $as_echo_n "checking for default port number... " >&6; }
3052
3053
3054
3055 # Check whether --with-pgport was given.
3056 if test "${with_pgport+set}" = set; then :
3057   withval=$with_pgport;
3058   case $withval in
3059     yes)
3060       as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3061       ;;
3062     no)
3063       as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3064       ;;
3065     *)
3066       default_port=$withval
3067       ;;
3068   esac
3069
3070 else
3071   default_port=5432
3072 fi
3073
3074
3075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_port" >&5
3076 $as_echo "$default_port" >&6; }
3077 # Need both of these because some places want an integer and some a string
3078
3079 cat >>confdefs.h <<_ACEOF
3080 #define DEF_PGPORT ${default_port}
3081 _ACEOF
3082
3083
3084 cat >>confdefs.h <<_ACEOF
3085 #define DEF_PGPORT_STR "${default_port}"
3086 _ACEOF
3087
3088
3089
3090 #
3091 # '-rpath'-like feature can be disabled
3092 #
3093
3094
3095 # Check whether --enable-rpath was given.
3096 if test "${enable_rpath+set}" = set; then :
3097   enableval=$enable_rpath;
3098   case $enableval in
3099     yes)
3100       :
3101       ;;
3102     no)
3103       :
3104       ;;
3105     *)
3106       as_fn_error $? "no argument expected for --enable-rpath option" "$LINENO" 5
3107       ;;
3108   esac
3109
3110 else
3111   enable_rpath=yes
3112
3113 fi
3114
3115
3116
3117
3118 #
3119 # Spinlocks
3120 #
3121
3122
3123 # Check whether --enable-spinlocks was given.
3124 if test "${enable_spinlocks+set}" = set; then :
3125   enableval=$enable_spinlocks;
3126   case $enableval in
3127     yes)
3128       :
3129       ;;
3130     no)
3131       :
3132       ;;
3133     *)
3134       as_fn_error $? "no argument expected for --enable-spinlocks option" "$LINENO" 5
3135       ;;
3136   esac
3137
3138 else
3139   enable_spinlocks=yes
3140
3141 fi
3142
3143
3144
3145 #
3146 # --enable-debug adds -g to compiler flags
3147 #
3148
3149
3150 # Check whether --enable-debug was given.
3151 if test "${enable_debug+set}" = set; then :
3152   enableval=$enable_debug;
3153   case $enableval in
3154     yes)
3155       :
3156       ;;
3157     no)
3158       :
3159       ;;
3160     *)
3161       as_fn_error $? "no argument expected for --enable-debug option" "$LINENO" 5
3162       ;;
3163   esac
3164
3165 else
3166   enable_debug=no
3167
3168 fi
3169
3170
3171
3172
3173 #
3174 # --enable-profiling enables gcc profiling
3175 #
3176
3177
3178 # Check whether --enable-profiling was given.
3179 if test "${enable_profiling+set}" = set; then :
3180   enableval=$enable_profiling;
3181   case $enableval in
3182     yes)
3183       :
3184       ;;
3185     no)
3186       :
3187       ;;
3188     *)
3189       as_fn_error $? "no argument expected for --enable-profiling option" "$LINENO" 5
3190       ;;
3191   esac
3192
3193 else
3194   enable_profiling=no
3195
3196 fi
3197
3198
3199
3200 #
3201 # --enable-coverage enables generation of code coverage metrics with gcov
3202 #
3203
3204
3205 # Check whether --enable-coverage was given.
3206 if test "${enable_coverage+set}" = set; then :
3207   enableval=$enable_coverage;
3208   case $enableval in
3209     yes)
3210       for ac_prog in gcov
3211 do
3212   # Extract the first word of "$ac_prog", so it can be a program name with args.
3213 set dummy $ac_prog; ac_word=$2
3214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3215 $as_echo_n "checking for $ac_word... " >&6; }
3216 if ${ac_cv_prog_GCOV+:} false; then :
3217   $as_echo_n "(cached) " >&6
3218 else
3219   if test -n "$GCOV"; then
3220   ac_cv_prog_GCOV="$GCOV" # Let the user override the test.
3221 else
3222 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3223 for as_dir in $PATH
3224 do
3225   IFS=$as_save_IFS
3226   test -z "$as_dir" && as_dir=.
3227     for ac_exec_ext in '' $ac_executable_extensions; do
3228   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3229     ac_cv_prog_GCOV="$ac_prog"
3230     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3231     break 2
3232   fi
3233 done
3234   done
3235 IFS=$as_save_IFS
3236
3237 fi
3238 fi
3239 GCOV=$ac_cv_prog_GCOV
3240 if test -n "$GCOV"; then
3241   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3242 $as_echo "$GCOV" >&6; }
3243 else
3244   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3245 $as_echo "no" >&6; }
3246 fi
3247
3248
3249   test -n "$GCOV" && break
3250 done
3251
3252 if test -z "$GCOV"; then
3253   as_fn_error $? "gcov not found" "$LINENO" 5
3254 fi
3255 for ac_prog in lcov
3256 do
3257   # Extract the first word of "$ac_prog", so it can be a program name with args.
3258 set dummy $ac_prog; ac_word=$2
3259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3260 $as_echo_n "checking for $ac_word... " >&6; }
3261 if ${ac_cv_prog_LCOV+:} false; then :
3262   $as_echo_n "(cached) " >&6
3263 else
3264   if test -n "$LCOV"; then
3265   ac_cv_prog_LCOV="$LCOV" # Let the user override the test.
3266 else
3267 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3268 for as_dir in $PATH
3269 do
3270   IFS=$as_save_IFS
3271   test -z "$as_dir" && as_dir=.
3272     for ac_exec_ext in '' $ac_executable_extensions; do
3273   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3274     ac_cv_prog_LCOV="$ac_prog"
3275     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3276     break 2
3277   fi
3278 done
3279   done
3280 IFS=$as_save_IFS
3281
3282 fi
3283 fi
3284 LCOV=$ac_cv_prog_LCOV
3285 if test -n "$LCOV"; then
3286   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3287 $as_echo "$LCOV" >&6; }
3288 else
3289   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3290 $as_echo "no" >&6; }
3291 fi
3292
3293
3294   test -n "$LCOV" && break
3295 done
3296
3297 if test -z "$LCOV"; then
3298   as_fn_error $? "lcov not found" "$LINENO" 5
3299 fi
3300 for ac_prog in genhtml
3301 do
3302   # Extract the first word of "$ac_prog", so it can be a program name with args.
3303 set dummy $ac_prog; ac_word=$2
3304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3305 $as_echo_n "checking for $ac_word... " >&6; }
3306 if ${ac_cv_prog_GENHTML+:} false; then :
3307   $as_echo_n "(cached) " >&6
3308 else
3309   if test -n "$GENHTML"; then
3310   ac_cv_prog_GENHTML="$GENHTML" # Let the user override the test.
3311 else
3312 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3313 for as_dir in $PATH
3314 do
3315   IFS=$as_save_IFS
3316   test -z "$as_dir" && as_dir=.
3317     for ac_exec_ext in '' $ac_executable_extensions; do
3318   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3319     ac_cv_prog_GENHTML="$ac_prog"
3320     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3321     break 2
3322   fi
3323 done
3324   done
3325 IFS=$as_save_IFS
3326
3327 fi
3328 fi
3329 GENHTML=$ac_cv_prog_GENHTML
3330 if test -n "$GENHTML"; then
3331   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3332 $as_echo "$GENHTML" >&6; }
3333 else
3334   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3335 $as_echo "no" >&6; }
3336 fi
3337
3338
3339   test -n "$GENHTML" && break
3340 done
3341
3342 if test -z "$GENHTML"; then
3343   as_fn_error $? "genhtml not found" "$LINENO" 5
3344 fi
3345       ;;
3346     no)
3347       :
3348       ;;
3349     *)
3350       as_fn_error $? "no argument expected for --enable-coverage option" "$LINENO" 5
3351       ;;
3352   esac
3353
3354 else
3355   enable_coverage=no
3356
3357 fi
3358
3359
3360
3361
3362 #
3363 # DTrace
3364 #
3365
3366
3367 # Check whether --enable-dtrace was given.
3368 if test "${enable_dtrace+set}" = set; then :
3369   enableval=$enable_dtrace;
3370   case $enableval in
3371     yes)
3372       for ac_prog in dtrace
3373 do
3374   # Extract the first word of "$ac_prog", so it can be a program name with args.
3375 set dummy $ac_prog; ac_word=$2
3376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3377 $as_echo_n "checking for $ac_word... " >&6; }
3378 if ${ac_cv_prog_DTRACE+:} false; then :
3379   $as_echo_n "(cached) " >&6
3380 else
3381   if test -n "$DTRACE"; then
3382   ac_cv_prog_DTRACE="$DTRACE" # Let the user override the test.
3383 else
3384 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3385 for as_dir in $PATH
3386 do
3387   IFS=$as_save_IFS
3388   test -z "$as_dir" && as_dir=.
3389     for ac_exec_ext in '' $ac_executable_extensions; do
3390   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3391     ac_cv_prog_DTRACE="$ac_prog"
3392     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3393     break 2
3394   fi
3395 done
3396   done
3397 IFS=$as_save_IFS
3398
3399 fi
3400 fi
3401 DTRACE=$ac_cv_prog_DTRACE
3402 if test -n "$DTRACE"; then
3403   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3404 $as_echo "$DTRACE" >&6; }
3405 else
3406   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3407 $as_echo "no" >&6; }
3408 fi
3409
3410
3411   test -n "$DTRACE" && break
3412 done
3413
3414 if test -z "$DTRACE"; then
3415   as_fn_error $? "dtrace not found" "$LINENO" 5
3416 fi
3417
3418       ;;
3419     no)
3420       :
3421       ;;
3422     *)
3423       as_fn_error $? "no argument expected for --enable-dtrace option" "$LINENO" 5
3424       ;;
3425   esac
3426
3427 else
3428   enable_dtrace=no
3429
3430 fi
3431
3432
3433
3434
3435 #
3436 # Block size
3437 #
3438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for block size" >&5
3439 $as_echo_n "checking for block size... " >&6; }
3440
3441
3442
3443 # Check whether --with-blocksize was given.
3444 if test "${with_blocksize+set}" = set; then :
3445   withval=$with_blocksize;
3446   case $withval in
3447     yes)
3448       as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3449       ;;
3450     no)
3451       as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3452       ;;
3453     *)
3454       blocksize=$withval
3455       ;;
3456   esac
3457
3458 else
3459   blocksize=8
3460 fi
3461
3462
3463 case ${blocksize} in
3464   1) BLCKSZ=1024;;
3465   2) BLCKSZ=2048;;
3466   4) BLCKSZ=4096;;
3467   8) BLCKSZ=8192;;
3468  16) BLCKSZ=16384;;
3469  32) BLCKSZ=32768;;
3470   *) as_fn_error $? "Invalid block size. Allowed values are 1,2,4,8,16,32." "$LINENO" 5
3471 esac
3472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${blocksize}kB" >&5
3473 $as_echo "${blocksize}kB" >&6; }
3474
3475
3476 cat >>confdefs.h <<_ACEOF
3477 #define BLCKSZ ${BLCKSZ}
3478 _ACEOF
3479
3480
3481 #
3482 # Relation segment size
3483 #
3484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for segment size" >&5
3485 $as_echo_n "checking for segment size... " >&6; }
3486
3487
3488
3489 # Check whether --with-segsize was given.
3490 if test "${with_segsize+set}" = set; then :
3491   withval=$with_segsize;
3492   case $withval in
3493     yes)
3494       as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3495       ;;
3496     no)
3497       as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3498       ;;
3499     *)
3500       segsize=$withval
3501       ;;
3502   esac
3503
3504 else
3505   segsize=1
3506 fi
3507
3508
3509 # this expression is set up to avoid unnecessary integer overflow
3510 # blocksize is already guaranteed to be a factor of 1024
3511 RELSEG_SIZE=`expr '(' 1024 / ${blocksize} ')' '*' ${segsize} '*' 1024`
3512 test $? -eq 0 || exit 1
3513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${segsize}GB" >&5
3514 $as_echo "${segsize}GB" >&6; }
3515
3516
3517 cat >>confdefs.h <<_ACEOF
3518 #define RELSEG_SIZE ${RELSEG_SIZE}
3519 _ACEOF
3520
3521
3522 #
3523 # WAL block size
3524 #
3525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAL block size" >&5
3526 $as_echo_n "checking for WAL block size... " >&6; }
3527
3528
3529
3530 # Check whether --with-wal-blocksize was given.
3531 if test "${with_wal_blocksize+set}" = set; then :
3532   withval=$with_wal_blocksize;
3533   case $withval in
3534     yes)
3535       as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3536       ;;
3537     no)
3538       as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3539       ;;
3540     *)
3541       wal_blocksize=$withval
3542       ;;
3543   esac
3544
3545 else
3546   wal_blocksize=8
3547 fi
3548
3549
3550 case ${wal_blocksize} in
3551   1) XLOG_BLCKSZ=1024;;
3552   2) XLOG_BLCKSZ=2048;;
3553   4) XLOG_BLCKSZ=4096;;
3554   8) XLOG_BLCKSZ=8192;;
3555  16) XLOG_BLCKSZ=16384;;
3556  32) XLOG_BLCKSZ=32768;;
3557  64) XLOG_BLCKSZ=65536;;
3558   *) as_fn_error $? "Invalid WAL block size. Allowed values are 1,2,4,8,16,32,64." "$LINENO" 5
3559 esac
3560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${wal_blocksize}kB" >&5
3561 $as_echo "${wal_blocksize}kB" >&6; }
3562
3563
3564 cat >>confdefs.h <<_ACEOF
3565 #define XLOG_BLCKSZ ${XLOG_BLCKSZ}
3566 _ACEOF
3567
3568
3569 #
3570 # WAL segment size
3571 #
3572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAL segment size" >&5
3573 $as_echo_n "checking for WAL segment size... " >&6; }
3574
3575
3576
3577 # Check whether --with-wal-segsize was given.
3578 if test "${with_wal_segsize+set}" = set; then :
3579   withval=$with_wal_segsize;
3580   case $withval in
3581     yes)
3582       as_fn_error $? "argument required for --with-wal-segsize option" "$LINENO" 5
3583       ;;
3584     no)
3585       as_fn_error $? "argument required for --with-wal-segsize option" "$LINENO" 5
3586       ;;
3587     *)
3588       wal_segsize=$withval
3589       ;;
3590   esac
3591
3592 else
3593   wal_segsize=16
3594 fi
3595
3596
3597 case ${wal_segsize} in
3598   1) ;;
3599   2) ;;
3600   4) ;;
3601   8) ;;
3602  16) ;;
3603  32) ;;
3604  64) ;;
3605   *) as_fn_error $? "Invalid WAL segment size. Allowed values are 1,2,4,8,16,32,64." "$LINENO" 5
3606 esac
3607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${wal_segsize}MB" >&5
3608 $as_echo "${wal_segsize}MB" >&6; }
3609
3610
3611 cat >>confdefs.h <<_ACEOF
3612 #define XLOG_SEG_SIZE (${wal_segsize} * 1024 * 1024)
3613 _ACEOF
3614
3615
3616 #
3617 # C compiler
3618 #
3619
3620 # For historical reasons you can also use --with-CC to specify the C compiler
3621 # to use, although the standard way to do this is to set the CC environment
3622 # variable.
3623
3624
3625
3626 # Check whether --with-CC was given.
3627 if test "${with_CC+set}" = set; then :
3628   withval=$with_CC;
3629   case $withval in
3630     yes)
3631       as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3632       ;;
3633     no)
3634       as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3635       ;;
3636     *)
3637       CC=$with_CC
3638       ;;
3639   esac
3640
3641 fi
3642
3643
3644
3645 case $template in
3646   aix) pgac_cc_list="gcc xlc";;
3647     *) pgac_cc_list="gcc cc";;
3648 esac
3649
3650 ac_ext=c
3651 ac_cpp='$CPP $CPPFLAGS'
3652 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3653 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3654 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3655 if test -n "$ac_tool_prefix"; then
3656   for ac_prog in $pgac_cc_list
3657   do
3658     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3659 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3660 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3661 $as_echo_n "checking for $ac_word... " >&6; }
3662 if ${ac_cv_prog_CC+:} false; then :
3663   $as_echo_n "(cached) " >&6
3664 else
3665   if test -n "$CC"; then
3666   ac_cv_prog_CC="$CC" # Let the user override the test.
3667 else
3668 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3669 for as_dir in $PATH
3670 do
3671   IFS=$as_save_IFS
3672   test -z "$as_dir" && as_dir=.
3673     for ac_exec_ext in '' $ac_executable_extensions; do
3674   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3675     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3676     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3677     break 2
3678   fi
3679 done
3680   done
3681 IFS=$as_save_IFS
3682
3683 fi
3684 fi
3685 CC=$ac_cv_prog_CC
3686 if test -n "$CC"; then
3687   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3688 $as_echo "$CC" >&6; }
3689 else
3690   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3691 $as_echo "no" >&6; }
3692 fi
3693
3694
3695     test -n "$CC" && break
3696   done
3697 fi
3698 if test -z "$CC"; then
3699   ac_ct_CC=$CC
3700   for ac_prog in $pgac_cc_list
3701 do
3702   # Extract the first word of "$ac_prog", so it can be a program name with args.
3703 set dummy $ac_prog; ac_word=$2
3704 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3705 $as_echo_n "checking for $ac_word... " >&6; }
3706 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3707   $as_echo_n "(cached) " >&6
3708 else
3709   if test -n "$ac_ct_CC"; then
3710   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3711 else
3712 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3713 for as_dir in $PATH
3714 do
3715   IFS=$as_save_IFS
3716   test -z "$as_dir" && as_dir=.
3717     for ac_exec_ext in '' $ac_executable_extensions; do
3718   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3719     ac_cv_prog_ac_ct_CC="$ac_prog"
3720     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3721     break 2
3722   fi
3723 done
3724   done
3725 IFS=$as_save_IFS
3726
3727 fi
3728 fi
3729 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3730 if test -n "$ac_ct_CC"; then
3731   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3732 $as_echo "$ac_ct_CC" >&6; }
3733 else
3734   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3735 $as_echo "no" >&6; }
3736 fi
3737
3738
3739   test -n "$ac_ct_CC" && break
3740 done
3741
3742   if test "x$ac_ct_CC" = x; then
3743     CC=""
3744   else
3745     case $cross_compiling:$ac_tool_warned in
3746 yes:)
3747 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3748 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3749 ac_tool_warned=yes ;;
3750 esac
3751     CC=$ac_ct_CC
3752   fi
3753 fi
3754
3755
3756 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3757 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3758 as_fn_error $? "no acceptable C compiler found in \$PATH
3759 See \`config.log' for more details" "$LINENO" 5; }
3760
3761 # Provide some information about the compiler.
3762 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3763 set X $ac_compile
3764 ac_compiler=$2
3765 for ac_option in --version -v -V -qversion; do
3766   { { ac_try="$ac_compiler $ac_option >&5"
3767 case "(($ac_try" in
3768   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3769   *) ac_try_echo=$ac_try;;
3770 esac
3771 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3772 $as_echo "$ac_try_echo"; } >&5
3773   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3774   ac_status=$?
3775   if test -s conftest.err; then
3776     sed '10a\
3777 ... rest of stderr output deleted ...
3778          10q' conftest.err >conftest.er1
3779     cat conftest.er1 >&5
3780   fi
3781   rm -f conftest.er1 conftest.err
3782   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3783   test $ac_status = 0; }
3784 done
3785
3786 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3787 /* end confdefs.h.  */
3788
3789 int
3790 main ()
3791 {
3792
3793   ;
3794   return 0;
3795 }
3796 _ACEOF
3797 ac_clean_files_save=$ac_clean_files
3798 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3799 # Try to create an executable without -o first, disregard a.out.
3800 # It will help us diagnose broken compilers, and finding out an intuition
3801 # of exeext.
3802 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3803 $as_echo_n "checking whether the C compiler works... " >&6; }
3804 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3805
3806 # The possible output files:
3807 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3808
3809 ac_rmfiles=
3810 for ac_file in $ac_files
3811 do
3812   case $ac_file in
3813     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3814     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3815   esac
3816 done
3817 rm -f $ac_rmfiles
3818
3819 if { { ac_try="$ac_link_default"
3820 case "(($ac_try" in
3821   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3822   *) ac_try_echo=$ac_try;;
3823 esac
3824 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3825 $as_echo "$ac_try_echo"; } >&5
3826   (eval "$ac_link_default") 2>&5
3827   ac_status=$?
3828   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3829   test $ac_status = 0; }; then :
3830   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3831 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3832 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
3833 # so that the user can short-circuit this test for compilers unknown to
3834 # Autoconf.
3835 for ac_file in $ac_files ''
3836 do
3837   test -f "$ac_file" || continue
3838   case $ac_file in
3839     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3840         ;;
3841     [ab].out )
3842         # We found the default executable, but exeext='' is most
3843         # certainly right.
3844         break;;
3845     *.* )
3846         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3847         then :; else
3848            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3849         fi
3850         # We set ac_cv_exeext here because the later test for it is not
3851         # safe: cross compilers may not add the suffix if given an `-o'
3852         # argument, so we may need to know it at that point already.
3853         # Even if this section looks crufty: it has the advantage of
3854         # actually working.
3855         break;;
3856     * )
3857         break;;
3858   esac
3859 done
3860 test "$ac_cv_exeext" = no && ac_cv_exeext=
3861
3862 else
3863   ac_file=''
3864 fi
3865 if test -z "$ac_file"; then :
3866   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3867 $as_echo "no" >&6; }
3868 $as_echo "$as_me: failed program was:" >&5
3869 sed 's/^/| /' conftest.$ac_ext >&5
3870
3871 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3872 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3873 as_fn_error 77 "C compiler cannot create executables
3874 See \`config.log' for more details" "$LINENO" 5; }
3875 else
3876   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3877 $as_echo "yes" >&6; }
3878 fi
3879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3880 $as_echo_n "checking for C compiler default output file name... " >&6; }
3881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3882 $as_echo "$ac_file" >&6; }
3883 ac_exeext=$ac_cv_exeext
3884
3885 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3886 ac_clean_files=$ac_clean_files_save
3887 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3888 $as_echo_n "checking for suffix of executables... " >&6; }
3889 if { { ac_try="$ac_link"
3890 case "(($ac_try" in
3891   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3892   *) ac_try_echo=$ac_try;;
3893 esac
3894 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3895 $as_echo "$ac_try_echo"; } >&5
3896   (eval "$ac_link") 2>&5
3897   ac_status=$?
3898   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3899   test $ac_status = 0; }; then :
3900   # If both `conftest.exe' and `conftest' are `present' (well, observable)
3901 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3902 # work properly (i.e., refer to `conftest.exe'), while it won't with
3903 # `rm'.
3904 for ac_file in conftest.exe conftest conftest.*; do
3905   test -f "$ac_file" || continue
3906   case $ac_file in
3907     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3908     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3909           break;;
3910     * ) break;;
3911   esac
3912 done
3913 else
3914   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3915 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3916 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3917 See \`config.log' for more details" "$LINENO" 5; }
3918 fi
3919 rm -f conftest conftest$ac_cv_exeext
3920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3921 $as_echo "$ac_cv_exeext" >&6; }
3922
3923 rm -f conftest.$ac_ext
3924 EXEEXT=$ac_cv_exeext
3925 ac_exeext=$EXEEXT
3926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3927 /* end confdefs.h.  */
3928 #include <stdio.h>
3929 int
3930 main ()
3931 {
3932 FILE *f = fopen ("conftest.out", "w");
3933  return ferror (f) || fclose (f) != 0;
3934
3935   ;
3936   return 0;
3937 }
3938 _ACEOF
3939 ac_clean_files="$ac_clean_files conftest.out"
3940 # Check that the compiler produces executables we can run.  If not, either
3941 # the compiler is broken, or we cross compile.
3942 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3943 $as_echo_n "checking whether we are cross compiling... " >&6; }
3944 if test "$cross_compiling" != yes; then
3945   { { ac_try="$ac_link"
3946 case "(($ac_try" in
3947   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3948   *) ac_try_echo=$ac_try;;
3949 esac
3950 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3951 $as_echo "$ac_try_echo"; } >&5
3952   (eval "$ac_link") 2>&5
3953   ac_status=$?
3954   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3955   test $ac_status = 0; }
3956   if { ac_try='./conftest$ac_cv_exeext'
3957   { { case "(($ac_try" in
3958   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3959   *) ac_try_echo=$ac_try;;
3960 esac
3961 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3962 $as_echo "$ac_try_echo"; } >&5
3963   (eval "$ac_try") 2>&5
3964   ac_status=$?
3965   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3966   test $ac_status = 0; }; }; then
3967     cross_compiling=no
3968   else
3969     if test "$cross_compiling" = maybe; then
3970         cross_compiling=yes
3971     else
3972         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3973 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3974 as_fn_error $? "cannot run C compiled programs.
3975 If you meant to cross compile, use \`--host'.
3976 See \`config.log' for more details" "$LINENO" 5; }
3977     fi
3978   fi
3979 fi
3980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3981 $as_echo "$cross_compiling" >&6; }
3982
3983 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3984 ac_clean_files=$ac_clean_files_save
3985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3986 $as_echo_n "checking for suffix of object files... " >&6; }
3987 if ${ac_cv_objext+:} false; then :
3988   $as_echo_n "(cached) " >&6
3989 else
3990   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3991 /* end confdefs.h.  */
3992
3993 int
3994 main ()
3995 {
3996
3997   ;
3998   return 0;
3999 }
4000 _ACEOF
4001 rm -f conftest.o conftest.obj
4002 if { { ac_try="$ac_compile"
4003 case "(($ac_try" in
4004   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4005   *) ac_try_echo=$ac_try;;
4006 esac
4007 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4008 $as_echo "$ac_try_echo"; } >&5
4009   (eval "$ac_compile") 2>&5
4010   ac_status=$?
4011   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4012   test $ac_status = 0; }; then :
4013   for ac_file in conftest.o conftest.obj conftest.*; do
4014   test -f "$ac_file" || continue;
4015   case $ac_file in
4016     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4017     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4018        break;;
4019   esac
4020 done
4021 else
4022   $as_echo "$as_me: failed program was:" >&5
4023 sed 's/^/| /' conftest.$ac_ext >&5
4024
4025 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4026 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4027 as_fn_error $? "cannot compute suffix of object files: cannot compile
4028 See \`config.log' for more details" "$LINENO" 5; }
4029 fi
4030 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4031 fi
4032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4033 $as_echo "$ac_cv_objext" >&6; }
4034 OBJEXT=$ac_cv_objext
4035 ac_objext=$OBJEXT
4036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4037 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4038 if ${ac_cv_c_compiler_gnu+:} false; then :
4039   $as_echo_n "(cached) " >&6
4040 else
4041   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4042 /* end confdefs.h.  */
4043
4044 int
4045 main ()
4046 {
4047 #ifndef __GNUC__
4048        choke me
4049 #endif
4050
4051   ;
4052   return 0;
4053 }
4054 _ACEOF
4055 if ac_fn_c_try_compile "$LINENO"; then :
4056   ac_compiler_gnu=yes
4057 else
4058   ac_compiler_gnu=no
4059 fi
4060 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4061 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4062
4063 fi
4064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4065 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4066 if test $ac_compiler_gnu = yes; then
4067   GCC=yes
4068 else
4069   GCC=
4070 fi
4071 ac_test_CFLAGS=${CFLAGS+set}
4072 ac_save_CFLAGS=$CFLAGS
4073 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4074 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4075 if ${ac_cv_prog_cc_g+:} false; then :
4076   $as_echo_n "(cached) " >&6
4077 else
4078   ac_save_c_werror_flag=$ac_c_werror_flag
4079    ac_c_werror_flag=yes
4080    ac_cv_prog_cc_g=no
4081    CFLAGS="-g"
4082    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4083 /* end confdefs.h.  */
4084
4085 int
4086 main ()
4087 {
4088
4089   ;
4090   return 0;
4091 }
4092 _ACEOF
4093 if ac_fn_c_try_compile "$LINENO"; then :
4094   ac_cv_prog_cc_g=yes
4095 else
4096   CFLAGS=""
4097       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4098 /* end confdefs.h.  */
4099
4100 int
4101 main ()
4102 {
4103
4104   ;
4105   return 0;
4106 }
4107 _ACEOF
4108 if ac_fn_c_try_compile "$LINENO"; then :
4109
4110 else
4111   ac_c_werror_flag=$ac_save_c_werror_flag
4112          CFLAGS="-g"
4113          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4114 /* end confdefs.h.  */
4115
4116 int
4117 main ()
4118 {
4119
4120   ;
4121   return 0;
4122 }
4123 _ACEOF
4124 if ac_fn_c_try_compile "$LINENO"; then :
4125   ac_cv_prog_cc_g=yes
4126 fi
4127 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4128 fi
4129 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4130 fi
4131 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4132    ac_c_werror_flag=$ac_save_c_werror_flag
4133 fi
4134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4135 $as_echo "$ac_cv_prog_cc_g" >&6; }
4136 if test "$ac_test_CFLAGS" = set; then
4137   CFLAGS=$ac_save_CFLAGS
4138 elif test $ac_cv_prog_cc_g = yes; then
4139   if test "$GCC" = yes; then
4140     CFLAGS="-g -O2"
4141   else
4142     CFLAGS="-g"
4143   fi
4144 else
4145   if test "$GCC" = yes; then
4146     CFLAGS="-O2"
4147   else
4148     CFLAGS=
4149   fi
4150 fi
4151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4152 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4153 if ${ac_cv_prog_cc_c89+:} false; then :
4154   $as_echo_n "(cached) " >&6
4155 else
4156   ac_cv_prog_cc_c89=no
4157 ac_save_CC=$CC
4158 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4159 /* end confdefs.h.  */
4160 #include <stdarg.h>
4161 #include <stdio.h>
4162 struct stat;
4163 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4164 struct buf { int x; };
4165 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4166 static char *e (p, i)
4167      char **p;
4168      int i;
4169 {
4170   return p[i];
4171 }
4172 static char *f (char * (*g) (char **, int), char **p, ...)
4173 {
4174   char *s;
4175   va_list v;
4176   va_start (v,p);
4177   s = g (p, va_arg (v,int));
4178   va_end (v);
4179   return s;
4180 }
4181
4182 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
4183    function prototypes and stuff, but not '\xHH' hex character constants.
4184    These don't provoke an error unfortunately, instead are silently treated
4185    as 'x'.  The following induces an error, until -std is added to get
4186    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
4187    array size at least.  It's necessary to write '\x00'==0 to get something
4188    that's true only with -std.  */
4189 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4190
4191 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4192    inside strings and character constants.  */
4193 #define FOO(x) 'x'
4194 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4195
4196 int test (int i, double x);
4197 struct s1 {int (*f) (int a);};
4198 struct s2 {int (*f) (double a);};
4199 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4200 int argc;
4201 char **argv;
4202 int
4203 main ()
4204 {
4205 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4206   ;
4207   return 0;
4208 }
4209 _ACEOF
4210 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4211         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4212 do
4213   CC="$ac_save_CC $ac_arg"
4214   if ac_fn_c_try_compile "$LINENO"; then :
4215   ac_cv_prog_cc_c89=$ac_arg
4216 fi
4217 rm -f core conftest.err conftest.$ac_objext
4218   test "x$ac_cv_prog_cc_c89" != "xno" && break
4219 done
4220 rm -f conftest.$ac_ext
4221 CC=$ac_save_CC
4222
4223 fi
4224 # AC_CACHE_VAL
4225 case "x$ac_cv_prog_cc_c89" in
4226   x)
4227     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4228 $as_echo "none needed" >&6; } ;;
4229   xno)
4230     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4231 $as_echo "unsupported" >&6; } ;;
4232   *)
4233     CC="$CC $ac_cv_prog_cc_c89"
4234     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4235 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4236 esac
4237 if test "x$ac_cv_prog_cc_c89" != xno; then :
4238
4239 fi
4240
4241 ac_ext=c
4242 ac_cpp='$CPP $CPPFLAGS'
4243 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4244 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4245 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4246
4247
4248 # Check if it's Intel's compiler, which (usually) pretends to be gcc,
4249 # but has idiosyncrasies of its own.  We assume icc will define
4250 # __INTEL_COMPILER regardless of CFLAGS.
4251
4252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4253 /* end confdefs.h.  */
4254
4255 int
4256 main ()
4257 {
4258 #ifndef __INTEL_COMPILER
4259 choke me
4260 #endif
4261   ;
4262   return 0;
4263 }
4264 _ACEOF
4265 if ac_fn_c_try_compile "$LINENO"; then :
4266   ICC=yes
4267 else
4268   ICC=no
4269 fi
4270 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4271
4272 # Check if it's Sun Studio compiler. We assume that
4273 # __SUNPRO_C will be defined for Sun Studio compilers
4274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4275 /* end confdefs.h.  */
4276
4277 int
4278 main ()
4279 {
4280 #ifndef __SUNPRO_C
4281 choke me
4282 #endif
4283   ;
4284   return 0;
4285 }
4286 _ACEOF
4287 if ac_fn_c_try_compile "$LINENO"; then :
4288   SUN_STUDIO_CC=yes
4289 else
4290   SUN_STUDIO_CC=no
4291 fi
4292 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4293
4294
4295
4296 unset CFLAGS
4297
4298 #
4299 # Read the template
4300 #
4301 . "$srcdir/src/template/$template" || exit
4302
4303 # CFLAGS are selected so:
4304 # If the user specifies something in the environment, that is used.
4305 # else:  If the template file set something, that is used.
4306 # else:  If coverage was enabled, don't set anything.
4307 # else:  If the compiler is GCC, then we use -O2.
4308 # else:  If the compiler is something else, then we use -O, unless debugging.
4309
4310 if test "$ac_env_CFLAGS_set" = set; then
4311   CFLAGS=$ac_env_CFLAGS_value
4312 elif test "${CFLAGS+set}" = set; then
4313   : # (keep what template set)
4314 elif test "$enable_coverage" = yes; then
4315   : # no optimization by default
4316 elif test "$GCC" = yes; then
4317   CFLAGS="-O2"
4318 else
4319   # if the user selected debug mode, don't use -O
4320   if test "$enable_debug" != yes; then
4321     CFLAGS="-O"
4322   fi
4323 fi
4324
4325 # set CFLAGS_VECTOR from the environment, if available
4326 if test "$ac_env_CFLAGS_VECTOR_set" = set; then
4327   CFLAGS_VECTOR=$ac_env_CFLAGS_VECTOR_value
4328 fi
4329
4330 # Some versions of GCC support some additional useful warning flags.
4331 # Check whether they are supported, and add them to CFLAGS if so.
4332 # ICC pretends to be GCC but it's lying; it doesn't support these flags,
4333 # but has its own.  Also check other compiler-specific flags here.
4334
4335 if test "$GCC" = yes -a "$ICC" = no; then
4336   CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wpointer-arith"
4337   # These work in some but not all gcc versions
4338   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wdeclaration-after-statement" >&5
4339 $as_echo_n "checking whether $CC supports -Wdeclaration-after-statement... " >&6; }
4340 if ${pgac_cv_prog_cc_cflags__Wdeclaration_after_statement+:} false; then :
4341   $as_echo_n "(cached) " >&6
4342 else
4343   pgac_save_CFLAGS=$CFLAGS
4344 CFLAGS="$pgac_save_CFLAGS -Wdeclaration-after-statement"
4345 ac_save_c_werror_flag=$ac_c_werror_flag
4346 ac_c_werror_flag=yes
4347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4348 /* end confdefs.h.  */
4349
4350 int
4351 main ()
4352 {
4353
4354   ;
4355   return 0;
4356 }
4357 _ACEOF
4358 if ac_fn_c_try_compile "$LINENO"; then :
4359   pgac_cv_prog_cc_cflags__Wdeclaration_after_statement=yes
4360 else
4361   pgac_cv_prog_cc_cflags__Wdeclaration_after_statement=no
4362 fi
4363 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4364 ac_c_werror_flag=$ac_save_c_werror_flag
4365 CFLAGS="$pgac_save_CFLAGS"
4366 fi
4367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" >&5
4368 $as_echo "$pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" >&6; }
4369 if test x"$pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" = x"yes"; then
4370   CFLAGS="$CFLAGS -Wdeclaration-after-statement"
4371 fi
4372
4373   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wendif-labels" >&5
4374 $as_echo_n "checking whether $CC supports -Wendif-labels... " >&6; }
4375 if ${pgac_cv_prog_cc_cflags__Wendif_labels+:} false; then :
4376   $as_echo_n "(cached) " >&6
4377 else
4378   pgac_save_CFLAGS=$CFLAGS
4379 CFLAGS="$pgac_save_CFLAGS -Wendif-labels"
4380 ac_save_c_werror_flag=$ac_c_werror_flag
4381 ac_c_werror_flag=yes
4382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4383 /* end confdefs.h.  */
4384
4385 int
4386 main ()
4387 {
4388
4389   ;
4390   return 0;
4391 }
4392 _ACEOF
4393 if ac_fn_c_try_compile "$LINENO"; then :
4394   pgac_cv_prog_cc_cflags__Wendif_labels=yes
4395 else
4396   pgac_cv_prog_cc_cflags__Wendif_labels=no
4397 fi
4398 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4399 ac_c_werror_flag=$ac_save_c_werror_flag
4400 CFLAGS="$pgac_save_CFLAGS"
4401 fi
4402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wendif_labels" >&5
4403 $as_echo "$pgac_cv_prog_cc_cflags__Wendif_labels" >&6; }
4404 if test x"$pgac_cv_prog_cc_cflags__Wendif_labels" = x"yes"; then
4405   CFLAGS="$CFLAGS -Wendif-labels"
4406 fi
4407
4408   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wmissing-format-attribute" >&5
4409 $as_echo_n "checking whether $CC supports -Wmissing-format-attribute... " >&6; }
4410 if ${pgac_cv_prog_cc_cflags__Wmissing_format_attribute+:} false; then :
4411   $as_echo_n "(cached) " >&6
4412 else
4413   pgac_save_CFLAGS=$CFLAGS
4414 CFLAGS="$pgac_save_CFLAGS -Wmissing-format-attribute"
4415 ac_save_c_werror_flag=$ac_c_werror_flag
4416 ac_c_werror_flag=yes
4417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4418 /* end confdefs.h.  */
4419
4420 int
4421 main ()
4422 {
4423
4424   ;
4425   return 0;
4426 }
4427 _ACEOF
4428 if ac_fn_c_try_compile "$LINENO"; then :
4429   pgac_cv_prog_cc_cflags__Wmissing_format_attribute=yes
4430 else
4431   pgac_cv_prog_cc_cflags__Wmissing_format_attribute=no
4432 fi
4433 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4434 ac_c_werror_flag=$ac_save_c_werror_flag
4435 CFLAGS="$pgac_save_CFLAGS"
4436 fi
4437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wmissing_format_attribute" >&5
4438 $as_echo "$pgac_cv_prog_cc_cflags__Wmissing_format_attribute" >&6; }
4439 if test x"$pgac_cv_prog_cc_cflags__Wmissing_format_attribute" = x"yes"; then
4440   CFLAGS="$CFLAGS -Wmissing-format-attribute"
4441 fi
4442
4443   # This was included in -Wall/-Wformat in older GCC versions
4444   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wformat-security" >&5
4445 $as_echo_n "checking whether $CC supports -Wformat-security... " >&6; }
4446 if ${pgac_cv_prog_cc_cflags__Wformat_security+:} false; then :
4447   $as_echo_n "(cached) " >&6
4448 else
4449   pgac_save_CFLAGS=$CFLAGS
4450 CFLAGS="$pgac_save_CFLAGS -Wformat-security"
4451 ac_save_c_werror_flag=$ac_c_werror_flag
4452 ac_c_werror_flag=yes
4453 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4454 /* end confdefs.h.  */
4455
4456 int
4457 main ()
4458 {
4459
4460   ;
4461   return 0;
4462 }
4463 _ACEOF
4464 if ac_fn_c_try_compile "$LINENO"; then :
4465   pgac_cv_prog_cc_cflags__Wformat_security=yes
4466 else
4467   pgac_cv_prog_cc_cflags__Wformat_security=no
4468 fi
4469 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4470 ac_c_werror_flag=$ac_save_c_werror_flag
4471 CFLAGS="$pgac_save_CFLAGS"
4472 fi
4473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wformat_security" >&5
4474 $as_echo "$pgac_cv_prog_cc_cflags__Wformat_security" >&6; }
4475 if test x"$pgac_cv_prog_cc_cflags__Wformat_security" = x"yes"; then
4476   CFLAGS="$CFLAGS -Wformat-security"
4477 fi
4478
4479   # Disable strict-aliasing rules; needed for gcc 3.3+
4480   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fno-strict-aliasing" >&5
4481 $as_echo_n "checking whether $CC supports -fno-strict-aliasing... " >&6; }
4482 if ${pgac_cv_prog_cc_cflags__fno_strict_aliasing+:} false; then :
4483   $as_echo_n "(cached) " >&6
4484 else
4485   pgac_save_CFLAGS=$CFLAGS
4486 CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing"
4487 ac_save_c_werror_flag=$ac_c_werror_flag
4488 ac_c_werror_flag=yes
4489 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4490 /* end confdefs.h.  */
4491
4492 int
4493 main ()
4494 {
4495
4496   ;
4497   return 0;
4498 }
4499 _ACEOF
4500 if ac_fn_c_try_compile "$LINENO"; then :
4501   pgac_cv_prog_cc_cflags__fno_strict_aliasing=yes
4502 else
4503   pgac_cv_prog_cc_cflags__fno_strict_aliasing=no
4504 fi
4505 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4506 ac_c_werror_flag=$ac_save_c_werror_flag
4507 CFLAGS="$pgac_save_CFLAGS"
4508 fi
4509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&5
4510 $as_echo "$pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&6; }
4511 if test x"$pgac_cv_prog_cc_cflags__fno_strict_aliasing" = x"yes"; then
4512   CFLAGS="$CFLAGS -fno-strict-aliasing"
4513 fi
4514
4515   # Disable optimizations that assume no overflow; needed for gcc 4.3+
4516   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fwrapv" >&5
4517 $as_echo_n "checking whether $CC supports -fwrapv... " >&6; }
4518 if ${pgac_cv_prog_cc_cflags__fwrapv+:} false; then :
4519   $as_echo_n "(cached) " >&6
4520 else
4521   pgac_save_CFLAGS=$CFLAGS
4522 CFLAGS="$pgac_save_CFLAGS -fwrapv"
4523 ac_save_c_werror_flag=$ac_c_werror_flag
4524 ac_c_werror_flag=yes
4525 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4526 /* end confdefs.h.  */
4527
4528 int
4529 main ()
4530 {
4531
4532   ;
4533   return 0;
4534 }
4535 _ACEOF
4536 if ac_fn_c_try_compile "$LINENO"; then :
4537   pgac_cv_prog_cc_cflags__fwrapv=yes
4538 else
4539   pgac_cv_prog_cc_cflags__fwrapv=no
4540 fi
4541 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4542 ac_c_werror_flag=$ac_save_c_werror_flag
4543 CFLAGS="$pgac_save_CFLAGS"
4544 fi
4545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fwrapv" >&5
4546 $as_echo "$pgac_cv_prog_cc_cflags__fwrapv" >&6; }
4547 if test x"$pgac_cv_prog_cc_cflags__fwrapv" = x"yes"; then
4548   CFLAGS="$CFLAGS -fwrapv"
4549 fi
4550
4551   # Disable FP optimizations that cause various errors on gcc 4.5+ or maybe 4.6+
4552   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fexcess-precision=standard" >&5
4553 $as_echo_n "checking whether $CC supports -fexcess-precision=standard... " >&6; }
4554 if ${pgac_cv_prog_cc_cflags__fexcess_precision_standard+:} false; then :
4555   $as_echo_n "(cached) " >&6
4556 else
4557   pgac_save_CFLAGS=$CFLAGS
4558 CFLAGS="$pgac_save_CFLAGS -fexcess-precision=standard"
4559 ac_save_c_werror_flag=$ac_c_werror_flag
4560 ac_c_werror_flag=yes
4561 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4562 /* end confdefs.h.  */
4563
4564 int
4565 main ()
4566 {
4567
4568   ;
4569   return 0;
4570 }
4571 _ACEOF
4572 if ac_fn_c_try_compile "$LINENO"; then :
4573   pgac_cv_prog_cc_cflags__fexcess_precision_standard=yes
4574 else
4575   pgac_cv_prog_cc_cflags__fexcess_precision_standard=no
4576 fi
4577 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4578 ac_c_werror_flag=$ac_save_c_werror_flag
4579 CFLAGS="$pgac_save_CFLAGS"
4580 fi
4581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fexcess_precision_standard" >&5
4582 $as_echo "$pgac_cv_prog_cc_cflags__fexcess_precision_standard" >&6; }
4583 if test x"$pgac_cv_prog_cc_cflags__fexcess_precision_standard" = x"yes"; then
4584   CFLAGS="$CFLAGS -fexcess-precision=standard"
4585 fi
4586
4587   # Optimization flags for specific files that benefit from vectorization
4588   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -funroll-loops" >&5
4589 $as_echo_n "checking whether $CC supports -funroll-loops... " >&6; }
4590 if ${pgac_cv_prog_cc_cflags__funroll_loops+:} false; then :
4591   $as_echo_n "(cached) " >&6
4592 else
4593   pgac_save_CFLAGS=$CFLAGS
4594 CFLAGS="$pgac_save_CFLAGS -funroll-loops"
4595 ac_save_c_werror_flag=$ac_c_werror_flag
4596 ac_c_werror_flag=yes
4597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4598 /* end confdefs.h.  */
4599
4600 int
4601 main ()
4602 {
4603
4604   ;
4605   return 0;
4606 }
4607 _ACEOF
4608 if ac_fn_c_try_compile "$LINENO"; then :
4609   pgac_cv_prog_cc_cflags__funroll_loops=yes
4610 else
4611   pgac_cv_prog_cc_cflags__funroll_loops=no
4612 fi
4613 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4614 ac_c_werror_flag=$ac_save_c_werror_flag
4615 CFLAGS="$pgac_save_CFLAGS"
4616 fi
4617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__funroll_loops" >&5
4618 $as_echo "$pgac_cv_prog_cc_cflags__funroll_loops" >&6; }
4619 if test x"$pgac_cv_prog_cc_cflags__funroll_loops" = x"yes"; then
4620   CFLAGS_VECTOR="${CFLAGS_VECTOR} -funroll-loops"
4621 fi
4622
4623   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -ftree-vectorize" >&5
4624 $as_echo_n "checking whether $CC supports -ftree-vectorize... " >&6; }
4625 if ${pgac_cv_prog_cc_cflags__ftree_vectorize+:} false; then :
4626   $as_echo_n "(cached) " >&6
4627 else
4628   pgac_save_CFLAGS=$CFLAGS
4629 CFLAGS="$pgac_save_CFLAGS -ftree-vectorize"
4630 ac_save_c_werror_flag=$ac_c_werror_flag
4631 ac_c_werror_flag=yes
4632 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4633 /* end confdefs.h.  */
4634
4635 int
4636 main ()
4637 {
4638
4639   ;
4640   return 0;
4641 }
4642 _ACEOF
4643 if ac_fn_c_try_compile "$LINENO"; then :
4644   pgac_cv_prog_cc_cflags__ftree_vectorize=yes
4645 else
4646   pgac_cv_prog_cc_cflags__ftree_vectorize=no
4647 fi
4648 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4649 ac_c_werror_flag=$ac_save_c_werror_flag
4650 CFLAGS="$pgac_save_CFLAGS"
4651 fi
4652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__ftree_vectorize" >&5
4653 $as_echo "$pgac_cv_prog_cc_cflags__ftree_vectorize" >&6; }
4654 if test x"$pgac_cv_prog_cc_cflags__ftree_vectorize" = x"yes"; then
4655   CFLAGS_VECTOR="${CFLAGS_VECTOR} -ftree-vectorize"
4656 fi
4657
4658 elif test "$ICC" = yes; then
4659   # Intel's compiler has a bug/misoptimization in checking for
4660   # division by NAN (NaN == 0), -mp1 fixes it, so add it to the CFLAGS.
4661   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -mp1" >&5
4662 $as_echo_n "checking whether $CC supports -mp1... " >&6; }
4663 if ${pgac_cv_prog_cc_cflags__mp1+:} false; then :
4664   $as_echo_n "(cached) " >&6
4665 else
4666   pgac_save_CFLAGS=$CFLAGS
4667 CFLAGS="$pgac_save_CFLAGS -mp1"
4668 ac_save_c_werror_flag=$ac_c_werror_flag
4669 ac_c_werror_flag=yes
4670 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4671 /* end confdefs.h.  */
4672
4673 int
4674 main ()
4675 {
4676
4677   ;
4678   return 0;
4679 }
4680 _ACEOF
4681 if ac_fn_c_try_compile "$LINENO"; then :
4682   pgac_cv_prog_cc_cflags__mp1=yes
4683 else
4684   pgac_cv_prog_cc_cflags__mp1=no
4685 fi
4686 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4687 ac_c_werror_flag=$ac_save_c_werror_flag
4688 CFLAGS="$pgac_save_CFLAGS"
4689 fi
4690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__mp1" >&5
4691 $as_echo "$pgac_cv_prog_cc_cflags__mp1" >&6; }
4692 if test x"$pgac_cv_prog_cc_cflags__mp1" = x"yes"; then
4693   CFLAGS="$CFLAGS -mp1"
4694 fi
4695
4696   # Make sure strict aliasing is off (though this is said to be the default)
4697   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fno-strict-aliasing" >&5
4698 $as_echo_n "checking whether $CC supports -fno-strict-aliasing... " >&6; }
4699 if ${pgac_cv_prog_cc_cflags__fno_strict_aliasing+:} false; then :
4700   $as_echo_n "(cached) " >&6
4701 else
4702   pgac_save_CFLAGS=$CFLAGS
4703 CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing"
4704 ac_save_c_werror_flag=$ac_c_werror_flag
4705 ac_c_werror_flag=yes
4706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4707 /* end confdefs.h.  */
4708
4709 int
4710 main ()
4711 {
4712
4713   ;
4714   return 0;
4715 }
4716 _ACEOF
4717 if ac_fn_c_try_compile "$LINENO"; then :
4718   pgac_cv_prog_cc_cflags__fno_strict_aliasing=yes
4719 else
4720   pgac_cv_prog_cc_cflags__fno_strict_aliasing=no
4721 fi
4722 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4723 ac_c_werror_flag=$ac_save_c_werror_flag
4724 CFLAGS="$pgac_save_CFLAGS"
4725 fi
4726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&5
4727 $as_echo "$pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&6; }
4728 if test x"$pgac_cv_prog_cc_cflags__fno_strict_aliasing" = x"yes"; then
4729   CFLAGS="$CFLAGS -fno-strict-aliasing"
4730 fi
4731
4732 elif test "$PORTNAME" = "aix"; then
4733   # AIX's xlc has to have strict aliasing turned off too
4734   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -qnoansialias" >&5
4735 $as_echo_n "checking whether $CC supports -qnoansialias... " >&6; }
4736 if ${pgac_cv_prog_cc_cflags__qnoansialias+:} false; then :
4737   $as_echo_n "(cached) " >&6
4738 else
4739   pgac_save_CFLAGS=$CFLAGS
4740 CFLAGS="$pgac_save_CFLAGS -qnoansialias"
4741 ac_save_c_werror_flag=$ac_c_werror_flag
4742 ac_c_werror_flag=yes
4743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4744 /* end confdefs.h.  */
4745
4746 int
4747 main ()
4748 {
4749
4750   ;
4751   return 0;
4752 }
4753 _ACEOF
4754 if ac_fn_c_try_compile "$LINENO"; then :
4755   pgac_cv_prog_cc_cflags__qnoansialias=yes
4756 else
4757   pgac_cv_prog_cc_cflags__qnoansialias=no
4758 fi
4759 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4760 ac_c_werror_flag=$ac_save_c_werror_flag
4761 CFLAGS="$pgac_save_CFLAGS"
4762 fi
4763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__qnoansialias" >&5
4764 $as_echo "$pgac_cv_prog_cc_cflags__qnoansialias" >&6; }
4765 if test x"$pgac_cv_prog_cc_cflags__qnoansialias" = x"yes"; then
4766   CFLAGS="$CFLAGS -qnoansialias"
4767 fi
4768
4769 elif test "$PORTNAME" = "hpux"; then
4770   # On some versions of HP-UX, libm functions do not set errno by default.
4771   # Fix that by using +Olibmerrno if the compiler recognizes it.
4772   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports +Olibmerrno" >&5
4773 $as_echo_n "checking whether $CC supports +Olibmerrno... " >&6; }
4774 if ${pgac_cv_prog_cc_cflags_pOlibmerrno+:} false; then :
4775   $as_echo_n "(cached) " >&6
4776 else
4777   pgac_save_CFLAGS=$CFLAGS
4778 CFLAGS="$pgac_save_CFLAGS +Olibmerrno"
4779 ac_save_c_werror_flag=$ac_c_werror_flag
4780 ac_c_werror_flag=yes
4781 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4782 /* end confdefs.h.  */
4783
4784 int
4785 main ()
4786 {
4787
4788   ;
4789   return 0;
4790 }
4791 _ACEOF
4792 if ac_fn_c_try_compile "$LINENO"; then :
4793   pgac_cv_prog_cc_cflags_pOlibmerrno=yes
4794 else
4795   pgac_cv_prog_cc_cflags_pOlibmerrno=no
4796 fi
4797 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4798 ac_c_werror_flag=$ac_save_c_werror_flag
4799 CFLAGS="$pgac_save_CFLAGS"
4800 fi
4801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags_pOlibmerrno" >&5
4802 $as_echo "$pgac_cv_prog_cc_cflags_pOlibmerrno" >&6; }
4803 if test x"$pgac_cv_prog_cc_cflags_pOlibmerrno" = x"yes"; then
4804   CFLAGS="$CFLAGS +Olibmerrno"
4805 fi
4806
4807 fi
4808
4809 CFLAGS_VECTOR=$CFLAGS_VECTOR
4810
4811
4812 # supply -g if --enable-debug
4813 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
4814   CFLAGS="$CFLAGS -g"
4815 fi
4816
4817 # enable code coverage if --enable-coverage
4818 if test "$enable_coverage" = yes; then
4819   if test "$GCC" = yes; then
4820     CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
4821   else
4822     as_fn_error $? "--enable-coverage is supported only when using GCC" "$LINENO" 5
4823   fi
4824 fi
4825
4826 # enable profiling if --enable-profiling
4827 if test "$enable_profiling" = yes && test "$ac_cv_prog_cc_g" = yes; then
4828   if test "$GCC" = yes; then
4829
4830 $as_echo "#define PROFILE_PID_DIR 1" >>confdefs.h
4831
4832     CFLAGS="$CFLAGS -pg $PLATFORM_PROFILE_FLAGS"
4833   else
4834     as_fn_error $? "--enable-profiling is supported only when using GCC" "$LINENO" 5
4835   fi
4836 fi
4837
4838 # We already have this in Makefile.win32, but configure needs it too
4839 if test "$PORTNAME" = "win32"; then
4840   CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32 -DEXEC_BACKEND"
4841 fi
4842
4843 # Check if the compiler still works with the template settings
4844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler still works" >&5
4845 $as_echo_n "checking whether the C compiler still works... " >&6; }
4846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4847 /* end confdefs.h.  */
4848
4849 int
4850 main ()
4851 {
4852 return 0;
4853   ;
4854   return 0;
4855 }
4856 _ACEOF
4857 if ac_fn_c_try_link "$LINENO"; then :
4858   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4859 $as_echo "yes" >&6; }
4860 else
4861   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4862 $as_echo "no" >&6; }
4863    as_fn_error $? "cannot proceed" "$LINENO" 5
4864 fi
4865 rm -f core conftest.err conftest.$ac_objext \
4866     conftest$ac_exeext conftest.$ac_ext
4867
4868 # Defend against gcc -ffast-math
4869 if test "$GCC" = yes; then
4870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4871 /* end confdefs.h.  */
4872
4873 int
4874 main ()
4875 {
4876 #ifdef __FAST_MATH__
4877 choke me
4878 #endif
4879   ;
4880   return 0;
4881 }
4882 _ACEOF
4883 if ac_fn_c_try_compile "$LINENO"; then :
4884
4885 else
4886   as_fn_error $? "do not put -ffast-math in CFLAGS" "$LINENO" 5
4887 fi
4888 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4889 fi
4890
4891 ac_ext=c
4892 ac_cpp='$CPP $CPPFLAGS'
4893 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4894 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4895 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4897 $as_echo_n "checking how to run the C preprocessor... " >&6; }
4898 # On Suns, sometimes $CPP names a directory.
4899 if test -n "$CPP" && test -d "$CPP"; then
4900   CPP=
4901 fi
4902 if test -z "$CPP"; then
4903   if ${ac_cv_prog_CPP+:} false; then :
4904   $as_echo_n "(cached) " >&6
4905 else
4906       # Double quotes because CPP needs to be expanded
4907     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4908     do
4909       ac_preproc_ok=false
4910 for ac_c_preproc_warn_flag in '' yes
4911 do
4912   # Use a header file that comes with gcc, so configuring glibc
4913   # with a fresh cross-compiler works.
4914   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4915   # <limits.h> exists even on freestanding compilers.
4916   # On the NeXT, cc -E runs the code through the compiler's parser,
4917   # not just through cpp. "Syntax error" is here to catch this case.
4918   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4919 /* end confdefs.h.  */
4920 #ifdef __STDC__
4921 # include <limits.h>
4922 #else
4923 # include <assert.h>
4924 #endif
4925                      Syntax error
4926 _ACEOF
4927 if ac_fn_c_try_cpp "$LINENO"; then :
4928
4929 else
4930   # Broken: fails on valid input.
4931 continue
4932 fi
4933 rm -f conftest.err conftest.i conftest.$ac_ext
4934
4935   # OK, works on sane cases.  Now check whether nonexistent headers
4936   # can be detected and how.
4937   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4938 /* end confdefs.h.  */
4939 #include <ac_nonexistent.h>
4940 _ACEOF
4941 if ac_fn_c_try_cpp "$LINENO"; then :
4942   # Broken: success on invalid input.
4943 continue
4944 else
4945   # Passes both tests.
4946 ac_preproc_ok=:
4947 break
4948 fi
4949 rm -f conftest.err conftest.i conftest.$ac_ext
4950
4951 done
4952 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4953 rm -f conftest.i conftest.err conftest.$ac_ext
4954 if $ac_preproc_ok; then :
4955   break
4956 fi
4957
4958     done
4959     ac_cv_prog_CPP=$CPP
4960
4961 fi
4962   CPP=$ac_cv_prog_CPP
4963 else
4964   ac_cv_prog_CPP=$CPP
4965 fi
4966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4967 $as_echo "$CPP" >&6; }
4968 ac_preproc_ok=false
4969 for ac_c_preproc_warn_flag in '' yes
4970 do
4971   # Use a header file that comes with gcc, so configuring glibc
4972   # with a fresh cross-compiler works.
4973   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4974   # <limits.h> exists even on freestanding compilers.
4975   # On the NeXT, cc -E runs the code through the compiler's parser,
4976   # not just through cpp. "Syntax error" is here to catch this case.
4977   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4978 /* end confdefs.h.  */
4979 #ifdef __STDC__
4980 # include <limits.h>
4981 #else
4982 # include <assert.h>
4983 #endif
4984                      Syntax error
4985 _ACEOF
4986 if ac_fn_c_try_cpp "$LINENO"; then :
4987
4988 else
4989   # Broken: fails on valid input.
4990 continue
4991 fi
4992 rm -f conftest.err conftest.i conftest.$ac_ext
4993
4994   # OK, works on sane cases.  Now check whether nonexistent headers
4995   # can be detected and how.
4996   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4997 /* end confdefs.h.  */
4998 #include <ac_nonexistent.h>
4999 _ACEOF
5000 if ac_fn_c_try_cpp "$LINENO"; then :
5001   # Broken: success on invalid input.
5002 continue
5003 else
5004   # Passes both tests.
5005 ac_preproc_ok=:
5006 break
5007 fi
5008 rm -f conftest.err conftest.i conftest.$ac_ext
5009
5010 done
5011 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5012 rm -f conftest.i conftest.err conftest.$ac_ext
5013 if $ac_preproc_ok; then :
5014
5015 else
5016   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5017 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5018 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
5019 See \`config.log' for more details" "$LINENO" 5; }
5020 fi
5021
5022 ac_ext=c
5023 ac_cpp='$CPP $CPPFLAGS'
5024 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5025 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5026 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5027
5028
5029
5030
5031 #
5032 # Set up TAS assembly code if needed; the template file has now had its
5033 # chance to request this.
5034 #
5035 ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
5036
5037
5038 if test "$need_tas" = yes ; then
5039   TAS=tas.o
5040 else
5041   TAS=""
5042 fi
5043
5044
5045
5046 #
5047 # Automatic dependency tracking
5048 #
5049
5050
5051 # Check whether --enable-depend was given.
5052 if test "${enable_depend+set}" = set; then :
5053   enableval=$enable_depend;
5054   case $enableval in
5055     yes)
5056       autodepend=yes
5057       ;;
5058     no)
5059       :
5060       ;;
5061     *)
5062       as_fn_error $? "no argument expected for --enable-depend option" "$LINENO" 5
5063       ;;
5064   esac
5065
5066 else
5067   enable_depend=no
5068
5069 fi
5070
5071
5072
5073
5074
5075 #
5076 # Enable assert checks
5077 #
5078
5079
5080 # Check whether --enable-cassert was given.
5081 if test "${enable_cassert+set}" = set; then :
5082   enableval=$enable_cassert;
5083   case $enableval in
5084     yes)
5085
5086 $as_echo "#define USE_ASSERT_CHECKING 1" >>confdefs.h
5087
5088       ;;
5089     no)
5090       :
5091       ;;
5092     *)
5093       as_fn_error $? "no argument expected for --enable-cassert option" "$LINENO" 5
5094       ;;
5095   esac
5096
5097 else
5098   enable_cassert=no
5099
5100 fi
5101
5102
5103
5104
5105 #
5106 # Include directories
5107 #
5108 ac_save_IFS=$IFS
5109 IFS="${IFS}${PATH_SEPARATOR}"
5110 # SRCH_INC comes from the template file
5111 for dir in $with_includes $SRCH_INC; do
5112   if test -d "$dir"; then
5113     INCLUDES="$INCLUDES -I$dir"
5114   else
5115     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Include directory $dir does not exist." >&5
5116 $as_echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
5117   fi
5118 done
5119 IFS=$ac_save_IFS
5120
5121
5122
5123 #
5124 # Library directories
5125 #
5126 ac_save_IFS=$IFS
5127 IFS="${IFS}${PATH_SEPARATOR}"
5128 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
5129 for dir in $LIBRARY_DIRS $SRCH_LIB; do
5130   if test -d "$dir"; then
5131     LIBDIRS="$LIBDIRS -L$dir"
5132   else
5133     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Library directory $dir does not exist." >&5
5134 $as_echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
5135   fi
5136 done
5137 IFS=$ac_save_IFS
5138
5139 #
5140 # Enable thread-safe client libraries
5141 #
5142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking allow thread-safe client libraries" >&5
5143 $as_echo_n "checking allow thread-safe client libraries... " >&6; }
5144
5145
5146 # Check whether --enable-thread-safety was given.
5147 if test "${enable_thread_safety+set}" = set; then :
5148   enableval=$enable_thread_safety;
5149   case $enableval in
5150     yes)
5151       :
5152       ;;
5153     no)
5154       :
5155       ;;
5156     *)
5157       as_fn_error $? "no argument expected for --enable-thread-safety option" "$LINENO" 5
5158       ;;
5159   esac
5160
5161 else
5162   enable_thread_safety=yes
5163
5164 fi
5165
5166
5167 if test "$enable_thread_safety" = yes; then
5168
5169 $as_echo "#define ENABLE_THREAD_SAFETY 1" >>confdefs.h
5170
5171 fi
5172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_thread_safety" >&5
5173 $as_echo "$enable_thread_safety" >&6; }
5174
5175
5176 #
5177 # Optionally build Tcl modules (PL/Tcl)
5178 #
5179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Tcl" >&5
5180 $as_echo_n "checking whether to build with Tcl... " >&6; }
5181
5182
5183
5184 # Check whether --with-tcl was given.
5185 if test "${with_tcl+set}" = set; then :
5186   withval=$with_tcl;
5187   case $withval in
5188     yes)
5189       :
5190       ;;
5191     no)
5192       :
5193       ;;
5194     *)
5195       as_fn_error $? "no argument expected for --with-tcl option" "$LINENO" 5
5196       ;;
5197   esac
5198
5199 else
5200   with_tcl=no
5201
5202 fi
5203
5204
5205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcl" >&5
5206 $as_echo "$with_tcl" >&6; }
5207
5208
5209 # We see if the path to the Tcl/Tk configuration scripts is specified.
5210 # This will override the use of tclsh to find the paths to search.
5211
5212
5213
5214
5215 # Check whether --with-tclconfig was given.
5216 if test "${with_tclconfig+set}" = set; then :
5217   withval=$with_tclconfig;
5218   case $withval in
5219     yes)
5220       as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
5221       ;;
5222     no)
5223       as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
5224       ;;
5225     *)
5226
5227       ;;
5228   esac
5229
5230 fi
5231
5232
5233
5234 #
5235 # Optionally build Perl modules (PL/Perl)
5236 #
5237 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Perl modules" >&5
5238 $as_echo_n "checking whether to build Perl modules... " >&6; }
5239
5240
5241
5242 # Check whether --with-perl was given.
5243 if test "${with_perl+set}" = set; then :
5244   withval=$with_perl;
5245   case $withval in
5246     yes)
5247       :
5248       ;;
5249     no)
5250       :
5251       ;;
5252     *)
5253       as_fn_error $? "no argument expected for --with-perl option" "$LINENO" 5
5254       ;;
5255   esac
5256
5257 else
5258   with_perl=no
5259
5260 fi
5261
5262
5263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_perl" >&5
5264 $as_echo "$with_perl" >&6; }
5265
5266
5267 #
5268 # Optionally build Python modules (PL/Python)
5269 #
5270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Python modules" >&5
5271 $as_echo_n "checking whether to build Python modules... " >&6; }
5272
5273
5274
5275 # Check whether --with-python was given.
5276 if test "${with_python+set}" = set; then :
5277   withval=$with_python;
5278   case $withval in
5279     yes)
5280       :
5281       ;;
5282     no)
5283       :
5284       ;;
5285     *)
5286       as_fn_error $? "no argument expected for --with-python option" "$LINENO" 5
5287       ;;
5288   esac
5289
5290 else
5291   with_python=no
5292
5293 fi
5294
5295
5296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
5297 $as_echo "$with_python" >&6; }
5298
5299
5300 #
5301 # GSSAPI
5302 #
5303 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with GSSAPI support" >&5
5304 $as_echo_n "checking whether to build with GSSAPI support... " >&6; }
5305
5306
5307
5308 # Check whether --with-gssapi was given.
5309 if test "${with_gssapi+set}" = set; then :
5310   withval=$with_gssapi;
5311   case $withval in
5312     yes)
5313
5314
5315 $as_echo "#define ENABLE_GSS 1" >>confdefs.h
5316
5317   krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
5318
5319       ;;
5320     no)
5321       :
5322       ;;
5323     *)
5324       as_fn_error $? "no argument expected for --with-gssapi option" "$LINENO" 5
5325       ;;
5326   esac
5327
5328 else
5329   with_gssapi=no
5330
5331 fi
5332
5333
5334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_gssapi" >&5
5335 $as_echo "$with_gssapi" >&6; }
5336
5337
5338
5339
5340
5341 #
5342 # Kerberos configuration parameters
5343 #
5344
5345
5346
5347 # Check whether --with-krb-srvnam was given.
5348 if test "${with_krb_srvnam+set}" = set; then :
5349   withval=$with_krb_srvnam;
5350   case $withval in
5351     yes)
5352       as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
5353       ;;
5354     no)
5355       as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
5356       ;;
5357     *)
5358
5359       ;;
5360   esac
5361
5362 else
5363   with_krb_srvnam="postgres"
5364 fi
5365
5366
5367
5368 cat >>confdefs.h <<_ACEOF
5369 #define PG_KRB_SRVNAM "$with_krb_srvnam"
5370 _ACEOF
5371
5372
5373
5374 #
5375 # PAM
5376 #
5377 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with PAM support" >&5
5378 $as_echo_n "checking whether to build with PAM support... " >&6; }
5379
5380
5381
5382 # Check whether --with-pam was given.
5383 if test "${with_pam+set}" = set; then :
5384   withval=$with_pam;
5385   case $withval in
5386     yes)
5387
5388 $as_echo "#define USE_PAM 1" >>confdefs.h
5389
5390       ;;
5391     no)
5392       :
5393       ;;
5394     *)
5395       as_fn_error $? "no argument expected for --with-pam option" "$LINENO" 5
5396       ;;
5397   esac
5398
5399 else
5400   with_pam=no
5401
5402 fi
5403
5404
5405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pam" >&5
5406 $as_echo "$with_pam" >&6; }
5407
5408
5409 #
5410 # LDAP
5411 #
5412 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LDAP support" >&5
5413 $as_echo_n "checking whether to build with LDAP support... " >&6; }
5414
5415
5416
5417 # Check whether --with-ldap was given.
5418 if test "${with_ldap+set}" = set; then :
5419   withval=$with_ldap;
5420   case $withval in
5421     yes)
5422
5423 $as_echo "#define USE_LDAP 1" >>confdefs.h
5424
5425       ;;
5426     no)
5427       :
5428       ;;
5429     *)
5430       as_fn_error $? "no argument expected for --with-ldap option" "$LINENO" 5
5431       ;;
5432   esac
5433
5434 else
5435   with_ldap=no
5436
5437 fi
5438
5439
5440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_ldap" >&5
5441 $as_echo "$with_ldap" >&6; }
5442
5443
5444 #
5445 # Bonjour
5446 #
5447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Bonjour support" >&5
5448 $as_echo_n "checking whether to build with Bonjour support... " >&6; }
5449
5450
5451
5452 # Check whether --with-bonjour was given.
5453 if test "${with_bonjour+set}" = set; then :
5454   withval=$with_bonjour;
5455   case $withval in
5456     yes)
5457
5458 $as_echo "#define USE_BONJOUR 1" >>confdefs.h
5459
5460       ;;
5461     no)
5462       :
5463       ;;
5464     *)
5465       as_fn_error $? "no argument expected for --with-bonjour option" "$LINENO" 5
5466       ;;
5467   esac
5468
5469 else
5470   with_bonjour=no
5471
5472 fi
5473
5474
5475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bonjour" >&5
5476 $as_echo "$with_bonjour" >&6; }
5477
5478
5479 #
5480 # OpenSSL
5481 #
5482 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with OpenSSL support" >&5
5483 $as_echo_n "checking whether to build with OpenSSL support... " >&6; }
5484
5485
5486
5487 # Check whether --with-openssl was given.
5488 if test "${with_openssl+set}" = set; then :
5489   withval=$with_openssl;
5490   case $withval in
5491     yes)
5492
5493 $as_echo "#define USE_SSL 1" >>confdefs.h
5494
5495       ;;
5496     no)
5497       :
5498       ;;
5499     *)
5500       as_fn_error $? "no argument expected for --with-openssl option" "$LINENO" 5
5501       ;;
5502   esac
5503
5504 else
5505   with_openssl=no
5506
5507 fi
5508
5509
5510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_openssl" >&5
5511 $as_echo "$with_openssl" >&6; }
5512
5513
5514 #
5515 # SELinux
5516 #
5517 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with SELinux support" >&5
5518 $as_echo_n "checking whether to build with SELinux support... " >&6; }
5519
5520
5521
5522 # Check whether --with-selinux was given.
5523 if test "${with_selinux+set}" = set; then :
5524   withval=$with_selinux;
5525   case $withval in
5526     yes)
5527       :
5528       ;;
5529     no)
5530       :
5531       ;;
5532     *)
5533       as_fn_error $? "no argument expected for --with-selinux option" "$LINENO" 5
5534       ;;
5535   esac
5536
5537 else
5538   with_selinux=no
5539
5540 fi
5541
5542
5543
5544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_selinux" >&5
5545 $as_echo "$with_selinux" >&6; }
5546
5547 #
5548 # Readline
5549 #
5550
5551
5552
5553 # Check whether --with-readline was given.
5554 if test "${with_readline+set}" = set; then :
5555   withval=$with_readline;
5556   case $withval in
5557     yes)
5558       :
5559       ;;
5560     no)
5561       :
5562       ;;
5563     *)
5564       as_fn_error $? "no argument expected for --with-readline option" "$LINENO" 5
5565       ;;
5566   esac
5567
5568 else
5569   with_readline=yes
5570
5571 fi
5572
5573
5574 # readline on MinGW has problems with backslashes in psql and other bugs.
5575 # This is particularly a problem with non-US code pages.
5576 # Therefore disable its use until we understand the cause. 2004-07-20
5577 if test "$PORTNAME" = "win32"; then
5578   if test "$with_readline" = yes; then
5579     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Readline does not work on MinGW --- disabling" >&5
5580 $as_echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
5581     with_readline=no
5582   fi
5583 fi
5584
5585
5586 #
5587 # Prefer libedit
5588 #
5589
5590
5591
5592 # Check whether --with-libedit-preferred was given.
5593 if test "${with_libedit_preferred+set}" = set; then :
5594   withval=$with_libedit_preferred;
5595   case $withval in
5596     yes)
5597       :
5598       ;;
5599     no)
5600       :
5601       ;;
5602     *)
5603       as_fn_error $? "no argument expected for --with-libedit-preferred option" "$LINENO" 5
5604       ;;
5605   esac
5606
5607 else
5608   with_libedit_preferred=no
5609
5610 fi
5611
5612
5613
5614
5615 #
5616 # OSSP UUID library
5617 #
5618
5619
5620
5621 # Check whether --with-ossp-uuid was given.
5622 if test "${with_ossp_uuid+set}" = set; then :
5623   withval=$with_ossp_uuid;
5624   case $withval in
5625     yes)
5626       :
5627       ;;
5628     no)
5629       :
5630       ;;
5631     *)
5632       as_fn_error $? "no argument expected for --with-ossp-uuid option" "$LINENO" 5
5633       ;;
5634   esac
5635
5636 else
5637   with_ossp_uuid=no
5638
5639 fi
5640
5641
5642
5643
5644
5645 #
5646 # XML
5647 #
5648
5649
5650
5651 # Check whether --with-libxml was given.
5652 if test "${with_libxml+set}" = set; then :
5653   withval=$with_libxml;
5654   case $withval in
5655     yes)
5656
5657 $as_echo "#define USE_LIBXML 1" >>confdefs.h
5658
5659       ;;
5660     no)
5661       :
5662       ;;
5663     *)
5664       as_fn_error $? "no argument expected for --with-libxml option" "$LINENO" 5
5665       ;;
5666   esac
5667
5668 else
5669   with_libxml=no
5670
5671 fi
5672
5673
5674
5675 if test "$with_libxml" = yes ; then
5676   for ac_prog in xml2-config
5677 do
5678   # Extract the first word of "$ac_prog", so it can be a program name with args.
5679 set dummy $ac_prog; ac_word=$2
5680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5681 $as_echo_n "checking for $ac_word... " >&6; }
5682 if ${ac_cv_prog_XML2_CONFIG+:} false; then :
5683   $as_echo_n "(cached) " >&6
5684 else
5685   if test -n "$XML2_CONFIG"; then
5686   ac_cv_prog_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test.
5687 else
5688 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5689 for as_dir in $PATH
5690 do
5691   IFS=$as_save_IFS
5692   test -z "$as_dir" && as_dir=.
5693     for ac_exec_ext in '' $ac_executable_extensions; do
5694   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5695     ac_cv_prog_XML2_CONFIG="$ac_prog"
5696     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5697     break 2
5698   fi
5699 done
5700   done
5701 IFS=$as_save_IFS
5702
5703 fi
5704 fi
5705 XML2_CONFIG=$ac_cv_prog_XML2_CONFIG
5706 if test -n "$XML2_CONFIG"; then
5707   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
5708 $as_echo "$XML2_CONFIG" >&6; }
5709 else
5710   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5711 $as_echo "no" >&6; }
5712 fi
5713
5714
5715   test -n "$XML2_CONFIG" && break
5716 done
5717
5718   if test -n "$XML2_CONFIG"; then
5719     for pgac_option in `$XML2_CONFIG --cflags`; do
5720       case $pgac_option in
5721         -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
5722       esac
5723     done
5724     for pgac_option in `$XML2_CONFIG --libs`; do
5725       case $pgac_option in
5726         -L*) LDFLAGS="$LDFLAGS $pgac_option";;
5727       esac
5728     done
5729   fi
5730 fi
5731
5732
5733
5734 #
5735 # XSLT
5736 #
5737
5738
5739
5740 # Check whether --with-libxslt was given.
5741 if test "${with_libxslt+set}" = set; then :
5742   withval=$with_libxslt;
5743   case $withval in
5744     yes)
5745
5746 $as_echo "#define USE_LIBXSLT 1" >>confdefs.h
5747
5748       ;;
5749     no)
5750       :
5751       ;;
5752     *)
5753       as_fn_error $? "no argument expected for --with-libxslt option" "$LINENO" 5
5754       ;;
5755   esac
5756
5757 else
5758   with_libxslt=no
5759
5760 fi
5761
5762
5763
5764
5765
5766
5767 #
5768 # tzdata
5769 #
5770
5771
5772
5773 # Check whether --with-system-tzdata was given.
5774 if test "${with_system_tzdata+set}" = set; then :
5775   withval=$with_system_tzdata;
5776   case $withval in
5777     yes)
5778       as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
5779       ;;
5780     no)
5781       as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
5782       ;;
5783     *)
5784
5785       ;;
5786   esac
5787
5788 fi
5789
5790
5791
5792
5793 #
5794 # Zlib
5795 #
5796
5797
5798
5799 # Check whether --with-zlib was given.
5800 if test "${with_zlib+set}" = set; then :
5801   withval=$with_zlib;
5802   case $withval in
5803     yes)
5804       :
5805       ;;
5806     no)
5807       :
5808       ;;
5809     *)
5810       as_fn_error $? "no argument expected for --with-zlib option" "$LINENO" 5
5811       ;;
5812   esac
5813
5814 else
5815   with_zlib=yes
5816
5817 fi
5818
5819
5820
5821
5822 #
5823 # Elf
5824 #
5825
5826 # Assume system is ELF if it predefines __ELF__ as 1,
5827 # otherwise believe host_os based default.
5828 case $host_os in
5829     freebsd1*|freebsd2*) elf=no;;
5830     freebsd3*|freebsd4*) elf=yes;;
5831 esac
5832
5833
5834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5835 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5836 if ${ac_cv_path_GREP+:} false; then :
5837   $as_echo_n "(cached) " >&6
5838 else
5839   if test -z "$GREP"; then
5840   ac_path_GREP_found=false
5841   # Loop through the user's path and test for each of PROGNAME-LIST
5842   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5843 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5844 do
5845   IFS=$as_save_IFS
5846   test -z "$as_dir" && as_dir=.
5847     for ac_prog in grep ggrep; do
5848     for ac_exec_ext in '' $ac_executable_extensions; do
5849       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5850       as_fn_executable_p "$ac_path_GREP" || continue
5851 # Check for GNU ac_path_GREP and select it if it is found.
5852   # Check for GNU $ac_path_GREP
5853 case `"$ac_path_GREP" --version 2>&1` in
5854 *GNU*)
5855   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5856 *)
5857   ac_count=0
5858   $as_echo_n 0123456789 >"conftest.in"
5859   while :
5860   do
5861     cat "conftest.in" "conftest.in" >"conftest.tmp"
5862     mv "conftest.tmp" "conftest.in"
5863     cp "conftest.in" "conftest.nl"
5864     $as_echo 'GREP' >> "conftest.nl"
5865     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5866     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5867     as_fn_arith $ac_count + 1 && ac_count=$as_val
5868     if test $ac_count -gt ${ac_path_GREP_max-0}; then
5869       # Best one so far, save it but keep looking for a better one
5870       ac_cv_path_GREP="$ac_path_GREP"
5871       ac_path_GREP_max=$ac_count
5872     fi
5873     # 10*(2^10) chars as input seems more than enough
5874     test $ac_count -gt 10 && break
5875   done
5876   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5877 esac
5878
5879       $ac_path_GREP_found && break 3
5880     done
5881   done
5882   done
5883 IFS=$as_save_IFS
5884   if test -z "$ac_cv_path_GREP"; then
5885     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5886   fi
5887 else
5888   ac_cv_path_GREP=$GREP
5889 fi
5890
5891 fi
5892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5893 $as_echo "$ac_cv_path_GREP" >&6; }
5894  GREP="$ac_cv_path_GREP"
5895
5896
5897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5898 $as_echo_n "checking for egrep... " >&6; }
5899 if ${ac_cv_path_EGREP+:} false; then :
5900   $as_echo_n "(cached) " >&6
5901 else
5902   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5903    then ac_cv_path_EGREP="$GREP -E"
5904    else
5905      if test -z "$EGREP"; then
5906   ac_path_EGREP_found=false
5907   # Loop through the user's path and test for each of PROGNAME-LIST
5908   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5909 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5910 do
5911   IFS=$as_save_IFS
5912   test -z "$as_dir" && as_dir=.
5913     for ac_prog in egrep; do
5914     for ac_exec_ext in '' $ac_executable_extensions; do
5915       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5916       as_fn_executable_p "$ac_path_EGREP" || continue
5917 # Check for GNU ac_path_EGREP and select it if it is found.
5918   # Check for GNU $ac_path_EGREP
5919 case `"$ac_path_EGREP" --version 2>&1` in
5920 *GNU*)
5921   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5922 *)
5923   ac_count=0
5924   $as_echo_n 0123456789 >"conftest.in"
5925   while :
5926   do
5927     cat "conftest.in" "conftest.in" >"conftest.tmp"
5928     mv "conftest.tmp" "conftest.in"
5929     cp "conftest.in" "conftest.nl"
5930     $as_echo 'EGREP' >> "conftest.nl"
5931     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5932     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5933     as_fn_arith $ac_count + 1 && ac_count=$as_val
5934     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5935       # Best one so far, save it but keep looking for a better one
5936       ac_cv_path_EGREP="$ac_path_EGREP"
5937       ac_path_EGREP_max=$ac_count
5938     fi
5939     # 10*(2^10) chars as input seems more than enough
5940     test $ac_count -gt 10 && break
5941   done
5942   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5943 esac
5944
5945       $ac_path_EGREP_found && break 3
5946     done
5947   done
5948   done
5949 IFS=$as_save_IFS
5950   if test -z "$ac_cv_path_EGREP"; then
5951     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5952   fi
5953 else
5954   ac_cv_path_EGREP=$EGREP
5955 fi
5956
5957    fi
5958 fi
5959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5960 $as_echo "$ac_cv_path_EGREP" >&6; }
5961  EGREP="$ac_cv_path_EGREP"
5962
5963
5964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5965 /* end confdefs.h.  */
5966 #if __ELF__
5967   yes
5968 #endif
5969
5970 _ACEOF
5971 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5972   $EGREP "yes" >/dev/null 2>&1; then :
5973   ELF_SYS=true
5974 else
5975   if test "X$elf" = "Xyes" ; then
5976   ELF_SYS=true
5977 else
5978   ELF_SYS=
5979 fi
5980 fi
5981 rm -f conftest*
5982
5983
5984
5985 #
5986 # Assignments
5987 #
5988
5989 CPPFLAGS="$CPPFLAGS $INCLUDES"
5990 LDFLAGS="$LDFLAGS $LIBDIRS"
5991
5992
5993
5994
5995
5996 # Check whether --with-gnu-ld was given.
5997 if test "${with_gnu_ld+set}" = set; then :
5998   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
5999 else
6000   with_gnu_ld=no
6001 fi
6002
6003 ac_prog=ld
6004 if test "$GCC" = yes; then
6005   # Check if gcc -print-prog-name=ld gives a path.
6006   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
6007 $as_echo_n "checking for ld used by GCC... " >&6; }
6008   case $host in
6009   *-*-mingw*)
6010     # gcc leaves a trailing carriage return which upsets mingw
6011     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
6012   *)
6013     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
6014   esac
6015   case "$ac_prog" in
6016     # Accept absolute paths.
6017     [\\/]* | [A-Za-z]:[\\/]*)
6018       re_direlt='/[^/][^/]*/\.\./'
6019       # Canonicalize the path of ld
6020       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
6021       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
6022         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
6023       done
6024       test -z "$LD" && LD="$ac_prog"
6025       ;;
6026   "")
6027     # If it fails, then pretend we aren't using GCC.
6028     ac_prog=ld
6029     ;;
6030   *)
6031     # If it is relative, then search for the first ld in PATH.
6032     with_gnu_ld=unknown
6033     ;;
6034   esac
6035 elif test "$with_gnu_ld" = yes; then
6036   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
6037 $as_echo_n "checking for GNU ld... " >&6; }
6038 else
6039   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
6040 $as_echo_n "checking for non-GNU ld... " >&6; }
6041 fi
6042 if ${ac_cv_path_LD+:} false; then :
6043   $as_echo_n "(cached) " >&6
6044 else
6045   if test -z "$LD"; then
6046   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
6047   for ac_dir in $PATH; do
6048     test -z "$ac_dir" && ac_dir=.
6049     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
6050       ac_cv_path_LD="$ac_dir/$ac_prog"
6051       # Check to see if the program is GNU ld.  I'd rather use --version,
6052       # but apparently some GNU ld's only accept -v.
6053       # Break only if it was the GNU/non-GNU ld that we prefer.
6054       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
6055         test "$with_gnu_ld" != no && break
6056       else
6057         test "$with_gnu_ld" != yes && break
6058       fi
6059     fi
6060   done
6061   IFS="$ac_save_ifs"
6062 else
6063   ac_cv_path_LD="$LD" # Let the user override the test with a path.
6064 fi
6065 fi
6066
6067 LD="$ac_cv_path_LD"
6068 if test -n "$LD"; then
6069   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
6070 $as_echo "$LD" >&6; }
6071 else
6072   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6073 $as_echo "no" >&6; }
6074 fi
6075 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
6076 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
6077 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
6078 if ${ac_cv_prog_gnu_ld+:} false; then :
6079   $as_echo_n "(cached) " >&6
6080 else
6081   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
6082 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
6083   ac_cv_prog_gnu_ld=yes
6084 else
6085   ac_cv_prog_gnu_ld=no
6086 fi
6087 fi
6088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gnu_ld" >&5
6089 $as_echo "$ac_cv_prog_gnu_ld" >&6; }
6090 with_gnu_ld=$ac_cv_prog_gnu_ld
6091
6092
6093
6094
6095 case $host_os in sysv5*)
6096   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ld -R works" >&5
6097 $as_echo_n "checking whether ld -R works... " >&6; }
6098 if ${pgac_cv_prog_ld_R+:} false; then :
6099   $as_echo_n "(cached) " >&6
6100 else
6101
6102     pgac_save_LDFLAGS=$LDFLAGS; LDFLAGS="$LDFLAGS -Wl,-R/usr/lib"
6103     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6104 /* end confdefs.h.  */
6105
6106 int
6107 main ()
6108 {
6109
6110   ;
6111   return 0;
6112 }
6113 _ACEOF
6114 if ac_fn_c_try_link "$LINENO"; then :
6115   pgac_cv_prog_ld_R=yes
6116 else
6117   pgac_cv_prog_ld_R=no
6118 fi
6119 rm -f core conftest.err conftest.$ac_objext \
6120     conftest$ac_exeext conftest.$ac_ext
6121     LDFLAGS=$pgac_save_LDFLAGS
6122
6123 fi
6124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_ld_R" >&5
6125 $as_echo "$pgac_cv_prog_ld_R" >&6; }
6126   ld_R_works=$pgac_cv_prog_ld_R
6127
6128 esac
6129 if test -n "$ac_tool_prefix"; then
6130   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6131 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6132 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6133 $as_echo_n "checking for $ac_word... " >&6; }
6134 if ${ac_cv_prog_RANLIB+:} false; then :
6135   $as_echo_n "(cached) " >&6
6136 else
6137   if test -n "$RANLIB"; then
6138   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6139 else
6140 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6141 for as_dir in $PATH
6142 do
6143   IFS=$as_save_IFS
6144   test -z "$as_dir" && as_dir=.
6145     for ac_exec_ext in '' $ac_executable_extensions; do
6146   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6147     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6148     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6149     break 2
6150   fi
6151 done
6152   done
6153 IFS=$as_save_IFS
6154
6155 fi
6156 fi
6157 RANLIB=$ac_cv_prog_RANLIB
6158 if test -n "$RANLIB"; then
6159   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6160 $as_echo "$RANLIB" >&6; }
6161 else
6162   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6163 $as_echo "no" >&6; }
6164 fi
6165
6166
6167 fi
6168 if test -z "$ac_cv_prog_RANLIB"; then
6169   ac_ct_RANLIB=$RANLIB
6170   # Extract the first word of "ranlib", so it can be a program name with args.
6171 set dummy ranlib; ac_word=$2
6172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6173 $as_echo_n "checking for $ac_word... " >&6; }
6174 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
6175   $as_echo_n "(cached) " >&6
6176 else
6177   if test -n "$ac_ct_RANLIB"; then
6178   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6179 else
6180 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6181 for as_dir in $PATH
6182 do
6183   IFS=$as_save_IFS
6184   test -z "$as_dir" && as_dir=.
6185     for ac_exec_ext in '' $ac_executable_extensions; do
6186   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6187     ac_cv_prog_ac_ct_RANLIB="ranlib"
6188     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6189     break 2
6190   fi
6191 done
6192   done
6193 IFS=$as_save_IFS
6194
6195 fi
6196 fi
6197 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6198 if test -n "$ac_ct_RANLIB"; then
6199   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6200 $as_echo "$ac_ct_RANLIB" >&6; }
6201 else
6202   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6203 $as_echo "no" >&6; }
6204 fi
6205
6206   if test "x$ac_ct_RANLIB" = x; then
6207     RANLIB=":"
6208   else
6209     case $cross_compiling:$ac_tool_warned in
6210 yes:)
6211 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6212 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6213 ac_tool_warned=yes ;;
6214 esac
6215     RANLIB=$ac_ct_RANLIB
6216   fi
6217 else
6218   RANLIB="$ac_cv_prog_RANLIB"
6219 fi
6220
6221
6222   if test -n "$ac_tool_prefix"; then
6223   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
6224 set dummy ${ac_tool_prefix}strip; ac_word=$2
6225 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6226 $as_echo_n "checking for $ac_word... " >&6; }
6227 if ${ac_cv_prog_STRIP+:} false; then :
6228   $as_echo_n "(cached) " >&6
6229 else
6230   if test -n "$STRIP"; then
6231   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
6232 else
6233 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6234 for as_dir in $PATH
6235 do
6236   IFS=$as_save_IFS
6237   test -z "$as_dir" && as_dir=.
6238     for ac_exec_ext in '' $ac_executable_extensions; do
6239   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6240     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
6241     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6242     break 2
6243   fi
6244 done
6245   done
6246 IFS=$as_save_IFS
6247
6248 fi
6249 fi
6250 STRIP=$ac_cv_prog_STRIP
6251 if test -n "$STRIP"; then
6252   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
6253 $as_echo "$STRIP" >&6; }
6254 else
6255   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6256 $as_echo "no" >&6; }
6257 fi
6258
6259
6260 fi
6261 if test -z "$ac_cv_prog_STRIP"; then
6262   ac_ct_STRIP=$STRIP
6263   # Extract the first word of "strip", so it can be a program name with args.
6264 set dummy strip; ac_word=$2
6265 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6266 $as_echo_n "checking for $ac_word... " >&6; }
6267 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
6268   $as_echo_n "(cached) " >&6
6269 else
6270   if test -n "$ac_ct_STRIP"; then
6271   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
6272 else
6273 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6274 for as_dir in $PATH
6275 do
6276   IFS=$as_save_IFS
6277   test -z "$as_dir" && as_dir=.
6278     for ac_exec_ext in '' $ac_executable_extensions; do
6279   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6280     ac_cv_prog_ac_ct_STRIP="strip"
6281     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6282     break 2
6283   fi
6284 done
6285   done
6286 IFS=$as_save_IFS
6287
6288 fi
6289 fi
6290 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
6291 if test -n "$ac_ct_STRIP"; then
6292   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
6293 $as_echo "$ac_ct_STRIP" >&6; }
6294 else
6295   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6296 $as_echo "no" >&6; }
6297 fi
6298
6299   if test "x$ac_ct_STRIP" = x; then
6300     STRIP=":"
6301   else
6302     case $cross_compiling:$ac_tool_warned in
6303 yes:)
6304 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6305 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6306 ac_tool_warned=yes ;;
6307 esac
6308     STRIP=$ac_ct_STRIP
6309   fi
6310 else
6311   STRIP="$ac_cv_prog_STRIP"
6312 fi
6313
6314
6315   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is possible to strip libraries" >&5
6316 $as_echo_n "checking whether it is possible to strip libraries... " >&6; }
6317   if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
6318     STRIP_STATIC_LIB="$STRIP -x"
6319     STRIP_SHARED_LIB="$STRIP --strip-unneeded"
6320     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6321 $as_echo "yes" >&6; }
6322   else
6323     case $host_os in
6324       darwin*)
6325         STRIP="$STRIP -x"
6326         STRIP_STATIC_LIB=$STRIP
6327         STRIP_SHARED_LIB=$STRIP
6328         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6329 $as_echo "yes" >&6; }
6330         ;;
6331       *)
6332         STRIP_STATIC_LIB=:
6333         STRIP_SHARED_LIB=:
6334         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6335 $as_echo "no" >&6; }
6336         ;;
6337     esac
6338   fi
6339
6340
6341
6342 if test -n "$ac_tool_prefix"; then
6343   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6344 set dummy ${ac_tool_prefix}ar; ac_word=$2
6345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6346 $as_echo_n "checking for $ac_word... " >&6; }
6347 if ${ac_cv_prog_AR+:} false; then :
6348   $as_echo_n "(cached) " >&6
6349 else
6350   if test -n "$AR"; then
6351   ac_cv_prog_AR="$AR" # Let the user override the test.
6352 else
6353 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6354 for as_dir in $PATH
6355 do
6356   IFS=$as_save_IFS
6357   test -z "$as_dir" && as_dir=.
6358     for ac_exec_ext in '' $ac_executable_extensions; do
6359   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6360     ac_cv_prog_AR="${ac_tool_prefix}ar"
6361     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6362     break 2
6363   fi
6364 done
6365   done
6366 IFS=$as_save_IFS
6367
6368 fi
6369 fi
6370 AR=$ac_cv_prog_AR
6371 if test -n "$AR"; then
6372   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6373 $as_echo "$AR" >&6; }
6374 else
6375   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6376 $as_echo "no" >&6; }
6377 fi
6378
6379
6380 fi
6381 if test -z "$ac_cv_prog_AR"; then
6382   ac_ct_AR=$AR
6383   # Extract the first word of "ar", so it can be a program name with args.
6384 set dummy ar; ac_word=$2
6385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6386 $as_echo_n "checking for $ac_word... " >&6; }
6387 if ${ac_cv_prog_ac_ct_AR+:} false; then :
6388   $as_echo_n "(cached) " >&6
6389 else
6390   if test -n "$ac_ct_AR"; then
6391   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6392 else
6393 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6394 for as_dir in $PATH
6395 do
6396   IFS=$as_save_IFS
6397   test -z "$as_dir" && as_dir=.
6398     for ac_exec_ext in '' $ac_executable_extensions; do
6399   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6400     ac_cv_prog_ac_ct_AR="ar"
6401     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6402     break 2
6403   fi
6404 done
6405   done
6406 IFS=$as_save_IFS
6407
6408 fi
6409 fi
6410 ac_ct_AR=$ac_cv_prog_ac_ct_AR
6411 if test -n "$ac_ct_AR"; then
6412   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6413 $as_echo "$ac_ct_AR" >&6; }
6414 else
6415   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6416 $as_echo "no" >&6; }
6417 fi
6418
6419   if test "x$ac_ct_AR" = x; then
6420     AR="ar"
6421   else
6422     case $cross_compiling:$ac_tool_warned in
6423 yes:)
6424 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6425 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6426 ac_tool_warned=yes ;;
6427 esac
6428     AR=$ac_ct_AR
6429   fi
6430 else
6431   AR="$ac_cv_prog_AR"
6432 fi
6433
6434 if test "$PORTNAME" = "win32"; then
6435   if test -n "$ac_tool_prefix"; then
6436   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
6437 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
6438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6439 $as_echo_n "checking for $ac_word... " >&6; }
6440 if ${ac_cv_prog_DLLTOOL+:} false; then :
6441   $as_echo_n "(cached) " >&6
6442 else
6443   if test -n "$DLLTOOL"; then
6444   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
6445 else
6446 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6447 for as_dir in $PATH
6448 do
6449   IFS=$as_save_IFS
6450   test -z "$as_dir" && as_dir=.
6451     for ac_exec_ext in '' $ac_executable_extensions; do
6452   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6453     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
6454     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6455     break 2
6456   fi
6457 done
6458   done
6459 IFS=$as_save_IFS
6460
6461 fi
6462 fi
6463 DLLTOOL=$ac_cv_prog_DLLTOOL
6464 if test -n "$DLLTOOL"; then
6465   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
6466 $as_echo "$DLLTOOL" >&6; }
6467 else
6468   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6469 $as_echo "no" >&6; }
6470 fi
6471
6472
6473 fi
6474 if test -z "$ac_cv_prog_DLLTOOL"; then
6475   ac_ct_DLLTOOL=$DLLTOOL
6476   # Extract the first word of "dlltool", so it can be a program name with args.
6477 set dummy dlltool; ac_word=$2
6478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6479 $as_echo_n "checking for $ac_word... " >&6; }
6480 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
6481   $as_echo_n "(cached) " >&6
6482 else
6483   if test -n "$ac_ct_DLLTOOL"; then
6484   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
6485 else
6486 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6487 for as_dir in $PATH
6488 do
6489   IFS=$as_save_IFS
6490   test -z "$as_dir" && as_dir=.
6491     for ac_exec_ext in '' $ac_executable_extensions; do
6492   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6493     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
6494     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6495     break 2
6496   fi
6497 done
6498   done
6499 IFS=$as_save_IFS
6500
6501 fi
6502 fi
6503 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
6504 if test -n "$ac_ct_DLLTOOL"; then
6505   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
6506 $as_echo "$ac_ct_DLLTOOL" >&6; }
6507 else
6508   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6509 $as_echo "no" >&6; }
6510 fi
6511
6512   if test "x$ac_ct_DLLTOOL" = x; then
6513     DLLTOOL="dlltool"
6514   else
6515     case $cross_compiling:$ac_tool_warned in
6516 yes:)
6517 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6518 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6519 ac_tool_warned=yes ;;
6520 esac
6521     DLLTOOL=$ac_ct_DLLTOOL
6522   fi
6523 else
6524   DLLTOOL="$ac_cv_prog_DLLTOOL"
6525 fi
6526
6527   if test -n "$ac_tool_prefix"; then
6528   # Extract the first word of "${ac_tool_prefix}dllwrap", so it can be a program name with args.
6529 set dummy ${ac_tool_prefix}dllwrap; ac_word=$2
6530 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6531 $as_echo_n "checking for $ac_word... " >&6; }
6532 if ${ac_cv_prog_DLLWRAP+:} false; then :
6533   $as_echo_n "(cached) " >&6
6534 else
6535   if test -n "$DLLWRAP"; then
6536   ac_cv_prog_DLLWRAP="$DLLWRAP" # Let the user override the test.
6537 else
6538 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6539 for as_dir in $PATH
6540 do
6541   IFS=$as_save_IFS
6542   test -z "$as_dir" && as_dir=.
6543     for ac_exec_ext in '' $ac_executable_extensions; do
6544   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6545     ac_cv_prog_DLLWRAP="${ac_tool_prefix}dllwrap"
6546     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6547     break 2
6548   fi
6549 done
6550   done
6551 IFS=$as_save_IFS
6552
6553 fi
6554 fi
6555 DLLWRAP=$ac_cv_prog_DLLWRAP
6556 if test -n "$DLLWRAP"; then
6557   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLWRAP" >&5
6558 $as_echo "$DLLWRAP" >&6; }
6559 else
6560   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6561 $as_echo "no" >&6; }
6562 fi
6563
6564
6565 fi
6566 if test -z "$ac_cv_prog_DLLWRAP"; then
6567   ac_ct_DLLWRAP=$DLLWRAP
6568   # Extract the first word of "dllwrap", so it can be a program name with args.
6569 set dummy dllwrap; ac_word=$2
6570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6571 $as_echo_n "checking for $ac_word... " >&6; }
6572 if ${ac_cv_prog_ac_ct_DLLWRAP+:} false; then :
6573   $as_echo_n "(cached) " >&6
6574 else
6575   if test -n "$ac_ct_DLLWRAP"; then
6576   ac_cv_prog_ac_ct_DLLWRAP="$ac_ct_DLLWRAP" # Let the user override the test.
6577 else
6578 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6579 for as_dir in $PATH
6580 do
6581   IFS=$as_save_IFS
6582   test -z "$as_dir" && as_dir=.
6583     for ac_exec_ext in '' $ac_executable_extensions; do
6584   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6585     ac_cv_prog_ac_ct_DLLWRAP="dllwrap"
6586     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6587     break 2
6588   fi
6589 done
6590   done
6591 IFS=$as_save_IFS
6592
6593 fi
6594 fi
6595 ac_ct_DLLWRAP=$ac_cv_prog_ac_ct_DLLWRAP
6596 if test -n "$ac_ct_DLLWRAP"; then
6597   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLWRAP" >&5
6598 $as_echo "$ac_ct_DLLWRAP" >&6; }
6599 else
6600   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6601 $as_echo "no" >&6; }
6602 fi
6603
6604   if test "x$ac_ct_DLLWRAP" = x; then
6605     DLLWRAP="dllwrap"
6606   else
6607     case $cross_compiling:$ac_tool_warned in
6608 yes:)
6609 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6610 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6611 ac_tool_warned=yes ;;
6612 esac
6613     DLLWRAP=$ac_ct_DLLWRAP
6614   fi
6615 else
6616   DLLWRAP="$ac_cv_prog_DLLWRAP"
6617 fi
6618
6619   if test -n "$ac_tool_prefix"; then
6620   # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
6621 set dummy ${ac_tool_prefix}windres; ac_word=$2
6622 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6623 $as_echo_n "checking for $ac_word... " >&6; }
6624 if ${ac_cv_prog_WINDRES+:} false; then :
6625   $as_echo_n "(cached) " >&6
6626 else
6627   if test -n "$WINDRES"; then
6628   ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
6629 else
6630 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6631 for as_dir in $PATH
6632 do
6633   IFS=$as_save_IFS
6634   test -z "$as_dir" && as_dir=.
6635     for ac_exec_ext in '' $ac_executable_extensions; do
6636   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6637     ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
6638     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6639     break 2
6640   fi
6641 done
6642   done
6643 IFS=$as_save_IFS
6644
6645 fi
6646 fi
6647 WINDRES=$ac_cv_prog_WINDRES
6648 if test -n "$WINDRES"; then
6649   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
6650 $as_echo "$WINDRES" >&6; }
6651 else
6652   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6653 $as_echo "no" >&6; }
6654 fi
6655
6656
6657 fi
6658 if test -z "$ac_cv_prog_WINDRES"; then
6659   ac_ct_WINDRES=$WINDRES
6660   # Extract the first word of "windres", so it can be a program name with args.
6661 set dummy windres; ac_word=$2
6662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6663 $as_echo_n "checking for $ac_word... " >&6; }
6664 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
6665   $as_echo_n "(cached) " >&6
6666 else
6667   if test -n "$ac_ct_WINDRES"; then
6668   ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
6669 else
6670 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6671 for as_dir in $PATH
6672 do
6673   IFS=$as_save_IFS
6674   test -z "$as_dir" && as_dir=.
6675     for ac_exec_ext in '' $ac_executable_extensions; do
6676   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6677     ac_cv_prog_ac_ct_WINDRES="windres"
6678     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6679     break 2
6680   fi
6681 done
6682   done
6683 IFS=$as_save_IFS
6684
6685 fi
6686 fi
6687 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
6688 if test -n "$ac_ct_WINDRES"; then
6689   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
6690 $as_echo "$ac_ct_WINDRES" >&6; }
6691 else
6692   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6693 $as_echo "no" >&6; }
6694 fi
6695
6696   if test "x$ac_ct_WINDRES" = x; then
6697     WINDRES="windres"
6698   else
6699     case $cross_compiling:$ac_tool_warned in
6700 yes:)
6701 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6702 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6703 ac_tool_warned=yes ;;
6704 esac
6705     WINDRES=$ac_ct_WINDRES
6706   fi
6707 else
6708   WINDRES="$ac_cv_prog_WINDRES"
6709 fi
6710
6711 fi
6712
6713 # Find a good install program.  We prefer a C program (faster),
6714 # so one script is as good as another.  But avoid the broken or
6715 # incompatible versions:
6716 # SysV /etc/install, /usr/sbin/install
6717 # SunOS /usr/etc/install
6718 # IRIX /sbin/install
6719 # AIX /bin/install
6720 # AmigaOS /C/install, which installs bootblocks on floppy discs
6721 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6722 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
6723 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6724 # OS/2's system install, which has a completely different semantic
6725 # ./install, which can be erroneously created by make from ./install.sh.
6726 # Reject install programs that cannot install multiple files.
6727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6728 $as_echo_n "checking for a BSD-compatible install... " >&6; }
6729 if test -z "$INSTALL"; then
6730 if ${ac_cv_path_install+:} false; then :
6731   $as_echo_n "(cached) " >&6
6732 else
6733   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6734 for as_dir in $PATH
6735 do
6736   IFS=$as_save_IFS
6737   test -z "$as_dir" && as_dir=.
6738     # Account for people who put trailing slashes in PATH elements.
6739 case $as_dir/ in #((
6740   ./ | .// | /[cC]/* | \
6741   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
6742   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
6743   /usr/ucb/* ) ;;
6744   *)
6745     # OSF1 and SCO ODT 3.0 have their own names for install.
6746     # Don't use installbsd from OSF since it installs stuff as root
6747     # by default.
6748     for ac_prog in ginstall scoinst install; do
6749       for ac_exec_ext in '' $ac_executable_extensions; do
6750         if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
6751           if test $ac_prog = install &&
6752             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6753             # AIX install.  It has an incompatible calling convention.
6754             :
6755           elif test $ac_prog = install &&
6756             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6757             # program-specific install script used by HP pwplus--don't use.
6758             :
6759           else
6760             rm -rf conftest.one conftest.two conftest.dir
6761             echo one > conftest.one
6762             echo two > conftest.two
6763             mkdir conftest.dir
6764             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6765               test -s conftest.one && test -s conftest.two &&
6766               test -s conftest.dir/conftest.one &&
6767               test -s conftest.dir/conftest.two
6768             then
6769               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6770               break 3
6771             fi
6772           fi
6773         fi
6774       done
6775     done
6776     ;;
6777 esac
6778
6779   done
6780 IFS=$as_save_IFS
6781
6782 rm -rf conftest.one conftest.two conftest.dir
6783
6784 fi
6785   if test "${ac_cv_path_install+set}" = set; then
6786     INSTALL=$ac_cv_path_install
6787   else
6788     # As a last resort, use the slow shell script.  Don't cache a
6789     # value for INSTALL within a source directory, because that will
6790     # break other packages using the cache if that directory is
6791     # removed, or if the value is a relative name.
6792     INSTALL=$ac_install_sh
6793   fi
6794 fi
6795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6796 $as_echo "$INSTALL" >&6; }
6797
6798 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6799 # It thinks the first close brace ends the variable substitution.
6800 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6801
6802 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6803
6804 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6805
6806 # When Autoconf chooses install-sh as install program it tries to generate
6807 # a relative path to it in each makefile where it subsitutes it. This clashes
6808 # with our Makefile.global concept. This workaround helps.
6809 case $INSTALL in
6810   *install-sh*) install_bin='';;
6811   *) install_bin=$INSTALL;;
6812 esac
6813
6814
6815 # Extract the first word of "tar", so it can be a program name with args.
6816 set dummy tar; ac_word=$2
6817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6818 $as_echo_n "checking for $ac_word... " >&6; }
6819 if ${ac_cv_path_TAR+:} false; then :
6820   $as_echo_n "(cached) " >&6
6821 else
6822   case $TAR in
6823   [\\/]* | ?:[\\/]*)
6824   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
6825   ;;
6826   *)
6827   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6828 for as_dir in $PATH
6829 do
6830   IFS=$as_save_IFS
6831   test -z "$as_dir" && as_dir=.
6832     for ac_exec_ext in '' $ac_executable_extensions; do
6833   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6834     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
6835     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6836     break 2
6837   fi
6838 done
6839   done
6840 IFS=$as_save_IFS
6841
6842   ;;
6843 esac
6844 fi
6845 TAR=$ac_cv_path_TAR
6846 if test -n "$TAR"; then
6847   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
6848 $as_echo "$TAR" >&6; }
6849 else
6850   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6851 $as_echo "no" >&6; }
6852 fi
6853
6854
6855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
6856 $as_echo_n "checking whether ln -s works... " >&6; }
6857 LN_S=$as_ln_s
6858 if test "$LN_S" = "ln -s"; then
6859   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6860 $as_echo "yes" >&6; }
6861 else
6862   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
6863 $as_echo "no, using $LN_S" >&6; }
6864 fi
6865
6866 for ac_prog in gawk mawk nawk awk
6867 do
6868   # Extract the first word of "$ac_prog", so it can be a program name with args.
6869 set dummy $ac_prog; ac_word=$2
6870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6871 $as_echo_n "checking for $ac_word... " >&6; }
6872 if ${ac_cv_prog_AWK+:} false; then :
6873   $as_echo_n "(cached) " >&6
6874 else
6875   if test -n "$AWK"; then
6876   ac_cv_prog_AWK="$AWK" # Let the user override the test.
6877 else
6878 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6879 for as_dir in $PATH
6880 do
6881   IFS=$as_save_IFS
6882   test -z "$as_dir" && as_dir=.
6883     for ac_exec_ext in '' $ac_executable_extensions; do
6884   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6885     ac_cv_prog_AWK="$ac_prog"
6886     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6887     break 2
6888   fi
6889 done
6890   done
6891 IFS=$as_save_IFS
6892
6893 fi
6894 fi
6895 AWK=$ac_cv_prog_AWK
6896 if test -n "$AWK"; then
6897   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
6898 $as_echo "$AWK" >&6; }
6899 else
6900   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6901 $as_echo "no" >&6; }
6902 fi
6903
6904
6905   test -n "$AWK" && break
6906 done
6907
6908 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6909 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6910 if test -z "$MKDIR_P"; then
6911   if ${ac_cv_path_mkdir+:} false; then :
6912   $as_echo_n "(cached) " >&6
6913 else
6914   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6915 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6916 do
6917   IFS=$as_save_IFS
6918   test -z "$as_dir" && as_dir=.
6919     for ac_prog in mkdir gmkdir; do
6920          for ac_exec_ext in '' $ac_executable_extensions; do
6921            as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
6922            case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6923              'mkdir (GNU coreutils) '* | \
6924              'mkdir (coreutils) '* | \
6925              'mkdir (fileutils) '4.1*)
6926                ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6927                break 3;;
6928            esac
6929          done
6930        done
6931   done
6932 IFS=$as_save_IFS
6933
6934 fi
6935
6936   test -d ./--version && rmdir ./--version
6937   if test "${ac_cv_path_mkdir+set}" = set; then
6938     MKDIR_P="$ac_cv_path_mkdir -p"
6939   else
6940     # As a last resort, use the slow shell script.  Don't cache a
6941     # value for MKDIR_P within a source directory, because that will
6942     # break other packages using the cache if that directory is
6943     # removed, or if the value is a relative name.
6944     MKDIR_P="$ac_install_sh -d"
6945   fi
6946 fi
6947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6948 $as_echo "$MKDIR_P" >&6; }
6949
6950 # When Autoconf chooses install-sh as mkdir -p program it tries to generate
6951 # a relative path to it in each makefile where it subsitutes it. This clashes
6952 # with our Makefile.global concept. This workaround helps.
6953 case $MKDIR_P in
6954   *install-sh*) MKDIR_P='\${SHELL} \${top_srcdir}/config/install-sh -c -d';;
6955 esac
6956
6957 # Let the user override the search
6958 if test -z "$BISON"; then
6959   for ac_prog in bison
6960 do
6961   # Extract the first word of "$ac_prog", so it can be a program name with args.
6962 set dummy $ac_prog; ac_word=$2
6963 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6964 $as_echo_n "checking for $ac_word... " >&6; }
6965 if ${ac_cv_path_BISON+:} false; then :
6966   $as_echo_n "(cached) " >&6
6967 else
6968   case $BISON in
6969   [\\/]* | ?:[\\/]*)
6970   ac_cv_path_BISON="$BISON" # Let the user override the test with a path.
6971   ;;
6972   *)
6973   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6974 for as_dir in $PATH
6975 do
6976   IFS=$as_save_IFS
6977   test -z "$as_dir" && as_dir=.
6978     for ac_exec_ext in '' $ac_executable_extensions; do
6979   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6980     ac_cv_path_BISON="$as_dir/$ac_word$ac_exec_ext"
6981     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6982     break 2
6983   fi
6984 done
6985   done
6986 IFS=$as_save_IFS
6987
6988   ;;
6989 esac
6990 fi
6991 BISON=$ac_cv_path_BISON
6992 if test -n "$BISON"; then
6993   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
6994 $as_echo "$BISON" >&6; }
6995 else
6996   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6997 $as_echo "no" >&6; }
6998 fi
6999
7000
7001   test -n "$BISON" && break
7002 done
7003
7004 fi
7005
7006 if test "$BISON"; then
7007   pgac_bison_version=`$BISON --version 2>/dev/null | sed q`
7008   { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_bison_version" >&5
7009 $as_echo "$as_me: using $pgac_bison_version" >&6;}
7010   if echo "$pgac_bison_version" | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'
7011   then
7012     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7013 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
7014 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&5
7015 $as_echo "$as_me: WARNING:
7016 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
7017 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&2;}
7018     BISON=""
7019   fi
7020 fi
7021
7022 if test -z "$BISON"; then
7023   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7024 *** Without Bison you will not be able to build PostgreSQL from Git nor
7025 *** change any of the parser definition files.  You can obtain Bison from
7026 *** a GNU mirror site.  (If you are using the official distribution of
7027 *** PostgreSQL then you do not need to worry about this, because the Bison
7028 *** output is pre-generated.)" >&5
7029 $as_echo "$as_me: WARNING:
7030 *** Without Bison you will not be able to build PostgreSQL from Git nor
7031 *** change any of the parser definition files.  You can obtain Bison from
7032 *** a GNU mirror site.  (If you are using the official distribution of
7033 *** PostgreSQL then you do not need to worry about this, because the Bison
7034 *** output is pre-generated.)" >&2;}
7035 fi
7036 # We don't need AC_SUBST(BISON) because AC_PATH_PROG did it
7037
7038
7039 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flex" >&5
7040 $as_echo_n "checking for flex... " >&6; }
7041 if ${pgac_cv_path_flex+:} false; then :
7042   $as_echo_n "(cached) " >&6
7043 else
7044   # Let the user override the test
7045 if test -n "$FLEX"; then
7046   pgac_cv_path_flex=$FLEX
7047 else
7048   pgac_save_IFS=$IFS
7049   IFS=$PATH_SEPARATOR
7050   for pgac_dir in $PATH; do
7051     IFS=$pgac_save_IFS
7052     if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
7053       pgac_dir=`pwd`
7054     fi
7055     for pgac_prog in flex lex; do
7056       pgac_candidate="$pgac_dir/$pgac_prog"
7057       if test -f "$pgac_candidate" \
7058         && $pgac_candidate --version </dev/null >/dev/null 2>&1
7059       then
7060         echo '%%'  > conftest.l
7061         if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
7062           pgac_flex_version=`$pgac_candidate --version 2>/dev/null`
7063           if echo "$pgac_flex_version" | sed 's/[.a-z]/ /g' | $AWK '{ if ($1 = 2 && $2 = 5 && $3 >= 31) exit 0; else exit 1;}'
7064           then
7065             pgac_cv_path_flex=$pgac_candidate
7066             break 2
7067           else
7068             { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7069 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
7070 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&5
7071 $as_echo "$as_me: WARNING:
7072 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
7073 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&2;}
7074           fi
7075         fi
7076       fi
7077     done
7078   done
7079   rm -f conftest.l lex.yy.c
7080   : ${pgac_cv_path_flex=no}
7081 fi
7082
7083 fi
7084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_path_flex" >&5
7085 $as_echo "$pgac_cv_path_flex" >&6; }
7086 if test x"$pgac_cv_path_flex" = x"no"; then
7087   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7088 *** Without Flex you will not be able to build PostgreSQL from Git nor
7089 *** change any of the scanner definition files.  You can obtain Flex from
7090 *** a GNU mirror site.  (If you are using the official distribution of
7091 *** PostgreSQL then you do not need to worry about this because the Flex
7092 *** output is pre-generated.)" >&5
7093 $as_echo "$as_me: WARNING:
7094 *** Without Flex you will not be able to build PostgreSQL from Git nor
7095 *** change any of the scanner definition files.  You can obtain Flex from
7096 *** a GNU mirror site.  (If you are using the official distribution of
7097 *** PostgreSQL then you do not need to worry about this because the Flex
7098 *** output is pre-generated.)" >&2;}
7099
7100   FLEX=
7101 else
7102   FLEX=$pgac_cv_path_flex
7103   pgac_flex_version=`$FLEX --version 2>/dev/null`
7104   { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_flex_version" >&5
7105 $as_echo "$as_me: using $pgac_flex_version" >&6;}
7106 fi
7107
7108
7109
7110
7111
7112 # Let the user override the search
7113 if test -z "$PERL"; then
7114   # Extract the first word of "perl", so it can be a program name with args.
7115 set dummy perl; ac_word=$2
7116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7117 $as_echo_n "checking for $ac_word... " >&6; }
7118 if ${ac_cv_path_PERL+:} false; then :
7119   $as_echo_n "(cached) " >&6
7120 else
7121   case $PERL in
7122   [\\/]* | ?:[\\/]*)
7123   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
7124   ;;
7125   *)
7126   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7127 for as_dir in $PATH
7128 do
7129   IFS=$as_save_IFS
7130   test -z "$as_dir" && as_dir=.
7131     for ac_exec_ext in '' $ac_executable_extensions; do
7132   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7133     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
7134     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7135     break 2
7136   fi
7137 done
7138   done
7139 IFS=$as_save_IFS
7140
7141   ;;
7142 esac
7143 fi
7144 PERL=$ac_cv_path_PERL
7145 if test -n "$PERL"; then
7146   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
7147 $as_echo "$PERL" >&6; }
7148 else
7149   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7150 $as_echo "no" >&6; }
7151 fi
7152
7153
7154 fi
7155
7156 if test "$PERL"; then
7157   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'`
7158   { $as_echo "$as_me:${as_lineno-$LINENO}: using perl $pgac_perl_version" >&5
7159 $as_echo "$as_me: using perl $pgac_perl_version" >&6;}
7160   if echo "$pgac_perl_version" | sed 's/[.a-z_]/ /g' | \
7161     $AWK '{ if ($1 = 5 && $2 >= 8) exit 1; else exit 0;}'
7162   then
7163     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7164 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
7165 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&5
7166 $as_echo "$as_me: WARNING:
7167 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
7168 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&2;}
7169     PERL=""
7170   fi
7171 fi
7172
7173 if test -z "$PERL"; then
7174   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7175 *** Without Perl you will not be able to build PostgreSQL from Git.
7176 *** You can obtain Perl from any CPAN mirror site.
7177 *** (If you are using the official distribution of PostgreSQL then you do not
7178 *** need to worry about this, because the Perl output is pre-generated.)" >&5
7179 $as_echo "$as_me: WARNING:
7180 *** Without Perl you will not be able to build PostgreSQL from Git.
7181 *** You can obtain Perl from any CPAN mirror site.
7182 *** (If you are using the official distribution of PostgreSQL then you do not
7183 *** need to worry about this, because the Perl output is pre-generated.)" >&2;}
7184 fi
7185
7186 if test "$with_perl" = yes; then
7187   if test -z "$PERL"; then
7188     as_fn_error $? "Perl not found" "$LINENO" 5
7189   fi
7190
7191 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl archlibexp" >&5
7192 $as_echo_n "checking for Perl archlibexp... " >&6; }
7193 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
7194 test "$PORTNAME" = "win32" && perl_archlibexp=`echo $perl_archlibexp | sed 's,\\\\,/,g'`
7195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_archlibexp" >&5
7196 $as_echo "$perl_archlibexp" >&6; }
7197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl privlibexp" >&5
7198 $as_echo_n "checking for Perl privlibexp... " >&6; }
7199 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
7200 test "$PORTNAME" = "win32" && perl_privlibexp=`echo $perl_privlibexp | sed 's,\\\\,/,g'`
7201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_privlibexp" >&5
7202 $as_echo "$perl_privlibexp" >&6; }
7203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl useshrplib" >&5
7204 $as_echo_n "checking for Perl useshrplib... " >&6; }
7205 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
7206 test "$PORTNAME" = "win32" && perl_useshrplib=`echo $perl_useshrplib | sed 's,\\\\,/,g'`
7207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_useshrplib" >&5
7208 $as_echo "$perl_useshrplib" >&6; }
7209
7210 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flags to link embedded Perl" >&5
7211 $as_echo_n "checking for flags to link embedded Perl... " >&6; }
7212 if test "$PORTNAME" = "win32" ; then
7213 perl_lib=`basename $perl_archlibexp/CORE/perl[5-9]*.lib .lib`
7214 test -e "$perl_archlibexp/CORE/$perl_lib.lib" && perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
7215 else
7216 pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
7217 pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
7218 perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%" -e "s/ -arch [-a-zA-Z0-9_]*//g"`
7219 fi
7220 if test -z "$perl_embed_ldflags" ; then
7221         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7222 $as_echo "no" >&6; }
7223         as_fn_error $? "could not determine flags for linking embedded Perl.
7224 This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not
7225 installed." "$LINENO" 5
7226 else
7227         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ldflags" >&5
7228 $as_echo "$perl_embed_ldflags" >&6; }
7229 fi
7230
7231 fi
7232
7233 if test "$with_python" = yes; then
7234   # Extract the first word of "python", so it can be a program name with args.
7235 set dummy python; ac_word=$2
7236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7237 $as_echo_n "checking for $ac_word... " >&6; }
7238 if ${ac_cv_path_PYTHON+:} false; then :
7239   $as_echo_n "(cached) " >&6
7240 else
7241   case $PYTHON in
7242   [\\/]* | ?:[\\/]*)
7243   ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
7244   ;;
7245   *)
7246   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7247 for as_dir in $PATH
7248 do
7249   IFS=$as_save_IFS
7250   test -z "$as_dir" && as_dir=.
7251     for ac_exec_ext in '' $ac_executable_extensions; do
7252   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7253     ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
7254     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7255     break 2
7256   fi
7257 done
7258   done
7259 IFS=$as_save_IFS
7260
7261   ;;
7262 esac
7263 fi
7264 PYTHON=$ac_cv_path_PYTHON
7265 if test -n "$PYTHON"; then
7266   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
7267 $as_echo "$PYTHON" >&6; }
7268 else
7269   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7270 $as_echo "no" >&6; }
7271 fi
7272
7273
7274 if test x"$PYTHON" = x""; then
7275   as_fn_error $? "Python not found" "$LINENO" 5
7276 fi
7277
7278
7279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python distutils module" >&5
7280 $as_echo_n "checking for Python distutils module... " >&6; }
7281 if "${PYTHON}" -c 'import distutils' 2>&5
7282 then
7283     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7284 $as_echo "yes" >&6; }
7285 else
7286     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7287 $as_echo "no" >&6; }
7288     as_fn_error $? "distutils module not found" "$LINENO" 5
7289 fi
7290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python configuration directory" >&5
7291 $as_echo_n "checking Python configuration directory... " >&6; }
7292 python_majorversion=`${PYTHON} -c "import sys; print(sys.version[0])"`
7293 python_version=`${PYTHON} -c "import sys; print(sys.version[:3])"`
7294 python_configdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBPL'))))"`
7295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_configdir" >&5
7296 $as_echo "$python_configdir" >&6; }
7297
7298 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python include directories" >&5
7299 $as_echo_n "checking Python include directories... " >&6; }
7300 python_includespec=`${PYTHON} -c "
7301 import distutils.sysconfig
7302 a = '-I' + distutils.sysconfig.get_python_inc(False)
7303 b = '-I' + distutils.sysconfig.get_python_inc(True)
7304 if a == b:
7305     print(a)
7306 else:
7307     print(a + ' ' + b)"`
7308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_includespec" >&5
7309 $as_echo "$python_includespec" >&6; }
7310
7311
7312
7313 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link an embedded Python application" >&5
7314 $as_echo_n "checking how to link an embedded Python application... " >&6; }
7315
7316 python_libdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBDIR'))))"`
7317 python_ldlibrary=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDLIBRARY'))))"`
7318 python_so=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('SO'))))"`
7319 ldlibrary=`echo "${python_ldlibrary}" | sed "s/${python_so}$//"`
7320 python_framework=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('PYTHONFRAMEWORK'))))"`
7321 python_enable_shared=`${PYTHON} -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_vars().get('Py_ENABLE_SHARED',0))"`
7322
7323 if test -n "$python_framework"; then
7324         python_frameworkprefix=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('PYTHONFRAMEWORKPREFIX'))))"`
7325         python_libspec="-F${python_frameworkprefix} -framework $python_framework"
7326         python_enable_shared=1
7327 elif test x"${python_libdir}" != x"" -a x"${python_ldlibrary}" != x"" -a x"${python_ldlibrary}" != x"${ldlibrary}"
7328 then
7329         # New way: use the official shared library
7330         ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
7331         python_libspec="-L${python_libdir} -l${ldlibrary}"
7332 else
7333         # Old way: use libpython from python_configdir
7334         python_libdir="${python_configdir}"
7335         # LDVERSION was introduced in Python 3.2.
7336         python_ldversion=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDVERSION'))))"`
7337         if test x"${python_ldversion}" = x""; then
7338                 python_ldversion=$python_version
7339         fi
7340         python_libspec="-L${python_libdir} -lpython${python_ldversion}"
7341 fi
7342
7343 if test -z "$python_framework"; then
7344         python_additional_libs=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBS','LIBC','LIBM','BASEMODLIBS'))))"`
7345 fi
7346
7347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_libspec} ${python_additional_libs}" >&5
7348 $as_echo "${python_libspec} ${python_additional_libs}" >&6; }
7349
7350
7351 # threaded python is not supported on OpenBSD
7352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Python is compiled with thread support" >&5
7353 $as_echo_n "checking whether Python is compiled with thread support... " >&6; }
7354 pythreads=`${PYTHON} -c "import sys; print(int('thread' in sys.builtin_module_names))"`
7355 if test "$pythreads" = "1"; then
7356   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7357 $as_echo "yes" >&6; }
7358   case $host_os in
7359   openbsd*)
7360     as_fn_error $? "threaded Python not supported on this platform" "$LINENO" 5
7361     ;;
7362   esac
7363 else
7364   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7365 $as_echo "no" >&6; }
7366 fi
7367
7368
7369 fi
7370
7371 if test "$cross_compiling" = yes && test -z "$with_system_tzdata"; then
7372   # Extract the first word of "zic", so it can be a program name with args.
7373 set dummy zic; ac_word=$2
7374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7375 $as_echo_n "checking for $ac_word... " >&6; }
7376 if ${ac_cv_path_ZIC+:} false; then :
7377   $as_echo_n "(cached) " >&6
7378 else
7379   case $ZIC in
7380   [\\/]* | ?:[\\/]*)
7381   ac_cv_path_ZIC="$ZIC" # Let the user override the test with a path.
7382   ;;
7383   *)
7384   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7385 for as_dir in $PATH
7386 do
7387   IFS=$as_save_IFS
7388   test -z "$as_dir" && as_dir=.
7389     for ac_exec_ext in '' $ac_executable_extensions; do
7390   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7391     ac_cv_path_ZIC="$as_dir/$ac_word$ac_exec_ext"
7392     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7393     break 2
7394   fi
7395 done
7396   done
7397 IFS=$as_save_IFS
7398
7399   ;;
7400 esac
7401 fi
7402 ZIC=$ac_cv_path_ZIC
7403 if test -n "$ZIC"; then
7404   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
7405 $as_echo "$ZIC" >&6; }
7406 else
7407   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7408 $as_echo "no" >&6; }
7409 fi
7410
7411
7412   if test -z "$ZIC"; then
7413     as_fn_error $? "
7414 When cross-compiling, either use the option --with-system-tzdata to use
7415 existing time-zone data, or set the environment variable ZIC to a zic
7416 program to use during the build." "$LINENO" 5
7417   fi
7418 fi
7419
7420
7421 ##
7422 ## Libraries
7423 ##
7424 ## Most libraries are included only if they demonstrably provide a function
7425 ## we need, but libm is an exception: always include it, because there are
7426 ## too many compilers that play cute optimization games that will break
7427 ## probes for standard functions such as pow().
7428 ##
7429
7430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
7431 $as_echo_n "checking for main in -lm... " >&6; }
7432 if ${ac_cv_lib_m_main+:} false; then :
7433   $as_echo_n "(cached) " >&6
7434 else
7435   ac_check_lib_save_LIBS=$LIBS
7436 LIBS="-lm  $LIBS"
7437 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7438 /* end confdefs.h.  */
7439
7440
7441 int
7442 main ()
7443 {
7444 return main ();
7445   ;
7446   return 0;
7447 }
7448 _ACEOF
7449 if ac_fn_c_try_link "$LINENO"; then :
7450   ac_cv_lib_m_main=yes
7451 else
7452   ac_cv_lib_m_main=no
7453 fi
7454 rm -f core conftest.err conftest.$ac_objext \
7455     conftest$ac_exeext conftest.$ac_ext
7456 LIBS=$ac_check_lib_save_LIBS
7457 fi
7458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
7459 $as_echo "$ac_cv_lib_m_main" >&6; }
7460 if test "x$ac_cv_lib_m_main" = xyes; then :
7461   cat >>confdefs.h <<_ACEOF
7462 #define HAVE_LIBM 1
7463 _ACEOF
7464
7465   LIBS="-lm $LIBS"
7466
7467 fi
7468
7469 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setproctitle" >&5
7470 $as_echo_n "checking for library containing setproctitle... " >&6; }
7471 if ${ac_cv_search_setproctitle+:} false; then :
7472   $as_echo_n "(cached) " >&6
7473 else
7474   ac_func_search_save_LIBS=$LIBS
7475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7476 /* end confdefs.h.  */
7477
7478 /* Override any GCC internal prototype to avoid an error.
7479    Use char because int might match the return type of a GCC
7480    builtin and then its argument prototype would still apply.  */
7481 #ifdef __cplusplus
7482 extern "C"
7483 #endif
7484 char setproctitle ();
7485 int
7486 main ()
7487 {
7488 return setproctitle ();
7489   ;
7490   return 0;
7491 }
7492 _ACEOF
7493 for ac_lib in '' util; do
7494   if test -z "$ac_lib"; then
7495     ac_res="none required"
7496   else
7497     ac_res=-l$ac_lib
7498     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7499   fi
7500   if ac_fn_c_try_link "$LINENO"; then :
7501   ac_cv_search_setproctitle=$ac_res
7502 fi
7503 rm -f core conftest.err conftest.$ac_objext \
7504     conftest$ac_exeext
7505   if ${ac_cv_search_setproctitle+:} false; then :
7506   break
7507 fi
7508 done
7509 if ${ac_cv_search_setproctitle+:} false; then :
7510
7511 else
7512   ac_cv_search_setproctitle=no
7513 fi
7514 rm conftest.$ac_ext
7515 LIBS=$ac_func_search_save_LIBS
7516 fi
7517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setproctitle" >&5
7518 $as_echo "$ac_cv_search_setproctitle" >&6; }
7519 ac_res=$ac_cv_search_setproctitle
7520 if test "$ac_res" != no; then :
7521   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7522
7523 fi
7524
7525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
7526 $as_echo_n "checking for library containing dlopen... " >&6; }
7527 if ${ac_cv_search_dlopen+:} false; then :
7528   $as_echo_n "(cached) " >&6
7529 else
7530   ac_func_search_save_LIBS=$LIBS
7531 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7532 /* end confdefs.h.  */
7533
7534 /* Override any GCC internal prototype to avoid an error.
7535    Use char because int might match the return type of a GCC
7536    builtin and then its argument prototype would still apply.  */
7537 #ifdef __cplusplus
7538 extern "C"
7539 #endif
7540 char dlopen ();
7541 int
7542 main ()
7543 {
7544 return dlopen ();
7545   ;
7546   return 0;
7547 }
7548 _ACEOF
7549 for ac_lib in '' dl; do
7550   if test -z "$ac_lib"; then
7551     ac_res="none required"
7552   else
7553     ac_res=-l$ac_lib
7554     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7555   fi
7556   if ac_fn_c_try_link "$LINENO"; then :
7557   ac_cv_search_dlopen=$ac_res
7558 fi
7559 rm -f core conftest.err conftest.$ac_objext \
7560     conftest$ac_exeext
7561   if ${ac_cv_search_dlopen+:} false; then :
7562   break
7563 fi
7564 done
7565 if ${ac_cv_search_dlopen+:} false; then :
7566
7567 else
7568   ac_cv_search_dlopen=no
7569 fi
7570 rm conftest.$ac_ext
7571 LIBS=$ac_func_search_save_LIBS
7572 fi
7573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
7574 $as_echo "$ac_cv_search_dlopen" >&6; }
7575 ac_res=$ac_cv_search_dlopen
7576 if test "$ac_res" != no; then :
7577   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7578
7579 fi
7580
7581 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
7582 $as_echo_n "checking for library containing socket... " >&6; }
7583 if ${ac_cv_search_socket+:} false; then :
7584   $as_echo_n "(cached) " >&6
7585 else
7586   ac_func_search_save_LIBS=$LIBS
7587 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7588 /* end confdefs.h.  */
7589
7590 /* Override any GCC internal prototype to avoid an error.
7591    Use char because int might match the return type of a GCC
7592    builtin and then its argument prototype would still apply.  */
7593 #ifdef __cplusplus
7594 extern "C"
7595 #endif
7596 char socket ();
7597 int
7598 main ()
7599 {
7600 return socket ();
7601   ;
7602   return 0;
7603 }
7604 _ACEOF
7605 for ac_lib in '' socket wsock32; do
7606   if test -z "$ac_lib"; then
7607     ac_res="none required"
7608   else
7609     ac_res=-l$ac_lib
7610     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7611   fi
7612   if ac_fn_c_try_link "$LINENO"; then :
7613   ac_cv_search_socket=$ac_res
7614 fi
7615 rm -f core conftest.err conftest.$ac_objext \
7616     conftest$ac_exeext
7617   if ${ac_cv_search_socket+:} false; then :
7618   break
7619 fi
7620 done
7621 if ${ac_cv_search_socket+:} false; then :
7622
7623 else
7624   ac_cv_search_socket=no
7625 fi
7626 rm conftest.$ac_ext
7627 LIBS=$ac_func_search_save_LIBS
7628 fi
7629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
7630 $as_echo "$ac_cv_search_socket" >&6; }
7631 ac_res=$ac_cv_search_socket
7632 if test "$ac_res" != no; then :
7633   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7634
7635 fi
7636
7637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shl_load" >&5
7638 $as_echo_n "checking for library containing shl_load... " >&6; }
7639 if ${ac_cv_search_shl_load+:} false; then :
7640   $as_echo_n "(cached) " >&6
7641 else
7642   ac_func_search_save_LIBS=$LIBS
7643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7644 /* end confdefs.h.  */
7645
7646 /* Override any GCC internal prototype to avoid an error.
7647    Use char because int might match the return type of a GCC
7648    builtin and then its argument prototype would still apply.  */
7649 #ifdef __cplusplus
7650 extern "C"
7651 #endif
7652 char shl_load ();
7653 int
7654 main ()
7655 {
7656 return shl_load ();
7657   ;
7658   return 0;
7659 }
7660 _ACEOF
7661 for ac_lib in '' dld; do
7662   if test -z "$ac_lib"; then
7663     ac_res="none required"
7664   else
7665     ac_res=-l$ac_lib
7666     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7667   fi
7668   if ac_fn_c_try_link "$LINENO"; then :
7669   ac_cv_search_shl_load=$ac_res
7670 fi
7671 rm -f core conftest.err conftest.$ac_objext \
7672     conftest$ac_exeext
7673   if ${ac_cv_search_shl_load+:} false; then :
7674   break
7675 fi
7676 done
7677 if ${ac_cv_search_shl_load+:} false; then :
7678
7679 else
7680   ac_cv_search_shl_load=no
7681 fi
7682 rm conftest.$ac_ext
7683 LIBS=$ac_func_search_save_LIBS
7684 fi
7685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shl_load" >&5
7686 $as_echo "$ac_cv_search_shl_load" >&6; }
7687 ac_res=$ac_cv_search_shl_load
7688 if test "$ac_res" != no; then :
7689   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7690
7691 fi
7692
7693 # We only use libld in port/dynloader/aix.c
7694 case $host_os in
7695      aix*)
7696         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing ldopen" >&5
7697 $as_echo_n "checking for library containing ldopen... " >&6; }
7698 if ${ac_cv_search_ldopen+:} false; then :
7699   $as_echo_n "(cached) " >&6
7700 else
7701   ac_func_search_save_LIBS=$LIBS
7702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7703 /* end confdefs.h.  */
7704
7705 /* Override any GCC internal prototype to avoid an error.
7706    Use char because int might match the return type of a GCC
7707    builtin and then its argument prototype would still apply.  */
7708 #ifdef __cplusplus
7709 extern "C"
7710 #endif
7711 char ldopen ();
7712 int
7713 main ()
7714 {
7715 return ldopen ();
7716   ;
7717   return 0;
7718 }
7719 _ACEOF
7720 for ac_lib in '' ld; do
7721   if test -z "$ac_lib"; then
7722     ac_res="none required"
7723   else
7724     ac_res=-l$ac_lib
7725     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7726   fi
7727   if ac_fn_c_try_link "$LINENO"; then :
7728   ac_cv_search_ldopen=$ac_res
7729 fi
7730 rm -f core conftest.err conftest.$ac_objext \
7731     conftest$ac_exeext
7732   if ${ac_cv_search_ldopen+:} false; then :
7733   break
7734 fi
7735 done
7736 if ${ac_cv_search_ldopen+:} false; then :
7737
7738 else
7739   ac_cv_search_ldopen=no
7740 fi
7741 rm conftest.$ac_ext
7742 LIBS=$ac_func_search_save_LIBS
7743 fi
7744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_ldopen" >&5
7745 $as_echo "$ac_cv_search_ldopen" >&6; }
7746 ac_res=$ac_cv_search_ldopen
7747 if test "$ac_res" != no; then :
7748   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7749
7750 fi
7751
7752         ;;
7753 esac
7754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getopt_long" >&5
7755 $as_echo_n "checking for library containing getopt_long... " >&6; }
7756 if ${ac_cv_search_getopt_long+:} false; then :
7757   $as_echo_n "(cached) " >&6
7758 else
7759   ac_func_search_save_LIBS=$LIBS
7760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7761 /* end confdefs.h.  */
7762
7763 /* Override any GCC internal prototype to avoid an error.
7764    Use char because int might match the return type of a GCC
7765    builtin and then its argument prototype would still apply.  */
7766 #ifdef __cplusplus
7767 extern "C"
7768 #endif
7769 char getopt_long ();
7770 int
7771 main ()
7772 {
7773 return getopt_long ();
7774   ;
7775   return 0;
7776 }
7777 _ACEOF
7778 for ac_lib in '' getopt gnugetopt; do
7779   if test -z "$ac_lib"; then
7780     ac_res="none required"
7781   else
7782     ac_res=-l$ac_lib
7783     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7784   fi
7785   if ac_fn_c_try_link "$LINENO"; then :
7786   ac_cv_search_getopt_long=$ac_res
7787 fi
7788 rm -f core conftest.err conftest.$ac_objext \
7789     conftest$ac_exeext
7790   if ${ac_cv_search_getopt_long+:} false; then :
7791   break
7792 fi
7793 done
7794 if ${ac_cv_search_getopt_long+:} false; then :
7795
7796 else
7797   ac_cv_search_getopt_long=no
7798 fi
7799 rm conftest.$ac_ext
7800 LIBS=$ac_func_search_save_LIBS
7801 fi
7802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getopt_long" >&5
7803 $as_echo "$ac_cv_search_getopt_long" >&6; }
7804 ac_res=$ac_cv_search_getopt_long
7805 if test "$ac_res" != no; then :
7806   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7807
7808 fi
7809
7810 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
7811 $as_echo_n "checking for library containing crypt... " >&6; }
7812 if ${ac_cv_search_crypt+:} false; then :
7813   $as_echo_n "(cached) " >&6
7814 else
7815   ac_func_search_save_LIBS=$LIBS
7816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7817 /* end confdefs.h.  */
7818
7819 /* Override any GCC internal prototype to avoid an error.
7820    Use char because int might match the return type of a GCC
7821    builtin and then its argument prototype would still apply.  */
7822 #ifdef __cplusplus
7823 extern "C"
7824 #endif
7825 char crypt ();
7826 int
7827 main ()
7828 {
7829 return crypt ();
7830   ;
7831   return 0;
7832 }
7833 _ACEOF
7834 for ac_lib in '' crypt; do
7835   if test -z "$ac_lib"; then
7836     ac_res="none required"
7837   else
7838     ac_res=-l$ac_lib
7839     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7840   fi
7841   if ac_fn_c_try_link "$LINENO"; then :
7842   ac_cv_search_crypt=$ac_res
7843 fi
7844 rm -f core conftest.err conftest.$ac_objext \
7845     conftest$ac_exeext
7846   if ${ac_cv_search_crypt+:} false; then :
7847   break
7848 fi
7849 done
7850 if ${ac_cv_search_crypt+:} false; then :
7851
7852 else
7853   ac_cv_search_crypt=no
7854 fi
7855 rm conftest.$ac_ext
7856 LIBS=$ac_func_search_save_LIBS
7857 fi
7858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
7859 $as_echo "$ac_cv_search_crypt" >&6; }
7860 ac_res=$ac_cv_search_crypt
7861 if test "$ac_res" != no; then :
7862   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7863
7864 fi
7865
7866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
7867 $as_echo_n "checking for library containing shm_open... " >&6; }
7868 if ${ac_cv_search_shm_open+:} false; then :
7869   $as_echo_n "(cached) " >&6
7870 else
7871   ac_func_search_save_LIBS=$LIBS
7872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7873 /* end confdefs.h.  */
7874
7875 /* Override any GCC internal prototype to avoid an error.
7876    Use char because int might match the return type of a GCC
7877    builtin and then its argument prototype would still apply.  */
7878 #ifdef __cplusplus
7879 extern "C"
7880 #endif
7881 char shm_open ();
7882 int
7883 main ()
7884 {
7885 return shm_open ();
7886   ;
7887   return 0;
7888 }
7889 _ACEOF
7890 for ac_lib in '' rt; do
7891   if test -z "$ac_lib"; then
7892     ac_res="none required"
7893   else
7894     ac_res=-l$ac_lib
7895     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7896   fi
7897   if ac_fn_c_try_link "$LINENO"; then :
7898   ac_cv_search_shm_open=$ac_res
7899 fi
7900 rm -f core conftest.err conftest.$ac_objext \
7901     conftest$ac_exeext
7902   if ${ac_cv_search_shm_open+:} false; then :
7903   break
7904 fi
7905 done
7906 if ${ac_cv_search_shm_open+:} false; then :
7907
7908 else
7909   ac_cv_search_shm_open=no
7910 fi
7911 rm conftest.$ac_ext
7912 LIBS=$ac_func_search_save_LIBS
7913 fi
7914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
7915 $as_echo "$ac_cv_search_shm_open" >&6; }
7916 ac_res=$ac_cv_search_shm_open
7917 if test "$ac_res" != no; then :
7918   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7919
7920 fi
7921
7922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_unlink" >&5
7923 $as_echo_n "checking for library containing shm_unlink... " >&6; }
7924 if ${ac_cv_search_shm_unlink+:} false; then :
7925   $as_echo_n "(cached) " >&6
7926 else
7927   ac_func_search_save_LIBS=$LIBS
7928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7929 /* end confdefs.h.  */
7930
7931 /* Override any GCC internal prototype to avoid an error.
7932    Use char because int might match the return type of a GCC
7933    builtin and then its argument prototype would still apply.  */
7934 #ifdef __cplusplus
7935 extern "C"
7936 #endif
7937 char shm_unlink ();
7938 int
7939 main ()
7940 {
7941 return shm_unlink ();
7942   ;
7943   return 0;
7944 }
7945 _ACEOF
7946 for ac_lib in '' rt; do
7947   if test -z "$ac_lib"; then
7948     ac_res="none required"
7949   else
7950     ac_res=-l$ac_lib
7951     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7952   fi
7953   if ac_fn_c_try_link "$LINENO"; then :
7954   ac_cv_search_shm_unlink=$ac_res
7955 fi
7956 rm -f core conftest.err conftest.$ac_objext \
7957     conftest$ac_exeext
7958   if ${ac_cv_search_shm_unlink+:} false; then :
7959   break
7960 fi
7961 done
7962 if ${ac_cv_search_shm_unlink+:} false; then :
7963
7964 else
7965   ac_cv_search_shm_unlink=no
7966 fi
7967 rm conftest.$ac_ext
7968 LIBS=$ac_func_search_save_LIBS
7969 fi
7970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_unlink" >&5
7971 $as_echo "$ac_cv_search_shm_unlink" >&6; }
7972 ac_res=$ac_cv_search_shm_unlink
7973 if test "$ac_res" != no; then :
7974   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7975
7976 fi
7977
7978 # Solaris:
7979 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5
7980 $as_echo_n "checking for library containing fdatasync... " >&6; }
7981 if ${ac_cv_search_fdatasync+:} false; then :
7982   $as_echo_n "(cached) " >&6
7983 else
7984   ac_func_search_save_LIBS=$LIBS
7985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7986 /* end confdefs.h.  */
7987
7988 /* Override any GCC internal prototype to avoid an error.
7989    Use char because int might match the return type of a GCC
7990    builtin and then its argument prototype would still apply.  */
7991 #ifdef __cplusplus
7992 extern "C"
7993 #endif
7994 char fdatasync ();
7995 int
7996 main ()
7997 {
7998 return fdatasync ();
7999   ;
8000   return 0;
8001 }
8002 _ACEOF
8003 for ac_lib in '' rt posix4; do
8004   if test -z "$ac_lib"; then
8005     ac_res="none required"
8006   else
8007     ac_res=-l$ac_lib
8008     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8009   fi
8010   if ac_fn_c_try_link "$LINENO"; then :
8011   ac_cv_search_fdatasync=$ac_res
8012 fi
8013 rm -f core conftest.err conftest.$ac_objext \
8014     conftest$ac_exeext
8015   if ${ac_cv_search_fdatasync+:} false; then :
8016   break
8017 fi
8018 done
8019 if ${ac_cv_search_fdatasync+:} false; then :
8020
8021 else
8022   ac_cv_search_fdatasync=no
8023 fi
8024 rm conftest.$ac_ext
8025 LIBS=$ac_func_search_save_LIBS
8026 fi
8027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5
8028 $as_echo "$ac_cv_search_fdatasync" >&6; }
8029 ac_res=$ac_cv_search_fdatasync
8030 if test "$ac_res" != no; then :
8031   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8032
8033 fi
8034
8035 # Required for thread_test.c on Solaris 2.5:
8036 # Other ports use it too (HP-UX) so test unconditionally
8037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname_r" >&5
8038 $as_echo_n "checking for library containing gethostbyname_r... " >&6; }
8039 if ${ac_cv_search_gethostbyname_r+:} false; then :
8040   $as_echo_n "(cached) " >&6
8041 else
8042   ac_func_search_save_LIBS=$LIBS
8043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8044 /* end confdefs.h.  */
8045
8046 /* Override any GCC internal prototype to avoid an error.
8047    Use char because int might match the return type of a GCC
8048    builtin and then its argument prototype would still apply.  */
8049 #ifdef __cplusplus
8050 extern "C"
8051 #endif
8052 char gethostbyname_r ();
8053 int
8054 main ()
8055 {
8056 return gethostbyname_r ();
8057   ;
8058   return 0;
8059 }
8060 _ACEOF
8061 for ac_lib in '' nsl; do
8062   if test -z "$ac_lib"; then
8063     ac_res="none required"
8064   else
8065     ac_res=-l$ac_lib
8066     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8067   fi
8068   if ac_fn_c_try_link "$LINENO"; then :
8069   ac_cv_search_gethostbyname_r=$ac_res
8070 fi
8071 rm -f core conftest.err conftest.$ac_objext \
8072     conftest$ac_exeext
8073   if ${ac_cv_search_gethostbyname_r+:} false; then :
8074   break
8075 fi
8076 done
8077 if ${ac_cv_search_gethostbyname_r+:} false; then :
8078
8079 else
8080   ac_cv_search_gethostbyname_r=no
8081 fi
8082 rm conftest.$ac_ext
8083 LIBS=$ac_func_search_save_LIBS
8084 fi
8085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname_r" >&5
8086 $as_echo "$ac_cv_search_gethostbyname_r" >&6; }
8087 ac_res=$ac_cv_search_gethostbyname_r
8088 if test "$ac_res" != no; then :
8089   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8090
8091 fi
8092
8093 # Cygwin:
8094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shmget" >&5
8095 $as_echo_n "checking for library containing shmget... " >&6; }
8096 if ${ac_cv_search_shmget+:} false; then :
8097   $as_echo_n "(cached) " >&6
8098 else
8099   ac_func_search_save_LIBS=$LIBS
8100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8101 /* end confdefs.h.  */
8102
8103 /* Override any GCC internal prototype to avoid an error.
8104    Use char because int might match the return type of a GCC
8105    builtin and then its argument prototype would still apply.  */
8106 #ifdef __cplusplus
8107 extern "C"
8108 #endif
8109 char shmget ();
8110 int
8111 main ()
8112 {
8113 return shmget ();
8114   ;
8115   return 0;
8116 }
8117 _ACEOF
8118 for ac_lib in '' cygipc; do
8119   if test -z "$ac_lib"; then
8120     ac_res="none required"
8121   else
8122     ac_res=-l$ac_lib
8123     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8124   fi
8125   if ac_fn_c_try_link "$LINENO"; then :
8126   ac_cv_search_shmget=$ac_res
8127 fi
8128 rm -f core conftest.err conftest.$ac_objext \
8129     conftest$ac_exeext
8130   if ${ac_cv_search_shmget+:} false; then :
8131   break
8132 fi
8133 done
8134 if ${ac_cv_search_shmget+:} false; then :
8135
8136 else
8137   ac_cv_search_shmget=no
8138 fi
8139 rm conftest.$ac_ext
8140 LIBS=$ac_func_search_save_LIBS
8141 fi
8142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shmget" >&5
8143 $as_echo "$ac_cv_search_shmget" >&6; }
8144 ac_res=$ac_cv_search_shmget
8145 if test "$ac_res" != no; then :
8146   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8147
8148 fi
8149
8150
8151 if test "$with_readline" = yes; then
8152
8153
8154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing readline" >&5
8155 $as_echo_n "checking for library containing readline... " >&6; }
8156 if ${pgac_cv_check_readline+:} false; then :
8157   $as_echo_n "(cached) " >&6
8158 else
8159   pgac_cv_check_readline=no
8160 pgac_save_LIBS=$LIBS
8161 if test x"$with_libedit_preferred" != x"yes"
8162 then    READLINE_ORDER="-lreadline -ledit"
8163 else    READLINE_ORDER="-ledit -lreadline"
8164 fi
8165 for pgac_rllib in $READLINE_ORDER ; do
8166   for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
8167     LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
8168     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8169 /* end confdefs.h.  */
8170
8171 /* Override any GCC internal prototype to avoid an error.
8172    Use char because int might match the return type of a GCC
8173    builtin and then its argument prototype would still apply.  */
8174 #ifdef __cplusplus
8175 extern "C"
8176 #endif
8177 char readline ();
8178 int
8179 main ()
8180 {
8181 return readline ();
8182   ;
8183   return 0;
8184 }
8185 _ACEOF
8186 if ac_fn_c_try_link "$LINENO"; then :
8187
8188       # Older NetBSD, OpenBSD, and Irix have a broken linker that does not
8189       # recognize dependent libraries; assume curses is needed if we didn't
8190       # find any dependency.
8191       case $host_os in
8192         netbsd* | openbsd* | irix*)
8193           if test x"$pgac_lib" = x"" ; then
8194             pgac_lib=" -lcurses"
8195           fi ;;
8196       esac
8197
8198       pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
8199       break
8200
8201 fi
8202 rm -f core conftest.err conftest.$ac_objext \
8203     conftest$ac_exeext conftest.$ac_ext
8204   done
8205   if test "$pgac_cv_check_readline" != no ; then
8206     break
8207   fi
8208 done
8209 LIBS=$pgac_save_LIBS
8210
8211 fi
8212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_readline" >&5
8213 $as_echo "$pgac_cv_check_readline" >&6; }
8214 if test "$pgac_cv_check_readline" != no ; then
8215   LIBS="$pgac_cv_check_readline $LIBS"
8216
8217 $as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
8218
8219 fi
8220
8221
8222   if test x"$pgac_cv_check_readline" = x"no"; then
8223     as_fn_error $? "readline library not found
8224 If you have readline already installed, see config.log for details on the
8225 failure.  It is possible the compiler isn't looking in the proper directory.
8226 Use --without-readline to disable readline support." "$LINENO" 5
8227   fi
8228 fi
8229
8230 if test "$with_zlib" = yes; then
8231   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5
8232 $as_echo_n "checking for inflate in -lz... " >&6; }
8233 if ${ac_cv_lib_z_inflate+:} false; then :
8234   $as_echo_n "(cached) " >&6
8235 else
8236   ac_check_lib_save_LIBS=$LIBS
8237 LIBS="-lz  $LIBS"
8238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8239 /* end confdefs.h.  */
8240
8241 /* Override any GCC internal prototype to avoid an error.
8242    Use char because int might match the return type of a GCC
8243    builtin and then its argument prototype would still apply.  */
8244 #ifdef __cplusplus
8245 extern "C"
8246 #endif
8247 char inflate ();
8248 int
8249 main ()
8250 {
8251 return inflate ();
8252   ;
8253   return 0;
8254 }
8255 _ACEOF
8256 if ac_fn_c_try_link "$LINENO"; then :
8257   ac_cv_lib_z_inflate=yes
8258 else
8259   ac_cv_lib_z_inflate=no
8260 fi
8261 rm -f core conftest.err conftest.$ac_objext \
8262     conftest$ac_exeext conftest.$ac_ext
8263 LIBS=$ac_check_lib_save_LIBS
8264 fi
8265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5
8266 $as_echo "$ac_cv_lib_z_inflate" >&6; }
8267 if test "x$ac_cv_lib_z_inflate" = xyes; then :
8268   cat >>confdefs.h <<_ACEOF
8269 #define HAVE_LIBZ 1
8270 _ACEOF
8271
8272   LIBS="-lz $LIBS"
8273
8274 else
8275   as_fn_error $? "zlib library not found
8276 If you have zlib already installed, see config.log for details on the
8277 failure.  It is possible the compiler isn't looking in the proper directory.
8278 Use --without-zlib to disable zlib support." "$LINENO" 5
8279 fi
8280
8281 fi
8282
8283 if test "$enable_spinlocks" = yes; then
8284
8285 $as_echo "#define HAVE_SPINLOCKS 1" >>confdefs.h
8286
8287 else
8288   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
8289 *** Not using spinlocks will cause poor performance." >&5
8290 $as_echo "$as_me: WARNING:
8291 *** Not using spinlocks will cause poor performance." >&2;}
8292 fi
8293
8294 if test "$with_gssapi" = yes ; then
8295   if test "$PORTNAME" != "win32"; then
8296     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gss_init_sec_context" >&5
8297 $as_echo_n "checking for library containing gss_init_sec_context... " >&6; }
8298 if ${ac_cv_search_gss_init_sec_context+:} false; then :
8299   $as_echo_n "(cached) " >&6
8300 else
8301   ac_func_search_save_LIBS=$LIBS
8302 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8303 /* end confdefs.h.  */
8304
8305 /* Override any GCC internal prototype to avoid an error.
8306    Use char because int might match the return type of a GCC
8307    builtin and then its argument prototype would still apply.  */
8308 #ifdef __cplusplus
8309 extern "C"
8310 #endif
8311 char gss_init_sec_context ();
8312 int
8313 main ()
8314 {
8315 return gss_init_sec_context ();
8316   ;
8317   return 0;
8318 }
8319 _ACEOF
8320 for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'; do
8321   if test -z "$ac_lib"; then
8322     ac_res="none required"
8323   else
8324     ac_res=-l$ac_lib
8325     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8326   fi
8327   if ac_fn_c_try_link "$LINENO"; then :
8328   ac_cv_search_gss_init_sec_context=$ac_res
8329 fi
8330 rm -f core conftest.err conftest.$ac_objext \
8331     conftest$ac_exeext
8332   if ${ac_cv_search_gss_init_sec_context+:} false; then :
8333   break
8334 fi
8335 done
8336 if ${ac_cv_search_gss_init_sec_context+:} false; then :
8337
8338 else
8339   ac_cv_search_gss_init_sec_context=no
8340 fi
8341 rm conftest.$ac_ext
8342 LIBS=$ac_func_search_save_LIBS
8343 fi
8344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gss_init_sec_context" >&5
8345 $as_echo "$ac_cv_search_gss_init_sec_context" >&6; }
8346 ac_res=$ac_cv_search_gss_init_sec_context
8347 if test "$ac_res" != no; then :
8348   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8349
8350 else
8351   as_fn_error $? "could not find function 'gss_init_sec_context' required for GSSAPI" "$LINENO" 5
8352 fi
8353
8354   else
8355     LIBS="$LIBS -lgssapi32"
8356   fi
8357 fi
8358
8359 if test "$with_openssl" = yes ; then
8360     if test "$PORTNAME" != "win32"; then
8361      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_new_ex_data in -lcrypto" >&5
8362 $as_echo_n "checking for CRYPTO_new_ex_data in -lcrypto... " >&6; }
8363 if ${ac_cv_lib_crypto_CRYPTO_new_ex_data+:} false; then :
8364   $as_echo_n "(cached) " >&6
8365 else
8366   ac_check_lib_save_LIBS=$LIBS
8367 LIBS="-lcrypto  $LIBS"
8368 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8369 /* end confdefs.h.  */
8370
8371 /* Override any GCC internal prototype to avoid an error.
8372    Use char because int might match the return type of a GCC
8373    builtin and then its argument prototype would still apply.  */
8374 #ifdef __cplusplus
8375 extern "C"
8376 #endif
8377 char CRYPTO_new_ex_data ();
8378 int
8379 main ()
8380 {
8381 return CRYPTO_new_ex_data ();
8382   ;
8383   return 0;
8384 }
8385 _ACEOF
8386 if ac_fn_c_try_link "$LINENO"; then :
8387   ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
8388 else
8389   ac_cv_lib_crypto_CRYPTO_new_ex_data=no
8390 fi
8391 rm -f core conftest.err conftest.$ac_objext \
8392     conftest$ac_exeext conftest.$ac_ext
8393 LIBS=$ac_check_lib_save_LIBS
8394 fi
8395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
8396 $as_echo "$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6; }
8397 if test "x$ac_cv_lib_crypto_CRYPTO_new_ex_data" = xyes; then :
8398   cat >>confdefs.h <<_ACEOF
8399 #define HAVE_LIBCRYPTO 1
8400 _ACEOF
8401
8402   LIBS="-lcrypto $LIBS"
8403
8404 else
8405   as_fn_error $? "library 'crypto' is required for OpenSSL" "$LINENO" 5
8406 fi
8407
8408      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_library_init in -lssl" >&5
8409 $as_echo_n "checking for SSL_library_init in -lssl... " >&6; }
8410 if ${ac_cv_lib_ssl_SSL_library_init+:} false; then :
8411   $as_echo_n "(cached) " >&6
8412 else
8413   ac_check_lib_save_LIBS=$LIBS
8414 LIBS="-lssl  $LIBS"
8415 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8416 /* end confdefs.h.  */
8417
8418 /* Override any GCC internal prototype to avoid an error.
8419    Use char because int might match the return type of a GCC
8420    builtin and then its argument prototype would still apply.  */
8421 #ifdef __cplusplus
8422 extern "C"
8423 #endif
8424 char SSL_library_init ();
8425 int
8426 main ()
8427 {
8428 return SSL_library_init ();
8429   ;
8430   return 0;
8431 }
8432 _ACEOF
8433 if ac_fn_c_try_link "$LINENO"; then :
8434   ac_cv_lib_ssl_SSL_library_init=yes
8435 else
8436   ac_cv_lib_ssl_SSL_library_init=no
8437 fi
8438 rm -f core conftest.err conftest.$ac_objext \
8439     conftest$ac_exeext conftest.$ac_ext
8440 LIBS=$ac_check_lib_save_LIBS
8441 fi
8442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_library_init" >&5
8443 $as_echo "$ac_cv_lib_ssl_SSL_library_init" >&6; }
8444 if test "x$ac_cv_lib_ssl_SSL_library_init" = xyes; then :
8445   cat >>confdefs.h <<_ACEOF
8446 #define HAVE_LIBSSL 1
8447 _ACEOF
8448
8449   LIBS="-lssl $LIBS"
8450
8451 else
8452   as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5
8453 fi
8454
8455   else
8456      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing CRYPTO_new_ex_data" >&5
8457 $as_echo_n "checking for library containing CRYPTO_new_ex_data... " >&6; }
8458 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
8459   $as_echo_n "(cached) " >&6
8460 else
8461   ac_func_search_save_LIBS=$LIBS
8462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8463 /* end confdefs.h.  */
8464
8465 /* Override any GCC internal prototype to avoid an error.
8466    Use char because int might match the return type of a GCC
8467    builtin and then its argument prototype would still apply.  */
8468 #ifdef __cplusplus
8469 extern "C"
8470 #endif
8471 char CRYPTO_new_ex_data ();
8472 int
8473 main ()
8474 {
8475 return CRYPTO_new_ex_data ();
8476   ;
8477   return 0;
8478 }
8479 _ACEOF
8480 for ac_lib in '' eay32 crypto; do
8481   if test -z "$ac_lib"; then
8482     ac_res="none required"
8483   else
8484     ac_res=-l$ac_lib
8485     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8486   fi
8487   if ac_fn_c_try_link "$LINENO"; then :
8488   ac_cv_search_CRYPTO_new_ex_data=$ac_res
8489 fi
8490 rm -f core conftest.err conftest.$ac_objext \
8491     conftest$ac_exeext
8492   if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
8493   break
8494 fi
8495 done
8496 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
8497
8498 else
8499   ac_cv_search_CRYPTO_new_ex_data=no
8500 fi
8501 rm conftest.$ac_ext
8502 LIBS=$ac_func_search_save_LIBS
8503 fi
8504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_CRYPTO_new_ex_data" >&5
8505 $as_echo "$ac_cv_search_CRYPTO_new_ex_data" >&6; }
8506 ac_res=$ac_cv_search_CRYPTO_new_ex_data
8507 if test "$ac_res" != no; then :
8508   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8509
8510 else
8511   as_fn_error $? "library 'eay32' or 'crypto' is required for OpenSSL" "$LINENO" 5
8512 fi
8513
8514      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_library_init" >&5
8515 $as_echo_n "checking for library containing SSL_library_init... " >&6; }
8516 if ${ac_cv_search_SSL_library_init+:} false; then :
8517   $as_echo_n "(cached) " >&6
8518 else
8519   ac_func_search_save_LIBS=$LIBS
8520 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8521 /* end confdefs.h.  */
8522
8523 /* Override any GCC internal prototype to avoid an error.
8524    Use char because int might match the return type of a GCC
8525    builtin and then its argument prototype would still apply.  */
8526 #ifdef __cplusplus
8527 extern "C"
8528 #endif
8529 char SSL_library_init ();
8530 int
8531 main ()
8532 {
8533 return SSL_library_init ();
8534   ;
8535   return 0;
8536 }
8537 _ACEOF
8538 for ac_lib in '' ssleay32 ssl; do
8539   if test -z "$ac_lib"; then
8540     ac_res="none required"
8541   else
8542     ac_res=-l$ac_lib
8543     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8544   fi
8545   if ac_fn_c_try_link "$LINENO"; then :
8546   ac_cv_search_SSL_library_init=$ac_res
8547 fi
8548 rm -f core conftest.err conftest.$ac_objext \
8549     conftest$ac_exeext
8550   if ${ac_cv_search_SSL_library_init+:} false; then :
8551   break
8552 fi
8553 done
8554 if ${ac_cv_search_SSL_library_init+:} false; then :
8555
8556 else
8557   ac_cv_search_SSL_library_init=no
8558 fi
8559 rm conftest.$ac_ext
8560 LIBS=$ac_func_search_save_LIBS
8561 fi
8562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_library_init" >&5
8563 $as_echo "$ac_cv_search_SSL_library_init" >&6; }
8564 ac_res=$ac_cv_search_SSL_library_init
8565 if test "$ac_res" != no; then :
8566   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8567
8568 else
8569   as_fn_error $? "library 'ssleay32' or 'ssl' is required for OpenSSL" "$LINENO" 5
8570 fi
8571
8572   fi
8573 fi
8574
8575 if test "$with_pam" = yes ; then
8576   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_start in -lpam" >&5
8577 $as_echo_n "checking for pam_start in -lpam... " >&6; }
8578 if ${ac_cv_lib_pam_pam_start+:} false; then :
8579   $as_echo_n "(cached) " >&6
8580 else
8581   ac_check_lib_save_LIBS=$LIBS
8582 LIBS="-lpam  $LIBS"
8583 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8584 /* end confdefs.h.  */
8585
8586 /* Override any GCC internal prototype to avoid an error.
8587    Use char because int might match the return type of a GCC
8588    builtin and then its argument prototype would still apply.  */
8589 #ifdef __cplusplus
8590 extern "C"
8591 #endif
8592 char pam_start ();
8593 int
8594 main ()
8595 {
8596 return pam_start ();
8597   ;
8598   return 0;
8599 }
8600 _ACEOF
8601 if ac_fn_c_try_link "$LINENO"; then :
8602   ac_cv_lib_pam_pam_start=yes
8603 else
8604   ac_cv_lib_pam_pam_start=no
8605 fi
8606 rm -f core conftest.err conftest.$ac_objext \
8607     conftest$ac_exeext conftest.$ac_ext
8608 LIBS=$ac_check_lib_save_LIBS
8609 fi
8610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_start" >&5
8611 $as_echo "$ac_cv_lib_pam_pam_start" >&6; }
8612 if test "x$ac_cv_lib_pam_pam_start" = xyes; then :
8613   cat >>confdefs.h <<_ACEOF
8614 #define HAVE_LIBPAM 1
8615 _ACEOF
8616
8617   LIBS="-lpam $LIBS"
8618
8619 else
8620   as_fn_error $? "library 'pam' is required for PAM" "$LINENO" 5
8621 fi
8622
8623 fi
8624
8625 if test "$with_libxml" = yes ; then
8626   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlSaveToBuffer in -lxml2" >&5
8627 $as_echo_n "checking for xmlSaveToBuffer in -lxml2... " >&6; }
8628 if ${ac_cv_lib_xml2_xmlSaveToBuffer+:} false; then :
8629   $as_echo_n "(cached) " >&6
8630 else
8631   ac_check_lib_save_LIBS=$LIBS
8632 LIBS="-lxml2  $LIBS"
8633 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8634 /* end confdefs.h.  */
8635
8636 /* Override any GCC internal prototype to avoid an error.
8637    Use char because int might match the return type of a GCC
8638    builtin and then its argument prototype would still apply.  */
8639 #ifdef __cplusplus
8640 extern "C"
8641 #endif
8642 char xmlSaveToBuffer ();
8643 int
8644 main ()
8645 {
8646 return xmlSaveToBuffer ();
8647   ;
8648   return 0;
8649 }
8650 _ACEOF
8651 if ac_fn_c_try_link "$LINENO"; then :
8652   ac_cv_lib_xml2_xmlSaveToBuffer=yes
8653 else
8654   ac_cv_lib_xml2_xmlSaveToBuffer=no
8655 fi
8656 rm -f core conftest.err conftest.$ac_objext \
8657     conftest$ac_exeext conftest.$ac_ext
8658 LIBS=$ac_check_lib_save_LIBS
8659 fi
8660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlSaveToBuffer" >&5
8661 $as_echo "$ac_cv_lib_xml2_xmlSaveToBuffer" >&6; }
8662 if test "x$ac_cv_lib_xml2_xmlSaveToBuffer" = xyes; then :
8663   cat >>confdefs.h <<_ACEOF
8664 #define HAVE_LIBXML2 1
8665 _ACEOF
8666
8667   LIBS="-lxml2 $LIBS"
8668
8669 else
8670   as_fn_error $? "library 'xml2' (version >= 2.6.23) is required for XML support" "$LINENO" 5
8671 fi
8672
8673 fi
8674
8675 if test "$with_libxslt" = yes ; then
8676   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xsltCleanupGlobals in -lxslt" >&5
8677 $as_echo_n "checking for xsltCleanupGlobals in -lxslt... " >&6; }
8678 if ${ac_cv_lib_xslt_xsltCleanupGlobals+:} false; then :
8679   $as_echo_n "(cached) " >&6
8680 else
8681   ac_check_lib_save_LIBS=$LIBS
8682 LIBS="-lxslt  $LIBS"
8683 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8684 /* end confdefs.h.  */
8685
8686 /* Override any GCC internal prototype to avoid an error.
8687    Use char because int might match the return type of a GCC
8688    builtin and then its argument prototype would still apply.  */
8689 #ifdef __cplusplus
8690 extern "C"
8691 #endif
8692 char xsltCleanupGlobals ();
8693 int
8694 main ()
8695 {
8696 return xsltCleanupGlobals ();
8697   ;
8698   return 0;
8699 }
8700 _ACEOF
8701 if ac_fn_c_try_link "$LINENO"; then :
8702   ac_cv_lib_xslt_xsltCleanupGlobals=yes
8703 else
8704   ac_cv_lib_xslt_xsltCleanupGlobals=no
8705 fi
8706 rm -f core conftest.err conftest.$ac_objext \
8707     conftest$ac_exeext conftest.$ac_ext
8708 LIBS=$ac_check_lib_save_LIBS
8709 fi
8710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xslt_xsltCleanupGlobals" >&5
8711 $as_echo "$ac_cv_lib_xslt_xsltCleanupGlobals" >&6; }
8712 if test "x$ac_cv_lib_xslt_xsltCleanupGlobals" = xyes; then :
8713   cat >>confdefs.h <<_ACEOF
8714 #define HAVE_LIBXSLT 1
8715 _ACEOF
8716
8717   LIBS="-lxslt $LIBS"
8718
8719 else
8720   as_fn_error $? "library 'xslt' is required for XSLT support" "$LINENO" 5
8721 fi
8722
8723 fi
8724
8725 # for contrib/sepgsql
8726 if test "$with_selinux" = yes; then
8727   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_compute_create_name in -lselinux" >&5
8728 $as_echo_n "checking for security_compute_create_name in -lselinux... " >&6; }
8729 if ${ac_cv_lib_selinux_security_compute_create_name+:} false; then :
8730   $as_echo_n "(cached) " >&6
8731 else
8732   ac_check_lib_save_LIBS=$LIBS
8733 LIBS="-lselinux  $LIBS"
8734 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8735 /* end confdefs.h.  */
8736
8737 /* Override any GCC internal prototype to avoid an error.
8738    Use char because int might match the return type of a GCC
8739    builtin and then its argument prototype would still apply.  */
8740 #ifdef __cplusplus
8741 extern "C"
8742 #endif
8743 char security_compute_create_name ();
8744 int
8745 main ()
8746 {
8747 return security_compute_create_name ();
8748   ;
8749   return 0;
8750 }
8751 _ACEOF
8752 if ac_fn_c_try_link "$LINENO"; then :
8753   ac_cv_lib_selinux_security_compute_create_name=yes
8754 else
8755   ac_cv_lib_selinux_security_compute_create_name=no
8756 fi
8757 rm -f core conftest.err conftest.$ac_objext \
8758     conftest$ac_exeext conftest.$ac_ext
8759 LIBS=$ac_check_lib_save_LIBS
8760 fi
8761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_compute_create_name" >&5
8762 $as_echo "$ac_cv_lib_selinux_security_compute_create_name" >&6; }
8763 if test "x$ac_cv_lib_selinux_security_compute_create_name" = xyes; then :
8764   cat >>confdefs.h <<_ACEOF
8765 #define HAVE_LIBSELINUX 1
8766 _ACEOF
8767
8768   LIBS="-lselinux $LIBS"
8769
8770 else
8771   as_fn_error $? "library 'libselinux', version 2.1.10 or newer, is required for SELinux support" "$LINENO" 5
8772 fi
8773
8774 fi
8775
8776 # for contrib/uuid-ossp
8777 if test "$with_ossp_uuid" = yes ; then
8778   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -lossp-uuid" >&5
8779 $as_echo_n "checking for uuid_export in -lossp-uuid... " >&6; }
8780 if ${ac_cv_lib_ossp_uuid_uuid_export+:} false; then :
8781   $as_echo_n "(cached) " >&6
8782 else
8783   ac_check_lib_save_LIBS=$LIBS
8784 LIBS="-lossp-uuid  $LIBS"
8785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8786 /* end confdefs.h.  */
8787
8788 /* Override any GCC internal prototype to avoid an error.
8789    Use char because int might match the return type of a GCC
8790    builtin and then its argument prototype would still apply.  */
8791 #ifdef __cplusplus
8792 extern "C"
8793 #endif
8794 char uuid_export ();
8795 int
8796 main ()
8797 {
8798 return uuid_export ();
8799   ;
8800   return 0;
8801 }
8802 _ACEOF
8803 if ac_fn_c_try_link "$LINENO"; then :
8804   ac_cv_lib_ossp_uuid_uuid_export=yes
8805 else
8806   ac_cv_lib_ossp_uuid_uuid_export=no
8807 fi
8808 rm -f core conftest.err conftest.$ac_objext \
8809     conftest$ac_exeext conftest.$ac_ext
8810 LIBS=$ac_check_lib_save_LIBS
8811 fi
8812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossp_uuid_uuid_export" >&5
8813 $as_echo "$ac_cv_lib_ossp_uuid_uuid_export" >&6; }
8814 if test "x$ac_cv_lib_ossp_uuid_uuid_export" = xyes; then :
8815   OSSP_UUID_LIBS="-lossp-uuid"
8816 else
8817   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -luuid" >&5
8818 $as_echo_n "checking for uuid_export in -luuid... " >&6; }
8819 if ${ac_cv_lib_uuid_uuid_export+:} false; then :
8820   $as_echo_n "(cached) " >&6
8821 else
8822   ac_check_lib_save_LIBS=$LIBS
8823 LIBS="-luuid  $LIBS"
8824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8825 /* end confdefs.h.  */
8826
8827 /* Override any GCC internal prototype to avoid an error.
8828    Use char because int might match the return type of a GCC
8829    builtin and then its argument prototype would still apply.  */
8830 #ifdef __cplusplus
8831 extern "C"
8832 #endif
8833 char uuid_export ();
8834 int
8835 main ()
8836 {
8837 return uuid_export ();
8838   ;
8839   return 0;
8840 }
8841 _ACEOF
8842 if ac_fn_c_try_link "$LINENO"; then :
8843   ac_cv_lib_uuid_uuid_export=yes
8844 else
8845   ac_cv_lib_uuid_uuid_export=no
8846 fi
8847 rm -f core conftest.err conftest.$ac_objext \
8848     conftest$ac_exeext conftest.$ac_ext
8849 LIBS=$ac_check_lib_save_LIBS
8850 fi
8851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_export" >&5
8852 $as_echo "$ac_cv_lib_uuid_uuid_export" >&6; }
8853 if test "x$ac_cv_lib_uuid_uuid_export" = xyes; then :
8854   OSSP_UUID_LIBS="-luuid"
8855 else
8856   as_fn_error $? "library 'ossp-uuid' or 'uuid' is required for OSSP-UUID" "$LINENO" 5
8857 fi
8858
8859 fi
8860
8861 fi
8862
8863
8864
8865 ##
8866 ## Header files
8867 ##
8868
8869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
8870 $as_echo_n "checking for ANSI C header files... " >&6; }
8871 if ${ac_cv_header_stdc+:} false; then :
8872   $as_echo_n "(cached) " >&6
8873 else
8874   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8875 /* end confdefs.h.  */
8876 #include <stdlib.h>
8877 #include <stdarg.h>
8878 #include <string.h>
8879 #include <float.h>
8880
8881 int
8882 main ()
8883 {
8884
8885   ;
8886   return 0;
8887 }
8888 _ACEOF
8889 if ac_fn_c_try_compile "$LINENO"; then :
8890   ac_cv_header_stdc=yes
8891 else
8892   ac_cv_header_stdc=no
8893 fi
8894 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8895
8896 if test $ac_cv_header_stdc = yes; then
8897   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8898   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8899 /* end confdefs.h.  */
8900 #include <string.h>
8901
8902 _ACEOF
8903 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8904   $EGREP "memchr" >/dev/null 2>&1; then :
8905
8906 else
8907   ac_cv_header_stdc=no
8908 fi
8909 rm -f conftest*
8910
8911 fi
8912
8913 if test $ac_cv_header_stdc = yes; then
8914   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8915   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8916 /* end confdefs.h.  */
8917 #include <stdlib.h>
8918
8919 _ACEOF
8920 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8921   $EGREP "free" >/dev/null 2>&1; then :
8922
8923 else
8924   ac_cv_header_stdc=no
8925 fi
8926 rm -f conftest*
8927
8928 fi
8929
8930 if test $ac_cv_header_stdc = yes; then
8931   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8932   if test "$cross_compiling" = yes; then :
8933   :
8934 else
8935   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8936 /* end confdefs.h.  */
8937 #include <ctype.h>
8938 #include <stdlib.h>
8939 #if ((' ' & 0x0FF) == 0x020)
8940 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8941 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8942 #else
8943 # define ISLOWER(c) \
8944                    (('a' <= (c) && (c) <= 'i') \
8945                      || ('j' <= (c) && (c) <= 'r') \
8946                      || ('s' <= (c) && (c) <= 'z'))
8947 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8948 #endif
8949
8950 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8951 int
8952 main ()
8953 {
8954   int i;
8955   for (i = 0; i < 256; i++)
8956     if (XOR (islower (i), ISLOWER (i))
8957         || toupper (i) != TOUPPER (i))
8958       return 2;
8959   return 0;
8960 }
8961 _ACEOF
8962 if ac_fn_c_try_run "$LINENO"; then :
8963
8964 else
8965   ac_cv_header_stdc=no
8966 fi
8967 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8968   conftest.$ac_objext conftest.beam conftest.$ac_ext
8969 fi
8970
8971 fi
8972 fi
8973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
8974 $as_echo "$ac_cv_header_stdc" >&6; }
8975 if test $ac_cv_header_stdc = yes; then
8976
8977 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
8978
8979 fi
8980
8981 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
8982 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
8983                   inttypes.h stdint.h unistd.h
8984 do :
8985   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8986 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
8987 "
8988 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8989   cat >>confdefs.h <<_ACEOF
8990 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8991 _ACEOF
8992
8993 fi
8994
8995 done
8996
8997
8998 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
8999 do :
9000   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9001 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9002 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9003   cat >>confdefs.h <<_ACEOF
9004 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9005 _ACEOF
9006
9007 fi
9008
9009 done
9010
9011
9012 # On BSD, test for net/if.h will fail unless sys/socket.h
9013 # is included first.
9014 for ac_header in net/if.h
9015 do :
9016   ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
9017 #ifdef HAVE_SYS_SOCKET_H
9018 #include <sys/socket.h>
9019 #endif
9020
9021 "
9022 if test "x$ac_cv_header_net_if_h" = xyes; then :
9023   cat >>confdefs.h <<_ACEOF
9024 #define HAVE_NET_IF_H 1
9025 _ACEOF
9026
9027 fi
9028
9029 done
9030
9031
9032 # On OpenBSD, test for sys/ucred.h will fail unless sys/param.h
9033 # is included first.
9034 for ac_header in sys/ucred.h
9035 do :
9036   ac_fn_c_check_header_compile "$LINENO" "sys/ucred.h" "ac_cv_header_sys_ucred_h" "$ac_includes_default
9037 #include <sys/param.h>
9038
9039 "
9040 if test "x$ac_cv_header_sys_ucred_h" = xyes; then :
9041   cat >>confdefs.h <<_ACEOF
9042 #define HAVE_SYS_UCRED_H 1
9043 _ACEOF
9044
9045 fi
9046
9047 done
9048
9049
9050 # At least on IRIX, test for netinet/tcp.h will fail unless
9051 # netinet/in.h is included first.
9052 for ac_header in netinet/in.h
9053 do :
9054   ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
9055 if test "x$ac_cv_header_netinet_in_h" = xyes; then :
9056   cat >>confdefs.h <<_ACEOF
9057 #define HAVE_NETINET_IN_H 1
9058 _ACEOF
9059
9060 fi
9061
9062 done
9063
9064 for ac_header in netinet/tcp.h
9065 do :
9066   ac_fn_c_check_header_compile "$LINENO" "netinet/tcp.h" "ac_cv_header_netinet_tcp_h" "$ac_includes_default
9067 #ifdef HAVE_NETINET_IN_H
9068 #include <netinet/in.h>
9069 #endif
9070
9071 "
9072 if test "x$ac_cv_header_netinet_tcp_h" = xyes; then :
9073   cat >>confdefs.h <<_ACEOF
9074 #define HAVE_NETINET_TCP_H 1
9075 _ACEOF
9076
9077 fi
9078
9079 done
9080
9081
9082 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
9083   for ac_header in readline/readline.h
9084 do :
9085   ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
9086 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
9087   cat >>confdefs.h <<_ACEOF
9088 #define HAVE_READLINE_READLINE_H 1
9089 _ACEOF
9090
9091 else
9092   for ac_header in readline.h
9093 do :
9094   ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
9095 if test "x$ac_cv_header_readline_h" = xyes; then :
9096   cat >>confdefs.h <<_ACEOF
9097 #define HAVE_READLINE_H 1
9098 _ACEOF
9099
9100 else
9101   as_fn_error $? "readline header not found
9102 If you have readline already installed, see config.log for details on the
9103 failure.  It is possible the compiler isn't looking in the proper directory.
9104 Use --without-readline to disable readline support." "$LINENO" 5
9105 fi
9106
9107 done
9108
9109 fi
9110
9111 done
9112
9113   for ac_header in readline/history.h
9114 do :
9115   ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
9116 if test "x$ac_cv_header_readline_history_h" = xyes; then :
9117   cat >>confdefs.h <<_ACEOF
9118 #define HAVE_READLINE_HISTORY_H 1
9119 _ACEOF
9120
9121 else
9122   for ac_header in history.h
9123 do :
9124   ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
9125 if test "x$ac_cv_header_history_h" = xyes; then :
9126   cat >>confdefs.h <<_ACEOF
9127 #define HAVE_HISTORY_H 1
9128 _ACEOF
9129
9130 else
9131   as_fn_error $? "history header not found
9132 If you have readline already installed, see config.log for details on the
9133 failure.  It is possible the compiler isn't looking in the proper directory.
9134 Use --without-readline to disable readline support." "$LINENO" 5
9135 fi
9136
9137 done
9138
9139 fi
9140
9141 done
9142
9143 fi
9144
9145 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
9146 # Some installations of libedit usurp /usr/include/readline/, which seems
9147 # bad practice, since in combined installations readline will have its headers
9148 # there.  We might have to resort to AC_EGREP checks to make sure we found
9149 # the proper header...
9150   for ac_header in editline/readline.h
9151 do :
9152   ac_fn_c_check_header_mongrel "$LINENO" "editline/readline.h" "ac_cv_header_editline_readline_h" "$ac_includes_default"
9153 if test "x$ac_cv_header_editline_readline_h" = xyes; then :
9154   cat >>confdefs.h <<_ACEOF
9155 #define HAVE_EDITLINE_READLINE_H 1
9156 _ACEOF
9157
9158 else
9159   for ac_header in readline.h
9160 do :
9161   ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
9162 if test "x$ac_cv_header_readline_h" = xyes; then :
9163   cat >>confdefs.h <<_ACEOF
9164 #define HAVE_READLINE_H 1
9165 _ACEOF
9166
9167 else
9168   for ac_header in readline/readline.h
9169 do :
9170   ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
9171 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
9172   cat >>confdefs.h <<_ACEOF
9173 #define HAVE_READLINE_READLINE_H 1
9174 _ACEOF
9175
9176 else
9177   as_fn_error $? "readline header not found
9178 If you have libedit already installed, see config.log for details on the
9179 failure.  It is possible the compiler isn't looking in the proper directory.
9180 Use --without-readline to disable libedit support." "$LINENO" 5
9181 fi
9182
9183 done
9184
9185 fi
9186
9187 done
9188
9189 fi
9190
9191 done
9192
9193 # Note: in a libedit installation, history.h is sometimes a dummy, and may
9194 # not be there at all.  Hence, don't complain if not found.  We must check
9195 # though, since in yet other versions it is an independent header.
9196   for ac_header in editline/history.h
9197 do :
9198   ac_fn_c_check_header_mongrel "$LINENO" "editline/history.h" "ac_cv_header_editline_history_h" "$ac_includes_default"
9199 if test "x$ac_cv_header_editline_history_h" = xyes; then :
9200   cat >>confdefs.h <<_ACEOF
9201 #define HAVE_EDITLINE_HISTORY_H 1
9202 _ACEOF
9203
9204 else
9205   for ac_header in history.h
9206 do :
9207   ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
9208 if test "x$ac_cv_header_history_h" = xyes; then :
9209   cat >>confdefs.h <<_ACEOF
9210 #define HAVE_HISTORY_H 1
9211 _ACEOF
9212
9213 else
9214   for ac_header in readline/history.h
9215 do :
9216   ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
9217 if test "x$ac_cv_header_readline_history_h" = xyes; then :
9218   cat >>confdefs.h <<_ACEOF
9219 #define HAVE_READLINE_HISTORY_H 1
9220 _ACEOF
9221
9222 fi
9223
9224 done
9225
9226 fi
9227
9228 done
9229
9230 fi
9231
9232 done
9233
9234 fi
9235
9236 if test "$with_zlib" = yes; then
9237   ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
9238 if test "x$ac_cv_header_zlib_h" = xyes; then :
9239
9240 else
9241   as_fn_error $? "zlib header not found
9242 If you have zlib already installed, see config.log for details on the
9243 failure.  It is possible the compiler isn't looking in the proper directory.
9244 Use --without-zlib to disable zlib support." "$LINENO" 5
9245 fi
9246
9247
9248 fi
9249
9250 if test "$with_gssapi" = yes ; then
9251   for ac_header in gssapi/gssapi.h
9252 do :
9253   ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi.h" "ac_cv_header_gssapi_gssapi_h" "$ac_includes_default"
9254 if test "x$ac_cv_header_gssapi_gssapi_h" = xyes; then :
9255   cat >>confdefs.h <<_ACEOF
9256 #define HAVE_GSSAPI_GSSAPI_H 1
9257 _ACEOF
9258
9259 else
9260   for ac_header in gssapi.h
9261 do :
9262   ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
9263 if test "x$ac_cv_header_gssapi_h" = xyes; then :
9264   cat >>confdefs.h <<_ACEOF
9265 #define HAVE_GSSAPI_H 1
9266 _ACEOF
9267
9268 else
9269   as_fn_error $? "gssapi.h header file is required for GSSAPI" "$LINENO" 5
9270 fi
9271
9272 done
9273
9274 fi
9275
9276 done
9277
9278 fi
9279
9280 if test "$with_openssl" = yes ; then
9281   ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
9282 if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
9283
9284 else
9285   as_fn_error $? "header file <openssl/ssl.h> is required for OpenSSL" "$LINENO" 5
9286 fi
9287
9288
9289   ac_fn_c_check_header_mongrel "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default"
9290 if test "x$ac_cv_header_openssl_err_h" = xyes; then :
9291
9292 else
9293   as_fn_error $? "header file <openssl/err.h> is required for OpenSSL" "$LINENO" 5
9294 fi
9295
9296
9297 fi
9298
9299 if test "$with_pam" = yes ; then
9300   for ac_header in security/pam_appl.h
9301 do :
9302   ac_fn_c_check_header_mongrel "$LINENO" "security/pam_appl.h" "ac_cv_header_security_pam_appl_h" "$ac_includes_default"
9303 if test "x$ac_cv_header_security_pam_appl_h" = xyes; then :
9304   cat >>confdefs.h <<_ACEOF
9305 #define HAVE_SECURITY_PAM_APPL_H 1
9306 _ACEOF
9307
9308 else
9309   for ac_header in pam/pam_appl.h
9310 do :
9311   ac_fn_c_check_header_mongrel "$LINENO" "pam/pam_appl.h" "ac_cv_header_pam_pam_appl_h" "$ac_includes_default"
9312 if test "x$ac_cv_header_pam_pam_appl_h" = xyes; then :
9313   cat >>confdefs.h <<_ACEOF
9314 #define HAVE_PAM_PAM_APPL_H 1
9315 _ACEOF
9316
9317 else
9318   as_fn_error $? "header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." "$LINENO" 5
9319 fi
9320
9321 done
9322
9323 fi
9324
9325 done
9326
9327 fi
9328
9329 if test "$with_libxml" = yes ; then
9330   ac_fn_c_check_header_mongrel "$LINENO" "libxml/parser.h" "ac_cv_header_libxml_parser_h" "$ac_includes_default"
9331 if test "x$ac_cv_header_libxml_parser_h" = xyes; then :
9332
9333 else
9334   as_fn_error $? "header file <libxml/parser.h> is required for XML support" "$LINENO" 5
9335 fi
9336
9337
9338 fi
9339
9340 if test "$with_libxslt" = yes ; then
9341   ac_fn_c_check_header_mongrel "$LINENO" "libxslt/xslt.h" "ac_cv_header_libxslt_xslt_h" "$ac_includes_default"
9342 if test "x$ac_cv_header_libxslt_xslt_h" = xyes; then :
9343
9344 else
9345   as_fn_error $? "header file <libxslt/xslt.h> is required for XSLT support" "$LINENO" 5
9346 fi
9347
9348
9349 fi
9350
9351 if test "$with_ldap" = yes ; then
9352   if test "$PORTNAME" != "win32"; then
9353      for ac_header in ldap.h
9354 do :
9355   ac_fn_c_check_header_mongrel "$LINENO" "ldap.h" "ac_cv_header_ldap_h" "$ac_includes_default"
9356 if test "x$ac_cv_header_ldap_h" = xyes; then :
9357   cat >>confdefs.h <<_ACEOF
9358 #define HAVE_LDAP_H 1
9359 _ACEOF
9360
9361 else
9362   as_fn_error $? "header file <ldap.h> is required for LDAP" "$LINENO" 5
9363 fi
9364
9365 done
9366
9367   else
9368      for ac_header in winldap.h
9369 do :
9370   ac_fn_c_check_header_compile "$LINENO" "winldap.h" "ac_cv_header_winldap_h" "$ac_includes_default
9371 #include <windows.h>
9372
9373 "
9374 if test "x$ac_cv_header_winldap_h" = xyes; then :
9375   cat >>confdefs.h <<_ACEOF
9376 #define HAVE_WINLDAP_H 1
9377 _ACEOF
9378
9379 else
9380   as_fn_error $? "header file <winldap.h> is required for LDAP" "$LINENO" 5
9381 fi
9382
9383 done
9384
9385   fi
9386 fi
9387
9388 if test "$with_bonjour" = yes ; then
9389   ac_fn_c_check_header_mongrel "$LINENO" "dns_sd.h" "ac_cv_header_dns_sd_h" "$ac_includes_default"
9390 if test "x$ac_cv_header_dns_sd_h" = xyes; then :
9391
9392 else
9393   as_fn_error $? "header file <dns_sd.h> is required for Bonjour" "$LINENO" 5
9394 fi
9395
9396
9397 fi
9398
9399 # for contrib/uuid-ossp
9400 if test "$with_ossp_uuid" = yes ; then
9401   for ac_header in ossp/uuid.h
9402 do :
9403   ac_fn_c_check_header_mongrel "$LINENO" "ossp/uuid.h" "ac_cv_header_ossp_uuid_h" "$ac_includes_default"
9404 if test "x$ac_cv_header_ossp_uuid_h" = xyes; then :
9405   cat >>confdefs.h <<_ACEOF
9406 #define HAVE_OSSP_UUID_H 1
9407 _ACEOF
9408
9409 else
9410
9411     for ac_header in uuid.h
9412 do :
9413   ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
9414 if test "x$ac_cv_header_uuid_h" = xyes; then :
9415   cat >>confdefs.h <<_ACEOF
9416 #define HAVE_UUID_H 1
9417 _ACEOF
9418
9419 else
9420   as_fn_error $? "header file <ossp/uuid.h> or <uuid.h> is required for OSSP-UUID" "$LINENO" 5
9421 fi
9422
9423 done
9424
9425 fi
9426
9427 done
9428
9429 fi
9430
9431 if test "$PORTNAME" = "win32" ; then
9432    for ac_header in crtdefs.h
9433 do :
9434   ac_fn_c_check_header_mongrel "$LINENO" "crtdefs.h" "ac_cv_header_crtdefs_h" "$ac_includes_default"
9435 if test "x$ac_cv_header_crtdefs_h" = xyes; then :
9436   cat >>confdefs.h <<_ACEOF
9437 #define HAVE_CRTDEFS_H 1
9438 _ACEOF
9439
9440 fi
9441
9442 done
9443
9444 fi
9445
9446 ##
9447 ## Types, structures, compiler characteristics
9448 ##
9449
9450   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
9451 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
9452 if ${ac_cv_c_bigendian+:} false; then :
9453   $as_echo_n "(cached) " >&6
9454 else
9455   ac_cv_c_bigendian=unknown
9456     # See if we're dealing with a universal compiler.
9457     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9458 /* end confdefs.h.  */
9459 #ifndef __APPLE_CC__
9460                not a universal capable compiler
9461              #endif
9462              typedef int dummy;
9463
9464 _ACEOF
9465 if ac_fn_c_try_compile "$LINENO"; then :
9466
9467         # Check for potential -arch flags.  It is not universal unless
9468         # there are at least two -arch flags with different values.
9469         ac_arch=
9470         ac_prev=
9471         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
9472          if test -n "$ac_prev"; then
9473            case $ac_word in
9474              i?86 | x86_64 | ppc | ppc64)
9475                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
9476                  ac_arch=$ac_word
9477                else
9478                  ac_cv_c_bigendian=universal
9479                  break
9480                fi
9481                ;;
9482            esac
9483            ac_prev=
9484          elif test "x$ac_word" = "x-arch"; then
9485            ac_prev=arch
9486          fi
9487        done
9488 fi
9489 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9490     if test $ac_cv_c_bigendian = unknown; then
9491       # See if sys/param.h defines the BYTE_ORDER macro.
9492       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9493 /* end confdefs.h.  */
9494 #include <sys/types.h>
9495              #include <sys/param.h>
9496
9497 int
9498 main ()
9499 {
9500 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
9501                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
9502                      && LITTLE_ENDIAN)
9503               bogus endian macros
9504              #endif
9505
9506   ;
9507   return 0;
9508 }
9509 _ACEOF
9510 if ac_fn_c_try_compile "$LINENO"; then :
9511   # It does; now see whether it defined to BIG_ENDIAN or not.
9512          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9513 /* end confdefs.h.  */
9514 #include <sys/types.h>
9515                 #include <sys/param.h>
9516
9517 int
9518 main ()
9519 {
9520 #if BYTE_ORDER != BIG_ENDIAN
9521                  not big endian
9522                 #endif
9523
9524   ;
9525   return 0;
9526 }
9527 _ACEOF
9528 if ac_fn_c_try_compile "$LINENO"; then :
9529   ac_cv_c_bigendian=yes
9530 else
9531   ac_cv_c_bigendian=no
9532 fi
9533 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9534 fi
9535 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9536     fi
9537     if test $ac_cv_c_bigendian = unknown; then
9538       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
9539       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9540 /* end confdefs.h.  */
9541 #include <limits.h>
9542
9543 int
9544 main ()
9545 {
9546 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
9547               bogus endian macros
9548              #endif
9549
9550   ;
9551   return 0;
9552 }
9553 _ACEOF
9554 if ac_fn_c_try_compile "$LINENO"; then :
9555   # It does; now see whether it defined to _BIG_ENDIAN or not.
9556          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9557 /* end confdefs.h.  */
9558 #include <limits.h>
9559
9560 int
9561 main ()
9562 {
9563 #ifndef _BIG_ENDIAN
9564                  not big endian
9565                 #endif
9566
9567   ;
9568   return 0;
9569 }
9570 _ACEOF
9571 if ac_fn_c_try_compile "$LINENO"; then :
9572   ac_cv_c_bigendian=yes
9573 else
9574   ac_cv_c_bigendian=no
9575 fi
9576 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9577 fi
9578 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9579     fi
9580     if test $ac_cv_c_bigendian = unknown; then
9581       # Compile a test program.
9582       if test "$cross_compiling" = yes; then :
9583   # Try to guess by grepping values from an object file.
9584          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9585 /* end confdefs.h.  */
9586 short int ascii_mm[] =
9587                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
9588                 short int ascii_ii[] =
9589                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
9590                 int use_ascii (int i) {
9591                   return ascii_mm[i] + ascii_ii[i];
9592                 }
9593                 short int ebcdic_ii[] =
9594                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
9595                 short int ebcdic_mm[] =
9596                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
9597                 int use_ebcdic (int i) {
9598                   return ebcdic_mm[i] + ebcdic_ii[i];
9599                 }
9600                 extern int foo;
9601
9602 int
9603 main ()
9604 {
9605 return use_ascii (foo) == use_ebcdic (foo);
9606   ;
9607   return 0;
9608 }
9609 _ACEOF
9610 if ac_fn_c_try_compile "$LINENO"; then :
9611   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
9612               ac_cv_c_bigendian=yes
9613             fi
9614             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
9615               if test "$ac_cv_c_bigendian" = unknown; then
9616                 ac_cv_c_bigendian=no
9617               else
9618                 # finding both strings is unlikely to happen, but who knows?
9619                 ac_cv_c_bigendian=unknown
9620               fi
9621             fi
9622 fi
9623 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9624 else
9625   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9626 /* end confdefs.h.  */
9627 $ac_includes_default
9628 int
9629 main ()
9630 {
9631
9632              /* Are we little or big endian?  From Harbison&Steele.  */
9633              union
9634              {
9635                long int l;
9636                char c[sizeof (long int)];
9637              } u;
9638              u.l = 1;
9639              return u.c[sizeof (long int) - 1] == 1;
9640
9641   ;
9642   return 0;
9643 }
9644 _ACEOF
9645 if ac_fn_c_try_run "$LINENO"; then :
9646   ac_cv_c_bigendian=no
9647 else
9648   ac_cv_c_bigendian=yes
9649 fi
9650 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9651   conftest.$ac_objext conftest.beam conftest.$ac_ext
9652 fi
9653
9654     fi
9655 fi
9656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
9657 $as_echo "$ac_cv_c_bigendian" >&6; }
9658  case $ac_cv_c_bigendian in #(
9659    yes)
9660      $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
9661 ;; #(
9662    no)
9663       ;; #(
9664    universal)
9665
9666 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
9667
9668      ;; #(
9669    *)
9670      as_fn_error $? "unknown endianness
9671  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
9672  esac
9673
9674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
9675 $as_echo_n "checking for inline... " >&6; }
9676 if ${ac_cv_c_inline+:} false; then :
9677   $as_echo_n "(cached) " >&6
9678 else
9679   ac_cv_c_inline=no
9680 for ac_kw in inline __inline__ __inline; do
9681   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9682 /* end confdefs.h.  */
9683 #ifndef __cplusplus
9684 typedef int foo_t;
9685 static $ac_kw foo_t static_foo () {return 0; }
9686 $ac_kw foo_t foo () {return 0; }
9687 #endif
9688
9689 _ACEOF
9690 if ac_fn_c_try_compile "$LINENO"; then :
9691   ac_cv_c_inline=$ac_kw
9692 fi
9693 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9694   test "$ac_cv_c_inline" != no && break
9695 done
9696
9697 fi
9698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
9699 $as_echo "$ac_cv_c_inline" >&6; }
9700
9701 case $ac_cv_c_inline in
9702   inline | yes) ;;
9703   *)
9704     case $ac_cv_c_inline in
9705       no) ac_val=;;
9706       *) ac_val=$ac_cv_c_inline;;
9707     esac
9708     cat >>confdefs.h <<_ACEOF
9709 #ifndef __cplusplus
9710 #define inline $ac_val
9711 #endif
9712 _ACEOF
9713     ;;
9714 esac
9715
9716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for quiet inline (no complaint if unreferenced)" >&5
9717 $as_echo_n "checking for quiet inline (no complaint if unreferenced)... " >&6; }
9718 if ${pgac_cv_c_inline_quietly+:} false; then :
9719   $as_echo_n "(cached) " >&6
9720 else
9721   pgac_cv_c_inline_quietly=no
9722   if test "$ac_cv_c_inline" != no; then
9723     pgac_c_inline_save_werror=$ac_c_werror_flag
9724     ac_c_werror_flag=yes
9725     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9726 /* end confdefs.h.  */
9727 static inline int fun () {return 0;}
9728 int
9729 main ()
9730 {
9731
9732   ;
9733   return 0;
9734 }
9735 _ACEOF
9736 if ac_fn_c_try_link "$LINENO"; then :
9737   pgac_cv_c_inline_quietly=yes
9738 fi
9739 rm -f core conftest.err conftest.$ac_objext \
9740     conftest$ac_exeext conftest.$ac_ext
9741     ac_c_werror_flag=$pgac_c_inline_save_werror
9742   fi
9743 fi
9744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_inline_quietly" >&5
9745 $as_echo "$pgac_cv_c_inline_quietly" >&6; }
9746 if test "$pgac_cv_c_inline_quietly" != no; then
9747
9748 cat >>confdefs.h <<_ACEOF
9749 #define PG_USE_INLINE 1
9750 _ACEOF
9751
9752 fi
9753
9754
9755   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array members" >&5
9756 $as_echo_n "checking for flexible array members... " >&6; }
9757 if ${ac_cv_c_flexmember+:} false; then :
9758   $as_echo_n "(cached) " >&6
9759 else
9760   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9761 /* end confdefs.h.  */
9762 #include <stdlib.h>
9763             #include <stdio.h>
9764             #include <stddef.h>
9765             struct s { int n; double d[]; };
9766 int
9767 main ()
9768 {
9769 int m = getchar ();
9770             struct s *p = malloc (offsetof (struct s, d)
9771                                   + m * sizeof (double));
9772             p->d[0] = 0.0;
9773             return p->d != (double *) NULL;
9774   ;
9775   return 0;
9776 }
9777 _ACEOF
9778 if ac_fn_c_try_compile "$LINENO"; then :
9779   ac_cv_c_flexmember=yes
9780 else
9781   ac_cv_c_flexmember=no
9782 fi
9783 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9784 fi
9785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
9786 $as_echo "$ac_cv_c_flexmember" >&6; }
9787   if test $ac_cv_c_flexmember = yes; then
9788
9789 $as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
9790
9791   else
9792     $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
9793
9794   fi
9795
9796 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signed types" >&5
9797 $as_echo_n "checking for signed types... " >&6; }
9798 if ${pgac_cv_c_signed+:} false; then :
9799   $as_echo_n "(cached) " >&6
9800 else
9801   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9802 /* end confdefs.h.  */
9803
9804 int
9805 main ()
9806 {
9807 signed char c; signed short s; signed int i;
9808   ;
9809   return 0;
9810 }
9811 _ACEOF
9812 if ac_fn_c_try_compile "$LINENO"; then :
9813   pgac_cv_c_signed=yes
9814 else
9815   pgac_cv_c_signed=no
9816 fi
9817 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9818 fi
9819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_signed" >&5
9820 $as_echo "$pgac_cv_c_signed" >&6; }
9821 if test x"$pgac_cv_c_signed" = xno ; then
9822
9823 $as_echo "#define signed /**/" >>confdefs.h
9824
9825 fi
9826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __func__" >&5
9827 $as_echo_n "checking for __func__... " >&6; }
9828 if ${pgac_cv_funcname_func_support+:} false; then :
9829   $as_echo_n "(cached) " >&6
9830 else
9831   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9832 /* end confdefs.h.  */
9833 #include <stdio.h>
9834 int
9835 main ()
9836 {
9837 printf("%s\n", __func__);
9838   ;
9839   return 0;
9840 }
9841 _ACEOF
9842 if ac_fn_c_try_compile "$LINENO"; then :
9843   pgac_cv_funcname_func_support=yes
9844 else
9845   pgac_cv_funcname_func_support=no
9846 fi
9847 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9848 fi
9849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_func_support" >&5
9850 $as_echo "$pgac_cv_funcname_func_support" >&6; }
9851 if test x"$pgac_cv_funcname_func_support" = xyes ; then
9852
9853 $as_echo "#define HAVE_FUNCNAME__FUNC 1" >>confdefs.h
9854
9855 else
9856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __FUNCTION__" >&5
9857 $as_echo_n "checking for __FUNCTION__... " >&6; }
9858 if ${pgac_cv_funcname_function_support+:} false; then :
9859   $as_echo_n "(cached) " >&6
9860 else
9861   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9862 /* end confdefs.h.  */
9863 #include <stdio.h>
9864 int
9865 main ()
9866 {
9867 printf("%s\n", __FUNCTION__);
9868   ;
9869   return 0;
9870 }
9871 _ACEOF
9872 if ac_fn_c_try_compile "$LINENO"; then :
9873   pgac_cv_funcname_function_support=yes
9874 else
9875   pgac_cv_funcname_function_support=no
9876 fi
9877 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9878 fi
9879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_function_support" >&5
9880 $as_echo "$pgac_cv_funcname_function_support" >&6; }
9881 if test x"$pgac_cv_funcname_function_support" = xyes ; then
9882
9883 $as_echo "#define HAVE_FUNCNAME__FUNCTION 1" >>confdefs.h
9884
9885 fi
9886 fi
9887 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Static_assert" >&5
9888 $as_echo_n "checking for _Static_assert... " >&6; }
9889 if ${pgac_cv__static_assert+:} false; then :
9890   $as_echo_n "(cached) " >&6
9891 else
9892   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9893 /* end confdefs.h.  */
9894
9895 int
9896 main ()
9897 {
9898 ({ _Static_assert(1, "foo"); })
9899   ;
9900   return 0;
9901 }
9902 _ACEOF
9903 if ac_fn_c_try_link "$LINENO"; then :
9904   pgac_cv__static_assert=yes
9905 else
9906   pgac_cv__static_assert=no
9907 fi
9908 rm -f core conftest.err conftest.$ac_objext \
9909     conftest$ac_exeext conftest.$ac_ext
9910 fi
9911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__static_assert" >&5
9912 $as_echo "$pgac_cv__static_assert" >&6; }
9913 if test x"$pgac_cv__static_assert" = xyes ; then
9914
9915 $as_echo "#define HAVE__STATIC_ASSERT 1" >>confdefs.h
9916
9917 fi
9918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_types_compatible_p" >&5
9919 $as_echo_n "checking for __builtin_types_compatible_p... " >&6; }
9920 if ${pgac_cv__types_compatible+:} false; then :
9921   $as_echo_n "(cached) " >&6
9922 else
9923   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9924 /* end confdefs.h.  */
9925
9926 int
9927 main ()
9928 {
9929  int x; static int y[__builtin_types_compatible_p(__typeof__(x), int)];
9930   ;
9931   return 0;
9932 }
9933 _ACEOF
9934 if ac_fn_c_try_compile "$LINENO"; then :
9935   pgac_cv__types_compatible=yes
9936 else
9937   pgac_cv__types_compatible=no
9938 fi
9939 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9940 fi
9941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__types_compatible" >&5
9942 $as_echo "$pgac_cv__types_compatible" >&6; }
9943 if test x"$pgac_cv__types_compatible" = xyes ; then
9944
9945 $as_echo "#define HAVE__BUILTIN_TYPES_COMPATIBLE_P 1" >>confdefs.h
9946
9947 fi
9948 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_constant_p" >&5
9949 $as_echo_n "checking for __builtin_constant_p... " >&6; }
9950 if ${pgac_cv__builtin_constant_p+:} false; then :
9951   $as_echo_n "(cached) " >&6
9952 else
9953   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9954 /* end confdefs.h.  */
9955 static int x; static int y[__builtin_constant_p(x) ? x : 1];
9956 int
9957 main ()
9958 {
9959
9960   ;
9961   return 0;
9962 }
9963 _ACEOF
9964 if ac_fn_c_try_compile "$LINENO"; then :
9965   pgac_cv__builtin_constant_p=yes
9966 else
9967   pgac_cv__builtin_constant_p=no
9968 fi
9969 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9970 fi
9971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_constant_p" >&5
9972 $as_echo "$pgac_cv__builtin_constant_p" >&6; }
9973 if test x"$pgac_cv__builtin_constant_p" = xyes ; then
9974
9975 $as_echo "#define HAVE__BUILTIN_CONSTANT_P 1" >>confdefs.h
9976
9977 fi
9978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unreachable" >&5
9979 $as_echo_n "checking for __builtin_unreachable... " >&6; }
9980 if ${pgac_cv__builtin_unreachable+:} false; then :
9981   $as_echo_n "(cached) " >&6
9982 else
9983   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9984 /* end confdefs.h.  */
9985
9986 int
9987 main ()
9988 {
9989 __builtin_unreachable();
9990   ;
9991   return 0;
9992 }
9993 _ACEOF
9994 if ac_fn_c_try_link "$LINENO"; then :
9995   pgac_cv__builtin_unreachable=yes
9996 else
9997   pgac_cv__builtin_unreachable=no
9998 fi
9999 rm -f core conftest.err conftest.$ac_objext \
10000     conftest$ac_exeext conftest.$ac_ext
10001 fi
10002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_unreachable" >&5
10003 $as_echo "$pgac_cv__builtin_unreachable" >&6; }
10004 if test x"$pgac_cv__builtin_unreachable" = xyes ; then
10005
10006 $as_echo "#define HAVE__BUILTIN_UNREACHABLE 1" >>confdefs.h
10007
10008 fi
10009 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __VA_ARGS__" >&5
10010 $as_echo_n "checking for __VA_ARGS__... " >&6; }
10011 if ${pgac_cv__va_args+:} false; then :
10012   $as_echo_n "(cached) " >&6
10013 else
10014   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10015 /* end confdefs.h.  */
10016 #include <stdio.h>
10017 int
10018 main ()
10019 {
10020 #define debug(...) fprintf(stderr, __VA_ARGS__)
10021 debug("%s", "blarg");
10022
10023   ;
10024   return 0;
10025 }
10026 _ACEOF
10027 if ac_fn_c_try_compile "$LINENO"; then :
10028   pgac_cv__va_args=yes
10029 else
10030   pgac_cv__va_args=no
10031 fi
10032 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10033 fi
10034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__va_args" >&5
10035 $as_echo "$pgac_cv__va_args" >&6; }
10036 if test x"$pgac_cv__va_args" = xyes ; then
10037
10038 $as_echo "#define HAVE__VA_ARGS 1" >>confdefs.h
10039
10040 fi
10041 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10042 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
10043 if ${ac_cv_struct_tm+:} false; then :
10044   $as_echo_n "(cached) " >&6
10045 else
10046   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10047 /* end confdefs.h.  */
10048 #include <sys/types.h>
10049 #include <time.h>
10050
10051 int
10052 main ()
10053 {
10054 struct tm tm;
10055                                      int *p = &tm.tm_sec;
10056                                      return !p;
10057   ;
10058   return 0;
10059 }
10060 _ACEOF
10061 if ac_fn_c_try_compile "$LINENO"; then :
10062   ac_cv_struct_tm=time.h
10063 else
10064   ac_cv_struct_tm=sys/time.h
10065 fi
10066 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10067 fi
10068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10069 $as_echo "$ac_cv_struct_tm" >&6; }
10070 if test $ac_cv_struct_tm = sys/time.h; then
10071
10072 $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
10073
10074 fi
10075
10076 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
10077 #include <$ac_cv_struct_tm>
10078
10079 "
10080 if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
10081
10082 cat >>confdefs.h <<_ACEOF
10083 #define HAVE_STRUCT_TM_TM_ZONE 1
10084 _ACEOF
10085
10086
10087 fi
10088
10089 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10090
10091 $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
10092
10093 fi
10094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
10095 $as_echo_n "checking for tzname... " >&6; }
10096 if ${ac_cv_var_tzname+:} false; then :
10097   $as_echo_n "(cached) " >&6
10098 else
10099   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10100 /* end confdefs.h.  */
10101 #include <time.h>
10102 #ifndef tzname /* For SGI.  */
10103 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
10104 #endif
10105
10106 int
10107 main ()
10108 {
10109 atoi(*tzname);
10110   ;
10111   return 0;
10112 }
10113 _ACEOF
10114 if ac_fn_c_try_link "$LINENO"; then :
10115   ac_cv_var_tzname=yes
10116 else
10117   ac_cv_var_tzname=no
10118 fi
10119 rm -f core conftest.err conftest.$ac_objext \
10120     conftest$ac_exeext conftest.$ac_ext
10121 fi
10122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
10123 $as_echo "$ac_cv_var_tzname" >&6; }
10124 if test $ac_cv_var_tzname = yes; then
10125
10126 $as_echo "#define HAVE_TZNAME 1" >>confdefs.h
10127
10128 fi
10129
10130 ac_fn_c_check_type "$LINENO" "union semun" "ac_cv_type_union_semun" "#include <sys/types.h>
10131 #include <sys/ipc.h>
10132 #include <sys/sem.h>
10133 "
10134 if test "x$ac_cv_type_union_semun" = xyes; then :
10135
10136 cat >>confdefs.h <<_ACEOF
10137 #define HAVE_UNION_SEMUN 1
10138 _ACEOF
10139
10140
10141 fi
10142
10143 ac_fn_c_check_type "$LINENO" "struct sockaddr_un" "ac_cv_type_struct_sockaddr_un" "#include <sys/types.h>
10144 #ifdef HAVE_SYS_UN_H
10145 #include <sys/un.h>
10146 #endif
10147
10148 "
10149 if test "x$ac_cv_type_struct_sockaddr_un" = xyes; then :
10150
10151 $as_echo "#define HAVE_UNIX_SOCKETS 1" >>confdefs.h
10152
10153 fi
10154
10155 ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "#include <sys/types.h>
10156 #ifdef HAVE_SYS_SOCKET_H
10157 #include <sys/socket.h>
10158 #endif
10159
10160 "
10161 if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
10162
10163 cat >>confdefs.h <<_ACEOF
10164 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
10165 _ACEOF
10166
10167
10168 fi
10169
10170 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
10171 #ifdef HAVE_SYS_SOCKET_H
10172 #include <sys/socket.h>
10173 #endif
10174
10175 "
10176 if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then :
10177
10178 cat >>confdefs.h <<_ACEOF
10179 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
10180 _ACEOF
10181
10182
10183 fi
10184 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_family" "ac_cv_member_struct_sockaddr_storage___ss_family" "#include <sys/types.h>
10185 #ifdef HAVE_SYS_SOCKET_H
10186 #include <sys/socket.h>
10187 #endif
10188
10189 "
10190 if test "x$ac_cv_member_struct_sockaddr_storage___ss_family" = xyes; then :
10191
10192 cat >>confdefs.h <<_ACEOF
10193 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1
10194 _ACEOF
10195
10196
10197 fi
10198 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_len" "ac_cv_member_struct_sockaddr_storage_ss_len" "#include <sys/types.h>
10199 #ifdef HAVE_SYS_SOCKET_H
10200 #include <sys/socket.h>
10201 #endif
10202
10203 "
10204 if test "x$ac_cv_member_struct_sockaddr_storage_ss_len" = xyes; then :
10205
10206 cat >>confdefs.h <<_ACEOF
10207 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1
10208 _ACEOF
10209
10210
10211 fi
10212 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_len" "ac_cv_member_struct_sockaddr_storage___ss_len" "#include <sys/types.h>
10213 #ifdef HAVE_SYS_SOCKET_H
10214 #include <sys/socket.h>
10215 #endif
10216
10217 "
10218 if test "x$ac_cv_member_struct_sockaddr_storage___ss_len" = xyes; then :
10219
10220 cat >>confdefs.h <<_ACEOF
10221 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN 1
10222 _ACEOF
10223
10224
10225 fi
10226 ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/types.h>
10227 #ifdef HAVE_SYS_SOCKET_H
10228 #include <sys/socket.h>
10229 #endif
10230
10231 "
10232 if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
10233
10234 cat >>confdefs.h <<_ACEOF
10235 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
10236 _ACEOF
10237
10238
10239 fi
10240
10241 ac_fn_c_check_type "$LINENO" "struct addrinfo" "ac_cv_type_struct_addrinfo" "#include <sys/types.h>
10242 #include <sys/socket.h>
10243 #include <netdb.h>
10244
10245 "
10246 if test "x$ac_cv_type_struct_addrinfo" = xyes; then :
10247
10248 cat >>confdefs.h <<_ACEOF
10249 #define HAVE_STRUCT_ADDRINFO 1
10250 _ACEOF
10251
10252
10253 fi
10254
10255
10256   ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
10257 if test "x$ac_cv_type_intptr_t" = xyes; then :
10258
10259 $as_echo "#define HAVE_INTPTR_T 1" >>confdefs.h
10260
10261 else
10262   for ac_type in 'int' 'long int' 'long long int'; do
10263        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10264 /* end confdefs.h.  */
10265 $ac_includes_default
10266 int
10267 main ()
10268 {
10269 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
10270 test_array [0] = 0;
10271 return test_array [0];
10272
10273   ;
10274   return 0;
10275 }
10276 _ACEOF
10277 if ac_fn_c_try_compile "$LINENO"; then :
10278
10279 cat >>confdefs.h <<_ACEOF
10280 #define intptr_t $ac_type
10281 _ACEOF
10282
10283           ac_type=
10284 fi
10285 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10286        test -z "$ac_type" && break
10287      done
10288 fi
10289
10290
10291
10292   ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
10293 if test "x$ac_cv_type_uintptr_t" = xyes; then :
10294
10295 $as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h
10296
10297 else
10298   for ac_type in 'unsigned int' 'unsigned long int' \
10299         'unsigned long long int'; do
10300        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10301 /* end confdefs.h.  */
10302 $ac_includes_default
10303 int
10304 main ()
10305 {
10306 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
10307 test_array [0] = 0;
10308 return test_array [0];
10309
10310   ;
10311   return 0;
10312 }
10313 _ACEOF
10314 if ac_fn_c_try_compile "$LINENO"; then :
10315
10316 cat >>confdefs.h <<_ACEOF
10317 #define uintptr_t $ac_type
10318 _ACEOF
10319
10320           ac_type=
10321 fi
10322 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10323        test -z "$ac_type" && break
10324      done
10325 fi
10326
10327
10328
10329   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
10330 $as_echo_n "checking for unsigned long long int... " >&6; }
10331 if ${ac_cv_type_unsigned_long_long_int+:} false; then :
10332   $as_echo_n "(cached) " >&6
10333 else
10334   ac_cv_type_unsigned_long_long_int=yes
10335      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
10336        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10337 /* end confdefs.h.  */
10338
10339   /* For now, do not test the preprocessor; as of 2007 there are too many
10340          implementations with broken preprocessors.  Perhaps this can
10341          be revisited in 2012.  In the meantime, code should not expect
10342          #if to work with literals wider than 32 bits.  */
10343       /* Test literals.  */
10344       long long int ll = 9223372036854775807ll;
10345       long long int nll = -9223372036854775807LL;
10346       unsigned long long int ull = 18446744073709551615ULL;
10347       /* Test constant expressions.   */
10348       typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
10349                      ? 1 : -1)];
10350       typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
10351                      ? 1 : -1)];
10352       int i = 63;
10353 int
10354 main ()
10355 {
10356 /* Test availability of runtime routines for shift and division.  */
10357       long long int llmax = 9223372036854775807ll;
10358       unsigned long long int ullmax = 18446744073709551615ull;
10359       return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
10360               | (llmax / ll) | (llmax % ll)
10361               | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
10362               | (ullmax / ull) | (ullmax % ull));
10363   ;
10364   return 0;
10365 }
10366
10367 _ACEOF
10368 if ac_fn_c_try_link "$LINENO"; then :
10369
10370 else
10371   ac_cv_type_unsigned_long_long_int=no
10372 fi
10373 rm -f core conftest.err conftest.$ac_objext \
10374     conftest$ac_exeext conftest.$ac_ext
10375      fi
10376 fi
10377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
10378 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
10379   if test $ac_cv_type_unsigned_long_long_int = yes; then
10380
10381 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
10382
10383   fi
10384
10385
10386
10387   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
10388 $as_echo_n "checking for long long int... " >&6; }
10389 if ${ac_cv_type_long_long_int+:} false; then :
10390   $as_echo_n "(cached) " >&6
10391 else
10392   ac_cv_type_long_long_int=yes
10393       if test "x${ac_cv_prog_cc_c99-no}" = xno; then
10394         ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
10395         if test $ac_cv_type_long_long_int = yes; then
10396                                   if test "$cross_compiling" = yes; then :
10397   :
10398 else
10399   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10400 /* end confdefs.h.  */
10401 #include <limits.h>
10402                  #ifndef LLONG_MAX
10403                  # define HALF \
10404                           (1LL << (sizeof (long long int) * CHAR_BIT - 2))
10405                  # define LLONG_MAX (HALF - 1 + HALF)
10406                  #endif
10407 int
10408 main ()
10409 {
10410 long long int n = 1;
10411                  int i;
10412                  for (i = 0; ; i++)
10413                    {
10414                      long long int m = n << i;
10415                      if (m >> i != n)
10416                        return 1;
10417                      if (LLONG_MAX / 2 < m)
10418                        break;
10419                    }
10420                  return 0;
10421   ;
10422   return 0;
10423 }
10424 _ACEOF
10425 if ac_fn_c_try_run "$LINENO"; then :
10426
10427 else
10428   ac_cv_type_long_long_int=no
10429 fi
10430 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10431   conftest.$ac_objext conftest.beam conftest.$ac_ext
10432 fi
10433
10434         fi
10435       fi
10436 fi
10437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
10438 $as_echo "$ac_cv_type_long_long_int" >&6; }
10439   if test $ac_cv_type_long_long_int = yes; then
10440
10441 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
10442
10443   fi
10444
10445
10446 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for locale_t" >&5
10447 $as_echo_n "checking for locale_t... " >&6; }
10448 if ${pgac_cv_type_locale_t+:} false; then :
10449   $as_echo_n "(cached) " >&6
10450 else
10451   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10452 /* end confdefs.h.  */
10453 #include <locale.h>
10454 locale_t x;
10455 int
10456 main ()
10457 {
10458
10459   ;
10460   return 0;
10461 }
10462 _ACEOF
10463 if ac_fn_c_try_compile "$LINENO"; then :
10464   pgac_cv_type_locale_t=yes
10465 else
10466   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10467 /* end confdefs.h.  */
10468 #include <xlocale.h>
10469 locale_t x;
10470 int
10471 main ()
10472 {
10473
10474   ;
10475   return 0;
10476 }
10477 _ACEOF
10478 if ac_fn_c_try_compile "$LINENO"; then :
10479   pgac_cv_type_locale_t='yes (in xlocale.h)'
10480 else
10481   pgac_cv_type_locale_t=no
10482 fi
10483 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10484 fi
10485 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10486 fi
10487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_locale_t" >&5
10488 $as_echo "$pgac_cv_type_locale_t" >&6; }
10489 if test "$pgac_cv_type_locale_t" != no; then
10490
10491 $as_echo "#define HAVE_LOCALE_T 1" >>confdefs.h
10492
10493 fi
10494 if test "$pgac_cv_type_locale_t" = 'yes (in xlocale.h)'; then
10495
10496 $as_echo "#define LOCALE_T_IN_XLOCALE 1" >>confdefs.h
10497
10498 fi
10499
10500 ac_fn_c_check_type "$LINENO" "struct cmsgcred" "ac_cv_type_struct_cmsgcred" "#include <sys/socket.h>
10501 #include <sys/param.h>
10502 #ifdef HAVE_SYS_UCRED_H
10503 #include <sys/ucred.h>
10504 #endif
10505 "
10506 if test "x$ac_cv_type_struct_cmsgcred" = xyes; then :
10507
10508 cat >>confdefs.h <<_ACEOF
10509 #define HAVE_STRUCT_CMSGCRED 1
10510 _ACEOF
10511
10512
10513 fi
10514
10515
10516 ac_fn_c_check_type "$LINENO" "struct option" "ac_cv_type_struct_option" "#ifdef HAVE_GETOPT_H
10517 #include <getopt.h>
10518 #endif
10519 "
10520 if test "x$ac_cv_type_struct_option" = xyes; then :
10521
10522 cat >>confdefs.h <<_ACEOF
10523 #define HAVE_STRUCT_OPTION 1
10524 _ACEOF
10525
10526
10527 fi
10528
10529
10530 if test "$with_zlib" = yes; then
10531   # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
10532   # did not).  While we could work around the lack of z_streamp, it
10533   # seems unwise to encourage people to use such old zlib versions...
10534   ac_fn_c_check_type "$LINENO" "z_streamp" "ac_cv_type_z_streamp" "#include <zlib.h>
10535 "
10536 if test "x$ac_cv_type_z_streamp" = xyes; then :
10537
10538 else
10539   as_fn_error $? "zlib version is too old
10540 Use --without-zlib to disable zlib support." "$LINENO" 5
10541 fi
10542
10543 fi
10544
10545 # On PPC, check if assembler supports LWARX instruction's mutex hint bit
10546 case $host_cpu in
10547   ppc*|powerpc*)
10548     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports lwarx hint bit" >&5
10549 $as_echo_n "checking whether assembler supports lwarx hint bit... " >&6; }
10550     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10551 /* end confdefs.h.  */
10552
10553 int
10554 main ()
10555 {
10556 int a = 0; int *p = &a; int r;
10557          __asm__ __volatile__ (" lwarx %0,0,%1,1\n" : "=&r"(r) : "r"(p));
10558   ;
10559   return 0;
10560 }
10561 _ACEOF
10562 if ac_fn_c_try_compile "$LINENO"; then :
10563   pgac_cv_have_ppc_mutex_hint=yes
10564 else
10565   pgac_cv_have_ppc_mutex_hint=no
10566 fi
10567 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10568     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_ppc_mutex_hint" >&5
10569 $as_echo "$pgac_cv_have_ppc_mutex_hint" >&6; }
10570     if test x"$pgac_cv_have_ppc_mutex_hint" = xyes ; then
10571
10572 $as_echo "#define HAVE_PPC_LWARX_MUTEX_HINT 1" >>confdefs.h
10573
10574     fi
10575   ;;
10576 esac
10577
10578 # Check largefile support.  You might think this is a system service not a
10579 # compiler characteristic, but you'd be wrong.  We must check this before
10580 # probing existence of related functions such as fseeko, since the largefile
10581 # defines can affect what is generated for that.
10582 if test "$PORTNAME" != "win32"; then
10583    # Check whether --enable-largefile was given.
10584 if test "${enable_largefile+set}" = set; then :
10585   enableval=$enable_largefile;
10586 fi
10587
10588 if test "$enable_largefile" != no; then
10589
10590   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
10591 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
10592 if ${ac_cv_sys_largefile_CC+:} false; then :
10593   $as_echo_n "(cached) " >&6
10594 else
10595   ac_cv_sys_largefile_CC=no
10596      if test "$GCC" != yes; then
10597        ac_save_CC=$CC
10598        while :; do
10599          # IRIX 6.2 and later do not support large files by default,
10600          # so use the C compiler's -n32 option if that helps.
10601          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10602 /* end confdefs.h.  */
10603 #include <sys/types.h>
10604  /* Check that off_t can represent 2**63 - 1 correctly.
10605     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10606     since some C++ compilers masquerading as C compilers
10607     incorrectly reject 9223372036854775807.  */
10608 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10609   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10610                        && LARGE_OFF_T % 2147483647 == 1)
10611                       ? 1 : -1];
10612 int
10613 main ()
10614 {
10615
10616   ;
10617   return 0;
10618 }
10619 _ACEOF
10620          if ac_fn_c_try_compile "$LINENO"; then :
10621   break
10622 fi
10623 rm -f core conftest.err conftest.$ac_objext
10624          CC="$CC -n32"
10625          if ac_fn_c_try_compile "$LINENO"; then :
10626   ac_cv_sys_largefile_CC=' -n32'; break
10627 fi
10628 rm -f core conftest.err conftest.$ac_objext
10629          break
10630        done
10631        CC=$ac_save_CC
10632        rm -f conftest.$ac_ext
10633     fi
10634 fi
10635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
10636 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
10637   if test "$ac_cv_sys_largefile_CC" != no; then
10638     CC=$CC$ac_cv_sys_largefile_CC
10639   fi
10640
10641   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
10642 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
10643 if ${ac_cv_sys_file_offset_bits+:} false; then :
10644   $as_echo_n "(cached) " >&6
10645 else
10646   while :; do
10647   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10648 /* end confdefs.h.  */
10649 #include <sys/types.h>
10650  /* Check that off_t can represent 2**63 - 1 correctly.
10651     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10652     since some C++ compilers masquerading as C compilers
10653     incorrectly reject 9223372036854775807.  */
10654 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10655   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10656                        && LARGE_OFF_T % 2147483647 == 1)
10657                       ? 1 : -1];
10658 int
10659 main ()
10660 {
10661
10662   ;
10663   return 0;
10664 }
10665 _ACEOF
10666 if ac_fn_c_try_compile "$LINENO"; then :
10667   ac_cv_sys_file_offset_bits=no; break
10668 fi
10669 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10670   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10671 /* end confdefs.h.  */
10672 #define _FILE_OFFSET_BITS 64
10673 #include <sys/types.h>
10674  /* Check that off_t can represent 2**63 - 1 correctly.
10675     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10676     since some C++ compilers masquerading as C compilers
10677     incorrectly reject 9223372036854775807.  */
10678 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10679   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10680                        && LARGE_OFF_T % 2147483647 == 1)
10681                       ? 1 : -1];
10682 int
10683 main ()
10684 {
10685
10686   ;
10687   return 0;
10688 }
10689 _ACEOF
10690 if ac_fn_c_try_compile "$LINENO"; then :
10691   ac_cv_sys_file_offset_bits=64; break
10692 fi
10693 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10694   ac_cv_sys_file_offset_bits=unknown
10695   break
10696 done
10697 fi
10698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
10699 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
10700 case $ac_cv_sys_file_offset_bits in #(
10701   no | unknown) ;;
10702   *)
10703 cat >>confdefs.h <<_ACEOF
10704 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
10705 _ACEOF
10706 ;;
10707 esac
10708 rm -rf conftest*
10709   if test $ac_cv_sys_file_offset_bits = unknown; then
10710     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
10711 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
10712 if ${ac_cv_sys_large_files+:} false; then :
10713   $as_echo_n "(cached) " >&6
10714 else
10715   while :; do
10716   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10717 /* end confdefs.h.  */
10718 #include <sys/types.h>
10719  /* Check that off_t can represent 2**63 - 1 correctly.
10720     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10721     since some C++ compilers masquerading as C compilers
10722     incorrectly reject 9223372036854775807.  */
10723 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10724   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10725                        && LARGE_OFF_T % 2147483647 == 1)
10726                       ? 1 : -1];
10727 int
10728 main ()
10729 {
10730
10731   ;
10732   return 0;
10733 }
10734 _ACEOF
10735 if ac_fn_c_try_compile "$LINENO"; then :
10736   ac_cv_sys_large_files=no; break
10737 fi
10738 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10739   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10740 /* end confdefs.h.  */
10741 #define _LARGE_FILES 1
10742 #include <sys/types.h>
10743  /* Check that off_t can represent 2**63 - 1 correctly.
10744     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10745     since some C++ compilers masquerading as C compilers
10746     incorrectly reject 9223372036854775807.  */
10747 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10748   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10749                        && LARGE_OFF_T % 2147483647 == 1)
10750                       ? 1 : -1];
10751 int
10752 main ()
10753 {
10754
10755   ;
10756   return 0;
10757 }
10758 _ACEOF
10759 if ac_fn_c_try_compile "$LINENO"; then :
10760   ac_cv_sys_large_files=1; break
10761 fi
10762 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10763   ac_cv_sys_large_files=unknown
10764   break
10765 done
10766 fi
10767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
10768 $as_echo "$ac_cv_sys_large_files" >&6; }
10769 case $ac_cv_sys_large_files in #(
10770   no | unknown) ;;
10771   *)
10772 cat >>confdefs.h <<_ACEOF
10773 #define _LARGE_FILES $ac_cv_sys_large_files
10774 _ACEOF
10775 ;;
10776 esac
10777 rm -rf conftest*
10778   fi
10779
10780
10781 fi
10782
10783    # Autoconf 2.69's AC_SYS_LARGEFILE believes it's a good idea to #define
10784    # _DARWIN_USE_64_BIT_INODE, but it isn't: on OS X 10.5 that activates a
10785    # bug that causes readdir() to sometimes return EINVAL.  On later OS X
10786    # versions where the feature actually works, it's on by default anyway.
10787
10788 fi
10789
10790 # Check for largefile support (must be after AC_SYS_LARGEFILE)
10791 # The cast to long int works around a bug in the HP C Compiler
10792 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10793 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10794 # This bug is HP SR number 8606223364.
10795 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
10796 $as_echo_n "checking size of off_t... " >&6; }
10797 if ${ac_cv_sizeof_off_t+:} false; then :
10798   $as_echo_n "(cached) " >&6
10799 else
10800   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t"        "$ac_includes_default"; then :
10801
10802 else
10803   if test "$ac_cv_type_off_t" = yes; then
10804      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10805 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10806 as_fn_error 77 "cannot compute sizeof (off_t)
10807 See \`config.log' for more details" "$LINENO" 5; }
10808    else
10809      ac_cv_sizeof_off_t=0
10810    fi
10811 fi
10812
10813 fi
10814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
10815 $as_echo "$ac_cv_sizeof_off_t" >&6; }
10816
10817
10818
10819 cat >>confdefs.h <<_ACEOF
10820 #define SIZEOF_OFF_T $ac_cv_sizeof_off_t
10821 _ACEOF
10822
10823
10824
10825 # If we don't have largefile support, can't handle segsize >= 2GB.
10826 if test "$ac_cv_sizeof_off_t" -lt 8 -a "$segsize" != "1"; then
10827    as_fn_error $? "Large file support is not enabled. Segment size cannot be larger than 1GB." "$LINENO" 5
10828 fi
10829
10830
10831 ##
10832 ## Functions, global variables
10833 ##
10834
10835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int timezone" >&5
10836 $as_echo_n "checking for int timezone... " >&6; }
10837 if ${pgac_cv_var_int_timezone+:} false; then :
10838   $as_echo_n "(cached) " >&6
10839 else
10840   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10841 /* end confdefs.h.  */
10842 #include <time.h>
10843 int res;
10844 int
10845 main ()
10846 {
10847 #ifndef __CYGWIN__
10848 res = timezone / 60;
10849 #else
10850 res = _timezone / 60;
10851 #endif
10852   ;
10853   return 0;
10854 }
10855 _ACEOF
10856 if ac_fn_c_try_link "$LINENO"; then :
10857   pgac_cv_var_int_timezone=yes
10858 else
10859   pgac_cv_var_int_timezone=no
10860 fi
10861 rm -f core conftest.err conftest.$ac_objext \
10862     conftest$ac_exeext conftest.$ac_ext
10863 fi
10864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_timezone" >&5
10865 $as_echo "$pgac_cv_var_int_timezone" >&6; }
10866 if test x"$pgac_cv_var_int_timezone" = xyes ; then
10867
10868 $as_echo "#define HAVE_INT_TIMEZONE 1" >>confdefs.h
10869
10870 fi
10871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for accept()" >&5
10872 $as_echo_n "checking types of arguments for accept()... " >&6; }
10873  if ${ac_cv_func_accept_return+:} false; then :
10874   $as_echo_n "(cached) " >&6
10875 else
10876    if ${ac_cv_func_accept_arg1+:} false; then :
10877   $as_echo_n "(cached) " >&6
10878 else
10879     if ${ac_cv_func_accept_arg2+:} false; then :
10880   $as_echo_n "(cached) " >&6
10881 else
10882      if ${ac_cv_func_accept_arg3+:} false; then :
10883   $as_echo_n "(cached) " >&6
10884 else
10885       for ac_cv_func_accept_return in 'int' 'unsigned int PASCAL' 'SOCKET WSAAPI'; do
10886       for ac_cv_func_accept_arg1 in 'int' 'unsigned int' 'SOCKET'; do
10887        for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
10888         for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
10889          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10890 /* end confdefs.h.  */
10891 #ifdef HAVE_SYS_TYPES_H
10892 #include <sys/types.h>
10893 #endif
10894 #ifdef HAVE_SYS_SOCKET_H
10895 #include <sys/socket.h>
10896 #endif
10897 extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
10898 int
10899 main ()
10900 {
10901
10902   ;
10903   return 0;
10904 }
10905 _ACEOF
10906 if ac_fn_c_try_compile "$LINENO"; then :
10907   ac_not_found=no; break 4
10908 else
10909   ac_not_found=yes
10910 fi
10911 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10912        done
10913       done
10914      done
10915     done
10916     if test "$ac_not_found" = yes; then
10917       as_fn_error $? "could not determine argument types" "$LINENO" 5
10918     fi
10919     if test "$ac_cv_func_accept_arg3" = "void"; then
10920       ac_cv_func_accept_arg3=int
10921     fi
10922
10923 fi
10924
10925 fi
10926
10927 fi
10928
10929 fi
10930  { $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
10931 $as_echo "$ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&6; }
10932
10933 cat >>confdefs.h <<_ACEOF
10934 #define ACCEPT_TYPE_RETURN $ac_cv_func_accept_return
10935 _ACEOF
10936
10937
10938 cat >>confdefs.h <<_ACEOF
10939 #define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
10940 _ACEOF
10941
10942
10943 cat >>confdefs.h <<_ACEOF
10944 #define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
10945 _ACEOF
10946
10947
10948 cat >>confdefs.h <<_ACEOF
10949 #define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
10950 _ACEOF
10951
10952
10953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday takes only one argument" >&5
10954 $as_echo_n "checking whether gettimeofday takes only one argument... " >&6; }
10955 if ${pgac_cv_func_gettimeofday_1arg+:} false; then :
10956   $as_echo_n "(cached) " >&6
10957 else
10958   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10959 /* end confdefs.h.  */
10960 #include <sys/time.h>
10961 int
10962 main ()
10963 {
10964 struct timeval *tp;
10965 struct timezone *tzp;
10966 gettimeofday(tp,tzp);
10967   ;
10968   return 0;
10969 }
10970 _ACEOF
10971 if ac_fn_c_try_compile "$LINENO"; then :
10972   pgac_cv_func_gettimeofday_1arg=no
10973 else
10974   pgac_cv_func_gettimeofday_1arg=yes
10975 fi
10976 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10977 fi
10978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_gettimeofday_1arg" >&5
10979 $as_echo "$pgac_cv_func_gettimeofday_1arg" >&6; }
10980 if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
10981
10982 $as_echo "#define GETTIMEOFDAY_1ARG 1" >>confdefs.h
10983
10984 fi
10985
10986
10987 # Some versions of libedit contain strlcpy(), setproctitle(), and other
10988 # symbols that that library has no business exposing to the world.  Pending
10989 # acquisition of a clue by those developers, ignore libedit (including its
10990 # possible alias of libreadline) while checking for everything else.
10991 LIBS_including_readline="$LIBS"
10992 LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
10993
10994 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
10995 do :
10996   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10997 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10998 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
10999   cat >>confdefs.h <<_ACEOF
11000 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11001 _ACEOF
11002
11003 fi
11004 done
11005
11006
11007 ac_fn_c_check_func "$LINENO" "fseeko" "ac_cv_func_fseeko"
11008 if test "x$ac_cv_func_fseeko" = xyes; then :
11009   $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
11010
11011 else
11012   case " $LIBOBJS " in
11013   *" fseeko.$ac_objext "* ) ;;
11014   *) LIBOBJS="$LIBOBJS fseeko.$ac_objext"
11015  ;;
11016 esac
11017
11018 fi
11019
11020
11021 case $host_os in
11022         # NetBSD uses a custom fseeko/ftello built on fsetpos/fgetpos
11023         # Mingw uses macros to access Win32 API calls
11024         netbsd*|mingw*)
11025
11026 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
11027
11028                 ac_cv_func_fseeko=yes;;
11029         *)
11030                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
11031 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
11032 if ${ac_cv_sys_largefile_source+:} false; then :
11033   $as_echo_n "(cached) " >&6
11034 else
11035   while :; do
11036   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11037 /* end confdefs.h.  */
11038 #include <sys/types.h> /* for off_t */
11039      #include <stdio.h>
11040 int
11041 main ()
11042 {
11043 int (*fp) (FILE *, off_t, int) = fseeko;
11044      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
11045   ;
11046   return 0;
11047 }
11048 _ACEOF
11049 if ac_fn_c_try_link "$LINENO"; then :
11050   ac_cv_sys_largefile_source=no; break
11051 fi
11052 rm -f core conftest.err conftest.$ac_objext \
11053     conftest$ac_exeext conftest.$ac_ext
11054   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11055 /* end confdefs.h.  */
11056 #define _LARGEFILE_SOURCE 1
11057 #include <sys/types.h> /* for off_t */
11058      #include <stdio.h>
11059 int
11060 main ()
11061 {
11062 int (*fp) (FILE *, off_t, int) = fseeko;
11063      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
11064   ;
11065   return 0;
11066 }
11067 _ACEOF
11068 if ac_fn_c_try_link "$LINENO"; then :
11069   ac_cv_sys_largefile_source=1; break
11070 fi
11071 rm -f core conftest.err conftest.$ac_objext \
11072     conftest$ac_exeext conftest.$ac_ext
11073   ac_cv_sys_largefile_source=unknown
11074   break
11075 done
11076 fi
11077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
11078 $as_echo "$ac_cv_sys_largefile_source" >&6; }
11079 case $ac_cv_sys_largefile_source in #(
11080   no | unknown) ;;
11081   *)
11082 cat >>confdefs.h <<_ACEOF
11083 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
11084 _ACEOF
11085 ;;
11086 esac
11087 rm -rf conftest*
11088
11089 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
11090 # in glibc 2.1.3, but that breaks too many other things.
11091 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
11092 if test $ac_cv_sys_largefile_source != unknown; then
11093
11094 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
11095
11096 fi
11097 ;;
11098 esac
11099
11100 # posix_fadvise() is a no-op on Solaris, so don't incur function overhead
11101 # by calling it, 2009-04-02
11102 # http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/posix_fadvise.c
11103 if test "$PORTNAME" != "solaris"; then
11104 for ac_func in posix_fadvise
11105 do :
11106   ac_fn_c_check_func "$LINENO" "posix_fadvise" "ac_cv_func_posix_fadvise"
11107 if test "x$ac_cv_func_posix_fadvise" = xyes; then :
11108   cat >>confdefs.h <<_ACEOF
11109 #define HAVE_POSIX_FADVISE 1
11110 _ACEOF
11111
11112 fi
11113 done
11114
11115 ac_fn_c_check_decl "$LINENO" "posix_fadvise" "ac_cv_have_decl_posix_fadvise" "#include <fcntl.h>
11116 "
11117 if test "x$ac_cv_have_decl_posix_fadvise" = xyes; then :
11118   ac_have_decl=1
11119 else
11120   ac_have_decl=0
11121 fi
11122
11123 cat >>confdefs.h <<_ACEOF
11124 #define HAVE_DECL_POSIX_FADVISE $ac_have_decl
11125 _ACEOF
11126
11127 fi
11128
11129 ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "#include <unistd.h>
11130 "
11131 if test "x$ac_cv_have_decl_fdatasync" = xyes; then :
11132   ac_have_decl=1
11133 else
11134   ac_have_decl=0
11135 fi
11136
11137 cat >>confdefs.h <<_ACEOF
11138 #define HAVE_DECL_FDATASYNC $ac_have_decl
11139 _ACEOF
11140
11141 ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
11142 if test "x$ac_cv_have_decl_strlcat" = xyes; then :
11143   ac_have_decl=1
11144 else
11145   ac_have_decl=0
11146 fi
11147
11148 cat >>confdefs.h <<_ACEOF
11149 #define HAVE_DECL_STRLCAT $ac_have_decl
11150 _ACEOF
11151 ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
11152 if test "x$ac_cv_have_decl_strlcpy" = xyes; then :
11153   ac_have_decl=1
11154 else
11155   ac_have_decl=0
11156 fi
11157
11158 cat >>confdefs.h <<_ACEOF
11159 #define HAVE_DECL_STRLCPY $ac_have_decl
11160 _ACEOF
11161
11162 # This is probably only present on Darwin, but may as well check always
11163 ac_fn_c_check_decl "$LINENO" "F_FULLFSYNC" "ac_cv_have_decl_F_FULLFSYNC" "#include <fcntl.h>
11164 "
11165 if test "x$ac_cv_have_decl_F_FULLFSYNC" = xyes; then :
11166   ac_have_decl=1
11167 else
11168   ac_have_decl=0
11169 fi
11170
11171 cat >>confdefs.h <<_ACEOF
11172 #define HAVE_DECL_F_FULLFSYNC $ac_have_decl
11173 _ACEOF
11174
11175
11176 HAVE_IPV6=no
11177 ac_fn_c_check_type "$LINENO" "struct sockaddr_in6" "ac_cv_type_struct_sockaddr_in6" "$ac_includes_default
11178 #include <netinet/in.h>
11179 "
11180 if test "x$ac_cv_type_struct_sockaddr_in6" = xyes; then :
11181
11182 $as_echo "#define HAVE_IPV6 1" >>confdefs.h
11183
11184          HAVE_IPV6=yes
11185 fi
11186
11187
11188
11189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PS_STRINGS" >&5
11190 $as_echo_n "checking for PS_STRINGS... " >&6; }
11191 if ${pgac_cv_var_PS_STRINGS+:} false; then :
11192   $as_echo_n "(cached) " >&6
11193 else
11194   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11195 /* end confdefs.h.  */
11196 #include <machine/vmparam.h>
11197 #include <sys/exec.h>
11198
11199 int
11200 main ()
11201 {
11202 PS_STRINGS->ps_nargvstr = 1;
11203 PS_STRINGS->ps_argvstr = "foo";
11204   ;
11205   return 0;
11206 }
11207 _ACEOF
11208 if ac_fn_c_try_link "$LINENO"; then :
11209   pgac_cv_var_PS_STRINGS=yes
11210 else
11211   pgac_cv_var_PS_STRINGS=no
11212 fi
11213 rm -f core conftest.err conftest.$ac_objext \
11214     conftest$ac_exeext conftest.$ac_ext
11215 fi
11216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_PS_STRINGS" >&5
11217 $as_echo "$pgac_cv_var_PS_STRINGS" >&6; }
11218 if test "$pgac_cv_var_PS_STRINGS" = yes ; then
11219
11220 $as_echo "#define HAVE_PS_STRINGS 1" >>confdefs.h
11221
11222 fi
11223
11224
11225 # We use our snprintf.c emulation if either snprintf() or vsnprintf()
11226 # is missing.  Yes, there are machines that have only one.  We may
11227 # also decide to use snprintf.c if snprintf() is present but does not
11228 # have all the features we need --- see below.
11229
11230 if test "$PORTNAME" = "win32"; then
11231   # Win32 gets snprintf.c built unconditionally.
11232   #
11233   # To properly translate all NLS languages strings, we must support the
11234   # *printf() %$ format, which allows *printf() arguments to be selected
11235   # by position in the translated string.
11236   #
11237   # libintl versions < 0.13 use the native *printf() functions, and Win32
11238   # *printf() doesn't understand %$, so we must use our /port versions,
11239   # which do understand %$. libintl versions >= 0.13 include their own
11240   # *printf versions on Win32.  The libintl 0.13 release note text is:
11241   #
11242   #   C format strings with positions, as they arise when a translator
11243   #   needs to reorder a sentence, are now supported on all platforms.
11244   #   On those few platforms (NetBSD and Woe32) for which the native
11245   #   printf()/fprintf()/... functions don't support such format
11246   #   strings, replacements are provided through <libintl.h>.
11247   #
11248   # We could use libintl >= 0.13's *printf() if we were sure that we had
11249   # a litint >= 0.13 at runtime, but seeing that there is no clean way
11250   # to guarantee that, it is best to just use our own, so we are sure to
11251   # get %$ support. In include/port.h we disable the *printf() macros
11252   # that might have been defined by libintl.
11253   #
11254   # We do this unconditionally whether NLS is used or not so we are sure
11255   # that all Win32 libraries and binaries behave the same.
11256   pgac_need_repl_snprintf=yes
11257 else
11258   pgac_need_repl_snprintf=no
11259   for ac_func in snprintf
11260 do :
11261   ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
11262 if test "x$ac_cv_func_snprintf" = xyes; then :
11263   cat >>confdefs.h <<_ACEOF
11264 #define HAVE_SNPRINTF 1
11265 _ACEOF
11266
11267 else
11268   pgac_need_repl_snprintf=yes
11269 fi
11270 done
11271
11272   for ac_func in vsnprintf
11273 do :
11274   ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
11275 if test "x$ac_cv_func_vsnprintf" = xyes; then :
11276   cat >>confdefs.h <<_ACEOF
11277 #define HAVE_VSNPRINTF 1
11278 _ACEOF
11279
11280 else
11281   pgac_need_repl_snprintf=yes
11282 fi
11283 done
11284
11285 fi
11286
11287
11288 # Check whether <stdio.h> declares snprintf() and vsnprintf(); if not,
11289 # include/c.h will provide declarations.  Note this is a separate test
11290 # from whether the functions exist in the C library --- there are
11291 # systems that have the functions but don't bother to declare them :-(
11292
11293 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
11294 if test "x$ac_cv_have_decl_snprintf" = xyes; then :
11295   ac_have_decl=1
11296 else
11297   ac_have_decl=0
11298 fi
11299
11300 cat >>confdefs.h <<_ACEOF
11301 #define HAVE_DECL_SNPRINTF $ac_have_decl
11302 _ACEOF
11303 ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
11304 if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
11305   ac_have_decl=1
11306 else
11307   ac_have_decl=0
11308 fi
11309
11310 cat >>confdefs.h <<_ACEOF
11311 #define HAVE_DECL_VSNPRINTF $ac_have_decl
11312 _ACEOF
11313
11314
11315
11316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for isinf" >&5
11317 $as_echo_n "checking for isinf... " >&6; }
11318 if ${ac_cv_func_isinf+:} false; then :
11319   $as_echo_n "(cached) " >&6
11320 else
11321   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11322 /* end confdefs.h.  */
11323
11324 #include <math.h>
11325 double glob_double;
11326
11327 int
11328 main ()
11329 {
11330 return isinf(glob_double) ? 0 : 1;
11331   ;
11332   return 0;
11333 }
11334 _ACEOF
11335 if ac_fn_c_try_link "$LINENO"; then :
11336   ac_cv_func_isinf=yes
11337 else
11338   ac_cv_func_isinf=no
11339 fi
11340 rm -f core conftest.err conftest.$ac_objext \
11341     conftest$ac_exeext conftest.$ac_ext
11342 fi
11343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_isinf" >&5
11344 $as_echo "$ac_cv_func_isinf" >&6; }
11345
11346 if test $ac_cv_func_isinf = yes ; then
11347
11348 $as_echo "#define HAVE_ISINF 1" >>confdefs.h
11349
11350 else
11351   case " $LIBOBJS " in
11352   *" isinf.$ac_objext "* ) ;;
11353   *) LIBOBJS="$LIBOBJS isinf.$ac_objext"
11354  ;;
11355 esac
11356
11357   # Look for a way to implement a substitute for isinf()
11358   for ac_func in fpclass fp_class fp_class_d class
11359 do :
11360   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11361 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11362 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11363   cat >>confdefs.h <<_ACEOF
11364 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11365 _ACEOF
11366  break
11367 fi
11368 done
11369
11370 fi
11371
11372 ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt"
11373 if test "x$ac_cv_func_crypt" = xyes; then :
11374   $as_echo "#define HAVE_CRYPT 1" >>confdefs.h
11375
11376 else
11377   case " $LIBOBJS " in
11378   *" crypt.$ac_objext "* ) ;;
11379   *) LIBOBJS="$LIBOBJS crypt.$ac_objext"
11380  ;;
11381 esac
11382
11383 fi
11384
11385 ac_fn_c_check_func "$LINENO" "fls" "ac_cv_func_fls"
11386 if test "x$ac_cv_func_fls" = xyes; then :
11387   $as_echo "#define HAVE_FLS 1" >>confdefs.h
11388
11389 else
11390   case " $LIBOBJS " in
11391   *" fls.$ac_objext "* ) ;;
11392   *) LIBOBJS="$LIBOBJS fls.$ac_objext"
11393  ;;
11394 esac
11395
11396 fi
11397
11398 ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt"
11399 if test "x$ac_cv_func_getopt" = xyes; then :
11400   $as_echo "#define HAVE_GETOPT 1" >>confdefs.h
11401
11402 else
11403   case " $LIBOBJS " in
11404   *" getopt.$ac_objext "* ) ;;
11405   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
11406  ;;
11407 esac
11408
11409 fi
11410
11411 ac_fn_c_check_func "$LINENO" "getrusage" "ac_cv_func_getrusage"
11412 if test "x$ac_cv_func_getrusage" = xyes; then :
11413   $as_echo "#define HAVE_GETRUSAGE 1" >>confdefs.h
11414
11415 else
11416   case " $LIBOBJS " in
11417   *" getrusage.$ac_objext "* ) ;;
11418   *) LIBOBJS="$LIBOBJS getrusage.$ac_objext"
11419  ;;
11420 esac
11421
11422 fi
11423
11424 ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
11425 if test "x$ac_cv_func_inet_aton" = xyes; then :
11426   $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
11427
11428 else
11429   case " $LIBOBJS " in
11430   *" inet_aton.$ac_objext "* ) ;;
11431   *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
11432  ;;
11433 esac
11434
11435 fi
11436
11437 ac_fn_c_check_func "$LINENO" "random" "ac_cv_func_random"
11438 if test "x$ac_cv_func_random" = xyes; then :
11439   $as_echo "#define HAVE_RANDOM 1" >>confdefs.h
11440
11441 else
11442   case " $LIBOBJS " in
11443   *" random.$ac_objext "* ) ;;
11444   *) LIBOBJS="$LIBOBJS random.$ac_objext"
11445  ;;
11446 esac
11447
11448 fi
11449
11450 ac_fn_c_check_func "$LINENO" "rint" "ac_cv_func_rint"
11451 if test "x$ac_cv_func_rint" = xyes; then :
11452   $as_echo "#define HAVE_RINT 1" >>confdefs.h
11453
11454 else
11455   case " $LIBOBJS " in
11456   *" rint.$ac_objext "* ) ;;
11457   *) LIBOBJS="$LIBOBJS rint.$ac_objext"
11458  ;;
11459 esac
11460
11461 fi
11462
11463 ac_fn_c_check_func "$LINENO" "srandom" "ac_cv_func_srandom"
11464 if test "x$ac_cv_func_srandom" = xyes; then :
11465   $as_echo "#define HAVE_SRANDOM 1" >>confdefs.h
11466
11467 else
11468   case " $LIBOBJS " in
11469   *" srandom.$ac_objext "* ) ;;
11470   *) LIBOBJS="$LIBOBJS srandom.$ac_objext"
11471  ;;
11472 esac
11473
11474 fi
11475
11476 ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror"
11477 if test "x$ac_cv_func_strerror" = xyes; then :
11478   $as_echo "#define HAVE_STRERROR 1" >>confdefs.h
11479
11480 else
11481   case " $LIBOBJS " in
11482   *" strerror.$ac_objext "* ) ;;
11483   *) LIBOBJS="$LIBOBJS strerror.$ac_objext"
11484  ;;
11485 esac
11486
11487 fi
11488
11489 ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
11490 if test "x$ac_cv_func_strlcat" = xyes; then :
11491   $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
11492
11493 else
11494   case " $LIBOBJS " in
11495   *" strlcat.$ac_objext "* ) ;;
11496   *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
11497  ;;
11498 esac
11499
11500 fi
11501
11502 ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
11503 if test "x$ac_cv_func_strlcpy" = xyes; then :
11504   $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
11505
11506 else
11507   case " $LIBOBJS " in
11508   *" strlcpy.$ac_objext "* ) ;;
11509   *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
11510  ;;
11511 esac
11512
11513 fi
11514
11515
11516
11517 case $host_os in
11518
11519         # Windows uses a specialised env handler
11520         # and doesn't need a replacement getpeereid because it doesn't use
11521         # Unix sockets.
11522         mingw*)
11523
11524 $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
11525
11526
11527 $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
11528
11529                 ac_cv_func_unsetenv=yes
11530                 ac_cv_func_getpeereid=yes;;
11531         *)
11532                 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
11533 if test "x$ac_cv_func_unsetenv" = xyes; then :
11534   $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
11535
11536 else
11537   case " $LIBOBJS " in
11538   *" unsetenv.$ac_objext "* ) ;;
11539   *) LIBOBJS="$LIBOBJS unsetenv.$ac_objext"
11540  ;;
11541 esac
11542
11543 fi
11544
11545 ac_fn_c_check_func "$LINENO" "getpeereid" "ac_cv_func_getpeereid"
11546 if test "x$ac_cv_func_getpeereid" = xyes; then :
11547   $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
11548
11549 else
11550   case " $LIBOBJS " in
11551   *" getpeereid.$ac_objext "* ) ;;
11552   *) LIBOBJS="$LIBOBJS getpeereid.$ac_objext"
11553  ;;
11554 esac
11555
11556 fi
11557
11558
11559                 ;;
11560 esac
11561
11562 # System's version of getaddrinfo(), if any, may be used only if we found
11563 # a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
11564 # (Note: the AC_REPLACE_FUNCS probe fails on Windows, where the available
11565 # versions of getaddrinfo don't follow normal C call protocol.  This is OK
11566 # because we want to use our own getaddrinfo.c on Windows anyway.)
11567 if test x"$ac_cv_type_struct_addrinfo" = xyes ; then
11568   ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo"
11569 if test "x$ac_cv_func_getaddrinfo" = xyes; then :
11570   $as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
11571
11572 else
11573   case " $LIBOBJS " in
11574   *" getaddrinfo.$ac_objext "* ) ;;
11575   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
11576  ;;
11577 esac
11578
11579 fi
11580
11581
11582 else
11583   case " $LIBOBJS " in
11584   *" getaddrinfo.$ac_objext "* ) ;;
11585   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
11586  ;;
11587 esac
11588
11589 fi
11590
11591 # Similarly, use system's getopt_long() only if system provides struct option.
11592 if test x"$ac_cv_type_struct_option" = xyes ; then
11593   ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long"
11594 if test "x$ac_cv_func_getopt_long" = xyes; then :
11595   $as_echo "#define HAVE_GETOPT_LONG 1" >>confdefs.h
11596
11597 else
11598   case " $LIBOBJS " in
11599   *" getopt_long.$ac_objext "* ) ;;
11600   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
11601  ;;
11602 esac
11603
11604 fi
11605
11606
11607 else
11608   case " $LIBOBJS " in
11609   *" getopt_long.$ac_objext "* ) ;;
11610   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
11611  ;;
11612 esac
11613
11614 fi
11615
11616 # Solaris' getopt() doesn't do what we want for long options, so always use
11617 # our version on that platform.
11618 if test "$PORTNAME" = "solaris"; then
11619   case " $LIBOBJS " in
11620   *" getopt.$ac_objext "* ) ;;
11621   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
11622  ;;
11623 esac
11624
11625 fi
11626
11627 # mingw has adopted a GNU-centric interpretation of optind/optreset,
11628 # so always use our version on Windows.
11629 if test "$PORTNAME" = "win32"; then
11630   case " $LIBOBJS " in
11631   *" getopt.$ac_objext "* ) ;;
11632   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
11633  ;;
11634 esac
11635
11636   case " $LIBOBJS " in
11637   *" getopt_long.$ac_objext "* ) ;;
11638   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
11639  ;;
11640 esac
11641
11642 fi
11643
11644 # Win32 support
11645 if test "$PORTNAME" = "win32"; then
11646   ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
11647 if test "x$ac_cv_func_gettimeofday" = xyes; then :
11648   $as_echo "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
11649
11650 else
11651   case " $LIBOBJS " in
11652   *" gettimeofday.$ac_objext "* ) ;;
11653   *) LIBOBJS="$LIBOBJS gettimeofday.$ac_objext"
11654  ;;
11655 esac
11656
11657 fi
11658
11659
11660   case " $LIBOBJS " in
11661   *" kill.$ac_objext "* ) ;;
11662   *) LIBOBJS="$LIBOBJS kill.$ac_objext"
11663  ;;
11664 esac
11665
11666   case " $LIBOBJS " in
11667   *" open.$ac_objext "* ) ;;
11668   *) LIBOBJS="$LIBOBJS open.$ac_objext"
11669  ;;
11670 esac
11671
11672   case " $LIBOBJS " in
11673   *" win32env.$ac_objext "* ) ;;
11674   *) LIBOBJS="$LIBOBJS win32env.$ac_objext"
11675  ;;
11676 esac
11677
11678   case " $LIBOBJS " in
11679   *" win32error.$ac_objext "* ) ;;
11680   *) LIBOBJS="$LIBOBJS win32error.$ac_objext"
11681  ;;
11682 esac
11683
11684   case " $LIBOBJS " in
11685   *" win32setlocale.$ac_objext "* ) ;;
11686   *) LIBOBJS="$LIBOBJS win32setlocale.$ac_objext"
11687  ;;
11688 esac
11689
11690
11691 $as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
11692
11693   ac_fn_c_check_type "$LINENO" "MINIDUMP_TYPE" "ac_cv_type_MINIDUMP_TYPE" "
11694 #define WIN32_LEAN_AND_MEAN
11695 #include <windows.h>
11696 #include <string.h>
11697 #include <dbghelp.h>
11698 "
11699 if test "x$ac_cv_type_MINIDUMP_TYPE" = xyes; then :
11700
11701 cat >>confdefs.h <<_ACEOF
11702 #define HAVE_MINIDUMP_TYPE 1
11703 _ACEOF
11704
11705 pgac_minidump_type=yes
11706 else
11707   pgac_minidump_type=no
11708 fi
11709
11710 fi
11711 if test x"$pgac_minidump_type" = x"yes" ; then
11712   have_win32_dbghelp=yes
11713
11714 else
11715   have_win32_dbghelp=no
11716
11717 fi
11718
11719 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
11720 $as_echo_n "checking for sigsetjmp... " >&6; }
11721 if ${pgac_cv_func_sigsetjmp+:} false; then :
11722   $as_echo_n "(cached) " >&6
11723 else
11724   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11725 /* end confdefs.h.  */
11726 #include <setjmp.h>
11727 int
11728 main ()
11729 {
11730 sigjmp_buf x; sigsetjmp(x, 1);
11731   ;
11732   return 0;
11733 }
11734 _ACEOF
11735 if ac_fn_c_try_link "$LINENO"; then :
11736   pgac_cv_func_sigsetjmp=yes
11737 else
11738   pgac_cv_func_sigsetjmp=no
11739 fi
11740 rm -f core conftest.err conftest.$ac_objext \
11741     conftest$ac_exeext conftest.$ac_ext
11742 fi
11743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_sigsetjmp" >&5
11744 $as_echo "$pgac_cv_func_sigsetjmp" >&6; }
11745 if test x"$pgac_cv_func_sigsetjmp" = x"yes"; then
11746
11747 $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
11748
11749 fi
11750
11751 ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "#include <signal.h>
11752 /* NetBSD declares sys_siglist in unistd.h.  */
11753 #ifdef HAVE_UNISTD_H
11754 # include <unistd.h>
11755 #endif
11756
11757 "
11758 if test "x$ac_cv_have_decl_sys_siglist" = xyes; then :
11759   ac_have_decl=1
11760 else
11761   ac_have_decl=0
11762 fi
11763
11764 cat >>confdefs.h <<_ACEOF
11765 #define HAVE_DECL_SYS_SIGLIST $ac_have_decl
11766 _ACEOF
11767
11768
11769
11770 ac_fn_c_check_func "$LINENO" "syslog" "ac_cv_func_syslog"
11771 if test "x$ac_cv_func_syslog" = xyes; then :
11772   ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default"
11773 if test "x$ac_cv_header_syslog_h" = xyes; then :
11774
11775 $as_echo "#define HAVE_SYSLOG 1" >>confdefs.h
11776
11777 fi
11778
11779
11780 fi
11781
11782
11783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opterr" >&5
11784 $as_echo_n "checking for opterr... " >&6; }
11785 if ${pgac_cv_var_int_opterr+:} false; then :
11786   $as_echo_n "(cached) " >&6
11787 else
11788   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11789 /* end confdefs.h.  */
11790 #include <unistd.h>
11791 int
11792 main ()
11793 {
11794 extern int opterr; opterr = 1;
11795   ;
11796   return 0;
11797 }
11798 _ACEOF
11799 if ac_fn_c_try_link "$LINENO"; then :
11800   pgac_cv_var_int_opterr=yes
11801 else
11802   pgac_cv_var_int_opterr=no
11803 fi
11804 rm -f core conftest.err conftest.$ac_objext \
11805     conftest$ac_exeext conftest.$ac_ext
11806 fi
11807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_opterr" >&5
11808 $as_echo "$pgac_cv_var_int_opterr" >&6; }
11809 if test x"$pgac_cv_var_int_opterr" = x"yes"; then
11810
11811 $as_echo "#define HAVE_INT_OPTERR 1" >>confdefs.h
11812
11813 fi
11814
11815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for optreset" >&5
11816 $as_echo_n "checking for optreset... " >&6; }
11817 if ${pgac_cv_var_int_optreset+:} false; then :
11818   $as_echo_n "(cached) " >&6
11819 else
11820   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11821 /* end confdefs.h.  */
11822 #include <unistd.h>
11823 int
11824 main ()
11825 {
11826 extern int optreset; optreset = 1;
11827   ;
11828   return 0;
11829 }
11830 _ACEOF
11831 if ac_fn_c_try_link "$LINENO"; then :
11832   pgac_cv_var_int_optreset=yes
11833 else
11834   pgac_cv_var_int_optreset=no
11835 fi
11836 rm -f core conftest.err conftest.$ac_objext \
11837     conftest$ac_exeext conftest.$ac_ext
11838 fi
11839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_optreset" >&5
11840 $as_echo "$pgac_cv_var_int_optreset" >&6; }
11841 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
11842
11843 $as_echo "#define HAVE_INT_OPTRESET 1" >>confdefs.h
11844
11845 fi
11846
11847 for ac_func in strtoll strtoq
11848 do :
11849   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11850 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11851 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11852   cat >>confdefs.h <<_ACEOF
11853 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11854 _ACEOF
11855  break
11856 fi
11857 done
11858
11859 for ac_func in strtoull strtouq
11860 do :
11861   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11862 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11863 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11864   cat >>confdefs.h <<_ACEOF
11865 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11866 _ACEOF
11867  break
11868 fi
11869 done
11870
11871
11872 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin locking functions" >&5
11873 $as_echo_n "checking for builtin locking functions... " >&6; }
11874 if ${pgac_cv_gcc_int_atomics+:} false; then :
11875   $as_echo_n "(cached) " >&6
11876 else
11877   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11878 /* end confdefs.h.  */
11879
11880 int
11881 main ()
11882 {
11883 int lock = 0;
11884    __sync_lock_test_and_set(&lock, 1);
11885    __sync_lock_release(&lock);
11886   ;
11887   return 0;
11888 }
11889 _ACEOF
11890 if ac_fn_c_try_link "$LINENO"; then :
11891   pgac_cv_gcc_int_atomics="yes"
11892 else
11893   pgac_cv_gcc_int_atomics="no"
11894 fi
11895 rm -f core conftest.err conftest.$ac_objext \
11896     conftest$ac_exeext conftest.$ac_ext
11897 fi
11898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_int_atomics" >&5
11899 $as_echo "$pgac_cv_gcc_int_atomics" >&6; }
11900 if test x"$pgac_cv_gcc_int_atomics" = x"yes"; then
11901
11902 $as_echo "#define HAVE_GCC_INT_ATOMICS 1" >>confdefs.h
11903
11904 fi
11905
11906 # Lastly, restore full LIBS list and check for readline/libedit symbols
11907 LIBS="$LIBS_including_readline"
11908
11909 if test "$with_readline" = yes; then
11910   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_append_character" >&5
11911 $as_echo_n "checking for rl_completion_append_character... " >&6; }
11912 if ${pgac_cv_var_rl_completion_append_character+:} false; then :
11913   $as_echo_n "(cached) " >&6
11914 else
11915   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11916 /* end confdefs.h.  */
11917 #include <stdio.h>
11918 #ifdef HAVE_READLINE_READLINE_H
11919 # include <readline/readline.h>
11920 #elif defined(HAVE_READLINE_H)
11921 # include <readline.h>
11922 #endif
11923
11924 int
11925 main ()
11926 {
11927 rl_completion_append_character = 'x';
11928   ;
11929   return 0;
11930 }
11931 _ACEOF
11932 if ac_fn_c_try_link "$LINENO"; then :
11933   pgac_cv_var_rl_completion_append_character=yes
11934 else
11935   pgac_cv_var_rl_completion_append_character=no
11936 fi
11937 rm -f core conftest.err conftest.$ac_objext \
11938     conftest$ac_exeext conftest.$ac_ext
11939 fi
11940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_completion_append_character" >&5
11941 $as_echo "$pgac_cv_var_rl_completion_append_character" >&6; }
11942 if test x"$pgac_cv_var_rl_completion_append_character" = x"yes"; then
11943
11944 $as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
11945
11946 fi
11947   for ac_func in rl_completion_matches rl_filename_completion_function
11948 do :
11949   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11950 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11951 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11952   cat >>confdefs.h <<_ACEOF
11953 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11954 _ACEOF
11955
11956 fi
11957 done
11958
11959   for ac_func in append_history history_truncate_file
11960 do :
11961   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11962 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11963 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11964   cat >>confdefs.h <<_ACEOF
11965 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11966 _ACEOF
11967
11968 fi
11969 done
11970
11971 fi
11972
11973
11974 #
11975 # Pthreads
11976 #
11977 # For each platform, we need to know about any special compile and link
11978 # libraries, and whether the normal C function names are thread-safe.
11979 # See the comment at the top of src/port/thread.c for more information.
11980 # WIN32 doesn't need the pthread tests;  it always uses threads
11981 if test "$enable_thread_safety" = yes -a "$PORTNAME" != "win32"; then
11982
11983
11984
11985 ac_ext=c
11986 ac_cpp='$CPP $CPPFLAGS'
11987 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11988 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11989 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11990
11991 acx_pthread_ok=no
11992
11993 # We used to check for pthread.h first, but this fails if pthread.h
11994 # requires special compiler flags (e.g. on True64 or Sequent).
11995 # It gets checked for in the link test anyway.
11996
11997 # First of all, check if the user has set any of the PTHREAD_LIBS,
11998 # etcetera environment variables, and if threads linking works using
11999 # them:
12000 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
12001         save_CFLAGS="$CFLAGS"
12002         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
12003         save_LIBS="$LIBS"
12004         LIBS="$PTHREAD_LIBS $LIBS"
12005         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
12006 $as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; }
12007         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12008 /* end confdefs.h.  */
12009
12010 /* Override any GCC internal prototype to avoid an error.
12011    Use char because int might match the return type of a GCC
12012    builtin and then its argument prototype would still apply.  */
12013 #ifdef __cplusplus
12014 extern "C"
12015 #endif
12016 char pthread_join ();
12017 int
12018 main ()
12019 {
12020 return pthread_join ();
12021   ;
12022   return 0;
12023 }
12024 _ACEOF
12025 if ac_fn_c_try_link "$LINENO"; then :
12026   acx_pthread_ok=yes
12027 fi
12028 rm -f core conftest.err conftest.$ac_objext \
12029     conftest$ac_exeext conftest.$ac_ext
12030         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_ok" >&5
12031 $as_echo "$acx_pthread_ok" >&6; }
12032         if test x"$acx_pthread_ok" = xno; then
12033                 PTHREAD_LIBS=""
12034                 PTHREAD_CFLAGS=""
12035         fi
12036         LIBS="$save_LIBS"
12037         CFLAGS="$save_CFLAGS"
12038 fi
12039
12040 # We must check for the threads library under a number of different
12041 # names; the ordering is very important because some systems
12042 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
12043 # libraries is broken (non-POSIX).
12044
12045 # Create a list of thread flags to try.  Items starting with a "-" are
12046 # C compiler flags, and other items are library names, except for "none"
12047 # which indicates that we try without any flags at all, and "pthread-config"
12048 # which is a program returning the flags for the Pth emulation library.
12049
12050 acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config pthreadGC2"
12051
12052 # The ordering *is* (sometimes) important.  Some notes on the
12053 # individual items follow:
12054
12055 # pthreads: AIX (must check this before -lpthread)
12056 # none: in case threads are in libc; should be tried before -Kthread and
12057 #       other compiler flags to prevent continual compiler warnings
12058 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
12059 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
12060 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
12061 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
12062 # -pthreads: Solaris/gcc
12063 # -mthreads: Mingw32/gcc, Lynx/gcc
12064 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
12065 #      doesn't hurt to check since this sometimes defines pthreads too;
12066 #      also defines -D_REENTRANT)
12067 # pthread: Linux, etcetera
12068 # --thread-safe: KAI C++
12069 # pthread-config: use pthread-config program (for GNU Pth library)
12070
12071 case "${host_cpu}-${host_os}" in
12072         *solaris*)
12073
12074         # On Solaris (at least, for some versions), libc contains stubbed
12075         # (non-functional) versions of the pthreads routines, so link-based
12076         # tests will erroneously succeed.  (We need to link with -pthread or
12077         # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
12078         # a function called by this macro, so we could check for that, but
12079         # who knows whether they'll stub that too in a future libc.)  So,
12080         # we'll just look for -pthreads and -lpthread first:
12081
12082         acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags"
12083         ;;
12084 esac
12085
12086 if test x"$acx_pthread_ok" = xno; then
12087 for flag in $acx_pthread_flags; do
12088
12089         tryPTHREAD_CFLAGS=""
12090         tryPTHREAD_LIBS=""
12091         case $flag in
12092                 none)
12093                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
12094 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
12095                 ;;
12096
12097                 -*)
12098                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5
12099 $as_echo_n "checking whether pthreads work with $flag... " >&6; }
12100                 tryPTHREAD_CFLAGS="$flag"
12101                 ;;
12102
12103                 pthread-config)
12104                 # skip this if we already have flags defined, for PostgreSQL
12105                 if test x"$PTHREAD_CFLAGS" != x -o x"$PTHREAD_LIBS" != x; then continue; fi
12106                 # Extract the first word of "pthread-config", so it can be a program name with args.
12107 set dummy pthread-config; ac_word=$2
12108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12109 $as_echo_n "checking for $ac_word... " >&6; }
12110 if ${ac_cv_prog_acx_pthread_config+:} false; then :
12111   $as_echo_n "(cached) " >&6
12112 else
12113   if test -n "$acx_pthread_config"; then
12114   ac_cv_prog_acx_pthread_config="$acx_pthread_config" # Let the user override the test.
12115 else
12116 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12117 for as_dir in $PATH
12118 do
12119   IFS=$as_save_IFS
12120   test -z "$as_dir" && as_dir=.
12121     for ac_exec_ext in '' $ac_executable_extensions; do
12122   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12123     ac_cv_prog_acx_pthread_config="yes"
12124     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12125     break 2
12126   fi
12127 done
12128   done
12129 IFS=$as_save_IFS
12130
12131   test -z "$ac_cv_prog_acx_pthread_config" && ac_cv_prog_acx_pthread_config="no"
12132 fi
12133 fi
12134 acx_pthread_config=$ac_cv_prog_acx_pthread_config
12135 if test -n "$acx_pthread_config"; then
12136   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_config" >&5
12137 $as_echo "$acx_pthread_config" >&6; }
12138 else
12139   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12140 $as_echo "no" >&6; }
12141 fi
12142
12143
12144                 if test x"$acx_pthread_config" = xno; then continue; fi
12145                 tryPTHREAD_CFLAGS="`pthread-config --cflags`"
12146                 tryPTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
12147                 ;;
12148
12149                 *)
12150                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5
12151 $as_echo_n "checking for the pthreads library -l$flag... " >&6; }
12152                 tryPTHREAD_LIBS="-l$flag"
12153                 ;;
12154         esac
12155
12156         save_LIBS="$LIBS"
12157         save_CFLAGS="$CFLAGS"
12158         LIBS="$tryPTHREAD_LIBS $PTHREAD_LIBS $LIBS"
12159         CFLAGS="$CFLAGS $PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
12160
12161         # Check for various functions.  We must include pthread.h,
12162         # since some functions may be macros.  (On the Sequent, we
12163         # need a special flag -Kthread to make this header compile.)
12164         # We check for pthread_join because it is in -lpthread on IRIX
12165         # while pthread_create is in libc.  We check for pthread_attr_init
12166         # due to DEC craziness with -lpthreads.  We check for
12167         # pthread_cleanup_push because it is one of the few pthread
12168         # functions on Solaris that doesn't have a non-functional libc stub.
12169         # We try pthread_create on general principles.
12170         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12171 /* end confdefs.h.  */
12172 #include <pthread.h>
12173 int
12174 main ()
12175 {
12176 pthread_t th; pthread_join(th, 0);
12177                      pthread_attr_init(0); pthread_cleanup_push(0, 0);
12178                      pthread_create(0,0,0,0); pthread_cleanup_pop(0);
12179   ;
12180   return 0;
12181 }
12182 _ACEOF
12183 if ac_fn_c_try_link "$LINENO"; then :
12184   acx_pthread_ok=yes
12185 else
12186   acx_pthread_ok=no
12187 fi
12188 rm -f core conftest.err conftest.$ac_objext \
12189     conftest$ac_exeext conftest.$ac_ext
12190
12191         if test "x$acx_pthread_ok" = xyes; then
12192             # Don't use options that are ignored by the compiler.
12193             # We find them by checking stderror.
12194             cat >conftest.$ac_ext <<_ACEOF
12195 int
12196 main (int argc, char **argv)
12197 {
12198   (void) argc;
12199   (void) argv;
12200   return 0;
12201 }
12202 _ACEOF
12203             rm -f conftest.$ac_objext conftest$ac_exeext
12204             # Check both linking and compiling, because they might tolerate different options.
12205             if test "`(eval $ac_link 2>&1 1>&5)`" = "" && test "`(eval $ac_compile 2>&1 1>&5)`" = ""; then
12206                 # we continue with more flags because Linux needs -lpthread
12207                 # for libpq builds on PostgreSQL.  The test above only
12208                 # tests for building binaries, not shared libraries.
12209                 PTHREAD_LIBS=" $tryPTHREAD_LIBS $PTHREAD_LIBS"
12210                 PTHREAD_CFLAGS="$PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
12211             else   acx_pthread_ok=no
12212             fi
12213         fi
12214
12215         LIBS="$save_LIBS"
12216         CFLAGS="$save_CFLAGS"
12217
12218         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_ok" >&5
12219 $as_echo "$acx_pthread_ok" >&6; }
12220 done
12221 fi
12222
12223 # Various other checks:
12224 if test "x$acx_pthread_ok" = xyes; then
12225         save_LIBS="$LIBS"
12226         LIBS="$PTHREAD_LIBS $LIBS"
12227         save_CFLAGS="$CFLAGS"
12228         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
12229
12230         # Detect AIX lossage: threads are created detached by default
12231         # and the JOINABLE attribute has a nonstandard name (UNDETACHED).
12232         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
12233 $as_echo_n "checking for joinable pthread attribute... " >&6; }
12234         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12235 /* end confdefs.h.  */
12236 #include <pthread.h>
12237 int
12238 main ()
12239 {
12240 int attr=PTHREAD_CREATE_JOINABLE;
12241   ;
12242   return 0;
12243 }
12244 _ACEOF
12245 if ac_fn_c_try_link "$LINENO"; then :
12246   ok=PTHREAD_CREATE_JOINABLE
12247 else
12248   ok=unknown
12249 fi
12250 rm -f core conftest.err conftest.$ac_objext \
12251     conftest$ac_exeext conftest.$ac_ext
12252         if test x"$ok" = xunknown; then
12253                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12254 /* end confdefs.h.  */
12255 #include <pthread.h>
12256 int
12257 main ()
12258 {
12259 int attr=PTHREAD_CREATE_UNDETACHED;
12260   ;
12261   return 0;
12262 }
12263 _ACEOF
12264 if ac_fn_c_try_link "$LINENO"; then :
12265   ok=PTHREAD_CREATE_UNDETACHED
12266 else
12267   ok=unknown
12268 fi
12269 rm -f core conftest.err conftest.$ac_objext \
12270     conftest$ac_exeext conftest.$ac_ext
12271         fi
12272         if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then
12273
12274 $as_echo "#define PTHREAD_CREATE_JOINABLE \$ok" >>confdefs.h
12275
12276         fi
12277         { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ok}" >&5
12278 $as_echo "${ok}" >&6; }
12279         if test x"$ok" = xunknown; then
12280                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: we do not know how to create joinable pthreads" >&5
12281 $as_echo "$as_me: WARNING: we do not know how to create joinable pthreads" >&2;}
12282         fi
12283
12284         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5
12285 $as_echo_n "checking if more special flags are required for pthreads... " >&6; }
12286         flag=no
12287 # We always add these in PostgreSQL
12288 #       case "${host_cpu}-${host_os}" in
12289 #               *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
12290 #               *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
12291 #       esac
12292         { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${flag}" >&5
12293 $as_echo "${flag}" >&6; }
12294         if test "x$flag" != xno; then
12295                 PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
12296         fi
12297
12298         LIBS="$save_LIBS"
12299         CFLAGS="$save_CFLAGS"
12300
12301 # Supporting cc_r would require a special CC in all places that
12302 # use libpq, and that is ugly, so we don't do it.  Users can still
12303 # define their compiler as cc_r to do thread builds of everything.
12304         # More AIX lossage: must compile with cc_r
12305         # Extract the first word of "cc_r", so it can be a program name with args.
12306 set dummy cc_r; ac_word=$2
12307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12308 $as_echo_n "checking for $ac_word... " >&6; }
12309 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
12310   $as_echo_n "(cached) " >&6
12311 else
12312   if test -n "$PTHREAD_CC"; then
12313   ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
12314 else
12315 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12316 for as_dir in $PATH
12317 do
12318   IFS=$as_save_IFS
12319   test -z "$as_dir" && as_dir=.
12320     for ac_exec_ext in '' $ac_executable_extensions; do
12321   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12322     ac_cv_prog_PTHREAD_CC="cc_r"
12323     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12324     break 2
12325   fi
12326 done
12327   done
12328 IFS=$as_save_IFS
12329
12330   test -z "$ac_cv_prog_PTHREAD_CC" && ac_cv_prog_PTHREAD_CC="${CC}"
12331 fi
12332 fi
12333 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
12334 if test -n "$PTHREAD_CC"; then
12335   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
12336 $as_echo "$PTHREAD_CC" >&6; }
12337 else
12338   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12339 $as_echo "no" >&6; }
12340 fi
12341
12342
12343 else
12344         PTHREAD_CC="$CC"
12345 fi
12346
12347
12348
12349
12350
12351 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
12352 if test x"$acx_pthread_ok" = xyes; then
12353
12354 $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
12355
12356         :
12357 else
12358         acx_pthread_ok=no
12359
12360 fi
12361 ac_ext=c
12362 ac_cpp='$CPP $CPPFLAGS'
12363 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12364 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12365 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12366
12367         # set thread flags
12368
12369 # Some platforms use these, so just define them.  They can't hurt if they
12370 # are not supported.  For example, on Solaris -D_POSIX_PTHREAD_SEMANTICS
12371 # enables 5-arg getpwuid_r, among other things.
12372 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
12373
12374
12375 # At this point, we don't want to muck with the compiler name for threading.
12376 # Let's see who fails, perhaps AIX.  2004-04-23
12377 if test "$PTHREAD_CC" != "$CC"; then
12378 as_fn_error $? "
12379 PostgreSQL does not support platforms that require a special compiler
12380 for thread safety;  use --disable-thread-safety to disable thread safety." "$LINENO" 5
12381 fi
12382
12383 # Check for *_r functions
12384 _CFLAGS="$CFLAGS"
12385 _LIBS="$LIBS"
12386 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
12387 LIBS="$LIBS $PTHREAD_LIBS"
12388
12389 if test "$PORTNAME" != "win32"; then
12390 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
12391 if test "x$ac_cv_header_pthread_h" = xyes; then :
12392
12393 else
12394   as_fn_error $? "
12395 pthread.h not found;  use --disable-thread-safety to disable thread safety" "$LINENO" 5
12396 fi
12397
12398
12399 fi
12400
12401 for ac_func in strerror_r getpwuid_r gethostbyname_r
12402 do :
12403   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12404 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12405 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12406   cat >>confdefs.h <<_ACEOF
12407 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12408 _ACEOF
12409
12410 fi
12411 done
12412
12413
12414 # Do test here with the proper thread flags
12415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getpwuid_r takes a fifth argument" >&5
12416 $as_echo_n "checking whether getpwuid_r takes a fifth argument... " >&6; }
12417 if ${pgac_cv_func_getpwuid_r_5arg+:} false; then :
12418   $as_echo_n "(cached) " >&6
12419 else
12420   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12421 /* end confdefs.h.  */
12422 #include <sys/types.h>
12423 #include <pwd.h>
12424 int
12425 main ()
12426 {
12427 uid_t uid;
12428 struct passwd *space;
12429 char *buf;
12430 size_t bufsize;
12431 struct passwd **result;
12432 getpwuid_r(uid, space, buf, bufsize, result);
12433   ;
12434   return 0;
12435 }
12436 _ACEOF
12437 if ac_fn_c_try_compile "$LINENO"; then :
12438   pgac_cv_func_getpwuid_r_5arg=yes
12439 else
12440   pgac_cv_func_getpwuid_r_5arg=no
12441 fi
12442 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12443 fi
12444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_getpwuid_r_5arg" >&5
12445 $as_echo "$pgac_cv_func_getpwuid_r_5arg" >&6; }
12446 if test x"$pgac_cv_func_getpwuid_r_5arg" = xyes ; then
12447
12448 $as_echo "#define GETPWUID_R_5ARG 1" >>confdefs.h
12449
12450 fi
12451
12452 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns int" >&5
12453 $as_echo_n "checking whether strerror_r returns int... " >&6; }
12454 if ${pgac_cv_func_strerror_r_int+:} false; then :
12455   $as_echo_n "(cached) " >&6
12456 else
12457   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12458 /* end confdefs.h.  */
12459 #include <string.h>
12460 int
12461 main ()
12462 {
12463 #ifndef _AIX
12464 int strerror_r(int, char *, size_t);
12465 #else
12466 /* Older AIX has 'int' for the third argument so we don't test the args. */
12467 int strerror_r();
12468 #endif
12469   ;
12470   return 0;
12471 }
12472 _ACEOF
12473 if ac_fn_c_try_compile "$LINENO"; then :
12474   pgac_cv_func_strerror_r_int=yes
12475 else
12476   pgac_cv_func_strerror_r_int=no
12477 fi
12478 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12479 fi
12480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_strerror_r_int" >&5
12481 $as_echo "$pgac_cv_func_strerror_r_int" >&6; }
12482 if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
12483
12484 $as_echo "#define STRERROR_R_INT 1" >>confdefs.h
12485
12486 fi
12487
12488
12489 CFLAGS="$_CFLAGS"
12490 LIBS="$_LIBS"
12491
12492 else
12493 # do not use values from template file
12494 PTHREAD_CFLAGS=
12495 PTHREAD_LIBS=
12496 fi
12497
12498
12499
12500
12501
12502 # We can test for libldap_r only after we know PTHREAD_LIBS
12503 if test "$with_ldap" = yes ; then
12504   _LIBS="$LIBS"
12505   if test "$PORTNAME" != "win32"; then
12506     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap" >&5
12507 $as_echo_n "checking for ldap_bind in -lldap... " >&6; }
12508 if ${ac_cv_lib_ldap_ldap_bind+:} false; then :
12509   $as_echo_n "(cached) " >&6
12510 else
12511   ac_check_lib_save_LIBS=$LIBS
12512 LIBS="-lldap $EXTRA_LDAP_LIBS $LIBS"
12513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12514 /* end confdefs.h.  */
12515
12516 /* Override any GCC internal prototype to avoid an error.
12517    Use char because int might match the return type of a GCC
12518    builtin and then its argument prototype would still apply.  */
12519 #ifdef __cplusplus
12520 extern "C"
12521 #endif
12522 char ldap_bind ();
12523 int
12524 main ()
12525 {
12526 return ldap_bind ();
12527   ;
12528   return 0;
12529 }
12530 _ACEOF
12531 if ac_fn_c_try_link "$LINENO"; then :
12532   ac_cv_lib_ldap_ldap_bind=yes
12533 else
12534   ac_cv_lib_ldap_ldap_bind=no
12535 fi
12536 rm -f core conftest.err conftest.$ac_objext \
12537     conftest$ac_exeext conftest.$ac_ext
12538 LIBS=$ac_check_lib_save_LIBS
12539 fi
12540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_ldap_bind" >&5
12541 $as_echo "$ac_cv_lib_ldap_ldap_bind" >&6; }
12542 if test "x$ac_cv_lib_ldap_ldap_bind" = xyes; then :
12543   cat >>confdefs.h <<_ACEOF
12544 #define HAVE_LIBLDAP 1
12545 _ACEOF
12546
12547   LIBS="-lldap $LIBS"
12548
12549 else
12550   as_fn_error $? "library 'ldap' is required for LDAP" "$LINENO" 5
12551 fi
12552
12553     LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
12554     if test "$enable_thread_safety" = yes; then
12555       # on some platforms ldap_r fails to link without PTHREAD_LIBS
12556       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_simple_bind in -lldap_r" >&5
12557 $as_echo_n "checking for ldap_simple_bind in -lldap_r... " >&6; }
12558 if ${ac_cv_lib_ldap_r_ldap_simple_bind+:} false; then :
12559   $as_echo_n "(cached) " >&6
12560 else
12561   ac_check_lib_save_LIBS=$LIBS
12562 LIBS="-lldap_r $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
12563 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12564 /* end confdefs.h.  */
12565
12566 /* Override any GCC internal prototype to avoid an error.
12567    Use char because int might match the return type of a GCC
12568    builtin and then its argument prototype would still apply.  */
12569 #ifdef __cplusplus
12570 extern "C"
12571 #endif
12572 char ldap_simple_bind ();
12573 int
12574 main ()
12575 {
12576 return ldap_simple_bind ();
12577   ;
12578   return 0;
12579 }
12580 _ACEOF
12581 if ac_fn_c_try_link "$LINENO"; then :
12582   ac_cv_lib_ldap_r_ldap_simple_bind=yes
12583 else
12584   ac_cv_lib_ldap_r_ldap_simple_bind=no
12585 fi
12586 rm -f core conftest.err conftest.$ac_objext \
12587     conftest$ac_exeext conftest.$ac_ext
12588 LIBS=$ac_check_lib_save_LIBS
12589 fi
12590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_r_ldap_simple_bind" >&5
12591 $as_echo "$ac_cv_lib_ldap_r_ldap_simple_bind" >&6; }
12592 if test "x$ac_cv_lib_ldap_r_ldap_simple_bind" = xyes; then :
12593   cat >>confdefs.h <<_ACEOF
12594 #define HAVE_LIBLDAP_R 1
12595 _ACEOF
12596
12597   LIBS="-lldap_r $LIBS"
12598
12599 else
12600   as_fn_error $? "library 'ldap_r' is required for LDAP" "$LINENO" 5
12601 fi
12602
12603       LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
12604     else
12605       LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
12606     fi
12607   else
12608     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lwldap32" >&5
12609 $as_echo_n "checking for ldap_bind in -lwldap32... " >&6; }
12610 if ${ac_cv_lib_wldap32_ldap_bind+:} false; then :
12611   $as_echo_n "(cached) " >&6
12612 else
12613   ac_check_lib_save_LIBS=$LIBS
12614 LIBS="-lwldap32  $LIBS"
12615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12616 /* end confdefs.h.  */
12617
12618 /* Override any GCC internal prototype to avoid an error.
12619    Use char because int might match the return type of a GCC
12620    builtin and then its argument prototype would still apply.  */
12621 #ifdef __cplusplus
12622 extern "C"
12623 #endif
12624 char ldap_bind ();
12625 int
12626 main ()
12627 {
12628 return ldap_bind ();
12629   ;
12630   return 0;
12631 }
12632 _ACEOF
12633 if ac_fn_c_try_link "$LINENO"; then :
12634   ac_cv_lib_wldap32_ldap_bind=yes
12635 else
12636   ac_cv_lib_wldap32_ldap_bind=no
12637 fi
12638 rm -f core conftest.err conftest.$ac_objext \
12639     conftest$ac_exeext conftest.$ac_ext
12640 LIBS=$ac_check_lib_save_LIBS
12641 fi
12642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wldap32_ldap_bind" >&5
12643 $as_echo "$ac_cv_lib_wldap32_ldap_bind" >&6; }
12644 if test "x$ac_cv_lib_wldap32_ldap_bind" = xyes; then :
12645   cat >>confdefs.h <<_ACEOF
12646 #define HAVE_LIBWLDAP32 1
12647 _ACEOF
12648
12649   LIBS="-lwldap32 $LIBS"
12650
12651 else
12652   as_fn_error $? "library 'wldap32' is required for LDAP" "$LINENO" 5
12653 fi
12654
12655     LDAP_LIBS_FE="-lwldap32"
12656     LDAP_LIBS_BE="-lwldap32"
12657   fi
12658   LIBS="$_LIBS"
12659 fi
12660
12661
12662
12663
12664 # This test makes sure that run tests work at all.  Sometimes a shared
12665 # library is found by the linker, but the runtime linker can't find it.
12666 # This check should come after all modifications of compiler or linker
12667 # variables, and before any other run tests.
12668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking test program" >&5
12669 $as_echo_n "checking test program... " >&6; }
12670 if test "$cross_compiling" = yes; then :
12671   { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling" >&5
12672 $as_echo "cross-compiling" >&6; }
12673 else
12674   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12675 /* end confdefs.h.  */
12676 int main() { return 0; }
12677 _ACEOF
12678 if ac_fn_c_try_run "$LINENO"; then :
12679   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
12680 $as_echo "ok" >&6; }
12681 else
12682   { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
12683 $as_echo "failed" >&6; }
12684 as_fn_error $? "
12685 Could not execute a simple test program.  This may be a problem
12686 related to locating shared libraries.  Check the file 'config.log'
12687 for the exact reason." "$LINENO" 5
12688 fi
12689 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12690   conftest.$ac_objext conftest.beam conftest.$ac_ext
12691 fi
12692
12693
12694 # --------------------
12695 # Run tests below here
12696 # --------------------
12697
12698 # Force use of our snprintf if system's doesn't do arg control
12699 # See comment above at snprintf test for details.
12700 if test "$enable_nls" = yes -a "$pgac_need_repl_snprintf" = no; then
12701   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf supports argument control" >&5
12702 $as_echo_n "checking whether snprintf supports argument control... " >&6; }
12703 if ${pgac_cv_snprintf_arg_control+:} false; then :
12704   $as_echo_n "(cached) " >&6
12705 else
12706   if test "$cross_compiling" = yes; then :
12707   pgac_cv_snprintf_arg_control=cross
12708 else
12709   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12710 /* end confdefs.h.  */
12711 #include <stdio.h>
12712 #include <string.h>
12713
12714 int main()
12715 {
12716   char buf[100];
12717
12718   /* can it swap arguments? */
12719   snprintf(buf, 100, "%2\$d %1\$d", 3, 4);
12720   if (strcmp(buf, "4 3") != 0)
12721     return 1;
12722   return 0;
12723 }
12724 _ACEOF
12725 if ac_fn_c_try_run "$LINENO"; then :
12726   pgac_cv_snprintf_arg_control=yes
12727 else
12728   pgac_cv_snprintf_arg_control=no
12729 fi
12730 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12731   conftest.$ac_objext conftest.beam conftest.$ac_ext
12732 fi
12733
12734
12735 fi
12736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_arg_control" >&5
12737 $as_echo "$pgac_cv_snprintf_arg_control" >&6; }
12738
12739   if test $pgac_cv_snprintf_arg_control != yes ; then
12740     pgac_need_repl_snprintf=yes
12741   fi
12742 fi
12743
12744
12745
12746
12747 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long int is 64 bits" >&5
12748 $as_echo_n "checking whether long int is 64 bits... " >&6; }
12749 if ${pgac_cv_type_long_int_64+:} false; then :
12750   $as_echo_n "(cached) " >&6
12751 else
12752   if test "$cross_compiling" = yes; then :
12753   # If cross-compiling, check the size reported by the compiler and
12754 # trust that the arithmetic works.
12755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12756 /* end confdefs.h.  */
12757
12758 int
12759 main ()
12760 {
12761 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
12762 test_array [0] = 0;
12763 return test_array [0];
12764
12765   ;
12766   return 0;
12767 }
12768 _ACEOF
12769 if ac_fn_c_try_compile "$LINENO"; then :
12770   pgac_cv_type_long_int_64=yes
12771 else
12772   pgac_cv_type_long_int_64=no
12773 fi
12774 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12775 else
12776   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12777 /* end confdefs.h.  */
12778 typedef long int ac_int64;
12779
12780 /*
12781  * These are globals to discourage the compiler from folding all the
12782  * arithmetic tests down to compile-time constants.
12783  */
12784 ac_int64 a = 20000001;
12785 ac_int64 b = 40000005;
12786
12787 int does_int64_work()
12788 {
12789   ac_int64 c,d;
12790
12791   if (sizeof(ac_int64) != 8)
12792     return 0;                   /* definitely not the right size */
12793
12794   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
12795   c = a * b;
12796   d = (c + b) / b;
12797   if (d != a+1)
12798     return 0;
12799   return 1;
12800 }
12801 main() {
12802   exit(! does_int64_work());
12803 }
12804 _ACEOF
12805 if ac_fn_c_try_run "$LINENO"; then :
12806   pgac_cv_type_long_int_64=yes
12807 else
12808   pgac_cv_type_long_int_64=no
12809 fi
12810 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12811   conftest.$ac_objext conftest.beam conftest.$ac_ext
12812 fi
12813
12814 fi
12815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_int_64" >&5
12816 $as_echo "$pgac_cv_type_long_int_64" >&6; }
12817
12818 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
12819 if test x"$pgac_cv_type_long_int_64" = xyes ; then
12820
12821 $as_echo "#define HAVE_LONG_INT_64 1" >>confdefs.h
12822
12823 fi
12824
12825
12826 if test x"$HAVE_LONG_INT_64" = x"yes" ; then
12827   pg_int64_type="long int"
12828 else
12829   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long long int is 64 bits" >&5
12830 $as_echo_n "checking whether long long int is 64 bits... " >&6; }
12831 if ${pgac_cv_type_long_long_int_64+:} false; then :
12832   $as_echo_n "(cached) " >&6
12833 else
12834   if test "$cross_compiling" = yes; then :
12835   # If cross-compiling, check the size reported by the compiler and
12836 # trust that the arithmetic works.
12837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12838 /* end confdefs.h.  */
12839
12840 int
12841 main ()
12842 {
12843 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
12844 test_array [0] = 0;
12845 return test_array [0];
12846
12847   ;
12848   return 0;
12849 }
12850 _ACEOF
12851 if ac_fn_c_try_compile "$LINENO"; then :
12852   pgac_cv_type_long_long_int_64=yes
12853 else
12854   pgac_cv_type_long_long_int_64=no
12855 fi
12856 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12857 else
12858   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12859 /* end confdefs.h.  */
12860 typedef long long int ac_int64;
12861
12862 /*
12863  * These are globals to discourage the compiler from folding all the
12864  * arithmetic tests down to compile-time constants.
12865  */
12866 ac_int64 a = 20000001;
12867 ac_int64 b = 40000005;
12868
12869 int does_int64_work()
12870 {
12871   ac_int64 c,d;
12872
12873   if (sizeof(ac_int64) != 8)
12874     return 0;                   /* definitely not the right size */
12875
12876   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
12877   c = a * b;
12878   d = (c + b) / b;
12879   if (d != a+1)
12880     return 0;
12881   return 1;
12882 }
12883 main() {
12884   exit(! does_int64_work());
12885 }
12886 _ACEOF
12887 if ac_fn_c_try_run "$LINENO"; then :
12888   pgac_cv_type_long_long_int_64=yes
12889 else
12890   pgac_cv_type_long_long_int_64=no
12891 fi
12892 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12893   conftest.$ac_objext conftest.beam conftest.$ac_ext
12894 fi
12895
12896 fi
12897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_long_int_64" >&5
12898 $as_echo "$pgac_cv_type_long_long_int_64" >&6; }
12899
12900 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
12901 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
12902
12903 $as_echo "#define HAVE_LONG_LONG_INT_64 1" >>confdefs.h
12904
12905 fi
12906
12907   if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
12908     pg_int64_type="long long int"
12909   else
12910     as_fn_error $? "Cannot find a working 64-bit integer type." "$LINENO" 5
12911   fi
12912 fi
12913
12914
12915 cat >>confdefs.h <<_ACEOF
12916 #define PG_INT64_TYPE $pg_int64_type
12917 _ACEOF
12918
12919
12920
12921 if test x"$HAVE_LONG_LONG_INT_64" = xyes ; then
12922   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12923 /* end confdefs.h.  */
12924
12925 #define INT64CONST(x)  x##LL
12926 long long int foo = INT64CONST(0x1234567890123456);
12927
12928 int
12929 main ()
12930 {
12931
12932   ;
12933   return 0;
12934 }
12935 _ACEOF
12936 if ac_fn_c_try_compile "$LINENO"; then :
12937
12938 $as_echo "#define HAVE_LL_CONSTANTS 1" >>confdefs.h
12939
12940 fi
12941 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12942 fi
12943
12944
12945 # If we found "long int" is 64 bits, assume snprintf handles it.  If
12946 # we found we need to use "long long int", better check.  We cope with
12947 # snprintfs that use %lld, %qd, or %I64d as the format.  If none of these
12948 # work, fall back to our own snprintf emulation (which we know uses %lld).
12949
12950 if test "$HAVE_LONG_LONG_INT_64" = yes ; then
12951   if test $pgac_need_repl_snprintf = no; then
12952     { $as_echo "$as_me:${as_lineno-$LINENO}: checking snprintf format for long long int" >&5
12953 $as_echo_n "checking snprintf format for long long int... " >&6; }
12954 if ${pgac_cv_snprintf_long_long_int_format+:} false; then :
12955   $as_echo_n "(cached) " >&6
12956 else
12957   for pgac_format in '%lld' '%qd' '%I64d'; do
12958 if test "$cross_compiling" = yes; then :
12959   pgac_cv_snprintf_long_long_int_format=cross; break
12960 else
12961   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12962 /* end confdefs.h.  */
12963 #include <stdio.h>
12964 typedef long long int ac_int64;
12965 #define INT64_FORMAT "$pgac_format"
12966
12967 ac_int64 a = 20000001;
12968 ac_int64 b = 40000005;
12969
12970 int does_int64_snprintf_work()
12971 {
12972   ac_int64 c;
12973   char buf[100];
12974
12975   if (sizeof(ac_int64) != 8)
12976     return 0;                   /* doesn't look like the right size */
12977
12978   c = a * b;
12979   snprintf(buf, 100, INT64_FORMAT, c);
12980   if (strcmp(buf, "800000140000005") != 0)
12981     return 0;                   /* either multiply or snprintf is busted */
12982   return 1;
12983 }
12984 main() {
12985   exit(! does_int64_snprintf_work());
12986 }
12987 _ACEOF
12988 if ac_fn_c_try_run "$LINENO"; then :
12989   pgac_cv_snprintf_long_long_int_format=$pgac_format; break
12990 fi
12991 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12992   conftest.$ac_objext conftest.beam conftest.$ac_ext
12993 fi
12994
12995 done
12996 fi
12997
12998 LONG_LONG_INT_FORMAT=''
12999
13000 case $pgac_cv_snprintf_long_long_int_format in
13001   cross) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot test (not on host machine)" >&5
13002 $as_echo "cannot test (not on host machine)" >&6; };;
13003   ?*)    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_long_long_int_format" >&5
13004 $as_echo "$pgac_cv_snprintf_long_long_int_format" >&6; }
13005          LONG_LONG_INT_FORMAT=$pgac_cv_snprintf_long_long_int_format;;
13006   *)     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13007 $as_echo "none" >&6; };;
13008 esac
13009     if test "$LONG_LONG_INT_FORMAT" = ""; then
13010       # Force usage of our own snprintf, since system snprintf is broken
13011       pgac_need_repl_snprintf=yes
13012       LONG_LONG_INT_FORMAT='%lld'
13013     fi
13014   else
13015     # Here if we previously decided we needed to use our own snprintf
13016     LONG_LONG_INT_FORMAT='%lld'
13017   fi
13018   LONG_LONG_UINT_FORMAT=`echo "$LONG_LONG_INT_FORMAT" | sed 's/d$/u/'`
13019   INT64_FORMAT="\"$LONG_LONG_INT_FORMAT\""
13020   UINT64_FORMAT="\"$LONG_LONG_UINT_FORMAT\""
13021 else
13022   # Here if we are not using 'long long int' at all
13023   INT64_FORMAT='"%ld"'
13024   UINT64_FORMAT='"%lu"'
13025 fi
13026
13027
13028 cat >>confdefs.h <<_ACEOF
13029 #define INT64_FORMAT $INT64_FORMAT
13030 _ACEOF
13031
13032
13033
13034 cat >>confdefs.h <<_ACEOF
13035 #define UINT64_FORMAT $UINT64_FORMAT
13036 _ACEOF
13037
13038
13039 # Also force use of our snprintf if the system's doesn't support the %z flag.
13040 if test "$pgac_need_repl_snprintf" = no; then
13041   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf supports the %z modifier" >&5
13042 $as_echo_n "checking whether snprintf supports the %z modifier... " >&6; }
13043 if ${pgac_cv_snprintf_size_t_support+:} false; then :
13044   $as_echo_n "(cached) " >&6
13045 else
13046   if test "$cross_compiling" = yes; then :
13047   pgac_cv_snprintf_size_t_support=cross
13048 else
13049   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13050 /* end confdefs.h.  */
13051 #include <stdio.h>
13052 #include <string.h>
13053
13054 int main()
13055 {
13056   char bufz[100];
13057   char buf64[100];
13058
13059   /*
13060    * Print the largest unsigned number fitting in a size_t using both %zu
13061    * and the previously-determined format for 64-bit integers.  Note that
13062    * we don't run this code unless we know snprintf handles 64-bit ints.
13063    */
13064   bufz[0] = '\0';  /* in case snprintf fails to emit anything */
13065   snprintf(bufz, sizeof(bufz), "%zu", ~((size_t) 0));
13066   snprintf(buf64, sizeof(buf64), UINT64_FORMAT, (PG_INT64_TYPE) ~((size_t) 0));
13067   if (strcmp(bufz, buf64) != 0)
13068     return 1;
13069   return 0;
13070 }
13071 _ACEOF
13072 if ac_fn_c_try_run "$LINENO"; then :
13073   pgac_cv_snprintf_size_t_support=yes
13074 else
13075   pgac_cv_snprintf_size_t_support=no
13076 fi
13077 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13078   conftest.$ac_objext conftest.beam conftest.$ac_ext
13079 fi
13080
13081
13082 fi
13083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_size_t_support" >&5
13084 $as_echo "$pgac_cv_snprintf_size_t_support" >&6; }
13085
13086   if test "$pgac_cv_snprintf_size_t_support" != yes; then
13087     pgac_need_repl_snprintf=yes
13088   fi
13089 fi
13090
13091 # Now we have checked all the reasons to replace snprintf
13092 if test $pgac_need_repl_snprintf = yes; then
13093
13094 $as_echo "#define USE_REPL_SNPRINTF 1" >>confdefs.h
13095
13096   case " $LIBOBJS " in
13097   *" snprintf.$ac_objext "* ) ;;
13098   *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
13099  ;;
13100 esac
13101
13102 fi
13103
13104 # Check size of void *, size_t (enables tweaks for > 32bit address space)
13105 # The cast to long int works around a bug in the HP C Compiler
13106 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13107 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13108 # This bug is HP SR number 8606223364.
13109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
13110 $as_echo_n "checking size of void *... " >&6; }
13111 if ${ac_cv_sizeof_void_p+:} false; then :
13112   $as_echo_n "(cached) " >&6
13113 else
13114   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p"        "$ac_includes_default"; then :
13115
13116 else
13117   if test "$ac_cv_type_void_p" = yes; then
13118      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13119 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13120 as_fn_error 77 "cannot compute sizeof (void *)
13121 See \`config.log' for more details" "$LINENO" 5; }
13122    else
13123      ac_cv_sizeof_void_p=0
13124    fi
13125 fi
13126
13127 fi
13128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
13129 $as_echo "$ac_cv_sizeof_void_p" >&6; }
13130
13131
13132
13133 cat >>confdefs.h <<_ACEOF
13134 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
13135 _ACEOF
13136
13137
13138 # The cast to long int works around a bug in the HP C Compiler
13139 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13140 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13141 # This bug is HP SR number 8606223364.
13142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
13143 $as_echo_n "checking size of size_t... " >&6; }
13144 if ${ac_cv_sizeof_size_t+:} false; then :
13145   $as_echo_n "(cached) " >&6
13146 else
13147   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t"        "$ac_includes_default"; then :
13148
13149 else
13150   if test "$ac_cv_type_size_t" = yes; then
13151      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13152 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13153 as_fn_error 77 "cannot compute sizeof (size_t)
13154 See \`config.log' for more details" "$LINENO" 5; }
13155    else
13156      ac_cv_sizeof_size_t=0
13157    fi
13158 fi
13159
13160 fi
13161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
13162 $as_echo "$ac_cv_sizeof_size_t" >&6; }
13163
13164
13165
13166 cat >>confdefs.h <<_ACEOF
13167 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
13168 _ACEOF
13169
13170
13171 # The cast to long int works around a bug in the HP C Compiler
13172 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13173 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13174 # This bug is HP SR number 8606223364.
13175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
13176 $as_echo_n "checking size of long... " >&6; }
13177 if ${ac_cv_sizeof_long+:} false; then :
13178   $as_echo_n "(cached) " >&6
13179 else
13180   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
13181
13182 else
13183   if test "$ac_cv_type_long" = yes; then
13184      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13185 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13186 as_fn_error 77 "cannot compute sizeof (long)
13187 See \`config.log' for more details" "$LINENO" 5; }
13188    else
13189      ac_cv_sizeof_long=0
13190    fi
13191 fi
13192
13193 fi
13194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
13195 $as_echo "$ac_cv_sizeof_long" >&6; }
13196
13197
13198
13199 cat >>confdefs.h <<_ACEOF
13200 #define SIZEOF_LONG $ac_cv_sizeof_long
13201 _ACEOF
13202
13203
13204
13205 # Decide whether float4 is passed by value: user-selectable, enabled by default
13206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float4 passed by value" >&5
13207 $as_echo_n "checking whether to build with float4 passed by value... " >&6; }
13208
13209
13210 # Check whether --enable-float4-byval was given.
13211 if test "${enable_float4_byval+set}" = set; then :
13212   enableval=$enable_float4_byval;
13213   case $enableval in
13214     yes)
13215
13216 $as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
13217
13218                float4passbyval=true
13219       ;;
13220     no)
13221       float4passbyval=false
13222       ;;
13223     *)
13224       as_fn_error $? "no argument expected for --enable-float4-byval option" "$LINENO" 5
13225       ;;
13226   esac
13227
13228 else
13229   enable_float4_byval=yes
13230
13231 $as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
13232
13233                float4passbyval=true
13234 fi
13235
13236
13237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float4_byval" >&5
13238 $as_echo "$enable_float4_byval" >&6; }
13239
13240 cat >>confdefs.h <<_ACEOF
13241 #define FLOAT4PASSBYVAL $float4passbyval
13242 _ACEOF
13243
13244
13245 # Decide whether float8 is passed by value.
13246 # Note: this setting also controls int8 and related types such as timestamp.
13247 # If sizeof(Datum) >= 8, this is user-selectable, enabled by default.
13248 # If not, trying to select it is an error.
13249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float8 passed by value" >&5
13250 $as_echo_n "checking whether to build with float8 passed by value... " >&6; }
13251 if test $ac_cv_sizeof_void_p -ge 8 ; then
13252
13253
13254 # Check whether --enable-float8-byval was given.
13255 if test "${enable_float8_byval+set}" = set; then :
13256   enableval=$enable_float8_byval;
13257   case $enableval in
13258     yes)
13259       :
13260       ;;
13261     no)
13262       :
13263       ;;
13264     *)
13265       as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
13266       ;;
13267   esac
13268
13269 else
13270   enable_float8_byval=yes
13271
13272 fi
13273
13274
13275 else
13276
13277
13278 # Check whether --enable-float8-byval was given.
13279 if test "${enable_float8_byval+set}" = set; then :
13280   enableval=$enable_float8_byval;
13281   case $enableval in
13282     yes)
13283       :
13284       ;;
13285     no)
13286       :
13287       ;;
13288     *)
13289       as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
13290       ;;
13291   esac
13292
13293 else
13294   enable_float8_byval=no
13295
13296 fi
13297
13298
13299   if test "$enable_float8_byval" = yes ; then
13300     as_fn_error $? "--enable-float8-byval is not supported on 32-bit platforms." "$LINENO" 5
13301   fi
13302 fi
13303 if test "$enable_float8_byval" = yes ; then
13304
13305 $as_echo "#define USE_FLOAT8_BYVAL 1" >>confdefs.h
13306
13307   float8passbyval=true
13308 else
13309   float8passbyval=false
13310 fi
13311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float8_byval" >&5
13312 $as_echo "$enable_float8_byval" >&6; }
13313
13314 cat >>confdefs.h <<_ACEOF
13315 #define FLOAT8PASSBYVAL $float8passbyval
13316 _ACEOF
13317
13318
13319 # Determine memory alignment requirements for the basic C data types.
13320
13321 # The cast to long int works around a bug in the HP C Compiler,
13322 # see AC_CHECK_SIZEOF for more information.
13323 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of short" >&5
13324 $as_echo_n "checking alignment of short... " >&6; }
13325 if ${ac_cv_alignof_short+:} false; then :
13326   $as_echo_n "(cached) " >&6
13327 else
13328   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_short"        "$ac_includes_default
13329 #ifndef offsetof
13330 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
13331 #endif
13332 typedef struct { char x; short y; } ac__type_alignof_;"; then :
13333
13334 else
13335   if test "$ac_cv_type_short" = yes; then
13336      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13337 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13338 as_fn_error 77 "cannot compute alignment of short
13339 See \`config.log' for more details" "$LINENO" 5; }
13340    else
13341      ac_cv_alignof_short=0
13342    fi
13343 fi
13344
13345 fi
13346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_short" >&5
13347 $as_echo "$ac_cv_alignof_short" >&6; }
13348
13349
13350
13351 cat >>confdefs.h <<_ACEOF
13352 #define ALIGNOF_SHORT $ac_cv_alignof_short
13353 _ACEOF
13354
13355
13356 # The cast to long int works around a bug in the HP C Compiler,
13357 # see AC_CHECK_SIZEOF for more information.
13358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of int" >&5
13359 $as_echo_n "checking alignment of int... " >&6; }
13360 if ${ac_cv_alignof_int+:} false; then :
13361   $as_echo_n "(cached) " >&6
13362 else
13363   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_int"        "$ac_includes_default
13364 #ifndef offsetof
13365 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
13366 #endif
13367 typedef struct { char x; int y; } ac__type_alignof_;"; then :
13368
13369 else
13370   if test "$ac_cv_type_int" = yes; then
13371      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13372 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13373 as_fn_error 77 "cannot compute alignment of int
13374 See \`config.log' for more details" "$LINENO" 5; }
13375    else
13376      ac_cv_alignof_int=0
13377    fi
13378 fi
13379
13380 fi
13381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_int" >&5
13382 $as_echo "$ac_cv_alignof_int" >&6; }
13383
13384
13385
13386 cat >>confdefs.h <<_ACEOF
13387 #define ALIGNOF_INT $ac_cv_alignof_int
13388 _ACEOF
13389
13390
13391 # The cast to long int works around a bug in the HP C Compiler,
13392 # see AC_CHECK_SIZEOF for more information.
13393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long" >&5
13394 $as_echo_n "checking alignment of long... " >&6; }
13395 if ${ac_cv_alignof_long+:} false; then :
13396   $as_echo_n "(cached) " >&6
13397 else
13398   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long"        "$ac_includes_default
13399 #ifndef offsetof
13400 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
13401 #endif
13402 typedef struct { char x; long y; } ac__type_alignof_;"; then :
13403
13404 else
13405   if test "$ac_cv_type_long" = yes; then
13406      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13407 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13408 as_fn_error 77 "cannot compute alignment of long
13409 See \`config.log' for more details" "$LINENO" 5; }
13410    else
13411      ac_cv_alignof_long=0
13412    fi
13413 fi
13414
13415 fi
13416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long" >&5
13417 $as_echo "$ac_cv_alignof_long" >&6; }
13418
13419
13420
13421 cat >>confdefs.h <<_ACEOF
13422 #define ALIGNOF_LONG $ac_cv_alignof_long
13423 _ACEOF
13424
13425
13426 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
13427   # The cast to long int works around a bug in the HP C Compiler,
13428 # see AC_CHECK_SIZEOF for more information.
13429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long long int" >&5
13430 $as_echo_n "checking alignment of long long int... " >&6; }
13431 if ${ac_cv_alignof_long_long_int+:} false; then :
13432   $as_echo_n "(cached) " >&6
13433 else
13434   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long_long_int"        "$ac_includes_default
13435 #ifndef offsetof
13436 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
13437 #endif
13438 typedef struct { char x; long long int y; } ac__type_alignof_;"; then :
13439
13440 else
13441   if test "$ac_cv_type_long_long_int" = yes; then
13442      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13443 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13444 as_fn_error 77 "cannot compute alignment of long long int
13445 See \`config.log' for more details" "$LINENO" 5; }
13446    else
13447      ac_cv_alignof_long_long_int=0
13448    fi
13449 fi
13450
13451 fi
13452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long_long_int" >&5
13453 $as_echo "$ac_cv_alignof_long_long_int" >&6; }
13454
13455
13456
13457 cat >>confdefs.h <<_ACEOF
13458 #define ALIGNOF_LONG_LONG_INT $ac_cv_alignof_long_long_int
13459 _ACEOF
13460
13461
13462 fi
13463 # The cast to long int works around a bug in the HP C Compiler,
13464 # see AC_CHECK_SIZEOF for more information.
13465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of double" >&5
13466 $as_echo_n "checking alignment of double... " >&6; }
13467 if ${ac_cv_alignof_double+:} false; then :
13468   $as_echo_n "(cached) " >&6
13469 else
13470   if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_double"        "$ac_includes_default
13471 #ifndef offsetof
13472 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
13473 #endif
13474 typedef struct { char x; double y; } ac__type_alignof_;"; then :
13475
13476 else
13477   if test "$ac_cv_type_double" = yes; then
13478      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13479 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13480 as_fn_error 77 "cannot compute alignment of double
13481 See \`config.log' for more details" "$LINENO" 5; }
13482    else
13483      ac_cv_alignof_double=0
13484    fi
13485 fi
13486
13487 fi
13488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_double" >&5
13489 $as_echo "$ac_cv_alignof_double" >&6; }
13490
13491
13492
13493 cat >>confdefs.h <<_ACEOF
13494 #define ALIGNOF_DOUBLE $ac_cv_alignof_double
13495 _ACEOF
13496
13497
13498
13499 # Compute maximum alignment of any basic type.
13500 # We assume long's alignment is at least as strong as char, short, or int;
13501 # but we must check long long (if it exists) and double.
13502
13503 MAX_ALIGNOF=$ac_cv_alignof_long
13504 if test $MAX_ALIGNOF -lt $ac_cv_alignof_double ; then
13505   MAX_ALIGNOF=$ac_cv_alignof_double
13506 fi
13507 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $ac_cv_alignof_long_long_int ; then
13508   MAX_ALIGNOF="$ac_cv_alignof_long_long_int"
13509 fi
13510
13511 cat >>confdefs.h <<_ACEOF
13512 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
13513 _ACEOF
13514
13515
13516
13517 # Some platforms predefine the types int8, int16, etc.  Only check
13518 # a (hopefully) representative subset.
13519 ac_fn_c_check_type "$LINENO" "int8" "ac_cv_type_int8" "#include <stdio.h>
13520 "
13521 if test "x$ac_cv_type_int8" = xyes; then :
13522
13523 cat >>confdefs.h <<_ACEOF
13524 #define HAVE_INT8 1
13525 _ACEOF
13526
13527
13528 fi
13529 ac_fn_c_check_type "$LINENO" "uint8" "ac_cv_type_uint8" "#include <stdio.h>
13530 "
13531 if test "x$ac_cv_type_uint8" = xyes; then :
13532
13533 cat >>confdefs.h <<_ACEOF
13534 #define HAVE_UINT8 1
13535 _ACEOF
13536
13537
13538 fi
13539 ac_fn_c_check_type "$LINENO" "int64" "ac_cv_type_int64" "#include <stdio.h>
13540 "
13541 if test "x$ac_cv_type_int64" = xyes; then :
13542
13543 cat >>confdefs.h <<_ACEOF
13544 #define HAVE_INT64 1
13545 _ACEOF
13546
13547
13548 fi
13549 ac_fn_c_check_type "$LINENO" "uint64" "ac_cv_type_uint64" "#include <stdio.h>
13550 "
13551 if test "x$ac_cv_type_uint64" = xyes; then :
13552
13553 cat >>confdefs.h <<_ACEOF
13554 #define HAVE_UINT64 1
13555 _ACEOF
13556
13557
13558 fi
13559
13560
13561 # We also check for sig_atomic_t, which *should* be defined per ANSI
13562 # C, but is missing on some old platforms.
13563 ac_fn_c_check_type "$LINENO" "sig_atomic_t" "ac_cv_type_sig_atomic_t" "#include <signal.h>
13564 "
13565 if test "x$ac_cv_type_sig_atomic_t" = xyes; then :
13566
13567 cat >>confdefs.h <<_ACEOF
13568 #define HAVE_SIG_ATOMIC_T 1
13569 _ACEOF
13570
13571
13572 fi
13573
13574
13575
13576 if test "$PORTNAME" != "win32"
13577 then
13578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for POSIX signal interface" >&5
13579 $as_echo_n "checking for POSIX signal interface... " >&6; }
13580 if ${pgac_cv_func_posix_signals+:} false; then :
13581   $as_echo_n "(cached) " >&6
13582 else
13583   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13584 /* end confdefs.h.  */
13585 #include <signal.h>
13586
13587 int
13588 main ()
13589 {
13590 struct sigaction act, oact;
13591 sigemptyset(&act.sa_mask);
13592 act.sa_flags = SA_RESTART;
13593 sigaction(0, &act, &oact);
13594   ;
13595   return 0;
13596 }
13597 _ACEOF
13598 if ac_fn_c_try_link "$LINENO"; then :
13599   pgac_cv_func_posix_signals=yes
13600 else
13601   pgac_cv_func_posix_signals=no
13602 fi
13603 rm -f core conftest.err conftest.$ac_objext \
13604     conftest$ac_exeext conftest.$ac_ext
13605 fi
13606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_posix_signals" >&5
13607 $as_echo "$pgac_cv_func_posix_signals" >&6; }
13608 if test x"$pgac_cv_func_posix_signals" = xyes ; then
13609
13610 $as_echo "#define HAVE_POSIX_SIGNALS 1" >>confdefs.h
13611
13612 fi
13613 HAVE_POSIX_SIGNALS=$pgac_cv_func_posix_signals
13614
13615 if test "$pgac_cv_func_posix_signals" != yes -a "$enable_thread_safety" = yes; then
13616   as_fn_error $? "
13617 Thread-safety requires POSIX signals, which are not supported by this
13618 operating system;  use --disable-thread-safety to disable thread safety." "$LINENO" 5
13619 fi
13620 fi
13621
13622
13623 # Select semaphore implementation type.
13624 if test "$PORTNAME" != "win32"; then
13625   if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
13626
13627 $as_echo "#define USE_NAMED_POSIX_SEMAPHORES 1" >>confdefs.h
13628
13629     SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
13630   else
13631     if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
13632
13633 $as_echo "#define USE_UNNAMED_POSIX_SEMAPHORES 1" >>confdefs.h
13634
13635       SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
13636     else
13637
13638 $as_echo "#define USE_SYSV_SEMAPHORES 1" >>confdefs.h
13639
13640       SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
13641     fi
13642   fi
13643 else
13644
13645 $as_echo "#define USE_WIN32_SEMAPHORES 1" >>confdefs.h
13646
13647   SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
13648 fi
13649
13650
13651 # Select shared-memory implementation type.
13652 if test "$PORTNAME" != "win32"; then
13653
13654 $as_echo "#define USE_SYSV_SHARED_MEMORY 1" >>confdefs.h
13655
13656   SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
13657 else
13658
13659 $as_echo "#define USE_WIN32_SHARED_MEMORY 1" >>confdefs.h
13660
13661   SHMEM_IMPLEMENTATION="src/backend/port/win32_shmem.c"
13662 fi
13663
13664 # Select latch implementation type.
13665 if test "$PORTNAME" != "win32"; then
13666   LATCH_IMPLEMENTATION="src/backend/port/unix_latch.c"
13667 else
13668   LATCH_IMPLEMENTATION="src/backend/port/win32_latch.c"
13669 fi
13670
13671 # If not set in template file, set bytes to use libc memset()
13672 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
13673   MEMSET_LOOP_LIMIT=1024
13674 fi
13675
13676 cat >>confdefs.h <<_ACEOF
13677 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
13678 _ACEOF
13679
13680
13681
13682 if test "$enable_nls" = yes ; then
13683
13684   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bind_textdomain_codeset" >&5
13685 $as_echo_n "checking for library containing bind_textdomain_codeset... " >&6; }
13686 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
13687   $as_echo_n "(cached) " >&6
13688 else
13689   ac_func_search_save_LIBS=$LIBS
13690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13691 /* end confdefs.h.  */
13692
13693 /* Override any GCC internal prototype to avoid an error.
13694    Use char because int might match the return type of a GCC
13695    builtin and then its argument prototype would still apply.  */
13696 #ifdef __cplusplus
13697 extern "C"
13698 #endif
13699 char bind_textdomain_codeset ();
13700 int
13701 main ()
13702 {
13703 return bind_textdomain_codeset ();
13704   ;
13705   return 0;
13706 }
13707 _ACEOF
13708 for ac_lib in '' intl; do
13709   if test -z "$ac_lib"; then
13710     ac_res="none required"
13711   else
13712     ac_res=-l$ac_lib
13713     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
13714   fi
13715   if ac_fn_c_try_link "$LINENO"; then :
13716   ac_cv_search_bind_textdomain_codeset=$ac_res
13717 fi
13718 rm -f core conftest.err conftest.$ac_objext \
13719     conftest$ac_exeext
13720   if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
13721   break
13722 fi
13723 done
13724 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
13725
13726 else
13727   ac_cv_search_bind_textdomain_codeset=no
13728 fi
13729 rm conftest.$ac_ext
13730 LIBS=$ac_func_search_save_LIBS
13731 fi
13732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bind_textdomain_codeset" >&5
13733 $as_echo "$ac_cv_search_bind_textdomain_codeset" >&6; }
13734 ac_res=$ac_cv_search_bind_textdomain_codeset
13735 if test "$ac_res" != no; then :
13736   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13737
13738 else
13739   as_fn_error $? "a gettext implementation is required for NLS" "$LINENO" 5
13740 fi
13741
13742   ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
13743 if test "x$ac_cv_header_libintl_h" = xyes; then :
13744
13745 else
13746   as_fn_error $? "header file <libintl.h> is required for NLS" "$LINENO" 5
13747 fi
13748
13749
13750   for ac_prog in msgfmt
13751 do
13752   # Extract the first word of "$ac_prog", so it can be a program name with args.
13753 set dummy $ac_prog; ac_word=$2
13754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13755 $as_echo_n "checking for $ac_word... " >&6; }
13756 if ${ac_cv_prog_MSGFMT+:} false; then :
13757   $as_echo_n "(cached) " >&6
13758 else
13759   if test -n "$MSGFMT"; then
13760   ac_cv_prog_MSGFMT="$MSGFMT" # Let the user override the test.
13761 else
13762 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13763 for as_dir in $PATH
13764 do
13765   IFS=$as_save_IFS
13766   test -z "$as_dir" && as_dir=.
13767     for ac_exec_ext in '' $ac_executable_extensions; do
13768   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13769     ac_cv_prog_MSGFMT="$ac_prog"
13770     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13771     break 2
13772   fi
13773 done
13774   done
13775 IFS=$as_save_IFS
13776
13777 fi
13778 fi
13779 MSGFMT=$ac_cv_prog_MSGFMT
13780 if test -n "$MSGFMT"; then
13781   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
13782 $as_echo "$MSGFMT" >&6; }
13783 else
13784   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13785 $as_echo "no" >&6; }
13786 fi
13787
13788
13789   test -n "$MSGFMT" && break
13790 done
13791
13792   if test -z "$MSGFMT"; then
13793     as_fn_error $? "msgfmt is required for NLS" "$LINENO" 5
13794   fi
13795   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msgfmt flags" >&5
13796 $as_echo_n "checking for msgfmt flags... " >&6; }
13797 if ${pgac_cv_msgfmt_flags+:} false; then :
13798   $as_echo_n "(cached) " >&6
13799 else
13800   if test x"$MSGFMT" != x"" && "$MSGFMT" --version 2>&1 | grep "GNU" >/dev/null; then
13801     pgac_cv_msgfmt_flags=-c
13802 fi
13803 fi
13804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_msgfmt_flags" >&5
13805 $as_echo "$pgac_cv_msgfmt_flags" >&6; }
13806   MSGFMT_FLAGS=$pgac_cv_msgfmt_flags
13807
13808   for ac_prog in msgmerge
13809 do
13810   # Extract the first word of "$ac_prog", so it can be a program name with args.
13811 set dummy $ac_prog; ac_word=$2
13812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13813 $as_echo_n "checking for $ac_word... " >&6; }
13814 if ${ac_cv_prog_MSGMERGE+:} false; then :
13815   $as_echo_n "(cached) " >&6
13816 else
13817   if test -n "$MSGMERGE"; then
13818   ac_cv_prog_MSGMERGE="$MSGMERGE" # Let the user override the test.
13819 else
13820 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13821 for as_dir in $PATH
13822 do
13823   IFS=$as_save_IFS
13824   test -z "$as_dir" && as_dir=.
13825     for ac_exec_ext in '' $ac_executable_extensions; do
13826   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13827     ac_cv_prog_MSGMERGE="$ac_prog"
13828     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13829     break 2
13830   fi
13831 done
13832   done
13833 IFS=$as_save_IFS
13834
13835 fi
13836 fi
13837 MSGMERGE=$ac_cv_prog_MSGMERGE
13838 if test -n "$MSGMERGE"; then
13839   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
13840 $as_echo "$MSGMERGE" >&6; }
13841 else
13842   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13843 $as_echo "no" >&6; }
13844 fi
13845
13846
13847   test -n "$MSGMERGE" && break
13848 done
13849
13850   for ac_prog in xgettext
13851 do
13852   # Extract the first word of "$ac_prog", so it can be a program name with args.
13853 set dummy $ac_prog; ac_word=$2
13854 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13855 $as_echo_n "checking for $ac_word... " >&6; }
13856 if ${ac_cv_prog_XGETTEXT+:} false; then :
13857   $as_echo_n "(cached) " >&6
13858 else
13859   if test -n "$XGETTEXT"; then
13860   ac_cv_prog_XGETTEXT="$XGETTEXT" # Let the user override the test.
13861 else
13862 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13863 for as_dir in $PATH
13864 do
13865   IFS=$as_save_IFS
13866   test -z "$as_dir" && as_dir=.
13867     for ac_exec_ext in '' $ac_executable_extensions; do
13868   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13869     ac_cv_prog_XGETTEXT="$ac_prog"
13870     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13871     break 2
13872   fi
13873 done
13874   done
13875 IFS=$as_save_IFS
13876
13877 fi
13878 fi
13879 XGETTEXT=$ac_cv_prog_XGETTEXT
13880 if test -n "$XGETTEXT"; then
13881   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
13882 $as_echo "$XGETTEXT" >&6; }
13883 else
13884   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13885 $as_echo "no" >&6; }
13886 fi
13887
13888
13889   test -n "$XGETTEXT" && break
13890 done
13891
13892
13893 fi
13894
13895 # Check for Tcl configuration script tclConfig.sh
13896 if test "$with_tcl" = yes; then
13897     for ac_prog in tclsh tcl tclsh8.5 tclsh85 tclsh8.4 tclsh84 tclsh8.3 tclsh83
13898 do
13899   # Extract the first word of "$ac_prog", so it can be a program name with args.
13900 set dummy $ac_prog; ac_word=$2
13901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13902 $as_echo_n "checking for $ac_word... " >&6; }
13903 if ${ac_cv_path_TCLSH+:} false; then :
13904   $as_echo_n "(cached) " >&6
13905 else
13906   case $TCLSH in
13907   [\\/]* | ?:[\\/]*)
13908   ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
13909   ;;
13910   *)
13911   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13912 for as_dir in $PATH
13913 do
13914   IFS=$as_save_IFS
13915   test -z "$as_dir" && as_dir=.
13916     for ac_exec_ext in '' $ac_executable_extensions; do
13917   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13918     ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
13919     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13920     break 2
13921   fi
13922 done
13923   done
13924 IFS=$as_save_IFS
13925
13926   ;;
13927 esac
13928 fi
13929 TCLSH=$ac_cv_path_TCLSH
13930 if test -n "$TCLSH"; then
13931   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
13932 $as_echo "$TCLSH" >&6; }
13933 else
13934   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13935 $as_echo "no" >&6; }
13936 fi
13937
13938
13939   test -n "$TCLSH" && break
13940 done
13941
13942 if test x"$TCLSH" = x""; then
13943   as_fn_error $? "Tcl shell not found" "$LINENO" 5
13944 fi
13945
13946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclConfig.sh" >&5
13947 $as_echo_n "checking for tclConfig.sh... " >&6; }
13948 # Let user override test
13949 if test -z "$TCL_CONFIG_SH"; then
13950     pgac_test_dirs="$with_tclconfig"
13951
13952     set X $pgac_test_dirs; shift
13953     if test $# -eq 0; then
13954         test -z "$TCLSH" && as_fn_error $? "unable to locate tclConfig.sh because no Tcl shell was found" "$LINENO" 5
13955         set X `echo 'puts $auto_path' | $TCLSH`; shift
13956     fi
13957
13958     for pgac_dir do
13959         if test -r "$pgac_dir/tclConfig.sh"; then
13960             TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
13961             break
13962         fi
13963     done
13964 fi
13965
13966 if test -z "$TCL_CONFIG_SH"; then
13967     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13968 $as_echo "no" >&6; }
13969     as_fn_error $? "file 'tclConfig.sh' is required for Tcl" "$LINENO" 5
13970 else
13971     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCL_CONFIG_SH" >&5
13972 $as_echo "$TCL_CONFIG_SH" >&6; }
13973 fi
13974
13975
13976
13977     . "$TCL_CONFIG_SH"
13978 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
13979 eval TCL_LIB_FILE=\"$TCL_LIB_FILE\"
13980 eval TCL_LIBS=\"$TCL_LIBS\"
13981 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
13982 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
13983
13984         # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
13985     ac_save_CPPFLAGS=$CPPFLAGS
13986     CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
13987     ac_fn_c_check_header_mongrel "$LINENO" "tcl.h" "ac_cv_header_tcl_h" "$ac_includes_default"
13988 if test "x$ac_cv_header_tcl_h" = xyes; then :
13989
13990 else
13991   as_fn_error $? "header file <tcl.h> is required for Tcl" "$LINENO" 5
13992 fi
13993
13994
13995     CPPFLAGS=$ac_save_CPPFLAGS
13996 fi
13997
13998 # check for <perl.h>
13999 if test "$with_perl" = yes; then
14000   ac_save_CPPFLAGS=$CPPFLAGS
14001   CPPFLAGS="$CPPFLAGS -I$perl_archlibexp/CORE"
14002   ac_fn_c_check_header_compile "$LINENO" "perl.h" "ac_cv_header_perl_h" "#include <EXTERN.h>
14003 "
14004 if test "x$ac_cv_header_perl_h" = xyes; then :
14005
14006 else
14007   as_fn_error $? "header file <perl.h> is required for Perl" "$LINENO" 5
14008 fi
14009
14010
14011   # While we're at it, check that we can link to libperl.
14012   # On most platforms, if perl.h is there then libperl.so will be too, but at
14013   # this writing Debian packages them separately.  There is no known reason to
14014   # waste cycles on separate probes for the Tcl or Python libraries, though.
14015   pgac_save_LIBS=$LIBS
14016   LIBS="$perl_embed_ldflags"
14017   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libperl" >&5
14018 $as_echo_n "checking for libperl... " >&6; }
14019   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14020 /* end confdefs.h.  */
14021
14022 #include <EXTERN.h>
14023 #include <perl.h>
14024
14025 int
14026 main ()
14027 {
14028 perl_alloc();
14029   ;
14030   return 0;
14031 }
14032 _ACEOF
14033 if ac_fn_c_try_link "$LINENO"; then :
14034   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14035 $as_echo "yes" >&6; }
14036 else
14037   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14038 $as_echo "no" >&6; }
14039      as_fn_error $? "libperl library is required for Perl" "$LINENO" 5
14040 fi
14041 rm -f core conftest.err conftest.$ac_objext \
14042     conftest$ac_exeext conftest.$ac_ext
14043   LIBS=$pgac_save_LIBS
14044   CPPFLAGS=$ac_save_CPPFLAGS
14045 fi
14046
14047 # check for <Python.h>
14048 if test "$with_python" = yes; then
14049   ac_save_CPPFLAGS=$CPPFLAGS
14050   CPPFLAGS="$python_includespec $CPPFLAGS"
14051   ac_fn_c_check_header_mongrel "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default"
14052 if test "x$ac_cv_header_Python_h" = xyes; then :
14053
14054 else
14055   as_fn_error $? "header file <Python.h> is required for Python" "$LINENO" 5
14056 fi
14057
14058
14059   CPPFLAGS=$ac_save_CPPFLAGS
14060 fi
14061
14062 #
14063 # Check for DocBook and tools
14064 #
14065 for ac_prog in onsgmls nsgmls
14066 do
14067   # Extract the first word of "$ac_prog", so it can be a program name with args.
14068 set dummy $ac_prog; ac_word=$2
14069 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14070 $as_echo_n "checking for $ac_word... " >&6; }
14071 if ${ac_cv_prog_NSGMLS+:} false; then :
14072   $as_echo_n "(cached) " >&6
14073 else
14074   if test -n "$NSGMLS"; then
14075   ac_cv_prog_NSGMLS="$NSGMLS" # Let the user override the test.
14076 else
14077 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14078 for as_dir in $PATH
14079 do
14080   IFS=$as_save_IFS
14081   test -z "$as_dir" && as_dir=.
14082     for ac_exec_ext in '' $ac_executable_extensions; do
14083   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14084     ac_cv_prog_NSGMLS="$ac_prog"
14085     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14086     break 2
14087   fi
14088 done
14089   done
14090 IFS=$as_save_IFS
14091
14092 fi
14093 fi
14094 NSGMLS=$ac_cv_prog_NSGMLS
14095 if test -n "$NSGMLS"; then
14096   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NSGMLS" >&5
14097 $as_echo "$NSGMLS" >&6; }
14098 else
14099   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14100 $as_echo "no" >&6; }
14101 fi
14102
14103
14104   test -n "$NSGMLS" && break
14105 done
14106
14107 for ac_prog in openjade jade
14108 do
14109   # Extract the first word of "$ac_prog", so it can be a program name with args.
14110 set dummy $ac_prog; ac_word=$2
14111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14112 $as_echo_n "checking for $ac_word... " >&6; }
14113 if ${ac_cv_prog_JADE+:} false; then :
14114   $as_echo_n "(cached) " >&6
14115 else
14116   if test -n "$JADE"; then
14117   ac_cv_prog_JADE="$JADE" # Let the user override the test.
14118 else
14119 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14120 for as_dir in $PATH
14121 do
14122   IFS=$as_save_IFS
14123   test -z "$as_dir" && as_dir=.
14124     for ac_exec_ext in '' $ac_executable_extensions; do
14125   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14126     ac_cv_prog_JADE="$ac_prog"
14127     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14128     break 2
14129   fi
14130 done
14131   done
14132 IFS=$as_save_IFS
14133
14134 fi
14135 fi
14136 JADE=$ac_cv_prog_JADE
14137 if test -n "$JADE"; then
14138   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JADE" >&5
14139 $as_echo "$JADE" >&6; }
14140 else
14141   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14142 $as_echo "no" >&6; }
14143 fi
14144
14145
14146   test -n "$JADE" && break
14147 done
14148
14149
14150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DocBook V4.2" >&5
14151 $as_echo_n "checking for DocBook V4.2... " >&6; }
14152 if ${pgac_cv_check_docbook+:} false; then :
14153   $as_echo_n "(cached) " >&6
14154 else
14155   cat >conftest.sgml <<EOF
14156 <!doctype book PUBLIC "-//OASIS//DTD DocBook V4.2//EN">
14157 <book>
14158  <title>test</title>
14159  <chapter>
14160   <title>random</title>
14161    <sect1>
14162     <title>testsect</title>
14163     <para>text</para>
14164   </sect1>
14165  </chapter>
14166 </book>
14167 EOF
14168
14169 pgac_cv_check_docbook=no
14170
14171 if test -n "$NSGMLS"; then
14172   $NSGMLS -s conftest.sgml 1>&5 2>&1
14173   if test $? -eq 0; then
14174     pgac_cv_check_docbook=yes
14175   fi
14176 fi
14177 rm -f conftest.sgml
14178 fi
14179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_docbook" >&5
14180 $as_echo "$pgac_cv_check_docbook" >&6; }
14181
14182 have_docbook=$pgac_cv_check_docbook
14183
14184
14185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DocBook stylesheets" >&5
14186 $as_echo_n "checking for DocBook stylesheets... " >&6; }
14187 if ${pgac_cv_path_stylesheets+:} false; then :
14188   $as_echo_n "(cached) " >&6
14189 else
14190   if test -n "$DOCBOOKSTYLE"; then
14191   pgac_cv_path_stylesheets=$DOCBOOKSTYLE
14192 else
14193   for pgac_prefix in /usr /usr/local /opt /sw; do
14194     for pgac_infix in share lib; do
14195       for pgac_postfix in \
14196         sgml/stylesheets/nwalsh-modular \
14197         sgml/stylesheets/docbook \
14198         sgml/stylesheets/dsssl/docbook \
14199         sgml/docbook-dsssl \
14200         sgml/docbook/dsssl/modular \
14201         sgml/docbook/stylesheet/dsssl/modular \
14202         sgml/docbook/dsssl-stylesheets \
14203         sgml/dsssl/docbook-dsssl-nwalsh
14204       do
14205         pgac_candidate=$pgac_prefix/$pgac_infix/$pgac_postfix
14206         if test -r "$pgac_candidate/html/docbook.dsl" \
14207            && test -r "$pgac_candidate/print/docbook.dsl"
14208         then
14209           pgac_cv_path_stylesheets=$pgac_candidate
14210           break 3
14211         fi
14212       done
14213     done
14214   done
14215 fi
14216 fi
14217
14218 DOCBOOKSTYLE=$pgac_cv_path_stylesheets
14219
14220 if test -n "$DOCBOOKSTYLE"; then
14221   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOCBOOKSTYLE" >&5
14222 $as_echo "$DOCBOOKSTYLE" >&6; }
14223 else
14224   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14225 $as_echo "no" >&6; }
14226 fi
14227 if test -n "$DOCBOOKSTYLE" -a -r "$DOCBOOKSTYLE/bin/collateindex.pl"; then
14228   COLLATEINDEX="$DOCBOOKSTYLE/bin/collateindex.pl"
14229
14230 else
14231   # Extract the first word of "collateindex.pl", so it can be a program name with args.
14232 set dummy collateindex.pl; ac_word=$2
14233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14234 $as_echo_n "checking for $ac_word... " >&6; }
14235 if ${ac_cv_path_COLLATEINDEX+:} false; then :
14236   $as_echo_n "(cached) " >&6
14237 else
14238   case $COLLATEINDEX in
14239   [\\/]* | ?:[\\/]*)
14240   ac_cv_path_COLLATEINDEX="$COLLATEINDEX" # Let the user override the test with a path.
14241   ;;
14242   *)
14243   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14244 for as_dir in $PATH
14245 do
14246   IFS=$as_save_IFS
14247   test -z "$as_dir" && as_dir=.
14248     for ac_exec_ext in '' $ac_executable_extensions; do
14249   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14250     ac_cv_path_COLLATEINDEX="$as_dir/$ac_word$ac_exec_ext"
14251     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14252     break 2
14253   fi
14254 done
14255   done
14256 IFS=$as_save_IFS
14257
14258   ;;
14259 esac
14260 fi
14261 COLLATEINDEX=$ac_cv_path_COLLATEINDEX
14262 if test -n "$COLLATEINDEX"; then
14263   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COLLATEINDEX" >&5
14264 $as_echo "$COLLATEINDEX" >&6; }
14265 else
14266   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14267 $as_echo "no" >&6; }
14268 fi
14269
14270
14271 fi
14272 for ac_prog in xsltproc
14273 do
14274   # Extract the first word of "$ac_prog", so it can be a program name with args.
14275 set dummy $ac_prog; ac_word=$2
14276 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14277 $as_echo_n "checking for $ac_word... " >&6; }
14278 if ${ac_cv_prog_XSLTPROC+:} false; then :
14279   $as_echo_n "(cached) " >&6
14280 else
14281   if test -n "$XSLTPROC"; then
14282   ac_cv_prog_XSLTPROC="$XSLTPROC" # Let the user override the test.
14283 else
14284 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14285 for as_dir in $PATH
14286 do
14287   IFS=$as_save_IFS
14288   test -z "$as_dir" && as_dir=.
14289     for ac_exec_ext in '' $ac_executable_extensions; do
14290   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14291     ac_cv_prog_XSLTPROC="$ac_prog"
14292     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14293     break 2
14294   fi
14295 done
14296   done
14297 IFS=$as_save_IFS
14298
14299 fi
14300 fi
14301 XSLTPROC=$ac_cv_prog_XSLTPROC
14302 if test -n "$XSLTPROC"; then
14303   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
14304 $as_echo "$XSLTPROC" >&6; }
14305 else
14306   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14307 $as_echo "no" >&6; }
14308 fi
14309
14310
14311   test -n "$XSLTPROC" && break
14312 done
14313
14314 for ac_prog in osx sgml2xml sx
14315 do
14316   # Extract the first word of "$ac_prog", so it can be a program name with args.
14317 set dummy $ac_prog; ac_word=$2
14318 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14319 $as_echo_n "checking for $ac_word... " >&6; }
14320 if ${ac_cv_prog_OSX+:} false; then :
14321   $as_echo_n "(cached) " >&6
14322 else
14323   if test -n "$OSX"; then
14324   ac_cv_prog_OSX="$OSX" # Let the user override the test.
14325 else
14326 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14327 for as_dir in $PATH
14328 do
14329   IFS=$as_save_IFS
14330   test -z "$as_dir" && as_dir=.
14331     for ac_exec_ext in '' $ac_executable_extensions; do
14332   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14333     ac_cv_prog_OSX="$ac_prog"
14334     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14335     break 2
14336   fi
14337 done
14338   done
14339 IFS=$as_save_IFS
14340
14341 fi
14342 fi
14343 OSX=$ac_cv_prog_OSX
14344 if test -n "$OSX"; then
14345   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OSX" >&5
14346 $as_echo "$OSX" >&6; }
14347 else
14348   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14349 $as_echo "no" >&6; }
14350 fi
14351
14352
14353   test -n "$OSX" && break
14354 done
14355
14356
14357 # Thread testing
14358
14359 # We have to run the thread test near the end so we have all our symbols
14360 # defined.  Cross compiling throws a warning.
14361 #
14362 if test "$enable_thread_safety" = yes; then
14363 if test "$PORTNAME" != "win32"
14364 then
14365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking thread safety of required library functions" >&5
14366 $as_echo_n "checking thread safety of required library functions... " >&6; }
14367
14368 _CFLAGS="$CFLAGS"
14369 _LIBS="$LIBS"
14370 CFLAGS="$CFLAGS $PTHREAD_CFLAGS -DIN_CONFIGURE"
14371 LIBS="$LIBS $PTHREAD_LIBS"
14372 if test "$cross_compiling" = yes; then :
14373   { $as_echo "$as_me:${as_lineno-$LINENO}: result: maybe" >&5
14374 $as_echo "maybe" >&6; }
14375   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
14376 *** Skipping thread test program because of cross-compile build.
14377 *** Run the program in src/test/thread on the target machine.
14378 " >&5
14379 $as_echo "$as_me: WARNING:
14380 *** Skipping thread test program because of cross-compile build.
14381 *** Run the program in src/test/thread on the target machine.
14382 " >&2;}
14383 else
14384   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14385 /* end confdefs.h.  */
14386 #include "$srcdir/src/test/thread/thread_test.c"
14387 _ACEOF
14388 if ac_fn_c_try_run "$LINENO"; then :
14389   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14390 $as_echo "yes" >&6; }
14391 else
14392   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14393 $as_echo "no" >&6; }
14394   as_fn_error $? "thread test program failed
14395 This platform is not thread-safe.  Check the file 'config.log' or compile
14396 and run src/test/thread/thread_test for the exact reason.
14397 Use --disable-thread-safety to disable thread safety." "$LINENO" 5
14398 fi
14399 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14400   conftest.$ac_objext conftest.beam conftest.$ac_ext
14401 fi
14402
14403 CFLAGS="$_CFLAGS"
14404 LIBS="$_LIBS"
14405 else
14406 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** skipping thread test on Win32" >&5
14407 $as_echo "$as_me: WARNING: *** skipping thread test on Win32" >&2;}
14408 fi
14409 fi
14410
14411 # If compiler will take -Wl,--as-needed (or various platform-specific
14412 # spellings thereof) then add that to LDFLAGS.  This is much easier than
14413 # trying to filter LIBS to the minimum for each executable.
14414 # On (at least) some Red-Hat-derived systems, this switch breaks linking to
14415 # libreadline; therefore we postpone testing it until we know what library
14416 # dependencies readline has.  The test code will try to link with $LIBS.
14417 if test "$with_readline" = yes; then
14418   link_test_func=readline
14419 else
14420   link_test_func=exit
14421 fi
14422
14423 if test "$PORTNAME" = "darwin"; then
14424   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-dead_strip_dylibs" >&5
14425 $as_echo_n "checking whether $CC supports -Wl,-dead_strip_dylibs... " >&6; }
14426 if ${pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs+:} false; then :
14427   $as_echo_n "(cached) " >&6
14428 else
14429   pgac_save_LDFLAGS=$LDFLAGS
14430 LDFLAGS="$pgac_save_LDFLAGS -Wl,-dead_strip_dylibs"
14431 if test "$cross_compiling" = yes; then :
14432   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs="assuming no"
14433 else
14434   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14435 /* end confdefs.h.  */
14436 extern void $link_test_func (); void (*fptr) () = $link_test_func;
14437 int
14438 main ()
14439 {
14440
14441   ;
14442   return 0;
14443 }
14444 _ACEOF
14445 if ac_fn_c_try_run "$LINENO"; then :
14446   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=yes
14447 else
14448   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=no
14449 fi
14450 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14451   conftest.$ac_objext conftest.beam conftest.$ac_ext
14452 fi
14453
14454 LDFLAGS="$pgac_save_LDFLAGS"
14455 fi
14456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&5
14457 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&6; }
14458 if test x"$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" = x"yes"; then
14459   LDFLAGS="$LDFLAGS -Wl,-dead_strip_dylibs"
14460 fi
14461
14462 elif test "$PORTNAME" = "openbsd"; then
14463   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-Bdynamic" >&5
14464 $as_echo_n "checking whether $CC supports -Wl,-Bdynamic... " >&6; }
14465 if ${pgac_cv_prog_cc_ldflags__Wl__Bdynamic+:} false; then :
14466   $as_echo_n "(cached) " >&6
14467 else
14468   pgac_save_LDFLAGS=$LDFLAGS
14469 LDFLAGS="$pgac_save_LDFLAGS -Wl,-Bdynamic"
14470 if test "$cross_compiling" = yes; then :
14471   pgac_cv_prog_cc_ldflags__Wl__Bdynamic="assuming no"
14472 else
14473   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14474 /* end confdefs.h.  */
14475 extern void $link_test_func (); void (*fptr) () = $link_test_func;
14476 int
14477 main ()
14478 {
14479
14480   ;
14481   return 0;
14482 }
14483 _ACEOF
14484 if ac_fn_c_try_run "$LINENO"; then :
14485   pgac_cv_prog_cc_ldflags__Wl__Bdynamic=yes
14486 else
14487   pgac_cv_prog_cc_ldflags__Wl__Bdynamic=no
14488 fi
14489 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14490   conftest.$ac_objext conftest.beam conftest.$ac_ext
14491 fi
14492
14493 LDFLAGS="$pgac_save_LDFLAGS"
14494 fi
14495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&5
14496 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&6; }
14497 if test x"$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" = x"yes"; then
14498   LDFLAGS="$LDFLAGS -Wl,-Bdynamic"
14499 fi
14500
14501 else
14502   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,--as-needed" >&5
14503 $as_echo_n "checking whether $CC supports -Wl,--as-needed... " >&6; }
14504 if ${pgac_cv_prog_cc_ldflags__Wl___as_needed+:} false; then :
14505   $as_echo_n "(cached) " >&6
14506 else
14507   pgac_save_LDFLAGS=$LDFLAGS
14508 LDFLAGS="$pgac_save_LDFLAGS -Wl,--as-needed"
14509 if test "$cross_compiling" = yes; then :
14510   pgac_cv_prog_cc_ldflags__Wl___as_needed="assuming no"
14511 else
14512   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14513 /* end confdefs.h.  */
14514 extern void $link_test_func (); void (*fptr) () = $link_test_func;
14515 int
14516 main ()
14517 {
14518
14519   ;
14520   return 0;
14521 }
14522 _ACEOF
14523 if ac_fn_c_try_run "$LINENO"; then :
14524   pgac_cv_prog_cc_ldflags__Wl___as_needed=yes
14525 else
14526   pgac_cv_prog_cc_ldflags__Wl___as_needed=no
14527 fi
14528 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14529   conftest.$ac_objext conftest.beam conftest.$ac_ext
14530 fi
14531
14532 LDFLAGS="$pgac_save_LDFLAGS"
14533 fi
14534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl___as_needed" >&5
14535 $as_echo "$pgac_cv_prog_cc_ldflags__Wl___as_needed" >&6; }
14536 if test x"$pgac_cv_prog_cc_ldflags__Wl___as_needed" = x"yes"; then
14537   LDFLAGS="$LDFLAGS -Wl,--as-needed"
14538 fi
14539
14540 fi
14541
14542 # Create compiler version string
14543 if test x"$GCC" = x"yes" ; then
14544   cc_string=`${CC} --version | sed q`
14545   case $cc_string in [A-Za-z]*) ;; *) cc_string="GCC $cc_string";; esac
14546 elif test x"$SUN_STUDIO_CC" = x"yes" ; then
14547   cc_string=`${CC} -V 2>&1 | sed q`
14548 else
14549   cc_string=$CC
14550 fi
14551
14552
14553 cat >>confdefs.h <<_ACEOF
14554 #define PG_VERSION_STR "PostgreSQL $PG_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"
14555 _ACEOF
14556
14557
14558 # Supply a numeric version string for use by 3rd party add-ons
14559 # awk -F is a regex on some platforms, and not on others, so make "." a tab
14560 PG_VERSION_NUM="`echo "$PACKAGE_VERSION" | sed 's/[A-Za-z].*$//' |
14561 tr '.' '        ' |
14562 $AWK '{printf "%d%02d%02d", $1, $2, (NF >= 3) ? $3 : 0}'`"
14563
14564 cat >>confdefs.h <<_ACEOF
14565 #define PG_VERSION_NUM $PG_VERSION_NUM
14566 _ACEOF
14567
14568
14569
14570 # Begin output steps
14571
14572 { $as_echo "$as_me:${as_lineno-$LINENO}: using compiler=$cc_string" >&5
14573 $as_echo "$as_me: using compiler=$cc_string" >&6;}
14574 { $as_echo "$as_me:${as_lineno-$LINENO}: using CFLAGS=$CFLAGS" >&5
14575 $as_echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
14576 { $as_echo "$as_me:${as_lineno-$LINENO}: using CPPFLAGS=$CPPFLAGS" >&5
14577 $as_echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
14578 { $as_echo "$as_me:${as_lineno-$LINENO}: using LDFLAGS=$LDFLAGS" >&5
14579 $as_echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
14580
14581 # prepare build tree if outside source tree
14582 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
14583 # Note 2: /bin/pwd might be better than shell's built-in at getting
14584 #         a symlink-free name.
14585 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
14586   vpath_build=no
14587 else
14588   vpath_build=yes
14589   if test "$no_create" != yes; then
14590     $as_echo_n "preparing build tree... " >&6
14591     pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
14592     $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
14593       || as_fn_error $? "failed" "$LINENO" 5
14594     { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
14595 $as_echo "done" >&6; }
14596   fi
14597 fi
14598
14599
14600
14601 ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
14602
14603
14604 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}"
14605
14606
14607 if test "$PORTNAME" = "win32"; then
14608 ac_config_commands="$ac_config_commands check_win32_symlinks"
14609
14610 fi
14611
14612 ac_config_headers="$ac_config_headers src/include/pg_config.h"
14613
14614
14615 ac_config_headers="$ac_config_headers src/include/pg_config_ext.h"
14616
14617
14618 ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
14619
14620
14621 cat >confcache <<\_ACEOF
14622 # This file is a shell script that caches the results of configure
14623 # tests run on this system so they can be shared between configure
14624 # scripts and configure runs, see configure's option --config-cache.
14625 # It is not useful on other systems.  If it contains results you don't
14626 # want to keep, you may remove or edit it.
14627 #
14628 # config.status only pays attention to the cache file if you give it
14629 # the --recheck option to rerun configure.
14630 #
14631 # `ac_cv_env_foo' variables (set or unset) will be overridden when
14632 # loading this file, other *unset* `ac_cv_foo' will be assigned the
14633 # following values.
14634
14635 _ACEOF
14636
14637 # The following way of writing the cache mishandles newlines in values,
14638 # but we know of no workaround that is simple, portable, and efficient.
14639 # So, we kill variables containing newlines.
14640 # Ultrix sh set writes to stderr and can't be redirected directly,
14641 # and sets the high bit in the cache file unless we assign to the vars.
14642 (
14643   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
14644     eval ac_val=\$$ac_var
14645     case $ac_val in #(
14646     *${as_nl}*)
14647       case $ac_var in #(
14648       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
14649 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
14650       esac
14651       case $ac_var in #(
14652       _ | IFS | as_nl) ;; #(
14653       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
14654       *) { eval $ac_var=; unset $ac_var;} ;;
14655       esac ;;
14656     esac
14657   done
14658
14659   (set) 2>&1 |
14660     case $as_nl`(ac_space=' '; set) 2>&1` in #(
14661     *${as_nl}ac_space=\ *)
14662       # `set' does not quote correctly, so add quotes: double-quote
14663       # substitution turns \\\\ into \\, and sed turns \\ into \.
14664       sed -n \
14665         "s/'/'\\\\''/g;
14666           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
14667       ;; #(
14668     *)
14669       # `set' quotes correctly as required by POSIX, so do not add quotes.
14670       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
14671       ;;
14672     esac |
14673     sort
14674 ) |
14675   sed '
14676      /^ac_cv_env_/b end
14677      t clear
14678      :clear
14679      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
14680      t end
14681      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
14682      :end' >>confcache
14683 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
14684   if test -w "$cache_file"; then
14685     if test "x$cache_file" != "x/dev/null"; then
14686       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
14687 $as_echo "$as_me: updating cache $cache_file" >&6;}
14688       if test ! -f "$cache_file" || test -h "$cache_file"; then
14689         cat confcache >"$cache_file"
14690       else
14691         case $cache_file in #(
14692         */* | ?:*)
14693           mv -f confcache "$cache_file"$$ &&
14694           mv -f "$cache_file"$$ "$cache_file" ;; #(
14695         *)
14696           mv -f confcache "$cache_file" ;;
14697         esac
14698       fi
14699     fi
14700   else
14701     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
14702 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
14703   fi
14704 fi
14705 rm -f confcache
14706
14707 test "x$prefix" = xNONE && prefix=$ac_default_prefix
14708 # Let make expand exec_prefix.
14709 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14710
14711 DEFS=-DHAVE_CONFIG_H
14712
14713 ac_libobjs=
14714 ac_ltlibobjs=
14715 U=
14716 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
14717   # 1. Remove the extension, and $U if already installed.
14718   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
14719   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
14720   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
14721   #    will be set to the directory where LIBOBJS objects are built.
14722   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
14723   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
14724 done
14725 LIBOBJS=$ac_libobjs
14726
14727 LTLIBOBJS=$ac_ltlibobjs
14728
14729
14730
14731
14732 : "${CONFIG_STATUS=./config.status}"
14733 ac_write_fail=0
14734 ac_clean_files_save=$ac_clean_files
14735 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
14736 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
14737 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
14738 as_write_fail=0
14739 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
14740 #! $SHELL
14741 # Generated by $as_me.
14742 # Run this file to recreate the current configuration.
14743 # Compiler output produced by configure, useful for debugging
14744 # configure, is in config.log if it exists.
14745
14746 debug=false
14747 ac_cs_recheck=false
14748 ac_cs_silent=false
14749
14750 SHELL=\${CONFIG_SHELL-$SHELL}
14751 export SHELL
14752 _ASEOF
14753 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14754 ## -------------------- ##
14755 ## M4sh Initialization. ##
14756 ## -------------------- ##
14757
14758 # Be more Bourne compatible
14759 DUALCASE=1; export DUALCASE # for MKS sh
14760 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
14761   emulate sh
14762   NULLCMD=:
14763   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
14764   # is contrary to our usage.  Disable this feature.
14765   alias -g '${1+"$@"}'='"$@"'
14766   setopt NO_GLOB_SUBST
14767 else
14768   case `(set -o) 2>/dev/null` in #(
14769   *posix*) :
14770     set -o posix ;; #(
14771   *) :
14772      ;;
14773 esac
14774 fi
14775
14776
14777 as_nl='
14778 '
14779 export as_nl
14780 # Printing a long string crashes Solaris 7 /usr/bin/printf.
14781 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14782 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14783 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14784 # Prefer a ksh shell builtin over an external printf program on Solaris,
14785 # but without wasting forks for bash or zsh.
14786 if test -z "$BASH_VERSION$ZSH_VERSION" \
14787     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14788   as_echo='print -r --'
14789   as_echo_n='print -rn --'
14790 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14791   as_echo='printf %s\n'
14792   as_echo_n='printf %s'
14793 else
14794   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14795     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14796     as_echo_n='/usr/ucb/echo -n'
14797   else
14798     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14799     as_echo_n_body='eval
14800       arg=$1;
14801       case $arg in #(
14802       *"$as_nl"*)
14803         expr "X$arg" : "X\\(.*\\)$as_nl";
14804         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14805       esac;
14806       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14807     '
14808     export as_echo_n_body
14809     as_echo_n='sh -c $as_echo_n_body as_echo'
14810   fi
14811   export as_echo_body
14812   as_echo='sh -c $as_echo_body as_echo'
14813 fi
14814
14815 # The user is always right.
14816 if test "${PATH_SEPARATOR+set}" != set; then
14817   PATH_SEPARATOR=:
14818   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14819     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14820       PATH_SEPARATOR=';'
14821   }
14822 fi
14823
14824
14825 # IFS
14826 # We need space, tab and new line, in precisely that order.  Quoting is
14827 # there to prevent editors from complaining about space-tab.
14828 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
14829 # splitting by setting IFS to empty value.)
14830 IFS=" ""        $as_nl"
14831
14832 # Find who we are.  Look in the path if we contain no directory separator.
14833 as_myself=
14834 case $0 in #((
14835   *[\\/]* ) as_myself=$0 ;;
14836   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14837 for as_dir in $PATH
14838 do
14839   IFS=$as_save_IFS
14840   test -z "$as_dir" && as_dir=.
14841     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14842   done
14843 IFS=$as_save_IFS
14844
14845      ;;
14846 esac
14847 # We did not find ourselves, most probably we were run as `sh COMMAND'
14848 # in which case we are not to be found in the path.
14849 if test "x$as_myself" = x; then
14850   as_myself=$0
14851 fi
14852 if test ! -f "$as_myself"; then
14853   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14854   exit 1
14855 fi
14856
14857 # Unset variables that we do not need and which cause bugs (e.g. in
14858 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
14859 # suppresses any "Segmentation fault" message there.  '((' could
14860 # trigger a bug in pdksh 5.2.14.
14861 for as_var in BASH_ENV ENV MAIL MAILPATH
14862 do eval test x\${$as_var+set} = xset \
14863   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
14864 done
14865 PS1='$ '
14866 PS2='> '
14867 PS4='+ '
14868
14869 # NLS nuisances.
14870 LC_ALL=C
14871 export LC_ALL
14872 LANGUAGE=C
14873 export LANGUAGE
14874
14875 # CDPATH.
14876 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14877
14878
14879 # as_fn_error STATUS ERROR [LINENO LOG_FD]
14880 # ----------------------------------------
14881 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14882 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
14883 # script with STATUS, using 1 if that was 0.
14884 as_fn_error ()
14885 {
14886   as_status=$1; test $as_status -eq 0 && as_status=1
14887   if test "$4"; then
14888     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14889     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
14890   fi
14891   $as_echo "$as_me: error: $2" >&2
14892   as_fn_exit $as_status
14893 } # as_fn_error
14894
14895
14896 # as_fn_set_status STATUS
14897 # -----------------------
14898 # Set $? to STATUS, without forking.
14899 as_fn_set_status ()
14900 {
14901   return $1
14902 } # as_fn_set_status
14903
14904 # as_fn_exit STATUS
14905 # -----------------
14906 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14907 as_fn_exit ()
14908 {
14909   set +e
14910   as_fn_set_status $1
14911   exit $1
14912 } # as_fn_exit
14913
14914 # as_fn_unset VAR
14915 # ---------------
14916 # Portably unset VAR.
14917 as_fn_unset ()
14918 {
14919   { eval $1=; unset $1;}
14920 }
14921 as_unset=as_fn_unset
14922 # as_fn_append VAR VALUE
14923 # ----------------------
14924 # Append the text in VALUE to the end of the definition contained in VAR. Take
14925 # advantage of any shell optimizations that allow amortized linear growth over
14926 # repeated appends, instead of the typical quadratic growth present in naive
14927 # implementations.
14928 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14929   eval 'as_fn_append ()
14930   {
14931     eval $1+=\$2
14932   }'
14933 else
14934   as_fn_append ()
14935   {
14936     eval $1=\$$1\$2
14937   }
14938 fi # as_fn_append
14939
14940 # as_fn_arith ARG...
14941 # ------------------
14942 # Perform arithmetic evaluation on the ARGs, and store the result in the
14943 # global $as_val. Take advantage of shells that can avoid forks. The arguments
14944 # must be portable across $(()) and expr.
14945 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14946   eval 'as_fn_arith ()
14947   {
14948     as_val=$(( $* ))
14949   }'
14950 else
14951   as_fn_arith ()
14952   {
14953     as_val=`expr "$@" || test $? -eq 1`
14954   }
14955 fi # as_fn_arith
14956
14957
14958 if expr a : '\(a\)' >/dev/null 2>&1 &&
14959    test "X`expr 00001 : '.*\(...\)'`" = X001; then
14960   as_expr=expr
14961 else
14962   as_expr=false
14963 fi
14964
14965 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14966   as_basename=basename
14967 else
14968   as_basename=false
14969 fi
14970
14971 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14972   as_dirname=dirname
14973 else
14974   as_dirname=false
14975 fi
14976
14977 as_me=`$as_basename -- "$0" ||
14978 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14979          X"$0" : 'X\(//\)$' \| \
14980          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
14981 $as_echo X/"$0" |
14982     sed '/^.*\/\([^/][^/]*\)\/*$/{
14983             s//\1/
14984             q
14985           }
14986           /^X\/\(\/\/\)$/{
14987             s//\1/
14988             q
14989           }
14990           /^X\/\(\/\).*/{
14991             s//\1/
14992             q
14993           }
14994           s/.*/./; q'`
14995
14996 # Avoid depending upon Character Ranges.
14997 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14998 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14999 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15000 as_cr_digits='0123456789'
15001 as_cr_alnum=$as_cr_Letters$as_cr_digits
15002
15003 ECHO_C= ECHO_N= ECHO_T=
15004 case `echo -n x` in #(((((
15005 -n*)
15006   case `echo 'xy\c'` in
15007   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
15008   xy)  ECHO_C='\c';;
15009   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
15010        ECHO_T=' ';;
15011   esac;;
15012 *)
15013   ECHO_N='-n';;
15014 esac
15015
15016 rm -f conf$$ conf$$.exe conf$$.file
15017 if test -d conf$$.dir; then
15018   rm -f conf$$.dir/conf$$.file
15019 else
15020   rm -f conf$$.dir
15021   mkdir conf$$.dir 2>/dev/null
15022 fi
15023 if (echo >conf$$.file) 2>/dev/null; then
15024   if ln -s conf$$.file conf$$ 2>/dev/null; then
15025     as_ln_s='ln -s'
15026     # ... but there are two gotchas:
15027     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15028     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
15029     # In both cases, we have to default to `cp -pR'.
15030     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
15031       as_ln_s='cp -pR'
15032   elif ln conf$$.file conf$$ 2>/dev/null; then
15033     as_ln_s=ln
15034   else
15035     as_ln_s='cp -pR'
15036   fi
15037 else
15038   as_ln_s='cp -pR'
15039 fi
15040 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15041 rmdir conf$$.dir 2>/dev/null
15042
15043
15044 # as_fn_mkdir_p
15045 # -------------
15046 # Create "$as_dir" as a directory, including parents if necessary.
15047 as_fn_mkdir_p ()
15048 {
15049
15050   case $as_dir in #(
15051   -*) as_dir=./$as_dir;;
15052   esac
15053   test -d "$as_dir" || eval $as_mkdir_p || {
15054     as_dirs=
15055     while :; do
15056       case $as_dir in #(
15057       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15058       *) as_qdir=$as_dir;;
15059       esac
15060       as_dirs="'$as_qdir' $as_dirs"
15061       as_dir=`$as_dirname -- "$as_dir" ||
15062 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15063          X"$as_dir" : 'X\(//\)[^/]' \| \
15064          X"$as_dir" : 'X\(//\)$' \| \
15065          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15066 $as_echo X"$as_dir" |
15067     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15068             s//\1/
15069             q
15070           }
15071           /^X\(\/\/\)[^/].*/{
15072             s//\1/
15073             q
15074           }
15075           /^X\(\/\/\)$/{
15076             s//\1/
15077             q
15078           }
15079           /^X\(\/\).*/{
15080             s//\1/
15081             q
15082           }
15083           s/.*/./; q'`
15084       test -d "$as_dir" && break
15085     done
15086     test -z "$as_dirs" || eval "mkdir $as_dirs"
15087   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
15088
15089
15090 } # as_fn_mkdir_p
15091 if mkdir -p . 2>/dev/null; then
15092   as_mkdir_p='mkdir -p "$as_dir"'
15093 else
15094   test -d ./-p && rmdir ./-p
15095   as_mkdir_p=false
15096 fi
15097
15098
15099 # as_fn_executable_p FILE
15100 # -----------------------
15101 # Test if FILE is an executable regular file.
15102 as_fn_executable_p ()
15103 {
15104   test -f "$1" && test -x "$1"
15105 } # as_fn_executable_p
15106 as_test_x='test -x'
15107 as_executable_p=as_fn_executable_p
15108
15109 # Sed expression to map a string onto a valid CPP name.
15110 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
15111
15112 # Sed expression to map a string onto a valid variable name.
15113 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
15114
15115
15116 exec 6>&1
15117 ## ----------------------------------- ##
15118 ## Main body of $CONFIG_STATUS script. ##
15119 ## ----------------------------------- ##
15120 _ASEOF
15121 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
15122
15123 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15124 # Save the log message, to keep $0 and so on meaningful, and to
15125 # report actual input values of CONFIG_FILES etc. instead of their
15126 # values after options handling.
15127 ac_log="
15128 This file was extended by PostgreSQL $as_me 9.4devel, which was
15129 generated by GNU Autoconf 2.69.  Invocation command line was
15130
15131   CONFIG_FILES    = $CONFIG_FILES
15132   CONFIG_HEADERS  = $CONFIG_HEADERS
15133   CONFIG_LINKS    = $CONFIG_LINKS
15134   CONFIG_COMMANDS = $CONFIG_COMMANDS
15135   $ $0 $@
15136
15137 on `(hostname || uname -n) 2>/dev/null | sed 1q`
15138 "
15139
15140 _ACEOF
15141
15142 case $ac_config_files in *"
15143 "*) set x $ac_config_files; shift; ac_config_files=$*;;
15144 esac
15145
15146 case $ac_config_headers in *"
15147 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15148 esac
15149
15150
15151 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15152 # Files that config.status was made for.
15153 config_files="$ac_config_files"
15154 config_headers="$ac_config_headers"
15155 config_links="$ac_config_links"
15156 config_commands="$ac_config_commands"
15157
15158 _ACEOF
15159
15160 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15161 ac_cs_usage="\
15162 \`$as_me' instantiates files and other configuration actions
15163 from templates according to the current configuration.  Unless the files
15164 and actions are specified as TAGs, all are instantiated by default.
15165
15166 Usage: $0 [OPTION]... [TAG]...
15167
15168   -h, --help       print this help, then exit
15169   -V, --version    print version number and configuration settings, then exit
15170       --config     print configuration, then exit
15171   -q, --quiet, --silent
15172                    do not print progress messages
15173   -d, --debug      don't remove temporary files
15174       --recheck    update $as_me by reconfiguring in the same conditions
15175       --file=FILE[:TEMPLATE]
15176                    instantiate the configuration file FILE
15177       --header=FILE[:TEMPLATE]
15178                    instantiate the configuration header FILE
15179
15180 Configuration files:
15181 $config_files
15182
15183 Configuration headers:
15184 $config_headers
15185
15186 Configuration links:
15187 $config_links
15188
15189 Configuration commands:
15190 $config_commands
15191
15192 Report bugs to <pgsql-bugs@postgresql.org>."
15193
15194 _ACEOF
15195 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15196 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
15197 ac_cs_version="\\
15198 PostgreSQL config.status 9.4devel
15199 configured by $0, generated by GNU Autoconf 2.69,
15200   with options \\"\$ac_cs_config\\"
15201
15202 Copyright (C) 2012 Free Software Foundation, Inc.
15203 This config.status script is free software; the Free Software Foundation
15204 gives unlimited permission to copy, distribute and modify it."
15205
15206 ac_pwd='$ac_pwd'
15207 srcdir='$srcdir'
15208 INSTALL='$INSTALL'
15209 MKDIR_P='$MKDIR_P'
15210 AWK='$AWK'
15211 test -n "\$AWK" || AWK=awk
15212 _ACEOF
15213
15214 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15215 # The default lists apply if the user does not specify any file.
15216 ac_need_defaults=:
15217 while test $# != 0
15218 do
15219   case $1 in
15220   --*=?*)
15221     ac_option=`expr "X$1" : 'X\([^=]*\)='`
15222     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
15223     ac_shift=:
15224     ;;
15225   --*=)
15226     ac_option=`expr "X$1" : 'X\([^=]*\)='`
15227     ac_optarg=
15228     ac_shift=:
15229     ;;
15230   *)
15231     ac_option=$1
15232     ac_optarg=$2
15233     ac_shift=shift
15234     ;;
15235   esac
15236
15237   case $ac_option in
15238   # Handling of the options.
15239   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15240     ac_cs_recheck=: ;;
15241   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
15242     $as_echo "$ac_cs_version"; exit ;;
15243   --config | --confi | --conf | --con | --co | --c )
15244     $as_echo "$ac_cs_config"; exit ;;
15245   --debug | --debu | --deb | --de | --d | -d )
15246     debug=: ;;
15247   --file | --fil | --fi | --f )
15248     $ac_shift
15249     case $ac_optarg in
15250     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15251     '') as_fn_error $? "missing file argument" ;;
15252     esac
15253     as_fn_append CONFIG_FILES " '$ac_optarg'"
15254     ac_need_defaults=false;;
15255   --header | --heade | --head | --hea )
15256     $ac_shift
15257     case $ac_optarg in
15258     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15259     esac
15260     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
15261     ac_need_defaults=false;;
15262   --he | --h)
15263     # Conflict between --help and --header
15264     as_fn_error $? "ambiguous option: \`$1'
15265 Try \`$0 --help' for more information.";;
15266   --help | --hel | -h )
15267     $as_echo "$ac_cs_usage"; exit ;;
15268   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15269   | -silent | --silent | --silen | --sile | --sil | --si | --s)
15270     ac_cs_silent=: ;;
15271
15272   # This is an error.
15273   -*) as_fn_error $? "unrecognized option: \`$1'
15274 Try \`$0 --help' for more information." ;;
15275
15276   *) as_fn_append ac_config_targets " $1"
15277      ac_need_defaults=false ;;
15278
15279   esac
15280   shift
15281 done
15282
15283 ac_configure_extra_args=
15284
15285 if $ac_cs_silent; then
15286   exec 6>/dev/null
15287   ac_configure_extra_args="$ac_configure_extra_args --silent"
15288 fi
15289
15290 _ACEOF
15291 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15292 if \$ac_cs_recheck; then
15293   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
15294   shift
15295   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15296   CONFIG_SHELL='$SHELL'
15297   export CONFIG_SHELL
15298   exec "\$@"
15299 fi
15300
15301 _ACEOF
15302 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15303 exec 5>>config.log
15304 {
15305   echo
15306   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15307 ## Running $as_me. ##
15308 _ASBOX
15309   $as_echo "$ac_log"
15310 } >&5
15311
15312 _ACEOF
15313 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15314 _ACEOF
15315
15316 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15317
15318 # Handling of arguments.
15319 for ac_config_target in $ac_config_targets
15320 do
15321   case $ac_config_target in
15322     "src/backend/port/tas.s") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
15323     "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
15324     "src/Makefile.global") CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
15325     "src/backend/port/dynloader.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/dynloader.c:src/backend/port/dynloader/${template}.c" ;;
15326     "src/backend/port/pg_sema.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
15327     "src/backend/port/pg_shmem.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
15328     "src/backend/port/pg_latch.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_latch.c:${LATCH_IMPLEMENTATION}" ;;
15329     "src/include/dynloader.h") CONFIG_LINKS="$CONFIG_LINKS src/include/dynloader.h:src/backend/port/dynloader/${template}.h" ;;
15330     "src/include/pg_config_os.h") CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
15331     "src/Makefile.port") CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
15332     "check_win32_symlinks") CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
15333     "src/include/pg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
15334     "src/include/pg_config_ext.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config_ext.h" ;;
15335     "src/interfaces/ecpg/include/ecpg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
15336
15337   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
15338   esac
15339 done
15340
15341
15342 # If the user did not use the arguments to specify the items to instantiate,
15343 # then the envvar interface is used.  Set only those that are not.
15344 # We use the long form for the default assignment because of an extremely
15345 # bizarre bug on SunOS 4.1.3.
15346 if $ac_need_defaults; then
15347   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15348   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15349   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
15350   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
15351 fi
15352
15353 # Have a temporary directory for convenience.  Make it in the build tree
15354 # simply because there is no reason against having it here, and in addition,
15355 # creating and moving files from /tmp can sometimes cause problems.
15356 # Hook for its removal unless debugging.
15357 # Note that there is a small window in which the directory will not be cleaned:
15358 # after its creation but before its name has been assigned to `$tmp'.
15359 $debug ||
15360 {
15361   tmp= ac_tmp=
15362   trap 'exit_status=$?
15363   : "${ac_tmp:=$tmp}"
15364   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
15365 ' 0
15366   trap 'as_fn_exit 1' 1 2 13 15
15367 }
15368 # Create a (secure) tmp directory for tmp files.
15369
15370 {
15371   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
15372   test -d "$tmp"
15373 }  ||
15374 {
15375   tmp=./conf$$-$RANDOM
15376   (umask 077 && mkdir "$tmp")
15377 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
15378 ac_tmp=$tmp
15379
15380 # Set up the scripts for CONFIG_FILES section.
15381 # No need to generate them if there are no CONFIG_FILES.
15382 # This happens for instance with `./config.status config.h'.
15383 if test -n "$CONFIG_FILES"; then
15384
15385
15386 ac_cr=`echo X | tr X '\015'`
15387 # On cygwin, bash can eat \r inside `` if the user requested igncr.
15388 # But we know of no other shell where ac_cr would be empty at this
15389 # point, so we can use a bashism as a fallback.
15390 if test "x$ac_cr" = x; then
15391   eval ac_cr=\$\'\\r\'
15392 fi
15393 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15394 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
15395   ac_cs_awk_cr='\\r'
15396 else
15397   ac_cs_awk_cr=$ac_cr
15398 fi
15399
15400 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
15401 _ACEOF
15402
15403
15404 {
15405   echo "cat >conf$$subs.awk <<_ACEOF" &&
15406   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15407   echo "_ACEOF"
15408 } >conf$$subs.sh ||
15409   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15410 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
15411 ac_delim='%!_!# '
15412 for ac_last_try in false false false false false :; do
15413   . ./conf$$subs.sh ||
15414     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15415
15416   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15417   if test $ac_delim_n = $ac_delim_num; then
15418     break
15419   elif $ac_last_try; then
15420     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15421   else
15422     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15423   fi
15424 done
15425 rm -f conf$$subs.sh
15426
15427 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15428 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
15429 _ACEOF
15430 sed -n '
15431 h
15432 s/^/S["/; s/!.*/"]=/
15433 p
15434 g
15435 s/^[^!]*!//
15436 :repl
15437 t repl
15438 s/'"$ac_delim"'$//
15439 t delim
15440 :nl
15441 h
15442 s/\(.\{148\}\)..*/\1/
15443 t more1
15444 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15445 p
15446 n
15447 b repl
15448 :more1
15449 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15450 p
15451 g
15452 s/.\{148\}//
15453 t nl
15454 :delim
15455 h
15456 s/\(.\{148\}\)..*/\1/
15457 t more2
15458 s/["\\]/\\&/g; s/^/"/; s/$/"/
15459 p
15460 b
15461 :more2
15462 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15463 p
15464 g
15465 s/.\{148\}//
15466 t delim
15467 ' <conf$$subs.awk | sed '
15468 /^[^""]/{
15469   N
15470   s/\n//
15471 }
15472 ' >>$CONFIG_STATUS || ac_write_fail=1
15473 rm -f conf$$subs.awk
15474 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15475 _ACAWK
15476 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
15477   for (key in S) S_is_set[key] = 1
15478   FS = "\a"
15479
15480 }
15481 {
15482   line = $ 0
15483   nfields = split(line, field, "@")
15484   substed = 0
15485   len = length(field[1])
15486   for (i = 2; i < nfields; i++) {
15487     key = field[i]
15488     keylen = length(key)
15489     if (S_is_set[key]) {
15490       value = S[key]
15491       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
15492       len += length(value) + length(field[++i])
15493       substed = 1
15494     } else
15495       len += 1 + keylen
15496   }
15497
15498   print line
15499 }
15500
15501 _ACAWK
15502 _ACEOF
15503 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15504 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
15505   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
15506 else
15507   cat
15508 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
15509   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
15510 _ACEOF
15511
15512 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
15513 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
15514 # trailing colons and then remove the whole line if VPATH becomes empty
15515 # (actually we leave an empty line to preserve line numbers).
15516 if test "x$srcdir" = x.; then
15517   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
15518 h
15519 s///
15520 s/^/:/
15521 s/[      ]*$/:/
15522 s/:\$(srcdir):/:/g
15523 s/:\${srcdir}:/:/g
15524 s/:@srcdir@:/:/g
15525 s/^:*//
15526 s/:*$//
15527 x
15528 s/\(=[   ]*\).*/\1/
15529 G
15530 s/\n//
15531 s/^[^=]*=[       ]*$//
15532 }'
15533 fi
15534
15535 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15536 fi # test -n "$CONFIG_FILES"
15537
15538 # Set up the scripts for CONFIG_HEADERS section.
15539 # No need to generate them if there are no CONFIG_HEADERS.
15540 # This happens for instance with `./config.status Makefile'.
15541 if test -n "$CONFIG_HEADERS"; then
15542 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
15543 BEGIN {
15544 _ACEOF
15545
15546 # Transform confdefs.h into an awk script `defines.awk', embedded as
15547 # here-document in config.status, that substitutes the proper values into
15548 # config.h.in to produce config.h.
15549
15550 # Create a delimiter string that does not exist in confdefs.h, to ease
15551 # handling of long lines.
15552 ac_delim='%!_!# '
15553 for ac_last_try in false false :; do
15554   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
15555   if test -z "$ac_tt"; then
15556     break
15557   elif $ac_last_try; then
15558     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
15559   else
15560     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15561   fi
15562 done
15563
15564 # For the awk script, D is an array of macro values keyed by name,
15565 # likewise P contains macro parameters if any.  Preserve backslash
15566 # newline sequences.
15567
15568 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
15569 sed -n '
15570 s/.\{148\}/&'"$ac_delim"'/g
15571 t rset
15572 :rset
15573 s/^[     ]*#[    ]*define[       ][      ]*/ /
15574 t def
15575 d
15576 :def
15577 s/\\$//
15578 t bsnl
15579 s/["\\]/\\&/g
15580 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
15581 D["\1"]=" \3"/p
15582 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
15583 d
15584 :bsnl
15585 s/["\\]/\\&/g
15586 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
15587 D["\1"]=" \3\\\\\\n"\\/p
15588 t cont
15589 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
15590 t cont
15591 d
15592 :cont
15593 n
15594 s/.\{148\}/&'"$ac_delim"'/g
15595 t clear
15596 :clear
15597 s/\\$//
15598 t bsnlc
15599 s/["\\]/\\&/g; s/^/"/; s/$/"/p
15600 d
15601 :bsnlc
15602 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
15603 b cont
15604 ' <confdefs.h | sed '
15605 s/'"$ac_delim"'/"\\\
15606 "/g' >>$CONFIG_STATUS || ac_write_fail=1
15607
15608 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15609   for (key in D) D_is_set[key] = 1
15610   FS = "\a"
15611 }
15612 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
15613   line = \$ 0
15614   split(line, arg, " ")
15615   if (arg[1] == "#") {
15616     defundef = arg[2]
15617     mac1 = arg[3]
15618   } else {
15619     defundef = substr(arg[1], 2)
15620     mac1 = arg[2]
15621   }
15622   split(mac1, mac2, "(") #)
15623   macro = mac2[1]
15624   prefix = substr(line, 1, index(line, defundef) - 1)
15625   if (D_is_set[macro]) {
15626     # Preserve the white space surrounding the "#".
15627     print prefix "define", macro P[macro] D[macro]
15628     next
15629   } else {
15630     # Replace #undef with comments.  This is necessary, for example,
15631     # in the case of _POSIX_SOURCE, which is predefined and required
15632     # on some systems where configure will not decide to define it.
15633     if (defundef == "undef") {
15634       print "/*", prefix defundef, macro, "*/"
15635       next
15636     }
15637   }
15638 }
15639 { print }
15640 _ACAWK
15641 _ACEOF
15642 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15643   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
15644 fi # test -n "$CONFIG_HEADERS"
15645
15646
15647 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS  :L $CONFIG_LINKS  :C $CONFIG_COMMANDS"
15648 shift
15649 for ac_tag
15650 do
15651   case $ac_tag in
15652   :[FHLC]) ac_mode=$ac_tag; continue;;
15653   esac
15654   case $ac_mode$ac_tag in
15655   :[FHL]*:*);;
15656   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
15657   :[FH]-) ac_tag=-:-;;
15658   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
15659   esac
15660   ac_save_IFS=$IFS
15661   IFS=:
15662   set x $ac_tag
15663   IFS=$ac_save_IFS
15664   shift
15665   ac_file=$1
15666   shift
15667
15668   case $ac_mode in
15669   :L) ac_source=$1;;
15670   :[FH])
15671     ac_file_inputs=
15672     for ac_f
15673     do
15674       case $ac_f in
15675       -) ac_f="$ac_tmp/stdin";;
15676       *) # Look for the file first in the build tree, then in the source tree
15677          # (if the path is not absolute).  The absolute path cannot be DOS-style,
15678          # because $ac_f cannot contain `:'.
15679          test -f "$ac_f" ||
15680            case $ac_f in
15681            [\\/$]*) false;;
15682            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
15683            esac ||
15684            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
15685       esac
15686       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
15687       as_fn_append ac_file_inputs " '$ac_f'"
15688     done
15689
15690     # Let's still pretend it is `configure' which instantiates (i.e., don't
15691     # use $as_me), people would be surprised to read:
15692     #    /* config.h.  Generated by config.status.  */
15693     configure_input='Generated from '`
15694           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
15695         `' by configure.'
15696     if test x"$ac_file" != x-; then
15697       configure_input="$ac_file.  $configure_input"
15698       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
15699 $as_echo "$as_me: creating $ac_file" >&6;}
15700     fi
15701     # Neutralize special characters interpreted by sed in replacement strings.
15702     case $configure_input in #(
15703     *\&* | *\|* | *\\* )
15704        ac_sed_conf_input=`$as_echo "$configure_input" |
15705        sed 's/[\\\\&|]/\\\\&/g'`;; #(
15706     *) ac_sed_conf_input=$configure_input;;
15707     esac
15708
15709     case $ac_tag in
15710     *:-:* | *:-) cat >"$ac_tmp/stdin" \
15711       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
15712     esac
15713     ;;
15714   esac
15715
15716   ac_dir=`$as_dirname -- "$ac_file" ||
15717 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15718          X"$ac_file" : 'X\(//\)[^/]' \| \
15719          X"$ac_file" : 'X\(//\)$' \| \
15720          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
15721 $as_echo X"$ac_file" |
15722     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15723             s//\1/
15724             q
15725           }
15726           /^X\(\/\/\)[^/].*/{
15727             s//\1/
15728             q
15729           }
15730           /^X\(\/\/\)$/{
15731             s//\1/
15732             q
15733           }
15734           /^X\(\/\).*/{
15735             s//\1/
15736             q
15737           }
15738           s/.*/./; q'`
15739   as_dir="$ac_dir"; as_fn_mkdir_p
15740   ac_builddir=.
15741
15742 case "$ac_dir" in
15743 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15744 *)
15745   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
15746   # A ".." for each directory in $ac_dir_suffix.
15747   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
15748   case $ac_top_builddir_sub in
15749   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15750   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15751   esac ;;
15752 esac
15753 ac_abs_top_builddir=$ac_pwd
15754 ac_abs_builddir=$ac_pwd$ac_dir_suffix
15755 # for backward compatibility:
15756 ac_top_builddir=$ac_top_build_prefix
15757
15758 case $srcdir in
15759   .)  # We are building in place.
15760     ac_srcdir=.
15761     ac_top_srcdir=$ac_top_builddir_sub
15762     ac_abs_top_srcdir=$ac_pwd ;;
15763   [\\/]* | ?:[\\/]* )  # Absolute name.
15764     ac_srcdir=$srcdir$ac_dir_suffix;
15765     ac_top_srcdir=$srcdir
15766     ac_abs_top_srcdir=$srcdir ;;
15767   *) # Relative name.
15768     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15769     ac_top_srcdir=$ac_top_build_prefix$srcdir
15770     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
15771 esac
15772 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
15773
15774
15775   case $ac_mode in
15776   :F)
15777   #
15778   # CONFIG_FILE
15779   #
15780
15781   case $INSTALL in
15782   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
15783   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
15784   esac
15785   ac_MKDIR_P=$MKDIR_P
15786   case $MKDIR_P in
15787   [\\/$]* | ?:[\\/]* ) ;;
15788   */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
15789   esac
15790 _ACEOF
15791
15792 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15793 # If the template does not know about datarootdir, expand it.
15794 # FIXME: This hack should be removed a few years after 2.60.
15795 ac_datarootdir_hack=; ac_datarootdir_seen=
15796 ac_sed_dataroot='
15797 /datarootdir/ {
15798   p
15799   q
15800 }
15801 /@datadir@/p
15802 /@docdir@/p
15803 /@infodir@/p
15804 /@localedir@/p
15805 /@mandir@/p'
15806 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
15807 *datarootdir*) ac_datarootdir_seen=yes;;
15808 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
15809   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15810 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
15811 _ACEOF
15812 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15813   ac_datarootdir_hack='
15814   s&@datadir@&$datadir&g
15815   s&@docdir@&$docdir&g
15816   s&@infodir@&$infodir&g
15817   s&@localedir@&$localedir&g
15818   s&@mandir@&$mandir&g
15819   s&\\\${datarootdir}&$datarootdir&g' ;;
15820 esac
15821 _ACEOF
15822
15823 # Neutralize VPATH when `$srcdir' = `.'.
15824 # Shell code in configure.ac might set extrasub.
15825 # FIXME: do we really want to maintain this feature?
15826 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15827 ac_sed_extra="$ac_vpsub
15828 $extrasub
15829 _ACEOF
15830 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15831 :t
15832 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
15833 s|@configure_input@|$ac_sed_conf_input|;t t
15834 s&@top_builddir@&$ac_top_builddir_sub&;t t
15835 s&@top_build_prefix@&$ac_top_build_prefix&;t t
15836 s&@srcdir@&$ac_srcdir&;t t
15837 s&@abs_srcdir@&$ac_abs_srcdir&;t t
15838 s&@top_srcdir@&$ac_top_srcdir&;t t
15839 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15840 s&@builddir@&$ac_builddir&;t t
15841 s&@abs_builddir@&$ac_abs_builddir&;t t
15842 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15843 s&@INSTALL@&$ac_INSTALL&;t t
15844 s&@MKDIR_P@&$ac_MKDIR_P&;t t
15845 $ac_datarootdir_hack
15846 "
15847 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
15848   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
15849
15850 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
15851   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
15852   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
15853       "$ac_tmp/out"`; test -z "$ac_out"; } &&
15854   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
15855 which seems to be undefined.  Please make sure it is defined" >&5
15856 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
15857 which seems to be undefined.  Please make sure it is defined" >&2;}
15858
15859   rm -f "$ac_tmp/stdin"
15860   case $ac_file in
15861   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
15862   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
15863   esac \
15864   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
15865  ;;
15866   :H)
15867   #
15868   # CONFIG_HEADER
15869   #
15870   if test x"$ac_file" != x-; then
15871     {
15872       $as_echo "/* $configure_input  */" \
15873       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
15874     } >"$ac_tmp/config.h" \
15875       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
15876     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
15877       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15878 $as_echo "$as_me: $ac_file is unchanged" >&6;}
15879     else
15880       rm -f "$ac_file"
15881       mv "$ac_tmp/config.h" "$ac_file" \
15882         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
15883     fi
15884   else
15885     $as_echo "/* $configure_input  */" \
15886       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
15887       || as_fn_error $? "could not create -" "$LINENO" 5
15888   fi
15889  ;;
15890   :L)
15891   #
15892   # CONFIG_LINK
15893   #
15894
15895   if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
15896     :
15897   else
15898     # Prefer the file from the source tree if names are identical.
15899     if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
15900       ac_source=$srcdir/$ac_source
15901     fi
15902
15903     { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
15904 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
15905
15906     if test ! -r "$ac_source"; then
15907       as_fn_error $? "$ac_source: file not found" "$LINENO" 5
15908     fi
15909     rm -f "$ac_file"
15910
15911     # Try a relative symlink, then a hard link, then a copy.
15912     case $ac_source in
15913     [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
15914         *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
15915     esac
15916     ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
15917       ln "$ac_source" "$ac_file" 2>/dev/null ||
15918       cp -p "$ac_source" "$ac_file" ||
15919       as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
15920   fi
15921  ;;
15922   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
15923 $as_echo "$as_me: executing $ac_file commands" >&6;}
15924  ;;
15925   esac
15926
15927
15928   case $ac_file$ac_mode in
15929     "check_win32_symlinks":C)
15930 # Links sometimes fail undetected on Mingw -
15931 # so here we detect it and warn the user
15932 for FILE in $CONFIG_LINKS
15933  do
15934         # test -e works for symlinks in the MinGW console
15935         test -e `expr "$FILE" : '\([^:]*\)'` || { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** link for $FILE -- please fix by hand" >&5
15936 $as_echo "$as_me: WARNING: *** link for $FILE -- please fix by hand" >&2;}
15937  done
15938  ;;
15939     "src/include/pg_config.h":H)
15940 # Update timestamp for pg_config.h (see Makefile.global)
15941 echo >src/include/stamp-h
15942  ;;
15943     "src/include/pg_config_ext.h":H)
15944 # Update timestamp for pg_config_ext.h (see Makefile.global)
15945 echo >src/include/stamp-ext-h
15946  ;;
15947     "src/interfaces/ecpg/include/ecpg_config.h":H) echo >src/interfaces/ecpg/include/stamp-h ;;
15948
15949   esac
15950 done # for ac_tag
15951
15952
15953 as_fn_exit 0
15954 _ACEOF
15955 ac_clean_files=$ac_clean_files_save
15956
15957 test $ac_write_fail = 0 ||
15958   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
15959
15960
15961 # configure is writing to config.log, and then calls config.status.
15962 # config.status does its own redirection, appending to config.log.
15963 # Unfortunately, on DOS this fails, as config.log is still kept open
15964 # by configure, so config.status won't be able to write to it; its
15965 # output is simply discarded.  So we exec the FD to /dev/null,
15966 # effectively closing config.log, so it can be properly (re)opened and
15967 # appended to by config.status.  When coming back to configure, we
15968 # need to make the FD available again.
15969 if test "$no_create" != yes; then
15970   ac_cs_success=:
15971   ac_config_status_args=
15972   test "$silent" = yes &&
15973     ac_config_status_args="$ac_config_status_args --quiet"
15974   exec 5>/dev/null
15975   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
15976   exec 5>>config.log
15977   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15978   # would make configure fail if this is the last instruction.
15979   $ac_cs_success || as_fn_exit 1
15980 fi
15981 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15982   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15983 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
15984 fi
15985