source: trunk/configure @ 1349

Last change on this file since 1349 was 1349, checked in by MatthewWhiting, 10 years ago

Fixing #212, so that we get a -lc++ in the linking command when built on OS X 10.9. Does not get added under eg. debian linux, where libc++ doesn't exist.

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