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