source: trunk/configure @ 1060

Last change on this file since 1060 was 1060, checked in by MatthewWhiting, 12 years ago

Reverting back to AC_PATH_XTRA() for the moment

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