source: trunk/configure @ 890

Last change on this file since 890 was 853, checked in by MatthewWhiting, 13 years ago

Updating version to 1.1.13. Other minor updates to README as well.

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