Consistently use "superuser" instead of "super user"
[pgsql.git] / configure
blob7542fe30a1818ec1db034800453ccb2c34e2c72f
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69 for PostgreSQL 15devel.
5 # Report bugs to <pgsql-bugs@lists.postgresql.org>.
8 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
11 # This configure script is free software; the Free Software Foundation
12 # gives unlimited permission to copy, distribute and modify it.
14 # Copyright (c) 1996-2021, PostgreSQL Global Development Group
15 ## -------------------- ##
16 ## M4sh Initialization. ##
17 ## -------------------- ##
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 *) :
34 esac
38 as_nl='
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"
69 export as_echo_n_body
70 as_echo_n='sh -c $as_echo_n_body as_echo'
72 export as_echo_body
73 as_echo='sh -c $as_echo_body as_echo'
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=';'
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"
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
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
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
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
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='+ '
130 # NLS nuisances.
131 LC_ALL=C
132 export LC_ALL
133 LANGUAGE=C
134 export LANGUAGE
136 # CDPATH.
137 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
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
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 *) :
178 esac
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; }
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 :
194 else
195 exitcode=1; echo positional parameters were not saved.
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
209 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
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
216 IFS=$as_save_IFS
217 test -z "$as_dir" && as_dir=.
218 as_found=:
219 case $as_dir in #(
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
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
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
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@lists.postgresql.org about your system,
273 $0: including any error possibly output before this
274 $0: message. Then install a modern shell, or manually run
275 $0: the script under such a shell if you do have one."
277 exit 1
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
287 ## --------------------- ##
288 ## M4sh Shell Functions. ##
289 ## --------------------- ##
290 # as_fn_unset VAR
291 # ---------------
292 # Portably unset VAR.
293 as_fn_unset ()
295 { eval $1=; unset $1;}
297 as_unset=as_fn_unset
299 # as_fn_set_status STATUS
300 # -----------------------
301 # Set $? to STATUS, without forking.
302 as_fn_set_status ()
304 return $1
305 } # as_fn_set_status
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 ()
312 set +e
313 as_fn_set_status $1
314 exit $1
315 } # as_fn_exit
317 # as_fn_mkdir_p
318 # -------------
319 # Create "$as_dir" as a directory, including parents if necessary.
320 as_fn_mkdir_p ()
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/
344 /^X\(\/\/\)[^/].*/{
345 s//\1/
348 /^X\(\/\/\)$/{
349 s//\1/
352 /^X\(\/\).*/{
353 s//\1/
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"
363 } # as_fn_mkdir_p
365 # as_fn_executable_p FILE
366 # -----------------------
367 # Test if FILE is an executable regular file.
368 as_fn_executable_p ()
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 ()
381 eval $1+=\$2
383 else
384 as_fn_append ()
386 eval $1=\$$1\$2
388 fi # as_fn_append
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 ()
398 as_val=$(( $* ))
400 else
401 as_fn_arith ()
403 as_val=`expr "$@" || test $? -eq 1`
405 fi # as_fn_arith
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 ()
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
420 $as_echo "$as_me: error: $2" >&2
421 as_fn_exit $as_status
422 } # as_fn_error
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
431 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
432 as_basename=basename
433 else
434 as_basename=false
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
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/
452 /^X\/\(\/\/\)$/{
453 s//\1/
456 /^X\/\(\/\).*/{
457 s//\1/
460 s/.*/./; q'`
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
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 '
477 /[$]LINENO/=
478 ' <$as_myself |
479 sed '
480 s/[$]LINENO.*/&-/
481 t lineno
483 :lineno
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; }
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
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;;
515 ECHO_N='-n';;
516 esac
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
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'
539 else
540 as_ln_s='cp -pR'
542 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
543 rmdir conf$$.dir 2>/dev/null
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
552 as_test_x='test -x'
553 as_executable_p=as_fn_executable_p
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'"
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'"
562 test -n "$DJDIR" || exec 7<&0 </dev/null
563 exec 6>&1
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`
571 # Initializations.
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=
582 # Identity of this package.
583 PACKAGE_NAME='PostgreSQL'
584 PACKAGE_TARNAME='postgresql'
585 PACKAGE_VERSION='15devel'
586 PACKAGE_STRING='PostgreSQL 15devel'
587 PACKAGE_BUGREPORT='pgsql-bugs@lists.postgresql.org'
588 PACKAGE_URL='https://www.postgresql.org/'
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"
628 ac_subst_vars='LTLIBOBJS
629 vpath_build
630 PG_SYSROOT
631 PG_VERSION_NUM
632 PROVE
633 DBTOEPUB
635 XSLTPROC
636 XMLLINT
637 TCL_SHLIB_LD_LIBS
638 TCL_SHARED_BUILD
639 TCL_LIB_SPEC
640 TCL_LIBS
641 TCL_INCLUDE_SPEC
642 TCL_CONFIG_SH
643 TCLSH
644 XGETTEXT
645 MSGMERGE
646 MSGFMT_FLAGS
647 MSGFMT
648 PG_CRC32C_OBJS
649 CFLAGS_ARMV8_CRC32C
650 CFLAGS_SSE42
651 have_win32_dbghelp
652 LIBOBJS
653 UUID_LIBS
654 LDAP_LIBS_BE
655 LDAP_LIBS_FE
656 with_ssl
657 PTHREAD_CFLAGS
658 PTHREAD_LIBS
659 PTHREAD_CC
660 ax_pthread_config
661 EGREP
662 GREP
665 python_additional_libs
666 python_libspec
667 python_libdir
668 python_includespec
669 python_version
670 python_majorversion
671 PYTHON
672 perl_embed_ldflags
673 perl_embed_ccflags
674 perl_includespec
675 perl_useshrplib
676 perl_privlibexp
677 perl_archlibexp
678 PERL
679 FLEXFLAGS
680 FLEX
681 BISONFLAGS
682 BISON
683 MKDIR_P
684 LN_S
686 install_bin
687 INSTALL_DATA
688 INSTALL_SCRIPT
689 INSTALL_PROGRAM
690 WINDRES
691 DLLWRAP
692 DLLTOOL
694 STRIP_SHARED_LIB
695 STRIP_STATIC_LIB
696 STRIP
697 RANLIB
698 with_gnu_ld
700 LDFLAGS_SL
701 LDFLAGS_EX
702 LZ4_LIBS
703 LZ4_CFLAGS
704 with_lz4
705 with_zlib
706 with_system_tzdata
707 with_libxslt
708 XML2_LIBS
709 XML2_CFLAGS
710 XML2_CONFIG
711 with_libxml
712 with_uuid
713 with_readline
714 with_systemd
715 with_selinux
716 with_ldap
717 with_krb_srvnam
718 krb_srvtab
719 with_gssapi
720 with_python
721 with_perl
722 with_tcl
723 ICU_LIBS
724 ICU_CFLAGS
725 with_icu
726 enable_thread_safety
727 INCLUDES
728 autodepend
729 PKG_CONFIG_LIBDIR
730 PKG_CONFIG_PATH
731 PKG_CONFIG
735 CFLAGS_SL
736 BITCODE_CXXFLAGS
737 BITCODE_CFLAGS
738 CFLAGS_VECTORIZE
739 CFLAGS_UNROLL_LOOPS
740 PERMIT_DECLARATION_AFTER_STATEMENT
741 LLVM_BINPATH
742 LLVM_CXXFLAGS
743 LLVM_CFLAGS
744 LLVM_CPPFLAGS
745 LLVM_LIBS
746 CLANG
747 LLVM_CONFIG
749 with_llvm
750 SUN_STUDIO_CC
751 ac_ct_CXX
752 CXXFLAGS
754 OBJEXT
755 EXEEXT
756 ac_ct_CC
757 CPPFLAGS
758 LDFLAGS
759 CFLAGS
761 enable_tap_tests
762 enable_dtrace
763 DTRACEFLAGS
764 DTRACE
765 enable_coverage
766 GENHTML
767 LCOV
768 GCOV
769 enable_debug
770 enable_rpath
771 default_port
772 WANTED_LANGUAGES
773 enable_nls
774 PORTNAME
775 host_os
776 host_vendor
777 host_cpu
778 host
779 build_os
780 build_vendor
781 build_cpu
782 build
783 PG_MAJORVERSION
784 target_alias
785 host_alias
786 build_alias
787 LIBS
788 ECHO_T
789 ECHO_N
790 ECHO_C
791 DEFS
792 mandir
793 localedir
794 libdir
795 psdir
796 pdfdir
797 dvidir
798 htmldir
799 infodir
800 docdir
801 oldincludedir
802 includedir
803 localstatedir
804 sharedstatedir
805 sysconfdir
806 datadir
807 datarootdir
808 libexecdir
809 sbindir
810 bindir
811 program_transform_name
812 prefix
813 exec_prefix
814 PACKAGE_URL
815 PACKAGE_BUGREPORT
816 PACKAGE_STRING
817 PACKAGE_VERSION
818 PACKAGE_TARNAME
819 PACKAGE_NAME
820 PATH_SEPARATOR
821 SHELL'
822 ac_subst_files=''
823 ac_user_opts='
824 enable_option_checking
825 with_extra_version
826 with_template
827 with_includes
828 with_libraries
829 with_libs
830 enable_integer_datetimes
831 enable_nls
832 with_pgport
833 enable_rpath
834 enable_spinlocks
835 enable_atomics
836 enable_debug
837 enable_profiling
838 enable_coverage
839 enable_dtrace
840 enable_tap_tests
841 with_blocksize
842 with_segsize
843 with_wal_blocksize
844 with_CC
845 with_llvm
846 enable_depend
847 enable_cassert
848 enable_thread_safety
849 with_icu
850 with_tcl
851 with_tclconfig
852 with_perl
853 with_python
854 with_gssapi
855 with_krb_srvnam
856 with_pam
857 with_bsd_auth
858 with_ldap
859 with_bonjour
860 with_selinux
861 with_systemd
862 with_readline
863 with_libedit_preferred
864 with_uuid
865 with_ossp_uuid
866 with_libxml
867 with_libxslt
868 with_system_tzdata
869 with_zlib
870 with_lz4
871 with_gnu_ld
872 with_ssl
873 with_openssl
874 enable_largefile
876 ac_precious_vars='build_alias
877 host_alias
878 target_alias
880 CFLAGS
881 LDFLAGS
882 LIBS
883 CPPFLAGS
885 CXXFLAGS
887 LLVM_CONFIG
888 CLANG
890 PKG_CONFIG
891 PKG_CONFIG_PATH
892 PKG_CONFIG_LIBDIR
893 ICU_CFLAGS
894 ICU_LIBS
895 XML2_CONFIG
896 XML2_CFLAGS
897 XML2_LIBS
898 LZ4_CFLAGS
899 LZ4_LIBS
900 LDFLAGS_EX
901 LDFLAGS_SL
902 PERL
903 PYTHON
904 MSGFMT
905 TCLSH'
908 # Initialize some variables set by options.
909 ac_init_help=
910 ac_init_version=false
911 ac_unrecognized_opts=
912 ac_unrecognized_sep=
913 # The variables have the same names as the options, with
914 # dashes changed to underlines.
915 cache_file=/dev/null
916 exec_prefix=NONE
917 no_create=
918 no_recursion=
919 prefix=NONE
920 program_prefix=NONE
921 program_suffix=NONE
922 program_transform_name=s,x,x,
923 silent=
924 site=
925 srcdir=
926 verbose=
927 x_includes=NONE
928 x_libraries=NONE
930 # Installation directory options.
931 # These are left unexpanded so users can "make install exec_prefix=/foo"
932 # and all the variables that are supposed to be based on exec_prefix
933 # by default will actually change.
934 # Use braces instead of parens because sh, perl, etc. also accept them.
935 # (The list follows the same order as the GNU Coding Standards.)
936 bindir='${exec_prefix}/bin'
937 sbindir='${exec_prefix}/sbin'
938 libexecdir='${exec_prefix}/libexec'
939 datarootdir='${prefix}/share'
940 datadir='${datarootdir}'
941 sysconfdir='${prefix}/etc'
942 sharedstatedir='${prefix}/com'
943 localstatedir='${prefix}/var'
944 includedir='${prefix}/include'
945 oldincludedir='/usr/include'
946 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
947 infodir='${datarootdir}/info'
948 htmldir='${docdir}'
949 dvidir='${docdir}'
950 pdfdir='${docdir}'
951 psdir='${docdir}'
952 libdir='${exec_prefix}/lib'
953 localedir='${datarootdir}/locale'
954 mandir='${datarootdir}/man'
956 ac_prev=
957 ac_dashdash=
958 for ac_option
960 # If the previous option needs an argument, assign it.
961 if test -n "$ac_prev"; then
962 eval $ac_prev=\$ac_option
963 ac_prev=
964 continue
967 case $ac_option in
968 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
969 *=) ac_optarg= ;;
970 *) ac_optarg=yes ;;
971 esac
973 # Accept the important Cygnus configure options, so we can diagnose typos.
975 case $ac_dashdash$ac_option in
977 ac_dashdash=yes ;;
979 -bindir | --bindir | --bindi | --bind | --bin | --bi)
980 ac_prev=bindir ;;
981 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
982 bindir=$ac_optarg ;;
984 -build | --build | --buil | --bui | --bu)
985 ac_prev=build_alias ;;
986 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
987 build_alias=$ac_optarg ;;
989 -cache-file | --cache-file | --cache-fil | --cache-fi \
990 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
991 ac_prev=cache_file ;;
992 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
993 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
994 cache_file=$ac_optarg ;;
996 --config-cache | -C)
997 cache_file=config.cache ;;
999 -datadir | --datadir | --datadi | --datad)
1000 ac_prev=datadir ;;
1001 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1002 datadir=$ac_optarg ;;
1004 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1005 | --dataroo | --dataro | --datar)
1006 ac_prev=datarootdir ;;
1007 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1008 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1009 datarootdir=$ac_optarg ;;
1011 -disable-* | --disable-*)
1012 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1013 # Reject names that are not valid shell variable names.
1014 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1015 as_fn_error $? "invalid feature name: $ac_useropt"
1016 ac_useropt_orig=$ac_useropt
1017 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1018 case $ac_user_opts in
1020 "enable_$ac_useropt"
1021 "*) ;;
1022 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1023 ac_unrecognized_sep=', ';;
1024 esac
1025 eval enable_$ac_useropt=no ;;
1027 -docdir | --docdir | --docdi | --doc | --do)
1028 ac_prev=docdir ;;
1029 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1030 docdir=$ac_optarg ;;
1032 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1033 ac_prev=dvidir ;;
1034 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1035 dvidir=$ac_optarg ;;
1037 -enable-* | --enable-*)
1038 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1039 # Reject names that are not valid shell variable names.
1040 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1041 as_fn_error $? "invalid feature name: $ac_useropt"
1042 ac_useropt_orig=$ac_useropt
1043 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1044 case $ac_user_opts in
1046 "enable_$ac_useropt"
1047 "*) ;;
1048 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1049 ac_unrecognized_sep=', ';;
1050 esac
1051 eval enable_$ac_useropt=\$ac_optarg ;;
1053 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1054 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1055 | --exec | --exe | --ex)
1056 ac_prev=exec_prefix ;;
1057 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1058 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1059 | --exec=* | --exe=* | --ex=*)
1060 exec_prefix=$ac_optarg ;;
1062 -gas | --gas | --ga | --g)
1063 # Obsolete; use --with-gas.
1064 with_gas=yes ;;
1066 -help | --help | --hel | --he | -h)
1067 ac_init_help=long ;;
1068 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1069 ac_init_help=recursive ;;
1070 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1071 ac_init_help=short ;;
1073 -host | --host | --hos | --ho)
1074 ac_prev=host_alias ;;
1075 -host=* | --host=* | --hos=* | --ho=*)
1076 host_alias=$ac_optarg ;;
1078 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1079 ac_prev=htmldir ;;
1080 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1081 | --ht=*)
1082 htmldir=$ac_optarg ;;
1084 -includedir | --includedir | --includedi | --included | --include \
1085 | --includ | --inclu | --incl | --inc)
1086 ac_prev=includedir ;;
1087 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1088 | --includ=* | --inclu=* | --incl=* | --inc=*)
1089 includedir=$ac_optarg ;;
1091 -infodir | --infodir | --infodi | --infod | --info | --inf)
1092 ac_prev=infodir ;;
1093 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1094 infodir=$ac_optarg ;;
1096 -libdir | --libdir | --libdi | --libd)
1097 ac_prev=libdir ;;
1098 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1099 libdir=$ac_optarg ;;
1101 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1102 | --libexe | --libex | --libe)
1103 ac_prev=libexecdir ;;
1104 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1105 | --libexe=* | --libex=* | --libe=*)
1106 libexecdir=$ac_optarg ;;
1108 -localedir | --localedir | --localedi | --localed | --locale)
1109 ac_prev=localedir ;;
1110 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1111 localedir=$ac_optarg ;;
1113 -localstatedir | --localstatedir | --localstatedi | --localstated \
1114 | --localstate | --localstat | --localsta | --localst | --locals)
1115 ac_prev=localstatedir ;;
1116 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1117 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1118 localstatedir=$ac_optarg ;;
1120 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1121 ac_prev=mandir ;;
1122 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1123 mandir=$ac_optarg ;;
1125 -nfp | --nfp | --nf)
1126 # Obsolete; use --without-fp.
1127 with_fp=no ;;
1129 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1130 | --no-cr | --no-c | -n)
1131 no_create=yes ;;
1133 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1134 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1135 no_recursion=yes ;;
1137 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1138 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1139 | --oldin | --oldi | --old | --ol | --o)
1140 ac_prev=oldincludedir ;;
1141 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1142 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1143 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1144 oldincludedir=$ac_optarg ;;
1146 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1147 ac_prev=prefix ;;
1148 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1149 prefix=$ac_optarg ;;
1151 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1152 | --program-pre | --program-pr | --program-p)
1153 ac_prev=program_prefix ;;
1154 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1155 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1156 program_prefix=$ac_optarg ;;
1158 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1159 | --program-suf | --program-su | --program-s)
1160 ac_prev=program_suffix ;;
1161 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1162 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1163 program_suffix=$ac_optarg ;;
1165 -program-transform-name | --program-transform-name \
1166 | --program-transform-nam | --program-transform-na \
1167 | --program-transform-n | --program-transform- \
1168 | --program-transform | --program-transfor \
1169 | --program-transfo | --program-transf \
1170 | --program-trans | --program-tran \
1171 | --progr-tra | --program-tr | --program-t)
1172 ac_prev=program_transform_name ;;
1173 -program-transform-name=* | --program-transform-name=* \
1174 | --program-transform-nam=* | --program-transform-na=* \
1175 | --program-transform-n=* | --program-transform-=* \
1176 | --program-transform=* | --program-transfor=* \
1177 | --program-transfo=* | --program-transf=* \
1178 | --program-trans=* | --program-tran=* \
1179 | --progr-tra=* | --program-tr=* | --program-t=*)
1180 program_transform_name=$ac_optarg ;;
1182 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1183 ac_prev=pdfdir ;;
1184 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1185 pdfdir=$ac_optarg ;;
1187 -psdir | --psdir | --psdi | --psd | --ps)
1188 ac_prev=psdir ;;
1189 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1190 psdir=$ac_optarg ;;
1192 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1193 | -silent | --silent | --silen | --sile | --sil)
1194 silent=yes ;;
1196 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1197 ac_prev=sbindir ;;
1198 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1199 | --sbi=* | --sb=*)
1200 sbindir=$ac_optarg ;;
1202 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1203 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1204 | --sharedst | --shareds | --shared | --share | --shar \
1205 | --sha | --sh)
1206 ac_prev=sharedstatedir ;;
1207 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1208 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1209 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1210 | --sha=* | --sh=*)
1211 sharedstatedir=$ac_optarg ;;
1213 -site | --site | --sit)
1214 ac_prev=site ;;
1215 -site=* | --site=* | --sit=*)
1216 site=$ac_optarg ;;
1218 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1219 ac_prev=srcdir ;;
1220 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1221 srcdir=$ac_optarg ;;
1223 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1224 | --syscon | --sysco | --sysc | --sys | --sy)
1225 ac_prev=sysconfdir ;;
1226 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1227 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1228 sysconfdir=$ac_optarg ;;
1230 -target | --target | --targe | --targ | --tar | --ta | --t)
1231 ac_prev=target_alias ;;
1232 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1233 target_alias=$ac_optarg ;;
1235 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1236 verbose=yes ;;
1238 -version | --version | --versio | --versi | --vers | -V)
1239 ac_init_version=: ;;
1241 -with-* | --with-*)
1242 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1243 # Reject names that are not valid shell variable names.
1244 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1245 as_fn_error $? "invalid package name: $ac_useropt"
1246 ac_useropt_orig=$ac_useropt
1247 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1248 case $ac_user_opts in
1250 "with_$ac_useropt"
1251 "*) ;;
1252 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1253 ac_unrecognized_sep=', ';;
1254 esac
1255 eval with_$ac_useropt=\$ac_optarg ;;
1257 -without-* | --without-*)
1258 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1259 # Reject names that are not valid shell variable names.
1260 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1261 as_fn_error $? "invalid package name: $ac_useropt"
1262 ac_useropt_orig=$ac_useropt
1263 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1264 case $ac_user_opts in
1266 "with_$ac_useropt"
1267 "*) ;;
1268 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1269 ac_unrecognized_sep=', ';;
1270 esac
1271 eval with_$ac_useropt=no ;;
1273 --x)
1274 # Obsolete; use --with-x.
1275 with_x=yes ;;
1277 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1278 | --x-incl | --x-inc | --x-in | --x-i)
1279 ac_prev=x_includes ;;
1280 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1281 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1282 x_includes=$ac_optarg ;;
1284 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1285 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1286 ac_prev=x_libraries ;;
1287 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1288 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1289 x_libraries=$ac_optarg ;;
1291 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1292 Try \`$0 --help' for more information"
1295 *=*)
1296 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1297 # Reject names that are not valid shell variable names.
1298 case $ac_envvar in #(
1299 '' | [0-9]* | *[!_$as_cr_alnum]* )
1300 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1301 esac
1302 eval $ac_envvar=\$ac_optarg
1303 export $ac_envvar ;;
1306 # FIXME: should be removed in autoconf 3.0.
1307 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1308 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1309 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1310 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1313 esac
1314 done
1316 if test -n "$ac_prev"; then
1317 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1318 as_fn_error $? "missing argument to $ac_option"
1321 if test -n "$ac_unrecognized_opts"; then
1322 case $enable_option_checking in
1323 no) ;;
1324 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1325 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1326 esac
1329 # Check all directory arguments for consistency.
1330 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1331 datadir sysconfdir sharedstatedir localstatedir includedir \
1332 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1333 libdir localedir mandir
1335 eval ac_val=\$$ac_var
1336 # Remove trailing slashes.
1337 case $ac_val in
1338 */ )
1339 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1340 eval $ac_var=\$ac_val;;
1341 esac
1342 # Be sure to have absolute directory names.
1343 case $ac_val in
1344 [\\/$]* | ?:[\\/]* ) continue;;
1345 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1346 esac
1347 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1348 done
1350 # There might be people who depend on the old broken behavior: `$host'
1351 # used to hold the argument of --host etc.
1352 # FIXME: To remove some day.
1353 build=$build_alias
1354 host=$host_alias
1355 target=$target_alias
1357 # FIXME: To remove some day.
1358 if test "x$host_alias" != x; then
1359 if test "x$build_alias" = x; then
1360 cross_compiling=maybe
1361 elif test "x$build_alias" != "x$host_alias"; then
1362 cross_compiling=yes
1366 ac_tool_prefix=
1367 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1369 test "$silent" = yes && exec 6>/dev/null
1372 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1373 ac_ls_di=`ls -di .` &&
1374 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1375 as_fn_error $? "working directory cannot be determined"
1376 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1377 as_fn_error $? "pwd does not report name of working directory"
1380 # Find the source files, if location was not specified.
1381 if test -z "$srcdir"; then
1382 ac_srcdir_defaulted=yes
1383 # Try the directory containing this script, then the parent directory.
1384 ac_confdir=`$as_dirname -- "$as_myself" ||
1385 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1386 X"$as_myself" : 'X\(//\)[^/]' \| \
1387 X"$as_myself" : 'X\(//\)$' \| \
1388 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1389 $as_echo X"$as_myself" |
1390 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1391 s//\1/
1394 /^X\(\/\/\)[^/].*/{
1395 s//\1/
1398 /^X\(\/\/\)$/{
1399 s//\1/
1402 /^X\(\/\).*/{
1403 s//\1/
1406 s/.*/./; q'`
1407 srcdir=$ac_confdir
1408 if test ! -r "$srcdir/$ac_unique_file"; then
1409 srcdir=..
1411 else
1412 ac_srcdir_defaulted=no
1414 if test ! -r "$srcdir/$ac_unique_file"; then
1415 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1416 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1418 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1419 ac_abs_confdir=`(
1420 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1421 pwd)`
1422 # When building in place, set srcdir=.
1423 if test "$ac_abs_confdir" = "$ac_pwd"; then
1424 srcdir=.
1426 # Remove unnecessary trailing slashes from srcdir.
1427 # Double slashes in file names in object file debugging info
1428 # mess up M-x gdb in Emacs.
1429 case $srcdir in
1430 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1431 esac
1432 for ac_var in $ac_precious_vars; do
1433 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1434 eval ac_env_${ac_var}_value=\$${ac_var}
1435 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1436 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1437 done
1440 # Report the --help message.
1442 if test "$ac_init_help" = "long"; then
1443 # Omit some internal or obsolete options to make the list less imposing.
1444 # This message is too long to be a string in the A/UX 3.1 sh.
1445 cat <<_ACEOF
1446 \`configure' configures PostgreSQL 15devel to adapt to many kinds of systems.
1448 Usage: $0 [OPTION]... [VAR=VALUE]...
1450 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1451 VAR=VALUE. See below for descriptions of some of the useful variables.
1453 Defaults for the options are specified in brackets.
1455 Configuration:
1456 -h, --help display this help and exit
1457 --help=short display options specific to this package
1458 --help=recursive display the short help of all the included packages
1459 -V, --version display version information and exit
1460 -q, --quiet, --silent do not print \`checking ...' messages
1461 --cache-file=FILE cache test results in FILE [disabled]
1462 -C, --config-cache alias for \`--cache-file=config.cache'
1463 -n, --no-create do not create output files
1464 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1466 Installation directories:
1467 --prefix=PREFIX install architecture-independent files in PREFIX
1468 [$ac_default_prefix]
1469 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1470 [PREFIX]
1472 By default, \`make install' will install all the files in
1473 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1474 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1475 for instance \`--prefix=\$HOME'.
1477 For better control, use the options below.
1479 Fine tuning of the installation directories:
1480 --bindir=DIR user executables [EPREFIX/bin]
1481 --sbindir=DIR system admin executables [EPREFIX/sbin]
1482 --libexecdir=DIR program executables [EPREFIX/libexec]
1483 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1484 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1485 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1486 --libdir=DIR object code libraries [EPREFIX/lib]
1487 --includedir=DIR C header files [PREFIX/include]
1488 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1489 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1490 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1491 --infodir=DIR info documentation [DATAROOTDIR/info]
1492 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1493 --mandir=DIR man documentation [DATAROOTDIR/man]
1494 --docdir=DIR documentation root [DATAROOTDIR/doc/postgresql]
1495 --htmldir=DIR html documentation [DOCDIR]
1496 --dvidir=DIR dvi documentation [DOCDIR]
1497 --pdfdir=DIR pdf documentation [DOCDIR]
1498 --psdir=DIR ps documentation [DOCDIR]
1499 _ACEOF
1501 cat <<\_ACEOF
1503 System types:
1504 --build=BUILD configure for building on BUILD [guessed]
1505 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1506 _ACEOF
1509 if test -n "$ac_init_help"; then
1510 case $ac_init_help in
1511 short | recursive ) echo "Configuration of PostgreSQL 15devel:";;
1512 esac
1513 cat <<\_ACEOF
1515 Optional Features:
1516 --disable-option-checking ignore unrecognized --enable/--with options
1517 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1518 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1519 --disable-integer-datetimes
1520 obsolete option, no longer supported
1521 --enable-nls[=LANGUAGES]
1522 enable Native Language Support
1523 --disable-rpath do not embed shared library search path in
1524 executables
1525 --disable-spinlocks do not use spinlocks
1526 --disable-atomics do not use atomic operations
1527 --enable-debug build with debugging symbols (-g)
1528 --enable-profiling build with profiling enabled
1529 --enable-coverage build with coverage testing instrumentation
1530 --enable-dtrace build with DTrace support
1531 --enable-tap-tests enable TAP tests (requires Perl and IPC::Run)
1532 --enable-depend turn on automatic dependency tracking
1533 --enable-cassert enable assertion checks (for debugging)
1534 --disable-thread-safety disable thread-safety in client libraries
1535 --disable-largefile omit support for large files
1537 Optional Packages:
1538 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1539 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1540 --with-extra-version=STRING
1541 append STRING to version
1542 --with-template=NAME override operating system template
1543 --with-includes=DIRS look for additional header files in DIRS
1544 --with-libraries=DIRS look for additional libraries in DIRS
1545 --with-libs=DIRS alternative spelling of --with-libraries
1546 --with-pgport=PORTNUM set default port number [5432]
1547 --with-blocksize=BLOCKSIZE
1548 set table block size in kB [8]
1549 --with-segsize=SEGSIZE set table segment size in GB [1]
1550 --with-wal-blocksize=BLOCKSIZE
1551 set WAL block size in kB [8]
1552 --with-CC=CMD set compiler (deprecated)
1553 --with-llvm build with LLVM based JIT support
1554 --with-icu build with ICU support
1555 --with-tcl build Tcl modules (PL/Tcl)
1556 --with-tclconfig=DIR tclConfig.sh is in DIR
1557 --with-perl build Perl modules (PL/Perl)
1558 --with-python build Python modules (PL/Python)
1559 --with-gssapi build with GSSAPI support
1560 --with-krb-srvnam=NAME default service principal name in Kerberos (GSSAPI)
1561 [postgres]
1562 --with-pam build with PAM support
1563 --with-bsd-auth build with BSD Authentication support
1564 --with-ldap build with LDAP support
1565 --with-bonjour build with Bonjour support
1566 --with-selinux build with SELinux support
1567 --with-systemd build with systemd support
1568 --without-readline do not use GNU Readline nor BSD Libedit for editing
1569 --with-libedit-preferred
1570 prefer BSD Libedit over GNU Readline
1571 --with-uuid=LIB build contrib/uuid-ossp using LIB (bsd,e2fs,ossp)
1572 --with-ossp-uuid obsolete spelling of --with-uuid=ossp
1573 --with-libxml build with XML support
1574 --with-libxslt use XSLT support when building contrib/xml2
1575 --with-system-tzdata=DIR
1576 use system time zone data in DIR
1577 --without-zlib do not use Zlib
1578 --with-lz4 build with LZ4 support
1579 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
1580 --with-ssl=LIB use LIB for SSL/TLS support (openssl)
1581 --with-openssl obsolete spelling of --with-ssl=openssl
1583 Some influential environment variables:
1584 CC C compiler command
1585 CFLAGS C compiler flags
1586 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1587 nonstandard directory <lib dir>
1588 LIBS libraries to pass to the linker, e.g. -l<library>
1589 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1590 you have headers in a nonstandard directory <include dir>
1591 CXX C++ compiler command
1592 CXXFLAGS C++ compiler flags
1593 LLVM_CONFIG path to llvm-config command
1594 CLANG path to clang compiler to generate bitcode
1595 CPP C preprocessor
1596 PKG_CONFIG path to pkg-config utility
1597 PKG_CONFIG_PATH
1598 directories to add to pkg-config's search path
1599 PKG_CONFIG_LIBDIR
1600 path overriding pkg-config's built-in search path
1601 ICU_CFLAGS C compiler flags for ICU, overriding pkg-config
1602 ICU_LIBS linker flags for ICU, overriding pkg-config
1603 XML2_CONFIG path to xml2-config utility
1604 XML2_CFLAGS C compiler flags for XML2, overriding pkg-config
1605 XML2_LIBS linker flags for XML2, overriding pkg-config
1606 LZ4_CFLAGS C compiler flags for LZ4, overriding pkg-config
1607 LZ4_LIBS linker flags for LZ4, overriding pkg-config
1608 LDFLAGS_EX extra linker flags for linking executables only
1609 LDFLAGS_SL extra linker flags for linking shared libraries only
1610 PERL Perl program
1611 PYTHON Python program
1612 MSGFMT msgfmt program for NLS
1613 TCLSH Tcl interpreter program (tclsh)
1615 Use these variables to override the choices made by `configure' or to help
1616 it to find libraries and programs with nonstandard names/locations.
1618 Report bugs to <pgsql-bugs@lists.postgresql.org>.
1619 PostgreSQL home page: <https://www.postgresql.org/>.
1620 _ACEOF
1621 ac_status=$?
1624 if test "$ac_init_help" = "recursive"; then
1625 # If there are subdirs, report their specific --help.
1626 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1627 test -d "$ac_dir" ||
1628 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1629 continue
1630 ac_builddir=.
1632 case "$ac_dir" in
1633 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1635 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1636 # A ".." for each directory in $ac_dir_suffix.
1637 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1638 case $ac_top_builddir_sub in
1639 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1640 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1641 esac ;;
1642 esac
1643 ac_abs_top_builddir=$ac_pwd
1644 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1645 # for backward compatibility:
1646 ac_top_builddir=$ac_top_build_prefix
1648 case $srcdir in
1649 .) # We are building in place.
1650 ac_srcdir=.
1651 ac_top_srcdir=$ac_top_builddir_sub
1652 ac_abs_top_srcdir=$ac_pwd ;;
1653 [\\/]* | ?:[\\/]* ) # Absolute name.
1654 ac_srcdir=$srcdir$ac_dir_suffix;
1655 ac_top_srcdir=$srcdir
1656 ac_abs_top_srcdir=$srcdir ;;
1657 *) # Relative name.
1658 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1659 ac_top_srcdir=$ac_top_build_prefix$srcdir
1660 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1661 esac
1662 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1664 cd "$ac_dir" || { ac_status=$?; continue; }
1665 # Check for guested configure.
1666 if test -f "$ac_srcdir/configure.gnu"; then
1667 echo &&
1668 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1669 elif test -f "$ac_srcdir/configure"; then
1670 echo &&
1671 $SHELL "$ac_srcdir/configure" --help=recursive
1672 else
1673 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1674 fi || ac_status=$?
1675 cd "$ac_pwd" || { ac_status=$?; break; }
1676 done
1679 test -n "$ac_init_help" && exit $ac_status
1680 if $ac_init_version; then
1681 cat <<\_ACEOF
1682 PostgreSQL configure 15devel
1683 generated by GNU Autoconf 2.69
1685 Copyright (C) 2012 Free Software Foundation, Inc.
1686 This configure script is free software; the Free Software Foundation
1687 gives unlimited permission to copy, distribute and modify it.
1689 Copyright (c) 1996-2021, PostgreSQL Global Development Group
1690 _ACEOF
1691 exit
1694 ## ------------------------ ##
1695 ## Autoconf initialization. ##
1696 ## ------------------------ ##
1698 # ac_fn_c_try_compile LINENO
1699 # --------------------------
1700 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1701 ac_fn_c_try_compile ()
1703 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1704 rm -f conftest.$ac_objext
1705 if { { ac_try="$ac_compile"
1706 case "(($ac_try" in
1707 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1708 *) ac_try_echo=$ac_try;;
1709 esac
1710 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1711 $as_echo "$ac_try_echo"; } >&5
1712 (eval "$ac_compile") 2>conftest.err
1713 ac_status=$?
1714 if test -s conftest.err; then
1715 grep -v '^ *+' conftest.err >conftest.er1
1716 cat conftest.er1 >&5
1717 mv -f conftest.er1 conftest.err
1719 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1720 test $ac_status = 0; } && {
1721 test -z "$ac_c_werror_flag" ||
1722 test ! -s conftest.err
1723 } && test -s conftest.$ac_objext; then :
1724 ac_retval=0
1725 else
1726 $as_echo "$as_me: failed program was:" >&5
1727 sed 's/^/| /' conftest.$ac_ext >&5
1729 ac_retval=1
1731 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1732 as_fn_set_status $ac_retval
1734 } # ac_fn_c_try_compile
1736 # ac_fn_cxx_try_compile LINENO
1737 # ----------------------------
1738 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1739 ac_fn_cxx_try_compile ()
1741 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1742 rm -f conftest.$ac_objext
1743 if { { ac_try="$ac_compile"
1744 case "(($ac_try" in
1745 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1746 *) ac_try_echo=$ac_try;;
1747 esac
1748 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1749 $as_echo "$ac_try_echo"; } >&5
1750 (eval "$ac_compile") 2>conftest.err
1751 ac_status=$?
1752 if test -s conftest.err; then
1753 grep -v '^ *+' conftest.err >conftest.er1
1754 cat conftest.er1 >&5
1755 mv -f conftest.er1 conftest.err
1757 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1758 test $ac_status = 0; } && {
1759 test -z "$ac_cxx_werror_flag" ||
1760 test ! -s conftest.err
1761 } && test -s conftest.$ac_objext; then :
1762 ac_retval=0
1763 else
1764 $as_echo "$as_me: failed program was:" >&5
1765 sed 's/^/| /' conftest.$ac_ext >&5
1767 ac_retval=1
1769 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1770 as_fn_set_status $ac_retval
1772 } # ac_fn_cxx_try_compile
1774 # ac_fn_c_try_link LINENO
1775 # -----------------------
1776 # Try to link conftest.$ac_ext, and return whether this succeeded.
1777 ac_fn_c_try_link ()
1779 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1780 rm -f conftest.$ac_objext conftest$ac_exeext
1781 if { { ac_try="$ac_link"
1782 case "(($ac_try" in
1783 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1784 *) ac_try_echo=$ac_try;;
1785 esac
1786 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1787 $as_echo "$ac_try_echo"; } >&5
1788 (eval "$ac_link") 2>conftest.err
1789 ac_status=$?
1790 if test -s conftest.err; then
1791 grep -v '^ *+' conftest.err >conftest.er1
1792 cat conftest.er1 >&5
1793 mv -f conftest.er1 conftest.err
1795 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1796 test $ac_status = 0; } && {
1797 test -z "$ac_c_werror_flag" ||
1798 test ! -s conftest.err
1799 } && test -s conftest$ac_exeext && {
1800 test "$cross_compiling" = yes ||
1801 test -x conftest$ac_exeext
1802 }; then :
1803 ac_retval=0
1804 else
1805 $as_echo "$as_me: failed program was:" >&5
1806 sed 's/^/| /' conftest.$ac_ext >&5
1808 ac_retval=1
1810 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1811 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1812 # interfere with the next link command; also delete a directory that is
1813 # left behind by Apple's compiler. We do this before executing the actions.
1814 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1815 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1816 as_fn_set_status $ac_retval
1818 } # ac_fn_c_try_link
1820 # ac_fn_c_try_cpp LINENO
1821 # ----------------------
1822 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1823 ac_fn_c_try_cpp ()
1825 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1826 if { { ac_try="$ac_cpp conftest.$ac_ext"
1827 case "(($ac_try" in
1828 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1829 *) ac_try_echo=$ac_try;;
1830 esac
1831 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1832 $as_echo "$ac_try_echo"; } >&5
1833 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1834 ac_status=$?
1835 if test -s conftest.err; then
1836 grep -v '^ *+' conftest.err >conftest.er1
1837 cat conftest.er1 >&5
1838 mv -f conftest.er1 conftest.err
1840 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1841 test $ac_status = 0; } > conftest.i && {
1842 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1843 test ! -s conftest.err
1844 }; then :
1845 ac_retval=0
1846 else
1847 $as_echo "$as_me: failed program was:" >&5
1848 sed 's/^/| /' conftest.$ac_ext >&5
1850 ac_retval=1
1852 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1853 as_fn_set_status $ac_retval
1855 } # ac_fn_c_try_cpp
1857 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1858 # -------------------------------------------------------
1859 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1860 # the include files in INCLUDES and setting the cache variable VAR
1861 # accordingly.
1862 ac_fn_c_check_header_mongrel ()
1864 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1865 if eval \${$3+:} false; then :
1866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1867 $as_echo_n "checking for $2... " >&6; }
1868 if eval \${$3+:} false; then :
1869 $as_echo_n "(cached) " >&6
1871 eval ac_res=\$$3
1872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1873 $as_echo "$ac_res" >&6; }
1874 else
1875 # Is the header compilable?
1876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1877 $as_echo_n "checking $2 usability... " >&6; }
1878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1879 /* end confdefs.h. */
1881 #include <$2>
1882 _ACEOF
1883 if ac_fn_c_try_compile "$LINENO"; then :
1884 ac_header_compiler=yes
1885 else
1886 ac_header_compiler=no
1888 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1890 $as_echo "$ac_header_compiler" >&6; }
1892 # Is the header present?
1893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1894 $as_echo_n "checking $2 presence... " >&6; }
1895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1896 /* end confdefs.h. */
1897 #include <$2>
1898 _ACEOF
1899 if ac_fn_c_try_cpp "$LINENO"; then :
1900 ac_header_preproc=yes
1901 else
1902 ac_header_preproc=no
1904 rm -f conftest.err conftest.i conftest.$ac_ext
1905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1906 $as_echo "$ac_header_preproc" >&6; }
1908 # So? What about this header?
1909 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1910 yes:no: )
1911 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1912 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1913 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1914 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1916 no:yes:* )
1917 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1918 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1919 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1920 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1921 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1922 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1923 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1924 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1925 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1926 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1927 ( $as_echo "## ---------------------------------------------- ##
1928 ## Report this to pgsql-bugs@lists.postgresql.org ##
1929 ## ---------------------------------------------- ##"
1930 ) | sed "s/^/$as_me: WARNING: /" >&2
1932 esac
1933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1934 $as_echo_n "checking for $2... " >&6; }
1935 if eval \${$3+:} false; then :
1936 $as_echo_n "(cached) " >&6
1937 else
1938 eval "$3=\$ac_header_compiler"
1940 eval ac_res=\$$3
1941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1942 $as_echo "$ac_res" >&6; }
1944 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1946 } # ac_fn_c_check_header_mongrel
1948 # ac_fn_c_try_run LINENO
1949 # ----------------------
1950 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1951 # that executables *can* be run.
1952 ac_fn_c_try_run ()
1954 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1955 if { { ac_try="$ac_link"
1956 case "(($ac_try" in
1957 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1958 *) ac_try_echo=$ac_try;;
1959 esac
1960 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1961 $as_echo "$ac_try_echo"; } >&5
1962 (eval "$ac_link") 2>&5
1963 ac_status=$?
1964 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1965 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1966 { { case "(($ac_try" in
1967 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1968 *) ac_try_echo=$ac_try;;
1969 esac
1970 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1971 $as_echo "$ac_try_echo"; } >&5
1972 (eval "$ac_try") 2>&5
1973 ac_status=$?
1974 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1975 test $ac_status = 0; }; }; then :
1976 ac_retval=0
1977 else
1978 $as_echo "$as_me: program exited with status $ac_status" >&5
1979 $as_echo "$as_me: failed program was:" >&5
1980 sed 's/^/| /' conftest.$ac_ext >&5
1982 ac_retval=$ac_status
1984 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1985 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1986 as_fn_set_status $ac_retval
1988 } # ac_fn_c_try_run
1990 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1991 # -------------------------------------------------------
1992 # Tests whether HEADER exists and can be compiled using the include files in
1993 # INCLUDES, setting the cache variable VAR accordingly.
1994 ac_fn_c_check_header_compile ()
1996 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1997 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1998 $as_echo_n "checking for $2... " >&6; }
1999 if eval \${$3+:} false; then :
2000 $as_echo_n "(cached) " >&6
2001 else
2002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2003 /* end confdefs.h. */
2005 #include <$2>
2006 _ACEOF
2007 if ac_fn_c_try_compile "$LINENO"; then :
2008 eval "$3=yes"
2009 else
2010 eval "$3=no"
2012 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2014 eval ac_res=\$$3
2015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2016 $as_echo "$ac_res" >&6; }
2017 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2019 } # ac_fn_c_check_header_compile
2021 # ac_fn_c_check_func LINENO FUNC VAR
2022 # ----------------------------------
2023 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2024 ac_fn_c_check_func ()
2026 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2028 $as_echo_n "checking for $2... " >&6; }
2029 if eval \${$3+:} false; then :
2030 $as_echo_n "(cached) " >&6
2031 else
2032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2033 /* end confdefs.h. */
2034 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2035 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2036 #define $2 innocuous_$2
2038 /* System header to define __stub macros and hopefully few prototypes,
2039 which can conflict with char $2 (); below.
2040 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2041 <limits.h> exists even on freestanding compilers. */
2043 #ifdef __STDC__
2044 # include <limits.h>
2045 #else
2046 # include <assert.h>
2047 #endif
2049 #undef $2
2051 /* Override any GCC internal prototype to avoid an error.
2052 Use char because int might match the return type of a GCC
2053 builtin and then its argument prototype would still apply. */
2054 #ifdef __cplusplus
2055 extern "C"
2056 #endif
2057 char $2 ();
2058 /* The GNU C library defines this for functions which it implements
2059 to always fail with ENOSYS. Some functions are actually named
2060 something starting with __ and the normal name is an alias. */
2061 #if defined __stub_$2 || defined __stub___$2
2062 choke me
2063 #endif
2066 main ()
2068 return $2 ();
2070 return 0;
2072 _ACEOF
2073 if ac_fn_c_try_link "$LINENO"; then :
2074 eval "$3=yes"
2075 else
2076 eval "$3=no"
2078 rm -f core conftest.err conftest.$ac_objext \
2079 conftest$ac_exeext conftest.$ac_ext
2081 eval ac_res=\$$3
2082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2083 $as_echo "$ac_res" >&6; }
2084 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2086 } # ac_fn_c_check_func
2088 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2089 # -------------------------------------------
2090 # Tests whether TYPE exists after having included INCLUDES, setting cache
2091 # variable VAR accordingly.
2092 ac_fn_c_check_type ()
2094 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2096 $as_echo_n "checking for $2... " >&6; }
2097 if eval \${$3+:} false; then :
2098 $as_echo_n "(cached) " >&6
2099 else
2100 eval "$3=no"
2101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2102 /* end confdefs.h. */
2105 main ()
2107 if (sizeof ($2))
2108 return 0;
2110 return 0;
2112 _ACEOF
2113 if ac_fn_c_try_compile "$LINENO"; then :
2114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2115 /* end confdefs.h. */
2118 main ()
2120 if (sizeof (($2)))
2121 return 0;
2123 return 0;
2125 _ACEOF
2126 if ac_fn_c_try_compile "$LINENO"; then :
2128 else
2129 eval "$3=yes"
2131 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2133 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2135 eval ac_res=\$$3
2136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2137 $as_echo "$ac_res" >&6; }
2138 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2140 } # ac_fn_c_check_type
2142 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2143 # ----------------------------------------------------
2144 # Tries to find if the field MEMBER exists in type AGGR, after including
2145 # INCLUDES, setting cache variable VAR accordingly.
2146 ac_fn_c_check_member ()
2148 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2150 $as_echo_n "checking for $2.$3... " >&6; }
2151 if eval \${$4+:} false; then :
2152 $as_echo_n "(cached) " >&6
2153 else
2154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2155 /* end confdefs.h. */
2158 main ()
2160 static $2 ac_aggr;
2161 if (ac_aggr.$3)
2162 return 0;
2164 return 0;
2166 _ACEOF
2167 if ac_fn_c_try_compile "$LINENO"; then :
2168 eval "$4=yes"
2169 else
2170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2171 /* end confdefs.h. */
2174 main ()
2176 static $2 ac_aggr;
2177 if (sizeof ac_aggr.$3)
2178 return 0;
2180 return 0;
2182 _ACEOF
2183 if ac_fn_c_try_compile "$LINENO"; then :
2184 eval "$4=yes"
2185 else
2186 eval "$4=no"
2188 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2190 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2192 eval ac_res=\$$4
2193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2194 $as_echo "$ac_res" >&6; }
2195 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2197 } # ac_fn_c_check_member
2199 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2200 # --------------------------------------------
2201 # Tries to find the compile-time value of EXPR in a program that includes
2202 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2203 # computed
2204 ac_fn_c_compute_int ()
2206 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2207 if test "$cross_compiling" = yes; then
2208 # Depending upon the size, compute the lo and hi bounds.
2209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2210 /* end confdefs.h. */
2213 main ()
2215 static int test_array [1 - 2 * !(($2) >= 0)];
2216 test_array [0] = 0;
2217 return test_array [0];
2220 return 0;
2222 _ACEOF
2223 if ac_fn_c_try_compile "$LINENO"; then :
2224 ac_lo=0 ac_mid=0
2225 while :; do
2226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2227 /* end confdefs.h. */
2230 main ()
2232 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2233 test_array [0] = 0;
2234 return test_array [0];
2237 return 0;
2239 _ACEOF
2240 if ac_fn_c_try_compile "$LINENO"; then :
2241 ac_hi=$ac_mid; break
2242 else
2243 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2244 if test $ac_lo -le $ac_mid; then
2245 ac_lo= ac_hi=
2246 break
2248 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2250 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2251 done
2252 else
2253 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2254 /* end confdefs.h. */
2257 main ()
2259 static int test_array [1 - 2 * !(($2) < 0)];
2260 test_array [0] = 0;
2261 return test_array [0];
2264 return 0;
2266 _ACEOF
2267 if ac_fn_c_try_compile "$LINENO"; then :
2268 ac_hi=-1 ac_mid=-1
2269 while :; do
2270 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2271 /* end confdefs.h. */
2274 main ()
2276 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2277 test_array [0] = 0;
2278 return test_array [0];
2281 return 0;
2283 _ACEOF
2284 if ac_fn_c_try_compile "$LINENO"; then :
2285 ac_lo=$ac_mid; break
2286 else
2287 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2288 if test $ac_mid -le $ac_hi; then
2289 ac_lo= ac_hi=
2290 break
2292 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2294 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2295 done
2296 else
2297 ac_lo= ac_hi=
2299 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2301 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2302 # Binary search between lo and hi bounds.
2303 while test "x$ac_lo" != "x$ac_hi"; do
2304 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2306 /* end confdefs.h. */
2309 main ()
2311 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2312 test_array [0] = 0;
2313 return test_array [0];
2316 return 0;
2318 _ACEOF
2319 if ac_fn_c_try_compile "$LINENO"; then :
2320 ac_hi=$ac_mid
2321 else
2322 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2324 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2325 done
2326 case $ac_lo in #((
2327 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2328 '') ac_retval=1 ;;
2329 esac
2330 else
2331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2332 /* end confdefs.h. */
2334 static long int longval () { return $2; }
2335 static unsigned long int ulongval () { return $2; }
2336 #include <stdio.h>
2337 #include <stdlib.h>
2339 main ()
2342 FILE *f = fopen ("conftest.val", "w");
2343 if (! f)
2344 return 1;
2345 if (($2) < 0)
2347 long int i = longval ();
2348 if (i != ($2))
2349 return 1;
2350 fprintf (f, "%ld", i);
2352 else
2354 unsigned long int i = ulongval ();
2355 if (i != ($2))
2356 return 1;
2357 fprintf (f, "%lu", i);
2359 /* Do not output a trailing newline, as this causes \r\n confusion
2360 on some platforms. */
2361 return ferror (f) || fclose (f) != 0;
2364 return 0;
2366 _ACEOF
2367 if ac_fn_c_try_run "$LINENO"; then :
2368 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2369 else
2370 ac_retval=1
2372 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2373 conftest.$ac_objext conftest.beam conftest.$ac_ext
2374 rm -f conftest.val
2377 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2378 as_fn_set_status $ac_retval
2380 } # ac_fn_c_compute_int
2382 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2383 # ---------------------------------------------
2384 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2385 # accordingly.
2386 ac_fn_c_check_decl ()
2388 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2389 # Initialize each $ac_[]_AC_LANG_ABBREV[]_decl_warn_flag once.
2390 as_decl_name=`echo $2|sed 's/ *(.*//'`
2391 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2393 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2394 if eval \${$3+:} false; then :
2395 $as_echo_n "(cached) " >&6
2396 else
2397 ac_save_werror_flag=$ac_c_werror_flag
2398 ac_c_werror_flag="$ac_c_decl_warn_flag$ac_c_werror_flag"
2399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2400 /* end confdefs.h. */
2403 main ()
2405 #ifndef $as_decl_name
2406 #ifdef __cplusplus
2407 (void) $as_decl_use;
2408 #else
2409 (void) $as_decl_name;
2410 #endif
2411 #endif
2414 return 0;
2416 _ACEOF
2417 if ac_fn_c_try_compile "$LINENO"; then :
2418 eval "$3=yes"
2419 else
2420 eval "$3=no"
2422 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2423 ac_c_werror_flag=$ac_save_werror_flag
2425 eval ac_res=\$$3
2426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2427 $as_echo "$ac_res" >&6; }
2428 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2430 } # ac_fn_c_check_decl
2431 cat >config.log <<_ACEOF
2432 This file contains any messages produced by compilers while
2433 running configure, to aid debugging if configure makes a mistake.
2435 It was created by PostgreSQL $as_me 15devel, which was
2436 generated by GNU Autoconf 2.69. Invocation command line was
2438 $ $0 $@
2440 _ACEOF
2441 exec 5>>config.log
2443 cat <<_ASUNAME
2444 ## --------- ##
2445 ## Platform. ##
2446 ## --------- ##
2448 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2449 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2450 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2451 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2452 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2454 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2455 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2457 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2458 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2459 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2460 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2461 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2462 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2463 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2465 _ASUNAME
2467 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2468 for as_dir in $PATH
2470 IFS=$as_save_IFS
2471 test -z "$as_dir" && as_dir=.
2472 $as_echo "PATH: $as_dir"
2473 done
2474 IFS=$as_save_IFS
2476 } >&5
2478 cat >&5 <<_ACEOF
2481 ## ----------- ##
2482 ## Core tests. ##
2483 ## ----------- ##
2485 _ACEOF
2488 # Keep a trace of the command line.
2489 # Strip out --no-create and --no-recursion so they do not pile up.
2490 # Strip out --silent because we don't want to record it for future runs.
2491 # Also quote any args containing shell meta-characters.
2492 # Make two passes to allow for proper duplicate-argument suppression.
2493 ac_configure_args=
2494 ac_configure_args0=
2495 ac_configure_args1=
2496 ac_must_keep_next=false
2497 for ac_pass in 1 2
2499 for ac_arg
2501 case $ac_arg in
2502 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2503 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2504 | -silent | --silent | --silen | --sile | --sil)
2505 continue ;;
2506 *\'*)
2507 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2508 esac
2509 case $ac_pass in
2510 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2512 as_fn_append ac_configure_args1 " '$ac_arg'"
2513 if test $ac_must_keep_next = true; then
2514 ac_must_keep_next=false # Got value, back to normal.
2515 else
2516 case $ac_arg in
2517 *=* | --config-cache | -C | -disable-* | --disable-* \
2518 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2519 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2520 | -with-* | --with-* | -without-* | --without-* | --x)
2521 case "$ac_configure_args0 " in
2522 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2523 esac
2525 -* ) ac_must_keep_next=true ;;
2526 esac
2528 as_fn_append ac_configure_args " '$ac_arg'"
2530 esac
2531 done
2532 done
2533 { ac_configure_args0=; unset ac_configure_args0;}
2534 { ac_configure_args1=; unset ac_configure_args1;}
2536 # When interrupted or exit'd, cleanup temporary files, and complete
2537 # config.log. We remove comments because anyway the quotes in there
2538 # would cause problems or look ugly.
2539 # WARNING: Use '\'' to represent an apostrophe within the trap.
2540 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2541 trap 'exit_status=$?
2542 # Save into config.log some information that might help in debugging.
2544 echo
2546 $as_echo "## ---------------- ##
2547 ## Cache variables. ##
2548 ## ---------------- ##"
2549 echo
2550 # The following way of writing the cache mishandles newlines in values,
2552 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2553 eval ac_val=\$$ac_var
2554 case $ac_val in #(
2555 *${as_nl}*)
2556 case $ac_var in #(
2557 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2558 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2559 esac
2560 case $ac_var in #(
2561 _ | IFS | as_nl) ;; #(
2562 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2563 *) { eval $ac_var=; unset $ac_var;} ;;
2564 esac ;;
2565 esac
2566 done
2567 (set) 2>&1 |
2568 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2569 *${as_nl}ac_space=\ *)
2570 sed -n \
2571 "s/'\''/'\''\\\\'\'''\''/g;
2572 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2573 ;; #(
2575 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2577 esac |
2578 sort
2580 echo
2582 $as_echo "## ----------------- ##
2583 ## Output variables. ##
2584 ## ----------------- ##"
2585 echo
2586 for ac_var in $ac_subst_vars
2588 eval ac_val=\$$ac_var
2589 case $ac_val in
2590 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2591 esac
2592 $as_echo "$ac_var='\''$ac_val'\''"
2593 done | sort
2594 echo
2596 if test -n "$ac_subst_files"; then
2597 $as_echo "## ------------------- ##
2598 ## File substitutions. ##
2599 ## ------------------- ##"
2600 echo
2601 for ac_var in $ac_subst_files
2603 eval ac_val=\$$ac_var
2604 case $ac_val in
2605 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2606 esac
2607 $as_echo "$ac_var='\''$ac_val'\''"
2608 done | sort
2609 echo
2612 if test -s confdefs.h; then
2613 $as_echo "## ----------- ##
2614 ## confdefs.h. ##
2615 ## ----------- ##"
2616 echo
2617 cat confdefs.h
2618 echo
2620 test "$ac_signal" != 0 &&
2621 $as_echo "$as_me: caught signal $ac_signal"
2622 $as_echo "$as_me: exit $exit_status"
2623 } >&5
2624 rm -f core *.core core.conftest.* &&
2625 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2626 exit $exit_status
2628 for ac_signal in 1 2 13 15; do
2629 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2630 done
2631 ac_signal=0
2633 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2634 rm -f -r conftest* confdefs.h
2636 $as_echo "/* confdefs.h */" > confdefs.h
2638 # Predefined preprocessor variables.
2640 cat >>confdefs.h <<_ACEOF
2641 #define PACKAGE_NAME "$PACKAGE_NAME"
2642 _ACEOF
2644 cat >>confdefs.h <<_ACEOF
2645 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2646 _ACEOF
2648 cat >>confdefs.h <<_ACEOF
2649 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2650 _ACEOF
2652 cat >>confdefs.h <<_ACEOF
2653 #define PACKAGE_STRING "$PACKAGE_STRING"
2654 _ACEOF
2656 cat >>confdefs.h <<_ACEOF
2657 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2658 _ACEOF
2660 cat >>confdefs.h <<_ACEOF
2661 #define PACKAGE_URL "$PACKAGE_URL"
2662 _ACEOF
2665 # Let the site file select an alternate cache file if it wants to.
2666 # Prefer an explicitly selected file to automatically selected ones.
2667 ac_site_file1=NONE
2668 ac_site_file2=NONE
2669 if test -n "$CONFIG_SITE"; then
2670 # We do not want a PATH search for config.site.
2671 case $CONFIG_SITE in #((
2672 -*) ac_site_file1=./$CONFIG_SITE;;
2673 */*) ac_site_file1=$CONFIG_SITE;;
2674 *) ac_site_file1=./$CONFIG_SITE;;
2675 esac
2676 elif test "x$prefix" != xNONE; then
2677 ac_site_file1=$prefix/share/config.site
2678 ac_site_file2=$prefix/etc/config.site
2679 else
2680 ac_site_file1=$ac_default_prefix/share/config.site
2681 ac_site_file2=$ac_default_prefix/etc/config.site
2683 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2685 test "x$ac_site_file" = xNONE && continue
2686 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2687 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2688 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2689 sed 's/^/| /' "$ac_site_file" >&5
2690 . "$ac_site_file" \
2691 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2692 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2693 as_fn_error $? "failed to load site script $ac_site_file
2694 See \`config.log' for more details" "$LINENO" 5; }
2696 done
2698 if test -r "$cache_file"; then
2699 # Some versions of bash will fail to source /dev/null (special files
2700 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2701 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2702 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2703 $as_echo "$as_me: loading cache $cache_file" >&6;}
2704 case $cache_file in
2705 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2706 *) . "./$cache_file";;
2707 esac
2709 else
2710 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2711 $as_echo "$as_me: creating cache $cache_file" >&6;}
2712 >$cache_file
2715 # Check that the precious variables saved in the cache have kept the same
2716 # value.
2717 ac_cache_corrupted=false
2718 for ac_var in $ac_precious_vars; do
2719 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2720 eval ac_new_set=\$ac_env_${ac_var}_set
2721 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2722 eval ac_new_val=\$ac_env_${ac_var}_value
2723 case $ac_old_set,$ac_new_set in
2724 set,)
2725 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2726 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2727 ac_cache_corrupted=: ;;
2728 ,set)
2729 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2730 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2731 ac_cache_corrupted=: ;;
2732 ,);;
2734 if test "x$ac_old_val" != "x$ac_new_val"; then
2735 # differences in whitespace do not lead to failure.
2736 ac_old_val_w=`echo x $ac_old_val`
2737 ac_new_val_w=`echo x $ac_new_val`
2738 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2739 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2740 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2741 ac_cache_corrupted=:
2742 else
2743 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2744 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2745 eval $ac_var=\$ac_old_val
2747 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2748 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2749 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2750 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2751 fi;;
2752 esac
2753 # Pass precious variables to config.status.
2754 if test "$ac_new_set" = set; then
2755 case $ac_new_val in
2756 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2757 *) ac_arg=$ac_var=$ac_new_val ;;
2758 esac
2759 case " $ac_configure_args " in
2760 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2761 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2762 esac
2764 done
2765 if $ac_cache_corrupted; then
2766 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2767 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2768 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2769 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2770 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2772 ## -------------------- ##
2773 ## Main body of script. ##
2774 ## -------------------- ##
2776 ac_ext=c
2777 ac_cpp='$CPP $CPPFLAGS'
2778 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2779 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2780 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2787 ac_aux_dir=
2788 for ac_dir in config "$srcdir"/config; do
2789 if test -f "$ac_dir/install-sh"; then
2790 ac_aux_dir=$ac_dir
2791 ac_install_sh="$ac_aux_dir/install-sh -c"
2792 break
2793 elif test -f "$ac_dir/install.sh"; then
2794 ac_aux_dir=$ac_dir
2795 ac_install_sh="$ac_aux_dir/install.sh -c"
2796 break
2797 elif test -f "$ac_dir/shtool"; then
2798 ac_aux_dir=$ac_dir
2799 ac_install_sh="$ac_aux_dir/shtool install -c"
2800 break
2802 done
2803 if test -z "$ac_aux_dir"; then
2804 as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5
2807 # These three variables are undocumented and unsupported,
2808 # and are intended to be withdrawn in a future Autoconf release.
2809 # They can cause serious problems if a builder's source tree is in a directory
2810 # whose full name contains unusual characters.
2811 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2812 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2813 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2818 cat >>confdefs.h <<_ACEOF
2819 #define CONFIGURE_ARGS "$ac_configure_args"
2820 _ACEOF
2823 PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\)'`
2824 PG_MINORVERSION=`expr "$PACKAGE_VERSION" : '.*\.\([0-9][0-9]*\)'`
2825 test -n "$PG_MINORVERSION" || PG_MINORVERSION=0
2828 cat >>confdefs.h <<_ACEOF
2829 #define PG_MAJORVERSION "$PG_MAJORVERSION"
2830 _ACEOF
2833 cat >>confdefs.h <<_ACEOF
2834 #define PG_MAJORVERSION_NUM $PG_MAJORVERSION
2835 _ACEOF
2838 cat >>confdefs.h <<_ACEOF
2839 #define PG_MINORVERSION_NUM $PG_MINORVERSION
2840 _ACEOF
2846 # Check whether --with-extra-version was given.
2847 if test "${with_extra_version+set}" = set; then :
2848 withval=$with_extra_version;
2849 case $withval in
2850 yes)
2851 as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2854 as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2857 PG_VERSION="$PACKAGE_VERSION$withval"
2859 esac
2861 else
2862 PG_VERSION="$PACKAGE_VERSION"
2867 cat >>confdefs.h <<_ACEOF
2868 #define PG_VERSION "$PG_VERSION"
2869 _ACEOF
2872 # Make sure we can run config.sub.
2873 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2874 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2877 $as_echo_n "checking build system type... " >&6; }
2878 if ${ac_cv_build+:} false; then :
2879 $as_echo_n "(cached) " >&6
2880 else
2881 ac_build_alias=$build_alias
2882 test "x$ac_build_alias" = x &&
2883 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2884 test "x$ac_build_alias" = x &&
2885 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2886 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2887 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2891 $as_echo "$ac_cv_build" >&6; }
2892 case $ac_cv_build in
2893 *-*-*) ;;
2894 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2895 esac
2896 build=$ac_cv_build
2897 ac_save_IFS=$IFS; IFS='-'
2898 set x $ac_cv_build
2899 shift
2900 build_cpu=$1
2901 build_vendor=$2
2902 shift; shift
2903 # Remember, the first character of IFS is used to create $*,
2904 # except with old shells:
2905 build_os=$*
2906 IFS=$ac_save_IFS
2907 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2911 $as_echo_n "checking host system type... " >&6; }
2912 if ${ac_cv_host+:} false; then :
2913 $as_echo_n "(cached) " >&6
2914 else
2915 if test "x$host_alias" = x; then
2916 ac_cv_host=$ac_cv_build
2917 else
2918 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2919 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2924 $as_echo "$ac_cv_host" >&6; }
2925 case $ac_cv_host in
2926 *-*-*) ;;
2927 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2928 esac
2929 host=$ac_cv_host
2930 ac_save_IFS=$IFS; IFS='-'
2931 set x $ac_cv_host
2932 shift
2933 host_cpu=$1
2934 host_vendor=$2
2935 shift; shift
2936 # Remember, the first character of IFS is used to create $*,
2937 # except with old shells:
2938 host_os=$*
2939 IFS=$ac_save_IFS
2940 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2944 template=
2945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which template to use" >&5
2946 $as_echo_n "checking which template to use... " >&6; }
2951 # Check whether --with-template was given.
2952 if test "${with_template+set}" = set; then :
2953 withval=$with_template;
2954 case $withval in
2955 yes)
2956 as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2959 as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2963 case $withval in
2964 list) echo; ls "$srcdir/src/template"; exit;;
2965 *) if test -f "$srcdir/src/template/$with_template" ; then
2966 template=$withval
2967 else
2968 as_fn_error $? "'$withval' is not a valid template name. Use 'list' for a list." "$LINENO" 5
2969 fi;;
2970 esac
2973 esac
2975 else
2977 # --with-template not given
2979 case $host_os in
2980 aix*) template=aix ;;
2981 cygwin*|msys*) template=cygwin ;;
2982 darwin*) template=darwin ;;
2983 dragonfly*) template=netbsd ;;
2984 freebsd*) template=freebsd ;;
2985 hpux*) template=hpux ;;
2986 linux*|gnu*|k*bsd*-gnu)
2987 template=linux ;;
2988 mingw*) template=win32 ;;
2989 netbsd*) template=netbsd ;;
2990 openbsd*) template=openbsd ;;
2991 solaris*) template=solaris ;;
2992 esac
2994 if test x"$template" = x"" ; then
2995 as_fn_error $? "
2996 *******************************************************************
2997 PostgreSQL has apparently not been ported to your platform yet.
2998 To try a manual configuration, look into the src/template directory
2999 for a similar platform and use the '--with-template=' option.
3001 Please also contact <pgsql-bugs@lists.postgresql.org> to see about
3002 rectifying this. Include the above 'checking host system type...'
3003 line.
3004 *******************************************************************
3005 " "$LINENO" 5
3013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $template" >&5
3014 $as_echo "$template" >&6; }
3016 PORTNAME=$template
3019 # Initialize default assumption that we do not need separate assembly code
3020 # for TAS (test-and-set). This can be overridden by the template file
3021 # when it's executed.
3022 need_tas=no
3023 tas_file=dummy.s
3028 ## Command line options
3032 # Add non-standard directories to the include path
3037 # Check whether --with-includes was given.
3038 if test "${with_includes+set}" = set; then :
3039 withval=$with_includes;
3040 case $withval in
3041 yes)
3042 as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
3045 as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
3050 esac
3058 # Add non-standard directories to the library search path
3063 # Check whether --with-libraries was given.
3064 if test "${with_libraries+set}" = set; then :
3065 withval=$with_libraries;
3066 case $withval in
3067 yes)
3068 as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
3071 as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
3074 LIBRARY_DIRS=$withval
3076 esac
3085 # Check whether --with-libs was given.
3086 if test "${with_libs+set}" = set; then :
3087 withval=$with_libs;
3088 case $withval in
3089 yes)
3090 as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
3093 as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
3096 LIBRARY_DIRS=$withval
3098 esac
3106 # 64-bit integer date/time storage is now the only option, but to avoid
3107 # unnecessary breakage of build scripts, continue to accept an explicit
3108 # "--enable-integer-datetimes" switch.
3112 # Check whether --enable-integer-datetimes was given.
3113 if test "${enable_integer_datetimes+set}" = set; then :
3114 enableval=$enable_integer_datetimes;
3115 case $enableval in
3116 yes)
3120 as_fn_error $? "--disable-integer-datetimes is no longer supported" "$LINENO" 5
3123 as_fn_error $? "no argument expected for --enable-integer-datetimes option" "$LINENO" 5
3125 esac
3127 else
3128 enable_integer_datetimes=yes
3136 # NLS
3138 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is wanted" >&5
3139 $as_echo_n "checking whether NLS is wanted... " >&6; }
3142 # Check whether --enable-nls was given.
3143 if test "${enable_nls+set}" = set; then :
3144 enableval=$enable_nls;
3145 case $enableval in
3146 yes)
3153 enable_nls=yes
3154 WANTED_LANGUAGES=$enableval
3156 esac
3158 else
3159 enable_nls=no
3164 if test "$enable_nls" = yes; then
3166 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
3170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_nls" >&5
3171 $as_echo "$enable_nls" >&6; }
3176 # Default port number (--with-pgport), default 5432
3178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default port number" >&5
3179 $as_echo_n "checking for default port number... " >&6; }
3183 # Check whether --with-pgport was given.
3184 if test "${with_pgport+set}" = set; then :
3185 withval=$with_pgport;
3186 case $withval in
3187 yes)
3188 as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3191 as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3194 default_port=$withval
3196 esac
3198 else
3199 default_port=5432
3203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_port" >&5
3204 $as_echo "$default_port" >&6; }
3205 # Need both of these because some places want an integer and some a string
3207 cat >>confdefs.h <<_ACEOF
3208 #define DEF_PGPORT ${default_port}
3209 _ACEOF
3212 cat >>confdefs.h <<_ACEOF
3213 #define DEF_PGPORT_STR "${default_port}"
3214 _ACEOF
3218 # It's worth validating port; you can get very confusing errors otherwise
3219 if test x"$default_port" = x""; then
3220 as_fn_error $? "invalid --with-pgport specification: empty string" "$LINENO" 5
3221 elif test ! x`echo "$default_port" | sed -e 's/[0-9]*//'` = x""; then
3222 as_fn_error $? "invalid --with-pgport specification: must be a number" "$LINENO" 5
3223 elif test ! x`echo "$default_port" | sed -e 's/^0.//'` = x"$default_port"; then
3224 as_fn_error $? "invalid --with-pgport specification: must not have leading 0" "$LINENO" 5
3225 elif test "$default_port" -lt "1" -o "$default_port" -gt "65535"; then
3226 as_fn_error $? "invalid --with-pgport specification: must be between 1 and 65535" "$LINENO" 5
3230 # '-rpath'-like feature can be disabled
3234 # Check whether --enable-rpath was given.
3235 if test "${enable_rpath+set}" = set; then :
3236 enableval=$enable_rpath;
3237 case $enableval in
3238 yes)
3245 as_fn_error $? "no argument expected for --enable-rpath option" "$LINENO" 5
3247 esac
3249 else
3250 enable_rpath=yes
3258 # Spinlocks
3262 # Check whether --enable-spinlocks was given.
3263 if test "${enable_spinlocks+set}" = set; then :
3264 enableval=$enable_spinlocks;
3265 case $enableval in
3266 yes)
3273 as_fn_error $? "no argument expected for --enable-spinlocks option" "$LINENO" 5
3275 esac
3277 else
3278 enable_spinlocks=yes
3285 # Atomic operations
3289 # Check whether --enable-atomics was given.
3290 if test "${enable_atomics+set}" = set; then :
3291 enableval=$enable_atomics;
3292 case $enableval in
3293 yes)
3300 as_fn_error $? "no argument expected for --enable-atomics option" "$LINENO" 5
3302 esac
3304 else
3305 enable_atomics=yes
3312 # --enable-debug adds -g to compiler flags
3316 # Check whether --enable-debug was given.
3317 if test "${enable_debug+set}" = set; then :
3318 enableval=$enable_debug;
3319 case $enableval in
3320 yes)
3327 as_fn_error $? "no argument expected for --enable-debug option" "$LINENO" 5
3329 esac
3331 else
3332 enable_debug=no
3340 # --enable-profiling enables gcc profiling
3344 # Check whether --enable-profiling was given.
3345 if test "${enable_profiling+set}" = set; then :
3346 enableval=$enable_profiling;
3347 case $enableval in
3348 yes)
3355 as_fn_error $? "no argument expected for --enable-profiling option" "$LINENO" 5
3357 esac
3359 else
3360 enable_profiling=no
3367 # --enable-coverage enables generation of code coverage metrics with gcov
3371 # Check whether --enable-coverage was given.
3372 if test "${enable_coverage+set}" = set; then :
3373 enableval=$enable_coverage;
3374 case $enableval in
3375 yes)
3376 if test -z "$GCOV"; then
3377 for ac_prog in gcov
3379 # Extract the first word of "$ac_prog", so it can be a program name with args.
3380 set dummy $ac_prog; ac_word=$2
3381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3382 $as_echo_n "checking for $ac_word... " >&6; }
3383 if ${ac_cv_path_GCOV+:} false; then :
3384 $as_echo_n "(cached) " >&6
3385 else
3386 case $GCOV in
3387 [\\/]* | ?:[\\/]*)
3388 ac_cv_path_GCOV="$GCOV" # Let the user override the test with a path.
3391 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3392 for as_dir in $PATH
3394 IFS=$as_save_IFS
3395 test -z "$as_dir" && as_dir=.
3396 for ac_exec_ext in '' $ac_executable_extensions; do
3397 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3398 ac_cv_path_GCOV="$as_dir/$ac_word$ac_exec_ext"
3399 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3400 break 2
3402 done
3403 done
3404 IFS=$as_save_IFS
3407 esac
3409 GCOV=$ac_cv_path_GCOV
3410 if test -n "$GCOV"; then
3411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3412 $as_echo "$GCOV" >&6; }
3413 else
3414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3415 $as_echo "no" >&6; }
3419 test -n "$GCOV" && break
3420 done
3422 else
3423 # Report the value of GCOV in configure's output in all cases.
3424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCOV" >&5
3425 $as_echo_n "checking for GCOV... " >&6; }
3426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3427 $as_echo "$GCOV" >&6; }
3430 if test -z "$GCOV"; then
3431 as_fn_error $? "gcov not found" "$LINENO" 5
3433 if test -z "$LCOV"; then
3434 for ac_prog in lcov
3436 # Extract the first word of "$ac_prog", so it can be a program name with args.
3437 set dummy $ac_prog; ac_word=$2
3438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3439 $as_echo_n "checking for $ac_word... " >&6; }
3440 if ${ac_cv_path_LCOV+:} false; then :
3441 $as_echo_n "(cached) " >&6
3442 else
3443 case $LCOV in
3444 [\\/]* | ?:[\\/]*)
3445 ac_cv_path_LCOV="$LCOV" # Let the user override the test with a path.
3448 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3449 for as_dir in $PATH
3451 IFS=$as_save_IFS
3452 test -z "$as_dir" && as_dir=.
3453 for ac_exec_ext in '' $ac_executable_extensions; do
3454 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3455 ac_cv_path_LCOV="$as_dir/$ac_word$ac_exec_ext"
3456 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3457 break 2
3459 done
3460 done
3461 IFS=$as_save_IFS
3464 esac
3466 LCOV=$ac_cv_path_LCOV
3467 if test -n "$LCOV"; then
3468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3469 $as_echo "$LCOV" >&6; }
3470 else
3471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3472 $as_echo "no" >&6; }
3476 test -n "$LCOV" && break
3477 done
3479 else
3480 # Report the value of LCOV in configure's output in all cases.
3481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCOV" >&5
3482 $as_echo_n "checking for LCOV... " >&6; }
3483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3484 $as_echo "$LCOV" >&6; }
3487 if test -z "$LCOV"; then
3488 as_fn_error $? "lcov not found" "$LINENO" 5
3490 if test -z "$GENHTML"; then
3491 for ac_prog in genhtml
3493 # Extract the first word of "$ac_prog", so it can be a program name with args.
3494 set dummy $ac_prog; ac_word=$2
3495 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3496 $as_echo_n "checking for $ac_word... " >&6; }
3497 if ${ac_cv_path_GENHTML+:} false; then :
3498 $as_echo_n "(cached) " >&6
3499 else
3500 case $GENHTML in
3501 [\\/]* | ?:[\\/]*)
3502 ac_cv_path_GENHTML="$GENHTML" # Let the user override the test with a path.
3505 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3506 for as_dir in $PATH
3508 IFS=$as_save_IFS
3509 test -z "$as_dir" && as_dir=.
3510 for ac_exec_ext in '' $ac_executable_extensions; do
3511 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3512 ac_cv_path_GENHTML="$as_dir/$ac_word$ac_exec_ext"
3513 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3514 break 2
3516 done
3517 done
3518 IFS=$as_save_IFS
3521 esac
3523 GENHTML=$ac_cv_path_GENHTML
3524 if test -n "$GENHTML"; then
3525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3526 $as_echo "$GENHTML" >&6; }
3527 else
3528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3529 $as_echo "no" >&6; }
3533 test -n "$GENHTML" && break
3534 done
3536 else
3537 # Report the value of GENHTML in configure's output in all cases.
3538 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GENHTML" >&5
3539 $as_echo_n "checking for GENHTML... " >&6; }
3540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3541 $as_echo "$GENHTML" >&6; }
3544 if test -z "$GENHTML"; then
3545 as_fn_error $? "genhtml not found" "$LINENO" 5
3552 as_fn_error $? "no argument expected for --enable-coverage option" "$LINENO" 5
3554 esac
3556 else
3557 enable_coverage=no
3565 # DTrace
3569 # Check whether --enable-dtrace was given.
3570 if test "${enable_dtrace+set}" = set; then :
3571 enableval=$enable_dtrace;
3572 case $enableval in
3573 yes)
3574 if test -z "$DTRACE"; then
3575 for ac_prog in dtrace
3577 # Extract the first word of "$ac_prog", so it can be a program name with args.
3578 set dummy $ac_prog; ac_word=$2
3579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3580 $as_echo_n "checking for $ac_word... " >&6; }
3581 if ${ac_cv_path_DTRACE+:} false; then :
3582 $as_echo_n "(cached) " >&6
3583 else
3584 case $DTRACE in
3585 [\\/]* | ?:[\\/]*)
3586 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
3589 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3590 for as_dir in $PATH
3592 IFS=$as_save_IFS
3593 test -z "$as_dir" && as_dir=.
3594 for ac_exec_ext in '' $ac_executable_extensions; do
3595 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3596 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
3597 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3598 break 2
3600 done
3601 done
3602 IFS=$as_save_IFS
3605 esac
3607 DTRACE=$ac_cv_path_DTRACE
3608 if test -n "$DTRACE"; then
3609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3610 $as_echo "$DTRACE" >&6; }
3611 else
3612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3613 $as_echo "no" >&6; }
3617 test -n "$DTRACE" && break
3618 done
3620 else
3621 # Report the value of DTRACE in configure's output in all cases.
3622 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
3623 $as_echo_n "checking for DTRACE... " >&6; }
3624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3625 $as_echo "$DTRACE" >&6; }
3628 if test -z "$DTRACE"; then
3629 as_fn_error $? "dtrace not found" "$LINENO" 5
3637 as_fn_error $? "no argument expected for --enable-dtrace option" "$LINENO" 5
3639 esac
3641 else
3642 enable_dtrace=no
3650 # TAP tests
3654 # Check whether --enable-tap-tests was given.
3655 if test "${enable_tap_tests+set}" = set; then :
3656 enableval=$enable_tap_tests;
3657 case $enableval in
3658 yes)
3665 as_fn_error $? "no argument expected for --enable-tap-tests option" "$LINENO" 5
3667 esac
3669 else
3670 enable_tap_tests=no
3678 # Block size
3680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for block size" >&5
3681 $as_echo_n "checking for block size... " >&6; }
3685 # Check whether --with-blocksize was given.
3686 if test "${with_blocksize+set}" = set; then :
3687 withval=$with_blocksize;
3688 case $withval in
3689 yes)
3690 as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3693 as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3696 blocksize=$withval
3698 esac
3700 else
3701 blocksize=8
3705 case ${blocksize} in
3706 1) BLCKSZ=1024;;
3707 2) BLCKSZ=2048;;
3708 4) BLCKSZ=4096;;
3709 8) BLCKSZ=8192;;
3710 16) BLCKSZ=16384;;
3711 32) BLCKSZ=32768;;
3712 *) as_fn_error $? "Invalid block size. Allowed values are 1,2,4,8,16,32." "$LINENO" 5
3713 esac
3714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${blocksize}kB" >&5
3715 $as_echo "${blocksize}kB" >&6; }
3718 cat >>confdefs.h <<_ACEOF
3719 #define BLCKSZ ${BLCKSZ}
3720 _ACEOF
3724 # Relation segment size
3726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for segment size" >&5
3727 $as_echo_n "checking for segment size... " >&6; }
3731 # Check whether --with-segsize was given.
3732 if test "${with_segsize+set}" = set; then :
3733 withval=$with_segsize;
3734 case $withval in
3735 yes)
3736 as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3739 as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3742 segsize=$withval
3744 esac
3746 else
3747 segsize=1
3751 # this expression is set up to avoid unnecessary integer overflow
3752 # blocksize is already guaranteed to be a factor of 1024
3753 RELSEG_SIZE=`expr '(' 1024 / ${blocksize} ')' '*' ${segsize} '*' 1024`
3754 test $? -eq 0 || exit 1
3755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${segsize}GB" >&5
3756 $as_echo "${segsize}GB" >&6; }
3759 cat >>confdefs.h <<_ACEOF
3760 #define RELSEG_SIZE ${RELSEG_SIZE}
3761 _ACEOF
3765 # WAL block size
3767 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAL block size" >&5
3768 $as_echo_n "checking for WAL block size... " >&6; }
3772 # Check whether --with-wal-blocksize was given.
3773 if test "${with_wal_blocksize+set}" = set; then :
3774 withval=$with_wal_blocksize;
3775 case $withval in
3776 yes)
3777 as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3780 as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3783 wal_blocksize=$withval
3785 esac
3787 else
3788 wal_blocksize=8
3792 case ${wal_blocksize} in
3793 1) XLOG_BLCKSZ=1024;;
3794 2) XLOG_BLCKSZ=2048;;
3795 4) XLOG_BLCKSZ=4096;;
3796 8) XLOG_BLCKSZ=8192;;
3797 16) XLOG_BLCKSZ=16384;;
3798 32) XLOG_BLCKSZ=32768;;
3799 64) XLOG_BLCKSZ=65536;;
3800 *) as_fn_error $? "Invalid WAL block size. Allowed values are 1,2,4,8,16,32,64." "$LINENO" 5
3801 esac
3802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${wal_blocksize}kB" >&5
3803 $as_echo "${wal_blocksize}kB" >&6; }
3806 cat >>confdefs.h <<_ACEOF
3807 #define XLOG_BLCKSZ ${XLOG_BLCKSZ}
3808 _ACEOF
3812 # C compiler
3815 # For historical reasons you can also use --with-CC to specify the C compiler
3816 # to use, although the standard way to do this is to set the CC environment
3817 # variable.
3821 # Check whether --with-CC was given.
3822 if test "${with_CC+set}" = set; then :
3823 withval=$with_CC;
3824 case $withval in
3825 yes)
3826 as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3829 as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3832 CC=$with_CC
3834 esac
3840 case $template in
3841 aix) pgac_cc_list="gcc xlc"; pgac_cxx_list="g++ xlC";;
3842 *) pgac_cc_list="gcc cc"; pgac_cxx_list="g++ c++";;
3843 esac
3845 ac_ext=c
3846 ac_cpp='$CPP $CPPFLAGS'
3847 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3848 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3849 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3850 if test -n "$ac_tool_prefix"; then
3851 for ac_prog in $pgac_cc_list
3853 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3854 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3856 $as_echo_n "checking for $ac_word... " >&6; }
3857 if ${ac_cv_prog_CC+:} false; then :
3858 $as_echo_n "(cached) " >&6
3859 else
3860 if test -n "$CC"; then
3861 ac_cv_prog_CC="$CC" # Let the user override the test.
3862 else
3863 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3864 for as_dir in $PATH
3866 IFS=$as_save_IFS
3867 test -z "$as_dir" && as_dir=.
3868 for ac_exec_ext in '' $ac_executable_extensions; do
3869 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3870 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3871 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3872 break 2
3874 done
3875 done
3876 IFS=$as_save_IFS
3880 CC=$ac_cv_prog_CC
3881 if test -n "$CC"; then
3882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3883 $as_echo "$CC" >&6; }
3884 else
3885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3886 $as_echo "no" >&6; }
3890 test -n "$CC" && break
3891 done
3893 if test -z "$CC"; then
3894 ac_ct_CC=$CC
3895 for ac_prog in $pgac_cc_list
3897 # Extract the first word of "$ac_prog", so it can be a program name with args.
3898 set dummy $ac_prog; ac_word=$2
3899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3900 $as_echo_n "checking for $ac_word... " >&6; }
3901 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3902 $as_echo_n "(cached) " >&6
3903 else
3904 if test -n "$ac_ct_CC"; then
3905 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3906 else
3907 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3908 for as_dir in $PATH
3910 IFS=$as_save_IFS
3911 test -z "$as_dir" && as_dir=.
3912 for ac_exec_ext in '' $ac_executable_extensions; do
3913 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3914 ac_cv_prog_ac_ct_CC="$ac_prog"
3915 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3916 break 2
3918 done
3919 done
3920 IFS=$as_save_IFS
3924 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3925 if test -n "$ac_ct_CC"; then
3926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3927 $as_echo "$ac_ct_CC" >&6; }
3928 else
3929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3930 $as_echo "no" >&6; }
3934 test -n "$ac_ct_CC" && break
3935 done
3937 if test "x$ac_ct_CC" = x; then
3938 CC=""
3939 else
3940 case $cross_compiling:$ac_tool_warned in
3941 yes:)
3942 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3943 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3944 ac_tool_warned=yes ;;
3945 esac
3946 CC=$ac_ct_CC
3951 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3952 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3953 as_fn_error $? "no acceptable C compiler found in \$PATH
3954 See \`config.log' for more details" "$LINENO" 5; }
3956 # Provide some information about the compiler.
3957 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3958 set X $ac_compile
3959 ac_compiler=$2
3960 for ac_option in --version -v -V -qversion; do
3961 { { ac_try="$ac_compiler $ac_option >&5"
3962 case "(($ac_try" in
3963 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3964 *) ac_try_echo=$ac_try;;
3965 esac
3966 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3967 $as_echo "$ac_try_echo"; } >&5
3968 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3969 ac_status=$?
3970 if test -s conftest.err; then
3971 sed '10a\
3972 ... rest of stderr output deleted ...
3973 10q' conftest.err >conftest.er1
3974 cat conftest.er1 >&5
3976 rm -f conftest.er1 conftest.err
3977 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3978 test $ac_status = 0; }
3979 done
3981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3982 /* end confdefs.h. */
3985 main ()
3989 return 0;
3991 _ACEOF
3992 ac_clean_files_save=$ac_clean_files
3993 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3994 # Try to create an executable without -o first, disregard a.out.
3995 # It will help us diagnose broken compilers, and finding out an intuition
3996 # of exeext.
3997 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3998 $as_echo_n "checking whether the C compiler works... " >&6; }
3999 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4001 # The possible output files:
4002 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4004 ac_rmfiles=
4005 for ac_file in $ac_files
4007 case $ac_file in
4008 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4009 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4010 esac
4011 done
4012 rm -f $ac_rmfiles
4014 if { { ac_try="$ac_link_default"
4015 case "(($ac_try" in
4016 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4017 *) ac_try_echo=$ac_try;;
4018 esac
4019 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4020 $as_echo "$ac_try_echo"; } >&5
4021 (eval "$ac_link_default") 2>&5
4022 ac_status=$?
4023 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4024 test $ac_status = 0; }; then :
4025 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4026 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4027 # in a Makefile. We should not override ac_cv_exeext if it was cached,
4028 # so that the user can short-circuit this test for compilers unknown to
4029 # Autoconf.
4030 for ac_file in $ac_files ''
4032 test -f "$ac_file" || continue
4033 case $ac_file in
4034 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4036 [ab].out )
4037 # We found the default executable, but exeext='' is most
4038 # certainly right.
4039 break;;
4040 *.* )
4041 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4042 then :; else
4043 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4045 # We set ac_cv_exeext here because the later test for it is not
4046 # safe: cross compilers may not add the suffix if given an `-o'
4047 # argument, so we may need to know it at that point already.
4048 # Even if this section looks crufty: it has the advantage of
4049 # actually working.
4050 break;;
4052 break;;
4053 esac
4054 done
4055 test "$ac_cv_exeext" = no && ac_cv_exeext=
4057 else
4058 ac_file=''
4060 if test -z "$ac_file"; then :
4061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4062 $as_echo "no" >&6; }
4063 $as_echo "$as_me: failed program was:" >&5
4064 sed 's/^/| /' conftest.$ac_ext >&5
4066 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4067 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4068 as_fn_error 77 "C compiler cannot create executables
4069 See \`config.log' for more details" "$LINENO" 5; }
4070 else
4071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4072 $as_echo "yes" >&6; }
4074 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4075 $as_echo_n "checking for C compiler default output file name... " >&6; }
4076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4077 $as_echo "$ac_file" >&6; }
4078 ac_exeext=$ac_cv_exeext
4080 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4081 ac_clean_files=$ac_clean_files_save
4082 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4083 $as_echo_n "checking for suffix of executables... " >&6; }
4084 if { { ac_try="$ac_link"
4085 case "(($ac_try" in
4086 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4087 *) ac_try_echo=$ac_try;;
4088 esac
4089 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4090 $as_echo "$ac_try_echo"; } >&5
4091 (eval "$ac_link") 2>&5
4092 ac_status=$?
4093 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4094 test $ac_status = 0; }; then :
4095 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4096 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4097 # work properly (i.e., refer to `conftest.exe'), while it won't with
4098 # `rm'.
4099 for ac_file in conftest.exe conftest conftest.*; do
4100 test -f "$ac_file" || continue
4101 case $ac_file in
4102 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4103 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4104 break;;
4105 * ) break;;
4106 esac
4107 done
4108 else
4109 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4110 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4111 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4112 See \`config.log' for more details" "$LINENO" 5; }
4114 rm -f conftest conftest$ac_cv_exeext
4115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4116 $as_echo "$ac_cv_exeext" >&6; }
4118 rm -f conftest.$ac_ext
4119 EXEEXT=$ac_cv_exeext
4120 ac_exeext=$EXEEXT
4121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4122 /* end confdefs.h. */
4123 #include <stdio.h>
4125 main ()
4127 FILE *f = fopen ("conftest.out", "w");
4128 return ferror (f) || fclose (f) != 0;
4131 return 0;
4133 _ACEOF
4134 ac_clean_files="$ac_clean_files conftest.out"
4135 # Check that the compiler produces executables we can run. If not, either
4136 # the compiler is broken, or we cross compile.
4137 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4138 $as_echo_n "checking whether we are cross compiling... " >&6; }
4139 if test "$cross_compiling" != yes; then
4140 { { ac_try="$ac_link"
4141 case "(($ac_try" in
4142 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4143 *) ac_try_echo=$ac_try;;
4144 esac
4145 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4146 $as_echo "$ac_try_echo"; } >&5
4147 (eval "$ac_link") 2>&5
4148 ac_status=$?
4149 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4150 test $ac_status = 0; }
4151 if { ac_try='./conftest$ac_cv_exeext'
4152 { { case "(($ac_try" in
4153 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4154 *) ac_try_echo=$ac_try;;
4155 esac
4156 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4157 $as_echo "$ac_try_echo"; } >&5
4158 (eval "$ac_try") 2>&5
4159 ac_status=$?
4160 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4161 test $ac_status = 0; }; }; then
4162 cross_compiling=no
4163 else
4164 if test "$cross_compiling" = maybe; then
4165 cross_compiling=yes
4166 else
4167 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4168 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4169 as_fn_error $? "cannot run C compiled programs.
4170 If you meant to cross compile, use \`--host'.
4171 See \`config.log' for more details" "$LINENO" 5; }
4175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4176 $as_echo "$cross_compiling" >&6; }
4178 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4179 ac_clean_files=$ac_clean_files_save
4180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4181 $as_echo_n "checking for suffix of object files... " >&6; }
4182 if ${ac_cv_objext+:} false; then :
4183 $as_echo_n "(cached) " >&6
4184 else
4185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4186 /* end confdefs.h. */
4189 main ()
4193 return 0;
4195 _ACEOF
4196 rm -f conftest.o conftest.obj
4197 if { { ac_try="$ac_compile"
4198 case "(($ac_try" in
4199 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4200 *) ac_try_echo=$ac_try;;
4201 esac
4202 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4203 $as_echo "$ac_try_echo"; } >&5
4204 (eval "$ac_compile") 2>&5
4205 ac_status=$?
4206 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4207 test $ac_status = 0; }; then :
4208 for ac_file in conftest.o conftest.obj conftest.*; do
4209 test -f "$ac_file" || continue;
4210 case $ac_file in
4211 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4212 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4213 break;;
4214 esac
4215 done
4216 else
4217 $as_echo "$as_me: failed program was:" >&5
4218 sed 's/^/| /' conftest.$ac_ext >&5
4220 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4221 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4222 as_fn_error $? "cannot compute suffix of object files: cannot compile
4223 See \`config.log' for more details" "$LINENO" 5; }
4225 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4228 $as_echo "$ac_cv_objext" >&6; }
4229 OBJEXT=$ac_cv_objext
4230 ac_objext=$OBJEXT
4231 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4232 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4233 if ${ac_cv_c_compiler_gnu+:} false; then :
4234 $as_echo_n "(cached) " >&6
4235 else
4236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4237 /* end confdefs.h. */
4240 main ()
4242 #ifndef __GNUC__
4243 choke me
4244 #endif
4247 return 0;
4249 _ACEOF
4250 if ac_fn_c_try_compile "$LINENO"; then :
4251 ac_compiler_gnu=yes
4252 else
4253 ac_compiler_gnu=no
4255 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4256 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4260 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4261 if test $ac_compiler_gnu = yes; then
4262 GCC=yes
4263 else
4264 GCC=
4266 ac_test_CFLAGS=${CFLAGS+set}
4267 ac_save_CFLAGS=$CFLAGS
4268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4269 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4270 if ${ac_cv_prog_cc_g+:} false; then :
4271 $as_echo_n "(cached) " >&6
4272 else
4273 ac_save_c_werror_flag=$ac_c_werror_flag
4274 ac_c_werror_flag=yes
4275 ac_cv_prog_cc_g=no
4276 CFLAGS="-g"
4277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4278 /* end confdefs.h. */
4281 main ()
4285 return 0;
4287 _ACEOF
4288 if ac_fn_c_try_compile "$LINENO"; then :
4289 ac_cv_prog_cc_g=yes
4290 else
4291 CFLAGS=""
4292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4293 /* end confdefs.h. */
4296 main ()
4300 return 0;
4302 _ACEOF
4303 if ac_fn_c_try_compile "$LINENO"; then :
4305 else
4306 ac_c_werror_flag=$ac_save_c_werror_flag
4307 CFLAGS="-g"
4308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4309 /* end confdefs.h. */
4312 main ()
4316 return 0;
4318 _ACEOF
4319 if ac_fn_c_try_compile "$LINENO"; then :
4320 ac_cv_prog_cc_g=yes
4322 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4324 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4326 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4327 ac_c_werror_flag=$ac_save_c_werror_flag
4329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4330 $as_echo "$ac_cv_prog_cc_g" >&6; }
4331 if test "$ac_test_CFLAGS" = set; then
4332 CFLAGS=$ac_save_CFLAGS
4333 elif test $ac_cv_prog_cc_g = yes; then
4334 if test "$GCC" = yes; then
4335 CFLAGS="-g -O2"
4336 else
4337 CFLAGS="-g"
4339 else
4340 if test "$GCC" = yes; then
4341 CFLAGS="-O2"
4342 else
4343 CFLAGS=
4346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4347 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4348 if ${ac_cv_prog_cc_c89+:} false; then :
4349 $as_echo_n "(cached) " >&6
4350 else
4351 ac_cv_prog_cc_c89=no
4352 ac_save_CC=$CC
4353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4354 /* end confdefs.h. */
4355 #include <stdarg.h>
4356 #include <stdio.h>
4357 struct stat;
4358 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4359 struct buf { int x; };
4360 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4361 static char *e (p, i)
4362 char **p;
4363 int i;
4365 return p[i];
4367 static char *f (char * (*g) (char **, int), char **p, ...)
4369 char *s;
4370 va_list v;
4371 va_start (v,p);
4372 s = g (p, va_arg (v,int));
4373 va_end (v);
4374 return s;
4377 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4378 function prototypes and stuff, but not '\xHH' hex character constants.
4379 These don't provoke an error unfortunately, instead are silently treated
4380 as 'x'. The following induces an error, until -std is added to get
4381 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4382 array size at least. It's necessary to write '\x00'==0 to get something
4383 that's true only with -std. */
4384 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4386 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4387 inside strings and character constants. */
4388 #define FOO(x) 'x'
4389 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4391 int test (int i, double x);
4392 struct s1 {int (*f) (int a);};
4393 struct s2 {int (*f) (double a);};
4394 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4395 int argc;
4396 char **argv;
4398 main ()
4400 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4402 return 0;
4404 _ACEOF
4405 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4406 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4408 CC="$ac_save_CC $ac_arg"
4409 if ac_fn_c_try_compile "$LINENO"; then :
4410 ac_cv_prog_cc_c89=$ac_arg
4412 rm -f core conftest.err conftest.$ac_objext
4413 test "x$ac_cv_prog_cc_c89" != "xno" && break
4414 done
4415 rm -f conftest.$ac_ext
4416 CC=$ac_save_CC
4419 # AC_CACHE_VAL
4420 case "x$ac_cv_prog_cc_c89" in
4422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4423 $as_echo "none needed" >&6; } ;;
4424 xno)
4425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4426 $as_echo "unsupported" >&6; } ;;
4428 CC="$CC $ac_cv_prog_cc_c89"
4429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4430 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4431 esac
4432 if test "x$ac_cv_prog_cc_c89" != xno; then :
4436 ac_ext=c
4437 ac_cpp='$CPP $CPPFLAGS'
4438 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4439 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4440 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
4443 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
4444 if ${ac_cv_prog_cc_c99+:} false; then :
4445 $as_echo_n "(cached) " >&6
4446 else
4447 ac_cv_prog_cc_c99=no
4448 ac_save_CC=$CC
4449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4450 /* end confdefs.h. */
4451 #include <stdarg.h>
4452 #include <stdbool.h>
4453 #include <stdlib.h>
4454 #include <wchar.h>
4455 #include <stdio.h>
4457 // Check varargs macros. These examples are taken from C99 6.10.3.5.
4458 #define debug(...) fprintf (stderr, __VA_ARGS__)
4459 #define showlist(...) puts (#__VA_ARGS__)
4460 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
4461 static void
4462 test_varargs_macros (void)
4464 int x = 1234;
4465 int y = 5678;
4466 debug ("Flag");
4467 debug ("X = %d\n", x);
4468 showlist (The first, second, and third items.);
4469 report (x>y, "x is %d but y is %d", x, y);
4472 // Check long long types.
4473 #define BIG64 18446744073709551615ull
4474 #define BIG32 4294967295ul
4475 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
4476 #if !BIG_OK
4477 your preprocessor is broken;
4478 #endif
4479 #if BIG_OK
4480 #else
4481 your preprocessor is broken;
4482 #endif
4483 static long long int bignum = -9223372036854775807LL;
4484 static unsigned long long int ubignum = BIG64;
4486 struct incomplete_array
4488 int datasize;
4489 double data[];
4492 struct named_init {
4493 int number;
4494 const wchar_t *name;
4495 double average;
4498 typedef const char *ccp;
4500 static inline int
4501 test_restrict (ccp restrict text)
4503 // See if C++-style comments work.
4504 // Iterate through items via the restricted pointer.
4505 // Also check for declarations in for loops.
4506 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
4507 continue;
4508 return 0;
4511 // Check varargs and va_copy.
4512 static void
4513 test_varargs (const char *format, ...)
4515 va_list args;
4516 va_start (args, format);
4517 va_list args_copy;
4518 va_copy (args_copy, args);
4520 const char *str;
4521 int number;
4522 float fnumber;
4524 while (*format)
4526 switch (*format++)
4528 case 's': // string
4529 str = va_arg (args_copy, const char *);
4530 break;
4531 case 'd': // int
4532 number = va_arg (args_copy, int);
4533 break;
4534 case 'f': // float
4535 fnumber = va_arg (args_copy, double);
4536 break;
4537 default:
4538 break;
4541 va_end (args_copy);
4542 va_end (args);
4546 main ()
4549 // Check bool.
4550 _Bool success = false;
4552 // Check restrict.
4553 if (test_restrict ("String literal") == 0)
4554 success = true;
4555 char *restrict newvar = "Another string";
4557 // Check varargs.
4558 test_varargs ("s, d' f .", "string", 65, 34.234);
4559 test_varargs_macros ();
4561 // Check flexible array members.
4562 struct incomplete_array *ia =
4563 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
4564 ia->datasize = 10;
4565 for (int i = 0; i < ia->datasize; ++i)
4566 ia->data[i] = i * 1.234;
4568 // Check named initializers.
4569 struct named_init ni = {
4570 .number = 34,
4571 .name = L"Test wide string",
4572 .average = 543.34343,
4575 ni.number = 58;
4577 int dynamic_array[ni.number];
4578 dynamic_array[ni.number - 1] = 543;
4580 // work around unused variable warnings
4581 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
4582 || dynamic_array[ni.number - 1] != 543);
4585 return 0;
4587 _ACEOF
4588 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
4590 CC="$ac_save_CC $ac_arg"
4591 if ac_fn_c_try_compile "$LINENO"; then :
4592 ac_cv_prog_cc_c99=$ac_arg
4594 rm -f core conftest.err conftest.$ac_objext
4595 test "x$ac_cv_prog_cc_c99" != "xno" && break
4596 done
4597 rm -f conftest.$ac_ext
4598 CC=$ac_save_CC
4601 # AC_CACHE_VAL
4602 case "x$ac_cv_prog_cc_c99" in
4604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4605 $as_echo "none needed" >&6; } ;;
4606 xno)
4607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4608 $as_echo "unsupported" >&6; } ;;
4610 CC="$CC $ac_cv_prog_cc_c99"
4611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
4612 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
4613 esac
4614 if test "x$ac_cv_prog_cc_c99" != xno; then :
4620 # Error out if the compiler does not support C99, as the codebase
4621 # relies on that.
4622 if test "$ac_cv_prog_cc_c99" = no; then
4623 as_fn_error $? "C compiler \"$CC\" does not support C99" "$LINENO" 5
4626 ac_ext=cpp
4627 ac_cpp='$CXXCPP $CPPFLAGS'
4628 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4629 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4630 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
4631 if test -z "$CXX"; then
4632 if test -n "$CCC"; then
4633 CXX=$CCC
4634 else
4635 if test -n "$ac_tool_prefix"; then
4636 for ac_prog in $pgac_cxx_list
4638 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4639 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4641 $as_echo_n "checking for $ac_word... " >&6; }
4642 if ${ac_cv_prog_CXX+:} false; then :
4643 $as_echo_n "(cached) " >&6
4644 else
4645 if test -n "$CXX"; then
4646 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4647 else
4648 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4649 for as_dir in $PATH
4651 IFS=$as_save_IFS
4652 test -z "$as_dir" && as_dir=.
4653 for ac_exec_ext in '' $ac_executable_extensions; do
4654 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4655 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
4656 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4657 break 2
4659 done
4660 done
4661 IFS=$as_save_IFS
4665 CXX=$ac_cv_prog_CXX
4666 if test -n "$CXX"; then
4667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4668 $as_echo "$CXX" >&6; }
4669 else
4670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4671 $as_echo "no" >&6; }
4675 test -n "$CXX" && break
4676 done
4678 if test -z "$CXX"; then
4679 ac_ct_CXX=$CXX
4680 for ac_prog in $pgac_cxx_list
4682 # Extract the first word of "$ac_prog", so it can be a program name with args.
4683 set dummy $ac_prog; ac_word=$2
4684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4685 $as_echo_n "checking for $ac_word... " >&6; }
4686 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4687 $as_echo_n "(cached) " >&6
4688 else
4689 if test -n "$ac_ct_CXX"; then
4690 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4691 else
4692 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4693 for as_dir in $PATH
4695 IFS=$as_save_IFS
4696 test -z "$as_dir" && as_dir=.
4697 for ac_exec_ext in '' $ac_executable_extensions; do
4698 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4699 ac_cv_prog_ac_ct_CXX="$ac_prog"
4700 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4701 break 2
4703 done
4704 done
4705 IFS=$as_save_IFS
4709 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4710 if test -n "$ac_ct_CXX"; then
4711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4712 $as_echo "$ac_ct_CXX" >&6; }
4713 else
4714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4715 $as_echo "no" >&6; }
4719 test -n "$ac_ct_CXX" && break
4720 done
4722 if test "x$ac_ct_CXX" = x; then
4723 CXX="g++"
4724 else
4725 case $cross_compiling:$ac_tool_warned in
4726 yes:)
4727 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4728 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4729 ac_tool_warned=yes ;;
4730 esac
4731 CXX=$ac_ct_CXX
4737 # Provide some information about the compiler.
4738 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
4739 set X $ac_compile
4740 ac_compiler=$2
4741 for ac_option in --version -v -V -qversion; do
4742 { { ac_try="$ac_compiler $ac_option >&5"
4743 case "(($ac_try" in
4744 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4745 *) ac_try_echo=$ac_try;;
4746 esac
4747 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4748 $as_echo "$ac_try_echo"; } >&5
4749 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4750 ac_status=$?
4751 if test -s conftest.err; then
4752 sed '10a\
4753 ... rest of stderr output deleted ...
4754 10q' conftest.err >conftest.er1
4755 cat conftest.er1 >&5
4757 rm -f conftest.er1 conftest.err
4758 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4759 test $ac_status = 0; }
4760 done
4762 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
4763 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
4764 if ${ac_cv_cxx_compiler_gnu+:} false; then :
4765 $as_echo_n "(cached) " >&6
4766 else
4767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4768 /* end confdefs.h. */
4771 main ()
4773 #ifndef __GNUC__
4774 choke me
4775 #endif
4778 return 0;
4780 _ACEOF
4781 if ac_fn_cxx_try_compile "$LINENO"; then :
4782 ac_compiler_gnu=yes
4783 else
4784 ac_compiler_gnu=no
4786 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4787 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
4790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
4791 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
4792 if test $ac_compiler_gnu = yes; then
4793 GXX=yes
4794 else
4795 GXX=
4797 ac_test_CXXFLAGS=${CXXFLAGS+set}
4798 ac_save_CXXFLAGS=$CXXFLAGS
4799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
4800 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
4801 if ${ac_cv_prog_cxx_g+:} false; then :
4802 $as_echo_n "(cached) " >&6
4803 else
4804 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
4805 ac_cxx_werror_flag=yes
4806 ac_cv_prog_cxx_g=no
4807 CXXFLAGS="-g"
4808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4809 /* end confdefs.h. */
4812 main ()
4816 return 0;
4818 _ACEOF
4819 if ac_fn_cxx_try_compile "$LINENO"; then :
4820 ac_cv_prog_cxx_g=yes
4821 else
4822 CXXFLAGS=""
4823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4824 /* end confdefs.h. */
4827 main ()
4831 return 0;
4833 _ACEOF
4834 if ac_fn_cxx_try_compile "$LINENO"; then :
4836 else
4837 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4838 CXXFLAGS="-g"
4839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4840 /* end confdefs.h. */
4843 main ()
4847 return 0;
4849 _ACEOF
4850 if ac_fn_cxx_try_compile "$LINENO"; then :
4851 ac_cv_prog_cxx_g=yes
4853 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4855 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4857 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4858 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
4861 $as_echo "$ac_cv_prog_cxx_g" >&6; }
4862 if test "$ac_test_CXXFLAGS" = set; then
4863 CXXFLAGS=$ac_save_CXXFLAGS
4864 elif test $ac_cv_prog_cxx_g = yes; then
4865 if test "$GXX" = yes; then
4866 CXXFLAGS="-g -O2"
4867 else
4868 CXXFLAGS="-g"
4870 else
4871 if test "$GXX" = yes; then
4872 CXXFLAGS="-O2"
4873 else
4874 CXXFLAGS=
4877 ac_ext=c
4878 ac_cpp='$CPP $CPPFLAGS'
4879 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4880 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4881 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4884 # Check if it's Intel's compiler, which (usually) pretends to be gcc,
4885 # but has idiosyncrasies of its own. We assume icc will define
4886 # __INTEL_COMPILER regardless of CFLAGS.
4888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4889 /* end confdefs.h. */
4892 main ()
4894 #ifndef __INTEL_COMPILER
4895 choke me
4896 #endif
4898 return 0;
4900 _ACEOF
4901 if ac_fn_c_try_compile "$LINENO"; then :
4902 ICC=yes
4903 else
4904 ICC=no
4906 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4908 # Check if it's Sun Studio compiler. We assume that
4909 # __SUNPRO_C will be defined for Sun Studio compilers
4910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4911 /* end confdefs.h. */
4914 main ()
4916 #ifndef __SUNPRO_C
4917 choke me
4918 #endif
4920 return 0;
4922 _ACEOF
4923 if ac_fn_c_try_compile "$LINENO"; then :
4924 SUN_STUDIO_CC=yes
4925 else
4926 SUN_STUDIO_CC=no
4928 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4934 # LLVM
4936 # Checked early because subsequent tests depend on it.
4940 # Check whether --with-llvm was given.
4941 if test "${with_llvm+set}" = set; then :
4942 withval=$with_llvm;
4943 case $withval in
4944 yes)
4946 $as_echo "#define USE_LLVM 1" >>confdefs.h
4953 as_fn_error $? "no argument expected for --with-llvm option" "$LINENO" 5
4955 esac
4957 else
4958 with_llvm=no
4964 for ac_prog in gawk mawk nawk awk
4966 # Extract the first word of "$ac_prog", so it can be a program name with args.
4967 set dummy $ac_prog; ac_word=$2
4968 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4969 $as_echo_n "checking for $ac_word... " >&6; }
4970 if ${ac_cv_prog_AWK+:} false; then :
4971 $as_echo_n "(cached) " >&6
4972 else
4973 if test -n "$AWK"; then
4974 ac_cv_prog_AWK="$AWK" # Let the user override the test.
4975 else
4976 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4977 for as_dir in $PATH
4979 IFS=$as_save_IFS
4980 test -z "$as_dir" && as_dir=.
4981 for ac_exec_ext in '' $ac_executable_extensions; do
4982 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4983 ac_cv_prog_AWK="$ac_prog"
4984 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4985 break 2
4987 done
4988 done
4989 IFS=$as_save_IFS
4993 AWK=$ac_cv_prog_AWK
4994 if test -n "$AWK"; then
4995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
4996 $as_echo "$AWK" >&6; }
4997 else
4998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4999 $as_echo "no" >&6; }
5003 test -n "$AWK" && break
5004 done
5006 if test "$with_llvm" = yes; then :
5012 if test -z "$LLVM_CONFIG"; then
5013 for ac_prog in llvm-config llvm-config-7 llvm-config-6.0 llvm-config-5.0 llvm-config-4.0 llvm-config-3.9
5015 # Extract the first word of "$ac_prog", so it can be a program name with args.
5016 set dummy $ac_prog; ac_word=$2
5017 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5018 $as_echo_n "checking for $ac_word... " >&6; }
5019 if ${ac_cv_path_LLVM_CONFIG+:} false; then :
5020 $as_echo_n "(cached) " >&6
5021 else
5022 case $LLVM_CONFIG in
5023 [\\/]* | ?:[\\/]*)
5024 ac_cv_path_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test with a path.
5027 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5028 for as_dir in $PATH
5030 IFS=$as_save_IFS
5031 test -z "$as_dir" && as_dir=.
5032 for ac_exec_ext in '' $ac_executable_extensions; do
5033 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5034 ac_cv_path_LLVM_CONFIG="$as_dir/$ac_word$ac_exec_ext"
5035 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5036 break 2
5038 done
5039 done
5040 IFS=$as_save_IFS
5043 esac
5045 LLVM_CONFIG=$ac_cv_path_LLVM_CONFIG
5046 if test -n "$LLVM_CONFIG"; then
5047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
5048 $as_echo "$LLVM_CONFIG" >&6; }
5049 else
5050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5051 $as_echo "no" >&6; }
5055 test -n "$LLVM_CONFIG" && break
5056 done
5058 else
5059 # Report the value of LLVM_CONFIG in configure's output in all cases.
5060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LLVM_CONFIG" >&5
5061 $as_echo_n "checking for LLVM_CONFIG... " >&6; }
5062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
5063 $as_echo "$LLVM_CONFIG" >&6; }
5067 # no point continuing if llvm wasn't found
5068 if test -z "$LLVM_CONFIG"; then
5069 as_fn_error $? "llvm-config not found, but required when compiling --with-llvm, specify with LLVM_CONFIG=" "$LINENO" 5
5071 # check if detected $LLVM_CONFIG is executable
5072 pgac_llvm_version="$($LLVM_CONFIG --version 2> /dev/null || echo no)"
5073 if test "x$pgac_llvm_version" = "xno"; then
5074 as_fn_error $? "$LLVM_CONFIG does not work" "$LINENO" 5
5076 # and whether the version is supported
5077 if echo $pgac_llvm_version | $AWK -F '.' '{ if ($1 >= 4 || ($1 == 3 && $2 >= 9)) exit 1; else exit 0;}';then
5078 as_fn_error $? "$LLVM_CONFIG version is $pgac_llvm_version but at least 3.9 is required" "$LINENO" 5
5081 # need clang to create some bitcode files
5083 if test -z "$CLANG"; then
5084 for ac_prog in clang clang-7 clang-6.0 clang-5.0 clang-4.0 clang-3.9
5086 # Extract the first word of "$ac_prog", so it can be a program name with args.
5087 set dummy $ac_prog; ac_word=$2
5088 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5089 $as_echo_n "checking for $ac_word... " >&6; }
5090 if ${ac_cv_path_CLANG+:} false; then :
5091 $as_echo_n "(cached) " >&6
5092 else
5093 case $CLANG in
5094 [\\/]* | ?:[\\/]*)
5095 ac_cv_path_CLANG="$CLANG" # Let the user override the test with a path.
5098 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5099 for as_dir in $PATH
5101 IFS=$as_save_IFS
5102 test -z "$as_dir" && as_dir=.
5103 for ac_exec_ext in '' $ac_executable_extensions; do
5104 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5105 ac_cv_path_CLANG="$as_dir/$ac_word$ac_exec_ext"
5106 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5107 break 2
5109 done
5110 done
5111 IFS=$as_save_IFS
5114 esac
5116 CLANG=$ac_cv_path_CLANG
5117 if test -n "$CLANG"; then
5118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
5119 $as_echo "$CLANG" >&6; }
5120 else
5121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5122 $as_echo "no" >&6; }
5126 test -n "$CLANG" && break
5127 done
5129 else
5130 # Report the value of CLANG in configure's output in all cases.
5131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CLANG" >&5
5132 $as_echo_n "checking for CLANG... " >&6; }
5133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
5134 $as_echo "$CLANG" >&6; }
5137 if test -z "$CLANG"; then
5138 as_fn_error $? "clang not found, but required when compiling --with-llvm, specify with CLANG=" "$LINENO" 5
5140 # make sure clang is executable
5141 if test "x$($CLANG --version 2> /dev/null || echo no)" = "xno"; then
5142 as_fn_error $? "$CLANG does not work" "$LINENO" 5
5144 # Could check clang version, but it doesn't seem that
5145 # important. Systems with a new enough LLVM version are usually
5146 # going to have a decent clang version too. It's also not entirely
5147 # clear what the minimum version is.
5149 # Collect compiler flags necessary to build the LLVM dependent
5150 # shared library.
5151 for pgac_option in `$LLVM_CONFIG --cppflags`; do
5152 case $pgac_option in
5153 -I*|-D*) LLVM_CPPFLAGS="$pgac_option $LLVM_CPPFLAGS";;
5154 esac
5155 done
5157 for pgac_option in `$LLVM_CONFIG --ldflags`; do
5158 case $pgac_option in
5159 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
5160 esac
5161 done
5163 # ABI influencing options, standard influencing options
5164 for pgac_option in `$LLVM_CONFIG --cxxflags`; do
5165 case $pgac_option in
5166 -fno-rtti*) LLVM_CXXFLAGS="$LLVM_CXXFLAGS $pgac_option";;
5167 -std=*) LLVM_CXXFLAGS="$LLVM_CXXFLAGS $pgac_option";;
5168 esac
5169 done
5171 # Look for components we're interested in, collect necessary
5172 # libs. As some components are optional, we can't just list all of
5173 # them as it'd raise an error.
5174 pgac_components='';
5175 for pgac_component in `$LLVM_CONFIG --components`; do
5176 case $pgac_component in
5177 engine) pgac_components="$pgac_components $pgac_component";;
5178 debuginfodwarf) pgac_components="$pgac_components $pgac_component";;
5179 orcjit) pgac_components="$pgac_components $pgac_component";;
5180 passes) pgac_components="$pgac_components $pgac_component";;
5181 native) pgac_components="$pgac_components $pgac_component";;
5182 perfjitevents) pgac_components="$pgac_components $pgac_component";;
5183 esac
5184 done;
5186 # And then get the libraries that need to be linked in for the
5187 # selected components. They're large libraries, we only want to
5188 # link them into the LLVM using shared library.
5189 for pgac_option in `$LLVM_CONFIG --libs --system-libs $pgac_components`; do
5190 case $pgac_option in
5191 -l*) LLVM_LIBS="$LLVM_LIBS $pgac_option";;
5192 esac
5193 done
5195 LLVM_BINPATH=`$LLVM_CONFIG --bindir`
5205 fi # fi
5208 unset CFLAGS
5209 unset CXXFLAGS
5212 # Read the template
5214 . "$srcdir/src/template/$template" || exit
5216 # C[XX]FLAGS are selected so:
5217 # If the user specifies something in the environment, that is used.
5218 # else: If the template file set something, that is used.
5219 # else: If coverage was enabled, don't set anything.
5220 # else: If the compiler is GCC, then we use -O2.
5221 # else: If the compiler is something else, then we use -O, unless debugging.
5223 if test "$ac_env_CFLAGS_set" = set; then
5224 CFLAGS=$ac_env_CFLAGS_value
5225 elif test "${CFLAGS+set}" = set; then
5226 : # (keep what template set)
5227 elif test "$enable_coverage" = yes; then
5228 : # no optimization by default
5229 elif test "$GCC" = yes; then
5230 CFLAGS="-O2"
5231 else
5232 # if the user selected debug mode, don't use -O
5233 if test "$enable_debug" != yes; then
5234 CFLAGS="-O"
5238 if test "$ac_env_CXXFLAGS_set" = set; then
5239 CXXFLAGS=$ac_env_CXXFLAGS_value
5240 elif test "${CXXFLAGS+set}" = set; then
5241 : # (keep what template set)
5242 elif test "$enable_coverage" = yes; then
5243 : # no optimization by default
5244 elif test "$GCC" = yes; then
5245 CXXFLAGS="-O2"
5246 else
5247 # if the user selected debug mode, don't use -O
5248 if test "$enable_debug" != yes; then
5249 CXXFLAGS="-O"
5253 # When generating bitcode (for inlining) we always want to use -O2
5254 # even when --enable-debug is specified. The bitcode it's not going to
5255 # be used for line-by-line debugging, and JIT inlining doesn't work
5256 # without at least -O1 (otherwise clang will emit 'noinline'
5257 # attributes everywhere), which is bad for testing. Still allow the
5258 # environment to override if done explicitly.
5259 if test "$ac_env_BITCODE_CFLAGS_set" = set; then
5260 BITCODE_CFLAGS=$ac_env_BITCODE_CFLAGS_value
5261 else
5262 BITCODE_CFLAGS="-O2 $BITCODE_CFLAGS"
5264 if test "$ac_env_BITCODE_CXXFLAGS_set" = set; then
5265 BITCODE_CXXFLAGS=$ac_env_BITCODE_CXXFLAGS_value
5266 else
5267 BITCODE_CXXFLAGS="-O2 $BITCODE_CXXFLAGS"
5270 # C[XX]FLAGS we determined above will be added back at the end
5271 user_CFLAGS=$CFLAGS
5272 CFLAGS=""
5273 user_CXXFLAGS=$CXXFLAGS
5274 CXXFLAGS=""
5275 user_BITCODE_CFLAGS=$BITCODE_CFLAGS
5276 BITCODE_CFLAGS=""
5277 user_BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS
5278 BITCODE_CXXFLAGS=""
5280 # set CFLAGS_UNROLL_LOOPS and CFLAGS_VECTORIZE from the environment, if present
5281 if test "$ac_env_CFLAGS_UNROLL_LOOPS_set" = set; then
5282 CFLAGS_UNROLL_LOOPS=$ac_env_CFLAGS_UNROLL_LOOPS_value
5284 if test "$ac_env_CFLAGS_VECTORIZE_set" = set; then
5285 CFLAGS_VECTORIZE=$ac_env_CFLAGS_VECTORIZE_value
5288 # Some versions of GCC support some additional useful warning flags.
5289 # Check whether they are supported, and add them to CFLAGS if so.
5290 # ICC pretends to be GCC but it's lying; it doesn't support these flags,
5291 # but has its own. Also check other compiler-specific flags here.
5293 if test "$GCC" = yes -a "$ICC" = no; then
5294 CFLAGS="-Wall -Wmissing-prototypes -Wpointer-arith"
5295 CXXFLAGS="-Wall -Wpointer-arith"
5296 # These work in some but not all gcc versions
5297 save_CFLAGS=$CFLAGS
5299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS" >&5
5300 $as_echo_n "checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS... " >&6; }
5301 if ${pgac_cv_prog_CC_cflags__Wdeclaration_after_statement+:} false; then :
5302 $as_echo_n "(cached) " >&6
5303 else
5304 pgac_save_CFLAGS=$CFLAGS
5305 pgac_save_CC=$CC
5306 CC=${CC}
5307 CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
5308 ac_save_c_werror_flag=$ac_c_werror_flag
5309 ac_c_werror_flag=yes
5310 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5311 /* end confdefs.h. */
5314 main ()
5318 return 0;
5320 _ACEOF
5321 if ac_fn_c_try_compile "$LINENO"; then :
5322 pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=yes
5323 else
5324 pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=no
5326 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5327 ac_c_werror_flag=$ac_save_c_werror_flag
5328 CFLAGS="$pgac_save_CFLAGS"
5329 CC="$pgac_save_CC"
5331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&5
5332 $as_echo "$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&6; }
5333 if test x"$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" = x"yes"; then
5334 CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
5338 # -Wdeclaration-after-statement isn't applicable for C++. Specific C files
5339 # disable it, so AC_SUBST the negative form.
5340 PERMIT_DECLARATION_AFTER_STATEMENT=
5341 if test x"$save_CFLAGS" != x"$CFLAGS"; then
5342 PERMIT_DECLARATION_AFTER_STATEMENT=-Wno-declaration-after-statement
5345 # Really don't want VLAs to be used in our dialect of C
5347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Werror=vla, for CFLAGS" >&5
5348 $as_echo_n "checking whether ${CC} supports -Werror=vla, for CFLAGS... " >&6; }
5349 if ${pgac_cv_prog_CC_cflags__Werror_vla+:} false; then :
5350 $as_echo_n "(cached) " >&6
5351 else
5352 pgac_save_CFLAGS=$CFLAGS
5353 pgac_save_CC=$CC
5354 CC=${CC}
5355 CFLAGS="${CFLAGS} -Werror=vla"
5356 ac_save_c_werror_flag=$ac_c_werror_flag
5357 ac_c_werror_flag=yes
5358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5359 /* end confdefs.h. */
5362 main ()
5366 return 0;
5368 _ACEOF
5369 if ac_fn_c_try_compile "$LINENO"; then :
5370 pgac_cv_prog_CC_cflags__Werror_vla=yes
5371 else
5372 pgac_cv_prog_CC_cflags__Werror_vla=no
5374 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5375 ac_c_werror_flag=$ac_save_c_werror_flag
5376 CFLAGS="$pgac_save_CFLAGS"
5377 CC="$pgac_save_CC"
5379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Werror_vla" >&5
5380 $as_echo "$pgac_cv_prog_CC_cflags__Werror_vla" >&6; }
5381 if test x"$pgac_cv_prog_CC_cflags__Werror_vla" = x"yes"; then
5382 CFLAGS="${CFLAGS} -Werror=vla"
5386 # On macOS, complain about usage of symbols newer than the deployment target
5388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Werror=unguarded-availability-new, for CFLAGS" >&5
5389 $as_echo_n "checking whether ${CC} supports -Werror=unguarded-availability-new, for CFLAGS... " >&6; }
5390 if ${pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new+:} false; then :
5391 $as_echo_n "(cached) " >&6
5392 else
5393 pgac_save_CFLAGS=$CFLAGS
5394 pgac_save_CC=$CC
5395 CC=${CC}
5396 CFLAGS="${CFLAGS} -Werror=unguarded-availability-new"
5397 ac_save_c_werror_flag=$ac_c_werror_flag
5398 ac_c_werror_flag=yes
5399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5400 /* end confdefs.h. */
5403 main ()
5407 return 0;
5409 _ACEOF
5410 if ac_fn_c_try_compile "$LINENO"; then :
5411 pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new=yes
5412 else
5413 pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new=no
5415 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5416 ac_c_werror_flag=$ac_save_c_werror_flag
5417 CFLAGS="$pgac_save_CFLAGS"
5418 CC="$pgac_save_CC"
5420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new" >&5
5421 $as_echo "$pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new" >&6; }
5422 if test x"$pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new" = x"yes"; then
5423 CFLAGS="${CFLAGS} -Werror=unguarded-availability-new"
5427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Werror=unguarded-availability-new, for CXXFLAGS" >&5
5428 $as_echo_n "checking whether ${CXX} supports -Werror=unguarded-availability-new, for CXXFLAGS... " >&6; }
5429 if ${pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new+:} false; then :
5430 $as_echo_n "(cached) " >&6
5431 else
5432 pgac_save_CXXFLAGS=$CXXFLAGS
5433 pgac_save_CXX=$CXX
5434 CXX=${CXX}
5435 CXXFLAGS="${CXXFLAGS} -Werror=unguarded-availability-new"
5436 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5437 ac_cxx_werror_flag=yes
5438 ac_ext=cpp
5439 ac_cpp='$CXXCPP $CPPFLAGS'
5440 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5441 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5442 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5445 /* end confdefs.h. */
5448 main ()
5452 return 0;
5454 _ACEOF
5455 if ac_fn_cxx_try_compile "$LINENO"; then :
5456 pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new=yes
5457 else
5458 pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new=no
5460 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5461 ac_ext=c
5462 ac_cpp='$CPP $CPPFLAGS'
5463 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5464 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5465 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5467 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5468 CXXFLAGS="$pgac_save_CXXFLAGS"
5469 CXX="$pgac_save_CXX"
5471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new" >&5
5472 $as_echo "$pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new" >&6; }
5473 if test x"$pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new" = x"yes"; then
5474 CXXFLAGS="${CXXFLAGS} -Werror=unguarded-availability-new"
5478 # -Wvla is not applicable for C++
5480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wendif-labels, for CFLAGS" >&5
5481 $as_echo_n "checking whether ${CC} supports -Wendif-labels, for CFLAGS... " >&6; }
5482 if ${pgac_cv_prog_CC_cflags__Wendif_labels+:} false; then :
5483 $as_echo_n "(cached) " >&6
5484 else
5485 pgac_save_CFLAGS=$CFLAGS
5486 pgac_save_CC=$CC
5487 CC=${CC}
5488 CFLAGS="${CFLAGS} -Wendif-labels"
5489 ac_save_c_werror_flag=$ac_c_werror_flag
5490 ac_c_werror_flag=yes
5491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5492 /* end confdefs.h. */
5495 main ()
5499 return 0;
5501 _ACEOF
5502 if ac_fn_c_try_compile "$LINENO"; then :
5503 pgac_cv_prog_CC_cflags__Wendif_labels=yes
5504 else
5505 pgac_cv_prog_CC_cflags__Wendif_labels=no
5507 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5508 ac_c_werror_flag=$ac_save_c_werror_flag
5509 CFLAGS="$pgac_save_CFLAGS"
5510 CC="$pgac_save_CC"
5512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wendif_labels" >&5
5513 $as_echo "$pgac_cv_prog_CC_cflags__Wendif_labels" >&6; }
5514 if test x"$pgac_cv_prog_CC_cflags__Wendif_labels" = x"yes"; then
5515 CFLAGS="${CFLAGS} -Wendif-labels"
5519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wendif-labels, for CXXFLAGS" >&5
5520 $as_echo_n "checking whether ${CXX} supports -Wendif-labels, for CXXFLAGS... " >&6; }
5521 if ${pgac_cv_prog_CXX_cxxflags__Wendif_labels+:} false; then :
5522 $as_echo_n "(cached) " >&6
5523 else
5524 pgac_save_CXXFLAGS=$CXXFLAGS
5525 pgac_save_CXX=$CXX
5526 CXX=${CXX}
5527 CXXFLAGS="${CXXFLAGS} -Wendif-labels"
5528 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5529 ac_cxx_werror_flag=yes
5530 ac_ext=cpp
5531 ac_cpp='$CXXCPP $CPPFLAGS'
5532 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5533 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5534 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5536 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5537 /* end confdefs.h. */
5540 main ()
5544 return 0;
5546 _ACEOF
5547 if ac_fn_cxx_try_compile "$LINENO"; then :
5548 pgac_cv_prog_CXX_cxxflags__Wendif_labels=yes
5549 else
5550 pgac_cv_prog_CXX_cxxflags__Wendif_labels=no
5552 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5553 ac_ext=c
5554 ac_cpp='$CPP $CPPFLAGS'
5555 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5556 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5557 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5559 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5560 CXXFLAGS="$pgac_save_CXXFLAGS"
5561 CXX="$pgac_save_CXX"
5563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wendif_labels" >&5
5564 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wendif_labels" >&6; }
5565 if test x"$pgac_cv_prog_CXX_cxxflags__Wendif_labels" = x"yes"; then
5566 CXXFLAGS="${CXXFLAGS} -Wendif-labels"
5571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS" >&5
5572 $as_echo_n "checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS... " >&6; }
5573 if ${pgac_cv_prog_CC_cflags__Wmissing_format_attribute+:} false; then :
5574 $as_echo_n "(cached) " >&6
5575 else
5576 pgac_save_CFLAGS=$CFLAGS
5577 pgac_save_CC=$CC
5578 CC=${CC}
5579 CFLAGS="${CFLAGS} -Wmissing-format-attribute"
5580 ac_save_c_werror_flag=$ac_c_werror_flag
5581 ac_c_werror_flag=yes
5582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5583 /* end confdefs.h. */
5586 main ()
5590 return 0;
5592 _ACEOF
5593 if ac_fn_c_try_compile "$LINENO"; then :
5594 pgac_cv_prog_CC_cflags__Wmissing_format_attribute=yes
5595 else
5596 pgac_cv_prog_CC_cflags__Wmissing_format_attribute=no
5598 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5599 ac_c_werror_flag=$ac_save_c_werror_flag
5600 CFLAGS="$pgac_save_CFLAGS"
5601 CC="$pgac_save_CC"
5603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&5
5604 $as_echo "$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&6; }
5605 if test x"$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" = x"yes"; then
5606 CFLAGS="${CFLAGS} -Wmissing-format-attribute"
5610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wmissing-format-attribute, for CXXFLAGS" >&5
5611 $as_echo_n "checking whether ${CXX} supports -Wmissing-format-attribute, for CXXFLAGS... " >&6; }
5612 if ${pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute+:} false; then :
5613 $as_echo_n "(cached) " >&6
5614 else
5615 pgac_save_CXXFLAGS=$CXXFLAGS
5616 pgac_save_CXX=$CXX
5617 CXX=${CXX}
5618 CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute"
5619 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5620 ac_cxx_werror_flag=yes
5621 ac_ext=cpp
5622 ac_cpp='$CXXCPP $CPPFLAGS'
5623 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5624 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5625 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5628 /* end confdefs.h. */
5631 main ()
5635 return 0;
5637 _ACEOF
5638 if ac_fn_cxx_try_compile "$LINENO"; then :
5639 pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute=yes
5640 else
5641 pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute=no
5643 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5644 ac_ext=c
5645 ac_cpp='$CPP $CPPFLAGS'
5646 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5647 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5648 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5650 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5651 CXXFLAGS="$pgac_save_CXXFLAGS"
5652 CXX="$pgac_save_CXX"
5654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" >&5
5655 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" >&6; }
5656 if test x"$pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" = x"yes"; then
5657 CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute"
5662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wimplicit-fallthrough=3, for CFLAGS" >&5
5663 $as_echo_n "checking whether ${CC} supports -Wimplicit-fallthrough=3, for CFLAGS... " >&6; }
5664 if ${pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3+:} false; then :
5665 $as_echo_n "(cached) " >&6
5666 else
5667 pgac_save_CFLAGS=$CFLAGS
5668 pgac_save_CC=$CC
5669 CC=${CC}
5670 CFLAGS="${CFLAGS} -Wimplicit-fallthrough=3"
5671 ac_save_c_werror_flag=$ac_c_werror_flag
5672 ac_c_werror_flag=yes
5673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5674 /* end confdefs.h. */
5677 main ()
5681 return 0;
5683 _ACEOF
5684 if ac_fn_c_try_compile "$LINENO"; then :
5685 pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3=yes
5686 else
5687 pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3=no
5689 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5690 ac_c_werror_flag=$ac_save_c_werror_flag
5691 CFLAGS="$pgac_save_CFLAGS"
5692 CC="$pgac_save_CC"
5694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3" >&5
5695 $as_echo "$pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3" >&6; }
5696 if test x"$pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3" = x"yes"; then
5697 CFLAGS="${CFLAGS} -Wimplicit-fallthrough=3"
5701 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wimplicit-fallthrough=3, for CXXFLAGS" >&5
5702 $as_echo_n "checking whether ${CXX} supports -Wimplicit-fallthrough=3, for CXXFLAGS... " >&6; }
5703 if ${pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3+:} false; then :
5704 $as_echo_n "(cached) " >&6
5705 else
5706 pgac_save_CXXFLAGS=$CXXFLAGS
5707 pgac_save_CXX=$CXX
5708 CXX=${CXX}
5709 CXXFLAGS="${CXXFLAGS} -Wimplicit-fallthrough=3"
5710 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5711 ac_cxx_werror_flag=yes
5712 ac_ext=cpp
5713 ac_cpp='$CXXCPP $CPPFLAGS'
5714 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5715 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5716 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5719 /* end confdefs.h. */
5722 main ()
5726 return 0;
5728 _ACEOF
5729 if ac_fn_cxx_try_compile "$LINENO"; then :
5730 pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3=yes
5731 else
5732 pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3=no
5734 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5735 ac_ext=c
5736 ac_cpp='$CPP $CPPFLAGS'
5737 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5738 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5739 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5741 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5742 CXXFLAGS="$pgac_save_CXXFLAGS"
5743 CXX="$pgac_save_CXX"
5745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3" >&5
5746 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3" >&6; }
5747 if test x"$pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3" = x"yes"; then
5748 CXXFLAGS="${CXXFLAGS} -Wimplicit-fallthrough=3"
5753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wcast-function-type, for CFLAGS" >&5
5754 $as_echo_n "checking whether ${CC} supports -Wcast-function-type, for CFLAGS... " >&6; }
5755 if ${pgac_cv_prog_CC_cflags__Wcast_function_type+:} false; then :
5756 $as_echo_n "(cached) " >&6
5757 else
5758 pgac_save_CFLAGS=$CFLAGS
5759 pgac_save_CC=$CC
5760 CC=${CC}
5761 CFLAGS="${CFLAGS} -Wcast-function-type"
5762 ac_save_c_werror_flag=$ac_c_werror_flag
5763 ac_c_werror_flag=yes
5764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5765 /* end confdefs.h. */
5768 main ()
5772 return 0;
5774 _ACEOF
5775 if ac_fn_c_try_compile "$LINENO"; then :
5776 pgac_cv_prog_CC_cflags__Wcast_function_type=yes
5777 else
5778 pgac_cv_prog_CC_cflags__Wcast_function_type=no
5780 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5781 ac_c_werror_flag=$ac_save_c_werror_flag
5782 CFLAGS="$pgac_save_CFLAGS"
5783 CC="$pgac_save_CC"
5785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wcast_function_type" >&5
5786 $as_echo "$pgac_cv_prog_CC_cflags__Wcast_function_type" >&6; }
5787 if test x"$pgac_cv_prog_CC_cflags__Wcast_function_type" = x"yes"; then
5788 CFLAGS="${CFLAGS} -Wcast-function-type"
5792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wcast-function-type, for CXXFLAGS" >&5
5793 $as_echo_n "checking whether ${CXX} supports -Wcast-function-type, for CXXFLAGS... " >&6; }
5794 if ${pgac_cv_prog_CXX_cxxflags__Wcast_function_type+:} false; then :
5795 $as_echo_n "(cached) " >&6
5796 else
5797 pgac_save_CXXFLAGS=$CXXFLAGS
5798 pgac_save_CXX=$CXX
5799 CXX=${CXX}
5800 CXXFLAGS="${CXXFLAGS} -Wcast-function-type"
5801 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5802 ac_cxx_werror_flag=yes
5803 ac_ext=cpp
5804 ac_cpp='$CXXCPP $CPPFLAGS'
5805 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5806 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5807 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5810 /* end confdefs.h. */
5813 main ()
5817 return 0;
5819 _ACEOF
5820 if ac_fn_cxx_try_compile "$LINENO"; then :
5821 pgac_cv_prog_CXX_cxxflags__Wcast_function_type=yes
5822 else
5823 pgac_cv_prog_CXX_cxxflags__Wcast_function_type=no
5825 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5826 ac_ext=c
5827 ac_cpp='$CPP $CPPFLAGS'
5828 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5829 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5830 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5832 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5833 CXXFLAGS="$pgac_save_CXXFLAGS"
5834 CXX="$pgac_save_CXX"
5836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wcast_function_type" >&5
5837 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wcast_function_type" >&6; }
5838 if test x"$pgac_cv_prog_CXX_cxxflags__Wcast_function_type" = x"yes"; then
5839 CXXFLAGS="${CXXFLAGS} -Wcast-function-type"
5843 # This was included in -Wall/-Wformat in older GCC versions
5845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-security, for CFLAGS" >&5
5846 $as_echo_n "checking whether ${CC} supports -Wformat-security, for CFLAGS... " >&6; }
5847 if ${pgac_cv_prog_CC_cflags__Wformat_security+:} false; then :
5848 $as_echo_n "(cached) " >&6
5849 else
5850 pgac_save_CFLAGS=$CFLAGS
5851 pgac_save_CC=$CC
5852 CC=${CC}
5853 CFLAGS="${CFLAGS} -Wformat-security"
5854 ac_save_c_werror_flag=$ac_c_werror_flag
5855 ac_c_werror_flag=yes
5856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5857 /* end confdefs.h. */
5860 main ()
5864 return 0;
5866 _ACEOF
5867 if ac_fn_c_try_compile "$LINENO"; then :
5868 pgac_cv_prog_CC_cflags__Wformat_security=yes
5869 else
5870 pgac_cv_prog_CC_cflags__Wformat_security=no
5872 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5873 ac_c_werror_flag=$ac_save_c_werror_flag
5874 CFLAGS="$pgac_save_CFLAGS"
5875 CC="$pgac_save_CC"
5877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_security" >&5
5878 $as_echo "$pgac_cv_prog_CC_cflags__Wformat_security" >&6; }
5879 if test x"$pgac_cv_prog_CC_cflags__Wformat_security" = x"yes"; then
5880 CFLAGS="${CFLAGS} -Wformat-security"
5884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wformat-security, for CXXFLAGS" >&5
5885 $as_echo_n "checking whether ${CXX} supports -Wformat-security, for CXXFLAGS... " >&6; }
5886 if ${pgac_cv_prog_CXX_cxxflags__Wformat_security+:} false; then :
5887 $as_echo_n "(cached) " >&6
5888 else
5889 pgac_save_CXXFLAGS=$CXXFLAGS
5890 pgac_save_CXX=$CXX
5891 CXX=${CXX}
5892 CXXFLAGS="${CXXFLAGS} -Wformat-security"
5893 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5894 ac_cxx_werror_flag=yes
5895 ac_ext=cpp
5896 ac_cpp='$CXXCPP $CPPFLAGS'
5897 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5898 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5899 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5902 /* end confdefs.h. */
5905 main ()
5909 return 0;
5911 _ACEOF
5912 if ac_fn_cxx_try_compile "$LINENO"; then :
5913 pgac_cv_prog_CXX_cxxflags__Wformat_security=yes
5914 else
5915 pgac_cv_prog_CXX_cxxflags__Wformat_security=no
5917 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5918 ac_ext=c
5919 ac_cpp='$CPP $CPPFLAGS'
5920 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5921 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5922 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5924 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5925 CXXFLAGS="$pgac_save_CXXFLAGS"
5926 CXX="$pgac_save_CXX"
5928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wformat_security" >&5
5929 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wformat_security" >&6; }
5930 if test x"$pgac_cv_prog_CXX_cxxflags__Wformat_security" = x"yes"; then
5931 CXXFLAGS="${CXXFLAGS} -Wformat-security"
5935 # Disable strict-aliasing rules; needed for gcc 3.3+
5937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
5938 $as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
5939 if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
5940 $as_echo_n "(cached) " >&6
5941 else
5942 pgac_save_CFLAGS=$CFLAGS
5943 pgac_save_CC=$CC
5944 CC=${CC}
5945 CFLAGS="${CFLAGS} -fno-strict-aliasing"
5946 ac_save_c_werror_flag=$ac_c_werror_flag
5947 ac_c_werror_flag=yes
5948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5949 /* end confdefs.h. */
5952 main ()
5956 return 0;
5958 _ACEOF
5959 if ac_fn_c_try_compile "$LINENO"; then :
5960 pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
5961 else
5962 pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
5964 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5965 ac_c_werror_flag=$ac_save_c_werror_flag
5966 CFLAGS="$pgac_save_CFLAGS"
5967 CC="$pgac_save_CC"
5969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
5970 $as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
5971 if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
5972 CFLAGS="${CFLAGS} -fno-strict-aliasing"
5976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
5977 $as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
5978 if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
5979 $as_echo_n "(cached) " >&6
5980 else
5981 pgac_save_CXXFLAGS=$CXXFLAGS
5982 pgac_save_CXX=$CXX
5983 CXX=${CXX}
5984 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
5985 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5986 ac_cxx_werror_flag=yes
5987 ac_ext=cpp
5988 ac_cpp='$CXXCPP $CPPFLAGS'
5989 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5990 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5991 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5994 /* end confdefs.h. */
5997 main ()
6001 return 0;
6003 _ACEOF
6004 if ac_fn_cxx_try_compile "$LINENO"; then :
6005 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
6006 else
6007 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
6009 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6010 ac_ext=c
6011 ac_cpp='$CPP $CPPFLAGS'
6012 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6013 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6014 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6016 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6017 CXXFLAGS="$pgac_save_CXXFLAGS"
6018 CXX="$pgac_save_CXX"
6020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
6021 $as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
6022 if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6023 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6027 # Disable optimizations that assume no overflow; needed for gcc 4.3+
6029 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fwrapv, for CFLAGS" >&5
6030 $as_echo_n "checking whether ${CC} supports -fwrapv, for CFLAGS... " >&6; }
6031 if ${pgac_cv_prog_CC_cflags__fwrapv+:} false; then :
6032 $as_echo_n "(cached) " >&6
6033 else
6034 pgac_save_CFLAGS=$CFLAGS
6035 pgac_save_CC=$CC
6036 CC=${CC}
6037 CFLAGS="${CFLAGS} -fwrapv"
6038 ac_save_c_werror_flag=$ac_c_werror_flag
6039 ac_c_werror_flag=yes
6040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6041 /* end confdefs.h. */
6044 main ()
6048 return 0;
6050 _ACEOF
6051 if ac_fn_c_try_compile "$LINENO"; then :
6052 pgac_cv_prog_CC_cflags__fwrapv=yes
6053 else
6054 pgac_cv_prog_CC_cflags__fwrapv=no
6056 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6057 ac_c_werror_flag=$ac_save_c_werror_flag
6058 CFLAGS="$pgac_save_CFLAGS"
6059 CC="$pgac_save_CC"
6061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fwrapv" >&5
6062 $as_echo "$pgac_cv_prog_CC_cflags__fwrapv" >&6; }
6063 if test x"$pgac_cv_prog_CC_cflags__fwrapv" = x"yes"; then
6064 CFLAGS="${CFLAGS} -fwrapv"
6068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fwrapv, for CXXFLAGS" >&5
6069 $as_echo_n "checking whether ${CXX} supports -fwrapv, for CXXFLAGS... " >&6; }
6070 if ${pgac_cv_prog_CXX_cxxflags__fwrapv+:} false; then :
6071 $as_echo_n "(cached) " >&6
6072 else
6073 pgac_save_CXXFLAGS=$CXXFLAGS
6074 pgac_save_CXX=$CXX
6075 CXX=${CXX}
6076 CXXFLAGS="${CXXFLAGS} -fwrapv"
6077 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6078 ac_cxx_werror_flag=yes
6079 ac_ext=cpp
6080 ac_cpp='$CXXCPP $CPPFLAGS'
6081 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6082 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6083 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6086 /* end confdefs.h. */
6089 main ()
6093 return 0;
6095 _ACEOF
6096 if ac_fn_cxx_try_compile "$LINENO"; then :
6097 pgac_cv_prog_CXX_cxxflags__fwrapv=yes
6098 else
6099 pgac_cv_prog_CXX_cxxflags__fwrapv=no
6101 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6102 ac_ext=c
6103 ac_cpp='$CPP $CPPFLAGS'
6104 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6105 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6106 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6108 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6109 CXXFLAGS="$pgac_save_CXXFLAGS"
6110 CXX="$pgac_save_CXX"
6112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fwrapv" >&5
6113 $as_echo "$pgac_cv_prog_CXX_cxxflags__fwrapv" >&6; }
6114 if test x"$pgac_cv_prog_CXX_cxxflags__fwrapv" = x"yes"; then
6115 CXXFLAGS="${CXXFLAGS} -fwrapv"
6119 # Disable FP optimizations that cause various errors on gcc 4.5+ or maybe 4.6+
6121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS" >&5
6122 $as_echo_n "checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS... " >&6; }
6123 if ${pgac_cv_prog_CC_cflags__fexcess_precision_standard+:} false; then :
6124 $as_echo_n "(cached) " >&6
6125 else
6126 pgac_save_CFLAGS=$CFLAGS
6127 pgac_save_CC=$CC
6128 CC=${CC}
6129 CFLAGS="${CFLAGS} -fexcess-precision=standard"
6130 ac_save_c_werror_flag=$ac_c_werror_flag
6131 ac_c_werror_flag=yes
6132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6133 /* end confdefs.h. */
6136 main ()
6140 return 0;
6142 _ACEOF
6143 if ac_fn_c_try_compile "$LINENO"; then :
6144 pgac_cv_prog_CC_cflags__fexcess_precision_standard=yes
6145 else
6146 pgac_cv_prog_CC_cflags__fexcess_precision_standard=no
6148 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6149 ac_c_werror_flag=$ac_save_c_werror_flag
6150 CFLAGS="$pgac_save_CFLAGS"
6151 CC="$pgac_save_CC"
6153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&5
6154 $as_echo "$pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&6; }
6155 if test x"$pgac_cv_prog_CC_cflags__fexcess_precision_standard" = x"yes"; then
6156 CFLAGS="${CFLAGS} -fexcess-precision=standard"
6160 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS" >&5
6161 $as_echo_n "checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS... " >&6; }
6162 if ${pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard+:} false; then :
6163 $as_echo_n "(cached) " >&6
6164 else
6165 pgac_save_CXXFLAGS=$CXXFLAGS
6166 pgac_save_CXX=$CXX
6167 CXX=${CXX}
6168 CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
6169 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6170 ac_cxx_werror_flag=yes
6171 ac_ext=cpp
6172 ac_cpp='$CXXCPP $CPPFLAGS'
6173 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6174 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6175 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6178 /* end confdefs.h. */
6181 main ()
6185 return 0;
6187 _ACEOF
6188 if ac_fn_cxx_try_compile "$LINENO"; then :
6189 pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=yes
6190 else
6191 pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=no
6193 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6194 ac_ext=c
6195 ac_cpp='$CPP $CPPFLAGS'
6196 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6197 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6198 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6200 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6201 CXXFLAGS="$pgac_save_CXXFLAGS"
6202 CXX="$pgac_save_CXX"
6204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&5
6205 $as_echo "$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&6; }
6206 if test x"$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" = x"yes"; then
6207 CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
6211 # Optimization flags for specific files that benefit from loop unrolling
6212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -funroll-loops, for CFLAGS_UNROLL_LOOPS" >&5
6213 $as_echo_n "checking whether ${CC} supports -funroll-loops, for CFLAGS_UNROLL_LOOPS... " >&6; }
6214 if ${pgac_cv_prog_CC_cflags__funroll_loops+:} false; then :
6215 $as_echo_n "(cached) " >&6
6216 else
6217 pgac_save_CFLAGS=$CFLAGS
6218 pgac_save_CC=$CC
6219 CC=${CC}
6220 CFLAGS="${CFLAGS_UNROLL_LOOPS} -funroll-loops"
6221 ac_save_c_werror_flag=$ac_c_werror_flag
6222 ac_c_werror_flag=yes
6223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6224 /* end confdefs.h. */
6227 main ()
6231 return 0;
6233 _ACEOF
6234 if ac_fn_c_try_compile "$LINENO"; then :
6235 pgac_cv_prog_CC_cflags__funroll_loops=yes
6236 else
6237 pgac_cv_prog_CC_cflags__funroll_loops=no
6239 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6240 ac_c_werror_flag=$ac_save_c_werror_flag
6241 CFLAGS="$pgac_save_CFLAGS"
6242 CC="$pgac_save_CC"
6244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__funroll_loops" >&5
6245 $as_echo "$pgac_cv_prog_CC_cflags__funroll_loops" >&6; }
6246 if test x"$pgac_cv_prog_CC_cflags__funroll_loops" = x"yes"; then
6247 CFLAGS_UNROLL_LOOPS="${CFLAGS_UNROLL_LOOPS} -funroll-loops"
6251 # Optimization flags for specific files that benefit from vectorization
6252 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTORIZE" >&5
6253 $as_echo_n "checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTORIZE... " >&6; }
6254 if ${pgac_cv_prog_CC_cflags__ftree_vectorize+:} false; then :
6255 $as_echo_n "(cached) " >&6
6256 else
6257 pgac_save_CFLAGS=$CFLAGS
6258 pgac_save_CC=$CC
6259 CC=${CC}
6260 CFLAGS="${CFLAGS_VECTORIZE} -ftree-vectorize"
6261 ac_save_c_werror_flag=$ac_c_werror_flag
6262 ac_c_werror_flag=yes
6263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6264 /* end confdefs.h. */
6267 main ()
6271 return 0;
6273 _ACEOF
6274 if ac_fn_c_try_compile "$LINENO"; then :
6275 pgac_cv_prog_CC_cflags__ftree_vectorize=yes
6276 else
6277 pgac_cv_prog_CC_cflags__ftree_vectorize=no
6279 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6280 ac_c_werror_flag=$ac_save_c_werror_flag
6281 CFLAGS="$pgac_save_CFLAGS"
6282 CC="$pgac_save_CC"
6284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__ftree_vectorize" >&5
6285 $as_echo "$pgac_cv_prog_CC_cflags__ftree_vectorize" >&6; }
6286 if test x"$pgac_cv_prog_CC_cflags__ftree_vectorize" = x"yes"; then
6287 CFLAGS_VECTORIZE="${CFLAGS_VECTORIZE} -ftree-vectorize"
6291 # We want to suppress clang's unhelpful unused-command-line-argument warnings
6292 # but gcc won't complain about unrecognized -Wno-foo switches, so we have to
6293 # test for the positive form and if that works, add the negative form
6294 NOT_THE_CFLAGS=""
6295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS" >&5
6296 $as_echo_n "checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS... " >&6; }
6297 if ${pgac_cv_prog_CC_cflags__Wunused_command_line_argument+:} false; then :
6298 $as_echo_n "(cached) " >&6
6299 else
6300 pgac_save_CFLAGS=$CFLAGS
6301 pgac_save_CC=$CC
6302 CC=${CC}
6303 CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
6304 ac_save_c_werror_flag=$ac_c_werror_flag
6305 ac_c_werror_flag=yes
6306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6307 /* end confdefs.h. */
6310 main ()
6314 return 0;
6316 _ACEOF
6317 if ac_fn_c_try_compile "$LINENO"; then :
6318 pgac_cv_prog_CC_cflags__Wunused_command_line_argument=yes
6319 else
6320 pgac_cv_prog_CC_cflags__Wunused_command_line_argument=no
6322 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6323 ac_c_werror_flag=$ac_save_c_werror_flag
6324 CFLAGS="$pgac_save_CFLAGS"
6325 CC="$pgac_save_CC"
6327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&5
6328 $as_echo "$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&6; }
6329 if test x"$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" = x"yes"; then
6330 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
6334 if test -n "$NOT_THE_CFLAGS"; then
6335 CFLAGS="$CFLAGS -Wno-unused-command-line-argument"
6337 # Similarly disable useless truncation warnings from gcc 8+
6338 NOT_THE_CFLAGS=""
6339 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS" >&5
6340 $as_echo_n "checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS... " >&6; }
6341 if ${pgac_cv_prog_CC_cflags__Wformat_truncation+:} false; then :
6342 $as_echo_n "(cached) " >&6
6343 else
6344 pgac_save_CFLAGS=$CFLAGS
6345 pgac_save_CC=$CC
6346 CC=${CC}
6347 CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
6348 ac_save_c_werror_flag=$ac_c_werror_flag
6349 ac_c_werror_flag=yes
6350 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6351 /* end confdefs.h. */
6354 main ()
6358 return 0;
6360 _ACEOF
6361 if ac_fn_c_try_compile "$LINENO"; then :
6362 pgac_cv_prog_CC_cflags__Wformat_truncation=yes
6363 else
6364 pgac_cv_prog_CC_cflags__Wformat_truncation=no
6366 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6367 ac_c_werror_flag=$ac_save_c_werror_flag
6368 CFLAGS="$pgac_save_CFLAGS"
6369 CC="$pgac_save_CC"
6371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_truncation" >&5
6372 $as_echo "$pgac_cv_prog_CC_cflags__Wformat_truncation" >&6; }
6373 if test x"$pgac_cv_prog_CC_cflags__Wformat_truncation" = x"yes"; then
6374 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
6378 if test -n "$NOT_THE_CFLAGS"; then
6379 CFLAGS="$CFLAGS -Wno-format-truncation"
6381 NOT_THE_CFLAGS=""
6382 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wstringop-truncation, for NOT_THE_CFLAGS" >&5
6383 $as_echo_n "checking whether ${CC} supports -Wstringop-truncation, for NOT_THE_CFLAGS... " >&6; }
6384 if ${pgac_cv_prog_CC_cflags__Wstringop_truncation+:} false; then :
6385 $as_echo_n "(cached) " >&6
6386 else
6387 pgac_save_CFLAGS=$CFLAGS
6388 pgac_save_CC=$CC
6389 CC=${CC}
6390 CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
6391 ac_save_c_werror_flag=$ac_c_werror_flag
6392 ac_c_werror_flag=yes
6393 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6394 /* end confdefs.h. */
6397 main ()
6401 return 0;
6403 _ACEOF
6404 if ac_fn_c_try_compile "$LINENO"; then :
6405 pgac_cv_prog_CC_cflags__Wstringop_truncation=yes
6406 else
6407 pgac_cv_prog_CC_cflags__Wstringop_truncation=no
6409 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6410 ac_c_werror_flag=$ac_save_c_werror_flag
6411 CFLAGS="$pgac_save_CFLAGS"
6412 CC="$pgac_save_CC"
6414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wstringop_truncation" >&5
6415 $as_echo "$pgac_cv_prog_CC_cflags__Wstringop_truncation" >&6; }
6416 if test x"$pgac_cv_prog_CC_cflags__Wstringop_truncation" = x"yes"; then
6417 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
6421 if test -n "$NOT_THE_CFLAGS"; then
6422 CFLAGS="$CFLAGS -Wno-stringop-truncation"
6424 elif test "$ICC" = yes; then
6425 # Intel's compiler has a bug/misoptimization in checking for
6426 # division by NAN (NaN == 0), -mp1 fixes it, so add it to the CFLAGS.
6428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -mp1, for CFLAGS" >&5
6429 $as_echo_n "checking whether ${CC} supports -mp1, for CFLAGS... " >&6; }
6430 if ${pgac_cv_prog_CC_cflags__mp1+:} false; then :
6431 $as_echo_n "(cached) " >&6
6432 else
6433 pgac_save_CFLAGS=$CFLAGS
6434 pgac_save_CC=$CC
6435 CC=${CC}
6436 CFLAGS="${CFLAGS} -mp1"
6437 ac_save_c_werror_flag=$ac_c_werror_flag
6438 ac_c_werror_flag=yes
6439 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6440 /* end confdefs.h. */
6443 main ()
6447 return 0;
6449 _ACEOF
6450 if ac_fn_c_try_compile "$LINENO"; then :
6451 pgac_cv_prog_CC_cflags__mp1=yes
6452 else
6453 pgac_cv_prog_CC_cflags__mp1=no
6455 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6456 ac_c_werror_flag=$ac_save_c_werror_flag
6457 CFLAGS="$pgac_save_CFLAGS"
6458 CC="$pgac_save_CC"
6460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__mp1" >&5
6461 $as_echo "$pgac_cv_prog_CC_cflags__mp1" >&6; }
6462 if test x"$pgac_cv_prog_CC_cflags__mp1" = x"yes"; then
6463 CFLAGS="${CFLAGS} -mp1"
6467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -mp1, for CXXFLAGS" >&5
6468 $as_echo_n "checking whether ${CXX} supports -mp1, for CXXFLAGS... " >&6; }
6469 if ${pgac_cv_prog_CXX_cxxflags__mp1+:} false; then :
6470 $as_echo_n "(cached) " >&6
6471 else
6472 pgac_save_CXXFLAGS=$CXXFLAGS
6473 pgac_save_CXX=$CXX
6474 CXX=${CXX}
6475 CXXFLAGS="${CXXFLAGS} -mp1"
6476 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6477 ac_cxx_werror_flag=yes
6478 ac_ext=cpp
6479 ac_cpp='$CXXCPP $CPPFLAGS'
6480 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6481 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6482 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6485 /* end confdefs.h. */
6488 main ()
6492 return 0;
6494 _ACEOF
6495 if ac_fn_cxx_try_compile "$LINENO"; then :
6496 pgac_cv_prog_CXX_cxxflags__mp1=yes
6497 else
6498 pgac_cv_prog_CXX_cxxflags__mp1=no
6500 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6501 ac_ext=c
6502 ac_cpp='$CPP $CPPFLAGS'
6503 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6504 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6505 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6507 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6508 CXXFLAGS="$pgac_save_CXXFLAGS"
6509 CXX="$pgac_save_CXX"
6511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__mp1" >&5
6512 $as_echo "$pgac_cv_prog_CXX_cxxflags__mp1" >&6; }
6513 if test x"$pgac_cv_prog_CXX_cxxflags__mp1" = x"yes"; then
6514 CXXFLAGS="${CXXFLAGS} -mp1"
6518 # Make sure strict aliasing is off (though this is said to be the default)
6520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
6521 $as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
6522 if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
6523 $as_echo_n "(cached) " >&6
6524 else
6525 pgac_save_CFLAGS=$CFLAGS
6526 pgac_save_CC=$CC
6527 CC=${CC}
6528 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6529 ac_save_c_werror_flag=$ac_c_werror_flag
6530 ac_c_werror_flag=yes
6531 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6532 /* end confdefs.h. */
6535 main ()
6539 return 0;
6541 _ACEOF
6542 if ac_fn_c_try_compile "$LINENO"; then :
6543 pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
6544 else
6545 pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
6547 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6548 ac_c_werror_flag=$ac_save_c_werror_flag
6549 CFLAGS="$pgac_save_CFLAGS"
6550 CC="$pgac_save_CC"
6552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
6553 $as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
6554 if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
6555 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
6560 $as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
6561 if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
6562 $as_echo_n "(cached) " >&6
6563 else
6564 pgac_save_CXXFLAGS=$CXXFLAGS
6565 pgac_save_CXX=$CXX
6566 CXX=${CXX}
6567 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6568 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6569 ac_cxx_werror_flag=yes
6570 ac_ext=cpp
6571 ac_cpp='$CXXCPP $CPPFLAGS'
6572 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6573 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6574 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6577 /* end confdefs.h. */
6580 main ()
6584 return 0;
6586 _ACEOF
6587 if ac_fn_cxx_try_compile "$LINENO"; then :
6588 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
6589 else
6590 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
6592 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6593 ac_ext=c
6594 ac_cpp='$CPP $CPPFLAGS'
6595 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6596 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6597 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6599 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6600 CXXFLAGS="$pgac_save_CXXFLAGS"
6601 CXX="$pgac_save_CXX"
6603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
6604 $as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
6605 if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6606 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6610 elif test "$PORTNAME" = "aix"; then
6611 # AIX's xlc has to have strict aliasing turned off too
6613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -qnoansialias, for CFLAGS" >&5
6614 $as_echo_n "checking whether ${CC} supports -qnoansialias, for CFLAGS... " >&6; }
6615 if ${pgac_cv_prog_CC_cflags__qnoansialias+:} false; then :
6616 $as_echo_n "(cached) " >&6
6617 else
6618 pgac_save_CFLAGS=$CFLAGS
6619 pgac_save_CC=$CC
6620 CC=${CC}
6621 CFLAGS="${CFLAGS} -qnoansialias"
6622 ac_save_c_werror_flag=$ac_c_werror_flag
6623 ac_c_werror_flag=yes
6624 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6625 /* end confdefs.h. */
6628 main ()
6632 return 0;
6634 _ACEOF
6635 if ac_fn_c_try_compile "$LINENO"; then :
6636 pgac_cv_prog_CC_cflags__qnoansialias=yes
6637 else
6638 pgac_cv_prog_CC_cflags__qnoansialias=no
6640 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6641 ac_c_werror_flag=$ac_save_c_werror_flag
6642 CFLAGS="$pgac_save_CFLAGS"
6643 CC="$pgac_save_CC"
6645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__qnoansialias" >&5
6646 $as_echo "$pgac_cv_prog_CC_cflags__qnoansialias" >&6; }
6647 if test x"$pgac_cv_prog_CC_cflags__qnoansialias" = x"yes"; then
6648 CFLAGS="${CFLAGS} -qnoansialias"
6652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -qnoansialias, for CXXFLAGS" >&5
6653 $as_echo_n "checking whether ${CXX} supports -qnoansialias, for CXXFLAGS... " >&6; }
6654 if ${pgac_cv_prog_CXX_cxxflags__qnoansialias+:} false; then :
6655 $as_echo_n "(cached) " >&6
6656 else
6657 pgac_save_CXXFLAGS=$CXXFLAGS
6658 pgac_save_CXX=$CXX
6659 CXX=${CXX}
6660 CXXFLAGS="${CXXFLAGS} -qnoansialias"
6661 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6662 ac_cxx_werror_flag=yes
6663 ac_ext=cpp
6664 ac_cpp='$CXXCPP $CPPFLAGS'
6665 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6666 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6667 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6669 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6670 /* end confdefs.h. */
6673 main ()
6677 return 0;
6679 _ACEOF
6680 if ac_fn_cxx_try_compile "$LINENO"; then :
6681 pgac_cv_prog_CXX_cxxflags__qnoansialias=yes
6682 else
6683 pgac_cv_prog_CXX_cxxflags__qnoansialias=no
6685 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6686 ac_ext=c
6687 ac_cpp='$CPP $CPPFLAGS'
6688 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6689 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6690 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6692 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6693 CXXFLAGS="$pgac_save_CXXFLAGS"
6694 CXX="$pgac_save_CXX"
6696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__qnoansialias" >&5
6697 $as_echo "$pgac_cv_prog_CXX_cxxflags__qnoansialias" >&6; }
6698 if test x"$pgac_cv_prog_CXX_cxxflags__qnoansialias" = x"yes"; then
6699 CXXFLAGS="${CXXFLAGS} -qnoansialias"
6704 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -qlonglong, for CFLAGS" >&5
6705 $as_echo_n "checking whether ${CC} supports -qlonglong, for CFLAGS... " >&6; }
6706 if ${pgac_cv_prog_CC_cflags__qlonglong+:} false; then :
6707 $as_echo_n "(cached) " >&6
6708 else
6709 pgac_save_CFLAGS=$CFLAGS
6710 pgac_save_CC=$CC
6711 CC=${CC}
6712 CFLAGS="${CFLAGS} -qlonglong"
6713 ac_save_c_werror_flag=$ac_c_werror_flag
6714 ac_c_werror_flag=yes
6715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6716 /* end confdefs.h. */
6719 main ()
6723 return 0;
6725 _ACEOF
6726 if ac_fn_c_try_compile "$LINENO"; then :
6727 pgac_cv_prog_CC_cflags__qlonglong=yes
6728 else
6729 pgac_cv_prog_CC_cflags__qlonglong=no
6731 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6732 ac_c_werror_flag=$ac_save_c_werror_flag
6733 CFLAGS="$pgac_save_CFLAGS"
6734 CC="$pgac_save_CC"
6736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__qlonglong" >&5
6737 $as_echo "$pgac_cv_prog_CC_cflags__qlonglong" >&6; }
6738 if test x"$pgac_cv_prog_CC_cflags__qlonglong" = x"yes"; then
6739 CFLAGS="${CFLAGS} -qlonglong"
6743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -qlonglong, for CXXFLAGS" >&5
6744 $as_echo_n "checking whether ${CXX} supports -qlonglong, for CXXFLAGS... " >&6; }
6745 if ${pgac_cv_prog_CXX_cxxflags__qlonglong+:} false; then :
6746 $as_echo_n "(cached) " >&6
6747 else
6748 pgac_save_CXXFLAGS=$CXXFLAGS
6749 pgac_save_CXX=$CXX
6750 CXX=${CXX}
6751 CXXFLAGS="${CXXFLAGS} -qlonglong"
6752 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6753 ac_cxx_werror_flag=yes
6754 ac_ext=cpp
6755 ac_cpp='$CXXCPP $CPPFLAGS'
6756 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6757 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6758 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6761 /* end confdefs.h. */
6764 main ()
6768 return 0;
6770 _ACEOF
6771 if ac_fn_cxx_try_compile "$LINENO"; then :
6772 pgac_cv_prog_CXX_cxxflags__qlonglong=yes
6773 else
6774 pgac_cv_prog_CXX_cxxflags__qlonglong=no
6776 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6777 ac_ext=c
6778 ac_cpp='$CPP $CPPFLAGS'
6779 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6780 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6781 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6783 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6784 CXXFLAGS="$pgac_save_CXXFLAGS"
6785 CXX="$pgac_save_CXX"
6787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__qlonglong" >&5
6788 $as_echo "$pgac_cv_prog_CXX_cxxflags__qlonglong" >&6; }
6789 if test x"$pgac_cv_prog_CXX_cxxflags__qlonglong" = x"yes"; then
6790 CXXFLAGS="${CXXFLAGS} -qlonglong"
6794 elif test "$PORTNAME" = "hpux"; then
6795 # On some versions of HP-UX, libm functions do not set errno by default.
6796 # Fix that by using +Olibmerrno if the compiler recognizes it.
6798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports +Olibmerrno, for CFLAGS" >&5
6799 $as_echo_n "checking whether ${CC} supports +Olibmerrno, for CFLAGS... " >&6; }
6800 if ${pgac_cv_prog_CC_cflags_pOlibmerrno+:} false; then :
6801 $as_echo_n "(cached) " >&6
6802 else
6803 pgac_save_CFLAGS=$CFLAGS
6804 pgac_save_CC=$CC
6805 CC=${CC}
6806 CFLAGS="${CFLAGS} +Olibmerrno"
6807 ac_save_c_werror_flag=$ac_c_werror_flag
6808 ac_c_werror_flag=yes
6809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6810 /* end confdefs.h. */
6813 main ()
6817 return 0;
6819 _ACEOF
6820 if ac_fn_c_try_compile "$LINENO"; then :
6821 pgac_cv_prog_CC_cflags_pOlibmerrno=yes
6822 else
6823 pgac_cv_prog_CC_cflags_pOlibmerrno=no
6825 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6826 ac_c_werror_flag=$ac_save_c_werror_flag
6827 CFLAGS="$pgac_save_CFLAGS"
6828 CC="$pgac_save_CC"
6830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags_pOlibmerrno" >&5
6831 $as_echo "$pgac_cv_prog_CC_cflags_pOlibmerrno" >&6; }
6832 if test x"$pgac_cv_prog_CC_cflags_pOlibmerrno" = x"yes"; then
6833 CFLAGS="${CFLAGS} +Olibmerrno"
6837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports +Olibmerrno, for CXXFLAGS" >&5
6838 $as_echo_n "checking whether ${CXX} supports +Olibmerrno, for CXXFLAGS... " >&6; }
6839 if ${pgac_cv_prog_CXX_cxxflags_pOlibmerrno+:} false; then :
6840 $as_echo_n "(cached) " >&6
6841 else
6842 pgac_save_CXXFLAGS=$CXXFLAGS
6843 pgac_save_CXX=$CXX
6844 CXX=${CXX}
6845 CXXFLAGS="${CXXFLAGS} +Olibmerrno"
6846 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6847 ac_cxx_werror_flag=yes
6848 ac_ext=cpp
6849 ac_cpp='$CXXCPP $CPPFLAGS'
6850 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6851 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6852 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6855 /* end confdefs.h. */
6858 main ()
6862 return 0;
6864 _ACEOF
6865 if ac_fn_cxx_try_compile "$LINENO"; then :
6866 pgac_cv_prog_CXX_cxxflags_pOlibmerrno=yes
6867 else
6868 pgac_cv_prog_CXX_cxxflags_pOlibmerrno=no
6870 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6871 ac_ext=c
6872 ac_cpp='$CPP $CPPFLAGS'
6873 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6874 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6875 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6877 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6878 CXXFLAGS="$pgac_save_CXXFLAGS"
6879 CXX="$pgac_save_CXX"
6881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags_pOlibmerrno" >&5
6882 $as_echo "$pgac_cv_prog_CXX_cxxflags_pOlibmerrno" >&6; }
6883 if test x"$pgac_cv_prog_CXX_cxxflags_pOlibmerrno" = x"yes"; then
6884 CXXFLAGS="${CXXFLAGS} +Olibmerrno"
6893 # Determine flags used to emit bitcode for JIT inlining. Need to test
6894 # for behaviour changing compiler flags, to keep compatibility with
6895 # compiler used for normal postgres code.
6896 if test "$with_llvm" = yes ; then
6897 CLANGXX="$CLANG -xc++"
6899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS" >&5
6900 $as_echo_n "checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS... " >&6; }
6901 if ${pgac_cv_prog_CLANG_cflags__fno_strict_aliasing+:} false; then :
6902 $as_echo_n "(cached) " >&6
6903 else
6904 pgac_save_CFLAGS=$CFLAGS
6905 pgac_save_CC=$CC
6906 CC=${CLANG}
6907 CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
6908 ac_save_c_werror_flag=$ac_c_werror_flag
6909 ac_c_werror_flag=yes
6910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6911 /* end confdefs.h. */
6914 main ()
6918 return 0;
6920 _ACEOF
6921 if ac_fn_c_try_compile "$LINENO"; then :
6922 pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=yes
6923 else
6924 pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=no
6926 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6927 ac_c_werror_flag=$ac_save_c_werror_flag
6928 CFLAGS="$pgac_save_CFLAGS"
6929 CC="$pgac_save_CC"
6931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&5
6932 $as_echo "$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&6; }
6933 if test x"$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" = x"yes"; then
6934 BITCODE_CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
6937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS" >&5
6938 $as_echo_n "checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS... " >&6; }
6939 if ${pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing+:} false; then :
6940 $as_echo_n "(cached) " >&6
6941 else
6942 pgac_save_CXXFLAGS=$CXXFLAGS
6943 pgac_save_CXX=$CXX
6944 CXX=${CLANGXX}
6945 CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
6946 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6947 ac_cxx_werror_flag=yes
6948 ac_ext=cpp
6949 ac_cpp='$CXXCPP $CPPFLAGS'
6950 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6951 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6952 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6955 /* end confdefs.h. */
6958 main ()
6962 return 0;
6964 _ACEOF
6965 if ac_fn_cxx_try_compile "$LINENO"; then :
6966 pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=yes
6967 else
6968 pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=no
6970 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6971 ac_ext=c
6972 ac_cpp='$CPP $CPPFLAGS'
6973 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6974 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6975 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6977 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6978 CXXFLAGS="$pgac_save_CXXFLAGS"
6979 CXX="$pgac_save_CXX"
6981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&5
6982 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&6; }
6983 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6984 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
6987 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS" >&5
6988 $as_echo_n "checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS... " >&6; }
6989 if ${pgac_cv_prog_CLANG_cflags__fwrapv+:} false; then :
6990 $as_echo_n "(cached) " >&6
6991 else
6992 pgac_save_CFLAGS=$CFLAGS
6993 pgac_save_CC=$CC
6994 CC=${CLANG}
6995 CFLAGS="${BITCODE_CFLAGS} -fwrapv"
6996 ac_save_c_werror_flag=$ac_c_werror_flag
6997 ac_c_werror_flag=yes
6998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6999 /* end confdefs.h. */
7002 main ()
7006 return 0;
7008 _ACEOF
7009 if ac_fn_c_try_compile "$LINENO"; then :
7010 pgac_cv_prog_CLANG_cflags__fwrapv=yes
7011 else
7012 pgac_cv_prog_CLANG_cflags__fwrapv=no
7014 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7015 ac_c_werror_flag=$ac_save_c_werror_flag
7016 CFLAGS="$pgac_save_CFLAGS"
7017 CC="$pgac_save_CC"
7019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fwrapv" >&5
7020 $as_echo "$pgac_cv_prog_CLANG_cflags__fwrapv" >&6; }
7021 if test x"$pgac_cv_prog_CLANG_cflags__fwrapv" = x"yes"; then
7022 BITCODE_CFLAGS="${BITCODE_CFLAGS} -fwrapv"
7025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS" >&5
7026 $as_echo_n "checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS... " >&6; }
7027 if ${pgac_cv_prog_CLANGXX_cxxflags__fwrapv+:} false; then :
7028 $as_echo_n "(cached) " >&6
7029 else
7030 pgac_save_CXXFLAGS=$CXXFLAGS
7031 pgac_save_CXX=$CXX
7032 CXX=${CLANGXX}
7033 CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
7034 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7035 ac_cxx_werror_flag=yes
7036 ac_ext=cpp
7037 ac_cpp='$CXXCPP $CPPFLAGS'
7038 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7039 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7040 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7043 /* end confdefs.h. */
7046 main ()
7050 return 0;
7052 _ACEOF
7053 if ac_fn_cxx_try_compile "$LINENO"; then :
7054 pgac_cv_prog_CLANGXX_cxxflags__fwrapv=yes
7055 else
7056 pgac_cv_prog_CLANGXX_cxxflags__fwrapv=no
7058 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7059 ac_ext=c
7060 ac_cpp='$CPP $CPPFLAGS'
7061 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7062 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7063 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7065 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7066 CXXFLAGS="$pgac_save_CXXFLAGS"
7067 CXX="$pgac_save_CXX"
7069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&5
7070 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&6; }
7071 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" = x"yes"; then
7072 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
7075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS" >&5
7076 $as_echo_n "checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS... " >&6; }
7077 if ${pgac_cv_prog_CLANG_cflags__fexcess_precision_standard+:} false; then :
7078 $as_echo_n "(cached) " >&6
7079 else
7080 pgac_save_CFLAGS=$CFLAGS
7081 pgac_save_CC=$CC
7082 CC=${CLANG}
7083 CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
7084 ac_save_c_werror_flag=$ac_c_werror_flag
7085 ac_c_werror_flag=yes
7086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7087 /* end confdefs.h. */
7090 main ()
7094 return 0;
7096 _ACEOF
7097 if ac_fn_c_try_compile "$LINENO"; then :
7098 pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=yes
7099 else
7100 pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=no
7102 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7103 ac_c_werror_flag=$ac_save_c_werror_flag
7104 CFLAGS="$pgac_save_CFLAGS"
7105 CC="$pgac_save_CC"
7107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&5
7108 $as_echo "$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&6; }
7109 if test x"$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" = x"yes"; then
7110 BITCODE_CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
7113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS" >&5
7114 $as_echo_n "checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS... " >&6; }
7115 if ${pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard+:} false; then :
7116 $as_echo_n "(cached) " >&6
7117 else
7118 pgac_save_CXXFLAGS=$CXXFLAGS
7119 pgac_save_CXX=$CXX
7120 CXX=${CLANGXX}
7121 CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
7122 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7123 ac_cxx_werror_flag=yes
7124 ac_ext=cpp
7125 ac_cpp='$CXXCPP $CPPFLAGS'
7126 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7127 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7128 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7131 /* end confdefs.h. */
7134 main ()
7138 return 0;
7140 _ACEOF
7141 if ac_fn_cxx_try_compile "$LINENO"; then :
7142 pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=yes
7143 else
7144 pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=no
7146 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7147 ac_ext=c
7148 ac_cpp='$CPP $CPPFLAGS'
7149 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7150 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7151 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7153 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7154 CXXFLAGS="$pgac_save_CXXFLAGS"
7155 CXX="$pgac_save_CXX"
7157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&5
7158 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&6; }
7159 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" = x"yes"; then
7160 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
7165 # supply -g if --enable-debug
7166 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
7167 CFLAGS="$CFLAGS -g"
7170 if test "$enable_debug" = yes && test "$ac_cv_prog_cxx_g" = yes; then
7171 CXXFLAGS="$CXXFLAGS -g"
7174 # enable code coverage if --enable-coverage
7175 if test "$enable_coverage" = yes; then
7176 if test "$GCC" = yes; then
7177 CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
7178 CXXFLAGS="$CXXFLAGS -fprofile-arcs -ftest-coverage"
7179 else
7180 as_fn_error $? "--enable-coverage is supported only when using GCC" "$LINENO" 5
7184 # enable profiling if --enable-profiling
7185 if test "$enable_profiling" = yes && test "$ac_cv_prog_cc_g" = yes; then
7186 if test "$GCC" = yes; then
7188 $as_echo "#define PROFILE_PID_DIR 1" >>confdefs.h
7190 CFLAGS="$CFLAGS -pg $PLATFORM_PROFILE_FLAGS"
7191 CXXFLAGS="$CXXFLAGS -pg $PLATFORM_PROFILE_FLAGS"
7192 else
7193 as_fn_error $? "--enable-profiling is supported only when using GCC" "$LINENO" 5
7197 # On Solaris, we need this #define to get POSIX-conforming versions
7198 # of many interfaces (sigwait, getpwuid_r, ...).
7199 if test "$PORTNAME" = "solaris"; then
7200 CPPFLAGS="$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS"
7203 # We already have this in Makefile.win32, but configure needs it too
7204 if test "$PORTNAME" = "win32"; then
7205 CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32"
7208 # Now that we're done automatically adding stuff to C[XX]FLAGS, put back the
7209 # user-specified flags (if any) at the end. This lets users override
7210 # the automatic additions.
7211 CFLAGS="$CFLAGS $user_CFLAGS"
7212 CXXFLAGS="$CXXFLAGS $user_CXXFLAGS"
7213 BITCODE_CFLAGS="$BITCODE_CFLAGS $user_BITCODE_CFLAGS"
7214 BITCODE_CXXFLAGS="$BITCODE_CXXFLAGS $user_BITCODE_CXXFLAGS"
7219 # The template file must set up CFLAGS_SL; we don't support user override
7222 # Check if the compiler still works with the final flag settings
7223 # (note, we're not checking that for CXX, which is optional)
7224 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler still works" >&5
7225 $as_echo_n "checking whether the C compiler still works... " >&6; }
7226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7227 /* end confdefs.h. */
7230 main ()
7232 return 0;
7234 return 0;
7236 _ACEOF
7237 if ac_fn_c_try_link "$LINENO"; then :
7238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7239 $as_echo "yes" >&6; }
7240 else
7241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7242 $as_echo "no" >&6; }
7243 as_fn_error $? "cannot proceed" "$LINENO" 5
7245 rm -f core conftest.err conftest.$ac_objext \
7246 conftest$ac_exeext conftest.$ac_ext
7248 # Defend against gcc -ffast-math
7249 if test "$GCC" = yes; then
7250 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7251 /* end confdefs.h. */
7254 main ()
7256 #ifdef __FAST_MATH__
7257 choke me
7258 #endif
7260 return 0;
7262 _ACEOF
7263 if ac_fn_c_try_compile "$LINENO"; then :
7265 else
7266 as_fn_error $? "do not put -ffast-math in CFLAGS" "$LINENO" 5
7268 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7271 # Defend against clang being used on x86-32 without SSE2 enabled. As current
7272 # versions of clang do not understand -fexcess-precision=standard, the use of
7273 # x87 floating point operations leads to problems like isinf possibly returning
7274 # false for a value that is infinite when converted from the 80bit register to
7275 # the 8byte memory representation.
7277 # Only perform the test if the compiler doesn't understand
7278 # -fexcess-precision=standard, that way a potentially fixed compiler will work
7279 # automatically.
7280 if test "$pgac_cv_prog_CC_cflags__fexcess_precision_standard" = no; then
7281 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7282 /* end confdefs.h. */
7285 main ()
7288 #if defined(__clang__) && defined(__i386__) && !defined(__SSE2_MATH__)
7289 choke me
7290 #endif
7293 return 0;
7295 _ACEOF
7296 if ac_fn_c_try_compile "$LINENO"; then :
7298 else
7299 as_fn_error $? "Compiling PostgreSQL with clang, on 32bit x86, requires SSE2 support. Use -msse2 or use gcc." "$LINENO" 5
7301 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7304 ac_ext=c
7305 ac_cpp='$CPP $CPPFLAGS'
7306 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7307 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7308 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
7310 $as_echo_n "checking how to run the C preprocessor... " >&6; }
7311 # On Suns, sometimes $CPP names a directory.
7312 if test -n "$CPP" && test -d "$CPP"; then
7313 CPP=
7315 if test -z "$CPP"; then
7316 if ${ac_cv_prog_CPP+:} false; then :
7317 $as_echo_n "(cached) " >&6
7318 else
7319 # Double quotes because CPP needs to be expanded
7320 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
7322 ac_preproc_ok=false
7323 for ac_c_preproc_warn_flag in '' yes
7325 # Use a header file that comes with gcc, so configuring glibc
7326 # with a fresh cross-compiler works.
7327 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7328 # <limits.h> exists even on freestanding compilers.
7329 # On the NeXT, cc -E runs the code through the compiler's parser,
7330 # not just through cpp. "Syntax error" is here to catch this case.
7331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7332 /* end confdefs.h. */
7333 #ifdef __STDC__
7334 # include <limits.h>
7335 #else
7336 # include <assert.h>
7337 #endif
7338 Syntax error
7339 _ACEOF
7340 if ac_fn_c_try_cpp "$LINENO"; then :
7342 else
7343 # Broken: fails on valid input.
7344 continue
7346 rm -f conftest.err conftest.i conftest.$ac_ext
7348 # OK, works on sane cases. Now check whether nonexistent headers
7349 # can be detected and how.
7350 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7351 /* end confdefs.h. */
7352 #include <ac_nonexistent.h>
7353 _ACEOF
7354 if ac_fn_c_try_cpp "$LINENO"; then :
7355 # Broken: success on invalid input.
7356 continue
7357 else
7358 # Passes both tests.
7359 ac_preproc_ok=:
7360 break
7362 rm -f conftest.err conftest.i conftest.$ac_ext
7364 done
7365 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7366 rm -f conftest.i conftest.err conftest.$ac_ext
7367 if $ac_preproc_ok; then :
7368 break
7371 done
7372 ac_cv_prog_CPP=$CPP
7375 CPP=$ac_cv_prog_CPP
7376 else
7377 ac_cv_prog_CPP=$CPP
7379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
7380 $as_echo "$CPP" >&6; }
7381 ac_preproc_ok=false
7382 for ac_c_preproc_warn_flag in '' yes
7384 # Use a header file that comes with gcc, so configuring glibc
7385 # with a fresh cross-compiler works.
7386 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7387 # <limits.h> exists even on freestanding compilers.
7388 # On the NeXT, cc -E runs the code through the compiler's parser,
7389 # not just through cpp. "Syntax error" is here to catch this case.
7390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7391 /* end confdefs.h. */
7392 #ifdef __STDC__
7393 # include <limits.h>
7394 #else
7395 # include <assert.h>
7396 #endif
7397 Syntax error
7398 _ACEOF
7399 if ac_fn_c_try_cpp "$LINENO"; then :
7401 else
7402 # Broken: fails on valid input.
7403 continue
7405 rm -f conftest.err conftest.i conftest.$ac_ext
7407 # OK, works on sane cases. Now check whether nonexistent headers
7408 # can be detected and how.
7409 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7410 /* end confdefs.h. */
7411 #include <ac_nonexistent.h>
7412 _ACEOF
7413 if ac_fn_c_try_cpp "$LINENO"; then :
7414 # Broken: success on invalid input.
7415 continue
7416 else
7417 # Passes both tests.
7418 ac_preproc_ok=:
7419 break
7421 rm -f conftest.err conftest.i conftest.$ac_ext
7423 done
7424 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7425 rm -f conftest.i conftest.err conftest.$ac_ext
7426 if $ac_preproc_ok; then :
7428 else
7429 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7430 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7431 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
7432 See \`config.log' for more details" "$LINENO" 5; }
7435 ac_ext=c
7436 ac_cpp='$CPP $CPPFLAGS'
7437 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7438 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7439 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7445 # Set up TAS assembly code if needed; the template file has now had its
7446 # chance to request this.
7448 ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
7451 if test "$need_tas" = yes ; then
7452 TAS=tas.o
7453 else
7454 TAS=""
7459 # Set up pkg_config in case we need it below
7468 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
7469 if test -n "$ac_tool_prefix"; then
7470 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
7471 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
7472 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7473 $as_echo_n "checking for $ac_word... " >&6; }
7474 if ${ac_cv_path_PKG_CONFIG+:} false; then :
7475 $as_echo_n "(cached) " >&6
7476 else
7477 case $PKG_CONFIG in
7478 [\\/]* | ?:[\\/]*)
7479 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
7482 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7483 for as_dir in $PATH
7485 IFS=$as_save_IFS
7486 test -z "$as_dir" && as_dir=.
7487 for ac_exec_ext in '' $ac_executable_extensions; do
7488 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7489 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7490 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7491 break 2
7493 done
7494 done
7495 IFS=$as_save_IFS
7498 esac
7500 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
7501 if test -n "$PKG_CONFIG"; then
7502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
7503 $as_echo "$PKG_CONFIG" >&6; }
7504 else
7505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7506 $as_echo "no" >&6; }
7511 if test -z "$ac_cv_path_PKG_CONFIG"; then
7512 ac_pt_PKG_CONFIG=$PKG_CONFIG
7513 # Extract the first word of "pkg-config", so it can be a program name with args.
7514 set dummy pkg-config; ac_word=$2
7515 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7516 $as_echo_n "checking for $ac_word... " >&6; }
7517 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
7518 $as_echo_n "(cached) " >&6
7519 else
7520 case $ac_pt_PKG_CONFIG in
7521 [\\/]* | ?:[\\/]*)
7522 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
7525 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7526 for as_dir in $PATH
7528 IFS=$as_save_IFS
7529 test -z "$as_dir" && as_dir=.
7530 for ac_exec_ext in '' $ac_executable_extensions; do
7531 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7532 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7533 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7534 break 2
7536 done
7537 done
7538 IFS=$as_save_IFS
7541 esac
7543 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
7544 if test -n "$ac_pt_PKG_CONFIG"; then
7545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
7546 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
7547 else
7548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7549 $as_echo "no" >&6; }
7552 if test "x$ac_pt_PKG_CONFIG" = x; then
7553 PKG_CONFIG=""
7554 else
7555 case $cross_compiling:$ac_tool_warned in
7556 yes:)
7557 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7558 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7559 ac_tool_warned=yes ;;
7560 esac
7561 PKG_CONFIG=$ac_pt_PKG_CONFIG
7563 else
7564 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
7568 if test -n "$PKG_CONFIG"; then
7569 _pkg_min_version=0.9.0
7570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
7571 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
7572 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
7573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7574 $as_echo "yes" >&6; }
7575 else
7576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7577 $as_echo "no" >&6; }
7578 PKG_CONFIG=""
7583 # Automatic dependency tracking
7587 # Check whether --enable-depend was given.
7588 if test "${enable_depend+set}" = set; then :
7589 enableval=$enable_depend;
7590 case $enableval in
7591 yes)
7592 autodepend=yes
7598 as_fn_error $? "no argument expected for --enable-depend option" "$LINENO" 5
7600 esac
7602 else
7603 enable_depend=no
7612 # Enable assert checks
7616 # Check whether --enable-cassert was given.
7617 if test "${enable_cassert+set}" = set; then :
7618 enableval=$enable_cassert;
7619 case $enableval in
7620 yes)
7622 $as_echo "#define USE_ASSERT_CHECKING 1" >>confdefs.h
7629 as_fn_error $? "no argument expected for --enable-cassert option" "$LINENO" 5
7631 esac
7633 else
7634 enable_cassert=no
7642 # Include directories
7644 ac_save_IFS=$IFS
7645 IFS="${IFS}${PATH_SEPARATOR}"
7646 # SRCH_INC comes from the template file
7647 for dir in $with_includes $SRCH_INC; do
7648 if test -d "$dir"; then
7649 INCLUDES="$INCLUDES -I$dir"
7650 else
7651 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Include directory $dir does not exist." >&5
7652 $as_echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
7654 done
7655 IFS=$ac_save_IFS
7660 # Library directories
7662 ac_save_IFS=$IFS
7663 IFS="${IFS}${PATH_SEPARATOR}"
7664 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
7665 for dir in $LIBRARY_DIRS $SRCH_LIB; do
7666 if test -d "$dir"; then
7667 LIBDIRS="$LIBDIRS -L$dir"
7668 else
7669 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Library directory $dir does not exist." >&5
7670 $as_echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
7672 done
7673 IFS=$ac_save_IFS
7676 # Enable thread-safe client libraries
7678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking allow thread-safe client libraries" >&5
7679 $as_echo_n "checking allow thread-safe client libraries... " >&6; }
7682 # Check whether --enable-thread-safety was given.
7683 if test "${enable_thread_safety+set}" = set; then :
7684 enableval=$enable_thread_safety;
7685 case $enableval in
7686 yes)
7693 as_fn_error $? "no argument expected for --enable-thread-safety option" "$LINENO" 5
7695 esac
7697 else
7698 enable_thread_safety=yes
7703 if test "$enable_thread_safety" = yes; then
7705 $as_echo "#define ENABLE_THREAD_SAFETY 1" >>confdefs.h
7708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_thread_safety" >&5
7709 $as_echo "$enable_thread_safety" >&6; }
7713 # ICU
7715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with ICU support" >&5
7716 $as_echo_n "checking whether to build with ICU support... " >&6; }
7720 # Check whether --with-icu was given.
7721 if test "${with_icu+set}" = set; then :
7722 withval=$with_icu;
7723 case $withval in
7724 yes)
7726 $as_echo "#define USE_ICU 1" >>confdefs.h
7733 as_fn_error $? "no argument expected for --with-icu option" "$LINENO" 5
7735 esac
7737 else
7738 with_icu=no
7743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icu" >&5
7744 $as_echo "$with_icu" >&6; }
7747 if test "$with_icu" = yes; then
7749 pkg_failed=no
7750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icu-uc icu-i18n" >&5
7751 $as_echo_n "checking for icu-uc icu-i18n... " >&6; }
7753 if test -n "$ICU_CFLAGS"; then
7754 pkg_cv_ICU_CFLAGS="$ICU_CFLAGS"
7755 elif test -n "$PKG_CONFIG"; then
7756 if test -n "$PKG_CONFIG" && \
7757 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
7758 ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
7759 ac_status=$?
7760 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7761 test $ac_status = 0; }; then
7762 pkg_cv_ICU_CFLAGS=`$PKG_CONFIG --cflags "icu-uc icu-i18n" 2>/dev/null`
7763 test "x$?" != "x0" && pkg_failed=yes
7764 else
7765 pkg_failed=yes
7767 else
7768 pkg_failed=untried
7770 if test -n "$ICU_LIBS"; then
7771 pkg_cv_ICU_LIBS="$ICU_LIBS"
7772 elif test -n "$PKG_CONFIG"; then
7773 if test -n "$PKG_CONFIG" && \
7774 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
7775 ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
7776 ac_status=$?
7777 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7778 test $ac_status = 0; }; then
7779 pkg_cv_ICU_LIBS=`$PKG_CONFIG --libs "icu-uc icu-i18n" 2>/dev/null`
7780 test "x$?" != "x0" && pkg_failed=yes
7781 else
7782 pkg_failed=yes
7784 else
7785 pkg_failed=untried
7790 if test $pkg_failed = yes; then
7791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7792 $as_echo "no" >&6; }
7794 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
7795 _pkg_short_errors_supported=yes
7796 else
7797 _pkg_short_errors_supported=no
7799 if test $_pkg_short_errors_supported = yes; then
7800 ICU_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
7801 else
7802 ICU_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
7804 # Put the nasty error message in config.log where it belongs
7805 echo "$ICU_PKG_ERRORS" >&5
7807 as_fn_error $? "Package requirements (icu-uc icu-i18n) were not met:
7809 $ICU_PKG_ERRORS
7811 Consider adjusting the PKG_CONFIG_PATH environment variable if you
7812 installed software in a non-standard prefix.
7814 Alternatively, you may set the environment variables ICU_CFLAGS
7815 and ICU_LIBS to avoid the need to call pkg-config.
7816 See the pkg-config man page for more details." "$LINENO" 5
7817 elif test $pkg_failed = untried; then
7818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7819 $as_echo "no" >&6; }
7820 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7821 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7822 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
7823 is in your PATH or set the PKG_CONFIG environment variable to the full
7824 path to pkg-config.
7826 Alternatively, you may set the environment variables ICU_CFLAGS
7827 and ICU_LIBS to avoid the need to call pkg-config.
7828 See the pkg-config man page for more details.
7830 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
7831 See \`config.log' for more details" "$LINENO" 5; }
7832 else
7833 ICU_CFLAGS=$pkg_cv_ICU_CFLAGS
7834 ICU_LIBS=$pkg_cv_ICU_LIBS
7835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7836 $as_echo "yes" >&6; }
7842 # Optionally build Tcl modules (PL/Tcl)
7844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Tcl" >&5
7845 $as_echo_n "checking whether to build with Tcl... " >&6; }
7849 # Check whether --with-tcl was given.
7850 if test "${with_tcl+set}" = set; then :
7851 withval=$with_tcl;
7852 case $withval in
7853 yes)
7860 as_fn_error $? "no argument expected for --with-tcl option" "$LINENO" 5
7862 esac
7864 else
7865 with_tcl=no
7870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcl" >&5
7871 $as_echo "$with_tcl" >&6; }
7874 # We see if the path to the Tcl/Tk configuration scripts is specified.
7875 # This will override the use of tclsh to find the paths to search.
7880 # Check whether --with-tclconfig was given.
7881 if test "${with_tclconfig+set}" = set; then :
7882 withval=$with_tclconfig;
7883 case $withval in
7884 yes)
7885 as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
7888 as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
7893 esac
7900 # Optionally build Perl modules (PL/Perl)
7902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Perl modules" >&5
7903 $as_echo_n "checking whether to build Perl modules... " >&6; }
7907 # Check whether --with-perl was given.
7908 if test "${with_perl+set}" = set; then :
7909 withval=$with_perl;
7910 case $withval in
7911 yes)
7918 as_fn_error $? "no argument expected for --with-perl option" "$LINENO" 5
7920 esac
7922 else
7923 with_perl=no
7928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_perl" >&5
7929 $as_echo "$with_perl" >&6; }
7933 # Optionally build Python modules (PL/Python)
7935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Python modules" >&5
7936 $as_echo_n "checking whether to build Python modules... " >&6; }
7940 # Check whether --with-python was given.
7941 if test "${with_python+set}" = set; then :
7942 withval=$with_python;
7943 case $withval in
7944 yes)
7951 as_fn_error $? "no argument expected for --with-python option" "$LINENO" 5
7953 esac
7955 else
7956 with_python=no
7961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
7962 $as_echo "$with_python" >&6; }
7966 # GSSAPI
7968 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with GSSAPI support" >&5
7969 $as_echo_n "checking whether to build with GSSAPI support... " >&6; }
7973 # Check whether --with-gssapi was given.
7974 if test "${with_gssapi+set}" = set; then :
7975 withval=$with_gssapi;
7976 case $withval in
7977 yes)
7980 $as_echo "#define ENABLE_GSS 1" >>confdefs.h
7982 krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
7989 as_fn_error $? "no argument expected for --with-gssapi option" "$LINENO" 5
7991 esac
7993 else
7994 with_gssapi=no
7999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_gssapi" >&5
8000 $as_echo "$with_gssapi" >&6; }
8008 # Kerberos configuration parameters
8013 # Check whether --with-krb-srvnam was given.
8014 if test "${with_krb_srvnam+set}" = set; then :
8015 withval=$with_krb_srvnam;
8016 case $withval in
8017 yes)
8018 as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
8021 as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
8026 esac
8028 else
8029 with_krb_srvnam="postgres"
8035 cat >>confdefs.h <<_ACEOF
8036 #define PG_KRB_SRVNAM "$with_krb_srvnam"
8037 _ACEOF
8042 # PAM
8044 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with PAM support" >&5
8045 $as_echo_n "checking whether to build with PAM support... " >&6; }
8049 # Check whether --with-pam was given.
8050 if test "${with_pam+set}" = set; then :
8051 withval=$with_pam;
8052 case $withval in
8053 yes)
8055 $as_echo "#define USE_PAM 1" >>confdefs.h
8062 as_fn_error $? "no argument expected for --with-pam option" "$LINENO" 5
8064 esac
8066 else
8067 with_pam=no
8072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pam" >&5
8073 $as_echo "$with_pam" >&6; }
8077 # BSD AUTH
8079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with BSD Authentication support" >&5
8080 $as_echo_n "checking whether to build with BSD Authentication support... " >&6; }
8084 # Check whether --with-bsd-auth was given.
8085 if test "${with_bsd_auth+set}" = set; then :
8086 withval=$with_bsd_auth;
8087 case $withval in
8088 yes)
8090 $as_echo "#define USE_BSD_AUTH 1" >>confdefs.h
8097 as_fn_error $? "no argument expected for --with-bsd-auth option" "$LINENO" 5
8099 esac
8101 else
8102 with_bsd_auth=no
8107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bsd_auth" >&5
8108 $as_echo "$with_bsd_auth" >&6; }
8112 # LDAP
8114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LDAP support" >&5
8115 $as_echo_n "checking whether to build with LDAP support... " >&6; }
8119 # Check whether --with-ldap was given.
8120 if test "${with_ldap+set}" = set; then :
8121 withval=$with_ldap;
8122 case $withval in
8123 yes)
8125 $as_echo "#define USE_LDAP 1" >>confdefs.h
8132 as_fn_error $? "no argument expected for --with-ldap option" "$LINENO" 5
8134 esac
8136 else
8137 with_ldap=no
8142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_ldap" >&5
8143 $as_echo "$with_ldap" >&6; }
8148 # Bonjour
8150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Bonjour support" >&5
8151 $as_echo_n "checking whether to build with Bonjour support... " >&6; }
8155 # Check whether --with-bonjour was given.
8156 if test "${with_bonjour+set}" = set; then :
8157 withval=$with_bonjour;
8158 case $withval in
8159 yes)
8161 $as_echo "#define USE_BONJOUR 1" >>confdefs.h
8168 as_fn_error $? "no argument expected for --with-bonjour option" "$LINENO" 5
8170 esac
8172 else
8173 with_bonjour=no
8178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bonjour" >&5
8179 $as_echo "$with_bonjour" >&6; }
8183 # SELinux
8185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with SELinux support" >&5
8186 $as_echo_n "checking whether to build with SELinux support... " >&6; }
8190 # Check whether --with-selinux was given.
8191 if test "${with_selinux+set}" = set; then :
8192 withval=$with_selinux;
8193 case $withval in
8194 yes)
8201 as_fn_error $? "no argument expected for --with-selinux option" "$LINENO" 5
8203 esac
8205 else
8206 with_selinux=no
8212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_selinux" >&5
8213 $as_echo "$with_selinux" >&6; }
8216 # Systemd
8218 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with systemd support" >&5
8219 $as_echo_n "checking whether to build with systemd support... " >&6; }
8223 # Check whether --with-systemd was given.
8224 if test "${with_systemd+set}" = set; then :
8225 withval=$with_systemd;
8226 case $withval in
8227 yes)
8229 $as_echo "#define USE_SYSTEMD 1" >>confdefs.h
8236 as_fn_error $? "no argument expected for --with-systemd option" "$LINENO" 5
8238 esac
8240 else
8241 with_systemd=no
8247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_systemd" >&5
8248 $as_echo "$with_systemd" >&6; }
8251 # Readline
8256 # Check whether --with-readline was given.
8257 if test "${with_readline+set}" = set; then :
8258 withval=$with_readline;
8259 case $withval in
8260 yes)
8267 as_fn_error $? "no argument expected for --with-readline option" "$LINENO" 5
8269 esac
8271 else
8272 with_readline=yes
8277 # readline on MinGW has problems with backslashes in psql and other bugs.
8278 # This is particularly a problem with non-US code pages.
8279 # Therefore disable its use until we understand the cause. 2004-07-20
8280 if test "$PORTNAME" = "win32"; then
8281 if test "$with_readline" = yes; then
8282 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Readline does not work on MinGW --- disabling" >&5
8283 $as_echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
8284 with_readline=no
8291 # Prefer libedit
8296 # Check whether --with-libedit-preferred was given.
8297 if test "${with_libedit_preferred+set}" = set; then :
8298 withval=$with_libedit_preferred;
8299 case $withval in
8300 yes)
8307 as_fn_error $? "no argument expected for --with-libedit-preferred option" "$LINENO" 5
8309 esac
8311 else
8312 with_libedit_preferred=no
8320 # UUID library
8322 # There are at least three UUID libraries in common use: the FreeBSD/NetBSD
8323 # library, the e2fsprogs libuuid (now part of util-linux-ng), and the OSSP
8324 # UUID library. More than one of these might be present on a given platform,
8325 # so we make the user say which one she wants.
8330 # Check whether --with-uuid was given.
8331 if test "${with_uuid+set}" = set; then :
8332 withval=$with_uuid;
8333 case $withval in
8334 yes)
8335 as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
8338 as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
8343 esac
8348 if test x"$with_uuid" = x"" ; then
8349 with_uuid=no
8354 # Check whether --with-ossp-uuid was given.
8355 if test "${with_ossp_uuid+set}" = set; then :
8356 withval=$with_ossp_uuid;
8357 case $withval in
8358 yes)
8365 as_fn_error $? "no argument expected for --with-ossp-uuid option" "$LINENO" 5
8367 esac
8369 else
8370 with_ossp_uuid=no
8375 if test "$with_ossp_uuid" = yes ; then
8376 with_uuid=ossp
8379 if test "$with_uuid" != no ; then
8380 if test "$with_uuid" = bsd ; then
8382 $as_echo "#define HAVE_UUID_BSD 1" >>confdefs.h
8384 elif test "$with_uuid" = e2fs ; then
8386 $as_echo "#define HAVE_UUID_E2FS 1" >>confdefs.h
8388 elif test "$with_uuid" = ossp ; then
8390 $as_echo "#define HAVE_UUID_OSSP 1" >>confdefs.h
8392 else
8393 as_fn_error $? "--with-uuid must specify one of bsd, e2fs, or ossp" "$LINENO" 5
8400 # XML
8402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with XML support" >&5
8403 $as_echo_n "checking whether to build with XML support... " >&6; }
8407 # Check whether --with-libxml was given.
8408 if test "${with_libxml+set}" = set; then :
8409 withval=$with_libxml;
8410 case $withval in
8411 yes)
8413 $as_echo "#define USE_LIBXML 1" >>confdefs.h
8420 as_fn_error $? "no argument expected for --with-libxml option" "$LINENO" 5
8422 esac
8424 else
8425 with_libxml=no
8430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_libxml" >&5
8431 $as_echo "$with_libxml" >&6; }
8434 if test "$with_libxml" = yes ; then
8435 # Check pkg-config, then xml2-config. But for backwards compatibility,
8436 # setting XML2_CONFIG overrides pkg-config.
8437 have_libxml2_pkg_config=no
8438 if test -z "$XML2_CONFIG" -a -n "$PKG_CONFIG"; then
8440 pkg_failed=no
8441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml-2.0 >= 2.6.23" >&5
8442 $as_echo_n "checking for libxml-2.0 >= 2.6.23... " >&6; }
8444 if test -n "$XML2_CFLAGS"; then
8445 pkg_cv_XML2_CFLAGS="$XML2_CFLAGS"
8446 elif test -n "$PKG_CONFIG"; then
8447 if test -n "$PKG_CONFIG" && \
8448 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.6.23\""; } >&5
8449 ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.6.23") 2>&5
8450 ac_status=$?
8451 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8452 test $ac_status = 0; }; then
8453 pkg_cv_XML2_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0 >= 2.6.23" 2>/dev/null`
8454 test "x$?" != "x0" && pkg_failed=yes
8455 else
8456 pkg_failed=yes
8458 else
8459 pkg_failed=untried
8461 if test -n "$XML2_LIBS"; then
8462 pkg_cv_XML2_LIBS="$XML2_LIBS"
8463 elif test -n "$PKG_CONFIG"; then
8464 if test -n "$PKG_CONFIG" && \
8465 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.6.23\""; } >&5
8466 ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.6.23") 2>&5
8467 ac_status=$?
8468 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8469 test $ac_status = 0; }; then
8470 pkg_cv_XML2_LIBS=`$PKG_CONFIG --libs "libxml-2.0 >= 2.6.23" 2>/dev/null`
8471 test "x$?" != "x0" && pkg_failed=yes
8472 else
8473 pkg_failed=yes
8475 else
8476 pkg_failed=untried
8481 if test $pkg_failed = yes; then
8482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8483 $as_echo "no" >&6; }
8485 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
8486 _pkg_short_errors_supported=yes
8487 else
8488 _pkg_short_errors_supported=no
8490 if test $_pkg_short_errors_supported = yes; then
8491 XML2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libxml-2.0 >= 2.6.23" 2>&1`
8492 else
8493 XML2_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libxml-2.0 >= 2.6.23" 2>&1`
8495 # Put the nasty error message in config.log where it belongs
8496 echo "$XML2_PKG_ERRORS" >&5
8498 # do nothing
8499 elif test $pkg_failed = untried; then
8500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8501 $as_echo "no" >&6; }
8502 # do nothing
8503 else
8504 XML2_CFLAGS=$pkg_cv_XML2_CFLAGS
8505 XML2_LIBS=$pkg_cv_XML2_LIBS
8506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8507 $as_echo "yes" >&6; }
8508 have_libxml2_pkg_config=yes
8511 if test "$have_libxml2_pkg_config" = no ; then
8512 if test -z "$XML2_CONFIG"; then
8513 for ac_prog in xml2-config
8515 # Extract the first word of "$ac_prog", so it can be a program name with args.
8516 set dummy $ac_prog; ac_word=$2
8517 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8518 $as_echo_n "checking for $ac_word... " >&6; }
8519 if ${ac_cv_path_XML2_CONFIG+:} false; then :
8520 $as_echo_n "(cached) " >&6
8521 else
8522 case $XML2_CONFIG in
8523 [\\/]* | ?:[\\/]*)
8524 ac_cv_path_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test with a path.
8527 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8528 for as_dir in $PATH
8530 IFS=$as_save_IFS
8531 test -z "$as_dir" && as_dir=.
8532 for ac_exec_ext in '' $ac_executable_extensions; do
8533 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8534 ac_cv_path_XML2_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8535 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8536 break 2
8538 done
8539 done
8540 IFS=$as_save_IFS
8543 esac
8545 XML2_CONFIG=$ac_cv_path_XML2_CONFIG
8546 if test -n "$XML2_CONFIG"; then
8547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
8548 $as_echo "$XML2_CONFIG" >&6; }
8549 else
8550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8551 $as_echo "no" >&6; }
8555 test -n "$XML2_CONFIG" && break
8556 done
8558 else
8559 # Report the value of XML2_CONFIG in configure's output in all cases.
8560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML2_CONFIG" >&5
8561 $as_echo_n "checking for XML2_CONFIG... " >&6; }
8562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
8563 $as_echo "$XML2_CONFIG" >&6; }
8566 if test -n "$XML2_CONFIG"; then
8567 XML2_CFLAGS=`$XML2_CONFIG --cflags`
8568 XML2_LIBS=`$XML2_CONFIG --libs`
8571 # Note the user could also set XML2_CFLAGS/XML2_LIBS directly
8572 for pgac_option in $XML2_CFLAGS; do
8573 case $pgac_option in
8574 -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
8575 esac
8576 done
8577 for pgac_option in $XML2_LIBS; do
8578 case $pgac_option in
8579 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
8580 esac
8581 done
8586 # XSLT
8591 # Check whether --with-libxslt was given.
8592 if test "${with_libxslt+set}" = set; then :
8593 withval=$with_libxslt;
8594 case $withval in
8595 yes)
8597 $as_echo "#define USE_LIBXSLT 1" >>confdefs.h
8604 as_fn_error $? "no argument expected for --with-libxslt option" "$LINENO" 5
8606 esac
8608 else
8609 with_libxslt=no
8619 # tzdata
8624 # Check whether --with-system-tzdata was given.
8625 if test "${with_system_tzdata+set}" = set; then :
8626 withval=$with_system_tzdata;
8627 case $withval in
8628 yes)
8629 as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
8632 as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
8637 esac
8645 # Zlib
8650 # Check whether --with-zlib was given.
8651 if test "${with_zlib+set}" = set; then :
8652 withval=$with_zlib;
8653 case $withval in
8654 yes)
8661 as_fn_error $? "no argument expected for --with-zlib option" "$LINENO" 5
8663 esac
8665 else
8666 with_zlib=yes
8674 # LZ4
8676 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LZ4 support" >&5
8677 $as_echo_n "checking whether to build with LZ4 support... " >&6; }
8681 # Check whether --with-lz4 was given.
8682 if test "${with_lz4+set}" = set; then :
8683 withval=$with_lz4;
8684 case $withval in
8685 yes)
8687 $as_echo "#define USE_LZ4 1" >>confdefs.h
8694 as_fn_error $? "no argument expected for --with-lz4 option" "$LINENO" 5
8696 esac
8698 else
8699 with_lz4=no
8704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lz4" >&5
8705 $as_echo "$with_lz4" >&6; }
8708 if test "$with_lz4" = yes; then
8710 pkg_failed=no
8711 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblz4" >&5
8712 $as_echo_n "checking for liblz4... " >&6; }
8714 if test -n "$LZ4_CFLAGS"; then
8715 pkg_cv_LZ4_CFLAGS="$LZ4_CFLAGS"
8716 elif test -n "$PKG_CONFIG"; then
8717 if test -n "$PKG_CONFIG" && \
8718 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"liblz4\""; } >&5
8719 ($PKG_CONFIG --exists --print-errors "liblz4") 2>&5
8720 ac_status=$?
8721 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8722 test $ac_status = 0; }; then
8723 pkg_cv_LZ4_CFLAGS=`$PKG_CONFIG --cflags "liblz4" 2>/dev/null`
8724 test "x$?" != "x0" && pkg_failed=yes
8725 else
8726 pkg_failed=yes
8728 else
8729 pkg_failed=untried
8731 if test -n "$LZ4_LIBS"; then
8732 pkg_cv_LZ4_LIBS="$LZ4_LIBS"
8733 elif test -n "$PKG_CONFIG"; then
8734 if test -n "$PKG_CONFIG" && \
8735 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"liblz4\""; } >&5
8736 ($PKG_CONFIG --exists --print-errors "liblz4") 2>&5
8737 ac_status=$?
8738 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8739 test $ac_status = 0; }; then
8740 pkg_cv_LZ4_LIBS=`$PKG_CONFIG --libs "liblz4" 2>/dev/null`
8741 test "x$?" != "x0" && pkg_failed=yes
8742 else
8743 pkg_failed=yes
8745 else
8746 pkg_failed=untried
8751 if test $pkg_failed = yes; then
8752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8753 $as_echo "no" >&6; }
8755 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
8756 _pkg_short_errors_supported=yes
8757 else
8758 _pkg_short_errors_supported=no
8760 if test $_pkg_short_errors_supported = yes; then
8761 LZ4_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "liblz4" 2>&1`
8762 else
8763 LZ4_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "liblz4" 2>&1`
8765 # Put the nasty error message in config.log where it belongs
8766 echo "$LZ4_PKG_ERRORS" >&5
8768 as_fn_error $? "Package requirements (liblz4) were not met:
8770 $LZ4_PKG_ERRORS
8772 Consider adjusting the PKG_CONFIG_PATH environment variable if you
8773 installed software in a non-standard prefix.
8775 Alternatively, you may set the environment variables LZ4_CFLAGS
8776 and LZ4_LIBS to avoid the need to call pkg-config.
8777 See the pkg-config man page for more details." "$LINENO" 5
8778 elif test $pkg_failed = untried; then
8779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8780 $as_echo "no" >&6; }
8781 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8782 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8783 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
8784 is in your PATH or set the PKG_CONFIG environment variable to the full
8785 path to pkg-config.
8787 Alternatively, you may set the environment variables LZ4_CFLAGS
8788 and LZ4_LIBS to avoid the need to call pkg-config.
8789 See the pkg-config man page for more details.
8791 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
8792 See \`config.log' for more details" "$LINENO" 5; }
8793 else
8794 LZ4_CFLAGS=$pkg_cv_LZ4_CFLAGS
8795 LZ4_LIBS=$pkg_cv_LZ4_LIBS
8796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8797 $as_echo "yes" >&6; }
8800 # We only care about -I, -D, and -L switches;
8801 # note that -llz4 will be added by AC_CHECK_LIB below.
8802 for pgac_option in $LZ4_CFLAGS; do
8803 case $pgac_option in
8804 -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
8805 esac
8806 done
8807 for pgac_option in $LZ4_LIBS; do
8808 case $pgac_option in
8809 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
8810 esac
8811 done
8815 # Assignments
8818 CPPFLAGS="$CPPFLAGS $INCLUDES"
8819 LDFLAGS="$LDFLAGS $LIBDIRS"
8825 # Check whether --with-gnu-ld was given.
8826 if test "${with_gnu_ld+set}" = set; then :
8827 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
8828 else
8829 with_gnu_ld=no
8832 ac_prog=ld
8833 if test "$GCC" = yes; then
8834 # Check if gcc -print-prog-name=ld gives a path.
8835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
8836 $as_echo_n "checking for ld used by GCC... " >&6; }
8837 case $host in
8838 *-*-mingw*)
8839 # gcc leaves a trailing carriage return which upsets mingw
8840 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8842 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8843 esac
8844 case "$ac_prog" in
8845 # Accept absolute paths.
8846 [\\/]* | [A-Za-z]:[\\/]*)
8847 re_direlt='/[^/][^/]*/\.\./'
8848 # Canonicalize the path of ld
8849 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
8850 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
8851 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
8852 done
8853 test -z "$LD" && LD="$ac_prog"
8856 # If it fails, then pretend we aren't using GCC.
8857 ac_prog=ld
8860 # If it is relative, then search for the first ld in PATH.
8861 with_gnu_ld=unknown
8863 esac
8864 elif test "$with_gnu_ld" = yes; then
8865 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8866 $as_echo_n "checking for GNU ld... " >&6; }
8867 else
8868 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8869 $as_echo_n "checking for non-GNU ld... " >&6; }
8871 if ${ac_cv_path_LD+:} false; then :
8872 $as_echo_n "(cached) " >&6
8873 else
8874 if test -z "$LD"; then
8875 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
8876 for ac_dir in $PATH; do
8877 test -z "$ac_dir" && ac_dir=.
8878 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8879 ac_cv_path_LD="$ac_dir/$ac_prog"
8880 # Check to see if the program is GNU ld. I'd rather use --version,
8881 # but apparently some GNU ld's only accept -v.
8882 # Break only if it was the GNU/non-GNU ld that we prefer.
8883 if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
8884 test "$with_gnu_ld" != no && break
8885 else
8886 test "$with_gnu_ld" != yes && break
8889 done
8890 IFS="$ac_save_ifs"
8891 else
8892 ac_cv_path_LD="$LD" # Let the user override the test with a path.
8896 LD="$ac_cv_path_LD"
8897 if test -n "$LD"; then
8898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8899 $as_echo "$LD" >&6; }
8900 else
8901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8902 $as_echo "no" >&6; }
8904 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
8905 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8906 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
8907 if ${ac_cv_prog_gnu_ld+:} false; then :
8908 $as_echo_n "(cached) " >&6
8909 else
8910 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
8911 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
8912 ac_cv_prog_gnu_ld=yes
8913 else
8914 ac_cv_prog_gnu_ld=no
8917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gnu_ld" >&5
8918 $as_echo "$ac_cv_prog_gnu_ld" >&6; }
8919 with_gnu_ld=$ac_cv_prog_gnu_ld
8924 if test -n "$ac_tool_prefix"; then
8925 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8926 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
8927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8928 $as_echo_n "checking for $ac_word... " >&6; }
8929 if ${ac_cv_prog_RANLIB+:} false; then :
8930 $as_echo_n "(cached) " >&6
8931 else
8932 if test -n "$RANLIB"; then
8933 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8934 else
8935 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8936 for as_dir in $PATH
8938 IFS=$as_save_IFS
8939 test -z "$as_dir" && as_dir=.
8940 for ac_exec_ext in '' $ac_executable_extensions; do
8941 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8942 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
8943 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8944 break 2
8946 done
8947 done
8948 IFS=$as_save_IFS
8952 RANLIB=$ac_cv_prog_RANLIB
8953 if test -n "$RANLIB"; then
8954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
8955 $as_echo "$RANLIB" >&6; }
8956 else
8957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8958 $as_echo "no" >&6; }
8963 if test -z "$ac_cv_prog_RANLIB"; then
8964 ac_ct_RANLIB=$RANLIB
8965 # Extract the first word of "ranlib", so it can be a program name with args.
8966 set dummy ranlib; ac_word=$2
8967 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8968 $as_echo_n "checking for $ac_word... " >&6; }
8969 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
8970 $as_echo_n "(cached) " >&6
8971 else
8972 if test -n "$ac_ct_RANLIB"; then
8973 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8974 else
8975 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8976 for as_dir in $PATH
8978 IFS=$as_save_IFS
8979 test -z "$as_dir" && as_dir=.
8980 for ac_exec_ext in '' $ac_executable_extensions; do
8981 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8982 ac_cv_prog_ac_ct_RANLIB="ranlib"
8983 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8984 break 2
8986 done
8987 done
8988 IFS=$as_save_IFS
8992 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8993 if test -n "$ac_ct_RANLIB"; then
8994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
8995 $as_echo "$ac_ct_RANLIB" >&6; }
8996 else
8997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8998 $as_echo "no" >&6; }
9001 if test "x$ac_ct_RANLIB" = x; then
9002 RANLIB=":"
9003 else
9004 case $cross_compiling:$ac_tool_warned in
9005 yes:)
9006 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9007 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9008 ac_tool_warned=yes ;;
9009 esac
9010 RANLIB=$ac_ct_RANLIB
9012 else
9013 RANLIB="$ac_cv_prog_RANLIB"
9017 if test -n "$ac_tool_prefix"; then
9018 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
9019 set dummy ${ac_tool_prefix}strip; ac_word=$2
9020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9021 $as_echo_n "checking for $ac_word... " >&6; }
9022 if ${ac_cv_prog_STRIP+:} false; then :
9023 $as_echo_n "(cached) " >&6
9024 else
9025 if test -n "$STRIP"; then
9026 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
9027 else
9028 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9029 for as_dir in $PATH
9031 IFS=$as_save_IFS
9032 test -z "$as_dir" && as_dir=.
9033 for ac_exec_ext in '' $ac_executable_extensions; do
9034 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9035 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
9036 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9037 break 2
9039 done
9040 done
9041 IFS=$as_save_IFS
9045 STRIP=$ac_cv_prog_STRIP
9046 if test -n "$STRIP"; then
9047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
9048 $as_echo "$STRIP" >&6; }
9049 else
9050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9051 $as_echo "no" >&6; }
9056 if test -z "$ac_cv_prog_STRIP"; then
9057 ac_ct_STRIP=$STRIP
9058 # Extract the first word of "strip", so it can be a program name with args.
9059 set dummy strip; ac_word=$2
9060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9061 $as_echo_n "checking for $ac_word... " >&6; }
9062 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
9063 $as_echo_n "(cached) " >&6
9064 else
9065 if test -n "$ac_ct_STRIP"; then
9066 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
9067 else
9068 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9069 for as_dir in $PATH
9071 IFS=$as_save_IFS
9072 test -z "$as_dir" && as_dir=.
9073 for ac_exec_ext in '' $ac_executable_extensions; do
9074 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9075 ac_cv_prog_ac_ct_STRIP="strip"
9076 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9077 break 2
9079 done
9080 done
9081 IFS=$as_save_IFS
9085 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
9086 if test -n "$ac_ct_STRIP"; then
9087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
9088 $as_echo "$ac_ct_STRIP" >&6; }
9089 else
9090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9091 $as_echo "no" >&6; }
9094 if test "x$ac_ct_STRIP" = x; then
9095 STRIP=":"
9096 else
9097 case $cross_compiling:$ac_tool_warned in
9098 yes:)
9099 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9100 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9101 ac_tool_warned=yes ;;
9102 esac
9103 STRIP=$ac_ct_STRIP
9105 else
9106 STRIP="$ac_cv_prog_STRIP"
9110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is possible to strip libraries" >&5
9111 $as_echo_n "checking whether it is possible to strip libraries... " >&6; }
9112 if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
9113 STRIP_STATIC_LIB="$STRIP -x"
9114 STRIP_SHARED_LIB="$STRIP --strip-unneeded"
9115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9116 $as_echo "yes" >&6; }
9117 else
9118 case $host_os in
9119 darwin*)
9120 STRIP="$STRIP -x"
9121 STRIP_STATIC_LIB=$STRIP
9122 STRIP_SHARED_LIB=$STRIP
9123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9124 $as_echo "yes" >&6; }
9127 STRIP_STATIC_LIB=:
9128 STRIP_SHARED_LIB=:
9129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9130 $as_echo "no" >&6; }
9132 esac
9137 if test -n "$ac_tool_prefix"; then
9138 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
9139 set dummy ${ac_tool_prefix}ar; ac_word=$2
9140 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9141 $as_echo_n "checking for $ac_word... " >&6; }
9142 if ${ac_cv_prog_AR+:} false; then :
9143 $as_echo_n "(cached) " >&6
9144 else
9145 if test -n "$AR"; then
9146 ac_cv_prog_AR="$AR" # Let the user override the test.
9147 else
9148 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9149 for as_dir in $PATH
9151 IFS=$as_save_IFS
9152 test -z "$as_dir" && as_dir=.
9153 for ac_exec_ext in '' $ac_executable_extensions; do
9154 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9155 ac_cv_prog_AR="${ac_tool_prefix}ar"
9156 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9157 break 2
9159 done
9160 done
9161 IFS=$as_save_IFS
9165 AR=$ac_cv_prog_AR
9166 if test -n "$AR"; then
9167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
9168 $as_echo "$AR" >&6; }
9169 else
9170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9171 $as_echo "no" >&6; }
9176 if test -z "$ac_cv_prog_AR"; then
9177 ac_ct_AR=$AR
9178 # Extract the first word of "ar", so it can be a program name with args.
9179 set dummy ar; ac_word=$2
9180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9181 $as_echo_n "checking for $ac_word... " >&6; }
9182 if ${ac_cv_prog_ac_ct_AR+:} false; then :
9183 $as_echo_n "(cached) " >&6
9184 else
9185 if test -n "$ac_ct_AR"; then
9186 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
9187 else
9188 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9189 for as_dir in $PATH
9191 IFS=$as_save_IFS
9192 test -z "$as_dir" && as_dir=.
9193 for ac_exec_ext in '' $ac_executable_extensions; do
9194 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9195 ac_cv_prog_ac_ct_AR="ar"
9196 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9197 break 2
9199 done
9200 done
9201 IFS=$as_save_IFS
9205 ac_ct_AR=$ac_cv_prog_ac_ct_AR
9206 if test -n "$ac_ct_AR"; then
9207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
9208 $as_echo "$ac_ct_AR" >&6; }
9209 else
9210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9211 $as_echo "no" >&6; }
9214 if test "x$ac_ct_AR" = x; then
9215 AR="ar"
9216 else
9217 case $cross_compiling:$ac_tool_warned in
9218 yes:)
9219 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9220 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9221 ac_tool_warned=yes ;;
9222 esac
9223 AR=$ac_ct_AR
9225 else
9226 AR="$ac_cv_prog_AR"
9229 if test "$PORTNAME" = "win32"; then
9230 if test -n "$ac_tool_prefix"; then
9231 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
9232 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
9233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9234 $as_echo_n "checking for $ac_word... " >&6; }
9235 if ${ac_cv_prog_DLLTOOL+:} false; then :
9236 $as_echo_n "(cached) " >&6
9237 else
9238 if test -n "$DLLTOOL"; then
9239 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
9240 else
9241 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9242 for as_dir in $PATH
9244 IFS=$as_save_IFS
9245 test -z "$as_dir" && as_dir=.
9246 for ac_exec_ext in '' $ac_executable_extensions; do
9247 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9248 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
9249 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9250 break 2
9252 done
9253 done
9254 IFS=$as_save_IFS
9258 DLLTOOL=$ac_cv_prog_DLLTOOL
9259 if test -n "$DLLTOOL"; then
9260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
9261 $as_echo "$DLLTOOL" >&6; }
9262 else
9263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9264 $as_echo "no" >&6; }
9269 if test -z "$ac_cv_prog_DLLTOOL"; then
9270 ac_ct_DLLTOOL=$DLLTOOL
9271 # Extract the first word of "dlltool", so it can be a program name with args.
9272 set dummy dlltool; ac_word=$2
9273 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9274 $as_echo_n "checking for $ac_word... " >&6; }
9275 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
9276 $as_echo_n "(cached) " >&6
9277 else
9278 if test -n "$ac_ct_DLLTOOL"; then
9279 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
9280 else
9281 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9282 for as_dir in $PATH
9284 IFS=$as_save_IFS
9285 test -z "$as_dir" && as_dir=.
9286 for ac_exec_ext in '' $ac_executable_extensions; do
9287 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9288 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
9289 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9290 break 2
9292 done
9293 done
9294 IFS=$as_save_IFS
9298 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
9299 if test -n "$ac_ct_DLLTOOL"; then
9300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
9301 $as_echo "$ac_ct_DLLTOOL" >&6; }
9302 else
9303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9304 $as_echo "no" >&6; }
9307 if test "x$ac_ct_DLLTOOL" = x; then
9308 DLLTOOL="dlltool"
9309 else
9310 case $cross_compiling:$ac_tool_warned in
9311 yes:)
9312 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9313 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9314 ac_tool_warned=yes ;;
9315 esac
9316 DLLTOOL=$ac_ct_DLLTOOL
9318 else
9319 DLLTOOL="$ac_cv_prog_DLLTOOL"
9322 if test -n "$ac_tool_prefix"; then
9323 # Extract the first word of "${ac_tool_prefix}dllwrap", so it can be a program name with args.
9324 set dummy ${ac_tool_prefix}dllwrap; ac_word=$2
9325 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9326 $as_echo_n "checking for $ac_word... " >&6; }
9327 if ${ac_cv_prog_DLLWRAP+:} false; then :
9328 $as_echo_n "(cached) " >&6
9329 else
9330 if test -n "$DLLWRAP"; then
9331 ac_cv_prog_DLLWRAP="$DLLWRAP" # Let the user override the test.
9332 else
9333 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9334 for as_dir in $PATH
9336 IFS=$as_save_IFS
9337 test -z "$as_dir" && as_dir=.
9338 for ac_exec_ext in '' $ac_executable_extensions; do
9339 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9340 ac_cv_prog_DLLWRAP="${ac_tool_prefix}dllwrap"
9341 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9342 break 2
9344 done
9345 done
9346 IFS=$as_save_IFS
9350 DLLWRAP=$ac_cv_prog_DLLWRAP
9351 if test -n "$DLLWRAP"; then
9352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLWRAP" >&5
9353 $as_echo "$DLLWRAP" >&6; }
9354 else
9355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9356 $as_echo "no" >&6; }
9361 if test -z "$ac_cv_prog_DLLWRAP"; then
9362 ac_ct_DLLWRAP=$DLLWRAP
9363 # Extract the first word of "dllwrap", so it can be a program name with args.
9364 set dummy dllwrap; ac_word=$2
9365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9366 $as_echo_n "checking for $ac_word... " >&6; }
9367 if ${ac_cv_prog_ac_ct_DLLWRAP+:} false; then :
9368 $as_echo_n "(cached) " >&6
9369 else
9370 if test -n "$ac_ct_DLLWRAP"; then
9371 ac_cv_prog_ac_ct_DLLWRAP="$ac_ct_DLLWRAP" # Let the user override the test.
9372 else
9373 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9374 for as_dir in $PATH
9376 IFS=$as_save_IFS
9377 test -z "$as_dir" && as_dir=.
9378 for ac_exec_ext in '' $ac_executable_extensions; do
9379 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9380 ac_cv_prog_ac_ct_DLLWRAP="dllwrap"
9381 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9382 break 2
9384 done
9385 done
9386 IFS=$as_save_IFS
9390 ac_ct_DLLWRAP=$ac_cv_prog_ac_ct_DLLWRAP
9391 if test -n "$ac_ct_DLLWRAP"; then
9392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLWRAP" >&5
9393 $as_echo "$ac_ct_DLLWRAP" >&6; }
9394 else
9395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9396 $as_echo "no" >&6; }
9399 if test "x$ac_ct_DLLWRAP" = x; then
9400 DLLWRAP="dllwrap"
9401 else
9402 case $cross_compiling:$ac_tool_warned in
9403 yes:)
9404 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9405 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9406 ac_tool_warned=yes ;;
9407 esac
9408 DLLWRAP=$ac_ct_DLLWRAP
9410 else
9411 DLLWRAP="$ac_cv_prog_DLLWRAP"
9414 if test -n "$ac_tool_prefix"; then
9415 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
9416 set dummy ${ac_tool_prefix}windres; ac_word=$2
9417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9418 $as_echo_n "checking for $ac_word... " >&6; }
9419 if ${ac_cv_prog_WINDRES+:} false; then :
9420 $as_echo_n "(cached) " >&6
9421 else
9422 if test -n "$WINDRES"; then
9423 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
9424 else
9425 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9426 for as_dir in $PATH
9428 IFS=$as_save_IFS
9429 test -z "$as_dir" && as_dir=.
9430 for ac_exec_ext in '' $ac_executable_extensions; do
9431 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9432 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
9433 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9434 break 2
9436 done
9437 done
9438 IFS=$as_save_IFS
9442 WINDRES=$ac_cv_prog_WINDRES
9443 if test -n "$WINDRES"; then
9444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
9445 $as_echo "$WINDRES" >&6; }
9446 else
9447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9448 $as_echo "no" >&6; }
9453 if test -z "$ac_cv_prog_WINDRES"; then
9454 ac_ct_WINDRES=$WINDRES
9455 # Extract the first word of "windres", so it can be a program name with args.
9456 set dummy windres; ac_word=$2
9457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9458 $as_echo_n "checking for $ac_word... " >&6; }
9459 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
9460 $as_echo_n "(cached) " >&6
9461 else
9462 if test -n "$ac_ct_WINDRES"; then
9463 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
9464 else
9465 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9466 for as_dir in $PATH
9468 IFS=$as_save_IFS
9469 test -z "$as_dir" && as_dir=.
9470 for ac_exec_ext in '' $ac_executable_extensions; do
9471 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9472 ac_cv_prog_ac_ct_WINDRES="windres"
9473 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9474 break 2
9476 done
9477 done
9478 IFS=$as_save_IFS
9482 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
9483 if test -n "$ac_ct_WINDRES"; then
9484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
9485 $as_echo "$ac_ct_WINDRES" >&6; }
9486 else
9487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9488 $as_echo "no" >&6; }
9491 if test "x$ac_ct_WINDRES" = x; then
9492 WINDRES="windres"
9493 else
9494 case $cross_compiling:$ac_tool_warned in
9495 yes:)
9496 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9497 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9498 ac_tool_warned=yes ;;
9499 esac
9500 WINDRES=$ac_ct_WINDRES
9502 else
9503 WINDRES="$ac_cv_prog_WINDRES"
9508 # Find a good install program. We prefer a C program (faster),
9509 # so one script is as good as another. But avoid the broken or
9510 # incompatible versions:
9511 # SysV /etc/install, /usr/sbin/install
9512 # SunOS /usr/etc/install
9513 # IRIX /sbin/install
9514 # AIX /bin/install
9515 # AmigaOS /C/install, which installs bootblocks on floppy discs
9516 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
9517 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
9518 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
9519 # OS/2's system install, which has a completely different semantic
9520 # ./install, which can be erroneously created by make from ./install.sh.
9521 # Reject install programs that cannot install multiple files.
9522 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
9523 $as_echo_n "checking for a BSD-compatible install... " >&6; }
9524 if test -z "$INSTALL"; then
9525 if ${ac_cv_path_install+:} false; then :
9526 $as_echo_n "(cached) " >&6
9527 else
9528 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9529 for as_dir in $PATH
9531 IFS=$as_save_IFS
9532 test -z "$as_dir" && as_dir=.
9533 # Account for people who put trailing slashes in PATH elements.
9534 case $as_dir/ in #((
9535 ./ | .// | /[cC]/* | \
9536 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
9537 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
9538 /usr/ucb/* ) ;;
9540 # OSF1 and SCO ODT 3.0 have their own names for install.
9541 # Don't use installbsd from OSF since it installs stuff as root
9542 # by default.
9543 for ac_prog in ginstall scoinst install; do
9544 for ac_exec_ext in '' $ac_executable_extensions; do
9545 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
9546 if test $ac_prog = install &&
9547 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
9548 # AIX install. It has an incompatible calling convention.
9550 elif test $ac_prog = install &&
9551 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
9552 # program-specific install script used by HP pwplus--don't use.
9554 else
9555 rm -rf conftest.one conftest.two conftest.dir
9556 echo one > conftest.one
9557 echo two > conftest.two
9558 mkdir conftest.dir
9559 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
9560 test -s conftest.one && test -s conftest.two &&
9561 test -s conftest.dir/conftest.one &&
9562 test -s conftest.dir/conftest.two
9563 then
9564 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
9565 break 3
9569 done
9570 done
9572 esac
9574 done
9575 IFS=$as_save_IFS
9577 rm -rf conftest.one conftest.two conftest.dir
9580 if test "${ac_cv_path_install+set}" = set; then
9581 INSTALL=$ac_cv_path_install
9582 else
9583 # As a last resort, use the slow shell script. Don't cache a
9584 # value for INSTALL within a source directory, because that will
9585 # break other packages using the cache if that directory is
9586 # removed, or if the value is a relative name.
9587 INSTALL=$ac_install_sh
9590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
9591 $as_echo "$INSTALL" >&6; }
9593 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
9594 # It thinks the first close brace ends the variable substitution.
9595 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
9597 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
9599 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
9601 # When Autoconf chooses install-sh as install program it tries to generate
9602 # a relative path to it in each makefile where it substitutes it. This clashes
9603 # with our Makefile.global concept. This workaround helps.
9604 case $INSTALL in
9605 *install-sh*) install_bin='';;
9606 *) install_bin=$INSTALL;;
9607 esac
9610 if test -z "$TAR"; then
9611 for ac_prog in tar
9613 # Extract the first word of "$ac_prog", so it can be a program name with args.
9614 set dummy $ac_prog; ac_word=$2
9615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9616 $as_echo_n "checking for $ac_word... " >&6; }
9617 if ${ac_cv_path_TAR+:} false; then :
9618 $as_echo_n "(cached) " >&6
9619 else
9620 case $TAR in
9621 [\\/]* | ?:[\\/]*)
9622 ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9625 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9626 for as_dir in $PATH
9628 IFS=$as_save_IFS
9629 test -z "$as_dir" && as_dir=.
9630 for ac_exec_ext in '' $ac_executable_extensions; do
9631 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9632 ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9633 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9634 break 2
9636 done
9637 done
9638 IFS=$as_save_IFS
9641 esac
9643 TAR=$ac_cv_path_TAR
9644 if test -n "$TAR"; then
9645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9646 $as_echo "$TAR" >&6; }
9647 else
9648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9649 $as_echo "no" >&6; }
9653 test -n "$TAR" && break
9654 done
9656 else
9657 # Report the value of TAR in configure's output in all cases.
9658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9659 $as_echo_n "checking for TAR... " >&6; }
9660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9661 $as_echo "$TAR" >&6; }
9664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
9665 $as_echo_n "checking whether ln -s works... " >&6; }
9666 LN_S=$as_ln_s
9667 if test "$LN_S" = "ln -s"; then
9668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9669 $as_echo "yes" >&6; }
9670 else
9671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
9672 $as_echo "no, using $LN_S" >&6; }
9675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
9676 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
9677 if test -z "$MKDIR_P"; then
9678 if ${ac_cv_path_mkdir+:} false; then :
9679 $as_echo_n "(cached) " >&6
9680 else
9681 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9682 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
9684 IFS=$as_save_IFS
9685 test -z "$as_dir" && as_dir=.
9686 for ac_prog in mkdir gmkdir; do
9687 for ac_exec_ext in '' $ac_executable_extensions; do
9688 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
9689 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
9690 'mkdir (GNU coreutils) '* | \
9691 'mkdir (coreutils) '* | \
9692 'mkdir (fileutils) '4.1*)
9693 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
9694 break 3;;
9695 esac
9696 done
9697 done
9698 done
9699 IFS=$as_save_IFS
9703 test -d ./--version && rmdir ./--version
9704 if test "${ac_cv_path_mkdir+set}" = set; then
9705 MKDIR_P="$ac_cv_path_mkdir -p"
9706 else
9707 # As a last resort, use the slow shell script. Don't cache a
9708 # value for MKDIR_P within a source directory, because that will
9709 # break other packages using the cache if that directory is
9710 # removed, or if the value is a relative name.
9711 MKDIR_P="$ac_install_sh -d"
9714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
9715 $as_echo "$MKDIR_P" >&6; }
9717 # When Autoconf chooses install-sh as mkdir -p program it tries to generate
9718 # a relative path to it in each makefile where it substitutes it. This clashes
9719 # with our Makefile.global concept. This workaround helps.
9720 case $MKDIR_P in
9721 *install-sh*) MKDIR_P='\${SHELL} \${top_srcdir}/config/install-sh -c -d';;
9722 esac
9724 if test -z "$BISON"; then
9725 for ac_prog in bison
9727 # Extract the first word of "$ac_prog", so it can be a program name with args.
9728 set dummy $ac_prog; ac_word=$2
9729 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9730 $as_echo_n "checking for $ac_word... " >&6; }
9731 if ${ac_cv_path_BISON+:} false; then :
9732 $as_echo_n "(cached) " >&6
9733 else
9734 case $BISON in
9735 [\\/]* | ?:[\\/]*)
9736 ac_cv_path_BISON="$BISON" # Let the user override the test with a path.
9739 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9740 for as_dir in $PATH
9742 IFS=$as_save_IFS
9743 test -z "$as_dir" && as_dir=.
9744 for ac_exec_ext in '' $ac_executable_extensions; do
9745 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9746 ac_cv_path_BISON="$as_dir/$ac_word$ac_exec_ext"
9747 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9748 break 2
9750 done
9751 done
9752 IFS=$as_save_IFS
9755 esac
9757 BISON=$ac_cv_path_BISON
9758 if test -n "$BISON"; then
9759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
9760 $as_echo "$BISON" >&6; }
9761 else
9762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9763 $as_echo "no" >&6; }
9767 test -n "$BISON" && break
9768 done
9770 else
9771 # Report the value of BISON in configure's output in all cases.
9772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BISON" >&5
9773 $as_echo_n "checking for BISON... " >&6; }
9774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
9775 $as_echo "$BISON" >&6; }
9779 if test "$BISON"; then
9780 pgac_bison_version=`$BISON --version 2>/dev/null | sed q`
9781 { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_bison_version" >&5
9782 $as_echo "$as_me: using $pgac_bison_version" >&6;}
9783 if echo "$pgac_bison_version" | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'
9784 then
9785 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9786 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
9787 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&5
9788 $as_echo "$as_me: WARNING:
9789 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
9790 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&2;}
9791 BISON=""
9793 # Bison >=3.0 issues warnings about %name-prefix="base_yy", instead
9794 # of the now preferred %name-prefix "base_yy", but the latter
9795 # doesn't work with Bison 2.3 or less. So for now we silence the
9796 # deprecation warnings.
9797 if echo "$pgac_bison_version" | $AWK '{ if ($4 >= 3) exit 0; else exit 1;}'
9798 then
9799 BISONFLAGS="$BISONFLAGS -Wno-deprecated"
9803 if test -z "$BISON"; then
9804 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9805 *** Without Bison you will not be able to build PostgreSQL from Git nor
9806 *** change any of the parser definition files. You can obtain Bison from
9807 *** a GNU mirror site. (If you are using the official distribution of
9808 *** PostgreSQL then you do not need to worry about this, because the Bison
9809 *** output is pre-generated.)" >&5
9810 $as_echo "$as_me: WARNING:
9811 *** Without Bison you will not be able to build PostgreSQL from Git nor
9812 *** change any of the parser definition files. You can obtain Bison from
9813 *** a GNU mirror site. (If you are using the official distribution of
9814 *** PostgreSQL then you do not need to worry about this, because the Bison
9815 *** output is pre-generated.)" >&2;}
9819 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flex" >&5
9820 $as_echo_n "checking for flex... " >&6; }
9821 if ${pgac_cv_path_flex+:} false; then :
9822 $as_echo_n "(cached) " >&6
9823 else
9824 # Let the user override the test
9825 if test -n "$FLEX"; then
9826 pgac_cv_path_flex=$FLEX
9827 else
9828 pgac_save_IFS=$IFS
9829 IFS=$PATH_SEPARATOR
9830 for pgac_dir in $PATH; do
9831 IFS=$pgac_save_IFS
9832 if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
9833 pgac_dir=`pwd`
9835 for pgac_prog in flex lex; do
9836 pgac_candidate="$pgac_dir/$pgac_prog"
9837 if test -f "$pgac_candidate" \
9838 && $pgac_candidate --version </dev/null >/dev/null 2>&1
9839 then
9840 echo '%%' > conftest.l
9841 if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
9842 pgac_flex_version=`$pgac_candidate --version 2>/dev/null`
9843 if echo "$pgac_flex_version" | sed 's/[.a-z]/ /g' | $AWK '{ if ($1 == 2 && ($2 > 5 || ($2 == 5 && $3 >= 31))) exit 0; else exit 1;}'
9844 then
9845 pgac_cv_path_flex=$pgac_candidate
9846 break 2
9847 else
9848 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9849 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
9850 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&5
9851 $as_echo "$as_me: WARNING:
9852 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
9853 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&2;}
9857 done
9858 done
9859 rm -f conftest.l lex.yy.c
9860 : ${pgac_cv_path_flex=no}
9864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_path_flex" >&5
9865 $as_echo "$pgac_cv_path_flex" >&6; }
9866 if test x"$pgac_cv_path_flex" = x"no"; then
9867 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9868 *** Without Flex you will not be able to build PostgreSQL from Git nor
9869 *** change any of the scanner definition files. You can obtain Flex from
9870 *** a GNU mirror site. (If you are using the official distribution of
9871 *** PostgreSQL then you do not need to worry about this because the Flex
9872 *** output is pre-generated.)" >&5
9873 $as_echo "$as_me: WARNING:
9874 *** Without Flex you will not be able to build PostgreSQL from Git nor
9875 *** change any of the scanner definition files. You can obtain Flex from
9876 *** a GNU mirror site. (If you are using the official distribution of
9877 *** PostgreSQL then you do not need to worry about this because the Flex
9878 *** output is pre-generated.)" >&2;}
9880 FLEX=
9881 else
9882 FLEX=$pgac_cv_path_flex
9883 pgac_flex_version=`$FLEX --version 2>/dev/null`
9884 { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_flex_version" >&5
9885 $as_echo "$as_me: using $pgac_flex_version" >&6;}
9892 if test -z "$PERL"; then
9893 for ac_prog in perl
9895 # Extract the first word of "$ac_prog", so it can be a program name with args.
9896 set dummy $ac_prog; ac_word=$2
9897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9898 $as_echo_n "checking for $ac_word... " >&6; }
9899 if ${ac_cv_path_PERL+:} false; then :
9900 $as_echo_n "(cached) " >&6
9901 else
9902 case $PERL in
9903 [\\/]* | ?:[\\/]*)
9904 ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
9907 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9908 for as_dir in $PATH
9910 IFS=$as_save_IFS
9911 test -z "$as_dir" && as_dir=.
9912 for ac_exec_ext in '' $ac_executable_extensions; do
9913 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9914 ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
9915 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9916 break 2
9918 done
9919 done
9920 IFS=$as_save_IFS
9923 esac
9925 PERL=$ac_cv_path_PERL
9926 if test -n "$PERL"; then
9927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
9928 $as_echo "$PERL" >&6; }
9929 else
9930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9931 $as_echo "no" >&6; }
9935 test -n "$PERL" && break
9936 done
9938 else
9939 # Report the value of PERL in configure's output in all cases.
9940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PERL" >&5
9941 $as_echo_n "checking for PERL... " >&6; }
9942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
9943 $as_echo "$PERL" >&6; }
9947 if test "$PERL"; then
9948 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'`
9949 { $as_echo "$as_me:${as_lineno-$LINENO}: using perl $pgac_perl_version" >&5
9950 $as_echo "$as_me: using perl $pgac_perl_version" >&6;}
9951 if echo "$pgac_perl_version" | sed 's/[.a-z_]/ /g' | \
9952 $AWK '{ if ($1 == 5 && $2 >= 8) exit 1; else exit 0;}'
9953 then
9954 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9955 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
9956 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&5
9957 $as_echo "$as_me: WARNING:
9958 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
9959 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&2;}
9960 PERL=""
9964 if test -z "$PERL"; then
9965 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9966 *** Without Perl you will not be able to build PostgreSQL from Git.
9967 *** You can obtain Perl from any CPAN mirror site.
9968 *** (If you are using the official distribution of PostgreSQL then you do not
9969 *** need to worry about this, because the Perl output is pre-generated.)" >&5
9970 $as_echo "$as_me: WARNING:
9971 *** Without Perl you will not be able to build PostgreSQL from Git.
9972 *** You can obtain Perl from any CPAN mirror site.
9973 *** (If you are using the official distribution of PostgreSQL then you do not
9974 *** need to worry about this, because the Perl output is pre-generated.)" >&2;}
9977 if test "$with_perl" = yes; then
9978 if test -z "$PERL"; then
9979 as_fn_error $? "Perl not found" "$LINENO" 5
9982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl archlibexp" >&5
9983 $as_echo_n "checking for Perl archlibexp... " >&6; }
9984 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
9985 test "$PORTNAME" = "win32" && perl_archlibexp=`echo $perl_archlibexp | sed 's,\\\\,/,g'`
9986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_archlibexp" >&5
9987 $as_echo "$perl_archlibexp" >&6; }
9988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl privlibexp" >&5
9989 $as_echo_n "checking for Perl privlibexp... " >&6; }
9990 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
9991 test "$PORTNAME" = "win32" && perl_privlibexp=`echo $perl_privlibexp | sed 's,\\\\,/,g'`
9992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_privlibexp" >&5
9993 $as_echo "$perl_privlibexp" >&6; }
9994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl useshrplib" >&5
9995 $as_echo_n "checking for Perl useshrplib... " >&6; }
9996 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
9997 test "$PORTNAME" = "win32" && perl_useshrplib=`echo $perl_useshrplib | sed 's,\\\\,/,g'`
9998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_useshrplib" >&5
9999 $as_echo "$perl_useshrplib" >&6; }
10000 if test "$perl_useshrplib" != yes && test "$perl_useshrplib" != true; then
10001 as_fn_error $? "cannot build PL/Perl because libperl is not a shared library
10002 You might have to rebuild your Perl installation. Refer to the
10003 documentation for details. Use --without-perl to disable building
10004 PL/Perl." "$LINENO" 5
10006 # On most platforms, archlibexp is also where the Perl include files live ...
10007 perl_includespec="-I$perl_archlibexp/CORE"
10008 # ... but on newer macOS versions, we must use -iwithsysroot to look
10009 # under $PG_SYSROOT
10010 if test \! -f "$perl_archlibexp/CORE/perl.h" ; then
10011 if test -f "$PG_SYSROOT$perl_archlibexp/CORE/perl.h" ; then
10012 perl_includespec="-iwithsysroot $perl_archlibexp/CORE"
10016 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS recommended by Perl" >&5
10017 $as_echo_n "checking for CFLAGS recommended by Perl... " >&6; }
10018 perl_ccflags=`$PERL -MConfig -e 'print $Config{ccflags}'`
10019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_ccflags" >&5
10020 $as_echo "$perl_ccflags" >&6; }
10021 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS to compile embedded Perl" >&5
10022 $as_echo_n "checking for CFLAGS to compile embedded Perl... " >&6; }
10023 perl_embed_ccflags=`$PERL -MConfig -e 'foreach $f (split(" ",$Config{ccflags})) {print $f, " " if ($f =~ /^-D[^_]/ || $f =~ /^-D_USE_32BIT_TIME_T/)}'`
10024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ccflags" >&5
10025 $as_echo "$perl_embed_ccflags" >&6; }
10028 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flags to link embedded Perl" >&5
10029 $as_echo_n "checking for flags to link embedded Perl... " >&6; }
10030 if test "$PORTNAME" = "win32" ; then
10031 perl_lib=`basename $perl_archlibexp/CORE/perl[5-9]*.lib .lib`
10032 if test -e "$perl_archlibexp/CORE/$perl_lib.lib"; then
10033 perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
10034 else
10035 perl_lib=`basename $perl_archlibexp/CORE/libperl[5-9]*.a .a | sed 's/^lib//'`
10036 if test -e "$perl_archlibexp/CORE/lib$perl_lib.a"; then
10037 perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
10040 else
10041 pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
10042 pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
10043 perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%" -e "s/ -arch [-a-zA-Z0-9_]*//g"`
10045 if test -z "$perl_embed_ldflags" ; then
10046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10047 $as_echo "no" >&6; }
10048 as_fn_error $? "could not determine flags for linking embedded Perl.
10049 This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not
10050 installed." "$LINENO" 5
10051 else
10052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ldflags" >&5
10053 $as_echo "$perl_embed_ldflags" >&6; }
10058 if test "$with_python" = yes; then
10059 if test -z "$PYTHON"; then
10060 for ac_prog in python python3 python2
10062 # Extract the first word of "$ac_prog", so it can be a program name with args.
10063 set dummy $ac_prog; ac_word=$2
10064 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10065 $as_echo_n "checking for $ac_word... " >&6; }
10066 if ${ac_cv_path_PYTHON+:} false; then :
10067 $as_echo_n "(cached) " >&6
10068 else
10069 case $PYTHON in
10070 [\\/]* | ?:[\\/]*)
10071 ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
10074 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10075 for as_dir in $PATH
10077 IFS=$as_save_IFS
10078 test -z "$as_dir" && as_dir=.
10079 for ac_exec_ext in '' $ac_executable_extensions; do
10080 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10081 ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
10082 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10083 break 2
10085 done
10086 done
10087 IFS=$as_save_IFS
10090 esac
10092 PYTHON=$ac_cv_path_PYTHON
10093 if test -n "$PYTHON"; then
10094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
10095 $as_echo "$PYTHON" >&6; }
10096 else
10097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10098 $as_echo "no" >&6; }
10102 test -n "$PYTHON" && break
10103 done
10105 else
10106 # Report the value of PYTHON in configure's output in all cases.
10107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PYTHON" >&5
10108 $as_echo_n "checking for PYTHON... " >&6; }
10109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
10110 $as_echo "$PYTHON" >&6; }
10113 if test x"$PYTHON" = x""; then
10114 as_fn_error $? "Python not found" "$LINENO" 5
10118 python_fullversion=`${PYTHON} -c "import sys; print(sys.version)" | sed q`
10119 { $as_echo "$as_me:${as_lineno-$LINENO}: using python $python_fullversion" >&5
10120 $as_echo "$as_me: using python $python_fullversion" >&6;}
10121 # python_fullversion is typically n.n.n plus some trailing junk
10122 python_majorversion=`echo "$python_fullversion" | sed 's/^\([0-9]*\).*/\1/'`
10123 python_minorversion=`echo "$python_fullversion" | sed 's/^[0-9]*\.\([0-9]*\).*/\1/'`
10124 python_version=`echo "$python_fullversion" | sed 's/^\([0-9]*\.[0-9]*\).*/\1/'`
10125 # Reject unsupported Python versions as soon as practical.
10126 if test "$python_majorversion" -lt 3 -a "$python_minorversion" -lt 6; then
10127 as_fn_error $? "Python version $python_version is too old (version 2.6 or later is required)" "$LINENO" 5
10130 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python distutils module" >&5
10131 $as_echo_n "checking for Python distutils module... " >&6; }
10132 if "${PYTHON}" -c 'import distutils' 2>&5
10133 then
10134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10135 $as_echo "yes" >&6; }
10136 else
10137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10138 $as_echo "no" >&6; }
10139 as_fn_error $? "distutils module not found" "$LINENO" 5
10142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python configuration directory" >&5
10143 $as_echo_n "checking Python configuration directory... " >&6; }
10144 python_configdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBPL'))))"`
10145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_configdir" >&5
10146 $as_echo "$python_configdir" >&6; }
10148 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python include directories" >&5
10149 $as_echo_n "checking Python include directories... " >&6; }
10150 python_includespec=`${PYTHON} -c "
10151 import distutils.sysconfig
10152 a = '-I' + distutils.sysconfig.get_python_inc(False)
10153 b = '-I' + distutils.sysconfig.get_python_inc(True)
10154 if a == b:
10155 print(a)
10156 else:
10157 print(a + ' ' + b)"`
10158 if test "$PORTNAME" = win32 ; then
10159 python_includespec=`echo $python_includespec | sed 's,[\],/,g'`
10161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_includespec" >&5
10162 $as_echo "$python_includespec" >&6; }
10166 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link an embedded Python application" >&5
10167 $as_echo_n "checking how to link an embedded Python application... " >&6; }
10169 python_libdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBDIR'))))"`
10170 python_ldlibrary=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDLIBRARY'))))"`
10172 # If LDLIBRARY exists and has a shlib extension, use it verbatim.
10173 ldlibrary=`echo "${python_ldlibrary}" | sed -e 's/\.so$//' -e 's/\.dll$//' -e 's/\.dylib$//' -e 's/\.sl$//'`
10174 if test -e "${python_libdir}/${python_ldlibrary}" -a x"${python_ldlibrary}" != x"${ldlibrary}"
10175 then
10176 ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
10177 found_shlib=1
10178 else
10179 # Otherwise, guess the base name of the shlib.
10180 # LDVERSION was added in Python 3.2, before that use VERSION,
10181 # or failing that, $python_version from _PGAC_CHECK_PYTHON_DIRS.
10182 python_ldversion=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDVERSION'))))"`
10183 if test x"${python_ldversion}" != x""; then
10184 ldlibrary="python${python_ldversion}"
10185 else
10186 python_version_var=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('VERSION'))))"`
10187 if test x"${python_version_var}" != x""; then
10188 ldlibrary="python${python_version_var}"
10189 else
10190 ldlibrary="python${python_version}"
10193 # Search for a likely-looking file.
10194 found_shlib=0
10195 for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
10197 # We don't know the platform DLSUFFIX here, so check 'em all.
10198 for e in .so .dll .dylib .sl; do
10199 if test -e "$d/lib${ldlibrary}$e"; then
10200 python_libdir="$d"
10201 found_shlib=1
10202 break 2
10204 done
10205 done
10206 # Some platforms (OpenBSD) require us to accept a bare versioned shlib
10207 # (".so.n.n") as well. However, check this only after failing to find
10208 # ".so" anywhere, because yet other platforms (Debian) put the .so
10209 # symlink in a different directory from the underlying versioned shlib.
10210 if test "$found_shlib" != 1; then
10211 for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
10213 for f in "$d/lib${ldlibrary}.so."* ; do
10214 if test -e "$f"; then
10215 python_libdir="$d"
10216 found_shlib=1
10217 break 2
10219 done
10220 done
10222 # As usual, Windows has its own ideas. Possible default library
10223 # locations include c:/Windows/System32 and (for Cygwin) /usr/bin,
10224 # and the "lib" prefix might not be there.
10225 if test "$found_shlib" != 1 -a \( "$PORTNAME" = win32 -o "$PORTNAME" = cygwin \); then
10226 for d in "${python_libdir}" "${python_configdir}" c:/Windows/System32 /usr/bin
10228 for f in "$d/lib${ldlibrary}.dll" "$d/${ldlibrary}.dll" ; do
10229 if test -e "$f"; then
10230 python_libdir="$d"
10231 found_shlib=1
10232 break 2
10234 done
10235 done
10238 if test "$found_shlib" != 1; then
10239 as_fn_error $? "could not find shared library for Python
10240 You might have to rebuild your Python installation. Refer to the
10241 documentation for details. Use --without-python to disable building
10242 PL/Python." "$LINENO" 5
10244 python_libspec="-L${python_libdir} -l${ldlibrary}"
10246 python_additional_libs=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBS','LIBC','LIBM','BASEMODLIBS'))))"`
10248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_libspec} ${python_additional_libs}" >&5
10249 $as_echo "${python_libspec} ${python_additional_libs}" >&6; }
10255 if test "$cross_compiling" = yes && test -z "$with_system_tzdata"; then
10256 if test -z "$ZIC"; then
10257 for ac_prog in zic
10259 # Extract the first word of "$ac_prog", so it can be a program name with args.
10260 set dummy $ac_prog; ac_word=$2
10261 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10262 $as_echo_n "checking for $ac_word... " >&6; }
10263 if ${ac_cv_path_ZIC+:} false; then :
10264 $as_echo_n "(cached) " >&6
10265 else
10266 case $ZIC in
10267 [\\/]* | ?:[\\/]*)
10268 ac_cv_path_ZIC="$ZIC" # Let the user override the test with a path.
10271 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10272 for as_dir in $PATH
10274 IFS=$as_save_IFS
10275 test -z "$as_dir" && as_dir=.
10276 for ac_exec_ext in '' $ac_executable_extensions; do
10277 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10278 ac_cv_path_ZIC="$as_dir/$ac_word$ac_exec_ext"
10279 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10280 break 2
10282 done
10283 done
10284 IFS=$as_save_IFS
10287 esac
10289 ZIC=$ac_cv_path_ZIC
10290 if test -n "$ZIC"; then
10291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
10292 $as_echo "$ZIC" >&6; }
10293 else
10294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10295 $as_echo "no" >&6; }
10299 test -n "$ZIC" && break
10300 done
10302 else
10303 # Report the value of ZIC in configure's output in all cases.
10304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIC" >&5
10305 $as_echo_n "checking for ZIC... " >&6; }
10306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
10307 $as_echo "$ZIC" >&6; }
10310 if test -z "$ZIC"; then
10311 as_fn_error $? "
10312 When cross-compiling, either use the option --with-system-tzdata to use
10313 existing time-zone data, or set the environment variable ZIC to a zic
10314 program to use during the build." "$LINENO" 5
10319 # Pthreads
10321 # For each platform, we need to know about any special compile and link
10322 # libraries, and whether the normal C function names are thread-safe.
10323 # See the comment at the top of src/port/thread.c for more information.
10324 # WIN32 doesn't need the pthread tests; it always uses threads
10326 # These tests are run before the library-tests, because linking with the
10327 # other libraries can pull in the pthread functions as a side-effect. We
10328 # want to use the -pthread or similar flags directly, and not rely on
10329 # the side-effects of linking with some other library.
10331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
10332 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
10333 if ${ac_cv_path_SED+:} false; then :
10334 $as_echo_n "(cached) " >&6
10335 else
10336 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
10337 for ac_i in 1 2 3 4 5 6 7; do
10338 ac_script="$ac_script$as_nl$ac_script"
10339 done
10340 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
10341 { ac_script=; unset ac_script;}
10342 if test -z "$SED"; then
10343 ac_path_SED_found=false
10344 # Loop through the user's path and test for each of PROGNAME-LIST
10345 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10346 for as_dir in $PATH
10348 IFS=$as_save_IFS
10349 test -z "$as_dir" && as_dir=.
10350 for ac_prog in sed gsed; do
10351 for ac_exec_ext in '' $ac_executable_extensions; do
10352 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
10353 as_fn_executable_p "$ac_path_SED" || continue
10354 # Check for GNU ac_path_SED and select it if it is found.
10355 # Check for GNU $ac_path_SED
10356 case `"$ac_path_SED" --version 2>&1` in
10357 *GNU*)
10358 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
10360 ac_count=0
10361 $as_echo_n 0123456789 >"conftest.in"
10362 while :
10364 cat "conftest.in" "conftest.in" >"conftest.tmp"
10365 mv "conftest.tmp" "conftest.in"
10366 cp "conftest.in" "conftest.nl"
10367 $as_echo '' >> "conftest.nl"
10368 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
10369 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
10370 as_fn_arith $ac_count + 1 && ac_count=$as_val
10371 if test $ac_count -gt ${ac_path_SED_max-0}; then
10372 # Best one so far, save it but keep looking for a better one
10373 ac_cv_path_SED="$ac_path_SED"
10374 ac_path_SED_max=$ac_count
10376 # 10*(2^10) chars as input seems more than enough
10377 test $ac_count -gt 10 && break
10378 done
10379 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
10380 esac
10382 $ac_path_SED_found && break 3
10383 done
10384 done
10385 done
10386 IFS=$as_save_IFS
10387 if test -z "$ac_cv_path_SED"; then
10388 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
10390 else
10391 ac_cv_path_SED=$SED
10395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
10396 $as_echo "$ac_cv_path_SED" >&6; }
10397 SED="$ac_cv_path_SED"
10398 rm -f conftest.sed
10401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
10402 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
10403 if ${ac_cv_path_GREP+:} false; then :
10404 $as_echo_n "(cached) " >&6
10405 else
10406 if test -z "$GREP"; then
10407 ac_path_GREP_found=false
10408 # Loop through the user's path and test for each of PROGNAME-LIST
10409 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10410 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
10412 IFS=$as_save_IFS
10413 test -z "$as_dir" && as_dir=.
10414 for ac_prog in grep ggrep; do
10415 for ac_exec_ext in '' $ac_executable_extensions; do
10416 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
10417 as_fn_executable_p "$ac_path_GREP" || continue
10418 # Check for GNU ac_path_GREP and select it if it is found.
10419 # Check for GNU $ac_path_GREP
10420 case `"$ac_path_GREP" --version 2>&1` in
10421 *GNU*)
10422 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
10424 ac_count=0
10425 $as_echo_n 0123456789 >"conftest.in"
10426 while :
10428 cat "conftest.in" "conftest.in" >"conftest.tmp"
10429 mv "conftest.tmp" "conftest.in"
10430 cp "conftest.in" "conftest.nl"
10431 $as_echo 'GREP' >> "conftest.nl"
10432 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
10433 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
10434 as_fn_arith $ac_count + 1 && ac_count=$as_val
10435 if test $ac_count -gt ${ac_path_GREP_max-0}; then
10436 # Best one so far, save it but keep looking for a better one
10437 ac_cv_path_GREP="$ac_path_GREP"
10438 ac_path_GREP_max=$ac_count
10440 # 10*(2^10) chars as input seems more than enough
10441 test $ac_count -gt 10 && break
10442 done
10443 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
10444 esac
10446 $ac_path_GREP_found && break 3
10447 done
10448 done
10449 done
10450 IFS=$as_save_IFS
10451 if test -z "$ac_cv_path_GREP"; then
10452 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
10454 else
10455 ac_cv_path_GREP=$GREP
10459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
10460 $as_echo "$ac_cv_path_GREP" >&6; }
10461 GREP="$ac_cv_path_GREP"
10464 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
10465 $as_echo_n "checking for egrep... " >&6; }
10466 if ${ac_cv_path_EGREP+:} false; then :
10467 $as_echo_n "(cached) " >&6
10468 else
10469 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
10470 then ac_cv_path_EGREP="$GREP -E"
10471 else
10472 if test -z "$EGREP"; then
10473 ac_path_EGREP_found=false
10474 # Loop through the user's path and test for each of PROGNAME-LIST
10475 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10476 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
10478 IFS=$as_save_IFS
10479 test -z "$as_dir" && as_dir=.
10480 for ac_prog in egrep; do
10481 for ac_exec_ext in '' $ac_executable_extensions; do
10482 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
10483 as_fn_executable_p "$ac_path_EGREP" || continue
10484 # Check for GNU ac_path_EGREP and select it if it is found.
10485 # Check for GNU $ac_path_EGREP
10486 case `"$ac_path_EGREP" --version 2>&1` in
10487 *GNU*)
10488 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
10490 ac_count=0
10491 $as_echo_n 0123456789 >"conftest.in"
10492 while :
10494 cat "conftest.in" "conftest.in" >"conftest.tmp"
10495 mv "conftest.tmp" "conftest.in"
10496 cp "conftest.in" "conftest.nl"
10497 $as_echo 'EGREP' >> "conftest.nl"
10498 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
10499 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
10500 as_fn_arith $ac_count + 1 && ac_count=$as_val
10501 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
10502 # Best one so far, save it but keep looking for a better one
10503 ac_cv_path_EGREP="$ac_path_EGREP"
10504 ac_path_EGREP_max=$ac_count
10506 # 10*(2^10) chars as input seems more than enough
10507 test $ac_count -gt 10 && break
10508 done
10509 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
10510 esac
10512 $ac_path_EGREP_found && break 3
10513 done
10514 done
10515 done
10516 IFS=$as_save_IFS
10517 if test -z "$ac_cv_path_EGREP"; then
10518 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
10520 else
10521 ac_cv_path_EGREP=$EGREP
10526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
10527 $as_echo "$ac_cv_path_EGREP" >&6; }
10528 EGREP="$ac_cv_path_EGREP"
10531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
10532 $as_echo_n "checking for ANSI C header files... " >&6; }
10533 if ${ac_cv_header_stdc+:} false; then :
10534 $as_echo_n "(cached) " >&6
10535 else
10536 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10537 /* end confdefs.h. */
10538 #include <stdlib.h>
10539 #include <stdarg.h>
10540 #include <string.h>
10541 #include <float.h>
10544 main ()
10548 return 0;
10550 _ACEOF
10551 if ac_fn_c_try_compile "$LINENO"; then :
10552 ac_cv_header_stdc=yes
10553 else
10554 ac_cv_header_stdc=no
10556 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10558 if test $ac_cv_header_stdc = yes; then
10559 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10560 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10561 /* end confdefs.h. */
10562 #include <string.h>
10564 _ACEOF
10565 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10566 $EGREP "memchr" >/dev/null 2>&1; then :
10568 else
10569 ac_cv_header_stdc=no
10571 rm -f conftest*
10575 if test $ac_cv_header_stdc = yes; then
10576 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10577 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10578 /* end confdefs.h. */
10579 #include <stdlib.h>
10581 _ACEOF
10582 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10583 $EGREP "free" >/dev/null 2>&1; then :
10585 else
10586 ac_cv_header_stdc=no
10588 rm -f conftest*
10592 if test $ac_cv_header_stdc = yes; then
10593 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10594 if test "$cross_compiling" = yes; then :
10596 else
10597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10598 /* end confdefs.h. */
10599 #include <ctype.h>
10600 #include <stdlib.h>
10601 #if ((' ' & 0x0FF) == 0x020)
10602 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10603 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10604 #else
10605 # define ISLOWER(c) \
10606 (('a' <= (c) && (c) <= 'i') \
10607 || ('j' <= (c) && (c) <= 'r') \
10608 || ('s' <= (c) && (c) <= 'z'))
10609 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10610 #endif
10612 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10614 main ()
10616 int i;
10617 for (i = 0; i < 256; i++)
10618 if (XOR (islower (i), ISLOWER (i))
10619 || toupper (i) != TOUPPER (i))
10620 return 2;
10621 return 0;
10623 _ACEOF
10624 if ac_fn_c_try_run "$LINENO"; then :
10626 else
10627 ac_cv_header_stdc=no
10629 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10630 conftest.$ac_objext conftest.beam conftest.$ac_ext
10635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
10636 $as_echo "$ac_cv_header_stdc" >&6; }
10637 if test $ac_cv_header_stdc = yes; then
10639 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
10643 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
10644 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
10645 inttypes.h stdint.h unistd.h
10646 do :
10647 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10648 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
10650 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
10651 cat >>confdefs.h <<_ACEOF
10652 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10653 _ACEOF
10657 done
10660 if test "$enable_thread_safety" = yes -a "$PORTNAME" != "win32"; then :
10661 # then
10666 ac_ext=c
10667 ac_cpp='$CPP $CPPFLAGS'
10668 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10669 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10670 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10672 ax_pthread_ok=no
10674 # We used to check for pthread.h first, but this fails if pthread.h
10675 # requires special compiler flags (e.g. on Tru64 or Sequent).
10676 # It gets checked for in the link test anyway.
10678 # First of all, check if the user has set any of the PTHREAD_LIBS,
10679 # etcetera environment variables, and if threads linking works using
10680 # them:
10681 if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
10682 ax_pthread_save_CC="$CC"
10683 ax_pthread_save_CFLAGS="$CFLAGS"
10684 ax_pthread_save_LIBS="$LIBS"
10685 if test "x$PTHREAD_CC" != "x"; then :
10686 CC="$PTHREAD_CC"
10688 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
10689 LIBS="$PTHREAD_LIBS $LIBS"
10690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
10691 $as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
10692 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10693 /* end confdefs.h. */
10695 /* Override any GCC internal prototype to avoid an error.
10696 Use char because int might match the return type of a GCC
10697 builtin and then its argument prototype would still apply. */
10698 #ifdef __cplusplus
10699 extern "C"
10700 #endif
10701 char pthread_join ();
10703 main ()
10705 return pthread_join ();
10707 return 0;
10709 _ACEOF
10710 if ac_fn_c_try_link "$LINENO"; then :
10711 ax_pthread_ok=yes
10713 rm -f core conftest.err conftest.$ac_objext \
10714 conftest$ac_exeext conftest.$ac_ext
10715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
10716 $as_echo "$ax_pthread_ok" >&6; }
10717 if test "x$ax_pthread_ok" = "xno"; then
10718 PTHREAD_LIBS=""
10719 PTHREAD_CFLAGS=""
10721 CC="$ax_pthread_save_CC"
10722 CFLAGS="$ax_pthread_save_CFLAGS"
10723 LIBS="$ax_pthread_save_LIBS"
10726 # We must check for the threads library under a number of different
10727 # names; the ordering is very important because some systems
10728 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
10729 # libraries is broken (non-POSIX).
10731 # Create a list of thread flags to try. Items starting with a "-" are
10732 # C compiler flags, and other items are library names, except for "none"
10733 # which indicates that we try without any flags at all, and "pthread-config"
10734 # which is a program returning the flags for the Pth emulation library.
10736 ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
10738 # The ordering *is* (sometimes) important. Some notes on the
10739 # individual items follow:
10741 # pthreads: AIX (must check this before -lpthread)
10742 # none: in case threads are in libc; should be tried before -Kthread and
10743 # other compiler flags to prevent continual compiler warnings
10744 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
10745 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
10746 # (Note: HP C rejects this with "bad form for `-t' option")
10747 # -pthreads: Solaris/gcc (Note: HP C also rejects)
10748 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
10749 # doesn't hurt to check since this sometimes defines pthreads and
10750 # -D_REENTRANT too), HP C (must be checked before -lpthread, which
10751 # is present but should not be used directly; and before -mthreads,
10752 # because the compiler interprets this as "-mt" + "-hreads")
10753 # -mthreads: Mingw32/gcc, Lynx/gcc
10754 # pthread: Linux, etcetera
10755 # --thread-safe: KAI C++
10756 # pthread-config: use pthread-config program (for GNU Pth library)
10758 case $host_os in
10760 freebsd*)
10762 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
10763 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
10765 ax_pthread_flags="-kthread lthread $ax_pthread_flags"
10768 hpux*)
10770 # From the cc(1) man page: "[-mt] Sets various -D flags to enable
10771 # multi-threading and also sets -lpthread."
10773 ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
10776 openedition*)
10778 # IBM z/OS requires a feature-test macro to be defined in order to
10779 # enable POSIX threads at all, so give the user a hint if this is
10780 # not set. (We don't define these ourselves, as they can affect
10781 # other portions of the system API in unpredictable ways.)
10783 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10784 /* end confdefs.h. */
10786 # if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
10787 AX_PTHREAD_ZOS_MISSING
10788 # endif
10790 _ACEOF
10791 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10792 $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
10793 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
10794 $as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
10796 rm -f conftest*
10800 solaris*)
10802 # On Solaris (at least, for some versions), libc contains stubbed
10803 # (non-functional) versions of the pthreads routines, so link-based
10804 # tests will erroneously succeed. (N.B.: The stubs are missing
10805 # pthread_cleanup_push, or rather a function called by this macro,
10806 # so we could check for that, but who knows whether they'll stub
10807 # that too in a future libc.) So we'll check first for the
10808 # standard Solaris way of linking pthreads (-mt -lpthread).
10810 ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
10812 esac
10814 # GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
10816 if test "x$GCC" = "xyes"; then :
10817 ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"
10820 # The presence of a feature test macro requesting re-entrant function
10821 # definitions is, on some systems, a strong hint that pthreads support is
10822 # correctly enabled
10824 case $host_os in
10825 darwin* | hpux* | linux* | osf* | solaris*)
10826 ax_pthread_check_macro="_REENTRANT"
10829 aix*)
10830 ax_pthread_check_macro="_THREAD_SAFE"
10834 ax_pthread_check_macro="--"
10836 esac
10837 if test "x$ax_pthread_check_macro" = "x--"; then :
10838 ax_pthread_check_cond=0
10839 else
10840 ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
10843 # Are we compiling with Clang?
10845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
10846 $as_echo_n "checking whether $CC is Clang... " >&6; }
10847 if ${ax_cv_PTHREAD_CLANG+:} false; then :
10848 $as_echo_n "(cached) " >&6
10849 else
10850 ax_cv_PTHREAD_CLANG=no
10851 # Note that Autoconf sets GCC=yes for Clang as well as GCC
10852 if test "x$GCC" = "xyes"; then
10853 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10854 /* end confdefs.h. */
10855 /* Note: Clang 2.7 lacks __clang_[a-z]+__ */
10856 # if defined(__clang__) && defined(__llvm__)
10857 AX_PTHREAD_CC_IS_CLANG
10858 # endif
10860 _ACEOF
10861 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10862 $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then :
10863 ax_cv_PTHREAD_CLANG=yes
10865 rm -f conftest*
10870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
10871 $as_echo "$ax_cv_PTHREAD_CLANG" >&6; }
10872 ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
10874 ax_pthread_clang_warning=no
10876 # Clang needs special handling, because older versions handle the -pthread
10877 # option in a rather... idiosyncratic way
10879 if test "x$ax_pthread_clang" = "xyes"; then
10881 # Clang takes -pthread; it has never supported any other flag
10883 # (Note 1: This will need to be revisited if a system that Clang
10884 # supports has POSIX threads in a separate library. This tends not
10885 # to be the way of modern systems, but it's conceivable.)
10887 # (Note 2: On some systems, notably Darwin, -pthread is not needed
10888 # to get POSIX threads support; the API is always present and
10889 # active. We could reasonably leave PTHREAD_CFLAGS empty. But
10890 # -pthread does define _REENTRANT, and while the Darwin headers
10891 # ignore this macro, third-party headers might not.)
10893 PTHREAD_CFLAGS="-pthread"
10894 PTHREAD_LIBS=
10896 ax_pthread_ok=yes
10898 # However, older versions of Clang make a point of warning the user
10899 # that, in an invocation where only linking and no compilation is
10900 # taking place, the -pthread option has no effect ("argument unused
10901 # during compilation"). They expect -pthread to be passed in only
10902 # when source code is being compiled.
10904 # Problem is, this is at odds with the way Automake and most other
10905 # C build frameworks function, which is that the same flags used in
10906 # compilation (CFLAGS) are also used in linking. Many systems
10907 # supported by AX_PTHREAD require exactly this for POSIX threads
10908 # support, and in fact it is often not straightforward to specify a
10909 # flag that is used only in the compilation phase and not in
10910 # linking. Such a scenario is extremely rare in practice.
10912 # Even though use of the -pthread flag in linking would only print
10913 # a warning, this can be a nuisance for well-run software projects
10914 # that build with -Werror. So if the active version of Clang has
10915 # this misfeature, we search for an option to squash it.
10917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
10918 $as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
10919 if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then :
10920 $as_echo_n "(cached) " >&6
10921 else
10922 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
10923 # Create an alternate version of $ac_link that compiles and
10924 # links in two steps (.c -> .o, .o -> exe) instead of one
10925 # (.c -> exe), because the warning occurs only in the second
10926 # step
10927 ax_pthread_save_ac_link="$ac_link"
10928 ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
10929 ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
10930 ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
10931 ax_pthread_save_CFLAGS="$CFLAGS"
10932 for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
10933 if test "x$ax_pthread_try" = "xunknown"; then :
10934 break
10936 CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
10937 ac_link="$ax_pthread_save_ac_link"
10938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10939 /* end confdefs.h. */
10940 int main(void){return 0;}
10941 _ACEOF
10942 if ac_fn_c_try_link "$LINENO"; then :
10943 ac_link="$ax_pthread_2step_ac_link"
10944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10945 /* end confdefs.h. */
10946 int main(void){return 0;}
10947 _ACEOF
10948 if ac_fn_c_try_link "$LINENO"; then :
10949 break
10951 rm -f core conftest.err conftest.$ac_objext \
10952 conftest$ac_exeext conftest.$ac_ext
10955 rm -f core conftest.err conftest.$ac_objext \
10956 conftest$ac_exeext conftest.$ac_ext
10957 done
10958 ac_link="$ax_pthread_save_ac_link"
10959 CFLAGS="$ax_pthread_save_CFLAGS"
10960 if test "x$ax_pthread_try" = "x"; then :
10961 ax_pthread_try=no
10963 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
10966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
10967 $as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
10969 case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
10970 no | unknown) ;;
10971 *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
10972 esac
10974 fi # $ax_pthread_clang = yes
10976 if test "x$ax_pthread_ok" = "xno"; then
10977 for ax_pthread_try_flag in $ax_pthread_flags; do
10979 case $ax_pthread_try_flag in
10980 none)
10981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
10982 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
10985 -mt,pthread)
10986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
10987 $as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
10988 PTHREAD_CFLAGS="-mt"
10989 PTHREAD_LIBS="-lpthread"
10993 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
10994 $as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
10995 PTHREAD_CFLAGS="$ax_pthread_try_flag"
10998 pthread-config)
10999 # Extract the first word of "pthread-config", so it can be a program name with args.
11000 set dummy pthread-config; ac_word=$2
11001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11002 $as_echo_n "checking for $ac_word... " >&6; }
11003 if ${ac_cv_prog_ax_pthread_config+:} false; then :
11004 $as_echo_n "(cached) " >&6
11005 else
11006 if test -n "$ax_pthread_config"; then
11007 ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
11008 else
11009 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11010 for as_dir in $PATH
11012 IFS=$as_save_IFS
11013 test -z "$as_dir" && as_dir=.
11014 for ac_exec_ext in '' $ac_executable_extensions; do
11015 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11016 ac_cv_prog_ax_pthread_config="yes"
11017 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11018 break 2
11020 done
11021 done
11022 IFS=$as_save_IFS
11024 test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
11027 ax_pthread_config=$ac_cv_prog_ax_pthread_config
11028 if test -n "$ax_pthread_config"; then
11029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
11030 $as_echo "$ax_pthread_config" >&6; }
11031 else
11032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11033 $as_echo "no" >&6; }
11037 if test "x$ax_pthread_config" = "xno"; then :
11038 continue
11040 PTHREAD_CFLAGS="`pthread-config --cflags`"
11041 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
11045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
11046 $as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
11047 PTHREAD_LIBS="-l$ax_pthread_try_flag"
11049 esac
11051 ax_pthread_save_CFLAGS="$CFLAGS"
11052 ax_pthread_save_LIBS="$LIBS"
11053 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
11054 LIBS="$PTHREAD_LIBS $LIBS"
11056 # Check for various functions. We must include pthread.h,
11057 # since some functions may be macros. (On the Sequent, we
11058 # need a special flag -Kthread to make this header compile.)
11059 # We check for pthread_join because it is in -lpthread on IRIX
11060 # while pthread_create is in libc. We check for pthread_attr_init
11061 # due to DEC craziness with -lpthreads. We check for
11062 # pthread_cleanup_push because it is one of the few pthread
11063 # functions on Solaris that doesn't have a non-functional libc stub.
11064 # We try pthread_create on general principles.
11066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11067 /* end confdefs.h. */
11068 #include <pthread.h>
11069 # if $ax_pthread_check_cond
11070 # error "$ax_pthread_check_macro must be defined"
11071 # endif
11072 static void routine(void *a) { a = 0; }
11073 static void *start_routine(void *a) { return a; }
11075 main ()
11077 pthread_t th; pthread_attr_t attr;
11078 pthread_create(&th, 0, start_routine, 0);
11079 pthread_join(th, 0);
11080 pthread_attr_init(&attr);
11081 pthread_cleanup_push(routine, 0);
11082 pthread_cleanup_pop(0) /* ; */
11084 return 0;
11086 _ACEOF
11087 if ac_fn_c_try_link "$LINENO"; then :
11088 ax_pthread_ok=yes
11090 rm -f core conftest.err conftest.$ac_objext \
11091 conftest$ac_exeext conftest.$ac_ext
11093 CFLAGS="$ax_pthread_save_CFLAGS"
11094 LIBS="$ax_pthread_save_LIBS"
11096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
11097 $as_echo "$ax_pthread_ok" >&6; }
11098 if test "x$ax_pthread_ok" = "xyes"; then :
11099 break
11102 PTHREAD_LIBS=""
11103 PTHREAD_CFLAGS=""
11104 done
11107 # Various other checks:
11108 if test "x$ax_pthread_ok" = "xyes"; then
11109 ax_pthread_save_CFLAGS="$CFLAGS"
11110 ax_pthread_save_LIBS="$LIBS"
11111 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
11112 LIBS="$PTHREAD_LIBS $LIBS"
11114 # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
11115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
11116 $as_echo_n "checking for joinable pthread attribute... " >&6; }
11117 if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
11118 $as_echo_n "(cached) " >&6
11119 else
11120 ax_cv_PTHREAD_JOINABLE_ATTR=unknown
11121 for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
11122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11123 /* end confdefs.h. */
11124 #include <pthread.h>
11126 main ()
11128 int attr = $ax_pthread_attr; return attr /* ; */
11130 return 0;
11132 _ACEOF
11133 if ac_fn_c_try_link "$LINENO"; then :
11134 ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
11136 rm -f core conftest.err conftest.$ac_objext \
11137 conftest$ac_exeext conftest.$ac_ext
11138 done
11141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
11142 $as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
11143 if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
11144 test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
11145 test "x$ax_pthread_joinable_attr_defined" != "xyes"; then :
11147 cat >>confdefs.h <<_ACEOF
11148 #define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
11149 _ACEOF
11151 ax_pthread_joinable_attr_defined=yes
11155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
11156 $as_echo_n "checking whether more special flags are required for pthreads... " >&6; }
11157 if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
11158 $as_echo_n "(cached) " >&6
11159 else
11160 ax_cv_PTHREAD_SPECIAL_FLAGS=no
11161 case $host_os in
11162 solaris*)
11163 ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
11165 esac
11168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
11169 $as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
11170 if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
11171 test "x$ax_pthread_special_flags_added" != "xyes"; then :
11172 PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
11173 ax_pthread_special_flags_added=yes
11176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
11177 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
11178 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
11179 $as_echo_n "(cached) " >&6
11180 else
11181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11182 /* end confdefs.h. */
11183 #include <pthread.h>
11185 main ()
11187 int i = PTHREAD_PRIO_INHERIT;
11189 return 0;
11191 _ACEOF
11192 if ac_fn_c_try_link "$LINENO"; then :
11193 ax_cv_PTHREAD_PRIO_INHERIT=yes
11194 else
11195 ax_cv_PTHREAD_PRIO_INHERIT=no
11197 rm -f core conftest.err conftest.$ac_objext \
11198 conftest$ac_exeext conftest.$ac_ext
11201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
11202 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
11203 if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
11204 test "x$ax_pthread_prio_inherit_defined" != "xyes"; then :
11206 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
11208 ax_pthread_prio_inherit_defined=yes
11212 CFLAGS="$ax_pthread_save_CFLAGS"
11213 LIBS="$ax_pthread_save_LIBS"
11215 # More AIX lossage: compile with *_r variant
11216 if test "x$GCC" != "xyes"; then
11217 case $host_os in
11218 aix*)
11219 case "x/$CC" in #(
11220 x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
11221 #handle absolute path differently from PATH based program lookup
11222 case "x$CC" in #(
11223 x/*) :
11224 if as_fn_executable_p ${CC}_r; then :
11225 PTHREAD_CC="${CC}_r"
11226 fi ;; #(
11227 *) :
11228 for ac_prog in ${CC}_r
11230 # Extract the first word of "$ac_prog", so it can be a program name with args.
11231 set dummy $ac_prog; ac_word=$2
11232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11233 $as_echo_n "checking for $ac_word... " >&6; }
11234 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
11235 $as_echo_n "(cached) " >&6
11236 else
11237 if test -n "$PTHREAD_CC"; then
11238 ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
11239 else
11240 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11241 for as_dir in $PATH
11243 IFS=$as_save_IFS
11244 test -z "$as_dir" && as_dir=.
11245 for ac_exec_ext in '' $ac_executable_extensions; do
11246 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11247 ac_cv_prog_PTHREAD_CC="$ac_prog"
11248 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11249 break 2
11251 done
11252 done
11253 IFS=$as_save_IFS
11257 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
11258 if test -n "$PTHREAD_CC"; then
11259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
11260 $as_echo "$PTHREAD_CC" >&6; }
11261 else
11262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11263 $as_echo "no" >&6; }
11267 test -n "$PTHREAD_CC" && break
11268 done
11269 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
11271 esac ;; #(
11272 *) :
11274 esac
11276 esac
11280 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
11286 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
11287 if test "x$ax_pthread_ok" = "xyes"; then
11289 $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
11292 else
11293 ax_pthread_ok=no
11296 ac_ext=c
11297 ac_cpp='$CPP $CPPFLAGS'
11298 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11299 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11300 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11302 # set thread flags
11304 # Some platforms use these, so just define them. They can't hurt if they
11305 # are not supported.
11306 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE"
11308 # Check for *_r functions
11309 _CFLAGS="$CFLAGS"
11310 _LIBS="$LIBS"
11311 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
11312 LIBS="$LIBS $PTHREAD_LIBS"
11314 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
11315 if test "x$ac_cv_header_pthread_h" = xyes; then :
11317 else
11318 as_fn_error $? "
11319 pthread.h not found; use --disable-thread-safety to disable thread safety" "$LINENO" 5
11324 for ac_func in strerror_r getpwuid_r gethostbyname_r
11325 do :
11326 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11327 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11328 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11329 cat >>confdefs.h <<_ACEOF
11330 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11331 _ACEOF
11334 done
11337 # Do test here with the proper thread flags
11338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns int" >&5
11339 $as_echo_n "checking whether strerror_r returns int... " >&6; }
11340 if ${pgac_cv_func_strerror_r_int+:} false; then :
11341 $as_echo_n "(cached) " >&6
11342 else
11343 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11344 /* end confdefs.h. */
11345 #include <string.h>
11347 main ()
11349 char buf[100];
11350 switch (strerror_r(1, buf, sizeof(buf)))
11351 { case 0: break; default: break; }
11354 return 0;
11356 _ACEOF
11357 if ac_fn_c_try_compile "$LINENO"; then :
11358 pgac_cv_func_strerror_r_int=yes
11359 else
11360 pgac_cv_func_strerror_r_int=no
11362 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_strerror_r_int" >&5
11365 $as_echo "$pgac_cv_func_strerror_r_int" >&6; }
11366 if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
11368 $as_echo "#define STRERROR_R_INT 1" >>confdefs.h
11373 CFLAGS="$_CFLAGS"
11374 LIBS="$_LIBS"
11377 else
11378 # else
11379 # do not use values from template file
11380 PTHREAD_CFLAGS=
11381 PTHREAD_LIBS=
11383 fi # fi
11390 ## Libraries
11392 ## Most libraries are included only if they demonstrably provide a function
11393 ## we need, but libm is an exception: always include it, because there are
11394 ## too many compilers that play cute optimization games that will break
11395 ## probes for standard functions such as pow().
11398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
11399 $as_echo_n "checking for main in -lm... " >&6; }
11400 if ${ac_cv_lib_m_main+:} false; then :
11401 $as_echo_n "(cached) " >&6
11402 else
11403 ac_check_lib_save_LIBS=$LIBS
11404 LIBS="-lm $LIBS"
11405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11406 /* end confdefs.h. */
11410 main ()
11412 return main ();
11414 return 0;
11416 _ACEOF
11417 if ac_fn_c_try_link "$LINENO"; then :
11418 ac_cv_lib_m_main=yes
11419 else
11420 ac_cv_lib_m_main=no
11422 rm -f core conftest.err conftest.$ac_objext \
11423 conftest$ac_exeext conftest.$ac_ext
11424 LIBS=$ac_check_lib_save_LIBS
11426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
11427 $as_echo "$ac_cv_lib_m_main" >&6; }
11428 if test "x$ac_cv_lib_m_main" = xyes; then :
11429 cat >>confdefs.h <<_ACEOF
11430 #define HAVE_LIBM 1
11431 _ACEOF
11433 LIBS="-lm $LIBS"
11437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setproctitle" >&5
11438 $as_echo_n "checking for library containing setproctitle... " >&6; }
11439 if ${ac_cv_search_setproctitle+:} false; then :
11440 $as_echo_n "(cached) " >&6
11441 else
11442 ac_func_search_save_LIBS=$LIBS
11443 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11444 /* end confdefs.h. */
11446 /* Override any GCC internal prototype to avoid an error.
11447 Use char because int might match the return type of a GCC
11448 builtin and then its argument prototype would still apply. */
11449 #ifdef __cplusplus
11450 extern "C"
11451 #endif
11452 char setproctitle ();
11454 main ()
11456 return setproctitle ();
11458 return 0;
11460 _ACEOF
11461 for ac_lib in '' util; do
11462 if test -z "$ac_lib"; then
11463 ac_res="none required"
11464 else
11465 ac_res=-l$ac_lib
11466 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11468 if ac_fn_c_try_link "$LINENO"; then :
11469 ac_cv_search_setproctitle=$ac_res
11471 rm -f core conftest.err conftest.$ac_objext \
11472 conftest$ac_exeext
11473 if ${ac_cv_search_setproctitle+:} false; then :
11474 break
11476 done
11477 if ${ac_cv_search_setproctitle+:} false; then :
11479 else
11480 ac_cv_search_setproctitle=no
11482 rm conftest.$ac_ext
11483 LIBS=$ac_func_search_save_LIBS
11485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setproctitle" >&5
11486 $as_echo "$ac_cv_search_setproctitle" >&6; }
11487 ac_res=$ac_cv_search_setproctitle
11488 if test "$ac_res" != no; then :
11489 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
11494 $as_echo_n "checking for library containing dlopen... " >&6; }
11495 if ${ac_cv_search_dlopen+:} false; then :
11496 $as_echo_n "(cached) " >&6
11497 else
11498 ac_func_search_save_LIBS=$LIBS
11499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11500 /* end confdefs.h. */
11502 /* Override any GCC internal prototype to avoid an error.
11503 Use char because int might match the return type of a GCC
11504 builtin and then its argument prototype would still apply. */
11505 #ifdef __cplusplus
11506 extern "C"
11507 #endif
11508 char dlopen ();
11510 main ()
11512 return dlopen ();
11514 return 0;
11516 _ACEOF
11517 for ac_lib in '' dl; do
11518 if test -z "$ac_lib"; then
11519 ac_res="none required"
11520 else
11521 ac_res=-l$ac_lib
11522 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11524 if ac_fn_c_try_link "$LINENO"; then :
11525 ac_cv_search_dlopen=$ac_res
11527 rm -f core conftest.err conftest.$ac_objext \
11528 conftest$ac_exeext
11529 if ${ac_cv_search_dlopen+:} false; then :
11530 break
11532 done
11533 if ${ac_cv_search_dlopen+:} false; then :
11535 else
11536 ac_cv_search_dlopen=no
11538 rm conftest.$ac_ext
11539 LIBS=$ac_func_search_save_LIBS
11541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
11542 $as_echo "$ac_cv_search_dlopen" >&6; }
11543 ac_res=$ac_cv_search_dlopen
11544 if test "$ac_res" != no; then :
11545 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
11550 $as_echo_n "checking for library containing socket... " >&6; }
11551 if ${ac_cv_search_socket+:} false; then :
11552 $as_echo_n "(cached) " >&6
11553 else
11554 ac_func_search_save_LIBS=$LIBS
11555 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11556 /* end confdefs.h. */
11558 /* Override any GCC internal prototype to avoid an error.
11559 Use char because int might match the return type of a GCC
11560 builtin and then its argument prototype would still apply. */
11561 #ifdef __cplusplus
11562 extern "C"
11563 #endif
11564 char socket ();
11566 main ()
11568 return socket ();
11570 return 0;
11572 _ACEOF
11573 for ac_lib in '' socket ws2_32; do
11574 if test -z "$ac_lib"; then
11575 ac_res="none required"
11576 else
11577 ac_res=-l$ac_lib
11578 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11580 if ac_fn_c_try_link "$LINENO"; then :
11581 ac_cv_search_socket=$ac_res
11583 rm -f core conftest.err conftest.$ac_objext \
11584 conftest$ac_exeext
11585 if ${ac_cv_search_socket+:} false; then :
11586 break
11588 done
11589 if ${ac_cv_search_socket+:} false; then :
11591 else
11592 ac_cv_search_socket=no
11594 rm conftest.$ac_ext
11595 LIBS=$ac_func_search_save_LIBS
11597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
11598 $as_echo "$ac_cv_search_socket" >&6; }
11599 ac_res=$ac_cv_search_socket
11600 if test "$ac_res" != no; then :
11601 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shl_load" >&5
11606 $as_echo_n "checking for library containing shl_load... " >&6; }
11607 if ${ac_cv_search_shl_load+:} false; then :
11608 $as_echo_n "(cached) " >&6
11609 else
11610 ac_func_search_save_LIBS=$LIBS
11611 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11612 /* end confdefs.h. */
11614 /* Override any GCC internal prototype to avoid an error.
11615 Use char because int might match the return type of a GCC
11616 builtin and then its argument prototype would still apply. */
11617 #ifdef __cplusplus
11618 extern "C"
11619 #endif
11620 char shl_load ();
11622 main ()
11624 return shl_load ();
11626 return 0;
11628 _ACEOF
11629 for ac_lib in '' dld; do
11630 if test -z "$ac_lib"; then
11631 ac_res="none required"
11632 else
11633 ac_res=-l$ac_lib
11634 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11636 if ac_fn_c_try_link "$LINENO"; then :
11637 ac_cv_search_shl_load=$ac_res
11639 rm -f core conftest.err conftest.$ac_objext \
11640 conftest$ac_exeext
11641 if ${ac_cv_search_shl_load+:} false; then :
11642 break
11644 done
11645 if ${ac_cv_search_shl_load+:} false; then :
11647 else
11648 ac_cv_search_shl_load=no
11650 rm conftest.$ac_ext
11651 LIBS=$ac_func_search_save_LIBS
11653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shl_load" >&5
11654 $as_echo "$ac_cv_search_shl_load" >&6; }
11655 ac_res=$ac_cv_search_shl_load
11656 if test "$ac_res" != no; then :
11657 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getopt_long" >&5
11662 $as_echo_n "checking for library containing getopt_long... " >&6; }
11663 if ${ac_cv_search_getopt_long+:} false; then :
11664 $as_echo_n "(cached) " >&6
11665 else
11666 ac_func_search_save_LIBS=$LIBS
11667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11668 /* end confdefs.h. */
11670 /* Override any GCC internal prototype to avoid an error.
11671 Use char because int might match the return type of a GCC
11672 builtin and then its argument prototype would still apply. */
11673 #ifdef __cplusplus
11674 extern "C"
11675 #endif
11676 char getopt_long ();
11678 main ()
11680 return getopt_long ();
11682 return 0;
11684 _ACEOF
11685 for ac_lib in '' getopt gnugetopt; do
11686 if test -z "$ac_lib"; then
11687 ac_res="none required"
11688 else
11689 ac_res=-l$ac_lib
11690 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11692 if ac_fn_c_try_link "$LINENO"; then :
11693 ac_cv_search_getopt_long=$ac_res
11695 rm -f core conftest.err conftest.$ac_objext \
11696 conftest$ac_exeext
11697 if ${ac_cv_search_getopt_long+:} false; then :
11698 break
11700 done
11701 if ${ac_cv_search_getopt_long+:} false; then :
11703 else
11704 ac_cv_search_getopt_long=no
11706 rm conftest.$ac_ext
11707 LIBS=$ac_func_search_save_LIBS
11709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getopt_long" >&5
11710 $as_echo "$ac_cv_search_getopt_long" >&6; }
11711 ac_res=$ac_cv_search_getopt_long
11712 if test "$ac_res" != no; then :
11713 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
11718 $as_echo_n "checking for library containing shm_open... " >&6; }
11719 if ${ac_cv_search_shm_open+:} false; then :
11720 $as_echo_n "(cached) " >&6
11721 else
11722 ac_func_search_save_LIBS=$LIBS
11723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11724 /* end confdefs.h. */
11726 /* Override any GCC internal prototype to avoid an error.
11727 Use char because int might match the return type of a GCC
11728 builtin and then its argument prototype would still apply. */
11729 #ifdef __cplusplus
11730 extern "C"
11731 #endif
11732 char shm_open ();
11734 main ()
11736 return shm_open ();
11738 return 0;
11740 _ACEOF
11741 for ac_lib in '' rt; do
11742 if test -z "$ac_lib"; then
11743 ac_res="none required"
11744 else
11745 ac_res=-l$ac_lib
11746 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11748 if ac_fn_c_try_link "$LINENO"; then :
11749 ac_cv_search_shm_open=$ac_res
11751 rm -f core conftest.err conftest.$ac_objext \
11752 conftest$ac_exeext
11753 if ${ac_cv_search_shm_open+:} false; then :
11754 break
11756 done
11757 if ${ac_cv_search_shm_open+:} false; then :
11759 else
11760 ac_cv_search_shm_open=no
11762 rm conftest.$ac_ext
11763 LIBS=$ac_func_search_save_LIBS
11765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
11766 $as_echo "$ac_cv_search_shm_open" >&6; }
11767 ac_res=$ac_cv_search_shm_open
11768 if test "$ac_res" != no; then :
11769 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_unlink" >&5
11774 $as_echo_n "checking for library containing shm_unlink... " >&6; }
11775 if ${ac_cv_search_shm_unlink+:} false; then :
11776 $as_echo_n "(cached) " >&6
11777 else
11778 ac_func_search_save_LIBS=$LIBS
11779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11780 /* end confdefs.h. */
11782 /* Override any GCC internal prototype to avoid an error.
11783 Use char because int might match the return type of a GCC
11784 builtin and then its argument prototype would still apply. */
11785 #ifdef __cplusplus
11786 extern "C"
11787 #endif
11788 char shm_unlink ();
11790 main ()
11792 return shm_unlink ();
11794 return 0;
11796 _ACEOF
11797 for ac_lib in '' rt; do
11798 if test -z "$ac_lib"; then
11799 ac_res="none required"
11800 else
11801 ac_res=-l$ac_lib
11802 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11804 if ac_fn_c_try_link "$LINENO"; then :
11805 ac_cv_search_shm_unlink=$ac_res
11807 rm -f core conftest.err conftest.$ac_objext \
11808 conftest$ac_exeext
11809 if ${ac_cv_search_shm_unlink+:} false; then :
11810 break
11812 done
11813 if ${ac_cv_search_shm_unlink+:} false; then :
11815 else
11816 ac_cv_search_shm_unlink=no
11818 rm conftest.$ac_ext
11819 LIBS=$ac_func_search_save_LIBS
11821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_unlink" >&5
11822 $as_echo "$ac_cv_search_shm_unlink" >&6; }
11823 ac_res=$ac_cv_search_shm_unlink
11824 if test "$ac_res" != no; then :
11825 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11829 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
11830 $as_echo_n "checking for library containing clock_gettime... " >&6; }
11831 if ${ac_cv_search_clock_gettime+:} false; then :
11832 $as_echo_n "(cached) " >&6
11833 else
11834 ac_func_search_save_LIBS=$LIBS
11835 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11836 /* end confdefs.h. */
11838 /* Override any GCC internal prototype to avoid an error.
11839 Use char because int might match the return type of a GCC
11840 builtin and then its argument prototype would still apply. */
11841 #ifdef __cplusplus
11842 extern "C"
11843 #endif
11844 char clock_gettime ();
11846 main ()
11848 return clock_gettime ();
11850 return 0;
11852 _ACEOF
11853 for ac_lib in '' rt posix4; do
11854 if test -z "$ac_lib"; then
11855 ac_res="none required"
11856 else
11857 ac_res=-l$ac_lib
11858 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11860 if ac_fn_c_try_link "$LINENO"; then :
11861 ac_cv_search_clock_gettime=$ac_res
11863 rm -f core conftest.err conftest.$ac_objext \
11864 conftest$ac_exeext
11865 if ${ac_cv_search_clock_gettime+:} false; then :
11866 break
11868 done
11869 if ${ac_cv_search_clock_gettime+:} false; then :
11871 else
11872 ac_cv_search_clock_gettime=no
11874 rm conftest.$ac_ext
11875 LIBS=$ac_func_search_save_LIBS
11877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
11878 $as_echo "$ac_cv_search_clock_gettime" >&6; }
11879 ac_res=$ac_cv_search_clock_gettime
11880 if test "$ac_res" != no; then :
11881 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11885 # Solaris:
11886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5
11887 $as_echo_n "checking for library containing fdatasync... " >&6; }
11888 if ${ac_cv_search_fdatasync+:} false; then :
11889 $as_echo_n "(cached) " >&6
11890 else
11891 ac_func_search_save_LIBS=$LIBS
11892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11893 /* end confdefs.h. */
11895 /* Override any GCC internal prototype to avoid an error.
11896 Use char because int might match the return type of a GCC
11897 builtin and then its argument prototype would still apply. */
11898 #ifdef __cplusplus
11899 extern "C"
11900 #endif
11901 char fdatasync ();
11903 main ()
11905 return fdatasync ();
11907 return 0;
11909 _ACEOF
11910 for ac_lib in '' rt posix4; do
11911 if test -z "$ac_lib"; then
11912 ac_res="none required"
11913 else
11914 ac_res=-l$ac_lib
11915 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11917 if ac_fn_c_try_link "$LINENO"; then :
11918 ac_cv_search_fdatasync=$ac_res
11920 rm -f core conftest.err conftest.$ac_objext \
11921 conftest$ac_exeext
11922 if ${ac_cv_search_fdatasync+:} false; then :
11923 break
11925 done
11926 if ${ac_cv_search_fdatasync+:} false; then :
11928 else
11929 ac_cv_search_fdatasync=no
11931 rm conftest.$ac_ext
11932 LIBS=$ac_func_search_save_LIBS
11934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5
11935 $as_echo "$ac_cv_search_fdatasync" >&6; }
11936 ac_res=$ac_cv_search_fdatasync
11937 if test "$ac_res" != no; then :
11938 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11942 # Cygwin:
11943 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shmget" >&5
11944 $as_echo_n "checking for library containing shmget... " >&6; }
11945 if ${ac_cv_search_shmget+:} false; then :
11946 $as_echo_n "(cached) " >&6
11947 else
11948 ac_func_search_save_LIBS=$LIBS
11949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11950 /* end confdefs.h. */
11952 /* Override any GCC internal prototype to avoid an error.
11953 Use char because int might match the return type of a GCC
11954 builtin and then its argument prototype would still apply. */
11955 #ifdef __cplusplus
11956 extern "C"
11957 #endif
11958 char shmget ();
11960 main ()
11962 return shmget ();
11964 return 0;
11966 _ACEOF
11967 for ac_lib in '' cygipc; do
11968 if test -z "$ac_lib"; then
11969 ac_res="none required"
11970 else
11971 ac_res=-l$ac_lib
11972 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11974 if ac_fn_c_try_link "$LINENO"; then :
11975 ac_cv_search_shmget=$ac_res
11977 rm -f core conftest.err conftest.$ac_objext \
11978 conftest$ac_exeext
11979 if ${ac_cv_search_shmget+:} false; then :
11980 break
11982 done
11983 if ${ac_cv_search_shmget+:} false; then :
11985 else
11986 ac_cv_search_shmget=no
11988 rm conftest.$ac_ext
11989 LIBS=$ac_func_search_save_LIBS
11991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shmget" >&5
11992 $as_echo "$ac_cv_search_shmget" >&6; }
11993 ac_res=$ac_cv_search_shmget
11994 if test "$ac_res" != no; then :
11995 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11999 # *BSD:
12000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing backtrace_symbols" >&5
12001 $as_echo_n "checking for library containing backtrace_symbols... " >&6; }
12002 if ${ac_cv_search_backtrace_symbols+:} false; then :
12003 $as_echo_n "(cached) " >&6
12004 else
12005 ac_func_search_save_LIBS=$LIBS
12006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12007 /* end confdefs.h. */
12009 /* Override any GCC internal prototype to avoid an error.
12010 Use char because int might match the return type of a GCC
12011 builtin and then its argument prototype would still apply. */
12012 #ifdef __cplusplus
12013 extern "C"
12014 #endif
12015 char backtrace_symbols ();
12017 main ()
12019 return backtrace_symbols ();
12021 return 0;
12023 _ACEOF
12024 for ac_lib in '' execinfo; do
12025 if test -z "$ac_lib"; then
12026 ac_res="none required"
12027 else
12028 ac_res=-l$ac_lib
12029 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12031 if ac_fn_c_try_link "$LINENO"; then :
12032 ac_cv_search_backtrace_symbols=$ac_res
12034 rm -f core conftest.err conftest.$ac_objext \
12035 conftest$ac_exeext
12036 if ${ac_cv_search_backtrace_symbols+:} false; then :
12037 break
12039 done
12040 if ${ac_cv_search_backtrace_symbols+:} false; then :
12042 else
12043 ac_cv_search_backtrace_symbols=no
12045 rm conftest.$ac_ext
12046 LIBS=$ac_func_search_save_LIBS
12048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_backtrace_symbols" >&5
12049 $as_echo "$ac_cv_search_backtrace_symbols" >&6; }
12050 ac_res=$ac_cv_search_backtrace_symbols
12051 if test "$ac_res" != no; then :
12052 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12057 if test "$enable_thread_safety" = yes; then
12058 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname_r" >&5
12059 $as_echo_n "checking for library containing gethostbyname_r... " >&6; }
12060 if ${ac_cv_search_gethostbyname_r+:} false; then :
12061 $as_echo_n "(cached) " >&6
12062 else
12063 ac_func_search_save_LIBS=$LIBS
12064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12065 /* end confdefs.h. */
12067 /* Override any GCC internal prototype to avoid an error.
12068 Use char because int might match the return type of a GCC
12069 builtin and then its argument prototype would still apply. */
12070 #ifdef __cplusplus
12071 extern "C"
12072 #endif
12073 char gethostbyname_r ();
12075 main ()
12077 return gethostbyname_r ();
12079 return 0;
12081 _ACEOF
12082 for ac_lib in '' nsl; do
12083 if test -z "$ac_lib"; then
12084 ac_res="none required"
12085 else
12086 ac_res=-l$ac_lib
12087 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12089 if ac_fn_c_try_link "$LINENO"; then :
12090 ac_cv_search_gethostbyname_r=$ac_res
12092 rm -f core conftest.err conftest.$ac_objext \
12093 conftest$ac_exeext
12094 if ${ac_cv_search_gethostbyname_r+:} false; then :
12095 break
12097 done
12098 if ${ac_cv_search_gethostbyname_r+:} false; then :
12100 else
12101 ac_cv_search_gethostbyname_r=no
12103 rm conftest.$ac_ext
12104 LIBS=$ac_func_search_save_LIBS
12106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname_r" >&5
12107 $as_echo "$ac_cv_search_gethostbyname_r" >&6; }
12108 ac_res=$ac_cv_search_gethostbyname_r
12109 if test "$ac_res" != no; then :
12110 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_barrier_wait" >&5
12115 $as_echo_n "checking for library containing pthread_barrier_wait... " >&6; }
12116 if ${ac_cv_search_pthread_barrier_wait+:} false; then :
12117 $as_echo_n "(cached) " >&6
12118 else
12119 ac_func_search_save_LIBS=$LIBS
12120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12121 /* end confdefs.h. */
12123 /* Override any GCC internal prototype to avoid an error.
12124 Use char because int might match the return type of a GCC
12125 builtin and then its argument prototype would still apply. */
12126 #ifdef __cplusplus
12127 extern "C"
12128 #endif
12129 char pthread_barrier_wait ();
12131 main ()
12133 return pthread_barrier_wait ();
12135 return 0;
12137 _ACEOF
12138 for ac_lib in '' pthread; do
12139 if test -z "$ac_lib"; then
12140 ac_res="none required"
12141 else
12142 ac_res=-l$ac_lib
12143 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12145 if ac_fn_c_try_link "$LINENO"; then :
12146 ac_cv_search_pthread_barrier_wait=$ac_res
12148 rm -f core conftest.err conftest.$ac_objext \
12149 conftest$ac_exeext
12150 if ${ac_cv_search_pthread_barrier_wait+:} false; then :
12151 break
12153 done
12154 if ${ac_cv_search_pthread_barrier_wait+:} false; then :
12156 else
12157 ac_cv_search_pthread_barrier_wait=no
12159 rm conftest.$ac_ext
12160 LIBS=$ac_func_search_save_LIBS
12162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_barrier_wait" >&5
12163 $as_echo "$ac_cv_search_pthread_barrier_wait" >&6; }
12164 ac_res=$ac_cv_search_pthread_barrier_wait
12165 if test "$ac_res" != no; then :
12166 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12172 if test "$with_readline" = yes; then
12175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing readline" >&5
12176 $as_echo_n "checking for library containing readline... " >&6; }
12177 if ${pgac_cv_check_readline+:} false; then :
12178 $as_echo_n "(cached) " >&6
12179 else
12180 pgac_cv_check_readline=no
12181 pgac_save_LIBS=$LIBS
12182 if test x"$with_libedit_preferred" != x"yes"
12183 then READLINE_ORDER="-lreadline -ledit"
12184 else READLINE_ORDER="-ledit -lreadline"
12186 for pgac_rllib in $READLINE_ORDER ; do
12187 for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
12188 LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
12189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12190 /* end confdefs.h. */
12192 /* Override any GCC internal prototype to avoid an error.
12193 Use char because int might match the return type of a GCC
12194 builtin and then its argument prototype would still apply. */
12195 #ifdef __cplusplus
12196 extern "C"
12197 #endif
12198 char readline ();
12200 main ()
12202 return readline ();
12204 return 0;
12206 _ACEOF
12207 if ac_fn_c_try_link "$LINENO"; then :
12209 # Older NetBSD and OpenBSD have a broken linker that does not
12210 # recognize dependent libraries; assume curses is needed if we didn't
12211 # find any dependency.
12212 case $host_os in
12213 netbsd* | openbsd*)
12214 if test x"$pgac_lib" = x"" ; then
12215 pgac_lib=" -lcurses"
12216 fi ;;
12217 esac
12219 pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
12220 break
12223 rm -f core conftest.err conftest.$ac_objext \
12224 conftest$ac_exeext conftest.$ac_ext
12225 done
12226 if test "$pgac_cv_check_readline" != no ; then
12227 break
12229 done
12230 LIBS=$pgac_save_LIBS
12233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_readline" >&5
12234 $as_echo "$pgac_cv_check_readline" >&6; }
12235 if test "$pgac_cv_check_readline" != no ; then
12236 LIBS="$pgac_cv_check_readline $LIBS"
12238 $as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
12243 if test x"$pgac_cv_check_readline" = x"no"; then
12244 as_fn_error $? "readline library not found
12245 If you have readline already installed, see config.log for details on the
12246 failure. It is possible the compiler isn't looking in the proper directory.
12247 Use --without-readline to disable readline support." "$LINENO" 5
12251 if test "$with_zlib" = yes; then
12252 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5
12253 $as_echo_n "checking for inflate in -lz... " >&6; }
12254 if ${ac_cv_lib_z_inflate+:} false; then :
12255 $as_echo_n "(cached) " >&6
12256 else
12257 ac_check_lib_save_LIBS=$LIBS
12258 LIBS="-lz $LIBS"
12259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12260 /* end confdefs.h. */
12262 /* Override any GCC internal prototype to avoid an error.
12263 Use char because int might match the return type of a GCC
12264 builtin and then its argument prototype would still apply. */
12265 #ifdef __cplusplus
12266 extern "C"
12267 #endif
12268 char inflate ();
12270 main ()
12272 return inflate ();
12274 return 0;
12276 _ACEOF
12277 if ac_fn_c_try_link "$LINENO"; then :
12278 ac_cv_lib_z_inflate=yes
12279 else
12280 ac_cv_lib_z_inflate=no
12282 rm -f core conftest.err conftest.$ac_objext \
12283 conftest$ac_exeext conftest.$ac_ext
12284 LIBS=$ac_check_lib_save_LIBS
12286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5
12287 $as_echo "$ac_cv_lib_z_inflate" >&6; }
12288 if test "x$ac_cv_lib_z_inflate" = xyes; then :
12289 cat >>confdefs.h <<_ACEOF
12290 #define HAVE_LIBZ 1
12291 _ACEOF
12293 LIBS="-lz $LIBS"
12295 else
12296 as_fn_error $? "zlib library not found
12297 If you have zlib already installed, see config.log for details on the
12298 failure. It is possible the compiler isn't looking in the proper directory.
12299 Use --without-zlib to disable zlib support." "$LINENO" 5
12304 if test "$enable_spinlocks" = yes; then
12306 $as_echo "#define HAVE_SPINLOCKS 1" >>confdefs.h
12308 else
12309 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
12310 *** Not using spinlocks will cause poor performance." >&5
12311 $as_echo "$as_me: WARNING:
12312 *** Not using spinlocks will cause poor performance." >&2;}
12315 if test "$enable_atomics" = yes; then
12317 $as_echo "#define HAVE_ATOMICS 1" >>confdefs.h
12319 else
12320 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
12321 *** Not using atomic operations will cause poor performance." >&5
12322 $as_echo "$as_me: WARNING:
12323 *** Not using atomic operations will cause poor performance." >&2;}
12326 if test "$with_gssapi" = yes ; then
12327 if test "$PORTNAME" != "win32"; then
12328 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gss_init_sec_context" >&5
12329 $as_echo_n "checking for library containing gss_init_sec_context... " >&6; }
12330 if ${ac_cv_search_gss_init_sec_context+:} false; then :
12331 $as_echo_n "(cached) " >&6
12332 else
12333 ac_func_search_save_LIBS=$LIBS
12334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12335 /* end confdefs.h. */
12337 /* Override any GCC internal prototype to avoid an error.
12338 Use char because int might match the return type of a GCC
12339 builtin and then its argument prototype would still apply. */
12340 #ifdef __cplusplus
12341 extern "C"
12342 #endif
12343 char gss_init_sec_context ();
12345 main ()
12347 return gss_init_sec_context ();
12349 return 0;
12351 _ACEOF
12352 for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'; do
12353 if test -z "$ac_lib"; then
12354 ac_res="none required"
12355 else
12356 ac_res=-l$ac_lib
12357 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12359 if ac_fn_c_try_link "$LINENO"; then :
12360 ac_cv_search_gss_init_sec_context=$ac_res
12362 rm -f core conftest.err conftest.$ac_objext \
12363 conftest$ac_exeext
12364 if ${ac_cv_search_gss_init_sec_context+:} false; then :
12365 break
12367 done
12368 if ${ac_cv_search_gss_init_sec_context+:} false; then :
12370 else
12371 ac_cv_search_gss_init_sec_context=no
12373 rm conftest.$ac_ext
12374 LIBS=$ac_func_search_save_LIBS
12376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gss_init_sec_context" >&5
12377 $as_echo "$ac_cv_search_gss_init_sec_context" >&6; }
12378 ac_res=$ac_cv_search_gss_init_sec_context
12379 if test "$ac_res" != no; then :
12380 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12382 else
12383 as_fn_error $? "could not find function 'gss_init_sec_context' required for GSSAPI" "$LINENO" 5
12386 else
12387 LIBS="$LIBS -lgssapi32"
12392 # SSL Library
12394 # There is currently only one supported SSL/TLS library: OpenSSL.
12399 # Check whether --with-ssl was given.
12400 if test "${with_ssl+set}" = set; then :
12401 withval=$with_ssl;
12402 case $withval in
12403 yes)
12404 as_fn_error $? "argument required for --with-ssl option" "$LINENO" 5
12407 as_fn_error $? "argument required for --with-ssl option" "$LINENO" 5
12412 esac
12417 if test x"$with_ssl" = x"" ; then
12418 with_ssl=no
12423 # Check whether --with-openssl was given.
12424 if test "${with_openssl+set}" = set; then :
12425 withval=$with_openssl;
12426 case $withval in
12427 yes)
12434 as_fn_error $? "no argument expected for --with-openssl option" "$LINENO" 5
12436 esac
12438 else
12439 with_openssl=no
12444 if test "$with_openssl" = yes ; then
12445 with_ssl=openssl
12448 if test "$with_ssl" = openssl ; then
12449 # Minimum required OpenSSL version is 1.0.1
12451 $as_echo "#define OPENSSL_API_COMPAT 0x10001000L" >>confdefs.h
12453 if test "$PORTNAME" != "win32"; then
12454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_new_ex_data in -lcrypto" >&5
12455 $as_echo_n "checking for CRYPTO_new_ex_data in -lcrypto... " >&6; }
12456 if ${ac_cv_lib_crypto_CRYPTO_new_ex_data+:} false; then :
12457 $as_echo_n "(cached) " >&6
12458 else
12459 ac_check_lib_save_LIBS=$LIBS
12460 LIBS="-lcrypto $LIBS"
12461 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12462 /* end confdefs.h. */
12464 /* Override any GCC internal prototype to avoid an error.
12465 Use char because int might match the return type of a GCC
12466 builtin and then its argument prototype would still apply. */
12467 #ifdef __cplusplus
12468 extern "C"
12469 #endif
12470 char CRYPTO_new_ex_data ();
12472 main ()
12474 return CRYPTO_new_ex_data ();
12476 return 0;
12478 _ACEOF
12479 if ac_fn_c_try_link "$LINENO"; then :
12480 ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
12481 else
12482 ac_cv_lib_crypto_CRYPTO_new_ex_data=no
12484 rm -f core conftest.err conftest.$ac_objext \
12485 conftest$ac_exeext conftest.$ac_ext
12486 LIBS=$ac_check_lib_save_LIBS
12488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
12489 $as_echo "$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6; }
12490 if test "x$ac_cv_lib_crypto_CRYPTO_new_ex_data" = xyes; then :
12491 cat >>confdefs.h <<_ACEOF
12492 #define HAVE_LIBCRYPTO 1
12493 _ACEOF
12495 LIBS="-lcrypto $LIBS"
12497 else
12498 as_fn_error $? "library 'crypto' is required for OpenSSL" "$LINENO" 5
12501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl" >&5
12502 $as_echo_n "checking for SSL_new in -lssl... " >&6; }
12503 if ${ac_cv_lib_ssl_SSL_new+:} false; then :
12504 $as_echo_n "(cached) " >&6
12505 else
12506 ac_check_lib_save_LIBS=$LIBS
12507 LIBS="-lssl $LIBS"
12508 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12509 /* end confdefs.h. */
12511 /* Override any GCC internal prototype to avoid an error.
12512 Use char because int might match the return type of a GCC
12513 builtin and then its argument prototype would still apply. */
12514 #ifdef __cplusplus
12515 extern "C"
12516 #endif
12517 char SSL_new ();
12519 main ()
12521 return SSL_new ();
12523 return 0;
12525 _ACEOF
12526 if ac_fn_c_try_link "$LINENO"; then :
12527 ac_cv_lib_ssl_SSL_new=yes
12528 else
12529 ac_cv_lib_ssl_SSL_new=no
12531 rm -f core conftest.err conftest.$ac_objext \
12532 conftest$ac_exeext conftest.$ac_ext
12533 LIBS=$ac_check_lib_save_LIBS
12535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_new" >&5
12536 $as_echo "$ac_cv_lib_ssl_SSL_new" >&6; }
12537 if test "x$ac_cv_lib_ssl_SSL_new" = xyes; then :
12538 cat >>confdefs.h <<_ACEOF
12539 #define HAVE_LIBSSL 1
12540 _ACEOF
12542 LIBS="-lssl $LIBS"
12544 else
12545 as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5
12548 else
12549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing CRYPTO_new_ex_data" >&5
12550 $as_echo_n "checking for library containing CRYPTO_new_ex_data... " >&6; }
12551 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12552 $as_echo_n "(cached) " >&6
12553 else
12554 ac_func_search_save_LIBS=$LIBS
12555 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12556 /* end confdefs.h. */
12558 /* Override any GCC internal prototype to avoid an error.
12559 Use char because int might match the return type of a GCC
12560 builtin and then its argument prototype would still apply. */
12561 #ifdef __cplusplus
12562 extern "C"
12563 #endif
12564 char CRYPTO_new_ex_data ();
12566 main ()
12568 return CRYPTO_new_ex_data ();
12570 return 0;
12572 _ACEOF
12573 for ac_lib in '' eay32 crypto; do
12574 if test -z "$ac_lib"; then
12575 ac_res="none required"
12576 else
12577 ac_res=-l$ac_lib
12578 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12580 if ac_fn_c_try_link "$LINENO"; then :
12581 ac_cv_search_CRYPTO_new_ex_data=$ac_res
12583 rm -f core conftest.err conftest.$ac_objext \
12584 conftest$ac_exeext
12585 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12586 break
12588 done
12589 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12591 else
12592 ac_cv_search_CRYPTO_new_ex_data=no
12594 rm conftest.$ac_ext
12595 LIBS=$ac_func_search_save_LIBS
12597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_CRYPTO_new_ex_data" >&5
12598 $as_echo "$ac_cv_search_CRYPTO_new_ex_data" >&6; }
12599 ac_res=$ac_cv_search_CRYPTO_new_ex_data
12600 if test "$ac_res" != no; then :
12601 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12603 else
12604 as_fn_error $? "library 'eay32' or 'crypto' is required for OpenSSL" "$LINENO" 5
12607 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_new" >&5
12608 $as_echo_n "checking for library containing SSL_new... " >&6; }
12609 if ${ac_cv_search_SSL_new+:} false; then :
12610 $as_echo_n "(cached) " >&6
12611 else
12612 ac_func_search_save_LIBS=$LIBS
12613 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12614 /* end confdefs.h. */
12616 /* Override any GCC internal prototype to avoid an error.
12617 Use char because int might match the return type of a GCC
12618 builtin and then its argument prototype would still apply. */
12619 #ifdef __cplusplus
12620 extern "C"
12621 #endif
12622 char SSL_new ();
12624 main ()
12626 return SSL_new ();
12628 return 0;
12630 _ACEOF
12631 for ac_lib in '' ssleay32 ssl; do
12632 if test -z "$ac_lib"; then
12633 ac_res="none required"
12634 else
12635 ac_res=-l$ac_lib
12636 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12638 if ac_fn_c_try_link "$LINENO"; then :
12639 ac_cv_search_SSL_new=$ac_res
12641 rm -f core conftest.err conftest.$ac_objext \
12642 conftest$ac_exeext
12643 if ${ac_cv_search_SSL_new+:} false; then :
12644 break
12646 done
12647 if ${ac_cv_search_SSL_new+:} false; then :
12649 else
12650 ac_cv_search_SSL_new=no
12652 rm conftest.$ac_ext
12653 LIBS=$ac_func_search_save_LIBS
12655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_new" >&5
12656 $as_echo "$ac_cv_search_SSL_new" >&6; }
12657 ac_res=$ac_cv_search_SSL_new
12658 if test "$ac_res" != no; then :
12659 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12661 else
12662 as_fn_error $? "library 'ssleay32' or 'ssl' is required for OpenSSL" "$LINENO" 5
12666 # Function introduced in OpenSSL 1.0.2.
12667 for ac_func in X509_get_signature_nid
12668 do :
12669 ac_fn_c_check_func "$LINENO" "X509_get_signature_nid" "ac_cv_func_X509_get_signature_nid"
12670 if test "x$ac_cv_func_X509_get_signature_nid" = xyes; then :
12671 cat >>confdefs.h <<_ACEOF
12672 #define HAVE_X509_GET_SIGNATURE_NID 1
12673 _ACEOF
12676 done
12678 # Functions introduced in OpenSSL 1.1.0. We used to check for
12679 # OPENSSL_VERSION_NUMBER, but that didn't work with 1.1.0, because LibreSSL
12680 # defines OPENSSL_VERSION_NUMBER to claim version 2.0.0, even though it
12681 # doesn't have these OpenSSL 1.1.0 functions. So check for individual
12682 # functions.
12683 for ac_func in OPENSSL_init_ssl BIO_get_data BIO_meth_new ASN1_STRING_get0_data HMAC_CTX_new HMAC_CTX_free
12684 do :
12685 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12686 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12687 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12688 cat >>confdefs.h <<_ACEOF
12689 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12690 _ACEOF
12693 done
12695 # OpenSSL versions before 1.1.0 required setting callback functions, for
12696 # thread-safety. In 1.1.0, it's no longer required, and CRYPTO_lock()
12697 # function was removed.
12698 for ac_func in CRYPTO_lock
12699 do :
12700 ac_fn_c_check_func "$LINENO" "CRYPTO_lock" "ac_cv_func_CRYPTO_lock"
12701 if test "x$ac_cv_func_CRYPTO_lock" = xyes; then :
12702 cat >>confdefs.h <<_ACEOF
12703 #define HAVE_CRYPTO_LOCK 1
12704 _ACEOF
12707 done
12710 $as_echo "#define USE_OPENSSL 1" >>confdefs.h
12712 elif test "$with_ssl" != no ; then
12713 as_fn_error $? "--with-ssl must specify openssl" "$LINENO" 5
12717 if test "$with_pam" = yes ; then
12718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_start in -lpam" >&5
12719 $as_echo_n "checking for pam_start in -lpam... " >&6; }
12720 if ${ac_cv_lib_pam_pam_start+:} false; then :
12721 $as_echo_n "(cached) " >&6
12722 else
12723 ac_check_lib_save_LIBS=$LIBS
12724 LIBS="-lpam $LIBS"
12725 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12726 /* end confdefs.h. */
12728 /* Override any GCC internal prototype to avoid an error.
12729 Use char because int might match the return type of a GCC
12730 builtin and then its argument prototype would still apply. */
12731 #ifdef __cplusplus
12732 extern "C"
12733 #endif
12734 char pam_start ();
12736 main ()
12738 return pam_start ();
12740 return 0;
12742 _ACEOF
12743 if ac_fn_c_try_link "$LINENO"; then :
12744 ac_cv_lib_pam_pam_start=yes
12745 else
12746 ac_cv_lib_pam_pam_start=no
12748 rm -f core conftest.err conftest.$ac_objext \
12749 conftest$ac_exeext conftest.$ac_ext
12750 LIBS=$ac_check_lib_save_LIBS
12752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_start" >&5
12753 $as_echo "$ac_cv_lib_pam_pam_start" >&6; }
12754 if test "x$ac_cv_lib_pam_pam_start" = xyes; then :
12755 cat >>confdefs.h <<_ACEOF
12756 #define HAVE_LIBPAM 1
12757 _ACEOF
12759 LIBS="-lpam $LIBS"
12761 else
12762 as_fn_error $? "library 'pam' is required for PAM" "$LINENO" 5
12767 if test "$with_libxml" = yes ; then
12768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlSaveToBuffer in -lxml2" >&5
12769 $as_echo_n "checking for xmlSaveToBuffer in -lxml2... " >&6; }
12770 if ${ac_cv_lib_xml2_xmlSaveToBuffer+:} false; then :
12771 $as_echo_n "(cached) " >&6
12772 else
12773 ac_check_lib_save_LIBS=$LIBS
12774 LIBS="-lxml2 $LIBS"
12775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12776 /* end confdefs.h. */
12778 /* Override any GCC internal prototype to avoid an error.
12779 Use char because int might match the return type of a GCC
12780 builtin and then its argument prototype would still apply. */
12781 #ifdef __cplusplus
12782 extern "C"
12783 #endif
12784 char xmlSaveToBuffer ();
12786 main ()
12788 return xmlSaveToBuffer ();
12790 return 0;
12792 _ACEOF
12793 if ac_fn_c_try_link "$LINENO"; then :
12794 ac_cv_lib_xml2_xmlSaveToBuffer=yes
12795 else
12796 ac_cv_lib_xml2_xmlSaveToBuffer=no
12798 rm -f core conftest.err conftest.$ac_objext \
12799 conftest$ac_exeext conftest.$ac_ext
12800 LIBS=$ac_check_lib_save_LIBS
12802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlSaveToBuffer" >&5
12803 $as_echo "$ac_cv_lib_xml2_xmlSaveToBuffer" >&6; }
12804 if test "x$ac_cv_lib_xml2_xmlSaveToBuffer" = xyes; then :
12805 cat >>confdefs.h <<_ACEOF
12806 #define HAVE_LIBXML2 1
12807 _ACEOF
12809 LIBS="-lxml2 $LIBS"
12811 else
12812 as_fn_error $? "library 'xml2' (version >= 2.6.23) is required for XML support" "$LINENO" 5
12817 if test "$with_libxslt" = yes ; then
12818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xsltCleanupGlobals in -lxslt" >&5
12819 $as_echo_n "checking for xsltCleanupGlobals in -lxslt... " >&6; }
12820 if ${ac_cv_lib_xslt_xsltCleanupGlobals+:} false; then :
12821 $as_echo_n "(cached) " >&6
12822 else
12823 ac_check_lib_save_LIBS=$LIBS
12824 LIBS="-lxslt $LIBS"
12825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12826 /* end confdefs.h. */
12828 /* Override any GCC internal prototype to avoid an error.
12829 Use char because int might match the return type of a GCC
12830 builtin and then its argument prototype would still apply. */
12831 #ifdef __cplusplus
12832 extern "C"
12833 #endif
12834 char xsltCleanupGlobals ();
12836 main ()
12838 return xsltCleanupGlobals ();
12840 return 0;
12842 _ACEOF
12843 if ac_fn_c_try_link "$LINENO"; then :
12844 ac_cv_lib_xslt_xsltCleanupGlobals=yes
12845 else
12846 ac_cv_lib_xslt_xsltCleanupGlobals=no
12848 rm -f core conftest.err conftest.$ac_objext \
12849 conftest$ac_exeext conftest.$ac_ext
12850 LIBS=$ac_check_lib_save_LIBS
12852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xslt_xsltCleanupGlobals" >&5
12853 $as_echo "$ac_cv_lib_xslt_xsltCleanupGlobals" >&6; }
12854 if test "x$ac_cv_lib_xslt_xsltCleanupGlobals" = xyes; then :
12855 cat >>confdefs.h <<_ACEOF
12856 #define HAVE_LIBXSLT 1
12857 _ACEOF
12859 LIBS="-lxslt $LIBS"
12861 else
12862 as_fn_error $? "library 'xslt' is required for XSLT support" "$LINENO" 5
12867 if test "$with_lz4" = yes ; then
12868 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LZ4_compress_default in -llz4" >&5
12869 $as_echo_n "checking for LZ4_compress_default in -llz4... " >&6; }
12870 if ${ac_cv_lib_lz4_LZ4_compress_default+:} false; then :
12871 $as_echo_n "(cached) " >&6
12872 else
12873 ac_check_lib_save_LIBS=$LIBS
12874 LIBS="-llz4 $LIBS"
12875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12876 /* end confdefs.h. */
12878 /* Override any GCC internal prototype to avoid an error.
12879 Use char because int might match the return type of a GCC
12880 builtin and then its argument prototype would still apply. */
12881 #ifdef __cplusplus
12882 extern "C"
12883 #endif
12884 char LZ4_compress_default ();
12886 main ()
12888 return LZ4_compress_default ();
12890 return 0;
12892 _ACEOF
12893 if ac_fn_c_try_link "$LINENO"; then :
12894 ac_cv_lib_lz4_LZ4_compress_default=yes
12895 else
12896 ac_cv_lib_lz4_LZ4_compress_default=no
12898 rm -f core conftest.err conftest.$ac_objext \
12899 conftest$ac_exeext conftest.$ac_ext
12900 LIBS=$ac_check_lib_save_LIBS
12902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lz4_LZ4_compress_default" >&5
12903 $as_echo "$ac_cv_lib_lz4_LZ4_compress_default" >&6; }
12904 if test "x$ac_cv_lib_lz4_LZ4_compress_default" = xyes; then :
12905 cat >>confdefs.h <<_ACEOF
12906 #define HAVE_LIBLZ4 1
12907 _ACEOF
12909 LIBS="-llz4 $LIBS"
12911 else
12912 as_fn_error $? "library 'lz4' is required for LZ4 support" "$LINENO" 5
12917 # Note: We can test for libldap_r only after we know PTHREAD_LIBS;
12918 # also, on AIX, we may need to have openssl in LIBS for this step.
12919 if test "$with_ldap" = yes ; then
12920 _LIBS="$LIBS"
12921 if test "$PORTNAME" != "win32"; then
12922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap" >&5
12923 $as_echo_n "checking for ldap_bind in -lldap... " >&6; }
12924 if ${ac_cv_lib_ldap_ldap_bind+:} false; then :
12925 $as_echo_n "(cached) " >&6
12926 else
12927 ac_check_lib_save_LIBS=$LIBS
12928 LIBS="-lldap $EXTRA_LDAP_LIBS $LIBS"
12929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12930 /* end confdefs.h. */
12932 /* Override any GCC internal prototype to avoid an error.
12933 Use char because int might match the return type of a GCC
12934 builtin and then its argument prototype would still apply. */
12935 #ifdef __cplusplus
12936 extern "C"
12937 #endif
12938 char ldap_bind ();
12940 main ()
12942 return ldap_bind ();
12944 return 0;
12946 _ACEOF
12947 if ac_fn_c_try_link "$LINENO"; then :
12948 ac_cv_lib_ldap_ldap_bind=yes
12949 else
12950 ac_cv_lib_ldap_ldap_bind=no
12952 rm -f core conftest.err conftest.$ac_objext \
12953 conftest$ac_exeext conftest.$ac_ext
12954 LIBS=$ac_check_lib_save_LIBS
12956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_ldap_bind" >&5
12957 $as_echo "$ac_cv_lib_ldap_ldap_bind" >&6; }
12958 if test "x$ac_cv_lib_ldap_ldap_bind" = xyes; then :
12959 cat >>confdefs.h <<_ACEOF
12960 #define HAVE_LIBLDAP 1
12961 _ACEOF
12963 LIBS="-lldap $LIBS"
12965 else
12966 as_fn_error $? "library 'ldap' is required for LDAP" "$LINENO" 5
12969 LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
12970 # This test is carried out against libldap.
12971 for ac_func in ldap_initialize
12972 do :
12973 ac_fn_c_check_func "$LINENO" "ldap_initialize" "ac_cv_func_ldap_initialize"
12974 if test "x$ac_cv_func_ldap_initialize" = xyes; then :
12975 cat >>confdefs.h <<_ACEOF
12976 #define HAVE_LDAP_INITIALIZE 1
12977 _ACEOF
12980 done
12982 if test "$enable_thread_safety" = yes; then
12983 # Use ldap_r for FE if available, else assume ldap is thread-safe.
12984 # On some platforms ldap_r fails to link without PTHREAD_LIBS.
12985 LIBS="$_LIBS"
12986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap_r" >&5
12987 $as_echo_n "checking for ldap_bind in -lldap_r... " >&6; }
12988 if ${ac_cv_lib_ldap_r_ldap_bind+:} false; then :
12989 $as_echo_n "(cached) " >&6
12990 else
12991 ac_check_lib_save_LIBS=$LIBS
12992 LIBS="-lldap_r $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
12993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12994 /* end confdefs.h. */
12996 /* Override any GCC internal prototype to avoid an error.
12997 Use char because int might match the return type of a GCC
12998 builtin and then its argument prototype would still apply. */
12999 #ifdef __cplusplus
13000 extern "C"
13001 #endif
13002 char ldap_bind ();
13004 main ()
13006 return ldap_bind ();
13008 return 0;
13010 _ACEOF
13011 if ac_fn_c_try_link "$LINENO"; then :
13012 ac_cv_lib_ldap_r_ldap_bind=yes
13013 else
13014 ac_cv_lib_ldap_r_ldap_bind=no
13016 rm -f core conftest.err conftest.$ac_objext \
13017 conftest$ac_exeext conftest.$ac_ext
13018 LIBS=$ac_check_lib_save_LIBS
13020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_r_ldap_bind" >&5
13021 $as_echo "$ac_cv_lib_ldap_r_ldap_bind" >&6; }
13022 if test "x$ac_cv_lib_ldap_r_ldap_bind" = xyes; then :
13023 LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
13024 else
13025 LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
13028 else
13029 LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
13031 else
13032 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lwldap32" >&5
13033 $as_echo_n "checking for ldap_bind in -lwldap32... " >&6; }
13034 if ${ac_cv_lib_wldap32_ldap_bind+:} false; then :
13035 $as_echo_n "(cached) " >&6
13036 else
13037 ac_check_lib_save_LIBS=$LIBS
13038 LIBS="-lwldap32 $LIBS"
13039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13040 /* end confdefs.h. */
13042 /* Override any GCC internal prototype to avoid an error.
13043 Use char because int might match the return type of a GCC
13044 builtin and then its argument prototype would still apply. */
13045 #ifdef __cplusplus
13046 extern "C"
13047 #endif
13048 char ldap_bind ();
13050 main ()
13052 return ldap_bind ();
13054 return 0;
13056 _ACEOF
13057 if ac_fn_c_try_link "$LINENO"; then :
13058 ac_cv_lib_wldap32_ldap_bind=yes
13059 else
13060 ac_cv_lib_wldap32_ldap_bind=no
13062 rm -f core conftest.err conftest.$ac_objext \
13063 conftest$ac_exeext conftest.$ac_ext
13064 LIBS=$ac_check_lib_save_LIBS
13066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wldap32_ldap_bind" >&5
13067 $as_echo "$ac_cv_lib_wldap32_ldap_bind" >&6; }
13068 if test "x$ac_cv_lib_wldap32_ldap_bind" = xyes; then :
13069 cat >>confdefs.h <<_ACEOF
13070 #define HAVE_LIBWLDAP32 1
13071 _ACEOF
13073 LIBS="-lwldap32 $LIBS"
13075 else
13076 as_fn_error $? "library 'wldap32' is required for LDAP" "$LINENO" 5
13079 LDAP_LIBS_FE="-lwldap32"
13080 LDAP_LIBS_BE="-lwldap32"
13082 LIBS="$_LIBS"
13087 # for contrib/sepgsql
13088 if test "$with_selinux" = yes; then
13089 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_compute_create_name in -lselinux" >&5
13090 $as_echo_n "checking for security_compute_create_name in -lselinux... " >&6; }
13091 if ${ac_cv_lib_selinux_security_compute_create_name+:} false; then :
13092 $as_echo_n "(cached) " >&6
13093 else
13094 ac_check_lib_save_LIBS=$LIBS
13095 LIBS="-lselinux $LIBS"
13096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13097 /* end confdefs.h. */
13099 /* Override any GCC internal prototype to avoid an error.
13100 Use char because int might match the return type of a GCC
13101 builtin and then its argument prototype would still apply. */
13102 #ifdef __cplusplus
13103 extern "C"
13104 #endif
13105 char security_compute_create_name ();
13107 main ()
13109 return security_compute_create_name ();
13111 return 0;
13113 _ACEOF
13114 if ac_fn_c_try_link "$LINENO"; then :
13115 ac_cv_lib_selinux_security_compute_create_name=yes
13116 else
13117 ac_cv_lib_selinux_security_compute_create_name=no
13119 rm -f core conftest.err conftest.$ac_objext \
13120 conftest$ac_exeext conftest.$ac_ext
13121 LIBS=$ac_check_lib_save_LIBS
13123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_compute_create_name" >&5
13124 $as_echo "$ac_cv_lib_selinux_security_compute_create_name" >&6; }
13125 if test "x$ac_cv_lib_selinux_security_compute_create_name" = xyes; then :
13126 cat >>confdefs.h <<_ACEOF
13127 #define HAVE_LIBSELINUX 1
13128 _ACEOF
13130 LIBS="-lselinux $LIBS"
13132 else
13133 as_fn_error $? "library 'libselinux', version 2.1.10 or newer, is required for SELinux support" "$LINENO" 5
13138 # for contrib/uuid-ossp
13139 if test "$with_uuid" = bsd ; then
13140 # On BSD, the UUID functions are in libc
13141 ac_fn_c_check_func "$LINENO" "uuid_to_string" "ac_cv_func_uuid_to_string"
13142 if test "x$ac_cv_func_uuid_to_string" = xyes; then :
13143 UUID_LIBS=""
13144 else
13145 as_fn_error $? "BSD UUID functions are not present" "$LINENO" 5
13148 elif test "$with_uuid" = e2fs ; then
13149 # On macOS, the UUID functions are in libc
13150 ac_fn_c_check_func "$LINENO" "uuid_generate" "ac_cv_func_uuid_generate"
13151 if test "x$ac_cv_func_uuid_generate" = xyes; then :
13152 UUID_LIBS=""
13153 else
13154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5
13155 $as_echo_n "checking for uuid_generate in -luuid... " >&6; }
13156 if ${ac_cv_lib_uuid_uuid_generate+:} false; then :
13157 $as_echo_n "(cached) " >&6
13158 else
13159 ac_check_lib_save_LIBS=$LIBS
13160 LIBS="-luuid $LIBS"
13161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13162 /* end confdefs.h. */
13164 /* Override any GCC internal prototype to avoid an error.
13165 Use char because int might match the return type of a GCC
13166 builtin and then its argument prototype would still apply. */
13167 #ifdef __cplusplus
13168 extern "C"
13169 #endif
13170 char uuid_generate ();
13172 main ()
13174 return uuid_generate ();
13176 return 0;
13178 _ACEOF
13179 if ac_fn_c_try_link "$LINENO"; then :
13180 ac_cv_lib_uuid_uuid_generate=yes
13181 else
13182 ac_cv_lib_uuid_uuid_generate=no
13184 rm -f core conftest.err conftest.$ac_objext \
13185 conftest$ac_exeext conftest.$ac_ext
13186 LIBS=$ac_check_lib_save_LIBS
13188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate" >&5
13189 $as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; }
13190 if test "x$ac_cv_lib_uuid_uuid_generate" = xyes; then :
13191 UUID_LIBS="-luuid"
13192 else
13193 as_fn_error $? "library 'uuid' is required for E2FS UUID" "$LINENO" 5
13198 elif test "$with_uuid" = ossp ; then
13199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -lossp-uuid" >&5
13200 $as_echo_n "checking for uuid_export in -lossp-uuid... " >&6; }
13201 if ${ac_cv_lib_ossp_uuid_uuid_export+:} false; then :
13202 $as_echo_n "(cached) " >&6
13203 else
13204 ac_check_lib_save_LIBS=$LIBS
13205 LIBS="-lossp-uuid $LIBS"
13206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13207 /* end confdefs.h. */
13209 /* Override any GCC internal prototype to avoid an error.
13210 Use char because int might match the return type of a GCC
13211 builtin and then its argument prototype would still apply. */
13212 #ifdef __cplusplus
13213 extern "C"
13214 #endif
13215 char uuid_export ();
13217 main ()
13219 return uuid_export ();
13221 return 0;
13223 _ACEOF
13224 if ac_fn_c_try_link "$LINENO"; then :
13225 ac_cv_lib_ossp_uuid_uuid_export=yes
13226 else
13227 ac_cv_lib_ossp_uuid_uuid_export=no
13229 rm -f core conftest.err conftest.$ac_objext \
13230 conftest$ac_exeext conftest.$ac_ext
13231 LIBS=$ac_check_lib_save_LIBS
13233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossp_uuid_uuid_export" >&5
13234 $as_echo "$ac_cv_lib_ossp_uuid_uuid_export" >&6; }
13235 if test "x$ac_cv_lib_ossp_uuid_uuid_export" = xyes; then :
13236 UUID_LIBS="-lossp-uuid"
13237 else
13238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -luuid" >&5
13239 $as_echo_n "checking for uuid_export in -luuid... " >&6; }
13240 if ${ac_cv_lib_uuid_uuid_export+:} false; then :
13241 $as_echo_n "(cached) " >&6
13242 else
13243 ac_check_lib_save_LIBS=$LIBS
13244 LIBS="-luuid $LIBS"
13245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13246 /* end confdefs.h. */
13248 /* Override any GCC internal prototype to avoid an error.
13249 Use char because int might match the return type of a GCC
13250 builtin and then its argument prototype would still apply. */
13251 #ifdef __cplusplus
13252 extern "C"
13253 #endif
13254 char uuid_export ();
13256 main ()
13258 return uuid_export ();
13260 return 0;
13262 _ACEOF
13263 if ac_fn_c_try_link "$LINENO"; then :
13264 ac_cv_lib_uuid_uuid_export=yes
13265 else
13266 ac_cv_lib_uuid_uuid_export=no
13268 rm -f core conftest.err conftest.$ac_objext \
13269 conftest$ac_exeext conftest.$ac_ext
13270 LIBS=$ac_check_lib_save_LIBS
13272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_export" >&5
13273 $as_echo "$ac_cv_lib_uuid_uuid_export" >&6; }
13274 if test "x$ac_cv_lib_uuid_uuid_export" = xyes; then :
13275 UUID_LIBS="-luuid"
13276 else
13277 as_fn_error $? "library 'ossp-uuid' or 'uuid' is required for OSSP UUID" "$LINENO" 5
13287 ## Header files
13290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
13291 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
13292 if ${ac_cv_header_stdbool_h+:} false; then :
13293 $as_echo_n "(cached) " >&6
13294 else
13295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13296 /* end confdefs.h. */
13298 #include <stdbool.h>
13299 #ifndef bool
13300 "error: bool is not defined"
13301 #endif
13302 #ifndef false
13303 "error: false is not defined"
13304 #endif
13305 #if false
13306 "error: false is not 0"
13307 #endif
13308 #ifndef true
13309 "error: true is not defined"
13310 #endif
13311 #if true != 1
13312 "error: true is not 1"
13313 #endif
13314 #ifndef __bool_true_false_are_defined
13315 "error: __bool_true_false_are_defined is not defined"
13316 #endif
13318 struct s { _Bool s: 1; _Bool t; } s;
13320 char a[true == 1 ? 1 : -1];
13321 char b[false == 0 ? 1 : -1];
13322 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
13323 char d[(bool) 0.5 == true ? 1 : -1];
13324 /* See body of main program for 'e'. */
13325 char f[(_Bool) 0.0 == false ? 1 : -1];
13326 char g[true];
13327 char h[sizeof (_Bool)];
13328 char i[sizeof s.t];
13329 enum { j = false, k = true, l = false * true, m = true * 256 };
13330 /* The following fails for
13331 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
13332 _Bool n[m];
13333 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
13334 char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
13335 /* Catch a bug in an HP-UX C compiler. See
13336 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
13337 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
13339 _Bool q = true;
13340 _Bool *pq = &q;
13343 main ()
13346 bool e = &s;
13347 *pq |= q;
13348 *pq |= ! q;
13349 /* Refer to every declared value, to avoid compiler optimizations. */
13350 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
13351 + !m + !n + !o + !p + !q + !pq);
13354 return 0;
13356 _ACEOF
13357 if ac_fn_c_try_compile "$LINENO"; then :
13358 ac_cv_header_stdbool_h=yes
13359 else
13360 ac_cv_header_stdbool_h=no
13362 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
13365 $as_echo "$ac_cv_header_stdbool_h" >&6; }
13366 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
13367 if test "x$ac_cv_type__Bool" = xyes; then :
13369 cat >>confdefs.h <<_ACEOF
13370 #define HAVE__BOOL 1
13371 _ACEOF
13377 if test $ac_cv_header_stdbool_h = yes; then
13379 $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
13384 for ac_header in atomic.h copyfile.h execinfo.h getopt.h ifaddrs.h langinfo.h mbarrier.h poll.h sys/epoll.h sys/event.h sys/ipc.h sys/prctl.h sys/procctl.h sys/pstat.h sys/resource.h sys/select.h sys/sem.h sys/shm.h sys/sockio.h sys/tas.h sys/uio.h sys/un.h termios.h ucred.h wctype.h
13385 do :
13386 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13387 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13388 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13389 cat >>confdefs.h <<_ACEOF
13390 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13391 _ACEOF
13395 done
13398 # On BSD, test for net/if.h will fail unless sys/socket.h
13399 # is included first.
13400 for ac_header in net/if.h
13401 do :
13402 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
13403 #include <sys/socket.h>
13406 if test "x$ac_cv_header_net_if_h" = xyes; then :
13407 cat >>confdefs.h <<_ACEOF
13408 #define HAVE_NET_IF_H 1
13409 _ACEOF
13413 done
13416 # On OpenBSD, test for sys/ucred.h will fail unless sys/param.h
13417 # is included first.
13418 for ac_header in sys/ucred.h
13419 do :
13420 ac_fn_c_check_header_compile "$LINENO" "sys/ucred.h" "ac_cv_header_sys_ucred_h" "$ac_includes_default
13421 #include <sys/param.h>
13424 if test "x$ac_cv_header_sys_ucred_h" = xyes; then :
13425 cat >>confdefs.h <<_ACEOF
13426 #define HAVE_SYS_UCRED_H 1
13427 _ACEOF
13431 done
13434 # At least on IRIX, test for netinet/tcp.h will fail unless
13435 # netinet/in.h is included first.
13436 for ac_header in netinet/tcp.h
13437 do :
13438 ac_fn_c_check_header_compile "$LINENO" "netinet/tcp.h" "ac_cv_header_netinet_tcp_h" "$ac_includes_default
13439 #include <netinet/in.h>
13442 if test "x$ac_cv_header_netinet_tcp_h" = xyes; then :
13443 cat >>confdefs.h <<_ACEOF
13444 #define HAVE_NETINET_TCP_H 1
13445 _ACEOF
13449 done
13452 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
13453 for ac_header in readline/readline.h
13454 do :
13455 ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
13456 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
13457 cat >>confdefs.h <<_ACEOF
13458 #define HAVE_READLINE_READLINE_H 1
13459 _ACEOF
13461 else
13462 for ac_header in readline.h
13463 do :
13464 ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
13465 if test "x$ac_cv_header_readline_h" = xyes; then :
13466 cat >>confdefs.h <<_ACEOF
13467 #define HAVE_READLINE_H 1
13468 _ACEOF
13470 else
13471 as_fn_error $? "readline header not found
13472 If you have readline already installed, see config.log for details on the
13473 failure. It is possible the compiler isn't looking in the proper directory.
13474 Use --without-readline to disable readline support." "$LINENO" 5
13477 done
13481 done
13483 for ac_header in readline/history.h
13484 do :
13485 ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
13486 if test "x$ac_cv_header_readline_history_h" = xyes; then :
13487 cat >>confdefs.h <<_ACEOF
13488 #define HAVE_READLINE_HISTORY_H 1
13489 _ACEOF
13491 else
13492 for ac_header in history.h
13493 do :
13494 ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
13495 if test "x$ac_cv_header_history_h" = xyes; then :
13496 cat >>confdefs.h <<_ACEOF
13497 #define HAVE_HISTORY_H 1
13498 _ACEOF
13500 else
13501 as_fn_error $? "history header not found
13502 If you have readline already installed, see config.log for details on the
13503 failure. It is possible the compiler isn't looking in the proper directory.
13504 Use --without-readline to disable readline support." "$LINENO" 5
13507 done
13511 done
13515 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
13516 # Some installations of libedit usurp /usr/include/readline/, which seems
13517 # bad practice, since in combined installations readline will have its headers
13518 # there. We might have to resort to AC_EGREP checks to make sure we found
13519 # the proper header...
13520 for ac_header in editline/readline.h
13521 do :
13522 ac_fn_c_check_header_mongrel "$LINENO" "editline/readline.h" "ac_cv_header_editline_readline_h" "$ac_includes_default"
13523 if test "x$ac_cv_header_editline_readline_h" = xyes; then :
13524 cat >>confdefs.h <<_ACEOF
13525 #define HAVE_EDITLINE_READLINE_H 1
13526 _ACEOF
13528 else
13529 for ac_header in readline.h
13530 do :
13531 ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
13532 if test "x$ac_cv_header_readline_h" = xyes; then :
13533 cat >>confdefs.h <<_ACEOF
13534 #define HAVE_READLINE_H 1
13535 _ACEOF
13537 else
13538 for ac_header in readline/readline.h
13539 do :
13540 ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
13541 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
13542 cat >>confdefs.h <<_ACEOF
13543 #define HAVE_READLINE_READLINE_H 1
13544 _ACEOF
13546 else
13547 as_fn_error $? "readline header not found
13548 If you have libedit already installed, see config.log for details on the
13549 failure. It is possible the compiler isn't looking in the proper directory.
13550 Use --without-readline to disable libedit support." "$LINENO" 5
13553 done
13557 done
13561 done
13563 # Note: in a libedit installation, history.h is sometimes a dummy, and may
13564 # not be there at all. Hence, don't complain if not found. We must check
13565 # though, since in yet other versions it is an independent header.
13566 for ac_header in editline/history.h
13567 do :
13568 ac_fn_c_check_header_mongrel "$LINENO" "editline/history.h" "ac_cv_header_editline_history_h" "$ac_includes_default"
13569 if test "x$ac_cv_header_editline_history_h" = xyes; then :
13570 cat >>confdefs.h <<_ACEOF
13571 #define HAVE_EDITLINE_HISTORY_H 1
13572 _ACEOF
13574 else
13575 for ac_header in history.h
13576 do :
13577 ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
13578 if test "x$ac_cv_header_history_h" = xyes; then :
13579 cat >>confdefs.h <<_ACEOF
13580 #define HAVE_HISTORY_H 1
13581 _ACEOF
13583 else
13584 for ac_header in readline/history.h
13585 do :
13586 ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
13587 if test "x$ac_cv_header_readline_history_h" = xyes; then :
13588 cat >>confdefs.h <<_ACEOF
13589 #define HAVE_READLINE_HISTORY_H 1
13590 _ACEOF
13594 done
13598 done
13602 done
13606 if test "$with_zlib" = yes; then
13607 ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
13608 if test "x$ac_cv_header_zlib_h" = xyes; then :
13610 else
13611 as_fn_error $? "zlib header not found
13612 If you have zlib already installed, see config.log for details on the
13613 failure. It is possible the compiler isn't looking in the proper directory.
13614 Use --without-zlib to disable zlib support." "$LINENO" 5
13620 if test "$with_lz4" = yes; then
13621 for ac_header in lz4.h
13622 do :
13623 ac_fn_c_check_header_mongrel "$LINENO" "lz4.h" "ac_cv_header_lz4_h" "$ac_includes_default"
13624 if test "x$ac_cv_header_lz4_h" = xyes; then :
13625 cat >>confdefs.h <<_ACEOF
13626 #define HAVE_LZ4_H 1
13627 _ACEOF
13629 else
13630 as_fn_error $? "lz4.h header file is required for LZ4" "$LINENO" 5
13633 done
13637 if test "$with_gssapi" = yes ; then
13638 for ac_header in gssapi/gssapi.h
13639 do :
13640 ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi.h" "ac_cv_header_gssapi_gssapi_h" "$ac_includes_default"
13641 if test "x$ac_cv_header_gssapi_gssapi_h" = xyes; then :
13642 cat >>confdefs.h <<_ACEOF
13643 #define HAVE_GSSAPI_GSSAPI_H 1
13644 _ACEOF
13646 else
13647 for ac_header in gssapi.h
13648 do :
13649 ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
13650 if test "x$ac_cv_header_gssapi_h" = xyes; then :
13651 cat >>confdefs.h <<_ACEOF
13652 #define HAVE_GSSAPI_H 1
13653 _ACEOF
13655 else
13656 as_fn_error $? "gssapi.h header file is required for GSSAPI" "$LINENO" 5
13659 done
13663 done
13667 if test "$with_ssl" = openssl ; then
13668 ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
13669 if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
13671 else
13672 as_fn_error $? "header file <openssl/ssl.h> is required for OpenSSL" "$LINENO" 5
13676 ac_fn_c_check_header_mongrel "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default"
13677 if test "x$ac_cv_header_openssl_err_h" = xyes; then :
13679 else
13680 as_fn_error $? "header file <openssl/err.h> is required for OpenSSL" "$LINENO" 5
13686 if test "$with_pam" = yes ; then
13687 for ac_header in security/pam_appl.h
13688 do :
13689 ac_fn_c_check_header_mongrel "$LINENO" "security/pam_appl.h" "ac_cv_header_security_pam_appl_h" "$ac_includes_default"
13690 if test "x$ac_cv_header_security_pam_appl_h" = xyes; then :
13691 cat >>confdefs.h <<_ACEOF
13692 #define HAVE_SECURITY_PAM_APPL_H 1
13693 _ACEOF
13695 else
13696 for ac_header in pam/pam_appl.h
13697 do :
13698 ac_fn_c_check_header_mongrel "$LINENO" "pam/pam_appl.h" "ac_cv_header_pam_pam_appl_h" "$ac_includes_default"
13699 if test "x$ac_cv_header_pam_pam_appl_h" = xyes; then :
13700 cat >>confdefs.h <<_ACEOF
13701 #define HAVE_PAM_PAM_APPL_H 1
13702 _ACEOF
13704 else
13705 as_fn_error $? "header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." "$LINENO" 5
13708 done
13712 done
13716 if test "$with_bsd_auth" = yes ; then
13717 ac_fn_c_check_header_mongrel "$LINENO" "bsd_auth.h" "ac_cv_header_bsd_auth_h" "$ac_includes_default"
13718 if test "x$ac_cv_header_bsd_auth_h" = xyes; then :
13720 else
13721 as_fn_error $? "header file <bsd_auth.h> is required for BSD Authentication support" "$LINENO" 5
13727 if test "$with_systemd" = yes ; then
13728 ac_fn_c_check_header_mongrel "$LINENO" "systemd/sd-daemon.h" "ac_cv_header_systemd_sd_daemon_h" "$ac_includes_default"
13729 if test "x$ac_cv_header_systemd_sd_daemon_h" = xyes; then :
13731 else
13732 as_fn_error $? "header file <systemd/sd-daemon.h> is required for systemd support" "$LINENO" 5
13738 if test "$with_libxml" = yes ; then
13739 ac_fn_c_check_header_mongrel "$LINENO" "libxml/parser.h" "ac_cv_header_libxml_parser_h" "$ac_includes_default"
13740 if test "x$ac_cv_header_libxml_parser_h" = xyes; then :
13742 else
13743 as_fn_error $? "header file <libxml/parser.h> is required for XML support" "$LINENO" 5
13749 if test "$with_libxslt" = yes ; then
13750 ac_fn_c_check_header_mongrel "$LINENO" "libxslt/xslt.h" "ac_cv_header_libxslt_xslt_h" "$ac_includes_default"
13751 if test "x$ac_cv_header_libxslt_xslt_h" = xyes; then :
13753 else
13754 as_fn_error $? "header file <libxslt/xslt.h> is required for XSLT support" "$LINENO" 5
13760 if test "$with_ldap" = yes ; then
13761 if test "$PORTNAME" != "win32"; then
13762 for ac_header in ldap.h
13763 do :
13764 ac_fn_c_check_header_mongrel "$LINENO" "ldap.h" "ac_cv_header_ldap_h" "$ac_includes_default"
13765 if test "x$ac_cv_header_ldap_h" = xyes; then :
13766 cat >>confdefs.h <<_ACEOF
13767 #define HAVE_LDAP_H 1
13768 _ACEOF
13770 else
13771 as_fn_error $? "header file <ldap.h> is required for LDAP" "$LINENO" 5
13774 done
13776 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compatible LDAP implementation" >&5
13777 $as_echo_n "checking for compatible LDAP implementation... " >&6; }
13778 if ${pgac_cv_ldap_safe+:} false; then :
13779 $as_echo_n "(cached) " >&6
13780 else
13781 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13782 /* end confdefs.h. */
13783 #include <ldap.h>
13784 #if !defined(LDAP_VENDOR_VERSION) || \
13785 (defined(LDAP_API_FEATURE_X_OPENLDAP) && \
13786 LDAP_VENDOR_VERSION >= 20424 && LDAP_VENDOR_VERSION <= 20431)
13787 choke me
13788 #endif
13790 main ()
13794 return 0;
13796 _ACEOF
13797 if ac_fn_c_try_compile "$LINENO"; then :
13798 pgac_cv_ldap_safe=yes
13799 else
13800 pgac_cv_ldap_safe=no
13802 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_ldap_safe" >&5
13805 $as_echo "$pgac_cv_ldap_safe" >&6; }
13807 if test "$pgac_cv_ldap_safe" != yes; then
13808 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
13809 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
13810 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
13811 *** also uses LDAP will crash on exit." >&5
13812 $as_echo "$as_me: WARNING:
13813 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
13814 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
13815 *** also uses LDAP will crash on exit." >&2;}
13817 else
13818 for ac_header in winldap.h
13819 do :
13820 ac_fn_c_check_header_compile "$LINENO" "winldap.h" "ac_cv_header_winldap_h" "$ac_includes_default
13821 #include <windows.h>
13824 if test "x$ac_cv_header_winldap_h" = xyes; then :
13825 cat >>confdefs.h <<_ACEOF
13826 #define HAVE_WINLDAP_H 1
13827 _ACEOF
13829 else
13830 as_fn_error $? "header file <winldap.h> is required for LDAP" "$LINENO" 5
13833 done
13838 if test "$with_bonjour" = yes ; then
13839 ac_fn_c_check_header_mongrel "$LINENO" "dns_sd.h" "ac_cv_header_dns_sd_h" "$ac_includes_default"
13840 if test "x$ac_cv_header_dns_sd_h" = xyes; then :
13842 else
13843 as_fn_error $? "header file <dns_sd.h> is required for Bonjour" "$LINENO" 5
13849 # for contrib/uuid-ossp
13850 if test "$with_uuid" = bsd ; then
13851 for ac_header in uuid.h
13852 do :
13853 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
13854 if test "x$ac_cv_header_uuid_h" = xyes; then :
13855 cat >>confdefs.h <<_ACEOF
13856 #define HAVE_UUID_H 1
13857 _ACEOF
13858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13859 /* end confdefs.h. */
13860 #include <uuid.h>
13862 _ACEOF
13863 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13864 $EGREP "uuid_to_string" >/dev/null 2>&1; then :
13866 else
13867 as_fn_error $? "header file <uuid.h> does not match BSD UUID library" "$LINENO" 5
13869 rm -f conftest*
13871 else
13872 as_fn_error $? "header file <uuid.h> is required for BSD UUID" "$LINENO" 5
13875 done
13877 elif test "$with_uuid" = e2fs ; then
13878 for ac_header in uuid/uuid.h
13879 do :
13880 ac_fn_c_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
13881 if test "x$ac_cv_header_uuid_uuid_h" = xyes; then :
13882 cat >>confdefs.h <<_ACEOF
13883 #define HAVE_UUID_UUID_H 1
13884 _ACEOF
13885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13886 /* end confdefs.h. */
13887 #include <uuid/uuid.h>
13889 _ACEOF
13890 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13891 $EGREP "uuid_generate" >/dev/null 2>&1; then :
13893 else
13894 as_fn_error $? "header file <uuid/uuid.h> does not match E2FS UUID library" "$LINENO" 5
13896 rm -f conftest*
13898 else
13899 for ac_header in uuid.h
13900 do :
13901 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
13902 if test "x$ac_cv_header_uuid_h" = xyes; then :
13903 cat >>confdefs.h <<_ACEOF
13904 #define HAVE_UUID_H 1
13905 _ACEOF
13906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13907 /* end confdefs.h. */
13908 #include <uuid.h>
13910 _ACEOF
13911 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13912 $EGREP "uuid_generate" >/dev/null 2>&1; then :
13914 else
13915 as_fn_error $? "header file <uuid.h> does not match E2FS UUID library" "$LINENO" 5
13917 rm -f conftest*
13919 else
13920 as_fn_error $? "header file <uuid/uuid.h> or <uuid.h> is required for E2FS UUID" "$LINENO" 5
13923 done
13927 done
13929 elif test "$with_uuid" = ossp ; then
13930 for ac_header in ossp/uuid.h
13931 do :
13932 ac_fn_c_check_header_mongrel "$LINENO" "ossp/uuid.h" "ac_cv_header_ossp_uuid_h" "$ac_includes_default"
13933 if test "x$ac_cv_header_ossp_uuid_h" = xyes; then :
13934 cat >>confdefs.h <<_ACEOF
13935 #define HAVE_OSSP_UUID_H 1
13936 _ACEOF
13937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13938 /* end confdefs.h. */
13939 #include <ossp/uuid.h>
13941 _ACEOF
13942 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13943 $EGREP "uuid_export" >/dev/null 2>&1; then :
13945 else
13946 as_fn_error $? "header file <ossp/uuid.h> does not match OSSP UUID library" "$LINENO" 5
13948 rm -f conftest*
13950 else
13951 for ac_header in uuid.h
13952 do :
13953 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
13954 if test "x$ac_cv_header_uuid_h" = xyes; then :
13955 cat >>confdefs.h <<_ACEOF
13956 #define HAVE_UUID_H 1
13957 _ACEOF
13958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13959 /* end confdefs.h. */
13960 #include <uuid.h>
13962 _ACEOF
13963 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13964 $EGREP "uuid_export" >/dev/null 2>&1; then :
13966 else
13967 as_fn_error $? "header file <uuid.h> does not match OSSP UUID library" "$LINENO" 5
13969 rm -f conftest*
13971 else
13972 as_fn_error $? "header file <ossp/uuid.h> or <uuid.h> is required for OSSP UUID" "$LINENO" 5
13975 done
13979 done
13983 if test "$PORTNAME" = "win32" ; then
13984 for ac_header in crtdefs.h
13985 do :
13986 ac_fn_c_check_header_mongrel "$LINENO" "crtdefs.h" "ac_cv_header_crtdefs_h" "$ac_includes_default"
13987 if test "x$ac_cv_header_crtdefs_h" = xyes; then :
13988 cat >>confdefs.h <<_ACEOF
13989 #define HAVE_CRTDEFS_H 1
13990 _ACEOF
13994 done
13999 ## Types, structures, compiler characteristics
14002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14003 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
14004 if ${ac_cv_c_bigendian+:} false; then :
14005 $as_echo_n "(cached) " >&6
14006 else
14007 ac_cv_c_bigendian=unknown
14008 # See if we're dealing with a universal compiler.
14009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14010 /* end confdefs.h. */
14011 #ifndef __APPLE_CC__
14012 not a universal capable compiler
14013 #endif
14014 typedef int dummy;
14016 _ACEOF
14017 if ac_fn_c_try_compile "$LINENO"; then :
14019 # Check for potential -arch flags. It is not universal unless
14020 # there are at least two -arch flags with different values.
14021 ac_arch=
14022 ac_prev=
14023 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14024 if test -n "$ac_prev"; then
14025 case $ac_word in
14026 i?86 | x86_64 | ppc | ppc64)
14027 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14028 ac_arch=$ac_word
14029 else
14030 ac_cv_c_bigendian=universal
14031 break
14034 esac
14035 ac_prev=
14036 elif test "x$ac_word" = "x-arch"; then
14037 ac_prev=arch
14039 done
14041 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14042 if test $ac_cv_c_bigendian = unknown; then
14043 # See if sys/param.h defines the BYTE_ORDER macro.
14044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14045 /* end confdefs.h. */
14046 #include <sys/types.h>
14047 #include <sys/param.h>
14050 main ()
14052 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14053 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14054 && LITTLE_ENDIAN)
14055 bogus endian macros
14056 #endif
14059 return 0;
14061 _ACEOF
14062 if ac_fn_c_try_compile "$LINENO"; then :
14063 # It does; now see whether it defined to BIG_ENDIAN or not.
14064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14065 /* end confdefs.h. */
14066 #include <sys/types.h>
14067 #include <sys/param.h>
14070 main ()
14072 #if BYTE_ORDER != BIG_ENDIAN
14073 not big endian
14074 #endif
14077 return 0;
14079 _ACEOF
14080 if ac_fn_c_try_compile "$LINENO"; then :
14081 ac_cv_c_bigendian=yes
14082 else
14083 ac_cv_c_bigendian=no
14085 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14087 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14089 if test $ac_cv_c_bigendian = unknown; then
14090 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14092 /* end confdefs.h. */
14093 #include <limits.h>
14096 main ()
14098 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14099 bogus endian macros
14100 #endif
14103 return 0;
14105 _ACEOF
14106 if ac_fn_c_try_compile "$LINENO"; then :
14107 # It does; now see whether it defined to _BIG_ENDIAN or not.
14108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14109 /* end confdefs.h. */
14110 #include <limits.h>
14113 main ()
14115 #ifndef _BIG_ENDIAN
14116 not big endian
14117 #endif
14120 return 0;
14122 _ACEOF
14123 if ac_fn_c_try_compile "$LINENO"; then :
14124 ac_cv_c_bigendian=yes
14125 else
14126 ac_cv_c_bigendian=no
14128 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14130 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14132 if test $ac_cv_c_bigendian = unknown; then
14133 # Compile a test program.
14134 if test "$cross_compiling" = yes; then :
14135 # Try to guess by grepping values from an object file.
14136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14137 /* end confdefs.h. */
14138 short int ascii_mm[] =
14139 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14140 short int ascii_ii[] =
14141 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14142 int use_ascii (int i) {
14143 return ascii_mm[i] + ascii_ii[i];
14145 short int ebcdic_ii[] =
14146 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14147 short int ebcdic_mm[] =
14148 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14149 int use_ebcdic (int i) {
14150 return ebcdic_mm[i] + ebcdic_ii[i];
14152 extern int foo;
14155 main ()
14157 return use_ascii (foo) == use_ebcdic (foo);
14159 return 0;
14161 _ACEOF
14162 if ac_fn_c_try_compile "$LINENO"; then :
14163 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14164 ac_cv_c_bigendian=yes
14166 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14167 if test "$ac_cv_c_bigendian" = unknown; then
14168 ac_cv_c_bigendian=no
14169 else
14170 # finding both strings is unlikely to happen, but who knows?
14171 ac_cv_c_bigendian=unknown
14175 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14176 else
14177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14178 /* end confdefs.h. */
14179 $ac_includes_default
14181 main ()
14184 /* Are we little or big endian? From Harbison&Steele. */
14185 union
14187 long int l;
14188 char c[sizeof (long int)];
14189 } u;
14190 u.l = 1;
14191 return u.c[sizeof (long int) - 1] == 1;
14194 return 0;
14196 _ACEOF
14197 if ac_fn_c_try_run "$LINENO"; then :
14198 ac_cv_c_bigendian=no
14199 else
14200 ac_cv_c_bigendian=yes
14202 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14203 conftest.$ac_objext conftest.beam conftest.$ac_ext
14208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14209 $as_echo "$ac_cv_c_bigendian" >&6; }
14210 case $ac_cv_c_bigendian in #(
14211 yes)
14212 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14213 ;; #(
14215 ;; #(
14216 universal)
14218 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
14220 ;; #(
14222 as_fn_error $? "unknown endianness
14223 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
14224 esac
14226 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
14227 $as_echo_n "checking for inline... " >&6; }
14228 if ${ac_cv_c_inline+:} false; then :
14229 $as_echo_n "(cached) " >&6
14230 else
14231 ac_cv_c_inline=no
14232 for ac_kw in inline __inline__ __inline; do
14233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14234 /* end confdefs.h. */
14235 #ifndef __cplusplus
14236 typedef int foo_t;
14237 static $ac_kw foo_t static_foo () {return 0; }
14238 $ac_kw foo_t foo () {return 0; }
14239 #endif
14241 _ACEOF
14242 if ac_fn_c_try_compile "$LINENO"; then :
14243 ac_cv_c_inline=$ac_kw
14245 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14246 test "$ac_cv_c_inline" != no && break
14247 done
14250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
14251 $as_echo "$ac_cv_c_inline" >&6; }
14253 case $ac_cv_c_inline in
14254 inline | yes) ;;
14256 case $ac_cv_c_inline in
14257 no) ac_val=;;
14258 *) ac_val=$ac_cv_c_inline;;
14259 esac
14260 cat >>confdefs.h <<_ACEOF
14261 #ifndef __cplusplus
14262 #define inline $ac_val
14263 #endif
14264 _ACEOF
14266 esac
14268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for printf format archetype" >&5
14269 $as_echo_n "checking for printf format archetype... " >&6; }
14270 if ${pgac_cv_printf_archetype+:} false; then :
14271 $as_echo_n "(cached) " >&6
14272 else
14273 pgac_cv_printf_archetype=gnu_printf
14274 ac_save_c_werror_flag=$ac_c_werror_flag
14275 ac_c_werror_flag=yes
14276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14277 /* end confdefs.h. */
14278 extern void pgac_write(int ignore, const char *fmt,...)
14279 __attribute__((format($pgac_cv_printf_archetype, 2, 3)));
14281 main ()
14283 pgac_write(0, "error %s: %m", "foo");
14285 return 0;
14287 _ACEOF
14288 if ac_fn_c_try_compile "$LINENO"; then :
14289 ac_archetype_ok=yes
14290 else
14291 ac_archetype_ok=no
14293 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14294 ac_c_werror_flag=$ac_save_c_werror_flag
14296 if [ "$ac_archetype_ok" = no ]; then
14297 pgac_cv_printf_archetype=__syslog__
14298 ac_save_c_werror_flag=$ac_c_werror_flag
14299 ac_c_werror_flag=yes
14300 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14301 /* end confdefs.h. */
14302 extern void pgac_write(int ignore, const char *fmt,...)
14303 __attribute__((format($pgac_cv_printf_archetype, 2, 3)));
14305 main ()
14307 pgac_write(0, "error %s: %m", "foo");
14309 return 0;
14311 _ACEOF
14312 if ac_fn_c_try_compile "$LINENO"; then :
14313 ac_archetype_ok=yes
14314 else
14315 ac_archetype_ok=no
14317 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14318 ac_c_werror_flag=$ac_save_c_werror_flag
14320 if [ "$ac_archetype_ok" = no ]; then
14321 pgac_cv_printf_archetype=printf
14325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_printf_archetype" >&5
14326 $as_echo "$pgac_cv_printf_archetype" >&6; }
14328 cat >>confdefs.h <<_ACEOF
14329 #define PG_PRINTF_ATTRIBUTE $pgac_cv_printf_archetype
14330 _ACEOF
14333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __func__" >&5
14334 $as_echo_n "checking for __func__... " >&6; }
14335 if ${pgac_cv_funcname_func_support+:} false; then :
14336 $as_echo_n "(cached) " >&6
14337 else
14338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14339 /* end confdefs.h. */
14340 #include <stdio.h>
14342 main ()
14344 printf("%s\n", __func__);
14346 return 0;
14348 _ACEOF
14349 if ac_fn_c_try_compile "$LINENO"; then :
14350 pgac_cv_funcname_func_support=yes
14351 else
14352 pgac_cv_funcname_func_support=no
14354 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_func_support" >&5
14357 $as_echo "$pgac_cv_funcname_func_support" >&6; }
14358 if test x"$pgac_cv_funcname_func_support" = xyes ; then
14360 $as_echo "#define HAVE_FUNCNAME__FUNC 1" >>confdefs.h
14362 else
14363 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __FUNCTION__" >&5
14364 $as_echo_n "checking for __FUNCTION__... " >&6; }
14365 if ${pgac_cv_funcname_function_support+:} false; then :
14366 $as_echo_n "(cached) " >&6
14367 else
14368 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14369 /* end confdefs.h. */
14370 #include <stdio.h>
14372 main ()
14374 printf("%s\n", __FUNCTION__);
14376 return 0;
14378 _ACEOF
14379 if ac_fn_c_try_compile "$LINENO"; then :
14380 pgac_cv_funcname_function_support=yes
14381 else
14382 pgac_cv_funcname_function_support=no
14384 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_function_support" >&5
14387 $as_echo "$pgac_cv_funcname_function_support" >&6; }
14388 if test x"$pgac_cv_funcname_function_support" = xyes ; then
14390 $as_echo "#define HAVE_FUNCNAME__FUNCTION 1" >>confdefs.h
14394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Static_assert" >&5
14395 $as_echo_n "checking for _Static_assert... " >&6; }
14396 if ${pgac_cv__static_assert+:} false; then :
14397 $as_echo_n "(cached) " >&6
14398 else
14399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14400 /* end confdefs.h. */
14403 main ()
14405 ({ _Static_assert(1, "foo"); })
14407 return 0;
14409 _ACEOF
14410 if ac_fn_c_try_link "$LINENO"; then :
14411 pgac_cv__static_assert=yes
14412 else
14413 pgac_cv__static_assert=no
14415 rm -f core conftest.err conftest.$ac_objext \
14416 conftest$ac_exeext conftest.$ac_ext
14418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__static_assert" >&5
14419 $as_echo "$pgac_cv__static_assert" >&6; }
14420 if test x"$pgac_cv__static_assert" = xyes ; then
14422 $as_echo "#define HAVE__STATIC_ASSERT 1" >>confdefs.h
14425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeof" >&5
14426 $as_echo_n "checking for typeof... " >&6; }
14427 if ${pgac_cv_c_typeof+:} false; then :
14428 $as_echo_n "(cached) " >&6
14429 else
14430 pgac_cv_c_typeof=no
14431 for pgac_kw in typeof __typeof__ decltype; do
14432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14433 /* end confdefs.h. */
14436 main ()
14438 int x = 0;
14439 $pgac_kw(x) y;
14440 y = x;
14441 return y;
14443 return 0;
14445 _ACEOF
14446 if ac_fn_c_try_compile "$LINENO"; then :
14447 pgac_cv_c_typeof=$pgac_kw
14449 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14450 test "$pgac_cv_c_typeof" != no && break
14451 done
14453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_typeof" >&5
14454 $as_echo "$pgac_cv_c_typeof" >&6; }
14455 if test "$pgac_cv_c_typeof" != no; then
14457 $as_echo "#define HAVE_TYPEOF 1" >>confdefs.h
14459 if test "$pgac_cv_c_typeof" != typeof; then
14461 cat >>confdefs.h <<_ACEOF
14462 #define typeof $pgac_cv_c_typeof
14463 _ACEOF
14467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_types_compatible_p" >&5
14468 $as_echo_n "checking for __builtin_types_compatible_p... " >&6; }
14469 if ${pgac_cv__types_compatible+:} false; then :
14470 $as_echo_n "(cached) " >&6
14471 else
14472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14473 /* end confdefs.h. */
14476 main ()
14478 int x; static int y[__builtin_types_compatible_p(__typeof__(x), int)];
14480 return 0;
14482 _ACEOF
14483 if ac_fn_c_try_compile "$LINENO"; then :
14484 pgac_cv__types_compatible=yes
14485 else
14486 pgac_cv__types_compatible=no
14488 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__types_compatible" >&5
14491 $as_echo "$pgac_cv__types_compatible" >&6; }
14492 if test x"$pgac_cv__types_compatible" = xyes ; then
14494 $as_echo "#define HAVE__BUILTIN_TYPES_COMPATIBLE_P 1" >>confdefs.h
14497 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_constant_p" >&5
14498 $as_echo_n "checking for __builtin_constant_p... " >&6; }
14499 if ${pgac_cv__builtin_constant_p+:} false; then :
14500 $as_echo_n "(cached) " >&6
14501 else
14502 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14503 /* end confdefs.h. */
14504 static int x;
14505 static int y[__builtin_constant_p(x) ? x : 1];
14506 static int z[__builtin_constant_p("string literal") ? 1 : x];
14509 _ACEOF
14510 if ac_fn_c_try_compile "$LINENO"; then :
14511 pgac_cv__builtin_constant_p=yes
14512 else
14513 pgac_cv__builtin_constant_p=no
14515 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_constant_p" >&5
14518 $as_echo "$pgac_cv__builtin_constant_p" >&6; }
14519 if test x"$pgac_cv__builtin_constant_p" = xyes ; then
14521 $as_echo "#define HAVE__BUILTIN_CONSTANT_P 1" >>confdefs.h
14524 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unreachable" >&5
14525 $as_echo_n "checking for __builtin_unreachable... " >&6; }
14526 if ${pgac_cv__builtin_unreachable+:} false; then :
14527 $as_echo_n "(cached) " >&6
14528 else
14529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14530 /* end confdefs.h. */
14533 main ()
14535 __builtin_unreachable();
14537 return 0;
14539 _ACEOF
14540 if ac_fn_c_try_link "$LINENO"; then :
14541 pgac_cv__builtin_unreachable=yes
14542 else
14543 pgac_cv__builtin_unreachable=no
14545 rm -f core conftest.err conftest.$ac_objext \
14546 conftest$ac_exeext conftest.$ac_ext
14548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_unreachable" >&5
14549 $as_echo "$pgac_cv__builtin_unreachable" >&6; }
14550 if test x"$pgac_cv__builtin_unreachable" = xyes ; then
14552 $as_echo "#define HAVE__BUILTIN_UNREACHABLE 1" >>confdefs.h
14555 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for computed goto support" >&5
14556 $as_echo_n "checking for computed goto support... " >&6; }
14557 if ${pgac_cv_computed_goto+:} false; then :
14558 $as_echo_n "(cached) " >&6
14559 else
14560 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14561 /* end confdefs.h. */
14564 main ()
14566 void *labeladdrs[] = {&&my_label};
14567 goto *labeladdrs[0];
14568 my_label:
14569 return 1;
14572 return 0;
14574 _ACEOF
14575 if ac_fn_c_try_compile "$LINENO"; then :
14576 pgac_cv_computed_goto=yes
14577 else
14578 pgac_cv_computed_goto=no
14580 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_computed_goto" >&5
14583 $as_echo "$pgac_cv_computed_goto" >&6; }
14584 if test x"$pgac_cv_computed_goto" = xyes ; then
14586 $as_echo "#define HAVE_COMPUTED_GOTO 1" >>confdefs.h
14589 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
14590 #include <time.h>
14593 if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
14595 cat >>confdefs.h <<_ACEOF
14596 #define HAVE_STRUCT_TM_TM_ZONE 1
14597 _ACEOF
14603 ac_fn_c_check_type "$LINENO" "union semun" "ac_cv_type_union_semun" "#include <sys/types.h>
14604 #ifdef HAVE_SYS_IPC_H
14605 #include <sys/ipc.h>
14606 #endif
14607 #ifdef HAVE_SYS_SEM_H
14608 #include <sys/sem.h>
14609 #endif
14611 if test "x$ac_cv_type_union_semun" = xyes; then :
14613 cat >>confdefs.h <<_ACEOF
14614 #define HAVE_UNION_SEMUN 1
14615 _ACEOF
14620 ac_fn_c_check_type "$LINENO" "struct sockaddr_un" "ac_cv_type_struct_sockaddr_un" "#include <sys/types.h>
14621 #ifdef HAVE_SYS_UN_H
14622 #include <sys/un.h>
14623 #endif
14626 if test "x$ac_cv_type_struct_sockaddr_un" = xyes; then :
14628 cat >>confdefs.h <<_ACEOF
14629 #define HAVE_STRUCT_SOCKADDR_UN 1
14630 _ACEOF
14635 ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "#include <sys/types.h>
14636 #include <sys/socket.h>
14639 if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
14641 cat >>confdefs.h <<_ACEOF
14642 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
14643 _ACEOF
14648 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
14649 #include <sys/socket.h>
14652 if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then :
14654 cat >>confdefs.h <<_ACEOF
14655 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
14656 _ACEOF
14660 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_family" "ac_cv_member_struct_sockaddr_storage___ss_family" "#include <sys/types.h>
14661 #include <sys/socket.h>
14664 if test "x$ac_cv_member_struct_sockaddr_storage___ss_family" = xyes; then :
14666 cat >>confdefs.h <<_ACEOF
14667 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1
14668 _ACEOF
14672 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_len" "ac_cv_member_struct_sockaddr_storage_ss_len" "#include <sys/types.h>
14673 #include <sys/socket.h>
14676 if test "x$ac_cv_member_struct_sockaddr_storage_ss_len" = xyes; then :
14678 cat >>confdefs.h <<_ACEOF
14679 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1
14680 _ACEOF
14684 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_len" "ac_cv_member_struct_sockaddr_storage___ss_len" "#include <sys/types.h>
14685 #include <sys/socket.h>
14688 if test "x$ac_cv_member_struct_sockaddr_storage___ss_len" = xyes; then :
14690 cat >>confdefs.h <<_ACEOF
14691 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN 1
14692 _ACEOF
14696 ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/types.h>
14697 #include <sys/socket.h>
14700 if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
14702 cat >>confdefs.h <<_ACEOF
14703 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
14704 _ACEOF
14709 ac_fn_c_check_type "$LINENO" "struct addrinfo" "ac_cv_type_struct_addrinfo" "#include <sys/types.h>
14710 #include <sys/socket.h>
14711 #include <netdb.h>
14714 if test "x$ac_cv_type_struct_addrinfo" = xyes; then :
14716 cat >>confdefs.h <<_ACEOF
14717 #define HAVE_STRUCT_ADDRINFO 1
14718 _ACEOF
14724 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for locale_t" >&5
14725 $as_echo_n "checking for locale_t... " >&6; }
14726 if ${pgac_cv_type_locale_t+:} false; then :
14727 $as_echo_n "(cached) " >&6
14728 else
14729 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14730 /* end confdefs.h. */
14731 #include <locale.h>
14732 locale_t x;
14734 main ()
14738 return 0;
14740 _ACEOF
14741 if ac_fn_c_try_compile "$LINENO"; then :
14742 pgac_cv_type_locale_t=yes
14743 else
14744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14745 /* end confdefs.h. */
14746 #include <xlocale.h>
14747 locale_t x;
14749 main ()
14753 return 0;
14755 _ACEOF
14756 if ac_fn_c_try_compile "$LINENO"; then :
14757 pgac_cv_type_locale_t='yes (in xlocale.h)'
14758 else
14759 pgac_cv_type_locale_t=no
14761 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14763 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_locale_t" >&5
14766 $as_echo "$pgac_cv_type_locale_t" >&6; }
14767 if test "$pgac_cv_type_locale_t" != no; then
14769 $as_echo "#define HAVE_LOCALE_T 1" >>confdefs.h
14772 if test "$pgac_cv_type_locale_t" = 'yes (in xlocale.h)'; then
14774 $as_echo "#define LOCALE_T_IN_XLOCALE 1" >>confdefs.h
14778 # MSVC doesn't cope well with defining restrict to __restrict, the
14779 # spelling it understands, because it conflicts with
14780 # __declspec(restrict). Therefore we define pg_restrict to the
14781 # appropriate definition, which presumably won't conflict.
14783 # Allow platforms with buggy compilers to force restrict to not be
14784 # used by setting $FORCE_DISABLE_RESTRICT=yes in the relevant
14785 # template.
14786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
14787 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
14788 if ${ac_cv_c_restrict+:} false; then :
14789 $as_echo_n "(cached) " >&6
14790 else
14791 ac_cv_c_restrict=no
14792 # The order here caters to the fact that C++ does not require restrict.
14793 for ac_kw in __restrict __restrict__ _Restrict restrict; do
14794 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14795 /* end confdefs.h. */
14796 typedef int * int_ptr;
14797 int foo (int_ptr $ac_kw ip) {
14798 return ip[0];
14801 main ()
14803 int s[1];
14804 int * $ac_kw t = s;
14805 t[0] = 0;
14806 return foo(t)
14808 return 0;
14810 _ACEOF
14811 if ac_fn_c_try_compile "$LINENO"; then :
14812 ac_cv_c_restrict=$ac_kw
14814 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14815 test "$ac_cv_c_restrict" != no && break
14816 done
14819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
14820 $as_echo "$ac_cv_c_restrict" >&6; }
14822 case $ac_cv_c_restrict in
14823 restrict) ;;
14824 no) $as_echo "#define restrict /**/" >>confdefs.h
14826 *) cat >>confdefs.h <<_ACEOF
14827 #define restrict $ac_cv_c_restrict
14828 _ACEOF
14830 esac
14832 if test "$ac_cv_c_restrict" = "no" -o "x$FORCE_DISABLE_RESTRICT" = "xyes"; then
14833 pg_restrict=""
14834 else
14835 pg_restrict="$ac_cv_c_restrict"
14838 cat >>confdefs.h <<_ACEOF
14839 #define pg_restrict $pg_restrict
14840 _ACEOF
14843 ac_fn_c_check_type "$LINENO" "struct cmsgcred" "ac_cv_type_struct_cmsgcred" "#include <sys/socket.h>
14844 #include <sys/param.h>
14845 #ifdef HAVE_SYS_UCRED_H
14846 #include <sys/ucred.h>
14847 #endif
14849 if test "x$ac_cv_type_struct_cmsgcred" = xyes; then :
14851 cat >>confdefs.h <<_ACEOF
14852 #define HAVE_STRUCT_CMSGCRED 1
14853 _ACEOF
14859 ac_fn_c_check_type "$LINENO" "struct option" "ac_cv_type_struct_option" "#ifdef HAVE_GETOPT_H
14860 #include <getopt.h>
14861 #endif
14863 if test "x$ac_cv_type_struct_option" = xyes; then :
14865 cat >>confdefs.h <<_ACEOF
14866 #define HAVE_STRUCT_OPTION 1
14867 _ACEOF
14873 if test "$with_zlib" = yes; then
14874 # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
14875 # did not). While we could work around the lack of z_streamp, it
14876 # seems unwise to encourage people to use such old zlib versions...
14877 ac_fn_c_check_type "$LINENO" "z_streamp" "ac_cv_type_z_streamp" "#include <zlib.h>
14879 if test "x$ac_cv_type_z_streamp" = xyes; then :
14881 else
14882 as_fn_error $? "zlib version is too old
14883 Use --without-zlib to disable zlib support." "$LINENO" 5
14888 case $host_cpu in
14889 x86_64)
14890 # On x86_64, check if we can compile a popcntq instruction
14891 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports x86_64 popcntq" >&5
14892 $as_echo_n "checking whether assembler supports x86_64 popcntq... " >&6; }
14893 if ${pgac_cv_have_x86_64_popcntq+:} false; then :
14894 $as_echo_n "(cached) " >&6
14895 else
14896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14897 /* end confdefs.h. */
14900 main ()
14902 long long x = 1; long long r;
14903 __asm__ __volatile__ (" popcntq %1,%0\n" : "=q"(r) : "rm"(x));
14905 return 0;
14907 _ACEOF
14908 if ac_fn_c_try_compile "$LINENO"; then :
14909 pgac_cv_have_x86_64_popcntq=yes
14910 else
14911 pgac_cv_have_x86_64_popcntq=no
14913 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_x86_64_popcntq" >&5
14916 $as_echo "$pgac_cv_have_x86_64_popcntq" >&6; }
14917 if test x"$pgac_cv_have_x86_64_popcntq" = xyes ; then
14919 $as_echo "#define HAVE_X86_64_POPCNTQ 1" >>confdefs.h
14923 ppc*|powerpc*)
14924 # On PPC, check if assembler supports LWARX instruction's mutex hint bit
14925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports lwarx hint bit" >&5
14926 $as_echo_n "checking whether assembler supports lwarx hint bit... " >&6; }
14927 if ${pgac_cv_have_ppc_mutex_hint+:} false; then :
14928 $as_echo_n "(cached) " >&6
14929 else
14930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14931 /* end confdefs.h. */
14934 main ()
14936 int a = 0; int *p = &a; int r;
14937 __asm__ __volatile__ (" lwarx %0,0,%1,1\n" : "=&r"(r) : "r"(p));
14939 return 0;
14941 _ACEOF
14942 if ac_fn_c_try_compile "$LINENO"; then :
14943 pgac_cv_have_ppc_mutex_hint=yes
14944 else
14945 pgac_cv_have_ppc_mutex_hint=no
14947 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_ppc_mutex_hint" >&5
14950 $as_echo "$pgac_cv_have_ppc_mutex_hint" >&6; }
14951 if test x"$pgac_cv_have_ppc_mutex_hint" = xyes ; then
14953 $as_echo "#define HAVE_PPC_LWARX_MUTEX_HINT 1" >>confdefs.h
14956 # Check if compiler accepts "i"(x) when __builtin_constant_p(x).
14957 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __builtin_constant_p(x) implies \"i\"(x) acceptance" >&5
14958 $as_echo_n "checking whether __builtin_constant_p(x) implies \"i\"(x) acceptance... " >&6; }
14959 if ${pgac_cv_have_i_constraint__builtin_constant_p+:} false; then :
14960 $as_echo_n "(cached) " >&6
14961 else
14962 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14963 /* end confdefs.h. */
14964 static inline int
14965 addi(int ra, int si)
14967 int res = 0;
14968 if (__builtin_constant_p(si))
14969 __asm__ __volatile__(
14970 " addi %0,%1,%2\n" : "=r"(res) : "b"(ra), "i"(si));
14971 return res;
14973 int test_adds(int x) { return addi(3, x) + addi(x, 5); }
14975 main ()
14979 return 0;
14981 _ACEOF
14982 if ac_fn_c_try_compile "$LINENO"; then :
14983 pgac_cv_have_i_constraint__builtin_constant_p=yes
14984 else
14985 pgac_cv_have_i_constraint__builtin_constant_p=no
14987 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_i_constraint__builtin_constant_p" >&5
14990 $as_echo "$pgac_cv_have_i_constraint__builtin_constant_p" >&6; }
14991 if test x"$pgac_cv_have_i_constraint__builtin_constant_p" = xyes ; then
14993 $as_echo "#define HAVE_I_CONSTRAINT__BUILTIN_CONSTANT_P 1" >>confdefs.h
14997 esac
14999 # Check largefile support. You might think this is a system service not a
15000 # compiler characteristic, but you'd be wrong. We must check this before
15001 # probing existence of related functions such as fseeko, since the largefile
15002 # defines can affect what is generated for that.
15003 if test "$PORTNAME" != "win32"; then
15004 # Check whether --enable-largefile was given.
15005 if test "${enable_largefile+set}" = set; then :
15006 enableval=$enable_largefile;
15009 if test "$enable_largefile" != no; then
15011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
15012 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
15013 if ${ac_cv_sys_largefile_CC+:} false; then :
15014 $as_echo_n "(cached) " >&6
15015 else
15016 ac_cv_sys_largefile_CC=no
15017 if test "$GCC" != yes; then
15018 ac_save_CC=$CC
15019 while :; do
15020 # IRIX 6.2 and later do not support large files by default,
15021 # so use the C compiler's -n32 option if that helps.
15022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15023 /* end confdefs.h. */
15024 #include <sys/types.h>
15025 /* Check that off_t can represent 2**63 - 1 correctly.
15026 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15027 since some C++ compilers masquerading as C compilers
15028 incorrectly reject 9223372036854775807. */
15029 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15030 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15031 && LARGE_OFF_T % 2147483647 == 1)
15032 ? 1 : -1];
15034 main ()
15038 return 0;
15040 _ACEOF
15041 if ac_fn_c_try_compile "$LINENO"; then :
15042 break
15044 rm -f core conftest.err conftest.$ac_objext
15045 CC="$CC -n32"
15046 if ac_fn_c_try_compile "$LINENO"; then :
15047 ac_cv_sys_largefile_CC=' -n32'; break
15049 rm -f core conftest.err conftest.$ac_objext
15050 break
15051 done
15052 CC=$ac_save_CC
15053 rm -f conftest.$ac_ext
15056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
15057 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
15058 if test "$ac_cv_sys_largefile_CC" != no; then
15059 CC=$CC$ac_cv_sys_largefile_CC
15062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
15063 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
15064 if ${ac_cv_sys_file_offset_bits+:} false; then :
15065 $as_echo_n "(cached) " >&6
15066 else
15067 while :; do
15068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15069 /* end confdefs.h. */
15070 #include <sys/types.h>
15071 /* Check that off_t can represent 2**63 - 1 correctly.
15072 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15073 since some C++ compilers masquerading as C compilers
15074 incorrectly reject 9223372036854775807. */
15075 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15076 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15077 && LARGE_OFF_T % 2147483647 == 1)
15078 ? 1 : -1];
15080 main ()
15084 return 0;
15086 _ACEOF
15087 if ac_fn_c_try_compile "$LINENO"; then :
15088 ac_cv_sys_file_offset_bits=no; break
15090 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15092 /* end confdefs.h. */
15093 #define _FILE_OFFSET_BITS 64
15094 #include <sys/types.h>
15095 /* Check that off_t can represent 2**63 - 1 correctly.
15096 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15097 since some C++ compilers masquerading as C compilers
15098 incorrectly reject 9223372036854775807. */
15099 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15100 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15101 && LARGE_OFF_T % 2147483647 == 1)
15102 ? 1 : -1];
15104 main ()
15108 return 0;
15110 _ACEOF
15111 if ac_fn_c_try_compile "$LINENO"; then :
15112 ac_cv_sys_file_offset_bits=64; break
15114 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15115 ac_cv_sys_file_offset_bits=unknown
15116 break
15117 done
15119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
15120 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
15121 case $ac_cv_sys_file_offset_bits in #(
15122 no | unknown) ;;
15124 cat >>confdefs.h <<_ACEOF
15125 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
15126 _ACEOF
15128 esac
15129 rm -rf conftest*
15130 if test $ac_cv_sys_file_offset_bits = unknown; then
15131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
15132 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
15133 if ${ac_cv_sys_large_files+:} false; then :
15134 $as_echo_n "(cached) " >&6
15135 else
15136 while :; do
15137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15138 /* end confdefs.h. */
15139 #include <sys/types.h>
15140 /* Check that off_t can represent 2**63 - 1 correctly.
15141 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15142 since some C++ compilers masquerading as C compilers
15143 incorrectly reject 9223372036854775807. */
15144 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15145 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15146 && LARGE_OFF_T % 2147483647 == 1)
15147 ? 1 : -1];
15149 main ()
15153 return 0;
15155 _ACEOF
15156 if ac_fn_c_try_compile "$LINENO"; then :
15157 ac_cv_sys_large_files=no; break
15159 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15161 /* end confdefs.h. */
15162 #define _LARGE_FILES 1
15163 #include <sys/types.h>
15164 /* Check that off_t can represent 2**63 - 1 correctly.
15165 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15166 since some C++ compilers masquerading as C compilers
15167 incorrectly reject 9223372036854775807. */
15168 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15169 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15170 && LARGE_OFF_T % 2147483647 == 1)
15171 ? 1 : -1];
15173 main ()
15177 return 0;
15179 _ACEOF
15180 if ac_fn_c_try_compile "$LINENO"; then :
15181 ac_cv_sys_large_files=1; break
15183 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15184 ac_cv_sys_large_files=unknown
15185 break
15186 done
15188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
15189 $as_echo "$ac_cv_sys_large_files" >&6; }
15190 case $ac_cv_sys_large_files in #(
15191 no | unknown) ;;
15193 cat >>confdefs.h <<_ACEOF
15194 #define _LARGE_FILES $ac_cv_sys_large_files
15195 _ACEOF
15197 esac
15198 rm -rf conftest*
15207 # The cast to long int works around a bug in the HP C Compiler
15208 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15209 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15210 # This bug is HP SR number 8606223364.
15211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
15212 $as_echo_n "checking size of off_t... " >&6; }
15213 if ${ac_cv_sizeof_off_t+:} false; then :
15214 $as_echo_n "(cached) " >&6
15215 else
15216 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "$ac_includes_default"; then :
15218 else
15219 if test "$ac_cv_type_off_t" = yes; then
15220 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15221 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15222 as_fn_error 77 "cannot compute sizeof (off_t)
15223 See \`config.log' for more details" "$LINENO" 5; }
15224 else
15225 ac_cv_sizeof_off_t=0
15230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
15231 $as_echo "$ac_cv_sizeof_off_t" >&6; }
15235 cat >>confdefs.h <<_ACEOF
15236 #define SIZEOF_OFF_T $ac_cv_sizeof_off_t
15237 _ACEOF
15241 # If we don't have largefile support, can't handle segsize >= 2GB.
15242 if test "$ac_cv_sizeof_off_t" -lt 8 -a "$segsize" != "1"; then
15243 as_fn_error $? "Large file support is not enabled. Segment size cannot be larger than 1GB." "$LINENO" 5
15246 # The cast to long int works around a bug in the HP C Compiler
15247 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15248 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15249 # This bug is HP SR number 8606223364.
15250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of bool" >&5
15251 $as_echo_n "checking size of bool... " >&6; }
15252 if ${ac_cv_sizeof_bool+:} false; then :
15253 $as_echo_n "(cached) " >&6
15254 else
15255 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (bool))" "ac_cv_sizeof_bool" "#ifdef HAVE_STDBOOL_H
15256 #include <stdbool.h>
15257 #endif
15258 "; then :
15260 else
15261 if test "$ac_cv_type_bool" = yes; then
15262 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15263 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15264 as_fn_error 77 "cannot compute sizeof (bool)
15265 See \`config.log' for more details" "$LINENO" 5; }
15266 else
15267 ac_cv_sizeof_bool=0
15272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_bool" >&5
15273 $as_echo "$ac_cv_sizeof_bool" >&6; }
15277 cat >>confdefs.h <<_ACEOF
15278 #define SIZEOF_BOOL $ac_cv_sizeof_bool
15279 _ACEOF
15283 if test "$ac_cv_header_stdbool_h" = yes -a "$ac_cv_sizeof_bool" = 1; then
15285 $as_echo "#define PG_USE_STDBOOL 1" >>confdefs.h
15291 ## Functions, global variables
15294 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int timezone" >&5
15295 $as_echo_n "checking for int timezone... " >&6; }
15296 if ${pgac_cv_var_int_timezone+:} false; then :
15297 $as_echo_n "(cached) " >&6
15298 else
15299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15300 /* end confdefs.h. */
15301 #include <time.h>
15302 int res;
15304 main ()
15306 #ifndef __CYGWIN__
15307 res = timezone / 60;
15308 #else
15309 res = _timezone / 60;
15310 #endif
15312 return 0;
15314 _ACEOF
15315 if ac_fn_c_try_link "$LINENO"; then :
15316 pgac_cv_var_int_timezone=yes
15317 else
15318 pgac_cv_var_int_timezone=no
15320 rm -f core conftest.err conftest.$ac_objext \
15321 conftest$ac_exeext conftest.$ac_ext
15323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_timezone" >&5
15324 $as_echo "$pgac_cv_var_int_timezone" >&6; }
15325 if test x"$pgac_cv_var_int_timezone" = xyes ; then
15327 $as_echo "#define HAVE_INT_TIMEZONE 1" >>confdefs.h
15330 { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for accept()" >&5
15331 $as_echo_n "checking types of arguments for accept()... " >&6; }
15332 if ${ac_cv_func_accept_return+:} false; then :
15333 $as_echo_n "(cached) " >&6
15334 else
15335 if ${ac_cv_func_accept_arg1+:} false; then :
15336 $as_echo_n "(cached) " >&6
15337 else
15338 if ${ac_cv_func_accept_arg2+:} false; then :
15339 $as_echo_n "(cached) " >&6
15340 else
15341 if ${ac_cv_func_accept_arg3+:} false; then :
15342 $as_echo_n "(cached) " >&6
15343 else
15344 for ac_cv_func_accept_return in 'int' 'SOCKET WSAAPI' 'unsigned int PASCAL'; do
15345 for ac_cv_func_accept_arg1 in 'int' 'SOCKET' 'unsigned int'; do
15346 for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
15347 for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
15348 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15349 /* end confdefs.h. */
15350 #include <sys/types.h>
15351 #include <sys/socket.h>
15352 extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
15353 _ACEOF
15354 if ac_fn_c_try_compile "$LINENO"; then :
15355 ac_not_found=no; break 4
15356 else
15357 ac_not_found=yes
15359 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15360 done
15361 done
15362 done
15363 done
15364 if test "$ac_not_found" = yes; then
15365 as_fn_error $? "could not determine argument types" "$LINENO" 5
15367 if test "$ac_cv_func_accept_arg3" = "void"; then
15368 ac_cv_func_accept_arg3=int
15378 { $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
15379 $as_echo "$ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&6; }
15381 cat >>confdefs.h <<_ACEOF
15382 #define ACCEPT_TYPE_RETURN $ac_cv_func_accept_return
15383 _ACEOF
15386 cat >>confdefs.h <<_ACEOF
15387 #define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
15388 _ACEOF
15391 cat >>confdefs.h <<_ACEOF
15392 #define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
15393 _ACEOF
15396 cat >>confdefs.h <<_ACEOF
15397 #define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
15398 _ACEOF
15401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday takes only one argument" >&5
15402 $as_echo_n "checking whether gettimeofday takes only one argument... " >&6; }
15403 if ${pgac_cv_func_gettimeofday_1arg+:} false; then :
15404 $as_echo_n "(cached) " >&6
15405 else
15406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15407 /* end confdefs.h. */
15408 #include <sys/time.h>
15410 main ()
15412 struct timeval *tp;
15413 struct timezone *tzp;
15414 gettimeofday(tp,tzp);
15416 return 0;
15418 _ACEOF
15419 if ac_fn_c_try_compile "$LINENO"; then :
15420 pgac_cv_func_gettimeofday_1arg=no
15421 else
15422 pgac_cv_func_gettimeofday_1arg=yes
15424 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_gettimeofday_1arg" >&5
15427 $as_echo "$pgac_cv_func_gettimeofday_1arg" >&6; }
15428 if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
15430 $as_echo "#define GETTIMEOFDAY_1ARG 1" >>confdefs.h
15434 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wcstombs_l declaration" >&5
15435 $as_echo_n "checking for wcstombs_l declaration... " >&6; }
15436 if ${pgac_cv_func_wcstombs_l+:} false; then :
15437 $as_echo_n "(cached) " >&6
15438 else
15439 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15440 /* end confdefs.h. */
15441 #include <stdlib.h>
15442 #include <locale.h>
15444 main ()
15446 #ifndef wcstombs_l
15447 (void) wcstombs_l;
15448 #endif
15450 return 0;
15452 _ACEOF
15453 if ac_fn_c_try_compile "$LINENO"; then :
15454 pgac_cv_func_wcstombs_l='yes'
15455 else
15456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15457 /* end confdefs.h. */
15458 #include <stdlib.h>
15459 #include <locale.h>
15460 #include <xlocale.h>
15462 main ()
15464 #ifndef wcstombs_l
15465 (void) wcstombs_l;
15466 #endif
15468 return 0;
15470 _ACEOF
15471 if ac_fn_c_try_compile "$LINENO"; then :
15472 pgac_cv_func_wcstombs_l='yes (in xlocale.h)'
15473 else
15474 pgac_cv_func_wcstombs_l='no'
15476 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15478 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_wcstombs_l" >&5
15481 $as_echo "$pgac_cv_func_wcstombs_l" >&6; }
15482 if test "$pgac_cv_func_wcstombs_l" = 'yes (in xlocale.h)'; then
15484 $as_echo "#define WCSTOMBS_L_IN_XLOCALE 1" >>confdefs.h
15488 # Some versions of libedit contain strlcpy(), setproctitle(), and other
15489 # symbols that that library has no business exposing to the world. Pending
15490 # acquisition of a clue by those developers, ignore libedit (including its
15491 # possible alias of libreadline) while checking for everything else.
15492 LIBS_including_readline="$LIBS"
15493 LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
15495 for ac_func in backtrace_symbols clock_gettime copyfile fdatasync getifaddrs getpeerucred getrlimit kqueue mbstowcs_l memset_s poll posix_fallocate ppoll pstat pthread_is_threaded_np readlink readv setproctitle setproctitle_fast setsid shm_open strchrnul strsignal symlink syncfs sync_file_range uselocale wcstombs_l writev
15496 do :
15497 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15498 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15499 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15500 cat >>confdefs.h <<_ACEOF
15501 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15502 _ACEOF
15505 done
15508 # These typically are compiler builtins, for which AC_CHECK_FUNCS fails.
15509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap16" >&5
15510 $as_echo_n "checking for __builtin_bswap16... " >&6; }
15511 if ${pgac_cv__builtin_bswap16+:} false; then :
15512 $as_echo_n "(cached) " >&6
15513 else
15514 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15515 /* end confdefs.h. */
15518 call__builtin_bswap16(int x)
15520 return __builtin_bswap16(x);
15523 main ()
15527 return 0;
15529 _ACEOF
15530 if ac_fn_c_try_link "$LINENO"; then :
15531 pgac_cv__builtin_bswap16=yes
15532 else
15533 pgac_cv__builtin_bswap16=no
15535 rm -f core conftest.err conftest.$ac_objext \
15536 conftest$ac_exeext conftest.$ac_ext
15538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap16" >&5
15539 $as_echo "$pgac_cv__builtin_bswap16" >&6; }
15540 if test x"${pgac_cv__builtin_bswap16}" = xyes ; then
15542 cat >>confdefs.h <<_ACEOF
15543 #define HAVE__BUILTIN_BSWAP16 1
15544 _ACEOF
15547 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap32" >&5
15548 $as_echo_n "checking for __builtin_bswap32... " >&6; }
15549 if ${pgac_cv__builtin_bswap32+:} false; then :
15550 $as_echo_n "(cached) " >&6
15551 else
15552 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15553 /* end confdefs.h. */
15556 call__builtin_bswap32(int x)
15558 return __builtin_bswap32(x);
15561 main ()
15565 return 0;
15567 _ACEOF
15568 if ac_fn_c_try_link "$LINENO"; then :
15569 pgac_cv__builtin_bswap32=yes
15570 else
15571 pgac_cv__builtin_bswap32=no
15573 rm -f core conftest.err conftest.$ac_objext \
15574 conftest$ac_exeext conftest.$ac_ext
15576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap32" >&5
15577 $as_echo "$pgac_cv__builtin_bswap32" >&6; }
15578 if test x"${pgac_cv__builtin_bswap32}" = xyes ; then
15580 cat >>confdefs.h <<_ACEOF
15581 #define HAVE__BUILTIN_BSWAP32 1
15582 _ACEOF
15585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap64" >&5
15586 $as_echo_n "checking for __builtin_bswap64... " >&6; }
15587 if ${pgac_cv__builtin_bswap64+:} false; then :
15588 $as_echo_n "(cached) " >&6
15589 else
15590 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15591 /* end confdefs.h. */
15594 call__builtin_bswap64(long int x)
15596 return __builtin_bswap64(x);
15599 main ()
15603 return 0;
15605 _ACEOF
15606 if ac_fn_c_try_link "$LINENO"; then :
15607 pgac_cv__builtin_bswap64=yes
15608 else
15609 pgac_cv__builtin_bswap64=no
15611 rm -f core conftest.err conftest.$ac_objext \
15612 conftest$ac_exeext conftest.$ac_ext
15614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap64" >&5
15615 $as_echo "$pgac_cv__builtin_bswap64" >&6; }
15616 if test x"${pgac_cv__builtin_bswap64}" = xyes ; then
15618 cat >>confdefs.h <<_ACEOF
15619 #define HAVE__BUILTIN_BSWAP64 1
15620 _ACEOF
15623 # We assume that we needn't test all widths of these explicitly:
15624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_clz" >&5
15625 $as_echo_n "checking for __builtin_clz... " >&6; }
15626 if ${pgac_cv__builtin_clz+:} false; then :
15627 $as_echo_n "(cached) " >&6
15628 else
15629 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15630 /* end confdefs.h. */
15633 call__builtin_clz(unsigned int x)
15635 return __builtin_clz(x);
15638 main ()
15642 return 0;
15644 _ACEOF
15645 if ac_fn_c_try_link "$LINENO"; then :
15646 pgac_cv__builtin_clz=yes
15647 else
15648 pgac_cv__builtin_clz=no
15650 rm -f core conftest.err conftest.$ac_objext \
15651 conftest$ac_exeext conftest.$ac_ext
15653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_clz" >&5
15654 $as_echo "$pgac_cv__builtin_clz" >&6; }
15655 if test x"${pgac_cv__builtin_clz}" = xyes ; then
15657 cat >>confdefs.h <<_ACEOF
15658 #define HAVE__BUILTIN_CLZ 1
15659 _ACEOF
15662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_ctz" >&5
15663 $as_echo_n "checking for __builtin_ctz... " >&6; }
15664 if ${pgac_cv__builtin_ctz+:} false; then :
15665 $as_echo_n "(cached) " >&6
15666 else
15667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15668 /* end confdefs.h. */
15671 call__builtin_ctz(unsigned int x)
15673 return __builtin_ctz(x);
15676 main ()
15680 return 0;
15682 _ACEOF
15683 if ac_fn_c_try_link "$LINENO"; then :
15684 pgac_cv__builtin_ctz=yes
15685 else
15686 pgac_cv__builtin_ctz=no
15688 rm -f core conftest.err conftest.$ac_objext \
15689 conftest$ac_exeext conftest.$ac_ext
15691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_ctz" >&5
15692 $as_echo "$pgac_cv__builtin_ctz" >&6; }
15693 if test x"${pgac_cv__builtin_ctz}" = xyes ; then
15695 cat >>confdefs.h <<_ACEOF
15696 #define HAVE__BUILTIN_CTZ 1
15697 _ACEOF
15700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_popcount" >&5
15701 $as_echo_n "checking for __builtin_popcount... " >&6; }
15702 if ${pgac_cv__builtin_popcount+:} false; then :
15703 $as_echo_n "(cached) " >&6
15704 else
15705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15706 /* end confdefs.h. */
15709 call__builtin_popcount(unsigned int x)
15711 return __builtin_popcount(x);
15714 main ()
15718 return 0;
15720 _ACEOF
15721 if ac_fn_c_try_link "$LINENO"; then :
15722 pgac_cv__builtin_popcount=yes
15723 else
15724 pgac_cv__builtin_popcount=no
15726 rm -f core conftest.err conftest.$ac_objext \
15727 conftest$ac_exeext conftest.$ac_ext
15729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_popcount" >&5
15730 $as_echo "$pgac_cv__builtin_popcount" >&6; }
15731 if test x"${pgac_cv__builtin_popcount}" = xyes ; then
15733 cat >>confdefs.h <<_ACEOF
15734 #define HAVE__BUILTIN_POPCOUNT 1
15735 _ACEOF
15739 # We require 64-bit fseeko() to be available, but run this check anyway
15740 # in case it finds that _LARGEFILE_SOURCE has to be #define'd for that.
15741 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
15742 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
15743 if ${ac_cv_sys_largefile_source+:} false; then :
15744 $as_echo_n "(cached) " >&6
15745 else
15746 while :; do
15747 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15748 /* end confdefs.h. */
15749 #include <sys/types.h> /* for off_t */
15750 #include <stdio.h>
15752 main ()
15754 int (*fp) (FILE *, off_t, int) = fseeko;
15755 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15757 return 0;
15759 _ACEOF
15760 if ac_fn_c_try_link "$LINENO"; then :
15761 ac_cv_sys_largefile_source=no; break
15763 rm -f core conftest.err conftest.$ac_objext \
15764 conftest$ac_exeext conftest.$ac_ext
15765 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15766 /* end confdefs.h. */
15767 #define _LARGEFILE_SOURCE 1
15768 #include <sys/types.h> /* for off_t */
15769 #include <stdio.h>
15771 main ()
15773 int (*fp) (FILE *, off_t, int) = fseeko;
15774 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15776 return 0;
15778 _ACEOF
15779 if ac_fn_c_try_link "$LINENO"; then :
15780 ac_cv_sys_largefile_source=1; break
15782 rm -f core conftest.err conftest.$ac_objext \
15783 conftest$ac_exeext conftest.$ac_ext
15784 ac_cv_sys_largefile_source=unknown
15785 break
15786 done
15788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
15789 $as_echo "$ac_cv_sys_largefile_source" >&6; }
15790 case $ac_cv_sys_largefile_source in #(
15791 no | unknown) ;;
15793 cat >>confdefs.h <<_ACEOF
15794 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
15795 _ACEOF
15797 esac
15798 rm -rf conftest*
15800 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
15801 # in glibc 2.1.3, but that breaks too many other things.
15802 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
15803 if test $ac_cv_sys_largefile_source != unknown; then
15805 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
15810 # Make sure there's a declaration for sigwait(), then make sure
15811 # that it conforms to the POSIX standard (there seem to still be
15812 # some platforms out there with pre-POSIX sigwait()). On Solaris,
15813 # _POSIX_PTHREAD_SEMANTICS affects the result, but we already
15814 # added that to CPPFLAGS.
15815 # The Clang compiler raises a warning for an undeclared identifier that matches
15816 # a compiler builtin function. All extant Clang versions are affected, as of
15817 # Clang 3.6.0. Test a builtin known to every version. This problem affects the
15818 # C and Objective C languages, but Clang does report an error under C++ and
15819 # Objective C++.
15821 # Passing -fno-builtin to the compiler would suppress this problem. That
15822 # strategy would have the advantage of being insensitive to stray warnings, but
15823 # it would make tests less realistic.
15824 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how $CC reports undeclared, standard C functions" >&5
15825 $as_echo_n "checking how $CC reports undeclared, standard C functions... " >&6; }
15826 if ${ac_cv_c_decl_report+:} false; then :
15827 $as_echo_n "(cached) " >&6
15828 else
15829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15830 /* end confdefs.h. */
15833 main ()
15835 (void) strchr;
15837 return 0;
15839 _ACEOF
15840 if ac_fn_c_try_compile "$LINENO"; then :
15841 if test -s conftest.err; then :
15842 # For AC_CHECK_DECL to react to warnings, the compiler must be silent on
15843 # valid AC_CHECK_DECL input. No library function is consistently available
15844 # on freestanding implementations, so test against a dummy declaration.
15845 # Include always-available headers on the off chance that they somehow
15846 # elicit warnings.
15847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15848 /* end confdefs.h. */
15849 #include <float.h>
15850 #include <limits.h>
15851 #include <stdarg.h>
15852 #include <stddef.h>
15853 extern void ac_decl (int, char *);
15855 main ()
15857 #ifdef __cplusplus
15858 (void) ac_decl ((int) 0, (char *) 0);
15859 (void) ac_decl;
15860 #else
15861 (void) ac_decl;
15862 #endif
15865 return 0;
15867 _ACEOF
15868 if ac_fn_c_try_compile "$LINENO"; then :
15869 if test -s conftest.err; then :
15870 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15871 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15872 as_fn_error $? "cannot detect from compiler exit status or warnings
15873 See \`config.log' for more details" "$LINENO" 5; }
15874 else
15875 ac_cv_c_decl_report=warning
15877 else
15878 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15879 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15880 as_fn_error $? "cannot compile a simple declaration test
15881 See \`config.log' for more details" "$LINENO" 5; }
15883 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15884 else
15885 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15886 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15887 as_fn_error $? "compiler does not report undeclared identifiers
15888 See \`config.log' for more details" "$LINENO" 5; }
15890 else
15891 ac_cv_c_decl_report=error
15893 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_decl_report" >&5
15896 $as_echo "$ac_cv_c_decl_report" >&6; }
15898 case $ac_cv_c_decl_report in
15899 warning) ac_c_decl_warn_flag=yes ;;
15900 *) ac_c_decl_warn_flag= ;;
15901 esac
15903 ac_fn_c_check_decl "$LINENO" "sigwait" "ac_cv_have_decl_sigwait" "#include <signal.h>
15905 if test "x$ac_cv_have_decl_sigwait" = xyes; then :
15906 ac_have_decl=1
15907 else
15908 ac_have_decl=0
15911 cat >>confdefs.h <<_ACEOF
15912 #define HAVE_DECL_SIGWAIT $ac_have_decl
15913 _ACEOF
15915 if test "x$ac_cv_have_decl_sigwait" = xyes; then
15916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for POSIX-conforming sigwait declaration" >&5
15917 $as_echo_n "checking for POSIX-conforming sigwait declaration... " >&6; }
15918 if ${pgac_cv_have_posix_decl_sigwait+:} false; then :
15919 $as_echo_n "(cached) " >&6
15920 else
15921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15922 /* end confdefs.h. */
15924 #include <signal.h>
15925 int sigwait(const sigset_t *set, int *sig);
15928 main ()
15932 return 0;
15934 _ACEOF
15935 if ac_fn_c_try_compile "$LINENO"; then :
15936 pgac_cv_have_posix_decl_sigwait=yes
15937 else
15938 pgac_cv_have_posix_decl_sigwait=no
15940 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_posix_decl_sigwait" >&5
15943 $as_echo "$pgac_cv_have_posix_decl_sigwait" >&6; }
15945 if test "x$pgac_cv_have_posix_decl_sigwait" = xyes; then
15947 $as_echo "#define HAVE_POSIX_DECL_SIGWAIT 1" >>confdefs.h
15949 else
15950 # On non-Windows, libpq requires POSIX sigwait() for thread safety.
15951 if test "$enable_thread_safety" = yes -a "$PORTNAME" != "win32"; then
15952 as_fn_error $? "POSIX-conforming sigwait is required to enable thread safety." "$LINENO" 5
15956 # posix_fadvise() is a no-op on Solaris, so don't incur function overhead
15957 # by calling it, 2009-04-02
15958 # http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/posix_fadvise.c
15959 if test "$PORTNAME" != "solaris"; then :
15961 for ac_func in posix_fadvise
15962 do :
15963 ac_fn_c_check_func "$LINENO" "posix_fadvise" "ac_cv_func_posix_fadvise"
15964 if test "x$ac_cv_func_posix_fadvise" = xyes; then :
15965 cat >>confdefs.h <<_ACEOF
15966 #define HAVE_POSIX_FADVISE 1
15967 _ACEOF
15970 done
15972 ac_fn_c_check_decl "$LINENO" "posix_fadvise" "ac_cv_have_decl_posix_fadvise" "#include <fcntl.h>
15974 if test "x$ac_cv_have_decl_posix_fadvise" = xyes; then :
15975 ac_have_decl=1
15976 else
15977 ac_have_decl=0
15980 cat >>confdefs.h <<_ACEOF
15981 #define HAVE_DECL_POSIX_FADVISE $ac_have_decl
15982 _ACEOF
15985 fi # fi
15987 ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "#include <unistd.h>
15989 if test "x$ac_cv_have_decl_fdatasync" = xyes; then :
15990 ac_have_decl=1
15991 else
15992 ac_have_decl=0
15995 cat >>confdefs.h <<_ACEOF
15996 #define HAVE_DECL_FDATASYNC $ac_have_decl
15997 _ACEOF
15999 ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
16000 if test "x$ac_cv_have_decl_strlcat" = xyes; then :
16001 ac_have_decl=1
16002 else
16003 ac_have_decl=0
16006 cat >>confdefs.h <<_ACEOF
16007 #define HAVE_DECL_STRLCAT $ac_have_decl
16008 _ACEOF
16009 ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
16010 if test "x$ac_cv_have_decl_strlcpy" = xyes; then :
16011 ac_have_decl=1
16012 else
16013 ac_have_decl=0
16016 cat >>confdefs.h <<_ACEOF
16017 #define HAVE_DECL_STRLCPY $ac_have_decl
16018 _ACEOF
16019 ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
16020 if test "x$ac_cv_have_decl_strnlen" = xyes; then :
16021 ac_have_decl=1
16022 else
16023 ac_have_decl=0
16026 cat >>confdefs.h <<_ACEOF
16027 #define HAVE_DECL_STRNLEN $ac_have_decl
16028 _ACEOF
16031 # We can't use AC_REPLACE_FUNCS to replace these functions, because it
16032 # won't handle deployment target restrictions on macOS
16033 ac_fn_c_check_decl "$LINENO" "preadv" "ac_cv_have_decl_preadv" "#include <sys/uio.h>
16035 if test "x$ac_cv_have_decl_preadv" = xyes; then :
16036 ac_have_decl=1
16037 else
16038 ac_have_decl=0
16041 cat >>confdefs.h <<_ACEOF
16042 #define HAVE_DECL_PREADV $ac_have_decl
16043 _ACEOF
16044 if test $ac_have_decl = 1; then :
16046 else
16047 case " $LIBOBJS " in
16048 *" preadv.$ac_objext "* ) ;;
16049 *) LIBOBJS="$LIBOBJS preadv.$ac_objext"
16051 esac
16055 ac_fn_c_check_decl "$LINENO" "pwritev" "ac_cv_have_decl_pwritev" "#include <sys/uio.h>
16057 if test "x$ac_cv_have_decl_pwritev" = xyes; then :
16058 ac_have_decl=1
16059 else
16060 ac_have_decl=0
16063 cat >>confdefs.h <<_ACEOF
16064 #define HAVE_DECL_PWRITEV $ac_have_decl
16065 _ACEOF
16066 if test $ac_have_decl = 1; then :
16068 else
16069 case " $LIBOBJS " in
16070 *" pwritev.$ac_objext "* ) ;;
16071 *) LIBOBJS="$LIBOBJS pwritev.$ac_objext"
16073 esac
16078 # This is probably only present on macOS, but may as well check always
16079 ac_fn_c_check_decl "$LINENO" "F_FULLFSYNC" "ac_cv_have_decl_F_FULLFSYNC" "#include <fcntl.h>
16081 if test "x$ac_cv_have_decl_F_FULLFSYNC" = xyes; then :
16082 ac_have_decl=1
16083 else
16084 ac_have_decl=0
16087 cat >>confdefs.h <<_ACEOF
16088 #define HAVE_DECL_F_FULLFSYNC $ac_have_decl
16089 _ACEOF
16092 ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
16094 if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
16095 ac_have_decl=1
16096 else
16097 ac_have_decl=0
16100 cat >>confdefs.h <<_ACEOF
16101 #define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
16102 _ACEOF
16103 ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
16105 if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
16106 ac_have_decl=1
16107 else
16108 ac_have_decl=0
16111 cat >>confdefs.h <<_ACEOF
16112 #define HAVE_DECL_RTLD_NOW $ac_have_decl
16113 _ACEOF
16116 ac_fn_c_check_type "$LINENO" "struct sockaddr_in6" "ac_cv_type_struct_sockaddr_in6" "$ac_includes_default
16117 #include <netinet/in.h>
16119 if test "x$ac_cv_type_struct_sockaddr_in6" = xyes; then :
16121 $as_echo "#define HAVE_IPV6 1" >>confdefs.h
16126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PS_STRINGS" >&5
16127 $as_echo_n "checking for PS_STRINGS... " >&6; }
16128 if ${pgac_cv_var_PS_STRINGS+:} false; then :
16129 $as_echo_n "(cached) " >&6
16130 else
16131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16132 /* end confdefs.h. */
16133 #include <machine/vmparam.h>
16134 #include <sys/exec.h>
16137 main ()
16139 PS_STRINGS->ps_nargvstr = 1;
16140 PS_STRINGS->ps_argvstr = "foo";
16142 return 0;
16144 _ACEOF
16145 if ac_fn_c_try_link "$LINENO"; then :
16146 pgac_cv_var_PS_STRINGS=yes
16147 else
16148 pgac_cv_var_PS_STRINGS=no
16150 rm -f core conftest.err conftest.$ac_objext \
16151 conftest$ac_exeext conftest.$ac_ext
16153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_PS_STRINGS" >&5
16154 $as_echo "$pgac_cv_var_PS_STRINGS" >&6; }
16155 if test "$pgac_cv_var_PS_STRINGS" = yes ; then
16157 $as_echo "#define HAVE_PS_STRINGS 1" >>confdefs.h
16161 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
16162 if test "x$ac_cv_func_dlopen" = xyes; then :
16163 $as_echo "#define HAVE_DLOPEN 1" >>confdefs.h
16165 else
16166 case " $LIBOBJS " in
16167 *" dlopen.$ac_objext "* ) ;;
16168 *) LIBOBJS="$LIBOBJS dlopen.$ac_objext"
16170 esac
16174 ac_fn_c_check_func "$LINENO" "explicit_bzero" "ac_cv_func_explicit_bzero"
16175 if test "x$ac_cv_func_explicit_bzero" = xyes; then :
16176 $as_echo "#define HAVE_EXPLICIT_BZERO 1" >>confdefs.h
16178 else
16179 case " $LIBOBJS " in
16180 *" explicit_bzero.$ac_objext "* ) ;;
16181 *) LIBOBJS="$LIBOBJS explicit_bzero.$ac_objext"
16183 esac
16187 ac_fn_c_check_func "$LINENO" "fls" "ac_cv_func_fls"
16188 if test "x$ac_cv_func_fls" = xyes; then :
16189 $as_echo "#define HAVE_FLS 1" >>confdefs.h
16191 else
16192 case " $LIBOBJS " in
16193 *" fls.$ac_objext "* ) ;;
16194 *) LIBOBJS="$LIBOBJS fls.$ac_objext"
16196 esac
16200 ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt"
16201 if test "x$ac_cv_func_getopt" = xyes; then :
16202 $as_echo "#define HAVE_GETOPT 1" >>confdefs.h
16204 else
16205 case " $LIBOBJS " in
16206 *" getopt.$ac_objext "* ) ;;
16207 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
16209 esac
16213 ac_fn_c_check_func "$LINENO" "getpeereid" "ac_cv_func_getpeereid"
16214 if test "x$ac_cv_func_getpeereid" = xyes; then :
16215 $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
16217 else
16218 case " $LIBOBJS " in
16219 *" getpeereid.$ac_objext "* ) ;;
16220 *) LIBOBJS="$LIBOBJS getpeereid.$ac_objext"
16222 esac
16226 ac_fn_c_check_func "$LINENO" "getrusage" "ac_cv_func_getrusage"
16227 if test "x$ac_cv_func_getrusage" = xyes; then :
16228 $as_echo "#define HAVE_GETRUSAGE 1" >>confdefs.h
16230 else
16231 case " $LIBOBJS " in
16232 *" getrusage.$ac_objext "* ) ;;
16233 *) LIBOBJS="$LIBOBJS getrusage.$ac_objext"
16235 esac
16239 ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
16240 if test "x$ac_cv_func_inet_aton" = xyes; then :
16241 $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
16243 else
16244 case " $LIBOBJS " in
16245 *" inet_aton.$ac_objext "* ) ;;
16246 *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
16248 esac
16252 ac_fn_c_check_func "$LINENO" "link" "ac_cv_func_link"
16253 if test "x$ac_cv_func_link" = xyes; then :
16254 $as_echo "#define HAVE_LINK 1" >>confdefs.h
16256 else
16257 case " $LIBOBJS " in
16258 *" link.$ac_objext "* ) ;;
16259 *) LIBOBJS="$LIBOBJS link.$ac_objext"
16261 esac
16265 ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
16266 if test "x$ac_cv_func_mkdtemp" = xyes; then :
16267 $as_echo "#define HAVE_MKDTEMP 1" >>confdefs.h
16269 else
16270 case " $LIBOBJS " in
16271 *" mkdtemp.$ac_objext "* ) ;;
16272 *) LIBOBJS="$LIBOBJS mkdtemp.$ac_objext"
16274 esac
16278 ac_fn_c_check_func "$LINENO" "pread" "ac_cv_func_pread"
16279 if test "x$ac_cv_func_pread" = xyes; then :
16280 $as_echo "#define HAVE_PREAD 1" >>confdefs.h
16282 else
16283 case " $LIBOBJS " in
16284 *" pread.$ac_objext "* ) ;;
16285 *) LIBOBJS="$LIBOBJS pread.$ac_objext"
16287 esac
16291 ac_fn_c_check_func "$LINENO" "pwrite" "ac_cv_func_pwrite"
16292 if test "x$ac_cv_func_pwrite" = xyes; then :
16293 $as_echo "#define HAVE_PWRITE 1" >>confdefs.h
16295 else
16296 case " $LIBOBJS " in
16297 *" pwrite.$ac_objext "* ) ;;
16298 *) LIBOBJS="$LIBOBJS pwrite.$ac_objext"
16300 esac
16304 ac_fn_c_check_func "$LINENO" "random" "ac_cv_func_random"
16305 if test "x$ac_cv_func_random" = xyes; then :
16306 $as_echo "#define HAVE_RANDOM 1" >>confdefs.h
16308 else
16309 case " $LIBOBJS " in
16310 *" random.$ac_objext "* ) ;;
16311 *) LIBOBJS="$LIBOBJS random.$ac_objext"
16313 esac
16317 ac_fn_c_check_func "$LINENO" "srandom" "ac_cv_func_srandom"
16318 if test "x$ac_cv_func_srandom" = xyes; then :
16319 $as_echo "#define HAVE_SRANDOM 1" >>confdefs.h
16321 else
16322 case " $LIBOBJS " in
16323 *" srandom.$ac_objext "* ) ;;
16324 *) LIBOBJS="$LIBOBJS srandom.$ac_objext"
16326 esac
16330 ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
16331 if test "x$ac_cv_func_strlcat" = xyes; then :
16332 $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
16334 else
16335 case " $LIBOBJS " in
16336 *" strlcat.$ac_objext "* ) ;;
16337 *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
16339 esac
16343 ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
16344 if test "x$ac_cv_func_strlcpy" = xyes; then :
16345 $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
16347 else
16348 case " $LIBOBJS " in
16349 *" strlcpy.$ac_objext "* ) ;;
16350 *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
16352 esac
16356 ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
16357 if test "x$ac_cv_func_strnlen" = xyes; then :
16358 $as_echo "#define HAVE_STRNLEN 1" >>confdefs.h
16360 else
16361 case " $LIBOBJS " in
16362 *" strnlen.$ac_objext "* ) ;;
16363 *) LIBOBJS="$LIBOBJS strnlen.$ac_objext"
16365 esac
16369 ac_fn_c_check_func "$LINENO" "strtof" "ac_cv_func_strtof"
16370 if test "x$ac_cv_func_strtof" = xyes; then :
16371 $as_echo "#define HAVE_STRTOF 1" >>confdefs.h
16373 else
16374 case " $LIBOBJS " in
16375 *" strtof.$ac_objext "* ) ;;
16376 *) LIBOBJS="$LIBOBJS strtof.$ac_objext"
16378 esac
16384 if test "$enable_thread_safety" = yes; then
16385 ac_fn_c_check_func "$LINENO" "pthread_barrier_wait" "ac_cv_func_pthread_barrier_wait"
16386 if test "x$ac_cv_func_pthread_barrier_wait" = xyes; then :
16387 $as_echo "#define HAVE_PTHREAD_BARRIER_WAIT 1" >>confdefs.h
16389 else
16390 case " $LIBOBJS " in
16391 *" pthread_barrier_wait.$ac_objext "* ) ;;
16392 *) LIBOBJS="$LIBOBJS pthread_barrier_wait.$ac_objext"
16394 esac
16401 if test "$PORTNAME" = "win32" -o "$PORTNAME" = "cygwin"; then
16402 # Cygwin and (apparently, based on test results) Mingw both
16403 # have a broken strtof(), so substitute the same replacement
16404 # code we use with VS2013. That's not a perfect fix, since
16405 # (unlike with VS2013) it doesn't avoid double-rounding, but
16406 # we have no better options. To get that, though, we have to
16407 # force the file to be compiled despite HAVE_STRTOF.
16408 case " $LIBOBJS " in
16409 *" strtof.$ac_objext "* ) ;;
16410 *) LIBOBJS="$LIBOBJS strtof.$ac_objext"
16412 esac
16414 { $as_echo "$as_me:${as_lineno-$LINENO}: On $host_os we will use our strtof wrapper." >&5
16415 $as_echo "$as_me: On $host_os we will use our strtof wrapper." >&6;}
16418 case $host_os in
16419 # Windows uses a specialised env handler
16420 mingw*)
16422 $as_echo "#define HAVE_SETENV 1" >>confdefs.h
16425 $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
16427 ac_cv_func_setenv=yes
16428 ac_cv_func_unsetenv=yes
16431 ac_fn_c_check_func "$LINENO" "setenv" "ac_cv_func_setenv"
16432 if test "x$ac_cv_func_setenv" = xyes; then :
16433 $as_echo "#define HAVE_SETENV 1" >>confdefs.h
16435 else
16436 case " $LIBOBJS " in
16437 *" setenv.$ac_objext "* ) ;;
16438 *) LIBOBJS="$LIBOBJS setenv.$ac_objext"
16440 esac
16444 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
16445 if test "x$ac_cv_func_unsetenv" = xyes; then :
16446 $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
16448 else
16449 case " $LIBOBJS " in
16450 *" unsetenv.$ac_objext "* ) ;;
16451 *) LIBOBJS="$LIBOBJS unsetenv.$ac_objext"
16453 esac
16459 esac
16461 # System's version of getaddrinfo(), if any, may be used only if we found
16462 # a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
16463 # We use only our own getaddrinfo.c on Windows, but it's time to revisit that.
16464 if test x"$ac_cv_type_struct_addrinfo" = xyes && \
16465 test "$PORTNAME" != "win32"; then
16466 ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo"
16467 if test "x$ac_cv_func_getaddrinfo" = xyes; then :
16468 $as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
16470 else
16471 case " $LIBOBJS " in
16472 *" getaddrinfo.$ac_objext "* ) ;;
16473 *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
16475 esac
16480 else
16481 case " $LIBOBJS " in
16482 *" getaddrinfo.$ac_objext "* ) ;;
16483 *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
16485 esac
16489 # Similarly, use system's getopt_long() only if system provides struct option.
16490 if test x"$ac_cv_type_struct_option" = xyes ; then
16491 ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long"
16492 if test "x$ac_cv_func_getopt_long" = xyes; then :
16493 $as_echo "#define HAVE_GETOPT_LONG 1" >>confdefs.h
16495 else
16496 case " $LIBOBJS " in
16497 *" getopt_long.$ac_objext "* ) ;;
16498 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
16500 esac
16505 else
16506 case " $LIBOBJS " in
16507 *" getopt_long.$ac_objext "* ) ;;
16508 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
16510 esac
16514 # On OpenBSD and Solaris, getopt() doesn't do what we want for long options
16515 # (i.e., allow '-' as a flag character), so use our version on those platforms.
16516 if test "$PORTNAME" = "openbsd" -o "$PORTNAME" = "solaris"; then
16517 case " $LIBOBJS " in
16518 *" getopt.$ac_objext "* ) ;;
16519 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
16521 esac
16525 # mingw has adopted a GNU-centric interpretation of optind/optreset,
16526 # so always use our version on Windows.
16527 if test "$PORTNAME" = "win32"; then
16528 case " $LIBOBJS " in
16529 *" getopt.$ac_objext "* ) ;;
16530 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
16532 esac
16534 case " $LIBOBJS " in
16535 *" getopt_long.$ac_objext "* ) ;;
16536 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
16538 esac
16542 # Win32 (really MinGW) support
16543 if test "$PORTNAME" = "win32"; then
16544 for ac_func in _configthreadlocale
16545 do :
16546 ac_fn_c_check_func "$LINENO" "_configthreadlocale" "ac_cv_func__configthreadlocale"
16547 if test "x$ac_cv_func__configthreadlocale" = xyes; then :
16548 cat >>confdefs.h <<_ACEOF
16549 #define HAVE__CONFIGTHREADLOCALE 1
16550 _ACEOF
16553 done
16555 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
16556 if test "x$ac_cv_func_gettimeofday" = xyes; then :
16557 $as_echo "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
16559 else
16560 case " $LIBOBJS " in
16561 *" gettimeofday.$ac_objext "* ) ;;
16562 *) LIBOBJS="$LIBOBJS gettimeofday.$ac_objext"
16564 esac
16569 case " $LIBOBJS " in
16570 *" dirmod.$ac_objext "* ) ;;
16571 *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
16573 esac
16575 case " $LIBOBJS " in
16576 *" kill.$ac_objext "* ) ;;
16577 *) LIBOBJS="$LIBOBJS kill.$ac_objext"
16579 esac
16581 case " $LIBOBJS " in
16582 *" open.$ac_objext "* ) ;;
16583 *) LIBOBJS="$LIBOBJS open.$ac_objext"
16585 esac
16587 case " $LIBOBJS " in
16588 *" system.$ac_objext "* ) ;;
16589 *) LIBOBJS="$LIBOBJS system.$ac_objext"
16591 esac
16593 case " $LIBOBJS " in
16594 *" win32env.$ac_objext "* ) ;;
16595 *) LIBOBJS="$LIBOBJS win32env.$ac_objext"
16597 esac
16599 case " $LIBOBJS " in
16600 *" win32error.$ac_objext "* ) ;;
16601 *) LIBOBJS="$LIBOBJS win32error.$ac_objext"
16603 esac
16605 case " $LIBOBJS " in
16606 *" win32security.$ac_objext "* ) ;;
16607 *) LIBOBJS="$LIBOBJS win32security.$ac_objext"
16609 esac
16611 case " $LIBOBJS " in
16612 *" win32setlocale.$ac_objext "* ) ;;
16613 *) LIBOBJS="$LIBOBJS win32setlocale.$ac_objext"
16615 esac
16617 case " $LIBOBJS " in
16618 *" win32stat.$ac_objext "* ) ;;
16619 *) LIBOBJS="$LIBOBJS win32stat.$ac_objext"
16621 esac
16624 $as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
16626 ac_fn_c_check_type "$LINENO" "MINIDUMP_TYPE" "ac_cv_type_MINIDUMP_TYPE" "
16627 #define WIN32_LEAN_AND_MEAN
16628 #include <windows.h>
16629 #include <string.h>
16630 #include <dbghelp.h>
16632 if test "x$ac_cv_type_MINIDUMP_TYPE" = xyes; then :
16634 cat >>confdefs.h <<_ACEOF
16635 #define HAVE_MINIDUMP_TYPE 1
16636 _ACEOF
16638 pgac_minidump_type=yes
16639 else
16640 pgac_minidump_type=no
16644 if test x"$pgac_minidump_type" = x"yes" ; then
16645 have_win32_dbghelp=yes
16647 else
16648 have_win32_dbghelp=no
16652 # Cygwin needs only a bit of that
16653 if test "$PORTNAME" = "cygwin"; then
16654 case " $LIBOBJS " in
16655 *" dirmod.$ac_objext "* ) ;;
16656 *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
16658 esac
16662 ac_fn_c_check_func "$LINENO" "syslog" "ac_cv_func_syslog"
16663 if test "x$ac_cv_func_syslog" = xyes; then :
16664 ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default"
16665 if test "x$ac_cv_header_syslog_h" = xyes; then :
16667 $as_echo "#define HAVE_SYSLOG 1" >>confdefs.h
16675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opterr" >&5
16676 $as_echo_n "checking for opterr... " >&6; }
16677 if ${pgac_cv_var_int_opterr+:} false; then :
16678 $as_echo_n "(cached) " >&6
16679 else
16680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16681 /* end confdefs.h. */
16682 #include <unistd.h>
16684 main ()
16686 extern int opterr; opterr = 1;
16688 return 0;
16690 _ACEOF
16691 if ac_fn_c_try_link "$LINENO"; then :
16692 pgac_cv_var_int_opterr=yes
16693 else
16694 pgac_cv_var_int_opterr=no
16696 rm -f core conftest.err conftest.$ac_objext \
16697 conftest$ac_exeext conftest.$ac_ext
16699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_opterr" >&5
16700 $as_echo "$pgac_cv_var_int_opterr" >&6; }
16701 if test x"$pgac_cv_var_int_opterr" = x"yes"; then
16703 $as_echo "#define HAVE_INT_OPTERR 1" >>confdefs.h
16707 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for optreset" >&5
16708 $as_echo_n "checking for optreset... " >&6; }
16709 if ${pgac_cv_var_int_optreset+:} false; then :
16710 $as_echo_n "(cached) " >&6
16711 else
16712 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16713 /* end confdefs.h. */
16714 #include <unistd.h>
16716 main ()
16718 extern int optreset; optreset = 1;
16720 return 0;
16722 _ACEOF
16723 if ac_fn_c_try_link "$LINENO"; then :
16724 pgac_cv_var_int_optreset=yes
16725 else
16726 pgac_cv_var_int_optreset=no
16728 rm -f core conftest.err conftest.$ac_objext \
16729 conftest$ac_exeext conftest.$ac_ext
16731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_optreset" >&5
16732 $as_echo "$pgac_cv_var_int_optreset" >&6; }
16733 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
16735 $as_echo "#define HAVE_INT_OPTRESET 1" >>confdefs.h
16739 for ac_func in strtoll __strtoll strtoq
16740 do :
16741 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16742 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16743 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16744 cat >>confdefs.h <<_ACEOF
16745 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16746 _ACEOF
16747 break
16749 done
16751 for ac_func in strtoull __strtoull strtouq
16752 do :
16753 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16754 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16755 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16756 cat >>confdefs.h <<_ACEOF
16757 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16758 _ACEOF
16759 break
16761 done
16763 # strto[u]ll may exist but not be declared
16764 ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
16765 if test "x$ac_cv_have_decl_strtoll" = xyes; then :
16766 ac_have_decl=1
16767 else
16768 ac_have_decl=0
16771 cat >>confdefs.h <<_ACEOF
16772 #define HAVE_DECL_STRTOLL $ac_have_decl
16773 _ACEOF
16774 ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
16775 if test "x$ac_cv_have_decl_strtoull" = xyes; then :
16776 ac_have_decl=1
16777 else
16778 ac_have_decl=0
16781 cat >>confdefs.h <<_ACEOF
16782 #define HAVE_DECL_STRTOULL $ac_have_decl
16783 _ACEOF
16786 if test "$with_icu" = yes; then
16787 ac_save_CPPFLAGS=$CPPFLAGS
16788 CPPFLAGS="$ICU_CFLAGS $CPPFLAGS"
16790 # Verify we have ICU's header files
16791 ac_fn_c_check_header_mongrel "$LINENO" "unicode/ucol.h" "ac_cv_header_unicode_ucol_h" "$ac_includes_default"
16792 if test "x$ac_cv_header_unicode_ucol_h" = xyes; then :
16794 else
16795 as_fn_error $? "header file <unicode/ucol.h> is required for ICU" "$LINENO" 5
16800 CPPFLAGS=$ac_save_CPPFLAGS
16803 if test "$with_llvm" = yes; then
16805 # Check which functionality is present
16806 SAVE_CPPFLAGS="$CPPFLAGS"
16807 CPPFLAGS="$CPPFLAGS $LLVM_CPPFLAGS"
16808 ac_fn_c_check_decl "$LINENO" "LLVMOrcGetSymbolAddressIn" "ac_cv_have_decl_LLVMOrcGetSymbolAddressIn" "#include <llvm-c/OrcBindings.h>
16810 if test "x$ac_cv_have_decl_LLVMOrcGetSymbolAddressIn" = xyes; then :
16811 ac_have_decl=1
16812 else
16813 ac_have_decl=0
16816 cat >>confdefs.h <<_ACEOF
16817 #define HAVE_DECL_LLVMORCGETSYMBOLADDRESSIN $ac_have_decl
16818 _ACEOF
16820 ac_fn_c_check_decl "$LINENO" "LLVMGetHostCPUName" "ac_cv_have_decl_LLVMGetHostCPUName" "#include <llvm-c/TargetMachine.h>
16822 if test "x$ac_cv_have_decl_LLVMGetHostCPUName" = xyes; then :
16823 ac_have_decl=1
16824 else
16825 ac_have_decl=0
16828 cat >>confdefs.h <<_ACEOF
16829 #define HAVE_DECL_LLVMGETHOSTCPUNAME $ac_have_decl
16830 _ACEOF
16831 ac_fn_c_check_decl "$LINENO" "LLVMGetHostCPUFeatures" "ac_cv_have_decl_LLVMGetHostCPUFeatures" "#include <llvm-c/TargetMachine.h>
16833 if test "x$ac_cv_have_decl_LLVMGetHostCPUFeatures" = xyes; then :
16834 ac_have_decl=1
16835 else
16836 ac_have_decl=0
16839 cat >>confdefs.h <<_ACEOF
16840 #define HAVE_DECL_LLVMGETHOSTCPUFEATURES $ac_have_decl
16841 _ACEOF
16843 ac_fn_c_check_decl "$LINENO" "LLVMCreateGDBRegistrationListener" "ac_cv_have_decl_LLVMCreateGDBRegistrationListener" "#include <llvm-c/ExecutionEngine.h>
16845 if test "x$ac_cv_have_decl_LLVMCreateGDBRegistrationListener" = xyes; then :
16846 ac_have_decl=1
16847 else
16848 ac_have_decl=0
16851 cat >>confdefs.h <<_ACEOF
16852 #define HAVE_DECL_LLVMCREATEGDBREGISTRATIONLISTENER $ac_have_decl
16853 _ACEOF
16854 ac_fn_c_check_decl "$LINENO" "LLVMCreatePerfJITEventListener" "ac_cv_have_decl_LLVMCreatePerfJITEventListener" "#include <llvm-c/ExecutionEngine.h>
16856 if test "x$ac_cv_have_decl_LLVMCreatePerfJITEventListener" = xyes; then :
16857 ac_have_decl=1
16858 else
16859 ac_have_decl=0
16862 cat >>confdefs.h <<_ACEOF
16863 #define HAVE_DECL_LLVMCREATEPERFJITEVENTLISTENER $ac_have_decl
16864 _ACEOF
16866 CPPFLAGS="$SAVE_CPPFLAGS"
16870 # Lastly, restore full LIBS list and check for readline/libedit symbols
16871 LIBS="$LIBS_including_readline"
16873 if test "$with_readline" = yes; then
16874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_append_character" >&5
16875 $as_echo_n "checking for rl_completion_append_character... " >&6; }
16876 if ${pgac_cv_var_rl_completion_append_character+:} false; then :
16877 $as_echo_n "(cached) " >&6
16878 else
16879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16880 /* end confdefs.h. */
16881 #include <stdio.h>
16882 #if defined(HAVE_READLINE_READLINE_H)
16883 #include <readline/readline.h>
16884 #elif defined(HAVE_EDITLINE_READLINE_H)
16885 #include <editline/readline.h>
16886 #elif defined(HAVE_READLINE_H)
16887 #include <readline.h>
16888 #endif
16891 main ()
16893 rl_completion_append_character = 'x';
16895 return 0;
16897 _ACEOF
16898 if ac_fn_c_try_link "$LINENO"; then :
16899 pgac_cv_var_rl_completion_append_character=yes
16900 else
16901 pgac_cv_var_rl_completion_append_character=no
16903 rm -f core conftest.err conftest.$ac_objext \
16904 conftest$ac_exeext conftest.$ac_ext
16906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_completion_append_character" >&5
16907 $as_echo "$pgac_cv_var_rl_completion_append_character" >&6; }
16908 if test x"$pgac_cv_var_rl_completion_append_character" = x"yes"; then
16910 $as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
16913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_suppress_quote" >&5
16914 $as_echo_n "checking for rl_completion_suppress_quote... " >&6; }
16915 if ${pgac_cv_var_rl_completion_suppress_quote+:} false; then :
16916 $as_echo_n "(cached) " >&6
16917 else
16918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16919 /* end confdefs.h. */
16920 #include <stdio.h>
16921 #if defined(HAVE_READLINE_READLINE_H)
16922 #include <readline/readline.h>
16923 #elif defined(HAVE_EDITLINE_READLINE_H)
16924 #include <editline/readline.h>
16925 #elif defined(HAVE_READLINE_H)
16926 #include <readline.h>
16927 #endif
16930 main ()
16932 rl_completion_suppress_quote = 1;
16934 return 0;
16936 _ACEOF
16937 if ac_fn_c_try_link "$LINENO"; then :
16938 pgac_cv_var_rl_completion_suppress_quote=yes
16939 else
16940 pgac_cv_var_rl_completion_suppress_quote=no
16942 rm -f core conftest.err conftest.$ac_objext \
16943 conftest$ac_exeext conftest.$ac_ext
16945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_completion_suppress_quote" >&5
16946 $as_echo "$pgac_cv_var_rl_completion_suppress_quote" >&6; }
16947 if test x"$pgac_cv_var_rl_completion_suppress_quote" = x"yes"; then
16949 $as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_QUOTE 1" >>confdefs.h
16952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_filename_quote_characters" >&5
16953 $as_echo_n "checking for rl_filename_quote_characters... " >&6; }
16954 if ${pgac_cv_var_rl_filename_quote_characters+:} false; then :
16955 $as_echo_n "(cached) " >&6
16956 else
16957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16958 /* end confdefs.h. */
16959 #include <stdio.h>
16960 #if defined(HAVE_READLINE_READLINE_H)
16961 #include <readline/readline.h>
16962 #elif defined(HAVE_EDITLINE_READLINE_H)
16963 #include <editline/readline.h>
16964 #elif defined(HAVE_READLINE_H)
16965 #include <readline.h>
16966 #endif
16969 main ()
16971 rl_filename_quote_characters = "x";
16973 return 0;
16975 _ACEOF
16976 if ac_fn_c_try_link "$LINENO"; then :
16977 pgac_cv_var_rl_filename_quote_characters=yes
16978 else
16979 pgac_cv_var_rl_filename_quote_characters=no
16981 rm -f core conftest.err conftest.$ac_objext \
16982 conftest$ac_exeext conftest.$ac_ext
16984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_filename_quote_characters" >&5
16985 $as_echo "$pgac_cv_var_rl_filename_quote_characters" >&6; }
16986 if test x"$pgac_cv_var_rl_filename_quote_characters" = x"yes"; then
16988 $as_echo "#define HAVE_RL_FILENAME_QUOTE_CHARACTERS 1" >>confdefs.h
16991 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_filename_quoting_function" >&5
16992 $as_echo_n "checking for rl_filename_quoting_function... " >&6; }
16993 if ${pgac_cv_var_rl_filename_quoting_function+:} false; then :
16994 $as_echo_n "(cached) " >&6
16995 else
16996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16997 /* end confdefs.h. */
16998 #include <stdio.h>
16999 #if defined(HAVE_READLINE_READLINE_H)
17000 #include <readline/readline.h>
17001 #elif defined(HAVE_EDITLINE_READLINE_H)
17002 #include <editline/readline.h>
17003 #elif defined(HAVE_READLINE_H)
17004 #include <readline.h>
17005 #endif
17008 main ()
17010 rl_filename_quoting_function = 0;
17012 return 0;
17014 _ACEOF
17015 if ac_fn_c_try_link "$LINENO"; then :
17016 pgac_cv_var_rl_filename_quoting_function=yes
17017 else
17018 pgac_cv_var_rl_filename_quoting_function=no
17020 rm -f core conftest.err conftest.$ac_objext \
17021 conftest$ac_exeext conftest.$ac_ext
17023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_filename_quoting_function" >&5
17024 $as_echo "$pgac_cv_var_rl_filename_quoting_function" >&6; }
17025 if test x"$pgac_cv_var_rl_filename_quoting_function" = x"yes"; then
17027 $as_echo "#define HAVE_RL_FILENAME_QUOTING_FUNCTION 1" >>confdefs.h
17031 for ac_func in rl_completion_matches rl_filename_completion_function rl_reset_screen_size
17032 do :
17033 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17034 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17035 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17036 cat >>confdefs.h <<_ACEOF
17037 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17038 _ACEOF
17041 done
17043 for ac_func in append_history history_truncate_file
17044 do :
17045 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17046 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17047 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17048 cat >>confdefs.h <<_ACEOF
17049 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17050 _ACEOF
17053 done
17058 # This test makes sure that run tests work at all. Sometimes a shared
17059 # library is found by the linker, but the runtime linker can't find it.
17060 # This check should come after all modifications of compiler or linker
17061 # variables, and before any other run tests.
17062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking test program" >&5
17063 $as_echo_n "checking test program... " >&6; }
17064 if test "$cross_compiling" = yes; then :
17065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling" >&5
17066 $as_echo "cross-compiling" >&6; }
17067 else
17068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17069 /* end confdefs.h. */
17070 int main() { return 0; }
17071 _ACEOF
17072 if ac_fn_c_try_run "$LINENO"; then :
17073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17074 $as_echo "ok" >&6; }
17075 else
17076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
17077 $as_echo "failed" >&6; }
17078 as_fn_error $? "
17079 Could not execute a simple test program. This may be a problem
17080 related to locating shared libraries. Check the file 'config.log'
17081 for the exact reason." "$LINENO" 5
17083 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17084 conftest.$ac_objext conftest.beam conftest.$ac_ext
17088 # --------------------
17089 # Run tests below here
17090 # --------------------
17093 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long int is 64 bits" >&5
17094 $as_echo_n "checking whether long int is 64 bits... " >&6; }
17095 if ${pgac_cv_type_long_int_64+:} false; then :
17096 $as_echo_n "(cached) " >&6
17097 else
17098 if test "$cross_compiling" = yes; then :
17099 # If cross-compiling, check the size reported by the compiler and
17100 # trust that the arithmetic works.
17101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17102 /* end confdefs.h. */
17105 main ()
17107 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
17108 test_array [0] = 0;
17109 return test_array [0];
17112 return 0;
17114 _ACEOF
17115 if ac_fn_c_try_compile "$LINENO"; then :
17116 pgac_cv_type_long_int_64=yes
17117 else
17118 pgac_cv_type_long_int_64=no
17120 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17121 else
17122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17123 /* end confdefs.h. */
17124 typedef long int ac_int64;
17127 * These are globals to discourage the compiler from folding all the
17128 * arithmetic tests down to compile-time constants.
17130 ac_int64 a = 20000001;
17131 ac_int64 b = 40000005;
17133 int does_int64_work()
17135 ac_int64 c,d;
17137 if (sizeof(ac_int64) != 8)
17138 return 0; /* definitely not the right size */
17140 /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
17141 c = a * b;
17142 d = (c + b) / b;
17143 if (d != a+1)
17144 return 0;
17145 return 1;
17149 main() {
17150 return (! does_int64_work());
17152 _ACEOF
17153 if ac_fn_c_try_run "$LINENO"; then :
17154 pgac_cv_type_long_int_64=yes
17155 else
17156 pgac_cv_type_long_int_64=no
17158 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17159 conftest.$ac_objext conftest.beam conftest.$ac_ext
17163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_int_64" >&5
17164 $as_echo "$pgac_cv_type_long_int_64" >&6; }
17166 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
17167 if test x"$pgac_cv_type_long_int_64" = xyes ; then
17169 $as_echo "#define HAVE_LONG_INT_64 1" >>confdefs.h
17174 if test x"$HAVE_LONG_INT_64" = x"yes" ; then
17175 pg_int64_type="long int"
17176 else
17177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long long int is 64 bits" >&5
17178 $as_echo_n "checking whether long long int is 64 bits... " >&6; }
17179 if ${pgac_cv_type_long_long_int_64+:} false; then :
17180 $as_echo_n "(cached) " >&6
17181 else
17182 if test "$cross_compiling" = yes; then :
17183 # If cross-compiling, check the size reported by the compiler and
17184 # trust that the arithmetic works.
17185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17186 /* end confdefs.h. */
17189 main ()
17191 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
17192 test_array [0] = 0;
17193 return test_array [0];
17196 return 0;
17198 _ACEOF
17199 if ac_fn_c_try_compile "$LINENO"; then :
17200 pgac_cv_type_long_long_int_64=yes
17201 else
17202 pgac_cv_type_long_long_int_64=no
17204 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17205 else
17206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17207 /* end confdefs.h. */
17208 typedef long long int ac_int64;
17211 * These are globals to discourage the compiler from folding all the
17212 * arithmetic tests down to compile-time constants.
17214 ac_int64 a = 20000001;
17215 ac_int64 b = 40000005;
17217 int does_int64_work()
17219 ac_int64 c,d;
17221 if (sizeof(ac_int64) != 8)
17222 return 0; /* definitely not the right size */
17224 /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
17225 c = a * b;
17226 d = (c + b) / b;
17227 if (d != a+1)
17228 return 0;
17229 return 1;
17233 main() {
17234 return (! does_int64_work());
17236 _ACEOF
17237 if ac_fn_c_try_run "$LINENO"; then :
17238 pgac_cv_type_long_long_int_64=yes
17239 else
17240 pgac_cv_type_long_long_int_64=no
17242 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17243 conftest.$ac_objext conftest.beam conftest.$ac_ext
17247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_long_int_64" >&5
17248 $as_echo "$pgac_cv_type_long_long_int_64" >&6; }
17250 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
17251 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
17253 $as_echo "#define HAVE_LONG_LONG_INT_64 1" >>confdefs.h
17257 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
17258 pg_int64_type="long long int"
17259 else
17260 as_fn_error $? "Cannot find a working 64-bit integer type." "$LINENO" 5
17265 cat >>confdefs.h <<_ACEOF
17266 #define PG_INT64_TYPE $pg_int64_type
17267 _ACEOF
17270 # Select the printf length modifier that goes with that, too.
17271 if test x"$pg_int64_type" = x"long long int" ; then
17272 INT64_MODIFIER='"ll"'
17273 else
17274 INT64_MODIFIER='"l"'
17278 cat >>confdefs.h <<_ACEOF
17279 #define INT64_MODIFIER $INT64_MODIFIER
17280 _ACEOF
17283 # has to be down here, rather than with the other builtins, because
17284 # the test uses PG_INT64_TYPE.
17285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_mul_overflow" >&5
17286 $as_echo_n "checking for __builtin_mul_overflow... " >&6; }
17287 if ${pgac_cv__builtin_op_overflow+:} false; then :
17288 $as_echo_n "(cached) " >&6
17289 else
17290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17291 /* end confdefs.h. */
17293 PG_INT64_TYPE a = 1;
17294 PG_INT64_TYPE b = 1;
17295 PG_INT64_TYPE result;
17296 int oflo;
17299 main ()
17301 oflo = __builtin_mul_overflow(a, b, &result);
17303 return 0;
17305 _ACEOF
17306 if ac_fn_c_try_link "$LINENO"; then :
17307 pgac_cv__builtin_op_overflow=yes
17308 else
17309 pgac_cv__builtin_op_overflow=no
17311 rm -f core conftest.err conftest.$ac_objext \
17312 conftest$ac_exeext conftest.$ac_ext
17314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_op_overflow" >&5
17315 $as_echo "$pgac_cv__builtin_op_overflow" >&6; }
17316 if test x"$pgac_cv__builtin_op_overflow" = xyes ; then
17318 $as_echo "#define HAVE__BUILTIN_OP_OVERFLOW 1" >>confdefs.h
17322 # Check size of void *, size_t (enables tweaks for > 32bit address space)
17323 # The cast to long int works around a bug in the HP C Compiler
17324 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17325 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17326 # This bug is HP SR number 8606223364.
17327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
17328 $as_echo_n "checking size of void *... " >&6; }
17329 if ${ac_cv_sizeof_void_p+:} false; then :
17330 $as_echo_n "(cached) " >&6
17331 else
17332 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then :
17334 else
17335 if test "$ac_cv_type_void_p" = yes; then
17336 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17337 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17338 as_fn_error 77 "cannot compute sizeof (void *)
17339 See \`config.log' for more details" "$LINENO" 5; }
17340 else
17341 ac_cv_sizeof_void_p=0
17346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
17347 $as_echo "$ac_cv_sizeof_void_p" >&6; }
17351 cat >>confdefs.h <<_ACEOF
17352 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
17353 _ACEOF
17356 # The cast to long int works around a bug in the HP C Compiler
17357 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17358 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17359 # This bug is HP SR number 8606223364.
17360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
17361 $as_echo_n "checking size of size_t... " >&6; }
17362 if ${ac_cv_sizeof_size_t+:} false; then :
17363 $as_echo_n "(cached) " >&6
17364 else
17365 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"; then :
17367 else
17368 if test "$ac_cv_type_size_t" = yes; then
17369 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17370 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17371 as_fn_error 77 "cannot compute sizeof (size_t)
17372 See \`config.log' for more details" "$LINENO" 5; }
17373 else
17374 ac_cv_sizeof_size_t=0
17379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
17380 $as_echo "$ac_cv_sizeof_size_t" >&6; }
17384 cat >>confdefs.h <<_ACEOF
17385 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
17386 _ACEOF
17389 # The cast to long int works around a bug in the HP C Compiler
17390 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17391 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17392 # This bug is HP SR number 8606223364.
17393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
17394 $as_echo_n "checking size of long... " >&6; }
17395 if ${ac_cv_sizeof_long+:} false; then :
17396 $as_echo_n "(cached) " >&6
17397 else
17398 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
17400 else
17401 if test "$ac_cv_type_long" = yes; then
17402 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17403 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17404 as_fn_error 77 "cannot compute sizeof (long)
17405 See \`config.log' for more details" "$LINENO" 5; }
17406 else
17407 ac_cv_sizeof_long=0
17412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
17413 $as_echo "$ac_cv_sizeof_long" >&6; }
17417 cat >>confdefs.h <<_ACEOF
17418 #define SIZEOF_LONG $ac_cv_sizeof_long
17419 _ACEOF
17423 # Determine memory alignment requirements for the basic C data types.
17425 # The cast to long int works around a bug in the HP C Compiler,
17426 # see AC_CHECK_SIZEOF for more information.
17427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of short" >&5
17428 $as_echo_n "checking alignment of short... " >&6; }
17429 if ${ac_cv_alignof_short+:} false; then :
17430 $as_echo_n "(cached) " >&6
17431 else
17432 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_short" "$ac_includes_default
17433 #ifndef offsetof
17434 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17435 #endif
17436 typedef struct { char x; short y; } ac__type_alignof_;"; then :
17438 else
17439 if test "$ac_cv_type_short" = yes; then
17440 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17441 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17442 as_fn_error 77 "cannot compute alignment of short
17443 See \`config.log' for more details" "$LINENO" 5; }
17444 else
17445 ac_cv_alignof_short=0
17450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_short" >&5
17451 $as_echo "$ac_cv_alignof_short" >&6; }
17455 cat >>confdefs.h <<_ACEOF
17456 #define ALIGNOF_SHORT $ac_cv_alignof_short
17457 _ACEOF
17460 # The cast to long int works around a bug in the HP C Compiler,
17461 # see AC_CHECK_SIZEOF for more information.
17462 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of int" >&5
17463 $as_echo_n "checking alignment of int... " >&6; }
17464 if ${ac_cv_alignof_int+:} false; then :
17465 $as_echo_n "(cached) " >&6
17466 else
17467 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_int" "$ac_includes_default
17468 #ifndef offsetof
17469 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17470 #endif
17471 typedef struct { char x; int y; } ac__type_alignof_;"; then :
17473 else
17474 if test "$ac_cv_type_int" = yes; then
17475 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17476 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17477 as_fn_error 77 "cannot compute alignment of int
17478 See \`config.log' for more details" "$LINENO" 5; }
17479 else
17480 ac_cv_alignof_int=0
17485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_int" >&5
17486 $as_echo "$ac_cv_alignof_int" >&6; }
17490 cat >>confdefs.h <<_ACEOF
17491 #define ALIGNOF_INT $ac_cv_alignof_int
17492 _ACEOF
17495 # The cast to long int works around a bug in the HP C Compiler,
17496 # see AC_CHECK_SIZEOF for more information.
17497 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long" >&5
17498 $as_echo_n "checking alignment of long... " >&6; }
17499 if ${ac_cv_alignof_long+:} false; then :
17500 $as_echo_n "(cached) " >&6
17501 else
17502 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long" "$ac_includes_default
17503 #ifndef offsetof
17504 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17505 #endif
17506 typedef struct { char x; long y; } ac__type_alignof_;"; then :
17508 else
17509 if test "$ac_cv_type_long" = yes; then
17510 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17511 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17512 as_fn_error 77 "cannot compute alignment of long
17513 See \`config.log' for more details" "$LINENO" 5; }
17514 else
17515 ac_cv_alignof_long=0
17520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long" >&5
17521 $as_echo "$ac_cv_alignof_long" >&6; }
17525 cat >>confdefs.h <<_ACEOF
17526 #define ALIGNOF_LONG $ac_cv_alignof_long
17527 _ACEOF
17530 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
17531 # The cast to long int works around a bug in the HP C Compiler,
17532 # see AC_CHECK_SIZEOF for more information.
17533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long long int" >&5
17534 $as_echo_n "checking alignment of long long int... " >&6; }
17535 if ${ac_cv_alignof_long_long_int+:} false; then :
17536 $as_echo_n "(cached) " >&6
17537 else
17538 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long_long_int" "$ac_includes_default
17539 #ifndef offsetof
17540 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17541 #endif
17542 typedef struct { char x; long long int y; } ac__type_alignof_;"; then :
17544 else
17545 if test "$ac_cv_type_long_long_int" = yes; then
17546 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17547 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17548 as_fn_error 77 "cannot compute alignment of long long int
17549 See \`config.log' for more details" "$LINENO" 5; }
17550 else
17551 ac_cv_alignof_long_long_int=0
17556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long_long_int" >&5
17557 $as_echo "$ac_cv_alignof_long_long_int" >&6; }
17561 cat >>confdefs.h <<_ACEOF
17562 #define ALIGNOF_LONG_LONG_INT $ac_cv_alignof_long_long_int
17563 _ACEOF
17567 # The cast to long int works around a bug in the HP C Compiler,
17568 # see AC_CHECK_SIZEOF for more information.
17569 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of double" >&5
17570 $as_echo_n "checking alignment of double... " >&6; }
17571 if ${ac_cv_alignof_double+:} false; then :
17572 $as_echo_n "(cached) " >&6
17573 else
17574 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_double" "$ac_includes_default
17575 #ifndef offsetof
17576 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17577 #endif
17578 typedef struct { char x; double y; } ac__type_alignof_;"; then :
17580 else
17581 if test "$ac_cv_type_double" = yes; then
17582 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17583 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17584 as_fn_error 77 "cannot compute alignment of double
17585 See \`config.log' for more details" "$LINENO" 5; }
17586 else
17587 ac_cv_alignof_double=0
17592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_double" >&5
17593 $as_echo "$ac_cv_alignof_double" >&6; }
17597 cat >>confdefs.h <<_ACEOF
17598 #define ALIGNOF_DOUBLE $ac_cv_alignof_double
17599 _ACEOF
17603 # Compute maximum alignment of any basic type.
17604 # We assume long's alignment is at least as strong as char, short, or int;
17605 # but we must check long long (if it is being used for int64) and double.
17606 # Note that we intentionally do not consider any types wider than 64 bits,
17607 # as allowing MAXIMUM_ALIGNOF to exceed 8 would be too much of a penalty
17608 # for disk and memory space.
17610 MAX_ALIGNOF=$ac_cv_alignof_long
17611 if test $MAX_ALIGNOF -lt $ac_cv_alignof_double ; then
17612 MAX_ALIGNOF=$ac_cv_alignof_double
17614 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $ac_cv_alignof_long_long_int ; then
17615 MAX_ALIGNOF="$ac_cv_alignof_long_long_int"
17618 cat >>confdefs.h <<_ACEOF
17619 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
17620 _ACEOF
17624 # Some platforms predefine the types int8, int16, etc. Only check
17625 # a (hopefully) representative subset.
17626 ac_fn_c_check_type "$LINENO" "int8" "ac_cv_type_int8" "#include <stdio.h>
17628 if test "x$ac_cv_type_int8" = xyes; then :
17630 cat >>confdefs.h <<_ACEOF
17631 #define HAVE_INT8 1
17632 _ACEOF
17636 ac_fn_c_check_type "$LINENO" "uint8" "ac_cv_type_uint8" "#include <stdio.h>
17638 if test "x$ac_cv_type_uint8" = xyes; then :
17640 cat >>confdefs.h <<_ACEOF
17641 #define HAVE_UINT8 1
17642 _ACEOF
17646 ac_fn_c_check_type "$LINENO" "int64" "ac_cv_type_int64" "#include <stdio.h>
17648 if test "x$ac_cv_type_int64" = xyes; then :
17650 cat >>confdefs.h <<_ACEOF
17651 #define HAVE_INT64 1
17652 _ACEOF
17656 ac_fn_c_check_type "$LINENO" "uint64" "ac_cv_type_uint64" "#include <stdio.h>
17658 if test "x$ac_cv_type_uint64" = xyes; then :
17660 cat >>confdefs.h <<_ACEOF
17661 #define HAVE_UINT64 1
17662 _ACEOF
17668 # Some compilers offer a 128-bit integer scalar type.
17669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128" >&5
17670 $as_echo_n "checking for __int128... " >&6; }
17671 if ${pgac_cv__128bit_int+:} false; then :
17672 $as_echo_n "(cached) " >&6
17673 else
17674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17675 /* end confdefs.h. */
17678 * We don't actually run this test, just link it to verify that any support
17679 * functions needed for __int128 are present.
17681 * These are globals to discourage the compiler from folding all the
17682 * arithmetic tests down to compile-time constants. We do not have
17683 * convenient support for 128bit literals at this point...
17685 __int128 a = 48828125;
17686 __int128 b = 97656250;
17689 main ()
17692 __int128 c,d;
17693 a = (a << 12) + 1; /* 200000000001 */
17694 b = (b << 12) + 5; /* 400000000005 */
17695 /* try the most relevant arithmetic ops */
17696 c = a * b;
17697 d = (c + b) / b;
17698 /* must use the results, else compiler may optimize arithmetic away */
17699 if (d != a+1)
17700 return 1;
17703 return 0;
17705 _ACEOF
17706 if ac_fn_c_try_link "$LINENO"; then :
17707 pgac_cv__128bit_int=yes
17708 else
17709 pgac_cv__128bit_int=no
17711 rm -f core conftest.err conftest.$ac_objext \
17712 conftest$ac_exeext conftest.$ac_ext
17714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int" >&5
17715 $as_echo "$pgac_cv__128bit_int" >&6; }
17716 if test x"$pgac_cv__128bit_int" = xyes ; then
17717 # Use of non-default alignment with __int128 tickles bugs in some compilers.
17718 # If not cross-compiling, we can test for bugs and disable use of __int128
17719 # with buggy compilers. If cross-compiling, hope for the best.
17720 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83925
17721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128 alignment bug" >&5
17722 $as_echo_n "checking for __int128 alignment bug... " >&6; }
17723 if ${pgac_cv__128bit_int_bug+:} false; then :
17724 $as_echo_n "(cached) " >&6
17725 else
17726 if test "$cross_compiling" = yes; then :
17727 pgac_cv__128bit_int_bug="assuming ok"
17728 else
17729 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17730 /* end confdefs.h. */
17732 /* This must match the corresponding code in c.h: */
17733 #if defined(__GNUC__) || defined(__SUNPRO_C) || defined(__IBMC__)
17734 #define pg_attribute_aligned(a) __attribute__((aligned(a)))
17735 #endif
17736 typedef __int128 int128a
17737 #if defined(pg_attribute_aligned)
17738 pg_attribute_aligned(8)
17739 #endif
17741 int128a holder;
17742 void pass_by_val(void *buffer, int128a par) { holder = par; }
17745 main ()
17748 long int i64 = 97656225L << 12;
17749 int128a q;
17750 pass_by_val(main, (int128a) i64);
17751 q = (int128a) i64;
17752 if (q != holder)
17753 return 1;
17756 return 0;
17758 _ACEOF
17759 if ac_fn_c_try_run "$LINENO"; then :
17760 pgac_cv__128bit_int_bug=ok
17761 else
17762 pgac_cv__128bit_int_bug=broken
17764 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17765 conftest.$ac_objext conftest.beam conftest.$ac_ext
17769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int_bug" >&5
17770 $as_echo "$pgac_cv__128bit_int_bug" >&6; }
17771 if test x"$pgac_cv__128bit_int_bug" != xbroken ; then
17773 $as_echo "#define PG_INT128_TYPE __int128" >>confdefs.h
17775 # The cast to long int works around a bug in the HP C Compiler,
17776 # see AC_CHECK_SIZEOF for more information.
17777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of PG_INT128_TYPE" >&5
17778 $as_echo_n "checking alignment of PG_INT128_TYPE... " >&6; }
17779 if ${ac_cv_alignof_PG_INT128_TYPE+:} false; then :
17780 $as_echo_n "(cached) " >&6
17781 else
17782 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_PG_INT128_TYPE" "$ac_includes_default
17783 #ifndef offsetof
17784 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17785 #endif
17786 typedef struct { char x; PG_INT128_TYPE y; } ac__type_alignof_;"; then :
17788 else
17789 if test "$ac_cv_type_PG_INT128_TYPE" = yes; then
17790 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17791 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17792 as_fn_error 77 "cannot compute alignment of PG_INT128_TYPE
17793 See \`config.log' for more details" "$LINENO" 5; }
17794 else
17795 ac_cv_alignof_PG_INT128_TYPE=0
17800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_PG_INT128_TYPE" >&5
17801 $as_echo "$ac_cv_alignof_PG_INT128_TYPE" >&6; }
17805 cat >>confdefs.h <<_ACEOF
17806 #define ALIGNOF_PG_INT128_TYPE $ac_cv_alignof_PG_INT128_TYPE
17807 _ACEOF
17813 # Check for various atomic operations now that we have checked how to declare
17814 # 64bit integers.
17815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync char locking functions" >&5
17816 $as_echo_n "checking for builtin __sync char locking functions... " >&6; }
17817 if ${pgac_cv_gcc_sync_char_tas+:} false; then :
17818 $as_echo_n "(cached) " >&6
17819 else
17820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17821 /* end confdefs.h. */
17824 main ()
17826 char lock = 0;
17827 __sync_lock_test_and_set(&lock, 1);
17828 __sync_lock_release(&lock);
17830 return 0;
17832 _ACEOF
17833 if ac_fn_c_try_link "$LINENO"; then :
17834 pgac_cv_gcc_sync_char_tas="yes"
17835 else
17836 pgac_cv_gcc_sync_char_tas="no"
17838 rm -f core conftest.err conftest.$ac_objext \
17839 conftest$ac_exeext conftest.$ac_ext
17841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_char_tas" >&5
17842 $as_echo "$pgac_cv_gcc_sync_char_tas" >&6; }
17843 if test x"$pgac_cv_gcc_sync_char_tas" = x"yes"; then
17845 $as_echo "#define HAVE_GCC__SYNC_CHAR_TAS 1" >>confdefs.h
17848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 locking functions" >&5
17849 $as_echo_n "checking for builtin __sync int32 locking functions... " >&6; }
17850 if ${pgac_cv_gcc_sync_int32_tas+:} false; then :
17851 $as_echo_n "(cached) " >&6
17852 else
17853 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17854 /* end confdefs.h. */
17857 main ()
17859 int lock = 0;
17860 __sync_lock_test_and_set(&lock, 1);
17861 __sync_lock_release(&lock);
17863 return 0;
17865 _ACEOF
17866 if ac_fn_c_try_link "$LINENO"; then :
17867 pgac_cv_gcc_sync_int32_tas="yes"
17868 else
17869 pgac_cv_gcc_sync_int32_tas="no"
17871 rm -f core conftest.err conftest.$ac_objext \
17872 conftest$ac_exeext conftest.$ac_ext
17874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_tas" >&5
17875 $as_echo "$pgac_cv_gcc_sync_int32_tas" >&6; }
17876 if test x"$pgac_cv_gcc_sync_int32_tas" = x"yes"; then
17878 $as_echo "#define HAVE_GCC__SYNC_INT32_TAS 1" >>confdefs.h
17881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 atomic operations" >&5
17882 $as_echo_n "checking for builtin __sync int32 atomic operations... " >&6; }
17883 if ${pgac_cv_gcc_sync_int32_cas+:} false; then :
17884 $as_echo_n "(cached) " >&6
17885 else
17886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17887 /* end confdefs.h. */
17890 main ()
17892 int val = 0;
17893 __sync_val_compare_and_swap(&val, 0, 37);
17895 return 0;
17897 _ACEOF
17898 if ac_fn_c_try_link "$LINENO"; then :
17899 pgac_cv_gcc_sync_int32_cas="yes"
17900 else
17901 pgac_cv_gcc_sync_int32_cas="no"
17903 rm -f core conftest.err conftest.$ac_objext \
17904 conftest$ac_exeext conftest.$ac_ext
17906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_cas" >&5
17907 $as_echo "$pgac_cv_gcc_sync_int32_cas" >&6; }
17908 if test x"$pgac_cv_gcc_sync_int32_cas" = x"yes"; then
17910 $as_echo "#define HAVE_GCC__SYNC_INT32_CAS 1" >>confdefs.h
17913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int64 atomic operations" >&5
17914 $as_echo_n "checking for builtin __sync int64 atomic operations... " >&6; }
17915 if ${pgac_cv_gcc_sync_int64_cas+:} false; then :
17916 $as_echo_n "(cached) " >&6
17917 else
17918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17919 /* end confdefs.h. */
17922 main ()
17924 PG_INT64_TYPE lock = 0;
17925 __sync_val_compare_and_swap(&lock, 0, (PG_INT64_TYPE) 37);
17927 return 0;
17929 _ACEOF
17930 if ac_fn_c_try_link "$LINENO"; then :
17931 pgac_cv_gcc_sync_int64_cas="yes"
17932 else
17933 pgac_cv_gcc_sync_int64_cas="no"
17935 rm -f core conftest.err conftest.$ac_objext \
17936 conftest$ac_exeext conftest.$ac_ext
17938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int64_cas" >&5
17939 $as_echo "$pgac_cv_gcc_sync_int64_cas" >&6; }
17940 if test x"$pgac_cv_gcc_sync_int64_cas" = x"yes"; then
17942 $as_echo "#define HAVE_GCC__SYNC_INT64_CAS 1" >>confdefs.h
17945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int32 atomic operations" >&5
17946 $as_echo_n "checking for builtin __atomic int32 atomic operations... " >&6; }
17947 if ${pgac_cv_gcc_atomic_int32_cas+:} false; then :
17948 $as_echo_n "(cached) " >&6
17949 else
17950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17951 /* end confdefs.h. */
17954 main ()
17956 int val = 0;
17957 int expect = 0;
17958 __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
17960 return 0;
17962 _ACEOF
17963 if ac_fn_c_try_link "$LINENO"; then :
17964 pgac_cv_gcc_atomic_int32_cas="yes"
17965 else
17966 pgac_cv_gcc_atomic_int32_cas="no"
17968 rm -f core conftest.err conftest.$ac_objext \
17969 conftest$ac_exeext conftest.$ac_ext
17971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int32_cas" >&5
17972 $as_echo "$pgac_cv_gcc_atomic_int32_cas" >&6; }
17973 if test x"$pgac_cv_gcc_atomic_int32_cas" = x"yes"; then
17975 $as_echo "#define HAVE_GCC__ATOMIC_INT32_CAS 1" >>confdefs.h
17978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int64 atomic operations" >&5
17979 $as_echo_n "checking for builtin __atomic int64 atomic operations... " >&6; }
17980 if ${pgac_cv_gcc_atomic_int64_cas+:} false; then :
17981 $as_echo_n "(cached) " >&6
17982 else
17983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17984 /* end confdefs.h. */
17987 main ()
17989 PG_INT64_TYPE val = 0;
17990 PG_INT64_TYPE expect = 0;
17991 __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
17993 return 0;
17995 _ACEOF
17996 if ac_fn_c_try_link "$LINENO"; then :
17997 pgac_cv_gcc_atomic_int64_cas="yes"
17998 else
17999 pgac_cv_gcc_atomic_int64_cas="no"
18001 rm -f core conftest.err conftest.$ac_objext \
18002 conftest$ac_exeext conftest.$ac_ext
18004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int64_cas" >&5
18005 $as_echo "$pgac_cv_gcc_atomic_int64_cas" >&6; }
18006 if test x"$pgac_cv_gcc_atomic_int64_cas" = x"yes"; then
18008 $as_echo "#define HAVE_GCC__ATOMIC_INT64_CAS 1" >>confdefs.h
18013 # Check for x86 cpuid instruction
18014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __get_cpuid" >&5
18015 $as_echo_n "checking for __get_cpuid... " >&6; }
18016 if ${pgac_cv__get_cpuid+:} false; then :
18017 $as_echo_n "(cached) " >&6
18018 else
18019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18020 /* end confdefs.h. */
18021 #include <cpuid.h>
18023 main ()
18025 unsigned int exx[4] = {0, 0, 0, 0};
18026 __get_cpuid(1, &exx[0], &exx[1], &exx[2], &exx[3]);
18029 return 0;
18031 _ACEOF
18032 if ac_fn_c_try_link "$LINENO"; then :
18033 pgac_cv__get_cpuid="yes"
18034 else
18035 pgac_cv__get_cpuid="no"
18037 rm -f core conftest.err conftest.$ac_objext \
18038 conftest$ac_exeext conftest.$ac_ext
18040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__get_cpuid" >&5
18041 $as_echo "$pgac_cv__get_cpuid" >&6; }
18042 if test x"$pgac_cv__get_cpuid" = x"yes"; then
18044 $as_echo "#define HAVE__GET_CPUID 1" >>confdefs.h
18048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __cpuid" >&5
18049 $as_echo_n "checking for __cpuid... " >&6; }
18050 if ${pgac_cv__cpuid+:} false; then :
18051 $as_echo_n "(cached) " >&6
18052 else
18053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18054 /* end confdefs.h. */
18055 #include <intrin.h>
18057 main ()
18059 unsigned int exx[4] = {0, 0, 0, 0};
18060 __get_cpuid(exx[0], 1);
18063 return 0;
18065 _ACEOF
18066 if ac_fn_c_try_link "$LINENO"; then :
18067 pgac_cv__cpuid="yes"
18068 else
18069 pgac_cv__cpuid="no"
18071 rm -f core conftest.err conftest.$ac_objext \
18072 conftest$ac_exeext conftest.$ac_ext
18074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__cpuid" >&5
18075 $as_echo "$pgac_cv__cpuid" >&6; }
18076 if test x"$pgac_cv__cpuid" = x"yes"; then
18078 $as_echo "#define HAVE__CPUID 1" >>confdefs.h
18082 # Check for Intel SSE 4.2 intrinsics to do CRC calculations.
18084 # First check if the _mm_crc32_u8 and _mm_crc32_u64 intrinsics can be used
18085 # with the default compiler flags. If not, check if adding the -msse4.2
18086 # flag helps. CFLAGS_SSE42 is set to -msse4.2 if that's required.
18087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=" >&5
18088 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=... " >&6; }
18089 if ${pgac_cv_sse42_crc32_intrinsics_+:} false; then :
18090 $as_echo_n "(cached) " >&6
18091 else
18092 pgac_save_CFLAGS=$CFLAGS
18093 CFLAGS="$pgac_save_CFLAGS "
18094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18095 /* end confdefs.h. */
18096 #include <nmmintrin.h>
18098 main ()
18100 unsigned int crc = 0;
18101 crc = _mm_crc32_u8(crc, 0);
18102 crc = _mm_crc32_u32(crc, 0);
18103 /* return computed value, to prevent the above being optimized away */
18104 return crc == 0;
18106 return 0;
18108 _ACEOF
18109 if ac_fn_c_try_link "$LINENO"; then :
18110 pgac_cv_sse42_crc32_intrinsics_=yes
18111 else
18112 pgac_cv_sse42_crc32_intrinsics_=no
18114 rm -f core conftest.err conftest.$ac_objext \
18115 conftest$ac_exeext conftest.$ac_ext
18116 CFLAGS="$pgac_save_CFLAGS"
18118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics_" >&5
18119 $as_echo "$pgac_cv_sse42_crc32_intrinsics_" >&6; }
18120 if test x"$pgac_cv_sse42_crc32_intrinsics_" = x"yes"; then
18121 CFLAGS_SSE42=""
18122 pgac_sse42_crc32_intrinsics=yes
18125 if test x"$pgac_sse42_crc32_intrinsics" != x"yes"; then
18126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2" >&5
18127 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2... " >&6; }
18128 if ${pgac_cv_sse42_crc32_intrinsics__msse4_2+:} false; then :
18129 $as_echo_n "(cached) " >&6
18130 else
18131 pgac_save_CFLAGS=$CFLAGS
18132 CFLAGS="$pgac_save_CFLAGS -msse4.2"
18133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18134 /* end confdefs.h. */
18135 #include <nmmintrin.h>
18137 main ()
18139 unsigned int crc = 0;
18140 crc = _mm_crc32_u8(crc, 0);
18141 crc = _mm_crc32_u32(crc, 0);
18142 /* return computed value, to prevent the above being optimized away */
18143 return crc == 0;
18145 return 0;
18147 _ACEOF
18148 if ac_fn_c_try_link "$LINENO"; then :
18149 pgac_cv_sse42_crc32_intrinsics__msse4_2=yes
18150 else
18151 pgac_cv_sse42_crc32_intrinsics__msse4_2=no
18153 rm -f core conftest.err conftest.$ac_objext \
18154 conftest$ac_exeext conftest.$ac_ext
18155 CFLAGS="$pgac_save_CFLAGS"
18157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics__msse4_2" >&5
18158 $as_echo "$pgac_cv_sse42_crc32_intrinsics__msse4_2" >&6; }
18159 if test x"$pgac_cv_sse42_crc32_intrinsics__msse4_2" = x"yes"; then
18160 CFLAGS_SSE42="-msse4.2"
18161 pgac_sse42_crc32_intrinsics=yes
18167 # Are we targeting a processor that supports SSE 4.2? gcc, clang and icc all
18168 # define __SSE4_2__ in that case.
18169 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18170 /* end confdefs.h. */
18173 main ()
18176 #ifndef __SSE4_2__
18177 #error __SSE4_2__ not defined
18178 #endif
18181 return 0;
18183 _ACEOF
18184 if ac_fn_c_try_compile "$LINENO"; then :
18185 SSE4_2_TARGETED=1
18187 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18189 # Check for ARMv8 CRC Extension intrinsics to do CRC calculations.
18191 # First check if __crc32c* intrinsics can be used with the default compiler
18192 # flags. If not, check if adding -march=armv8-a+crc flag helps.
18193 # CFLAGS_ARMV8_CRC32C is set if the extra flag is required.
18194 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=" >&5
18195 $as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=... " >&6; }
18196 if ${pgac_cv_armv8_crc32c_intrinsics_+:} false; then :
18197 $as_echo_n "(cached) " >&6
18198 else
18199 pgac_save_CFLAGS=$CFLAGS
18200 CFLAGS="$pgac_save_CFLAGS "
18201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18202 /* end confdefs.h. */
18203 #include <arm_acle.h>
18205 main ()
18207 unsigned int crc = 0;
18208 crc = __crc32cb(crc, 0);
18209 crc = __crc32ch(crc, 0);
18210 crc = __crc32cw(crc, 0);
18211 crc = __crc32cd(crc, 0);
18212 /* return computed value, to prevent the above being optimized away */
18213 return crc == 0;
18215 return 0;
18217 _ACEOF
18218 if ac_fn_c_try_link "$LINENO"; then :
18219 pgac_cv_armv8_crc32c_intrinsics_=yes
18220 else
18221 pgac_cv_armv8_crc32c_intrinsics_=no
18223 rm -f core conftest.err conftest.$ac_objext \
18224 conftest$ac_exeext conftest.$ac_ext
18225 CFLAGS="$pgac_save_CFLAGS"
18227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics_" >&5
18228 $as_echo "$pgac_cv_armv8_crc32c_intrinsics_" >&6; }
18229 if test x"$pgac_cv_armv8_crc32c_intrinsics_" = x"yes"; then
18230 CFLAGS_ARMV8_CRC32C=""
18231 pgac_armv8_crc32c_intrinsics=yes
18234 if test x"$pgac_armv8_crc32c_intrinsics" != x"yes"; then
18235 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc" >&5
18236 $as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc... " >&6; }
18237 if ${pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc+:} false; then :
18238 $as_echo_n "(cached) " >&6
18239 else
18240 pgac_save_CFLAGS=$CFLAGS
18241 CFLAGS="$pgac_save_CFLAGS -march=armv8-a+crc"
18242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18243 /* end confdefs.h. */
18244 #include <arm_acle.h>
18246 main ()
18248 unsigned int crc = 0;
18249 crc = __crc32cb(crc, 0);
18250 crc = __crc32ch(crc, 0);
18251 crc = __crc32cw(crc, 0);
18252 crc = __crc32cd(crc, 0);
18253 /* return computed value, to prevent the above being optimized away */
18254 return crc == 0;
18256 return 0;
18258 _ACEOF
18259 if ac_fn_c_try_link "$LINENO"; then :
18260 pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=yes
18261 else
18262 pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=no
18264 rm -f core conftest.err conftest.$ac_objext \
18265 conftest$ac_exeext conftest.$ac_ext
18266 CFLAGS="$pgac_save_CFLAGS"
18268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&5
18269 $as_echo "$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&6; }
18270 if test x"$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" = x"yes"; then
18271 CFLAGS_ARMV8_CRC32C="-march=armv8-a+crc"
18272 pgac_armv8_crc32c_intrinsics=yes
18278 # Select CRC-32C implementation.
18280 # If we are targeting a processor that has Intel SSE 4.2 instructions, we can
18281 # use the special CRC instructions for calculating CRC-32C. If we're not
18282 # targeting such a processor, but we can nevertheless produce code that uses
18283 # the SSE intrinsics, perhaps with some extra CFLAGS, compile both
18284 # implementations and select which one to use at runtime, depending on whether
18285 # SSE 4.2 is supported by the processor we're running on.
18287 # Similarly, if we are targeting an ARM processor that has the CRC
18288 # instructions that are part of the ARMv8 CRC Extension, use them. And if
18289 # we're not targeting such a processor, but can nevertheless produce code that
18290 # uses the CRC instructions, compile both, and select at runtime.
18292 # You can override this logic by setting the appropriate USE_*_CRC32 flag to 1
18293 # in the template or configure command line.
18294 if test x"$USE_SLICING_BY_8_CRC32C" = x"" && test x"$USE_SSE42_CRC32C" = x"" && test x"$USE_SSE42_CRC32C_WITH_RUNTIME_CHECK" = x"" && test x"$USE_ARMV8_CRC32C" = x"" && test x"$USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK" = x""; then
18295 # Use Intel SSE 4.2 if available.
18296 if test x"$pgac_sse42_crc32_intrinsics" = x"yes" && test x"$SSE4_2_TARGETED" = x"1" ; then
18297 USE_SSE42_CRC32C=1
18298 else
18299 # Intel SSE 4.2, with runtime check? The CPUID instruction is needed for
18300 # the runtime check.
18301 if test x"$pgac_sse42_crc32_intrinsics" = x"yes" && (test x"$pgac_cv__get_cpuid" = x"yes" || test x"$pgac_cv__cpuid" = x"yes"); then
18302 USE_SSE42_CRC32C_WITH_RUNTIME_CHECK=1
18303 else
18304 # Use ARM CRC Extension if available.
18305 if test x"$pgac_armv8_crc32c_intrinsics" = x"yes" && test x"$CFLAGS_ARMV8_CRC32C" = x""; then
18306 USE_ARMV8_CRC32C=1
18307 else
18308 # ARM CRC Extension, with runtime check?
18309 if test x"$pgac_armv8_crc32c_intrinsics" = x"yes"; then
18310 USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK=1
18311 else
18312 # fall back to slicing-by-8 algorithm, which doesn't require any
18313 # special CPU support.
18314 USE_SLICING_BY_8_CRC32C=1
18321 # Set PG_CRC32C_OBJS appropriately depending on the selected implementation.
18322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which CRC-32C implementation to use" >&5
18323 $as_echo_n "checking which CRC-32C implementation to use... " >&6; }
18324 if test x"$USE_SSE42_CRC32C" = x"1"; then
18326 $as_echo "#define USE_SSE42_CRC32C 1" >>confdefs.h
18328 PG_CRC32C_OBJS="pg_crc32c_sse42.o"
18329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2" >&5
18330 $as_echo "SSE 4.2" >&6; }
18331 else
18332 if test x"$USE_SSE42_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
18334 $as_echo "#define USE_SSE42_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
18336 PG_CRC32C_OBJS="pg_crc32c_sse42.o pg_crc32c_sb8.o pg_crc32c_sse42_choose.o"
18337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2 with runtime check" >&5
18338 $as_echo "SSE 4.2 with runtime check" >&6; }
18339 else
18340 if test x"$USE_ARMV8_CRC32C" = x"1"; then
18342 $as_echo "#define USE_ARMV8_CRC32C 1" >>confdefs.h
18344 PG_CRC32C_OBJS="pg_crc32c_armv8.o"
18345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions" >&5
18346 $as_echo "ARMv8 CRC instructions" >&6; }
18347 else
18348 if test x"$USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
18350 $as_echo "#define USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
18352 PG_CRC32C_OBJS="pg_crc32c_armv8.o pg_crc32c_sb8.o pg_crc32c_armv8_choose.o"
18353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions with runtime check" >&5
18354 $as_echo "ARMv8 CRC instructions with runtime check" >&6; }
18355 else
18357 $as_echo "#define USE_SLICING_BY_8_CRC32C 1" >>confdefs.h
18359 PG_CRC32C_OBJS="pg_crc32c_sb8.o"
18360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: slicing-by-8" >&5
18361 $as_echo "slicing-by-8" >&6; }
18369 # Select semaphore implementation type.
18370 if test "$PORTNAME" != "win32"; then
18371 if test x"$PREFERRED_SEMAPHORES" = x"NAMED_POSIX" ; then
18372 # Need sem_open for this
18373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_open" >&5
18374 $as_echo_n "checking for library containing sem_open... " >&6; }
18375 if ${ac_cv_search_sem_open+:} false; then :
18376 $as_echo_n "(cached) " >&6
18377 else
18378 ac_func_search_save_LIBS=$LIBS
18379 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18380 /* end confdefs.h. */
18382 /* Override any GCC internal prototype to avoid an error.
18383 Use char because int might match the return type of a GCC
18384 builtin and then its argument prototype would still apply. */
18385 #ifdef __cplusplus
18386 extern "C"
18387 #endif
18388 char sem_open ();
18390 main ()
18392 return sem_open ();
18394 return 0;
18396 _ACEOF
18397 for ac_lib in '' rt pthread; do
18398 if test -z "$ac_lib"; then
18399 ac_res="none required"
18400 else
18401 ac_res=-l$ac_lib
18402 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
18404 if ac_fn_c_try_link "$LINENO"; then :
18405 ac_cv_search_sem_open=$ac_res
18407 rm -f core conftest.err conftest.$ac_objext \
18408 conftest$ac_exeext
18409 if ${ac_cv_search_sem_open+:} false; then :
18410 break
18412 done
18413 if ${ac_cv_search_sem_open+:} false; then :
18415 else
18416 ac_cv_search_sem_open=no
18418 rm conftest.$ac_ext
18419 LIBS=$ac_func_search_save_LIBS
18421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_open" >&5
18422 $as_echo "$ac_cv_search_sem_open" >&6; }
18423 ac_res=$ac_cv_search_sem_open
18424 if test "$ac_res" != no; then :
18425 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18426 USE_NAMED_POSIX_SEMAPHORES=1
18430 if test x"$PREFERRED_SEMAPHORES" = x"UNNAMED_POSIX" ; then
18431 # Need sem_init for this
18432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
18433 $as_echo_n "checking for library containing sem_init... " >&6; }
18434 if ${ac_cv_search_sem_init+:} false; then :
18435 $as_echo_n "(cached) " >&6
18436 else
18437 ac_func_search_save_LIBS=$LIBS
18438 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18439 /* end confdefs.h. */
18441 /* Override any GCC internal prototype to avoid an error.
18442 Use char because int might match the return type of a GCC
18443 builtin and then its argument prototype would still apply. */
18444 #ifdef __cplusplus
18445 extern "C"
18446 #endif
18447 char sem_init ();
18449 main ()
18451 return sem_init ();
18453 return 0;
18455 _ACEOF
18456 for ac_lib in '' rt pthread; do
18457 if test -z "$ac_lib"; then
18458 ac_res="none required"
18459 else
18460 ac_res=-l$ac_lib
18461 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
18463 if ac_fn_c_try_link "$LINENO"; then :
18464 ac_cv_search_sem_init=$ac_res
18466 rm -f core conftest.err conftest.$ac_objext \
18467 conftest$ac_exeext
18468 if ${ac_cv_search_sem_init+:} false; then :
18469 break
18471 done
18472 if ${ac_cv_search_sem_init+:} false; then :
18474 else
18475 ac_cv_search_sem_init=no
18477 rm conftest.$ac_ext
18478 LIBS=$ac_func_search_save_LIBS
18480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
18481 $as_echo "$ac_cv_search_sem_init" >&6; }
18482 ac_res=$ac_cv_search_sem_init
18483 if test "$ac_res" != no; then :
18484 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18485 USE_UNNAMED_POSIX_SEMAPHORES=1
18489 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which semaphore API to use" >&5
18490 $as_echo_n "checking which semaphore API to use... " >&6; }
18491 if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
18493 $as_echo "#define USE_NAMED_POSIX_SEMAPHORES 1" >>confdefs.h
18495 SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
18496 sematype="named POSIX"
18497 else
18498 if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
18500 $as_echo "#define USE_UNNAMED_POSIX_SEMAPHORES 1" >>confdefs.h
18502 SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
18503 sematype="unnamed POSIX"
18504 else
18506 $as_echo "#define USE_SYSV_SEMAPHORES 1" >>confdefs.h
18508 SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
18509 sematype="System V"
18512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sematype" >&5
18513 $as_echo "$sematype" >&6; }
18514 else
18516 $as_echo "#define USE_WIN32_SEMAPHORES 1" >>confdefs.h
18518 SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
18522 # Select shared-memory implementation type.
18523 if test "$PORTNAME" != "win32"; then
18525 $as_echo "#define USE_SYSV_SHARED_MEMORY 1" >>confdefs.h
18527 SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
18528 else
18530 $as_echo "#define USE_WIN32_SHARED_MEMORY 1" >>confdefs.h
18532 SHMEM_IMPLEMENTATION="src/backend/port/win32_shmem.c"
18535 # Select random number source. If a TLS library is used then it will be the
18536 # first choice, else the native platform sources (Windows API or /dev/urandom)
18537 # will be used.
18538 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which random number source to use" >&5
18539 $as_echo_n "checking which random number source to use... " >&6; }
18540 if test x"$with_ssl" = x"openssl" ; then
18541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: OpenSSL" >&5
18542 $as_echo "OpenSSL" >&6; }
18543 elif test x"$PORTNAME" = x"win32" ; then
18544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows native" >&5
18545 $as_echo "Windows native" >&6; }
18546 else
18547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: /dev/urandom" >&5
18548 $as_echo "/dev/urandom" >&6; }
18549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/urandom" >&5
18550 $as_echo_n "checking for /dev/urandom... " >&6; }
18551 if ${ac_cv_file__dev_urandom+:} false; then :
18552 $as_echo_n "(cached) " >&6
18553 else
18554 test "$cross_compiling" = yes &&
18555 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
18556 if test -r "/dev/urandom"; then
18557 ac_cv_file__dev_urandom=yes
18558 else
18559 ac_cv_file__dev_urandom=no
18562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_urandom" >&5
18563 $as_echo "$ac_cv_file__dev_urandom" >&6; }
18564 if test "x$ac_cv_file__dev_urandom" = xyes; then :
18569 if test x"$ac_cv_file__dev_urandom" = x"no" ; then
18570 as_fn_error $? "
18571 no source of strong random numbers was found
18572 PostgreSQL can use OpenSSL, native Windows API or /dev/urandom as a source of random numbers." "$LINENO" 5
18576 # If not set in template file, set bytes to use libc memset()
18577 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
18578 MEMSET_LOOP_LIMIT=1024
18581 cat >>confdefs.h <<_ACEOF
18582 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
18583 _ACEOF
18587 if test "$enable_nls" = yes ; then
18589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bind_textdomain_codeset" >&5
18590 $as_echo_n "checking for library containing bind_textdomain_codeset... " >&6; }
18591 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
18592 $as_echo_n "(cached) " >&6
18593 else
18594 ac_func_search_save_LIBS=$LIBS
18595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18596 /* end confdefs.h. */
18598 /* Override any GCC internal prototype to avoid an error.
18599 Use char because int might match the return type of a GCC
18600 builtin and then its argument prototype would still apply. */
18601 #ifdef __cplusplus
18602 extern "C"
18603 #endif
18604 char bind_textdomain_codeset ();
18606 main ()
18608 return bind_textdomain_codeset ();
18610 return 0;
18612 _ACEOF
18613 for ac_lib in '' intl; do
18614 if test -z "$ac_lib"; then
18615 ac_res="none required"
18616 else
18617 ac_res=-l$ac_lib
18618 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
18620 if ac_fn_c_try_link "$LINENO"; then :
18621 ac_cv_search_bind_textdomain_codeset=$ac_res
18623 rm -f core conftest.err conftest.$ac_objext \
18624 conftest$ac_exeext
18625 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
18626 break
18628 done
18629 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
18631 else
18632 ac_cv_search_bind_textdomain_codeset=no
18634 rm conftest.$ac_ext
18635 LIBS=$ac_func_search_save_LIBS
18637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bind_textdomain_codeset" >&5
18638 $as_echo "$ac_cv_search_bind_textdomain_codeset" >&6; }
18639 ac_res=$ac_cv_search_bind_textdomain_codeset
18640 if test "$ac_res" != no; then :
18641 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18643 else
18644 as_fn_error $? "a gettext implementation is required for NLS" "$LINENO" 5
18647 ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
18648 if test "x$ac_cv_header_libintl_h" = xyes; then :
18650 else
18651 as_fn_error $? "header file <libintl.h> is required for NLS" "$LINENO" 5
18655 if test -z "$MSGFMT"; then
18656 for ac_prog in msgfmt
18658 # Extract the first word of "$ac_prog", so it can be a program name with args.
18659 set dummy $ac_prog; ac_word=$2
18660 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18661 $as_echo_n "checking for $ac_word... " >&6; }
18662 if ${ac_cv_path_MSGFMT+:} false; then :
18663 $as_echo_n "(cached) " >&6
18664 else
18665 case $MSGFMT in
18666 [\\/]* | ?:[\\/]*)
18667 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
18670 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18671 for as_dir in $PATH
18673 IFS=$as_save_IFS
18674 test -z "$as_dir" && as_dir=.
18675 for ac_exec_ext in '' $ac_executable_extensions; do
18676 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18677 ac_cv_path_MSGFMT="$as_dir/$ac_word$ac_exec_ext"
18678 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18679 break 2
18681 done
18682 done
18683 IFS=$as_save_IFS
18686 esac
18688 MSGFMT=$ac_cv_path_MSGFMT
18689 if test -n "$MSGFMT"; then
18690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
18691 $as_echo "$MSGFMT" >&6; }
18692 else
18693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18694 $as_echo "no" >&6; }
18698 test -n "$MSGFMT" && break
18699 done
18701 else
18702 # Report the value of MSGFMT in configure's output in all cases.
18703 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGFMT" >&5
18704 $as_echo_n "checking for MSGFMT... " >&6; }
18705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
18706 $as_echo "$MSGFMT" >&6; }
18709 if test -z "$MSGFMT"; then
18710 as_fn_error $? "msgfmt is required for NLS" "$LINENO" 5
18712 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msgfmt flags" >&5
18713 $as_echo_n "checking for msgfmt flags... " >&6; }
18714 if ${pgac_cv_msgfmt_flags+:} false; then :
18715 $as_echo_n "(cached) " >&6
18716 else
18717 if test x"$MSGFMT" != x"" && "$MSGFMT" --version 2>&1 | grep "GNU" >/dev/null; then
18718 pgac_cv_msgfmt_flags=-c
18721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_msgfmt_flags" >&5
18722 $as_echo "$pgac_cv_msgfmt_flags" >&6; }
18723 MSGFMT_FLAGS=$pgac_cv_msgfmt_flags
18725 if test -z "$MSGMERGE"; then
18726 for ac_prog in msgmerge
18728 # Extract the first word of "$ac_prog", so it can be a program name with args.
18729 set dummy $ac_prog; ac_word=$2
18730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18731 $as_echo_n "checking for $ac_word... " >&6; }
18732 if ${ac_cv_path_MSGMERGE+:} false; then :
18733 $as_echo_n "(cached) " >&6
18734 else
18735 case $MSGMERGE in
18736 [\\/]* | ?:[\\/]*)
18737 ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
18740 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18741 for as_dir in $PATH
18743 IFS=$as_save_IFS
18744 test -z "$as_dir" && as_dir=.
18745 for ac_exec_ext in '' $ac_executable_extensions; do
18746 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18747 ac_cv_path_MSGMERGE="$as_dir/$ac_word$ac_exec_ext"
18748 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18749 break 2
18751 done
18752 done
18753 IFS=$as_save_IFS
18756 esac
18758 MSGMERGE=$ac_cv_path_MSGMERGE
18759 if test -n "$MSGMERGE"; then
18760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
18761 $as_echo "$MSGMERGE" >&6; }
18762 else
18763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18764 $as_echo "no" >&6; }
18768 test -n "$MSGMERGE" && break
18769 done
18771 else
18772 # Report the value of MSGMERGE in configure's output in all cases.
18773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGMERGE" >&5
18774 $as_echo_n "checking for MSGMERGE... " >&6; }
18775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
18776 $as_echo "$MSGMERGE" >&6; }
18779 if test -z "$XGETTEXT"; then
18780 for ac_prog in xgettext
18782 # Extract the first word of "$ac_prog", so it can be a program name with args.
18783 set dummy $ac_prog; ac_word=$2
18784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18785 $as_echo_n "checking for $ac_word... " >&6; }
18786 if ${ac_cv_path_XGETTEXT+:} false; then :
18787 $as_echo_n "(cached) " >&6
18788 else
18789 case $XGETTEXT in
18790 [\\/]* | ?:[\\/]*)
18791 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
18794 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18795 for as_dir in $PATH
18797 IFS=$as_save_IFS
18798 test -z "$as_dir" && as_dir=.
18799 for ac_exec_ext in '' $ac_executable_extensions; do
18800 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18801 ac_cv_path_XGETTEXT="$as_dir/$ac_word$ac_exec_ext"
18802 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18803 break 2
18805 done
18806 done
18807 IFS=$as_save_IFS
18810 esac
18812 XGETTEXT=$ac_cv_path_XGETTEXT
18813 if test -n "$XGETTEXT"; then
18814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
18815 $as_echo "$XGETTEXT" >&6; }
18816 else
18817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18818 $as_echo "no" >&6; }
18822 test -n "$XGETTEXT" && break
18823 done
18825 else
18826 # Report the value of XGETTEXT in configure's output in all cases.
18827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XGETTEXT" >&5
18828 $as_echo_n "checking for XGETTEXT... " >&6; }
18829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
18830 $as_echo "$XGETTEXT" >&6; }
18836 # Check for Tcl configuration script tclConfig.sh
18837 if test "$with_tcl" = yes; then
18838 if test -z "$TCLSH"; then
18839 for ac_prog in tclsh tcl tclsh8.6 tclsh86 tclsh8.5 tclsh85 tclsh8.4 tclsh84
18841 # Extract the first word of "$ac_prog", so it can be a program name with args.
18842 set dummy $ac_prog; ac_word=$2
18843 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18844 $as_echo_n "checking for $ac_word... " >&6; }
18845 if ${ac_cv_path_TCLSH+:} false; then :
18846 $as_echo_n "(cached) " >&6
18847 else
18848 case $TCLSH in
18849 [\\/]* | ?:[\\/]*)
18850 ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
18853 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18854 for as_dir in $PATH
18856 IFS=$as_save_IFS
18857 test -z "$as_dir" && as_dir=.
18858 for ac_exec_ext in '' $ac_executable_extensions; do
18859 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18860 ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
18861 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18862 break 2
18864 done
18865 done
18866 IFS=$as_save_IFS
18869 esac
18871 TCLSH=$ac_cv_path_TCLSH
18872 if test -n "$TCLSH"; then
18873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
18874 $as_echo "$TCLSH" >&6; }
18875 else
18876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18877 $as_echo "no" >&6; }
18881 test -n "$TCLSH" && break
18882 done
18884 else
18885 # Report the value of TCLSH in configure's output in all cases.
18886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TCLSH" >&5
18887 $as_echo_n "checking for TCLSH... " >&6; }
18888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
18889 $as_echo "$TCLSH" >&6; }
18892 if test x"$TCLSH" = x""; then
18893 as_fn_error $? "Tcl shell not found" "$LINENO" 5
18896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclConfig.sh" >&5
18897 $as_echo_n "checking for tclConfig.sh... " >&6; }
18898 # Let user override test
18899 if test -z "$TCL_CONFIG_SH"; then
18900 pgac_test_dirs="$with_tclconfig"
18902 set X $pgac_test_dirs; shift
18903 if test $# -eq 0; then
18904 test -z "$TCLSH" && as_fn_error $? "unable to locate tclConfig.sh because no Tcl shell was found" "$LINENO" 5
18905 pgac_test_dirs=`echo 'puts $auto_path' | $TCLSH`
18906 # On newer macOS, $auto_path frequently doesn't include the place
18907 # where tclConfig.sh actually lives. Append that to the end, so as not
18908 # to break cases where a non-default Tcl installation is being used.
18909 if test -d "$PG_SYSROOT/System/Library/Frameworks/Tcl.framework" ; then
18910 pgac_test_dirs="$pgac_test_dirs $PG_SYSROOT/System/Library/Frameworks/Tcl.framework"
18912 set X $pgac_test_dirs; shift
18915 for pgac_dir do
18916 if test -r "$pgac_dir/tclConfig.sh"; then
18917 TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
18918 break
18920 done
18923 if test -z "$TCL_CONFIG_SH"; then
18924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18925 $as_echo "no" >&6; }
18926 as_fn_error $? "file 'tclConfig.sh' is required for Tcl" "$LINENO" 5
18927 else
18928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCL_CONFIG_SH" >&5
18929 $as_echo "$TCL_CONFIG_SH" >&6; }
18934 . "$TCL_CONFIG_SH"
18935 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
18936 eval TCL_LIBS=\"$TCL_LIBS\"
18937 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
18938 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
18940 if test "$TCL_SHARED_BUILD" != 1; then
18941 as_fn_error $? "cannot build PL/Tcl because Tcl is not a shared library
18942 Use --without-tcl to disable building PL/Tcl." "$LINENO" 5
18944 # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
18945 ac_save_CPPFLAGS=$CPPFLAGS
18946 CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
18947 ac_fn_c_check_header_mongrel "$LINENO" "tcl.h" "ac_cv_header_tcl_h" "$ac_includes_default"
18948 if test "x$ac_cv_header_tcl_h" = xyes; then :
18950 else
18951 as_fn_error $? "header file <tcl.h> is required for Tcl" "$LINENO" 5
18955 CPPFLAGS=$ac_save_CPPFLAGS
18958 # check for <perl.h>
18959 if test "$with_perl" = yes; then
18960 ac_save_CPPFLAGS=$CPPFLAGS
18961 CPPFLAGS="$CPPFLAGS $perl_includespec"
18962 ac_fn_c_check_header_compile "$LINENO" "perl.h" "ac_cv_header_perl_h" "#include <EXTERN.h>
18964 if test "x$ac_cv_header_perl_h" = xyes; then :
18966 else
18967 as_fn_error $? "header file <perl.h> is required for Perl" "$LINENO" 5
18971 # While we're at it, check that we can link to libperl.
18972 # On most platforms, if perl.h is there then libperl.so will be too, but at
18973 # this writing Debian packages them separately. There is no known reason to
18974 # waste cycles on separate probes for the Tcl or Python libraries, though.
18975 # On some Red Hat platforms, the link attempt can fail if we don't use
18976 # CFLAGS_SL while building the test program.
18977 ac_save_CFLAGS=$CFLAGS
18978 CFLAGS="$CFLAGS $CFLAGS_SL"
18979 pgac_save_LIBS=$LIBS
18980 LIBS="$perl_embed_ldflags"
18981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libperl" >&5
18982 $as_echo_n "checking for libperl... " >&6; }
18983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18984 /* end confdefs.h. */
18986 #include <EXTERN.h>
18987 #include <perl.h>
18990 main ()
18992 perl_alloc();
18994 return 0;
18996 _ACEOF
18997 if ac_fn_c_try_link "$LINENO"; then :
18998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18999 $as_echo "yes" >&6; }
19000 else
19001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19002 $as_echo "no" >&6; }
19003 as_fn_error $? "libperl library is required for Perl" "$LINENO" 5
19005 rm -f core conftest.err conftest.$ac_objext \
19006 conftest$ac_exeext conftest.$ac_ext
19007 LIBS=$pgac_save_LIBS
19008 CFLAGS=$ac_save_CFLAGS
19009 CPPFLAGS=$ac_save_CPPFLAGS
19012 # check for <Python.h>
19013 if test "$with_python" = yes; then
19014 ac_save_CPPFLAGS=$CPPFLAGS
19015 CPPFLAGS="$python_includespec $CPPFLAGS"
19016 ac_fn_c_check_header_mongrel "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default"
19017 if test "x$ac_cv_header_Python_h" = xyes; then :
19019 else
19020 as_fn_error $? "header file <Python.h> is required for Python" "$LINENO" 5
19024 CPPFLAGS=$ac_save_CPPFLAGS
19028 # Check for documentation-building tools
19030 if test -z "$XMLLINT"; then
19031 for ac_prog in xmllint
19033 # Extract the first word of "$ac_prog", so it can be a program name with args.
19034 set dummy $ac_prog; ac_word=$2
19035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19036 $as_echo_n "checking for $ac_word... " >&6; }
19037 if ${ac_cv_path_XMLLINT+:} false; then :
19038 $as_echo_n "(cached) " >&6
19039 else
19040 case $XMLLINT in
19041 [\\/]* | ?:[\\/]*)
19042 ac_cv_path_XMLLINT="$XMLLINT" # Let the user override the test with a path.
19045 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19046 for as_dir in $PATH
19048 IFS=$as_save_IFS
19049 test -z "$as_dir" && as_dir=.
19050 for ac_exec_ext in '' $ac_executable_extensions; do
19051 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19052 ac_cv_path_XMLLINT="$as_dir/$ac_word$ac_exec_ext"
19053 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19054 break 2
19056 done
19057 done
19058 IFS=$as_save_IFS
19061 esac
19063 XMLLINT=$ac_cv_path_XMLLINT
19064 if test -n "$XMLLINT"; then
19065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
19066 $as_echo "$XMLLINT" >&6; }
19067 else
19068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19069 $as_echo "no" >&6; }
19073 test -n "$XMLLINT" && break
19074 done
19076 else
19077 # Report the value of XMLLINT in configure's output in all cases.
19078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XMLLINT" >&5
19079 $as_echo_n "checking for XMLLINT... " >&6; }
19080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
19081 $as_echo "$XMLLINT" >&6; }
19084 if test -z "$XSLTPROC"; then
19085 for ac_prog in xsltproc
19087 # Extract the first word of "$ac_prog", so it can be a program name with args.
19088 set dummy $ac_prog; ac_word=$2
19089 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19090 $as_echo_n "checking for $ac_word... " >&6; }
19091 if ${ac_cv_path_XSLTPROC+:} false; then :
19092 $as_echo_n "(cached) " >&6
19093 else
19094 case $XSLTPROC in
19095 [\\/]* | ?:[\\/]*)
19096 ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
19099 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19100 for as_dir in $PATH
19102 IFS=$as_save_IFS
19103 test -z "$as_dir" && as_dir=.
19104 for ac_exec_ext in '' $ac_executable_extensions; do
19105 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19106 ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
19107 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19108 break 2
19110 done
19111 done
19112 IFS=$as_save_IFS
19115 esac
19117 XSLTPROC=$ac_cv_path_XSLTPROC
19118 if test -n "$XSLTPROC"; then
19119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
19120 $as_echo "$XSLTPROC" >&6; }
19121 else
19122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19123 $as_echo "no" >&6; }
19127 test -n "$XSLTPROC" && break
19128 done
19130 else
19131 # Report the value of XSLTPROC in configure's output in all cases.
19132 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XSLTPROC" >&5
19133 $as_echo_n "checking for XSLTPROC... " >&6; }
19134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
19135 $as_echo "$XSLTPROC" >&6; }
19138 if test -z "$FOP"; then
19139 for ac_prog in fop
19141 # Extract the first word of "$ac_prog", so it can be a program name with args.
19142 set dummy $ac_prog; ac_word=$2
19143 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19144 $as_echo_n "checking for $ac_word... " >&6; }
19145 if ${ac_cv_path_FOP+:} false; then :
19146 $as_echo_n "(cached) " >&6
19147 else
19148 case $FOP in
19149 [\\/]* | ?:[\\/]*)
19150 ac_cv_path_FOP="$FOP" # Let the user override the test with a path.
19153 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19154 for as_dir in $PATH
19156 IFS=$as_save_IFS
19157 test -z "$as_dir" && as_dir=.
19158 for ac_exec_ext in '' $ac_executable_extensions; do
19159 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19160 ac_cv_path_FOP="$as_dir/$ac_word$ac_exec_ext"
19161 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19162 break 2
19164 done
19165 done
19166 IFS=$as_save_IFS
19169 esac
19171 FOP=$ac_cv_path_FOP
19172 if test -n "$FOP"; then
19173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
19174 $as_echo "$FOP" >&6; }
19175 else
19176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19177 $as_echo "no" >&6; }
19181 test -n "$FOP" && break
19182 done
19184 else
19185 # Report the value of FOP in configure's output in all cases.
19186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FOP" >&5
19187 $as_echo_n "checking for FOP... " >&6; }
19188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
19189 $as_echo "$FOP" >&6; }
19192 if test -z "$DBTOEPUB"; then
19193 for ac_prog in dbtoepub
19195 # Extract the first word of "$ac_prog", so it can be a program name with args.
19196 set dummy $ac_prog; ac_word=$2
19197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19198 $as_echo_n "checking for $ac_word... " >&6; }
19199 if ${ac_cv_path_DBTOEPUB+:} false; then :
19200 $as_echo_n "(cached) " >&6
19201 else
19202 case $DBTOEPUB in
19203 [\\/]* | ?:[\\/]*)
19204 ac_cv_path_DBTOEPUB="$DBTOEPUB" # Let the user override the test with a path.
19207 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19208 for as_dir in $PATH
19210 IFS=$as_save_IFS
19211 test -z "$as_dir" && as_dir=.
19212 for ac_exec_ext in '' $ac_executable_extensions; do
19213 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19214 ac_cv_path_DBTOEPUB="$as_dir/$ac_word$ac_exec_ext"
19215 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19216 break 2
19218 done
19219 done
19220 IFS=$as_save_IFS
19223 esac
19225 DBTOEPUB=$ac_cv_path_DBTOEPUB
19226 if test -n "$DBTOEPUB"; then
19227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
19228 $as_echo "$DBTOEPUB" >&6; }
19229 else
19230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19231 $as_echo "no" >&6; }
19235 test -n "$DBTOEPUB" && break
19236 done
19238 else
19239 # Report the value of DBTOEPUB in configure's output in all cases.
19240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DBTOEPUB" >&5
19241 $as_echo_n "checking for DBTOEPUB... " >&6; }
19242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
19243 $as_echo "$DBTOEPUB" >&6; }
19248 # Check for test tools
19250 if test "$enable_tap_tests" = yes; then
19251 # Check for necessary modules, unless user has specified the "prove" to use;
19252 # in that case it's her responsibility to have a working configuration.
19253 # (prove might be part of a different Perl installation than perl, eg on
19254 # MSys, so the result of AX_PROG_PERL_MODULES could be irrelevant anyway.)
19255 if test -z "$PROVE"; then
19256 # Test::More and Time::HiRes are supposed to be part of core Perl,
19257 # but some distros omit them in a minimal installation.
19268 # Make sure we have perl
19269 if test -z "$PERL"; then
19270 # Extract the first word of "perl", so it can be a program name with args.
19271 set dummy perl; ac_word=$2
19272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19273 $as_echo_n "checking for $ac_word... " >&6; }
19274 if ${ac_cv_prog_PERL+:} false; then :
19275 $as_echo_n "(cached) " >&6
19276 else
19277 if test -n "$PERL"; then
19278 ac_cv_prog_PERL="$PERL" # Let the user override the test.
19279 else
19280 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19281 for as_dir in $PATH
19283 IFS=$as_save_IFS
19284 test -z "$as_dir" && as_dir=.
19285 for ac_exec_ext in '' $ac_executable_extensions; do
19286 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19287 ac_cv_prog_PERL="perl"
19288 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19289 break 2
19291 done
19292 done
19293 IFS=$as_save_IFS
19297 PERL=$ac_cv_prog_PERL
19298 if test -n "$PERL"; then
19299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
19300 $as_echo "$PERL" >&6; }
19301 else
19302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19303 $as_echo "no" >&6; }
19309 if test "x$PERL" != x; then
19310 ax_perl_modules_failed=0
19311 for ax_perl_module in 'IPC::Run' 'Test::More 0.87' 'Time::HiRes' ; do
19312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for perl module $ax_perl_module" >&5
19313 $as_echo_n "checking for perl module $ax_perl_module... " >&6; }
19315 # Would be nice to log result here, but can't rely on autoconf internals
19316 $PERL -e "use $ax_perl_module; exit" > /dev/null 2>&1
19317 if test $? -ne 0; then
19318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19319 $as_echo "no" >&6; };
19320 ax_perl_modules_failed=1
19321 else
19322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
19323 $as_echo "ok" >&6; };
19325 done
19327 # Run optional shell commands
19328 if test "$ax_perl_modules_failed" = 0; then
19331 else
19333 as_fn_error $? "Additional Perl modules are required to run TAP tests" "$LINENO" 5
19335 else
19336 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not find perl" >&5
19337 $as_echo "$as_me: WARNING: could not find perl" >&2;}
19340 # Now make sure we know where prove is
19341 if test -z "$PROVE"; then
19342 for ac_prog in prove
19344 # Extract the first word of "$ac_prog", so it can be a program name with args.
19345 set dummy $ac_prog; ac_word=$2
19346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19347 $as_echo_n "checking for $ac_word... " >&6; }
19348 if ${ac_cv_path_PROVE+:} false; then :
19349 $as_echo_n "(cached) " >&6
19350 else
19351 case $PROVE in
19352 [\\/]* | ?:[\\/]*)
19353 ac_cv_path_PROVE="$PROVE" # Let the user override the test with a path.
19356 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19357 for as_dir in $PATH
19359 IFS=$as_save_IFS
19360 test -z "$as_dir" && as_dir=.
19361 for ac_exec_ext in '' $ac_executable_extensions; do
19362 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19363 ac_cv_path_PROVE="$as_dir/$ac_word$ac_exec_ext"
19364 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19365 break 2
19367 done
19368 done
19369 IFS=$as_save_IFS
19372 esac
19374 PROVE=$ac_cv_path_PROVE
19375 if test -n "$PROVE"; then
19376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
19377 $as_echo "$PROVE" >&6; }
19378 else
19379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19380 $as_echo "no" >&6; }
19384 test -n "$PROVE" && break
19385 done
19387 else
19388 # Report the value of PROVE in configure's output in all cases.
19389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PROVE" >&5
19390 $as_echo_n "checking for PROVE... " >&6; }
19391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
19392 $as_echo "$PROVE" >&6; }
19395 if test -z "$PROVE"; then
19396 as_fn_error $? "prove not found" "$LINENO" 5
19400 # If compiler will take -Wl,--as-needed (or various platform-specific
19401 # spellings thereof) then add that to LDFLAGS. This is much easier than
19402 # trying to filter LIBS to the minimum for each executable.
19403 # On (at least) some Red-Hat-derived systems, this switch breaks linking to
19404 # libreadline; therefore we postpone testing it until we know what library
19405 # dependencies readline has. The test code will try to link with $LIBS.
19406 if test "$with_readline" = yes; then
19407 link_test_func=readline
19408 else
19409 link_test_func=exit
19412 if test "$PORTNAME" = "darwin"; then
19413 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-dead_strip_dylibs" >&5
19414 $as_echo_n "checking whether $CC supports -Wl,-dead_strip_dylibs... " >&6; }
19415 if ${pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs+:} false; then :
19416 $as_echo_n "(cached) " >&6
19417 else
19418 pgac_save_LDFLAGS=$LDFLAGS
19419 LDFLAGS="$pgac_save_LDFLAGS -Wl,-dead_strip_dylibs"
19420 if test "$cross_compiling" = yes; then :
19421 pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs="assuming no"
19422 else
19423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19424 /* end confdefs.h. */
19425 extern void $link_test_func (); void (*fptr) () = $link_test_func;
19427 main ()
19431 return 0;
19433 _ACEOF
19434 if ac_fn_c_try_run "$LINENO"; then :
19435 pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=yes
19436 else
19437 pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=no
19439 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19440 conftest.$ac_objext conftest.beam conftest.$ac_ext
19443 LDFLAGS="$pgac_save_LDFLAGS"
19445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&5
19446 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&6; }
19447 if test x"$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" = x"yes"; then
19448 LDFLAGS="$LDFLAGS -Wl,-dead_strip_dylibs"
19451 elif test "$PORTNAME" = "openbsd"; then
19452 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-Bdynamic" >&5
19453 $as_echo_n "checking whether $CC supports -Wl,-Bdynamic... " >&6; }
19454 if ${pgac_cv_prog_cc_ldflags__Wl__Bdynamic+:} false; then :
19455 $as_echo_n "(cached) " >&6
19456 else
19457 pgac_save_LDFLAGS=$LDFLAGS
19458 LDFLAGS="$pgac_save_LDFLAGS -Wl,-Bdynamic"
19459 if test "$cross_compiling" = yes; then :
19460 pgac_cv_prog_cc_ldflags__Wl__Bdynamic="assuming no"
19461 else
19462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19463 /* end confdefs.h. */
19464 extern void $link_test_func (); void (*fptr) () = $link_test_func;
19466 main ()
19470 return 0;
19472 _ACEOF
19473 if ac_fn_c_try_run "$LINENO"; then :
19474 pgac_cv_prog_cc_ldflags__Wl__Bdynamic=yes
19475 else
19476 pgac_cv_prog_cc_ldflags__Wl__Bdynamic=no
19478 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19479 conftest.$ac_objext conftest.beam conftest.$ac_ext
19482 LDFLAGS="$pgac_save_LDFLAGS"
19484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&5
19485 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&6; }
19486 if test x"$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" = x"yes"; then
19487 LDFLAGS="$LDFLAGS -Wl,-Bdynamic"
19490 else
19491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,--as-needed" >&5
19492 $as_echo_n "checking whether $CC supports -Wl,--as-needed... " >&6; }
19493 if ${pgac_cv_prog_cc_ldflags__Wl___as_needed+:} false; then :
19494 $as_echo_n "(cached) " >&6
19495 else
19496 pgac_save_LDFLAGS=$LDFLAGS
19497 LDFLAGS="$pgac_save_LDFLAGS -Wl,--as-needed"
19498 if test "$cross_compiling" = yes; then :
19499 pgac_cv_prog_cc_ldflags__Wl___as_needed="assuming no"
19500 else
19501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19502 /* end confdefs.h. */
19503 extern void $link_test_func (); void (*fptr) () = $link_test_func;
19505 main ()
19509 return 0;
19511 _ACEOF
19512 if ac_fn_c_try_run "$LINENO"; then :
19513 pgac_cv_prog_cc_ldflags__Wl___as_needed=yes
19514 else
19515 pgac_cv_prog_cc_ldflags__Wl___as_needed=no
19517 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19518 conftest.$ac_objext conftest.beam conftest.$ac_ext
19521 LDFLAGS="$pgac_save_LDFLAGS"
19523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl___as_needed" >&5
19524 $as_echo "$pgac_cv_prog_cc_ldflags__Wl___as_needed" >&6; }
19525 if test x"$pgac_cv_prog_cc_ldflags__Wl___as_needed" = x"yes"; then
19526 LDFLAGS="$LDFLAGS -Wl,--as-needed"
19531 # Create compiler version string
19532 if test x"$GCC" = x"yes" ; then
19533 cc_string=`${CC} --version | sed q`
19534 case $cc_string in [A-Za-z]*) ;; *) cc_string="GCC $cc_string";; esac
19535 elif test x"$SUN_STUDIO_CC" = x"yes" ; then
19536 cc_string=`${CC} -V 2>&1 | sed q`
19537 else
19538 cc_string=$CC
19542 cat >>confdefs.h <<_ACEOF
19543 #define PG_VERSION_STR "PostgreSQL $PG_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"
19544 _ACEOF
19547 # Supply a numeric version string for use by 3rd party add-ons
19548 # awk -F is a regex on some platforms, and not on others, so make "." a tab
19549 PG_VERSION_NUM="`echo $PG_MAJORVERSION $PG_MINORVERSION |
19550 $AWK '{printf "%d%04d", $1, $2}'`"
19552 cat >>confdefs.h <<_ACEOF
19553 #define PG_VERSION_NUM $PG_VERSION_NUM
19554 _ACEOF
19558 # If we are inserting PG_SYSROOT into CPPFLAGS, do so symbolically not
19559 # literally, so that it's possible to override it at build time using
19560 # a command like "make ... PG_SYSROOT=path". This has to be done after
19561 # we've finished all configure checks that depend on CPPFLAGS.
19562 # The same for LDFLAGS, too.
19563 if test x"$PG_SYSROOT" != x; then
19564 CPPFLAGS=`echo "$CPPFLAGS" | sed -e "s| $PG_SYSROOT | \\\$(PG_SYSROOT) |"`
19565 LDFLAGS=`echo "$LDFLAGS" | sed -e "s| $PG_SYSROOT | \\\$(PG_SYSROOT) |"`
19570 # Begin output steps
19572 { $as_echo "$as_me:${as_lineno-$LINENO}: using compiler=$cc_string" >&5
19573 $as_echo "$as_me: using compiler=$cc_string" >&6;}
19574 { $as_echo "$as_me:${as_lineno-$LINENO}: using CFLAGS=$CFLAGS" >&5
19575 $as_echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
19576 { $as_echo "$as_me:${as_lineno-$LINENO}: using CPPFLAGS=$CPPFLAGS" >&5
19577 $as_echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
19578 { $as_echo "$as_me:${as_lineno-$LINENO}: using LDFLAGS=$LDFLAGS" >&5
19579 $as_echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
19580 # Currently only used when LLVM is used
19581 if test "$with_llvm" = yes ; then
19582 { $as_echo "$as_me:${as_lineno-$LINENO}: using CXX=$CXX" >&5
19583 $as_echo "$as_me: using CXX=$CXX" >&6;}
19584 { $as_echo "$as_me:${as_lineno-$LINENO}: using CXXFLAGS=$CXXFLAGS" >&5
19585 $as_echo "$as_me: using CXXFLAGS=$CXXFLAGS" >&6;}
19586 { $as_echo "$as_me:${as_lineno-$LINENO}: using CLANG=$CLANG" >&5
19587 $as_echo "$as_me: using CLANG=$CLANG" >&6;}
19588 { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&5
19589 $as_echo "$as_me: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&6;}
19590 { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&5
19591 $as_echo "$as_me: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&6;}
19594 # prepare build tree if outside source tree
19595 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
19596 # Note 2: /bin/pwd might be better than shell's built-in at getting
19597 # a symlink-free name.
19598 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
19599 vpath_build=no
19600 else
19601 vpath_build=yes
19602 if test "$no_create" != yes; then
19603 $as_echo_n "preparing build tree... " >&6
19604 pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
19605 $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
19606 || as_fn_error $? "failed" "$LINENO" 5
19607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
19608 $as_echo "done" >&6; }
19614 ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
19617 ac_config_links="$ac_config_links src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION} src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION} src/include/pg_config_os.h:src/include/port/${template}.h src/Makefile.port:src/makefiles/Makefile.${template}"
19620 if test "$PORTNAME" = "win32"; then
19621 ac_config_commands="$ac_config_commands check_win32_symlinks"
19625 ac_config_headers="$ac_config_headers src/include/pg_config.h"
19628 ac_config_headers="$ac_config_headers src/include/pg_config_ext.h"
19631 ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
19634 cat >confcache <<\_ACEOF
19635 # This file is a shell script that caches the results of configure
19636 # tests run on this system so they can be shared between configure
19637 # scripts and configure runs, see configure's option --config-cache.
19638 # It is not useful on other systems. If it contains results you don't
19639 # want to keep, you may remove or edit it.
19641 # config.status only pays attention to the cache file if you give it
19642 # the --recheck option to rerun configure.
19644 # `ac_cv_env_foo' variables (set or unset) will be overridden when
19645 # loading this file, other *unset* `ac_cv_foo' will be assigned the
19646 # following values.
19648 _ACEOF
19650 # The following way of writing the cache mishandles newlines in values,
19651 # but we know of no workaround that is simple, portable, and efficient.
19652 # So, we kill variables containing newlines.
19653 # Ultrix sh set writes to stderr and can't be redirected directly,
19654 # and sets the high bit in the cache file unless we assign to the vars.
19656 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
19657 eval ac_val=\$$ac_var
19658 case $ac_val in #(
19659 *${as_nl}*)
19660 case $ac_var in #(
19661 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
19662 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
19663 esac
19664 case $ac_var in #(
19665 _ | IFS | as_nl) ;; #(
19666 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
19667 *) { eval $ac_var=; unset $ac_var;} ;;
19668 esac ;;
19669 esac
19670 done
19672 (set) 2>&1 |
19673 case $as_nl`(ac_space=' '; set) 2>&1` in #(
19674 *${as_nl}ac_space=\ *)
19675 # `set' does not quote correctly, so add quotes: double-quote
19676 # substitution turns \\\\ into \\, and sed turns \\ into \.
19677 sed -n \
19678 "s/'/'\\\\''/g;
19679 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
19680 ;; #(
19682 # `set' quotes correctly as required by POSIX, so do not add quotes.
19683 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
19685 esac |
19686 sort
19688 sed '
19689 /^ac_cv_env_/b end
19690 t clear
19691 :clear
19692 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
19693 t end
19694 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
19695 :end' >>confcache
19696 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
19697 if test -w "$cache_file"; then
19698 if test "x$cache_file" != "x/dev/null"; then
19699 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
19700 $as_echo "$as_me: updating cache $cache_file" >&6;}
19701 if test ! -f "$cache_file" || test -h "$cache_file"; then
19702 cat confcache >"$cache_file"
19703 else
19704 case $cache_file in #(
19705 */* | ?:*)
19706 mv -f confcache "$cache_file"$$ &&
19707 mv -f "$cache_file"$$ "$cache_file" ;; #(
19709 mv -f confcache "$cache_file" ;;
19710 esac
19713 else
19714 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
19715 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
19718 rm -f confcache
19720 test "x$prefix" = xNONE && prefix=$ac_default_prefix
19721 # Let make expand exec_prefix.
19722 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19724 DEFS=-DHAVE_CONFIG_H
19726 ac_libobjs=
19727 ac_ltlibobjs=
19729 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
19730 # 1. Remove the extension, and $U if already installed.
19731 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
19732 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
19733 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
19734 # will be set to the directory where LIBOBJS objects are built.
19735 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
19736 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
19737 done
19738 LIBOBJS=$ac_libobjs
19740 LTLIBOBJS=$ac_ltlibobjs
19745 : "${CONFIG_STATUS=./config.status}"
19746 ac_write_fail=0
19747 ac_clean_files_save=$ac_clean_files
19748 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
19749 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
19750 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
19751 as_write_fail=0
19752 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
19753 #! $SHELL
19754 # Generated by $as_me.
19755 # Run this file to recreate the current configuration.
19756 # Compiler output produced by configure, useful for debugging
19757 # configure, is in config.log if it exists.
19759 debug=false
19760 ac_cs_recheck=false
19761 ac_cs_silent=false
19763 SHELL=\${CONFIG_SHELL-$SHELL}
19764 export SHELL
19765 _ASEOF
19766 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
19767 ## -------------------- ##
19768 ## M4sh Initialization. ##
19769 ## -------------------- ##
19771 # Be more Bourne compatible
19772 DUALCASE=1; export DUALCASE # for MKS sh
19773 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
19774 emulate sh
19775 NULLCMD=:
19776 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
19777 # is contrary to our usage. Disable this feature.
19778 alias -g '${1+"$@"}'='"$@"'
19779 setopt NO_GLOB_SUBST
19780 else
19781 case `(set -o) 2>/dev/null` in #(
19782 *posix*) :
19783 set -o posix ;; #(
19784 *) :
19786 esac
19790 as_nl='
19792 export as_nl
19793 # Printing a long string crashes Solaris 7 /usr/bin/printf.
19794 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
19795 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
19796 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
19797 # Prefer a ksh shell builtin over an external printf program on Solaris,
19798 # but without wasting forks for bash or zsh.
19799 if test -z "$BASH_VERSION$ZSH_VERSION" \
19800 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
19801 as_echo='print -r --'
19802 as_echo_n='print -rn --'
19803 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
19804 as_echo='printf %s\n'
19805 as_echo_n='printf %s'
19806 else
19807 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
19808 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
19809 as_echo_n='/usr/ucb/echo -n'
19810 else
19811 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
19812 as_echo_n_body='eval
19813 arg=$1;
19814 case $arg in #(
19815 *"$as_nl"*)
19816 expr "X$arg" : "X\\(.*\\)$as_nl";
19817 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
19818 esac;
19819 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
19821 export as_echo_n_body
19822 as_echo_n='sh -c $as_echo_n_body as_echo'
19824 export as_echo_body
19825 as_echo='sh -c $as_echo_body as_echo'
19828 # The user is always right.
19829 if test "${PATH_SEPARATOR+set}" != set; then
19830 PATH_SEPARATOR=:
19831 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
19832 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
19833 PATH_SEPARATOR=';'
19838 # IFS
19839 # We need space, tab and new line, in precisely that order. Quoting is
19840 # there to prevent editors from complaining about space-tab.
19841 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
19842 # splitting by setting IFS to empty value.)
19843 IFS=" "" $as_nl"
19845 # Find who we are. Look in the path if we contain no directory separator.
19846 as_myself=
19847 case $0 in #((
19848 *[\\/]* ) as_myself=$0 ;;
19849 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19850 for as_dir in $PATH
19852 IFS=$as_save_IFS
19853 test -z "$as_dir" && as_dir=.
19854 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
19855 done
19856 IFS=$as_save_IFS
19859 esac
19860 # We did not find ourselves, most probably we were run as `sh COMMAND'
19861 # in which case we are not to be found in the path.
19862 if test "x$as_myself" = x; then
19863 as_myself=$0
19865 if test ! -f "$as_myself"; then
19866 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
19867 exit 1
19870 # Unset variables that we do not need and which cause bugs (e.g. in
19871 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
19872 # suppresses any "Segmentation fault" message there. '((' could
19873 # trigger a bug in pdksh 5.2.14.
19874 for as_var in BASH_ENV ENV MAIL MAILPATH
19875 do eval test x\${$as_var+set} = xset \
19876 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
19877 done
19878 PS1='$ '
19879 PS2='> '
19880 PS4='+ '
19882 # NLS nuisances.
19883 LC_ALL=C
19884 export LC_ALL
19885 LANGUAGE=C
19886 export LANGUAGE
19888 # CDPATH.
19889 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
19892 # as_fn_error STATUS ERROR [LINENO LOG_FD]
19893 # ----------------------------------------
19894 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
19895 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
19896 # script with STATUS, using 1 if that was 0.
19897 as_fn_error ()
19899 as_status=$1; test $as_status -eq 0 && as_status=1
19900 if test "$4"; then
19901 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
19902 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
19904 $as_echo "$as_me: error: $2" >&2
19905 as_fn_exit $as_status
19906 } # as_fn_error
19909 # as_fn_set_status STATUS
19910 # -----------------------
19911 # Set $? to STATUS, without forking.
19912 as_fn_set_status ()
19914 return $1
19915 } # as_fn_set_status
19917 # as_fn_exit STATUS
19918 # -----------------
19919 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
19920 as_fn_exit ()
19922 set +e
19923 as_fn_set_status $1
19924 exit $1
19925 } # as_fn_exit
19927 # as_fn_unset VAR
19928 # ---------------
19929 # Portably unset VAR.
19930 as_fn_unset ()
19932 { eval $1=; unset $1;}
19934 as_unset=as_fn_unset
19935 # as_fn_append VAR VALUE
19936 # ----------------------
19937 # Append the text in VALUE to the end of the definition contained in VAR. Take
19938 # advantage of any shell optimizations that allow amortized linear growth over
19939 # repeated appends, instead of the typical quadratic growth present in naive
19940 # implementations.
19941 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
19942 eval 'as_fn_append ()
19944 eval $1+=\$2
19946 else
19947 as_fn_append ()
19949 eval $1=\$$1\$2
19951 fi # as_fn_append
19953 # as_fn_arith ARG...
19954 # ------------------
19955 # Perform arithmetic evaluation on the ARGs, and store the result in the
19956 # global $as_val. Take advantage of shells that can avoid forks. The arguments
19957 # must be portable across $(()) and expr.
19958 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
19959 eval 'as_fn_arith ()
19961 as_val=$(( $* ))
19963 else
19964 as_fn_arith ()
19966 as_val=`expr "$@" || test $? -eq 1`
19968 fi # as_fn_arith
19971 if expr a : '\(a\)' >/dev/null 2>&1 &&
19972 test "X`expr 00001 : '.*\(...\)'`" = X001; then
19973 as_expr=expr
19974 else
19975 as_expr=false
19978 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
19979 as_basename=basename
19980 else
19981 as_basename=false
19984 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
19985 as_dirname=dirname
19986 else
19987 as_dirname=false
19990 as_me=`$as_basename -- "$0" ||
19991 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
19992 X"$0" : 'X\(//\)$' \| \
19993 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
19994 $as_echo X/"$0" |
19995 sed '/^.*\/\([^/][^/]*\)\/*$/{
19996 s//\1/
19999 /^X\/\(\/\/\)$/{
20000 s//\1/
20003 /^X\/\(\/\).*/{
20004 s//\1/
20007 s/.*/./; q'`
20009 # Avoid depending upon Character Ranges.
20010 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
20011 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
20012 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
20013 as_cr_digits='0123456789'
20014 as_cr_alnum=$as_cr_Letters$as_cr_digits
20016 ECHO_C= ECHO_N= ECHO_T=
20017 case `echo -n x` in #(((((
20018 -n*)
20019 case `echo 'xy\c'` in
20020 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
20021 xy) ECHO_C='\c';;
20022 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
20023 ECHO_T=' ';;
20024 esac;;
20026 ECHO_N='-n';;
20027 esac
20029 rm -f conf$$ conf$$.exe conf$$.file
20030 if test -d conf$$.dir; then
20031 rm -f conf$$.dir/conf$$.file
20032 else
20033 rm -f conf$$.dir
20034 mkdir conf$$.dir 2>/dev/null
20036 if (echo >conf$$.file) 2>/dev/null; then
20037 if ln -s conf$$.file conf$$ 2>/dev/null; then
20038 as_ln_s='ln -s'
20039 # ... but there are two gotchas:
20040 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
20041 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
20042 # In both cases, we have to default to `cp -pR'.
20043 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
20044 as_ln_s='cp -pR'
20045 elif ln conf$$.file conf$$ 2>/dev/null; then
20046 as_ln_s=ln
20047 else
20048 as_ln_s='cp -pR'
20050 else
20051 as_ln_s='cp -pR'
20053 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
20054 rmdir conf$$.dir 2>/dev/null
20057 # as_fn_mkdir_p
20058 # -------------
20059 # Create "$as_dir" as a directory, including parents if necessary.
20060 as_fn_mkdir_p ()
20063 case $as_dir in #(
20064 -*) as_dir=./$as_dir;;
20065 esac
20066 test -d "$as_dir" || eval $as_mkdir_p || {
20067 as_dirs=
20068 while :; do
20069 case $as_dir in #(
20070 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
20071 *) as_qdir=$as_dir;;
20072 esac
20073 as_dirs="'$as_qdir' $as_dirs"
20074 as_dir=`$as_dirname -- "$as_dir" ||
20075 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20076 X"$as_dir" : 'X\(//\)[^/]' \| \
20077 X"$as_dir" : 'X\(//\)$' \| \
20078 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
20079 $as_echo X"$as_dir" |
20080 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20081 s//\1/
20084 /^X\(\/\/\)[^/].*/{
20085 s//\1/
20088 /^X\(\/\/\)$/{
20089 s//\1/
20092 /^X\(\/\).*/{
20093 s//\1/
20096 s/.*/./; q'`
20097 test -d "$as_dir" && break
20098 done
20099 test -z "$as_dirs" || eval "mkdir $as_dirs"
20100 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
20103 } # as_fn_mkdir_p
20104 if mkdir -p . 2>/dev/null; then
20105 as_mkdir_p='mkdir -p "$as_dir"'
20106 else
20107 test -d ./-p && rmdir ./-p
20108 as_mkdir_p=false
20112 # as_fn_executable_p FILE
20113 # -----------------------
20114 # Test if FILE is an executable regular file.
20115 as_fn_executable_p ()
20117 test -f "$1" && test -x "$1"
20118 } # as_fn_executable_p
20119 as_test_x='test -x'
20120 as_executable_p=as_fn_executable_p
20122 # Sed expression to map a string onto a valid CPP name.
20123 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
20125 # Sed expression to map a string onto a valid variable name.
20126 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
20129 exec 6>&1
20130 ## ----------------------------------- ##
20131 ## Main body of $CONFIG_STATUS script. ##
20132 ## ----------------------------------- ##
20133 _ASEOF
20134 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
20136 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20137 # Save the log message, to keep $0 and so on meaningful, and to
20138 # report actual input values of CONFIG_FILES etc. instead of their
20139 # values after options handling.
20140 ac_log="
20141 This file was extended by PostgreSQL $as_me 15devel, which was
20142 generated by GNU Autoconf 2.69. Invocation command line was
20144 CONFIG_FILES = $CONFIG_FILES
20145 CONFIG_HEADERS = $CONFIG_HEADERS
20146 CONFIG_LINKS = $CONFIG_LINKS
20147 CONFIG_COMMANDS = $CONFIG_COMMANDS
20148 $ $0 $@
20150 on `(hostname || uname -n) 2>/dev/null | sed 1q`
20153 _ACEOF
20155 case $ac_config_files in *"
20156 "*) set x $ac_config_files; shift; ac_config_files=$*;;
20157 esac
20159 case $ac_config_headers in *"
20160 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
20161 esac
20164 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20165 # Files that config.status was made for.
20166 config_files="$ac_config_files"
20167 config_headers="$ac_config_headers"
20168 config_links="$ac_config_links"
20169 config_commands="$ac_config_commands"
20171 _ACEOF
20173 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20174 ac_cs_usage="\
20175 \`$as_me' instantiates files and other configuration actions
20176 from templates according to the current configuration. Unless the files
20177 and actions are specified as TAGs, all are instantiated by default.
20179 Usage: $0 [OPTION]... [TAG]...
20181 -h, --help print this help, then exit
20182 -V, --version print version number and configuration settings, then exit
20183 --config print configuration, then exit
20184 -q, --quiet, --silent
20185 do not print progress messages
20186 -d, --debug don't remove temporary files
20187 --recheck update $as_me by reconfiguring in the same conditions
20188 --file=FILE[:TEMPLATE]
20189 instantiate the configuration file FILE
20190 --header=FILE[:TEMPLATE]
20191 instantiate the configuration header FILE
20193 Configuration files:
20194 $config_files
20196 Configuration headers:
20197 $config_headers
20199 Configuration links:
20200 $config_links
20202 Configuration commands:
20203 $config_commands
20205 Report bugs to <pgsql-bugs@lists.postgresql.org>.
20206 PostgreSQL home page: <https://www.postgresql.org/>."
20208 _ACEOF
20209 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20210 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
20211 ac_cs_version="\\
20212 PostgreSQL config.status 15devel
20213 configured by $0, generated by GNU Autoconf 2.69,
20214 with options \\"\$ac_cs_config\\"
20216 Copyright (C) 2012 Free Software Foundation, Inc.
20217 This config.status script is free software; the Free Software Foundation
20218 gives unlimited permission to copy, distribute and modify it."
20220 ac_pwd='$ac_pwd'
20221 srcdir='$srcdir'
20222 INSTALL='$INSTALL'
20223 MKDIR_P='$MKDIR_P'
20224 AWK='$AWK'
20225 test -n "\$AWK" || AWK=awk
20226 _ACEOF
20228 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20229 # The default lists apply if the user does not specify any file.
20230 ac_need_defaults=:
20231 while test $# != 0
20233 case $1 in
20234 --*=?*)
20235 ac_option=`expr "X$1" : 'X\([^=]*\)='`
20236 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
20237 ac_shift=:
20239 --*=)
20240 ac_option=`expr "X$1" : 'X\([^=]*\)='`
20241 ac_optarg=
20242 ac_shift=:
20245 ac_option=$1
20246 ac_optarg=$2
20247 ac_shift=shift
20249 esac
20251 case $ac_option in
20252 # Handling of the options.
20253 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20254 ac_cs_recheck=: ;;
20255 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
20256 $as_echo "$ac_cs_version"; exit ;;
20257 --config | --confi | --conf | --con | --co | --c )
20258 $as_echo "$ac_cs_config"; exit ;;
20259 --debug | --debu | --deb | --de | --d | -d )
20260 debug=: ;;
20261 --file | --fil | --fi | --f )
20262 $ac_shift
20263 case $ac_optarg in
20264 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
20265 '') as_fn_error $? "missing file argument" ;;
20266 esac
20267 as_fn_append CONFIG_FILES " '$ac_optarg'"
20268 ac_need_defaults=false;;
20269 --header | --heade | --head | --hea )
20270 $ac_shift
20271 case $ac_optarg in
20272 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
20273 esac
20274 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
20275 ac_need_defaults=false;;
20276 --he | --h)
20277 # Conflict between --help and --header
20278 as_fn_error $? "ambiguous option: \`$1'
20279 Try \`$0 --help' for more information.";;
20280 --help | --hel | -h )
20281 $as_echo "$ac_cs_usage"; exit ;;
20282 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
20283 | -silent | --silent | --silen | --sile | --sil | --si | --s)
20284 ac_cs_silent=: ;;
20286 # This is an error.
20287 -*) as_fn_error $? "unrecognized option: \`$1'
20288 Try \`$0 --help' for more information." ;;
20290 *) as_fn_append ac_config_targets " $1"
20291 ac_need_defaults=false ;;
20293 esac
20294 shift
20295 done
20297 ac_configure_extra_args=
20299 if $ac_cs_silent; then
20300 exec 6>/dev/null
20301 ac_configure_extra_args="$ac_configure_extra_args --silent"
20304 _ACEOF
20305 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20306 if \$ac_cs_recheck; then
20307 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
20308 shift
20309 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
20310 CONFIG_SHELL='$SHELL'
20311 export CONFIG_SHELL
20312 exec "\$@"
20315 _ACEOF
20316 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20317 exec 5>>config.log
20319 echo
20320 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
20321 ## Running $as_me. ##
20322 _ASBOX
20323 $as_echo "$ac_log"
20324 } >&5
20326 _ACEOF
20327 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20328 _ACEOF
20330 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20332 # Handling of arguments.
20333 for ac_config_target in $ac_config_targets
20335 case $ac_config_target in
20336 "src/backend/port/tas.s") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
20337 "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
20338 "src/Makefile.global") CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
20339 "src/backend/port/pg_sema.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
20340 "src/backend/port/pg_shmem.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
20341 "src/include/pg_config_os.h") CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
20342 "src/Makefile.port") CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
20343 "check_win32_symlinks") CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
20344 "src/include/pg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
20345 "src/include/pg_config_ext.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config_ext.h" ;;
20346 "src/interfaces/ecpg/include/ecpg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
20348 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
20349 esac
20350 done
20353 # If the user did not use the arguments to specify the items to instantiate,
20354 # then the envvar interface is used. Set only those that are not.
20355 # We use the long form for the default assignment because of an extremely
20356 # bizarre bug on SunOS 4.1.3.
20357 if $ac_need_defaults; then
20358 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
20359 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
20360 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
20361 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
20364 # Have a temporary directory for convenience. Make it in the build tree
20365 # simply because there is no reason against having it here, and in addition,
20366 # creating and moving files from /tmp can sometimes cause problems.
20367 # Hook for its removal unless debugging.
20368 # Note that there is a small window in which the directory will not be cleaned:
20369 # after its creation but before its name has been assigned to `$tmp'.
20370 $debug ||
20372 tmp= ac_tmp=
20373 trap 'exit_status=$?
20374 : "${ac_tmp:=$tmp}"
20375 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
20377 trap 'as_fn_exit 1' 1 2 13 15
20379 # Create a (secure) tmp directory for tmp files.
20382 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
20383 test -d "$tmp"
20384 } ||
20386 tmp=./conf$$-$RANDOM
20387 (umask 077 && mkdir "$tmp")
20388 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
20389 ac_tmp=$tmp
20391 # Set up the scripts for CONFIG_FILES section.
20392 # No need to generate them if there are no CONFIG_FILES.
20393 # This happens for instance with `./config.status config.h'.
20394 if test -n "$CONFIG_FILES"; then
20397 ac_cr=`echo X | tr X '\015'`
20398 # On cygwin, bash can eat \r inside `` if the user requested igncr.
20399 # But we know of no other shell where ac_cr would be empty at this
20400 # point, so we can use a bashism as a fallback.
20401 if test "x$ac_cr" = x; then
20402 eval ac_cr=\$\'\\r\'
20404 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
20405 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
20406 ac_cs_awk_cr='\\r'
20407 else
20408 ac_cs_awk_cr=$ac_cr
20411 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
20412 _ACEOF
20416 echo "cat >conf$$subs.awk <<_ACEOF" &&
20417 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
20418 echo "_ACEOF"
20419 } >conf$$subs.sh ||
20420 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20421 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
20422 ac_delim='%!_!# '
20423 for ac_last_try in false false false false false :; do
20424 . ./conf$$subs.sh ||
20425 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20427 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
20428 if test $ac_delim_n = $ac_delim_num; then
20429 break
20430 elif $ac_last_try; then
20431 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20432 else
20433 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20435 done
20436 rm -f conf$$subs.sh
20438 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20439 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
20440 _ACEOF
20441 sed -n '
20443 s/^/S["/; s/!.*/"]=/
20446 s/^[^!]*!//
20447 :repl
20448 t repl
20449 s/'"$ac_delim"'$//
20450 t delim
20453 s/\(.\{148\}\)..*/\1/
20454 t more1
20455 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
20458 b repl
20459 :more1
20460 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20463 s/.\{148\}//
20464 t nl
20465 :delim
20467 s/\(.\{148\}\)..*/\1/
20468 t more2
20469 s/["\\]/\\&/g; s/^/"/; s/$/"/
20472 :more2
20473 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20476 s/.\{148\}//
20477 t delim
20478 ' <conf$$subs.awk | sed '
20479 /^[^""]/{
20481 s/\n//
20483 ' >>$CONFIG_STATUS || ac_write_fail=1
20484 rm -f conf$$subs.awk
20485 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20486 _ACAWK
20487 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
20488 for (key in S) S_is_set[key] = 1
20489 FS = "\a"
20493 line = $ 0
20494 nfields = split(line, field, "@")
20495 substed = 0
20496 len = length(field[1])
20497 for (i = 2; i < nfields; i++) {
20498 key = field[i]
20499 keylen = length(key)
20500 if (S_is_set[key]) {
20501 value = S[key]
20502 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
20503 len += length(value) + length(field[++i])
20504 substed = 1
20505 } else
20506 len += 1 + keylen
20509 print line
20512 _ACAWK
20513 _ACEOF
20514 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20515 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
20516 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
20517 else
20519 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
20520 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
20521 _ACEOF
20523 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
20524 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
20525 # trailing colons and then remove the whole line if VPATH becomes empty
20526 # (actually we leave an empty line to preserve line numbers).
20527 if test "x$srcdir" = x.; then
20528 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
20530 s///
20531 s/^/:/
20532 s/[ ]*$/:/
20533 s/:\$(srcdir):/:/g
20534 s/:\${srcdir}:/:/g
20535 s/:@srcdir@:/:/g
20536 s/^:*//
20537 s/:*$//
20539 s/\(=[ ]*\).*/\1/
20541 s/\n//
20542 s/^[^=]*=[ ]*$//
20546 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20547 fi # test -n "$CONFIG_FILES"
20549 # Set up the scripts for CONFIG_HEADERS section.
20550 # No need to generate them if there are no CONFIG_HEADERS.
20551 # This happens for instance with `./config.status Makefile'.
20552 if test -n "$CONFIG_HEADERS"; then
20553 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
20554 BEGIN {
20555 _ACEOF
20557 # Transform confdefs.h into an awk script `defines.awk', embedded as
20558 # here-document in config.status, that substitutes the proper values into
20559 # config.h.in to produce config.h.
20561 # Create a delimiter string that does not exist in confdefs.h, to ease
20562 # handling of long lines.
20563 ac_delim='%!_!# '
20564 for ac_last_try in false false :; do
20565 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
20566 if test -z "$ac_tt"; then
20567 break
20568 elif $ac_last_try; then
20569 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
20570 else
20571 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20573 done
20575 # For the awk script, D is an array of macro values keyed by name,
20576 # likewise P contains macro parameters if any. Preserve backslash
20577 # newline sequences.
20579 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
20580 sed -n '
20581 s/.\{148\}/&'"$ac_delim"'/g
20582 t rset
20583 :rset
20584 s/^[ ]*#[ ]*define[ ][ ]*/ /
20585 t def
20587 :def
20588 s/\\$//
20589 t bsnl
20590 s/["\\]/\\&/g
20591 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
20592 D["\1"]=" \3"/p
20593 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
20595 :bsnl
20596 s/["\\]/\\&/g
20597 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
20598 D["\1"]=" \3\\\\\\n"\\/p
20599 t cont
20600 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
20601 t cont
20603 :cont
20605 s/.\{148\}/&'"$ac_delim"'/g
20606 t clear
20607 :clear
20608 s/\\$//
20609 t bsnlc
20610 s/["\\]/\\&/g; s/^/"/; s/$/"/p
20612 :bsnlc
20613 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
20614 b cont
20615 ' <confdefs.h | sed '
20616 s/'"$ac_delim"'/"\\\
20617 "/g' >>$CONFIG_STATUS || ac_write_fail=1
20619 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20620 for (key in D) D_is_set[key] = 1
20621 FS = "\a"
20623 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
20624 line = \$ 0
20625 split(line, arg, " ")
20626 if (arg[1] == "#") {
20627 defundef = arg[2]
20628 mac1 = arg[3]
20629 } else {
20630 defundef = substr(arg[1], 2)
20631 mac1 = arg[2]
20633 split(mac1, mac2, "(") #)
20634 macro = mac2[1]
20635 prefix = substr(line, 1, index(line, defundef) - 1)
20636 if (D_is_set[macro]) {
20637 # Preserve the white space surrounding the "#".
20638 print prefix "define", macro P[macro] D[macro]
20639 next
20640 } else {
20641 # Replace #undef with comments. This is necessary, for example,
20642 # in the case of _POSIX_SOURCE, which is predefined and required
20643 # on some systems where configure will not decide to define it.
20644 if (defundef == "undef") {
20645 print "/*", prefix defundef, macro, "*/"
20646 next
20650 { print }
20651 _ACAWK
20652 _ACEOF
20653 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20654 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
20655 fi # test -n "$CONFIG_HEADERS"
20658 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
20659 shift
20660 for ac_tag
20662 case $ac_tag in
20663 :[FHLC]) ac_mode=$ac_tag; continue;;
20664 esac
20665 case $ac_mode$ac_tag in
20666 :[FHL]*:*);;
20667 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
20668 :[FH]-) ac_tag=-:-;;
20669 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
20670 esac
20671 ac_save_IFS=$IFS
20672 IFS=:
20673 set x $ac_tag
20674 IFS=$ac_save_IFS
20675 shift
20676 ac_file=$1
20677 shift
20679 case $ac_mode in
20680 :L) ac_source=$1;;
20681 :[FH])
20682 ac_file_inputs=
20683 for ac_f
20685 case $ac_f in
20686 -) ac_f="$ac_tmp/stdin";;
20687 *) # Look for the file first in the build tree, then in the source tree
20688 # (if the path is not absolute). The absolute path cannot be DOS-style,
20689 # because $ac_f cannot contain `:'.
20690 test -f "$ac_f" ||
20691 case $ac_f in
20692 [\\/$]*) false;;
20693 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
20694 esac ||
20695 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
20696 esac
20697 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
20698 as_fn_append ac_file_inputs " '$ac_f'"
20699 done
20701 # Let's still pretend it is `configure' which instantiates (i.e., don't
20702 # use $as_me), people would be surprised to read:
20703 # /* config.h. Generated by config.status. */
20704 configure_input='Generated from '`
20705 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
20706 `' by configure.'
20707 if test x"$ac_file" != x-; then
20708 configure_input="$ac_file. $configure_input"
20709 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
20710 $as_echo "$as_me: creating $ac_file" >&6;}
20712 # Neutralize special characters interpreted by sed in replacement strings.
20713 case $configure_input in #(
20714 *\&* | *\|* | *\\* )
20715 ac_sed_conf_input=`$as_echo "$configure_input" |
20716 sed 's/[\\\\&|]/\\\\&/g'`;; #(
20717 *) ac_sed_conf_input=$configure_input;;
20718 esac
20720 case $ac_tag in
20721 *:-:* | *:-) cat >"$ac_tmp/stdin" \
20722 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
20723 esac
20725 esac
20727 ac_dir=`$as_dirname -- "$ac_file" ||
20728 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20729 X"$ac_file" : 'X\(//\)[^/]' \| \
20730 X"$ac_file" : 'X\(//\)$' \| \
20731 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
20732 $as_echo X"$ac_file" |
20733 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20734 s//\1/
20737 /^X\(\/\/\)[^/].*/{
20738 s//\1/
20741 /^X\(\/\/\)$/{
20742 s//\1/
20745 /^X\(\/\).*/{
20746 s//\1/
20749 s/.*/./; q'`
20750 as_dir="$ac_dir"; as_fn_mkdir_p
20751 ac_builddir=.
20753 case "$ac_dir" in
20754 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
20756 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
20757 # A ".." for each directory in $ac_dir_suffix.
20758 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
20759 case $ac_top_builddir_sub in
20760 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
20761 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
20762 esac ;;
20763 esac
20764 ac_abs_top_builddir=$ac_pwd
20765 ac_abs_builddir=$ac_pwd$ac_dir_suffix
20766 # for backward compatibility:
20767 ac_top_builddir=$ac_top_build_prefix
20769 case $srcdir in
20770 .) # We are building in place.
20771 ac_srcdir=.
20772 ac_top_srcdir=$ac_top_builddir_sub
20773 ac_abs_top_srcdir=$ac_pwd ;;
20774 [\\/]* | ?:[\\/]* ) # Absolute name.
20775 ac_srcdir=$srcdir$ac_dir_suffix;
20776 ac_top_srcdir=$srcdir
20777 ac_abs_top_srcdir=$srcdir ;;
20778 *) # Relative name.
20779 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
20780 ac_top_srcdir=$ac_top_build_prefix$srcdir
20781 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
20782 esac
20783 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
20786 case $ac_mode in
20789 # CONFIG_FILE
20792 case $INSTALL in
20793 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
20794 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
20795 esac
20796 ac_MKDIR_P=$MKDIR_P
20797 case $MKDIR_P in
20798 [\\/$]* | ?:[\\/]* ) ;;
20799 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
20800 esac
20801 _ACEOF
20803 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20804 # If the template does not know about datarootdir, expand it.
20805 # FIXME: This hack should be removed a few years after 2.60.
20806 ac_datarootdir_hack=; ac_datarootdir_seen=
20807 ac_sed_dataroot='
20808 /datarootdir/ {
20812 /@datadir@/p
20813 /@docdir@/p
20814 /@infodir@/p
20815 /@localedir@/p
20816 /@mandir@/p'
20817 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
20818 *datarootdir*) ac_datarootdir_seen=yes;;
20819 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
20820 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
20821 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
20822 _ACEOF
20823 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20824 ac_datarootdir_hack='
20825 s&@datadir@&$datadir&g
20826 s&@docdir@&$docdir&g
20827 s&@infodir@&$infodir&g
20828 s&@localedir@&$localedir&g
20829 s&@mandir@&$mandir&g
20830 s&\\\${datarootdir}&$datarootdir&g' ;;
20831 esac
20832 _ACEOF
20834 # Neutralize VPATH when `$srcdir' = `.'.
20835 # Shell code in configure.ac might set extrasub.
20836 # FIXME: do we really want to maintain this feature?
20837 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20838 ac_sed_extra="$ac_vpsub
20839 $extrasub
20840 _ACEOF
20841 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20843 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
20844 s|@configure_input@|$ac_sed_conf_input|;t t
20845 s&@top_builddir@&$ac_top_builddir_sub&;t t
20846 s&@top_build_prefix@&$ac_top_build_prefix&;t t
20847 s&@srcdir@&$ac_srcdir&;t t
20848 s&@abs_srcdir@&$ac_abs_srcdir&;t t
20849 s&@top_srcdir@&$ac_top_srcdir&;t t
20850 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
20851 s&@builddir@&$ac_builddir&;t t
20852 s&@abs_builddir@&$ac_abs_builddir&;t t
20853 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
20854 s&@INSTALL@&$ac_INSTALL&;t t
20855 s&@MKDIR_P@&$ac_MKDIR_P&;t t
20856 $ac_datarootdir_hack
20858 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
20859 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20861 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
20862 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
20863 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
20864 "$ac_tmp/out"`; test -z "$ac_out"; } &&
20865 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20866 which seems to be undefined. Please make sure it is defined" >&5
20867 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20868 which seems to be undefined. Please make sure it is defined" >&2;}
20870 rm -f "$ac_tmp/stdin"
20871 case $ac_file in
20872 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
20873 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
20874 esac \
20875 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20879 # CONFIG_HEADER
20881 if test x"$ac_file" != x-; then
20883 $as_echo "/* $configure_input */" \
20884 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
20885 } >"$ac_tmp/config.h" \
20886 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20887 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
20888 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
20889 $as_echo "$as_me: $ac_file is unchanged" >&6;}
20890 else
20891 rm -f "$ac_file"
20892 mv "$ac_tmp/config.h" "$ac_file" \
20893 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20895 else
20896 $as_echo "/* $configure_input */" \
20897 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
20898 || as_fn_error $? "could not create -" "$LINENO" 5
20903 # CONFIG_LINK
20906 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
20908 else
20909 # Prefer the file from the source tree if names are identical.
20910 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
20911 ac_source=$srcdir/$ac_source
20914 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
20915 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
20917 if test ! -r "$ac_source"; then
20918 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
20920 rm -f "$ac_file"
20922 # Try a relative symlink, then a hard link, then a copy.
20923 case $ac_source in
20924 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
20925 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
20926 esac
20927 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
20928 ln "$ac_source" "$ac_file" 2>/dev/null ||
20929 cp -p "$ac_source" "$ac_file" ||
20930 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
20933 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
20934 $as_echo "$as_me: executing $ac_file commands" >&6;}
20936 esac
20939 case $ac_file$ac_mode in
20940 "check_win32_symlinks":C)
20941 # Links sometimes fail undetected on Mingw -
20942 # so here we detect it and warn the user
20943 for FILE in $CONFIG_LINKS
20945 # test -e works for symlinks in the MinGW console
20946 test -e `expr "$FILE" : '\([^:]*\)'` || { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** link for $FILE -- please fix by hand" >&5
20947 $as_echo "$as_me: WARNING: *** link for $FILE -- please fix by hand" >&2;}
20948 done
20950 "src/include/pg_config.h":H)
20951 # Update timestamp for pg_config.h (see Makefile.global)
20952 echo >src/include/stamp-h
20954 "src/include/pg_config_ext.h":H)
20955 # Update timestamp for pg_config_ext.h (see Makefile.global)
20956 echo >src/include/stamp-ext-h
20958 "src/interfaces/ecpg/include/ecpg_config.h":H) echo >src/interfaces/ecpg/include/stamp-h ;;
20960 esac
20961 done # for ac_tag
20964 as_fn_exit 0
20965 _ACEOF
20966 ac_clean_files=$ac_clean_files_save
20968 test $ac_write_fail = 0 ||
20969 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
20972 # configure is writing to config.log, and then calls config.status.
20973 # config.status does its own redirection, appending to config.log.
20974 # Unfortunately, on DOS this fails, as config.log is still kept open
20975 # by configure, so config.status won't be able to write to it; its
20976 # output is simply discarded. So we exec the FD to /dev/null,
20977 # effectively closing config.log, so it can be properly (re)opened and
20978 # appended to by config.status. When coming back to configure, we
20979 # need to make the FD available again.
20980 if test "$no_create" != yes; then
20981 ac_cs_success=:
20982 ac_config_status_args=
20983 test "$silent" = yes &&
20984 ac_config_status_args="$ac_config_status_args --quiet"
20985 exec 5>/dev/null
20986 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
20987 exec 5>>config.log
20988 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20989 # would make configure fail if this is the last instruction.
20990 $ac_cs_success || as_fn_exit 1
20992 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
20993 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
20994 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}