source: trunk/configure

Last change on this file was 1453, checked in by MatthewWhiting, 4 years ago

Adding the updated configure script as well

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