source: trunk/configure @ 1016

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

Changing version for next release to 1.2

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