1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.69 for pspg 0.
4#
5# Report bugs to <pavel.stehule@gmail.com>.
6#
7#
8# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
9#
10#
11# This configure script is free software; the Free Software Foundation
12# gives unlimited permission to copy, distribute and modify it.
13## -------------------- ##
14## M4sh Initialization. ##
15## -------------------- ##
16
17# Be more Bourne compatible
18DUALCASE=1; export DUALCASE # for MKS sh
19if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
20  emulate sh
21  NULLCMD=:
22  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
23  # is contrary to our usage.  Disable this feature.
24  alias -g '${1+"$@"}'='"$@"'
25  setopt NO_GLOB_SUBST
26else
27  case `(set -o) 2>/dev/null` in #(
28  *posix*) :
29    set -o posix ;; #(
30  *) :
31     ;;
32esac
33fi
34
35
36as_nl='
37'
38export as_nl
39# Printing a long string crashes Solaris 7 /usr/bin/printf.
40as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43# Prefer a ksh shell builtin over an external printf program on Solaris,
44# but without wasting forks for bash or zsh.
45if test -z "$BASH_VERSION$ZSH_VERSION" \
46    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47  as_echo='print -r --'
48  as_echo_n='print -rn --'
49elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50  as_echo='printf %s\n'
51  as_echo_n='printf %s'
52else
53  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55    as_echo_n='/usr/ucb/echo -n'
56  else
57    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58    as_echo_n_body='eval
59      arg=$1;
60      case $arg in #(
61      *"$as_nl"*)
62	expr "X$arg" : "X\\(.*\\)$as_nl";
63	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64      esac;
65      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66    '
67    export as_echo_n_body
68    as_echo_n='sh -c $as_echo_n_body as_echo'
69  fi
70  export as_echo_body
71  as_echo='sh -c $as_echo_body as_echo'
72fi
73
74# The user is always right.
75if test "${PATH_SEPARATOR+set}" != set; then
76  PATH_SEPARATOR=:
77  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79      PATH_SEPARATOR=';'
80  }
81fi
82
83
84# IFS
85# We need space, tab and new line, in precisely that order.  Quoting is
86# there to prevent editors from complaining about space-tab.
87# (If _AS_PATH_WALK were called with IFS unset, it would disable word
88# splitting by setting IFS to empty value.)
89IFS=" ""	$as_nl"
90
91# Find who we are.  Look in the path if we contain no directory separator.
92as_myself=
93case $0 in #((
94  *[\\/]* ) as_myself=$0 ;;
95  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
96for as_dir in $PATH
97do
98  IFS=$as_save_IFS
99  test -z "$as_dir" && as_dir=.
100    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101  done
102IFS=$as_save_IFS
103
104     ;;
105esac
106# We did not find ourselves, most probably we were run as `sh COMMAND'
107# in which case we are not to be found in the path.
108if test "x$as_myself" = x; then
109  as_myself=$0
110fi
111if test ! -f "$as_myself"; then
112  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113  exit 1
114fi
115
116# Unset variables that we do not need and which cause bugs (e.g. in
117# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
118# suppresses any "Segmentation fault" message there.  '((' could
119# trigger a bug in pdksh 5.2.14.
120for as_var in BASH_ENV ENV MAIL MAILPATH
121do eval test x\${$as_var+set} = xset \
122  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
123done
124PS1='$ '
125PS2='> '
126PS4='+ '
127
128# NLS nuisances.
129LC_ALL=C
130export LC_ALL
131LANGUAGE=C
132export LANGUAGE
133
134# CDPATH.
135(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
136
137# Use a proper internal environment variable to ensure we don't fall
138  # into an infinite loop, continuously re-executing ourselves.
139  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140    _as_can_reexec=no; export _as_can_reexec;
141    # We cannot yet assume a decent shell, so we have to provide a
142# neutralization value for shells without unset; and this also
143# works around shells that cannot unset nonexistent variables.
144# Preserve -v and -x to the replacement shell.
145BASH_ENV=/dev/null
146ENV=/dev/null
147(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148case $- in # ((((
149  *v*x* | *x*v* ) as_opts=-vx ;;
150  *v* ) as_opts=-v ;;
151  *x* ) as_opts=-x ;;
152  * ) as_opts= ;;
153esac
154exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155# Admittedly, this is quite paranoid, since all the known shells bail
156# out after a failed `exec'.
157$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158as_fn_exit 255
159  fi
160  # We don't want this to propagate to other subprocesses.
161          { _as_can_reexec=; unset _as_can_reexec;}
162if test "x$CONFIG_SHELL" = x; then
163  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
164  emulate sh
165  NULLCMD=:
166  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167  # is contrary to our usage.  Disable this feature.
168  alias -g '\${1+\"\$@\"}'='\"\$@\"'
169  setopt NO_GLOB_SUBST
170else
171  case \`(set -o) 2>/dev/null\` in #(
172  *posix*) :
173    set -o posix ;; #(
174  *) :
175     ;;
176esac
177fi
178"
179  as_required="as_fn_return () { (exit \$1); }
180as_fn_success () { as_fn_return 0; }
181as_fn_failure () { as_fn_return 1; }
182as_fn_ret_success () { return 0; }
183as_fn_ret_failure () { return 1; }
184
185exitcode=0
186as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191
192else
193  exitcode=1; echo positional parameters were not saved.
194fi
195test x\$exitcode = x0 || exit 1
196test -x / || exit 1"
197  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201test \$(( 1 + 1 )) = 2 || exit 1"
202  if (eval "$as_required") 2>/dev/null; then :
203  as_have_required=yes
204else
205  as_have_required=no
206fi
207  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
208
209else
210  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
211as_found=false
212for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
213do
214  IFS=$as_save_IFS
215  test -z "$as_dir" && as_dir=.
216  as_found=:
217  case $as_dir in #(
218	 /*)
219	   for as_base in sh bash ksh sh5; do
220	     # Try only shells that exist, to save several forks.
221	     as_shell=$as_dir/$as_base
222	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
223		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
224  CONFIG_SHELL=$as_shell as_have_required=yes
225		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
226  break 2
227fi
228fi
229	   done;;
230       esac
231  as_found=false
232done
233$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
234	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
235  CONFIG_SHELL=$SHELL as_have_required=yes
236fi; }
237IFS=$as_save_IFS
238
239
240      if test "x$CONFIG_SHELL" != x; then :
241  export CONFIG_SHELL
242             # We cannot yet assume a decent shell, so we have to provide a
243# neutralization value for shells without unset; and this also
244# works around shells that cannot unset nonexistent variables.
245# Preserve -v and -x to the replacement shell.
246BASH_ENV=/dev/null
247ENV=/dev/null
248(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
249case $- in # ((((
250  *v*x* | *x*v* ) as_opts=-vx ;;
251  *v* ) as_opts=-v ;;
252  *x* ) as_opts=-x ;;
253  * ) as_opts= ;;
254esac
255exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
256# Admittedly, this is quite paranoid, since all the known shells bail
257# out after a failed `exec'.
258$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
259exit 255
260fi
261
262    if test x$as_have_required = xno; then :
263  $as_echo "$0: This script requires a shell more modern than all"
264  $as_echo "$0: the shells that I found on your system."
265  if test x${ZSH_VERSION+set} = xset ; then
266    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
267    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
268  else
269    $as_echo "$0: Please tell bug-autoconf@gnu.org and
270$0: pavel.stehule@gmail.com about your system, including
271$0: any error possibly output before this message. Then
272$0: install a modern shell, or manually run the script
273$0: under such a shell if you do have one."
274  fi
275  exit 1
276fi
277fi
278fi
279SHELL=${CONFIG_SHELL-/bin/sh}
280export SHELL
281# Unset more variables known to interfere with behavior of common tools.
282CLICOLOR_FORCE= GREP_OPTIONS=
283unset CLICOLOR_FORCE GREP_OPTIONS
284
285## --------------------- ##
286## M4sh Shell Functions. ##
287## --------------------- ##
288# as_fn_unset VAR
289# ---------------
290# Portably unset VAR.
291as_fn_unset ()
292{
293  { eval $1=; unset $1;}
294}
295as_unset=as_fn_unset
296
297# as_fn_set_status STATUS
298# -----------------------
299# Set $? to STATUS, without forking.
300as_fn_set_status ()
301{
302  return $1
303} # as_fn_set_status
304
305# as_fn_exit STATUS
306# -----------------
307# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
308as_fn_exit ()
309{
310  set +e
311  as_fn_set_status $1
312  exit $1
313} # as_fn_exit
314
315# as_fn_mkdir_p
316# -------------
317# Create "$as_dir" as a directory, including parents if necessary.
318as_fn_mkdir_p ()
319{
320
321  case $as_dir in #(
322  -*) as_dir=./$as_dir;;
323  esac
324  test -d "$as_dir" || eval $as_mkdir_p || {
325    as_dirs=
326    while :; do
327      case $as_dir in #(
328      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
329      *) as_qdir=$as_dir;;
330      esac
331      as_dirs="'$as_qdir' $as_dirs"
332      as_dir=`$as_dirname -- "$as_dir" ||
333$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
334	 X"$as_dir" : 'X\(//\)[^/]' \| \
335	 X"$as_dir" : 'X\(//\)$' \| \
336	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
337$as_echo X"$as_dir" |
338    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
339	    s//\1/
340	    q
341	  }
342	  /^X\(\/\/\)[^/].*/{
343	    s//\1/
344	    q
345	  }
346	  /^X\(\/\/\)$/{
347	    s//\1/
348	    q
349	  }
350	  /^X\(\/\).*/{
351	    s//\1/
352	    q
353	  }
354	  s/.*/./; q'`
355      test -d "$as_dir" && break
356    done
357    test -z "$as_dirs" || eval "mkdir $as_dirs"
358  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
359
360
361} # as_fn_mkdir_p
362
363# as_fn_executable_p FILE
364# -----------------------
365# Test if FILE is an executable regular file.
366as_fn_executable_p ()
367{
368  test -f "$1" && test -x "$1"
369} # as_fn_executable_p
370# as_fn_append VAR VALUE
371# ----------------------
372# Append the text in VALUE to the end of the definition contained in VAR. Take
373# advantage of any shell optimizations that allow amortized linear growth over
374# repeated appends, instead of the typical quadratic growth present in naive
375# implementations.
376if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
377  eval 'as_fn_append ()
378  {
379    eval $1+=\$2
380  }'
381else
382  as_fn_append ()
383  {
384    eval $1=\$$1\$2
385  }
386fi # as_fn_append
387
388# as_fn_arith ARG...
389# ------------------
390# Perform arithmetic evaluation on the ARGs, and store the result in the
391# global $as_val. Take advantage of shells that can avoid forks. The arguments
392# must be portable across $(()) and expr.
393if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
394  eval 'as_fn_arith ()
395  {
396    as_val=$(( $* ))
397  }'
398else
399  as_fn_arith ()
400  {
401    as_val=`expr "$@" || test $? -eq 1`
402  }
403fi # as_fn_arith
404
405
406# as_fn_error STATUS ERROR [LINENO LOG_FD]
407# ----------------------------------------
408# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
409# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
410# script with STATUS, using 1 if that was 0.
411as_fn_error ()
412{
413  as_status=$1; test $as_status -eq 0 && as_status=1
414  if test "$4"; then
415    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
416    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
417  fi
418  $as_echo "$as_me: error: $2" >&2
419  as_fn_exit $as_status
420} # as_fn_error
421
422if expr a : '\(a\)' >/dev/null 2>&1 &&
423   test "X`expr 00001 : '.*\(...\)'`" = X001; then
424  as_expr=expr
425else
426  as_expr=false
427fi
428
429if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
430  as_basename=basename
431else
432  as_basename=false
433fi
434
435if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
436  as_dirname=dirname
437else
438  as_dirname=false
439fi
440
441as_me=`$as_basename -- "$0" ||
442$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
443	 X"$0" : 'X\(//\)$' \| \
444	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
445$as_echo X/"$0" |
446    sed '/^.*\/\([^/][^/]*\)\/*$/{
447	    s//\1/
448	    q
449	  }
450	  /^X\/\(\/\/\)$/{
451	    s//\1/
452	    q
453	  }
454	  /^X\/\(\/\).*/{
455	    s//\1/
456	    q
457	  }
458	  s/.*/./; q'`
459
460# Avoid depending upon Character Ranges.
461as_cr_letters='abcdefghijklmnopqrstuvwxyz'
462as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
463as_cr_Letters=$as_cr_letters$as_cr_LETTERS
464as_cr_digits='0123456789'
465as_cr_alnum=$as_cr_Letters$as_cr_digits
466
467
468  as_lineno_1=$LINENO as_lineno_1a=$LINENO
469  as_lineno_2=$LINENO as_lineno_2a=$LINENO
470  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
471  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
472  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
473  sed -n '
474    p
475    /[$]LINENO/=
476  ' <$as_myself |
477    sed '
478      s/[$]LINENO.*/&-/
479      t lineno
480      b
481      :lineno
482      N
483      :loop
484      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
485      t loop
486      s/-\n.*//
487    ' >$as_me.lineno &&
488  chmod +x "$as_me.lineno" ||
489    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
490
491  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
492  # already done that, so ensure we don't try to do so again and fall
493  # in an infinite loop.  This has already happened in practice.
494  _as_can_reexec=no; export _as_can_reexec
495  # Don't try to exec as it changes $[0], causing all sort of problems
496  # (the dirname of $[0] is not the place where we might find the
497  # original and so on.  Autoconf is especially sensitive to this).
498  . "./$as_me.lineno"
499  # Exit status is that of the last command.
500  exit
501}
502
503ECHO_C= ECHO_N= ECHO_T=
504case `echo -n x` in #(((((
505-n*)
506  case `echo 'xy\c'` in
507  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
508  xy)  ECHO_C='\c';;
509  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
510       ECHO_T='	';;
511  esac;;
512*)
513  ECHO_N='-n';;
514esac
515
516rm -f conf$$ conf$$.exe conf$$.file
517if test -d conf$$.dir; then
518  rm -f conf$$.dir/conf$$.file
519else
520  rm -f conf$$.dir
521  mkdir conf$$.dir 2>/dev/null
522fi
523if (echo >conf$$.file) 2>/dev/null; then
524  if ln -s conf$$.file conf$$ 2>/dev/null; then
525    as_ln_s='ln -s'
526    # ... but there are two gotchas:
527    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
528    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
529    # In both cases, we have to default to `cp -pR'.
530    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
531      as_ln_s='cp -pR'
532  elif ln conf$$.file conf$$ 2>/dev/null; then
533    as_ln_s=ln
534  else
535    as_ln_s='cp -pR'
536  fi
537else
538  as_ln_s='cp -pR'
539fi
540rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
541rmdir conf$$.dir 2>/dev/null
542
543if mkdir -p . 2>/dev/null; then
544  as_mkdir_p='mkdir -p "$as_dir"'
545else
546  test -d ./-p && rmdir ./-p
547  as_mkdir_p=false
548fi
549
550as_test_x='test -x'
551as_executable_p=as_fn_executable_p
552
553# Sed expression to map a string onto a valid CPP name.
554as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
555
556# Sed expression to map a string onto a valid variable name.
557as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
558
559
560test -n "$DJDIR" || exec 7<&0 </dev/null
561exec 6>&1
562
563# Name of the host.
564# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
565# so uname gets run too.
566ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
567
568#
569# Initializations.
570#
571ac_default_prefix=/usr/local
572ac_clean_files=
573ac_config_libobj_dir=.
574LIBOBJS=
575cross_compiling=no
576subdirs=
577MFLAGS=
578MAKEFLAGS=
579
580# Identity of this package.
581PACKAGE_NAME='pspg'
582PACKAGE_TARNAME='pspg'
583PACKAGE_VERSION='0'
584PACKAGE_STRING='pspg 0'
585PACKAGE_BUGREPORT='pavel.stehule@gmail.com'
586PACKAGE_URL=''
587
588ac_unique_file="src"
589# Factoring default headers for most tests.
590ac_includes_default="\
591#include <stdio.h>
592#ifdef HAVE_SYS_TYPES_H
593# include <sys/types.h>
594#endif
595#ifdef HAVE_SYS_STAT_H
596# include <sys/stat.h>
597#endif
598#ifdef STDC_HEADERS
599# include <stdlib.h>
600# include <stddef.h>
601#else
602# ifdef HAVE_STDLIB_H
603#  include <stdlib.h>
604# endif
605#endif
606#ifdef HAVE_STRING_H
607# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
608#  include <memory.h>
609# endif
610# include <string.h>
611#endif
612#ifdef HAVE_STRINGS_H
613# include <strings.h>
614#endif
615#ifdef HAVE_INTTYPES_H
616# include <inttypes.h>
617#endif
618#ifdef HAVE_STDINT_H
619# include <stdint.h>
620#endif
621#ifdef HAVE_UNISTD_H
622# include <unistd.h>
623#endif"
624
625ac_subst_vars='LTLIBOBJS
626LIBOBJS
627POSTGRESQL_CFLAGS
628COMPILE_MENU
629COVERAGE_LDFLAGS
630COVERAGE_CFLAGS
631enable_debug
632POSTGRESQL_LIBS
633POSTGRESQL_VERSION
634AWK
635POSTGRESQL_LDFLAGS
636POSTGRESQL_LIBFLAGS
637POSTGRESQL_CPPFLAGS
638PANEL_LIBS
639PKG_CONFIG_LIBDIR
640PKG_CONFIG_PATH
641PKG_CONFIG
642CURSES_CFLAGS
643CURSES_LIBS
644DEBUG_CFLAGS
645EGREP
646GREP
647CPP
648OBJEXT
649EXEEXT
650ac_ct_CC
651CPPFLAGS
652LDFLAGS
653CFLAGS
654CC
655target_alias
656host_alias
657build_alias
658LIBS
659ECHO_T
660ECHO_N
661ECHO_C
662DEFS
663mandir
664localedir
665libdir
666psdir
667pdfdir
668dvidir
669htmldir
670infodir
671docdir
672oldincludedir
673includedir
674runstatedir
675localstatedir
676sharedstatedir
677sysconfdir
678datadir
679datarootdir
680libexecdir
681sbindir
682bindir
683program_transform_name
684prefix
685exec_prefix
686PACKAGE_URL
687PACKAGE_BUGREPORT
688PACKAGE_STRING
689PACKAGE_VERSION
690PACKAGE_TARNAME
691PACKAGE_NAME
692PATH_SEPARATOR
693SHELL'
694ac_subst_files=''
695ac_user_opts='
696enable_option_checking
697enable_debug
698with_ncurses
699with_ncursesw
700with_postgresql
701with_inotify
702'
703      ac_precious_vars='build_alias
704host_alias
705target_alias
706CC
707CFLAGS
708LDFLAGS
709LIBS
710CPPFLAGS
711CPP
712CURSES_LIBS
713CURSES_CFLAGS
714PKG_CONFIG
715PKG_CONFIG_PATH
716PKG_CONFIG_LIBDIR
717PANEL_LIBS
718POSTGRESQL_CPPFLAGS
719POSTGRESQL_LIBFLAGS
720POSTGRESQL_LDFLAGS'
721
722
723# Initialize some variables set by options.
724ac_init_help=
725ac_init_version=false
726ac_unrecognized_opts=
727ac_unrecognized_sep=
728# The variables have the same names as the options, with
729# dashes changed to underlines.
730cache_file=/dev/null
731exec_prefix=NONE
732no_create=
733no_recursion=
734prefix=NONE
735program_prefix=NONE
736program_suffix=NONE
737program_transform_name=s,x,x,
738silent=
739site=
740srcdir=
741verbose=
742x_includes=NONE
743x_libraries=NONE
744
745# Installation directory options.
746# These are left unexpanded so users can "make install exec_prefix=/foo"
747# and all the variables that are supposed to be based on exec_prefix
748# by default will actually change.
749# Use braces instead of parens because sh, perl, etc. also accept them.
750# (The list follows the same order as the GNU Coding Standards.)
751bindir='${exec_prefix}/bin'
752sbindir='${exec_prefix}/sbin'
753libexecdir='${exec_prefix}/libexec'
754datarootdir='${prefix}/share'
755datadir='${datarootdir}'
756sysconfdir='${prefix}/etc'
757sharedstatedir='${prefix}/com'
758localstatedir='${prefix}/var'
759runstatedir='${localstatedir}/run'
760includedir='${prefix}/include'
761oldincludedir='/usr/include'
762docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
763infodir='${datarootdir}/info'
764htmldir='${docdir}'
765dvidir='${docdir}'
766pdfdir='${docdir}'
767psdir='${docdir}'
768libdir='${exec_prefix}/lib'
769localedir='${datarootdir}/locale'
770mandir='${datarootdir}/man'
771
772ac_prev=
773ac_dashdash=
774for ac_option
775do
776  # If the previous option needs an argument, assign it.
777  if test -n "$ac_prev"; then
778    eval $ac_prev=\$ac_option
779    ac_prev=
780    continue
781  fi
782
783  case $ac_option in
784  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
785  *=)   ac_optarg= ;;
786  *)    ac_optarg=yes ;;
787  esac
788
789  # Accept the important Cygnus configure options, so we can diagnose typos.
790
791  case $ac_dashdash$ac_option in
792  --)
793    ac_dashdash=yes ;;
794
795  -bindir | --bindir | --bindi | --bind | --bin | --bi)
796    ac_prev=bindir ;;
797  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
798    bindir=$ac_optarg ;;
799
800  -build | --build | --buil | --bui | --bu)
801    ac_prev=build_alias ;;
802  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
803    build_alias=$ac_optarg ;;
804
805  -cache-file | --cache-file | --cache-fil | --cache-fi \
806  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
807    ac_prev=cache_file ;;
808  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
809  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
810    cache_file=$ac_optarg ;;
811
812  --config-cache | -C)
813    cache_file=config.cache ;;
814
815  -datadir | --datadir | --datadi | --datad)
816    ac_prev=datadir ;;
817  -datadir=* | --datadir=* | --datadi=* | --datad=*)
818    datadir=$ac_optarg ;;
819
820  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
821  | --dataroo | --dataro | --datar)
822    ac_prev=datarootdir ;;
823  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
824  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
825    datarootdir=$ac_optarg ;;
826
827  -disable-* | --disable-*)
828    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
829    # Reject names that are not valid shell variable names.
830    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
831      as_fn_error $? "invalid feature name: $ac_useropt"
832    ac_useropt_orig=$ac_useropt
833    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
834    case $ac_user_opts in
835      *"
836"enable_$ac_useropt"
837"*) ;;
838      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
839	 ac_unrecognized_sep=', ';;
840    esac
841    eval enable_$ac_useropt=no ;;
842
843  -docdir | --docdir | --docdi | --doc | --do)
844    ac_prev=docdir ;;
845  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
846    docdir=$ac_optarg ;;
847
848  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
849    ac_prev=dvidir ;;
850  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
851    dvidir=$ac_optarg ;;
852
853  -enable-* | --enable-*)
854    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
855    # Reject names that are not valid shell variable names.
856    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
857      as_fn_error $? "invalid feature name: $ac_useropt"
858    ac_useropt_orig=$ac_useropt
859    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
860    case $ac_user_opts in
861      *"
862"enable_$ac_useropt"
863"*) ;;
864      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
865	 ac_unrecognized_sep=', ';;
866    esac
867    eval enable_$ac_useropt=\$ac_optarg ;;
868
869  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
870  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
871  | --exec | --exe | --ex)
872    ac_prev=exec_prefix ;;
873  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
874  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
875  | --exec=* | --exe=* | --ex=*)
876    exec_prefix=$ac_optarg ;;
877
878  -gas | --gas | --ga | --g)
879    # Obsolete; use --with-gas.
880    with_gas=yes ;;
881
882  -help | --help | --hel | --he | -h)
883    ac_init_help=long ;;
884  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
885    ac_init_help=recursive ;;
886  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
887    ac_init_help=short ;;
888
889  -host | --host | --hos | --ho)
890    ac_prev=host_alias ;;
891  -host=* | --host=* | --hos=* | --ho=*)
892    host_alias=$ac_optarg ;;
893
894  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
895    ac_prev=htmldir ;;
896  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
897  | --ht=*)
898    htmldir=$ac_optarg ;;
899
900  -includedir | --includedir | --includedi | --included | --include \
901  | --includ | --inclu | --incl | --inc)
902    ac_prev=includedir ;;
903  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
904  | --includ=* | --inclu=* | --incl=* | --inc=*)
905    includedir=$ac_optarg ;;
906
907  -infodir | --infodir | --infodi | --infod | --info | --inf)
908    ac_prev=infodir ;;
909  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
910    infodir=$ac_optarg ;;
911
912  -libdir | --libdir | --libdi | --libd)
913    ac_prev=libdir ;;
914  -libdir=* | --libdir=* | --libdi=* | --libd=*)
915    libdir=$ac_optarg ;;
916
917  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
918  | --libexe | --libex | --libe)
919    ac_prev=libexecdir ;;
920  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
921  | --libexe=* | --libex=* | --libe=*)
922    libexecdir=$ac_optarg ;;
923
924  -localedir | --localedir | --localedi | --localed | --locale)
925    ac_prev=localedir ;;
926  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
927    localedir=$ac_optarg ;;
928
929  -localstatedir | --localstatedir | --localstatedi | --localstated \
930  | --localstate | --localstat | --localsta | --localst | --locals)
931    ac_prev=localstatedir ;;
932  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
933  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
934    localstatedir=$ac_optarg ;;
935
936  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
937    ac_prev=mandir ;;
938  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
939    mandir=$ac_optarg ;;
940
941  -nfp | --nfp | --nf)
942    # Obsolete; use --without-fp.
943    with_fp=no ;;
944
945  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
946  | --no-cr | --no-c | -n)
947    no_create=yes ;;
948
949  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
950  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
951    no_recursion=yes ;;
952
953  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
954  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
955  | --oldin | --oldi | --old | --ol | --o)
956    ac_prev=oldincludedir ;;
957  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
958  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
959  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
960    oldincludedir=$ac_optarg ;;
961
962  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
963    ac_prev=prefix ;;
964  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
965    prefix=$ac_optarg ;;
966
967  -program-prefix | --program-prefix | --program-prefi | --program-pref \
968  | --program-pre | --program-pr | --program-p)
969    ac_prev=program_prefix ;;
970  -program-prefix=* | --program-prefix=* | --program-prefi=* \
971  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
972    program_prefix=$ac_optarg ;;
973
974  -program-suffix | --program-suffix | --program-suffi | --program-suff \
975  | --program-suf | --program-su | --program-s)
976    ac_prev=program_suffix ;;
977  -program-suffix=* | --program-suffix=* | --program-suffi=* \
978  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
979    program_suffix=$ac_optarg ;;
980
981  -program-transform-name | --program-transform-name \
982  | --program-transform-nam | --program-transform-na \
983  | --program-transform-n | --program-transform- \
984  | --program-transform | --program-transfor \
985  | --program-transfo | --program-transf \
986  | --program-trans | --program-tran \
987  | --progr-tra | --program-tr | --program-t)
988    ac_prev=program_transform_name ;;
989  -program-transform-name=* | --program-transform-name=* \
990  | --program-transform-nam=* | --program-transform-na=* \
991  | --program-transform-n=* | --program-transform-=* \
992  | --program-transform=* | --program-transfor=* \
993  | --program-transfo=* | --program-transf=* \
994  | --program-trans=* | --program-tran=* \
995  | --progr-tra=* | --program-tr=* | --program-t=*)
996    program_transform_name=$ac_optarg ;;
997
998  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
999    ac_prev=pdfdir ;;
1000  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1001    pdfdir=$ac_optarg ;;
1002
1003  -psdir | --psdir | --psdi | --psd | --ps)
1004    ac_prev=psdir ;;
1005  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1006    psdir=$ac_optarg ;;
1007
1008  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1009  | -silent | --silent | --silen | --sile | --sil)
1010    silent=yes ;;
1011
1012  -runstatedir | --runstatedir | --runstatedi | --runstated \
1013  | --runstate | --runstat | --runsta | --runst | --runs \
1014  | --run | --ru | --r)
1015    ac_prev=runstatedir ;;
1016  -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1017  | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1018  | --run=* | --ru=* | --r=*)
1019    runstatedir=$ac_optarg ;;
1020
1021  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1022    ac_prev=sbindir ;;
1023  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1024  | --sbi=* | --sb=*)
1025    sbindir=$ac_optarg ;;
1026
1027  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1028  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1029  | --sharedst | --shareds | --shared | --share | --shar \
1030  | --sha | --sh)
1031    ac_prev=sharedstatedir ;;
1032  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1033  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1034  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1035  | --sha=* | --sh=*)
1036    sharedstatedir=$ac_optarg ;;
1037
1038  -site | --site | --sit)
1039    ac_prev=site ;;
1040  -site=* | --site=* | --sit=*)
1041    site=$ac_optarg ;;
1042
1043  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1044    ac_prev=srcdir ;;
1045  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1046    srcdir=$ac_optarg ;;
1047
1048  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1049  | --syscon | --sysco | --sysc | --sys | --sy)
1050    ac_prev=sysconfdir ;;
1051  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1052  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1053    sysconfdir=$ac_optarg ;;
1054
1055  -target | --target | --targe | --targ | --tar | --ta | --t)
1056    ac_prev=target_alias ;;
1057  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1058    target_alias=$ac_optarg ;;
1059
1060  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1061    verbose=yes ;;
1062
1063  -version | --version | --versio | --versi | --vers | -V)
1064    ac_init_version=: ;;
1065
1066  -with-* | --with-*)
1067    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1068    # Reject names that are not valid shell variable names.
1069    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1070      as_fn_error $? "invalid package name: $ac_useropt"
1071    ac_useropt_orig=$ac_useropt
1072    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1073    case $ac_user_opts in
1074      *"
1075"with_$ac_useropt"
1076"*) ;;
1077      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1078	 ac_unrecognized_sep=', ';;
1079    esac
1080    eval with_$ac_useropt=\$ac_optarg ;;
1081
1082  -without-* | --without-*)
1083    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1084    # Reject names that are not valid shell variable names.
1085    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1086      as_fn_error $? "invalid package name: $ac_useropt"
1087    ac_useropt_orig=$ac_useropt
1088    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1089    case $ac_user_opts in
1090      *"
1091"with_$ac_useropt"
1092"*) ;;
1093      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1094	 ac_unrecognized_sep=', ';;
1095    esac
1096    eval with_$ac_useropt=no ;;
1097
1098  --x)
1099    # Obsolete; use --with-x.
1100    with_x=yes ;;
1101
1102  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1103  | --x-incl | --x-inc | --x-in | --x-i)
1104    ac_prev=x_includes ;;
1105  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1106  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1107    x_includes=$ac_optarg ;;
1108
1109  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1110  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1111    ac_prev=x_libraries ;;
1112  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1113  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1114    x_libraries=$ac_optarg ;;
1115
1116  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1117Try \`$0 --help' for more information"
1118    ;;
1119
1120  *=*)
1121    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1122    # Reject names that are not valid shell variable names.
1123    case $ac_envvar in #(
1124      '' | [0-9]* | *[!_$as_cr_alnum]* )
1125      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1126    esac
1127    eval $ac_envvar=\$ac_optarg
1128    export $ac_envvar ;;
1129
1130  *)
1131    # FIXME: should be removed in autoconf 3.0.
1132    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1133    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1134      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1135    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1136    ;;
1137
1138  esac
1139done
1140
1141if test -n "$ac_prev"; then
1142  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1143  as_fn_error $? "missing argument to $ac_option"
1144fi
1145
1146if test -n "$ac_unrecognized_opts"; then
1147  case $enable_option_checking in
1148    no) ;;
1149    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1150    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1151  esac
1152fi
1153
1154# Check all directory arguments for consistency.
1155for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1156		datadir sysconfdir sharedstatedir localstatedir includedir \
1157		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1158		libdir localedir mandir runstatedir
1159do
1160  eval ac_val=\$$ac_var
1161  # Remove trailing slashes.
1162  case $ac_val in
1163    */ )
1164      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1165      eval $ac_var=\$ac_val;;
1166  esac
1167  # Be sure to have absolute directory names.
1168  case $ac_val in
1169    [\\/$]* | ?:[\\/]* )  continue;;
1170    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1171  esac
1172  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1173done
1174
1175# There might be people who depend on the old broken behavior: `$host'
1176# used to hold the argument of --host etc.
1177# FIXME: To remove some day.
1178build=$build_alias
1179host=$host_alias
1180target=$target_alias
1181
1182# FIXME: To remove some day.
1183if test "x$host_alias" != x; then
1184  if test "x$build_alias" = x; then
1185    cross_compiling=maybe
1186  elif test "x$build_alias" != "x$host_alias"; then
1187    cross_compiling=yes
1188  fi
1189fi
1190
1191ac_tool_prefix=
1192test -n "$host_alias" && ac_tool_prefix=$host_alias-
1193
1194test "$silent" = yes && exec 6>/dev/null
1195
1196
1197ac_pwd=`pwd` && test -n "$ac_pwd" &&
1198ac_ls_di=`ls -di .` &&
1199ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1200  as_fn_error $? "working directory cannot be determined"
1201test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1202  as_fn_error $? "pwd does not report name of working directory"
1203
1204
1205# Find the source files, if location was not specified.
1206if test -z "$srcdir"; then
1207  ac_srcdir_defaulted=yes
1208  # Try the directory containing this script, then the parent directory.
1209  ac_confdir=`$as_dirname -- "$as_myself" ||
1210$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1211	 X"$as_myself" : 'X\(//\)[^/]' \| \
1212	 X"$as_myself" : 'X\(//\)$' \| \
1213	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1214$as_echo X"$as_myself" |
1215    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1216	    s//\1/
1217	    q
1218	  }
1219	  /^X\(\/\/\)[^/].*/{
1220	    s//\1/
1221	    q
1222	  }
1223	  /^X\(\/\/\)$/{
1224	    s//\1/
1225	    q
1226	  }
1227	  /^X\(\/\).*/{
1228	    s//\1/
1229	    q
1230	  }
1231	  s/.*/./; q'`
1232  srcdir=$ac_confdir
1233  if test ! -r "$srcdir/$ac_unique_file"; then
1234    srcdir=..
1235  fi
1236else
1237  ac_srcdir_defaulted=no
1238fi
1239if test ! -r "$srcdir/$ac_unique_file"; then
1240  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1241  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1242fi
1243ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1244ac_abs_confdir=`(
1245	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1246	pwd)`
1247# When building in place, set srcdir=.
1248if test "$ac_abs_confdir" = "$ac_pwd"; then
1249  srcdir=.
1250fi
1251# Remove unnecessary trailing slashes from srcdir.
1252# Double slashes in file names in object file debugging info
1253# mess up M-x gdb in Emacs.
1254case $srcdir in
1255*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1256esac
1257for ac_var in $ac_precious_vars; do
1258  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1259  eval ac_env_${ac_var}_value=\$${ac_var}
1260  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1261  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1262done
1263
1264#
1265# Report the --help message.
1266#
1267if test "$ac_init_help" = "long"; then
1268  # Omit some internal or obsolete options to make the list less imposing.
1269  # This message is too long to be a string in the A/UX 3.1 sh.
1270  cat <<_ACEOF
1271\`configure' configures pspg 0 to adapt to many kinds of systems.
1272
1273Usage: $0 [OPTION]... [VAR=VALUE]...
1274
1275To assign environment variables (e.g., CC, CFLAGS...), specify them as
1276VAR=VALUE.  See below for descriptions of some of the useful variables.
1277
1278Defaults for the options are specified in brackets.
1279
1280Configuration:
1281  -h, --help              display this help and exit
1282      --help=short        display options specific to this package
1283      --help=recursive    display the short help of all the included packages
1284  -V, --version           display version information and exit
1285  -q, --quiet, --silent   do not print \`checking ...' messages
1286      --cache-file=FILE   cache test results in FILE [disabled]
1287  -C, --config-cache      alias for \`--cache-file=config.cache'
1288  -n, --no-create         do not create output files
1289      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1290
1291Installation directories:
1292  --prefix=PREFIX         install architecture-independent files in PREFIX
1293                          [$ac_default_prefix]
1294  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1295                          [PREFIX]
1296
1297By default, \`make install' will install all the files in
1298\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1299an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1300for instance \`--prefix=\$HOME'.
1301
1302For better control, use the options below.
1303
1304Fine tuning of the installation directories:
1305  --bindir=DIR            user executables [EPREFIX/bin]
1306  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1307  --libexecdir=DIR        program executables [EPREFIX/libexec]
1308  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1309  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1310  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1311  --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
1312  --libdir=DIR            object code libraries [EPREFIX/lib]
1313  --includedir=DIR        C header files [PREFIX/include]
1314  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1315  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1316  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1317  --infodir=DIR           info documentation [DATAROOTDIR/info]
1318  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1319  --mandir=DIR            man documentation [DATAROOTDIR/man]
1320  --docdir=DIR            documentation root [DATAROOTDIR/doc/pspg]
1321  --htmldir=DIR           html documentation [DOCDIR]
1322  --dvidir=DIR            dvi documentation [DOCDIR]
1323  --pdfdir=DIR            pdf documentation [DOCDIR]
1324  --psdir=DIR             ps documentation [DOCDIR]
1325_ACEOF
1326
1327  cat <<\_ACEOF
1328_ACEOF
1329fi
1330
1331if test -n "$ac_init_help"; then
1332  case $ac_init_help in
1333     short | recursive ) echo "Configuration of pspg 0:";;
1334   esac
1335  cat <<\_ACEOF
1336
1337Optional Features:
1338  --disable-option-checking  ignore unrecognized --enable/--with options
1339  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1340  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1341  --enable-debug          enable debug build
1342
1343Optional Packages:
1344  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1345  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1346  --with-ncurses          force the use of Ncurses or NcursesW
1347  --without-ncursesw      do not use NcursesW (wide character support)
1348  --with-postgresql=[ARG] use PostgreSQL library [default=yes], optionally
1349                          specify path to pg_config
1350  --without-inotify       (Linux only) do not build with inotify support
1351                          (default is yes)
1352
1353Some influential environment variables:
1354  CC          C compiler command
1355  CFLAGS      C compiler flags
1356  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1357              nonstandard directory <lib dir>
1358  LIBS        libraries to pass to the linker, e.g. -l<library>
1359  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1360              you have headers in a nonstandard directory <include dir>
1361  CPP         C preprocessor
1362  CURSES_LIBS linker library for Curses, e.g. -lcurses
1363  CURSES_CFLAGS
1364              preprocessor flags for Curses, e.g. -I/usr/include/ncursesw
1365  PKG_CONFIG  path to pkg-config utility
1366  PKG_CONFIG_PATH
1367              directories to add to pkg-config's search path
1368  PKG_CONFIG_LIBDIR
1369              path overriding pkg-config's built-in search path
1370  PANEL_LIBS  linker library for Curses Panel, e.g. -lpanel
1371  POSTGRESQL_CPPFLAGS
1372              cpp flags for PostgreSQL overriding detected flags
1373  POSTGRESQL_LIBFLAGS
1374              libs for PostgreSQL overriding detected flags
1375  POSTGRESQL_LDFLAGS
1376              linker flags for PostgreSQL overriding detected flags
1377
1378Use these variables to override the choices made by `configure' or to help
1379it to find libraries and programs with nonstandard names/locations.
1380
1381Report bugs to <pavel.stehule@gmail.com>.
1382_ACEOF
1383ac_status=$?
1384fi
1385
1386if test "$ac_init_help" = "recursive"; then
1387  # If there are subdirs, report their specific --help.
1388  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1389    test -d "$ac_dir" ||
1390      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1391      continue
1392    ac_builddir=.
1393
1394case "$ac_dir" in
1395.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1396*)
1397  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1398  # A ".." for each directory in $ac_dir_suffix.
1399  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1400  case $ac_top_builddir_sub in
1401  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1402  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1403  esac ;;
1404esac
1405ac_abs_top_builddir=$ac_pwd
1406ac_abs_builddir=$ac_pwd$ac_dir_suffix
1407# for backward compatibility:
1408ac_top_builddir=$ac_top_build_prefix
1409
1410case $srcdir in
1411  .)  # We are building in place.
1412    ac_srcdir=.
1413    ac_top_srcdir=$ac_top_builddir_sub
1414    ac_abs_top_srcdir=$ac_pwd ;;
1415  [\\/]* | ?:[\\/]* )  # Absolute name.
1416    ac_srcdir=$srcdir$ac_dir_suffix;
1417    ac_top_srcdir=$srcdir
1418    ac_abs_top_srcdir=$srcdir ;;
1419  *) # Relative name.
1420    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1421    ac_top_srcdir=$ac_top_build_prefix$srcdir
1422    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1423esac
1424ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1425
1426    cd "$ac_dir" || { ac_status=$?; continue; }
1427    # Check for guested configure.
1428    if test -f "$ac_srcdir/configure.gnu"; then
1429      echo &&
1430      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1431    elif test -f "$ac_srcdir/configure"; then
1432      echo &&
1433      $SHELL "$ac_srcdir/configure" --help=recursive
1434    else
1435      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1436    fi || ac_status=$?
1437    cd "$ac_pwd" || { ac_status=$?; break; }
1438  done
1439fi
1440
1441test -n "$ac_init_help" && exit $ac_status
1442if $ac_init_version; then
1443  cat <<\_ACEOF
1444pspg configure 0
1445generated by GNU Autoconf 2.69
1446
1447Copyright (C) 2012 Free Software Foundation, Inc.
1448This configure script is free software; the Free Software Foundation
1449gives unlimited permission to copy, distribute and modify it.
1450_ACEOF
1451  exit
1452fi
1453
1454## ------------------------ ##
1455## Autoconf initialization. ##
1456## ------------------------ ##
1457
1458# ac_fn_c_try_compile LINENO
1459# --------------------------
1460# Try to compile conftest.$ac_ext, and return whether this succeeded.
1461ac_fn_c_try_compile ()
1462{
1463  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1464  rm -f conftest.$ac_objext
1465  if { { ac_try="$ac_compile"
1466case "(($ac_try" in
1467  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1468  *) ac_try_echo=$ac_try;;
1469esac
1470eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1471$as_echo "$ac_try_echo"; } >&5
1472  (eval "$ac_compile") 2>conftest.err
1473  ac_status=$?
1474  if test -s conftest.err; then
1475    grep -v '^ *+' conftest.err >conftest.er1
1476    cat conftest.er1 >&5
1477    mv -f conftest.er1 conftest.err
1478  fi
1479  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1480  test $ac_status = 0; } && {
1481	 test -z "$ac_c_werror_flag" ||
1482	 test ! -s conftest.err
1483       } && test -s conftest.$ac_objext; then :
1484  ac_retval=0
1485else
1486  $as_echo "$as_me: failed program was:" >&5
1487sed 's/^/| /' conftest.$ac_ext >&5
1488
1489	ac_retval=1
1490fi
1491  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1492  as_fn_set_status $ac_retval
1493
1494} # ac_fn_c_try_compile
1495
1496# ac_fn_c_try_cpp LINENO
1497# ----------------------
1498# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1499ac_fn_c_try_cpp ()
1500{
1501  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1502  if { { ac_try="$ac_cpp conftest.$ac_ext"
1503case "(($ac_try" in
1504  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1505  *) ac_try_echo=$ac_try;;
1506esac
1507eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1508$as_echo "$ac_try_echo"; } >&5
1509  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1510  ac_status=$?
1511  if test -s conftest.err; then
1512    grep -v '^ *+' conftest.err >conftest.er1
1513    cat conftest.er1 >&5
1514    mv -f conftest.er1 conftest.err
1515  fi
1516  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1517  test $ac_status = 0; } > conftest.i && {
1518	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1519	 test ! -s conftest.err
1520       }; then :
1521  ac_retval=0
1522else
1523  $as_echo "$as_me: failed program was:" >&5
1524sed 's/^/| /' conftest.$ac_ext >&5
1525
1526    ac_retval=1
1527fi
1528  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1529  as_fn_set_status $ac_retval
1530
1531} # ac_fn_c_try_cpp
1532
1533# ac_fn_c_try_run LINENO
1534# ----------------------
1535# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1536# that executables *can* be run.
1537ac_fn_c_try_run ()
1538{
1539  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1540  if { { ac_try="$ac_link"
1541case "(($ac_try" in
1542  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1543  *) ac_try_echo=$ac_try;;
1544esac
1545eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1546$as_echo "$ac_try_echo"; } >&5
1547  (eval "$ac_link") 2>&5
1548  ac_status=$?
1549  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1550  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1551  { { case "(($ac_try" in
1552  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1553  *) ac_try_echo=$ac_try;;
1554esac
1555eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1556$as_echo "$ac_try_echo"; } >&5
1557  (eval "$ac_try") 2>&5
1558  ac_status=$?
1559  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1560  test $ac_status = 0; }; }; then :
1561  ac_retval=0
1562else
1563  $as_echo "$as_me: program exited with status $ac_status" >&5
1564       $as_echo "$as_me: failed program was:" >&5
1565sed 's/^/| /' conftest.$ac_ext >&5
1566
1567       ac_retval=$ac_status
1568fi
1569  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1570  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1571  as_fn_set_status $ac_retval
1572
1573} # ac_fn_c_try_run
1574
1575# ac_fn_c_try_link LINENO
1576# -----------------------
1577# Try to link conftest.$ac_ext, and return whether this succeeded.
1578ac_fn_c_try_link ()
1579{
1580  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1581  rm -f conftest.$ac_objext conftest$ac_exeext
1582  if { { ac_try="$ac_link"
1583case "(($ac_try" in
1584  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1585  *) ac_try_echo=$ac_try;;
1586esac
1587eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1588$as_echo "$ac_try_echo"; } >&5
1589  (eval "$ac_link") 2>conftest.err
1590  ac_status=$?
1591  if test -s conftest.err; then
1592    grep -v '^ *+' conftest.err >conftest.er1
1593    cat conftest.er1 >&5
1594    mv -f conftest.er1 conftest.err
1595  fi
1596  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1597  test $ac_status = 0; } && {
1598	 test -z "$ac_c_werror_flag" ||
1599	 test ! -s conftest.err
1600       } && test -s conftest$ac_exeext && {
1601	 test "$cross_compiling" = yes ||
1602	 test -x conftest$ac_exeext
1603       }; then :
1604  ac_retval=0
1605else
1606  $as_echo "$as_me: failed program was:" >&5
1607sed 's/^/| /' conftest.$ac_ext >&5
1608
1609	ac_retval=1
1610fi
1611  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1612  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1613  # interfere with the next link command; also delete a directory that is
1614  # left behind by Apple's compiler.  We do this before executing the actions.
1615  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1616  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1617  as_fn_set_status $ac_retval
1618
1619} # ac_fn_c_try_link
1620
1621# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1622# -------------------------------------------------------
1623# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1624# the include files in INCLUDES and setting the cache variable VAR
1625# accordingly.
1626ac_fn_c_check_header_mongrel ()
1627{
1628  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1629  if eval \${$3+:} false; then :
1630  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1631$as_echo_n "checking for $2... " >&6; }
1632if eval \${$3+:} false; then :
1633  $as_echo_n "(cached) " >&6
1634fi
1635eval ac_res=\$$3
1636	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1637$as_echo "$ac_res" >&6; }
1638else
1639  # Is the header compilable?
1640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1641$as_echo_n "checking $2 usability... " >&6; }
1642cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1643/* end confdefs.h.  */
1644$4
1645#include <$2>
1646_ACEOF
1647if ac_fn_c_try_compile "$LINENO"; then :
1648  ac_header_compiler=yes
1649else
1650  ac_header_compiler=no
1651fi
1652rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1654$as_echo "$ac_header_compiler" >&6; }
1655
1656# Is the header present?
1657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1658$as_echo_n "checking $2 presence... " >&6; }
1659cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1660/* end confdefs.h.  */
1661#include <$2>
1662_ACEOF
1663if ac_fn_c_try_cpp "$LINENO"; then :
1664  ac_header_preproc=yes
1665else
1666  ac_header_preproc=no
1667fi
1668rm -f conftest.err conftest.i conftest.$ac_ext
1669{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1670$as_echo "$ac_header_preproc" >&6; }
1671
1672# So?  What about this header?
1673case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1674  yes:no: )
1675    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1676$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1677    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1678$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1679    ;;
1680  no:yes:* )
1681    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1682$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1683    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1684$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1685    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1686$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1687    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1688$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1689    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1690$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1691( $as_echo "## -------------------------------------- ##
1692## Report this to pavel.stehule@gmail.com ##
1693## -------------------------------------- ##"
1694     ) | sed "s/^/$as_me: WARNING:     /" >&2
1695    ;;
1696esac
1697  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1698$as_echo_n "checking for $2... " >&6; }
1699if eval \${$3+:} false; then :
1700  $as_echo_n "(cached) " >&6
1701else
1702  eval "$3=\$ac_header_compiler"
1703fi
1704eval ac_res=\$$3
1705	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1706$as_echo "$ac_res" >&6; }
1707fi
1708  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1709
1710} # ac_fn_c_check_header_mongrel
1711
1712# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1713# -------------------------------------------------------
1714# Tests whether HEADER exists and can be compiled using the include files in
1715# INCLUDES, setting the cache variable VAR accordingly.
1716ac_fn_c_check_header_compile ()
1717{
1718  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1719  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1720$as_echo_n "checking for $2... " >&6; }
1721if eval \${$3+:} false; then :
1722  $as_echo_n "(cached) " >&6
1723else
1724  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1725/* end confdefs.h.  */
1726$4
1727#include <$2>
1728_ACEOF
1729if ac_fn_c_try_compile "$LINENO"; then :
1730  eval "$3=yes"
1731else
1732  eval "$3=no"
1733fi
1734rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1735fi
1736eval ac_res=\$$3
1737	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1738$as_echo "$ac_res" >&6; }
1739  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1740
1741} # ac_fn_c_check_header_compile
1742cat >config.log <<_ACEOF
1743This file contains any messages produced by compilers while
1744running configure, to aid debugging if configure makes a mistake.
1745
1746It was created by pspg $as_me 0, which was
1747generated by GNU Autoconf 2.69.  Invocation command line was
1748
1749  $ $0 $@
1750
1751_ACEOF
1752exec 5>>config.log
1753{
1754cat <<_ASUNAME
1755## --------- ##
1756## Platform. ##
1757## --------- ##
1758
1759hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1760uname -m = `(uname -m) 2>/dev/null || echo unknown`
1761uname -r = `(uname -r) 2>/dev/null || echo unknown`
1762uname -s = `(uname -s) 2>/dev/null || echo unknown`
1763uname -v = `(uname -v) 2>/dev/null || echo unknown`
1764
1765/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1766/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1767
1768/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1769/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1770/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1771/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
1772/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1773/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1774/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1775
1776_ASUNAME
1777
1778as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1779for as_dir in $PATH
1780do
1781  IFS=$as_save_IFS
1782  test -z "$as_dir" && as_dir=.
1783    $as_echo "PATH: $as_dir"
1784  done
1785IFS=$as_save_IFS
1786
1787} >&5
1788
1789cat >&5 <<_ACEOF
1790
1791
1792## ----------- ##
1793## Core tests. ##
1794## ----------- ##
1795
1796_ACEOF
1797
1798
1799# Keep a trace of the command line.
1800# Strip out --no-create and --no-recursion so they do not pile up.
1801# Strip out --silent because we don't want to record it for future runs.
1802# Also quote any args containing shell meta-characters.
1803# Make two passes to allow for proper duplicate-argument suppression.
1804ac_configure_args=
1805ac_configure_args0=
1806ac_configure_args1=
1807ac_must_keep_next=false
1808for ac_pass in 1 2
1809do
1810  for ac_arg
1811  do
1812    case $ac_arg in
1813    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1814    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1815    | -silent | --silent | --silen | --sile | --sil)
1816      continue ;;
1817    *\'*)
1818      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1819    esac
1820    case $ac_pass in
1821    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
1822    2)
1823      as_fn_append ac_configure_args1 " '$ac_arg'"
1824      if test $ac_must_keep_next = true; then
1825	ac_must_keep_next=false # Got value, back to normal.
1826      else
1827	case $ac_arg in
1828	  *=* | --config-cache | -C | -disable-* | --disable-* \
1829	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1830	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1831	  | -with-* | --with-* | -without-* | --without-* | --x)
1832	    case "$ac_configure_args0 " in
1833	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1834	    esac
1835	    ;;
1836	  -* ) ac_must_keep_next=true ;;
1837	esac
1838      fi
1839      as_fn_append ac_configure_args " '$ac_arg'"
1840      ;;
1841    esac
1842  done
1843done
1844{ ac_configure_args0=; unset ac_configure_args0;}
1845{ ac_configure_args1=; unset ac_configure_args1;}
1846
1847# When interrupted or exit'd, cleanup temporary files, and complete
1848# config.log.  We remove comments because anyway the quotes in there
1849# would cause problems or look ugly.
1850# WARNING: Use '\'' to represent an apostrophe within the trap.
1851# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
1852trap 'exit_status=$?
1853  # Save into config.log some information that might help in debugging.
1854  {
1855    echo
1856
1857    $as_echo "## ---------------- ##
1858## Cache variables. ##
1859## ---------------- ##"
1860    echo
1861    # The following way of writing the cache mishandles newlines in values,
1862(
1863  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1864    eval ac_val=\$$ac_var
1865    case $ac_val in #(
1866    *${as_nl}*)
1867      case $ac_var in #(
1868      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
1869$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
1870      esac
1871      case $ac_var in #(
1872      _ | IFS | as_nl) ;; #(
1873      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
1874      *) { eval $ac_var=; unset $ac_var;} ;;
1875      esac ;;
1876    esac
1877  done
1878  (set) 2>&1 |
1879    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1880    *${as_nl}ac_space=\ *)
1881      sed -n \
1882	"s/'\''/'\''\\\\'\'''\''/g;
1883	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1884      ;; #(
1885    *)
1886      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
1887      ;;
1888    esac |
1889    sort
1890)
1891    echo
1892
1893    $as_echo "## ----------------- ##
1894## Output variables. ##
1895## ----------------- ##"
1896    echo
1897    for ac_var in $ac_subst_vars
1898    do
1899      eval ac_val=\$$ac_var
1900      case $ac_val in
1901      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1902      esac
1903      $as_echo "$ac_var='\''$ac_val'\''"
1904    done | sort
1905    echo
1906
1907    if test -n "$ac_subst_files"; then
1908      $as_echo "## ------------------- ##
1909## File substitutions. ##
1910## ------------------- ##"
1911      echo
1912      for ac_var in $ac_subst_files
1913      do
1914	eval ac_val=\$$ac_var
1915	case $ac_val in
1916	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1917	esac
1918	$as_echo "$ac_var='\''$ac_val'\''"
1919      done | sort
1920      echo
1921    fi
1922
1923    if test -s confdefs.h; then
1924      $as_echo "## ----------- ##
1925## confdefs.h. ##
1926## ----------- ##"
1927      echo
1928      cat confdefs.h
1929      echo
1930    fi
1931    test "$ac_signal" != 0 &&
1932      $as_echo "$as_me: caught signal $ac_signal"
1933    $as_echo "$as_me: exit $exit_status"
1934  } >&5
1935  rm -f core *.core core.conftest.* &&
1936    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
1937    exit $exit_status
1938' 0
1939for ac_signal in 1 2 13 15; do
1940  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
1941done
1942ac_signal=0
1943
1944# confdefs.h avoids OS command line length limits that DEFS can exceed.
1945rm -f -r conftest* confdefs.h
1946
1947$as_echo "/* confdefs.h */" > confdefs.h
1948
1949# Predefined preprocessor variables.
1950
1951cat >>confdefs.h <<_ACEOF
1952#define PACKAGE_NAME "$PACKAGE_NAME"
1953_ACEOF
1954
1955cat >>confdefs.h <<_ACEOF
1956#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1957_ACEOF
1958
1959cat >>confdefs.h <<_ACEOF
1960#define PACKAGE_VERSION "$PACKAGE_VERSION"
1961_ACEOF
1962
1963cat >>confdefs.h <<_ACEOF
1964#define PACKAGE_STRING "$PACKAGE_STRING"
1965_ACEOF
1966
1967cat >>confdefs.h <<_ACEOF
1968#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1969_ACEOF
1970
1971cat >>confdefs.h <<_ACEOF
1972#define PACKAGE_URL "$PACKAGE_URL"
1973_ACEOF
1974
1975
1976# Let the site file select an alternate cache file if it wants to.
1977# Prefer an explicitly selected file to automatically selected ones.
1978ac_site_file1=NONE
1979ac_site_file2=NONE
1980if test -n "$CONFIG_SITE"; then
1981  # We do not want a PATH search for config.site.
1982  case $CONFIG_SITE in #((
1983    -*)  ac_site_file1=./$CONFIG_SITE;;
1984    */*) ac_site_file1=$CONFIG_SITE;;
1985    *)   ac_site_file1=./$CONFIG_SITE;;
1986  esac
1987elif test "x$prefix" != xNONE; then
1988  ac_site_file1=$prefix/share/config.site
1989  ac_site_file2=$prefix/etc/config.site
1990else
1991  ac_site_file1=$ac_default_prefix/share/config.site
1992  ac_site_file2=$ac_default_prefix/etc/config.site
1993fi
1994for ac_site_file in "$ac_site_file1" "$ac_site_file2"
1995do
1996  test "x$ac_site_file" = xNONE && continue
1997  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
1998    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
1999$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2000    sed 's/^/| /' "$ac_site_file" >&5
2001    . "$ac_site_file" \
2002      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2003$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2004as_fn_error $? "failed to load site script $ac_site_file
2005See \`config.log' for more details" "$LINENO" 5; }
2006  fi
2007done
2008
2009if test -r "$cache_file"; then
2010  # Some versions of bash will fail to source /dev/null (special files
2011  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2012  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2013    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2014$as_echo "$as_me: loading cache $cache_file" >&6;}
2015    case $cache_file in
2016      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2017      *)                      . "./$cache_file";;
2018    esac
2019  fi
2020else
2021  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2022$as_echo "$as_me: creating cache $cache_file" >&6;}
2023  >$cache_file
2024fi
2025
2026# Check that the precious variables saved in the cache have kept the same
2027# value.
2028ac_cache_corrupted=false
2029for ac_var in $ac_precious_vars; do
2030  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2031  eval ac_new_set=\$ac_env_${ac_var}_set
2032  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2033  eval ac_new_val=\$ac_env_${ac_var}_value
2034  case $ac_old_set,$ac_new_set in
2035    set,)
2036      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2037$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2038      ac_cache_corrupted=: ;;
2039    ,set)
2040      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2041$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2042      ac_cache_corrupted=: ;;
2043    ,);;
2044    *)
2045      if test "x$ac_old_val" != "x$ac_new_val"; then
2046	# differences in whitespace do not lead to failure.
2047	ac_old_val_w=`echo x $ac_old_val`
2048	ac_new_val_w=`echo x $ac_new_val`
2049	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2050	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2051$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2052	  ac_cache_corrupted=:
2053	else
2054	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2055$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2056	  eval $ac_var=\$ac_old_val
2057	fi
2058	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2059$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2060	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2061$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2062      fi;;
2063  esac
2064  # Pass precious variables to config.status.
2065  if test "$ac_new_set" = set; then
2066    case $ac_new_val in
2067    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2068    *) ac_arg=$ac_var=$ac_new_val ;;
2069    esac
2070    case " $ac_configure_args " in
2071      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2072      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2073    esac
2074  fi
2075done
2076if $ac_cache_corrupted; then
2077  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2078$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2079  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2080$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2081  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2082fi
2083## -------------------- ##
2084## Main body of script. ##
2085## -------------------- ##
2086
2087ac_ext=c
2088ac_cpp='$CPP $CPPFLAGS'
2089ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2090ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2091ac_compiler_gnu=$ac_cv_c_compiler_gnu
2092
2093
2094
2095ac_ext=c
2096ac_cpp='$CPP $CPPFLAGS'
2097ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2098ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2099ac_compiler_gnu=$ac_cv_c_compiler_gnu
2100
2101
2102
2103
2104
2105
2106ac_ext=c
2107ac_cpp='$CPP $CPPFLAGS'
2108ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2109ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2110ac_compiler_gnu=$ac_cv_c_compiler_gnu
2111if test -n "$ac_tool_prefix"; then
2112  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2113set dummy ${ac_tool_prefix}gcc; ac_word=$2
2114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2115$as_echo_n "checking for $ac_word... " >&6; }
2116if ${ac_cv_prog_CC+:} false; then :
2117  $as_echo_n "(cached) " >&6
2118else
2119  if test -n "$CC"; then
2120  ac_cv_prog_CC="$CC" # Let the user override the test.
2121else
2122as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2123for as_dir in $PATH
2124do
2125  IFS=$as_save_IFS
2126  test -z "$as_dir" && as_dir=.
2127    for ac_exec_ext in '' $ac_executable_extensions; do
2128  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2129    ac_cv_prog_CC="${ac_tool_prefix}gcc"
2130    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2131    break 2
2132  fi
2133done
2134  done
2135IFS=$as_save_IFS
2136
2137fi
2138fi
2139CC=$ac_cv_prog_CC
2140if test -n "$CC"; then
2141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2142$as_echo "$CC" >&6; }
2143else
2144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2145$as_echo "no" >&6; }
2146fi
2147
2148
2149fi
2150if test -z "$ac_cv_prog_CC"; then
2151  ac_ct_CC=$CC
2152  # Extract the first word of "gcc", so it can be a program name with args.
2153set dummy gcc; ac_word=$2
2154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2155$as_echo_n "checking for $ac_word... " >&6; }
2156if ${ac_cv_prog_ac_ct_CC+:} false; then :
2157  $as_echo_n "(cached) " >&6
2158else
2159  if test -n "$ac_ct_CC"; then
2160  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2161else
2162as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2163for as_dir in $PATH
2164do
2165  IFS=$as_save_IFS
2166  test -z "$as_dir" && as_dir=.
2167    for ac_exec_ext in '' $ac_executable_extensions; do
2168  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2169    ac_cv_prog_ac_ct_CC="gcc"
2170    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2171    break 2
2172  fi
2173done
2174  done
2175IFS=$as_save_IFS
2176
2177fi
2178fi
2179ac_ct_CC=$ac_cv_prog_ac_ct_CC
2180if test -n "$ac_ct_CC"; then
2181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2182$as_echo "$ac_ct_CC" >&6; }
2183else
2184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2185$as_echo "no" >&6; }
2186fi
2187
2188  if test "x$ac_ct_CC" = x; then
2189    CC=""
2190  else
2191    case $cross_compiling:$ac_tool_warned in
2192yes:)
2193{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2194$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2195ac_tool_warned=yes ;;
2196esac
2197    CC=$ac_ct_CC
2198  fi
2199else
2200  CC="$ac_cv_prog_CC"
2201fi
2202
2203if test -z "$CC"; then
2204          if test -n "$ac_tool_prefix"; then
2205    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2206set dummy ${ac_tool_prefix}cc; ac_word=$2
2207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2208$as_echo_n "checking for $ac_word... " >&6; }
2209if ${ac_cv_prog_CC+:} false; then :
2210  $as_echo_n "(cached) " >&6
2211else
2212  if test -n "$CC"; then
2213  ac_cv_prog_CC="$CC" # Let the user override the test.
2214else
2215as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2216for as_dir in $PATH
2217do
2218  IFS=$as_save_IFS
2219  test -z "$as_dir" && as_dir=.
2220    for ac_exec_ext in '' $ac_executable_extensions; do
2221  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2222    ac_cv_prog_CC="${ac_tool_prefix}cc"
2223    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2224    break 2
2225  fi
2226done
2227  done
2228IFS=$as_save_IFS
2229
2230fi
2231fi
2232CC=$ac_cv_prog_CC
2233if test -n "$CC"; then
2234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2235$as_echo "$CC" >&6; }
2236else
2237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2238$as_echo "no" >&6; }
2239fi
2240
2241
2242  fi
2243fi
2244if test -z "$CC"; then
2245  # Extract the first word of "cc", so it can be a program name with args.
2246set dummy cc; ac_word=$2
2247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2248$as_echo_n "checking for $ac_word... " >&6; }
2249if ${ac_cv_prog_CC+:} false; then :
2250  $as_echo_n "(cached) " >&6
2251else
2252  if test -n "$CC"; then
2253  ac_cv_prog_CC="$CC" # Let the user override the test.
2254else
2255  ac_prog_rejected=no
2256as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2257for as_dir in $PATH
2258do
2259  IFS=$as_save_IFS
2260  test -z "$as_dir" && as_dir=.
2261    for ac_exec_ext in '' $ac_executable_extensions; do
2262  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2263    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2264       ac_prog_rejected=yes
2265       continue
2266     fi
2267    ac_cv_prog_CC="cc"
2268    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2269    break 2
2270  fi
2271done
2272  done
2273IFS=$as_save_IFS
2274
2275if test $ac_prog_rejected = yes; then
2276  # We found a bogon in the path, so make sure we never use it.
2277  set dummy $ac_cv_prog_CC
2278  shift
2279  if test $# != 0; then
2280    # We chose a different compiler from the bogus one.
2281    # However, it has the same basename, so the bogon will be chosen
2282    # first if we set CC to just the basename; use the full file name.
2283    shift
2284    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2285  fi
2286fi
2287fi
2288fi
2289CC=$ac_cv_prog_CC
2290if test -n "$CC"; then
2291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2292$as_echo "$CC" >&6; }
2293else
2294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2295$as_echo "no" >&6; }
2296fi
2297
2298
2299fi
2300if test -z "$CC"; then
2301  if test -n "$ac_tool_prefix"; then
2302  for ac_prog in cl.exe
2303  do
2304    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2305set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2307$as_echo_n "checking for $ac_word... " >&6; }
2308if ${ac_cv_prog_CC+:} false; then :
2309  $as_echo_n "(cached) " >&6
2310else
2311  if test -n "$CC"; then
2312  ac_cv_prog_CC="$CC" # Let the user override the test.
2313else
2314as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2315for as_dir in $PATH
2316do
2317  IFS=$as_save_IFS
2318  test -z "$as_dir" && as_dir=.
2319    for ac_exec_ext in '' $ac_executable_extensions; do
2320  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2321    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2322    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2323    break 2
2324  fi
2325done
2326  done
2327IFS=$as_save_IFS
2328
2329fi
2330fi
2331CC=$ac_cv_prog_CC
2332if test -n "$CC"; then
2333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2334$as_echo "$CC" >&6; }
2335else
2336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2337$as_echo "no" >&6; }
2338fi
2339
2340
2341    test -n "$CC" && break
2342  done
2343fi
2344if test -z "$CC"; then
2345  ac_ct_CC=$CC
2346  for ac_prog in cl.exe
2347do
2348  # Extract the first word of "$ac_prog", so it can be a program name with args.
2349set dummy $ac_prog; ac_word=$2
2350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2351$as_echo_n "checking for $ac_word... " >&6; }
2352if ${ac_cv_prog_ac_ct_CC+:} false; then :
2353  $as_echo_n "(cached) " >&6
2354else
2355  if test -n "$ac_ct_CC"; then
2356  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2357else
2358as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2359for as_dir in $PATH
2360do
2361  IFS=$as_save_IFS
2362  test -z "$as_dir" && as_dir=.
2363    for ac_exec_ext in '' $ac_executable_extensions; do
2364  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2365    ac_cv_prog_ac_ct_CC="$ac_prog"
2366    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2367    break 2
2368  fi
2369done
2370  done
2371IFS=$as_save_IFS
2372
2373fi
2374fi
2375ac_ct_CC=$ac_cv_prog_ac_ct_CC
2376if test -n "$ac_ct_CC"; then
2377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2378$as_echo "$ac_ct_CC" >&6; }
2379else
2380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2381$as_echo "no" >&6; }
2382fi
2383
2384
2385  test -n "$ac_ct_CC" && break
2386done
2387
2388  if test "x$ac_ct_CC" = x; then
2389    CC=""
2390  else
2391    case $cross_compiling:$ac_tool_warned in
2392yes:)
2393{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2394$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2395ac_tool_warned=yes ;;
2396esac
2397    CC=$ac_ct_CC
2398  fi
2399fi
2400
2401fi
2402
2403
2404test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2405$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2406as_fn_error $? "no acceptable C compiler found in \$PATH
2407See \`config.log' for more details" "$LINENO" 5; }
2408
2409# Provide some information about the compiler.
2410$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
2411set X $ac_compile
2412ac_compiler=$2
2413for ac_option in --version -v -V -qversion; do
2414  { { ac_try="$ac_compiler $ac_option >&5"
2415case "(($ac_try" in
2416  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2417  *) ac_try_echo=$ac_try;;
2418esac
2419eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2420$as_echo "$ac_try_echo"; } >&5
2421  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
2422  ac_status=$?
2423  if test -s conftest.err; then
2424    sed '10a\
2425... rest of stderr output deleted ...
2426         10q' conftest.err >conftest.er1
2427    cat conftest.er1 >&5
2428  fi
2429  rm -f conftest.er1 conftest.err
2430  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2431  test $ac_status = 0; }
2432done
2433
2434cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2435/* end confdefs.h.  */
2436
2437int
2438main ()
2439{
2440
2441  ;
2442  return 0;
2443}
2444_ACEOF
2445ac_clean_files_save=$ac_clean_files
2446ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
2447# Try to create an executable without -o first, disregard a.out.
2448# It will help us diagnose broken compilers, and finding out an intuition
2449# of exeext.
2450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
2451$as_echo_n "checking whether the C compiler works... " >&6; }
2452ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2453
2454# The possible output files:
2455ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
2456
2457ac_rmfiles=
2458for ac_file in $ac_files
2459do
2460  case $ac_file in
2461    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
2462    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2463  esac
2464done
2465rm -f $ac_rmfiles
2466
2467if { { ac_try="$ac_link_default"
2468case "(($ac_try" in
2469  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2470  *) ac_try_echo=$ac_try;;
2471esac
2472eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2473$as_echo "$ac_try_echo"; } >&5
2474  (eval "$ac_link_default") 2>&5
2475  ac_status=$?
2476  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2477  test $ac_status = 0; }; then :
2478  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2479# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2480# in a Makefile.  We should not override ac_cv_exeext if it was cached,
2481# so that the user can short-circuit this test for compilers unknown to
2482# Autoconf.
2483for ac_file in $ac_files ''
2484do
2485  test -f "$ac_file" || continue
2486  case $ac_file in
2487    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
2488	;;
2489    [ab].out )
2490	# We found the default executable, but exeext='' is most
2491	# certainly right.
2492	break;;
2493    *.* )
2494	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2495	then :; else
2496	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2497	fi
2498	# We set ac_cv_exeext here because the later test for it is not
2499	# safe: cross compilers may not add the suffix if given an `-o'
2500	# argument, so we may need to know it at that point already.
2501	# Even if this section looks crufty: it has the advantage of
2502	# actually working.
2503	break;;
2504    * )
2505	break;;
2506  esac
2507done
2508test "$ac_cv_exeext" = no && ac_cv_exeext=
2509
2510else
2511  ac_file=''
2512fi
2513if test -z "$ac_file"; then :
2514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2515$as_echo "no" >&6; }
2516$as_echo "$as_me: failed program was:" >&5
2517sed 's/^/| /' conftest.$ac_ext >&5
2518
2519{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2520$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2521as_fn_error 77 "C compiler cannot create executables
2522See \`config.log' for more details" "$LINENO" 5; }
2523else
2524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
2525$as_echo "yes" >&6; }
2526fi
2527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
2528$as_echo_n "checking for C compiler default output file name... " >&6; }
2529{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
2530$as_echo "$ac_file" >&6; }
2531ac_exeext=$ac_cv_exeext
2532
2533rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
2534ac_clean_files=$ac_clean_files_save
2535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
2536$as_echo_n "checking for suffix of executables... " >&6; }
2537if { { ac_try="$ac_link"
2538case "(($ac_try" in
2539  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2540  *) ac_try_echo=$ac_try;;
2541esac
2542eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2543$as_echo "$ac_try_echo"; } >&5
2544  (eval "$ac_link") 2>&5
2545  ac_status=$?
2546  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2547  test $ac_status = 0; }; then :
2548  # If both `conftest.exe' and `conftest' are `present' (well, observable)
2549# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
2550# work properly (i.e., refer to `conftest.exe'), while it won't with
2551# `rm'.
2552for ac_file in conftest.exe conftest conftest.*; do
2553  test -f "$ac_file" || continue
2554  case $ac_file in
2555    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
2556    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2557	  break;;
2558    * ) break;;
2559  esac
2560done
2561else
2562  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2563$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2564as_fn_error $? "cannot compute suffix of executables: cannot compile and link
2565See \`config.log' for more details" "$LINENO" 5; }
2566fi
2567rm -f conftest conftest$ac_cv_exeext
2568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
2569$as_echo "$ac_cv_exeext" >&6; }
2570
2571rm -f conftest.$ac_ext
2572EXEEXT=$ac_cv_exeext
2573ac_exeext=$EXEEXT
2574cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2575/* end confdefs.h.  */
2576#include <stdio.h>
2577int
2578main ()
2579{
2580FILE *f = fopen ("conftest.out", "w");
2581 return ferror (f) || fclose (f) != 0;
2582
2583  ;
2584  return 0;
2585}
2586_ACEOF
2587ac_clean_files="$ac_clean_files conftest.out"
2588# Check that the compiler produces executables we can run.  If not, either
2589# the compiler is broken, or we cross compile.
2590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
2591$as_echo_n "checking whether we are cross compiling... " >&6; }
2592if test "$cross_compiling" != yes; then
2593  { { ac_try="$ac_link"
2594case "(($ac_try" in
2595  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2596  *) ac_try_echo=$ac_try;;
2597esac
2598eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2599$as_echo "$ac_try_echo"; } >&5
2600  (eval "$ac_link") 2>&5
2601  ac_status=$?
2602  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2603  test $ac_status = 0; }
2604  if { ac_try='./conftest$ac_cv_exeext'
2605  { { case "(($ac_try" in
2606  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2607  *) ac_try_echo=$ac_try;;
2608esac
2609eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2610$as_echo "$ac_try_echo"; } >&5
2611  (eval "$ac_try") 2>&5
2612  ac_status=$?
2613  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2614  test $ac_status = 0; }; }; then
2615    cross_compiling=no
2616  else
2617    if test "$cross_compiling" = maybe; then
2618	cross_compiling=yes
2619    else
2620	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2621$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2622as_fn_error $? "cannot run C compiled programs.
2623If you meant to cross compile, use \`--host'.
2624See \`config.log' for more details" "$LINENO" 5; }
2625    fi
2626  fi
2627fi
2628{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
2629$as_echo "$cross_compiling" >&6; }
2630
2631rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
2632ac_clean_files=$ac_clean_files_save
2633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
2634$as_echo_n "checking for suffix of object files... " >&6; }
2635if ${ac_cv_objext+:} false; then :
2636  $as_echo_n "(cached) " >&6
2637else
2638  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2639/* end confdefs.h.  */
2640
2641int
2642main ()
2643{
2644
2645  ;
2646  return 0;
2647}
2648_ACEOF
2649rm -f conftest.o conftest.obj
2650if { { ac_try="$ac_compile"
2651case "(($ac_try" in
2652  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2653  *) ac_try_echo=$ac_try;;
2654esac
2655eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2656$as_echo "$ac_try_echo"; } >&5
2657  (eval "$ac_compile") 2>&5
2658  ac_status=$?
2659  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2660  test $ac_status = 0; }; then :
2661  for ac_file in conftest.o conftest.obj conftest.*; do
2662  test -f "$ac_file" || continue;
2663  case $ac_file in
2664    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
2665    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2666       break;;
2667  esac
2668done
2669else
2670  $as_echo "$as_me: failed program was:" >&5
2671sed 's/^/| /' conftest.$ac_ext >&5
2672
2673{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2674$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2675as_fn_error $? "cannot compute suffix of object files: cannot compile
2676See \`config.log' for more details" "$LINENO" 5; }
2677fi
2678rm -f conftest.$ac_cv_objext conftest.$ac_ext
2679fi
2680{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
2681$as_echo "$ac_cv_objext" >&6; }
2682OBJEXT=$ac_cv_objext
2683ac_objext=$OBJEXT
2684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
2685$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
2686if ${ac_cv_c_compiler_gnu+:} false; then :
2687  $as_echo_n "(cached) " >&6
2688else
2689  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2690/* end confdefs.h.  */
2691
2692int
2693main ()
2694{
2695#ifndef __GNUC__
2696       choke me
2697#endif
2698
2699  ;
2700  return 0;
2701}
2702_ACEOF
2703if ac_fn_c_try_compile "$LINENO"; then :
2704  ac_compiler_gnu=yes
2705else
2706  ac_compiler_gnu=no
2707fi
2708rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2709ac_cv_c_compiler_gnu=$ac_compiler_gnu
2710
2711fi
2712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
2713$as_echo "$ac_cv_c_compiler_gnu" >&6; }
2714if test $ac_compiler_gnu = yes; then
2715  GCC=yes
2716else
2717  GCC=
2718fi
2719ac_test_CFLAGS=${CFLAGS+set}
2720ac_save_CFLAGS=$CFLAGS
2721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
2722$as_echo_n "checking whether $CC accepts -g... " >&6; }
2723if ${ac_cv_prog_cc_g+:} false; then :
2724  $as_echo_n "(cached) " >&6
2725else
2726  ac_save_c_werror_flag=$ac_c_werror_flag
2727   ac_c_werror_flag=yes
2728   ac_cv_prog_cc_g=no
2729   CFLAGS="-g"
2730   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2731/* end confdefs.h.  */
2732
2733int
2734main ()
2735{
2736
2737  ;
2738  return 0;
2739}
2740_ACEOF
2741if ac_fn_c_try_compile "$LINENO"; then :
2742  ac_cv_prog_cc_g=yes
2743else
2744  CFLAGS=""
2745      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2746/* end confdefs.h.  */
2747
2748int
2749main ()
2750{
2751
2752  ;
2753  return 0;
2754}
2755_ACEOF
2756if ac_fn_c_try_compile "$LINENO"; then :
2757
2758else
2759  ac_c_werror_flag=$ac_save_c_werror_flag
2760	 CFLAGS="-g"
2761	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2762/* end confdefs.h.  */
2763
2764int
2765main ()
2766{
2767
2768  ;
2769  return 0;
2770}
2771_ACEOF
2772if ac_fn_c_try_compile "$LINENO"; then :
2773  ac_cv_prog_cc_g=yes
2774fi
2775rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2776fi
2777rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2778fi
2779rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2780   ac_c_werror_flag=$ac_save_c_werror_flag
2781fi
2782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
2783$as_echo "$ac_cv_prog_cc_g" >&6; }
2784if test "$ac_test_CFLAGS" = set; then
2785  CFLAGS=$ac_save_CFLAGS
2786elif test $ac_cv_prog_cc_g = yes; then
2787  if test "$GCC" = yes; then
2788    CFLAGS="-g -O2"
2789  else
2790    CFLAGS="-g"
2791  fi
2792else
2793  if test "$GCC" = yes; then
2794    CFLAGS="-O2"
2795  else
2796    CFLAGS=
2797  fi
2798fi
2799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
2800$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
2801if ${ac_cv_prog_cc_c89+:} false; then :
2802  $as_echo_n "(cached) " >&6
2803else
2804  ac_cv_prog_cc_c89=no
2805ac_save_CC=$CC
2806cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2807/* end confdefs.h.  */
2808#include <stdarg.h>
2809#include <stdio.h>
2810struct stat;
2811/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2812struct buf { int x; };
2813FILE * (*rcsopen) (struct buf *, struct stat *, int);
2814static char *e (p, i)
2815     char **p;
2816     int i;
2817{
2818  return p[i];
2819}
2820static char *f (char * (*g) (char **, int), char **p, ...)
2821{
2822  char *s;
2823  va_list v;
2824  va_start (v,p);
2825  s = g (p, va_arg (v,int));
2826  va_end (v);
2827  return s;
2828}
2829
2830/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
2831   function prototypes and stuff, but not '\xHH' hex character constants.
2832   These don't provoke an error unfortunately, instead are silently treated
2833   as 'x'.  The following induces an error, until -std is added to get
2834   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
2835   array size at least.  It's necessary to write '\x00'==0 to get something
2836   that's true only with -std.  */
2837int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2838
2839/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
2840   inside strings and character constants.  */
2841#define FOO(x) 'x'
2842int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
2843
2844int test (int i, double x);
2845struct s1 {int (*f) (int a);};
2846struct s2 {int (*f) (double a);};
2847int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2848int argc;
2849char **argv;
2850int
2851main ()
2852{
2853return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2854  ;
2855  return 0;
2856}
2857_ACEOF
2858for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
2859	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2860do
2861  CC="$ac_save_CC $ac_arg"
2862  if ac_fn_c_try_compile "$LINENO"; then :
2863  ac_cv_prog_cc_c89=$ac_arg
2864fi
2865rm -f core conftest.err conftest.$ac_objext
2866  test "x$ac_cv_prog_cc_c89" != "xno" && break
2867done
2868rm -f conftest.$ac_ext
2869CC=$ac_save_CC
2870
2871fi
2872# AC_CACHE_VAL
2873case "x$ac_cv_prog_cc_c89" in
2874  x)
2875    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
2876$as_echo "none needed" >&6; } ;;
2877  xno)
2878    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
2879$as_echo "unsupported" >&6; } ;;
2880  *)
2881    CC="$CC $ac_cv_prog_cc_c89"
2882    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
2883$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
2884esac
2885if test "x$ac_cv_prog_cc_c89" != xno; then :
2886
2887fi
2888
2889ac_ext=c
2890ac_cpp='$CPP $CPPFLAGS'
2891ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2892ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2893ac_compiler_gnu=$ac_cv_c_compiler_gnu
2894
2895
2896ac_ext=c
2897ac_cpp='$CPP $CPPFLAGS'
2898ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2899ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2900ac_compiler_gnu=$ac_cv_c_compiler_gnu
2901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
2902$as_echo_n "checking how to run the C preprocessor... " >&6; }
2903# On Suns, sometimes $CPP names a directory.
2904if test -n "$CPP" && test -d "$CPP"; then
2905  CPP=
2906fi
2907if test -z "$CPP"; then
2908  if ${ac_cv_prog_CPP+:} false; then :
2909  $as_echo_n "(cached) " >&6
2910else
2911      # Double quotes because CPP needs to be expanded
2912    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2913    do
2914      ac_preproc_ok=false
2915for ac_c_preproc_warn_flag in '' yes
2916do
2917  # Use a header file that comes with gcc, so configuring glibc
2918  # with a fresh cross-compiler works.
2919  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2920  # <limits.h> exists even on freestanding compilers.
2921  # On the NeXT, cc -E runs the code through the compiler's parser,
2922  # not just through cpp. "Syntax error" is here to catch this case.
2923  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2924/* end confdefs.h.  */
2925#ifdef __STDC__
2926# include <limits.h>
2927#else
2928# include <assert.h>
2929#endif
2930		     Syntax error
2931_ACEOF
2932if ac_fn_c_try_cpp "$LINENO"; then :
2933
2934else
2935  # Broken: fails on valid input.
2936continue
2937fi
2938rm -f conftest.err conftest.i conftest.$ac_ext
2939
2940  # OK, works on sane cases.  Now check whether nonexistent headers
2941  # can be detected and how.
2942  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2943/* end confdefs.h.  */
2944#include <ac_nonexistent.h>
2945_ACEOF
2946if ac_fn_c_try_cpp "$LINENO"; then :
2947  # Broken: success on invalid input.
2948continue
2949else
2950  # Passes both tests.
2951ac_preproc_ok=:
2952break
2953fi
2954rm -f conftest.err conftest.i conftest.$ac_ext
2955
2956done
2957# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2958rm -f conftest.i conftest.err conftest.$ac_ext
2959if $ac_preproc_ok; then :
2960  break
2961fi
2962
2963    done
2964    ac_cv_prog_CPP=$CPP
2965
2966fi
2967  CPP=$ac_cv_prog_CPP
2968else
2969  ac_cv_prog_CPP=$CPP
2970fi
2971{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
2972$as_echo "$CPP" >&6; }
2973ac_preproc_ok=false
2974for ac_c_preproc_warn_flag in '' yes
2975do
2976  # Use a header file that comes with gcc, so configuring glibc
2977  # with a fresh cross-compiler works.
2978  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2979  # <limits.h> exists even on freestanding compilers.
2980  # On the NeXT, cc -E runs the code through the compiler's parser,
2981  # not just through cpp. "Syntax error" is here to catch this case.
2982  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2983/* end confdefs.h.  */
2984#ifdef __STDC__
2985# include <limits.h>
2986#else
2987# include <assert.h>
2988#endif
2989		     Syntax error
2990_ACEOF
2991if ac_fn_c_try_cpp "$LINENO"; then :
2992
2993else
2994  # Broken: fails on valid input.
2995continue
2996fi
2997rm -f conftest.err conftest.i conftest.$ac_ext
2998
2999  # OK, works on sane cases.  Now check whether nonexistent headers
3000  # can be detected and how.
3001  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3002/* end confdefs.h.  */
3003#include <ac_nonexistent.h>
3004_ACEOF
3005if ac_fn_c_try_cpp "$LINENO"; then :
3006  # Broken: success on invalid input.
3007continue
3008else
3009  # Passes both tests.
3010ac_preproc_ok=:
3011break
3012fi
3013rm -f conftest.err conftest.i conftest.$ac_ext
3014
3015done
3016# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3017rm -f conftest.i conftest.err conftest.$ac_ext
3018if $ac_preproc_ok; then :
3019
3020else
3021  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3022$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3023as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
3024See \`config.log' for more details" "$LINENO" 5; }
3025fi
3026
3027ac_ext=c
3028ac_cpp='$CPP $CPPFLAGS'
3029ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3030ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3031ac_compiler_gnu=$ac_cv_c_compiler_gnu
3032
3033
3034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3035$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3036if ${ac_cv_path_GREP+:} false; then :
3037  $as_echo_n "(cached) " >&6
3038else
3039  if test -z "$GREP"; then
3040  ac_path_GREP_found=false
3041  # Loop through the user's path and test for each of PROGNAME-LIST
3042  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3043for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3044do
3045  IFS=$as_save_IFS
3046  test -z "$as_dir" && as_dir=.
3047    for ac_prog in grep ggrep; do
3048    for ac_exec_ext in '' $ac_executable_extensions; do
3049      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3050      as_fn_executable_p "$ac_path_GREP" || continue
3051# Check for GNU ac_path_GREP and select it if it is found.
3052  # Check for GNU $ac_path_GREP
3053case `"$ac_path_GREP" --version 2>&1` in
3054*GNU*)
3055  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3056*)
3057  ac_count=0
3058  $as_echo_n 0123456789 >"conftest.in"
3059  while :
3060  do
3061    cat "conftest.in" "conftest.in" >"conftest.tmp"
3062    mv "conftest.tmp" "conftest.in"
3063    cp "conftest.in" "conftest.nl"
3064    $as_echo 'GREP' >> "conftest.nl"
3065    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3066    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3067    as_fn_arith $ac_count + 1 && ac_count=$as_val
3068    if test $ac_count -gt ${ac_path_GREP_max-0}; then
3069      # Best one so far, save it but keep looking for a better one
3070      ac_cv_path_GREP="$ac_path_GREP"
3071      ac_path_GREP_max=$ac_count
3072    fi
3073    # 10*(2^10) chars as input seems more than enough
3074    test $ac_count -gt 10 && break
3075  done
3076  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3077esac
3078
3079      $ac_path_GREP_found && break 3
3080    done
3081  done
3082  done
3083IFS=$as_save_IFS
3084  if test -z "$ac_cv_path_GREP"; then
3085    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3086  fi
3087else
3088  ac_cv_path_GREP=$GREP
3089fi
3090
3091fi
3092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
3093$as_echo "$ac_cv_path_GREP" >&6; }
3094 GREP="$ac_cv_path_GREP"
3095
3096
3097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
3098$as_echo_n "checking for egrep... " >&6; }
3099if ${ac_cv_path_EGREP+:} false; then :
3100  $as_echo_n "(cached) " >&6
3101else
3102  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3103   then ac_cv_path_EGREP="$GREP -E"
3104   else
3105     if test -z "$EGREP"; then
3106  ac_path_EGREP_found=false
3107  # Loop through the user's path and test for each of PROGNAME-LIST
3108  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3109for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3110do
3111  IFS=$as_save_IFS
3112  test -z "$as_dir" && as_dir=.
3113    for ac_prog in egrep; do
3114    for ac_exec_ext in '' $ac_executable_extensions; do
3115      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3116      as_fn_executable_p "$ac_path_EGREP" || continue
3117# Check for GNU ac_path_EGREP and select it if it is found.
3118  # Check for GNU $ac_path_EGREP
3119case `"$ac_path_EGREP" --version 2>&1` in
3120*GNU*)
3121  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3122*)
3123  ac_count=0
3124  $as_echo_n 0123456789 >"conftest.in"
3125  while :
3126  do
3127    cat "conftest.in" "conftest.in" >"conftest.tmp"
3128    mv "conftest.tmp" "conftest.in"
3129    cp "conftest.in" "conftest.nl"
3130    $as_echo 'EGREP' >> "conftest.nl"
3131    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3132    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3133    as_fn_arith $ac_count + 1 && ac_count=$as_val
3134    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3135      # Best one so far, save it but keep looking for a better one
3136      ac_cv_path_EGREP="$ac_path_EGREP"
3137      ac_path_EGREP_max=$ac_count
3138    fi
3139    # 10*(2^10) chars as input seems more than enough
3140    test $ac_count -gt 10 && break
3141  done
3142  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3143esac
3144
3145      $ac_path_EGREP_found && break 3
3146    done
3147  done
3148  done
3149IFS=$as_save_IFS
3150  if test -z "$ac_cv_path_EGREP"; then
3151    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3152  fi
3153else
3154  ac_cv_path_EGREP=$EGREP
3155fi
3156
3157   fi
3158fi
3159{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
3160$as_echo "$ac_cv_path_EGREP" >&6; }
3161 EGREP="$ac_cv_path_EGREP"
3162
3163
3164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
3165$as_echo_n "checking for ANSI C header files... " >&6; }
3166if ${ac_cv_header_stdc+:} false; then :
3167  $as_echo_n "(cached) " >&6
3168else
3169  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3170/* end confdefs.h.  */
3171#include <stdlib.h>
3172#include <stdarg.h>
3173#include <string.h>
3174#include <float.h>
3175
3176int
3177main ()
3178{
3179
3180  ;
3181  return 0;
3182}
3183_ACEOF
3184if ac_fn_c_try_compile "$LINENO"; then :
3185  ac_cv_header_stdc=yes
3186else
3187  ac_cv_header_stdc=no
3188fi
3189rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3190
3191if test $ac_cv_header_stdc = yes; then
3192  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3193  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3194/* end confdefs.h.  */
3195#include <string.h>
3196
3197_ACEOF
3198if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3199  $EGREP "memchr" >/dev/null 2>&1; then :
3200
3201else
3202  ac_cv_header_stdc=no
3203fi
3204rm -f conftest*
3205
3206fi
3207
3208if test $ac_cv_header_stdc = yes; then
3209  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3210  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3211/* end confdefs.h.  */
3212#include <stdlib.h>
3213
3214_ACEOF
3215if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3216  $EGREP "free" >/dev/null 2>&1; then :
3217
3218else
3219  ac_cv_header_stdc=no
3220fi
3221rm -f conftest*
3222
3223fi
3224
3225if test $ac_cv_header_stdc = yes; then
3226  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3227  if test "$cross_compiling" = yes; then :
3228  :
3229else
3230  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3231/* end confdefs.h.  */
3232#include <ctype.h>
3233#include <stdlib.h>
3234#if ((' ' & 0x0FF) == 0x020)
3235# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3236# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3237#else
3238# define ISLOWER(c) \
3239		   (('a' <= (c) && (c) <= 'i') \
3240		     || ('j' <= (c) && (c) <= 'r') \
3241		     || ('s' <= (c) && (c) <= 'z'))
3242# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3243#endif
3244
3245#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3246int
3247main ()
3248{
3249  int i;
3250  for (i = 0; i < 256; i++)
3251    if (XOR (islower (i), ISLOWER (i))
3252	|| toupper (i) != TOUPPER (i))
3253      return 2;
3254  return 0;
3255}
3256_ACEOF
3257if ac_fn_c_try_run "$LINENO"; then :
3258
3259else
3260  ac_cv_header_stdc=no
3261fi
3262rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3263  conftest.$ac_objext conftest.beam conftest.$ac_ext
3264fi
3265
3266fi
3267fi
3268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
3269$as_echo "$ac_cv_header_stdc" >&6; }
3270if test $ac_cv_header_stdc = yes; then
3271
3272$as_echo "#define STDC_HEADERS 1" >>confdefs.h
3273
3274fi
3275
3276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether termios.h defines TIOCGWINSZ" >&5
3277$as_echo_n "checking whether termios.h defines TIOCGWINSZ... " >&6; }
3278if ${ac_cv_sys_tiocgwinsz_in_termios_h+:} false; then :
3279  $as_echo_n "(cached) " >&6
3280else
3281  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3282/* end confdefs.h.  */
3283#include <sys/types.h>
3284#include <termios.h>
3285#ifdef TIOCGWINSZ
3286  yes
3287#endif
3288
3289_ACEOF
3290if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3291  $EGREP "yes" >/dev/null 2>&1; then :
3292  ac_cv_sys_tiocgwinsz_in_termios_h=yes
3293else
3294  ac_cv_sys_tiocgwinsz_in_termios_h=no
3295fi
3296rm -f conftest*
3297
3298fi
3299{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_tiocgwinsz_in_termios_h" >&5
3300$as_echo "$ac_cv_sys_tiocgwinsz_in_termios_h" >&6; }
3301
3302if test $ac_cv_sys_tiocgwinsz_in_termios_h != yes; then
3303  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/ioctl.h defines TIOCGWINSZ" >&5
3304$as_echo_n "checking whether sys/ioctl.h defines TIOCGWINSZ... " >&6; }
3305if ${ac_cv_sys_tiocgwinsz_in_sys_ioctl_h+:} false; then :
3306  $as_echo_n "(cached) " >&6
3307else
3308  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3309/* end confdefs.h.  */
3310#include <sys/types.h>
3311#include <sys/ioctl.h>
3312#ifdef TIOCGWINSZ
3313  yes
3314#endif
3315
3316_ACEOF
3317if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3318  $EGREP "yes" >/dev/null 2>&1; then :
3319  ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=yes
3320else
3321  ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=no
3322fi
3323rm -f conftest*
3324
3325fi
3326{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_tiocgwinsz_in_sys_ioctl_h" >&5
3327$as_echo "$ac_cv_sys_tiocgwinsz_in_sys_ioctl_h" >&6; }
3328
3329  if test $ac_cv_sys_tiocgwinsz_in_sys_ioctl_h = yes; then
3330
3331$as_echo "#define GWINSZ_IN_SYS_IOCTL 1" >>confdefs.h
3332
3333  fi
3334fi
3335
3336
3337
3338# ensure CFLAGS are set
3339if test "${CFLAGS+set}"; then :
3340
3341	USE_DEFAULT_CFLAGS=false
3342
3343else
3344
3345	USE_DEFAULT_CFLAGS=true
3346	CFLAGS=""
3347
3348fi
3349ac_ext=c
3350ac_cpp='$CPP $CPPFLAGS'
3351ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3352ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3353ac_compiler_gnu=$ac_cv_c_compiler_gnu
3354if test -n "$ac_tool_prefix"; then
3355  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3356set dummy ${ac_tool_prefix}gcc; ac_word=$2
3357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3358$as_echo_n "checking for $ac_word... " >&6; }
3359if ${ac_cv_prog_CC+:} false; then :
3360  $as_echo_n "(cached) " >&6
3361else
3362  if test -n "$CC"; then
3363  ac_cv_prog_CC="$CC" # Let the user override the test.
3364else
3365as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3366for as_dir in $PATH
3367do
3368  IFS=$as_save_IFS
3369  test -z "$as_dir" && as_dir=.
3370    for ac_exec_ext in '' $ac_executable_extensions; do
3371  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3372    ac_cv_prog_CC="${ac_tool_prefix}gcc"
3373    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3374    break 2
3375  fi
3376done
3377  done
3378IFS=$as_save_IFS
3379
3380fi
3381fi
3382CC=$ac_cv_prog_CC
3383if test -n "$CC"; then
3384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3385$as_echo "$CC" >&6; }
3386else
3387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3388$as_echo "no" >&6; }
3389fi
3390
3391
3392fi
3393if test -z "$ac_cv_prog_CC"; then
3394  ac_ct_CC=$CC
3395  # Extract the first word of "gcc", so it can be a program name with args.
3396set dummy gcc; ac_word=$2
3397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3398$as_echo_n "checking for $ac_word... " >&6; }
3399if ${ac_cv_prog_ac_ct_CC+:} false; then :
3400  $as_echo_n "(cached) " >&6
3401else
3402  if test -n "$ac_ct_CC"; then
3403  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3404else
3405as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3406for as_dir in $PATH
3407do
3408  IFS=$as_save_IFS
3409  test -z "$as_dir" && as_dir=.
3410    for ac_exec_ext in '' $ac_executable_extensions; do
3411  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3412    ac_cv_prog_ac_ct_CC="gcc"
3413    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3414    break 2
3415  fi
3416done
3417  done
3418IFS=$as_save_IFS
3419
3420fi
3421fi
3422ac_ct_CC=$ac_cv_prog_ac_ct_CC
3423if test -n "$ac_ct_CC"; then
3424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3425$as_echo "$ac_ct_CC" >&6; }
3426else
3427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3428$as_echo "no" >&6; }
3429fi
3430
3431  if test "x$ac_ct_CC" = x; then
3432    CC=""
3433  else
3434    case $cross_compiling:$ac_tool_warned in
3435yes:)
3436{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3437$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3438ac_tool_warned=yes ;;
3439esac
3440    CC=$ac_ct_CC
3441  fi
3442else
3443  CC="$ac_cv_prog_CC"
3444fi
3445
3446if test -z "$CC"; then
3447          if test -n "$ac_tool_prefix"; then
3448    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3449set dummy ${ac_tool_prefix}cc; ac_word=$2
3450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3451$as_echo_n "checking for $ac_word... " >&6; }
3452if ${ac_cv_prog_CC+:} false; then :
3453  $as_echo_n "(cached) " >&6
3454else
3455  if test -n "$CC"; then
3456  ac_cv_prog_CC="$CC" # Let the user override the test.
3457else
3458as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3459for as_dir in $PATH
3460do
3461  IFS=$as_save_IFS
3462  test -z "$as_dir" && as_dir=.
3463    for ac_exec_ext in '' $ac_executable_extensions; do
3464  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3465    ac_cv_prog_CC="${ac_tool_prefix}cc"
3466    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3467    break 2
3468  fi
3469done
3470  done
3471IFS=$as_save_IFS
3472
3473fi
3474fi
3475CC=$ac_cv_prog_CC
3476if test -n "$CC"; then
3477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3478$as_echo "$CC" >&6; }
3479else
3480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3481$as_echo "no" >&6; }
3482fi
3483
3484
3485  fi
3486fi
3487if test -z "$CC"; then
3488  # Extract the first word of "cc", so it can be a program name with args.
3489set dummy cc; ac_word=$2
3490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3491$as_echo_n "checking for $ac_word... " >&6; }
3492if ${ac_cv_prog_CC+:} false; then :
3493  $as_echo_n "(cached) " >&6
3494else
3495  if test -n "$CC"; then
3496  ac_cv_prog_CC="$CC" # Let the user override the test.
3497else
3498  ac_prog_rejected=no
3499as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3500for as_dir in $PATH
3501do
3502  IFS=$as_save_IFS
3503  test -z "$as_dir" && as_dir=.
3504    for ac_exec_ext in '' $ac_executable_extensions; do
3505  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3506    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3507       ac_prog_rejected=yes
3508       continue
3509     fi
3510    ac_cv_prog_CC="cc"
3511    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3512    break 2
3513  fi
3514done
3515  done
3516IFS=$as_save_IFS
3517
3518if test $ac_prog_rejected = yes; then
3519  # We found a bogon in the path, so make sure we never use it.
3520  set dummy $ac_cv_prog_CC
3521  shift
3522  if test $# != 0; then
3523    # We chose a different compiler from the bogus one.
3524    # However, it has the same basename, so the bogon will be chosen
3525    # first if we set CC to just the basename; use the full file name.
3526    shift
3527    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3528  fi
3529fi
3530fi
3531fi
3532CC=$ac_cv_prog_CC
3533if test -n "$CC"; then
3534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3535$as_echo "$CC" >&6; }
3536else
3537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3538$as_echo "no" >&6; }
3539fi
3540
3541
3542fi
3543if test -z "$CC"; then
3544  if test -n "$ac_tool_prefix"; then
3545  for ac_prog in cl.exe
3546  do
3547    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3548set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3550$as_echo_n "checking for $ac_word... " >&6; }
3551if ${ac_cv_prog_CC+:} false; then :
3552  $as_echo_n "(cached) " >&6
3553else
3554  if test -n "$CC"; then
3555  ac_cv_prog_CC="$CC" # Let the user override the test.
3556else
3557as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3558for as_dir in $PATH
3559do
3560  IFS=$as_save_IFS
3561  test -z "$as_dir" && as_dir=.
3562    for ac_exec_ext in '' $ac_executable_extensions; do
3563  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3564    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3565    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3566    break 2
3567  fi
3568done
3569  done
3570IFS=$as_save_IFS
3571
3572fi
3573fi
3574CC=$ac_cv_prog_CC
3575if test -n "$CC"; then
3576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3577$as_echo "$CC" >&6; }
3578else
3579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3580$as_echo "no" >&6; }
3581fi
3582
3583
3584    test -n "$CC" && break
3585  done
3586fi
3587if test -z "$CC"; then
3588  ac_ct_CC=$CC
3589  for ac_prog in cl.exe
3590do
3591  # Extract the first word of "$ac_prog", so it can be a program name with args.
3592set dummy $ac_prog; ac_word=$2
3593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3594$as_echo_n "checking for $ac_word... " >&6; }
3595if ${ac_cv_prog_ac_ct_CC+:} false; then :
3596  $as_echo_n "(cached) " >&6
3597else
3598  if test -n "$ac_ct_CC"; then
3599  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3600else
3601as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3602for as_dir in $PATH
3603do
3604  IFS=$as_save_IFS
3605  test -z "$as_dir" && as_dir=.
3606    for ac_exec_ext in '' $ac_executable_extensions; do
3607  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3608    ac_cv_prog_ac_ct_CC="$ac_prog"
3609    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3610    break 2
3611  fi
3612done
3613  done
3614IFS=$as_save_IFS
3615
3616fi
3617fi
3618ac_ct_CC=$ac_cv_prog_ac_ct_CC
3619if test -n "$ac_ct_CC"; then
3620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3621$as_echo "$ac_ct_CC" >&6; }
3622else
3623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3624$as_echo "no" >&6; }
3625fi
3626
3627
3628  test -n "$ac_ct_CC" && break
3629done
3630
3631  if test "x$ac_ct_CC" = x; then
3632    CC=""
3633  else
3634    case $cross_compiling:$ac_tool_warned in
3635yes:)
3636{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3637$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3638ac_tool_warned=yes ;;
3639esac
3640    CC=$ac_ct_CC
3641  fi
3642fi
3643
3644fi
3645
3646
3647test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3648$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3649as_fn_error $? "no acceptable C compiler found in \$PATH
3650See \`config.log' for more details" "$LINENO" 5; }
3651
3652# Provide some information about the compiler.
3653$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3654set X $ac_compile
3655ac_compiler=$2
3656for ac_option in --version -v -V -qversion; do
3657  { { ac_try="$ac_compiler $ac_option >&5"
3658case "(($ac_try" in
3659  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3660  *) ac_try_echo=$ac_try;;
3661esac
3662eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3663$as_echo "$ac_try_echo"; } >&5
3664  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3665  ac_status=$?
3666  if test -s conftest.err; then
3667    sed '10a\
3668... rest of stderr output deleted ...
3669         10q' conftest.err >conftest.er1
3670    cat conftest.er1 >&5
3671  fi
3672  rm -f conftest.er1 conftest.err
3673  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3674  test $ac_status = 0; }
3675done
3676
3677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3678$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3679if ${ac_cv_c_compiler_gnu+:} false; then :
3680  $as_echo_n "(cached) " >&6
3681else
3682  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3683/* end confdefs.h.  */
3684
3685int
3686main ()
3687{
3688#ifndef __GNUC__
3689       choke me
3690#endif
3691
3692  ;
3693  return 0;
3694}
3695_ACEOF
3696if ac_fn_c_try_compile "$LINENO"; then :
3697  ac_compiler_gnu=yes
3698else
3699  ac_compiler_gnu=no
3700fi
3701rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3702ac_cv_c_compiler_gnu=$ac_compiler_gnu
3703
3704fi
3705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3706$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3707if test $ac_compiler_gnu = yes; then
3708  GCC=yes
3709else
3710  GCC=
3711fi
3712ac_test_CFLAGS=${CFLAGS+set}
3713ac_save_CFLAGS=$CFLAGS
3714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3715$as_echo_n "checking whether $CC accepts -g... " >&6; }
3716if ${ac_cv_prog_cc_g+:} false; then :
3717  $as_echo_n "(cached) " >&6
3718else
3719  ac_save_c_werror_flag=$ac_c_werror_flag
3720   ac_c_werror_flag=yes
3721   ac_cv_prog_cc_g=no
3722   CFLAGS="-g"
3723   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3724/* end confdefs.h.  */
3725
3726int
3727main ()
3728{
3729
3730  ;
3731  return 0;
3732}
3733_ACEOF
3734if ac_fn_c_try_compile "$LINENO"; then :
3735  ac_cv_prog_cc_g=yes
3736else
3737  CFLAGS=""
3738      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3739/* end confdefs.h.  */
3740
3741int
3742main ()
3743{
3744
3745  ;
3746  return 0;
3747}
3748_ACEOF
3749if ac_fn_c_try_compile "$LINENO"; then :
3750
3751else
3752  ac_c_werror_flag=$ac_save_c_werror_flag
3753	 CFLAGS="-g"
3754	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3755/* end confdefs.h.  */
3756
3757int
3758main ()
3759{
3760
3761  ;
3762  return 0;
3763}
3764_ACEOF
3765if ac_fn_c_try_compile "$LINENO"; then :
3766  ac_cv_prog_cc_g=yes
3767fi
3768rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3769fi
3770rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3771fi
3772rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3773   ac_c_werror_flag=$ac_save_c_werror_flag
3774fi
3775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3776$as_echo "$ac_cv_prog_cc_g" >&6; }
3777if test "$ac_test_CFLAGS" = set; then
3778  CFLAGS=$ac_save_CFLAGS
3779elif test $ac_cv_prog_cc_g = yes; then
3780  if test "$GCC" = yes; then
3781    CFLAGS="-g -O2"
3782  else
3783    CFLAGS="-g"
3784  fi
3785else
3786  if test "$GCC" = yes; then
3787    CFLAGS="-O2"
3788  else
3789    CFLAGS=
3790  fi
3791fi
3792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3793$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3794if ${ac_cv_prog_cc_c89+:} false; then :
3795  $as_echo_n "(cached) " >&6
3796else
3797  ac_cv_prog_cc_c89=no
3798ac_save_CC=$CC
3799cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3800/* end confdefs.h.  */
3801#include <stdarg.h>
3802#include <stdio.h>
3803struct stat;
3804/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3805struct buf { int x; };
3806FILE * (*rcsopen) (struct buf *, struct stat *, int);
3807static char *e (p, i)
3808     char **p;
3809     int i;
3810{
3811  return p[i];
3812}
3813static char *f (char * (*g) (char **, int), char **p, ...)
3814{
3815  char *s;
3816  va_list v;
3817  va_start (v,p);
3818  s = g (p, va_arg (v,int));
3819  va_end (v);
3820  return s;
3821}
3822
3823/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3824   function prototypes and stuff, but not '\xHH' hex character constants.
3825   These don't provoke an error unfortunately, instead are silently treated
3826   as 'x'.  The following induces an error, until -std is added to get
3827   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3828   array size at least.  It's necessary to write '\x00'==0 to get something
3829   that's true only with -std.  */
3830int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3831
3832/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3833   inside strings and character constants.  */
3834#define FOO(x) 'x'
3835int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3836
3837int test (int i, double x);
3838struct s1 {int (*f) (int a);};
3839struct s2 {int (*f) (double a);};
3840int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3841int argc;
3842char **argv;
3843int
3844main ()
3845{
3846return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3847  ;
3848  return 0;
3849}
3850_ACEOF
3851for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3852	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3853do
3854  CC="$ac_save_CC $ac_arg"
3855  if ac_fn_c_try_compile "$LINENO"; then :
3856  ac_cv_prog_cc_c89=$ac_arg
3857fi
3858rm -f core conftest.err conftest.$ac_objext
3859  test "x$ac_cv_prog_cc_c89" != "xno" && break
3860done
3861rm -f conftest.$ac_ext
3862CC=$ac_save_CC
3863
3864fi
3865# AC_CACHE_VAL
3866case "x$ac_cv_prog_cc_c89" in
3867  x)
3868    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3869$as_echo "none needed" >&6; } ;;
3870  xno)
3871    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3872$as_echo "unsupported" >&6; } ;;
3873  *)
3874    CC="$CC $ac_cv_prog_cc_c89"
3875    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3876$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3877esac
3878if test "x$ac_cv_prog_cc_c89" != xno; then :
3879
3880fi
3881
3882ac_ext=c
3883ac_cpp='$CPP $CPPFLAGS'
3884ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3885ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3886ac_compiler_gnu=$ac_cv_c_compiler_gnu
3887
3888
3889# add --enable-debug arg
3890# Check whether --enable-debug was given.
3891if test "${enable_debug+set}" = set; then :
3892  enableval=$enable_debug;
3893fi
3894
3895if test "$enable_debug" = "yes"; then :
3896
3897	# add the DEBUG pre-processor define
3898
3899$as_echo "#define DEBUG 1" >>confdefs.h
3900
3901	# gcc/gdb debug options
3902	if test "$GCC" = "yes"; then :
3903
3904		DEBUG_CFLAGS="-ggdb -O0"
3905
3906else
3907
3908
3909	# default to -g
3910	if test "$ac_cv_prog_cc_g" = "yes"; then :
3911
3912		DEBUG_CFLAGS="-g"
3913
3914else
3915
3916		DEBUG_CFLAGS=""
3917
3918fi
3919
3920
3921fi
3922
3923else
3924
3925	# what AC_PROG_CC would have done if CFLAGS were not set
3926	if $USE_DEFAULT_CFLAGS; then :
3927
3928
3929	# default to -g
3930	if test "$ac_cv_prog_cc_g" = "yes"; then :
3931
3932		DEBUG_CFLAGS="-g"
3933
3934else
3935
3936		DEBUG_CFLAGS=""
3937
3938fi
3939
3940		if test "$GCC" = "yes"; then :
3941
3942			DEBUG_CFLAGS="$DEBUG_CFLAGS -O2"
3943
3944fi
3945
3946fi
3947
3948fi
3949DEBUG_CFLAGS=$DEBUG_CFLAGS
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
3961	if test -n "$ac_tool_prefix"; then
3962  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3963set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3965$as_echo_n "checking for $ac_word... " >&6; }
3966if ${ac_cv_path_PKG_CONFIG+:} false; then :
3967  $as_echo_n "(cached) " >&6
3968else
3969  case $PKG_CONFIG in
3970  [\\/]* | ?:[\\/]*)
3971  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3972  ;;
3973  *)
3974  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3975for as_dir in $PATH
3976do
3977  IFS=$as_save_IFS
3978  test -z "$as_dir" && as_dir=.
3979    for ac_exec_ext in '' $ac_executable_extensions; do
3980  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3981    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
3982    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3983    break 2
3984  fi
3985done
3986  done
3987IFS=$as_save_IFS
3988
3989  ;;
3990esac
3991fi
3992PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3993if test -n "$PKG_CONFIG"; then
3994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
3995$as_echo "$PKG_CONFIG" >&6; }
3996else
3997  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3998$as_echo "no" >&6; }
3999fi
4000
4001
4002fi
4003if test -z "$ac_cv_path_PKG_CONFIG"; then
4004  ac_pt_PKG_CONFIG=$PKG_CONFIG
4005  # Extract the first word of "pkg-config", so it can be a program name with args.
4006set dummy pkg-config; ac_word=$2
4007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4008$as_echo_n "checking for $ac_word... " >&6; }
4009if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
4010  $as_echo_n "(cached) " >&6
4011else
4012  case $ac_pt_PKG_CONFIG in
4013  [\\/]* | ?:[\\/]*)
4014  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
4015  ;;
4016  *)
4017  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4018for as_dir in $PATH
4019do
4020  IFS=$as_save_IFS
4021  test -z "$as_dir" && as_dir=.
4022    for ac_exec_ext in '' $ac_executable_extensions; do
4023  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4024    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
4025    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4026    break 2
4027  fi
4028done
4029  done
4030IFS=$as_save_IFS
4031
4032  ;;
4033esac
4034fi
4035ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
4036if test -n "$ac_pt_PKG_CONFIG"; then
4037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
4038$as_echo "$ac_pt_PKG_CONFIG" >&6; }
4039else
4040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4041$as_echo "no" >&6; }
4042fi
4043
4044  if test "x$ac_pt_PKG_CONFIG" = x; then
4045    PKG_CONFIG=""
4046  else
4047    case $cross_compiling:$ac_tool_warned in
4048yes:)
4049{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4050$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4051ac_tool_warned=yes ;;
4052esac
4053    PKG_CONFIG=$ac_pt_PKG_CONFIG
4054  fi
4055else
4056  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
4057fi
4058
4059fi
4060if test -n "$PKG_CONFIG"; then
4061	_pkg_min_version=0.9.0
4062	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
4063$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
4064	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
4065		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4066$as_echo "yes" >&6; }
4067	else
4068		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4069$as_echo "no" >&6; }
4070		PKG_CONFIG=""
4071	fi
4072fi
4073
4074
4075
4076
4077# Check whether --with-ncurses was given.
4078if test "${with_ncurses+set}" = set; then :
4079  withval=$with_ncurses;
4080else
4081  with_ncurses=check
4082fi
4083
4084
4085# Check whether --with-ncursesw was given.
4086if test "${with_ncursesw+set}" = set; then :
4087  withval=$with_ncursesw;
4088else
4089  with_ncursesw=check
4090fi
4091
4092
4093    ax_saved_LIBS=$LIBS
4094    ax_saved_CPPFLAGS=$CPPFLAGS
4095
4096    if test "x$with_ncurses" = xyes || test "x$with_ncursesw" = xyes; then :
4097  ax_with_plaincurses=no
4098else
4099  ax_with_plaincurses=check
4100fi
4101
4102    ax_cv_curses_which=no
4103
4104    # Test for NcursesW
4105    if test "x$CURSES_LIBS" = x && test "x$with_ncursesw" != xno; then :
4106
4107
4108    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ncursesw via pkg-config" >&5
4109$as_echo_n "checking for ncursesw via pkg-config... " >&6; }
4110
4111
4112
4113    if test -n "$_ax_cv_ncursesw_libs"; then
4114    pkg_cv__ax_cv_ncursesw_libs="$_ax_cv_ncursesw_libs"
4115 elif test -n "$PKG_CONFIG"; then
4116    if test -n "$PKG_CONFIG" && \
4117    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ncursesw\""; } >&5
4118  ($PKG_CONFIG --exists --print-errors "ncursesw") 2>&5
4119  ac_status=$?
4120  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4121  test $ac_status = 0; }; then
4122  pkg_cv__ax_cv_ncursesw_libs=`$PKG_CONFIG --libs "ncursesw" 2>/dev/null`
4123		      test "x$?" != "x0" && pkg_failed=yes
4124else
4125  pkg_failed=yes
4126fi
4127 else
4128    pkg_failed=untried
4129fi
4130    if test -n "$_ax_cv_ncursesw_cppflags"; then
4131    pkg_cv__ax_cv_ncursesw_cppflags="$_ax_cv_ncursesw_cppflags"
4132 elif test -n "$PKG_CONFIG"; then
4133    if test -n "$PKG_CONFIG" && \
4134    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ncursesw\""; } >&5
4135  ($PKG_CONFIG --exists --print-errors "ncursesw") 2>&5
4136  ac_status=$?
4137  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4138  test $ac_status = 0; }; then
4139  pkg_cv__ax_cv_ncursesw_cppflags=`$PKG_CONFIG --cflags "ncursesw" 2>/dev/null`
4140		      test "x$?" != "x0" && pkg_failed=yes
4141else
4142  pkg_failed=yes
4143fi
4144 else
4145    pkg_failed=untried
4146fi
4147
4148    if test "x$pkg_failed" = "xyes" || test "x$pkg_failed" = "xuntried"; then :
4149
4150        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4151$as_echo "no" >&6; }
4152        # No suitable .pc file found, have to find flags via fallback
4153        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ncursesw via fallback" >&5
4154$as_echo_n "checking for ncursesw via fallback... " >&6; }
4155if ${ax_cv_ncursesw+:} false; then :
4156  $as_echo_n "(cached) " >&6
4157else
4158
4159            $as_echo
4160            pkg_cv__ax_cv_ncursesw_libs="-lncursesw"
4161            pkg_cv__ax_cv_ncursesw_cppflags="-D_GNU_SOURCE $CURSES_CFLAGS"
4162            LIBS="$ax_saved_LIBS $pkg_cv__ax_cv_ncursesw_libs"
4163            CPPFLAGS="$ax_saved_CPPFLAGS $pkg_cv__ax_cv_ncursesw_cppflags"
4164
4165            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for initscr() with $pkg_cv__ax_cv_ncursesw_libs" >&5
4166$as_echo_n "checking for initscr() with $pkg_cv__ax_cv_ncursesw_libs... " >&6; }
4167            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4168/* end confdefs.h.  */
4169
4170/* Override any GCC internal prototype to avoid an error.
4171   Use char because int might match the return type of a GCC
4172   builtin and then its argument prototype would still apply.  */
4173#ifdef __cplusplus
4174extern "C"
4175#endif
4176char initscr ();
4177int
4178main ()
4179{
4180return initscr ();
4181  ;
4182  return 0;
4183}
4184_ACEOF
4185if ac_fn_c_try_link "$LINENO"; then :
4186
4187                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4188$as_echo "yes" >&6; }
4189                    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nodelay() with $pkg_cv__ax_cv_ncursesw_libs" >&5
4190$as_echo_n "checking for nodelay() with $pkg_cv__ax_cv_ncursesw_libs... " >&6; }
4191                    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4192/* end confdefs.h.  */
4193
4194/* Override any GCC internal prototype to avoid an error.
4195   Use char because int might match the return type of a GCC
4196   builtin and then its argument prototype would still apply.  */
4197#ifdef __cplusplus
4198extern "C"
4199#endif
4200char nodelay ();
4201int
4202main ()
4203{
4204return nodelay ();
4205  ;
4206  return 0;
4207}
4208_ACEOF
4209if ac_fn_c_try_link "$LINENO"; then :
4210
4211                        ax_cv_ncursesw=yes
4212
4213else
4214
4215                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4216$as_echo "no" >&6; }
4217                        pkg_cv__ax_cv_ncursesw_libs="$pkg_cv__ax_cv_ncursesw_libs -ltinfow"
4218                        LIBS="$ax_saved_LIBS $pkg_cv__ax_cv_ncursesw_libs"
4219
4220                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nodelay() with $pkg_cv__ax_cv_ncursesw_libs" >&5
4221$as_echo_n "checking for nodelay() with $pkg_cv__ax_cv_ncursesw_libs... " >&6; }
4222                        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4223/* end confdefs.h.  */
4224
4225/* Override any GCC internal prototype to avoid an error.
4226   Use char because int might match the return type of a GCC
4227   builtin and then its argument prototype would still apply.  */
4228#ifdef __cplusplus
4229extern "C"
4230#endif
4231char nodelay ();
4232int
4233main ()
4234{
4235return nodelay ();
4236  ;
4237  return 0;
4238}
4239_ACEOF
4240if ac_fn_c_try_link "$LINENO"; then :
4241
4242                            ax_cv_ncursesw=yes
4243
4244else
4245
4246                            ax_cv_ncursesw=no
4247
4248fi
4249rm -f core conftest.err conftest.$ac_objext \
4250    conftest$ac_exeext conftest.$ac_ext
4251
4252fi
4253rm -f core conftest.err conftest.$ac_objext \
4254    conftest$ac_exeext conftest.$ac_ext
4255
4256else
4257
4258                    ax_cv_ncursesw=no
4259
4260fi
4261rm -f core conftest.err conftest.$ac_objext \
4262    conftest$ac_exeext conftest.$ac_ext
4263
4264fi
4265{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_ncursesw" >&5
4266$as_echo "$ax_cv_ncursesw" >&6; }
4267
4268else
4269
4270        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4271$as_echo "yes" >&6; }
4272        # Found .pc file, using its information
4273        LIBS="$ax_saved_LIBS $pkg_cv__ax_cv_ncursesw_libs"
4274        CPPFLAGS="$ax_saved_CPPFLAGS $pkg_cv__ax_cv_ncursesw_cppflags"
4275        ax_cv_ncursesw=yes
4276
4277fi
4278
4279
4280        if test "x$ax_cv_ncursesw" = xno && test "x$with_ncursesw" = xyes; then :
4281
4282            as_fn_error $? "--with-ncursesw specified but could not find NcursesW library" "$LINENO" 5
4283
4284fi
4285
4286        if test "x$ax_cv_ncursesw" = xyes; then :
4287
4288            ax_cv_curses=yes
4289            ax_cv_curses_which=ncursesw
4290            CURSES_LIBS="$pkg_cv__ax_cv_ncursesw_libs"
4291            CURSES_CFLAGS="$pkg_cv__ax_cv_ncursesw_cppflags"
4292
4293$as_echo "#define HAVE_NCURSESW 1" >>confdefs.h
4294
4295
4296$as_echo "#define HAVE_CURSES 1" >>confdefs.h
4297
4298
4299            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working ncursesw/curses.h" >&5
4300$as_echo_n "checking for working ncursesw/curses.h... " >&6; }
4301if ${ax_cv_header_ncursesw_curses_h+:} false; then :
4302  $as_echo_n "(cached) " >&6
4303else
4304
4305                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4306/* end confdefs.h.  */
4307
4308                        #define _XOPEN_SOURCE_EXTENDED 1
4309                        #include <ncursesw/curses.h>
4310
4311int
4312main ()
4313{
4314
4315                        chtype a = A_BOLD;
4316                        int b = KEY_LEFT;
4317                        chtype c = COLOR_PAIR(1) & A_COLOR;
4318                        attr_t d = WA_NORMAL;
4319                        cchar_t e;
4320                        wint_t f;
4321                        int g = getattrs(stdscr);
4322                        int h = getcurx(stdscr) + getmaxx(stdscr);
4323                        initscr();
4324                        init_pair(1, COLOR_WHITE, COLOR_RED);
4325                        wattr_set(stdscr, d, 0, NULL);
4326                        wget_wch(stdscr, &f);
4327
4328  ;
4329  return 0;
4330}
4331_ACEOF
4332if ac_fn_c_try_link "$LINENO"; then :
4333  ax_cv_header_ncursesw_curses_h=yes
4334else
4335  ax_cv_header_ncursesw_curses_h=no
4336fi
4337rm -f core conftest.err conftest.$ac_objext \
4338    conftest$ac_exeext conftest.$ac_ext
4339
4340fi
4341{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_header_ncursesw_curses_h" >&5
4342$as_echo "$ax_cv_header_ncursesw_curses_h" >&6; }
4343            if test "x$ax_cv_header_ncursesw_curses_h" = xyes; then :
4344
4345                ax_cv_curses_enhanced=yes
4346                ax_cv_curses_color=yes
4347                ax_cv_curses_obsolete=yes
4348
4349$as_echo "#define HAVE_CURSES_ENHANCED 1" >>confdefs.h
4350
4351
4352$as_echo "#define HAVE_CURSES_COLOR 1" >>confdefs.h
4353
4354
4355$as_echo "#define HAVE_CURSES_OBSOLETE 1" >>confdefs.h
4356
4357
4358$as_echo "#define HAVE_NCURSESW_CURSES_H 1" >>confdefs.h
4359
4360
4361fi
4362
4363            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working ncursesw.h" >&5
4364$as_echo_n "checking for working ncursesw.h... " >&6; }
4365if ${ax_cv_header_ncursesw_h+:} false; then :
4366  $as_echo_n "(cached) " >&6
4367else
4368
4369                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4370/* end confdefs.h.  */
4371
4372                        #define _XOPEN_SOURCE_EXTENDED 1
4373                        #include <ncursesw.h>
4374
4375int
4376main ()
4377{
4378
4379                        chtype a = A_BOLD;
4380                        int b = KEY_LEFT;
4381                        chtype c = COLOR_PAIR(1) & A_COLOR;
4382                        attr_t d = WA_NORMAL;
4383                        cchar_t e;
4384                        wint_t f;
4385                        int g = getattrs(stdscr);
4386                        int h = getcurx(stdscr) + getmaxx(stdscr);
4387                        initscr();
4388                        init_pair(1, COLOR_WHITE, COLOR_RED);
4389                        wattr_set(stdscr, d, 0, NULL);
4390                        wget_wch(stdscr, &f);
4391
4392  ;
4393  return 0;
4394}
4395_ACEOF
4396if ac_fn_c_try_link "$LINENO"; then :
4397  ax_cv_header_ncursesw_h=yes
4398else
4399  ax_cv_header_ncursesw_h=no
4400fi
4401rm -f core conftest.err conftest.$ac_objext \
4402    conftest$ac_exeext conftest.$ac_ext
4403
4404fi
4405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_header_ncursesw_h" >&5
4406$as_echo "$ax_cv_header_ncursesw_h" >&6; }
4407            if test "x$ax_cv_header_ncursesw_h" = xyes; then :
4408
4409                ax_cv_curses_enhanced=yes
4410                ax_cv_curses_color=yes
4411                ax_cv_curses_obsolete=yes
4412
4413$as_echo "#define HAVE_CURSES_ENHANCED 1" >>confdefs.h
4414
4415
4416$as_echo "#define HAVE_CURSES_COLOR 1" >>confdefs.h
4417
4418
4419$as_echo "#define HAVE_CURSES_OBSOLETE 1" >>confdefs.h
4420
4421
4422$as_echo "#define HAVE_NCURSESW_H 1" >>confdefs.h
4423
4424
4425fi
4426
4427            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working ncurses.h" >&5
4428$as_echo_n "checking for working ncurses.h... " >&6; }
4429if ${ax_cv_header_ncurses_h_with_ncursesw+:} false; then :
4430  $as_echo_n "(cached) " >&6
4431else
4432
4433                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4434/* end confdefs.h.  */
4435
4436                        #define _XOPEN_SOURCE_EXTENDED 1
4437                        #include <ncurses.h>
4438
4439int
4440main ()
4441{
4442
4443                        chtype a = A_BOLD;
4444                        int b = KEY_LEFT;
4445                        chtype c = COLOR_PAIR(1) & A_COLOR;
4446                        attr_t d = WA_NORMAL;
4447                        cchar_t e;
4448                        wint_t f;
4449                        int g = getattrs(stdscr);
4450                        int h = getcurx(stdscr) + getmaxx(stdscr);
4451                        initscr();
4452                        init_pair(1, COLOR_WHITE, COLOR_RED);
4453                        wattr_set(stdscr, d, 0, NULL);
4454                        wget_wch(stdscr, &f);
4455
4456  ;
4457  return 0;
4458}
4459_ACEOF
4460if ac_fn_c_try_link "$LINENO"; then :
4461  ax_cv_header_ncurses_h_with_ncursesw=yes
4462else
4463  ax_cv_header_ncurses_h_with_ncursesw=no
4464fi
4465rm -f core conftest.err conftest.$ac_objext \
4466    conftest$ac_exeext conftest.$ac_ext
4467
4468fi
4469{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_header_ncurses_h_with_ncursesw" >&5
4470$as_echo "$ax_cv_header_ncurses_h_with_ncursesw" >&6; }
4471            if test "x$ax_cv_header_ncurses_h_with_ncursesw" = xyes; then :
4472
4473                ax_cv_curses_enhanced=yes
4474                ax_cv_curses_color=yes
4475                ax_cv_curses_obsolete=yes
4476
4477$as_echo "#define HAVE_CURSES_ENHANCED 1" >>confdefs.h
4478
4479
4480$as_echo "#define HAVE_CURSES_COLOR 1" >>confdefs.h
4481
4482
4483$as_echo "#define HAVE_CURSES_OBSOLETE 1" >>confdefs.h
4484
4485
4486$as_echo "#define HAVE_NCURSES_H 1" >>confdefs.h
4487
4488
4489fi
4490
4491            if test "x$ax_cv_header_ncursesw_curses_h" = xno && test "x$ax_cv_header_ncursesw_h" = xno && test "x$ax_cv_header_ncurses_h_with_ncursesw" = xno; then :
4492
4493                { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not find a working ncursesw/curses.h, ncursesw.h or ncurses.h" >&5
4494$as_echo "$as_me: WARNING: could not find a working ncursesw/curses.h, ncursesw.h or ncurses.h" >&2;}
4495
4496fi
4497
4498fi
4499
4500fi
4501    unset pkg_cv__ax_cv_ncursesw_libs
4502    unset pkg_cv__ax_cv_ncursesw_cppflags
4503
4504    # Test for Ncurses
4505    if test "x$CURSES_LIBS" = x && test "x$with_ncurses" != xno && test "x$ax_cv_curses_which" = xno; then :
4506
4507
4508    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ncurses via pkg-config" >&5
4509$as_echo_n "checking for ncurses via pkg-config... " >&6; }
4510
4511
4512
4513    if test -n "$_ax_cv_ncurses_libs"; then
4514    pkg_cv__ax_cv_ncurses_libs="$_ax_cv_ncurses_libs"
4515 elif test -n "$PKG_CONFIG"; then
4516    if test -n "$PKG_CONFIG" && \
4517    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ncurses\""; } >&5
4518  ($PKG_CONFIG --exists --print-errors "ncurses") 2>&5
4519  ac_status=$?
4520  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4521  test $ac_status = 0; }; then
4522  pkg_cv__ax_cv_ncurses_libs=`$PKG_CONFIG --libs "ncurses" 2>/dev/null`
4523		      test "x$?" != "x0" && pkg_failed=yes
4524else
4525  pkg_failed=yes
4526fi
4527 else
4528    pkg_failed=untried
4529fi
4530    if test -n "$_ax_cv_ncurses_cppflags"; then
4531    pkg_cv__ax_cv_ncurses_cppflags="$_ax_cv_ncurses_cppflags"
4532 elif test -n "$PKG_CONFIG"; then
4533    if test -n "$PKG_CONFIG" && \
4534    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ncurses\""; } >&5
4535  ($PKG_CONFIG --exists --print-errors "ncurses") 2>&5
4536  ac_status=$?
4537  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4538  test $ac_status = 0; }; then
4539  pkg_cv__ax_cv_ncurses_cppflags=`$PKG_CONFIG --cflags "ncurses" 2>/dev/null`
4540		      test "x$?" != "x0" && pkg_failed=yes
4541else
4542  pkg_failed=yes
4543fi
4544 else
4545    pkg_failed=untried
4546fi
4547
4548    if test "x$pkg_failed" = "xyes" || test "x$pkg_failed" = "xuntried"; then :
4549
4550        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4551$as_echo "no" >&6; }
4552        # No suitable .pc file found, have to find flags via fallback
4553        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ncurses via fallback" >&5
4554$as_echo_n "checking for ncurses via fallback... " >&6; }
4555if ${ax_cv_ncurses+:} false; then :
4556  $as_echo_n "(cached) " >&6
4557else
4558
4559            $as_echo
4560            pkg_cv__ax_cv_ncurses_libs="-lncurses"
4561            pkg_cv__ax_cv_ncurses_cppflags="-D_GNU_SOURCE $CURSES_CFLAGS"
4562            LIBS="$ax_saved_LIBS $pkg_cv__ax_cv_ncurses_libs"
4563            CPPFLAGS="$ax_saved_CPPFLAGS $pkg_cv__ax_cv_ncurses_cppflags"
4564
4565            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for initscr() with $pkg_cv__ax_cv_ncurses_libs" >&5
4566$as_echo_n "checking for initscr() with $pkg_cv__ax_cv_ncurses_libs... " >&6; }
4567            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4568/* end confdefs.h.  */
4569
4570/* Override any GCC internal prototype to avoid an error.
4571   Use char because int might match the return type of a GCC
4572   builtin and then its argument prototype would still apply.  */
4573#ifdef __cplusplus
4574extern "C"
4575#endif
4576char initscr ();
4577int
4578main ()
4579{
4580return initscr ();
4581  ;
4582  return 0;
4583}
4584_ACEOF
4585if ac_fn_c_try_link "$LINENO"; then :
4586
4587                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4588$as_echo "yes" >&6; }
4589                    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nodelay() with $pkg_cv__ax_cv_ncurses_libs" >&5
4590$as_echo_n "checking for nodelay() with $pkg_cv__ax_cv_ncurses_libs... " >&6; }
4591                    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4592/* end confdefs.h.  */
4593
4594/* Override any GCC internal prototype to avoid an error.
4595   Use char because int might match the return type of a GCC
4596   builtin and then its argument prototype would still apply.  */
4597#ifdef __cplusplus
4598extern "C"
4599#endif
4600char nodelay ();
4601int
4602main ()
4603{
4604return nodelay ();
4605  ;
4606  return 0;
4607}
4608_ACEOF
4609if ac_fn_c_try_link "$LINENO"; then :
4610
4611                        ax_cv_ncurses=yes
4612
4613else
4614
4615                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4616$as_echo "no" >&6; }
4617                        pkg_cv__ax_cv_ncurses_libs="$pkg_cv__ax_cv_ncurses_libs -ltinfo"
4618
4619                        LIBS="$ax_saved_LIBS $pkg_cv__ax_cv_ncurses_libs"
4620
4621                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nodelay() with $pkg_cv__ax_cv_ncurses_libs" >&5
4622$as_echo_n "checking for nodelay() with $pkg_cv__ax_cv_ncurses_libs... " >&6; }
4623                        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4624/* end confdefs.h.  */
4625
4626/* Override any GCC internal prototype to avoid an error.
4627   Use char because int might match the return type of a GCC
4628   builtin and then its argument prototype would still apply.  */
4629#ifdef __cplusplus
4630extern "C"
4631#endif
4632char nodelay ();
4633int
4634main ()
4635{
4636return nodelay ();
4637  ;
4638  return 0;
4639}
4640_ACEOF
4641if ac_fn_c_try_link "$LINENO"; then :
4642
4643                            ax_cv_ncurses=yes
4644
4645else
4646
4647                            ax_cv_ncurses=no
4648
4649fi
4650rm -f core conftest.err conftest.$ac_objext \
4651    conftest$ac_exeext conftest.$ac_ext
4652
4653fi
4654rm -f core conftest.err conftest.$ac_objext \
4655    conftest$ac_exeext conftest.$ac_ext
4656
4657else
4658
4659                    ax_cv_ncurses=no
4660
4661fi
4662rm -f core conftest.err conftest.$ac_objext \
4663    conftest$ac_exeext conftest.$ac_ext
4664
4665fi
4666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_ncurses" >&5
4667$as_echo "$ax_cv_ncurses" >&6; }
4668
4669else
4670
4671        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4672$as_echo "yes" >&6; }
4673        # Found .pc file, using its information
4674        LIBS="$ax_saved_LIBS $pkg_cv__ax_cv_ncurses_libs"
4675        CPPFLAGS="$ax_saved_CPPFLAGS $pkg_cv__ax_cv_ncurses_cppflags"
4676        ax_cv_ncurses=yes
4677
4678fi
4679
4680
4681        if test "x$ax_cv_ncurses" = xno && test "x$with_ncurses" = xyes; then :
4682
4683            as_fn_error $? "--with-ncurses specified but could not find Ncurses library" "$LINENO" 5
4684
4685fi
4686
4687        if test "x$ax_cv_ncurses" = xyes; then :
4688
4689            ax_cv_curses=yes
4690            ax_cv_curses_which=ncurses
4691            CURSES_LIBS="$pkg_cv__ax_cv_ncurses_libs"
4692            CURSES_CFLAGS="$pkg_cv__ax_cv_ncurses_cppflags"
4693
4694$as_echo "#define HAVE_NCURSES 1" >>confdefs.h
4695
4696
4697$as_echo "#define HAVE_CURSES 1" >>confdefs.h
4698
4699
4700            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working ncurses/curses.h" >&5
4701$as_echo_n "checking for working ncurses/curses.h... " >&6; }
4702if ${ax_cv_header_ncurses_curses_h+:} false; then :
4703  $as_echo_n "(cached) " >&6
4704else
4705
4706                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4707/* end confdefs.h.  */
4708
4709                        #include <ncurses/curses.h>
4710
4711int
4712main ()
4713{
4714
4715                        chtype a = A_BOLD;
4716                        int b = KEY_LEFT;
4717                        chtype c = COLOR_PAIR(1) & A_COLOR;
4718                        int g = getattrs(stdscr);
4719                        int h = getcurx(stdscr) + getmaxx(stdscr);
4720                        initscr();
4721                        init_pair(1, COLOR_WHITE, COLOR_RED);
4722
4723  ;
4724  return 0;
4725}
4726_ACEOF
4727if ac_fn_c_try_link "$LINENO"; then :
4728  ax_cv_header_ncurses_curses_h=yes
4729else
4730  ax_cv_header_ncurses_curses_h=no
4731fi
4732rm -f core conftest.err conftest.$ac_objext \
4733    conftest$ac_exeext conftest.$ac_ext
4734
4735fi
4736{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_header_ncurses_curses_h" >&5
4737$as_echo "$ax_cv_header_ncurses_curses_h" >&6; }
4738            if test "x$ax_cv_header_ncurses_curses_h" = xyes; then :
4739
4740                ax_cv_curses_color=yes
4741                ax_cv_curses_obsolete=yes
4742
4743$as_echo "#define HAVE_CURSES_COLOR 1" >>confdefs.h
4744
4745
4746$as_echo "#define HAVE_CURSES_OBSOLETE 1" >>confdefs.h
4747
4748
4749$as_echo "#define HAVE_NCURSES_CURSES_H 1" >>confdefs.h
4750
4751
4752fi
4753
4754            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working ncurses.h" >&5
4755$as_echo_n "checking for working ncurses.h... " >&6; }
4756if ${ax_cv_header_ncurses_h+:} false; then :
4757  $as_echo_n "(cached) " >&6
4758else
4759
4760                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4761/* end confdefs.h.  */
4762
4763                        #include <ncurses.h>
4764
4765int
4766main ()
4767{
4768
4769                        chtype a = A_BOLD;
4770                        int b = KEY_LEFT;
4771                        chtype c = COLOR_PAIR(1) & A_COLOR;
4772                        int g = getattrs(stdscr);
4773                        int h = getcurx(stdscr) + getmaxx(stdscr);
4774                        initscr();
4775                        init_pair(1, COLOR_WHITE, COLOR_RED);
4776
4777  ;
4778  return 0;
4779}
4780_ACEOF
4781if ac_fn_c_try_link "$LINENO"; then :
4782  ax_cv_header_ncurses_h=yes
4783else
4784  ax_cv_header_ncurses_h=no
4785fi
4786rm -f core conftest.err conftest.$ac_objext \
4787    conftest$ac_exeext conftest.$ac_ext
4788
4789fi
4790{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_header_ncurses_h" >&5
4791$as_echo "$ax_cv_header_ncurses_h" >&6; }
4792            if test "x$ax_cv_header_ncurses_h" = xyes; then :
4793
4794                ax_cv_curses_color=yes
4795                ax_cv_curses_obsolete=yes
4796
4797$as_echo "#define HAVE_CURSES_COLOR 1" >>confdefs.h
4798
4799
4800$as_echo "#define HAVE_CURSES_OBSOLETE 1" >>confdefs.h
4801
4802
4803$as_echo "#define HAVE_NCURSES_H 1" >>confdefs.h
4804
4805
4806fi
4807
4808            if test "x$ax_cv_header_ncurses_curses_h" = xno && test "x$ax_cv_header_ncurses_h" = xno; then :
4809
4810                { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not find a working ncurses/curses.h or ncurses.h" >&5
4811$as_echo "$as_me: WARNING: could not find a working ncurses/curses.h or ncurses.h" >&2;}
4812
4813fi
4814
4815fi
4816
4817fi
4818    unset pkg_cv__ax_cv_ncurses_libs
4819    unset pkg_cv__ax_cv_ncurses_cppflags
4820
4821    # Test for plain Curses (or if CURSES_LIBS was set by user)
4822    if test "x$with_plaincurses" != xno && test "x$ax_cv_curses_which" = xno; then :
4823
4824        if test "x$CURSES_LIBS" != x; then :
4825
4826            LIBS="$ax_saved_LIBS $CURSES_LIBS"
4827
4828else
4829
4830            LIBS="$ax_saved_LIBS -lcurses"
4831
4832fi
4833
4834        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Curses library" >&5
4835$as_echo_n "checking for Curses library... " >&6; }
4836if ${ax_cv_plaincurses+:} false; then :
4837  $as_echo_n "(cached) " >&6
4838else
4839
4840            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4841/* end confdefs.h.  */
4842
4843/* Override any GCC internal prototype to avoid an error.
4844   Use char because int might match the return type of a GCC
4845   builtin and then its argument prototype would still apply.  */
4846#ifdef __cplusplus
4847extern "C"
4848#endif
4849char initscr ();
4850int
4851main ()
4852{
4853return initscr ();
4854  ;
4855  return 0;
4856}
4857_ACEOF
4858if ac_fn_c_try_link "$LINENO"; then :
4859  ax_cv_plaincurses=yes
4860else
4861  ax_cv_plaincurses=no
4862fi
4863rm -f core conftest.err conftest.$ac_objext \
4864    conftest$ac_exeext conftest.$ac_ext
4865
4866fi
4867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_plaincurses" >&5
4868$as_echo "$ax_cv_plaincurses" >&6; }
4869
4870        if test "x$ax_cv_plaincurses" = xyes; then :
4871
4872            ax_cv_curses=yes
4873            ax_cv_curses_which=plaincurses
4874            if test "x$CURSES_LIBS" = x; then :
4875
4876                CURSES_LIBS="-lcurses"
4877
4878fi
4879
4880$as_echo "#define HAVE_CURSES 1" >>confdefs.h
4881
4882
4883            # Check for base conformance (and header file)
4884
4885            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working curses.h" >&5
4886$as_echo_n "checking for working curses.h... " >&6; }
4887if ${ax_cv_header_curses_h+:} false; then :
4888  $as_echo_n "(cached) " >&6
4889else
4890
4891                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4892/* end confdefs.h.  */
4893
4894                        #include <curses.h>
4895
4896int
4897main ()
4898{
4899
4900                        chtype a = A_BOLD;
4901                        int b = KEY_LEFT;
4902                        initscr();
4903
4904  ;
4905  return 0;
4906}
4907_ACEOF
4908if ac_fn_c_try_link "$LINENO"; then :
4909  ax_cv_header_curses_h=yes
4910else
4911  ax_cv_header_curses_h=no
4912fi
4913rm -f core conftest.err conftest.$ac_objext \
4914    conftest$ac_exeext conftest.$ac_ext
4915
4916fi
4917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_header_curses_h" >&5
4918$as_echo "$ax_cv_header_curses_h" >&6; }
4919            if test "x$ax_cv_header_curses_h" = xyes; then :
4920
4921
4922$as_echo "#define HAVE_CURSES_H 1" >>confdefs.h
4923
4924
4925                # Check for X/Open Enhanced conformance
4926
4927                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X/Open Enhanced Curses conformance" >&5
4928$as_echo_n "checking for X/Open Enhanced Curses conformance... " >&6; }
4929if ${ax_cv_plaincurses_enhanced+:} false; then :
4930  $as_echo_n "(cached) " >&6
4931else
4932
4933                    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4934/* end confdefs.h.  */
4935
4936                            #define _XOPEN_SOURCE_EXTENDED 1
4937                            #include <curses.h>
4938                            #ifndef _XOPEN_CURSES
4939                            #error "this Curses library is not enhanced"
4940                            "this Curses library is not enhanced"
4941                            #endif
4942
4943int
4944main ()
4945{
4946
4947                            chtype a = A_BOLD;
4948                            int b = KEY_LEFT;
4949                            chtype c = COLOR_PAIR(1) & A_COLOR;
4950                            attr_t d = WA_NORMAL;
4951                            cchar_t e;
4952                            wint_t f;
4953                            initscr();
4954                            init_pair(1, COLOR_WHITE, COLOR_RED);
4955                            wattr_set(stdscr, d, 0, NULL);
4956                            wget_wch(stdscr, &f);
4957
4958  ;
4959  return 0;
4960}
4961_ACEOF
4962if ac_fn_c_try_link "$LINENO"; then :
4963  ax_cv_plaincurses_enhanced=yes
4964else
4965  ax_cv_plaincurses_enhanced=no
4966fi
4967rm -f core conftest.err conftest.$ac_objext \
4968    conftest$ac_exeext conftest.$ac_ext
4969
4970fi
4971{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_plaincurses_enhanced" >&5
4972$as_echo "$ax_cv_plaincurses_enhanced" >&6; }
4973                if test "x$ax_cv_plaincurses_enhanced" = xyes; then :
4974
4975                    ax_cv_curses_enhanced=yes
4976                    ax_cv_curses_color=yes
4977
4978$as_echo "#define HAVE_CURSES_ENHANCED 1" >>confdefs.h
4979
4980
4981$as_echo "#define HAVE_CURSES_COLOR 1" >>confdefs.h
4982
4983
4984fi
4985
4986                # Check for color functions
4987
4988                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Curses color functions" >&5
4989$as_echo_n "checking for Curses color functions... " >&6; }
4990if ${ax_cv_plaincurses_color+:} false; then :
4991  $as_echo_n "(cached) " >&6
4992else
4993
4994                    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4995/* end confdefs.h.  */
4996
4997                        #define _XOPEN_SOURCE_EXTENDED 1
4998                        #include <curses.h>
4999
5000int
5001main ()
5002{
5003
5004                            chtype a = A_BOLD;
5005                            int b = KEY_LEFT;
5006                            chtype c = COLOR_PAIR(1) & A_COLOR;
5007                            initscr();
5008                            init_pair(1, COLOR_WHITE, COLOR_RED);
5009
5010  ;
5011  return 0;
5012}
5013_ACEOF
5014if ac_fn_c_try_link "$LINENO"; then :
5015  ax_cv_plaincurses_color=yes
5016else
5017  ax_cv_plaincurses_color=no
5018fi
5019rm -f core conftest.err conftest.$ac_objext \
5020    conftest$ac_exeext conftest.$ac_ext
5021
5022fi
5023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_plaincurses_color" >&5
5024$as_echo "$ax_cv_plaincurses_color" >&6; }
5025                if test "x$ax_cv_plaincurses_color" = xyes; then :
5026
5027                    ax_cv_curses_color=yes
5028
5029$as_echo "#define HAVE_CURSES_COLOR 1" >>confdefs.h
5030
5031
5032fi
5033
5034                # Check for obsolete functions
5035
5036                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for obsolete Curses functions" >&5
5037$as_echo_n "checking for obsolete Curses functions... " >&6; }
5038if ${ax_cv_plaincurses_obsolete+:} false; then :
5039  $as_echo_n "(cached) " >&6
5040else
5041
5042                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5043/* end confdefs.h.  */
5044
5045                        #include <curses.h>
5046
5047int
5048main ()
5049{
5050
5051                        chtype a = A_BOLD;
5052                        int b = KEY_LEFT;
5053                        int g = getattrs(stdscr);
5054                        int h = getcurx(stdscr) + getmaxx(stdscr);
5055                        initscr();
5056
5057  ;
5058  return 0;
5059}
5060_ACEOF
5061if ac_fn_c_try_link "$LINENO"; then :
5062  ax_cv_plaincurses_obsolete=yes
5063else
5064  ax_cv_plaincurses_obsolete=no
5065fi
5066rm -f core conftest.err conftest.$ac_objext \
5067    conftest$ac_exeext conftest.$ac_ext
5068
5069fi
5070{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_plaincurses_obsolete" >&5
5071$as_echo "$ax_cv_plaincurses_obsolete" >&6; }
5072                if test "x$ax_cv_plaincurses_obsolete" = xyes; then :
5073
5074                    ax_cv_curses_obsolete=yes
5075
5076$as_echo "#define HAVE_CURSES_OBSOLETE 1" >>confdefs.h
5077
5078
5079fi
5080
5081fi
5082
5083            if test "x$ax_cv_header_curses_h" = xno; then :
5084
5085                { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not find a working curses.h" >&5
5086$as_echo "$as_me: WARNING: could not find a working curses.h" >&2;}
5087
5088fi
5089
5090fi
5091
5092fi
5093
5094    if test "x$ax_cv_curses"          != xyes; then :
5095  ax_cv_curses=no
5096fi
5097    if test "x$ax_cv_curses_enhanced" != xyes; then :
5098  ax_cv_curses_enhanced=no
5099fi
5100    if test "x$ax_cv_curses_color"    != xyes; then :
5101  ax_cv_curses_color=no
5102fi
5103    if test "x$ax_cv_curses_obsolete" != xyes; then :
5104  ax_cv_curses_obsolete=no
5105fi
5106
5107    LIBS=$ax_saved_LIBS
5108    CPPFLAGS=$ax_saved_CPPFLAGS
5109
5110    unset ax_saved_LIBS
5111    unset ax_saved_CPPFLAGS
5112
5113
5114
5115
5116
5117
5118
5119    if test "x$PANEL_LIBS" != x; then :
5120
5121
5122
5123
5124    ax_saved_LIBS=$LIBS
5125    ax_saved_CPPFLAGS=$CPPFLAGS
5126
5127    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Curses Panel library with panel.h" >&5
5128$as_echo_n "checking for Curses Panel library with panel.h... " >&6; }
5129if ${ax_cv_header_panel_h+:} false; then :
5130  $as_echo_n "(cached) " >&6
5131else
5132
5133        LIBS="$ax_saved_LIBS $PANEL_LIBS $CURSES_LIBS"
5134        CPPFLAGS="$ax_saved_CPPFLAGS $CURSES_CFLAGS"
5135        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5136/* end confdefs.h.  */
5137
5138                #include <panel.h>
5139
5140int
5141main ()
5142{
5143
5144            WINDOW *win = newwin(0, 0, 0, 0);
5145            PANEL *pan = new_panel(win);
5146
5147  ;
5148  return 0;
5149}
5150_ACEOF
5151if ac_fn_c_try_link "$LINENO"; then :
5152  ax_cv_header_panel_h=yes
5153else
5154  ax_cv_header_panel_h=no
5155fi
5156rm -f core conftest.err conftest.$ac_objext \
5157    conftest$ac_exeext conftest.$ac_ext
5158
5159fi
5160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_header_panel_h" >&5
5161$as_echo "$ax_cv_header_panel_h" >&6; }
5162    if test "x$ax_cv_header_panel_h" = xyes; then :
5163
5164        ax_cv_panel=yes
5165
5166
5167$as_echo "#define HAVE_PANEL 1" >>confdefs.h
5168
5169
5170$as_echo "#define HAVE_PANEL_H 1" >>confdefs.h
5171
5172
5173else
5174
5175        if test "x$ax_cv_panel" = xyes; then :
5176
5177else
5178  ax_cv_panel=no
5179fi
5180
5181fi
5182
5183    LIBS=$ax_saved_LIBS
5184    CPPFLAGS=$ax_saved_CPPFLAGS
5185    unset ax_saved_LIBS
5186    unset ax_saved_CPPFLAGS
5187
5188
5189
5190else
5191
5192        if test "x$ax_cv_curses_which" = xncursesw; then :
5193
5194
5195
5196
5197    ax_saved_LIBS=$LIBS
5198    ax_saved_CPPFLAGS=$CPPFLAGS
5199
5200    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Curses Panel library with ncursesw/panel.h" >&5
5201$as_echo_n "checking for Curses Panel library with ncursesw/panel.h... " >&6; }
5202if ${ax_cv_header_ncursesw_panel_h+:} false; then :
5203  $as_echo_n "(cached) " >&6
5204else
5205
5206        LIBS="$ax_saved_LIBS -lpanelw $CURSES_LIBS"
5207        CPPFLAGS="$ax_saved_CPPFLAGS $CURSES_CFLAGS"
5208        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5209/* end confdefs.h.  */
5210
5211                #include <ncursesw/panel.h>
5212
5213int
5214main ()
5215{
5216
5217            WINDOW *win = newwin(0, 0, 0, 0);
5218            PANEL *pan = new_panel(win);
5219
5220  ;
5221  return 0;
5222}
5223_ACEOF
5224if ac_fn_c_try_link "$LINENO"; then :
5225  ax_cv_header_ncursesw_panel_h=yes
5226else
5227  ax_cv_header_ncursesw_panel_h=no
5228fi
5229rm -f core conftest.err conftest.$ac_objext \
5230    conftest$ac_exeext conftest.$ac_ext
5231
5232fi
5233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_header_ncursesw_panel_h" >&5
5234$as_echo "$ax_cv_header_ncursesw_panel_h" >&6; }
5235    if test "x$ax_cv_header_ncursesw_panel_h" = xyes; then :
5236
5237        ax_cv_panel=yes
5238        PANEL_LIBS="-lpanelw"
5239
5240$as_echo "#define HAVE_PANEL 1" >>confdefs.h
5241
5242
5243$as_echo "#define HAVE_NCURSESW_PANEL_H 1" >>confdefs.h
5244
5245
5246else
5247
5248        if test "x$ax_cv_panel" = xyes; then :
5249
5250else
5251  ax_cv_panel=no
5252fi
5253
5254fi
5255
5256    LIBS=$ax_saved_LIBS
5257    CPPFLAGS=$ax_saved_CPPFLAGS
5258    unset ax_saved_LIBS
5259    unset ax_saved_CPPFLAGS
5260
5261
5262            if test x$ax_cv_panel != "xyes"; then :
5263
5264
5265
5266
5267    ax_saved_LIBS=$LIBS
5268    ax_saved_CPPFLAGS=$CPPFLAGS
5269
5270    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Curses Panel library with panel.h" >&5
5271$as_echo_n "checking for Curses Panel library with panel.h... " >&6; }
5272if ${ax_cv_header_panel_h+:} false; then :
5273  $as_echo_n "(cached) " >&6
5274else
5275
5276        LIBS="$ax_saved_LIBS -lpanel $CURSES_LIBS"
5277        CPPFLAGS="$ax_saved_CPPFLAGS $CURSES_CFLAGS"
5278        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5279/* end confdefs.h.  */
5280
5281                #include <panel.h>
5282
5283int
5284main ()
5285{
5286
5287            WINDOW *win = newwin(0, 0, 0, 0);
5288            PANEL *pan = new_panel(win);
5289
5290  ;
5291  return 0;
5292}
5293_ACEOF
5294if ac_fn_c_try_link "$LINENO"; then :
5295  ax_cv_header_panel_h=yes
5296else
5297  ax_cv_header_panel_h=no
5298fi
5299rm -f core conftest.err conftest.$ac_objext \
5300    conftest$ac_exeext conftest.$ac_ext
5301
5302fi
5303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_header_panel_h" >&5
5304$as_echo "$ax_cv_header_panel_h" >&6; }
5305    if test "x$ax_cv_header_panel_h" = xyes; then :
5306
5307        ax_cv_panel=yes
5308        PANEL_LIBS="-lpanel"
5309
5310$as_echo "#define HAVE_PANEL 1" >>confdefs.h
5311
5312
5313$as_echo "#define HAVE_PANEL_H 1" >>confdefs.h
5314
5315
5316else
5317
5318        if test "x$ax_cv_panel" = xyes; then :
5319
5320else
5321  ax_cv_panel=no
5322fi
5323
5324fi
5325
5326    LIBS=$ax_saved_LIBS
5327    CPPFLAGS=$ax_saved_CPPFLAGS
5328    unset ax_saved_LIBS
5329    unset ax_saved_CPPFLAGS
5330
5331
5332
5333fi
5334
5335elif test "x$ax_cv_curses_which" = xncurses; then :
5336
5337
5338
5339
5340    ax_saved_LIBS=$LIBS
5341    ax_saved_CPPFLAGS=$CPPFLAGS
5342
5343    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Curses Panel library with panel.h" >&5
5344$as_echo_n "checking for Curses Panel library with panel.h... " >&6; }
5345if ${ax_cv_header_panel_h+:} false; then :
5346  $as_echo_n "(cached) " >&6
5347else
5348
5349        LIBS="$ax_saved_LIBS -lpanel $CURSES_LIBS"
5350        CPPFLAGS="$ax_saved_CPPFLAGS $CURSES_CFLAGS"
5351        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5352/* end confdefs.h.  */
5353
5354                #include <panel.h>
5355
5356int
5357main ()
5358{
5359
5360            WINDOW *win = newwin(0, 0, 0, 0);
5361            PANEL *pan = new_panel(win);
5362
5363  ;
5364  return 0;
5365}
5366_ACEOF
5367if ac_fn_c_try_link "$LINENO"; then :
5368  ax_cv_header_panel_h=yes
5369else
5370  ax_cv_header_panel_h=no
5371fi
5372rm -f core conftest.err conftest.$ac_objext \
5373    conftest$ac_exeext conftest.$ac_ext
5374
5375fi
5376{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_header_panel_h" >&5
5377$as_echo "$ax_cv_header_panel_h" >&6; }
5378    if test "x$ax_cv_header_panel_h" = xyes; then :
5379
5380        ax_cv_panel=yes
5381        PANEL_LIBS="-lpanel"
5382
5383$as_echo "#define HAVE_PANEL 1" >>confdefs.h
5384
5385
5386$as_echo "#define HAVE_PANEL_H 1" >>confdefs.h
5387
5388
5389else
5390
5391        if test "x$ax_cv_panel" = xyes; then :
5392
5393else
5394  ax_cv_panel=no
5395fi
5396
5397fi
5398
5399    LIBS=$ax_saved_LIBS
5400    CPPFLAGS=$ax_saved_CPPFLAGS
5401    unset ax_saved_LIBS
5402    unset ax_saved_CPPFLAGS
5403
5404
5405            if test x$ax_cv_panel != "xyes"; then :
5406
5407
5408
5409
5410    ax_saved_LIBS=$LIBS
5411    ax_saved_CPPFLAGS=$CPPFLAGS
5412
5413    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Curses Panel library with ncurses/panel.h" >&5
5414$as_echo_n "checking for Curses Panel library with ncurses/panel.h... " >&6; }
5415if ${ax_cv_header_ncurses_panel_h+:} false; then :
5416  $as_echo_n "(cached) " >&6
5417else
5418
5419        LIBS="$ax_saved_LIBS -lpanel $CURSES_LIBS"
5420        CPPFLAGS="$ax_saved_CPPFLAGS $CURSES_CFLAGS"
5421        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5422/* end confdefs.h.  */
5423
5424                #include <ncurses/panel.h>
5425
5426int
5427main ()
5428{
5429
5430            WINDOW *win = newwin(0, 0, 0, 0);
5431            PANEL *pan = new_panel(win);
5432
5433  ;
5434  return 0;
5435}
5436_ACEOF
5437if ac_fn_c_try_link "$LINENO"; then :
5438  ax_cv_header_ncurses_panel_h=yes
5439else
5440  ax_cv_header_ncurses_panel_h=no
5441fi
5442rm -f core conftest.err conftest.$ac_objext \
5443    conftest$ac_exeext conftest.$ac_ext
5444
5445fi
5446{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_header_ncurses_panel_h" >&5
5447$as_echo "$ax_cv_header_ncurses_panel_h" >&6; }
5448    if test "x$ax_cv_header_ncurses_panel_h" = xyes; then :
5449
5450        ax_cv_panel=yes
5451        PANEL_LIBS="-lpanel"
5452
5453$as_echo "#define HAVE_PANEL 1" >>confdefs.h
5454
5455
5456$as_echo "#define HAVE_NCURSES_PANEL_H 1" >>confdefs.h
5457
5458
5459else
5460
5461        if test "x$ax_cv_panel" = xyes; then :
5462
5463else
5464  ax_cv_panel=no
5465fi
5466
5467fi
5468
5469    LIBS=$ax_saved_LIBS
5470    CPPFLAGS=$ax_saved_CPPFLAGS
5471    unset ax_saved_LIBS
5472    unset ax_saved_CPPFLAGS
5473
5474
5475
5476fi
5477
5478elif test "x$ax_cv_curses_which" = xplaincurses; then :
5479
5480
5481
5482
5483    ax_saved_LIBS=$LIBS
5484    ax_saved_CPPFLAGS=$CPPFLAGS
5485
5486    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Curses Panel library with panel.h" >&5
5487$as_echo_n "checking for Curses Panel library with panel.h... " >&6; }
5488if ${ax_cv_header_panel_h+:} false; then :
5489  $as_echo_n "(cached) " >&6
5490else
5491
5492        LIBS="$ax_saved_LIBS -lpanel $CURSES_LIBS"
5493        CPPFLAGS="$ax_saved_CPPFLAGS $CURSES_CFLAGS"
5494        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5495/* end confdefs.h.  */
5496
5497                #include <panel.h>
5498
5499int
5500main ()
5501{
5502
5503            WINDOW *win = newwin(0, 0, 0, 0);
5504            PANEL *pan = new_panel(win);
5505
5506  ;
5507  return 0;
5508}
5509_ACEOF
5510if ac_fn_c_try_link "$LINENO"; then :
5511  ax_cv_header_panel_h=yes
5512else
5513  ax_cv_header_panel_h=no
5514fi
5515rm -f core conftest.err conftest.$ac_objext \
5516    conftest$ac_exeext conftest.$ac_ext
5517
5518fi
5519{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_header_panel_h" >&5
5520$as_echo "$ax_cv_header_panel_h" >&6; }
5521    if test "x$ax_cv_header_panel_h" = xyes; then :
5522
5523        ax_cv_panel=yes
5524        PANEL_LIBS="-lpanel"
5525
5526$as_echo "#define HAVE_PANEL 1" >>confdefs.h
5527
5528
5529$as_echo "#define HAVE_PANEL_H 1" >>confdefs.h
5530
5531
5532else
5533
5534        if test "x$ax_cv_panel" = xyes; then :
5535
5536else
5537  ax_cv_panel=no
5538fi
5539
5540fi
5541
5542    LIBS=$ax_saved_LIBS
5543    CPPFLAGS=$ax_saved_CPPFLAGS
5544    unset ax_saved_LIBS
5545    unset ax_saved_CPPFLAGS
5546
5547
5548
5549fi
5550
5551fi
5552
5553
5554# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5555for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5556		  inttypes.h stdint.h unistd.h
5557do :
5558  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5559ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5560"
5561if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5562  cat >>confdefs.h <<_ACEOF
5563#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5564_ACEOF
5565
5566fi
5567
5568done
5569
5570
5571
5572  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a readline compatible library" >&5
5573$as_echo_n "checking for a readline compatible library... " >&6; }
5574if ${ax_cv_lib_readline+:} false; then :
5575  $as_echo_n "(cached) " >&6
5576else
5577
5578    ORIG_LIBS="$LIBS"
5579    for readline_lib in readline edit editline; do
5580      for termcap_lib in "" termcap curses ncurses; do
5581        if test -z "$termcap_lib"; then
5582          TRY_LIB="-l$readline_lib"
5583        else
5584          TRY_LIB="-l$readline_lib -l$termcap_lib"
5585        fi
5586        LIBS="$ORIG_LIBS $TRY_LIB"
5587        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5588/* end confdefs.h.  */
5589
5590/* Override any GCC internal prototype to avoid an error.
5591   Use char because int might match the return type of a GCC
5592   builtin and then its argument prototype would still apply.  */
5593#ifdef __cplusplus
5594extern "C"
5595#endif
5596char readline ();
5597int
5598main ()
5599{
5600return readline ();
5601  ;
5602  return 0;
5603}
5604_ACEOF
5605if ac_fn_c_try_link "$LINENO"; then :
5606  ax_cv_lib_readline="$TRY_LIB"
5607fi
5608rm -f core conftest.err conftest.$ac_objext \
5609    conftest$ac_exeext conftest.$ac_ext
5610        if test -n "$ax_cv_lib_readline"; then
5611          break
5612        fi
5613      done
5614      if test -n "$ax_cv_lib_readline"; then
5615        break
5616      fi
5617    done
5618    if test -z "$ax_cv_lib_readline"; then
5619      ax_cv_lib_readline="no"
5620    fi
5621    LIBS="$ORIG_LIBS"
5622
5623fi
5624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_lib_readline" >&5
5625$as_echo "$ax_cv_lib_readline" >&6; }
5626
5627  if test "$ax_cv_lib_readline" != "no"; then
5628    LIBS="$LIBS $ax_cv_lib_readline"
5629
5630$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
5631
5632    for ac_header in readline.h readline/readline.h
5633do :
5634  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5635ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
5636if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5637  cat >>confdefs.h <<_ACEOF
5638#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5639_ACEOF
5640
5641fi
5642
5643done
5644
5645    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readline supports history" >&5
5646$as_echo_n "checking whether readline supports history... " >&6; }
5647if ${ax_cv_lib_readline_history+:} false; then :
5648  $as_echo_n "(cached) " >&6
5649else
5650
5651      ax_cv_lib_readline_history="no"
5652      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5653/* end confdefs.h.  */
5654
5655/* Override any GCC internal prototype to avoid an error.
5656   Use char because int might match the return type of a GCC
5657   builtin and then its argument prototype would still apply.  */
5658#ifdef __cplusplus
5659extern "C"
5660#endif
5661char add_history ();
5662int
5663main ()
5664{
5665return add_history ();
5666  ;
5667  return 0;
5668}
5669_ACEOF
5670if ac_fn_c_try_link "$LINENO"; then :
5671  ax_cv_lib_readline_history="yes"
5672fi
5673rm -f core conftest.err conftest.$ac_objext \
5674    conftest$ac_exeext conftest.$ac_ext
5675
5676fi
5677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_lib_readline_history" >&5
5678$as_echo "$ax_cv_lib_readline_history" >&6; }
5679    if test "$ax_cv_lib_readline_history" = "yes"; then
5680
5681$as_echo "#define HAVE_READLINE_HISTORY 1" >>confdefs.h
5682
5683      for ac_header in history.h readline/history.h
5684do :
5685  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5686ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
5687if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5688  cat >>confdefs.h <<_ACEOF
5689#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5690_ACEOF
5691
5692fi
5693
5694done
5695
5696    fi
5697  fi
5698
5699for ac_prog in gawk mawk nawk awk
5700do
5701  # Extract the first word of "$ac_prog", so it can be a program name with args.
5702set dummy $ac_prog; ac_word=$2
5703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5704$as_echo_n "checking for $ac_word... " >&6; }
5705if ${ac_cv_prog_AWK+:} false; then :
5706  $as_echo_n "(cached) " >&6
5707else
5708  if test -n "$AWK"; then
5709  ac_cv_prog_AWK="$AWK" # Let the user override the test.
5710else
5711as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5712for as_dir in $PATH
5713do
5714  IFS=$as_save_IFS
5715  test -z "$as_dir" && as_dir=.
5716    for ac_exec_ext in '' $ac_executable_extensions; do
5717  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5718    ac_cv_prog_AWK="$ac_prog"
5719    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5720    break 2
5721  fi
5722done
5723  done
5724IFS=$as_save_IFS
5725
5726fi
5727fi
5728AWK=$ac_cv_prog_AWK
5729if test -n "$AWK"; then
5730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5731$as_echo "$AWK" >&6; }
5732else
5733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5734$as_echo "no" >&6; }
5735fi
5736
5737
5738  test -n "$AWK" && break
5739done
5740
5741
5742
5743# Check whether --with-postgresql was given.
5744if test "${with_postgresql+set}" = set; then :
5745  withval=$with_postgresql;
5746	case $withval in #(
5747  [nN][oO]) :
5748    want_postgresql="no" ;; #(
5749  [yY][eE][sS]) :
5750    want_postgresql="yes" ;; #(
5751  *) :
5752
5753			want_postgresql="yes"
5754			PG_CONFIG="$withval"
5755		 ;;
5756esac
5757
5758else
5759  want_postgresql="yes"
5760
5761fi
5762
5763
5764
5765
5766
5767
5768    # populate cache
5769    if test "X$POSTGRESQL_CPPFLAGS" != X; then :
5770  ac_cv_POSTGRESQL_CPPFLAGS="$POSTGRESQL_CPPFLAGS"
5771fi
5772    if test "X$POSTGRESQL_LDFLAGS" != X; then :
5773  ac_cv_POSTGRESQL_LDFLAGS="$POSTGRESQL_LDFLAGS"
5774fi
5775    if test "X$POSTGRESQL_LIBS" != X; then :
5776  ac_cv_POSTGRESQL_LIBS="$POSTGRESQL_LIBS"
5777fi
5778
5779    postgresql_version_req=
5780    found_postgresql="no"
5781
5782    POSTGRESQL_VERSION=""
5783
5784                if test X"$want_postgresql" = "Xyes"; then :
5785
5786
5787
5788  found_postgresql=no
5789
5790  while true; do
5791
5792
5793
5794
5795
5796
5797
5798if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
5799	if test -n "$ac_tool_prefix"; then
5800  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
5801set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
5802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5803$as_echo_n "checking for $ac_word... " >&6; }
5804if ${ac_cv_path_PKG_CONFIG+:} false; then :
5805  $as_echo_n "(cached) " >&6
5806else
5807  case $PKG_CONFIG in
5808  [\\/]* | ?:[\\/]*)
5809  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
5810  ;;
5811  *)
5812  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5813for as_dir in $PATH
5814do
5815  IFS=$as_save_IFS
5816  test -z "$as_dir" && as_dir=.
5817    for ac_exec_ext in '' $ac_executable_extensions; do
5818  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5819    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
5820    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5821    break 2
5822  fi
5823done
5824  done
5825IFS=$as_save_IFS
5826
5827  ;;
5828esac
5829fi
5830PKG_CONFIG=$ac_cv_path_PKG_CONFIG
5831if test -n "$PKG_CONFIG"; then
5832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
5833$as_echo "$PKG_CONFIG" >&6; }
5834else
5835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5836$as_echo "no" >&6; }
5837fi
5838
5839
5840fi
5841if test -z "$ac_cv_path_PKG_CONFIG"; then
5842  ac_pt_PKG_CONFIG=$PKG_CONFIG
5843  # Extract the first word of "pkg-config", so it can be a program name with args.
5844set dummy pkg-config; ac_word=$2
5845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5846$as_echo_n "checking for $ac_word... " >&6; }
5847if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
5848  $as_echo_n "(cached) " >&6
5849else
5850  case $ac_pt_PKG_CONFIG in
5851  [\\/]* | ?:[\\/]*)
5852  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
5853  ;;
5854  *)
5855  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5856for as_dir in $PATH
5857do
5858  IFS=$as_save_IFS
5859  test -z "$as_dir" && as_dir=.
5860    for ac_exec_ext in '' $ac_executable_extensions; do
5861  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5862    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
5863    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5864    break 2
5865  fi
5866done
5867  done
5868IFS=$as_save_IFS
5869
5870  ;;
5871esac
5872fi
5873ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
5874if test -n "$ac_pt_PKG_CONFIG"; then
5875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
5876$as_echo "$ac_pt_PKG_CONFIG" >&6; }
5877else
5878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5879$as_echo "no" >&6; }
5880fi
5881
5882  if test "x$ac_pt_PKG_CONFIG" = x; then
5883    PKG_CONFIG=""
5884  else
5885    case $cross_compiling:$ac_tool_warned in
5886yes:)
5887{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5888$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5889ac_tool_warned=yes ;;
5890esac
5891    PKG_CONFIG=$ac_pt_PKG_CONFIG
5892  fi
5893else
5894  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
5895fi
5896
5897fi
5898if test -n "$PKG_CONFIG"; then
5899	_pkg_min_version=0.9.0
5900	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
5901$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
5902	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
5903		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5904$as_echo "yes" >&6; }
5905	else
5906		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5907$as_echo "no" >&6; }
5908		PKG_CONFIG=""
5909	fi
5910fi
5911    if test X$PKG_CONFIG = X; then :
5912  break
5913fi
5914
5915    _AX_LIB_POSTGRESQL_PKG_CONFIG_fail=no;
5916    if test "X$postgresql_version_req" = "X"; then :
5917  if test -n "$PKG_CONFIG" && \
5918    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpq\""; } >&5
5919  ($PKG_CONFIG --exists --print-errors "libpq") 2>&5
5920  ac_status=$?
5921  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5922  test $ac_status = 0; }; then
5923  found_postgresql_pkg_config=yes
5924else
5925  found_postgresql=no
5926fi
5927else
5928  if test -n "$PKG_CONFIG" && \
5929    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpq >= \"\$postgresql_version_req\"\""; } >&5
5930  ($PKG_CONFIG --exists --print-errors "libpq >= "$postgresql_version_req"") 2>&5
5931  ac_status=$?
5932  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5933  test $ac_status = 0; }; then
5934  found_postgresql=yes
5935else
5936  found_postgresql=no
5937fi
5938fi
5939    if test "X$found_postgresql" = "no"; then :
5940  break
5941fi
5942
5943    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the PostgreSQL libraries CPPFLAGS" >&5
5944$as_echo_n "checking for the PostgreSQL libraries CPPFLAGS... " >&6; }
5945if ${ac_cv_POSTGRESQL_CPPFLAGS+:} false; then :
5946  $as_echo_n "(cached) " >&6
5947else
5948  ac_cv_POSTGRESQL_CPPFLAGS="`$PKG_CONFIG libpq --cflags-only-I`" || _AX_LIB_POSTGRESQL_PKG_CONFIG_fail=yes
5949fi
5950{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_POSTGRESQL_CPPFLAGS" >&5
5951$as_echo "$ac_cv_POSTGRESQL_CPPFLAGS" >&6; }
5952    if test "X$_AX_LIB_POSTGRESQL_PKG_CONFIG_fail" = "Xyes"; then :
5953  break
5954fi
5955    POSTGRESQL_CPPFLAGS="$ac_cv_POSTGRESQL_CPPFLAGS"
5956
5957
5958    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the PostgreSQL libraries LDFLAGS" >&5
5959$as_echo_n "checking for the PostgreSQL libraries LDFLAGS... " >&6; }
5960if ${ac_cv_POSTGRESQL_LDFLAGS+:} false; then :
5961  $as_echo_n "(cached) " >&6
5962else
5963  ac_cv_POSTGRESQL_LDFLAGS="`$PKG_CONFIG libpq --libs-only-L --libs-only-other`" || _AX_LIB_POSTGRESQL_PKG_CONFIG_fail=yes
5964fi
5965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_POSTGRESQL_LDFLAGS" >&5
5966$as_echo "$ac_cv_POSTGRESQL_LDFLAGS" >&6; }
5967    if test "X$_AX_LIB_POSTGRESQL_PKG_CONFIG_fail" = "Xyes"; then :
5968  break
5969fi
5970    POSTGRESQL_LDFLAGS="$ac_cv_POSTGRESQL_LDFLAGS"
5971
5972
5973    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the PostgreSQL libraries LIBS" >&5
5974$as_echo_n "checking for the PostgreSQL libraries LIBS... " >&6; }
5975if ${ac_cv_POSTGRESQL_LIBS+:} false; then :
5976  $as_echo_n "(cached) " >&6
5977else
5978  ac_cv_POSTGRESQL_LIBS="`$PKG_CONFIG libpq --libs-only-l`" || _AX_LIB_POSTGRESQL_PKG_CONFIG_fail=ye
5979fi
5980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_POSTGRESQL_LIBS" >&5
5981$as_echo "$ac_cv_POSTGRESQL_LIBS" >&6; }
5982    if test "X$_AX_LIB_POSTGRESQL_PKG_CONFIG_fail" = "Xyes"; then :
5983  break
5984fi
5985    POSTGRESQL_LIBS="$ac_cv_POSTGRESQL_LIBS"
5986
5987        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the PostgreSQL version" >&5
5988$as_echo_n "checking for the PostgreSQL version... " >&6; }
5989if ${ac_cv_POSTGRESQL_VERSION+:} false; then :
5990  $as_echo_n "(cached) " >&6
5991else
5992  ac_cv_POSTGRESQL_VERSION="`$PKG_CONFIG libpq --modversion`" || _AX_LIB_POSTGRESQL_PKG_CONFIG_fail=yes
5993fi
5994{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_POSTGRESQL_VERSION" >&5
5995$as_echo "$ac_cv_POSTGRESQL_VERSION" >&6; }
5996    if test "X$_AX_LIB_POSTGRESQL_PKG_CONFIG_fail" = "Xyes"; then :
5997  break
5998fi
5999    POSTGRESQL_VERSION="$ac_cv_POSTGRESQL_VERSION"
6000
6001    found_postgresql=yes
6002    break;
6003  done
6004
6005
6006
6007
6008      if test X"$found_postgresql" = "Xno"; then :
6009
6010	found_postgresql="no"
6011	_AX_LIB_POSTGRESQL_OLD_fail="no"
6012	while true; do
6013	  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pg_config program" >&5
6014$as_echo_n "checking for the pg_config program... " >&6; }
6015if ${ac_cv_path_PG_CONFIG+:} false; then :
6016  $as_echo_n "(cached) " >&6
6017else
6018  if test -z "$PG_CONFIG"; then
6019  ac_path_PG_CONFIG_found=false
6020  # Loop through the user's path and test for each of PROGNAME-LIST
6021  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6022for as_dir in $PATH
6023do
6024  IFS=$as_save_IFS
6025  test -z "$as_dir" && as_dir=.
6026    for ac_prog in pg_config; do
6027    for ac_exec_ext in '' $ac_executable_extensions; do
6028      ac_path_PG_CONFIG="$as_dir/$ac_prog$ac_exec_ext"
6029      as_fn_executable_p "$ac_path_PG_CONFIG" || continue
6030ac_cv_path_PG_CONFIG="";$ac_path_PG_CONFIG --includedir > /dev/null \
6031		&& ac_cv_path_PG_CONFIG=$ac_path_PG_CONFIG ac_path_PG_CONFIG_found=:
6032      $ac_path_PG_CONFIG_found && break 3
6033    done
6034  done
6035  done
6036IFS=$as_save_IFS
6037  if test -z "$ac_cv_path_PG_CONFIG"; then
6038    ac_cv_path_PG_CONFIG=""
6039  fi
6040else
6041  ac_cv_path_PG_CONFIG=$PG_CONFIG
6042fi
6043
6044fi
6045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_PG_CONFIG" >&5
6046$as_echo "$ac_cv_path_PG_CONFIG" >&6; }
6047	  PG_CONFIG=$ac_cv_path_PG_CONFIG
6048	  if test "X$PG_CONFIG" = "X"; then :
6049  break
6050fi
6051
6052	  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the PostgreSQL libraries CPPFLAGS" >&5
6053$as_echo_n "checking for the PostgreSQL libraries CPPFLAGS... " >&6; }
6054if ${ac_cv_POSTGRESQL_CPPFLAGS+:} false; then :
6055  $as_echo_n "(cached) " >&6
6056else
6057  ac_cv_POSTGRESQL_CPPFLAGS="-I`$PG_CONFIG --includedir`" || _AX_LIB_POSTGRESQL_OLD_fail=yes
6058fi
6059{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_POSTGRESQL_CPPFLAGS" >&5
6060$as_echo "$ac_cv_POSTGRESQL_CPPFLAGS" >&6; }
6061	  if test "X$_AX_LIB_POSTGRESQL_OLD_fail" = "Xyes"; then :
6062  break
6063fi
6064	  POSTGRESQL_CPPFLAGS="$ac_cv_POSTGRESQL_CPPFLAGS"
6065
6066	  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the PostgreSQL libraries LDFLAGS" >&5
6067$as_echo_n "checking for the PostgreSQL libraries LDFLAGS... " >&6; }
6068if ${ac_cv_POSTGRESQL_LDFLAGS+:} false; then :
6069  $as_echo_n "(cached) " >&6
6070else
6071  ac_cv_POSTGRESQL_LDFLAGS="-L`$PG_CONFIG --libdir`" || _AX_LIB_POSTGRESQL_OLD_fail=yes
6072fi
6073{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_POSTGRESQL_LDFLAGS" >&5
6074$as_echo "$ac_cv_POSTGRESQL_LDFLAGS" >&6; }
6075	  if test "X$_AX_LIB_POSTGRESQL_OLD_fail" = "Xyes"; then :
6076  break
6077fi
6078	  POSTGRESQL_LDFLAGS="$ac_cv_POSTGRESQL_LDFLAGS"
6079
6080	  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the PostgreSQL libraries LIBS" >&5
6081$as_echo_n "checking for the PostgreSQL libraries LIBS... " >&6; }
6082if ${ac_cv_POSTGRESQL_LIBS+:} false; then :
6083  $as_echo_n "(cached) " >&6
6084else
6085  ac_cv_POSTGRESQL_LIBS="-lpq"
6086fi
6087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_POSTGRESQL_LIBS" >&5
6088$as_echo "$ac_cv_POSTGRESQL_LIBS" >&6; }
6089	  POSTGRESQL_LIBS="$ac_cv_POSTGRESQL_LIBS"
6090
6091	  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the PostgreSQL version" >&5
6092$as_echo_n "checking for the PostgreSQL version... " >&6; }
6093if ${ac_cv_POSTGRESQL_VERSION+:} false; then :
6094  $as_echo_n "(cached) " >&6
6095else
6096
6097			ac_cv_POSTGRESQL_VERSION=`$PG_CONFIG --version | sed "s/^PostgreSQL[[:space:]][[:space:]]*\([0-9.][0-9.]*\).*/\1/"` \
6098			      || _AX_LIB_POSTGRESQL_OLD_fail=yes
6099
6100fi
6101{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_POSTGRESQL_VERSION" >&5
6102$as_echo "$ac_cv_POSTGRESQL_VERSION" >&6; }
6103	  if test "X$_AX_LIB_POSTGRESQL_OLD_fail" = "Xyes"; then :
6104  break
6105fi
6106	  POSTGRESQL_VERSION="$ac_cv_POSTGRESQL_VERSION"
6107
6108
6109	  	  	  	  if test X"$postgresql_version_req" != "X"; then :
6110
6111	     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PostgreSQL version $POSTGRESQL_VERSION is >= $postgresql_version_req" >&5
6112$as_echo_n "checking if PostgreSQL version $POSTGRESQL_VERSION is >= $postgresql_version_req... " >&6; }
6113
6114
6115
6116  # Used to indicate true or false condition
6117  ax_compare_version=false
6118
6119  # Convert the two version strings to be compared into a format that
6120  # allows a simple string comparison.  The end result is that a version
6121  # string of the form 1.12.5-r617 will be converted to the form
6122  # 0001001200050617.  In other words, each number is zero padded to four
6123  # digits, and non digits are removed.
6124
6125  ax_compare_version_A=`echo "$POSTGRESQL_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \
6126                     -e 's/Z\([0-9]\)Z/Z0\1Z/g' \
6127                     -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \
6128                     -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \
6129                     -e 's/[^0-9]//g'`
6130
6131
6132  ax_compare_version_B=`echo "$postgresql_version_req" | sed -e 's/\([0-9]*\)/Z\1Z/g' \
6133                     -e 's/Z\([0-9]\)Z/Z0\1Z/g' \
6134                     -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \
6135                     -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \
6136                     -e 's/[^0-9]//g'`
6137
6138
6139    ax_compare_version=`echo "x$ax_compare_version_A
6140x$ax_compare_version_B" | sed 's/^ *//' | sort -r | sed "s/x${ax_compare_version_A}/true/;s/x${ax_compare_version_B}/false/;1q"`
6141
6142
6143
6144    if test "$ax_compare_version" = "true" ; then
6145    found_postgresql_req_version=yes
6146    else found_postgresql_req_version=no
6147  fi
6148
6149	     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found_postgresql_req_version" >&5
6150$as_echo "$found_postgresql_req_version" >&6; }
6151
6152fi
6153	  if test "Xfound_postgresql_req_version" = "Xno"; then :
6154  break
6155fi
6156
6157	  found_postgresql="yes"
6158	  break
6159	done
6160
6161fi
6162
6163      if test X"$found_postgresql" = Xyes; then :
6164
6165	  _AX_LIB_POSTGRESQL_OLD_CPPFLAGS="$CPPFLAGS"
6166	  CPPFLAGS="$CPPFLAGS $POSTGRESQL_CPPFLAGS"
6167	  _AX_LIB_POSTGRESQL_OLD_LDFLAGS="$LDFLAGS"
6168	  LDFLAGS="$LDFLAGS $POSTGRESQL_LDFLAGS"
6169	  _AX_LIB_POSTGRESQL_OLD_LIBS="$LIBS"
6170	  LIBS="$LIBS $POSTGRESQL_LIBS"
6171	  while true; do
6172	    	    ac_fn_c_check_header_mongrel "$LINENO" "libpq-fe.h" "ac_cv_header_libpq_fe_h" "$ac_includes_default"
6173if test "x$ac_cv_header_libpq_fe_h" = xyes; then :
6174
6175else
6176  found_postgresql=no
6177fi
6178
6179
6180	    if test "X$found_postgresql" = "Xno"; then :
6181  break
6182fi
6183	    	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the PostgreSQL library linking is working" >&5
6184$as_echo_n "checking for the PostgreSQL library linking is working... " >&6; }
6185if ${ac_cv_postgresql_found+:} false; then :
6186  $as_echo_n "(cached) " >&6
6187else
6188
6189	      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6190/* end confdefs.h.  */
6191
6192
6193		   #include <libpq-fe.h>
6194
6195int
6196main ()
6197{
6198
6199		    char conninfo[]="dbname = postgres";
6200		    PGconn     *conn;
6201		    conn = PQconnectdb(conninfo);
6202
6203
6204  ;
6205  return 0;
6206}
6207
6208_ACEOF
6209if ac_fn_c_try_link "$LINENO"; then :
6210  ac_cv_postgresql_found=yes
6211else
6212  ac_cv_postgresql_found=no
6213fi
6214rm -f core conftest.err conftest.$ac_objext \
6215    conftest$ac_exeext conftest.$ac_ext
6216
6217fi
6218{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_postgresql_found" >&5
6219$as_echo "$ac_cv_postgresql_found" >&6; }
6220	    found_postgresql="$ac_cv_postgresql_found"
6221	    if test "X$found_postgresql" = "Xno"; then :
6222  break
6223fi
6224	    break
6225	done
6226	CPPFLAGS="$_AX_LIB_POSTGRESQL_OLD_CPPFLAGS"
6227	LDFLAGS="$_AX_LIB_POSTGRESQL_OLD_LDFLAGS"
6228	LIBS="$_AX_LIB_POSTGRESQL_OLD_LIBS"
6229
6230fi
6231
6232
6233      if test "x$found_postgresql" = "xyes"; then :
6234
6235
6236$as_echo "#define HAVE_POSTGRESQL 1" >>confdefs.h
6237
6238fi
6239
6240fi
6241
6242
6243
6244
6245
6246
6247    if test "x$found_postgresql" = "xyes"; then :
6248  :
6249else
6250  { $as_echo "$as_me:${as_lineno-$LINENO}: PostgreSQL library not found" >&5
6251$as_echo "$as_me: PostgreSQL library not found" >&6;}
6252fi
6253
6254
6255
6256case "$ax_cv_ncurses" in "no")
6257	as_fn_error $? "ncurses not found" "$LINENO" 5
6258esac
6259case "$ax_cv_ncursesw" in "no")
6260	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The found ncurses library does not support wide-char." >&5
6261$as_echo "$as_me: WARNING: The found ncurses library does not support wide-char." >&2;}
6262	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This means that pspg will not correctly render UTF-8." >&5
6263$as_echo "$as_me: WARNING: This means that pspg will not correctly render UTF-8." >&2;}
6264esac
6265
6266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for roundl in -lm" >&5
6267$as_echo_n "checking for roundl in -lm... " >&6; }
6268if ${ac_cv_lib_m_roundl+:} false; then :
6269  $as_echo_n "(cached) " >&6
6270else
6271  ac_check_lib_save_LIBS=$LIBS
6272LIBS="-lm  $LIBS"
6273cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6274/* end confdefs.h.  */
6275
6276/* Override any GCC internal prototype to avoid an error.
6277   Use char because int might match the return type of a GCC
6278   builtin and then its argument prototype would still apply.  */
6279#ifdef __cplusplus
6280extern "C"
6281#endif
6282char roundl ();
6283int
6284main ()
6285{
6286return roundl ();
6287  ;
6288  return 0;
6289}
6290_ACEOF
6291if ac_fn_c_try_link "$LINENO"; then :
6292  ac_cv_lib_m_roundl=yes
6293else
6294  ac_cv_lib_m_roundl=no
6295fi
6296rm -f core conftest.err conftest.$ac_objext \
6297    conftest$ac_exeext conftest.$ac_ext
6298LIBS=$ac_check_lib_save_LIBS
6299fi
6300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_roundl" >&5
6301$as_echo "$ac_cv_lib_m_roundl" >&6; }
6302if test "x$ac_cv_lib_m_roundl" = xyes; then :
6303  cat >>confdefs.h <<_ACEOF
6304#define HAVE_LIBM 1
6305_ACEOF
6306
6307  LIBS="-lm $LIBS"
6308
6309fi
6310
6311
6312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
6313$as_echo_n "checking for library containing clock_gettime... " >&6; }
6314if ${ac_cv_search_clock_gettime+:} false; then :
6315  $as_echo_n "(cached) " >&6
6316else
6317  ac_func_search_save_LIBS=$LIBS
6318cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6319/* end confdefs.h.  */
6320
6321/* Override any GCC internal prototype to avoid an error.
6322   Use char because int might match the return type of a GCC
6323   builtin and then its argument prototype would still apply.  */
6324#ifdef __cplusplus
6325extern "C"
6326#endif
6327char clock_gettime ();
6328int
6329main ()
6330{
6331return clock_gettime ();
6332  ;
6333  return 0;
6334}
6335_ACEOF
6336for ac_lib in '' rt posix4; do
6337  if test -z "$ac_lib"; then
6338    ac_res="none required"
6339  else
6340    ac_res=-l$ac_lib
6341    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6342  fi
6343  if ac_fn_c_try_link "$LINENO"; then :
6344  ac_cv_search_clock_gettime=$ac_res
6345fi
6346rm -f core conftest.err conftest.$ac_objext \
6347    conftest$ac_exeext
6348  if ${ac_cv_search_clock_gettime+:} false; then :
6349  break
6350fi
6351done
6352if ${ac_cv_search_clock_gettime+:} false; then :
6353
6354else
6355  ac_cv_search_clock_gettime=no
6356fi
6357rm conftest.$ac_ext
6358LIBS=$ac_func_search_save_LIBS
6359fi
6360{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
6361$as_echo "$ac_cv_search_clock_gettime" >&6; }
6362ac_res=$ac_cv_search_clock_gettime
6363if test "$ac_res" != no; then :
6364  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6365
6366else
6367  as_fn_error $? "Function clock_gettime not available." "$LINENO" 5
6368
6369fi
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387ac_config_files="$ac_config_files config.make"
6388
6389
6390if test "$ax_cv_panel" = yes; then
6391  COMPILE_MENU=1
6392  CFLAGS="$CFLAGS -DCOMPILE_MENU"
6393fi
6394
6395# supply -g if --enable-debug
6396if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
6397  CFLAGS="$CFLAGS -g"
6398fi
6399
6400for ac_header in sys/inotify.h
6401do :
6402  ac_fn_c_check_header_mongrel "$LINENO" "sys/inotify.h" "ac_cv_header_sys_inotify_h" "$ac_includes_default"
6403if test "x$ac_cv_header_sys_inotify_h" = xyes; then :
6404  cat >>confdefs.h <<_ACEOF
6405#define HAVE_SYS_INOTIFY_H 1
6406_ACEOF
6407 have_inotify=yes
6408else
6409  have_inotify=no
6410fi
6411
6412done
6413
6414
6415
6416# Check whether --with-inotify was given.
6417if test "${with_inotify+set}" = set; then :
6418  withval=$with_inotify; with_inotify=no
6419else
6420  with_inotify=yes
6421fi
6422
6423
6424if test "x$have_inotify" = "xyes"; then
6425  if test "x$with_inotify" != "xyes"; then
6426    have_inotify=no
6427  else
6428
6429$as_echo "#define HAVE_INOTIFY 1" >>confdefs.h
6430
6431  fi
6432fi
6433
6434cat >confcache <<\_ACEOF
6435# This file is a shell script that caches the results of configure
6436# tests run on this system so they can be shared between configure
6437# scripts and configure runs, see configure's option --config-cache.
6438# It is not useful on other systems.  If it contains results you don't
6439# want to keep, you may remove or edit it.
6440#
6441# config.status only pays attention to the cache file if you give it
6442# the --recheck option to rerun configure.
6443#
6444# `ac_cv_env_foo' variables (set or unset) will be overridden when
6445# loading this file, other *unset* `ac_cv_foo' will be assigned the
6446# following values.
6447
6448_ACEOF
6449
6450# The following way of writing the cache mishandles newlines in values,
6451# but we know of no workaround that is simple, portable, and efficient.
6452# So, we kill variables containing newlines.
6453# Ultrix sh set writes to stderr and can't be redirected directly,
6454# and sets the high bit in the cache file unless we assign to the vars.
6455(
6456  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
6457    eval ac_val=\$$ac_var
6458    case $ac_val in #(
6459    *${as_nl}*)
6460      case $ac_var in #(
6461      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
6462$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
6463      esac
6464      case $ac_var in #(
6465      _ | IFS | as_nl) ;; #(
6466      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
6467      *) { eval $ac_var=; unset $ac_var;} ;;
6468      esac ;;
6469    esac
6470  done
6471
6472  (set) 2>&1 |
6473    case $as_nl`(ac_space=' '; set) 2>&1` in #(
6474    *${as_nl}ac_space=\ *)
6475      # `set' does not quote correctly, so add quotes: double-quote
6476      # substitution turns \\\\ into \\, and sed turns \\ into \.
6477      sed -n \
6478	"s/'/'\\\\''/g;
6479	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
6480      ;; #(
6481    *)
6482      # `set' quotes correctly as required by POSIX, so do not add quotes.
6483      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
6484      ;;
6485    esac |
6486    sort
6487) |
6488  sed '
6489     /^ac_cv_env_/b end
6490     t clear
6491     :clear
6492     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
6493     t end
6494     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
6495     :end' >>confcache
6496if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
6497  if test -w "$cache_file"; then
6498    if test "x$cache_file" != "x/dev/null"; then
6499      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
6500$as_echo "$as_me: updating cache $cache_file" >&6;}
6501      if test ! -f "$cache_file" || test -h "$cache_file"; then
6502	cat confcache >"$cache_file"
6503      else
6504        case $cache_file in #(
6505        */* | ?:*)
6506	  mv -f confcache "$cache_file"$$ &&
6507	  mv -f "$cache_file"$$ "$cache_file" ;; #(
6508        *)
6509	  mv -f confcache "$cache_file" ;;
6510	esac
6511      fi
6512    fi
6513  else
6514    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
6515$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
6516  fi
6517fi
6518rm -f confcache
6519
6520test "x$prefix" = xNONE && prefix=$ac_default_prefix
6521# Let make expand exec_prefix.
6522test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6523
6524# Transform confdefs.h into DEFS.
6525# Protect against shell expansion while executing Makefile rules.
6526# Protect against Makefile macro expansion.
6527#
6528# If the first sed substitution is executed (which looks for macros that
6529# take arguments), then branch to the quote section.  Otherwise,
6530# look for a macro that doesn't take arguments.
6531ac_script='
6532:mline
6533/\\$/{
6534 N
6535 s,\\\n,,
6536 b mline
6537}
6538t clear
6539:clear
6540s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
6541t quote
6542s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
6543t quote
6544b any
6545:quote
6546s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
6547s/\[/\\&/g
6548s/\]/\\&/g
6549s/\$/$$/g
6550H
6551:any
6552${
6553	g
6554	s/^\n//
6555	s/\n/ /g
6556	p
6557}
6558'
6559DEFS=`sed -n "$ac_script" confdefs.h`
6560
6561
6562ac_libobjs=
6563ac_ltlibobjs=
6564U=
6565for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
6566  # 1. Remove the extension, and $U if already installed.
6567  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
6568  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
6569  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
6570  #    will be set to the directory where LIBOBJS objects are built.
6571  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
6572  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
6573done
6574LIBOBJS=$ac_libobjs
6575
6576LTLIBOBJS=$ac_ltlibobjs
6577
6578
6579
6580: "${CONFIG_STATUS=./config.status}"
6581ac_write_fail=0
6582ac_clean_files_save=$ac_clean_files
6583ac_clean_files="$ac_clean_files $CONFIG_STATUS"
6584{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
6585$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
6586as_write_fail=0
6587cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
6588#! $SHELL
6589# Generated by $as_me.
6590# Run this file to recreate the current configuration.
6591# Compiler output produced by configure, useful for debugging
6592# configure, is in config.log if it exists.
6593
6594debug=false
6595ac_cs_recheck=false
6596ac_cs_silent=false
6597
6598SHELL=\${CONFIG_SHELL-$SHELL}
6599export SHELL
6600_ASEOF
6601cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
6602## -------------------- ##
6603## M4sh Initialization. ##
6604## -------------------- ##
6605
6606# Be more Bourne compatible
6607DUALCASE=1; export DUALCASE # for MKS sh
6608if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
6609  emulate sh
6610  NULLCMD=:
6611  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
6612  # is contrary to our usage.  Disable this feature.
6613  alias -g '${1+"$@"}'='"$@"'
6614  setopt NO_GLOB_SUBST
6615else
6616  case `(set -o) 2>/dev/null` in #(
6617  *posix*) :
6618    set -o posix ;; #(
6619  *) :
6620     ;;
6621esac
6622fi
6623
6624
6625as_nl='
6626'
6627export as_nl
6628# Printing a long string crashes Solaris 7 /usr/bin/printf.
6629as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
6630as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
6631as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
6632# Prefer a ksh shell builtin over an external printf program on Solaris,
6633# but without wasting forks for bash or zsh.
6634if test -z "$BASH_VERSION$ZSH_VERSION" \
6635    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
6636  as_echo='print -r --'
6637  as_echo_n='print -rn --'
6638elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
6639  as_echo='printf %s\n'
6640  as_echo_n='printf %s'
6641else
6642  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
6643    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
6644    as_echo_n='/usr/ucb/echo -n'
6645  else
6646    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
6647    as_echo_n_body='eval
6648      arg=$1;
6649      case $arg in #(
6650      *"$as_nl"*)
6651	expr "X$arg" : "X\\(.*\\)$as_nl";
6652	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
6653      esac;
6654      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
6655    '
6656    export as_echo_n_body
6657    as_echo_n='sh -c $as_echo_n_body as_echo'
6658  fi
6659  export as_echo_body
6660  as_echo='sh -c $as_echo_body as_echo'
6661fi
6662
6663# The user is always right.
6664if test "${PATH_SEPARATOR+set}" != set; then
6665  PATH_SEPARATOR=:
6666  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
6667    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
6668      PATH_SEPARATOR=';'
6669  }
6670fi
6671
6672
6673# IFS
6674# We need space, tab and new line, in precisely that order.  Quoting is
6675# there to prevent editors from complaining about space-tab.
6676# (If _AS_PATH_WALK were called with IFS unset, it would disable word
6677# splitting by setting IFS to empty value.)
6678IFS=" ""	$as_nl"
6679
6680# Find who we are.  Look in the path if we contain no directory separator.
6681as_myself=
6682case $0 in #((
6683  *[\\/]* ) as_myself=$0 ;;
6684  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6685for as_dir in $PATH
6686do
6687  IFS=$as_save_IFS
6688  test -z "$as_dir" && as_dir=.
6689    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
6690  done
6691IFS=$as_save_IFS
6692
6693     ;;
6694esac
6695# We did not find ourselves, most probably we were run as `sh COMMAND'
6696# in which case we are not to be found in the path.
6697if test "x$as_myself" = x; then
6698  as_myself=$0
6699fi
6700if test ! -f "$as_myself"; then
6701  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
6702  exit 1
6703fi
6704
6705# Unset variables that we do not need and which cause bugs (e.g. in
6706# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
6707# suppresses any "Segmentation fault" message there.  '((' could
6708# trigger a bug in pdksh 5.2.14.
6709for as_var in BASH_ENV ENV MAIL MAILPATH
6710do eval test x\${$as_var+set} = xset \
6711  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
6712done
6713PS1='$ '
6714PS2='> '
6715PS4='+ '
6716
6717# NLS nuisances.
6718LC_ALL=C
6719export LC_ALL
6720LANGUAGE=C
6721export LANGUAGE
6722
6723# CDPATH.
6724(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
6725
6726
6727# as_fn_error STATUS ERROR [LINENO LOG_FD]
6728# ----------------------------------------
6729# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
6730# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
6731# script with STATUS, using 1 if that was 0.
6732as_fn_error ()
6733{
6734  as_status=$1; test $as_status -eq 0 && as_status=1
6735  if test "$4"; then
6736    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
6737    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
6738  fi
6739  $as_echo "$as_me: error: $2" >&2
6740  as_fn_exit $as_status
6741} # as_fn_error
6742
6743
6744# as_fn_set_status STATUS
6745# -----------------------
6746# Set $? to STATUS, without forking.
6747as_fn_set_status ()
6748{
6749  return $1
6750} # as_fn_set_status
6751
6752# as_fn_exit STATUS
6753# -----------------
6754# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
6755as_fn_exit ()
6756{
6757  set +e
6758  as_fn_set_status $1
6759  exit $1
6760} # as_fn_exit
6761
6762# as_fn_unset VAR
6763# ---------------
6764# Portably unset VAR.
6765as_fn_unset ()
6766{
6767  { eval $1=; unset $1;}
6768}
6769as_unset=as_fn_unset
6770# as_fn_append VAR VALUE
6771# ----------------------
6772# Append the text in VALUE to the end of the definition contained in VAR. Take
6773# advantage of any shell optimizations that allow amortized linear growth over
6774# repeated appends, instead of the typical quadratic growth present in naive
6775# implementations.
6776if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
6777  eval 'as_fn_append ()
6778  {
6779    eval $1+=\$2
6780  }'
6781else
6782  as_fn_append ()
6783  {
6784    eval $1=\$$1\$2
6785  }
6786fi # as_fn_append
6787
6788# as_fn_arith ARG...
6789# ------------------
6790# Perform arithmetic evaluation on the ARGs, and store the result in the
6791# global $as_val. Take advantage of shells that can avoid forks. The arguments
6792# must be portable across $(()) and expr.
6793if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
6794  eval 'as_fn_arith ()
6795  {
6796    as_val=$(( $* ))
6797  }'
6798else
6799  as_fn_arith ()
6800  {
6801    as_val=`expr "$@" || test $? -eq 1`
6802  }
6803fi # as_fn_arith
6804
6805
6806if expr a : '\(a\)' >/dev/null 2>&1 &&
6807   test "X`expr 00001 : '.*\(...\)'`" = X001; then
6808  as_expr=expr
6809else
6810  as_expr=false
6811fi
6812
6813if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
6814  as_basename=basename
6815else
6816  as_basename=false
6817fi
6818
6819if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
6820  as_dirname=dirname
6821else
6822  as_dirname=false
6823fi
6824
6825as_me=`$as_basename -- "$0" ||
6826$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
6827	 X"$0" : 'X\(//\)$' \| \
6828	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
6829$as_echo X/"$0" |
6830    sed '/^.*\/\([^/][^/]*\)\/*$/{
6831	    s//\1/
6832	    q
6833	  }
6834	  /^X\/\(\/\/\)$/{
6835	    s//\1/
6836	    q
6837	  }
6838	  /^X\/\(\/\).*/{
6839	    s//\1/
6840	    q
6841	  }
6842	  s/.*/./; q'`
6843
6844# Avoid depending upon Character Ranges.
6845as_cr_letters='abcdefghijklmnopqrstuvwxyz'
6846as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
6847as_cr_Letters=$as_cr_letters$as_cr_LETTERS
6848as_cr_digits='0123456789'
6849as_cr_alnum=$as_cr_Letters$as_cr_digits
6850
6851ECHO_C= ECHO_N= ECHO_T=
6852case `echo -n x` in #(((((
6853-n*)
6854  case `echo 'xy\c'` in
6855  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
6856  xy)  ECHO_C='\c';;
6857  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
6858       ECHO_T='	';;
6859  esac;;
6860*)
6861  ECHO_N='-n';;
6862esac
6863
6864rm -f conf$$ conf$$.exe conf$$.file
6865if test -d conf$$.dir; then
6866  rm -f conf$$.dir/conf$$.file
6867else
6868  rm -f conf$$.dir
6869  mkdir conf$$.dir 2>/dev/null
6870fi
6871if (echo >conf$$.file) 2>/dev/null; then
6872  if ln -s conf$$.file conf$$ 2>/dev/null; then
6873    as_ln_s='ln -s'
6874    # ... but there are two gotchas:
6875    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
6876    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
6877    # In both cases, we have to default to `cp -pR'.
6878    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
6879      as_ln_s='cp -pR'
6880  elif ln conf$$.file conf$$ 2>/dev/null; then
6881    as_ln_s=ln
6882  else
6883    as_ln_s='cp -pR'
6884  fi
6885else
6886  as_ln_s='cp -pR'
6887fi
6888rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
6889rmdir conf$$.dir 2>/dev/null
6890
6891
6892# as_fn_mkdir_p
6893# -------------
6894# Create "$as_dir" as a directory, including parents if necessary.
6895as_fn_mkdir_p ()
6896{
6897
6898  case $as_dir in #(
6899  -*) as_dir=./$as_dir;;
6900  esac
6901  test -d "$as_dir" || eval $as_mkdir_p || {
6902    as_dirs=
6903    while :; do
6904      case $as_dir in #(
6905      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
6906      *) as_qdir=$as_dir;;
6907      esac
6908      as_dirs="'$as_qdir' $as_dirs"
6909      as_dir=`$as_dirname -- "$as_dir" ||
6910$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
6911	 X"$as_dir" : 'X\(//\)[^/]' \| \
6912	 X"$as_dir" : 'X\(//\)$' \| \
6913	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
6914$as_echo X"$as_dir" |
6915    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
6916	    s//\1/
6917	    q
6918	  }
6919	  /^X\(\/\/\)[^/].*/{
6920	    s//\1/
6921	    q
6922	  }
6923	  /^X\(\/\/\)$/{
6924	    s//\1/
6925	    q
6926	  }
6927	  /^X\(\/\).*/{
6928	    s//\1/
6929	    q
6930	  }
6931	  s/.*/./; q'`
6932      test -d "$as_dir" && break
6933    done
6934    test -z "$as_dirs" || eval "mkdir $as_dirs"
6935  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
6936
6937
6938} # as_fn_mkdir_p
6939if mkdir -p . 2>/dev/null; then
6940  as_mkdir_p='mkdir -p "$as_dir"'
6941else
6942  test -d ./-p && rmdir ./-p
6943  as_mkdir_p=false
6944fi
6945
6946
6947# as_fn_executable_p FILE
6948# -----------------------
6949# Test if FILE is an executable regular file.
6950as_fn_executable_p ()
6951{
6952  test -f "$1" && test -x "$1"
6953} # as_fn_executable_p
6954as_test_x='test -x'
6955as_executable_p=as_fn_executable_p
6956
6957# Sed expression to map a string onto a valid CPP name.
6958as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
6959
6960# Sed expression to map a string onto a valid variable name.
6961as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
6962
6963
6964exec 6>&1
6965## ----------------------------------- ##
6966## Main body of $CONFIG_STATUS script. ##
6967## ----------------------------------- ##
6968_ASEOF
6969test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
6970
6971cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
6972# Save the log message, to keep $0 and so on meaningful, and to
6973# report actual input values of CONFIG_FILES etc. instead of their
6974# values after options handling.
6975ac_log="
6976This file was extended by pspg $as_me 0, which was
6977generated by GNU Autoconf 2.69.  Invocation command line was
6978
6979  CONFIG_FILES    = $CONFIG_FILES
6980  CONFIG_HEADERS  = $CONFIG_HEADERS
6981  CONFIG_LINKS    = $CONFIG_LINKS
6982  CONFIG_COMMANDS = $CONFIG_COMMANDS
6983  $ $0 $@
6984
6985on `(hostname || uname -n) 2>/dev/null | sed 1q`
6986"
6987
6988_ACEOF
6989
6990case $ac_config_files in *"
6991"*) set x $ac_config_files; shift; ac_config_files=$*;;
6992esac
6993
6994
6995
6996cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
6997# Files that config.status was made for.
6998config_files="$ac_config_files"
6999
7000_ACEOF
7001
7002cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
7003ac_cs_usage="\
7004\`$as_me' instantiates files and other configuration actions
7005from templates according to the current configuration.  Unless the files
7006and actions are specified as TAGs, all are instantiated by default.
7007
7008Usage: $0 [OPTION]... [TAG]...
7009
7010  -h, --help       print this help, then exit
7011  -V, --version    print version number and configuration settings, then exit
7012      --config     print configuration, then exit
7013  -q, --quiet, --silent
7014                   do not print progress messages
7015  -d, --debug      don't remove temporary files
7016      --recheck    update $as_me by reconfiguring in the same conditions
7017      --file=FILE[:TEMPLATE]
7018                   instantiate the configuration file FILE
7019
7020Configuration files:
7021$config_files
7022
7023Report bugs to <pavel.stehule@gmail.com>."
7024
7025_ACEOF
7026cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
7027ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
7028ac_cs_version="\\
7029pspg config.status 0
7030configured by $0, generated by GNU Autoconf 2.69,
7031  with options \\"\$ac_cs_config\\"
7032
7033Copyright (C) 2012 Free Software Foundation, Inc.
7034This config.status script is free software; the Free Software Foundation
7035gives unlimited permission to copy, distribute and modify it."
7036
7037ac_pwd='$ac_pwd'
7038srcdir='$srcdir'
7039AWK='$AWK'
7040test -n "\$AWK" || AWK=awk
7041_ACEOF
7042
7043cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
7044# The default lists apply if the user does not specify any file.
7045ac_need_defaults=:
7046while test $# != 0
7047do
7048  case $1 in
7049  --*=?*)
7050    ac_option=`expr "X$1" : 'X\([^=]*\)='`
7051    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
7052    ac_shift=:
7053    ;;
7054  --*=)
7055    ac_option=`expr "X$1" : 'X\([^=]*\)='`
7056    ac_optarg=
7057    ac_shift=:
7058    ;;
7059  *)
7060    ac_option=$1
7061    ac_optarg=$2
7062    ac_shift=shift
7063    ;;
7064  esac
7065
7066  case $ac_option in
7067  # Handling of the options.
7068  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
7069    ac_cs_recheck=: ;;
7070  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
7071    $as_echo "$ac_cs_version"; exit ;;
7072  --config | --confi | --conf | --con | --co | --c )
7073    $as_echo "$ac_cs_config"; exit ;;
7074  --debug | --debu | --deb | --de | --d | -d )
7075    debug=: ;;
7076  --file | --fil | --fi | --f )
7077    $ac_shift
7078    case $ac_optarg in
7079    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
7080    '') as_fn_error $? "missing file argument" ;;
7081    esac
7082    as_fn_append CONFIG_FILES " '$ac_optarg'"
7083    ac_need_defaults=false;;
7084  --he | --h |  --help | --hel | -h )
7085    $as_echo "$ac_cs_usage"; exit ;;
7086  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
7087  | -silent | --silent | --silen | --sile | --sil | --si | --s)
7088    ac_cs_silent=: ;;
7089
7090  # This is an error.
7091  -*) as_fn_error $? "unrecognized option: \`$1'
7092Try \`$0 --help' for more information." ;;
7093
7094  *) as_fn_append ac_config_targets " $1"
7095     ac_need_defaults=false ;;
7096
7097  esac
7098  shift
7099done
7100
7101ac_configure_extra_args=
7102
7103if $ac_cs_silent; then
7104  exec 6>/dev/null
7105  ac_configure_extra_args="$ac_configure_extra_args --silent"
7106fi
7107
7108_ACEOF
7109cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
7110if \$ac_cs_recheck; then
7111  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
7112  shift
7113  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
7114  CONFIG_SHELL='$SHELL'
7115  export CONFIG_SHELL
7116  exec "\$@"
7117fi
7118
7119_ACEOF
7120cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
7121exec 5>>config.log
7122{
7123  echo
7124  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
7125## Running $as_me. ##
7126_ASBOX
7127  $as_echo "$ac_log"
7128} >&5
7129
7130_ACEOF
7131cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
7132_ACEOF
7133
7134cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
7135
7136# Handling of arguments.
7137for ac_config_target in $ac_config_targets
7138do
7139  case $ac_config_target in
7140    "config.make") CONFIG_FILES="$CONFIG_FILES config.make" ;;
7141
7142  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
7143  esac
7144done
7145
7146
7147# If the user did not use the arguments to specify the items to instantiate,
7148# then the envvar interface is used.  Set only those that are not.
7149# We use the long form for the default assignment because of an extremely
7150# bizarre bug on SunOS 4.1.3.
7151if $ac_need_defaults; then
7152  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
7153fi
7154
7155# Have a temporary directory for convenience.  Make it in the build tree
7156# simply because there is no reason against having it here, and in addition,
7157# creating and moving files from /tmp can sometimes cause problems.
7158# Hook for its removal unless debugging.
7159# Note that there is a small window in which the directory will not be cleaned:
7160# after its creation but before its name has been assigned to `$tmp'.
7161$debug ||
7162{
7163  tmp= ac_tmp=
7164  trap 'exit_status=$?
7165  : "${ac_tmp:=$tmp}"
7166  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
7167' 0
7168  trap 'as_fn_exit 1' 1 2 13 15
7169}
7170# Create a (secure) tmp directory for tmp files.
7171
7172{
7173  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
7174  test -d "$tmp"
7175}  ||
7176{
7177  tmp=./conf$$-$RANDOM
7178  (umask 077 && mkdir "$tmp")
7179} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
7180ac_tmp=$tmp
7181
7182# Set up the scripts for CONFIG_FILES section.
7183# No need to generate them if there are no CONFIG_FILES.
7184# This happens for instance with `./config.status config.h'.
7185if test -n "$CONFIG_FILES"; then
7186
7187
7188ac_cr=`echo X | tr X '\015'`
7189# On cygwin, bash can eat \r inside `` if the user requested igncr.
7190# But we know of no other shell where ac_cr would be empty at this
7191# point, so we can use a bashism as a fallback.
7192if test "x$ac_cr" = x; then
7193  eval ac_cr=\$\'\\r\'
7194fi
7195ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
7196if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
7197  ac_cs_awk_cr='\\r'
7198else
7199  ac_cs_awk_cr=$ac_cr
7200fi
7201
7202echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
7203_ACEOF
7204
7205
7206{
7207  echo "cat >conf$$subs.awk <<_ACEOF" &&
7208  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
7209  echo "_ACEOF"
7210} >conf$$subs.sh ||
7211  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
7212ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
7213ac_delim='%!_!# '
7214for ac_last_try in false false false false false :; do
7215  . ./conf$$subs.sh ||
7216    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
7217
7218  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
7219  if test $ac_delim_n = $ac_delim_num; then
7220    break
7221  elif $ac_last_try; then
7222    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
7223  else
7224    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
7225  fi
7226done
7227rm -f conf$$subs.sh
7228
7229cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
7230cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
7231_ACEOF
7232sed -n '
7233h
7234s/^/S["/; s/!.*/"]=/
7235p
7236g
7237s/^[^!]*!//
7238:repl
7239t repl
7240s/'"$ac_delim"'$//
7241t delim
7242:nl
7243h
7244s/\(.\{148\}\)..*/\1/
7245t more1
7246s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
7247p
7248n
7249b repl
7250:more1
7251s/["\\]/\\&/g; s/^/"/; s/$/"\\/
7252p
7253g
7254s/.\{148\}//
7255t nl
7256:delim
7257h
7258s/\(.\{148\}\)..*/\1/
7259t more2
7260s/["\\]/\\&/g; s/^/"/; s/$/"/
7261p
7262b
7263:more2
7264s/["\\]/\\&/g; s/^/"/; s/$/"\\/
7265p
7266g
7267s/.\{148\}//
7268t delim
7269' <conf$$subs.awk | sed '
7270/^[^""]/{
7271  N
7272  s/\n//
7273}
7274' >>$CONFIG_STATUS || ac_write_fail=1
7275rm -f conf$$subs.awk
7276cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
7277_ACAWK
7278cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
7279  for (key in S) S_is_set[key] = 1
7280  FS = ""
7281
7282}
7283{
7284  line = $ 0
7285  nfields = split(line, field, "@")
7286  substed = 0
7287  len = length(field[1])
7288  for (i = 2; i < nfields; i++) {
7289    key = field[i]
7290    keylen = length(key)
7291    if (S_is_set[key]) {
7292      value = S[key]
7293      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
7294      len += length(value) + length(field[++i])
7295      substed = 1
7296    } else
7297      len += 1 + keylen
7298  }
7299
7300  print line
7301}
7302
7303_ACAWK
7304_ACEOF
7305cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
7306if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
7307  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
7308else
7309  cat
7310fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
7311  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
7312_ACEOF
7313
7314# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
7315# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
7316# trailing colons and then remove the whole line if VPATH becomes empty
7317# (actually we leave an empty line to preserve line numbers).
7318if test "x$srcdir" = x.; then
7319  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
7320h
7321s///
7322s/^/:/
7323s/[	 ]*$/:/
7324s/:\$(srcdir):/:/g
7325s/:\${srcdir}:/:/g
7326s/:@srcdir@:/:/g
7327s/^:*//
7328s/:*$//
7329x
7330s/\(=[	 ]*\).*/\1/
7331G
7332s/\n//
7333s/^[^=]*=[	 ]*$//
7334}'
7335fi
7336
7337cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
7338fi # test -n "$CONFIG_FILES"
7339
7340
7341eval set X "  :F $CONFIG_FILES      "
7342shift
7343for ac_tag
7344do
7345  case $ac_tag in
7346  :[FHLC]) ac_mode=$ac_tag; continue;;
7347  esac
7348  case $ac_mode$ac_tag in
7349  :[FHL]*:*);;
7350  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
7351  :[FH]-) ac_tag=-:-;;
7352  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
7353  esac
7354  ac_save_IFS=$IFS
7355  IFS=:
7356  set x $ac_tag
7357  IFS=$ac_save_IFS
7358  shift
7359  ac_file=$1
7360  shift
7361
7362  case $ac_mode in
7363  :L) ac_source=$1;;
7364  :[FH])
7365    ac_file_inputs=
7366    for ac_f
7367    do
7368      case $ac_f in
7369      -) ac_f="$ac_tmp/stdin";;
7370      *) # Look for the file first in the build tree, then in the source tree
7371	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
7372	 # because $ac_f cannot contain `:'.
7373	 test -f "$ac_f" ||
7374	   case $ac_f in
7375	   [\\/$]*) false;;
7376	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
7377	   esac ||
7378	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
7379      esac
7380      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
7381      as_fn_append ac_file_inputs " '$ac_f'"
7382    done
7383
7384    # Let's still pretend it is `configure' which instantiates (i.e., don't
7385    # use $as_me), people would be surprised to read:
7386    #    /* config.h.  Generated by config.status.  */
7387    configure_input='Generated from '`
7388	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
7389	`' by configure.'
7390    if test x"$ac_file" != x-; then
7391      configure_input="$ac_file.  $configure_input"
7392      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
7393$as_echo "$as_me: creating $ac_file" >&6;}
7394    fi
7395    # Neutralize special characters interpreted by sed in replacement strings.
7396    case $configure_input in #(
7397    *\&* | *\|* | *\\* )
7398       ac_sed_conf_input=`$as_echo "$configure_input" |
7399       sed 's/[\\\\&|]/\\\\&/g'`;; #(
7400    *) ac_sed_conf_input=$configure_input;;
7401    esac
7402
7403    case $ac_tag in
7404    *:-:* | *:-) cat >"$ac_tmp/stdin" \
7405      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
7406    esac
7407    ;;
7408  esac
7409
7410  ac_dir=`$as_dirname -- "$ac_file" ||
7411$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
7412	 X"$ac_file" : 'X\(//\)[^/]' \| \
7413	 X"$ac_file" : 'X\(//\)$' \| \
7414	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
7415$as_echo X"$ac_file" |
7416    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
7417	    s//\1/
7418	    q
7419	  }
7420	  /^X\(\/\/\)[^/].*/{
7421	    s//\1/
7422	    q
7423	  }
7424	  /^X\(\/\/\)$/{
7425	    s//\1/
7426	    q
7427	  }
7428	  /^X\(\/\).*/{
7429	    s//\1/
7430	    q
7431	  }
7432	  s/.*/./; q'`
7433  as_dir="$ac_dir"; as_fn_mkdir_p
7434  ac_builddir=.
7435
7436case "$ac_dir" in
7437.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
7438*)
7439  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
7440  # A ".." for each directory in $ac_dir_suffix.
7441  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
7442  case $ac_top_builddir_sub in
7443  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
7444  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
7445  esac ;;
7446esac
7447ac_abs_top_builddir=$ac_pwd
7448ac_abs_builddir=$ac_pwd$ac_dir_suffix
7449# for backward compatibility:
7450ac_top_builddir=$ac_top_build_prefix
7451
7452case $srcdir in
7453  .)  # We are building in place.
7454    ac_srcdir=.
7455    ac_top_srcdir=$ac_top_builddir_sub
7456    ac_abs_top_srcdir=$ac_pwd ;;
7457  [\\/]* | ?:[\\/]* )  # Absolute name.
7458    ac_srcdir=$srcdir$ac_dir_suffix;
7459    ac_top_srcdir=$srcdir
7460    ac_abs_top_srcdir=$srcdir ;;
7461  *) # Relative name.
7462    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
7463    ac_top_srcdir=$ac_top_build_prefix$srcdir
7464    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
7465esac
7466ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
7467
7468
7469  case $ac_mode in
7470  :F)
7471  #
7472  # CONFIG_FILE
7473  #
7474
7475_ACEOF
7476
7477cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
7478# If the template does not know about datarootdir, expand it.
7479# FIXME: This hack should be removed a few years after 2.60.
7480ac_datarootdir_hack=; ac_datarootdir_seen=
7481ac_sed_dataroot='
7482/datarootdir/ {
7483  p
7484  q
7485}
7486/@datadir@/p
7487/@docdir@/p
7488/@infodir@/p
7489/@localedir@/p
7490/@mandir@/p'
7491case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
7492*datarootdir*) ac_datarootdir_seen=yes;;
7493*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
7494  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
7495$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
7496_ACEOF
7497cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
7498  ac_datarootdir_hack='
7499  s&@datadir@&$datadir&g
7500  s&@docdir@&$docdir&g
7501  s&@infodir@&$infodir&g
7502  s&@localedir@&$localedir&g
7503  s&@mandir@&$mandir&g
7504  s&\\\${datarootdir}&$datarootdir&g' ;;
7505esac
7506_ACEOF
7507
7508# Neutralize VPATH when `$srcdir' = `.'.
7509# Shell code in configure.ac might set extrasub.
7510# FIXME: do we really want to maintain this feature?
7511cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
7512ac_sed_extra="$ac_vpsub
7513$extrasub
7514_ACEOF
7515cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
7516:t
7517/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
7518s|@configure_input@|$ac_sed_conf_input|;t t
7519s&@top_builddir@&$ac_top_builddir_sub&;t t
7520s&@top_build_prefix@&$ac_top_build_prefix&;t t
7521s&@srcdir@&$ac_srcdir&;t t
7522s&@abs_srcdir@&$ac_abs_srcdir&;t t
7523s&@top_srcdir@&$ac_top_srcdir&;t t
7524s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
7525s&@builddir@&$ac_builddir&;t t
7526s&@abs_builddir@&$ac_abs_builddir&;t t
7527s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
7528$ac_datarootdir_hack
7529"
7530eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
7531  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
7532
7533test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
7534  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
7535  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
7536      "$ac_tmp/out"`; test -z "$ac_out"; } &&
7537  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
7538which seems to be undefined.  Please make sure it is defined" >&5
7539$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
7540which seems to be undefined.  Please make sure it is defined" >&2;}
7541
7542  rm -f "$ac_tmp/stdin"
7543  case $ac_file in
7544  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
7545  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
7546  esac \
7547  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
7548 ;;
7549
7550
7551
7552  esac
7553
7554done # for ac_tag
7555
7556
7557as_fn_exit 0
7558_ACEOF
7559ac_clean_files=$ac_clean_files_save
7560
7561test $ac_write_fail = 0 ||
7562  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
7563
7564
7565# configure is writing to config.log, and then calls config.status.
7566# config.status does its own redirection, appending to config.log.
7567# Unfortunately, on DOS this fails, as config.log is still kept open
7568# by configure, so config.status won't be able to write to it; its
7569# output is simply discarded.  So we exec the FD to /dev/null,
7570# effectively closing config.log, so it can be properly (re)opened and
7571# appended to by config.status.  When coming back to configure, we
7572# need to make the FD available again.
7573if test "$no_create" != yes; then
7574  ac_cs_success=:
7575  ac_config_status_args=
7576  test "$silent" = yes &&
7577    ac_config_status_args="$ac_config_status_args --quiet"
7578  exec 5>/dev/null
7579  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
7580  exec 5>>config.log
7581  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
7582  # would make configure fail if this is the last instruction.
7583  $ac_cs_success || as_fn_exit 1
7584fi
7585if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
7586  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
7587$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
7588fi
7589
7590