]> www.wagner.pp.ru Git - oss/fgis.git/blob - configure
Added logic to find GDAL installation.
[oss/fgis.git] / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.56 for fGIS 0.0.2.
4 #
5 # Report bugs to <dron@remotesensing.org>.
6 #
7 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
8 # Free Software Foundation, Inc.
9 # This configure script is free software; the Free Software Foundation
10 # gives unlimited permission to copy, distribute and modify it.
11 ## --------------------- ##
12 ## M4sh Initialization.  ##
13 ## --------------------- ##
14
15 # Be Bourne compatible
16 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
17   emulate sh
18   NULLCMD=:
19   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
20   # is contrary to our usage.  Disable this feature.
21   alias -g '${1+"$@"}'='"$@"'
22 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
23   set -o posix
24 fi
25
26 # Support unset when possible.
27 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
28   as_unset=unset
29 else
30   as_unset=false
31 fi
32
33
34 # Work around bugs in pre-3.0 UWIN ksh.
35 $as_unset ENV MAIL MAILPATH
36 PS1='$ '
37 PS2='> '
38 PS4='+ '
39
40 # NLS nuisances.
41 for as_var in \
42   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
43   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
44   LC_TELEPHONE LC_TIME
45 do
46   if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
47     eval $as_var=C; export $as_var
48   else
49     $as_unset $as_var
50   fi
51 done
52
53 # Required to use basename.
54 if expr a : '\(a\)' >/dev/null 2>&1; then
55   as_expr=expr
56 else
57   as_expr=false
58 fi
59
60 if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
61   as_basename=basename
62 else
63   as_basename=false
64 fi
65
66
67 # Name of the executable.
68 as_me=`$as_basename "$0" ||
69 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
70          X"$0" : 'X\(//\)$' \| \
71          X"$0" : 'X\(/\)$' \| \
72          .     : '\(.\)' 2>/dev/null ||
73 echo X/"$0" |
74     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
75           /^X\/\(\/\/\)$/{ s//\1/; q; }
76           /^X\/\(\/\).*/{ s//\1/; q; }
77           s/.*/./; q'`
78
79
80 # PATH needs CR, and LINENO needs CR and PATH.
81 # Avoid depending upon Character Ranges.
82 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
83 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
84 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
85 as_cr_digits='0123456789'
86 as_cr_alnum=$as_cr_Letters$as_cr_digits
87
88 # The user is always right.
89 if test "${PATH_SEPARATOR+set}" != set; then
90   echo "#! /bin/sh" >conf$$.sh
91   echo  "exit 0"   >>conf$$.sh
92   chmod +x conf$$.sh
93   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
94     PATH_SEPARATOR=';'
95   else
96     PATH_SEPARATOR=:
97   fi
98   rm -f conf$$.sh
99 fi
100
101
102   as_lineno_1=$LINENO
103   as_lineno_2=$LINENO
104   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
105   test "x$as_lineno_1" != "x$as_lineno_2" &&
106   test "x$as_lineno_3"  = "x$as_lineno_2"  || {
107   # Find who we are.  Look in the path if we contain no path at all
108   # relative or not.
109   case $0 in
110     *[\\/]* ) as_myself=$0 ;;
111     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
112 for as_dir in $PATH
113 do
114   IFS=$as_save_IFS
115   test -z "$as_dir" && as_dir=.
116   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
117 done
118
119        ;;
120   esac
121   # We did not find ourselves, most probably we were run as `sh COMMAND'
122   # in which case we are not to be found in the path.
123   if test "x$as_myself" = x; then
124     as_myself=$0
125   fi
126   if test ! -f "$as_myself"; then
127     { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
128    { (exit 1); exit 1; }; }
129   fi
130   case $CONFIG_SHELL in
131   '')
132     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
133 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
134 do
135   IFS=$as_save_IFS
136   test -z "$as_dir" && as_dir=.
137   for as_base in sh bash ksh sh5; do
138          case $as_dir in
139          /*)
140            if ("$as_dir/$as_base" -c '
141   as_lineno_1=$LINENO
142   as_lineno_2=$LINENO
143   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
144   test "x$as_lineno_1" != "x$as_lineno_2" &&
145   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
146              $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
147              $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
148              CONFIG_SHELL=$as_dir/$as_base
149              export CONFIG_SHELL
150              exec "$CONFIG_SHELL" "$0" ${1+"$@"}
151            fi;;
152          esac
153        done
154 done
155 ;;
156   esac
157
158   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
159   # uniformly replaced by the line number.  The first 'sed' inserts a
160   # line-number line before each line; the second 'sed' does the real
161   # work.  The second script uses 'N' to pair each line-number line
162   # with the numbered line, and appends trailing '-' during
163   # substitution so that $LINENO is not a special case at line end.
164   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
165   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
166   sed '=' <$as_myself |
167     sed '
168       N
169       s,$,-,
170       : loop
171       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
172       t loop
173       s,-$,,
174       s,^['$as_cr_digits']*\n,,
175     ' >$as_me.lineno &&
176   chmod +x $as_me.lineno ||
177     { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
178    { (exit 1); exit 1; }; }
179
180   # Don't try to exec as it changes $[0], causing all sort of problems
181   # (the dirname of $[0] is not the place where we might find the
182   # original and so on.  Autoconf is especially sensible to this).
183   . ./$as_me.lineno
184   # Exit status is that of the last command.
185   exit
186 }
187
188
189 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
190   *c*,-n*) ECHO_N= ECHO_C='
191 ' ECHO_T='      ' ;;
192   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
193   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
194 esac
195
196 if expr a : '\(a\)' >/dev/null 2>&1; then
197   as_expr=expr
198 else
199   as_expr=false
200 fi
201
202 rm -f conf$$ conf$$.exe conf$$.file
203 echo >conf$$.file
204 if ln -s conf$$.file conf$$ 2>/dev/null; then
205   # We could just check for DJGPP; but this test a) works b) is more generic
206   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
207   if test -f conf$$.exe; then
208     # Don't use ln at all; we don't have any links
209     as_ln_s='cp -p'
210   else
211     as_ln_s='ln -s'
212   fi
213 elif ln conf$$.file conf$$ 2>/dev/null; then
214   as_ln_s=ln
215 else
216   as_ln_s='cp -p'
217 fi
218 rm -f conf$$ conf$$.exe conf$$.file
219
220 if mkdir -p . 2>/dev/null; then
221   as_mkdir_p=:
222 else
223   as_mkdir_p=false
224 fi
225
226 as_executable_p="test -f"
227
228 # Sed expression to map a string onto a valid CPP name.
229 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
230
231 # Sed expression to map a string onto a valid variable name.
232 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
233
234
235 # IFS
236 # We need space, tab and new line, in precisely that order.
237 as_nl='
238 '
239 IFS="   $as_nl"
240
241 # CDPATH.
242 $as_unset CDPATH
243
244
245 # Find the correct PATH separator.  Usually this is `:', but
246 # DJGPP uses `;' like DOS.
247 if test "X${PATH_SEPARATOR+set}" != Xset; then
248   UNAME=${UNAME-`uname 2>/dev/null`}
249   case X$UNAME in
250     *-DOS) lt_cv_sys_path_separator=';' ;;
251     *)     lt_cv_sys_path_separator=':' ;;
252   esac
253   PATH_SEPARATOR=$lt_cv_sys_path_separator
254 fi
255
256
257 # Check that we are running under the correct shell.
258 SHELL=${CONFIG_SHELL-/bin/sh}
259
260 case X$ECHO in
261 X*--fallback-echo)
262   # Remove one level of quotation (which was required for Make).
263   ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
264   ;;
265 esac
266
267 echo=${ECHO-echo}
268 if test "X$1" = X--no-reexec; then
269   # Discard the --no-reexec flag, and continue.
270   shift
271 elif test "X$1" = X--fallback-echo; then
272   # Avoid inline document here, it may be left over
273   :
274 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
275   # Yippee, $echo works!
276   :
277 else
278   # Restart under the correct shell.
279   exec $SHELL "$0" --no-reexec ${1+"$@"}
280 fi
281
282 if test "X$1" = X--fallback-echo; then
283   # used as fallback echo
284   shift
285   cat <<EOF
286
287 EOF
288   exit 0
289 fi
290
291 # The HP-UX ksh and POSIX shell print the target directory to stdout
292 # if CDPATH is set.
293 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
294
295 if test -z "$ECHO"; then
296 if test "X${echo_test_string+set}" != Xset; then
297 # find a string as large as possible, as long as the shell can cope with it
298   for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
299     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
300     if (echo_test_string="`eval $cmd`") 2>/dev/null &&
301        echo_test_string="`eval $cmd`" &&
302        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
303     then
304       break
305     fi
306   done
307 fi
308
309 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
310    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
311    test "X$echo_testing_string" = "X$echo_test_string"; then
312   :
313 else
314   # The Solaris, AIX, and Digital Unix default echo programs unquote
315   # backslashes.  This makes it impossible to quote backslashes using
316   #   echo "$something" | sed 's/\\/\\\\/g'
317   #
318   # So, first we look for a working echo in the user's PATH.
319
320   IFS="${IFS=   }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
321   for dir in $PATH /usr/ucb; do
322     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
323        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
324        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
325        test "X$echo_testing_string" = "X$echo_test_string"; then
326       echo="$dir/echo"
327       break
328     fi
329   done
330   IFS="$save_ifs"
331
332   if test "X$echo" = Xecho; then
333     # We didn't find a better echo, so look for alternatives.
334     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
335        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
336        test "X$echo_testing_string" = "X$echo_test_string"; then
337       # This shell has a builtin print -r that does the trick.
338       echo='print -r'
339     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
340          test "X$CONFIG_SHELL" != X/bin/ksh; then
341       # If we have ksh, try running configure again with it.
342       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
343       export ORIGINAL_CONFIG_SHELL
344       CONFIG_SHELL=/bin/ksh
345       export CONFIG_SHELL
346       exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
347     else
348       # Try using printf.
349       echo='printf %s\n'
350       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
351          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
352          test "X$echo_testing_string" = "X$echo_test_string"; then
353         # Cool, printf works
354         :
355       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
356            test "X$echo_testing_string" = 'X\t' &&
357            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
358            test "X$echo_testing_string" = "X$echo_test_string"; then
359         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
360         export CONFIG_SHELL
361         SHELL="$CONFIG_SHELL"
362         export SHELL
363         echo="$CONFIG_SHELL $0 --fallback-echo"
364       elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
365            test "X$echo_testing_string" = 'X\t' &&
366            echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
367            test "X$echo_testing_string" = "X$echo_test_string"; then
368         echo="$CONFIG_SHELL $0 --fallback-echo"
369       else
370         # maybe with a smaller string...
371         prev=:
372
373         for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
374           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
375           then
376             break
377           fi
378           prev="$cmd"
379         done
380
381         if test "$prev" != 'sed 50q "$0"'; then
382           echo_test_string=`eval $prev`
383           export echo_test_string
384           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
385         else
386           # Oops.  We lost completely, so just stick with echo.
387           echo=echo
388         fi
389       fi
390     fi
391   fi
392 fi
393 fi
394
395 # Copy echo and quote the copy suitably for passing to libtool from
396 # the Makefile, instead of quoting the original, which is used later.
397 ECHO=$echo
398 if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
399    ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
400 fi
401
402
403
404 # Name of the host.
405 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
406 # so uname gets run too.
407 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
408
409 exec 6>&1
410
411 #
412 # Initializations.
413 #
414 ac_default_prefix=/usr/local
415 ac_config_libobj_dir=.
416 cross_compiling=no
417 subdirs=
418 MFLAGS=
419 MAKEFLAGS=
420 SHELL=${CONFIG_SHELL-/bin/sh}
421
422 # Maximum number of lines to put in a shell here document.
423 # This variable seems obsolete.  It should probably be removed, and
424 # only ac_max_sed_lines should be used.
425 : ${ac_max_here_lines=38}
426
427 # Identity of this package.
428 PACKAGE_NAME='fGIS'
429 PACKAGE_TARNAME='fgis'
430 PACKAGE_VERSION='0.0.2'
431 PACKAGE_STRING='fGIS 0.0.2'
432 PACKAGE_BUGREPORT='dron@remotesensing.org'
433
434 # Factoring default headers for most tests.
435 ac_includes_default="\
436 #include <stdio.h>
437 #if HAVE_SYS_TYPES_H
438 # include <sys/types.h>
439 #endif
440 #if HAVE_SYS_STAT_H
441 # include <sys/stat.h>
442 #endif
443 #if STDC_HEADERS
444 # include <stdlib.h>
445 # include <stddef.h>
446 #else
447 # if HAVE_STDLIB_H
448 #  include <stdlib.h>
449 # endif
450 #endif
451 #if HAVE_STRING_H
452 # if !STDC_HEADERS && HAVE_MEMORY_H
453 #  include <memory.h>
454 # endif
455 # include <string.h>
456 #endif
457 #if HAVE_STRINGS_H
458 # include <strings.h>
459 #endif
460 #if HAVE_INTTYPES_H
461 # include <inttypes.h>
462 #else
463 # if HAVE_STDINT_H
464 #  include <stdint.h>
465 # endif
466 #endif
467 #if HAVE_UNISTD_H
468 # include <unistd.h>
469 #endif"
470
471 ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO SET_MAKE build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT LN_S ECHO RANLIB ac_ct_RANLIB STRIP ac_ct_STRIP CPP EGREP LIBTOOL YACC ALLOCA LIBOBJS POW_LIB FGIS_CONFDIR FGIS_LIBDIR FGIS_SCRIPTDIR LIBEPP TCLHDIR TCLHDIRDASHI TCL_LIBRARY TCL_DEFS TCL_DELETEME TCL_DBGX TCL_EXEC_PREFIX TCL_SHLIB_LD SHLIB_SUFFIX TCL_LD_FLAGS TCL_BUILD_LIB_SPEC TCL_LIB_SPEC TCL_SHARED_LIB_SUFFIX TCL_INC_DIR TCL_PACKAGE_PATH TKHDIRDASHI TK_VERSION TK_DEFS TK_DBGX TK_XINCLUDES TK_XLIBSW TK_BUILD_LIB_SPEC TK_LIB_SPEC TK_INC_DIR GDAL_INC LTLIBOBJS'
472 ac_subst_files=''
473
474 # Initialize some variables set by options.
475 ac_init_help=
476 ac_init_version=false
477 # The variables have the same names as the options, with
478 # dashes changed to underlines.
479 cache_file=/dev/null
480 exec_prefix=NONE
481 no_create=
482 no_recursion=
483 prefix=NONE
484 program_prefix=NONE
485 program_suffix=NONE
486 program_transform_name=s,x,x,
487 silent=
488 site=
489 srcdir=
490 verbose=
491 x_includes=NONE
492 x_libraries=NONE
493
494 # Installation directory options.
495 # These are left unexpanded so users can "make install exec_prefix=/foo"
496 # and all the variables that are supposed to be based on exec_prefix
497 # by default will actually change.
498 # Use braces instead of parens because sh, perl, etc. also accept them.
499 bindir='${exec_prefix}/bin'
500 sbindir='${exec_prefix}/sbin'
501 libexecdir='${exec_prefix}/libexec'
502 datadir='${prefix}/share'
503 sysconfdir='${prefix}/etc'
504 sharedstatedir='${prefix}/com'
505 localstatedir='${prefix}/var'
506 libdir='${exec_prefix}/lib'
507 includedir='${prefix}/include'
508 oldincludedir='/usr/include'
509 infodir='${prefix}/info'
510 mandir='${prefix}/man'
511
512 ac_prev=
513 for ac_option
514 do
515   # If the previous option needs an argument, assign it.
516   if test -n "$ac_prev"; then
517     eval "$ac_prev=\$ac_option"
518     ac_prev=
519     continue
520   fi
521
522   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
523
524   # Accept the important Cygnus configure options, so we can diagnose typos.
525
526   case $ac_option in
527
528   -bindir | --bindir | --bindi | --bind | --bin | --bi)
529     ac_prev=bindir ;;
530   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
531     bindir=$ac_optarg ;;
532
533   -build | --build | --buil | --bui | --bu)
534     ac_prev=build_alias ;;
535   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
536     build_alias=$ac_optarg ;;
537
538   -cache-file | --cache-file | --cache-fil | --cache-fi \
539   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
540     ac_prev=cache_file ;;
541   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
542   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
543     cache_file=$ac_optarg ;;
544
545   --config-cache | -C)
546     cache_file=config.cache ;;
547
548   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
549     ac_prev=datadir ;;
550   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
551   | --da=*)
552     datadir=$ac_optarg ;;
553
554   -disable-* | --disable-*)
555     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
556     # Reject names that are not valid shell variable names.
557     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
558       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
559    { (exit 1); exit 1; }; }
560     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
561     eval "enable_$ac_feature=no" ;;
562
563   -enable-* | --enable-*)
564     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
565     # Reject names that are not valid shell variable names.
566     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
567       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
568    { (exit 1); exit 1; }; }
569     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
570     case $ac_option in
571       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
572       *) ac_optarg=yes ;;
573     esac
574     eval "enable_$ac_feature='$ac_optarg'" ;;
575
576   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
577   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
578   | --exec | --exe | --ex)
579     ac_prev=exec_prefix ;;
580   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
581   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
582   | --exec=* | --exe=* | --ex=*)
583     exec_prefix=$ac_optarg ;;
584
585   -gas | --gas | --ga | --g)
586     # Obsolete; use --with-gas.
587     with_gas=yes ;;
588
589   -help | --help | --hel | --he | -h)
590     ac_init_help=long ;;
591   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
592     ac_init_help=recursive ;;
593   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
594     ac_init_help=short ;;
595
596   -host | --host | --hos | --ho)
597     ac_prev=host_alias ;;
598   -host=* | --host=* | --hos=* | --ho=*)
599     host_alias=$ac_optarg ;;
600
601   -includedir | --includedir | --includedi | --included | --include \
602   | --includ | --inclu | --incl | --inc)
603     ac_prev=includedir ;;
604   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
605   | --includ=* | --inclu=* | --incl=* | --inc=*)
606     includedir=$ac_optarg ;;
607
608   -infodir | --infodir | --infodi | --infod | --info | --inf)
609     ac_prev=infodir ;;
610   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
611     infodir=$ac_optarg ;;
612
613   -libdir | --libdir | --libdi | --libd)
614     ac_prev=libdir ;;
615   -libdir=* | --libdir=* | --libdi=* | --libd=*)
616     libdir=$ac_optarg ;;
617
618   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
619   | --libexe | --libex | --libe)
620     ac_prev=libexecdir ;;
621   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
622   | --libexe=* | --libex=* | --libe=*)
623     libexecdir=$ac_optarg ;;
624
625   -localstatedir | --localstatedir | --localstatedi | --localstated \
626   | --localstate | --localstat | --localsta | --localst \
627   | --locals | --local | --loca | --loc | --lo)
628     ac_prev=localstatedir ;;
629   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
630   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
631   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
632     localstatedir=$ac_optarg ;;
633
634   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
635     ac_prev=mandir ;;
636   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
637     mandir=$ac_optarg ;;
638
639   -nfp | --nfp | --nf)
640     # Obsolete; use --without-fp.
641     with_fp=no ;;
642
643   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
644   | --no-cr | --no-c | -n)
645     no_create=yes ;;
646
647   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
648   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
649     no_recursion=yes ;;
650
651   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
652   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
653   | --oldin | --oldi | --old | --ol | --o)
654     ac_prev=oldincludedir ;;
655   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
656   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
657   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
658     oldincludedir=$ac_optarg ;;
659
660   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
661     ac_prev=prefix ;;
662   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
663     prefix=$ac_optarg ;;
664
665   -program-prefix | --program-prefix | --program-prefi | --program-pref \
666   | --program-pre | --program-pr | --program-p)
667     ac_prev=program_prefix ;;
668   -program-prefix=* | --program-prefix=* | --program-prefi=* \
669   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
670     program_prefix=$ac_optarg ;;
671
672   -program-suffix | --program-suffix | --program-suffi | --program-suff \
673   | --program-suf | --program-su | --program-s)
674     ac_prev=program_suffix ;;
675   -program-suffix=* | --program-suffix=* | --program-suffi=* \
676   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
677     program_suffix=$ac_optarg ;;
678
679   -program-transform-name | --program-transform-name \
680   | --program-transform-nam | --program-transform-na \
681   | --program-transform-n | --program-transform- \
682   | --program-transform | --program-transfor \
683   | --program-transfo | --program-transf \
684   | --program-trans | --program-tran \
685   | --progr-tra | --program-tr | --program-t)
686     ac_prev=program_transform_name ;;
687   -program-transform-name=* | --program-transform-name=* \
688   | --program-transform-nam=* | --program-transform-na=* \
689   | --program-transform-n=* | --program-transform-=* \
690   | --program-transform=* | --program-transfor=* \
691   | --program-transfo=* | --program-transf=* \
692   | --program-trans=* | --program-tran=* \
693   | --progr-tra=* | --program-tr=* | --program-t=*)
694     program_transform_name=$ac_optarg ;;
695
696   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
697   | -silent | --silent | --silen | --sile | --sil)
698     silent=yes ;;
699
700   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
701     ac_prev=sbindir ;;
702   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
703   | --sbi=* | --sb=*)
704     sbindir=$ac_optarg ;;
705
706   -sharedstatedir | --sharedstatedir | --sharedstatedi \
707   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
708   | --sharedst | --shareds | --shared | --share | --shar \
709   | --sha | --sh)
710     ac_prev=sharedstatedir ;;
711   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
712   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
713   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
714   | --sha=* | --sh=*)
715     sharedstatedir=$ac_optarg ;;
716
717   -site | --site | --sit)
718     ac_prev=site ;;
719   -site=* | --site=* | --sit=*)
720     site=$ac_optarg ;;
721
722   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
723     ac_prev=srcdir ;;
724   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
725     srcdir=$ac_optarg ;;
726
727   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
728   | --syscon | --sysco | --sysc | --sys | --sy)
729     ac_prev=sysconfdir ;;
730   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
731   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
732     sysconfdir=$ac_optarg ;;
733
734   -target | --target | --targe | --targ | --tar | --ta | --t)
735     ac_prev=target_alias ;;
736   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
737     target_alias=$ac_optarg ;;
738
739   -v | -verbose | --verbose | --verbos | --verbo | --verb)
740     verbose=yes ;;
741
742   -version | --version | --versio | --versi | --vers | -V)
743     ac_init_version=: ;;
744
745   -with-* | --with-*)
746     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
747     # Reject names that are not valid shell variable names.
748     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
749       { echo "$as_me: error: invalid package name: $ac_package" >&2
750    { (exit 1); exit 1; }; }
751     ac_package=`echo $ac_package| sed 's/-/_/g'`
752     case $ac_option in
753       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
754       *) ac_optarg=yes ;;
755     esac
756     eval "with_$ac_package='$ac_optarg'" ;;
757
758   -without-* | --without-*)
759     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
760     # Reject names that are not valid shell variable names.
761     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
762       { echo "$as_me: error: invalid package name: $ac_package" >&2
763    { (exit 1); exit 1; }; }
764     ac_package=`echo $ac_package | sed 's/-/_/g'`
765     eval "with_$ac_package=no" ;;
766
767   --x)
768     # Obsolete; use --with-x.
769     with_x=yes ;;
770
771   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
772   | --x-incl | --x-inc | --x-in | --x-i)
773     ac_prev=x_includes ;;
774   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
775   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
776     x_includes=$ac_optarg ;;
777
778   -x-libraries | --x-libraries | --x-librarie | --x-librari \
779   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
780     ac_prev=x_libraries ;;
781   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
782   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
783     x_libraries=$ac_optarg ;;
784
785   -*) { echo "$as_me: error: unrecognized option: $ac_option
786 Try \`$0 --help' for more information." >&2
787    { (exit 1); exit 1; }; }
788     ;;
789
790   *=*)
791     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
792     # Reject names that are not valid shell variable names.
793     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
794       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
795    { (exit 1); exit 1; }; }
796     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
797     eval "$ac_envvar='$ac_optarg'"
798     export $ac_envvar ;;
799
800   *)
801     # FIXME: should be removed in autoconf 3.0.
802     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
803     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
804       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
805     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
806     ;;
807
808   esac
809 done
810
811 if test -n "$ac_prev"; then
812   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
813   { echo "$as_me: error: missing argument to $ac_option" >&2
814    { (exit 1); exit 1; }; }
815 fi
816
817 # Be sure to have absolute paths.
818 for ac_var in exec_prefix prefix
819 do
820   eval ac_val=$`echo $ac_var`
821   case $ac_val in
822     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
823     *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
824    { (exit 1); exit 1; }; };;
825   esac
826 done
827
828 # Be sure to have absolute paths.
829 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
830               localstatedir libdir includedir oldincludedir infodir mandir
831 do
832   eval ac_val=$`echo $ac_var`
833   case $ac_val in
834     [\\/$]* | ?:[\\/]* ) ;;
835     *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
836    { (exit 1); exit 1; }; };;
837   esac
838 done
839
840 # There might be people who depend on the old broken behavior: `$host'
841 # used to hold the argument of --host etc.
842 # FIXME: To remove some day.
843 build=$build_alias
844 host=$host_alias
845 target=$target_alias
846
847 # FIXME: To remove some day.
848 if test "x$host_alias" != x; then
849   if test "x$build_alias" = x; then
850     cross_compiling=maybe
851     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
852     If a cross compiler is detected then cross compile mode will be used." >&2
853   elif test "x$build_alias" != "x$host_alias"; then
854     cross_compiling=yes
855   fi
856 fi
857
858 ac_tool_prefix=
859 test -n "$host_alias" && ac_tool_prefix=$host_alias-
860
861 test "$silent" = yes && exec 6>/dev/null
862
863
864 # Find the source files, if location was not specified.
865 if test -z "$srcdir"; then
866   ac_srcdir_defaulted=yes
867   # Try the directory containing this script, then its parent.
868   ac_confdir=`(dirname "$0") 2>/dev/null ||
869 $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
870          X"$0" : 'X\(//\)[^/]' \| \
871          X"$0" : 'X\(//\)$' \| \
872          X"$0" : 'X\(/\)' \| \
873          .     : '\(.\)' 2>/dev/null ||
874 echo X"$0" |
875     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
876           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
877           /^X\(\/\/\)$/{ s//\1/; q; }
878           /^X\(\/\).*/{ s//\1/; q; }
879           s/.*/./; q'`
880   srcdir=$ac_confdir
881   if test ! -r $srcdir/$ac_unique_file; then
882     srcdir=..
883   fi
884 else
885   ac_srcdir_defaulted=no
886 fi
887 if test ! -r $srcdir/$ac_unique_file; then
888   if test "$ac_srcdir_defaulted" = yes; then
889     { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
890    { (exit 1); exit 1; }; }
891   else
892     { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
893    { (exit 1); exit 1; }; }
894   fi
895 fi
896 (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
897   { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
898    { (exit 1); exit 1; }; }
899 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
900 ac_env_build_alias_set=${build_alias+set}
901 ac_env_build_alias_value=$build_alias
902 ac_cv_env_build_alias_set=${build_alias+set}
903 ac_cv_env_build_alias_value=$build_alias
904 ac_env_host_alias_set=${host_alias+set}
905 ac_env_host_alias_value=$host_alias
906 ac_cv_env_host_alias_set=${host_alias+set}
907 ac_cv_env_host_alias_value=$host_alias
908 ac_env_target_alias_set=${target_alias+set}
909 ac_env_target_alias_value=$target_alias
910 ac_cv_env_target_alias_set=${target_alias+set}
911 ac_cv_env_target_alias_value=$target_alias
912 ac_env_CC_set=${CC+set}
913 ac_env_CC_value=$CC
914 ac_cv_env_CC_set=${CC+set}
915 ac_cv_env_CC_value=$CC
916 ac_env_CFLAGS_set=${CFLAGS+set}
917 ac_env_CFLAGS_value=$CFLAGS
918 ac_cv_env_CFLAGS_set=${CFLAGS+set}
919 ac_cv_env_CFLAGS_value=$CFLAGS
920 ac_env_LDFLAGS_set=${LDFLAGS+set}
921 ac_env_LDFLAGS_value=$LDFLAGS
922 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
923 ac_cv_env_LDFLAGS_value=$LDFLAGS
924 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
925 ac_env_CPPFLAGS_value=$CPPFLAGS
926 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
927 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
928 ac_env_CPP_set=${CPP+set}
929 ac_env_CPP_value=$CPP
930 ac_cv_env_CPP_set=${CPP+set}
931 ac_cv_env_CPP_value=$CPP
932
933 #
934 # Report the --help message.
935 #
936 if test "$ac_init_help" = "long"; then
937   # Omit some internal or obsolete options to make the list less imposing.
938   # This message is too long to be a string in the A/UX 3.1 sh.
939   cat <<_ACEOF
940 \`configure' configures fGIS 0.0.2 to adapt to many kinds of systems.
941
942 Usage: $0 [OPTION]... [VAR=VALUE]...
943
944 To assign environment variables (e.g., CC, CFLAGS...), specify them as
945 VAR=VALUE.  See below for descriptions of some of the useful variables.
946
947 Defaults for the options are specified in brackets.
948
949 Configuration:
950   -h, --help              display this help and exit
951       --help=short        display options specific to this package
952       --help=recursive    display the short help of all the included packages
953   -V, --version           display version information and exit
954   -q, --quiet, --silent   do not print \`checking...' messages
955       --cache-file=FILE   cache test results in FILE [disabled]
956   -C, --config-cache      alias for \`--cache-file=config.cache'
957   -n, --no-create         do not create output files
958       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
959
960 _ACEOF
961
962   cat <<_ACEOF
963 Installation directories:
964   --prefix=PREFIX         install architecture-independent files in PREFIX
965                           [$ac_default_prefix]
966   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
967                           [PREFIX]
968
969 By default, \`make install' will install all the files in
970 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
971 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
972 for instance \`--prefix=\$HOME'.
973
974 For better control, use the options below.
975
976 Fine tuning of the installation directories:
977   --bindir=DIR           user executables [EPREFIX/bin]
978   --sbindir=DIR          system admin executables [EPREFIX/sbin]
979   --libexecdir=DIR       program executables [EPREFIX/libexec]
980   --datadir=DIR          read-only architecture-independent data [PREFIX/share]
981   --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
982   --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
983   --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
984   --libdir=DIR           object code libraries [EPREFIX/lib]
985   --includedir=DIR       C header files [PREFIX/include]
986   --oldincludedir=DIR    C header files for non-gcc [/usr/include]
987   --infodir=DIR          info documentation [PREFIX/info]
988   --mandir=DIR           man documentation [PREFIX/man]
989 _ACEOF
990
991   cat <<\_ACEOF
992
993 Program names:
994   --program-prefix=PREFIX            prepend PREFIX to installed program names
995   --program-suffix=SUFFIX            append SUFFIX to installed program names
996   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
997
998 X features:
999   --x-includes=DIR    X include files are in DIR
1000   --x-libraries=DIR   X library files are in DIR
1001
1002 System types:
1003   --build=BUILD     configure for building on BUILD [guessed]
1004   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1005 _ACEOF
1006 fi
1007
1008 if test -n "$ac_init_help"; then
1009   case $ac_init_help in
1010      short | recursive ) echo "Configuration of fGIS 0.0.2:";;
1011    esac
1012   cat <<\_ACEOF
1013
1014 Optional Features:
1015   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1016   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1017   --enable-shared=PKGS  build shared libraries default=yes
1018   --enable-static=PKGS  build static libraries default=yes
1019   --enable-fast-install=PKGS  optimize for fast installation default=yes
1020   --disable-libtool-lock  avoid locking (might break parallel builds)
1021
1022 Optional Packages:
1023   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1024   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1025   --with-gnu-ld           assume the C compiler uses GNU ld default=no
1026   --with-pic              try to use only PIC/non-PIC objects default=use both
1027   --with-x                use the X Window System
1028   --with-tclinclude=DIR   directory where tcl private headers are
1029   --with-tcl=DIR          directory containing tcl configuration (tclConfig.sh)
1030   --with-tkinclude=DIR    directory where tk private headers are
1031   --with-tk=DIR           directory containing tk configuration (tkConfig.sh)
1032   --with-gdal[=DIR]       path to GDAL build tree
1033
1034 Some influential environment variables:
1035   CC          C compiler command
1036   CFLAGS      C compiler flags
1037   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1038               nonstandard directory <lib dir>
1039   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
1040               headers in a nonstandard directory <include dir>
1041   CPP         C preprocessor
1042
1043 Use these variables to override the choices made by `configure' or to help
1044 it to find libraries and programs with nonstandard names/locations.
1045
1046 Report bugs to <dron@remotesensing.org>.
1047 _ACEOF
1048 fi
1049
1050 if test "$ac_init_help" = "recursive"; then
1051   # If there are subdirs, report their specific --help.
1052   ac_popdir=`pwd`
1053   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1054     test -d $ac_dir || continue
1055     ac_builddir=.
1056
1057 if test "$ac_dir" != .; then
1058   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
1059   # A "../" for each directory in $ac_dir_suffix.
1060   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
1061 else
1062   ac_dir_suffix= ac_top_builddir=
1063 fi
1064
1065 case $srcdir in
1066   .)  # No --srcdir option.  We are building in place.
1067     ac_srcdir=.
1068     if test -z "$ac_top_builddir"; then
1069        ac_top_srcdir=.
1070     else
1071        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
1072     fi ;;
1073   [\\/]* | ?:[\\/]* )  # Absolute path.
1074     ac_srcdir=$srcdir$ac_dir_suffix;
1075     ac_top_srcdir=$srcdir ;;
1076   *) # Relative path.
1077     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
1078     ac_top_srcdir=$ac_top_builddir$srcdir ;;
1079 esac
1080 # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
1081 # absolute.
1082 ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
1083 ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
1084 ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
1085 ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
1086
1087     cd $ac_dir
1088     # Check for guested configure; otherwise get Cygnus style configure.
1089     if test -f $ac_srcdir/configure.gnu; then
1090       echo
1091       $SHELL $ac_srcdir/configure.gnu  --help=recursive
1092     elif test -f $ac_srcdir/configure; then
1093       echo
1094       $SHELL $ac_srcdir/configure  --help=recursive
1095     elif test -f $ac_srcdir/configure.ac ||
1096            test -f $ac_srcdir/configure.in; then
1097       echo
1098       $ac_configure --help
1099     else
1100       echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1101     fi
1102     cd $ac_popdir
1103   done
1104 fi
1105
1106 test -n "$ac_init_help" && exit 0
1107 if $ac_init_version; then
1108   cat <<\_ACEOF
1109 fGIS configure 0.0.2
1110 generated by GNU Autoconf 2.56
1111
1112 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
1113 Free Software Foundation, Inc.
1114 This configure script is free software; the Free Software Foundation
1115 gives unlimited permission to copy, distribute and modify it.
1116 _ACEOF
1117   exit 0
1118 fi
1119 exec 5>config.log
1120 cat >&5 <<_ACEOF
1121 This file contains any messages produced by compilers while
1122 running configure, to aid debugging if configure makes a mistake.
1123
1124 It was created by fGIS $as_me 0.0.2, which was
1125 generated by GNU Autoconf 2.56.  Invocation command line was
1126
1127   $ $0 $@
1128
1129 _ACEOF
1130 {
1131 cat <<_ASUNAME
1132 ## --------- ##
1133 ## Platform. ##
1134 ## --------- ##
1135
1136 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1137 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1138 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1139 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1140 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1141
1142 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1143 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1144
1145 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1146 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1147 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1148 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
1149 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1150 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1151 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1152
1153 _ASUNAME
1154
1155 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1156 for as_dir in $PATH
1157 do
1158   IFS=$as_save_IFS
1159   test -z "$as_dir" && as_dir=.
1160   echo "PATH: $as_dir"
1161 done
1162
1163 } >&5
1164
1165 cat >&5 <<_ACEOF
1166
1167
1168 ## ----------- ##
1169 ## Core tests. ##
1170 ## ----------- ##
1171
1172 _ACEOF
1173
1174
1175 # Keep a trace of the command line.
1176 # Strip out --no-create and --no-recursion so they do not pile up.
1177 # Strip out --silent because we don't want to record it for future runs.
1178 # Also quote any args containing shell meta-characters.
1179 # Make two passes to allow for proper duplicate-argument suppression.
1180 ac_configure_args=
1181 ac_configure_args0=
1182 ac_configure_args1=
1183 ac_sep=
1184 ac_must_keep_next=false
1185 for ac_pass in 1 2
1186 do
1187   for ac_arg
1188   do
1189     case $ac_arg in
1190     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1191     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1192     | -silent | --silent | --silen | --sile | --sil)
1193       continue ;;
1194     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1195       ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1196     esac
1197     case $ac_pass in
1198     1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1199     2)
1200       ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1201       if test $ac_must_keep_next = true; then
1202         ac_must_keep_next=false # Got value, back to normal.
1203       else
1204         case $ac_arg in
1205           *=* | --config-cache | -C | -disable-* | --disable-* \
1206           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1207           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1208           | -with-* | --with-* | -without-* | --without-* | --x)
1209             case "$ac_configure_args0 " in
1210               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1211             esac
1212             ;;
1213           -* ) ac_must_keep_next=true ;;
1214         esac
1215       fi
1216       ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1217       # Get rid of the leading space.
1218       ac_sep=" "
1219       ;;
1220     esac
1221   done
1222 done
1223 $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1224 $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1225
1226 # When interrupted or exit'd, cleanup temporary files, and complete
1227 # config.log.  We remove comments because anyway the quotes in there
1228 # would cause problems or look ugly.
1229 # WARNING: Be sure not to use single quotes in there, as some shells,
1230 # such as our DU 5.0 friend, will then `close' the trap.
1231 trap 'exit_status=$?
1232   # Save into config.log some information that might help in debugging.
1233   {
1234     echo
1235
1236     cat <<\_ASBOX
1237 ## ---------------- ##
1238 ## Cache variables. ##
1239 ## ---------------- ##
1240 _ASBOX
1241     echo
1242     # The following way of writing the cache mishandles newlines in values,
1243 {
1244   (set) 2>&1 |
1245     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1246     *ac_space=\ *)
1247       sed -n \
1248         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1249           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1250       ;;
1251     *)
1252       sed -n \
1253         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1254       ;;
1255     esac;
1256 }
1257     echo
1258
1259     cat <<\_ASBOX
1260 ## ----------------- ##
1261 ## Output variables. ##
1262 ## ----------------- ##
1263 _ASBOX
1264     echo
1265     for ac_var in $ac_subst_vars
1266     do
1267       eval ac_val=$`echo $ac_var`
1268       echo "$ac_var='"'"'$ac_val'"'"'"
1269     done | sort
1270     echo
1271
1272     if test -n "$ac_subst_files"; then
1273       cat <<\_ASBOX
1274 ## ------------- ##
1275 ## Output files. ##
1276 ## ------------- ##
1277 _ASBOX
1278       echo
1279       for ac_var in $ac_subst_files
1280       do
1281         eval ac_val=$`echo $ac_var`
1282         echo "$ac_var='"'"'$ac_val'"'"'"
1283       done | sort
1284       echo
1285     fi
1286
1287     if test -s confdefs.h; then
1288       cat <<\_ASBOX
1289 ## ----------- ##
1290 ## confdefs.h. ##
1291 ## ----------- ##
1292 _ASBOX
1293       echo
1294       sed "/^$/d" confdefs.h | sort
1295       echo
1296     fi
1297     test "$ac_signal" != 0 &&
1298       echo "$as_me: caught signal $ac_signal"
1299     echo "$as_me: exit $exit_status"
1300   } >&5
1301   rm -f core core.* *.core &&
1302   rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1303     exit $exit_status
1304      ' 0
1305 for ac_signal in 1 2 13 15; do
1306   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1307 done
1308 ac_signal=0
1309
1310 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1311 rm -rf conftest* confdefs.h
1312 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1313 echo >confdefs.h
1314
1315 # Predefined preprocessor variables.
1316
1317 cat >>confdefs.h <<_ACEOF
1318 #define PACKAGE_NAME "$PACKAGE_NAME"
1319 _ACEOF
1320
1321
1322 cat >>confdefs.h <<_ACEOF
1323 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1324 _ACEOF
1325
1326
1327 cat >>confdefs.h <<_ACEOF
1328 #define PACKAGE_VERSION "$PACKAGE_VERSION"
1329 _ACEOF
1330
1331
1332 cat >>confdefs.h <<_ACEOF
1333 #define PACKAGE_STRING "$PACKAGE_STRING"
1334 _ACEOF
1335
1336
1337 cat >>confdefs.h <<_ACEOF
1338 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1339 _ACEOF
1340
1341
1342 # Let the site file select an alternate cache file if it wants to.
1343 # Prefer explicitly selected file to automatically selected ones.
1344 if test -z "$CONFIG_SITE"; then
1345   if test "x$prefix" != xNONE; then
1346     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1347   else
1348     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1349   fi
1350 fi
1351 for ac_site_file in $CONFIG_SITE; do
1352   if test -r "$ac_site_file"; then
1353     { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1354 echo "$as_me: loading site script $ac_site_file" >&6;}
1355     sed 's/^/| /' "$ac_site_file" >&5
1356     . "$ac_site_file"
1357   fi
1358 done
1359
1360 if test -r "$cache_file"; then
1361   # Some versions of bash will fail to source /dev/null (special
1362   # files actually), so we avoid doing that.
1363   if test -f "$cache_file"; then
1364     { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1365 echo "$as_me: loading cache $cache_file" >&6;}
1366     case $cache_file in
1367       [\\/]* | ?:[\\/]* ) . $cache_file;;
1368       *)                      . ./$cache_file;;
1369     esac
1370   fi
1371 else
1372   { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1373 echo "$as_me: creating cache $cache_file" >&6;}
1374   >$cache_file
1375 fi
1376
1377 # Check that the precious variables saved in the cache have kept the same
1378 # value.
1379 ac_cache_corrupted=false
1380 for ac_var in `(set) 2>&1 |
1381                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1382   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1383   eval ac_new_set=\$ac_env_${ac_var}_set
1384   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1385   eval ac_new_val="\$ac_env_${ac_var}_value"
1386   case $ac_old_set,$ac_new_set in
1387     set,)
1388       { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1389 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1390       ac_cache_corrupted=: ;;
1391     ,set)
1392       { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1393 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1394       ac_cache_corrupted=: ;;
1395     ,);;
1396     *)
1397       if test "x$ac_old_val" != "x$ac_new_val"; then
1398         { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1399 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1400         { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
1401 echo "$as_me:   former value:  $ac_old_val" >&2;}
1402         { echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
1403 echo "$as_me:   current value: $ac_new_val" >&2;}
1404         ac_cache_corrupted=:
1405       fi;;
1406   esac
1407   # Pass precious variables to config.status.
1408   if test "$ac_new_set" = set; then
1409     case $ac_new_val in
1410     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1411       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1412     *) ac_arg=$ac_var=$ac_new_val ;;
1413     esac
1414     case " $ac_configure_args " in
1415       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1416       *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1417     esac
1418   fi
1419 done
1420 if $ac_cache_corrupted; then
1421   { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1422 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1423   { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1424 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1425    { (exit 1); exit 1; }; }
1426 fi
1427
1428 ac_ext=c
1429 ac_cpp='$CPP $CPPFLAGS'
1430 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1431 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1432 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460 am__api_version="1.4"
1461 ac_aux_dir=
1462 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1463   if test -f $ac_dir/install-sh; then
1464     ac_aux_dir=$ac_dir
1465     ac_install_sh="$ac_aux_dir/install-sh -c"
1466     break
1467   elif test -f $ac_dir/install.sh; then
1468     ac_aux_dir=$ac_dir
1469     ac_install_sh="$ac_aux_dir/install.sh -c"
1470     break
1471   elif test -f $ac_dir/shtool; then
1472     ac_aux_dir=$ac_dir
1473     ac_install_sh="$ac_aux_dir/shtool install -c"
1474     break
1475   fi
1476 done
1477 if test -z "$ac_aux_dir"; then
1478   { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1479 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1480    { (exit 1); exit 1; }; }
1481 fi
1482 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1483 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1484 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1485
1486 # Find a good install program.  We prefer a C program (faster),
1487 # so one script is as good as another.  But avoid the broken or
1488 # incompatible versions:
1489 # SysV /etc/install, /usr/sbin/install
1490 # SunOS /usr/etc/install
1491 # IRIX /sbin/install
1492 # AIX /bin/install
1493 # AmigaOS /C/install, which installs bootblocks on floppy discs
1494 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1495 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1496 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1497 # ./install, which can be erroneously created by make from ./install.sh.
1498 echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
1499 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
1500 if test -z "$INSTALL"; then
1501 if test "${ac_cv_path_install+set}" = set; then
1502   echo $ECHO_N "(cached) $ECHO_C" >&6
1503 else
1504   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1505 for as_dir in $PATH
1506 do
1507   IFS=$as_save_IFS
1508   test -z "$as_dir" && as_dir=.
1509   # Account for people who put trailing slashes in PATH elements.
1510 case $as_dir/ in
1511   ./ | .// | /cC/* | \
1512   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
1513   /usr/ucb/* ) ;;
1514   *)
1515     # OSF1 and SCO ODT 3.0 have their own names for install.
1516     # Don't use installbsd from OSF since it installs stuff as root
1517     # by default.
1518     for ac_prog in ginstall scoinst install; do
1519       for ac_exec_ext in '' $ac_executable_extensions; do
1520         if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
1521           if test $ac_prog = install &&
1522             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
1523             # AIX install.  It has an incompatible calling convention.
1524             :
1525           elif test $ac_prog = install &&
1526             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
1527             # program-specific install script used by HP pwplus--don't use.
1528             :
1529           else
1530             ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
1531             break 3
1532           fi
1533         fi
1534       done
1535     done
1536     ;;
1537 esac
1538 done
1539
1540
1541 fi
1542   if test "${ac_cv_path_install+set}" = set; then
1543     INSTALL=$ac_cv_path_install
1544   else
1545     # As a last resort, use the slow shell script.  We don't cache a
1546     # path for INSTALL within a source directory, because that will
1547     # break other packages using the cache if that directory is
1548     # removed, or if the path is relative.
1549     INSTALL=$ac_install_sh
1550   fi
1551 fi
1552 echo "$as_me:$LINENO: result: $INSTALL" >&5
1553 echo "${ECHO_T}$INSTALL" >&6
1554
1555 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1556 # It thinks the first close brace ends the variable substitution.
1557 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1558
1559 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
1560
1561 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1562
1563 echo "$as_me:$LINENO: checking whether build environment is sane" >&5
1564 echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6
1565 # Just in case
1566 sleep 1
1567 echo timestamp > conftestfile
1568 # Do `set' in a subshell so we don't clobber the current shell's
1569 # arguments.  Must try -L first in case configure is actually a
1570 # symlink; some systems play weird games with the mod time of symlinks
1571 # (eg FreeBSD returns the mod time of the symlink's containing
1572 # directory).
1573 if (
1574    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
1575    if test "$*" = "X"; then
1576       # -L didn't work.
1577       set X `ls -t $srcdir/configure conftestfile`
1578    fi
1579    if test "$*" != "X $srcdir/configure conftestfile" \
1580       && test "$*" != "X conftestfile $srcdir/configure"; then
1581
1582       # If neither matched, then we have a broken ls.  This can happen
1583       # if, for instance, CONFIG_SHELL is bash and it inherits a
1584       # broken ls alias from the environment.  This has actually
1585       # happened.  Such a system could not be considered "sane".
1586       { { echo "$as_me:$LINENO: error: ls -t appears to fail.  Make sure there is not a broken
1587 alias in your environment" >&5
1588 echo "$as_me: error: ls -t appears to fail.  Make sure there is not a broken
1589 alias in your environment" >&2;}
1590    { (exit 1); exit 1; }; }
1591    fi
1592
1593    test "$2" = conftestfile
1594    )
1595 then
1596    # Ok.
1597    :
1598 else
1599    { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
1600 Check your system clock" >&5
1601 echo "$as_me: error: newly created file is older than distributed files!
1602 Check your system clock" >&2;}
1603    { (exit 1); exit 1; }; }
1604 fi
1605 rm -f conftest*
1606 echo "$as_me:$LINENO: result: yes" >&5
1607 echo "${ECHO_T}yes" >&6
1608 test "$program_prefix" != NONE &&
1609   program_transform_name="s,^,$program_prefix,;$program_transform_name"
1610 # Use a double $ so make ignores it.
1611 test "$program_suffix" != NONE &&
1612   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1613 # Double any \ or $.  echo might interpret backslashes.
1614 # By default was `s,x,x', remove it if useless.
1615 cat <<\_ACEOF >conftest.sed
1616 s/[\\$]/&&/g;s/;s,x,x,$//
1617 _ACEOF
1618 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1619 rm conftest.sed
1620
1621 echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
1622 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
1623 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
1624 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1625   echo $ECHO_N "(cached) $ECHO_C" >&6
1626 else
1627   cat >conftest.make <<\_ACEOF
1628 all:
1629         @echo 'ac_maketemp="$(MAKE)"'
1630 _ACEOF
1631 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1632 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
1633 if test -n "$ac_maketemp"; then
1634   eval ac_cv_prog_make_${ac_make}_set=yes
1635 else
1636   eval ac_cv_prog_make_${ac_make}_set=no
1637 fi
1638 rm -f conftest.make
1639 fi
1640 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1641   echo "$as_me:$LINENO: result: yes" >&5
1642 echo "${ECHO_T}yes" >&6
1643   SET_MAKE=
1644 else
1645   echo "$as_me:$LINENO: result: no" >&5
1646 echo "${ECHO_T}no" >&6
1647   SET_MAKE="MAKE=${MAKE-make}"
1648 fi
1649
1650
1651 PACKAGE=
1652
1653 VERSION=
1654
1655 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1656   { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
1657 echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
1658    { (exit 1); exit 1; }; }
1659 fi
1660
1661 cat >>confdefs.h <<_ACEOF
1662 #define PACKAGE "$PACKAGE"
1663 _ACEOF
1664
1665
1666 cat >>confdefs.h <<_ACEOF
1667 #define VERSION "$VERSION"
1668 _ACEOF
1669
1670
1671
1672 missing_dir=`cd $ac_aux_dir && pwd`
1673 echo "$as_me:$LINENO: checking for working aclocal-${am__api_version}" >&5
1674 echo $ECHO_N "checking for working aclocal-${am__api_version}... $ECHO_C" >&6
1675 # Run test in a subshell; some versions of sh will print an error if
1676 # an executable is not found, even if stderr is redirected.
1677 # Redirect stdin to placate older versions of autoconf.  Sigh.
1678 if (aclocal-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
1679    ACLOCAL=aclocal-${am__api_version}
1680    echo "$as_me:$LINENO: result: found" >&5
1681 echo "${ECHO_T}found" >&6
1682 else
1683    ACLOCAL="$missing_dir/missing aclocal-${am__api_version}"
1684    echo "$as_me:$LINENO: result: missing" >&5
1685 echo "${ECHO_T}missing" >&6
1686 fi
1687
1688 echo "$as_me:$LINENO: checking for working autoconf" >&5
1689 echo $ECHO_N "checking for working autoconf... $ECHO_C" >&6
1690 # Run test in a subshell; some versions of sh will print an error if
1691 # an executable is not found, even if stderr is redirected.
1692 # Redirect stdin to placate older versions of autoconf.  Sigh.
1693 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1694    AUTOCONF=autoconf
1695    echo "$as_me:$LINENO: result: found" >&5
1696 echo "${ECHO_T}found" >&6
1697 else
1698    AUTOCONF="$missing_dir/missing autoconf"
1699    echo "$as_me:$LINENO: result: missing" >&5
1700 echo "${ECHO_T}missing" >&6
1701 fi
1702
1703 echo "$as_me:$LINENO: checking for working automake-${am__api_version}" >&5
1704 echo $ECHO_N "checking for working automake-${am__api_version}... $ECHO_C" >&6
1705 # Run test in a subshell; some versions of sh will print an error if
1706 # an executable is not found, even if stderr is redirected.
1707 # Redirect stdin to placate older versions of autoconf.  Sigh.
1708 if (automake-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
1709    AUTOMAKE=automake-${am__api_version}
1710    echo "$as_me:$LINENO: result: found" >&5
1711 echo "${ECHO_T}found" >&6
1712 else
1713    AUTOMAKE="$missing_dir/missing automake-${am__api_version}"
1714    echo "$as_me:$LINENO: result: missing" >&5
1715 echo "${ECHO_T}missing" >&6
1716 fi
1717
1718 echo "$as_me:$LINENO: checking for working autoheader" >&5
1719 echo $ECHO_N "checking for working autoheader... $ECHO_C" >&6
1720 # Run test in a subshell; some versions of sh will print an error if
1721 # an executable is not found, even if stderr is redirected.
1722 # Redirect stdin to placate older versions of autoconf.  Sigh.
1723 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1724    AUTOHEADER=autoheader
1725    echo "$as_me:$LINENO: result: found" >&5
1726 echo "${ECHO_T}found" >&6
1727 else
1728    AUTOHEADER="$missing_dir/missing autoheader"
1729    echo "$as_me:$LINENO: result: missing" >&5
1730 echo "${ECHO_T}missing" >&6
1731 fi
1732
1733 echo "$as_me:$LINENO: checking for working makeinfo" >&5
1734 echo $ECHO_N "checking for working makeinfo... $ECHO_C" >&6
1735 # Run test in a subshell; some versions of sh will print an error if
1736 # an executable is not found, even if stderr is redirected.
1737 # Redirect stdin to placate older versions of autoconf.  Sigh.
1738 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1739    MAKEINFO=makeinfo
1740    echo "$as_me:$LINENO: result: found" >&5
1741 echo "${ECHO_T}found" >&6
1742 else
1743    MAKEINFO="$missing_dir/missing makeinfo"
1744    echo "$as_me:$LINENO: result: missing" >&5
1745 echo "${ECHO_T}missing" >&6
1746 fi
1747
1748
1749
1750           ac_config_headers="$ac_config_headers include/config.h"
1751
1752           ac_config_commands="$ac_config_commands default-1"
1753
1754
1755
1756 # Check whether --enable-shared or --disable-shared was given.
1757 if test "${enable_shared+set}" = set; then
1758   enableval="$enable_shared"
1759   p=${PACKAGE-default}
1760 case $enableval in
1761 yes) enable_shared=yes ;;
1762 no) enable_shared=no ;;
1763 *)
1764   enable_shared=no
1765   # Look at the argument we got.  We use all the common list separators.
1766   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1767   for pkg in $enableval; do
1768     if test "X$pkg" = "X$p"; then
1769       enable_shared=yes
1770     fi
1771   done
1772   IFS="$ac_save_ifs"
1773   ;;
1774 esac
1775 else
1776   enable_shared=yes
1777 fi;
1778 # Check whether --enable-static or --disable-static was given.
1779 if test "${enable_static+set}" = set; then
1780   enableval="$enable_static"
1781   p=${PACKAGE-default}
1782 case $enableval in
1783 yes) enable_static=yes ;;
1784 no) enable_static=no ;;
1785 *)
1786   enable_static=no
1787   # Look at the argument we got.  We use all the common list separators.
1788   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1789   for pkg in $enableval; do
1790     if test "X$pkg" = "X$p"; then
1791       enable_static=yes
1792     fi
1793   done
1794   IFS="$ac_save_ifs"
1795   ;;
1796 esac
1797 else
1798   enable_static=yes
1799 fi;
1800 # Check whether --enable-fast-install or --disable-fast-install was given.
1801 if test "${enable_fast_install+set}" = set; then
1802   enableval="$enable_fast_install"
1803   p=${PACKAGE-default}
1804 case $enableval in
1805 yes) enable_fast_install=yes ;;
1806 no) enable_fast_install=no ;;
1807 *)
1808   enable_fast_install=no
1809   # Look at the argument we got.  We use all the common list separators.
1810   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1811   for pkg in $enableval; do
1812     if test "X$pkg" = "X$p"; then
1813       enable_fast_install=yes
1814     fi
1815   done
1816   IFS="$ac_save_ifs"
1817   ;;
1818 esac
1819 else
1820   enable_fast_install=yes
1821 fi;
1822 # Make sure we can run config.sub.
1823 $ac_config_sub sun4 >/dev/null 2>&1 ||
1824   { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
1825 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1826    { (exit 1); exit 1; }; }
1827
1828 echo "$as_me:$LINENO: checking build system type" >&5
1829 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1830 if test "${ac_cv_build+set}" = set; then
1831   echo $ECHO_N "(cached) $ECHO_C" >&6
1832 else
1833   ac_cv_build_alias=$build_alias
1834 test -z "$ac_cv_build_alias" &&
1835   ac_cv_build_alias=`$ac_config_guess`
1836 test -z "$ac_cv_build_alias" &&
1837   { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
1838 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1839    { (exit 1); exit 1; }; }
1840 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1841   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1842 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
1843    { (exit 1); exit 1; }; }
1844
1845 fi
1846 echo "$as_me:$LINENO: result: $ac_cv_build" >&5
1847 echo "${ECHO_T}$ac_cv_build" >&6
1848 build=$ac_cv_build
1849 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1850 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1851 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1852
1853
1854 echo "$as_me:$LINENO: checking host system type" >&5
1855 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1856 if test "${ac_cv_host+set}" = set; then
1857   echo $ECHO_N "(cached) $ECHO_C" >&6
1858 else
1859   ac_cv_host_alias=$host_alias
1860 test -z "$ac_cv_host_alias" &&
1861   ac_cv_host_alias=$ac_cv_build_alias
1862 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1863   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1864 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1865    { (exit 1); exit 1; }; }
1866
1867 fi
1868 echo "$as_me:$LINENO: result: $ac_cv_host" >&5
1869 echo "${ECHO_T}$ac_cv_host" >&6
1870 host=$ac_cv_host
1871 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1872 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1873 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1874
1875
1876 ac_ext=c
1877 ac_cpp='$CPP $CPPFLAGS'
1878 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1879 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1880 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1881 if test -n "$ac_tool_prefix"; then
1882   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1883 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1884 echo "$as_me:$LINENO: checking for $ac_word" >&5
1885 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1886 if test "${ac_cv_prog_CC+set}" = set; then
1887   echo $ECHO_N "(cached) $ECHO_C" >&6
1888 else
1889   if test -n "$CC"; then
1890   ac_cv_prog_CC="$CC" # Let the user override the test.
1891 else
1892 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1893 for as_dir in $PATH
1894 do
1895   IFS=$as_save_IFS
1896   test -z "$as_dir" && as_dir=.
1897   for ac_exec_ext in '' $ac_executable_extensions; do
1898   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1899     ac_cv_prog_CC="${ac_tool_prefix}gcc"
1900     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1901     break 2
1902   fi
1903 done
1904 done
1905
1906 fi
1907 fi
1908 CC=$ac_cv_prog_CC
1909 if test -n "$CC"; then
1910   echo "$as_me:$LINENO: result: $CC" >&5
1911 echo "${ECHO_T}$CC" >&6
1912 else
1913   echo "$as_me:$LINENO: result: no" >&5
1914 echo "${ECHO_T}no" >&6
1915 fi
1916
1917 fi
1918 if test -z "$ac_cv_prog_CC"; then
1919   ac_ct_CC=$CC
1920   # Extract the first word of "gcc", so it can be a program name with args.
1921 set dummy gcc; ac_word=$2
1922 echo "$as_me:$LINENO: checking for $ac_word" >&5
1923 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1924 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1925   echo $ECHO_N "(cached) $ECHO_C" >&6
1926 else
1927   if test -n "$ac_ct_CC"; then
1928   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1929 else
1930 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1931 for as_dir in $PATH
1932 do
1933   IFS=$as_save_IFS
1934   test -z "$as_dir" && as_dir=.
1935   for ac_exec_ext in '' $ac_executable_extensions; do
1936   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1937     ac_cv_prog_ac_ct_CC="gcc"
1938     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1939     break 2
1940   fi
1941 done
1942 done
1943
1944 fi
1945 fi
1946 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1947 if test -n "$ac_ct_CC"; then
1948   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1949 echo "${ECHO_T}$ac_ct_CC" >&6
1950 else
1951   echo "$as_me:$LINENO: result: no" >&5
1952 echo "${ECHO_T}no" >&6
1953 fi
1954
1955   CC=$ac_ct_CC
1956 else
1957   CC="$ac_cv_prog_CC"
1958 fi
1959
1960 if test -z "$CC"; then
1961   if test -n "$ac_tool_prefix"; then
1962   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1963 set dummy ${ac_tool_prefix}cc; ac_word=$2
1964 echo "$as_me:$LINENO: checking for $ac_word" >&5
1965 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1966 if test "${ac_cv_prog_CC+set}" = set; then
1967   echo $ECHO_N "(cached) $ECHO_C" >&6
1968 else
1969   if test -n "$CC"; then
1970   ac_cv_prog_CC="$CC" # Let the user override the test.
1971 else
1972 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1973 for as_dir in $PATH
1974 do
1975   IFS=$as_save_IFS
1976   test -z "$as_dir" && as_dir=.
1977   for ac_exec_ext in '' $ac_executable_extensions; do
1978   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1979     ac_cv_prog_CC="${ac_tool_prefix}cc"
1980     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1981     break 2
1982   fi
1983 done
1984 done
1985
1986 fi
1987 fi
1988 CC=$ac_cv_prog_CC
1989 if test -n "$CC"; then
1990   echo "$as_me:$LINENO: result: $CC" >&5
1991 echo "${ECHO_T}$CC" >&6
1992 else
1993   echo "$as_me:$LINENO: result: no" >&5
1994 echo "${ECHO_T}no" >&6
1995 fi
1996
1997 fi
1998 if test -z "$ac_cv_prog_CC"; then
1999   ac_ct_CC=$CC
2000   # Extract the first word of "cc", so it can be a program name with args.
2001 set dummy cc; ac_word=$2
2002 echo "$as_me:$LINENO: checking for $ac_word" >&5
2003 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2004 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2005   echo $ECHO_N "(cached) $ECHO_C" >&6
2006 else
2007   if test -n "$ac_ct_CC"; then
2008   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2009 else
2010 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2011 for as_dir in $PATH
2012 do
2013   IFS=$as_save_IFS
2014   test -z "$as_dir" && as_dir=.
2015   for ac_exec_ext in '' $ac_executable_extensions; do
2016   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2017     ac_cv_prog_ac_ct_CC="cc"
2018     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2019     break 2
2020   fi
2021 done
2022 done
2023
2024 fi
2025 fi
2026 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2027 if test -n "$ac_ct_CC"; then
2028   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2029 echo "${ECHO_T}$ac_ct_CC" >&6
2030 else
2031   echo "$as_me:$LINENO: result: no" >&5
2032 echo "${ECHO_T}no" >&6
2033 fi
2034
2035   CC=$ac_ct_CC
2036 else
2037   CC="$ac_cv_prog_CC"
2038 fi
2039
2040 fi
2041 if test -z "$CC"; then
2042   # Extract the first word of "cc", so it can be a program name with args.
2043 set dummy cc; ac_word=$2
2044 echo "$as_me:$LINENO: checking for $ac_word" >&5
2045 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2046 if test "${ac_cv_prog_CC+set}" = set; then
2047   echo $ECHO_N "(cached) $ECHO_C" >&6
2048 else
2049   if test -n "$CC"; then
2050   ac_cv_prog_CC="$CC" # Let the user override the test.
2051 else
2052   ac_prog_rejected=no
2053 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2054 for as_dir in $PATH
2055 do
2056   IFS=$as_save_IFS
2057   test -z "$as_dir" && as_dir=.
2058   for ac_exec_ext in '' $ac_executable_extensions; do
2059   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2060     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2061        ac_prog_rejected=yes
2062        continue
2063      fi
2064     ac_cv_prog_CC="cc"
2065     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2066     break 2
2067   fi
2068 done
2069 done
2070
2071 if test $ac_prog_rejected = yes; then
2072   # We found a bogon in the path, so make sure we never use it.
2073   set dummy $ac_cv_prog_CC
2074   shift
2075   if test $# != 0; then
2076     # We chose a different compiler from the bogus one.
2077     # However, it has the same basename, so the bogon will be chosen
2078     # first if we set CC to just the basename; use the full file name.
2079     shift
2080     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2081   fi
2082 fi
2083 fi
2084 fi
2085 CC=$ac_cv_prog_CC
2086 if test -n "$CC"; then
2087   echo "$as_me:$LINENO: result: $CC" >&5
2088 echo "${ECHO_T}$CC" >&6
2089 else
2090   echo "$as_me:$LINENO: result: no" >&5
2091 echo "${ECHO_T}no" >&6
2092 fi
2093
2094 fi
2095 if test -z "$CC"; then
2096   if test -n "$ac_tool_prefix"; then
2097   for ac_prog in cl
2098   do
2099     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2100 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2101 echo "$as_me:$LINENO: checking for $ac_word" >&5
2102 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2103 if test "${ac_cv_prog_CC+set}" = set; then
2104   echo $ECHO_N "(cached) $ECHO_C" >&6
2105 else
2106   if test -n "$CC"; then
2107   ac_cv_prog_CC="$CC" # Let the user override the test.
2108 else
2109 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2110 for as_dir in $PATH
2111 do
2112   IFS=$as_save_IFS
2113   test -z "$as_dir" && as_dir=.
2114   for ac_exec_ext in '' $ac_executable_extensions; do
2115   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2116     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2117     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2118     break 2
2119   fi
2120 done
2121 done
2122
2123 fi
2124 fi
2125 CC=$ac_cv_prog_CC
2126 if test -n "$CC"; then
2127   echo "$as_me:$LINENO: result: $CC" >&5
2128 echo "${ECHO_T}$CC" >&6
2129 else
2130   echo "$as_me:$LINENO: result: no" >&5
2131 echo "${ECHO_T}no" >&6
2132 fi
2133
2134     test -n "$CC" && break
2135   done
2136 fi
2137 if test -z "$CC"; then
2138   ac_ct_CC=$CC
2139   for ac_prog in cl
2140 do
2141   # Extract the first word of "$ac_prog", so it can be a program name with args.
2142 set dummy $ac_prog; ac_word=$2
2143 echo "$as_me:$LINENO: checking for $ac_word" >&5
2144 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2145 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2146   echo $ECHO_N "(cached) $ECHO_C" >&6
2147 else
2148   if test -n "$ac_ct_CC"; then
2149   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2150 else
2151 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2152 for as_dir in $PATH
2153 do
2154   IFS=$as_save_IFS
2155   test -z "$as_dir" && as_dir=.
2156   for ac_exec_ext in '' $ac_executable_extensions; do
2157   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2158     ac_cv_prog_ac_ct_CC="$ac_prog"
2159     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2160     break 2
2161   fi
2162 done
2163 done
2164
2165 fi
2166 fi
2167 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2168 if test -n "$ac_ct_CC"; then
2169   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2170 echo "${ECHO_T}$ac_ct_CC" >&6
2171 else
2172   echo "$as_me:$LINENO: result: no" >&5
2173 echo "${ECHO_T}no" >&6
2174 fi
2175
2176   test -n "$ac_ct_CC" && break
2177 done
2178
2179   CC=$ac_ct_CC
2180 fi
2181
2182 fi
2183
2184
2185 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2186 See \`config.log' for more details." >&5
2187 echo "$as_me: error: no acceptable C compiler found in \$PATH
2188 See \`config.log' for more details." >&2;}
2189    { (exit 1); exit 1; }; }
2190
2191 # Provide some information about the compiler.
2192 echo "$as_me:$LINENO:" \
2193      "checking for C compiler version" >&5
2194 ac_compiler=`set X $ac_compile; echo $2`
2195 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2196   (eval $ac_compiler --version </dev/null >&5) 2>&5
2197   ac_status=$?
2198   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2199   (exit $ac_status); }
2200 { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2201   (eval $ac_compiler -v </dev/null >&5) 2>&5
2202   ac_status=$?
2203   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2204   (exit $ac_status); }
2205 { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2206   (eval $ac_compiler -V </dev/null >&5) 2>&5
2207   ac_status=$?
2208   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2209   (exit $ac_status); }
2210
2211 cat >conftest.$ac_ext <<_ACEOF
2212 #line $LINENO "configure"
2213 /* confdefs.h.  */
2214 _ACEOF
2215 cat confdefs.h >>conftest.$ac_ext
2216 cat >>conftest.$ac_ext <<_ACEOF
2217 /* end confdefs.h.  */
2218
2219 int
2220 main ()
2221 {
2222
2223   ;
2224   return 0;
2225 }
2226 _ACEOF
2227 ac_clean_files_save=$ac_clean_files
2228 ac_clean_files="$ac_clean_files a.out a.exe b.out"
2229 # Try to create an executable without -o first, disregard a.out.
2230 # It will help us diagnose broken compilers, and finding out an intuition
2231 # of exeext.
2232 echo "$as_me:$LINENO: checking for C compiler default output" >&5
2233 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
2234 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2235 if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2236   (eval $ac_link_default) 2>&5
2237   ac_status=$?
2238   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2239   (exit $ac_status); }; then
2240   # Find the output, starting from the most likely.  This scheme is
2241 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
2242 # resort.
2243
2244 # Be careful to initialize this variable, since it used to be cached.
2245 # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2246 ac_cv_exeext=
2247 # b.out is created by i960 compilers.
2248 for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
2249 do
2250   test -f "$ac_file" || continue
2251   case $ac_file in
2252     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
2253         ;;
2254     conftest.$ac_ext )
2255         # This is the source file.
2256         ;;
2257     [ab].out )
2258         # We found the default executable, but exeext='' is most
2259         # certainly right.
2260         break;;
2261     *.* )
2262         ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2263         # FIXME: I believe we export ac_cv_exeext for Libtool,
2264         # but it would be cool to find out if it's true.  Does anybody
2265         # maintain Libtool? --akim.
2266         export ac_cv_exeext
2267         break;;
2268     * )
2269         break;;
2270   esac
2271 done
2272 else
2273   echo "$as_me: failed program was:" >&5
2274 sed 's/^/| /' conftest.$ac_ext >&5
2275
2276 { { echo "$as_me:$LINENO: error: C compiler cannot create executables
2277 See \`config.log' for more details." >&5
2278 echo "$as_me: error: C compiler cannot create executables
2279 See \`config.log' for more details." >&2;}
2280    { (exit 77); exit 77; }; }
2281 fi
2282
2283 ac_exeext=$ac_cv_exeext
2284 echo "$as_me:$LINENO: result: $ac_file" >&5
2285 echo "${ECHO_T}$ac_file" >&6
2286
2287 # Check the compiler produces executables we can run.  If not, either
2288 # the compiler is broken, or we cross compile.
2289 echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2290 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2291 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2292 # If not cross compiling, check that we can run a simple program.
2293 if test "$cross_compiling" != yes; then
2294   if { ac_try='./$ac_file'
2295   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2296   (eval $ac_try) 2>&5
2297   ac_status=$?
2298   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2299   (exit $ac_status); }; }; then
2300     cross_compiling=no
2301   else
2302     if test "$cross_compiling" = maybe; then
2303         cross_compiling=yes
2304     else
2305         { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2306 If you meant to cross compile, use \`--host'.
2307 See \`config.log' for more details." >&5
2308 echo "$as_me: error: cannot run C compiled programs.
2309 If you meant to cross compile, use \`--host'.
2310 See \`config.log' for more details." >&2;}
2311    { (exit 1); exit 1; }; }
2312     fi
2313   fi
2314 fi
2315 echo "$as_me:$LINENO: result: yes" >&5
2316 echo "${ECHO_T}yes" >&6
2317
2318 rm -f a.out a.exe conftest$ac_cv_exeext b.out
2319 ac_clean_files=$ac_clean_files_save
2320 # Check the compiler produces executables we can run.  If not, either
2321 # the compiler is broken, or we cross compile.
2322 echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2323 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2324 echo "$as_me:$LINENO: result: $cross_compiling" >&5
2325 echo "${ECHO_T}$cross_compiling" >&6
2326
2327 echo "$as_me:$LINENO: checking for suffix of executables" >&5
2328 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2329 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2330   (eval $ac_link) 2>&5
2331   ac_status=$?
2332   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2333   (exit $ac_status); }; then
2334   # If both `conftest.exe' and `conftest' are `present' (well, observable)
2335 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
2336 # work properly (i.e., refer to `conftest.exe'), while it won't with
2337 # `rm'.
2338 for ac_file in conftest.exe conftest conftest.*; do
2339   test -f "$ac_file" || continue
2340   case $ac_file in
2341     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
2342     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2343           export ac_cv_exeext
2344           break;;
2345     * ) break;;
2346   esac
2347 done
2348 else
2349   { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2350 See \`config.log' for more details." >&5
2351 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2352 See \`config.log' for more details." >&2;}
2353    { (exit 1); exit 1; }; }
2354 fi
2355
2356 rm -f conftest$ac_cv_exeext
2357 echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2358 echo "${ECHO_T}$ac_cv_exeext" >&6
2359
2360 rm -f conftest.$ac_ext
2361 EXEEXT=$ac_cv_exeext
2362 ac_exeext=$EXEEXT
2363 echo "$as_me:$LINENO: checking for suffix of object files" >&5
2364 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2365 if test "${ac_cv_objext+set}" = set; then
2366   echo $ECHO_N "(cached) $ECHO_C" >&6
2367 else
2368   cat >conftest.$ac_ext <<_ACEOF
2369 #line $LINENO "configure"
2370 /* confdefs.h.  */
2371 _ACEOF
2372 cat confdefs.h >>conftest.$ac_ext
2373 cat >>conftest.$ac_ext <<_ACEOF
2374 /* end confdefs.h.  */
2375
2376 int
2377 main ()
2378 {
2379
2380   ;
2381   return 0;
2382 }
2383 _ACEOF
2384 rm -f conftest.o conftest.obj
2385 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2386   (eval $ac_compile) 2>&5
2387   ac_status=$?
2388   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2389   (exit $ac_status); }; then
2390   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2391   case $ac_file in
2392     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
2393     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2394        break;;
2395   esac
2396 done
2397 else
2398   echo "$as_me: failed program was:" >&5
2399 sed 's/^/| /' conftest.$ac_ext >&5
2400
2401 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2402 See \`config.log' for more details." >&5
2403 echo "$as_me: error: cannot compute suffix of object files: cannot compile
2404 See \`config.log' for more details." >&2;}
2405    { (exit 1); exit 1; }; }
2406 fi
2407
2408 rm -f conftest.$ac_cv_objext conftest.$ac_ext
2409 fi
2410 echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2411 echo "${ECHO_T}$ac_cv_objext" >&6
2412 OBJEXT=$ac_cv_objext
2413 ac_objext=$OBJEXT
2414 echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2415 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2416 if test "${ac_cv_c_compiler_gnu+set}" = set; then
2417   echo $ECHO_N "(cached) $ECHO_C" >&6
2418 else
2419   cat >conftest.$ac_ext <<_ACEOF
2420 #line $LINENO "configure"
2421 /* confdefs.h.  */
2422 _ACEOF
2423 cat confdefs.h >>conftest.$ac_ext
2424 cat >>conftest.$ac_ext <<_ACEOF
2425 /* end confdefs.h.  */
2426
2427 int
2428 main ()
2429 {
2430 #ifndef __GNUC__
2431        choke me
2432 #endif
2433
2434   ;
2435   return 0;
2436 }
2437 _ACEOF
2438 rm -f conftest.$ac_objext
2439 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2440   (eval $ac_compile) 2>&5
2441   ac_status=$?
2442   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2443   (exit $ac_status); } &&
2444          { ac_try='test -s conftest.$ac_objext'
2445   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2446   (eval $ac_try) 2>&5
2447   ac_status=$?
2448   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2449   (exit $ac_status); }; }; then
2450   ac_compiler_gnu=yes
2451 else
2452   echo "$as_me: failed program was:" >&5
2453 sed 's/^/| /' conftest.$ac_ext >&5
2454
2455 ac_compiler_gnu=no
2456 fi
2457 rm -f conftest.$ac_objext conftest.$ac_ext
2458 ac_cv_c_compiler_gnu=$ac_compiler_gnu
2459
2460 fi
2461 echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2462 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2463 GCC=`test $ac_compiler_gnu = yes && echo yes`
2464 ac_test_CFLAGS=${CFLAGS+set}
2465 ac_save_CFLAGS=$CFLAGS
2466 CFLAGS="-g"
2467 echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2468 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2469 if test "${ac_cv_prog_cc_g+set}" = set; then
2470   echo $ECHO_N "(cached) $ECHO_C" >&6
2471 else
2472   cat >conftest.$ac_ext <<_ACEOF
2473 #line $LINENO "configure"
2474 /* confdefs.h.  */
2475 _ACEOF
2476 cat confdefs.h >>conftest.$ac_ext
2477 cat >>conftest.$ac_ext <<_ACEOF
2478 /* end confdefs.h.  */
2479
2480 int
2481 main ()
2482 {
2483
2484   ;
2485   return 0;
2486 }
2487 _ACEOF
2488 rm -f conftest.$ac_objext
2489 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2490   (eval $ac_compile) 2>&5
2491   ac_status=$?
2492   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2493   (exit $ac_status); } &&
2494          { ac_try='test -s conftest.$ac_objext'
2495   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2496   (eval $ac_try) 2>&5
2497   ac_status=$?
2498   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2499   (exit $ac_status); }; }; then
2500   ac_cv_prog_cc_g=yes
2501 else
2502   echo "$as_me: failed program was:" >&5
2503 sed 's/^/| /' conftest.$ac_ext >&5
2504
2505 ac_cv_prog_cc_g=no
2506 fi
2507 rm -f conftest.$ac_objext conftest.$ac_ext
2508 fi
2509 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2510 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2511 if test "$ac_test_CFLAGS" = set; then
2512   CFLAGS=$ac_save_CFLAGS
2513 elif test $ac_cv_prog_cc_g = yes; then
2514   if test "$GCC" = yes; then
2515     CFLAGS="-g -O2"
2516   else
2517     CFLAGS="-g"
2518   fi
2519 else
2520   if test "$GCC" = yes; then
2521     CFLAGS="-O2"
2522   else
2523     CFLAGS=
2524   fi
2525 fi
2526 echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2527 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2528 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2529   echo $ECHO_N "(cached) $ECHO_C" >&6
2530 else
2531   ac_cv_prog_cc_stdc=no
2532 ac_save_CC=$CC
2533 cat >conftest.$ac_ext <<_ACEOF
2534 #line $LINENO "configure"
2535 /* confdefs.h.  */
2536 _ACEOF
2537 cat confdefs.h >>conftest.$ac_ext
2538 cat >>conftest.$ac_ext <<_ACEOF
2539 /* end confdefs.h.  */
2540 #include <stdarg.h>
2541 #include <stdio.h>
2542 #include <sys/types.h>
2543 #include <sys/stat.h>
2544 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2545 struct buf { int x; };
2546 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2547 static char *e (p, i)
2548      char **p;
2549      int i;
2550 {
2551   return p[i];
2552 }
2553 static char *f (char * (*g) (char **, int), char **p, ...)
2554 {
2555   char *s;
2556   va_list v;
2557   va_start (v,p);
2558   s = g (p, va_arg (v,int));
2559   va_end (v);
2560   return s;
2561 }
2562 int test (int i, double x);
2563 struct s1 {int (*f) (int a);};
2564 struct s2 {int (*f) (double a);};
2565 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2566 int argc;
2567 char **argv;
2568 int
2569 main ()
2570 {
2571 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2572   ;
2573   return 0;
2574 }
2575 _ACEOF
2576 # Don't try gcc -ansi; that turns off useful extensions and
2577 # breaks some systems' header files.
2578 # AIX                   -qlanglvl=ansi
2579 # Ultrix and OSF/1      -std1
2580 # HP-UX 10.20 and later -Ae
2581 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2582 # SVR4                  -Xc -D__EXTENSIONS__
2583 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2584 do
2585   CC="$ac_save_CC $ac_arg"
2586   rm -f conftest.$ac_objext
2587 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2588   (eval $ac_compile) 2>&5
2589   ac_status=$?
2590   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2591   (exit $ac_status); } &&
2592          { ac_try='test -s conftest.$ac_objext'
2593   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2594   (eval $ac_try) 2>&5
2595   ac_status=$?
2596   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2597   (exit $ac_status); }; }; then
2598   ac_cv_prog_cc_stdc=$ac_arg
2599 break
2600 else
2601   echo "$as_me: failed program was:" >&5
2602 sed 's/^/| /' conftest.$ac_ext >&5
2603
2604 fi
2605 rm -f conftest.$ac_objext
2606 done
2607 rm -f conftest.$ac_ext conftest.$ac_objext
2608 CC=$ac_save_CC
2609
2610 fi
2611
2612 case "x$ac_cv_prog_cc_stdc" in
2613   x|xno)
2614     echo "$as_me:$LINENO: result: none needed" >&5
2615 echo "${ECHO_T}none needed" >&6 ;;
2616   *)
2617     echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2618 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2619     CC="$CC $ac_cv_prog_cc_stdc" ;;
2620 esac
2621
2622 # Some people use a C++ compiler to compile C.  Since we use `exit',
2623 # in C++ we need to declare it.  In case someone uses the same compiler
2624 # for both compiling C and C++ we need to have the C++ compiler decide
2625 # the declaration of exit, since it's the most demanding environment.
2626 cat >conftest.$ac_ext <<_ACEOF
2627 #ifndef __cplusplus
2628   choke me
2629 #endif
2630 _ACEOF
2631 rm -f conftest.$ac_objext
2632 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2633   (eval $ac_compile) 2>&5
2634   ac_status=$?
2635   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2636   (exit $ac_status); } &&
2637          { ac_try='test -s conftest.$ac_objext'
2638   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2639   (eval $ac_try) 2>&5
2640   ac_status=$?
2641   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2642   (exit $ac_status); }; }; then
2643   for ac_declaration in \
2644    ''\
2645    '#include <stdlib.h>' \
2646    'extern "C" void std::exit (int) throw (); using std::exit;' \
2647    'extern "C" void std::exit (int); using std::exit;' \
2648    'extern "C" void exit (int) throw ();' \
2649    'extern "C" void exit (int);' \
2650    'void exit (int);'
2651 do
2652   cat >conftest.$ac_ext <<_ACEOF
2653 #line $LINENO "configure"
2654 /* confdefs.h.  */
2655 _ACEOF
2656 cat confdefs.h >>conftest.$ac_ext
2657 cat >>conftest.$ac_ext <<_ACEOF
2658 /* end confdefs.h.  */
2659 #include <stdlib.h>
2660 $ac_declaration
2661 int
2662 main ()
2663 {
2664 exit (42);
2665   ;
2666   return 0;
2667 }
2668 _ACEOF
2669 rm -f conftest.$ac_objext
2670 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2671   (eval $ac_compile) 2>&5
2672   ac_status=$?
2673   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2674   (exit $ac_status); } &&
2675          { ac_try='test -s conftest.$ac_objext'
2676   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2677   (eval $ac_try) 2>&5
2678   ac_status=$?
2679   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2680   (exit $ac_status); }; }; then
2681   :
2682 else
2683   echo "$as_me: failed program was:" >&5
2684 sed 's/^/| /' conftest.$ac_ext >&5
2685
2686 continue
2687 fi
2688 rm -f conftest.$ac_objext conftest.$ac_ext
2689   cat >conftest.$ac_ext <<_ACEOF
2690 #line $LINENO "configure"
2691 /* confdefs.h.  */
2692 _ACEOF
2693 cat confdefs.h >>conftest.$ac_ext
2694 cat >>conftest.$ac_ext <<_ACEOF
2695 /* end confdefs.h.  */
2696 $ac_declaration
2697 int
2698 main ()
2699 {
2700 exit (42);
2701   ;
2702   return 0;
2703 }
2704 _ACEOF
2705 rm -f conftest.$ac_objext
2706 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2707   (eval $ac_compile) 2>&5
2708   ac_status=$?
2709   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2710   (exit $ac_status); } &&
2711          { ac_try='test -s conftest.$ac_objext'
2712   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2713   (eval $ac_try) 2>&5
2714   ac_status=$?
2715   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2716   (exit $ac_status); }; }; then
2717   break
2718 else
2719   echo "$as_me: failed program was:" >&5
2720 sed 's/^/| /' conftest.$ac_ext >&5
2721
2722 fi
2723 rm -f conftest.$ac_objext conftest.$ac_ext
2724 done
2725 rm -f conftest*
2726 if test -n "$ac_declaration"; then
2727   echo '#ifdef __cplusplus' >>confdefs.h
2728   echo $ac_declaration      >>confdefs.h
2729   echo '#endif'             >>confdefs.h
2730 fi
2731
2732 else
2733   echo "$as_me: failed program was:" >&5
2734 sed 's/^/| /' conftest.$ac_ext >&5
2735
2736 fi
2737 rm -f conftest.$ac_objext conftest.$ac_ext
2738 ac_ext=c
2739 ac_cpp='$CPP $CPPFLAGS'
2740 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2741 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2742 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2743
2744 # Find the correct PATH separator.  Usually this is `:', but
2745 # DJGPP uses `;' like DOS.
2746 if test "X${PATH_SEPARATOR+set}" != Xset; then
2747   UNAME=${UNAME-`uname 2>/dev/null`}
2748   case X$UNAME in
2749     *-DOS) lt_cv_sys_path_separator=';' ;;
2750     *)     lt_cv_sys_path_separator=':' ;;
2751   esac
2752   PATH_SEPARATOR=$lt_cv_sys_path_separator
2753 fi
2754
2755
2756 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2757 if test "${with_gnu_ld+set}" = set; then
2758   withval="$with_gnu_ld"
2759   test "$withval" = no || with_gnu_ld=yes
2760 else
2761   with_gnu_ld=no
2762 fi;
2763 ac_prog=ld
2764 if test "$GCC" = yes; then
2765   # Check if gcc -print-prog-name=ld gives a path.
2766   echo "$as_me:$LINENO: checking for ld used by GCC" >&5
2767 echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
2768   case $host in
2769   *-*-mingw*)
2770     # gcc leaves a trailing carriage return which upsets mingw
2771     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2772   *)
2773     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2774   esac
2775   case $ac_prog in
2776     # Accept absolute paths.
2777     [\\/]* | [A-Za-z]:[\\/]*)
2778       re_direlt='/[^/][^/]*/\.\./'
2779       # Canonicalize the path of ld
2780       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2781       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2782         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2783       done
2784       test -z "$LD" && LD="$ac_prog"
2785       ;;
2786   "")
2787     # If it fails, then pretend we aren't using GCC.
2788     ac_prog=ld
2789     ;;
2790   *)
2791     # If it is relative, then search for the first ld in PATH.
2792     with_gnu_ld=unknown
2793     ;;
2794   esac
2795 elif test "$with_gnu_ld" = yes; then
2796   echo "$as_me:$LINENO: checking for GNU ld" >&5
2797 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
2798 else
2799   echo "$as_me:$LINENO: checking for non-GNU ld" >&5
2800 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
2801 fi
2802 if test "${lt_cv_path_LD+set}" = set; then
2803   echo $ECHO_N "(cached) $ECHO_C" >&6
2804 else
2805   if test -z "$LD"; then
2806   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2807   for ac_dir in $PATH; do
2808     test -z "$ac_dir" && ac_dir=.
2809     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2810       lt_cv_path_LD="$ac_dir/$ac_prog"
2811       # Check to see if the program is GNU ld.  I'd rather use --version,
2812       # but apparently some GNU ld's only accept -v.
2813       # Break only if it was the GNU/non-GNU ld that we prefer.
2814       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2815         test "$with_gnu_ld" != no && break
2816       else
2817         test "$with_gnu_ld" != yes && break
2818       fi
2819     fi
2820   done
2821   IFS="$ac_save_ifs"
2822 else
2823   lt_cv_path_LD="$LD" # Let the user override the test with a path.
2824 fi
2825 fi
2826
2827 LD="$lt_cv_path_LD"
2828 if test -n "$LD"; then
2829   echo "$as_me:$LINENO: result: $LD" >&5
2830 echo "${ECHO_T}$LD" >&6
2831 else
2832   echo "$as_me:$LINENO: result: no" >&5
2833 echo "${ECHO_T}no" >&6
2834 fi
2835 test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
2836 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
2837    { (exit 1); exit 1; }; }
2838 echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
2839 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
2840 if test "${lt_cv_prog_gnu_ld+set}" = set; then
2841   echo $ECHO_N "(cached) $ECHO_C" >&6
2842 else
2843   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
2844 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2845   lt_cv_prog_gnu_ld=yes
2846 else
2847   lt_cv_prog_gnu_ld=no
2848 fi
2849 fi
2850 echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
2851 echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6
2852 with_gnu_ld=$lt_cv_prog_gnu_ld
2853
2854
2855 echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5
2856 echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6
2857 if test "${lt_cv_ld_reload_flag+set}" = set; then
2858   echo $ECHO_N "(cached) $ECHO_C" >&6
2859 else
2860   lt_cv_ld_reload_flag='-r'
2861 fi
2862 echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5
2863 echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6
2864 reload_flag=$lt_cv_ld_reload_flag
2865 test -n "$reload_flag" && reload_flag=" $reload_flag"
2866
2867 echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5
2868 echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6
2869 if test "${lt_cv_path_NM+set}" = set; then
2870   echo $ECHO_N "(cached) $ECHO_C" >&6
2871 else
2872   if test -n "$NM"; then
2873   # Let the user override the test.
2874   lt_cv_path_NM="$NM"
2875 else
2876   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2877   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2878     test -z "$ac_dir" && ac_dir=.
2879     tmp_nm=$ac_dir/${ac_tool_prefix}nm
2880     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
2881       # Check to see if the nm accepts a BSD-compat flag.
2882       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2883       #   nm: unknown option "B" ignored
2884       # Tru64's nm complains that /dev/null is an invalid object file
2885       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
2886         lt_cv_path_NM="$tmp_nm -B"
2887         break
2888       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2889         lt_cv_path_NM="$tmp_nm -p"
2890         break
2891       else
2892         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
2893         continue # so that we can try to find one that supports BSD flags
2894       fi
2895     fi
2896   done
2897   IFS="$ac_save_ifs"
2898   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
2899 fi
2900 fi
2901
2902 NM="$lt_cv_path_NM"
2903 echo "$as_me:$LINENO: result: $NM" >&5
2904 echo "${ECHO_T}$NM" >&6
2905
2906 echo "$as_me:$LINENO: checking whether ln -s works" >&5
2907 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
2908 LN_S=$as_ln_s
2909 if test "$LN_S" = "ln -s"; then
2910   echo "$as_me:$LINENO: result: yes" >&5
2911 echo "${ECHO_T}yes" >&6
2912 else
2913   echo "$as_me:$LINENO: result: no, using $LN_S" >&5
2914 echo "${ECHO_T}no, using $LN_S" >&6
2915 fi
2916
2917 echo "$as_me:$LINENO: checking how to recognise dependant libraries" >&5
2918 echo $ECHO_N "checking how to recognise dependant libraries... $ECHO_C" >&6
2919 if test "${lt_cv_deplibs_check_method+set}" = set; then
2920   echo $ECHO_N "(cached) $ECHO_C" >&6
2921 else
2922   lt_cv_file_magic_cmd='$MAGIC_CMD'
2923 lt_cv_file_magic_test_file=
2924 lt_cv_deplibs_check_method='unknown'
2925 # Need to set the preceding variable on all platforms that support
2926 # interlibrary dependencies.
2927 # 'none' -- dependencies not supported.
2928 # `unknown' -- same as none, but documents that we really don't know.
2929 # 'pass_all' -- all dependencies passed with no checks.
2930 # 'test_compile' -- check by making test program.
2931 # 'file_magic [[regex]]' -- check by looking for files in library path
2932 # which responds to the $file_magic_cmd with a given egrep regex.
2933 # If you have `file' or equivalent on your system and you're not sure
2934 # whether `pass_all' will *always* work, you probably want this one.
2935
2936 case $host_os in
2937 aix4* | aix5*)
2938   lt_cv_deplibs_check_method=pass_all
2939   ;;
2940
2941 beos*)
2942   lt_cv_deplibs_check_method=pass_all
2943   ;;
2944
2945 bsdi4*)
2946   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
2947   lt_cv_file_magic_cmd='/usr/bin/file -L'
2948   lt_cv_file_magic_test_file=/shlib/libc.so
2949   ;;
2950
2951 cygwin* | mingw* | pw32*)
2952   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
2953   lt_cv_file_magic_cmd='$OBJDUMP -f'
2954   ;;
2955
2956 darwin* | rhapsody*)
2957   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
2958   lt_cv_file_magic_cmd='/usr/bin/file -L'
2959   case "$host_os" in
2960   rhapsody* | darwin1.[012])
2961     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
2962     ;;
2963   *) # Darwin 1.3 on
2964     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
2965     ;;
2966   esac
2967   ;;
2968
2969 freebsd*)
2970   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2971     case $host_cpu in
2972     i*86 )
2973       # Not sure whether the presence of OpenBSD here was a mistake.
2974       # Let's accept both of them until this is cleared up.
2975       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
2976       lt_cv_file_magic_cmd=/usr/bin/file
2977       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
2978       ;;
2979     esac
2980   else
2981     lt_cv_deplibs_check_method=pass_all
2982   fi
2983   ;;
2984
2985 gnu*)
2986   lt_cv_deplibs_check_method=pass_all
2987   ;;
2988
2989 hpux10.20*|hpux11*)
2990   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
2991   lt_cv_file_magic_cmd=/usr/bin/file
2992   lt_cv_file_magic_test_file=/usr/lib/libc.sl
2993   ;;
2994
2995 irix5* | irix6* | nonstopux*)
2996   case $host_os in
2997   irix5* | nonstopux*)
2998     # this will be overridden with pass_all, but let us keep it just in case
2999     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3000     ;;
3001   *)
3002     case $LD in
3003     *-32|*"-32 ") libmagic=32-bit;;
3004     *-n32|*"-n32 ") libmagic=N32;;
3005     *-64|*"-64 ") libmagic=64-bit;;
3006     *) libmagic=never-match;;
3007     esac
3008     # this will be overridden with pass_all, but let us keep it just in case
3009     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3010     ;;
3011   esac
3012   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3013   lt_cv_deplibs_check_method=pass_all
3014   ;;
3015
3016 # This must be Linux ELF.
3017 linux-gnu*)
3018   lt_cv_deplibs_check_method=pass_all
3019   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3020   ;;
3021
3022 netbsd*)
3023   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3024     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
3025   else
3026     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
3027   fi
3028   ;;
3029
3030 newos6*)
3031   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
3032   lt_cv_file_magic_cmd=/usr/bin/file
3033   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3034   ;;
3035
3036 openbsd*)
3037   lt_cv_file_magic_cmd=/usr/bin/file
3038   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3039   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3040     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
3041   else
3042     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3043   fi
3044   ;;
3045
3046 osf3* | osf4* | osf5*)
3047   # this will be overridden with pass_all, but let us keep it just in case
3048   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3049   lt_cv_file_magic_test_file=/shlib/libc.so
3050   lt_cv_deplibs_check_method=pass_all
3051   ;;
3052
3053 sco3.2v5*)
3054   lt_cv_deplibs_check_method=pass_all
3055   ;;
3056
3057 solaris*)
3058   lt_cv_deplibs_check_method=pass_all
3059   lt_cv_file_magic_test_file=/lib/libc.so
3060   ;;
3061
3062 sysv5uw[78]* | sysv4*uw2*)
3063   lt_cv_deplibs_check_method=pass_all
3064   ;;
3065
3066 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3067   case $host_vendor in
3068   motorola)
3069     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
3070     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3071     ;;
3072   ncr)
3073     lt_cv_deplibs_check_method=pass_all
3074     ;;
3075   sequent)
3076     lt_cv_file_magic_cmd='/bin/file'
3077     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
3078     ;;
3079   sni)
3080     lt_cv_file_magic_cmd='/bin/file'
3081     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
3082     lt_cv_file_magic_test_file=/lib/libc.so
3083     ;;
3084   esac
3085   ;;
3086 esac
3087
3088 fi
3089 echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5
3090 echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6
3091 file_magic_cmd=$lt_cv_file_magic_cmd
3092 deplibs_check_method=$lt_cv_deplibs_check_method
3093
3094
3095
3096
3097
3098
3099
3100
3101 # Check for command to grab the raw symbol name followed by C symbol from nm.
3102 echo "$as_me:$LINENO: checking command to parse $NM output" >&5
3103 echo $ECHO_N "checking command to parse $NM output... $ECHO_C" >&6
3104 if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then
3105   echo $ECHO_N "(cached) $ECHO_C" >&6
3106 else
3107
3108 # These are sane defaults that work on at least a few old systems.
3109 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
3110
3111 # Character class describing NM global symbol codes.
3112 symcode='[BCDEGRST]'
3113
3114 # Regexp to match symbols that can be accessed directly from C.
3115 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
3116
3117 # Transform the above into a raw symbol and a C symbol.
3118 symxfrm='\1 \2\3 \3'
3119
3120 # Transform an extracted symbol line into a proper C declaration
3121 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
3122
3123 # Transform an extracted symbol line into symbol name and symbol address
3124 lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
3125
3126 # Define system-specific variables.
3127 case $host_os in
3128 aix*)
3129   symcode='[BCDT]'
3130   ;;
3131 cygwin* | mingw* | pw32*)
3132   symcode='[ABCDGISTW]'
3133   ;;
3134 hpux*) # Its linker distinguishes data from code symbols
3135   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3136   lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
3137   ;;
3138 irix* | nonstopux*)
3139   symcode='[BCDEGRST]'
3140   ;;
3141 solaris* | sysv5*)
3142   symcode='[BDT]'
3143   ;;
3144 sysv4)
3145   symcode='[DFNSTU]'
3146   ;;
3147 esac
3148
3149 # Handle CRLF in mingw tool chain
3150 opt_cr=
3151 case $host_os in
3152 mingw*)
3153   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
3154   ;;
3155 esac
3156
3157 # If we're using GNU nm, then use its standard symbol codes.
3158 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
3159   symcode='[ABCDGISTW]'
3160 fi
3161
3162 # Try without a prefix undercore, then with it.
3163 for ac_symprfx in "" "_"; do
3164
3165   # Write the raw and C identifiers.
3166 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
3167
3168   # Check to see that the pipe works correctly.
3169   pipe_works=no
3170   rm -f conftest*
3171   cat > conftest.$ac_ext <<EOF
3172 #ifdef __cplusplus
3173 extern "C" {
3174 #endif
3175 char nm_test_var;
3176 void nm_test_func(){}
3177 #ifdef __cplusplus
3178 }
3179 #endif
3180 int main(){nm_test_var='a';nm_test_func();return(0);}
3181 EOF
3182
3183   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3184   (eval $ac_compile) 2>&5
3185   ac_status=$?
3186   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3187   (exit $ac_status); }; then
3188     # Now try to grab the symbols.
3189     nlist=conftest.nm
3190     if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5
3191   (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
3192   ac_status=$?
3193   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3194   (exit $ac_status); } && test -s "$nlist"; then
3195       # Try sorting and uniquifying the output.
3196       if sort "$nlist" | uniq > "$nlist"T; then
3197         mv -f "$nlist"T "$nlist"
3198       else
3199         rm -f "$nlist"T
3200       fi
3201
3202       # Make sure that we snagged all the symbols we need.
3203       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
3204         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
3205           cat <<EOF > conftest.$ac_ext
3206 #ifdef __cplusplus
3207 extern "C" {
3208 #endif
3209
3210 EOF
3211           # Now generate the symbol file.
3212           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
3213
3214           cat <<EOF >> conftest.$ac_ext
3215 #if defined (__STDC__) && __STDC__
3216 # define lt_ptr void *
3217 #else
3218 # define lt_ptr char *
3219 # define const
3220 #endif
3221
3222 /* The mapping between symbol names and symbols. */
3223 const struct {
3224   const char *name;
3225   lt_ptr address;
3226 }
3227 lt_preloaded_symbols[] =
3228 {
3229 EOF
3230           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
3231           cat <<\EOF >> conftest.$ac_ext
3232   {0, (lt_ptr) 0}
3233 };
3234
3235 #ifdef __cplusplus
3236 }
3237 #endif
3238 EOF
3239           # Now try linking the two files.
3240           mv conftest.$ac_objext conftstm.$ac_objext
3241           save_LIBS="$LIBS"
3242           save_CFLAGS="$CFLAGS"
3243           LIBS="conftstm.$ac_objext"
3244           CFLAGS="$CFLAGS$no_builtin_flag"
3245           if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3246   (eval $ac_link) 2>&5
3247   ac_status=$?
3248   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3249   (exit $ac_status); } && test -s conftest; then
3250             pipe_works=yes
3251           fi
3252           LIBS="$save_LIBS"
3253           CFLAGS="$save_CFLAGS"
3254         else
3255           echo "cannot find nm_test_func in $nlist" >&5
3256         fi
3257       else
3258         echo "cannot find nm_test_var in $nlist" >&5
3259       fi
3260     else
3261       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
3262     fi
3263   else
3264     echo "$progname: failed program was:" >&5
3265     cat conftest.$ac_ext >&5
3266   fi
3267   rm -f conftest* conftst*
3268
3269   # Do not use the global_symbol_pipe unless it works.
3270   if test "$pipe_works" = yes; then
3271     break
3272   else
3273     lt_cv_sys_global_symbol_pipe=
3274   fi
3275 done
3276
3277 fi
3278
3279 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
3280 if test -z "$lt_cv_sys_global_symbol_pipe"; then
3281   global_symbol_to_cdecl=
3282   global_symbol_to_c_name_address=
3283 else
3284   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
3285   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
3286 fi
3287 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
3288 then
3289   echo "$as_me:$LINENO: result: failed" >&5
3290 echo "${ECHO_T}failed" >&6
3291 else
3292   echo "$as_me:$LINENO: result: ok" >&5
3293 echo "${ECHO_T}ok" >&6
3294 fi
3295
3296 ac_ext=c
3297 ac_cpp='$CPP $CPPFLAGS'
3298 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3299 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3300 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3301 echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3302 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
3303 # On Suns, sometimes $CPP names a directory.
3304 if test -n "$CPP" && test -d "$CPP"; then
3305   CPP=
3306 fi
3307 if test -z "$CPP"; then
3308   if test "${ac_cv_prog_CPP+set}" = set; then
3309   echo $ECHO_N "(cached) $ECHO_C" >&6
3310 else
3311       # Double quotes because CPP needs to be expanded
3312     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3313     do
3314       ac_preproc_ok=false
3315 for ac_c_preproc_warn_flag in '' yes
3316 do
3317   # Use a header file that comes with gcc, so configuring glibc
3318   # with a fresh cross-compiler works.
3319   # On the NeXT, cc -E runs the code through the compiler's parser,
3320   # not just through cpp. "Syntax error" is here to catch this case.
3321   cat >conftest.$ac_ext <<_ACEOF
3322 #line $LINENO "configure"
3323 /* confdefs.h.  */
3324 _ACEOF
3325 cat confdefs.h >>conftest.$ac_ext
3326 cat >>conftest.$ac_ext <<_ACEOF
3327 /* end confdefs.h.  */
3328 #include <assert.h>
3329                      Syntax error
3330 _ACEOF
3331 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3332   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3333   ac_status=$?
3334   grep -v '^ *+' conftest.er1 >conftest.err
3335   rm -f conftest.er1
3336   cat conftest.err >&5
3337   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3338   (exit $ac_status); } >/dev/null; then
3339   if test -s conftest.err; then
3340     ac_cpp_err=$ac_c_preproc_warn_flag
3341   else
3342     ac_cpp_err=
3343   fi
3344 else
3345   ac_cpp_err=yes
3346 fi
3347 if test -z "$ac_cpp_err"; then
3348   :
3349 else
3350   echo "$as_me: failed program was:" >&5
3351 sed 's/^/| /' conftest.$ac_ext >&5
3352
3353   # Broken: fails on valid input.
3354 continue
3355 fi
3356 rm -f conftest.err conftest.$ac_ext
3357
3358   # OK, works on sane cases.  Now check whether non-existent headers
3359   # can be detected and how.
3360   cat >conftest.$ac_ext <<_ACEOF
3361 #line $LINENO "configure"
3362 /* confdefs.h.  */
3363 _ACEOF
3364 cat confdefs.h >>conftest.$ac_ext
3365 cat >>conftest.$ac_ext <<_ACEOF
3366 /* end confdefs.h.  */
3367 #include <ac_nonexistent.h>
3368 _ACEOF
3369 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3370   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3371   ac_status=$?
3372   grep -v '^ *+' conftest.er1 >conftest.err
3373   rm -f conftest.er1
3374   cat conftest.err >&5
3375   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3376   (exit $ac_status); } >/dev/null; then
3377   if test -s conftest.err; then
3378     ac_cpp_err=$ac_c_preproc_warn_flag
3379   else
3380     ac_cpp_err=
3381   fi
3382 else
3383   ac_cpp_err=yes
3384 fi
3385 if test -z "$ac_cpp_err"; then
3386   # Broken: success on invalid input.
3387 continue
3388 else
3389   echo "$as_me: failed program was:" >&5
3390 sed 's/^/| /' conftest.$ac_ext >&5
3391
3392   # Passes both tests.
3393 ac_preproc_ok=:
3394 break
3395 fi
3396 rm -f conftest.err conftest.$ac_ext
3397
3398 done
3399 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3400 rm -f conftest.err conftest.$ac_ext
3401 if $ac_preproc_ok; then
3402   break
3403 fi
3404
3405     done
3406     ac_cv_prog_CPP=$CPP
3407
3408 fi
3409   CPP=$ac_cv_prog_CPP
3410 else
3411   ac_cv_prog_CPP=$CPP
3412 fi
3413 echo "$as_me:$LINENO: result: $CPP" >&5
3414 echo "${ECHO_T}$CPP" >&6
3415 ac_preproc_ok=false
3416 for ac_c_preproc_warn_flag in '' yes
3417 do
3418   # Use a header file that comes with gcc, so configuring glibc
3419   # with a fresh cross-compiler works.
3420   # On the NeXT, cc -E runs the code through the compiler's parser,
3421   # not just through cpp. "Syntax error" is here to catch this case.
3422   cat >conftest.$ac_ext <<_ACEOF
3423 #line $LINENO "configure"
3424 /* confdefs.h.  */
3425 _ACEOF
3426 cat confdefs.h >>conftest.$ac_ext
3427 cat >>conftest.$ac_ext <<_ACEOF
3428 /* end confdefs.h.  */
3429 #include <assert.h>
3430                      Syntax error
3431 _ACEOF
3432 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3433   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3434   ac_status=$?
3435   grep -v '^ *+' conftest.er1 >conftest.err
3436   rm -f conftest.er1
3437   cat conftest.err >&5
3438   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3439   (exit $ac_status); } >/dev/null; then
3440   if test -s conftest.err; then
3441     ac_cpp_err=$ac_c_preproc_warn_flag
3442   else
3443     ac_cpp_err=
3444   fi
3445 else
3446   ac_cpp_err=yes
3447 fi
3448 if test -z "$ac_cpp_err"; then
3449   :
3450 else
3451   echo "$as_me: failed program was:" >&5
3452 sed 's/^/| /' conftest.$ac_ext >&5
3453
3454   # Broken: fails on valid input.
3455 continue
3456 fi
3457 rm -f conftest.err conftest.$ac_ext
3458
3459   # OK, works on sane cases.  Now check whether non-existent headers
3460   # can be detected and how.
3461   cat >conftest.$ac_ext <<_ACEOF
3462 #line $LINENO "configure"
3463 /* confdefs.h.  */
3464 _ACEOF
3465 cat confdefs.h >>conftest.$ac_ext
3466 cat >>conftest.$ac_ext <<_ACEOF
3467 /* end confdefs.h.  */
3468 #include <ac_nonexistent.h>
3469 _ACEOF
3470 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3471   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3472   ac_status=$?
3473   grep -v '^ *+' conftest.er1 >conftest.err
3474   rm -f conftest.er1
3475   cat conftest.err >&5
3476   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3477   (exit $ac_status); } >/dev/null; then
3478   if test -s conftest.err; then
3479     ac_cpp_err=$ac_c_preproc_warn_flag
3480   else
3481     ac_cpp_err=
3482   fi
3483 else
3484   ac_cpp_err=yes
3485 fi
3486 if test -z "$ac_cpp_err"; then
3487   # Broken: success on invalid input.
3488 continue
3489 else
3490   echo "$as_me: failed program was:" >&5
3491 sed 's/^/| /' conftest.$ac_ext >&5
3492
3493   # Passes both tests.
3494 ac_preproc_ok=:
3495 break
3496 fi
3497 rm -f conftest.err conftest.$ac_ext
3498
3499 done
3500 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3501 rm -f conftest.err conftest.$ac_ext
3502 if $ac_preproc_ok; then
3503   :
3504 else
3505   { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3506 See \`config.log' for more details." >&5
3507 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3508 See \`config.log' for more details." >&2;}
3509    { (exit 1); exit 1; }; }
3510 fi
3511
3512 ac_ext=c
3513 ac_cpp='$CPP $CPPFLAGS'
3514 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3515 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3516 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3517
3518
3519 echo "$as_me:$LINENO: checking for egrep" >&5
3520 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3521 if test "${ac_cv_prog_egrep+set}" = set; then
3522   echo $ECHO_N "(cached) $ECHO_C" >&6
3523 else
3524   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3525     then ac_cv_prog_egrep='grep -E'
3526     else ac_cv_prog_egrep='egrep'
3527     fi
3528 fi
3529 echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
3530 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3531  EGREP=$ac_cv_prog_egrep
3532
3533
3534 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3535 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3536 if test "${ac_cv_header_stdc+set}" = set; then
3537   echo $ECHO_N "(cached) $ECHO_C" >&6
3538 else
3539   cat >conftest.$ac_ext <<_ACEOF
3540 #line $LINENO "configure"
3541 /* confdefs.h.  */
3542 _ACEOF
3543 cat confdefs.h >>conftest.$ac_ext
3544 cat >>conftest.$ac_ext <<_ACEOF
3545 /* end confdefs.h.  */
3546 #include <stdlib.h>
3547 #include <stdarg.h>
3548 #include <string.h>
3549 #include <float.h>
3550
3551 int
3552 main ()
3553 {
3554
3555   ;
3556   return 0;
3557 }
3558 _ACEOF
3559 rm -f conftest.$ac_objext
3560 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3561   (eval $ac_compile) 2>&5
3562   ac_status=$?
3563   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3564   (exit $ac_status); } &&
3565          { ac_try='test -s conftest.$ac_objext'
3566   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3567   (eval $ac_try) 2>&5
3568   ac_status=$?
3569   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3570   (exit $ac_status); }; }; then
3571   ac_cv_header_stdc=yes
3572 else
3573   echo "$as_me: failed program was:" >&5
3574 sed 's/^/| /' conftest.$ac_ext >&5
3575
3576 ac_cv_header_stdc=no
3577 fi
3578 rm -f conftest.$ac_objext conftest.$ac_ext
3579
3580 if test $ac_cv_header_stdc = yes; then
3581   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3582   cat >conftest.$ac_ext <<_ACEOF
3583 #line $LINENO "configure"
3584 /* confdefs.h.  */
3585 _ACEOF
3586 cat confdefs.h >>conftest.$ac_ext
3587 cat >>conftest.$ac_ext <<_ACEOF
3588 /* end confdefs.h.  */
3589 #include <string.h>
3590
3591 _ACEOF
3592 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3593   $EGREP "memchr" >/dev/null 2>&1; then
3594   :
3595 else
3596   ac_cv_header_stdc=no
3597 fi
3598 rm -f conftest*
3599
3600 fi
3601
3602 if test $ac_cv_header_stdc = yes; then
3603   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3604   cat >conftest.$ac_ext <<_ACEOF
3605 #line $LINENO "configure"
3606 /* confdefs.h.  */
3607 _ACEOF
3608 cat confdefs.h >>conftest.$ac_ext
3609 cat >>conftest.$ac_ext <<_ACEOF
3610 /* end confdefs.h.  */
3611 #include <stdlib.h>
3612
3613 _ACEOF
3614 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3615   $EGREP "free" >/dev/null 2>&1; then
3616   :
3617 else
3618   ac_cv_header_stdc=no
3619 fi
3620 rm -f conftest*
3621
3622 fi
3623
3624 if test $ac_cv_header_stdc = yes; then
3625   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3626   if test "$cross_compiling" = yes; then
3627   :
3628 else
3629   cat >conftest.$ac_ext <<_ACEOF
3630 #line $LINENO "configure"
3631 /* confdefs.h.  */
3632 _ACEOF
3633 cat confdefs.h >>conftest.$ac_ext
3634 cat >>conftest.$ac_ext <<_ACEOF
3635 /* end confdefs.h.  */
3636 #include <ctype.h>
3637 #if ((' ' & 0x0FF) == 0x020)
3638 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3639 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3640 #else
3641 # define ISLOWER(c) \
3642                    (('a' <= (c) && (c) <= 'i') \
3643                      || ('j' <= (c) && (c) <= 'r') \
3644                      || ('s' <= (c) && (c) <= 'z'))
3645 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3646 #endif
3647
3648 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3649 int
3650 main ()
3651 {
3652   int i;
3653   for (i = 0; i < 256; i++)
3654     if (XOR (islower (i), ISLOWER (i))
3655         || toupper (i) != TOUPPER (i))
3656       exit(2);
3657   exit (0);
3658 }
3659 _ACEOF
3660 rm -f conftest$ac_exeext
3661 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3662   (eval $ac_link) 2>&5
3663   ac_status=$?
3664   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3665   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3666   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3667   (eval $ac_try) 2>&5
3668   ac_status=$?
3669   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3670   (exit $ac_status); }; }; then
3671   :
3672 else
3673   echo "$as_me: program exited with status $ac_status" >&5
3674 echo "$as_me: failed program was:" >&5
3675 sed 's/^/| /' conftest.$ac_ext >&5
3676
3677 ( exit $ac_status )
3678 ac_cv_header_stdc=no
3679 fi
3680 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3681 fi
3682 fi
3683 fi
3684 echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3685 echo "${ECHO_T}$ac_cv_header_stdc" >&6
3686 if test $ac_cv_header_stdc = yes; then
3687
3688 cat >>confdefs.h <<\_ACEOF
3689 #define STDC_HEADERS 1
3690 _ACEOF
3691
3692 fi
3693
3694 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3705                   inttypes.h stdint.h unistd.h
3706 do
3707 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3708 echo "$as_me:$LINENO: checking for $ac_header" >&5
3709 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3710 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3711   echo $ECHO_N "(cached) $ECHO_C" >&6
3712 else
3713   cat >conftest.$ac_ext <<_ACEOF
3714 #line $LINENO "configure"
3715 /* confdefs.h.  */
3716 _ACEOF
3717 cat confdefs.h >>conftest.$ac_ext
3718 cat >>conftest.$ac_ext <<_ACEOF
3719 /* end confdefs.h.  */
3720 $ac_includes_default
3721
3722 #include <$ac_header>
3723 _ACEOF
3724 rm -f conftest.$ac_objext
3725 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3726   (eval $ac_compile) 2>&5
3727   ac_status=$?
3728   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3729   (exit $ac_status); } &&
3730          { ac_try='test -s conftest.$ac_objext'
3731   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3732   (eval $ac_try) 2>&5
3733   ac_status=$?
3734   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3735   (exit $ac_status); }; }; then
3736   eval "$as_ac_Header=yes"
3737 else
3738   echo "$as_me: failed program was:" >&5
3739 sed 's/^/| /' conftest.$ac_ext >&5
3740
3741 eval "$as_ac_Header=no"
3742 fi
3743 rm -f conftest.$ac_objext conftest.$ac_ext
3744 fi
3745 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3746 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3747 if test `eval echo '${'$as_ac_Header'}'` = yes; then
3748   cat >>confdefs.h <<_ACEOF
3749 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3750 _ACEOF
3751
3752 fi
3753
3754 done
3755
3756
3757
3758 for ac_header in dlfcn.h
3759 do
3760 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3761 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3762   echo "$as_me:$LINENO: checking for $ac_header" >&5
3763 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3764 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3765   echo $ECHO_N "(cached) $ECHO_C" >&6
3766 fi
3767 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3768 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3769 else
3770   # Is the header compilable?
3771 echo "$as_me:$LINENO: checking $ac_header usability" >&5
3772 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
3773 cat >conftest.$ac_ext <<_ACEOF
3774 #line $LINENO "configure"
3775 /* confdefs.h.  */
3776 _ACEOF
3777 cat confdefs.h >>conftest.$ac_ext
3778 cat >>conftest.$ac_ext <<_ACEOF
3779 /* end confdefs.h.  */
3780 $ac_includes_default
3781 #include <$ac_header>
3782 _ACEOF
3783 rm -f conftest.$ac_objext
3784 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3785   (eval $ac_compile) 2>&5
3786   ac_status=$?
3787   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3788   (exit $ac_status); } &&
3789          { ac_try='test -s conftest.$ac_objext'
3790   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3791   (eval $ac_try) 2>&5
3792   ac_status=$?
3793   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3794   (exit $ac_status); }; }; then
3795   ac_header_compiler=yes
3796 else
3797   echo "$as_me: failed program was:" >&5
3798 sed 's/^/| /' conftest.$ac_ext >&5
3799
3800 ac_header_compiler=no
3801 fi
3802 rm -f conftest.$ac_objext conftest.$ac_ext
3803 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3804 echo "${ECHO_T}$ac_header_compiler" >&6
3805
3806 # Is the header present?
3807 echo "$as_me:$LINENO: checking $ac_header presence" >&5
3808 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
3809 cat >conftest.$ac_ext <<_ACEOF
3810 #line $LINENO "configure"
3811 /* confdefs.h.  */
3812 _ACEOF
3813 cat confdefs.h >>conftest.$ac_ext
3814 cat >>conftest.$ac_ext <<_ACEOF
3815 /* end confdefs.h.  */
3816 #include <$ac_header>
3817 _ACEOF
3818 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3819   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3820   ac_status=$?
3821   grep -v '^ *+' conftest.er1 >conftest.err
3822   rm -f conftest.er1
3823   cat conftest.err >&5
3824   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3825   (exit $ac_status); } >/dev/null; then
3826   if test -s conftest.err; then
3827     ac_cpp_err=$ac_c_preproc_warn_flag
3828   else
3829     ac_cpp_err=
3830   fi
3831 else
3832   ac_cpp_err=yes
3833 fi
3834 if test -z "$ac_cpp_err"; then
3835   ac_header_preproc=yes
3836 else
3837   echo "$as_me: failed program was:" >&5
3838 sed 's/^/| /' conftest.$ac_ext >&5
3839
3840   ac_header_preproc=no
3841 fi
3842 rm -f conftest.err conftest.$ac_ext
3843 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3844 echo "${ECHO_T}$ac_header_preproc" >&6
3845
3846 # So?  What about this header?
3847 case $ac_header_compiler:$ac_header_preproc in
3848   yes:no )
3849     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
3850 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
3851     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3852 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
3853     (
3854       cat <<\_ASBOX
3855 ## ------------------------------------ ##
3856 ## Report this to bug-autoconf@gnu.org. ##
3857 ## ------------------------------------ ##
3858 _ASBOX
3859     ) |
3860       sed "s/^/$as_me: WARNING:     /" >&2
3861     ;;
3862   no:yes )
3863     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
3864 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
3865     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
3866 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
3867     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3868 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
3869     (
3870       cat <<\_ASBOX
3871 ## ------------------------------------ ##
3872 ## Report this to bug-autoconf@gnu.org. ##
3873 ## ------------------------------------ ##
3874 _ASBOX
3875     ) |
3876       sed "s/^/$as_me: WARNING:     /" >&2
3877     ;;
3878 esac
3879 echo "$as_me:$LINENO: checking for $ac_header" >&5
3880 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3881 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3882   echo $ECHO_N "(cached) $ECHO_C" >&6
3883 else
3884   eval "$as_ac_Header=$ac_header_preproc"
3885 fi
3886 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3887 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3888
3889 fi
3890 if test `eval echo '${'$as_ac_Header'}'` = yes; then
3891   cat >>confdefs.h <<_ACEOF
3892 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3893 _ACEOF
3894
3895 fi
3896
3897 done
3898
3899
3900
3901
3902
3903 # Only perform the check for file, if the check method requires it
3904 case $deplibs_check_method in
3905 file_magic*)
3906   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
3907     echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5
3908 echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6
3909 if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
3910   echo $ECHO_N "(cached) $ECHO_C" >&6
3911 else
3912   case $MAGIC_CMD in
3913   /*)
3914   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3915   ;;
3916   ?:/*)
3917   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
3918   ;;
3919   *)
3920   ac_save_MAGIC_CMD="$MAGIC_CMD"
3921   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3922   ac_dummy="/usr/bin:$PATH"
3923   for ac_dir in $ac_dummy; do
3924     test -z "$ac_dir" && ac_dir=.
3925     if test -f $ac_dir/${ac_tool_prefix}file; then
3926       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
3927       if test -n "$file_magic_test_file"; then
3928         case $deplibs_check_method in
3929         "file_magic "*)
3930           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
3931           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3932           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3933             egrep "$file_magic_regex" > /dev/null; then
3934             :
3935           else
3936             cat <<EOF 1>&2
3937
3938 *** Warning: the command libtool uses to detect shared libraries,
3939 *** $file_magic_cmd, produces output that libtool cannot recognize.
3940 *** The result is that libtool may fail to recognize shared libraries
3941 *** as such.  This will affect the creation of libtool libraries that
3942 *** depend on shared libraries, but programs linked with such libtool
3943 *** libraries will work regardless of this problem.  Nevertheless, you
3944 *** may want to report the problem to your system manager and/or to
3945 *** bug-libtool@gnu.org
3946
3947 EOF
3948           fi ;;
3949         esac
3950       fi
3951       break
3952     fi
3953   done
3954   IFS="$ac_save_ifs"
3955   MAGIC_CMD="$ac_save_MAGIC_CMD"
3956   ;;
3957 esac
3958 fi
3959
3960 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3961 if test -n "$MAGIC_CMD"; then
3962   echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
3963 echo "${ECHO_T}$MAGIC_CMD" >&6
3964 else
3965   echo "$as_me:$LINENO: result: no" >&5
3966 echo "${ECHO_T}no" >&6
3967 fi
3968
3969 if test -z "$lt_cv_path_MAGIC_CMD"; then
3970   if test -n "$ac_tool_prefix"; then
3971     echo "$as_me:$LINENO: checking for file" >&5
3972 echo $ECHO_N "checking for file... $ECHO_C" >&6
3973 if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
3974   echo $ECHO_N "(cached) $ECHO_C" >&6
3975 else
3976   case $MAGIC_CMD in
3977   /*)
3978   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3979   ;;
3980   ?:/*)
3981   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
3982   ;;
3983   *)
3984   ac_save_MAGIC_CMD="$MAGIC_CMD"
3985   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3986   ac_dummy="/usr/bin:$PATH"
3987   for ac_dir in $ac_dummy; do
3988     test -z "$ac_dir" && ac_dir=.
3989     if test -f $ac_dir/file; then
3990       lt_cv_path_MAGIC_CMD="$ac_dir/file"
3991       if test -n "$file_magic_test_file"; then
3992         case $deplibs_check_method in
3993         "file_magic "*)
3994           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
3995           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3996           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3997             egrep "$file_magic_regex" > /dev/null; then
3998             :
3999           else
4000             cat <<EOF 1>&2
4001
4002 *** Warning: the command libtool uses to detect shared libraries,
4003 *** $file_magic_cmd, produces output that libtool cannot recognize.
4004 *** The result is that libtool may fail to recognize shared libraries
4005 *** as such.  This will affect the creation of libtool libraries that
4006 *** depend on shared libraries, but programs linked with such libtool
4007 *** libraries will work regardless of this problem.  Nevertheless, you
4008 *** may want to report the problem to your system manager and/or to
4009 *** bug-libtool@gnu.org
4010
4011 EOF
4012           fi ;;
4013         esac
4014       fi
4015       break
4016     fi
4017   done
4018   IFS="$ac_save_ifs"
4019   MAGIC_CMD="$ac_save_MAGIC_CMD"
4020   ;;
4021 esac
4022 fi
4023
4024 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4025 if test -n "$MAGIC_CMD"; then
4026   echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
4027 echo "${ECHO_T}$MAGIC_CMD" >&6
4028 else
4029   echo "$as_me:$LINENO: result: no" >&5
4030 echo "${ECHO_T}no" >&6
4031 fi
4032
4033   else
4034     MAGIC_CMD=:
4035   fi
4036 fi
4037
4038   fi
4039   ;;
4040 esac
4041
4042 if test -n "$ac_tool_prefix"; then
4043   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4044 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4045 echo "$as_me:$LINENO: checking for $ac_word" >&5
4046 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4047 if test "${ac_cv_prog_RANLIB+set}" = set; then
4048   echo $ECHO_N "(cached) $ECHO_C" >&6
4049 else
4050   if test -n "$RANLIB"; then
4051   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4052 else
4053 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4054 for as_dir in $PATH
4055 do
4056   IFS=$as_save_IFS
4057   test -z "$as_dir" && as_dir=.
4058   for ac_exec_ext in '' $ac_executable_extensions; do
4059   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4060     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4061     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4062     break 2
4063   fi
4064 done
4065 done
4066
4067 fi
4068 fi
4069 RANLIB=$ac_cv_prog_RANLIB
4070 if test -n "$RANLIB"; then
4071   echo "$as_me:$LINENO: result: $RANLIB" >&5
4072 echo "${ECHO_T}$RANLIB" >&6
4073 else
4074   echo "$as_me:$LINENO: result: no" >&5
4075 echo "${ECHO_T}no" >&6
4076 fi
4077
4078 fi
4079 if test -z "$ac_cv_prog_RANLIB"; then
4080   ac_ct_RANLIB=$RANLIB
4081   # Extract the first word of "ranlib", so it can be a program name with args.
4082 set dummy ranlib; ac_word=$2
4083 echo "$as_me:$LINENO: checking for $ac_word" >&5
4084 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4085 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4086   echo $ECHO_N "(cached) $ECHO_C" >&6
4087 else
4088   if test -n "$ac_ct_RANLIB"; then
4089   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4090 else
4091 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4092 for as_dir in $PATH
4093 do
4094   IFS=$as_save_IFS
4095   test -z "$as_dir" && as_dir=.
4096   for ac_exec_ext in '' $ac_executable_extensions; do
4097   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4098     ac_cv_prog_ac_ct_RANLIB="ranlib"
4099     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4100     break 2
4101   fi
4102 done
4103 done
4104
4105   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
4106 fi
4107 fi
4108 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4109 if test -n "$ac_ct_RANLIB"; then
4110   echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4111 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4112 else
4113   echo "$as_me:$LINENO: result: no" >&5
4114 echo "${ECHO_T}no" >&6
4115 fi
4116
4117   RANLIB=$ac_ct_RANLIB
4118 else
4119   RANLIB="$ac_cv_prog_RANLIB"
4120 fi
4121
4122 if test -n "$ac_tool_prefix"; then
4123   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4124 set dummy ${ac_tool_prefix}strip; ac_word=$2
4125 echo "$as_me:$LINENO: checking for $ac_word" >&5
4126 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4127 if test "${ac_cv_prog_STRIP+set}" = set; then
4128   echo $ECHO_N "(cached) $ECHO_C" >&6
4129 else
4130   if test -n "$STRIP"; then
4131   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4132 else
4133 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4134 for as_dir in $PATH
4135 do
4136   IFS=$as_save_IFS
4137   test -z "$as_dir" && as_dir=.
4138   for ac_exec_ext in '' $ac_executable_extensions; do
4139   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4140     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4141     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4142     break 2
4143   fi
4144 done
4145 done
4146
4147 fi
4148 fi
4149 STRIP=$ac_cv_prog_STRIP
4150 if test -n "$STRIP"; then
4151   echo "$as_me:$LINENO: result: $STRIP" >&5
4152 echo "${ECHO_T}$STRIP" >&6
4153 else
4154   echo "$as_me:$LINENO: result: no" >&5
4155 echo "${ECHO_T}no" >&6
4156 fi
4157
4158 fi
4159 if test -z "$ac_cv_prog_STRIP"; then
4160   ac_ct_STRIP=$STRIP
4161   # Extract the first word of "strip", so it can be a program name with args.
4162 set dummy strip; ac_word=$2
4163 echo "$as_me:$LINENO: checking for $ac_word" >&5
4164 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4165 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
4166   echo $ECHO_N "(cached) $ECHO_C" >&6
4167 else
4168   if test -n "$ac_ct_STRIP"; then
4169   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4170 else
4171 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4172 for as_dir in $PATH
4173 do
4174   IFS=$as_save_IFS
4175   test -z "$as_dir" && as_dir=.
4176   for ac_exec_ext in '' $ac_executable_extensions; do
4177   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4178     ac_cv_prog_ac_ct_STRIP="strip"
4179     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4180     break 2
4181   fi
4182 done
4183 done
4184
4185   test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
4186 fi
4187 fi
4188 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4189 if test -n "$ac_ct_STRIP"; then
4190   echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
4191 echo "${ECHO_T}$ac_ct_STRIP" >&6
4192 else
4193   echo "$as_me:$LINENO: result: no" >&5
4194 echo "${ECHO_T}no" >&6
4195 fi
4196
4197   STRIP=$ac_ct_STRIP
4198 else
4199   STRIP="$ac_cv_prog_STRIP"
4200 fi
4201
4202
4203 enable_dlopen=no
4204 enable_win32_dll=no
4205
4206 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4207 if test "${enable_libtool_lock+set}" = set; then
4208   enableval="$enable_libtool_lock"
4209
4210 fi;
4211 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4212
4213 # Some flags need to be propagated to the compiler or linker for good
4214 # libtool support.
4215 case $host in
4216 *-*-irix6*)
4217   # Find out which ABI we are using.
4218   echo '#line 4218 "configure"' > conftest.$ac_ext
4219   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4220   (eval $ac_compile) 2>&5
4221   ac_status=$?
4222   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4223   (exit $ac_status); }; then
4224     case `/usr/bin/file conftest.$ac_objext` in
4225     *32-bit*)
4226       LD="${LD-ld} -32"
4227       ;;
4228     *N32*)
4229       LD="${LD-ld} -n32"
4230       ;;
4231     *64-bit*)
4232       LD="${LD-ld} -64"
4233       ;;
4234     esac
4235   fi
4236   rm -rf conftest*
4237   ;;
4238
4239 *-*-sco3.2v5*)
4240   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4241   SAVE_CFLAGS="$CFLAGS"
4242   CFLAGS="$CFLAGS -belf"
4243   echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5
4244 echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6
4245 if test "${lt_cv_cc_needs_belf+set}" = set; then
4246   echo $ECHO_N "(cached) $ECHO_C" >&6
4247 else
4248
4249
4250      ac_ext=c
4251 ac_cpp='$CPP $CPPFLAGS'
4252 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4253 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4254 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4255
4256      cat >conftest.$ac_ext <<_ACEOF
4257 #line $LINENO "configure"
4258 /* confdefs.h.  */
4259 _ACEOF
4260 cat confdefs.h >>conftest.$ac_ext
4261 cat >>conftest.$ac_ext <<_ACEOF
4262 /* end confdefs.h.  */
4263
4264 int
4265 main ()
4266 {
4267
4268   ;
4269   return 0;
4270 }
4271 _ACEOF
4272 rm -f conftest.$ac_objext conftest$ac_exeext
4273 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4274   (eval $ac_link) 2>&5
4275   ac_status=$?
4276   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4277   (exit $ac_status); } &&
4278          { ac_try='test -s conftest$ac_exeext'
4279   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4280   (eval $ac_try) 2>&5
4281   ac_status=$?
4282   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4283   (exit $ac_status); }; }; then
4284   lt_cv_cc_needs_belf=yes
4285 else
4286   echo "$as_me: failed program was:" >&5
4287 sed 's/^/| /' conftest.$ac_ext >&5
4288
4289 lt_cv_cc_needs_belf=no
4290 fi
4291 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4292      ac_ext=c
4293 ac_cpp='$CPP $CPPFLAGS'
4294 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4295 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4296 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4297
4298 fi
4299 echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5
4300 echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6
4301   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4302     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4303     CFLAGS="$SAVE_CFLAGS"
4304   fi
4305   ;;
4306
4307
4308 esac
4309
4310 # Sed substitution that helps us do robust quoting.  It backslashifies
4311 # metacharacters that are still active within double-quoted strings.
4312 Xsed='sed -e s/^X//'
4313 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
4314
4315 # Same as above, but do not quote variable references.
4316 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
4317
4318 # Sed substitution to delay expansion of an escaped shell variable in a
4319 # double_quote_subst'ed string.
4320 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4321
4322 # Constants:
4323 rm="rm -f"
4324
4325 # Global variables:
4326 default_ofile=libtool
4327 can_build_shared=yes
4328
4329 # All known linkers require a `.a' archive for static linking (except M$VC,
4330 # which needs '.lib').
4331 libext=a
4332 ltmain="$ac_aux_dir/ltmain.sh"
4333 ofile="$default_ofile"
4334 with_gnu_ld="$lt_cv_prog_gnu_ld"
4335 need_locks="$enable_libtool_lock"
4336
4337 old_CC="$CC"
4338 old_CFLAGS="$CFLAGS"
4339
4340 # Set sane defaults for various variables
4341 test -z "$AR" && AR=ar
4342 test -z "$AR_FLAGS" && AR_FLAGS=cru
4343 test -z "$AS" && AS=as
4344 test -z "$CC" && CC=cc
4345 test -z "$DLLTOOL" && DLLTOOL=dlltool
4346 test -z "$LD" && LD=ld
4347 test -z "$LN_S" && LN_S="ln -s"
4348 test -z "$MAGIC_CMD" && MAGIC_CMD=file
4349 test -z "$NM" && NM=nm
4350 test -z "$OBJDUMP" && OBJDUMP=objdump
4351 test -z "$RANLIB" && RANLIB=:
4352 test -z "$STRIP" && STRIP=:
4353 test -z "$ac_objext" && ac_objext=o
4354
4355 if test x"$host" != x"$build"; then
4356   ac_tool_prefix=${host_alias}-
4357 else
4358   ac_tool_prefix=
4359 fi
4360
4361 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
4362 case $host_os in
4363 linux-gnu*) ;;
4364 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
4365 esac
4366
4367 case $host_os in
4368 aix3*)
4369   # AIX sometimes has problems with the GCC collect2 program.  For some
4370   # reason, if we set the COLLECT_NAMES environment variable, the problems
4371   # vanish in a puff of smoke.
4372   if test "X${COLLECT_NAMES+set}" != Xset; then
4373     COLLECT_NAMES=
4374     export COLLECT_NAMES
4375   fi
4376   ;;
4377 esac
4378
4379 # Determine commands to create old-style static archives.
4380 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
4381 old_postinstall_cmds='chmod 644 $oldlib'
4382 old_postuninstall_cmds=
4383
4384 if test -n "$RANLIB"; then
4385   case $host_os in
4386   openbsd*)
4387     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
4388     ;;
4389   *)
4390     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
4391     ;;
4392   esac
4393   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
4394 fi
4395
4396 # Allow CC to be a program name with arguments.
4397 set dummy $CC
4398 compiler="$2"
4399
4400 echo "$as_me:$LINENO: checking for objdir" >&5
4401 echo $ECHO_N "checking for objdir... $ECHO_C" >&6
4402 rm -f .libs 2>/dev/null
4403 mkdir .libs 2>/dev/null
4404 if test -d .libs; then
4405   objdir=.libs
4406 else
4407   # MS-DOS does not allow filenames that begin with a dot.
4408   objdir=_libs
4409 fi
4410 rmdir .libs 2>/dev/null
4411 echo "$as_me:$LINENO: result: $objdir" >&5
4412 echo "${ECHO_T}$objdir" >&6
4413
4414
4415
4416 # Check whether --with-pic or --without-pic was given.
4417 if test "${with_pic+set}" = set; then
4418   withval="$with_pic"
4419   pic_mode="$withval"
4420 else
4421   pic_mode=default
4422 fi;
4423 test -z "$pic_mode" && pic_mode=default
4424
4425 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
4426 # in isolation, and that seeing it set (from the cache) indicates that
4427 # the associated values are set (in the cache) correctly too.
4428 echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
4429 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
4430 if test "${lt_cv_prog_cc_pic+set}" = set; then
4431   echo $ECHO_N "(cached) $ECHO_C" >&6
4432 else
4433    lt_cv_prog_cc_pic=
4434   lt_cv_prog_cc_shlib=
4435   lt_cv_prog_cc_wl=
4436   lt_cv_prog_cc_static=
4437   lt_cv_prog_cc_no_builtin=
4438   lt_cv_prog_cc_can_build_shared=$can_build_shared
4439
4440   if test "$GCC" = yes; then
4441     lt_cv_prog_cc_wl='-Wl,'
4442     lt_cv_prog_cc_static='-static'
4443
4444     case $host_os in
4445     aix*)
4446       # Below there is a dirty hack to force normal static linking with -ldl
4447       # The problem is because libdl dynamically linked with both libc and
4448       # libC (AIX C++ library), which obviously doesn't included in libraries
4449       # list by gcc. This cause undefined symbols with -static flags.
4450       # This hack allows C programs to be linked with "-static -ldl", but
4451       # not sure about C++ programs.
4452       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
4453       ;;
4454     amigaos*)
4455       # FIXME: we need at least 68020 code to build shared libraries, but
4456       # adding the `-m68020' flag to GCC prevents building anything better,
4457       # like `-m68040'.
4458       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
4459       ;;
4460     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4461       # PIC is the default for these OSes.
4462       ;;
4463     darwin* | rhapsody*)
4464       # PIC is the default on this platform
4465       # Common symbols not allowed in MH_DYLIB files
4466       lt_cv_prog_cc_pic='-fno-common'
4467       ;;
4468     cygwin* | mingw* | pw32* | os2*)
4469       # This hack is so that the source file can tell whether it is being
4470       # built for inclusion in a dll (and should export symbols for example).
4471       lt_cv_prog_cc_pic='-DDLL_EXPORT'
4472       ;;
4473     sysv4*MP*)
4474       if test -d /usr/nec; then
4475          lt_cv_prog_cc_pic=-Kconform_pic
4476       fi
4477       ;;
4478     *)
4479       lt_cv_prog_cc_pic='-fPIC'
4480       ;;
4481     esac
4482   else
4483     # PORTME Check for PIC flags for the system compiler.
4484     case $host_os in
4485     aix3* | aix4* | aix5*)
4486       lt_cv_prog_cc_wl='-Wl,'
4487       # All AIX code is PIC.
4488       if test "$host_cpu" = ia64; then
4489         # AIX 5 now supports IA64 processor
4490         lt_cv_prog_cc_static='-Bstatic'
4491       else
4492         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
4493       fi
4494       ;;
4495
4496     hpux9* | hpux10* | hpux11*)
4497       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
4498       lt_cv_prog_cc_wl='-Wl,'
4499       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
4500       lt_cv_prog_cc_pic='+Z'
4501       ;;
4502
4503     irix5* | irix6* | nonstopux*)
4504       lt_cv_prog_cc_wl='-Wl,'
4505       lt_cv_prog_cc_static='-non_shared'
4506       # PIC (with -KPIC) is the default.
4507       ;;
4508
4509     cygwin* | mingw* | pw32* | os2*)
4510       # This hack is so that the source file can tell whether it is being
4511       # built for inclusion in a dll (and should export symbols for example).
4512       lt_cv_prog_cc_pic='-DDLL_EXPORT'
4513       ;;
4514
4515     newsos6)
4516       lt_cv_prog_cc_pic='-KPIC'
4517       lt_cv_prog_cc_static='-Bstatic'
4518       ;;
4519
4520     osf3* | osf4* | osf5*)
4521       # All OSF/1 code is PIC.
4522       lt_cv_prog_cc_wl='-Wl,'
4523       lt_cv_prog_cc_static='-non_shared'
4524       ;;
4525
4526     sco3.2v5*)
4527       lt_cv_prog_cc_pic='-Kpic'
4528       lt_cv_prog_cc_static='-dn'
4529       lt_cv_prog_cc_shlib='-belf'
4530       ;;
4531
4532     solaris*)
4533       lt_cv_prog_cc_pic='-KPIC'
4534       lt_cv_prog_cc_static='-Bstatic'
4535       lt_cv_prog_cc_wl='-Wl,'
4536       ;;
4537
4538     sunos4*)
4539       lt_cv_prog_cc_pic='-PIC'
4540       lt_cv_prog_cc_static='-Bstatic'
4541       lt_cv_prog_cc_wl='-Qoption ld '
4542       ;;
4543
4544     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
4545       lt_cv_prog_cc_pic='-KPIC'
4546       lt_cv_prog_cc_static='-Bstatic'
4547       if test "x$host_vendor" = xsni; then
4548         lt_cv_prog_cc_wl='-LD'
4549       else
4550         lt_cv_prog_cc_wl='-Wl,'
4551       fi
4552       ;;
4553
4554     uts4*)
4555       lt_cv_prog_cc_pic='-pic'
4556       lt_cv_prog_cc_static='-Bstatic'
4557       ;;
4558
4559     sysv4*MP*)
4560       if test -d /usr/nec ;then
4561         lt_cv_prog_cc_pic='-Kconform_pic'
4562         lt_cv_prog_cc_static='-Bstatic'
4563       fi
4564       ;;
4565
4566     *)
4567       lt_cv_prog_cc_can_build_shared=no
4568       ;;
4569     esac
4570   fi
4571
4572 fi
4573
4574 if test -z "$lt_cv_prog_cc_pic"; then
4575   echo "$as_me:$LINENO: result: none" >&5
4576 echo "${ECHO_T}none" >&6
4577 else
4578   echo "$as_me:$LINENO: result: $lt_cv_prog_cc_pic" >&5
4579 echo "${ECHO_T}$lt_cv_prog_cc_pic" >&6
4580
4581   # Check to make sure the pic_flag actually works.
4582   echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
4583 echo $ECHO_N "checking if $compiler PIC flag $lt_cv_prog_cc_pic works... $ECHO_C" >&6
4584   if test "${lt_cv_prog_cc_pic_works+set}" = set; then
4585   echo $ECHO_N "(cached) $ECHO_C" >&6
4586 else
4587       save_CFLAGS="$CFLAGS"
4588     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
4589     cat >conftest.$ac_ext <<_ACEOF
4590 #line $LINENO "configure"
4591 /* confdefs.h.  */
4592 _ACEOF
4593 cat confdefs.h >>conftest.$ac_ext
4594 cat >>conftest.$ac_ext <<_ACEOF
4595 /* end confdefs.h.  */
4596
4597 int
4598 main ()
4599 {
4600
4601   ;
4602   return 0;
4603 }
4604 _ACEOF
4605 rm -f conftest.$ac_objext
4606 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4607   (eval $ac_compile) 2>&5
4608   ac_status=$?
4609   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4610   (exit $ac_status); } &&
4611          { ac_try='test -s conftest.$ac_objext'
4612   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4613   (eval $ac_try) 2>&5
4614   ac_status=$?
4615   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4616   (exit $ac_status); }; }; then
4617         case $host_os in
4618       hpux9* | hpux10* | hpux11*)
4619         # On HP-UX, both CC and GCC only warn that PIC is supported... then
4620         # they create non-PIC objects.  So, if there were any warnings, we
4621         # assume that PIC is not supported.
4622         if test -s conftest.err; then
4623           lt_cv_prog_cc_pic_works=no
4624         else
4625           lt_cv_prog_cc_pic_works=yes
4626         fi
4627         ;;
4628       *)
4629         lt_cv_prog_cc_pic_works=yes
4630         ;;
4631       esac
4632
4633 else
4634   echo "$as_me: failed program was:" >&5
4635 sed 's/^/| /' conftest.$ac_ext >&5
4636
4637       lt_cv_prog_cc_pic_works=no
4638
4639 fi
4640 rm -f conftest.$ac_objext conftest.$ac_ext
4641     CFLAGS="$save_CFLAGS"
4642
4643 fi
4644
4645
4646   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
4647     lt_cv_prog_cc_pic=
4648     lt_cv_prog_cc_can_build_shared=no
4649   else
4650     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
4651   fi
4652
4653   echo "$as_me:$LINENO: result: $lt_cv_prog_cc_pic_works" >&5
4654 echo "${ECHO_T}$lt_cv_prog_cc_pic_works" >&6
4655 fi
4656
4657 # Check for any special shared library compilation flags.
4658 if test -n "$lt_cv_prog_cc_shlib"; then
4659   { echo "$as_me:$LINENO: WARNING: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" >&5
4660 echo "$as_me: WARNING: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" >&2;}
4661   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
4662   else
4663    { echo "$as_me:$LINENO: WARNING: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&5
4664 echo "$as_me: WARNING: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&2;}
4665     lt_cv_prog_cc_can_build_shared=no
4666   fi
4667 fi
4668
4669 echo "$as_me:$LINENO: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
4670 echo $ECHO_N "checking if $compiler static flag $lt_cv_prog_cc_static works... $ECHO_C" >&6
4671 if test "${lt_cv_prog_cc_static_works+set}" = set; then
4672   echo $ECHO_N "(cached) $ECHO_C" >&6
4673 else
4674     lt_cv_prog_cc_static_works=no
4675   save_LDFLAGS="$LDFLAGS"
4676   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
4677   cat >conftest.$ac_ext <<_ACEOF
4678 #line $LINENO "configure"
4679 /* confdefs.h.  */
4680 _ACEOF
4681 cat confdefs.h >>conftest.$ac_ext
4682 cat >>conftest.$ac_ext <<_ACEOF
4683 /* end confdefs.h.  */
4684
4685 int
4686 main ()
4687 {
4688
4689   ;
4690   return 0;
4691 }
4692 _ACEOF
4693 rm -f conftest.$ac_objext conftest$ac_exeext
4694 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4695   (eval $ac_link) 2>&5
4696   ac_status=$?
4697   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4698   (exit $ac_status); } &&
4699          { ac_try='test -s conftest$ac_exeext'
4700   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4701   (eval $ac_try) 2>&5
4702   ac_status=$?
4703   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4704   (exit $ac_status); }; }; then
4705   lt_cv_prog_cc_static_works=yes
4706 else
4707   echo "$as_me: failed program was:" >&5
4708 sed 's/^/| /' conftest.$ac_ext >&5
4709
4710 fi
4711 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4712   LDFLAGS="$save_LDFLAGS"
4713
4714 fi
4715
4716
4717 # Belt *and* braces to stop my trousers falling down:
4718 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
4719 echo "$as_me:$LINENO: result: $lt_cv_prog_cc_static_works" >&5
4720 echo "${ECHO_T}$lt_cv_prog_cc_static_works" >&6
4721
4722 pic_flag="$lt_cv_prog_cc_pic"
4723 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
4724 wl="$lt_cv_prog_cc_wl"
4725 link_static_flag="$lt_cv_prog_cc_static"
4726 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
4727 can_build_shared="$lt_cv_prog_cc_can_build_shared"
4728
4729
4730 # Check to see if options -o and -c are simultaneously supported by compiler
4731 echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
4732 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
4733 if test "${lt_cv_compiler_c_o+set}" = set; then
4734   echo $ECHO_N "(cached) $ECHO_C" >&6
4735 else
4736
4737 $rm -r conftest 2>/dev/null
4738 mkdir conftest
4739 cd conftest
4740 echo "int some_variable = 0;" > conftest.$ac_ext
4741 mkdir out
4742 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
4743 # that will create temporary files in the current directory regardless of
4744 # the output directory.  Thus, making CWD read-only will cause this test
4745 # to fail, enabling locking or at least warning the user not to do parallel
4746 # builds.
4747 chmod -w .
4748 save_CFLAGS="$CFLAGS"
4749 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
4750 compiler_c_o=no
4751 if { (eval echo configure:4751: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
4752   # The compiler can only warn and ignore the option if not recognized
4753   # So say no if there are warnings
4754   if test -s out/conftest.err; then
4755     lt_cv_compiler_c_o=no
4756   else
4757     lt_cv_compiler_c_o=yes
4758   fi
4759 else
4760   # Append any errors to the config.log.
4761   cat out/conftest.err 1>&5
4762   lt_cv_compiler_c_o=no
4763 fi
4764 CFLAGS="$save_CFLAGS"
4765 chmod u+w .
4766 $rm conftest* out/*
4767 rmdir out
4768 cd ..
4769 rmdir conftest
4770 $rm -r conftest 2>/dev/null
4771
4772 fi
4773
4774 compiler_c_o=$lt_cv_compiler_c_o
4775 echo "$as_me:$LINENO: result: $compiler_c_o" >&5
4776 echo "${ECHO_T}$compiler_c_o" >&6
4777
4778 if test x"$compiler_c_o" = x"yes"; then
4779   # Check to see if we can write to a .lo
4780   echo "$as_me:$LINENO: checking if $compiler supports -c -o file.lo" >&5
4781 echo $ECHO_N "checking if $compiler supports -c -o file.lo... $ECHO_C" >&6
4782   if test "${lt_cv_compiler_o_lo+set}" = set; then
4783   echo $ECHO_N "(cached) $ECHO_C" >&6
4784 else
4785
4786   lt_cv_compiler_o_lo=no
4787   save_CFLAGS="$CFLAGS"
4788   CFLAGS="$CFLAGS -c -o conftest.lo"
4789   save_objext="$ac_objext"
4790   ac_objext=lo
4791   cat >conftest.$ac_ext <<_ACEOF
4792 #line $LINENO "configure"
4793 /* confdefs.h.  */
4794 _ACEOF
4795 cat confdefs.h >>conftest.$ac_ext
4796 cat >>conftest.$ac_ext <<_ACEOF
4797 /* end confdefs.h.  */
4798
4799 int
4800 main ()
4801 {
4802 int some_variable = 0;
4803   ;
4804   return 0;
4805 }
4806 _ACEOF
4807 rm -f conftest.$ac_objext
4808 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4809   (eval $ac_compile) 2>&5
4810   ac_status=$?
4811   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4812   (exit $ac_status); } &&
4813          { ac_try='test -s conftest.$ac_objext'
4814   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4815   (eval $ac_try) 2>&5
4816   ac_status=$?
4817   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4818   (exit $ac_status); }; }; then
4819       # The compiler can only warn and ignore the option if not recognized
4820     # So say no if there are warnings
4821     if test -s conftest.err; then
4822       lt_cv_compiler_o_lo=no
4823     else
4824       lt_cv_compiler_o_lo=yes
4825     fi
4826
4827 else
4828   echo "$as_me: failed program was:" >&5
4829 sed 's/^/| /' conftest.$ac_ext >&5
4830
4831 fi
4832 rm -f conftest.$ac_objext conftest.$ac_ext
4833   ac_objext="$save_objext"
4834   CFLAGS="$save_CFLAGS"
4835
4836 fi
4837
4838   compiler_o_lo=$lt_cv_compiler_o_lo
4839   echo "$as_me:$LINENO: result: $compiler_o_lo" >&5
4840 echo "${ECHO_T}$compiler_o_lo" >&6
4841 else
4842   compiler_o_lo=no
4843 fi
4844
4845 # Check to see if we can do hard links to lock some files if needed
4846 hard_links="nottested"
4847 if test "$compiler_c_o" = no && test "$need_locks" != no; then
4848   # do not overwrite the value of need_locks provided by the user
4849   echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
4850 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6
4851   hard_links=yes
4852   $rm conftest*
4853   ln conftest.a conftest.b 2>/dev/null && hard_links=no
4854   touch conftest.a
4855   ln conftest.a conftest.b 2>&5 || hard_links=no
4856   ln conftest.a conftest.b 2>/dev/null && hard_links=no
4857   echo "$as_me:$LINENO: result: $hard_links" >&5
4858 echo "${ECHO_T}$hard_links" >&6
4859   if test "$hard_links" = no; then
4860     { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
4861 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
4862     need_locks=warn
4863   fi
4864 else
4865   need_locks=no
4866 fi
4867
4868 if test "$GCC" = yes; then
4869   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
4870   echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
4871 echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6
4872   echo "int some_variable = 0;" > conftest.$ac_ext
4873   save_CFLAGS="$CFLAGS"
4874   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
4875   compiler_rtti_exceptions=no
4876   cat >conftest.$ac_ext <<_ACEOF
4877 #line $LINENO "configure"
4878 /* confdefs.h.  */
4879 _ACEOF
4880 cat confdefs.h >>conftest.$ac_ext
4881 cat >>conftest.$ac_ext <<_ACEOF
4882 /* end confdefs.h.  */
4883
4884 int
4885 main ()
4886 {
4887 int some_variable = 0;
4888   ;
4889   return 0;
4890 }
4891 _ACEOF
4892 rm -f conftest.$ac_objext
4893 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4894   (eval $ac_compile) 2>&5
4895   ac_status=$?
4896   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4897   (exit $ac_status); } &&
4898          { ac_try='test -s conftest.$ac_objext'
4899   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4900   (eval $ac_try) 2>&5
4901   ac_status=$?
4902   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4903   (exit $ac_status); }; }; then
4904       # The compiler can only warn and ignore the option if not recognized
4905     # So say no if there are warnings
4906     if test -s conftest.err; then
4907       compiler_rtti_exceptions=no
4908     else
4909       compiler_rtti_exceptions=yes
4910     fi
4911
4912 else
4913   echo "$as_me: failed program was:" >&5
4914 sed 's/^/| /' conftest.$ac_ext >&5
4915
4916 fi
4917 rm -f conftest.$ac_objext conftest.$ac_ext
4918   CFLAGS="$save_CFLAGS"
4919   echo "$as_me:$LINENO: result: $compiler_rtti_exceptions" >&5
4920 echo "${ECHO_T}$compiler_rtti_exceptions" >&6
4921
4922   if test "$compiler_rtti_exceptions" = "yes"; then
4923     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
4924   else
4925     no_builtin_flag=' -fno-builtin'
4926   fi
4927 fi
4928
4929 # See if the linker supports building shared libraries.
4930 echo "$as_me:$LINENO: checking whether the linker ($LD) supports shared libraries" >&5
4931 echo $ECHO_N "checking whether the linker ($LD) supports shared libraries... $ECHO_C" >&6
4932
4933 allow_undefined_flag=
4934 no_undefined_flag=
4935 need_lib_prefix=unknown
4936 need_version=unknown
4937 # when you set need_version to no, make sure it does not cause -set_version
4938 # flags to be left without arguments
4939 archive_cmds=
4940 archive_expsym_cmds=
4941 old_archive_from_new_cmds=
4942 old_archive_from_expsyms_cmds=
4943 export_dynamic_flag_spec=
4944 whole_archive_flag_spec=
4945 thread_safe_flag_spec=
4946 hardcode_into_libs=no
4947 hardcode_libdir_flag_spec=
4948 hardcode_libdir_separator=
4949 hardcode_direct=no
4950 hardcode_minus_L=no
4951 hardcode_shlibpath_var=unsupported
4952 runpath_var=
4953 link_all_deplibs=unknown
4954 always_export_symbols=no
4955 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
4956 # include_expsyms should be a list of space-separated symbols to be *always*
4957 # included in the symbol list
4958 include_expsyms=
4959 # exclude_expsyms can be an egrep regular expression of symbols to exclude
4960 # it will be wrapped by ` (' and `)$', so one must not match beginning or
4961 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
4962 # as well as any symbol that contains `d'.
4963 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
4964 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
4965 # platforms (ab)use it in PIC code, but their linkers get confused if
4966 # the symbol is explicitly referenced.  Since portable code cannot
4967 # rely on this symbol name, it's probably fine to never include it in
4968 # preloaded symbol tables.
4969 extract_expsyms_cmds=
4970
4971 case $host_os in
4972 cygwin* | mingw* | pw32*)
4973   # FIXME: the MSVC++ port hasn't been tested in a loooong time
4974   # When not using gcc, we currently assume that we are using
4975   # Microsoft Visual C++.
4976   if test "$GCC" != yes; then
4977     with_gnu_ld=no
4978   fi
4979   ;;
4980 openbsd*)
4981   with_gnu_ld=no
4982   ;;
4983 esac
4984
4985 ld_shlibs=yes
4986 if test "$with_gnu_ld" = yes; then
4987   # If archive_cmds runs LD, not CC, wlarc should be empty
4988   wlarc='${wl}'
4989
4990   # See if GNU ld supports shared libraries.
4991   case $host_os in
4992   aix3* | aix4* | aix5*)
4993     # On AIX, the GNU linker is very broken
4994     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
4995     ld_shlibs=no
4996     cat <<EOF 1>&2
4997
4998 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
4999 *** to be unable to reliably create shared libraries on AIX.
5000 *** Therefore, libtool is disabling shared libraries support.  If you
5001 *** really care for shared libraries, you may want to modify your PATH
5002 *** so that a non-GNU linker is found, and then restart.
5003
5004 EOF
5005     ;;
5006
5007   amigaos*)
5008     archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
5009     hardcode_libdir_flag_spec='-L$libdir'
5010     hardcode_minus_L=yes
5011
5012     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5013     # that the semantics of dynamic libraries on AmigaOS, at least up
5014     # to version 4, is to share data among multiple programs linked
5015     # with the same dynamic library.  Since this doesn't match the
5016     # behavior of shared libraries on other platforms, we can use
5017     # them.
5018     ld_shlibs=no
5019     ;;
5020
5021   beos*)
5022     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5023       allow_undefined_flag=unsupported
5024       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5025       # support --undefined.  This deserves some investigation.  FIXME
5026       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5027     else
5028       ld_shlibs=no
5029     fi
5030     ;;
5031
5032   cygwin* | mingw* | pw32*)
5033     # hardcode_libdir_flag_spec is actually meaningless, as there is
5034     # no search path for DLLs.
5035     hardcode_libdir_flag_spec='-L$libdir'
5036     allow_undefined_flag=unsupported
5037     always_export_symbols=yes
5038
5039     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5040       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5041       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5042       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5043       else $CC -o impgen impgen.c ; fi)~
5044       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5045
5046     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5047
5048     # cygwin and mingw dlls have different entry points and sets of symbols
5049     # to exclude.
5050     # FIXME: what about values for MSVC?
5051     dll_entry=__cygwin_dll_entry@12
5052     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5053     case $host_os in
5054     mingw*)
5055       # mingw values
5056       dll_entry=_DllMainCRTStartup@12
5057       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5058       ;;
5059     esac
5060
5061     # mingw and cygwin differ, and it's simplest to just exclude the union
5062     # of the two symbol sets.
5063     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5064
5065     # recent cygwin and mingw systems supply a stub DllMain which the user
5066     # can override, but on older systems we have to supply one (in ltdll.c)
5067     if test "x$lt_cv_need_dllmain" = "xyes"; then
5068       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5069       ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~
5070         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5071     else
5072       ltdll_obj=
5073       ltdll_cmds=
5074     fi
5075
5076     # Extract the symbol export list from an `--export-all' def file,
5077     # then regenerate the def file from the symbol export list, so that
5078     # the compiled dll only exports the symbol export list.
5079     # Be careful not to strip the DATA tag left be newer dlltools.
5080     export_symbols_cmds="$ltdll_cmds"'
5081       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5082       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5083
5084     # If the export-symbols file already is a .def file (1st line
5085     # is EXPORTS), use it as is.
5086     # If DATA tags from a recent dlltool are present, honour them!
5087     archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
5088         cp $export_symbols $output_objdir/$soname-def;
5089       else
5090         echo EXPORTS > $output_objdir/$soname-def;
5091         _lt_hint=1;
5092         cat $export_symbols | while read symbol; do
5093          set dummy \$symbol;
5094          case \$# in
5095            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5096            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
5097          esac;
5098          _lt_hint=`expr 1 + \$_lt_hint`;
5099         done;
5100       fi~
5101       '"$ltdll_cmds"'
5102       $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
5103       $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
5104       $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
5105       $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~
5106       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5107     ;;
5108
5109   netbsd*)
5110     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5111       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5112       wlarc=
5113     else
5114       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5115       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5116     fi
5117     ;;
5118
5119   solaris* | sysv5*)
5120     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5121       ld_shlibs=no
5122       cat <<EOF 1>&2
5123
5124 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5125 *** create shared libraries on Solaris systems.  Therefore, libtool
5126 *** is disabling shared libraries support.  We urge you to upgrade GNU
5127 *** binutils to release 2.9.1 or newer.  Another option is to modify
5128 *** your PATH or compiler configuration so that the native linker is
5129 *** used, and then restart.
5130
5131 EOF
5132     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5133       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5134       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5135     else
5136       ld_shlibs=no
5137     fi
5138     ;;
5139
5140   sunos4*)
5141     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5142     wlarc=
5143     hardcode_direct=yes
5144     hardcode_shlibpath_var=no
5145     ;;
5146
5147   *)
5148     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5149       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5150       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5151     else
5152       ld_shlibs=no
5153     fi
5154     ;;
5155   esac
5156
5157   if test "$ld_shlibs" = yes; then
5158     runpath_var=LD_RUN_PATH
5159     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
5160     export_dynamic_flag_spec='${wl}--export-dynamic'
5161     case $host_os in
5162     cygwin* | mingw* | pw32*)
5163       # dlltool doesn't understand --whole-archive et. al.
5164       whole_archive_flag_spec=
5165       ;;
5166     *)
5167       # ancient GNU ld didn't support --whole-archive et. al.
5168       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5169         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5170       else
5171         whole_archive_flag_spec=
5172       fi
5173       ;;
5174     esac
5175   fi
5176 else
5177   # PORTME fill in a description of your system's linker (not GNU ld)
5178   case $host_os in
5179   aix3*)
5180     allow_undefined_flag=unsupported
5181     always_export_symbols=yes
5182     archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
5183     # Note: this linker hardcodes the directories in LIBPATH if there
5184     # are no directories specified by -L.
5185     hardcode_minus_L=yes
5186     if test "$GCC" = yes && test -z "$link_static_flag"; then
5187       # Neither direct hardcoding nor static linking is supported with a
5188       # broken collect2.
5189       hardcode_direct=unsupported
5190     fi
5191     ;;
5192
5193   aix4* | aix5*)
5194     if test "$host_cpu" = ia64; then
5195       # On IA64, the linker does run time linking by default, so we don't
5196       # have to do anything special.
5197       aix_use_runtimelinking=no
5198       exp_sym_flag='-Bexport'
5199       no_entry_flag=""
5200     else
5201       aix_use_runtimelinking=no
5202
5203       # Test if we are trying to use run time linking or normal
5204       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5205       # need to do runtime linking.
5206       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
5207         for ld_flag in $LDFLAGS; do
5208           if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5209             aix_use_runtimelinking=yes
5210             break
5211           fi
5212         done
5213       esac
5214
5215       exp_sym_flag='-bexport'
5216       no_entry_flag='-bnoentry'
5217     fi
5218
5219     # When large executables or shared objects are built, AIX ld can
5220     # have problems creating the table of contents.  If linking a library
5221     # or program results in "error TOC overflow" add -mminimal-toc to
5222     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5223     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5224
5225     hardcode_direct=yes
5226     archive_cmds=''
5227     hardcode_libdir_separator=':'
5228     if test "$GCC" = yes; then
5229       case $host_os in aix4.[012]|aix4.[012].*)
5230         collect2name=`${CC} -print-prog-name=collect2`
5231         if test -f "$collect2name" && \
5232           strings "$collect2name" | grep resolve_lib_name >/dev/null
5233         then
5234           # We have reworked collect2
5235           hardcode_direct=yes
5236         else
5237           # We have old collect2
5238           hardcode_direct=unsupported
5239           # It fails to find uninstalled libraries when the uninstalled
5240           # path is not listed in the libpath.  Setting hardcode_minus_L
5241           # to unsupported forces relinking
5242           hardcode_minus_L=yes
5243           hardcode_libdir_flag_spec='-L$libdir'
5244           hardcode_libdir_separator=
5245         fi
5246       esac
5247
5248       shared_flag='-shared'
5249     else
5250       # not using gcc
5251       if test "$host_cpu" = ia64; then
5252         shared_flag='${wl}-G'
5253       else
5254         if test "$aix_use_runtimelinking" = yes; then
5255           shared_flag='${wl}-G'
5256         else
5257           shared_flag='${wl}-bM:SRE'
5258         fi
5259       fi
5260     fi
5261
5262     # It seems that -bexpall can do strange things, so it is better to
5263     # generate a list of symbols to export.
5264     always_export_symbols=yes
5265     if test "$aix_use_runtimelinking" = yes; then
5266       # Warning - without using the other runtime loading flags (-brtl),
5267       # -berok will link without error, but may produce a broken library.
5268       allow_undefined_flag='-berok'
5269       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
5270       archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
5271     else
5272       if test "$host_cpu" = ia64; then
5273         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
5274         allow_undefined_flag="-z nodefs"
5275         archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname ${wl}-h$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
5276       else
5277         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
5278         # Warning - without using the other run time loading flags,
5279         # -berok will link without error, but may produce a broken library.
5280         allow_undefined_flag='${wl}-berok'
5281         # This is a bit strange, but is similar to how AIX traditionally builds
5282         # it's shared libraries.
5283         archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"' ~$AR -crlo $objdir/$libname$release.a $objdir/$soname'
5284       fi
5285     fi
5286     ;;
5287
5288   amigaos*)
5289     archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
5290     hardcode_libdir_flag_spec='-L$libdir'
5291     hardcode_minus_L=yes
5292     # see comment about different semantics on the GNU ld section
5293     ld_shlibs=no
5294     ;;
5295
5296   cygwin* | mingw* | pw32*)
5297     # When not using gcc, we currently assume that we are using
5298     # Microsoft Visual C++.
5299     # hardcode_libdir_flag_spec is actually meaningless, as there is
5300     # no search path for DLLs.
5301     hardcode_libdir_flag_spec=' '
5302     allow_undefined_flag=unsupported
5303     # Tell ltmain to make .lib files, not .a files.
5304     libext=lib
5305     # FIXME: Setting linknames here is a bad hack.
5306     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5307     # The linker will automatically build a .lib file if we build a DLL.
5308     old_archive_from_new_cmds='true'
5309     # FIXME: Should let the user specify the lib program.
5310     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
5311     fix_srcfile_path='`cygpath -w "$srcfile"`'
5312     ;;
5313
5314   darwin* | rhapsody*)
5315     case "$host_os" in
5316     rhapsody* | darwin1.[012])
5317       allow_undefined_flag='-undefined suppress'
5318       ;;
5319     *) # Darwin 1.3 on
5320       allow_undefined_flag='-flat_namespace -undefined suppress'
5321       ;;
5322     esac
5323     # FIXME: Relying on posixy $() will cause problems for
5324     #        cross-compilation, but unfortunately the echo tests do not
5325     #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
5326     #        `"' quotes if we put them in here... so don't!
5327     archive_cmds='$nonopt $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring'
5328     # We need to add '_' to the symbols in $export_symbols first
5329     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
5330     hardcode_direct=yes
5331     hardcode_shlibpath_var=no
5332     whole_archive_flag_spec='-all_load $convenience'
5333     ;;
5334
5335   freebsd1*)
5336     ld_shlibs=no
5337     ;;
5338
5339   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5340   # support.  Future versions do this automatically, but an explicit c++rt0.o
5341   # does not break anything, and helps significantly (at the cost of a little
5342   # extra space).
5343   freebsd2.2*)
5344     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5345     hardcode_libdir_flag_spec='-R$libdir'
5346     hardcode_direct=yes
5347     hardcode_shlibpath_var=no
5348     ;;
5349
5350   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5351   freebsd2*)
5352     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5353     hardcode_direct=yes
5354     hardcode_minus_L=yes
5355     hardcode_shlibpath_var=no
5356     ;;
5357
5358   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5359   freebsd*)
5360     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5361     hardcode_libdir_flag_spec='-R$libdir'
5362     hardcode_direct=yes
5363     hardcode_shlibpath_var=no
5364     ;;
5365
5366   hpux9* | hpux10* | hpux11*)
5367     case $host_os in
5368     hpux9*) archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;;
5369     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
5370     esac
5371     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
5372     hardcode_libdir_separator=:
5373     hardcode_direct=yes
5374     hardcode_minus_L=yes # Not in the search PATH, but as the default
5375                          # location of the library.
5376     export_dynamic_flag_spec='${wl}-E'
5377     ;;
5378
5379   irix5* | irix6* | nonstopux*)
5380     if test "$GCC" = yes; then
5381       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5382     else
5383       archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
5384     fi
5385     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5386     hardcode_libdir_separator=:
5387     link_all_deplibs=yes
5388     ;;
5389
5390   netbsd*)
5391     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5392       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5393     else
5394       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5395     fi
5396     hardcode_libdir_flag_spec='-R$libdir'
5397     hardcode_direct=yes
5398     hardcode_shlibpath_var=no
5399     ;;
5400
5401   newsos6)
5402     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5403     hardcode_direct=yes
5404     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5405     hardcode_libdir_separator=:
5406     hardcode_shlibpath_var=no
5407     ;;
5408
5409   openbsd*)
5410     hardcode_direct=yes
5411     hardcode_shlibpath_var=no
5412     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5413       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
5414       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5415       export_dynamic_flag_spec='${wl}-E'
5416     else
5417       case "$host_os" in
5418       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
5419         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5420         hardcode_libdir_flag_spec='-R$libdir'
5421         ;;
5422       *)
5423         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
5424         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5425         ;;
5426       esac
5427     fi
5428     ;;
5429
5430   os2*)
5431     hardcode_libdir_flag_spec='-L$libdir'
5432     hardcode_minus_L=yes
5433     allow_undefined_flag=unsupported
5434     archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
5435     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5436     ;;
5437
5438   osf3*)
5439     if test "$GCC" = yes; then
5440       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5441       archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5442     else
5443       allow_undefined_flag=' -expect_unresolved \*'
5444       archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
5445     fi
5446     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5447     hardcode_libdir_separator=:
5448     ;;
5449
5450   osf4* | osf5*)        # as osf3* with the addition of -msym flag
5451     if test "$GCC" = yes; then
5452       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5453       archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5454       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5455     else
5456       allow_undefined_flag=' -expect_unresolved \*'
5457       archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
5458       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
5459       $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
5460
5461       #Both c and cxx compiler support -rpath directly
5462       hardcode_libdir_flag_spec='-rpath $libdir'
5463     fi
5464     hardcode_libdir_separator=:
5465     ;;
5466
5467   sco3.2v5*)
5468     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5469     hardcode_shlibpath_var=no
5470     runpath_var=LD_RUN_PATH
5471     hardcode_runpath_var=yes
5472     export_dynamic_flag_spec='${wl}-Bexport'
5473     ;;
5474
5475   solaris*)
5476     # gcc --version < 3.0 without binutils cannot create self contained
5477     # shared libraries reliably, requiring libgcc.a to resolve some of
5478     # the object symbols generated in some cases.  Libraries that use
5479     # assert need libgcc.a to resolve __eprintf, for example.  Linking
5480     # a copy of libgcc.a into every shared library to guarantee resolving
5481     # such symbols causes other problems:  According to Tim Van Holder
5482     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
5483     # (to the application) exception stack for one thing.
5484     no_undefined_flag=' -z defs'
5485     if test "$GCC" = yes; then
5486       case `$CC --version 2>/dev/null` in
5487       [12].*)
5488         cat <<EOF 1>&2
5489
5490 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
5491 *** create self contained shared libraries on Solaris systems, without
5492 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
5493 *** -no-undefined support, which will at least allow you to build shared
5494 *** libraries.  However, you may find that when you link such libraries
5495 *** into an application without using GCC, you have to manually add
5496 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
5497 *** upgrade to a newer version of GCC.  Another option is to rebuild your
5498 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
5499
5500 EOF
5501         no_undefined_flag=
5502         ;;
5503       esac
5504     fi
5505     # $CC -shared without GNU ld will not create a library from C++
5506     # object files and a static libstdc++, better avoid it by now
5507     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5508     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5509                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5510     hardcode_libdir_flag_spec='-R$libdir'
5511     hardcode_shlibpath_var=no
5512     case $host_os in
5513     solaris2.[0-5] | solaris2.[0-5].*) ;;
5514     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
5515       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
5516     esac
5517     link_all_deplibs=yes
5518     ;;
5519
5520   sunos4*)
5521     if test "x$host_vendor" = xsequent; then
5522       # Use $CC to link under sequent, because it throws in some extra .o
5523       # files that make .init and .fini sections work.
5524       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5525     else
5526       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5527     fi
5528     hardcode_libdir_flag_spec='-L$libdir'
5529     hardcode_direct=yes
5530     hardcode_minus_L=yes
5531     hardcode_shlibpath_var=no
5532     ;;
5533
5534   sysv4)
5535     if test "x$host_vendor" = xsno; then
5536       archive_cmds='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags'
5537       hardcode_direct=yes # is this really true???
5538     else
5539       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5540       hardcode_direct=no #Motorola manual says yes, but my tests say they lie
5541     fi
5542     runpath_var='LD_RUN_PATH'
5543     hardcode_shlibpath_var=no
5544     ;;
5545
5546   sysv4.3*)
5547     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5548     hardcode_shlibpath_var=no
5549     export_dynamic_flag_spec='-Bexport'
5550     ;;
5551
5552   sysv5*)
5553     no_undefined_flag=' -z text'
5554     # $CC -shared without GNU ld will not create a library from C++
5555     # object files and a static libstdc++, better avoid it by now
5556     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5557     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5558                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5559     hardcode_libdir_flag_spec=
5560     hardcode_shlibpath_var=no
5561     runpath_var='LD_RUN_PATH'
5562     ;;
5563
5564   uts4*)
5565     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5566     hardcode_libdir_flag_spec='-L$libdir'
5567     hardcode_shlibpath_var=no
5568     ;;
5569
5570   dgux*)
5571     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5572     hardcode_libdir_flag_spec='-L$libdir'
5573     hardcode_shlibpath_var=no
5574     ;;
5575
5576   sysv4*MP*)
5577     if test -d /usr/nec; then
5578       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5579       hardcode_shlibpath_var=no
5580       runpath_var=LD_RUN_PATH
5581       hardcode_runpath_var=yes
5582       ld_shlibs=yes
5583     fi
5584     ;;
5585
5586   sysv4.2uw2*)
5587     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5588     hardcode_direct=yes
5589     hardcode_minus_L=no
5590     hardcode_shlibpath_var=no
5591     hardcode_runpath_var=yes
5592     runpath_var=LD_RUN_PATH
5593     ;;
5594
5595   sysv5uw7* | unixware7*)
5596     no_undefined_flag='${wl}-z ${wl}text'
5597     if test "$GCC" = yes; then
5598       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5599     else
5600       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5601     fi
5602     runpath_var='LD_RUN_PATH'
5603     hardcode_shlibpath_var=no
5604     ;;
5605
5606   *)
5607     ld_shlibs=no
5608     ;;
5609   esac
5610 fi
5611 echo "$as_me:$LINENO: result: $ld_shlibs" >&5
5612 echo "${ECHO_T}$ld_shlibs" >&6
5613 test "$ld_shlibs" = no && can_build_shared=no
5614
5615 # Check hardcoding attributes.
5616 echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
5617 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
5618 hardcode_action=
5619 if test -n "$hardcode_libdir_flag_spec" || \
5620    test -n "$runpath_var"; then
5621
5622   # We can hardcode non-existant directories.
5623   if test "$hardcode_direct" != no &&
5624      # If the only mechanism to avoid hardcoding is shlibpath_var, we
5625      # have to relink, otherwise we might link with an installed library
5626      # when we should be linking with a yet-to-be-installed one
5627      ## test "$hardcode_shlibpath_var" != no &&
5628      test "$hardcode_minus_L" != no; then
5629     # Linking always hardcodes the temporary library directory.
5630     hardcode_action=relink
5631   else
5632     # We can link without hardcoding, and we can hardcode nonexisting dirs.
5633     hardcode_action=immediate
5634   fi
5635 else
5636   # We cannot hardcode anything, or else we can only hardcode existing
5637   # directories.
5638   hardcode_action=unsupported
5639 fi
5640 echo "$as_me:$LINENO: result: $hardcode_action" >&5
5641 echo "${ECHO_T}$hardcode_action" >&6
5642
5643 striplib=
5644 old_striplib=
5645 echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
5646 echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6
5647 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
5648   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
5649   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
5650   echo "$as_me:$LINENO: result: yes" >&5
5651 echo "${ECHO_T}yes" >&6
5652 else
5653   echo "$as_me:$LINENO: result: no" >&5
5654 echo "${ECHO_T}no" >&6
5655 fi
5656
5657 reload_cmds='$LD$reload_flag -o $output$reload_objs'
5658 test -z "$deplibs_check_method" && deplibs_check_method=unknown
5659
5660 # PORTME Fill in your ld.so characteristics
5661 echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
5662 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
5663 library_names_spec=
5664 libname_spec='lib$name'
5665 soname_spec=
5666 postinstall_cmds=
5667 postuninstall_cmds=
5668 finish_cmds=
5669 finish_eval=
5670 shlibpath_var=
5671 shlibpath_overrides_runpath=unknown
5672 version_type=none
5673 dynamic_linker="$host_os ld.so"
5674 sys_lib_dlsearch_path_spec="/lib /usr/lib"
5675 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
5676
5677 case $host_os in
5678 aix3*)
5679   version_type=linux
5680   library_names_spec='${libname}${release}.so$versuffix $libname.a'
5681   shlibpath_var=LIBPATH
5682
5683   # AIX has no versioning support, so we append a major version to the name.
5684   soname_spec='${libname}${release}.so$major'
5685   ;;
5686
5687 aix4* | aix5*)
5688   version_type=linux
5689   if test "$host_cpu" = ia64; then
5690     # AIX 5 supports IA64
5691     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
5692     shlibpath_var=LD_LIBRARY_PATH
5693   else
5694     # With GCC up to 2.95.x, collect2 would create an import file
5695     # for dependence libraries.  The import file would start with
5696     # the line `#! .'.  This would cause the generated library to
5697     # depend on `.', always an invalid library.  This was fixed in
5698     # development snapshots of GCC prior to 3.0.
5699     case $host_os in
5700       aix4 | aix4.[01] | aix4.[01].*)
5701         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
5702              echo ' yes '
5703              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
5704           :
5705         else
5706           can_build_shared=no
5707         fi
5708         ;;
5709     esac
5710     # AIX (on Power*) has no versioning support, so currently we can
5711     # not hardcode correct soname into executable. Probably we can
5712     # add versioning support to collect2, so additional links can
5713     # be useful in future.
5714     if test "$aix_use_runtimelinking" = yes; then
5715       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
5716       # instead of lib<name>.a to let people know that these are not
5717       # typical AIX shared libraries.
5718       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
5719     else
5720       # We preserve .a as extension for shared libraries through AIX4.2
5721       # and later when we are not doing run time linking.
5722       library_names_spec='${libname}${release}.a $libname.a'
5723       soname_spec='${libname}${release}.so$major'
5724     fi
5725     shlibpath_var=LIBPATH
5726   fi
5727   ;;
5728
5729 amigaos*)
5730   library_names_spec='$libname.ixlibrary $libname.a'
5731   # Create ${libname}_ixlibrary.a entries in /sys/libs.
5732   finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done'
5733   ;;
5734
5735 beos*)
5736   library_names_spec='${libname}.so'
5737   dynamic_linker="$host_os ld.so"
5738   shlibpath_var=LIBRARY_PATH
5739   ;;
5740
5741 bsdi4*)
5742   version_type=linux
5743   need_version=no
5744   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
5745   soname_spec='${libname}${release}.so$major'
5746   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
5747   shlibpath_var=LD_LIBRARY_PATH
5748   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
5749   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
5750   export_dynamic_flag_spec=-rdynamic
5751   # the default ld.so.conf also contains /usr/contrib/lib and
5752   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
5753   # libtool to hard-code these into programs
5754   ;;
5755
5756 cygwin* | mingw* | pw32*)
5757   version_type=windows
5758   need_version=no
5759   need_lib_prefix=no
5760   case $GCC,$host_os in
5761   yes,cygwin*)
5762     library_names_spec='$libname.dll.a'
5763     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
5764     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
5765       dldir=$destdir/`dirname \$dlpath`~
5766       test -d \$dldir || mkdir -p \$dldir~
5767       $install_prog .libs/$dlname \$dldir/$dlname'
5768     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
5769       dlpath=$dir/\$dldll~
5770        $rm \$dlpath'
5771     ;;
5772   yes,mingw*)
5773     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
5774     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"`
5775     ;;
5776   yes,pw32*)
5777     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
5778     ;;
5779   *)
5780     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
5781     ;;
5782   esac
5783   dynamic_linker='Win32 ld.exe'
5784   # FIXME: first we should search . and the directory the executable is in
5785   shlibpath_var=PATH
5786   ;;
5787
5788 darwin* | rhapsody*)
5789   dynamic_linker="$host_os dyld"
5790   version_type=darwin
5791   need_lib_prefix=no
5792   need_version=no
5793   # FIXME: Relying on posixy $() will cause problems for
5794   #        cross-compilation, but unfortunately the echo tests do not
5795   #        yet detect zsh echo's removal of \ escapes.
5796   library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)'
5797   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
5798   shlibpath_overrides_runpath=yes
5799   shlibpath_var=DYLD_LIBRARY_PATH
5800   ;;
5801
5802 freebsd1*)
5803   dynamic_linker=no
5804   ;;
5805
5806 freebsd*)
5807   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
5808   version_type=freebsd-$objformat
5809   case $version_type in
5810     freebsd-elf*)
5811       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
5812       need_version=no
5813       need_lib_prefix=no
5814       ;;
5815     freebsd-*)
5816       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
5817       need_version=yes
5818       ;;
5819   esac
5820   shlibpath_var=LD_LIBRARY_PATH
5821   case $host_os in
5822   freebsd2*)
5823     shlibpath_overrides_runpath=yes
5824     ;;
5825   *)
5826     shlibpath_overrides_runpath=no
5827     hardcode_into_libs=yes
5828     ;;
5829   esac
5830   ;;
5831
5832 gnu*)
5833   version_type=linux
5834   need_lib_prefix=no
5835   need_version=no
5836   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
5837   soname_spec='${libname}${release}.so$major'
5838   shlibpath_var=LD_LIBRARY_PATH
5839   hardcode_into_libs=yes
5840   ;;
5841
5842 hpux9* | hpux10* | hpux11*)
5843   # Give a soname corresponding to the major version so that dld.sl refuses to
5844   # link against other versions.
5845   dynamic_linker="$host_os dld.sl"
5846   version_type=sunos
5847   need_lib_prefix=no
5848   need_version=no
5849   shlibpath_var=SHLIB_PATH
5850   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
5851   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
5852   soname_spec='${libname}${release}.sl$major'
5853   # HP-UX runs *really* slowly unless shared libraries are mode 555.
5854   postinstall_cmds='chmod 555 $lib'
5855   ;;
5856
5857 irix5* | irix6* | nonstopux*)
5858   case $host_os in
5859     nonstopux*) version_type=nonstopux ;;
5860     *)          version_type=irix ;;
5861   esac
5862   need_lib_prefix=no
5863   need_version=no
5864   soname_spec='${libname}${release}.so$major'
5865   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
5866   case $host_os in
5867   irix5* | nonstopux*)
5868     libsuff= shlibsuff=
5869     ;;
5870   *)
5871     case $LD in # libtool.m4 will add one of these switches to LD
5872     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
5873     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
5874     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
5875     *) libsuff= shlibsuff= libmagic=never-match;;
5876     esac
5877     ;;
5878   esac
5879   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
5880   shlibpath_overrides_runpath=no
5881   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
5882   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
5883   ;;
5884
5885 # No shared lib support for Linux oldld, aout, or coff.
5886 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
5887   dynamic_linker=no
5888   ;;
5889
5890 # This must be Linux ELF.
5891 linux-gnu*)
5892   version_type=linux
5893   need_lib_prefix=no
5894   need_version=no
5895   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
5896   soname_spec='${libname}${release}.so$major'
5897   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
5898   shlibpath_var=LD_LIBRARY_PATH
5899   shlibpath_overrides_runpath=no
5900   # This implies no fast_install, which is unacceptable.
5901   # Some rework will be needed to allow for fast_install
5902   # before this can be enabled.
5903   hardcode_into_libs=yes
5904
5905   # We used to test for /lib/ld.so.1 and disable shared libraries on
5906   # powerpc, because MkLinux only supported shared libraries with the
5907   # GNU dynamic linker.  Since this was broken with cross compilers,
5908   # most powerpc-linux boxes support dynamic linking these days and
5909   # people can always --disable-shared, the test was removed, and we
5910   # assume the GNU/Linux dynamic linker is in use.
5911   dynamic_linker='GNU/Linux ld.so'
5912   ;;
5913
5914 netbsd*)
5915   version_type=sunos
5916   need_lib_prefix=no
5917   need_version=no
5918   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5919     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
5920     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
5921     dynamic_linker='NetBSD (a.out) ld.so'
5922   else
5923     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
5924     soname_spec='${libname}${release}.so$major'
5925     dynamic_linker='NetBSD ld.elf_so'
5926   fi
5927   shlibpath_var=LD_LIBRARY_PATH
5928   shlibpath_overrides_runpath=yes
5929   hardcode_into_libs=yes
5930   ;;
5931
5932 newsos6)
5933   version_type=linux
5934   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
5935   shlibpath_var=LD_LIBRARY_PATH
5936   shlibpath_overrides_runpath=yes
5937   ;;
5938
5939 openbsd*)
5940   version_type=sunos
5941   need_lib_prefix=no
5942   need_version=no
5943   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5944     case "$host_os" in
5945     openbsd2.[89] | openbsd2.[89].*)
5946       shlibpath_overrides_runpath=no
5947       ;;
5948     *)
5949       shlibpath_overrides_runpath=yes
5950       ;;
5951     esac
5952   else
5953     shlibpath_overrides_runpath=yes
5954   fi
5955   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
5956   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
5957   shlibpath_var=LD_LIBRARY_PATH
5958   ;;
5959
5960 os2*)
5961   libname_spec='$name'
5962   need_lib_prefix=no
5963   library_names_spec='$libname.dll $libname.a'
5964   dynamic_linker='OS/2 ld.exe'
5965   shlibpath_var=LIBPATH
5966   ;;
5967
5968 osf3* | osf4* | osf5*)
5969   version_type=osf
5970   need_version=no
5971   need_lib_prefix=no
5972   soname_spec='${libname}${release}.so'
5973   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
5974   shlibpath_var=LD_LIBRARY_PATH
5975   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
5976   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
5977   ;;
5978
5979 sco3.2v5*)
5980   version_type=osf
5981   soname_spec='${libname}${release}.so$major'
5982   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
5983   shlibpath_var=LD_LIBRARY_PATH
5984   ;;
5985
5986 solaris*)
5987   version_type=linux
5988   need_lib_prefix=no
5989   need_version=no
5990   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
5991   soname_spec='${libname}${release}.so$major'
5992   shlibpath_var=LD_LIBRARY_PATH
5993   shlibpath_overrides_runpath=yes
5994   hardcode_into_libs=yes
5995   # ldd complains unless libraries are executable
5996   postinstall_cmds='chmod +x $lib'
5997   ;;
5998
5999 sunos4*)
6000   version_type=sunos
6001   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6002   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6003   shlibpath_var=LD_LIBRARY_PATH
6004   shlibpath_overrides_runpath=yes
6005   if test "$with_gnu_ld" = yes; then
6006     need_lib_prefix=no
6007   fi
6008   need_version=yes
6009   ;;
6010
6011 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6012   version_type=linux
6013   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6014   soname_spec='${libname}${release}.so$major'
6015   shlibpath_var=LD_LIBRARY_PATH
6016   case $host_vendor in
6017     sni)
6018       shlibpath_overrides_runpath=no
6019       ;;
6020     motorola)
6021       need_lib_prefix=no
6022       need_version=no
6023       shlibpath_overrides_runpath=no
6024       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6025       ;;
6026   esac
6027   ;;
6028
6029 uts4*)
6030   version_type=linux
6031   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6032   soname_spec='${libname}${release}.so$major'
6033   shlibpath_var=LD_LIBRARY_PATH
6034   ;;
6035
6036 dgux*)
6037   version_type=linux
6038   need_lib_prefix=no
6039   need_version=no
6040   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6041   soname_spec='${libname}${release}.so$major'
6042   shlibpath_var=LD_LIBRARY_PATH
6043   ;;
6044
6045 sysv4*MP*)
6046   if test -d /usr/nec ;then
6047     version_type=linux
6048     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6049     soname_spec='$libname.so.$major'
6050     shlibpath_var=LD_LIBRARY_PATH
6051   fi
6052   ;;
6053
6054 *)
6055   dynamic_linker=no
6056   ;;
6057 esac
6058 echo "$as_me:$LINENO: result: $dynamic_linker" >&5
6059 echo "${ECHO_T}$dynamic_linker" >&6
6060 test "$dynamic_linker" = no && can_build_shared=no
6061
6062 # Report the final consequences.
6063 echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
6064 echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6
6065 echo "$as_me:$LINENO: result: $can_build_shared" >&5
6066 echo "${ECHO_T}$can_build_shared" >&6
6067
6068 echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
6069 echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6
6070 test "$can_build_shared" = "no" && enable_shared=no
6071
6072 # On AIX, shared libraries and static libraries use the same namespace, and
6073 # are all built from PIC.
6074 case "$host_os" in
6075 aix3*)
6076   test "$enable_shared" = yes && enable_static=no
6077   if test -n "$RANLIB"; then
6078     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6079     postinstall_cmds='$RANLIB $lib'
6080   fi
6081   ;;
6082
6083 aix4*)
6084   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6085     test "$enable_shared" = yes && enable_static=no
6086   fi
6087   ;;
6088 esac
6089 echo "$as_me:$LINENO: result: $enable_shared" >&5
6090 echo "${ECHO_T}$enable_shared" >&6
6091
6092 echo "$as_me:$LINENO: checking whether to build static libraries" >&5
6093 echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6
6094 # Make sure either enable_shared or enable_static is yes.
6095 test "$enable_shared" = yes || enable_static=yes
6096 echo "$as_me:$LINENO: result: $enable_static" >&5
6097 echo "${ECHO_T}$enable_static" >&6
6098
6099 if test "$hardcode_action" = relink; then
6100   # Fast installation is not supported
6101   enable_fast_install=no
6102 elif test "$shlibpath_overrides_runpath" = yes ||
6103      test "$enable_shared" = no; then
6104   # Fast installation is not necessary
6105   enable_fast_install=needless
6106 fi
6107
6108 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6109 if test "$GCC" = yes; then
6110   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6111 fi
6112
6113 if test "x$enable_dlopen" != xyes; then
6114   enable_dlopen=unknown
6115   enable_dlopen_self=unknown
6116   enable_dlopen_self_static=unknown
6117 else
6118   lt_cv_dlopen=no
6119   lt_cv_dlopen_libs=
6120
6121   case $host_os in
6122   beos*)
6123     lt_cv_dlopen="load_add_on"
6124     lt_cv_dlopen_libs=
6125     lt_cv_dlopen_self=yes
6126     ;;
6127
6128   cygwin* | mingw* | pw32*)
6129     lt_cv_dlopen="LoadLibrary"
6130     lt_cv_dlopen_libs=
6131    ;;
6132
6133   *)
6134     echo "$as_me:$LINENO: checking for shl_load" >&5
6135 echo $ECHO_N "checking for shl_load... $ECHO_C" >&6
6136 if test "${ac_cv_func_shl_load+set}" = set; then
6137   echo $ECHO_N "(cached) $ECHO_C" >&6
6138 else
6139   cat >conftest.$ac_ext <<_ACEOF
6140 #line $LINENO "configure"
6141 /* confdefs.h.  */
6142 _ACEOF
6143 cat confdefs.h >>conftest.$ac_ext
6144 cat >>conftest.$ac_ext <<_ACEOF
6145 /* end confdefs.h.  */
6146 /* System header to define __stub macros and hopefully few prototypes,
6147     which can conflict with char shl_load (); below.  */
6148 #include <assert.h>
6149 /* Override any gcc2 internal prototype to avoid an error.  */
6150 #ifdef __cplusplus
6151 extern "C"
6152 {
6153 #endif
6154 /* We use char because int might match the return type of a gcc2
6155    builtin and then its argument prototype would still apply.  */
6156 char shl_load ();
6157 /* The GNU C library defines this for functions which it implements
6158     to always fail with ENOSYS.  Some functions are actually named
6159     something starting with __ and the normal name is an alias.  */
6160 #if defined (__stub_shl_load) || defined (__stub___shl_load)
6161 choke me
6162 #else
6163 char (*f) () = shl_load;
6164 #endif
6165 #ifdef __cplusplus
6166 }
6167 #endif
6168
6169 int
6170 main ()
6171 {
6172
6173   ;
6174   return 0;
6175 }
6176 _ACEOF
6177 rm -f conftest.$ac_objext conftest$ac_exeext
6178 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6179   (eval $ac_link) 2>&5
6180   ac_status=$?
6181   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6182   (exit $ac_status); } &&
6183          { ac_try='test -s conftest$ac_exeext'
6184   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6185   (eval $ac_try) 2>&5
6186   ac_status=$?
6187   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6188   (exit $ac_status); }; }; then
6189   ac_cv_func_shl_load=yes
6190 else
6191   echo "$as_me: failed program was:" >&5
6192 sed 's/^/| /' conftest.$ac_ext >&5
6193
6194 ac_cv_func_shl_load=no
6195 fi
6196 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6197 fi
6198 echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
6199 echo "${ECHO_T}$ac_cv_func_shl_load" >&6
6200 if test $ac_cv_func_shl_load = yes; then
6201   lt_cv_dlopen="shl_load"
6202 else
6203   echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
6204 echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
6205 if test "${ac_cv_lib_dld_shl_load+set}" = set; then
6206   echo $ECHO_N "(cached) $ECHO_C" >&6
6207 else
6208   ac_check_lib_save_LIBS=$LIBS
6209 LIBS="-ldld  $LIBS"
6210 cat >conftest.$ac_ext <<_ACEOF
6211 #line $LINENO "configure"
6212 /* confdefs.h.  */
6213 _ACEOF
6214 cat confdefs.h >>conftest.$ac_ext
6215 cat >>conftest.$ac_ext <<_ACEOF
6216 /* end confdefs.h.  */
6217
6218 /* Override any gcc2 internal prototype to avoid an error.  */
6219 #ifdef __cplusplus
6220 extern "C"
6221 #endif
6222 /* We use char because int might match the return type of a gcc2
6223    builtin and then its argument prototype would still apply.  */
6224 char shl_load ();
6225 int
6226 main ()
6227 {
6228 shl_load ();
6229   ;
6230   return 0;
6231 }
6232 _ACEOF
6233 rm -f conftest.$ac_objext conftest$ac_exeext
6234 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6235   (eval $ac_link) 2>&5
6236   ac_status=$?
6237   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6238   (exit $ac_status); } &&
6239          { ac_try='test -s conftest$ac_exeext'
6240   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6241   (eval $ac_try) 2>&5
6242   ac_status=$?
6243   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6244   (exit $ac_status); }; }; then
6245   ac_cv_lib_dld_shl_load=yes
6246 else
6247   echo "$as_me: failed program was:" >&5
6248 sed 's/^/| /' conftest.$ac_ext >&5
6249
6250 ac_cv_lib_dld_shl_load=no
6251 fi
6252 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6253 LIBS=$ac_check_lib_save_LIBS
6254 fi
6255 echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
6256 echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
6257 if test $ac_cv_lib_dld_shl_load = yes; then
6258   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
6259 else
6260   echo "$as_me:$LINENO: checking for dlopen" >&5
6261 echo $ECHO_N "checking for dlopen... $ECHO_C" >&6
6262 if test "${ac_cv_func_dlopen+set}" = set; then
6263   echo $ECHO_N "(cached) $ECHO_C" >&6
6264 else
6265   cat >conftest.$ac_ext <<_ACEOF
6266 #line $LINENO "configure"
6267 /* confdefs.h.  */
6268 _ACEOF
6269 cat confdefs.h >>conftest.$ac_ext
6270 cat >>conftest.$ac_ext <<_ACEOF
6271 /* end confdefs.h.  */
6272 /* System header to define __stub macros and hopefully few prototypes,
6273     which can conflict with char dlopen (); below.  */
6274 #include <assert.h>
6275 /* Override any gcc2 internal prototype to avoid an error.  */
6276 #ifdef __cplusplus
6277 extern "C"
6278 {
6279 #endif
6280 /* We use char because int might match the return type of a gcc2
6281    builtin and then its argument prototype would still apply.  */
6282 char dlopen ();
6283 /* The GNU C library defines this for functions which it implements
6284     to always fail with ENOSYS.  Some functions are actually named
6285     something starting with __ and the normal name is an alias.  */
6286 #if defined (__stub_dlopen) || defined (__stub___dlopen)
6287 choke me
6288 #else
6289 char (*f) () = dlopen;
6290 #endif
6291 #ifdef __cplusplus
6292 }
6293 #endif
6294
6295 int
6296 main ()
6297 {
6298
6299   ;
6300   return 0;
6301 }
6302 _ACEOF
6303 rm -f conftest.$ac_objext conftest$ac_exeext
6304 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6305   (eval $ac_link) 2>&5
6306   ac_status=$?
6307   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6308   (exit $ac_status); } &&
6309          { ac_try='test -s conftest$ac_exeext'
6310   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6311   (eval $ac_try) 2>&5
6312   ac_status=$?
6313   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6314   (exit $ac_status); }; }; then
6315   ac_cv_func_dlopen=yes
6316 else
6317   echo "$as_me: failed program was:" >&5
6318 sed 's/^/| /' conftest.$ac_ext >&5
6319
6320 ac_cv_func_dlopen=no
6321 fi
6322 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6323 fi
6324 echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
6325 echo "${ECHO_T}$ac_cv_func_dlopen" >&6
6326 if test $ac_cv_func_dlopen = yes; then
6327   lt_cv_dlopen="dlopen"
6328 else
6329   echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
6330 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
6331 if test "${ac_cv_lib_dl_dlopen+set}" = set; then
6332   echo $ECHO_N "(cached) $ECHO_C" >&6
6333 else
6334   ac_check_lib_save_LIBS=$LIBS
6335 LIBS="-ldl  $LIBS"
6336 cat >conftest.$ac_ext <<_ACEOF
6337 #line $LINENO "configure"
6338 /* confdefs.h.  */
6339 _ACEOF
6340 cat confdefs.h >>conftest.$ac_ext
6341 cat >>conftest.$ac_ext <<_ACEOF
6342 /* end confdefs.h.  */
6343
6344 /* Override any gcc2 internal prototype to avoid an error.  */
6345 #ifdef __cplusplus
6346 extern "C"
6347 #endif
6348 /* We use char because int might match the return type of a gcc2
6349    builtin and then its argument prototype would still apply.  */
6350 char dlopen ();
6351 int
6352 main ()
6353 {
6354 dlopen ();
6355   ;
6356   return 0;
6357 }
6358 _ACEOF
6359 rm -f conftest.$ac_objext conftest$ac_exeext
6360 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6361   (eval $ac_link) 2>&5
6362   ac_status=$?
6363   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6364   (exit $ac_status); } &&
6365          { ac_try='test -s conftest$ac_exeext'
6366   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6367   (eval $ac_try) 2>&5
6368   ac_status=$?
6369   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6370   (exit $ac_status); }; }; then
6371   ac_cv_lib_dl_dlopen=yes
6372 else
6373   echo "$as_me: failed program was:" >&5
6374 sed 's/^/| /' conftest.$ac_ext >&5
6375
6376 ac_cv_lib_dl_dlopen=no
6377 fi
6378 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6379 LIBS=$ac_check_lib_save_LIBS
6380 fi
6381 echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
6382 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
6383 if test $ac_cv_lib_dl_dlopen = yes; then
6384   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
6385 else
6386   echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
6387 echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6
6388 if test "${ac_cv_lib_svld_dlopen+set}" = set; then
6389   echo $ECHO_N "(cached) $ECHO_C" >&6
6390 else
6391   ac_check_lib_save_LIBS=$LIBS
6392 LIBS="-lsvld  $LIBS"
6393 cat >conftest.$ac_ext <<_ACEOF
6394 #line $LINENO "configure"
6395 /* confdefs.h.  */
6396 _ACEOF
6397 cat confdefs.h >>conftest.$ac_ext
6398 cat >>conftest.$ac_ext <<_ACEOF
6399 /* end confdefs.h.  */
6400
6401 /* Override any gcc2 internal prototype to avoid an error.  */
6402 #ifdef __cplusplus
6403 extern "C"
6404 #endif
6405 /* We use char because int might match the return type of a gcc2
6406    builtin and then its argument prototype would still apply.  */
6407 char dlopen ();
6408 int
6409 main ()
6410 {
6411 dlopen ();
6412   ;
6413   return 0;
6414 }
6415 _ACEOF
6416 rm -f conftest.$ac_objext conftest$ac_exeext
6417 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6418   (eval $ac_link) 2>&5
6419   ac_status=$?
6420   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6421   (exit $ac_status); } &&
6422          { ac_try='test -s conftest$ac_exeext'
6423   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6424   (eval $ac_try) 2>&5
6425   ac_status=$?
6426   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6427   (exit $ac_status); }; }; then
6428   ac_cv_lib_svld_dlopen=yes
6429 else
6430   echo "$as_me: failed program was:" >&5
6431 sed 's/^/| /' conftest.$ac_ext >&5
6432
6433 ac_cv_lib_svld_dlopen=no
6434 fi
6435 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6436 LIBS=$ac_check_lib_save_LIBS
6437 fi
6438 echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
6439 echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6
6440 if test $ac_cv_lib_svld_dlopen = yes; then
6441   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
6442 else
6443   echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
6444 echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6
6445 if test "${ac_cv_lib_dld_dld_link+set}" = set; then
6446   echo $ECHO_N "(cached) $ECHO_C" >&6
6447 else
6448   ac_check_lib_save_LIBS=$LIBS
6449 LIBS="-ldld  $LIBS"
6450 cat >conftest.$ac_ext <<_ACEOF
6451 #line $LINENO "configure"
6452 /* confdefs.h.  */
6453 _ACEOF
6454 cat confdefs.h >>conftest.$ac_ext
6455 cat >>conftest.$ac_ext <<_ACEOF
6456 /* end confdefs.h.  */
6457
6458 /* Override any gcc2 internal prototype to avoid an error.  */
6459 #ifdef __cplusplus
6460 extern "C"
6461 #endif
6462 /* We use char because int might match the return type of a gcc2
6463    builtin and then its argument prototype would still apply.  */
6464 char dld_link ();
6465 int
6466 main ()
6467 {
6468 dld_link ();
6469   ;
6470   return 0;
6471 }
6472 _ACEOF
6473 rm -f conftest.$ac_objext conftest$ac_exeext
6474 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6475   (eval $ac_link) 2>&5
6476   ac_status=$?
6477   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6478   (exit $ac_status); } &&
6479          { ac_try='test -s conftest$ac_exeext'
6480   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6481   (eval $ac_try) 2>&5
6482   ac_status=$?
6483   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6484   (exit $ac_status); }; }; then
6485   ac_cv_lib_dld_dld_link=yes
6486 else
6487   echo "$as_me: failed program was:" >&5
6488 sed 's/^/| /' conftest.$ac_ext >&5
6489
6490 ac_cv_lib_dld_dld_link=no
6491 fi
6492 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6493 LIBS=$ac_check_lib_save_LIBS
6494 fi
6495 echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
6496 echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6
6497 if test $ac_cv_lib_dld_dld_link = yes; then
6498   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
6499 fi
6500
6501
6502 fi
6503
6504
6505 fi
6506
6507
6508 fi
6509
6510
6511 fi
6512
6513
6514 fi
6515
6516     ;;
6517   esac
6518
6519   if test "x$lt_cv_dlopen" != xno; then
6520     enable_dlopen=yes
6521   else
6522     enable_dlopen=no
6523   fi
6524
6525   case $lt_cv_dlopen in
6526   dlopen)
6527     save_CPPFLAGS="$CPPFLAGS"
6528         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6529
6530     save_LDFLAGS="$LDFLAGS"
6531     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6532
6533     save_LIBS="$LIBS"
6534     LIBS="$lt_cv_dlopen_libs $LIBS"
6535
6536     echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5
6537 echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6
6538 if test "${lt_cv_dlopen_self+set}" = set; then
6539   echo $ECHO_N "(cached) $ECHO_C" >&6
6540 else
6541           if test "$cross_compiling" = yes; then :
6542   lt_cv_dlopen_self=cross
6543 else
6544     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6545   lt_status=$lt_dlunknown
6546   cat > conftest.$ac_ext <<EOF
6547 #line 6547 "configure"
6548 #include "confdefs.h"
6549
6550 #if HAVE_DLFCN_H
6551 #include <dlfcn.h>
6552 #endif
6553
6554 #include <stdio.h>
6555
6556 #ifdef RTLD_GLOBAL
6557 #  define LT_DLGLOBAL           RTLD_GLOBAL
6558 #else
6559 #  ifdef DL_GLOBAL
6560 #    define LT_DLGLOBAL         DL_GLOBAL
6561 #  else
6562 #    define LT_DLGLOBAL         0
6563 #  endif
6564 #endif
6565
6566 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6567    find out it does not work in some platform. */
6568 #ifndef LT_DLLAZY_OR_NOW
6569 #  ifdef RTLD_LAZY
6570 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6571 #  else
6572 #    ifdef DL_LAZY
6573 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6574 #    else
6575 #      ifdef RTLD_NOW
6576 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6577 #      else
6578 #        ifdef DL_NOW
6579 #          define LT_DLLAZY_OR_NOW      DL_NOW
6580 #        else
6581 #          define LT_DLLAZY_OR_NOW      0
6582 #        endif
6583 #      endif
6584 #    endif
6585 #  endif
6586 #endif
6587
6588 #ifdef __cplusplus
6589 extern "C" void exit (int);
6590 #endif
6591
6592 void fnord() { int i=42;}
6593 int main ()
6594 {
6595   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6596   int status = $lt_dlunknown;
6597
6598   if (self)
6599     {
6600       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
6601       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6602       /* dlclose (self); */
6603     }
6604
6605     exit (status);
6606 }
6607 EOF
6608   if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6609   (eval $ac_link) 2>&5
6610   ac_status=$?
6611   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6612   (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
6613     (./conftest; exit; ) 2>/dev/null
6614     lt_status=$?
6615     case x$lt_status in
6616       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
6617       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
6618       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
6619     esac
6620   else :
6621     # compilation failed
6622     lt_cv_dlopen_self=no
6623   fi
6624 fi
6625 rm -fr conftest*
6626
6627
6628 fi
6629 echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
6630 echo "${ECHO_T}$lt_cv_dlopen_self" >&6
6631
6632     if test "x$lt_cv_dlopen_self" = xyes; then
6633       LDFLAGS="$LDFLAGS $link_static_flag"
6634       echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
6635 echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6
6636 if test "${lt_cv_dlopen_self_static+set}" = set; then
6637   echo $ECHO_N "(cached) $ECHO_C" >&6
6638 else
6639           if test "$cross_compiling" = yes; then :
6640   lt_cv_dlopen_self_static=cross
6641 else
6642     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6643   lt_status=$lt_dlunknown
6644   cat > conftest.$ac_ext <<EOF
6645 #line 6645 "configure"
6646 #include "confdefs.h"
6647
6648 #if HAVE_DLFCN_H
6649 #include <dlfcn.h>
6650 #endif
6651
6652 #include <stdio.h>
6653
6654 #ifdef RTLD_GLOBAL
6655 #  define LT_DLGLOBAL           RTLD_GLOBAL
6656 #else
6657 #  ifdef DL_GLOBAL
6658 #    define LT_DLGLOBAL         DL_GLOBAL
6659 #  else
6660 #    define LT_DLGLOBAL         0
6661 #  endif
6662 #endif
6663
6664 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6665    find out it does not work in some platform. */
6666 #ifndef LT_DLLAZY_OR_NOW
6667 #  ifdef RTLD_LAZY
6668 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6669 #  else
6670 #    ifdef DL_LAZY
6671 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6672 #    else
6673 #      ifdef RTLD_NOW
6674 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6675 #      else
6676 #        ifdef DL_NOW
6677 #          define LT_DLLAZY_OR_NOW      DL_NOW
6678 #        else
6679 #          define LT_DLLAZY_OR_NOW      0
6680 #        endif
6681 #      endif
6682 #    endif
6683 #  endif
6684 #endif
6685
6686 #ifdef __cplusplus
6687 extern "C" void exit (int);
6688 #endif
6689
6690 void fnord() { int i=42;}
6691 int main ()
6692 {
6693   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6694   int status = $lt_dlunknown;
6695
6696   if (self)
6697     {
6698       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
6699       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6700       /* dlclose (self); */
6701     }
6702
6703     exit (status);
6704 }
6705 EOF
6706   if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6707   (eval $ac_link) 2>&5
6708   ac_status=$?
6709   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6710   (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
6711     (./conftest; exit; ) 2>/dev/null
6712     lt_status=$?
6713     case x$lt_status in
6714       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
6715       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
6716       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
6717     esac
6718   else :
6719     # compilation failed
6720     lt_cv_dlopen_self_static=no
6721   fi
6722 fi
6723 rm -fr conftest*
6724
6725
6726 fi
6727 echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
6728 echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6
6729     fi
6730
6731     CPPFLAGS="$save_CPPFLAGS"
6732     LDFLAGS="$save_LDFLAGS"
6733     LIBS="$save_LIBS"
6734     ;;
6735   esac
6736
6737   case $lt_cv_dlopen_self in
6738   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
6739   *) enable_dlopen_self=unknown ;;
6740   esac
6741
6742   case $lt_cv_dlopen_self_static in
6743   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
6744   *) enable_dlopen_self_static=unknown ;;
6745   esac
6746 fi
6747
6748
6749 if test "$enable_shared" = yes && test "$GCC" = yes; then
6750   case $archive_cmds in
6751   *'~'*)
6752     # FIXME: we may have to deal with multi-command sequences.
6753     ;;
6754   '$CC '*)
6755     # Test whether the compiler implicitly links with -lc since on some
6756     # systems, -lgcc has to come before -lc. If gcc already passes -lc
6757     # to ld, don't add -lc before -lgcc.
6758     echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
6759 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
6760     if test "${lt_cv_archive_cmds_need_lc+set}" = set; then
6761   echo $ECHO_N "(cached) $ECHO_C" >&6
6762 else
6763   $rm conftest*
6764     echo 'static int dummy;' > conftest.$ac_ext
6765
6766     if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6767   (eval $ac_compile) 2>&5
6768   ac_status=$?
6769   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6770   (exit $ac_status); }; then
6771       soname=conftest
6772       lib=conftest
6773       libobjs=conftest.$ac_objext
6774       deplibs=
6775       wl=$lt_cv_prog_cc_wl
6776       compiler_flags=-v
6777       linker_flags=-v
6778       verstring=
6779       output_objdir=.
6780       libname=conftest
6781       save_allow_undefined_flag=$allow_undefined_flag
6782       allow_undefined_flag=
6783       if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
6784   (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
6785   ac_status=$?
6786   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6787   (exit $ac_status); }
6788       then
6789         lt_cv_archive_cmds_need_lc=no
6790       else
6791         lt_cv_archive_cmds_need_lc=yes
6792       fi
6793       allow_undefined_flag=$save_allow_undefined_flag
6794     else
6795       cat conftest.err 1>&5
6796     fi
6797 fi
6798
6799     echo "$as_me:$LINENO: result: $lt_cv_archive_cmds_need_lc" >&5
6800 echo "${ECHO_T}$lt_cv_archive_cmds_need_lc" >&6
6801     ;;
6802   esac
6803 fi
6804 need_lc=${lt_cv_archive_cmds_need_lc-yes}
6805
6806 # The second clause should only fire when bootstrapping the
6807 # libtool distribution, otherwise you forgot to ship ltmain.sh
6808 # with your package, and you will get complaints that there are
6809 # no rules to generate ltmain.sh.
6810 if test -f "$ltmain"; then
6811   :
6812 else
6813   # If there is no Makefile yet, we rely on a make rule to execute
6814   # `config.status --recheck' to rerun these tests and create the
6815   # libtool script then.
6816   test -f Makefile && make "$ltmain"
6817 fi
6818
6819 if test -f "$ltmain"; then
6820   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
6821   $rm -f "${ofile}T"
6822
6823   echo creating $ofile
6824
6825   # Now quote all the things that may contain metacharacters while being
6826   # careful not to overquote the AC_SUBSTed values.  We take copies of the
6827   # variables and quote the copies for generation of the libtool script.
6828   for var in echo old_CC old_CFLAGS \
6829     AR AR_FLAGS CC LD LN_S NM SHELL \
6830     reload_flag reload_cmds wl \
6831     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
6832     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
6833     library_names_spec soname_spec \
6834     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
6835     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
6836     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
6837     old_striplib striplib file_magic_cmd export_symbols_cmds \
6838     deplibs_check_method allow_undefined_flag no_undefined_flag \
6839     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
6840     global_symbol_to_c_name_address \
6841     hardcode_libdir_flag_spec hardcode_libdir_separator  \
6842     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
6843     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
6844
6845     case $var in
6846     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
6847     old_postinstall_cmds | old_postuninstall_cmds | \
6848     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
6849     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
6850     postinstall_cmds | postuninstall_cmds | \
6851     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
6852       # Double-quote double-evaled strings.
6853       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
6854       ;;
6855     *)
6856       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
6857       ;;
6858     esac
6859   done
6860
6861   cat <<__EOF__ > "${ofile}T"
6862 #! $SHELL
6863
6864 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
6865 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
6866 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
6867 #
6868 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
6869 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
6870 #
6871 # This program is free software; you can redistribute it and/or modify
6872 # it under the terms of the GNU General Public License as published by
6873 # the Free Software Foundation; either version 2 of the License, or
6874 # (at your option) any later version.
6875 #
6876 # This program is distributed in the hope that it will be useful, but
6877 # WITHOUT ANY WARRANTY; without even the implied warranty of
6878 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
6879 # General Public License for more details.
6880 #
6881 # You should have received a copy of the GNU General Public License
6882 # along with this program; if not, write to the Free Software
6883 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
6884 #
6885 # As a special exception to the GNU General Public License, if you
6886 # distribute this file as part of a program that contains a
6887 # configuration script generated by Autoconf, you may include it under
6888 # the same distribution terms that you use for the rest of that program.
6889
6890 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
6891 Xsed="sed -e s/^X//"
6892
6893 # The HP-UX ksh and POSIX shell print the target directory to stdout
6894 # if CDPATH is set.
6895 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
6896
6897 # ### BEGIN LIBTOOL CONFIG
6898
6899 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
6900
6901 # Shell to use when invoking shell scripts.
6902 SHELL=$lt_SHELL
6903
6904 # Whether or not to build shared libraries.
6905 build_libtool_libs=$enable_shared
6906
6907 # Whether or not to build static libraries.
6908 build_old_libs=$enable_static
6909
6910 # Whether or not to add -lc for building shared libraries.
6911 build_libtool_need_lc=$need_lc
6912
6913 # Whether or not to optimize for fast installation.
6914 fast_install=$enable_fast_install
6915
6916 # The host system.
6917 host_alias=$host_alias
6918 host=$host
6919
6920 # An echo program that does not interpret backslashes.
6921 echo=$lt_echo
6922
6923 # The archiver.
6924 AR=$lt_AR
6925 AR_FLAGS=$lt_AR_FLAGS
6926
6927 # The default C compiler.
6928 CC=$lt_CC
6929
6930 # Is the compiler the GNU C compiler?
6931 with_gcc=$GCC
6932
6933 # The linker used to build libraries.
6934 LD=$lt_LD
6935
6936 # Whether we need hard or soft links.
6937 LN_S=$lt_LN_S
6938
6939 # A BSD-compatible nm program.
6940 NM=$lt_NM
6941
6942 # A symbol stripping program
6943 STRIP=$STRIP
6944
6945 # Used to examine libraries when file_magic_cmd begins "file"
6946 MAGIC_CMD=$MAGIC_CMD
6947
6948 # Used on cygwin: DLL creation program.
6949 DLLTOOL="$DLLTOOL"
6950
6951 # Used on cygwin: object dumper.
6952 OBJDUMP="$OBJDUMP"
6953
6954 # Used on cygwin: assembler.
6955 AS="$AS"
6956
6957 # The name of the directory that contains temporary libtool files.
6958 objdir=$objdir
6959
6960 # How to create reloadable object files.
6961 reload_flag=$lt_reload_flag
6962 reload_cmds=$lt_reload_cmds
6963
6964 # How to pass a linker flag through the compiler.
6965 wl=$lt_wl
6966
6967 # Object file suffix (normally "o").
6968 objext="$ac_objext"
6969
6970 # Old archive suffix (normally "a").
6971 libext="$libext"
6972
6973 # Executable file suffix (normally "").
6974 exeext="$exeext"
6975
6976 # Additional compiler flags for building library objects.
6977 pic_flag=$lt_pic_flag
6978 pic_mode=$pic_mode
6979
6980 # Does compiler simultaneously support -c and -o options?
6981 compiler_c_o=$lt_compiler_c_o
6982
6983 # Can we write directly to a .lo ?
6984 compiler_o_lo=$lt_compiler_o_lo
6985
6986 # Must we lock files when doing compilation ?
6987 need_locks=$lt_need_locks
6988
6989 # Do we need the lib prefix for modules?
6990 need_lib_prefix=$need_lib_prefix
6991
6992 # Do we need a version for libraries?
6993 need_version=$need_version
6994
6995 # Whether dlopen is supported.
6996 dlopen_support=$enable_dlopen
6997
6998 # Whether dlopen of programs is supported.
6999 dlopen_self=$enable_dlopen_self
7000
7001 # Whether dlopen of statically linked programs is supported.
7002 dlopen_self_static=$enable_dlopen_self_static
7003
7004 # Compiler flag to prevent dynamic linking.
7005 link_static_flag=$lt_link_static_flag
7006
7007 # Compiler flag to turn off builtin functions.
7008 no_builtin_flag=$lt_no_builtin_flag
7009
7010 # Compiler flag to allow reflexive dlopens.
7011 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
7012
7013 # Compiler flag to generate shared objects directly from archives.
7014 whole_archive_flag_spec=$lt_whole_archive_flag_spec
7015
7016 # Compiler flag to generate thread-safe objects.
7017 thread_safe_flag_spec=$lt_thread_safe_flag_spec
7018
7019 # Library versioning type.
7020 version_type=$version_type
7021
7022 # Format of library name prefix.
7023 libname_spec=$lt_libname_spec
7024
7025 # List of archive names.  First name is the real one, the rest are links.
7026 # The last name is the one that the linker finds with -lNAME.
7027 library_names_spec=$lt_library_names_spec
7028
7029 # The coded name of the library, if different from the real name.
7030 soname_spec=$lt_soname_spec
7031
7032 # Commands used to build and install an old-style archive.
7033 RANLIB=$lt_RANLIB
7034 old_archive_cmds=$lt_old_archive_cmds
7035 old_postinstall_cmds=$lt_old_postinstall_cmds
7036 old_postuninstall_cmds=$lt_old_postuninstall_cmds
7037
7038 # Create an old-style archive from a shared archive.
7039 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
7040
7041 # Create a temporary old-style archive to link instead of a shared archive.
7042 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
7043
7044 # Commands used to build and install a shared archive.
7045 archive_cmds=$lt_archive_cmds
7046 archive_expsym_cmds=$lt_archive_expsym_cmds
7047 postinstall_cmds=$lt_postinstall_cmds
7048 postuninstall_cmds=$lt_postuninstall_cmds
7049
7050 # Commands to strip libraries.
7051 old_striplib=$lt_old_striplib
7052 striplib=$lt_striplib
7053
7054 # Method to check whether dependent libraries are shared objects.
7055 deplibs_check_method=$lt_deplibs_check_method
7056
7057 # Command to use when deplibs_check_method == file_magic.
7058 file_magic_cmd=$lt_file_magic_cmd
7059
7060 # Flag that allows shared libraries with undefined symbols to be built.
7061 allow_undefined_flag=$lt_allow_undefined_flag
7062
7063 # Flag that forces no undefined symbols.
7064 no_undefined_flag=$lt_no_undefined_flag
7065
7066 # Commands used to finish a libtool library installation in a directory.
7067 finish_cmds=$lt_finish_cmds
7068
7069 # Same as above, but a single script fragment to be evaled but not shown.
7070 finish_eval=$lt_finish_eval
7071
7072 # Take the output of nm and produce a listing of raw symbols and C names.
7073 global_symbol_pipe=$lt_global_symbol_pipe
7074
7075 # Transform the output of nm in a proper C declaration
7076 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
7077
7078 # Transform the output of nm in a C name address pair
7079 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
7080
7081 # This is the shared library runtime path variable.
7082 runpath_var=$runpath_var
7083
7084 # This is the shared library path variable.
7085 shlibpath_var=$shlibpath_var
7086
7087 # Is shlibpath searched before the hard-coded library search path?
7088 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
7089
7090 # How to hardcode a shared library path into an executable.
7091 hardcode_action=$hardcode_action
7092
7093 # Whether we should hardcode library paths into libraries.
7094 hardcode_into_libs=$hardcode_into_libs
7095
7096 # Flag to hardcode \$libdir into a binary during linking.
7097 # This must work even if \$libdir does not exist.
7098 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
7099
7100 # Whether we need a single -rpath flag with a separated argument.
7101 hardcode_libdir_separator=$lt_hardcode_libdir_separator
7102
7103 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
7104 # resulting binary.
7105 hardcode_direct=$hardcode_direct
7106
7107 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7108 # resulting binary.
7109 hardcode_minus_L=$hardcode_minus_L
7110
7111 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7112 # the resulting binary.
7113 hardcode_shlibpath_var=$hardcode_shlibpath_var
7114
7115 # Variables whose values should be saved in libtool wrapper scripts and
7116 # restored at relink time.
7117 variables_saved_for_relink="$variables_saved_for_relink"
7118
7119 # Whether libtool must link a program against all its dependency libraries.
7120 link_all_deplibs=$link_all_deplibs
7121
7122 # Compile-time system search path for libraries
7123 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
7124
7125 # Run-time system search path for libraries
7126 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
7127
7128 # Fix the shell variable \$srcfile for the compiler.
7129 fix_srcfile_path="$fix_srcfile_path"
7130
7131 # Set to yes if exported symbols are required.
7132 always_export_symbols=$always_export_symbols
7133
7134 # The commands to list exported symbols.
7135 export_symbols_cmds=$lt_export_symbols_cmds
7136
7137 # The commands to extract the exported symbol list from a shared archive.
7138 extract_expsyms_cmds=$lt_extract_expsyms_cmds
7139
7140 # Symbols that should not be listed in the preloaded symbols.
7141 exclude_expsyms=$lt_exclude_expsyms
7142
7143 # Symbols that must always be exported.
7144 include_expsyms=$lt_include_expsyms
7145
7146 # ### END LIBTOOL CONFIG
7147
7148 __EOF__
7149
7150   case $host_os in
7151   aix3*)
7152     cat <<\EOF >> "${ofile}T"
7153
7154 # AIX sometimes has problems with the GCC collect2 program.  For some
7155 # reason, if we set the COLLECT_NAMES environment variable, the problems
7156 # vanish in a puff of smoke.
7157 if test "X${COLLECT_NAMES+set}" != Xset; then
7158   COLLECT_NAMES=
7159   export COLLECT_NAMES
7160 fi
7161 EOF
7162     ;;
7163   esac
7164
7165   case $host_os in
7166   cygwin* | mingw* | pw32* | os2*)
7167     cat <<'EOF' >> "${ofile}T"
7168       # This is a source program that is used to create dlls on Windows
7169       # Don't remove nor modify the starting and closing comments
7170 # /* ltdll.c starts here */
7171 # #define WIN32_LEAN_AND_MEAN
7172 # #include <windows.h>
7173 # #undef WIN32_LEAN_AND_MEAN
7174 # #include <stdio.h>
7175 #
7176 # #ifndef __CYGWIN__
7177 # #  ifdef __CYGWIN32__
7178 # #    define __CYGWIN__ __CYGWIN32__
7179 # #  endif
7180 # #endif
7181 #
7182 # #ifdef __cplusplus
7183 # extern "C" {
7184 # #endif
7185 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7186 # #ifdef __cplusplus
7187 # }
7188 # #endif
7189 #
7190 # #ifdef __CYGWIN__
7191 # #include <cygwin/cygwin_dll.h>
7192 # DECLARE_CYGWIN_DLL( DllMain );
7193 # #endif
7194 # HINSTANCE __hDllInstance_base;
7195 #
7196 # BOOL APIENTRY
7197 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7198 # {
7199 #   __hDllInstance_base = hInst;
7200 #   return TRUE;
7201 # }
7202 # /* ltdll.c ends here */
7203         # This is a source program that is used to create import libraries
7204         # on Windows for dlls which lack them. Don't remove nor modify the
7205         # starting and closing comments
7206 # /* impgen.c starts here */
7207 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
7208 #
7209 #  This file is part of GNU libtool.
7210 #
7211 #  This program is free software; you can redistribute it and/or modify
7212 #  it under the terms of the GNU General Public License as published by
7213 #  the Free Software Foundation; either version 2 of the License, or
7214 #  (at your option) any later version.
7215 #
7216 #  This program is distributed in the hope that it will be useful,
7217 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7218 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7219 #  GNU General Public License for more details.
7220 #
7221 #  You should have received a copy of the GNU General Public License
7222 #  along with this program; if not, write to the Free Software
7223 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7224 #  */
7225 #
7226 # #include <stdio.h>            /* for printf() */
7227 # #include <unistd.h>           /* for open(), lseek(), read() */
7228 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
7229 # #include <string.h>           /* for strdup() */
7230 #
7231 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
7232 # #ifndef O_BINARY
7233 # #define O_BINARY 0
7234 # #endif
7235 #
7236 # static unsigned int
7237 # pe_get16 (fd, offset)
7238 #      int fd;
7239 #      int offset;
7240 # {
7241 #   unsigned char b[2];
7242 #   lseek (fd, offset, SEEK_SET);
7243 #   read (fd, b, 2);
7244 #   return b[0] + (b[1]<<8);
7245 # }
7246 #
7247 # static unsigned int
7248 # pe_get32 (fd, offset)
7249 #     int fd;
7250 #     int offset;
7251 # {
7252 #   unsigned char b[4];
7253 #   lseek (fd, offset, SEEK_SET);
7254 #   read (fd, b, 4);
7255 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7256 # }
7257 #
7258 # static unsigned int
7259 # pe_as32 (ptr)
7260 #      void *ptr;
7261 # {
7262 #   unsigned char *b = ptr;
7263 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7264 # }
7265 #
7266 # int
7267 # main (argc, argv)
7268 #     int argc;
7269 #     char *argv[];
7270 # {
7271 #     int dll;
7272 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
7273 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
7274 #     unsigned long name_rvas, nexp;
7275 #     unsigned char *expdata, *erva;
7276 #     char *filename, *dll_name;
7277 #
7278 #     filename = argv[1];
7279 #
7280 #     dll = open(filename, O_RDONLY|O_BINARY);
7281 #     if (dll < 1)
7282 #       return 1;
7283 #
7284 #     dll_name = filename;
7285 #
7286 #     for (i=0; filename[i]; i++)
7287 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
7288 #           dll_name = filename + i +1;
7289 #
7290 #     pe_header_offset = pe_get32 (dll, 0x3c);
7291 #     opthdr_ofs = pe_header_offset + 4 + 20;
7292 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
7293 #
7294 #     if (num_entries < 1) /* no exports */
7295 #       return 1;
7296 #
7297 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
7298 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
7299 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
7300 #     secptr = (pe_header_offset + 4 + 20 +
7301 #             pe_get16 (dll, pe_header_offset + 4 + 16));
7302 #
7303 #     expptr = 0;
7304 #     for (i = 0; i < nsections; i++)
7305 #     {
7306 #       char sname[8];
7307 #       unsigned long secptr1 = secptr + 40 * i;
7308 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
7309 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
7310 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
7311 #       lseek(dll, secptr1, SEEK_SET);
7312 #       read(dll, sname, 8);
7313 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
7314 #       {
7315 #           expptr = fptr + (export_rva - vaddr);
7316 #           if (export_rva + export_size > vaddr + vsize)
7317 #               export_size = vsize - (export_rva - vaddr);
7318 #           break;
7319 #       }
7320 #     }
7321 #
7322 #     expdata = (unsigned char*)malloc(export_size);
7323 #     lseek (dll, expptr, SEEK_SET);
7324 #     read (dll, expdata, export_size);
7325 #     erva = expdata - export_rva;
7326 #
7327 #     nexp = pe_as32 (expdata+24);
7328 #     name_rvas = pe_as32 (expdata+32);
7329 #
7330 #     printf ("EXPORTS\n");
7331 #     for (i = 0; i<nexp; i++)
7332 #     {
7333 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
7334 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
7335 #     }
7336 #
7337 #     return 0;
7338 # }
7339 # /* impgen.c ends here */
7340
7341 EOF
7342     ;;
7343   esac
7344
7345   # We use sed instead of cat because bash on DJGPP gets confused if
7346   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7347   # text mode, it properly converts lines to CR/LF.  This bash problem
7348   # is reportedly fixed, but why not run on old versions too?
7349   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
7350
7351   mv -f "${ofile}T" "$ofile" || \
7352     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
7353   chmod +x "$ofile"
7354 fi
7355
7356
7357
7358
7359
7360 # This can be used to rebuild libtool when needed
7361 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
7362
7363 # Always use our own libtool.
7364 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7365
7366 # Prevent multiple expansion
7367
7368
7369 for ac_prog in 'bison -y' byacc
7370 do
7371   # Extract the first word of "$ac_prog", so it can be a program name with args.
7372 set dummy $ac_prog; ac_word=$2
7373 echo "$as_me:$LINENO: checking for $ac_word" >&5
7374 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7375 if test "${ac_cv_prog_YACC+set}" = set; then
7376   echo $ECHO_N "(cached) $ECHO_C" >&6
7377 else
7378   if test -n "$YACC"; then
7379   ac_cv_prog_YACC="$YACC" # Let the user override the test.
7380 else
7381 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7382 for as_dir in $PATH
7383 do
7384   IFS=$as_save_IFS
7385   test -z "$as_dir" && as_dir=.
7386   for ac_exec_ext in '' $ac_executable_extensions; do
7387   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7388     ac_cv_prog_YACC="$ac_prog"
7389     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7390     break 2
7391   fi
7392 done
7393 done
7394
7395 fi
7396 fi
7397 YACC=$ac_cv_prog_YACC
7398 if test -n "$YACC"; then
7399   echo "$as_me:$LINENO: result: $YACC" >&5
7400 echo "${ECHO_T}$YACC" >&6
7401 else
7402   echo "$as_me:$LINENO: result: no" >&5
7403 echo "${ECHO_T}no" >&6
7404 fi
7405
7406   test -n "$YACC" && break
7407 done
7408 test -n "$YACC" || YACC="yacc"
7409
7410 ac_ext=c
7411 ac_cpp='$CPP $CPPFLAGS'
7412 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7413 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7414 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7415 if test -n "$ac_tool_prefix"; then
7416   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
7417 set dummy ${ac_tool_prefix}gcc; ac_word=$2
7418 echo "$as_me:$LINENO: checking for $ac_word" >&5
7419 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7420 if test "${ac_cv_prog_CC+set}" = set; then
7421   echo $ECHO_N "(cached) $ECHO_C" >&6
7422 else
7423   if test -n "$CC"; then
7424   ac_cv_prog_CC="$CC" # Let the user override the test.
7425 else
7426 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7427 for as_dir in $PATH
7428 do
7429   IFS=$as_save_IFS
7430   test -z "$as_dir" && as_dir=.
7431   for ac_exec_ext in '' $ac_executable_extensions; do
7432   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7433     ac_cv_prog_CC="${ac_tool_prefix}gcc"
7434     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7435     break 2
7436   fi
7437 done
7438 done
7439
7440 fi
7441 fi
7442 CC=$ac_cv_prog_CC
7443 if test -n "$CC"; then
7444   echo "$as_me:$LINENO: result: $CC" >&5
7445 echo "${ECHO_T}$CC" >&6
7446 else
7447   echo "$as_me:$LINENO: result: no" >&5
7448 echo "${ECHO_T}no" >&6
7449 fi
7450
7451 fi
7452 if test -z "$ac_cv_prog_CC"; then
7453   ac_ct_CC=$CC
7454   # Extract the first word of "gcc", so it can be a program name with args.
7455 set dummy gcc; ac_word=$2
7456 echo "$as_me:$LINENO: checking for $ac_word" >&5
7457 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7458 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
7459   echo $ECHO_N "(cached) $ECHO_C" >&6
7460 else
7461   if test -n "$ac_ct_CC"; then
7462   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
7463 else
7464 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7465 for as_dir in $PATH
7466 do
7467   IFS=$as_save_IFS
7468   test -z "$as_dir" && as_dir=.
7469   for ac_exec_ext in '' $ac_executable_extensions; do
7470   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7471     ac_cv_prog_ac_ct_CC="gcc"
7472     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7473     break 2
7474   fi
7475 done
7476 done
7477
7478 fi
7479 fi
7480 ac_ct_CC=$ac_cv_prog_ac_ct_CC
7481 if test -n "$ac_ct_CC"; then
7482   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
7483 echo "${ECHO_T}$ac_ct_CC" >&6
7484 else
7485   echo "$as_me:$LINENO: result: no" >&5
7486 echo "${ECHO_T}no" >&6
7487 fi
7488
7489   CC=$ac_ct_CC
7490 else
7491   CC="$ac_cv_prog_CC"
7492 fi
7493
7494 if test -z "$CC"; then
7495   if test -n "$ac_tool_prefix"; then
7496   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
7497 set dummy ${ac_tool_prefix}cc; ac_word=$2
7498 echo "$as_me:$LINENO: checking for $ac_word" >&5
7499 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7500 if test "${ac_cv_prog_CC+set}" = set; then
7501   echo $ECHO_N "(cached) $ECHO_C" >&6
7502 else
7503   if test -n "$CC"; then
7504   ac_cv_prog_CC="$CC" # Let the user override the test.
7505 else
7506 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7507 for as_dir in $PATH
7508 do
7509   IFS=$as_save_IFS
7510   test -z "$as_dir" && as_dir=.
7511   for ac_exec_ext in '' $ac_executable_extensions; do
7512   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7513     ac_cv_prog_CC="${ac_tool_prefix}cc"
7514     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7515     break 2
7516   fi
7517 done
7518 done
7519
7520 fi
7521 fi
7522 CC=$ac_cv_prog_CC
7523 if test -n "$CC"; then
7524   echo "$as_me:$LINENO: result: $CC" >&5
7525 echo "${ECHO_T}$CC" >&6
7526 else
7527   echo "$as_me:$LINENO: result: no" >&5
7528 echo "${ECHO_T}no" >&6
7529 fi
7530
7531 fi
7532 if test -z "$ac_cv_prog_CC"; then
7533   ac_ct_CC=$CC
7534   # Extract the first word of "cc", so it can be a program name with args.
7535 set dummy cc; ac_word=$2
7536 echo "$as_me:$LINENO: checking for $ac_word" >&5
7537 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7538 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
7539   echo $ECHO_N "(cached) $ECHO_C" >&6
7540 else
7541   if test -n "$ac_ct_CC"; then
7542   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
7543 else
7544 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7545 for as_dir in $PATH
7546 do
7547   IFS=$as_save_IFS
7548   test -z "$as_dir" && as_dir=.
7549   for ac_exec_ext in '' $ac_executable_extensions; do
7550   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7551     ac_cv_prog_ac_ct_CC="cc"
7552     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7553     break 2
7554   fi
7555 done
7556 done
7557
7558 fi
7559 fi
7560 ac_ct_CC=$ac_cv_prog_ac_ct_CC
7561 if test -n "$ac_ct_CC"; then
7562   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
7563 echo "${ECHO_T}$ac_ct_CC" >&6
7564 else
7565   echo "$as_me:$LINENO: result: no" >&5
7566 echo "${ECHO_T}no" >&6
7567 fi
7568
7569   CC=$ac_ct_CC
7570 else
7571   CC="$ac_cv_prog_CC"
7572 fi
7573
7574 fi
7575 if test -z "$CC"; then
7576   # Extract the first word of "cc", so it can be a program name with args.
7577 set dummy cc; ac_word=$2
7578 echo "$as_me:$LINENO: checking for $ac_word" >&5
7579 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7580 if test "${ac_cv_prog_CC+set}" = set; then
7581   echo $ECHO_N "(cached) $ECHO_C" >&6
7582 else
7583   if test -n "$CC"; then
7584   ac_cv_prog_CC="$CC" # Let the user override the test.
7585 else
7586   ac_prog_rejected=no
7587 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7588 for as_dir in $PATH
7589 do
7590   IFS=$as_save_IFS
7591   test -z "$as_dir" && as_dir=.
7592   for ac_exec_ext in '' $ac_executable_extensions; do
7593   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7594     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
7595        ac_prog_rejected=yes
7596        continue
7597      fi
7598     ac_cv_prog_CC="cc"
7599     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7600     break 2
7601   fi
7602 done
7603 done
7604
7605 if test $ac_prog_rejected = yes; then
7606   # We found a bogon in the path, so make sure we never use it.
7607   set dummy $ac_cv_prog_CC
7608   shift
7609   if test $# != 0; then
7610     # We chose a different compiler from the bogus one.
7611     # However, it has the same basename, so the bogon will be chosen
7612     # first if we set CC to just the basename; use the full file name.
7613     shift
7614     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
7615   fi
7616 fi
7617 fi
7618 fi
7619 CC=$ac_cv_prog_CC
7620 if test -n "$CC"; then
7621   echo "$as_me:$LINENO: result: $CC" >&5
7622 echo "${ECHO_T}$CC" >&6
7623 else
7624   echo "$as_me:$LINENO: result: no" >&5
7625 echo "${ECHO_T}no" >&6
7626 fi
7627
7628 fi
7629 if test -z "$CC"; then
7630   if test -n "$ac_tool_prefix"; then
7631   for ac_prog in cl
7632   do
7633     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7634 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7635 echo "$as_me:$LINENO: checking for $ac_word" >&5
7636 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7637 if test "${ac_cv_prog_CC+set}" = set; then
7638   echo $ECHO_N "(cached) $ECHO_C" >&6
7639 else
7640   if test -n "$CC"; then
7641   ac_cv_prog_CC="$CC" # Let the user override the test.
7642 else
7643 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7644 for as_dir in $PATH
7645 do
7646   IFS=$as_save_IFS
7647   test -z "$as_dir" && as_dir=.
7648   for ac_exec_ext in '' $ac_executable_extensions; do
7649   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7650     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
7651     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7652     break 2
7653   fi
7654 done
7655 done
7656
7657 fi
7658 fi
7659 CC=$ac_cv_prog_CC
7660 if test -n "$CC"; then
7661   echo "$as_me:$LINENO: result: $CC" >&5
7662 echo "${ECHO_T}$CC" >&6
7663 else
7664   echo "$as_me:$LINENO: result: no" >&5
7665 echo "${ECHO_T}no" >&6
7666 fi
7667
7668     test -n "$CC" && break
7669   done
7670 fi
7671 if test -z "$CC"; then
7672   ac_ct_CC=$CC
7673   for ac_prog in cl
7674 do
7675   # Extract the first word of "$ac_prog", so it can be a program name with args.
7676 set dummy $ac_prog; ac_word=$2
7677 echo "$as_me:$LINENO: checking for $ac_word" >&5
7678 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7679 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
7680   echo $ECHO_N "(cached) $ECHO_C" >&6
7681 else
7682   if test -n "$ac_ct_CC"; then
7683   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
7684 else
7685 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7686 for as_dir in $PATH
7687 do
7688   IFS=$as_save_IFS
7689   test -z "$as_dir" && as_dir=.
7690   for ac_exec_ext in '' $ac_executable_extensions; do
7691   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7692     ac_cv_prog_ac_ct_CC="$ac_prog"
7693     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7694     break 2
7695   fi
7696 done
7697 done
7698
7699 fi
7700 fi
7701 ac_ct_CC=$ac_cv_prog_ac_ct_CC
7702 if test -n "$ac_ct_CC"; then
7703   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
7704 echo "${ECHO_T}$ac_ct_CC" >&6
7705 else
7706   echo "$as_me:$LINENO: result: no" >&5
7707 echo "${ECHO_T}no" >&6
7708 fi
7709
7710   test -n "$ac_ct_CC" && break
7711 done
7712
7713   CC=$ac_ct_CC
7714 fi
7715
7716 fi
7717
7718
7719 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
7720 See \`config.log' for more details." >&5
7721 echo "$as_me: error: no acceptable C compiler found in \$PATH
7722 See \`config.log' for more details." >&2;}
7723    { (exit 1); exit 1; }; }
7724
7725 # Provide some information about the compiler.
7726 echo "$as_me:$LINENO:" \
7727      "checking for C compiler version" >&5
7728 ac_compiler=`set X $ac_compile; echo $2`
7729 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
7730   (eval $ac_compiler --version </dev/null >&5) 2>&5
7731   ac_status=$?
7732   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7733   (exit $ac_status); }
7734 { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
7735   (eval $ac_compiler -v </dev/null >&5) 2>&5
7736   ac_status=$?
7737   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7738   (exit $ac_status); }
7739 { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
7740   (eval $ac_compiler -V </dev/null >&5) 2>&5
7741   ac_status=$?
7742   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7743   (exit $ac_status); }
7744
7745 echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
7746 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
7747 if test "${ac_cv_c_compiler_gnu+set}" = set; then
7748   echo $ECHO_N "(cached) $ECHO_C" >&6
7749 else
7750   cat >conftest.$ac_ext <<_ACEOF
7751 #line $LINENO "configure"
7752 /* confdefs.h.  */
7753 _ACEOF
7754 cat confdefs.h >>conftest.$ac_ext
7755 cat >>conftest.$ac_ext <<_ACEOF
7756 /* end confdefs.h.  */
7757
7758 int
7759 main ()
7760 {
7761 #ifndef __GNUC__
7762        choke me
7763 #endif
7764
7765   ;
7766   return 0;
7767 }
7768 _ACEOF
7769 rm -f conftest.$ac_objext
7770 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7771   (eval $ac_compile) 2>&5
7772   ac_status=$?
7773   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7774   (exit $ac_status); } &&
7775          { ac_try='test -s conftest.$ac_objext'
7776   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7777   (eval $ac_try) 2>&5
7778   ac_status=$?
7779   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7780   (exit $ac_status); }; }; then
7781   ac_compiler_gnu=yes
7782 else
7783   echo "$as_me: failed program was:" >&5
7784 sed 's/^/| /' conftest.$ac_ext >&5
7785
7786 ac_compiler_gnu=no
7787 fi
7788 rm -f conftest.$ac_objext conftest.$ac_ext
7789 ac_cv_c_compiler_gnu=$ac_compiler_gnu
7790
7791 fi
7792 echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
7793 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
7794 GCC=`test $ac_compiler_gnu = yes && echo yes`
7795 ac_test_CFLAGS=${CFLAGS+set}
7796 ac_save_CFLAGS=$CFLAGS
7797 CFLAGS="-g"
7798 echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
7799 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
7800 if test "${ac_cv_prog_cc_g+set}" = set; then
7801   echo $ECHO_N "(cached) $ECHO_C" >&6
7802 else
7803   cat >conftest.$ac_ext <<_ACEOF
7804 #line $LINENO "configure"
7805 /* confdefs.h.  */
7806 _ACEOF
7807 cat confdefs.h >>conftest.$ac_ext
7808 cat >>conftest.$ac_ext <<_ACEOF
7809 /* end confdefs.h.  */
7810
7811 int
7812 main ()
7813 {
7814
7815   ;
7816   return 0;
7817 }
7818 _ACEOF
7819 rm -f conftest.$ac_objext
7820 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7821   (eval $ac_compile) 2>&5
7822   ac_status=$?
7823   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7824   (exit $ac_status); } &&
7825          { ac_try='test -s conftest.$ac_objext'
7826   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7827   (eval $ac_try) 2>&5
7828   ac_status=$?
7829   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7830   (exit $ac_status); }; }; then
7831   ac_cv_prog_cc_g=yes
7832 else
7833   echo "$as_me: failed program was:" >&5
7834 sed 's/^/| /' conftest.$ac_ext >&5
7835
7836 ac_cv_prog_cc_g=no
7837 fi
7838 rm -f conftest.$ac_objext conftest.$ac_ext
7839 fi
7840 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
7841 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
7842 if test "$ac_test_CFLAGS" = set; then
7843   CFLAGS=$ac_save_CFLAGS
7844 elif test $ac_cv_prog_cc_g = yes; then
7845   if test "$GCC" = yes; then
7846     CFLAGS="-g -O2"
7847   else
7848     CFLAGS="-g"
7849   fi
7850 else
7851   if test "$GCC" = yes; then
7852     CFLAGS="-O2"
7853   else
7854     CFLAGS=
7855   fi
7856 fi
7857 echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
7858 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
7859 if test "${ac_cv_prog_cc_stdc+set}" = set; then
7860   echo $ECHO_N "(cached) $ECHO_C" >&6
7861 else
7862   ac_cv_prog_cc_stdc=no
7863 ac_save_CC=$CC
7864 cat >conftest.$ac_ext <<_ACEOF
7865 #line $LINENO "configure"
7866 /* confdefs.h.  */
7867 _ACEOF
7868 cat confdefs.h >>conftest.$ac_ext
7869 cat >>conftest.$ac_ext <<_ACEOF
7870 /* end confdefs.h.  */
7871 #include <stdarg.h>
7872 #include <stdio.h>
7873 #include <sys/types.h>
7874 #include <sys/stat.h>
7875 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
7876 struct buf { int x; };
7877 FILE * (*rcsopen) (struct buf *, struct stat *, int);
7878 static char *e (p, i)
7879      char **p;
7880      int i;
7881 {
7882   return p[i];
7883 }
7884 static char *f (char * (*g) (char **, int), char **p, ...)
7885 {
7886   char *s;
7887   va_list v;
7888   va_start (v,p);
7889   s = g (p, va_arg (v,int));
7890   va_end (v);
7891   return s;
7892 }
7893 int test (int i, double x);
7894 struct s1 {int (*f) (int a);};
7895 struct s2 {int (*f) (double a);};
7896 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
7897 int argc;
7898 char **argv;
7899 int
7900 main ()
7901 {
7902 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
7903   ;
7904   return 0;
7905 }
7906 _ACEOF
7907 # Don't try gcc -ansi; that turns off useful extensions and
7908 # breaks some systems' header files.
7909 # AIX                   -qlanglvl=ansi
7910 # Ultrix and OSF/1      -std1
7911 # HP-UX 10.20 and later -Ae
7912 # HP-UX older versions  -Aa -D_HPUX_SOURCE
7913 # SVR4                  -Xc -D__EXTENSIONS__
7914 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
7915 do
7916   CC="$ac_save_CC $ac_arg"
7917   rm -f conftest.$ac_objext
7918 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7919   (eval $ac_compile) 2>&5
7920   ac_status=$?
7921   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7922   (exit $ac_status); } &&
7923          { ac_try='test -s conftest.$ac_objext'
7924   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7925   (eval $ac_try) 2>&5
7926   ac_status=$?
7927   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7928   (exit $ac_status); }; }; then
7929   ac_cv_prog_cc_stdc=$ac_arg
7930 break
7931 else
7932   echo "$as_me: failed program was:" >&5
7933 sed 's/^/| /' conftest.$ac_ext >&5
7934
7935 fi
7936 rm -f conftest.$ac_objext
7937 done
7938 rm -f conftest.$ac_ext conftest.$ac_objext
7939 CC=$ac_save_CC
7940
7941 fi
7942
7943 case "x$ac_cv_prog_cc_stdc" in
7944   x|xno)
7945     echo "$as_me:$LINENO: result: none needed" >&5
7946 echo "${ECHO_T}none needed" >&6 ;;
7947   *)
7948     echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
7949 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
7950     CC="$CC $ac_cv_prog_cc_stdc" ;;
7951 esac
7952
7953 # Some people use a C++ compiler to compile C.  Since we use `exit',
7954 # in C++ we need to declare it.  In case someone uses the same compiler
7955 # for both compiling C and C++ we need to have the C++ compiler decide
7956 # the declaration of exit, since it's the most demanding environment.
7957 cat >conftest.$ac_ext <<_ACEOF
7958 #ifndef __cplusplus
7959   choke me
7960 #endif
7961 _ACEOF
7962 rm -f conftest.$ac_objext
7963 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7964   (eval $ac_compile) 2>&5
7965   ac_status=$?
7966   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7967   (exit $ac_status); } &&
7968          { ac_try='test -s conftest.$ac_objext'
7969   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7970   (eval $ac_try) 2>&5
7971   ac_status=$?
7972   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7973   (exit $ac_status); }; }; then
7974   for ac_declaration in \
7975    ''\
7976    '#include <stdlib.h>' \
7977    'extern "C" void std::exit (int) throw (); using std::exit;' \
7978    'extern "C" void std::exit (int); using std::exit;' \
7979    'extern "C" void exit (int) throw ();' \
7980    'extern "C" void exit (int);' \
7981    'void exit (int);'
7982 do
7983   cat >conftest.$ac_ext <<_ACEOF
7984 #line $LINENO "configure"
7985 /* confdefs.h.  */
7986 _ACEOF
7987 cat confdefs.h >>conftest.$ac_ext
7988 cat >>conftest.$ac_ext <<_ACEOF
7989 /* end confdefs.h.  */
7990 #include <stdlib.h>
7991 $ac_declaration
7992 int
7993 main ()
7994 {
7995 exit (42);
7996   ;
7997   return 0;
7998 }
7999 _ACEOF
8000 rm -f conftest.$ac_objext
8001 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8002   (eval $ac_compile) 2>&5
8003   ac_status=$?
8004   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8005   (exit $ac_status); } &&
8006          { ac_try='test -s conftest.$ac_objext'
8007   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8008   (eval $ac_try) 2>&5
8009   ac_status=$?
8010   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8011   (exit $ac_status); }; }; then
8012   :
8013 else
8014   echo "$as_me: failed program was:" >&5
8015 sed 's/^/| /' conftest.$ac_ext >&5
8016
8017 continue
8018 fi
8019 rm -f conftest.$ac_objext conftest.$ac_ext
8020   cat >conftest.$ac_ext <<_ACEOF
8021 #line $LINENO "configure"
8022 /* confdefs.h.  */
8023 _ACEOF
8024 cat confdefs.h >>conftest.$ac_ext
8025 cat >>conftest.$ac_ext <<_ACEOF
8026 /* end confdefs.h.  */
8027 $ac_declaration
8028 int
8029 main ()
8030 {
8031 exit (42);
8032   ;
8033   return 0;
8034 }
8035 _ACEOF
8036 rm -f conftest.$ac_objext
8037 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8038   (eval $ac_compile) 2>&5
8039   ac_status=$?
8040   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8041   (exit $ac_status); } &&
8042          { ac_try='test -s conftest.$ac_objext'
8043   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8044   (eval $ac_try) 2>&5
8045   ac_status=$?
8046   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8047   (exit $ac_status); }; }; then
8048   break
8049 else
8050   echo "$as_me: failed program was:" >&5
8051 sed 's/^/| /' conftest.$ac_ext >&5
8052
8053 fi
8054 rm -f conftest.$ac_objext conftest.$ac_ext
8055 done
8056 rm -f conftest*
8057 if test -n "$ac_declaration"; then
8058   echo '#ifdef __cplusplus' >>confdefs.h
8059   echo $ac_declaration      >>confdefs.h
8060   echo '#endif'             >>confdefs.h
8061 fi
8062
8063 else
8064   echo "$as_me: failed program was:" >&5
8065 sed 's/^/| /' conftest.$ac_ext >&5
8066
8067 fi
8068 rm -f conftest.$ac_objext conftest.$ac_ext
8069 ac_ext=c
8070 ac_cpp='$CPP $CPPFLAGS'
8071 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8072 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8073 ac_compiler_gnu=$ac_cv_c_compiler_gnu
8074
8075 echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
8076 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
8077 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
8078 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
8079   echo $ECHO_N "(cached) $ECHO_C" >&6
8080 else
8081   cat >conftest.make <<\_ACEOF
8082 all:
8083         @echo 'ac_maketemp="$(MAKE)"'
8084 _ACEOF
8085 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
8086 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
8087 if test -n "$ac_maketemp"; then
8088   eval ac_cv_prog_make_${ac_make}_set=yes
8089 else
8090   eval ac_cv_prog_make_${ac_make}_set=no
8091 fi
8092 rm -f conftest.make
8093 fi
8094 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
8095   echo "$as_me:$LINENO: result: yes" >&5
8096 echo "${ECHO_T}yes" >&6
8097   SET_MAKE=
8098 else
8099   echo "$as_me:$LINENO: result: no" >&5
8100 echo "${ECHO_T}no" >&6
8101   SET_MAKE="MAKE=${MAKE-make}"
8102 fi
8103
8104
8105 # Checks for libraries.
8106 # FIXME: Replace `main' with a function in `-lX11':
8107 # AC_CHECK_LIB([X11], [main])
8108 # FIXME: Replace `main' with a function in `-ldl':
8109 # AC_CHECK_LIB([dl], [main])
8110 # FIXME: Replace `main' with a function in `-lefence':
8111 # AC_CHECK_LIB([efence], [main])
8112 # FIXME: Replace `main' with a function in `-lm':
8113 # AC_CHECK_LIB([m], [main])
8114 # FIXME: Replace `main' with a function in `-lproj':
8115 # AC_CHECK_LIB([proj], [main])
8116
8117 # Checks for header files.
8118 echo "$as_me:$LINENO: checking for X" >&5
8119 echo $ECHO_N "checking for X... $ECHO_C" >&6
8120
8121
8122 # Check whether --with-x or --without-x was given.
8123 if test "${with_x+set}" = set; then
8124   withval="$with_x"
8125
8126 fi;
8127 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
8128 if test "x$with_x" = xno; then
8129   # The user explicitly disabled X.
8130   have_x=disabled
8131 else
8132   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
8133     # Both variables are already set.
8134     have_x=yes
8135   else
8136     if test "${ac_cv_have_x+set}" = set; then
8137   echo $ECHO_N "(cached) $ECHO_C" >&6
8138 else
8139   # One or both of the vars are not set, and there is no cached value.
8140 ac_x_includes=no ac_x_libraries=no
8141 rm -fr conftest.dir
8142 if mkdir conftest.dir; then
8143   cd conftest.dir
8144   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
8145   cat >Imakefile <<'_ACEOF'
8146 acfindx:
8147         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
8148 _ACEOF
8149   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
8150     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
8151     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
8152     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
8153     for ac_extension in a so sl; do
8154       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
8155          test -f $ac_im_libdir/libX11.$ac_extension; then
8156         ac_im_usrlibdir=$ac_im_libdir; break
8157       fi
8158     done
8159     # Screen out bogus values from the imake configuration.  They are
8160     # bogus both because they are the default anyway, and because
8161     # using them would break gcc on systems where it needs fixed includes.
8162     case $ac_im_incroot in
8163         /usr/include) ;;
8164         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
8165     esac
8166     case $ac_im_usrlibdir in
8167         /usr/lib | /lib) ;;
8168         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
8169     esac
8170   fi
8171   cd ..
8172   rm -fr conftest.dir
8173 fi
8174
8175 # Standard set of common directories for X headers.
8176 # Check X11 before X11Rn because it is often a symlink to the current release.
8177 ac_x_header_dirs='
8178 /usr/X11/include
8179 /usr/X11R6/include
8180 /usr/X11R5/include
8181 /usr/X11R4/include
8182
8183 /usr/include/X11
8184 /usr/include/X11R6
8185 /usr/include/X11R5
8186 /usr/include/X11R4
8187
8188 /usr/local/X11/include
8189 /usr/local/X11R6/include
8190 /usr/local/X11R5/include
8191 /usr/local/X11R4/include
8192
8193 /usr/local/include/X11
8194 /usr/local/include/X11R6
8195 /usr/local/include/X11R5
8196 /usr/local/include/X11R4
8197
8198 /usr/X386/include
8199 /usr/x386/include
8200 /usr/XFree86/include/X11
8201
8202 /usr/include
8203 /usr/local/include
8204 /usr/unsupported/include
8205 /usr/athena/include
8206 /usr/local/x11r5/include
8207 /usr/lpp/Xamples/include
8208
8209 /usr/openwin/include
8210 /usr/openwin/share/include'
8211
8212 if test "$ac_x_includes" = no; then
8213   # Guess where to find include files, by looking for Intrinsic.h.
8214   # First, try using that file with no special directory specified.
8215   cat >conftest.$ac_ext <<_ACEOF
8216 #line $LINENO "configure"
8217 /* confdefs.h.  */
8218 _ACEOF
8219 cat confdefs.h >>conftest.$ac_ext
8220 cat >>conftest.$ac_ext <<_ACEOF
8221 /* end confdefs.h.  */
8222 #include <X11/Intrinsic.h>
8223 _ACEOF
8224 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8225   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8226   ac_status=$?
8227   grep -v '^ *+' conftest.er1 >conftest.err
8228   rm -f conftest.er1
8229   cat conftest.err >&5
8230   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8231   (exit $ac_status); } >/dev/null; then
8232   if test -s conftest.err; then
8233     ac_cpp_err=$ac_c_preproc_warn_flag
8234   else
8235     ac_cpp_err=
8236   fi
8237 else
8238   ac_cpp_err=yes
8239 fi
8240 if test -z "$ac_cpp_err"; then
8241   # We can compile using X headers with no special include directory.
8242 ac_x_includes=
8243 else
8244   echo "$as_me: failed program was:" >&5
8245 sed 's/^/| /' conftest.$ac_ext >&5
8246
8247   for ac_dir in $ac_x_header_dirs; do
8248   if test -r "$ac_dir/X11/Intrinsic.h"; then
8249     ac_x_includes=$ac_dir
8250     break
8251   fi
8252 done
8253 fi
8254 rm -f conftest.err conftest.$ac_ext
8255 fi # $ac_x_includes = no
8256
8257 if test "$ac_x_libraries" = no; then
8258   # Check for the libraries.
8259   # See if we find them without any special options.
8260   # Don't add to $LIBS permanently.
8261   ac_save_LIBS=$LIBS
8262   LIBS="-lXt $LIBS"
8263   cat >conftest.$ac_ext <<_ACEOF
8264 #line $LINENO "configure"
8265 /* confdefs.h.  */
8266 _ACEOF
8267 cat confdefs.h >>conftest.$ac_ext
8268 cat >>conftest.$ac_ext <<_ACEOF
8269 /* end confdefs.h.  */
8270 #include <X11/Intrinsic.h>
8271 int
8272 main ()
8273 {
8274 XtMalloc (0)
8275   ;
8276   return 0;
8277 }
8278 _ACEOF
8279 rm -f conftest.$ac_objext conftest$ac_exeext
8280 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8281   (eval $ac_link) 2>&5
8282   ac_status=$?
8283   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8284   (exit $ac_status); } &&
8285          { ac_try='test -s conftest$ac_exeext'
8286   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8287   (eval $ac_try) 2>&5
8288   ac_status=$?
8289   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8290   (exit $ac_status); }; }; then
8291   LIBS=$ac_save_LIBS
8292 # We can link X programs with no special library path.
8293 ac_x_libraries=
8294 else
8295   echo "$as_me: failed program was:" >&5
8296 sed 's/^/| /' conftest.$ac_ext >&5
8297
8298 LIBS=$ac_save_LIBS
8299 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
8300 do
8301   # Don't even attempt the hair of trying to link an X program!
8302   for ac_extension in a so sl; do
8303     if test -r $ac_dir/libXt.$ac_extension; then
8304       ac_x_libraries=$ac_dir
8305       break 2
8306     fi
8307   done
8308 done
8309 fi
8310 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8311 fi # $ac_x_libraries = no
8312
8313 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
8314   # Didn't find X anywhere.  Cache the known absence of X.
8315   ac_cv_have_x="have_x=no"
8316 else
8317   # Record where we found X for the cache.
8318   ac_cv_have_x="have_x=yes \
8319                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
8320 fi
8321 fi
8322
8323   fi
8324   eval "$ac_cv_have_x"
8325 fi # $with_x != no
8326
8327 if test "$have_x" != yes; then
8328   echo "$as_me:$LINENO: result: $have_x" >&5
8329 echo "${ECHO_T}$have_x" >&6
8330   no_x=yes
8331 else
8332   # If each of the values was on the command line, it overrides each guess.
8333   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
8334   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
8335   # Update the cache value to reflect the command line values.
8336   ac_cv_have_x="have_x=yes \
8337                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
8338   echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
8339 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
8340 fi
8341
8342 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
8343 # for constant arguments.  Useless!
8344 echo "$as_me:$LINENO: checking for working alloca.h" >&5
8345 echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
8346 if test "${ac_cv_working_alloca_h+set}" = set; then
8347   echo $ECHO_N "(cached) $ECHO_C" >&6
8348 else
8349   cat >conftest.$ac_ext <<_ACEOF
8350 #line $LINENO "configure"
8351 /* confdefs.h.  */
8352 _ACEOF
8353 cat confdefs.h >>conftest.$ac_ext
8354 cat >>conftest.$ac_ext <<_ACEOF
8355 /* end confdefs.h.  */
8356 #include <alloca.h>
8357 int
8358 main ()
8359 {
8360 char *p = (char *) alloca (2 * sizeof (int));
8361   ;
8362   return 0;
8363 }
8364 _ACEOF
8365 rm -f conftest.$ac_objext conftest$ac_exeext
8366 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8367   (eval $ac_link) 2>&5
8368   ac_status=$?
8369   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8370   (exit $ac_status); } &&
8371          { ac_try='test -s conftest$ac_exeext'
8372   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8373   (eval $ac_try) 2>&5
8374   ac_status=$?
8375   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8376   (exit $ac_status); }; }; then
8377   ac_cv_working_alloca_h=yes
8378 else
8379   echo "$as_me: failed program was:" >&5
8380 sed 's/^/| /' conftest.$ac_ext >&5
8381
8382 ac_cv_working_alloca_h=no
8383 fi
8384 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8385 fi
8386 echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
8387 echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
8388 if test $ac_cv_working_alloca_h = yes; then
8389
8390 cat >>confdefs.h <<\_ACEOF
8391 #define HAVE_ALLOCA_H 1
8392 _ACEOF
8393
8394 fi
8395
8396 echo "$as_me:$LINENO: checking for alloca" >&5
8397 echo $ECHO_N "checking for alloca... $ECHO_C" >&6
8398 if test "${ac_cv_func_alloca_works+set}" = set; then
8399   echo $ECHO_N "(cached) $ECHO_C" >&6
8400 else
8401   cat >conftest.$ac_ext <<_ACEOF
8402 #line $LINENO "configure"
8403 /* confdefs.h.  */
8404 _ACEOF
8405 cat confdefs.h >>conftest.$ac_ext
8406 cat >>conftest.$ac_ext <<_ACEOF
8407 /* end confdefs.h.  */
8408 #ifdef __GNUC__
8409 # define alloca __builtin_alloca
8410 #else
8411 # ifdef _MSC_VER
8412 #  include <malloc.h>
8413 #  define alloca _alloca
8414 # else
8415 #  if HAVE_ALLOCA_H
8416 #   include <alloca.h>
8417 #  else
8418 #   ifdef _AIX
8419  #pragma alloca
8420 #   else
8421 #    ifndef alloca /* predefined by HP cc +Olibcalls */
8422 char *alloca ();
8423 #    endif
8424 #   endif
8425 #  endif
8426 # endif
8427 #endif
8428
8429 int
8430 main ()
8431 {
8432 char *p = (char *) alloca (1);
8433   ;
8434   return 0;
8435 }
8436 _ACEOF
8437 rm -f conftest.$ac_objext conftest$ac_exeext
8438 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8439   (eval $ac_link) 2>&5
8440   ac_status=$?
8441   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8442   (exit $ac_status); } &&
8443          { ac_try='test -s conftest$ac_exeext'
8444   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8445   (eval $ac_try) 2>&5
8446   ac_status=$?
8447   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8448   (exit $ac_status); }; }; then
8449   ac_cv_func_alloca_works=yes
8450 else
8451   echo "$as_me: failed program was:" >&5
8452 sed 's/^/| /' conftest.$ac_ext >&5
8453
8454 ac_cv_func_alloca_works=no
8455 fi
8456 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8457 fi
8458 echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
8459 echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
8460
8461 if test $ac_cv_func_alloca_works = yes; then
8462
8463 cat >>confdefs.h <<\_ACEOF
8464 #define HAVE_ALLOCA 1
8465 _ACEOF
8466
8467 else
8468   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
8469 # that cause trouble.  Some versions do not even contain alloca or
8470 # contain a buggy version.  If you still want to use their alloca,
8471 # use ar to extract alloca.o from them instead of compiling alloca.c.
8472
8473 ALLOCA=alloca.$ac_objext
8474
8475 cat >>confdefs.h <<\_ACEOF
8476 #define C_ALLOCA 1
8477 _ACEOF
8478
8479
8480 echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
8481 echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
8482 if test "${ac_cv_os_cray+set}" = set; then
8483   echo $ECHO_N "(cached) $ECHO_C" >&6
8484 else
8485   cat >conftest.$ac_ext <<_ACEOF
8486 #line $LINENO "configure"
8487 /* confdefs.h.  */
8488 _ACEOF
8489 cat confdefs.h >>conftest.$ac_ext
8490 cat >>conftest.$ac_ext <<_ACEOF
8491 /* end confdefs.h.  */
8492 #if defined(CRAY) && ! defined(CRAY2)
8493 webecray
8494 #else
8495 wenotbecray
8496 #endif
8497
8498 _ACEOF
8499 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8500   $EGREP "webecray" >/dev/null 2>&1; then
8501   ac_cv_os_cray=yes
8502 else
8503   ac_cv_os_cray=no
8504 fi
8505 rm -f conftest*
8506
8507 fi
8508 echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
8509 echo "${ECHO_T}$ac_cv_os_cray" >&6
8510 if test $ac_cv_os_cray = yes; then
8511   for ac_func in _getb67 GETB67 getb67; do
8512     as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8513 echo "$as_me:$LINENO: checking for $ac_func" >&5
8514 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8515 if eval "test \"\${$as_ac_var+set}\" = set"; then
8516   echo $ECHO_N "(cached) $ECHO_C" >&6
8517 else
8518   cat >conftest.$ac_ext <<_ACEOF
8519 #line $LINENO "configure"
8520 /* confdefs.h.  */
8521 _ACEOF
8522 cat confdefs.h >>conftest.$ac_ext
8523 cat >>conftest.$ac_ext <<_ACEOF
8524 /* end confdefs.h.  */
8525 /* System header to define __stub macros and hopefully few prototypes,
8526     which can conflict with char $ac_func (); below.  */
8527 #include <assert.h>
8528 /* Override any gcc2 internal prototype to avoid an error.  */
8529 #ifdef __cplusplus
8530 extern "C"
8531 {
8532 #endif
8533 /* We use char because int might match the return type of a gcc2
8534    builtin and then its argument prototype would still apply.  */
8535 char $ac_func ();
8536 /* The GNU C library defines this for functions which it implements
8537     to always fail with ENOSYS.  Some functions are actually named
8538     something starting with __ and the normal name is an alias.  */
8539 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8540 choke me
8541 #else
8542 char (*f) () = $ac_func;
8543 #endif
8544 #ifdef __cplusplus
8545 }
8546 #endif
8547
8548 int
8549 main ()
8550 {
8551
8552   ;
8553   return 0;
8554 }
8555 _ACEOF
8556 rm -f conftest.$ac_objext conftest$ac_exeext
8557 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8558   (eval $ac_link) 2>&5
8559   ac_status=$?
8560   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8561   (exit $ac_status); } &&
8562          { ac_try='test -s conftest$ac_exeext'
8563   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8564   (eval $ac_try) 2>&5
8565   ac_status=$?
8566   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8567   (exit $ac_status); }; }; then
8568   eval "$as_ac_var=yes"
8569 else
8570   echo "$as_me: failed program was:" >&5
8571 sed 's/^/| /' conftest.$ac_ext >&5
8572
8573 eval "$as_ac_var=no"
8574 fi
8575 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8576 fi
8577 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
8578 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8579 if test `eval echo '${'$as_ac_var'}'` = yes; then
8580
8581 cat >>confdefs.h <<_ACEOF
8582 #define CRAY_STACKSEG_END $ac_func
8583 _ACEOF
8584
8585     break
8586 fi
8587
8588   done
8589 fi
8590
8591 echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
8592 echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
8593 if test "${ac_cv_c_stack_direction+set}" = set; then
8594   echo $ECHO_N "(cached) $ECHO_C" >&6
8595 else
8596   if test "$cross_compiling" = yes; then
8597   ac_cv_c_stack_direction=0
8598 else
8599   cat >conftest.$ac_ext <<_ACEOF
8600 #line $LINENO "configure"
8601 /* confdefs.h.  */
8602 _ACEOF
8603 cat confdefs.h >>conftest.$ac_ext
8604 cat >>conftest.$ac_ext <<_ACEOF
8605 /* end confdefs.h.  */
8606 int
8607 find_stack_direction ()
8608 {
8609   static char *addr = 0;
8610   auto char dummy;
8611   if (addr == 0)
8612     {
8613       addr = &dummy;
8614       return find_stack_direction ();
8615     }
8616   else
8617     return (&dummy > addr) ? 1 : -1;
8618 }
8619
8620 int
8621 main ()
8622 {
8623   exit (find_stack_direction () < 0);
8624 }
8625 _ACEOF
8626 rm -f conftest$ac_exeext
8627 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8628   (eval $ac_link) 2>&5
8629   ac_status=$?
8630   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8631   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8632   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8633   (eval $ac_try) 2>&5
8634   ac_status=$?
8635   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8636   (exit $ac_status); }; }; then
8637   ac_cv_c_stack_direction=1
8638 else
8639   echo "$as_me: program exited with status $ac_status" >&5
8640 echo "$as_me: failed program was:" >&5
8641 sed 's/^/| /' conftest.$ac_ext >&5
8642
8643 ( exit $ac_status )
8644 ac_cv_c_stack_direction=-1
8645 fi
8646 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8647 fi
8648 fi
8649 echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
8650 echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
8651
8652 cat >>confdefs.h <<_ACEOF
8653 #define STACK_DIRECTION $ac_cv_c_stack_direction
8654 _ACEOF
8655
8656
8657 fi
8658
8659 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
8660 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
8661 if test "${ac_cv_header_stdc+set}" = set; then
8662   echo $ECHO_N "(cached) $ECHO_C" >&6
8663 else
8664   cat >conftest.$ac_ext <<_ACEOF
8665 #line $LINENO "configure"
8666 /* confdefs.h.  */
8667 _ACEOF
8668 cat confdefs.h >>conftest.$ac_ext
8669 cat >>conftest.$ac_ext <<_ACEOF
8670 /* end confdefs.h.  */
8671 #include <stdlib.h>
8672 #include <stdarg.h>
8673 #include <string.h>
8674 #include <float.h>
8675
8676 int
8677 main ()
8678 {
8679
8680   ;
8681   return 0;
8682 }
8683 _ACEOF
8684 rm -f conftest.$ac_objext
8685 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8686   (eval $ac_compile) 2>&5
8687   ac_status=$?
8688   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8689   (exit $ac_status); } &&
8690          { ac_try='test -s conftest.$ac_objext'
8691   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8692   (eval $ac_try) 2>&5
8693   ac_status=$?
8694   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8695   (exit $ac_status); }; }; then
8696   ac_cv_header_stdc=yes
8697 else
8698   echo "$as_me: failed program was:" >&5
8699 sed 's/^/| /' conftest.$ac_ext >&5
8700
8701 ac_cv_header_stdc=no
8702 fi
8703 rm -f conftest.$ac_objext conftest.$ac_ext
8704
8705 if test $ac_cv_header_stdc = yes; then
8706   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8707   cat >conftest.$ac_ext <<_ACEOF
8708 #line $LINENO "configure"
8709 /* confdefs.h.  */
8710 _ACEOF
8711 cat confdefs.h >>conftest.$ac_ext
8712 cat >>conftest.$ac_ext <<_ACEOF
8713 /* end confdefs.h.  */
8714 #include <string.h>
8715
8716 _ACEOF
8717 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8718   $EGREP "memchr" >/dev/null 2>&1; then
8719   :
8720 else
8721   ac_cv_header_stdc=no
8722 fi
8723 rm -f conftest*
8724
8725 fi
8726
8727 if test $ac_cv_header_stdc = yes; then
8728   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8729   cat >conftest.$ac_ext <<_ACEOF
8730 #line $LINENO "configure"
8731 /* confdefs.h.  */
8732 _ACEOF
8733 cat confdefs.h >>conftest.$ac_ext
8734 cat >>conftest.$ac_ext <<_ACEOF
8735 /* end confdefs.h.  */
8736 #include <stdlib.h>
8737
8738 _ACEOF
8739 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8740   $EGREP "free" >/dev/null 2>&1; then
8741   :
8742 else
8743   ac_cv_header_stdc=no
8744 fi
8745 rm -f conftest*
8746
8747 fi
8748
8749 if test $ac_cv_header_stdc = yes; then
8750   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8751   if test "$cross_compiling" = yes; then
8752   :
8753 else
8754   cat >conftest.$ac_ext <<_ACEOF
8755 #line $LINENO "configure"
8756 /* confdefs.h.  */
8757 _ACEOF
8758 cat confdefs.h >>conftest.$ac_ext
8759 cat >>conftest.$ac_ext <<_ACEOF
8760 /* end confdefs.h.  */
8761 #include <ctype.h>
8762 #if ((' ' & 0x0FF) == 0x020)
8763 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8764 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8765 #else
8766 # define ISLOWER(c) \
8767                    (('a' <= (c) && (c) <= 'i') \
8768                      || ('j' <= (c) && (c) <= 'r') \
8769                      || ('s' <= (c) && (c) <= 'z'))
8770 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8771 #endif
8772
8773 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8774 int
8775 main ()
8776 {
8777   int i;
8778   for (i = 0; i < 256; i++)
8779     if (XOR (islower (i), ISLOWER (i))
8780         || toupper (i) != TOUPPER (i))
8781       exit(2);
8782   exit (0);
8783 }
8784 _ACEOF
8785 rm -f conftest$ac_exeext
8786 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8787   (eval $ac_link) 2>&5
8788   ac_status=$?
8789   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8790   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8791   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8792   (eval $ac_try) 2>&5
8793   ac_status=$?
8794   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8795   (exit $ac_status); }; }; then
8796   :
8797 else
8798   echo "$as_me: program exited with status $ac_status" >&5
8799 echo "$as_me: failed program was:" >&5
8800 sed 's/^/| /' conftest.$ac_ext >&5
8801
8802 ( exit $ac_status )
8803 ac_cv_header_stdc=no
8804 fi
8805 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8806 fi
8807 fi
8808 fi
8809 echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
8810 echo "${ECHO_T}$ac_cv_header_stdc" >&6
8811 if test $ac_cv_header_stdc = yes; then
8812
8813 cat >>confdefs.h <<\_ACEOF
8814 #define STDC_HEADERS 1
8815 _ACEOF
8816
8817 fi
8818
8819
8820
8821
8822
8823
8824
8825
8826 for ac_header in limits.h malloc.h stddef.h stdlib.h string.h strings.h unistd.h
8827 do
8828 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8829 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8830   echo "$as_me:$LINENO: checking for $ac_header" >&5
8831 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8832 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8833   echo $ECHO_N "(cached) $ECHO_C" >&6
8834 fi
8835 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8836 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8837 else
8838   # Is the header compilable?
8839 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8840 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8841 cat >conftest.$ac_ext <<_ACEOF
8842 #line $LINENO "configure"
8843 /* confdefs.h.  */
8844 _ACEOF
8845 cat confdefs.h >>conftest.$ac_ext
8846 cat >>conftest.$ac_ext <<_ACEOF
8847 /* end confdefs.h.  */
8848 $ac_includes_default
8849 #include <$ac_header>
8850 _ACEOF
8851 rm -f conftest.$ac_objext
8852 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8853   (eval $ac_compile) 2>&5
8854   ac_status=$?
8855   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8856   (exit $ac_status); } &&
8857          { ac_try='test -s conftest.$ac_objext'
8858   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8859   (eval $ac_try) 2>&5
8860   ac_status=$?
8861   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8862   (exit $ac_status); }; }; then
8863   ac_header_compiler=yes
8864 else
8865   echo "$as_me: failed program was:" >&5
8866 sed 's/^/| /' conftest.$ac_ext >&5
8867
8868 ac_header_compiler=no
8869 fi
8870 rm -f conftest.$ac_objext conftest.$ac_ext
8871 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8872 echo "${ECHO_T}$ac_header_compiler" >&6
8873
8874 # Is the header present?
8875 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8876 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8877 cat >conftest.$ac_ext <<_ACEOF
8878 #line $LINENO "configure"
8879 /* confdefs.h.  */
8880 _ACEOF
8881 cat confdefs.h >>conftest.$ac_ext
8882 cat >>conftest.$ac_ext <<_ACEOF
8883 /* end confdefs.h.  */
8884 #include <$ac_header>
8885 _ACEOF
8886 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8887   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8888   ac_status=$?
8889   grep -v '^ *+' conftest.er1 >conftest.err
8890   rm -f conftest.er1
8891   cat conftest.err >&5
8892   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8893   (exit $ac_status); } >/dev/null; then
8894   if test -s conftest.err; then
8895     ac_cpp_err=$ac_c_preproc_warn_flag
8896   else
8897     ac_cpp_err=
8898   fi
8899 else
8900   ac_cpp_err=yes
8901 fi
8902 if test -z "$ac_cpp_err"; then
8903   ac_header_preproc=yes
8904 else
8905   echo "$as_me: failed program was:" >&5
8906 sed 's/^/| /' conftest.$ac_ext >&5
8907
8908   ac_header_preproc=no
8909 fi
8910 rm -f conftest.err conftest.$ac_ext
8911 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8912 echo "${ECHO_T}$ac_header_preproc" >&6
8913
8914 # So?  What about this header?
8915 case $ac_header_compiler:$ac_header_preproc in
8916   yes:no )
8917     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8918 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8919     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8920 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8921     (
8922       cat <<\_ASBOX
8923 ## ------------------------------------ ##
8924 ## Report this to bug-autoconf@gnu.org. ##
8925 ## ------------------------------------ ##
8926 _ASBOX
8927     ) |
8928       sed "s/^/$as_me: WARNING:     /" >&2
8929     ;;
8930   no:yes )
8931     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8932 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8933     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
8934 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
8935     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8936 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8937     (
8938       cat <<\_ASBOX
8939 ## ------------------------------------ ##
8940 ## Report this to bug-autoconf@gnu.org. ##
8941 ## ------------------------------------ ##
8942 _ASBOX
8943     ) |
8944       sed "s/^/$as_me: WARNING:     /" >&2
8945     ;;
8946 esac
8947 echo "$as_me:$LINENO: checking for $ac_header" >&5
8948 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8949 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8950   echo $ECHO_N "(cached) $ECHO_C" >&6
8951 else
8952   eval "$as_ac_Header=$ac_header_preproc"
8953 fi
8954 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8955 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8956
8957 fi
8958 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8959   cat >>confdefs.h <<_ACEOF
8960 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8961 _ACEOF
8962
8963 fi
8964
8965 done
8966
8967
8968 # Checks for typedefs, structures, and compiler characteristics.
8969 echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
8970 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
8971 if test "${ac_cv_c_const+set}" = set; then
8972   echo $ECHO_N "(cached) $ECHO_C" >&6
8973 else
8974   cat >conftest.$ac_ext <<_ACEOF
8975 #line $LINENO "configure"
8976 /* confdefs.h.  */
8977 _ACEOF
8978 cat confdefs.h >>conftest.$ac_ext
8979 cat >>conftest.$ac_ext <<_ACEOF
8980 /* end confdefs.h.  */
8981
8982 int
8983 main ()
8984 {
8985 /* FIXME: Include the comments suggested by Paul. */
8986 #ifndef __cplusplus
8987   /* Ultrix mips cc rejects this.  */
8988   typedef int charset[2];
8989   const charset x;
8990   /* SunOS 4.1.1 cc rejects this.  */
8991   char const *const *ccp;
8992   char **p;
8993   /* NEC SVR4.0.2 mips cc rejects this.  */
8994   struct point {int x, y;};
8995   static struct point const zero = {0,0};
8996   /* AIX XL C 1.02.0.0 rejects this.
8997      It does not let you subtract one const X* pointer from another in
8998      an arm of an if-expression whose if-part is not a constant
8999      expression */
9000   const char *g = "string";
9001   ccp = &g + (g ? g-g : 0);
9002   /* HPUX 7.0 cc rejects these. */
9003   ++ccp;
9004   p = (char**) ccp;
9005   ccp = (char const *const *) p;
9006   { /* SCO 3.2v4 cc rejects this.  */
9007     char *t;
9008     char const *s = 0 ? (char *) 0 : (char const *) 0;
9009
9010     *t++ = 0;
9011   }
9012   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
9013     int x[] = {25, 17};
9014     const int *foo = &x[0];
9015     ++foo;
9016   }
9017   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
9018     typedef const int *iptr;
9019     iptr p = 0;
9020     ++p;
9021   }
9022   { /* AIX XL C 1.02.0.0 rejects this saying
9023        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
9024     struct s { int j; const int *ap[3]; };
9025     struct s *b; b->j = 5;
9026   }
9027   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
9028     const int foo = 10;
9029   }
9030 #endif
9031
9032   ;
9033   return 0;
9034 }
9035 _ACEOF
9036 rm -f conftest.$ac_objext
9037 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9038   (eval $ac_compile) 2>&5
9039   ac_status=$?
9040   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9041   (exit $ac_status); } &&
9042          { ac_try='test -s conftest.$ac_objext'
9043   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9044   (eval $ac_try) 2>&5
9045   ac_status=$?
9046   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9047   (exit $ac_status); }; }; then
9048   ac_cv_c_const=yes
9049 else
9050   echo "$as_me: failed program was:" >&5
9051 sed 's/^/| /' conftest.$ac_ext >&5
9052
9053 ac_cv_c_const=no
9054 fi
9055 rm -f conftest.$ac_objext conftest.$ac_ext
9056 fi
9057 echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
9058 echo "${ECHO_T}$ac_cv_c_const" >&6
9059 if test $ac_cv_c_const = no; then
9060
9061 cat >>confdefs.h <<\_ACEOF
9062 #define const
9063 _ACEOF
9064
9065 fi
9066
9067 echo "$as_me:$LINENO: checking for size_t" >&5
9068 echo $ECHO_N "checking for size_t... $ECHO_C" >&6
9069 if test "${ac_cv_type_size_t+set}" = set; then
9070   echo $ECHO_N "(cached) $ECHO_C" >&6
9071 else
9072   cat >conftest.$ac_ext <<_ACEOF
9073 #line $LINENO "configure"
9074 /* confdefs.h.  */
9075 _ACEOF
9076 cat confdefs.h >>conftest.$ac_ext
9077 cat >>conftest.$ac_ext <<_ACEOF
9078 /* end confdefs.h.  */
9079 $ac_includes_default
9080 int
9081 main ()
9082 {
9083 if ((size_t *) 0)
9084   return 0;
9085 if (sizeof (size_t))
9086   return 0;
9087   ;
9088   return 0;
9089 }
9090 _ACEOF
9091 rm -f conftest.$ac_objext
9092 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9093   (eval $ac_compile) 2>&5
9094   ac_status=$?
9095   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9096   (exit $ac_status); } &&
9097          { ac_try='test -s conftest.$ac_objext'
9098   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9099   (eval $ac_try) 2>&5
9100   ac_status=$?
9101   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9102   (exit $ac_status); }; }; then
9103   ac_cv_type_size_t=yes
9104 else
9105   echo "$as_me: failed program was:" >&5
9106 sed 's/^/| /' conftest.$ac_ext >&5
9107
9108 ac_cv_type_size_t=no
9109 fi
9110 rm -f conftest.$ac_objext conftest.$ac_ext
9111 fi
9112 echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
9113 echo "${ECHO_T}$ac_cv_type_size_t" >&6
9114 if test $ac_cv_type_size_t = yes; then
9115   :
9116 else
9117
9118 cat >>confdefs.h <<_ACEOF
9119 #define size_t unsigned
9120 _ACEOF
9121
9122 fi
9123
9124 echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
9125 echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
9126 if test "${ac_cv_struct_tm+set}" = set; then
9127   echo $ECHO_N "(cached) $ECHO_C" >&6
9128 else
9129   cat >conftest.$ac_ext <<_ACEOF
9130 #line $LINENO "configure"
9131 /* confdefs.h.  */
9132 _ACEOF
9133 cat confdefs.h >>conftest.$ac_ext
9134 cat >>conftest.$ac_ext <<_ACEOF
9135 /* end confdefs.h.  */
9136 #include <sys/types.h>
9137 #include <time.h>
9138
9139 int
9140 main ()
9141 {
9142 struct tm *tp; tp->tm_sec;
9143   ;
9144   return 0;
9145 }
9146 _ACEOF
9147 rm -f conftest.$ac_objext
9148 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9149   (eval $ac_compile) 2>&5
9150   ac_status=$?
9151   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9152   (exit $ac_status); } &&
9153          { ac_try='test -s conftest.$ac_objext'
9154   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9155   (eval $ac_try) 2>&5
9156   ac_status=$?
9157   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9158   (exit $ac_status); }; }; then
9159   ac_cv_struct_tm=time.h
9160 else
9161   echo "$as_me: failed program was:" >&5
9162 sed 's/^/| /' conftest.$ac_ext >&5
9163
9164 ac_cv_struct_tm=sys/time.h
9165 fi
9166 rm -f conftest.$ac_objext conftest.$ac_ext
9167 fi
9168 echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
9169 echo "${ECHO_T}$ac_cv_struct_tm" >&6
9170 if test $ac_cv_struct_tm = sys/time.h; then
9171
9172 cat >>confdefs.h <<\_ACEOF
9173 #define TM_IN_SYS_TIME 1
9174 _ACEOF
9175
9176 fi
9177
9178
9179 # Checks for library functions.
9180 echo "$as_me:$LINENO: checking for error_at_line" >&5
9181 echo $ECHO_N "checking for error_at_line... $ECHO_C" >&6
9182 if test "${ac_cv_lib_error_at_line+set}" = set; then
9183   echo $ECHO_N "(cached) $ECHO_C" >&6
9184 else
9185   cat >conftest.$ac_ext <<_ACEOF
9186 #line $LINENO "configure"
9187 /* confdefs.h.  */
9188 _ACEOF
9189 cat confdefs.h >>conftest.$ac_ext
9190 cat >>conftest.$ac_ext <<_ACEOF
9191 /* end confdefs.h.  */
9192
9193 int
9194 main ()
9195 {
9196 error_at_line (0, 0, "", 0, "");
9197   ;
9198   return 0;
9199 }
9200 _ACEOF
9201 rm -f conftest.$ac_objext conftest$ac_exeext
9202 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9203   (eval $ac_link) 2>&5
9204   ac_status=$?
9205   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9206   (exit $ac_status); } &&
9207          { ac_try='test -s conftest$ac_exeext'
9208   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9209   (eval $ac_try) 2>&5
9210   ac_status=$?
9211   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9212   (exit $ac_status); }; }; then
9213   ac_cv_lib_error_at_line=yes
9214 else
9215   echo "$as_me: failed program was:" >&5
9216 sed 's/^/| /' conftest.$ac_ext >&5
9217
9218 ac_cv_lib_error_at_line=no
9219 fi
9220 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9221 fi
9222 echo "$as_me:$LINENO: result: $ac_cv_lib_error_at_line" >&5
9223 echo "${ECHO_T}$ac_cv_lib_error_at_line" >&6
9224 if test $ac_cv_lib_error_at_line = no; then
9225   LIBOBJS="$LIBOBJS error.$ac_objext"
9226 fi
9227
9228
9229 for ac_header in stdlib.h
9230 do
9231 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9232 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9233   echo "$as_me:$LINENO: checking for $ac_header" >&5
9234 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9235 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9236   echo $ECHO_N "(cached) $ECHO_C" >&6
9237 fi
9238 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9239 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9240 else
9241   # Is the header compilable?
9242 echo "$as_me:$LINENO: checking $ac_header usability" >&5
9243 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9244 cat >conftest.$ac_ext <<_ACEOF
9245 #line $LINENO "configure"
9246 /* confdefs.h.  */
9247 _ACEOF
9248 cat confdefs.h >>conftest.$ac_ext
9249 cat >>conftest.$ac_ext <<_ACEOF
9250 /* end confdefs.h.  */
9251 $ac_includes_default
9252 #include <$ac_header>
9253 _ACEOF
9254 rm -f conftest.$ac_objext
9255 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9256   (eval $ac_compile) 2>&5
9257   ac_status=$?
9258   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9259   (exit $ac_status); } &&
9260          { ac_try='test -s conftest.$ac_objext'
9261   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9262   (eval $ac_try) 2>&5
9263   ac_status=$?
9264   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9265   (exit $ac_status); }; }; then
9266   ac_header_compiler=yes
9267 else
9268   echo "$as_me: failed program was:" >&5
9269 sed 's/^/| /' conftest.$ac_ext >&5
9270
9271 ac_header_compiler=no
9272 fi
9273 rm -f conftest.$ac_objext conftest.$ac_ext
9274 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9275 echo "${ECHO_T}$ac_header_compiler" >&6
9276
9277 # Is the header present?
9278 echo "$as_me:$LINENO: checking $ac_header presence" >&5
9279 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9280 cat >conftest.$ac_ext <<_ACEOF
9281 #line $LINENO "configure"
9282 /* confdefs.h.  */
9283 _ACEOF
9284 cat confdefs.h >>conftest.$ac_ext
9285 cat >>conftest.$ac_ext <<_ACEOF
9286 /* end confdefs.h.  */
9287 #include <$ac_header>
9288 _ACEOF
9289 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9290   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9291   ac_status=$?
9292   grep -v '^ *+' conftest.er1 >conftest.err
9293   rm -f conftest.er1
9294   cat conftest.err >&5
9295   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9296   (exit $ac_status); } >/dev/null; then
9297   if test -s conftest.err; then
9298     ac_cpp_err=$ac_c_preproc_warn_flag
9299   else
9300     ac_cpp_err=
9301   fi
9302 else
9303   ac_cpp_err=yes
9304 fi
9305 if test -z "$ac_cpp_err"; then
9306   ac_header_preproc=yes
9307 else
9308   echo "$as_me: failed program was:" >&5
9309 sed 's/^/| /' conftest.$ac_ext >&5
9310
9311   ac_header_preproc=no
9312 fi
9313 rm -f conftest.err conftest.$ac_ext
9314 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9315 echo "${ECHO_T}$ac_header_preproc" >&6
9316
9317 # So?  What about this header?
9318 case $ac_header_compiler:$ac_header_preproc in
9319   yes:no )
9320     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9321 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9322     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9323 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9324     (
9325       cat <<\_ASBOX
9326 ## ------------------------------------ ##
9327 ## Report this to bug-autoconf@gnu.org. ##
9328 ## ------------------------------------ ##
9329 _ASBOX
9330     ) |
9331       sed "s/^/$as_me: WARNING:     /" >&2
9332     ;;
9333   no:yes )
9334     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9335 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9336     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
9337 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
9338     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9339 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9340     (
9341       cat <<\_ASBOX
9342 ## ------------------------------------ ##
9343 ## Report this to bug-autoconf@gnu.org. ##
9344 ## ------------------------------------ ##
9345 _ASBOX
9346     ) |
9347       sed "s/^/$as_me: WARNING:     /" >&2
9348     ;;
9349 esac
9350 echo "$as_me:$LINENO: checking for $ac_header" >&5
9351 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9352 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9353   echo $ECHO_N "(cached) $ECHO_C" >&6
9354 else
9355   eval "$as_ac_Header=$ac_header_preproc"
9356 fi
9357 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9358 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9359
9360 fi
9361 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9362   cat >>confdefs.h <<_ACEOF
9363 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9364 _ACEOF
9365
9366 fi
9367
9368 done
9369
9370 echo "$as_me:$LINENO: checking for GNU libc compatible malloc" >&5
9371 echo $ECHO_N "checking for GNU libc compatible malloc... $ECHO_C" >&6
9372 if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then
9373   echo $ECHO_N "(cached) $ECHO_C" >&6
9374 else
9375   if test "$cross_compiling" = yes; then
9376   ac_cv_func_malloc_0_nonnull=no
9377 else
9378   cat >conftest.$ac_ext <<_ACEOF
9379 #line $LINENO "configure"
9380 /* confdefs.h.  */
9381 _ACEOF
9382 cat confdefs.h >>conftest.$ac_ext
9383 cat >>conftest.$ac_ext <<_ACEOF
9384 /* end confdefs.h.  */
9385 #if STDC_HEADERS || HAVE_STDLIB_H
9386 # include <stdlib.h>
9387 #else
9388 char *malloc ();
9389 #endif
9390
9391 int
9392 main ()
9393 {
9394 exit (malloc (0) ? 0 : 1);
9395   ;
9396   return 0;
9397 }
9398 _ACEOF
9399 rm -f conftest$ac_exeext
9400 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9401   (eval $ac_link) 2>&5
9402   ac_status=$?
9403   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9404   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9405   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9406   (eval $ac_try) 2>&5
9407   ac_status=$?
9408   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9409   (exit $ac_status); }; }; then
9410   ac_cv_func_malloc_0_nonnull=yes
9411 else
9412   echo "$as_me: program exited with status $ac_status" >&5
9413 echo "$as_me: failed program was:" >&5
9414 sed 's/^/| /' conftest.$ac_ext >&5
9415
9416 ( exit $ac_status )
9417 ac_cv_func_malloc_0_nonnull=no
9418 fi
9419 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9420 fi
9421 fi
9422 echo "$as_me:$LINENO: result: $ac_cv_func_malloc_0_nonnull" >&5
9423 echo "${ECHO_T}$ac_cv_func_malloc_0_nonnull" >&6
9424 if test $ac_cv_func_malloc_0_nonnull = yes; then
9425
9426 cat >>confdefs.h <<\_ACEOF
9427 #define HAVE_MALLOC 1
9428 _ACEOF
9429
9430 else
9431   cat >>confdefs.h <<\_ACEOF
9432 #define HAVE_MALLOC 0
9433 _ACEOF
9434
9435    LIBOBJS="$LIBOBJS malloc.$ac_objext"
9436
9437 cat >>confdefs.h <<\_ACEOF
9438 #define malloc rpl_malloc
9439 _ACEOF
9440
9441 fi
9442
9443
9444
9445
9446
9447 for ac_header in stdlib.h unistd.h
9448 do
9449 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9450 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9451   echo "$as_me:$LINENO: checking for $ac_header" >&5
9452 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9453 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9454   echo $ECHO_N "(cached) $ECHO_C" >&6
9455 fi
9456 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9457 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9458 else
9459   # Is the header compilable?
9460 echo "$as_me:$LINENO: checking $ac_header usability" >&5
9461 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9462 cat >conftest.$ac_ext <<_ACEOF
9463 #line $LINENO "configure"
9464 /* confdefs.h.  */
9465 _ACEOF
9466 cat confdefs.h >>conftest.$ac_ext
9467 cat >>conftest.$ac_ext <<_ACEOF
9468 /* end confdefs.h.  */
9469 $ac_includes_default
9470 #include <$ac_header>
9471 _ACEOF
9472 rm -f conftest.$ac_objext
9473 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9474   (eval $ac_compile) 2>&5
9475   ac_status=$?
9476   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9477   (exit $ac_status); } &&
9478          { ac_try='test -s conftest.$ac_objext'
9479   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9480   (eval $ac_try) 2>&5
9481   ac_status=$?
9482   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9483   (exit $ac_status); }; }; then
9484   ac_header_compiler=yes
9485 else
9486   echo "$as_me: failed program was:" >&5
9487 sed 's/^/| /' conftest.$ac_ext >&5
9488
9489 ac_header_compiler=no
9490 fi
9491 rm -f conftest.$ac_objext conftest.$ac_ext
9492 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9493 echo "${ECHO_T}$ac_header_compiler" >&6
9494
9495 # Is the header present?
9496 echo "$as_me:$LINENO: checking $ac_header presence" >&5
9497 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9498 cat >conftest.$ac_ext <<_ACEOF
9499 #line $LINENO "configure"
9500 /* confdefs.h.  */
9501 _ACEOF
9502 cat confdefs.h >>conftest.$ac_ext
9503 cat >>conftest.$ac_ext <<_ACEOF
9504 /* end confdefs.h.  */
9505 #include <$ac_header>
9506 _ACEOF
9507 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9508   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9509   ac_status=$?
9510   grep -v '^ *+' conftest.er1 >conftest.err
9511   rm -f conftest.er1
9512   cat conftest.err >&5
9513   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9514   (exit $ac_status); } >/dev/null; then
9515   if test -s conftest.err; then
9516     ac_cpp_err=$ac_c_preproc_warn_flag
9517   else
9518     ac_cpp_err=
9519   fi
9520 else
9521   ac_cpp_err=yes
9522 fi
9523 if test -z "$ac_cpp_err"; then
9524   ac_header_preproc=yes
9525 else
9526   echo "$as_me: failed program was:" >&5
9527 sed 's/^/| /' conftest.$ac_ext >&5
9528
9529   ac_header_preproc=no
9530 fi
9531 rm -f conftest.err conftest.$ac_ext
9532 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9533 echo "${ECHO_T}$ac_header_preproc" >&6
9534
9535 # So?  What about this header?
9536 case $ac_header_compiler:$ac_header_preproc in
9537   yes:no )
9538     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9539 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9540     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9541 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9542     (
9543       cat <<\_ASBOX
9544 ## ------------------------------------ ##
9545 ## Report this to bug-autoconf@gnu.org. ##
9546 ## ------------------------------------ ##
9547 _ASBOX
9548     ) |
9549       sed "s/^/$as_me: WARNING:     /" >&2
9550     ;;
9551   no:yes )
9552     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9553 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9554     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
9555 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
9556     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9557 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9558     (
9559       cat <<\_ASBOX
9560 ## ------------------------------------ ##
9561 ## Report this to bug-autoconf@gnu.org. ##
9562 ## ------------------------------------ ##
9563 _ASBOX
9564     ) |
9565       sed "s/^/$as_me: WARNING:     /" >&2
9566     ;;
9567 esac
9568 echo "$as_me:$LINENO: checking for $ac_header" >&5
9569 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9570 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9571   echo $ECHO_N "(cached) $ECHO_C" >&6
9572 else
9573   eval "$as_ac_Header=$ac_header_preproc"
9574 fi
9575 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9576 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9577
9578 fi
9579 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9580   cat >>confdefs.h <<_ACEOF
9581 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9582 _ACEOF
9583
9584 fi
9585
9586 done
9587
9588
9589 for ac_func in getpagesize
9590 do
9591 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9592 echo "$as_me:$LINENO: checking for $ac_func" >&5
9593 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9594 if eval "test \"\${$as_ac_var+set}\" = set"; then
9595   echo $ECHO_N "(cached) $ECHO_C" >&6
9596 else
9597   cat >conftest.$ac_ext <<_ACEOF
9598 #line $LINENO "configure"
9599 /* confdefs.h.  */
9600 _ACEOF
9601 cat confdefs.h >>conftest.$ac_ext
9602 cat >>conftest.$ac_ext <<_ACEOF
9603 /* end confdefs.h.  */
9604 /* System header to define __stub macros and hopefully few prototypes,
9605     which can conflict with char $ac_func (); below.  */
9606 #include <assert.h>
9607 /* Override any gcc2 internal prototype to avoid an error.  */
9608 #ifdef __cplusplus
9609 extern "C"
9610 {
9611 #endif
9612 /* We use char because int might match the return type of a gcc2
9613    builtin and then its argument prototype would still apply.  */
9614 char $ac_func ();
9615 /* The GNU C library defines this for functions which it implements
9616     to always fail with ENOSYS.  Some functions are actually named
9617     something starting with __ and the normal name is an alias.  */
9618 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9619 choke me
9620 #else
9621 char (*f) () = $ac_func;
9622 #endif
9623 #ifdef __cplusplus
9624 }
9625 #endif
9626
9627 int
9628 main ()
9629 {
9630
9631   ;
9632   return 0;
9633 }
9634 _ACEOF
9635 rm -f conftest.$ac_objext conftest$ac_exeext
9636 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9637   (eval $ac_link) 2>&5
9638   ac_status=$?
9639   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9640   (exit $ac_status); } &&
9641          { ac_try='test -s conftest$ac_exeext'
9642   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9643   (eval $ac_try) 2>&5
9644   ac_status=$?
9645   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9646   (exit $ac_status); }; }; then
9647   eval "$as_ac_var=yes"
9648 else
9649   echo "$as_me: failed program was:" >&5
9650 sed 's/^/| /' conftest.$ac_ext >&5
9651
9652 eval "$as_ac_var=no"
9653 fi
9654 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9655 fi
9656 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
9657 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9658 if test `eval echo '${'$as_ac_var'}'` = yes; then
9659   cat >>confdefs.h <<_ACEOF
9660 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9661 _ACEOF
9662
9663 fi
9664 done
9665
9666 echo "$as_me:$LINENO: checking for working mmap" >&5
9667 echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
9668 if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
9669   echo $ECHO_N "(cached) $ECHO_C" >&6
9670 else
9671   if test "$cross_compiling" = yes; then
9672   ac_cv_func_mmap_fixed_mapped=no
9673 else
9674   cat >conftest.$ac_ext <<_ACEOF
9675 #line $LINENO "configure"
9676 /* confdefs.h.  */
9677 _ACEOF
9678 cat confdefs.h >>conftest.$ac_ext
9679 cat >>conftest.$ac_ext <<_ACEOF
9680 /* end confdefs.h.  */
9681 $ac_includes_default
9682 /* malloc might have been renamed as rpl_malloc. */
9683 #undef malloc
9684
9685 /* Thanks to Mike Haertel and Jim Avera for this test.
9686    Here is a matrix of mmap possibilities:
9687         mmap private not fixed
9688         mmap private fixed at somewhere currently unmapped
9689         mmap private fixed at somewhere already mapped
9690         mmap shared not fixed
9691         mmap shared fixed at somewhere currently unmapped
9692         mmap shared fixed at somewhere already mapped
9693    For private mappings, we should verify that changes cannot be read()
9694    back from the file, nor mmap's back from the file at a different
9695    address.  (There have been systems where private was not correctly
9696    implemented like the infamous i386 svr4.0, and systems where the
9697    VM page cache was not coherent with the file system buffer cache
9698    like early versions of FreeBSD and possibly contemporary NetBSD.)
9699    For shared mappings, we should conversely verify that changes get
9700    propagated back to all the places they're supposed to be.
9701
9702    Grep wants private fixed already mapped.
9703    The main things grep needs to know about mmap are:
9704    * does it exist and is it safe to write into the mmap'd area
9705    * how to use it (BSD variants)  */
9706
9707 #include <fcntl.h>
9708 #include <sys/mman.h>
9709
9710 #if !STDC_HEADERS && !HAVE_STDLIB_H
9711 char *malloc ();
9712 #endif
9713
9714 /* This mess was copied from the GNU getpagesize.h.  */
9715 #if !HAVE_GETPAGESIZE
9716 /* Assume that all systems that can run configure have sys/param.h.  */
9717 # if !HAVE_SYS_PARAM_H
9718 #  define HAVE_SYS_PARAM_H 1
9719 # endif
9720
9721 # ifdef _SC_PAGESIZE
9722 #  define getpagesize() sysconf(_SC_PAGESIZE)
9723 # else /* no _SC_PAGESIZE */
9724 #  if HAVE_SYS_PARAM_H
9725 #   include <sys/param.h>
9726 #   ifdef EXEC_PAGESIZE
9727 #    define getpagesize() EXEC_PAGESIZE
9728 #   else /* no EXEC_PAGESIZE */
9729 #    ifdef NBPG
9730 #     define getpagesize() NBPG * CLSIZE
9731 #     ifndef CLSIZE
9732 #      define CLSIZE 1
9733 #     endif /* no CLSIZE */
9734 #    else /* no NBPG */
9735 #     ifdef NBPC
9736 #      define getpagesize() NBPC
9737 #     else /* no NBPC */
9738 #      ifdef PAGESIZE
9739 #       define getpagesize() PAGESIZE
9740 #      endif /* PAGESIZE */
9741 #     endif /* no NBPC */
9742 #    endif /* no NBPG */
9743 #   endif /* no EXEC_PAGESIZE */
9744 #  else /* no HAVE_SYS_PARAM_H */
9745 #   define getpagesize() 8192   /* punt totally */
9746 #  endif /* no HAVE_SYS_PARAM_H */
9747 # endif /* no _SC_PAGESIZE */
9748
9749 #endif /* no HAVE_GETPAGESIZE */
9750
9751 int
9752 main ()
9753 {
9754   char *data, *data2, *data3;
9755   int i, pagesize;
9756   int fd;
9757
9758   pagesize = getpagesize ();
9759
9760   /* First, make a file with some known garbage in it. */
9761   data = (char *) malloc (pagesize);
9762   if (!data)
9763     exit (1);
9764   for (i = 0; i < pagesize; ++i)
9765     *(data + i) = rand ();
9766   umask (0);
9767   fd = creat ("conftest.mmap", 0600);
9768   if (fd < 0)
9769     exit (1);
9770   if (write (fd, data, pagesize) != pagesize)
9771     exit (1);
9772   close (fd);
9773
9774   /* Next, try to mmap the file at a fixed address which already has
9775      something else allocated at it.  If we can, also make sure that
9776      we see the same garbage.  */
9777   fd = open ("conftest.mmap", O_RDWR);
9778   if (fd < 0)
9779     exit (1);
9780   data2 = (char *) malloc (2 * pagesize);
9781   if (!data2)
9782     exit (1);
9783   data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
9784   if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
9785                      MAP_PRIVATE | MAP_FIXED, fd, 0L))
9786     exit (1);
9787   for (i = 0; i < pagesize; ++i)
9788     if (*(data + i) != *(data2 + i))
9789       exit (1);
9790
9791   /* Finally, make sure that changes to the mapped area do not
9792      percolate back to the file as seen by read().  (This is a bug on
9793      some variants of i386 svr4.0.)  */
9794   for (i = 0; i < pagesize; ++i)
9795     *(data2 + i) = *(data2 + i) + 1;
9796   data3 = (char *) malloc (pagesize);
9797   if (!data3)
9798     exit (1);
9799   if (read (fd, data3, pagesize) != pagesize)
9800     exit (1);
9801   for (i = 0; i < pagesize; ++i)
9802     if (*(data + i) != *(data3 + i))
9803       exit (1);
9804   close (fd);
9805   exit (0);
9806 }
9807 _ACEOF
9808 rm -f conftest$ac_exeext
9809 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9810   (eval $ac_link) 2>&5
9811   ac_status=$?
9812   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9813   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9814   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9815   (eval $ac_try) 2>&5
9816   ac_status=$?
9817   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9818   (exit $ac_status); }; }; then
9819   ac_cv_func_mmap_fixed_mapped=yes
9820 else
9821   echo "$as_me: program exited with status $ac_status" >&5
9822 echo "$as_me: failed program was:" >&5
9823 sed 's/^/| /' conftest.$ac_ext >&5
9824
9825 ( exit $ac_status )
9826 ac_cv_func_mmap_fixed_mapped=no
9827 fi
9828 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9829 fi
9830 fi
9831 echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
9832 echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
9833 if test $ac_cv_func_mmap_fixed_mapped = yes; then
9834
9835 cat >>confdefs.h <<\_ACEOF
9836 #define HAVE_MMAP 1
9837 _ACEOF
9838
9839 fi
9840 rm -f conftest.mmap
9841
9842 echo "$as_me:$LINENO: checking return type of signal handlers" >&5
9843 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
9844 if test "${ac_cv_type_signal+set}" = set; then
9845   echo $ECHO_N "(cached) $ECHO_C" >&6
9846 else
9847   cat >conftest.$ac_ext <<_ACEOF
9848 #line $LINENO "configure"
9849 /* confdefs.h.  */
9850 _ACEOF
9851 cat confdefs.h >>conftest.$ac_ext
9852 cat >>conftest.$ac_ext <<_ACEOF
9853 /* end confdefs.h.  */
9854 #include <sys/types.h>
9855 #include <signal.h>
9856 #ifdef signal
9857 # undef signal
9858 #endif
9859 #ifdef __cplusplus
9860 extern "C" void (*signal (int, void (*)(int)))(int);
9861 #else
9862 void (*signal ()) ();
9863 #endif
9864
9865 int
9866 main ()
9867 {
9868 int i;
9869   ;
9870   return 0;
9871 }
9872 _ACEOF
9873 rm -f conftest.$ac_objext
9874 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9875   (eval $ac_compile) 2>&5
9876   ac_status=$?
9877   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9878   (exit $ac_status); } &&
9879          { ac_try='test -s conftest.$ac_objext'
9880   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9881   (eval $ac_try) 2>&5
9882   ac_status=$?
9883   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9884   (exit $ac_status); }; }; then
9885   ac_cv_type_signal=void
9886 else
9887   echo "$as_me: failed program was:" >&5
9888 sed 's/^/| /' conftest.$ac_ext >&5
9889
9890 ac_cv_type_signal=int
9891 fi
9892 rm -f conftest.$ac_objext conftest.$ac_ext
9893 fi
9894 echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
9895 echo "${ECHO_T}$ac_cv_type_signal" >&6
9896
9897 cat >>confdefs.h <<_ACEOF
9898 #define RETSIGTYPE $ac_cv_type_signal
9899 _ACEOF
9900
9901
9902 echo "$as_me:$LINENO: checking whether lstat dereferences a symlink specified with a trailing slash" >&5
9903 echo $ECHO_N "checking whether lstat dereferences a symlink specified with a trailing slash... $ECHO_C" >&6
9904 if test "${ac_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then
9905   echo $ECHO_N "(cached) $ECHO_C" >&6
9906 else
9907   rm -f conftest.sym conftest.file
9908 echo >conftest.file
9909 if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then
9910   if test "$cross_compiling" = yes; then
9911   ac_cv_func_lstat_dereferences_slashed_symlink=no
9912 else
9913   cat >conftest.$ac_ext <<_ACEOF
9914 #line $LINENO "configure"
9915 /* confdefs.h.  */
9916 _ACEOF
9917 cat confdefs.h >>conftest.$ac_ext
9918 cat >>conftest.$ac_ext <<_ACEOF
9919 /* end confdefs.h.  */
9920 $ac_includes_default
9921 int
9922 main ()
9923 {
9924 struct stat sbuf;
9925      /* Linux will dereference the symlink and fail.
9926         That is better in the sense that it means we will not
9927         have to compile and use the lstat wrapper.  */
9928      exit (lstat ("conftest.sym/", &sbuf) ? 0 : 1);
9929   ;
9930   return 0;
9931 }
9932 _ACEOF
9933 rm -f conftest$ac_exeext
9934 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9935   (eval $ac_link) 2>&5
9936   ac_status=$?
9937   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9938   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9939   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9940   (eval $ac_try) 2>&5
9941   ac_status=$?
9942   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9943   (exit $ac_status); }; }; then
9944   ac_cv_func_lstat_dereferences_slashed_symlink=yes
9945 else
9946   echo "$as_me: program exited with status $ac_status" >&5
9947 echo "$as_me: failed program was:" >&5
9948 sed 's/^/| /' conftest.$ac_ext >&5
9949
9950 ( exit $ac_status )
9951 ac_cv_func_lstat_dereferences_slashed_symlink=no
9952 fi
9953 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9954 fi
9955 else
9956   # If the `ln -s' command failed, then we probably don't even
9957   # have an lstat function.
9958   ac_cv_func_lstat_dereferences_slashed_symlink=no
9959 fi
9960 rm -f conftest.sym conftest.file
9961
9962 fi
9963 echo "$as_me:$LINENO: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5
9964 echo "${ECHO_T}$ac_cv_func_lstat_dereferences_slashed_symlink" >&6
9965
9966 test $ac_cv_func_lstat_dereferences_slashed_symlink = yes &&
9967
9968 cat >>confdefs.h <<_ACEOF
9969 #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
9970 _ACEOF
9971
9972
9973 if test $ac_cv_func_lstat_dereferences_slashed_symlink = no; then
9974   LIBOBJS="$LIBOBJS lstat.$ac_objext"
9975 fi
9976
9977 echo "$as_me:$LINENO: checking whether stat accepts an empty string" >&5
9978 echo $ECHO_N "checking whether stat accepts an empty string... $ECHO_C" >&6
9979 if test "${ac_cv_func_stat_empty_string_bug+set}" = set; then
9980   echo $ECHO_N "(cached) $ECHO_C" >&6
9981 else
9982   if test "$cross_compiling" = yes; then
9983   ac_cv_func_stat_empty_string_bug=yes
9984 else
9985   cat >conftest.$ac_ext <<_ACEOF
9986 #line $LINENO "configure"
9987 /* confdefs.h.  */
9988 _ACEOF
9989 cat confdefs.h >>conftest.$ac_ext
9990 cat >>conftest.$ac_ext <<_ACEOF
9991 /* end confdefs.h.  */
9992 $ac_includes_default
9993 int
9994 main ()
9995 {
9996 struct stat sbuf;
9997   exit (stat ("", &sbuf) ? 1 : 0);
9998   ;
9999   return 0;
10000 }
10001 _ACEOF
10002 rm -f conftest$ac_exeext
10003 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10004   (eval $ac_link) 2>&5
10005   ac_status=$?
10006   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10007   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10008   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10009   (eval $ac_try) 2>&5
10010   ac_status=$?
10011   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10012   (exit $ac_status); }; }; then
10013   ac_cv_func_stat_empty_string_bug=yes
10014 else
10015   echo "$as_me: program exited with status $ac_status" >&5
10016 echo "$as_me: failed program was:" >&5
10017 sed 's/^/| /' conftest.$ac_ext >&5
10018
10019 ( exit $ac_status )
10020 ac_cv_func_stat_empty_string_bug=no
10021 fi
10022 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10023 fi
10024 fi
10025 echo "$as_me:$LINENO: result: $ac_cv_func_stat_empty_string_bug" >&5
10026 echo "${ECHO_T}$ac_cv_func_stat_empty_string_bug" >&6
10027 if test $ac_cv_func_stat_empty_string_bug = yes; then
10028   LIBOBJS="$LIBOBJS stat.$ac_objext"
10029
10030 cat >>confdefs.h <<_ACEOF
10031 #define HAVE_STAT_EMPTY_STRING_BUG 1
10032 _ACEOF
10033
10034 fi
10035
10036 echo "$as_me:$LINENO: checking for working strtod" >&5
10037 echo $ECHO_N "checking for working strtod... $ECHO_C" >&6
10038 if test "${ac_cv_func_strtod+set}" = set; then
10039   echo $ECHO_N "(cached) $ECHO_C" >&6
10040 else
10041   if test "$cross_compiling" = yes; then
10042   ac_cv_func_strtod=no
10043 else
10044   cat >conftest.$ac_ext <<_ACEOF
10045 #line $LINENO "configure"
10046 /* confdefs.h.  */
10047 _ACEOF
10048 cat confdefs.h >>conftest.$ac_ext
10049 cat >>conftest.$ac_ext <<_ACEOF
10050 /* end confdefs.h.  */
10051
10052 double strtod ();
10053 int
10054 main()
10055 {
10056   {
10057     /* Some versions of Linux strtod mis-parse strings with leading '+'.  */
10058     char *string = " +69";
10059     char *term;
10060     double value;
10061     value = strtod (string, &term);
10062     if (value != 69 || term != (string + 4))
10063       exit (1);
10064   }
10065
10066   {
10067     /* Under Solaris 2.4, strtod returns the wrong value for the
10068        terminating character under some conditions.  */
10069     char *string = "NaN";
10070     char *term;
10071     strtod (string, &term);
10072     if (term != string && *(term - 1) == 0)
10073       exit (1);
10074   }
10075   exit (0);
10076 }
10077
10078 _ACEOF
10079 rm -f conftest$ac_exeext
10080 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10081   (eval $ac_link) 2>&5
10082   ac_status=$?
10083   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10084   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10085   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10086   (eval $ac_try) 2>&5
10087   ac_status=$?
10088   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10089   (exit $ac_status); }; }; then
10090   ac_cv_func_strtod=yes
10091 else
10092   echo "$as_me: program exited with status $ac_status" >&5
10093 echo "$as_me: failed program was:" >&5
10094 sed 's/^/| /' conftest.$ac_ext >&5
10095
10096 ( exit $ac_status )
10097 ac_cv_func_strtod=no
10098 fi
10099 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10100 fi
10101 fi
10102 echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5
10103 echo "${ECHO_T}$ac_cv_func_strtod" >&6
10104 if test $ac_cv_func_strtod = no; then
10105   LIBOBJS="$LIBOBJS strtod.$ac_objext"
10106 echo "$as_me:$LINENO: checking for pow" >&5
10107 echo $ECHO_N "checking for pow... $ECHO_C" >&6
10108 if test "${ac_cv_func_pow+set}" = set; then
10109   echo $ECHO_N "(cached) $ECHO_C" >&6
10110 else
10111   cat >conftest.$ac_ext <<_ACEOF
10112 #line $LINENO "configure"
10113 /* confdefs.h.  */
10114 _ACEOF
10115 cat confdefs.h >>conftest.$ac_ext
10116 cat >>conftest.$ac_ext <<_ACEOF
10117 /* end confdefs.h.  */
10118 /* System header to define __stub macros and hopefully few prototypes,
10119     which can conflict with char pow (); below.  */
10120 #include <assert.h>
10121 /* Override any gcc2 internal prototype to avoid an error.  */
10122 #ifdef __cplusplus
10123 extern "C"
10124 {
10125 #endif
10126 /* We use char because int might match the return type of a gcc2
10127    builtin and then its argument prototype would still apply.  */
10128 char pow ();
10129 /* The GNU C library defines this for functions which it implements
10130     to always fail with ENOSYS.  Some functions are actually named
10131     something starting with __ and the normal name is an alias.  */
10132 #if defined (__stub_pow) || defined (__stub___pow)
10133 choke me
10134 #else
10135 char (*f) () = pow;
10136 #endif
10137 #ifdef __cplusplus
10138 }
10139 #endif
10140
10141 int
10142 main ()
10143 {
10144
10145   ;
10146   return 0;
10147 }
10148 _ACEOF
10149 rm -f conftest.$ac_objext conftest$ac_exeext
10150 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10151   (eval $ac_link) 2>&5
10152   ac_status=$?
10153   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10154   (exit $ac_status); } &&
10155          { ac_try='test -s conftest$ac_exeext'
10156   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10157   (eval $ac_try) 2>&5
10158   ac_status=$?
10159   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10160   (exit $ac_status); }; }; then
10161   ac_cv_func_pow=yes
10162 else
10163   echo "$as_me: failed program was:" >&5
10164 sed 's/^/| /' conftest.$ac_ext >&5
10165
10166 ac_cv_func_pow=no
10167 fi
10168 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10169 fi
10170 echo "$as_me:$LINENO: result: $ac_cv_func_pow" >&5
10171 echo "${ECHO_T}$ac_cv_func_pow" >&6
10172
10173 if test $ac_cv_func_pow = no; then
10174   echo "$as_me:$LINENO: checking for pow in -lm" >&5
10175 echo $ECHO_N "checking for pow in -lm... $ECHO_C" >&6
10176 if test "${ac_cv_lib_m_pow+set}" = set; then
10177   echo $ECHO_N "(cached) $ECHO_C" >&6
10178 else
10179   ac_check_lib_save_LIBS=$LIBS
10180 LIBS="-lm  $LIBS"
10181 cat >conftest.$ac_ext <<_ACEOF
10182 #line $LINENO "configure"
10183 /* confdefs.h.  */
10184 _ACEOF
10185 cat confdefs.h >>conftest.$ac_ext
10186 cat >>conftest.$ac_ext <<_ACEOF
10187 /* end confdefs.h.  */
10188
10189 /* Override any gcc2 internal prototype to avoid an error.  */
10190 #ifdef __cplusplus
10191 extern "C"
10192 #endif
10193 /* We use char because int might match the return type of a gcc2
10194    builtin and then its argument prototype would still apply.  */
10195 char pow ();
10196 int
10197 main ()
10198 {
10199 pow ();
10200   ;
10201   return 0;
10202 }
10203 _ACEOF
10204 rm -f conftest.$ac_objext conftest$ac_exeext
10205 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10206   (eval $ac_link) 2>&5
10207   ac_status=$?
10208   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10209   (exit $ac_status); } &&
10210          { ac_try='test -s conftest$ac_exeext'
10211   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10212   (eval $ac_try) 2>&5
10213   ac_status=$?
10214   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10215   (exit $ac_status); }; }; then
10216   ac_cv_lib_m_pow=yes
10217 else
10218   echo "$as_me: failed program was:" >&5
10219 sed 's/^/| /' conftest.$ac_ext >&5
10220
10221 ac_cv_lib_m_pow=no
10222 fi
10223 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10224 LIBS=$ac_check_lib_save_LIBS
10225 fi
10226 echo "$as_me:$LINENO: result: $ac_cv_lib_m_pow" >&5
10227 echo "${ECHO_T}$ac_cv_lib_m_pow" >&6
10228 if test $ac_cv_lib_m_pow = yes; then
10229   POW_LIB=-lm
10230 else
10231   { echo "$as_me:$LINENO: WARNING: cannot find library containing definition of pow" >&5
10232 echo "$as_me: WARNING: cannot find library containing definition of pow" >&2;}
10233 fi
10234
10235 fi
10236
10237 fi
10238
10239
10240 for ac_func in vprintf
10241 do
10242 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10243 echo "$as_me:$LINENO: checking for $ac_func" >&5
10244 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10245 if eval "test \"\${$as_ac_var+set}\" = set"; then
10246   echo $ECHO_N "(cached) $ECHO_C" >&6
10247 else
10248   cat >conftest.$ac_ext <<_ACEOF
10249 #line $LINENO "configure"
10250 /* confdefs.h.  */
10251 _ACEOF
10252 cat confdefs.h >>conftest.$ac_ext
10253 cat >>conftest.$ac_ext <<_ACEOF
10254 /* end confdefs.h.  */
10255 /* System header to define __stub macros and hopefully few prototypes,
10256     which can conflict with char $ac_func (); below.  */
10257 #include <assert.h>
10258 /* Override any gcc2 internal prototype to avoid an error.  */
10259 #ifdef __cplusplus
10260 extern "C"
10261 {
10262 #endif
10263 /* We use char because int might match the return type of a gcc2
10264    builtin and then its argument prototype would still apply.  */
10265 char $ac_func ();
10266 /* The GNU C library defines this for functions which it implements
10267     to always fail with ENOSYS.  Some functions are actually named
10268     something starting with __ and the normal name is an alias.  */
10269 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10270 choke me
10271 #else
10272 char (*f) () = $ac_func;
10273 #endif
10274 #ifdef __cplusplus
10275 }
10276 #endif
10277
10278 int
10279 main ()
10280 {
10281
10282   ;
10283   return 0;
10284 }
10285 _ACEOF
10286 rm -f conftest.$ac_objext conftest$ac_exeext
10287 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10288   (eval $ac_link) 2>&5
10289   ac_status=$?
10290   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10291   (exit $ac_status); } &&
10292          { ac_try='test -s conftest$ac_exeext'
10293   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10294   (eval $ac_try) 2>&5
10295   ac_status=$?
10296   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10297   (exit $ac_status); }; }; then
10298   eval "$as_ac_var=yes"
10299 else
10300   echo "$as_me: failed program was:" >&5
10301 sed 's/^/| /' conftest.$ac_ext >&5
10302
10303 eval "$as_ac_var=no"
10304 fi
10305 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10306 fi
10307 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10308 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10309 if test `eval echo '${'$as_ac_var'}'` = yes; then
10310   cat >>confdefs.h <<_ACEOF
10311 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10312 _ACEOF
10313
10314 echo "$as_me:$LINENO: checking for _doprnt" >&5
10315 echo $ECHO_N "checking for _doprnt... $ECHO_C" >&6
10316 if test "${ac_cv_func__doprnt+set}" = set; then
10317   echo $ECHO_N "(cached) $ECHO_C" >&6
10318 else
10319   cat >conftest.$ac_ext <<_ACEOF
10320 #line $LINENO "configure"
10321 /* confdefs.h.  */
10322 _ACEOF
10323 cat confdefs.h >>conftest.$ac_ext
10324 cat >>conftest.$ac_ext <<_ACEOF
10325 /* end confdefs.h.  */
10326 /* System header to define __stub macros and hopefully few prototypes,
10327     which can conflict with char _doprnt (); below.  */
10328 #include <assert.h>
10329 /* Override any gcc2 internal prototype to avoid an error.  */
10330 #ifdef __cplusplus
10331 extern "C"
10332 {
10333 #endif
10334 /* We use char because int might match the return type of a gcc2
10335    builtin and then its argument prototype would still apply.  */
10336 char _doprnt ();
10337 /* The GNU C library defines this for functions which it implements
10338     to always fail with ENOSYS.  Some functions are actually named
10339     something starting with __ and the normal name is an alias.  */
10340 #if defined (__stub__doprnt) || defined (__stub____doprnt)
10341 choke me
10342 #else
10343 char (*f) () = _doprnt;
10344 #endif
10345 #ifdef __cplusplus
10346 }
10347 #endif
10348
10349 int
10350 main ()
10351 {
10352
10353   ;
10354   return 0;
10355 }
10356 _ACEOF
10357 rm -f conftest.$ac_objext conftest$ac_exeext
10358 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10359   (eval $ac_link) 2>&5
10360   ac_status=$?
10361   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10362   (exit $ac_status); } &&
10363          { ac_try='test -s conftest$ac_exeext'
10364   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10365   (eval $ac_try) 2>&5
10366   ac_status=$?
10367   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10368   (exit $ac_status); }; }; then
10369   ac_cv_func__doprnt=yes
10370 else
10371   echo "$as_me: failed program was:" >&5
10372 sed 's/^/| /' conftest.$ac_ext >&5
10373
10374 ac_cv_func__doprnt=no
10375 fi
10376 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10377 fi
10378 echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5
10379 echo "${ECHO_T}$ac_cv_func__doprnt" >&6
10380 if test $ac_cv_func__doprnt = yes; then
10381
10382 cat >>confdefs.h <<\_ACEOF
10383 #define HAVE_DOPRNT 1
10384 _ACEOF
10385
10386 fi
10387
10388 fi
10389 done
10390
10391
10392
10393
10394
10395
10396
10397
10398
10399
10400
10401
10402
10403
10404
10405 for ac_func in bzero floor ftruncate memmove memset munmap re_comp regcomp sqrt strchr strdup strrchr strtol
10406 do
10407 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10408 echo "$as_me:$LINENO: checking for $ac_func" >&5
10409 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10410 if eval "test \"\${$as_ac_var+set}\" = set"; then
10411   echo $ECHO_N "(cached) $ECHO_C" >&6
10412 else
10413   cat >conftest.$ac_ext <<_ACEOF
10414 #line $LINENO "configure"
10415 /* confdefs.h.  */
10416 _ACEOF
10417 cat confdefs.h >>conftest.$ac_ext
10418 cat >>conftest.$ac_ext <<_ACEOF
10419 /* end confdefs.h.  */
10420 /* System header to define __stub macros and hopefully few prototypes,
10421     which can conflict with char $ac_func (); below.  */
10422 #include <assert.h>
10423 /* Override any gcc2 internal prototype to avoid an error.  */
10424 #ifdef __cplusplus
10425 extern "C"
10426 {
10427 #endif
10428 /* We use char because int might match the return type of a gcc2
10429    builtin and then its argument prototype would still apply.  */
10430 char $ac_func ();
10431 /* The GNU C library defines this for functions which it implements
10432     to always fail with ENOSYS.  Some functions are actually named
10433     something starting with __ and the normal name is an alias.  */
10434 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10435 choke me
10436 #else
10437 char (*f) () = $ac_func;
10438 #endif
10439 #ifdef __cplusplus
10440 }
10441 #endif
10442
10443 int
10444 main ()
10445 {
10446
10447   ;
10448   return 0;
10449 }
10450 _ACEOF
10451 rm -f conftest.$ac_objext conftest$ac_exeext
10452 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10453   (eval $ac_link) 2>&5
10454   ac_status=$?
10455   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10456   (exit $ac_status); } &&
10457          { ac_try='test -s conftest$ac_exeext'
10458   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10459   (eval $ac_try) 2>&5
10460   ac_status=$?
10461   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10462   (exit $ac_status); }; }; then
10463   eval "$as_ac_var=yes"
10464 else
10465   echo "$as_me: failed program was:" >&5
10466 sed 's/^/| /' conftest.$ac_ext >&5
10467
10468 eval "$as_ac_var=no"
10469 fi
10470 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10471 fi
10472 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10473 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10474 if test `eval echo '${'$as_ac_var'}'` = yes; then
10475   cat >>confdefs.h <<_ACEOF
10476 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10477 _ACEOF
10478
10479 fi
10480 done
10481
10482
10483
10484
10485         FGIS_CONFDIR=$"$sysconfdir"
10486         test "x$prefix" = xNONE && prefix="$ac_default_prefix"
10487         test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
10488         FGIS_CONFDIR=`eval echo $FGIS_CONFDIR`
10489         FGIS_CONFDIR=`eval echo $FGIS_CONFDIR`
10490
10491
10492
10493 cat >>confdefs.h <<_ACEOF
10494 #define FGIS_CONFDIR "$FGIS_CONFDIR"
10495 _ACEOF
10496
10497 FGIS_CONFDIR=$FGIS_CONFDIR
10498
10499
10500
10501
10502         FGIS_LIBDIR=$"$libdir"
10503         test "x$prefix" = xNONE && prefix="$ac_default_prefix"
10504         test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
10505         FGIS_LIBDIR=`eval echo $FGIS_LIBDIR`
10506         FGIS_LIBDIR=`eval echo $FGIS_LIBDIR`
10507
10508
10509 FGIS_LIBDIR=$FGIS_LIBDIR
10510
10511
10512
10513
10514         FGIS_SCRIPTDIR=$"$libdir/fgis/tcl"
10515         test "x$prefix" = xNONE && prefix="$ac_default_prefix"
10516         test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
10517         FGIS_SCRIPTDIR=`eval echo $FGIS_SCRIPTDIR`
10518         FGIS_SCRIPTDIR=`eval echo $FGIS_SCRIPTDIR`
10519
10520
10521 FGIS_SCRIPTDIR=$FGIS_SCRIPTDIR
10522
10523
10524
10525 LIBEPP=../lib/libepp.la
10526
10527
10528
10529
10530 #
10531 # Ok, lets find the tcl source trees so we can use the headers
10532 # Warning: transition of version 9 to 10 will break this algorithm
10533 # because 10 sorts before 9. We also look for just tcl. We have to
10534 # be careful that we don't match stuff like tclX by accident.
10535 # the alternative search directory is involked by --with-tclinclude
10536 #
10537 no_tcl=true
10538 echo "$as_me:$LINENO: checking for Tcl private headers" >&5
10539 echo $ECHO_N "checking for Tcl private headers... $ECHO_C" >&6
10540
10541 # Check whether --with-tclinclude or --without-tclinclude was given.
10542 if test "${with_tclinclude+set}" = set; then
10543   withval="$with_tclinclude"
10544   with_tclinclude=${withval}
10545 fi;
10546 if test "${ac_cv_c_tclh+set}" = set; then
10547   echo $ECHO_N "(cached) $ECHO_C" >&6
10548 else
10549
10550 # first check to see if --with-tclinclude was specified
10551 if test x"${with_tclinclude}" != x ; then
10552   if test -f ${with_tclinclude}/tclInt.h ; then
10553     ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)`
10554   elif test -f ${with_tclinclude}/generic/tclInt.h ; then
10555     ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)`
10556   else
10557     { { echo "$as_me:$LINENO: error: ${with_tclinclude} directory doesn't contain private headers" >&5
10558 echo "$as_me: error: ${with_tclinclude} directory doesn't contain private headers" >&2;}
10559    { (exit 1); exit 1; }; }
10560   fi
10561 fi
10562
10563 # next check if it came with Tcl configuration file
10564 if test x"${ac_cv_c_tclconfig}" != x ; then
10565   if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then
10566     ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/../generic; pwd)`
10567   fi
10568 fi
10569
10570 # next check in private source directory
10571 #
10572 # since ls returns lowest version numbers first, reverse its output
10573 if test x"${ac_cv_c_tclh}" = x ; then
10574   for i in \
10575                 ${srcdir}/../tcl \
10576                 `ls -dr ${srcdir}/../tcl[9].[0-9].[0-9] ${srcdir}/../tcl[9].[0-9] 2>/dev/null` \
10577                 `ls -dr ${srcdir}/../tcl[8].[2-9].[0-9] ${srcdir}/../tcl[8].[2-9] 2>/dev/null` \
10578                 ${srcdir}/../../tcl \
10579                 `ls -dr ${srcdir}/../../tcl[9].[0-9].[0-9] ${srcdir}/../../tcl[9].[0-9] 2>/dev/null` \
10580                 `ls -dr ${srcdir}/../../tcl[8].[2-9].[0-9] ${srcdir}/../../tcl[8].[2-9] 2>/dev/null` \
10581                 ${srcdir}/../../../tcl \
10582                 `ls -dr ${srcdir}/../../../tcl[9].[0-9].[0-9] ${srcdir}/../../../tcl[9].[0-9] 2>/dev/null ` \
10583                 `ls -dr ${srcdir}/../../../tcl[8].[2-9].[0-9] ${srcdir}/../../../tcl[8].[2-9] 2>/dev/null ` ; do
10584     if test -f $i/generic/tclInt.h ; then
10585       ac_cv_c_tclh=`(cd $i/generic; pwd)`
10586       break
10587     fi
10588   done
10589 fi
10590
10591 # check Debian-specific locations
10592 if test x"${ac_cv_c_tclh}" = x ; then
10593   for i in \
10594                 `ls -dr /usr/include/tcl[9].[0-9].[0-9]/tcl-private /usr/include/tcl[9].[0-9]/tcl-private 2>/dev/null` \
10595                 `ls -dr /usr/include/tcl[8].[2-9].[0-9]/tcl-private /usr/include/tcl[8].[2-9]/tcl-private 2>/dev/null`; do
10596     if test -f $i/generic/tclInt.h ; then
10597       ac_cv_c_tclh=`(cd $i/generic; pwd)`
10598       break
10599     fi
10600   done
10601 fi
10602
10603 # finally check in a few common install locations
10604 #
10605 # since ls returns lowest version numbers first, reverse its output
10606 if test x"${ac_cv_c_tclh}" = x ; then
10607   for i in \
10608                 `ls -dr /usr/lib/tcl[9].[0-9].[0-9]/tcl-private /usr/lib/tcl[9].[0-9]/tcl-private 2>/dev/null` \
10609                 `ls -dr /usr/lib/tcl[8].[2-9].[0-9]/tcl-private /usr/lib/tcl[8].[2-9]/tcl-private 2>/dev/null` \
10610                 `ls -dr /usr/local/src/tcl[9].[0-9].[0-9] /usr/local/src/tcl[9].[0-9] 2>/dev/null` \
10611                 `ls -dr /usr/local/src/tcl[8].[2-9].[0-9] /usr/local/src/tcl[8].[2-9] 2>/dev/null` \
10612                 `ls -dr /usr/local/lib/tcl[9].[0-9].[0-9] /usr/local/lib/tcl[9].[0-9] 2>/dev/null` \
10613                 `ls -dr /usr/local/lib/tcl[8].[2-9].[0-9] /usr/local/lib/tcl[8].[2-9] 2>/dev/null` \
10614                 /usr/local/src/tcl \
10615                 /usr/local/lib/tcl \
10616                 ${prefix}/include ; do
10617     if test -f $i/generic/tclInt.h ; then
10618       ac_cv_c_tclh=`(cd $i/generic; pwd)`
10619       break
10620     fi
10621   done
10622 fi
10623 # see if one is installed
10624 if test x"${ac_cv_c_tclh}" = x ; then
10625    if test "${ac_cv_header_tclInt_h+set}" = set; then
10626   echo "$as_me:$LINENO: checking for tclInt.h" >&5
10627 echo $ECHO_N "checking for tclInt.h... $ECHO_C" >&6
10628 if test "${ac_cv_header_tclInt_h+set}" = set; then
10629   echo $ECHO_N "(cached) $ECHO_C" >&6
10630 fi
10631 echo "$as_me:$LINENO: result: $ac_cv_header_tclInt_h" >&5
10632 echo "${ECHO_T}$ac_cv_header_tclInt_h" >&6
10633 else
10634   # Is the header compilable?
10635 echo "$as_me:$LINENO: checking tclInt.h usability" >&5
10636 echo $ECHO_N "checking tclInt.h usability... $ECHO_C" >&6
10637 cat >conftest.$ac_ext <<_ACEOF
10638 #line $LINENO "configure"
10639 /* confdefs.h.  */
10640 _ACEOF
10641 cat confdefs.h >>conftest.$ac_ext
10642 cat >>conftest.$ac_ext <<_ACEOF
10643 /* end confdefs.h.  */
10644 $ac_includes_default
10645 #include <tclInt.h>
10646 _ACEOF
10647 rm -f conftest.$ac_objext
10648 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10649   (eval $ac_compile) 2>&5
10650   ac_status=$?
10651   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10652   (exit $ac_status); } &&
10653          { ac_try='test -s conftest.$ac_objext'
10654   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10655   (eval $ac_try) 2>&5
10656   ac_status=$?
10657   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10658   (exit $ac_status); }; }; then
10659   ac_header_compiler=yes
10660 else
10661   echo "$as_me: failed program was:" >&5
10662 sed 's/^/| /' conftest.$ac_ext >&5
10663
10664 ac_header_compiler=no
10665 fi
10666 rm -f conftest.$ac_objext conftest.$ac_ext
10667 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10668 echo "${ECHO_T}$ac_header_compiler" >&6
10669
10670 # Is the header present?
10671 echo "$as_me:$LINENO: checking tclInt.h presence" >&5
10672 echo $ECHO_N "checking tclInt.h presence... $ECHO_C" >&6
10673 cat >conftest.$ac_ext <<_ACEOF
10674 #line $LINENO "configure"
10675 /* confdefs.h.  */
10676 _ACEOF
10677 cat confdefs.h >>conftest.$ac_ext
10678 cat >>conftest.$ac_ext <<_ACEOF
10679 /* end confdefs.h.  */
10680 #include <tclInt.h>
10681 _ACEOF
10682 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10683   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10684   ac_status=$?
10685   grep -v '^ *+' conftest.er1 >conftest.err
10686   rm -f conftest.er1
10687   cat conftest.err >&5
10688   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10689   (exit $ac_status); } >/dev/null; then
10690   if test -s conftest.err; then
10691     ac_cpp_err=$ac_c_preproc_warn_flag
10692   else
10693     ac_cpp_err=
10694   fi
10695 else
10696   ac_cpp_err=yes
10697 fi
10698 if test -z "$ac_cpp_err"; then
10699   ac_header_preproc=yes
10700 else
10701   echo "$as_me: failed program was:" >&5
10702 sed 's/^/| /' conftest.$ac_ext >&5
10703
10704   ac_header_preproc=no
10705 fi
10706 rm -f conftest.err conftest.$ac_ext
10707 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10708 echo "${ECHO_T}$ac_header_preproc" >&6
10709
10710 # So?  What about this header?
10711 case $ac_header_compiler:$ac_header_preproc in
10712   yes:no )
10713     { echo "$as_me:$LINENO: WARNING: tclInt.h: accepted by the compiler, rejected by the preprocessor!" >&5
10714 echo "$as_me: WARNING: tclInt.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10715     { echo "$as_me:$LINENO: WARNING: tclInt.h: proceeding with the preprocessor's result" >&5
10716 echo "$as_me: WARNING: tclInt.h: proceeding with the preprocessor's result" >&2;}
10717     (
10718       cat <<\_ASBOX
10719 ## ------------------------------------ ##
10720 ## Report this to bug-autoconf@gnu.org. ##
10721 ## ------------------------------------ ##
10722 _ASBOX
10723     ) |
10724       sed "s/^/$as_me: WARNING:     /" >&2
10725     ;;
10726   no:yes )
10727     { echo "$as_me:$LINENO: WARNING: tclInt.h: present but cannot be compiled" >&5
10728 echo "$as_me: WARNING: tclInt.h: present but cannot be compiled" >&2;}
10729     { echo "$as_me:$LINENO: WARNING: tclInt.h: check for missing prerequisite headers?" >&5
10730 echo "$as_me: WARNING: tclInt.h: check for missing prerequisite headers?" >&2;}
10731     { echo "$as_me:$LINENO: WARNING: tclInt.h: proceeding with the preprocessor's result" >&5
10732 echo "$as_me: WARNING: tclInt.h: proceeding with the preprocessor's result" >&2;}
10733     (
10734       cat <<\_ASBOX
10735 ## ------------------------------------ ##
10736 ## Report this to bug-autoconf@gnu.org. ##
10737 ## ------------------------------------ ##
10738 _ASBOX
10739     ) |
10740       sed "s/^/$as_me: WARNING:     /" >&2
10741     ;;
10742 esac
10743 echo "$as_me:$LINENO: checking for tclInt.h" >&5
10744 echo $ECHO_N "checking for tclInt.h... $ECHO_C" >&6
10745 if test "${ac_cv_header_tclInt_h+set}" = set; then
10746   echo $ECHO_N "(cached) $ECHO_C" >&6
10747 else
10748   ac_cv_header_tclInt_h=$ac_header_preproc
10749 fi
10750 echo "$as_me:$LINENO: result: $ac_cv_header_tclInt_h" >&5
10751 echo "${ECHO_T}$ac_cv_header_tclInt_h" >&6
10752
10753 fi
10754 if test $ac_cv_header_tclInt_h = yes; then
10755   ac_cv_c_tclh=installed
10756 else
10757   ac_cv_c_tclh=""
10758 fi
10759
10760
10761 fi
10762
10763 fi
10764
10765 if test x"${ac_cv_c_tclh}" = x ; then
10766   TCLHDIR="# no Tcl private headers found"
10767   TCLHDIRDASHI="# no Tcl private headers found"
10768   { { echo "$as_me:$LINENO: error: Can't find Tcl private headers" >&5
10769 echo "$as_me: error: Can't find Tcl private headers" >&2;}
10770    { (exit 1); exit 1; }; }
10771 fi
10772 if test x"${ac_cv_c_tclh}" != x ; then
10773   no_tcl=""
10774   if test x"${ac_cv_c_tclh}" = x"installed" ; then
10775     echo "$as_me:$LINENO: result: is installed" >&5
10776 echo "${ECHO_T}is installed" >&6
10777     TCLHDIR=""
10778     TCLHDIRDASHI=""
10779     TCL_LIBRARY=""
10780   else
10781     echo "$as_me:$LINENO: result: found in ${ac_cv_c_tclh}" >&5
10782 echo "${ECHO_T}found in ${ac_cv_c_tclh}" >&6
10783     # this hack is cause the TCLHDIR won't print if there is a "-I" in it.
10784     TCLHDIR="${ac_cv_c_tclh}"
10785     TCLHDIRDASHI="-I${ac_cv_c_tclh}"
10786     TCL_LIBRARY=`echo $TCLHDIR | sed -e 's/generic//'`library
10787   fi
10788 fi
10789
10790
10791
10792
10793
10794
10795 tcl_missing_msg="
10796         ERROR: Can't find Tcl headers or library. See README for information
10797         on how to obtain Tcl. If Tcl is installed, see INSTALL on how to tell
10798         configure where Tcl is installed.
10799 "
10800
10801 if test x"$no_tcl" = x"true" ; then
10802         { { echo "$as_me:$LINENO: error: $tcl_missing_msg" >&5
10803 echo "$as_me: error: $tcl_missing_msg" >&2;}
10804    { (exit 1); exit 1; }; }
10805 fi
10806
10807 #
10808 # Ok, lets find the tcl configuration
10809 # First, look for one uninstalled.
10810 # the alternative search directory is invoked by --with-tcl
10811 #
10812
10813 if test x"${no_tcl}" = x ; then
10814   # we reset no_tcl in case something fails here
10815   no_tcl=true
10816
10817 # Check whether --with-tcl or --without-tcl was given.
10818 if test "${with_tcl+set}" = set; then
10819   withval="$with_tcl"
10820   with_tclconfig=${withval}
10821 fi;
10822   echo "$as_me:$LINENO: checking for Tcl configuration" >&5
10823 echo $ECHO_N "checking for Tcl configuration... $ECHO_C" >&6
10824   if test "${ac_cv_c_tclconfig+set}" = set; then
10825   echo $ECHO_N "(cached) $ECHO_C" >&6
10826 else
10827
10828
10829   # First check to see if --with-tcl was specified.
10830   if test x"${with_tclconfig}" != x ; then
10831     if test -f "${with_tclconfig}/tclConfig.sh" ; then
10832       ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
10833     else
10834       { { echo "$as_me:$LINENO: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" >&5
10835 echo "$as_me: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" >&2;}
10836    { (exit 1); exit 1; }; }
10837     fi
10838   fi
10839
10840   # then check for a private Tcl installation
10841   if test x"${ac_cv_c_tclconfig}" = x ; then
10842     for i in \
10843                 ../tcl \
10844                 `ls -dr ../tcl[9].[0-9].[0-9] ../tcl[9].[0-9] 2>/dev/null` \
10845                 `ls -dr ../tcl[8].[2-9].[0-9] ../tcl[8].[2-9] 2>/dev/null` \
10846                 ../../tcl \
10847                 `ls -dr ../../tcl[9].[0-9].[0-9] ../../tcl[9].[0-9] 2>/dev/null` \
10848                 `ls -dr ../../tcl[8].[2-9].[0-9] ../../tcl[8].[2-9] 2>/dev/null` \
10849                 ../../../tcl \
10850                 `ls -dr ../../../tcl[9].[0-9].[0-9] ../../../tcl[9].[0-9] 2>/dev/null` \
10851                 `ls -dr ../../../tcl[8].[2-9].[0-9] ../../../tcl[8].[2-9] 2>/dev/null` ; do
10852       if test -f "$i/unix/tclConfig.sh" ; then
10853         ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
10854         break
10855       fi
10856     done
10857   fi
10858   # check in a few common install locations
10859   if test x"${ac_cv_c_tclconfig}" = x ; then
10860     for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
10861       if test -f "$i/tclConfig.sh" ; then
10862         ac_cv_c_tclconfig=`(cd $i; pwd)`
10863         break
10864       fi
10865     done
10866   fi
10867
10868   # check Debian-specific locations
10869   if test x"${ac_cv_c_tclconfig}" = x ; then
10870     for i in \
10871                 `ls -dr /usr/lib/tcl[9].[0-9].[0-9] /usr/lib/tcl[9].[0-9] 2>/dev/null` \
10872                 `ls -dr /usr/lib/tcl[8].[2-9].[0-9] /usr/lib/tcl[8].[2-9] 2>/dev/null` ; do
10873       if test -f "$i/tclConfig.sh" ; then
10874         ac_cv_c_tclconfig=`(cd $i; pwd)`
10875         break
10876       fi
10877     done
10878   fi
10879
10880   # check in a few other private locations
10881   if test x"${ac_cv_c_tclconfig}" = x ; then
10882     for i in \
10883                 ${srcdir}/../tcl \
10884                 `ls -dr ${srcdir}/../tcl[9].[0-9].[0-9] ${srcdir}/../tcl[9].[0-9] 2>/dev/null` \
10885                 `ls -dr ${srcdir}/../tcl[8].[2-9].[0-9] ${srcdir}/../tcl[8].[2-9] 2>/dev/null` ; do
10886       if test -f "$i/unix/tclConfig.sh" ; then
10887         ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
10888         break
10889       fi
10890     done
10891   fi
10892
10893 fi
10894
10895   if test x"${ac_cv_c_tclconfig}" = x ; then
10896     TCLCONFIG="# no Tcl configs found"
10897     { echo "$as_me:$LINENO: WARNING: Can't find Tcl configuration definitions" >&5
10898 echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
10899   else
10900     no_tcl=
10901     TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh
10902     echo "$as_me:$LINENO: result: found $TCLCONFIG" >&5
10903 echo "${ECHO_T}found $TCLCONFIG" >&6
10904   fi
10905 fi
10906
10907
10908     . $TCLCONFIG
10909
10910
10911
10912
10913
10914
10915
10916
10917
10918
10919
10920 # Tcl defines TCL_SHLIB_SUFFIX but TCL_SHARED_LIB_SUFFIX then looks for it
10921 # as just SHLIB_SUFFIX.  How bizarre.
10922     SHLIB_SUFFIX=$TCL_SHLIB_SUFFIX
10923
10924
10925
10926
10927 # if Tcl's build directory has been removed, TCL_LIB_SPEC should
10928 # be used instead of TCL_BUILD_LIB_SPEC
10929 SAVELIBS=$LIBS
10930 # eval used to expand out TCL_DBGX
10931 eval "LIBS=\"$TCL_BUILD_LIB_SPEC $TCL_LIBS\""
10932 echo "$as_me:$LINENO: checking Tcl build library" >&5
10933 echo $ECHO_N "checking Tcl build library... $ECHO_C" >&6
10934 echo "$as_me:$LINENO: result: $LIBS" >&5
10935 echo "${ECHO_T}$LIBS" >&6
10936
10937 echo "$as_me:$LINENO: checking for Tcl_CreateCommand" >&5
10938 echo $ECHO_N "checking for Tcl_CreateCommand... $ECHO_C" >&6
10939 if test "${ac_cv_func_Tcl_CreateCommand+set}" = set; then
10940   echo $ECHO_N "(cached) $ECHO_C" >&6
10941 else
10942   cat >conftest.$ac_ext <<_ACEOF
10943 #line $LINENO "configure"
10944 /* confdefs.h.  */
10945 _ACEOF
10946 cat confdefs.h >>conftest.$ac_ext
10947 cat >>conftest.$ac_ext <<_ACEOF
10948 /* end confdefs.h.  */
10949 /* System header to define __stub macros and hopefully few prototypes,
10950     which can conflict with char Tcl_CreateCommand (); below.  */
10951 #include <assert.h>
10952 /* Override any gcc2 internal prototype to avoid an error.  */
10953 #ifdef __cplusplus
10954 extern "C"
10955 {
10956 #endif
10957 /* We use char because int might match the return type of a gcc2
10958    builtin and then its argument prototype would still apply.  */
10959 char Tcl_CreateCommand ();
10960 /* The GNU C library defines this for functions which it implements
10961     to always fail with ENOSYS.  Some functions are actually named
10962     something starting with __ and the normal name is an alias.  */
10963 #if defined (__stub_Tcl_CreateCommand) || defined (__stub___Tcl_CreateCommand)
10964 choke me
10965 #else
10966 char (*f) () = Tcl_CreateCommand;
10967 #endif
10968 #ifdef __cplusplus
10969 }
10970 #endif
10971
10972 int
10973 main ()
10974 {
10975
10976   ;
10977   return 0;
10978 }
10979 _ACEOF
10980 rm -f conftest.$ac_objext conftest$ac_exeext
10981 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10982   (eval $ac_link) 2>&5
10983   ac_status=$?
10984   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10985   (exit $ac_status); } &&
10986          { ac_try='test -s conftest$ac_exeext'
10987   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10988   (eval $ac_try) 2>&5
10989   ac_status=$?
10990   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10991   (exit $ac_status); }; }; then
10992   ac_cv_func_Tcl_CreateCommand=yes
10993 else
10994   echo "$as_me: failed program was:" >&5
10995 sed 's/^/| /' conftest.$ac_ext >&5
10996
10997 ac_cv_func_Tcl_CreateCommand=no
10998 fi
10999 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11000 fi
11001 echo "$as_me:$LINENO: result: $ac_cv_func_Tcl_CreateCommand" >&5
11002 echo "${ECHO_T}$ac_cv_func_Tcl_CreateCommand" >&6
11003 if test $ac_cv_func_Tcl_CreateCommand = yes; then
11004
11005         echo "$as_me:$LINENO: checking if Tcl library build specification is valid" >&5
11006 echo $ECHO_N "checking if Tcl library build specification is valid... $ECHO_C" >&6
11007         echo "$as_me:$LINENO: result: yes" >&5
11008 echo "${ECHO_T}yes" >&6
11009
11010 else
11011
11012         TCL_BUILD_LIB_SPEC=$TCL_LIB_SPEC
11013         # Can't pull the following CHECKING call out since it will be
11014         # broken up by the CHECK_FUNC just above.
11015         echo "$as_me:$LINENO: checking if Tcl library build specification is valid" >&5
11016 echo $ECHO_N "checking if Tcl library build specification is valid... $ECHO_C" >&6
11017         echo "$as_me:$LINENO: result: no" >&5
11018 echo "${ECHO_T}no" >&6
11019
11020 fi
11021
11022 LIBS=$SAVELIBS
11023
11024
11025
11026
11027
11028
11029
11030 TCL_INC_DIR=$TCL_INC_DIR
11031
11032 TCL_PACKAGE_PATH=$TCL_PACKAGE_PATH
11033
11034
11035
11036 #
11037 # Ok, lets find the tk source trees so we can use the headers
11038 # If the directory (presumably symlink) named "tk" exists, use that one
11039 # in preference to any others.  Same logic is used when choosing library
11040 # and again with Tcl. The search order is the best place to look first, then in
11041 # decreasing significance. The loop breaks if the trigger file is found.
11042 # Note the gross little conversion here of srcdir by cd'ing to the found
11043 # directory. This converts the path from a relative to an absolute, so
11044 # recursive cache variables for the path will work right. We check all
11045 # the possible paths in one loop rather than many seperate loops to speed
11046 # things up.
11047 # the alternative search directory is involked by --with-tkinclude
11048 #
11049 #no_tk=true
11050 echo "$as_me:$LINENO: checking for Tk private headers" >&5
11051 echo $ECHO_N "checking for Tk private headers... $ECHO_C" >&6
11052
11053 # Check whether --with-tkinclude or --without-tkinclude was given.
11054 if test "${with_tkinclude+set}" = set; then
11055   withval="$with_tkinclude"
11056   with_tkinclude=${withval}
11057 fi;
11058 if test "${ac_cv_c_tkh+set}" = set; then
11059   echo $ECHO_N "(cached) $ECHO_C" >&6
11060 else
11061
11062 # first check to see if --with-tkinclude was specified
11063 if test x"${with_tkinclude}" != x ; then
11064   if test -f ${with_tkinclude}/tk.h ; then
11065     ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)`
11066   elif test -f ${with_tkinclude}/generic/tk.h ; then
11067     ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)`
11068   else
11069     { { echo "$as_me:$LINENO: error: ${with_tkinclude} directory doesn't contain private headers" >&5
11070 echo "$as_me: error: ${with_tkinclude} directory doesn't contain private headers" >&2;}
11071    { (exit 1); exit 1; }; }
11072   fi
11073 fi
11074
11075 # next check if it came with Tk configuration file
11076 if test x"${ac_cv_c_tkconfig}" != x ; then
11077   if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then
11078     ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/../generic; pwd)`
11079   fi
11080 fi
11081
11082 # next check in private source directory
11083 #
11084 # since ls returns lowest version numbers first, reverse its output
11085 if test x"${ac_cv_c_tkh}" = x ; then
11086   for i in \
11087                 ${srcdir}/../tk \
11088                 `ls -dr ${srcdir}/../tk[4-9].[0-9].[0-9] ${srcdir}/../tk[4-9].[0-9] 2>/dev/null` \
11089                 `ls -dr ${srcdir}/../tk[4-9].[0-9].[0-9] ${srcdir}/../tk[4-9].[0-9] 2>/dev/null` \
11090                 ${srcdir}/../../tk \
11091                 `ls -dr ${srcdir}/../../tk[4-9].[0-9].[0-9] ${srcdir}/../../tk[4-9].[0-9] 2>/dev/null` \
11092                 `ls -dr ${srcdir}/../../tk[4-9].[0-9].[0-9] ${srcdir}/../../tk[4-9].[0-9] 2>/dev/null` \
11093                 ${srcdir}/../../../tk \
11094                 `ls -dr ${srcdir}/../../../tk[4-9].[0-9].[0-9] ${srcdir}/../../../tk[4-9].[0-9] 2>/dev/null ` \
11095                 `ls -dr ${srcdir}/../../../tk[4-9].[0-9].[0-9] ${srcdir}/../../../tk[4-9].[0-9] 2>/dev/null ` ; do
11096     if test -f $i/generic/tk.h ; then
11097       ac_cv_c_tkh=`(cd $i/generic; pwd)`
11098       break
11099     fi
11100   done
11101 fi
11102
11103 # check Debian-specific locations
11104 if test x"${ac_cv_c_tkh}" = x ; then
11105   for i in \
11106                 `ls -dr /usr/include/tcl[9].[0-9].[0-9]/tk-private /usr/include/tcl[9].[0-9]/tk-private 2>/dev/null` \
11107                 `ls -dr /usr/include/tcl[8].[2-9].[0-9]/tk-private /usr/include/tcl[8].[2-9]/tk-private 2>/dev/null` ; do
11108     if test -f $i/generic/tk.h ; then
11109       ac_cv_c_tkh=`(cd $i/generic; pwd)`
11110       break
11111     fi
11112   done
11113 fi
11114
11115 # finally check in a few common install locations
11116 #
11117 # since ls returns lowest version numbers first, reverse its output
11118 if test x"${ac_cv_c_tkh}" = x ; then
11119   for i in \
11120                 `ls -dr /usr/local/src/tk[4-9].[0-9].[0-9] /usr/local/src/tk[4-9].[0-9] 2>/dev/null` \
11121                 `ls -dr /usr/local/src/tk[4-9].[0-9].[0-9] /usr/local/src/tk[4-9].[0-9] 2>/dev/null` \
11122                 `ls -dr /usr/local/lib/tk[4-9].[0-9].[0-9] /usr/local/lib/tk[4-9].[0-9] 2>/dev/null` \
11123                 `ls -dr /usr/local/lib/tk[4-9].[0-9].[0-9] /usr/local/lib/tk[4-9].[0-9] 2>/dev/null` \
11124                 /usr/local/src/tk \
11125                 /usr/local/lib/tk \
11126                 ${prefix}/include ; do
11127     if test -f $i/generic/tk.h ; then
11128       ac_cv_c_tkh=`(cd $i/generic; pwd)`
11129       break
11130     fi
11131   done
11132 fi
11133 # see if one is installed
11134 if test x"${ac_cv_c_tkh}" = x ; then
11135    if test "${ac_cv_header_tk_h+set}" = set; then
11136   echo "$as_me:$LINENO: checking for tk.h" >&5
11137 echo $ECHO_N "checking for tk.h... $ECHO_C" >&6
11138 if test "${ac_cv_header_tk_h+set}" = set; then
11139   echo $ECHO_N "(cached) $ECHO_C" >&6
11140 fi
11141 echo "$as_me:$LINENO: result: $ac_cv_header_tk_h" >&5
11142 echo "${ECHO_T}$ac_cv_header_tk_h" >&6
11143 else
11144   # Is the header compilable?
11145 echo "$as_me:$LINENO: checking tk.h usability" >&5
11146 echo $ECHO_N "checking tk.h usability... $ECHO_C" >&6
11147 cat >conftest.$ac_ext <<_ACEOF
11148 #line $LINENO "configure"
11149 /* confdefs.h.  */
11150 _ACEOF
11151 cat confdefs.h >>conftest.$ac_ext
11152 cat >>conftest.$ac_ext <<_ACEOF
11153 /* end confdefs.h.  */
11154 $ac_includes_default
11155 #include <tk.h>
11156 _ACEOF
11157 rm -f conftest.$ac_objext
11158 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11159   (eval $ac_compile) 2>&5
11160   ac_status=$?
11161   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11162   (exit $ac_status); } &&
11163          { ac_try='test -s conftest.$ac_objext'
11164   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11165   (eval $ac_try) 2>&5
11166   ac_status=$?
11167   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11168   (exit $ac_status); }; }; then
11169   ac_header_compiler=yes
11170 else
11171   echo "$as_me: failed program was:" >&5
11172 sed 's/^/| /' conftest.$ac_ext >&5
11173
11174 ac_header_compiler=no
11175 fi
11176 rm -f conftest.$ac_objext conftest.$ac_ext
11177 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11178 echo "${ECHO_T}$ac_header_compiler" >&6
11179
11180 # Is the header present?
11181 echo "$as_me:$LINENO: checking tk.h presence" >&5
11182 echo $ECHO_N "checking tk.h presence... $ECHO_C" >&6
11183 cat >conftest.$ac_ext <<_ACEOF
11184 #line $LINENO "configure"
11185 /* confdefs.h.  */
11186 _ACEOF
11187 cat confdefs.h >>conftest.$ac_ext
11188 cat >>conftest.$ac_ext <<_ACEOF
11189 /* end confdefs.h.  */
11190 #include <tk.h>
11191 _ACEOF
11192 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11193   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11194   ac_status=$?
11195   grep -v '^ *+' conftest.er1 >conftest.err
11196   rm -f conftest.er1
11197   cat conftest.err >&5
11198   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11199   (exit $ac_status); } >/dev/null; then
11200   if test -s conftest.err; then
11201     ac_cpp_err=$ac_c_preproc_warn_flag
11202   else
11203     ac_cpp_err=
11204   fi
11205 else
11206   ac_cpp_err=yes
11207 fi
11208 if test -z "$ac_cpp_err"; then
11209   ac_header_preproc=yes
11210 else
11211   echo "$as_me: failed program was:" >&5
11212 sed 's/^/| /' conftest.$ac_ext >&5
11213
11214   ac_header_preproc=no
11215 fi
11216 rm -f conftest.err conftest.$ac_ext
11217 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11218 echo "${ECHO_T}$ac_header_preproc" >&6
11219
11220 # So?  What about this header?
11221 case $ac_header_compiler:$ac_header_preproc in
11222   yes:no )
11223     { echo "$as_me:$LINENO: WARNING: tk.h: accepted by the compiler, rejected by the preprocessor!" >&5
11224 echo "$as_me: WARNING: tk.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
11225     { echo "$as_me:$LINENO: WARNING: tk.h: proceeding with the preprocessor's result" >&5
11226 echo "$as_me: WARNING: tk.h: proceeding with the preprocessor's result" >&2;}
11227     (
11228       cat <<\_ASBOX
11229 ## ------------------------------------ ##
11230 ## Report this to bug-autoconf@gnu.org. ##
11231 ## ------------------------------------ ##
11232 _ASBOX
11233     ) |
11234       sed "s/^/$as_me: WARNING:     /" >&2
11235     ;;
11236   no:yes )
11237     { echo "$as_me:$LINENO: WARNING: tk.h: present but cannot be compiled" >&5
11238 echo "$as_me: WARNING: tk.h: present but cannot be compiled" >&2;}
11239     { echo "$as_me:$LINENO: WARNING: tk.h: check for missing prerequisite headers?" >&5
11240 echo "$as_me: WARNING: tk.h: check for missing prerequisite headers?" >&2;}
11241     { echo "$as_me:$LINENO: WARNING: tk.h: proceeding with the preprocessor's result" >&5
11242 echo "$as_me: WARNING: tk.h: proceeding with the preprocessor's result" >&2;}
11243     (
11244       cat <<\_ASBOX
11245 ## ------------------------------------ ##
11246 ## Report this to bug-autoconf@gnu.org. ##
11247 ## ------------------------------------ ##
11248 _ASBOX
11249     ) |
11250       sed "s/^/$as_me: WARNING:     /" >&2
11251     ;;
11252 esac
11253 echo "$as_me:$LINENO: checking for tk.h" >&5
11254 echo $ECHO_N "checking for tk.h... $ECHO_C" >&6
11255 if test "${ac_cv_header_tk_h+set}" = set; then
11256   echo $ECHO_N "(cached) $ECHO_C" >&6
11257 else
11258   ac_cv_header_tk_h=$ac_header_preproc
11259 fi
11260 echo "$as_me:$LINENO: result: $ac_cv_header_tk_h" >&5
11261 echo "${ECHO_T}$ac_cv_header_tk_h" >&6
11262
11263 fi
11264 if test $ac_cv_header_tk_h = yes; then
11265   ac_cv_c_tkh=installed
11266 else
11267   ac_cv_c_tkh=""
11268 fi
11269
11270
11271 fi
11272
11273 fi
11274
11275 if test x"${ac_cv_c_tkh}" != x ; then
11276 #  no_tk=""
11277   if test x"${ac_cv_c_tkh}" = x"installed" ; then
11278     echo "$as_me:$LINENO: result: is installed" >&5
11279 echo "${ECHO_T}is installed" >&6
11280     TKHDIRDASHI=""
11281   else
11282     echo "$as_me:$LINENO: result: found in ${ac_cv_c_tkh}" >&5
11283 echo "${ECHO_T}found in ${ac_cv_c_tkh}" >&6
11284     # this hack is cause the TKHDIRDASHI won't print if there is a "-I" in it.
11285     TKHDIRDASHI="-I${ac_cv_c_tkh}"
11286   fi
11287 else
11288   TKHDIRDASHI="# no Tk directory found"
11289   { echo "$as_me:$LINENO: WARNING: Can't find Tk private headers" >&5
11290 echo "$as_me: WARNING: Can't find Tk private headers" >&2;}
11291   no_tk=true
11292 fi
11293
11294
11295
11296
11297 #
11298 # Ok, lets find the tk configuration
11299 # First, look for one uninstalled.
11300 # the alternative search directory is invoked by --with-tk
11301 #
11302
11303 if test x"${no_tk}" = x ; then
11304   # we reset no_tk in case something fails here
11305   no_tk=true
11306
11307 # Check whether --with-tk or --without-tk was given.
11308 if test "${with_tk+set}" = set; then
11309   withval="$with_tk"
11310   with_tkconfig=${withval}
11311 fi;
11312   echo "$as_me:$LINENO: checking for Tk configuration" >&5
11313 echo $ECHO_N "checking for Tk configuration... $ECHO_C" >&6
11314   if test "${ac_cv_c_tkconfig+set}" = set; then
11315   echo $ECHO_N "(cached) $ECHO_C" >&6
11316 else
11317
11318
11319   # First check to see if --with-tk was specified.
11320   if test x"${with_tkconfig}" != x ; then
11321     if test -f "${with_tkconfig}/tkConfig.sh" ; then
11322       ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
11323     else
11324       { { echo "$as_me:$LINENO: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" >&5
11325 echo "$as_me: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" >&2;}
11326    { (exit 1); exit 1; }; }
11327     fi
11328   fi
11329
11330   # then check for a private Tk library
11331   if test x"${ac_cv_c_tkconfig}" = x ; then
11332     for i in \
11333                 ../tk \
11334                 `ls -dr ../tk[4-9].[0-9].[0-9] ../tk[4-9].[0-9] 2>/dev/null` \
11335                 `ls -dr ../tk[4-9].[0-9].[0-9] ../tk[4-9].[0-9] 2>/dev/null` \
11336                 ../../tk \
11337                 `ls -dr ../../tk[4-9].[0-9].[0-9] ../../tk[4-9].[0-9] 2>/dev/null` \
11338                 `ls -dr ../../tk[4-9].[0-9].[0-9] ../../tk[4-9].[0-9] 2>/dev/null` \
11339                 ../../../tk \
11340                 `ls -dr ../../../tk[4-9].[0-9].[0-9] ../../../tk[4-9].[0-9] 2>/dev/null` \
11341                 `ls -dr ../../../tk[4-9].[0-9].[0-9] ../../../tk[4-9].[0-9] 2>/dev/null` ; do
11342       if test -f "$i/unix/tkConfig.sh" ; then
11343         ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
11344         break
11345       fi
11346     done
11347   fi
11348   # check in a few common install locations
11349   if test x"${ac_cv_c_tkconfig}" = x ; then
11350     for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
11351       if test -f "$i/tkConfig.sh" ; then
11352         ac_cv_c_tkconfig=`(cd $i; pwd)`
11353         break
11354       fi
11355     done
11356   fi
11357   # check Debian-specific locations
11358   if test x"${ac_cv_c_tkconfig}" = x ; then
11359     for i in \
11360                 `ls -dr /usr/lib/tk[4-9].[0-9].[0-9] /usr/lib/tk[4-9].[0-9] 2>/dev/null` \
11361                 `ls -dr /usr/lib/tk[4-9].[0-9].[0-9] /usr/lib/tk[4-9].[0-9] 2>/dev/null` ; do
11362       if test -f "$i/tkConfig.sh" ; then
11363         ac_cv_c_tkconfig=`(cd $i; pwd)`
11364         break
11365       fi
11366     done
11367   fi
11368   # check in a few other private locations
11369   if test x"${ac_cv_c_tkconfig}" = x ; then
11370     for i in \
11371                 ${srcdir}/../tk \
11372                 `ls -dr ${srcdir}/../tk[4-9].[0-9].[0-9] ${srcdir}/../tk[4-9].[0-9] 2>/dev/null` \
11373                 `ls -dr ${srcdir}/../tk[4-9].[0-9].[0-9] ${srcdir}/../tk[4-9].[0-9] 2>/dev/null` ; do
11374       if test -f "$i/unix/tkConfig.sh" ; then
11375         ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
11376         break
11377       fi
11378     done
11379   fi
11380
11381 fi
11382
11383   if test x"${ac_cv_c_tkconfig}" = x ; then
11384     TKCONFIG="# no Tk configs found"
11385     { echo "$as_me:$LINENO: WARNING: Can't find Tk configuration definitions" >&5
11386 echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
11387   else
11388     no_tk=
11389     TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh
11390     echo "$as_me:$LINENO: result: found $TKCONFIG" >&5
11391 echo "${ECHO_T}found $TKCONFIG" >&6
11392   fi
11393 fi
11394
11395
11396
11397     if test -f "$TKCONFIG" ; then
11398       . $TKCONFIG
11399     fi
11400
11401
11402
11403
11404
11405
11406
11407
11408
11409
11410
11411 # if Tk's build directory has been removed, TK_LIB_SPEC should
11412 # be used instead of TK_BUILD_LIB_SPEC
11413 SAVELIBS=$LIBS
11414 # eval used to expand out TK_DBGX
11415 eval "LIBS=\"$TK_BUILD_LIB_SPEC $TCL_BUILD_LIB_SPEC $TK_LIBS\""
11416 echo "$as_me:$LINENO: checking for Tk_Init" >&5
11417 echo $ECHO_N "checking for Tk_Init... $ECHO_C" >&6
11418 if test "${ac_cv_func_Tk_Init+set}" = set; then
11419   echo $ECHO_N "(cached) $ECHO_C" >&6
11420 else
11421   cat >conftest.$ac_ext <<_ACEOF
11422 #line $LINENO "configure"
11423 /* confdefs.h.  */
11424 _ACEOF
11425 cat confdefs.h >>conftest.$ac_ext
11426 cat >>conftest.$ac_ext <<_ACEOF
11427 /* end confdefs.h.  */
11428 /* System header to define __stub macros and hopefully few prototypes,
11429     which can conflict with char Tk_Init (); below.  */
11430 #include <assert.h>
11431 /* Override any gcc2 internal prototype to avoid an error.  */
11432 #ifdef __cplusplus
11433 extern "C"
11434 {
11435 #endif
11436 /* We use char because int might match the return type of a gcc2
11437    builtin and then its argument prototype would still apply.  */
11438 char Tk_Init ();
11439 /* The GNU C library defines this for functions which it implements
11440     to always fail with ENOSYS.  Some functions are actually named
11441     something starting with __ and the normal name is an alias.  */
11442 #if defined (__stub_Tk_Init) || defined (__stub___Tk_Init)
11443 choke me
11444 #else
11445 char (*f) () = Tk_Init;
11446 #endif
11447 #ifdef __cplusplus
11448 }
11449 #endif
11450
11451 int
11452 main ()
11453 {
11454
11455   ;
11456   return 0;
11457 }
11458 _ACEOF
11459 rm -f conftest.$ac_objext conftest$ac_exeext
11460 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11461   (eval $ac_link) 2>&5
11462   ac_status=$?
11463   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11464   (exit $ac_status); } &&
11465          { ac_try='test -s conftest$ac_exeext'
11466   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11467   (eval $ac_try) 2>&5
11468   ac_status=$?
11469   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11470   (exit $ac_status); }; }; then
11471   ac_cv_func_Tk_Init=yes
11472 else
11473   echo "$as_me: failed program was:" >&5
11474 sed 's/^/| /' conftest.$ac_ext >&5
11475
11476 ac_cv_func_Tk_Init=no
11477 fi
11478 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11479 fi
11480 echo "$as_me:$LINENO: result: $ac_cv_func_Tk_Init" >&5
11481 echo "${ECHO_T}$ac_cv_func_Tk_Init" >&6
11482 if test $ac_cv_func_Tk_Init = yes; then
11483
11484         echo "$as_me:$LINENO: checking if Tk library build specification is valid" >&5
11485 echo $ECHO_N "checking if Tk library build specification is valid... $ECHO_C" >&6
11486         echo "$as_me:$LINENO: result: yes" >&5
11487 echo "${ECHO_T}yes" >&6
11488
11489 else
11490
11491         TK_BUILD_LIB_SPEC=$TK_LIB_SPEC
11492         # Can't pull the following CHECKING call out since it will be
11493         # broken up by the CHECK_FUNC just above.
11494         echo "$as_me:$LINENO: checking if Tk library build specification is valid" >&5
11495 echo $ECHO_N "checking if Tk library build specification is valid... $ECHO_C" >&6
11496         echo "$as_me:$LINENO: result: no" >&5
11497 echo "${ECHO_T}no" >&6
11498
11499 fi
11500
11501 LIBS=$SAVELIBS
11502
11503
11504
11505
11506 TK_INC_DIR=$TK_INC_DIR
11507
11508 if [[ $TK_VERSION < "8.4" ]]; then
11509
11510 cat >>confdefs.h <<\_ACEOF
11511 #define TK_84PREV
11512 _ACEOF
11513
11514 fi
11515
11516
11517
11518 # Check whether --with-gdal or --without-gdal was given.
11519 if test "${with_gdal+set}" = set; then
11520   withval="$with_gdal"
11521
11522 fi;
11523
11524 if test "$with_gdal" != "" ; then
11525   GDAL_HOME=$with_gdal
11526   echo Using requested GDAL_HOME of $GDAL_HOME
11527 elif test "$GDAL_HOME" != "" ; then
11528   echo Using predefined GDAL_HOME=$GDAL_HOME
11529 elif test -d ../gdal ; then
11530   GDAL_HOME=`pwd`/../gdal
11531   echo Found local GDAL_HOME=$GDAL_HOME
11532 else
11533   echo "$as_me:$LINENO: checking for GDALOpen in -lgdal.1.1" >&5
11534 echo $ECHO_N "checking for GDALOpen in -lgdal.1.1... $ECHO_C" >&6
11535 if test "${ac_cv_lib_gdal_1_1_GDALOpen+set}" = set; then
11536   echo $ECHO_N "(cached) $ECHO_C" >&6
11537 else
11538   ac_check_lib_save_LIBS=$LIBS
11539 LIBS="-lgdal.1.1  $LIBS"
11540 cat >conftest.$ac_ext <<_ACEOF
11541 #line $LINENO "configure"
11542 /* confdefs.h.  */
11543 _ACEOF
11544 cat confdefs.h >>conftest.$ac_ext
11545 cat >>conftest.$ac_ext <<_ACEOF
11546 /* end confdefs.h.  */
11547
11548 /* Override any gcc2 internal prototype to avoid an error.  */
11549 #ifdef __cplusplus
11550 extern "C"
11551 #endif
11552 /* We use char because int might match the return type of a gcc2
11553    builtin and then its argument prototype would still apply.  */
11554 char GDALOpen ();
11555 int
11556 main ()
11557 {
11558 GDALOpen ();
11559   ;
11560   return 0;
11561 }
11562 _ACEOF
11563 rm -f conftest.$ac_objext conftest$ac_exeext
11564 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11565   (eval $ac_link) 2>&5
11566   ac_status=$?
11567   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11568   (exit $ac_status); } &&
11569          { ac_try='test -s conftest$ac_exeext'
11570   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11571   (eval $ac_try) 2>&5
11572   ac_status=$?
11573   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11574   (exit $ac_status); }; }; then
11575   ac_cv_lib_gdal_1_1_GDALOpen=yes
11576 else
11577   echo "$as_me: failed program was:" >&5
11578 sed 's/^/| /' conftest.$ac_ext >&5
11579
11580 ac_cv_lib_gdal_1_1_GDALOpen=no
11581 fi
11582 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11583 LIBS=$ac_check_lib_save_LIBS
11584 fi
11585 echo "$as_me:$LINENO: result: $ac_cv_lib_gdal_1_1_GDALOpen" >&5
11586 echo "${ECHO_T}$ac_cv_lib_gdal_1_1_GDALOpen" >&6
11587 if test $ac_cv_lib_gdal_1_1_GDALOpen = yes; then
11588   gdal_found=1
11589 else
11590   gdal_found=0
11591 fi
11592
11593
11594 gdal_missing_msg="
11595 fGIS requires GDAL 1.1, but libgdal.1.1.so was not found. Please download
11596 and install it. See http://www.remotesensing.org/gdal/
11597 "
11598
11599   if test "$gdal_found" != "1" ; then
11600     { { echo "$as_me:$LINENO: error: $gdal_missing_msg" >&5
11601 echo "$as_me: error: $gdal_missing_msg" >&2;}
11602    { (exit 1); exit 1; }; }
11603   fi
11604
11605 gdal_h_missing_msg="
11606 fGIS requires GDAL 1.1, but gdal.h was not found. Please ensure GDAL,
11607 and the development include files are installed, or that you run configure
11608 with --with-gdal=path_to_gdal_build_tree.
11609 See http://www.remotesensing.org/gdal/
11610 "
11611
11612
11613 for ac_header in gdal.h
11614 do
11615 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11616 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11617   echo "$as_me:$LINENO: checking for $ac_header" >&5
11618 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11619 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11620   echo $ECHO_N "(cached) $ECHO_C" >&6
11621 fi
11622 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
11623 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11624 else
11625   # Is the header compilable?
11626 echo "$as_me:$LINENO: checking $ac_header usability" >&5
11627 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
11628 cat >conftest.$ac_ext <<_ACEOF
11629 #line $LINENO "configure"
11630 /* confdefs.h.  */
11631 _ACEOF
11632 cat confdefs.h >>conftest.$ac_ext
11633 cat >>conftest.$ac_ext <<_ACEOF
11634 /* end confdefs.h.  */
11635 $ac_includes_default
11636 #include <$ac_header>
11637 _ACEOF
11638 rm -f conftest.$ac_objext
11639 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11640   (eval $ac_compile) 2>&5
11641   ac_status=$?
11642   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11643   (exit $ac_status); } &&
11644          { ac_try='test -s conftest.$ac_objext'
11645   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11646   (eval $ac_try) 2>&5
11647   ac_status=$?
11648   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11649   (exit $ac_status); }; }; then
11650   ac_header_compiler=yes
11651 else
11652   echo "$as_me: failed program was:" >&5
11653 sed 's/^/| /' conftest.$ac_ext >&5
11654
11655 ac_header_compiler=no
11656 fi
11657 rm -f conftest.$ac_objext conftest.$ac_ext
11658 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11659 echo "${ECHO_T}$ac_header_compiler" >&6
11660
11661 # Is the header present?
11662 echo "$as_me:$LINENO: checking $ac_header presence" >&5
11663 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
11664 cat >conftest.$ac_ext <<_ACEOF
11665 #line $LINENO "configure"
11666 /* confdefs.h.  */
11667 _ACEOF
11668 cat confdefs.h >>conftest.$ac_ext
11669 cat >>conftest.$ac_ext <<_ACEOF
11670 /* end confdefs.h.  */
11671 #include <$ac_header>
11672 _ACEOF
11673 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11674   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11675   ac_status=$?
11676   grep -v '^ *+' conftest.er1 >conftest.err
11677   rm -f conftest.er1
11678   cat conftest.err >&5
11679   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11680   (exit $ac_status); } >/dev/null; then
11681   if test -s conftest.err; then
11682     ac_cpp_err=$ac_c_preproc_warn_flag
11683   else
11684     ac_cpp_err=
11685   fi
11686 else
11687   ac_cpp_err=yes
11688 fi
11689 if test -z "$ac_cpp_err"; then
11690   ac_header_preproc=yes
11691 else
11692   echo "$as_me: failed program was:" >&5
11693 sed 's/^/| /' conftest.$ac_ext >&5
11694
11695   ac_header_preproc=no
11696 fi
11697 rm -f conftest.err conftest.$ac_ext
11698 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11699 echo "${ECHO_T}$ac_header_preproc" >&6
11700
11701 # So?  What about this header?
11702 case $ac_header_compiler:$ac_header_preproc in
11703   yes:no )
11704     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11705 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
11706     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
11707 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
11708     (
11709       cat <<\_ASBOX
11710 ## ------------------------------------ ##
11711 ## Report this to bug-autoconf@gnu.org. ##
11712 ## ------------------------------------ ##
11713 _ASBOX
11714     ) |
11715       sed "s/^/$as_me: WARNING:     /" >&2
11716     ;;
11717   no:yes )
11718     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11719 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
11720     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
11721 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
11722     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
11723 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
11724     (
11725       cat <<\_ASBOX
11726 ## ------------------------------------ ##
11727 ## Report this to bug-autoconf@gnu.org. ##
11728 ## ------------------------------------ ##
11729 _ASBOX
11730     ) |
11731       sed "s/^/$as_me: WARNING:     /" >&2
11732     ;;
11733 esac
11734 echo "$as_me:$LINENO: checking for $ac_header" >&5
11735 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11736 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11737   echo $ECHO_N "(cached) $ECHO_C" >&6
11738 else
11739   eval "$as_ac_Header=$ac_header_preproc"
11740 fi
11741 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
11742 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11743
11744 fi
11745 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11746   cat >>confdefs.h <<_ACEOF
11747 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11748 _ACEOF
11749
11750 fi
11751
11752 done
11753
11754   if test "$ac_cv_header_gdal_h" != "yes" ; then
11755     { { echo "$as_me:$LINENO: error: $gdal_h_missing_msg" >&5
11756 echo "$as_me: error: $gdal_h_missing_msg" >&2;}
11757    { (exit 1); exit 1; }; }
11758   fi
11759   GDAL_LIB="-lgdal.1.1"
11760   LIBS="$GDAL_LIB $LIBS"
11761   GDAL_INC=""
11762   GDAL_INC=$GDAL_INC
11763
11764 fi
11765
11766 if test "$GDAL_HOME" != "" ; then
11767   GDAL_LIB="-L$GDAL_HOME -lgdal.1.1"
11768   LIBS="$GDAL_LIB $LIBS"
11769
11770   GDAL_INC="-I$GDAL_HOME/port -I$GDAL_HOME/core -I$GDAL_HOME/ogr"
11771
11772   if test ! -d $GDAL_HOME/core ; then
11773
11774     { { echo "$as_me:$LINENO: error: Unable to find $GDAL_HOME/core directory, are you sure a
11775 regular GDAL build tree can be found at $GDAL_HOME?" >&5
11776 echo "$as_me: error: Unable to find $GDAL_HOME/core directory, are you sure a
11777 regular GDAL build tree can be found at $GDAL_HOME?" >&2;}
11778    { (exit 1); exit 1; }; }
11779   fi
11780
11781   if test ! -f $GDAL_HOME/libgdal.1.1.so ; then
11782
11783     { { echo "$as_me:$LINENO: error: Unable to find $GDAL_HOME/libgdal.1.1.so, are you sure a
11784 regular GDAL build tree can be found at $GDAL_HOME?" >&5
11785 echo "$as_me: error: Unable to find $GDAL_HOME/libgdal.1.1.so, are you sure a
11786 regular GDAL build tree can be found at $GDAL_HOME?" >&2;}
11787    { (exit 1); exit 1; }; }
11788   fi
11789
11790   GDAL_INC=$GDAL_INC
11791
11792 fi
11793
11794                                                                                           ac_config_files="$ac_config_files Makefile etc/Makefile etc/fgis.rc dll/Makefile epu/Makefile include/Makefile lib/Makefile tcl/Makefile tcl/pkgIndex.tcl"
11795
11796 cat >confcache <<\_ACEOF
11797 # This file is a shell script that caches the results of configure
11798 # tests run on this system so they can be shared between configure
11799 # scripts and configure runs, see configure's option --config-cache.
11800 # It is not useful on other systems.  If it contains results you don't
11801 # want to keep, you may remove or edit it.
11802 #
11803 # config.status only pays attention to the cache file if you give it
11804 # the --recheck option to rerun configure.
11805 #
11806 # `ac_cv_env_foo' variables (set or unset) will be overridden when
11807 # loading this file, other *unset* `ac_cv_foo' will be assigned the
11808 # following values.
11809
11810 _ACEOF
11811
11812 # The following way of writing the cache mishandles newlines in values,
11813 # but we know of no workaround that is simple, portable, and efficient.
11814 # So, don't put newlines in cache variables' values.
11815 # Ultrix sh set writes to stderr and can't be redirected directly,
11816 # and sets the high bit in the cache file unless we assign to the vars.
11817 {
11818   (set) 2>&1 |
11819     case `(ac_space=' '; set | grep ac_space) 2>&1` in
11820     *ac_space=\ *)
11821       # `set' does not quote correctly, so add quotes (double-quote
11822       # substitution turns \\\\ into \\, and sed turns \\ into \).
11823       sed -n \
11824         "s/'/'\\\\''/g;
11825           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
11826       ;;
11827     *)
11828       # `set' quotes correctly as required by POSIX, so do not add quotes.
11829       sed -n \
11830         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
11831       ;;
11832     esac;
11833 } |
11834   sed '
11835      t clear
11836      : clear
11837      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
11838      t end
11839      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
11840      : end' >>confcache
11841 if diff $cache_file confcache >/dev/null 2>&1; then :; else
11842   if test -w $cache_file; then
11843     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
11844     cat confcache >$cache_file
11845   else
11846     echo "not updating unwritable cache $cache_file"
11847   fi
11848 fi
11849 rm -f confcache
11850
11851 test "x$prefix" = xNONE && prefix=$ac_default_prefix
11852 # Let make expand exec_prefix.
11853 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
11854
11855 # VPATH may cause trouble with some makes, so we remove $(srcdir),
11856 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
11857 # trailing colons and then remove the whole line if VPATH becomes empty
11858 # (actually we leave an empty line to preserve line numbers).
11859 if test "x$srcdir" = x.; then
11860   ac_vpsub='/^[         ]*VPATH[        ]*=/{
11861 s/:*\$(srcdir):*/:/;
11862 s/:*\${srcdir}:*/:/;
11863 s/:*@srcdir@:*/:/;
11864 s/^\([^=]*=[    ]*\):*/\1/;
11865 s/:*$//;
11866 s/^[^=]*=[      ]*$//;
11867 }'
11868 fi
11869
11870 DEFS=-DHAVE_CONFIG_H
11871
11872 ac_libobjs=
11873 ac_ltlibobjs=
11874 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
11875   # 1. Remove the extension, and $U if already installed.
11876   ac_i=`echo "$ac_i" |
11877          sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
11878   # 2. Add them.
11879   ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
11880   ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
11881 done
11882 LIBOBJS=$ac_libobjs
11883
11884 LTLIBOBJS=$ac_ltlibobjs
11885
11886
11887
11888 : ${CONFIG_STATUS=./config.status}
11889 ac_clean_files_save=$ac_clean_files
11890 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
11891 { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
11892 echo "$as_me: creating $CONFIG_STATUS" >&6;}
11893 cat >$CONFIG_STATUS <<_ACEOF
11894 #! $SHELL
11895 # Generated by $as_me.
11896 # Run this file to recreate the current configuration.
11897 # Compiler output produced by configure, useful for debugging
11898 # configure, is in config.log if it exists.
11899
11900 debug=false
11901 ac_cs_recheck=false
11902 ac_cs_silent=false
11903 SHELL=\${CONFIG_SHELL-$SHELL}
11904 _ACEOF
11905
11906 cat >>$CONFIG_STATUS <<\_ACEOF
11907 ## --------------------- ##
11908 ## M4sh Initialization.  ##
11909 ## --------------------- ##
11910
11911 # Be Bourne compatible
11912 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
11913   emulate sh
11914   NULLCMD=:
11915   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
11916   # is contrary to our usage.  Disable this feature.
11917   alias -g '${1+"$@"}'='"$@"'
11918 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
11919   set -o posix
11920 fi
11921
11922 # Support unset when possible.
11923 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
11924   as_unset=unset
11925 else
11926   as_unset=false
11927 fi
11928
11929
11930 # Work around bugs in pre-3.0 UWIN ksh.
11931 $as_unset ENV MAIL MAILPATH
11932 PS1='$ '
11933 PS2='> '
11934 PS4='+ '
11935
11936 # NLS nuisances.
11937 for as_var in \
11938   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
11939   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
11940   LC_TELEPHONE LC_TIME
11941 do
11942   if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
11943     eval $as_var=C; export $as_var
11944   else
11945     $as_unset $as_var
11946   fi
11947 done
11948
11949 # Required to use basename.
11950 if expr a : '\(a\)' >/dev/null 2>&1; then
11951   as_expr=expr
11952 else
11953   as_expr=false
11954 fi
11955
11956 if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
11957   as_basename=basename
11958 else
11959   as_basename=false
11960 fi
11961
11962
11963 # Name of the executable.
11964 as_me=`$as_basename "$0" ||
11965 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
11966          X"$0" : 'X\(//\)$' \| \
11967          X"$0" : 'X\(/\)$' \| \
11968          .     : '\(.\)' 2>/dev/null ||
11969 echo X/"$0" |
11970     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
11971           /^X\/\(\/\/\)$/{ s//\1/; q; }
11972           /^X\/\(\/\).*/{ s//\1/; q; }
11973           s/.*/./; q'`
11974
11975
11976 # PATH needs CR, and LINENO needs CR and PATH.
11977 # Avoid depending upon Character Ranges.
11978 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
11979 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
11980 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
11981 as_cr_digits='0123456789'
11982 as_cr_alnum=$as_cr_Letters$as_cr_digits
11983
11984 # The user is always right.
11985 if test "${PATH_SEPARATOR+set}" != set; then
11986   echo "#! /bin/sh" >conf$$.sh
11987   echo  "exit 0"   >>conf$$.sh
11988   chmod +x conf$$.sh
11989   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
11990     PATH_SEPARATOR=';'
11991   else
11992     PATH_SEPARATOR=:
11993   fi
11994   rm -f conf$$.sh
11995 fi
11996
11997
11998   as_lineno_1=$LINENO
11999   as_lineno_2=$LINENO
12000   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
12001   test "x$as_lineno_1" != "x$as_lineno_2" &&
12002   test "x$as_lineno_3"  = "x$as_lineno_2"  || {
12003   # Find who we are.  Look in the path if we contain no path at all
12004   # relative or not.
12005   case $0 in
12006     *[\\/]* ) as_myself=$0 ;;
12007     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12008 for as_dir in $PATH
12009 do
12010   IFS=$as_save_IFS
12011   test -z "$as_dir" && as_dir=.
12012   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
12013 done
12014
12015        ;;
12016   esac
12017   # We did not find ourselves, most probably we were run as `sh COMMAND'
12018   # in which case we are not to be found in the path.
12019   if test "x$as_myself" = x; then
12020     as_myself=$0
12021   fi
12022   if test ! -f "$as_myself"; then
12023     { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
12024 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
12025    { (exit 1); exit 1; }; }
12026   fi
12027   case $CONFIG_SHELL in
12028   '')
12029     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12030 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
12031 do
12032   IFS=$as_save_IFS
12033   test -z "$as_dir" && as_dir=.
12034   for as_base in sh bash ksh sh5; do
12035          case $as_dir in
12036          /*)
12037            if ("$as_dir/$as_base" -c '
12038   as_lineno_1=$LINENO
12039   as_lineno_2=$LINENO
12040   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
12041   test "x$as_lineno_1" != "x$as_lineno_2" &&
12042   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
12043              $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
12044              $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
12045              CONFIG_SHELL=$as_dir/$as_base
12046              export CONFIG_SHELL
12047              exec "$CONFIG_SHELL" "$0" ${1+"$@"}
12048            fi;;
12049          esac
12050        done
12051 done
12052 ;;
12053   esac
12054
12055   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
12056   # uniformly replaced by the line number.  The first 'sed' inserts a
12057   # line-number line before each line; the second 'sed' does the real
12058   # work.  The second script uses 'N' to pair each line-number line
12059   # with the numbered line, and appends trailing '-' during
12060   # substitution so that $LINENO is not a special case at line end.
12061   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
12062   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
12063   sed '=' <$as_myself |
12064     sed '
12065       N
12066       s,$,-,
12067       : loop
12068       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
12069       t loop
12070       s,-$,,
12071       s,^['$as_cr_digits']*\n,,
12072     ' >$as_me.lineno &&
12073   chmod +x $as_me.lineno ||
12074     { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
12075 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
12076    { (exit 1); exit 1; }; }
12077
12078   # Don't try to exec as it changes $[0], causing all sort of problems
12079   # (the dirname of $[0] is not the place where we might find the
12080   # original and so on.  Autoconf is especially sensible to this).
12081   . ./$as_me.lineno
12082   # Exit status is that of the last command.
12083   exit
12084 }
12085
12086
12087 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
12088   *c*,-n*) ECHO_N= ECHO_C='
12089 ' ECHO_T='      ' ;;
12090   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
12091   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
12092 esac
12093
12094 if expr a : '\(a\)' >/dev/null 2>&1; then
12095   as_expr=expr
12096 else
12097   as_expr=false
12098 fi
12099
12100 rm -f conf$$ conf$$.exe conf$$.file
12101 echo >conf$$.file
12102 if ln -s conf$$.file conf$$ 2>/dev/null; then
12103   # We could just check for DJGPP; but this test a) works b) is more generic
12104   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
12105   if test -f conf$$.exe; then
12106     # Don't use ln at all; we don't have any links
12107     as_ln_s='cp -p'
12108   else
12109     as_ln_s='ln -s'
12110   fi
12111 elif ln conf$$.file conf$$ 2>/dev/null; then
12112   as_ln_s=ln
12113 else
12114   as_ln_s='cp -p'
12115 fi
12116 rm -f conf$$ conf$$.exe conf$$.file
12117
12118 if mkdir -p . 2>/dev/null; then
12119   as_mkdir_p=:
12120 else
12121   as_mkdir_p=false
12122 fi
12123
12124 as_executable_p="test -f"
12125
12126 # Sed expression to map a string onto a valid CPP name.
12127 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
12128
12129 # Sed expression to map a string onto a valid variable name.
12130 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
12131
12132
12133 # IFS
12134 # We need space, tab and new line, in precisely that order.
12135 as_nl='
12136 '
12137 IFS="   $as_nl"
12138
12139 # CDPATH.
12140 $as_unset CDPATH
12141
12142 exec 6>&1
12143
12144 # Open the log real soon, to keep \$[0] and so on meaningful, and to
12145 # report actual input values of CONFIG_FILES etc. instead of their
12146 # values after options handling.  Logging --version etc. is OK.
12147 exec 5>>config.log
12148 {
12149   echo
12150   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
12151 ## Running $as_me. ##
12152 _ASBOX
12153 } >&5
12154 cat >&5 <<_CSEOF
12155
12156 This file was extended by fGIS $as_me 0.0.2, which was
12157 generated by GNU Autoconf 2.56.  Invocation command line was
12158
12159   CONFIG_FILES    = $CONFIG_FILES
12160   CONFIG_HEADERS  = $CONFIG_HEADERS
12161   CONFIG_LINKS    = $CONFIG_LINKS
12162   CONFIG_COMMANDS = $CONFIG_COMMANDS
12163   $ $0 $@
12164
12165 _CSEOF
12166 echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
12167 echo >&5
12168 _ACEOF
12169
12170 # Files that config.status was made for.
12171 if test -n "$ac_config_files"; then
12172   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
12173 fi
12174
12175 if test -n "$ac_config_headers"; then
12176   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
12177 fi
12178
12179 if test -n "$ac_config_links"; then
12180   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
12181 fi
12182
12183 if test -n "$ac_config_commands"; then
12184   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
12185 fi
12186
12187 cat >>$CONFIG_STATUS <<\_ACEOF
12188
12189 ac_cs_usage="\
12190 \`$as_me' instantiates files from templates according to the
12191 current configuration.
12192
12193 Usage: $0 [OPTIONS] [FILE]...
12194
12195   -h, --help       print this help, then exit
12196   -V, --version    print version number, then exit
12197   -q, --quiet      do not print progress messages
12198   -d, --debug      don't remove temporary files
12199       --recheck    update $as_me by reconfiguring in the same conditions
12200   --file=FILE[:TEMPLATE]
12201                    instantiate the configuration file FILE
12202   --header=FILE[:TEMPLATE]
12203                    instantiate the configuration header FILE
12204
12205 Configuration files:
12206 $config_files
12207
12208 Configuration headers:
12209 $config_headers
12210
12211 Configuration commands:
12212 $config_commands
12213
12214 Report bugs to <bug-autoconf@gnu.org>."
12215 _ACEOF
12216
12217 cat >>$CONFIG_STATUS <<_ACEOF
12218 ac_cs_version="\\
12219 fGIS config.status 0.0.2
12220 configured by $0, generated by GNU Autoconf 2.56,
12221   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
12222
12223 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
12224 Free Software Foundation, Inc.
12225 This config.status script is free software; the Free Software Foundation
12226 gives unlimited permission to copy, distribute and modify it."
12227 srcdir=$srcdir
12228 INSTALL="$INSTALL"
12229 _ACEOF
12230
12231 cat >>$CONFIG_STATUS <<\_ACEOF
12232 # If no file are specified by the user, then we need to provide default
12233 # value.  By we need to know if files were specified by the user.
12234 ac_need_defaults=:
12235 while test $# != 0
12236 do
12237   case $1 in
12238   --*=*)
12239     ac_option=`expr "x$1" : 'x\([^=]*\)='`
12240     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
12241     ac_shift=:
12242     ;;
12243   -*)
12244     ac_option=$1
12245     ac_optarg=$2
12246     ac_shift=shift
12247     ;;
12248   *) # This is not an option, so the user has probably given explicit
12249      # arguments.
12250      ac_option=$1
12251      ac_need_defaults=false;;
12252   esac
12253
12254   case $ac_option in
12255   # Handling of the options.
12256 _ACEOF
12257 cat >>$CONFIG_STATUS <<\_ACEOF
12258   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
12259     ac_cs_recheck=: ;;
12260   --version | --vers* | -V )
12261     echo "$ac_cs_version"; exit 0 ;;
12262   --he | --h)
12263     # Conflict between --help and --header
12264     { { echo "$as_me:$LINENO: error: ambiguous option: $1
12265 Try \`$0 --help' for more information." >&5
12266 echo "$as_me: error: ambiguous option: $1
12267 Try \`$0 --help' for more information." >&2;}
12268    { (exit 1); exit 1; }; };;
12269   --help | --hel | -h )
12270     echo "$ac_cs_usage"; exit 0 ;;
12271   --debug | --d* | -d )
12272     debug=: ;;
12273   --file | --fil | --fi | --f )
12274     $ac_shift
12275     CONFIG_FILES="$CONFIG_FILES $ac_optarg"
12276     ac_need_defaults=false;;
12277   --header | --heade | --head | --hea )
12278     $ac_shift
12279     CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
12280     ac_need_defaults=false;;
12281   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
12282   | -silent | --silent | --silen | --sile | --sil | --si | --s)
12283     ac_cs_silent=: ;;
12284
12285   # This is an error.
12286   -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
12287 Try \`$0 --help' for more information." >&5
12288 echo "$as_me: error: unrecognized option: $1
12289 Try \`$0 --help' for more information." >&2;}
12290    { (exit 1); exit 1; }; } ;;
12291
12292   *) ac_config_targets="$ac_config_targets $1" ;;
12293
12294   esac
12295   shift
12296 done
12297
12298 ac_configure_extra_args=
12299
12300 if $ac_cs_silent; then
12301   exec 6>/dev/null
12302   ac_configure_extra_args="$ac_configure_extra_args --silent"
12303 fi
12304
12305 _ACEOF
12306 cat >>$CONFIG_STATUS <<_ACEOF
12307 if \$ac_cs_recheck; then
12308   echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
12309   exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
12310 fi
12311
12312 _ACEOF
12313
12314 cat >>$CONFIG_STATUS <<_ACEOF
12315 #
12316 # INIT-COMMANDS section.
12317 #
12318
12319
12320
12321 _ACEOF
12322
12323
12324
12325 cat >>$CONFIG_STATUS <<\_ACEOF
12326 for ac_config_target in $ac_config_targets
12327 do
12328   case "$ac_config_target" in
12329   # Handling of arguments.
12330   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
12331   "etc/Makefile" ) CONFIG_FILES="$CONFIG_FILES etc/Makefile" ;;
12332   "etc/fgis.rc" ) CONFIG_FILES="$CONFIG_FILES etc/fgis.rc" ;;
12333   "dll/Makefile" ) CONFIG_FILES="$CONFIG_FILES dll/Makefile" ;;
12334   "epu/Makefile" ) CONFIG_FILES="$CONFIG_FILES epu/Makefile" ;;
12335   "include/Makefile" ) CONFIG_FILES="$CONFIG_FILES include/Makefile" ;;
12336   "lib/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
12337   "tcl/Makefile" ) CONFIG_FILES="$CONFIG_FILES tcl/Makefile" ;;
12338   "tcl/pkgIndex.tcl" ) CONFIG_FILES="$CONFIG_FILES tcl/pkgIndex.tcl" ;;
12339   "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
12340   "include/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/config.h" ;;
12341   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
12342 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
12343    { (exit 1); exit 1; }; };;
12344   esac
12345 done
12346
12347 # If the user did not use the arguments to specify the items to instantiate,
12348 # then the envvar interface is used.  Set only those that are not.
12349 # We use the long form for the default assignment because of an extremely
12350 # bizarre bug on SunOS 4.1.3.
12351 if $ac_need_defaults; then
12352   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
12353   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
12354   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
12355 fi
12356
12357 # Have a temporary directory for convenience.  Make it in the build tree
12358 # simply because there is no reason to put it here, and in addition,
12359 # creating and moving files from /tmp can sometimes cause problems.
12360 # Create a temporary directory, and hook for its removal unless debugging.
12361 $debug ||
12362 {
12363   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
12364   trap '{ (exit 1); exit 1; }' 1 2 13 15
12365 }
12366
12367 # Create a (secure) tmp directory for tmp files.
12368
12369 {
12370   tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
12371   test -n "$tmp" && test -d "$tmp"
12372 }  ||
12373 {
12374   tmp=./confstat$$-$RANDOM
12375   (umask 077 && mkdir $tmp)
12376 } ||
12377 {
12378    echo "$me: cannot create a temporary directory in ." >&2
12379    { (exit 1); exit 1; }
12380 }
12381
12382 _ACEOF
12383
12384 cat >>$CONFIG_STATUS <<_ACEOF
12385
12386 #
12387 # CONFIG_FILES section.
12388 #
12389
12390 # No need to generate the scripts if there are no CONFIG_FILES.
12391 # This happens for instance when ./config.status config.h
12392 if test -n "\$CONFIG_FILES"; then
12393   # Protect against being on the right side of a sed subst in config.status.
12394   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
12395    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
12396 s,@SHELL@,$SHELL,;t t
12397 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
12398 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
12399 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
12400 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
12401 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
12402 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
12403 s,@exec_prefix@,$exec_prefix,;t t
12404 s,@prefix@,$prefix,;t t
12405 s,@program_transform_name@,$program_transform_name,;t t
12406 s,@bindir@,$bindir,;t t
12407 s,@sbindir@,$sbindir,;t t
12408 s,@libexecdir@,$libexecdir,;t t
12409 s,@datadir@,$datadir,;t t
12410 s,@sysconfdir@,$sysconfdir,;t t
12411 s,@sharedstatedir@,$sharedstatedir,;t t
12412 s,@localstatedir@,$localstatedir,;t t
12413 s,@libdir@,$libdir,;t t
12414 s,@includedir@,$includedir,;t t
12415 s,@oldincludedir@,$oldincludedir,;t t
12416 s,@infodir@,$infodir,;t t
12417 s,@mandir@,$mandir,;t t
12418 s,@build_alias@,$build_alias,;t t
12419 s,@host_alias@,$host_alias,;t t
12420 s,@target_alias@,$target_alias,;t t
12421 s,@DEFS@,$DEFS,;t t
12422 s,@ECHO_C@,$ECHO_C,;t t
12423 s,@ECHO_N@,$ECHO_N,;t t
12424 s,@ECHO_T@,$ECHO_T,;t t
12425 s,@LIBS@,$LIBS,;t t
12426 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
12427 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
12428 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
12429 s,@PACKAGE@,$PACKAGE,;t t
12430 s,@VERSION@,$VERSION,;t t
12431 s,@ACLOCAL@,$ACLOCAL,;t t
12432 s,@AUTOCONF@,$AUTOCONF,;t t
12433 s,@AUTOMAKE@,$AUTOMAKE,;t t
12434 s,@AUTOHEADER@,$AUTOHEADER,;t t
12435 s,@MAKEINFO@,$MAKEINFO,;t t
12436 s,@SET_MAKE@,$SET_MAKE,;t t
12437 s,@build@,$build,;t t
12438 s,@build_cpu@,$build_cpu,;t t
12439 s,@build_vendor@,$build_vendor,;t t
12440 s,@build_os@,$build_os,;t t
12441 s,@host@,$host,;t t
12442 s,@host_cpu@,$host_cpu,;t t
12443 s,@host_vendor@,$host_vendor,;t t
12444 s,@host_os@,$host_os,;t t
12445 s,@CC@,$CC,;t t
12446 s,@CFLAGS@,$CFLAGS,;t t
12447 s,@LDFLAGS@,$LDFLAGS,;t t
12448 s,@CPPFLAGS@,$CPPFLAGS,;t t
12449 s,@ac_ct_CC@,$ac_ct_CC,;t t
12450 s,@EXEEXT@,$EXEEXT,;t t
12451 s,@OBJEXT@,$OBJEXT,;t t
12452 s,@LN_S@,$LN_S,;t t
12453 s,@ECHO@,$ECHO,;t t
12454 s,@RANLIB@,$RANLIB,;t t
12455 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
12456 s,@STRIP@,$STRIP,;t t
12457 s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
12458 s,@CPP@,$CPP,;t t
12459 s,@EGREP@,$EGREP,;t t
12460 s,@LIBTOOL@,$LIBTOOL,;t t
12461 s,@YACC@,$YACC,;t t
12462 s,@ALLOCA@,$ALLOCA,;t t
12463 s,@LIBOBJS@,$LIBOBJS,;t t
12464 s,@POW_LIB@,$POW_LIB,;t t
12465 s,@FGIS_CONFDIR@,$FGIS_CONFDIR,;t t
12466 s,@FGIS_LIBDIR@,$FGIS_LIBDIR,;t t
12467 s,@FGIS_SCRIPTDIR@,$FGIS_SCRIPTDIR,;t t
12468 s,@LIBEPP@,$LIBEPP,;t t
12469 s,@TCLHDIR@,$TCLHDIR,;t t
12470 s,@TCLHDIRDASHI@,$TCLHDIRDASHI,;t t
12471 s,@TCL_LIBRARY@,$TCL_LIBRARY,;t t
12472 s,@TCL_DEFS@,$TCL_DEFS,;t t
12473 s,@TCL_DELETEME@,$TCL_DELETEME,;t t
12474 s,@TCL_DBGX@,$TCL_DBGX,;t t
12475 s,@TCL_EXEC_PREFIX@,$TCL_EXEC_PREFIX,;t t
12476 s,@TCL_SHLIB_LD@,$TCL_SHLIB_LD,;t t
12477 s,@SHLIB_SUFFIX@,$SHLIB_SUFFIX,;t t
12478 s,@TCL_LD_FLAGS@,$TCL_LD_FLAGS,;t t
12479 s,@TCL_BUILD_LIB_SPEC@,$TCL_BUILD_LIB_SPEC,;t t
12480 s,@TCL_LIB_SPEC@,$TCL_LIB_SPEC,;t t
12481 s,@TCL_SHARED_LIB_SUFFIX@,$TCL_SHARED_LIB_SUFFIX,;t t
12482 s,@TCL_INC_DIR@,$TCL_INC_DIR,;t t
12483 s,@TCL_PACKAGE_PATH@,$TCL_PACKAGE_PATH,;t t
12484 s,@TKHDIRDASHI@,$TKHDIRDASHI,;t t
12485 s,@TK_VERSION@,$TK_VERSION,;t t
12486 s,@TK_DEFS@,$TK_DEFS,;t t
12487 s,@TK_DBGX@,$TK_DBGX,;t t
12488 s,@TK_XINCLUDES@,$TK_XINCLUDES,;t t
12489 s,@TK_XLIBSW@,$TK_XLIBSW,;t t
12490 s,@TK_BUILD_LIB_SPEC@,$TK_BUILD_LIB_SPEC,;t t
12491 s,@TK_LIB_SPEC@,$TK_LIB_SPEC,;t t
12492 s,@TK_INC_DIR@,$TK_INC_DIR,;t t
12493 s,@GDAL_INC@,$GDAL_INC,;t t
12494 s,@LTLIBOBJS@,$LTLIBOBJS,;t t
12495 CEOF
12496
12497 _ACEOF
12498
12499   cat >>$CONFIG_STATUS <<\_ACEOF
12500   # Split the substitutions into bite-sized pieces for seds with
12501   # small command number limits, like on Digital OSF/1 and HP-UX.
12502   ac_max_sed_lines=48
12503   ac_sed_frag=1 # Number of current file.
12504   ac_beg=1 # First line for current file.
12505   ac_end=$ac_max_sed_lines # Line after last line for current file.
12506   ac_more_lines=:
12507   ac_sed_cmds=
12508   while $ac_more_lines; do
12509     if test $ac_beg -gt 1; then
12510       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
12511     else
12512       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
12513     fi
12514     if test ! -s $tmp/subs.frag; then
12515       ac_more_lines=false
12516     else
12517       # The purpose of the label and of the branching condition is to
12518       # speed up the sed processing (if there are no `@' at all, there
12519       # is no need to browse any of the substitutions).
12520       # These are the two extra sed commands mentioned above.
12521       (echo ':t
12522   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
12523       if test -z "$ac_sed_cmds"; then
12524         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
12525       else
12526         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
12527       fi
12528       ac_sed_frag=`expr $ac_sed_frag + 1`
12529       ac_beg=$ac_end
12530       ac_end=`expr $ac_end + $ac_max_sed_lines`
12531     fi
12532   done
12533   if test -z "$ac_sed_cmds"; then
12534     ac_sed_cmds=cat
12535   fi
12536 fi # test -n "$CONFIG_FILES"
12537
12538 _ACEOF
12539 cat >>$CONFIG_STATUS <<\_ACEOF
12540 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
12541   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
12542   case $ac_file in
12543   - | *:- | *:-:* ) # input from stdin
12544         cat >$tmp/stdin
12545         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
12546         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
12547   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
12548         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
12549   * )   ac_file_in=$ac_file.in ;;
12550   esac
12551
12552   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
12553   ac_dir=`(dirname "$ac_file") 2>/dev/null ||
12554 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
12555          X"$ac_file" : 'X\(//\)[^/]' \| \
12556          X"$ac_file" : 'X\(//\)$' \| \
12557          X"$ac_file" : 'X\(/\)' \| \
12558          .     : '\(.\)' 2>/dev/null ||
12559 echo X"$ac_file" |
12560     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
12561           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
12562           /^X\(\/\/\)$/{ s//\1/; q; }
12563           /^X\(\/\).*/{ s//\1/; q; }
12564           s/.*/./; q'`
12565   { if $as_mkdir_p; then
12566     mkdir -p "$ac_dir"
12567   else
12568     as_dir="$ac_dir"
12569     as_dirs=
12570     while test ! -d "$as_dir"; do
12571       as_dirs="$as_dir $as_dirs"
12572       as_dir=`(dirname "$as_dir") 2>/dev/null ||
12573 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
12574          X"$as_dir" : 'X\(//\)[^/]' \| \
12575          X"$as_dir" : 'X\(//\)$' \| \
12576          X"$as_dir" : 'X\(/\)' \| \
12577          .     : '\(.\)' 2>/dev/null ||
12578 echo X"$as_dir" |
12579     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
12580           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
12581           /^X\(\/\/\)$/{ s//\1/; q; }
12582           /^X\(\/\).*/{ s//\1/; q; }
12583           s/.*/./; q'`
12584     done
12585     test ! -n "$as_dirs" || mkdir $as_dirs
12586   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
12587 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
12588    { (exit 1); exit 1; }; }; }
12589
12590   ac_builddir=.
12591
12592 if test "$ac_dir" != .; then
12593   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
12594   # A "../" for each directory in $ac_dir_suffix.
12595   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
12596 else
12597   ac_dir_suffix= ac_top_builddir=
12598 fi
12599
12600 case $srcdir in
12601   .)  # No --srcdir option.  We are building in place.
12602     ac_srcdir=.
12603     if test -z "$ac_top_builddir"; then
12604        ac_top_srcdir=.
12605     else
12606        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
12607     fi ;;
12608   [\\/]* | ?:[\\/]* )  # Absolute path.
12609     ac_srcdir=$srcdir$ac_dir_suffix;
12610     ac_top_srcdir=$srcdir ;;
12611   *) # Relative path.
12612     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
12613     ac_top_srcdir=$ac_top_builddir$srcdir ;;
12614 esac
12615 # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
12616 # absolute.
12617 ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
12618 ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
12619 ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
12620 ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
12621
12622
12623   case $INSTALL in
12624   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
12625   *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
12626   esac
12627
12628   if test x"$ac_file" != x-; then
12629     { echo "$as_me:$LINENO: creating $ac_file" >&5
12630 echo "$as_me: creating $ac_file" >&6;}
12631     rm -f "$ac_file"
12632   fi
12633   # Let's still pretend it is `configure' which instantiates (i.e., don't
12634   # use $as_me), people would be surprised to read:
12635   #    /* config.h.  Generated by config.status.  */
12636   if test x"$ac_file" = x-; then
12637     configure_input=
12638   else
12639     configure_input="$ac_file.  "
12640   fi
12641   configure_input=$configure_input"Generated from `echo $ac_file_in |
12642                                      sed 's,.*/,,'` by configure."
12643
12644   # First look for the input files in the build tree, otherwise in the
12645   # src tree.
12646   ac_file_inputs=`IFS=:
12647     for f in $ac_file_in; do
12648       case $f in
12649       -) echo $tmp/stdin ;;
12650       [\\/$]*)
12651          # Absolute (can't be DOS-style, as IFS=:)
12652          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
12653 echo "$as_me: error: cannot find input file: $f" >&2;}
12654    { (exit 1); exit 1; }; }
12655          echo $f;;
12656       *) # Relative
12657          if test -f "$f"; then
12658            # Build tree
12659            echo $f
12660          elif test -f "$srcdir/$f"; then
12661            # Source tree
12662            echo $srcdir/$f
12663          else
12664            # /dev/null tree
12665            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
12666 echo "$as_me: error: cannot find input file: $f" >&2;}
12667    { (exit 1); exit 1; }; }
12668          fi;;
12669       esac
12670     done` || { (exit 1); exit 1; }
12671 _ACEOF
12672 cat >>$CONFIG_STATUS <<_ACEOF
12673   sed "$ac_vpsub
12674 $extrasub
12675 _ACEOF
12676 cat >>$CONFIG_STATUS <<\_ACEOF
12677 :t
12678 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
12679 s,@configure_input@,$configure_input,;t t
12680 s,@srcdir@,$ac_srcdir,;t t
12681 s,@abs_srcdir@,$ac_abs_srcdir,;t t
12682 s,@top_srcdir@,$ac_top_srcdir,;t t
12683 s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
12684 s,@builddir@,$ac_builddir,;t t
12685 s,@abs_builddir@,$ac_abs_builddir,;t t
12686 s,@top_builddir@,$ac_top_builddir,;t t
12687 s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
12688 s,@INSTALL@,$ac_INSTALL,;t t
12689 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
12690   rm -f $tmp/stdin
12691   if test x"$ac_file" != x-; then
12692     mv $tmp/out $ac_file
12693   else
12694     cat $tmp/out
12695     rm -f $tmp/out
12696   fi
12697
12698 done
12699 _ACEOF
12700 cat >>$CONFIG_STATUS <<\_ACEOF
12701
12702 #
12703 # CONFIG_HEADER section.
12704 #
12705
12706 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
12707 # NAME is the cpp macro being defined and VALUE is the value it is being given.
12708 #
12709 # ac_d sets the value in "#define NAME VALUE" lines.
12710 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
12711 ac_dB='[        ].*$,\1#\2'
12712 ac_dC=' '
12713 ac_dD=',;t'
12714 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
12715 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
12716 ac_uB='$,\1#\2define\3'
12717 ac_uC=' '
12718 ac_uD=',;t'
12719
12720 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
12721   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
12722   case $ac_file in
12723   - | *:- | *:-:* ) # input from stdin
12724         cat >$tmp/stdin
12725         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
12726         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
12727   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
12728         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
12729   * )   ac_file_in=$ac_file.in ;;
12730   esac
12731
12732   test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
12733 echo "$as_me: creating $ac_file" >&6;}
12734
12735   # First look for the input files in the build tree, otherwise in the
12736   # src tree.
12737   ac_file_inputs=`IFS=:
12738     for f in $ac_file_in; do
12739       case $f in
12740       -) echo $tmp/stdin ;;
12741       [\\/$]*)
12742          # Absolute (can't be DOS-style, as IFS=:)
12743          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
12744 echo "$as_me: error: cannot find input file: $f" >&2;}
12745    { (exit 1); exit 1; }; }
12746          echo $f;;
12747       *) # Relative
12748          if test -f "$f"; then
12749            # Build tree
12750            echo $f
12751          elif test -f "$srcdir/$f"; then
12752            # Source tree
12753            echo $srcdir/$f
12754          else
12755            # /dev/null tree
12756            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
12757 echo "$as_me: error: cannot find input file: $f" >&2;}
12758    { (exit 1); exit 1; }; }
12759          fi;;
12760       esac
12761     done` || { (exit 1); exit 1; }
12762   # Remove the trailing spaces.
12763   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
12764
12765 _ACEOF
12766
12767 # Transform confdefs.h into two sed scripts, `conftest.defines' and
12768 # `conftest.undefs', that substitutes the proper values into
12769 # config.h.in to produce config.h.  The first handles `#define'
12770 # templates, and the second `#undef' templates.
12771 # And first: Protect against being on the right side of a sed subst in
12772 # config.status.  Protect against being in an unquoted here document
12773 # in config.status.
12774 rm -f conftest.defines conftest.undefs
12775 # Using a here document instead of a string reduces the quoting nightmare.
12776 # Putting comments in sed scripts is not portable.
12777 #
12778 # `end' is used to avoid that the second main sed command (meant for
12779 # 0-ary CPP macros) applies to n-ary macro definitions.
12780 # See the Autoconf documentation for `clear'.
12781 cat >confdef2sed.sed <<\_ACEOF
12782 s/[\\&,]/\\&/g
12783 s,[\\$`],\\&,g
12784 t clear
12785 : clear
12786 s,^[    ]*#[    ]*define[       ][      ]*\([^  (][^    (]*\)\(([^)]*)\)[       ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
12787 t end
12788 s,^[    ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
12789 : end
12790 _ACEOF
12791 # If some macros were called several times there might be several times
12792 # the same #defines, which is useless.  Nevertheless, we may not want to
12793 # sort them, since we want the *last* AC-DEFINE to be honored.
12794 uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
12795 sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
12796 rm -f confdef2sed.sed
12797
12798 # This sed command replaces #undef with comments.  This is necessary, for
12799 # example, in the case of _POSIX_SOURCE, which is predefined and required
12800 # on some systems where configure will not decide to define it.
12801 cat >>conftest.undefs <<\_ACEOF
12802 s,^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
12803 _ACEOF
12804
12805 # Break up conftest.defines because some shells have a limit on the size
12806 # of here documents, and old seds have small limits too (100 cmds).
12807 echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
12808 echo '  if grep "^[     ]*#[    ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
12809 echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
12810 echo '  :' >>$CONFIG_STATUS
12811 rm -f conftest.tail
12812 while grep . conftest.defines >/dev/null
12813 do
12814   # Write a limited-size here document to $tmp/defines.sed.
12815   echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
12816   # Speed up: don't consider the non `#define' lines.
12817   echo '/^[     ]*#[    ]*define/!b' >>$CONFIG_STATUS
12818   # Work around the forget-to-reset-the-flag bug.
12819   echo 't clr' >>$CONFIG_STATUS
12820   echo ': clr' >>$CONFIG_STATUS
12821   sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
12822   echo 'CEOF
12823   sed -f $tmp/defines.sed $tmp/in >$tmp/out
12824   rm -f $tmp/in
12825   mv $tmp/out $tmp/in
12826 ' >>$CONFIG_STATUS
12827   sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
12828   rm -f conftest.defines
12829   mv conftest.tail conftest.defines
12830 done
12831 rm -f conftest.defines
12832 echo '  fi # grep' >>$CONFIG_STATUS
12833 echo >>$CONFIG_STATUS
12834
12835 # Break up conftest.undefs because some shells have a limit on the size
12836 # of here documents, and old seds have small limits too (100 cmds).
12837 echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
12838 rm -f conftest.tail
12839 while grep . conftest.undefs >/dev/null
12840 do
12841   # Write a limited-size here document to $tmp/undefs.sed.
12842   echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
12843   # Speed up: don't consider the non `#undef'
12844   echo '/^[     ]*#[    ]*undef/!b' >>$CONFIG_STATUS
12845   # Work around the forget-to-reset-the-flag bug.
12846   echo 't clr' >>$CONFIG_STATUS
12847   echo ': clr' >>$CONFIG_STATUS
12848   sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
12849   echo 'CEOF
12850   sed -f $tmp/undefs.sed $tmp/in >$tmp/out
12851   rm -f $tmp/in
12852   mv $tmp/out $tmp/in
12853 ' >>$CONFIG_STATUS
12854   sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
12855   rm -f conftest.undefs
12856   mv conftest.tail conftest.undefs
12857 done
12858 rm -f conftest.undefs
12859
12860 cat >>$CONFIG_STATUS <<\_ACEOF
12861   # Let's still pretend it is `configure' which instantiates (i.e., don't
12862   # use $as_me), people would be surprised to read:
12863   #    /* config.h.  Generated by config.status.  */
12864   if test x"$ac_file" = x-; then
12865     echo "/* Generated by configure.  */" >$tmp/config.h
12866   else
12867     echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
12868   fi
12869   cat $tmp/in >>$tmp/config.h
12870   rm -f $tmp/in
12871   if test x"$ac_file" != x-; then
12872     if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
12873       { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
12874 echo "$as_me: $ac_file is unchanged" >&6;}
12875     else
12876       ac_dir=`(dirname "$ac_file") 2>/dev/null ||
12877 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
12878          X"$ac_file" : 'X\(//\)[^/]' \| \
12879          X"$ac_file" : 'X\(//\)$' \| \
12880          X"$ac_file" : 'X\(/\)' \| \
12881          .     : '\(.\)' 2>/dev/null ||
12882 echo X"$ac_file" |
12883     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
12884           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
12885           /^X\(\/\/\)$/{ s//\1/; q; }
12886           /^X\(\/\).*/{ s//\1/; q; }
12887           s/.*/./; q'`
12888       { if $as_mkdir_p; then
12889     mkdir -p "$ac_dir"
12890   else
12891     as_dir="$ac_dir"
12892     as_dirs=
12893     while test ! -d "$as_dir"; do
12894       as_dirs="$as_dir $as_dirs"
12895       as_dir=`(dirname "$as_dir") 2>/dev/null ||
12896 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
12897          X"$as_dir" : 'X\(//\)[^/]' \| \
12898          X"$as_dir" : 'X\(//\)$' \| \
12899          X"$as_dir" : 'X\(/\)' \| \
12900          .     : '\(.\)' 2>/dev/null ||
12901 echo X"$as_dir" |
12902     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
12903           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
12904           /^X\(\/\/\)$/{ s//\1/; q; }
12905           /^X\(\/\).*/{ s//\1/; q; }
12906           s/.*/./; q'`
12907     done
12908     test ! -n "$as_dirs" || mkdir $as_dirs
12909   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
12910 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
12911    { (exit 1); exit 1; }; }; }
12912
12913       rm -f $ac_file
12914       mv $tmp/config.h $ac_file
12915     fi
12916   else
12917     cat $tmp/config.h
12918     rm -f $tmp/config.h
12919   fi
12920 done
12921 _ACEOF
12922 cat >>$CONFIG_STATUS <<\_ACEOF
12923
12924 #
12925 # CONFIG_COMMANDS section.
12926 #
12927 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
12928   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
12929   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
12930   ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
12931 $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
12932          X"$ac_dest" : 'X\(//\)[^/]' \| \
12933          X"$ac_dest" : 'X\(//\)$' \| \
12934          X"$ac_dest" : 'X\(/\)' \| \
12935          .     : '\(.\)' 2>/dev/null ||
12936 echo X"$ac_dest" |
12937     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
12938           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
12939           /^X\(\/\/\)$/{ s//\1/; q; }
12940           /^X\(\/\).*/{ s//\1/; q; }
12941           s/.*/./; q'`
12942   ac_builddir=.
12943
12944 if test "$ac_dir" != .; then
12945   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
12946   # A "../" for each directory in $ac_dir_suffix.
12947   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
12948 else
12949   ac_dir_suffix= ac_top_builddir=
12950 fi
12951
12952 case $srcdir in
12953   .)  # No --srcdir option.  We are building in place.
12954     ac_srcdir=.
12955     if test -z "$ac_top_builddir"; then
12956        ac_top_srcdir=.
12957     else
12958        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
12959     fi ;;
12960   [\\/]* | ?:[\\/]* )  # Absolute path.
12961     ac_srcdir=$srcdir$ac_dir_suffix;
12962     ac_top_srcdir=$srcdir ;;
12963   *) # Relative path.
12964     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
12965     ac_top_srcdir=$ac_top_builddir$srcdir ;;
12966 esac
12967 # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
12968 # absolute.
12969 ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
12970 ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
12971 ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
12972 ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
12973
12974
12975   { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
12976 echo "$as_me: executing $ac_dest commands" >&6;}
12977   case $ac_dest in
12978     default-1 ) test -z "$CONFIG_HEADERS" || echo timestamp > include/stamp-h ;;
12979   esac
12980 done
12981 _ACEOF
12982
12983 cat >>$CONFIG_STATUS <<\_ACEOF
12984
12985 { (exit 0); exit 0; }
12986 _ACEOF
12987 chmod +x $CONFIG_STATUS
12988 ac_clean_files=$ac_clean_files_save
12989
12990
12991 # configure is writing to config.log, and then calls config.status.
12992 # config.status does its own redirection, appending to config.log.
12993 # Unfortunately, on DOS this fails, as config.log is still kept open
12994 # by configure, so config.status won't be able to write to it; its
12995 # output is simply discarded.  So we exec the FD to /dev/null,
12996 # effectively closing config.log, so it can be properly (re)opened and
12997 # appended to by config.status.  When coming back to configure, we
12998 # need to make the FD available again.
12999 if test "$no_create" != yes; then
13000   ac_cs_success=:
13001   ac_config_status_args=
13002   test "$silent" = yes &&
13003     ac_config_status_args="$ac_config_status_args --quiet"
13004   exec 5>/dev/null
13005   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
13006   exec 5>>config.log
13007   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
13008   # would make configure fail if this is the last instruction.
13009   $ac_cs_success || { (exit 1); exit 1; }
13010 fi
13011
13012