source: trunk/configure @ 1058

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

OK, reverting back - the previous just failed on the mac...

  • Property svn:executable set to *
File size: 219.5 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#  AC_PATH_X
5493  { $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
5494$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;}
5495  # returns C compiler flags needed for X to X_CFLAGS and the X linker flags to X_LIBS
5496  if test "x$X_LIBS" != x; then
5497    LDFLAGS="$LDFLAGS $X_LIBS"
5498    EXTRAPGLIB="$X_LIBS $X_PRE_LIBS -lX11 $EXTRAPGLIB"
5499  fi
5500
5501#  # Add pgplot libraries, if they exist to the lib path
5502#  for LIBDIR in $PGPLOTLIBDIRS ; do
5503#    AC_CHECK_FILE([$LIBDIR/libcpgplot.a], [PGPLOTLIB="-L$LIBDIR $PGPLOTLIB"; break])
5504#  done
5505
5506  # It is possible that other libraries may be required depending on what
5507  # graphics drivers were installed with PGPLOT.
5508  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for deflate in -lz" >&5
5509$as_echo_n "checking for deflate in -lz... " >&6; }
5510if ${ac_cv_lib_z_deflate+:} false; then :
5511  $as_echo_n "(cached) " >&6
5512else
5513  ac_check_lib_save_LIBS=$LIBS
5514LIBS="-lz $EXTRAPGLIB $LIBS $LIBS"
5515cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5516/* end confdefs.h.  */
5517
5518/* Override any GCC internal prototype to avoid an error.
5519   Use char because int might match the return type of a GCC
5520   builtin and then its argument prototype would still apply.  */
5521#ifdef __cplusplus
5522extern "C"
5523#endif
5524char deflate ();
5525int
5526main ()
5527{
5528return deflate ();
5529  ;
5530  return 0;
5531}
5532_ACEOF
5533if ac_fn_c_try_link "$LINENO"; then :
5534  ac_cv_lib_z_deflate=yes
5535else
5536  ac_cv_lib_z_deflate=no
5537fi
5538rm -f core conftest.err conftest.$ac_objext \
5539    conftest$ac_exeext conftest.$ac_ext
5540LIBS=$ac_check_lib_save_LIBS
5541fi
5542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_deflate" >&5
5543$as_echo "$ac_cv_lib_z_deflate" >&6; }
5544if test "x$ac_cv_lib_z_deflate" = xyes; then :
5545  EXTRAPGLIB="$EXTRAPGLIB -lz"
5546fi
5547
5548  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_error in -lpng" >&5
5549$as_echo_n "checking for png_error in -lpng... " >&6; }
5550if ${ac_cv_lib_png_png_error+:} false; then :
5551  $as_echo_n "(cached) " >&6
5552else
5553  ac_check_lib_save_LIBS=$LIBS
5554LIBS="-lpng $EXTRAPGLIB $LIBS $LIBS"
5555cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5556/* end confdefs.h.  */
5557
5558/* Override any GCC internal prototype to avoid an error.
5559   Use char because int might match the return type of a GCC
5560   builtin and then its argument prototype would still apply.  */
5561#ifdef __cplusplus
5562extern "C"
5563#endif
5564char png_error ();
5565int
5566main ()
5567{
5568return png_error ();
5569  ;
5570  return 0;
5571}
5572_ACEOF
5573if ac_fn_c_try_link "$LINENO"; then :
5574  ac_cv_lib_png_png_error=yes
5575else
5576  ac_cv_lib_png_png_error=no
5577fi
5578rm -f core conftest.err conftest.$ac_objext \
5579    conftest$ac_exeext conftest.$ac_ext
5580LIBS=$ac_check_lib_save_LIBS
5581fi
5582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png_png_error" >&5
5583$as_echo "$ac_cv_lib_png_png_error" >&6; }
5584if test "x$ac_cv_lib_png_png_error" = xyes; then :
5585  EXTRAPGLIB="$EXTRAPGLIB -lpng"
5586fi
5587
5588
5589  ac_ext=f
5590ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
5591ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5592ac_compiler_gnu=$ac_cv_f77_compiler_gnu
5593
5594
5595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pgopen in -lpgplot" >&5
5596$as_echo_n "checking for pgopen in -lpgplot... " >&6; }
5597if ${ac_cv_lib_pgplot_pgopen+:} false; then :
5598  $as_echo_n "(cached) " >&6
5599else
5600  ac_check_lib_save_LIBS=$LIBS
5601LIBS="-lpgplot $PGPLOTLIB $EXTRAPGLIB $LIBS"
5602cat > conftest.$ac_ext <<_ACEOF
5603      program main
5604      call pgopen
5605      end
5606_ACEOF
5607if ac_fn_f77_try_link "$LINENO"; then :
5608  ac_cv_lib_pgplot_pgopen=yes
5609else
5610  ac_cv_lib_pgplot_pgopen=no
5611fi
5612rm -f core conftest.err conftest.$ac_objext \
5613    conftest$ac_exeext conftest.$ac_ext
5614LIBS=$ac_check_lib_save_LIBS
5615fi
5616{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pgplot_pgopen" >&5
5617$as_echo "$ac_cv_lib_pgplot_pgopen" >&6; }
5618if test "x$ac_cv_lib_pgplot_pgopen" = xyes; then :
5619  PGPLOTLIB="-lpgplot"
5620fi
5621
5622  ac_ext=c
5623ac_cpp='$CPP $CPPFLAGS'
5624ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5625ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5626ac_compiler_gnu=$ac_cv_c_compiler_gnu
5627
5628  # Checks for extra libraries needed by PGPLOT -- will add -lg2c -lstdc++ to $LIBS
5629  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gerror_ in -lg2c" >&5
5630$as_echo_n "checking for gerror_ in -lg2c... " >&6; }
5631if ${ac_cv_lib_g2c_gerror_+:} false; then :
5632  $as_echo_n "(cached) " >&6
5633else
5634  ac_check_lib_save_LIBS=$LIBS
5635LIBS="-lg2c  $LIBS"
5636cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5637/* end confdefs.h.  */
5638
5639/* Override any GCC internal prototype to avoid an error.
5640   Use char because int might match the return type of a GCC
5641   builtin and then its argument prototype would still apply.  */
5642#ifdef __cplusplus
5643extern "C"
5644#endif
5645char gerror_ ();
5646int
5647main ()
5648{
5649return gerror_ ();
5650  ;
5651  return 0;
5652}
5653_ACEOF
5654if ac_fn_c_try_link "$LINENO"; then :
5655  ac_cv_lib_g2c_gerror_=yes
5656else
5657  ac_cv_lib_g2c_gerror_=no
5658fi
5659rm -f core conftest.err conftest.$ac_objext \
5660    conftest$ac_exeext conftest.$ac_ext
5661LIBS=$ac_check_lib_save_LIBS
5662fi
5663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_g2c_gerror_" >&5
5664$as_echo "$ac_cv_lib_g2c_gerror_" >&6; }
5665if test "x$ac_cv_lib_g2c_gerror_" = xyes; then :
5666  cat >>confdefs.h <<_ACEOF
5667#define HAVE_LIBG2C 1
5668_ACEOF
5669
5670  LIBS="-lg2c $LIBS"
5671
5672fi
5673
5674  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lstdc++" >&5
5675$as_echo_n "checking for main in -lstdc++... " >&6; }
5676if ${ac_cv_lib_stdcpp_main+:} false; then :
5677  $as_echo_n "(cached) " >&6
5678else
5679  ac_check_lib_save_LIBS=$LIBS
5680LIBS="-lstdc++  $LIBS"
5681cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5682/* end confdefs.h.  */
5683
5684
5685int
5686main ()
5687{
5688return main ();
5689  ;
5690  return 0;
5691}
5692_ACEOF
5693if ac_fn_c_try_link "$LINENO"; then :
5694  ac_cv_lib_stdcpp_main=yes
5695else
5696  ac_cv_lib_stdcpp_main=no
5697fi
5698rm -f core conftest.err conftest.$ac_objext \
5699    conftest$ac_exeext conftest.$ac_ext
5700LIBS=$ac_check_lib_save_LIBS
5701fi
5702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_stdcpp_main" >&5
5703$as_echo "$ac_cv_lib_stdcpp_main" >&6; }
5704if test "x$ac_cv_lib_stdcpp_main" = xyes; then :
5705  cat >>confdefs.h <<_ACEOF
5706#define HAVE_LIBSTDC__ 1
5707_ACEOF
5708
5709  LIBS="-lstdc++ $LIBS"
5710
5711fi
5712
5713  if test "x$F77" = xgfortran; then
5714    PGPLOTLIB="-lcpgplot $PGPLOTLIB"
5715    { $as_echo "$as_me:${as_lineno-$LINENO}:  Using gfortran, so manually adding -lcpgplot to PGPLOTLIB string." >&5
5716$as_echo "$as_me:  Using gfortran, so manually adding -lcpgplot to PGPLOTLIB string." >&6;}
5717  else
5718    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cpgopen in -lcpgplot" >&5
5719$as_echo_n "checking for cpgopen in -lcpgplot... " >&6; }
5720if ${ac_cv_lib_cpgplot_cpgopen+:} false; then :
5721  $as_echo_n "(cached) " >&6
5722else
5723  ac_check_lib_save_LIBS=$LIBS
5724LIBS="-lcpgplot $PGPLOTLIB $LIBS $EXTRAPGLIB $LIBS"
5725cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5726/* end confdefs.h.  */
5727
5728/* Override any GCC internal prototype to avoid an error.
5729   Use char because int might match the return type of a GCC
5730   builtin and then its argument prototype would still apply.  */
5731#ifdef __cplusplus
5732extern "C"
5733#endif
5734char cpgopen ();
5735int
5736main ()
5737{
5738return cpgopen ();
5739  ;
5740  return 0;
5741}
5742_ACEOF
5743if ac_fn_c_try_link "$LINENO"; then :
5744  ac_cv_lib_cpgplot_cpgopen=yes
5745else
5746  ac_cv_lib_cpgplot_cpgopen=no
5747fi
5748rm -f core conftest.err conftest.$ac_objext \
5749    conftest$ac_exeext conftest.$ac_ext
5750LIBS=$ac_check_lib_save_LIBS
5751fi
5752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cpgplot_cpgopen" >&5
5753$as_echo "$ac_cv_lib_cpgplot_cpgopen" >&6; }
5754if test "x$ac_cv_lib_cpgplot_cpgopen" = xyes; then :
5755  PGPLOTLIB="-lcpgplot $PGPLOTLIB"
5756fi
5757
5758  fi
5759
5760  # If PGPLOT is not present, we give a warning message but still continue.
5761  # The compilation is able to work without the PGPLOT-dependent files.
5762  if test "x$PGPLOTLIB" = x; then
5763    { $as_echo "$as_me:${as_lineno-$LINENO}:
5764      -------------------------------------------------------
5765      WARNING! PGPLOT could not be found.
5766      Compiling Duchamp without graphics capabilities.
5767      -------------------------------------------------------" >&5
5768$as_echo "$as_me:
5769      -------------------------------------------------------
5770      WARNING! PGPLOT could not be found.
5771      Compiling Duchamp without graphics capabilities.
5772      -------------------------------------------------------" >&6;}
5773    #We have no pgplot, so we just link with g++ (or equivalent)
5774    LINKER=$CXX
5775  else
5776    #We are using pgplot, so link with the fortran compiler.
5777    LINKER=$F77
5778    PGPLOTLIB="$PGPLOTLIB $EXTRAPGLIB $LIBS"
5779    { $as_echo "$as_me:${as_lineno-$LINENO}: PGPLOT appears to be available." >&5
5780$as_echo "$as_me: PGPLOT appears to be available." >&6;}
5781
5782$as_echo "#define HAVE_PGPLOT 1" >>confdefs.h
5783
5784    for LIBDIR in $PGPLOTLIBDIRS ; do
5785     as_ac_File=`$as_echo "ac_cv_file_$LIBDIR/libcpgplot.a" | $as_tr_sh`
5786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LIBDIR/libcpgplot.a" >&5
5787$as_echo_n "checking for $LIBDIR/libcpgplot.a... " >&6; }
5788if eval \${$as_ac_File+:} false; then :
5789  $as_echo_n "(cached) " >&6
5790else
5791  test "$cross_compiling" = yes &&
5792  as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
5793if test -r "$LIBDIR/libcpgplot.a"; then
5794  eval "$as_ac_File=yes"
5795else
5796  eval "$as_ac_File=no"
5797fi
5798fi
5799eval ac_res=\$$as_ac_File
5800               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5801$as_echo "$ac_res" >&6; }
5802if eval test \"x\$"$as_ac_File"\" = x"yes"; then :
5803  PGPLOTLIB="-L$LIBDIR $PGPLOTLIB"; break
5804fi
5805
5806     as_ac_File=`$as_echo "ac_cv_file_$LIBDIR/lib/libcpgplot.a" | $as_tr_sh`
5807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LIBDIR/lib/libcpgplot.a" >&5
5808$as_echo_n "checking for $LIBDIR/lib/libcpgplot.a... " >&6; }
5809if eval \${$as_ac_File+:} false; then :
5810  $as_echo_n "(cached) " >&6
5811else
5812  test "$cross_compiling" = yes &&
5813  as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
5814if test -r "$LIBDIR/lib/libcpgplot.a"; then
5815  eval "$as_ac_File=yes"
5816else
5817  eval "$as_ac_File=no"
5818fi
5819fi
5820eval ac_res=\$$as_ac_File
5821               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5822$as_echo "$ac_res" >&6; }
5823if eval test \"x\$"$as_ac_File"\" = x"yes"; then :
5824  PGPLOTLIB="-L$LIBDIR/lib $PGPLOTLIB"; break
5825fi
5826
5827     as_ac_File=`$as_echo "ac_cv_file_$LIBDIR/pgplot/libcpgplot.a" | $as_tr_sh`
5828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LIBDIR/pgplot/libcpgplot.a" >&5
5829$as_echo_n "checking for $LIBDIR/pgplot/libcpgplot.a... " >&6; }
5830if eval \${$as_ac_File+:} false; then :
5831  $as_echo_n "(cached) " >&6
5832else
5833  test "$cross_compiling" = yes &&
5834  as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
5835if test -r "$LIBDIR/pgplot/libcpgplot.a"; then
5836  eval "$as_ac_File=yes"
5837else
5838  eval "$as_ac_File=no"
5839fi
5840fi
5841eval ac_res=\$$as_ac_File
5842               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5843$as_echo "$ac_res" >&6; }
5844if eval test \"x\$"$as_ac_File"\" = x"yes"; then :
5845  PGPLOTLIB="-L$LIBDIR/pgplot $PGPLOTLIB"; break
5846fi
5847
5848    done
5849#    if test "x$F77" = xgfortran; then
5850#      PGPLOTLIB="$PGPLOTLIB -bind_at_load"
5851#    fi
5852  fi
5853
5854fi
5855
5856
5857
5858
5859##########################################################################
5860
5861##########################################################################
5862# Search for CFITSIO.
5863# use --with-cfitsio=directory to specify a particular CFITSIO directory.
5864# else do the normal searching for libraries.
5865
5866{ $as_echo "$as_me:${as_lineno-$LINENO}:   -- CFITSIO -- " >&5
5867$as_echo "$as_me:   -- CFITSIO -- " >&6;}
5868
5869# Check whether --with-cfitsio was given.
5870if test "${with_cfitsio+set}" = set; then :
5871  withval=$with_cfitsio;  #if we specify a directory...
5872if test "x$withval" = xno; then
5873  { $as_echo "$as_me:${as_lineno-$LINENO}:
5874    The CFITSIO library is required.
5875    Ignoring the \"--with-cfitsio=no\" and searching for the library." >&5
5876$as_echo "$as_me:
5877    The CFITSIO library is required.
5878    Ignoring the \"--with-cfitsio=no\" and searching for the library." >&1;}
5879  CFITSIOINCDIRS=$INCDIRS
5880  CFITSIOLIBDIRS=$LIBDIRS
5881else
5882  { $as_echo "$as_me:${as_lineno-$LINENO}: Using directory \"$withval\"" >&5
5883$as_echo "$as_me: Using directory \"$withval\"" >&6;}
5884  CFITSIOINCDIRS="$withval \
5885              $withval/include"
5886  CFITSIOLIBDIRS="$withval \
5887              $withval/lib"
5888  for LIBDIR in $CFITSIOLIBDIRS ; do
5889    as_ac_File=`$as_echo "ac_cv_file_$LIBDIR" | $as_tr_sh`
5890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LIBDIR" >&5
5891$as_echo_n "checking for $LIBDIR... " >&6; }
5892if eval \${$as_ac_File+:} false; then :
5893  $as_echo_n "(cached) " >&6
5894else
5895  test "$cross_compiling" = yes &&
5896  as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
5897if test -r "$LIBDIR"; then
5898  eval "$as_ac_File=yes"
5899else
5900  eval "$as_ac_File=no"
5901fi
5902fi
5903eval ac_res=\$$as_ac_File
5904               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5905$as_echo "$ac_res" >&6; }
5906if eval test \"x\$"$as_ac_File"\" = x"yes"; then :
5907  LDFLAGS="$LDFLAGS -L$LIBDIR"
5908else
5909  continue
5910fi
5911
5912  done
5913  for INCDIR in $CFITSIOINCDIRS ; do
5914    as_ac_File=`$as_echo "ac_cv_file_$INCDIR" | $as_tr_sh`
5915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $INCDIR" >&5
5916$as_echo_n "checking for $INCDIR... " >&6; }
5917if eval \${$as_ac_File+:} false; then :
5918  $as_echo_n "(cached) " >&6
5919else
5920  test "$cross_compiling" = yes &&
5921  as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
5922if test -r "$INCDIR"; then
5923  eval "$as_ac_File=yes"
5924else
5925  eval "$as_ac_File=no"
5926fi
5927fi
5928eval ac_res=\$$as_ac_File
5929               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5930$as_echo "$ac_res" >&6; }
5931if eval test \"x\$"$as_ac_File"\" = x"yes"; then :
5932  CPPFLAGS="$CPPFLAGS -I$INCDIR"
5933else
5934  continue
5935fi
5936
5937  done
5938fi
5939
5940else
5941   # if directory not specified, go searching.
5942CFITSIOINCDIRS=$INCDIRS
5943CFITSIOLIBDIRS=$LIBDIRS
5944
5945fi
5946
5947
5948for INCDIR in $CFITSIOINCDIRS ; do
5949  as_ac_File=`$as_echo "ac_cv_file_$INCDIR/fitsio.h" | $as_tr_sh`
5950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $INCDIR/fitsio.h" >&5
5951$as_echo_n "checking for $INCDIR/fitsio.h... " >&6; }
5952if eval \${$as_ac_File+:} false; then :
5953  $as_echo_n "(cached) " >&6
5954else
5955  test "$cross_compiling" = yes &&
5956  as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
5957if test -r "$INCDIR/fitsio.h"; then
5958  eval "$as_ac_File=yes"
5959else
5960  eval "$as_ac_File=no"
5961fi
5962fi
5963eval ac_res=\$$as_ac_File
5964               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5965$as_echo "$ac_res" >&6; }
5966if eval test \"x\$"$as_ac_File"\" = x"yes"; then :
5967  CFITSIOINC=-I$INCDIR; break
5968fi
5969
5970  INCDIR=$INCDIR/cfitsio
5971  as_ac_File=`$as_echo "ac_cv_file_$INCDIR/fitsio.h" | $as_tr_sh`
5972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $INCDIR/fitsio.h" >&5
5973$as_echo_n "checking for $INCDIR/fitsio.h... " >&6; }
5974if eval \${$as_ac_File+:} false; then :
5975  $as_echo_n "(cached) " >&6
5976else
5977  test "$cross_compiling" = yes &&
5978  as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
5979if test -r "$INCDIR/fitsio.h"; then
5980  eval "$as_ac_File=yes"
5981else
5982  eval "$as_ac_File=no"
5983fi
5984fi
5985eval ac_res=\$$as_ac_File
5986               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5987$as_echo "$ac_res" >&6; }
5988if eval test \"x\$"$as_ac_File"\" = x"yes"; then :
5989  CFITSIOINC=-I$INCDIR; break
5990fi
5991
5992done
5993
5994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for recv in -lsocket" >&5
5995$as_echo_n "checking for recv in -lsocket... " >&6; }
5996if ${ac_cv_lib_socket_recv+:} false; then :
5997  $as_echo_n "(cached) " >&6
5998else
5999  ac_check_lib_save_LIBS=$LIBS
6000LIBS="-lsocket $LIBS $LIBS"
6001cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6002/* end confdefs.h.  */
6003
6004/* Override any GCC internal prototype to avoid an error.
6005   Use char because int might match the return type of a GCC
6006   builtin and then its argument prototype would still apply.  */
6007#ifdef __cplusplus
6008extern "C"
6009#endif
6010char recv ();
6011int
6012main ()
6013{
6014return recv ();
6015  ;
6016  return 0;
6017}
6018_ACEOF
6019if ac_fn_c_try_link "$LINENO"; then :
6020  ac_cv_lib_socket_recv=yes
6021else
6022  ac_cv_lib_socket_recv=no
6023fi
6024rm -f core conftest.err conftest.$ac_objext \
6025    conftest$ac_exeext conftest.$ac_ext
6026LIBS=$ac_check_lib_save_LIBS
6027fi
6028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_recv" >&5
6029$as_echo "$ac_cv_lib_socket_recv" >&6; }
6030if test "x$ac_cv_lib_socket_recv" = xyes; then :
6031  CFITSIOLIB="$CFITSIOLIB -lsocket"
6032fi
6033
6034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ffopen in -lcfitsio" >&5
6035$as_echo_n "checking for ffopen in -lcfitsio... " >&6; }
6036if ${ac_cv_lib_cfitsio_ffopen+:} false; then :
6037  $as_echo_n "(cached) " >&6
6038else
6039  ac_check_lib_save_LIBS=$LIBS
6040LIBS="-lcfitsio $CFITSIOLIB $LIBS $LIBS"
6041cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6042/* end confdefs.h.  */
6043
6044/* Override any GCC internal prototype to avoid an error.
6045   Use char because int might match the return type of a GCC
6046   builtin and then its argument prototype would still apply.  */
6047#ifdef __cplusplus
6048extern "C"
6049#endif
6050char ffopen ();
6051int
6052main ()
6053{
6054return ffopen ();
6055  ;
6056  return 0;
6057}
6058_ACEOF
6059if ac_fn_c_try_link "$LINENO"; then :
6060  ac_cv_lib_cfitsio_ffopen=yes
6061else
6062  ac_cv_lib_cfitsio_ffopen=no
6063fi
6064rm -f core conftest.err conftest.$ac_objext \
6065    conftest$ac_exeext conftest.$ac_ext
6066LIBS=$ac_check_lib_save_LIBS
6067fi
6068{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfitsio_ffopen" >&5
6069$as_echo "$ac_cv_lib_cfitsio_ffopen" >&6; }
6070if test "x$ac_cv_lib_cfitsio_ffopen" = xyes; then :
6071  CFITSIOLIB="$CFITSIOLIB -lcfitsio"
6072fi
6073
6074
6075# CFITSIO is essential for Duchamp, so exit with error message if it
6076#   is not present.
6077if test "x$CFITSIOINC" = x -o "x$CFITSIOLIB" = x; then
6078  as_fn_error 1 "
6079    -------------------------------------------------------
6080    Could not find the CFITSIO library.
6081
6082    ERROR: Duchamp configuration failure.
6083    -------------------------------------------------------" "$LINENO" 5
6084else
6085  { $as_echo "$as_me:${as_lineno-$LINENO}: CFITSIO appears to be available." >&5
6086$as_echo "$as_me: CFITSIO appears to be available." >&6;}
6087
6088$as_echo "#define HAVE_CFITSIO 1" >>confdefs.h
6089
6090for LIBDIR in $CFITSIOLIBDIRS ; do
6091  as_ac_File=`$as_echo "ac_cv_file_$LIBDIR/libcfitsio.a" | $as_tr_sh`
6092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LIBDIR/libcfitsio.a" >&5
6093$as_echo_n "checking for $LIBDIR/libcfitsio.a... " >&6; }
6094if eval \${$as_ac_File+:} false; then :
6095  $as_echo_n "(cached) " >&6
6096else
6097  test "$cross_compiling" = yes &&
6098  as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
6099if test -r "$LIBDIR/libcfitsio.a"; then
6100  eval "$as_ac_File=yes"
6101else
6102  eval "$as_ac_File=no"
6103fi
6104fi
6105eval ac_res=\$$as_ac_File
6106               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6107$as_echo "$ac_res" >&6; }
6108if eval test \"x\$"$as_ac_File"\" = x"yes"; then :
6109  CFITSIOLIB="-L$LIBDIR $CFITSIOLIB"; break
6110fi
6111
6112  LIBDIR=$LIBDIR/cfitsio
6113  as_ac_File=`$as_echo "ac_cv_file_$LIBDIR/libcfitsio.a" | $as_tr_sh`
6114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LIBDIR/libcfitsio.a" >&5
6115$as_echo_n "checking for $LIBDIR/libcfitsio.a... " >&6; }
6116if eval \${$as_ac_File+:} false; then :
6117  $as_echo_n "(cached) " >&6
6118else
6119  test "$cross_compiling" = yes &&
6120  as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
6121if test -r "$LIBDIR/libcfitsio.a"; then
6122  eval "$as_ac_File=yes"
6123else
6124  eval "$as_ac_File=no"
6125fi
6126fi
6127eval ac_res=\$$as_ac_File
6128               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6129$as_echo "$ac_res" >&6; }
6130if eval test \"x\$"$as_ac_File"\" = x"yes"; then :
6131  CFITSIOLIB="-L$LIBDIR $CFITSIOLIB"; break
6132fi
6133
6134done
6135
6136fi
6137
6138
6139
6140##########################################################################
6141
6142##########################################################################
6143# Search for WCSLIB.
6144# use --with-wcslib=directory to specify a particular WCSLIB directory.
6145# else do the normal searching for libraries.
6146
6147{ $as_echo "$as_me:${as_lineno-$LINENO}:   -- WCSLIB -- " >&5
6148$as_echo "$as_me:   -- WCSLIB -- " >&6;}
6149WCSINCDIR=""
6150
6151# Check whether --with-wcslib was given.
6152if test "${with_wcslib+set}" = set; then :
6153  withval=$with_wcslib;  #if we specify a directory...
6154if test "x$withval" = xno; then
6155  { $as_echo "$as_me:${as_lineno-$LINENO}:
6156    The WCSLIB library is required.
6157    Ignoring the \"--with-wcslib=no\" and searching for the library." >&5
6158$as_echo "$as_me:
6159    The WCSLIB library is required.
6160    Ignoring the \"--with-wcslib=no\" and searching for the library." >&1;}
6161  WCSINCDIRS=$INCDIRS
6162  WCSLIBDIRS=$LIBDIRS
6163else
6164  { $as_echo "$as_me:${as_lineno-$LINENO}: Using directory \"$withval\"" >&5
6165$as_echo "$as_me: Using directory \"$withval\"" >&6;}
6166  WCSINCDIRS="$withval \
6167              $withval/include"
6168  WCSLIBDIRS="$withval \
6169              $withval/lib"
6170  for LIBDIR in $WCSLIBDIRS ; do
6171    as_ac_File=`$as_echo "ac_cv_file_$LIBDIR" | $as_tr_sh`
6172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LIBDIR" >&5
6173$as_echo_n "checking for $LIBDIR... " >&6; }
6174if eval \${$as_ac_File+:} false; then :
6175  $as_echo_n "(cached) " >&6
6176else
6177  test "$cross_compiling" = yes &&
6178  as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
6179if test -r "$LIBDIR"; then
6180  eval "$as_ac_File=yes"
6181else
6182  eval "$as_ac_File=no"
6183fi
6184fi
6185eval ac_res=\$$as_ac_File
6186               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6187$as_echo "$ac_res" >&6; }
6188if eval test \"x\$"$as_ac_File"\" = x"yes"; then :
6189  LDFLAGS="$LDFLAGS -L$LIBDIR"
6190else
6191  continue
6192fi
6193
6194  done
6195  for INCDIR in $WCSINCDIRS ; do
6196    as_ac_File=`$as_echo "ac_cv_file_$INCDIR/wcslib" | $as_tr_sh`
6197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $INCDIR/wcslib" >&5
6198$as_echo_n "checking for $INCDIR/wcslib... " >&6; }
6199if eval \${$as_ac_File+:} false; then :
6200  $as_echo_n "(cached) " >&6
6201else
6202  test "$cross_compiling" = yes &&
6203  as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
6204if test -r "$INCDIR/wcslib"; then
6205  eval "$as_ac_File=yes"
6206else
6207  eval "$as_ac_File=no"
6208fi
6209fi
6210eval ac_res=\$$as_ac_File
6211               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6212$as_echo "$ac_res" >&6; }
6213if eval test \"x\$"$as_ac_File"\" = x"yes"; then :
6214  CPPFLAGS="$CPPFLAGS -I$INCDIR"; WCSINCDIR=$INCDIR; break
6215else
6216  continue
6217fi
6218
6219  done
6220fi
6221
6222else
6223   # if directory not specified, go searching.
6224WCSINCDIRS=$INCDIRS
6225WCSLIBDIRS=$LIBDIRS
6226
6227fi
6228
6229
6230
6231if test "x$WCSINCDIR" = x; then
6232  for INCBASE in $WCSINCDIRS ; do
6233    as_ac_File=`$as_echo "ac_cv_file_$INCBASE/wcslib/wcs.h" | $as_tr_sh`
6234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $INCBASE/wcslib/wcs.h" >&5
6235$as_echo_n "checking for $INCBASE/wcslib/wcs.h... " >&6; }
6236if eval \${$as_ac_File+:} false; then :
6237  $as_echo_n "(cached) " >&6
6238else
6239  test "$cross_compiling" = yes &&
6240  as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
6241if test -r "$INCBASE/wcslib/wcs.h"; then
6242  eval "$as_ac_File=yes"
6243else
6244  eval "$as_ac_File=no"
6245fi
6246fi
6247eval ac_res=\$$as_ac_File
6248               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6249$as_echo "$ac_res" >&6; }
6250if eval test \"x\$"$as_ac_File"\" = x"yes"; then :
6251  WCSINC="-I$INCBASE -I$INCBASE/wcslib $WCSINC"; break
6252fi
6253
6254  done
6255else
6256  as_ac_File=`$as_echo "ac_cv_file_$WCSINCDIR/wcslib/wcs.h" | $as_tr_sh`
6257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $WCSINCDIR/wcslib/wcs.h" >&5
6258$as_echo_n "checking for $WCSINCDIR/wcslib/wcs.h... " >&6; }
6259if eval \${$as_ac_File+:} false; then :
6260  $as_echo_n "(cached) " >&6
6261else
6262  test "$cross_compiling" = yes &&
6263  as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
6264if test -r "$WCSINCDIR/wcslib/wcs.h"; then
6265  eval "$as_ac_File=yes"
6266else
6267  eval "$as_ac_File=no"
6268fi
6269fi
6270eval ac_res=\$$as_ac_File
6271               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6272$as_echo "$ac_res" >&6; }
6273if eval test \"x\$"$as_ac_File"\" = x"yes"; then :
6274  WCSINC="-I$WCSINCDIR -I$WCSINCDIR/wcslib $WCSINC"
6275fi
6276
6277fi
6278
6279
6280# Look for libwcs.a, and libpgsbox.a
6281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wcss2p in -lwcs" >&5
6282$as_echo_n "checking for wcss2p in -lwcs... " >&6; }
6283if ${ac_cv_lib_wcs_wcss2p+:} false; then :
6284  $as_echo_n "(cached) " >&6
6285else
6286  ac_check_lib_save_LIBS=$LIBS
6287LIBS="-lwcs $WCSLIB $LIBS $CFITSIOLIB $PGPLOTLIB $LIBS"
6288cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6289/* end confdefs.h.  */
6290
6291/* Override any GCC internal prototype to avoid an error.
6292   Use char because int might match the return type of a GCC
6293   builtin and then its argument prototype would still apply.  */
6294#ifdef __cplusplus
6295extern "C"
6296#endif
6297char wcss2p ();
6298int
6299main ()
6300{
6301return wcss2p ();
6302  ;
6303  return 0;
6304}
6305_ACEOF
6306if ac_fn_c_try_link "$LINENO"; then :
6307  ac_cv_lib_wcs_wcss2p=yes
6308else
6309  ac_cv_lib_wcs_wcss2p=no
6310fi
6311rm -f core conftest.err conftest.$ac_objext \
6312    conftest$ac_exeext conftest.$ac_ext
6313LIBS=$ac_check_lib_save_LIBS
6314fi
6315{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wcs_wcss2p" >&5
6316$as_echo "$ac_cv_lib_wcs_wcss2p" >&6; }
6317if test "x$ac_cv_lib_wcs_wcss2p" = xyes; then :
6318  WCSLIB="$WCSLIB -lwcs"
6319fi
6320
6321
6322# Only use libpgsbox if we have pgplot enabled - determine this by testing the PGPLOTINCDIRS variable
6323if test "x$PGPLOTINCDIRS" != x; then
6324   if test "x$F77" = xgfortran; then
6325     WCSLIB="$WCSLIB -lpgsbox"
6326       { $as_echo "$as_me:${as_lineno-$LINENO}:  Using gfortran, so manually adding -lpgsbox to WCSLIB string." >&5
6327$as_echo "$as_me:  Using gfortran, so manually adding -lpgsbox to WCSLIB string." >&6;}
6328   else
6329     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cpgsbox in -lpgsbox" >&5
6330$as_echo_n "checking for cpgsbox in -lpgsbox... " >&6; }
6331if ${ac_cv_lib_pgsbox_cpgsbox+:} false; then :
6332  $as_echo_n "(cached) " >&6
6333else
6334  ac_check_lib_save_LIBS=$LIBS
6335LIBS="-lpgsbox $WCSLIB $LIBS $CFITSIOLIB $PGPLOTLIB $LIBS"
6336cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6337/* end confdefs.h.  */
6338
6339/* Override any GCC internal prototype to avoid an error.
6340   Use char because int might match the return type of a GCC
6341   builtin and then its argument prototype would still apply.  */
6342#ifdef __cplusplus
6343extern "C"
6344#endif
6345char cpgsbox ();
6346int
6347main ()
6348{
6349return cpgsbox ();
6350  ;
6351  return 0;
6352}
6353_ACEOF
6354if ac_fn_c_try_link "$LINENO"; then :
6355  ac_cv_lib_pgsbox_cpgsbox=yes
6356else
6357  ac_cv_lib_pgsbox_cpgsbox=no
6358fi
6359rm -f core conftest.err conftest.$ac_objext \
6360    conftest$ac_exeext conftest.$ac_ext
6361LIBS=$ac_check_lib_save_LIBS
6362fi
6363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pgsbox_cpgsbox" >&5
6364$as_echo "$ac_cv_lib_pgsbox_cpgsbox" >&6; }
6365if test "x$ac_cv_lib_pgsbox_cpgsbox" = xyes; then :
6366  WCSLIB="$WCSLIB -lpgsbox"
6367fi
6368
6369   fi
6370fi
6371
6372# WCSLIB is essential for Duchamp, so exit with error message if it
6373#   is not present. Need at least libwcs to be available -- libpgsbox will
6374#   depend on PGPLOT being available, but is not critical.
6375if test "x$WCSINC" = x -o "x$WCSLIB" = x; then
6376  as_fn_error 1 "
6377    -------------------------------------------------------
6378    Could not find the WCSLIB library.
6379
6380    ERROR: Duchamp configuration failure.
6381    -------------------------------------------------------" "$LINENO" 5
6382else
6383  { $as_echo "$as_me:${as_lineno-$LINENO}: WCSLIB appears to be available." >&5
6384$as_echo "$as_me: WCSLIB appears to be available." >&6;}
6385
6386$as_echo "#define HAVE_WCSLIB 1" >>confdefs.h
6387
6388# Now add the -L statements to start of WCSLIB.
6389# Search for libwcs.a, and, if we find it, search for libpgsbox in same directory and
6390#   then in other directories, keeping the appropriate order of -L calls.
6391
6392  DIRLIST=". \
6393           wcs \
6394           wcslib"
6395
6396  for LIBBASE in $WCSLIBDIRS ; do
6397    for DIR in $DIRLIST; do
6398      if test "x$DIR" = x.; then
6399       LIBDIR=$LIBBASE
6400      else
6401       LIBDIR="$LIBBASE/$DIR"
6402      fi
6403      as_ac_File=`$as_echo "ac_cv_file_$LIBDIR/libwcs.a" | $as_tr_sh`
6404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LIBDIR/libwcs.a" >&5
6405$as_echo_n "checking for $LIBDIR/libwcs.a... " >&6; }
6406if eval \${$as_ac_File+:} false; then :
6407  $as_echo_n "(cached) " >&6
6408else
6409  test "$cross_compiling" = yes &&
6410  as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
6411if test -r "$LIBDIR/libwcs.a"; then
6412  eval "$as_ac_File=yes"
6413else
6414  eval "$as_ac_File=no"
6415fi
6416fi
6417eval ac_res=\$$as_ac_File
6418               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6419$as_echo "$ac_res" >&6; }
6420if eval test \"x\$"$as_ac_File"\" = x"yes"; then :
6421  WCSLIBFRONT="-L$LIBDIR";
6422             as_ac_File=`$as_echo "ac_cv_file_$LIBDIR/libpgsbox.a" | $as_tr_sh`
6423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LIBDIR/libpgsbox.a" >&5
6424$as_echo_n "checking for $LIBDIR/libpgsbox.a... " >&6; }
6425if eval \${$as_ac_File+:} false; then :
6426  $as_echo_n "(cached) " >&6
6427else
6428  test "$cross_compiling" = yes &&
6429  as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
6430if test -r "$LIBDIR/libpgsbox.a"; then
6431  eval "$as_ac_File=yes"
6432else
6433  eval "$as_ac_File=no"
6434fi
6435fi
6436eval ac_res=\$$as_ac_File
6437               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6438$as_echo "$ac_res" >&6; }
6439if eval test \"x\$"$as_ac_File"\" = x"yes"; then :
6440
6441else
6442
6443               for LIBBASE2 in $WCSLIBDIRS ; do
6444                for DIR2 in $DIRLIST; do
6445                 if test "x$DIR" = x.; then
6446                  LIBDIR=$LIBBASE
6447                 else
6448                  LIBDIR="$LIBBASE/$DIR"
6449                 fi
6450                 as_ac_File=`$as_echo "ac_cv_file_$LIBDIR2/libpgsbox.a" | $as_tr_sh`
6451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LIBDIR2/libpgsbox.a" >&5
6452$as_echo_n "checking for $LIBDIR2/libpgsbox.a... " >&6; }
6453if eval \${$as_ac_File+:} false; then :
6454  $as_echo_n "(cached) " >&6
6455else
6456  test "$cross_compiling" = yes &&
6457  as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
6458if test -r "$LIBDIR2/libpgsbox.a"; then
6459  eval "$as_ac_File=yes"
6460else
6461  eval "$as_ac_File=no"
6462fi
6463fi
6464eval ac_res=\$$as_ac_File
6465               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6466$as_echo "$ac_res" >&6; }
6467if eval test \"x\$"$as_ac_File"\" = x"yes"; then :
6468  WCSLIBFRONT="$WCSLIB -L$LIBDIR2"; break
6469fi
6470
6471                done
6472               done
6473fi
6474
6475              break
6476fi
6477
6478    done
6479  done
6480  WCSLIB="$WCSLIBFRONT $WCSLIB"
6481fi
6482
6483
6484
6485##########################################################################
6486
6487
6488
6489ac_config_files="$ac_config_files Makefile"
6490
6491cat >confcache <<\_ACEOF
6492# This file is a shell script that caches the results of configure
6493# tests run on this system so they can be shared between configure
6494# scripts and configure runs, see configure's option --config-cache.
6495# It is not useful on other systems.  If it contains results you don't
6496# want to keep, you may remove or edit it.
6497#
6498# config.status only pays attention to the cache file if you give it
6499# the --recheck option to rerun configure.
6500#
6501# `ac_cv_env_foo' variables (set or unset) will be overridden when
6502# loading this file, other *unset* `ac_cv_foo' will be assigned the
6503# following values.
6504
6505_ACEOF
6506
6507# The following way of writing the cache mishandles newlines in values,
6508# but we know of no workaround that is simple, portable, and efficient.
6509# So, we kill variables containing newlines.
6510# Ultrix sh set writes to stderr and can't be redirected directly,
6511# and sets the high bit in the cache file unless we assign to the vars.
6512(
6513  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
6514    eval ac_val=\$$ac_var
6515    case $ac_val in #(
6516    *${as_nl}*)
6517      case $ac_var in #(
6518      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
6519$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
6520      esac
6521      case $ac_var in #(
6522      _ | IFS | as_nl) ;; #(
6523      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
6524      *) { eval $ac_var=; unset $ac_var;} ;;
6525      esac ;;
6526    esac
6527  done
6528
6529  (set) 2>&1 |
6530    case $as_nl`(ac_space=' '; set) 2>&1` in #(
6531    *${as_nl}ac_space=\ *)
6532      # `set' does not quote correctly, so add quotes: double-quote
6533      # substitution turns \\\\ into \\, and sed turns \\ into \.
6534      sed -n \
6535        "s/'/'\\\\''/g;
6536          s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
6537      ;; #(
6538    *)
6539      # `set' quotes correctly as required by POSIX, so do not add quotes.
6540      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
6541      ;;
6542    esac |
6543    sort
6544) |
6545  sed '
6546     /^ac_cv_env_/b end
6547     t clear
6548     :clear
6549     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
6550     t end
6551     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
6552     :end' >>confcache
6553if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
6554  if test -w "$cache_file"; then
6555    if test "x$cache_file" != "x/dev/null"; then
6556      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
6557$as_echo "$as_me: updating cache $cache_file" >&6;}
6558      if test ! -f "$cache_file" || test -h "$cache_file"; then
6559        cat confcache >"$cache_file"
6560      else
6561        case $cache_file in #(
6562        */* | ?:*)
6563          mv -f confcache "$cache_file"$$ &&
6564          mv -f "$cache_file"$$ "$cache_file" ;; #(
6565        *)
6566          mv -f confcache "$cache_file" ;;
6567        esac
6568      fi
6569    fi
6570  else
6571    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
6572$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
6573  fi
6574fi
6575rm -f confcache
6576
6577test "x$prefix" = xNONE && prefix=$ac_default_prefix
6578# Let make expand exec_prefix.
6579test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6580
6581DEFS=-DHAVE_CONFIG_H
6582
6583ac_libobjs=
6584ac_ltlibobjs=
6585U=
6586for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
6587  # 1. Remove the extension, and $U if already installed.
6588  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
6589  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
6590  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
6591  #    will be set to the directory where LIBOBJS objects are built.
6592  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
6593  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
6594done
6595LIBOBJS=$ac_libobjs
6596
6597LTLIBOBJS=$ac_ltlibobjs
6598
6599
6600
6601: "${CONFIG_STATUS=./config.status}"
6602ac_write_fail=0
6603ac_clean_files_save=$ac_clean_files
6604ac_clean_files="$ac_clean_files $CONFIG_STATUS"
6605{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
6606$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
6607as_write_fail=0
6608cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
6609#! $SHELL
6610# Generated by $as_me.
6611# Run this file to recreate the current configuration.
6612# Compiler output produced by configure, useful for debugging
6613# configure, is in config.log if it exists.
6614
6615debug=false
6616ac_cs_recheck=false
6617ac_cs_silent=false
6618
6619SHELL=\${CONFIG_SHELL-$SHELL}
6620export SHELL
6621_ASEOF
6622cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
6623## -------------------- ##
6624## M4sh Initialization. ##
6625## -------------------- ##
6626
6627# Be more Bourne compatible
6628DUALCASE=1; export DUALCASE # for MKS sh
6629if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
6630  emulate sh
6631  NULLCMD=:
6632  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
6633  # is contrary to our usage.  Disable this feature.
6634  alias -g '${1+"$@"}'='"$@"'
6635  setopt NO_GLOB_SUBST
6636else
6637  case `(set -o) 2>/dev/null` in #(
6638  *posix*) :
6639    set -o posix ;; #(
6640  *) :
6641     ;;
6642esac
6643fi
6644
6645
6646as_nl='
6647'
6648export as_nl
6649# Printing a long string crashes Solaris 7 /usr/bin/printf.
6650as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
6651as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
6652as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
6653# Prefer a ksh shell builtin over an external printf program on Solaris,
6654# but without wasting forks for bash or zsh.
6655if test -z "$BASH_VERSION$ZSH_VERSION" \
6656    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
6657  as_echo='print -r --'
6658  as_echo_n='print -rn --'
6659elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
6660  as_echo='printf %s\n'
6661  as_echo_n='printf %s'
6662else
6663  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
6664    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
6665    as_echo_n='/usr/ucb/echo -n'
6666  else
6667    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
6668    as_echo_n_body='eval
6669      arg=$1;
6670      case $arg in #(
6671      *"$as_nl"*)
6672        expr "X$arg" : "X\\(.*\\)$as_nl";
6673        arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
6674      esac;
6675      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
6676    '
6677    export as_echo_n_body
6678    as_echo_n='sh -c $as_echo_n_body as_echo'
6679  fi
6680  export as_echo_body
6681  as_echo='sh -c $as_echo_body as_echo'
6682fi
6683
6684# The user is always right.
6685if test "${PATH_SEPARATOR+set}" != set; then
6686  PATH_SEPARATOR=:
6687  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
6688    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
6689      PATH_SEPARATOR=';'
6690  }
6691fi
6692
6693
6694# IFS
6695# We need space, tab and new line, in precisely that order.  Quoting is
6696# there to prevent editors from complaining about space-tab.
6697# (If _AS_PATH_WALK were called with IFS unset, it would disable word
6698# splitting by setting IFS to empty value.)
6699IFS=" ""        $as_nl"
6700
6701# Find who we are.  Look in the path if we contain no directory separator.
6702as_myself=
6703case $0 in #((
6704  *[\\/]* ) as_myself=$0 ;;
6705  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6706for as_dir in $PATH
6707do
6708  IFS=$as_save_IFS
6709  test -z "$as_dir" && as_dir=.
6710    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
6711  done
6712IFS=$as_save_IFS
6713
6714     ;;
6715esac
6716# We did not find ourselves, most probably we were run as `sh COMMAND'
6717# in which case we are not to be found in the path.
6718if test "x$as_myself" = x; then
6719  as_myself=$0
6720fi
6721if test ! -f "$as_myself"; then
6722  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
6723  exit 1
6724fi
6725
6726# Unset variables that we do not need and which cause bugs (e.g. in
6727# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
6728# suppresses any "Segmentation fault" message there.  '((' could
6729# trigger a bug in pdksh 5.2.14.
6730for as_var in BASH_ENV ENV MAIL MAILPATH
6731do eval test x\${$as_var+set} = xset \
6732  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
6733done
6734PS1='$ '
6735PS2='> '
6736PS4='+ '
6737
6738# NLS nuisances.
6739LC_ALL=C
6740export LC_ALL
6741LANGUAGE=C
6742export LANGUAGE
6743
6744# CDPATH.
6745(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
6746
6747
6748# as_fn_error STATUS ERROR [LINENO LOG_FD]
6749# ----------------------------------------
6750# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
6751# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
6752# script with STATUS, using 1 if that was 0.
6753as_fn_error ()
6754{
6755  as_status=$1; test $as_status -eq 0 && as_status=1
6756  if test "$4"; then
6757    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
6758    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
6759  fi
6760  $as_echo "$as_me: error: $2" >&2
6761  as_fn_exit $as_status
6762} # as_fn_error
6763
6764
6765# as_fn_set_status STATUS
6766# -----------------------
6767# Set $? to STATUS, without forking.
6768as_fn_set_status ()
6769{
6770  return $1
6771} # as_fn_set_status
6772
6773# as_fn_exit STATUS
6774# -----------------
6775# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
6776as_fn_exit ()
6777{
6778  set +e
6779  as_fn_set_status $1
6780  exit $1
6781} # as_fn_exit
6782
6783# as_fn_unset VAR
6784# ---------------
6785# Portably unset VAR.
6786as_fn_unset ()
6787{
6788  { eval $1=; unset $1;}
6789}
6790as_unset=as_fn_unset
6791# as_fn_append VAR VALUE
6792# ----------------------
6793# Append the text in VALUE to the end of the definition contained in VAR. Take
6794# advantage of any shell optimizations that allow amortized linear growth over
6795# repeated appends, instead of the typical quadratic growth present in naive
6796# implementations.
6797if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
6798  eval 'as_fn_append ()
6799  {
6800    eval $1+=\$2
6801  }'
6802else
6803  as_fn_append ()
6804  {
6805    eval $1=\$$1\$2
6806  }
6807fi # as_fn_append
6808
6809# as_fn_arith ARG...
6810# ------------------
6811# Perform arithmetic evaluation on the ARGs, and store the result in the
6812# global $as_val. Take advantage of shells that can avoid forks. The arguments
6813# must be portable across $(()) and expr.
6814if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
6815  eval 'as_fn_arith ()
6816  {
6817    as_val=$(( $* ))
6818  }'
6819else
6820  as_fn_arith ()
6821  {
6822    as_val=`expr "$@" || test $? -eq 1`
6823  }
6824fi # as_fn_arith
6825
6826
6827if expr a : '\(a\)' >/dev/null 2>&1 &&
6828   test "X`expr 00001 : '.*\(...\)'`" = X001; then
6829  as_expr=expr
6830else
6831  as_expr=false
6832fi
6833
6834if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
6835  as_basename=basename
6836else
6837  as_basename=false
6838fi
6839
6840if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
6841  as_dirname=dirname
6842else
6843  as_dirname=false
6844fi
6845
6846as_me=`$as_basename -- "$0" ||
6847$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
6848         X"$0" : 'X\(//\)$' \| \
6849         X"$0" : 'X\(/\)' \| . 2>/dev/null ||
6850$as_echo X/"$0" |
6851    sed '/^.*\/\([^/][^/]*\)\/*$/{
6852            s//\1/
6853            q
6854          }
6855          /^X\/\(\/\/\)$/{
6856            s//\1/
6857            q
6858          }
6859          /^X\/\(\/\).*/{
6860            s//\1/
6861            q
6862          }
6863          s/.*/./; q'`
6864
6865# Avoid depending upon Character Ranges.
6866as_cr_letters='abcdefghijklmnopqrstuvwxyz'
6867as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
6868as_cr_Letters=$as_cr_letters$as_cr_LETTERS
6869as_cr_digits='0123456789'
6870as_cr_alnum=$as_cr_Letters$as_cr_digits
6871
6872ECHO_C= ECHO_N= ECHO_T=
6873case `echo -n x` in #(((((
6874-n*)
6875  case `echo 'xy\c'` in
6876  *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
6877  xy)  ECHO_C='\c';;
6878  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
6879       ECHO_T=' ';;
6880  esac;;
6881*)
6882  ECHO_N='-n';;
6883esac
6884
6885rm -f conf$$ conf$$.exe conf$$.file
6886if test -d conf$$.dir; then
6887  rm -f conf$$.dir/conf$$.file
6888else
6889  rm -f conf$$.dir
6890  mkdir conf$$.dir 2>/dev/null
6891fi
6892if (echo >conf$$.file) 2>/dev/null; then
6893  if ln -s conf$$.file conf$$ 2>/dev/null; then
6894    as_ln_s='ln -s'
6895    # ... but there are two gotchas:
6896    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
6897    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
6898    # In both cases, we have to default to `cp -p'.
6899    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
6900      as_ln_s='cp -p'
6901  elif ln conf$$.file conf$$ 2>/dev/null; then
6902    as_ln_s=ln
6903  else
6904    as_ln_s='cp -p'
6905  fi
6906else
6907  as_ln_s='cp -p'
6908fi
6909rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
6910rmdir conf$$.dir 2>/dev/null
6911
6912
6913# as_fn_mkdir_p
6914# -------------
6915# Create "$as_dir" as a directory, including parents if necessary.
6916as_fn_mkdir_p ()
6917{
6918
6919  case $as_dir in #(
6920  -*) as_dir=./$as_dir;;
6921  esac
6922  test -d "$as_dir" || eval $as_mkdir_p || {
6923    as_dirs=
6924    while :; do
6925      case $as_dir in #(
6926      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
6927      *) as_qdir=$as_dir;;
6928      esac
6929      as_dirs="'$as_qdir' $as_dirs"
6930      as_dir=`$as_dirname -- "$as_dir" ||
6931$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
6932         X"$as_dir" : 'X\(//\)[^/]' \| \
6933         X"$as_dir" : 'X\(//\)$' \| \
6934         X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
6935$as_echo X"$as_dir" |
6936    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
6937            s//\1/
6938            q
6939          }
6940          /^X\(\/\/\)[^/].*/{
6941            s//\1/
6942            q
6943          }
6944          /^X\(\/\/\)$/{
6945            s//\1/
6946            q
6947          }
6948          /^X\(\/\).*/{
6949            s//\1/
6950            q
6951          }
6952          s/.*/./; q'`
6953      test -d "$as_dir" && break
6954    done
6955    test -z "$as_dirs" || eval "mkdir $as_dirs"
6956  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
6957
6958
6959} # as_fn_mkdir_p
6960if mkdir -p . 2>/dev/null; then
6961  as_mkdir_p='mkdir -p "$as_dir"'
6962else
6963  test -d ./-p && rmdir ./-p
6964  as_mkdir_p=false
6965fi
6966
6967if test -x / >/dev/null 2>&1; then
6968  as_test_x='test -x'
6969else
6970  if ls -dL / >/dev/null 2>&1; then
6971    as_ls_L_option=L
6972  else
6973    as_ls_L_option=
6974  fi
6975  as_test_x='
6976    eval sh -c '\''
6977      if test -d "$1"; then
6978        test -d "$1/.";
6979      else
6980        case $1 in #(
6981        -*)set "./$1";;
6982        esac;
6983        case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
6984        ???[sx]*):;;*)false;;esac;fi
6985    '\'' sh
6986  '
6987fi
6988as_executable_p=$as_test_x
6989
6990# Sed expression to map a string onto a valid CPP name.
6991as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
6992
6993# Sed expression to map a string onto a valid variable name.
6994as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
6995
6996
6997exec 6>&1
6998## ----------------------------------- ##
6999## Main body of $CONFIG_STATUS script. ##
7000## ----------------------------------- ##
7001_ASEOF
7002test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
7003
7004cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
7005# Save the log message, to keep $0 and so on meaningful, and to
7006# report actual input values of CONFIG_FILES etc. instead of their
7007# values after options handling.
7008ac_log="
7009This file was extended by Duchamp $as_me 1.2, which was
7010generated by GNU Autoconf 2.68.  Invocation command line was
7011
7012  CONFIG_FILES    = $CONFIG_FILES
7013  CONFIG_HEADERS  = $CONFIG_HEADERS
7014  CONFIG_LINKS    = $CONFIG_LINKS
7015  CONFIG_COMMANDS = $CONFIG_COMMANDS
7016  $ $0 $@
7017
7018on `(hostname || uname -n) 2>/dev/null | sed 1q`
7019"
7020
7021_ACEOF
7022
7023case $ac_config_files in *"
7024"*) set x $ac_config_files; shift; ac_config_files=$*;;
7025esac
7026
7027case $ac_config_headers in *"
7028"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
7029esac
7030
7031
7032cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
7033# Files that config.status was made for.
7034config_files="$ac_config_files"
7035config_headers="$ac_config_headers"
7036
7037_ACEOF
7038
7039cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
7040ac_cs_usage="\
7041\`$as_me' instantiates files and other configuration actions
7042from templates according to the current configuration.  Unless the files
7043and actions are specified as TAGs, all are instantiated by default.
7044
7045Usage: $0 [OPTION]... [TAG]...
7046
7047  -h, --help       print this help, then exit
7048  -V, --version    print version number and configuration settings, then exit
7049      --config     print configuration, then exit
7050  -q, --quiet, --silent
7051                   do not print progress messages
7052  -d, --debug      don't remove temporary files
7053      --recheck    update $as_me by reconfiguring in the same conditions
7054      --file=FILE[:TEMPLATE]
7055                   instantiate the configuration file FILE
7056      --header=FILE[:TEMPLATE]
7057                   instantiate the configuration header FILE
7058
7059Configuration files:
7060$config_files
7061
7062Configuration headers:
7063$config_headers
7064
7065Report bugs to <Matthew.Whiting@csiro.au>."
7066
7067_ACEOF
7068cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
7069ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
7070ac_cs_version="\\
7071Duchamp config.status 1.2
7072configured by $0, generated by GNU Autoconf 2.68,
7073  with options \\"\$ac_cs_config\\"
7074
7075Copyright (C) 2010 Free Software Foundation, Inc.
7076This config.status script is free software; the Free Software Foundation
7077gives unlimited permission to copy, distribute and modify it."
7078
7079ac_pwd='$ac_pwd'
7080srcdir='$srcdir'
7081test -n "\$AWK" || AWK=awk
7082_ACEOF
7083
7084cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
7085# The default lists apply if the user does not specify any file.
7086ac_need_defaults=:
7087while test $# != 0
7088do
7089  case $1 in
7090  --*=?*)
7091    ac_option=`expr "X$1" : 'X\([^=]*\)='`
7092    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
7093    ac_shift=:
7094    ;;
7095  --*=)
7096    ac_option=`expr "X$1" : 'X\([^=]*\)='`
7097    ac_optarg=
7098    ac_shift=:
7099    ;;
7100  *)
7101    ac_option=$1
7102    ac_optarg=$2
7103    ac_shift=shift
7104    ;;
7105  esac
7106
7107  case $ac_option in
7108  # Handling of the options.
7109  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
7110    ac_cs_recheck=: ;;
7111  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
7112    $as_echo "$ac_cs_version"; exit ;;
7113  --config | --confi | --conf | --con | --co | --c )
7114    $as_echo "$ac_cs_config"; exit ;;
7115  --debug | --debu | --deb | --de | --d | -d )
7116    debug=: ;;
7117  --file | --fil | --fi | --f )
7118    $ac_shift
7119    case $ac_optarg in
7120    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
7121    '') as_fn_error $? "missing file argument" ;;
7122    esac
7123    as_fn_append CONFIG_FILES " '$ac_optarg'"
7124    ac_need_defaults=false;;
7125  --header | --heade | --head | --hea )
7126    $ac_shift
7127    case $ac_optarg in
7128    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
7129    esac
7130    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
7131    ac_need_defaults=false;;
7132  --he | --h)
7133    # Conflict between --help and --header
7134    as_fn_error $? "ambiguous option: \`$1'
7135Try \`$0 --help' for more information.";;
7136  --help | --hel | -h )
7137    $as_echo "$ac_cs_usage"; exit ;;
7138  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
7139  | -silent | --silent | --silen | --sile | --sil | --si | --s)
7140    ac_cs_silent=: ;;
7141
7142  # This is an error.
7143  -*) as_fn_error $? "unrecognized option: \`$1'
7144Try \`$0 --help' for more information." ;;
7145
7146  *) as_fn_append ac_config_targets " $1"
7147     ac_need_defaults=false ;;
7148
7149  esac
7150  shift
7151done
7152
7153ac_configure_extra_args=
7154
7155if $ac_cs_silent; then
7156  exec 6>/dev/null
7157  ac_configure_extra_args="$ac_configure_extra_args --silent"
7158fi
7159
7160_ACEOF
7161cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
7162if \$ac_cs_recheck; then
7163  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
7164  shift
7165  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
7166  CONFIG_SHELL='$SHELL'
7167  export CONFIG_SHELL
7168  exec "\$@"
7169fi
7170
7171_ACEOF
7172cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
7173exec 5>>config.log
7174{
7175  echo
7176  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
7177## Running $as_me. ##
7178_ASBOX
7179  $as_echo "$ac_log"
7180} >&5
7181
7182_ACEOF
7183cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
7184_ACEOF
7185
7186cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
7187
7188# Handling of arguments.
7189for ac_config_target in $ac_config_targets
7190do
7191  case $ac_config_target in
7192    "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h" ;;
7193    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
7194
7195  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
7196  esac
7197done
7198
7199
7200# If the user did not use the arguments to specify the items to instantiate,
7201# then the envvar interface is used.  Set only those that are not.
7202# We use the long form for the default assignment because of an extremely
7203# bizarre bug on SunOS 4.1.3.
7204if $ac_need_defaults; then
7205  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
7206  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
7207fi
7208
7209# Have a temporary directory for convenience.  Make it in the build tree
7210# simply because there is no reason against having it here, and in addition,
7211# creating and moving files from /tmp can sometimes cause problems.
7212# Hook for its removal unless debugging.
7213# Note that there is a small window in which the directory will not be cleaned:
7214# after its creation but before its name has been assigned to `$tmp'.
7215$debug ||
7216{
7217  tmp= ac_tmp=
7218  trap 'exit_status=$?
7219  : "${ac_tmp:=$tmp}"
7220  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
7221' 0
7222  trap 'as_fn_exit 1' 1 2 13 15
7223}
7224# Create a (secure) tmp directory for tmp files.
7225
7226{
7227  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
7228  test -d "$tmp"
7229}  ||
7230{
7231  tmp=./conf$$-$RANDOM
7232  (umask 077 && mkdir "$tmp")
7233} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
7234ac_tmp=$tmp
7235
7236# Set up the scripts for CONFIG_FILES section.
7237# No need to generate them if there are no CONFIG_FILES.
7238# This happens for instance with `./config.status config.h'.
7239if test -n "$CONFIG_FILES"; then
7240
7241
7242ac_cr=`echo X | tr X '\015'`
7243# On cygwin, bash can eat \r inside `` if the user requested igncr.
7244# But we know of no other shell where ac_cr would be empty at this
7245# point, so we can use a bashism as a fallback.
7246if test "x$ac_cr" = x; then
7247  eval ac_cr=\$\'\\r\'
7248fi
7249ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
7250if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
7251  ac_cs_awk_cr='\\r'
7252else
7253  ac_cs_awk_cr=$ac_cr
7254fi
7255
7256echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
7257_ACEOF
7258
7259
7260{
7261  echo "cat >conf$$subs.awk <<_ACEOF" &&
7262  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
7263  echo "_ACEOF"
7264} >conf$$subs.sh ||
7265  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
7266ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
7267ac_delim='%!_!# '
7268for ac_last_try in false false false false false :; do
7269  . ./conf$$subs.sh ||
7270    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
7271
7272  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
7273  if test $ac_delim_n = $ac_delim_num; then
7274    break
7275  elif $ac_last_try; then
7276    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
7277  else
7278    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
7279  fi
7280done
7281rm -f conf$$subs.sh
7282
7283cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
7284cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
7285_ACEOF
7286sed -n '
7287h
7288s/^/S["/; s/!.*/"]=/
7289p
7290g
7291s/^[^!]*!//
7292:repl
7293t repl
7294s/'"$ac_delim"'$//
7295t delim
7296:nl
7297h
7298s/\(.\{148\}\)..*/\1/
7299t more1
7300s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
7301p
7302n
7303b repl
7304:more1
7305s/["\\]/\\&/g; s/^/"/; s/$/"\\/
7306p
7307g
7308s/.\{148\}//
7309t nl
7310:delim
7311h
7312s/\(.\{148\}\)..*/\1/
7313t more2
7314s/["\\]/\\&/g; s/^/"/; s/$/"/
7315p
7316b
7317:more2
7318s/["\\]/\\&/g; s/^/"/; s/$/"\\/
7319p
7320g
7321s/.\{148\}//
7322t delim
7323' <conf$$subs.awk | sed '
7324/^[^""]/{
7325  N
7326  s/\n//
7327}
7328' >>$CONFIG_STATUS || ac_write_fail=1
7329rm -f conf$$subs.awk
7330cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
7331_ACAWK
7332cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
7333  for (key in S) S_is_set[key] = 1
7334  FS = ""
7335
7336}
7337{
7338  line = $ 0
7339  nfields = split(line, field, "@")
7340  substed = 0
7341  len = length(field[1])
7342  for (i = 2; i < nfields; i++) {
7343    key = field[i]
7344    keylen = length(key)
7345    if (S_is_set[key]) {
7346      value = S[key]
7347      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
7348      len += length(value) + length(field[++i])
7349      substed = 1
7350    } else
7351      len += 1 + keylen
7352  }
7353
7354  print line
7355}
7356
7357_ACAWK
7358_ACEOF
7359cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
7360if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
7361  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
7362else
7363  cat
7364fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
7365  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
7366_ACEOF
7367
7368# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
7369# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
7370# trailing colons and then remove the whole line if VPATH becomes empty
7371# (actually we leave an empty line to preserve line numbers).
7372if test "x$srcdir" = x.; then
7373  ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
7374h
7375s///
7376s/^/:/
7377s/[      ]*$/:/
7378s/:\$(srcdir):/:/g
7379s/:\${srcdir}:/:/g
7380s/:@srcdir@:/:/g
7381s/^:*//
7382s/:*$//
7383x
7384s/\(=[   ]*\).*/\1/
7385G
7386s/\n//
7387s/^[^=]*=[       ]*$//
7388}'
7389fi
7390
7391cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
7392fi # test -n "$CONFIG_FILES"
7393
7394# Set up the scripts for CONFIG_HEADERS section.
7395# No need to generate them if there are no CONFIG_HEADERS.
7396# This happens for instance with `./config.status Makefile'.
7397if test -n "$CONFIG_HEADERS"; then
7398cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
7399BEGIN {
7400_ACEOF
7401
7402# Transform confdefs.h into an awk script `defines.awk', embedded as
7403# here-document in config.status, that substitutes the proper values into
7404# config.h.in to produce config.h.
7405
7406# Create a delimiter string that does not exist in confdefs.h, to ease
7407# handling of long lines.
7408ac_delim='%!_!# '
7409for ac_last_try in false false :; do
7410  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
7411  if test -z "$ac_tt"; then
7412    break
7413  elif $ac_last_try; then
7414    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
7415  else
7416    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
7417  fi
7418done
7419
7420# For the awk script, D is an array of macro values keyed by name,
7421# likewise P contains macro parameters if any.  Preserve backslash
7422# newline sequences.
7423
7424ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
7425sed -n '
7426s/.\{148\}/&'"$ac_delim"'/g
7427t rset
7428:rset
7429s/^[     ]*#[    ]*define[       ][      ]*/ /
7430t def
7431d
7432:def
7433s/\\$//
7434t bsnl
7435s/["\\]/\\&/g
7436s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
7437D["\1"]=" \3"/p
7438s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
7439d
7440:bsnl
7441s/["\\]/\\&/g
7442s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
7443D["\1"]=" \3\\\\\\n"\\/p
7444t cont
7445s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
7446t cont
7447d
7448:cont
7449n
7450s/.\{148\}/&'"$ac_delim"'/g
7451t clear
7452:clear
7453s/\\$//
7454t bsnlc
7455s/["\\]/\\&/g; s/^/"/; s/$/"/p
7456d
7457:bsnlc
7458s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
7459b cont
7460' <confdefs.h | sed '
7461s/'"$ac_delim"'/"\\\
7462"/g' >>$CONFIG_STATUS || ac_write_fail=1
7463
7464cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
7465  for (key in D) D_is_set[key] = 1
7466  FS = ""
7467}
7468/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
7469  line = \$ 0
7470  split(line, arg, " ")
7471  if (arg[1] == "#") {
7472    defundef = arg[2]
7473    mac1 = arg[3]
7474  } else {
7475    defundef = substr(arg[1], 2)
7476    mac1 = arg[2]
7477  }
7478  split(mac1, mac2, "(") #)
7479  macro = mac2[1]
7480  prefix = substr(line, 1, index(line, defundef) - 1)
7481  if (D_is_set[macro]) {
7482    # Preserve the white space surrounding the "#".
7483    print prefix "define", macro P[macro] D[macro]
7484    next
7485  } else {
7486    # Replace #undef with comments.  This is necessary, for example,
7487    # in the case of _POSIX_SOURCE, which is predefined and required
7488    # on some systems where configure will not decide to define it.
7489    if (defundef == "undef") {
7490      print "/*", prefix defundef, macro, "*/"
7491      next
7492    }
7493  }
7494}
7495{ print }
7496_ACAWK
7497_ACEOF
7498cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
7499  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
7500fi # test -n "$CONFIG_HEADERS"
7501
7502
7503eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
7504shift
7505for ac_tag
7506do
7507  case $ac_tag in
7508  :[FHLC]) ac_mode=$ac_tag; continue;;
7509  esac
7510  case $ac_mode$ac_tag in
7511  :[FHL]*:*);;
7512  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
7513  :[FH]-) ac_tag=-:-;;
7514  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
7515  esac
7516  ac_save_IFS=$IFS
7517  IFS=:
7518  set x $ac_tag
7519  IFS=$ac_save_IFS
7520  shift
7521  ac_file=$1
7522  shift
7523
7524  case $ac_mode in
7525  :L) ac_source=$1;;
7526  :[FH])
7527    ac_file_inputs=
7528    for ac_f
7529    do
7530      case $ac_f in
7531      -) ac_f="$ac_tmp/stdin";;
7532      *) # Look for the file first in the build tree, then in the source tree
7533         # (if the path is not absolute).  The absolute path cannot be DOS-style,
7534         # because $ac_f cannot contain `:'.
7535         test -f "$ac_f" ||
7536           case $ac_f in
7537           [\\/$]*) false;;
7538           *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
7539           esac ||
7540           as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
7541      esac
7542      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
7543      as_fn_append ac_file_inputs " '$ac_f'"
7544    done
7545
7546    # Let's still pretend it is `configure' which instantiates (i.e., don't
7547    # use $as_me), people would be surprised to read:
7548    #    /* config.h.  Generated by config.status.  */
7549    configure_input='Generated from '`
7550          $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
7551        `' by configure.'
7552    if test x"$ac_file" != x-; then
7553      configure_input="$ac_file.  $configure_input"
7554      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
7555$as_echo "$as_me: creating $ac_file" >&6;}
7556    fi
7557    # Neutralize special characters interpreted by sed in replacement strings.
7558    case $configure_input in #(
7559    *\&* | *\|* | *\\* )
7560       ac_sed_conf_input=`$as_echo "$configure_input" |
7561       sed 's/[\\\\&|]/\\\\&/g'`;; #(
7562    *) ac_sed_conf_input=$configure_input;;
7563    esac
7564
7565    case $ac_tag in
7566    *:-:* | *:-) cat >"$ac_tmp/stdin" \
7567      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
7568    esac
7569    ;;
7570  esac
7571
7572  ac_dir=`$as_dirname -- "$ac_file" ||
7573$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
7574         X"$ac_file" : 'X\(//\)[^/]' \| \
7575         X"$ac_file" : 'X\(//\)$' \| \
7576         X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
7577$as_echo X"$ac_file" |
7578    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
7579            s//\1/
7580            q
7581          }
7582          /^X\(\/\/\)[^/].*/{
7583            s//\1/
7584            q
7585          }
7586          /^X\(\/\/\)$/{
7587            s//\1/
7588            q
7589          }
7590          /^X\(\/\).*/{
7591            s//\1/
7592            q
7593          }
7594          s/.*/./; q'`
7595  as_dir="$ac_dir"; as_fn_mkdir_p
7596  ac_builddir=.
7597
7598case "$ac_dir" in
7599.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
7600*)
7601  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
7602  # A ".." for each directory in $ac_dir_suffix.
7603  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
7604  case $ac_top_builddir_sub in
7605  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
7606  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
7607  esac ;;
7608esac
7609ac_abs_top_builddir=$ac_pwd
7610ac_abs_builddir=$ac_pwd$ac_dir_suffix
7611# for backward compatibility:
7612ac_top_builddir=$ac_top_build_prefix
7613
7614case $srcdir in
7615  .)  # We are building in place.
7616    ac_srcdir=.
7617    ac_top_srcdir=$ac_top_builddir_sub
7618    ac_abs_top_srcdir=$ac_pwd ;;
7619  [\\/]* | ?:[\\/]* )  # Absolute name.
7620    ac_srcdir=$srcdir$ac_dir_suffix;
7621    ac_top_srcdir=$srcdir
7622    ac_abs_top_srcdir=$srcdir ;;
7623  *) # Relative name.
7624    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
7625    ac_top_srcdir=$ac_top_build_prefix$srcdir
7626    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
7627esac
7628ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
7629
7630
7631  case $ac_mode in
7632  :F)
7633  #
7634  # CONFIG_FILE
7635  #
7636
7637_ACEOF
7638
7639cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
7640# If the template does not know about datarootdir, expand it.
7641# FIXME: This hack should be removed a few years after 2.60.
7642ac_datarootdir_hack=; ac_datarootdir_seen=
7643ac_sed_dataroot='
7644/datarootdir/ {
7645  p
7646  q
7647}
7648/@datadir@/p
7649/@docdir@/p
7650/@infodir@/p
7651/@localedir@/p
7652/@mandir@/p'
7653case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
7654*datarootdir*) ac_datarootdir_seen=yes;;
7655*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
7656  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
7657$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
7658_ACEOF
7659cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
7660  ac_datarootdir_hack='
7661  s&@datadir@&$datadir&g
7662  s&@docdir@&$docdir&g
7663  s&@infodir@&$infodir&g
7664  s&@localedir@&$localedir&g
7665  s&@mandir@&$mandir&g
7666  s&\\\${datarootdir}&$datarootdir&g' ;;
7667esac
7668_ACEOF
7669
7670# Neutralize VPATH when `$srcdir' = `.'.
7671# Shell code in configure.ac might set extrasub.
7672# FIXME: do we really want to maintain this feature?
7673cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
7674ac_sed_extra="$ac_vpsub
7675$extrasub
7676_ACEOF
7677cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
7678:t
7679/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
7680s|@configure_input@|$ac_sed_conf_input|;t t
7681s&@top_builddir@&$ac_top_builddir_sub&;t t
7682s&@top_build_prefix@&$ac_top_build_prefix&;t t
7683s&@srcdir@&$ac_srcdir&;t t
7684s&@abs_srcdir@&$ac_abs_srcdir&;t t
7685s&@top_srcdir@&$ac_top_srcdir&;t t
7686s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
7687s&@builddir@&$ac_builddir&;t t
7688s&@abs_builddir@&$ac_abs_builddir&;t t
7689s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
7690$ac_datarootdir_hack
7691"
7692eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
7693  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
7694
7695test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
7696  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
7697  { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
7698      "$ac_tmp/out"`; test -z "$ac_out"; } &&
7699  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
7700which seems to be undefined.  Please make sure it is defined" >&5
7701$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
7702which seems to be undefined.  Please make sure it is defined" >&2;}
7703
7704  rm -f "$ac_tmp/stdin"
7705  case $ac_file in
7706  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
7707  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
7708  esac \
7709  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
7710 ;;
7711  :H)
7712  #
7713  # CONFIG_HEADER
7714  #
7715  if test x"$ac_file" != x-; then
7716    {
7717      $as_echo "/* $configure_input  */" \
7718      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
7719    } >"$ac_tmp/config.h" \
7720      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
7721    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
7722      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
7723$as_echo "$as_me: $ac_file is unchanged" >&6;}
7724    else
7725      rm -f "$ac_file"
7726      mv "$ac_tmp/config.h" "$ac_file" \
7727        || as_fn_error $? "could not create $ac_file" "$LINENO" 5
7728    fi
7729  else
7730    $as_echo "/* $configure_input  */" \
7731      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
7732      || as_fn_error $? "could not create -" "$LINENO" 5
7733  fi
7734 ;;
7735
7736
7737  esac
7738
7739done # for ac_tag
7740
7741
7742as_fn_exit 0
7743_ACEOF
7744ac_clean_files=$ac_clean_files_save
7745
7746test $ac_write_fail = 0 ||
7747  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
7748
7749
7750# configure is writing to config.log, and then calls config.status.
7751# config.status does its own redirection, appending to config.log.
7752# Unfortunately, on DOS this fails, as config.log is still kept open
7753# by configure, so config.status won't be able to write to it; its
7754# output is simply discarded.  So we exec the FD to /dev/null,
7755# effectively closing config.log, so it can be properly (re)opened and
7756# appended to by config.status.  When coming back to configure, we
7757# need to make the FD available again.
7758if test "$no_create" != yes; then
7759  ac_cs_success=:
7760  ac_config_status_args=
7761  test "$silent" = yes &&
7762    ac_config_status_args="$ac_config_status_args --quiet"
7763  exec 5>/dev/null
7764  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
7765  exec 5>>config.log
7766  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
7767  # would make configure fail if this is the last instruction.
7768  $ac_cs_success || as_fn_exit 1
7769fi
7770if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
7771  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
7772$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
7773fi
7774
Note: See TracBrowser for help on using the repository browser.