source: trunk/configure @ 1057

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

Reverting the X-library search in the configure script back to AC_PATH_X, in an attempt to stop the -R... appearing. Also tidying up the verification script.

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