source: abuse/tags/pd/imlib/configure @ 49

Last change on this file since 49 was 49, checked in by Sam Hocevar, 12 years ago
  • Imported original public domain release, for future reference.
  • Property svn:executable set to *
File size: 82.0 KB
Line 
1#! /bin/sh
2
3# Guess values for system-dependent variables and create Makefiles.
4# Generated automatically using autoconf version 2.12
5# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6#
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
9
10# Defaults:
11ac_help=
12ac_default_prefix=/usr/local
13# Any additions from configure.in:
14ac_help="$ac_help
15  --with-x                use the X Window System"
16
17# Initialize some variables set by options.
18# The variables have the same names as the options, with
19# dashes changed to underlines.
20build=NONE
21cache_file=./config.cache
22exec_prefix=NONE
23host=NONE
24no_create=
25nonopt=NONE
26no_recursion=
27prefix=NONE
28program_prefix=NONE
29program_suffix=NONE
30program_transform_name=s,x,x,
31silent=
32site=
33srcdir=
34target=NONE
35verbose=
36x_includes=NONE
37x_libraries=NONE
38bindir='${exec_prefix}/bin'
39sbindir='${exec_prefix}/sbin'
40libexecdir='${exec_prefix}/libexec'
41datadir='${prefix}/share'
42sysconfdir='${prefix}/etc'
43sharedstatedir='${prefix}/com'
44localstatedir='${prefix}/var'
45libdir='${exec_prefix}/lib'
46includedir='${prefix}/include'
47oldincludedir='/usr/include'
48infodir='${prefix}/info'
49mandir='${prefix}/man'
50
51# Initialize some other variables.
52subdirs=
53MFLAGS= MAKEFLAGS=
54# Maximum number of lines to put in a shell here document.
55ac_max_here_lines=12
56
57ac_prev=
58for ac_option
59do
60
61  # If the previous option needs an argument, assign it.
62  if test -n "$ac_prev"; then
63    eval "$ac_prev=\$ac_option"
64    ac_prev=
65    continue
66  fi
67
68  case "$ac_option" in
69  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
70  *) ac_optarg= ;;
71  esac
72
73  # Accept the important Cygnus configure options, so we can diagnose typos.
74
75  case "$ac_option" in
76
77  -bindir | --bindir | --bindi | --bind | --bin | --bi)
78    ac_prev=bindir ;;
79  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
80    bindir="$ac_optarg" ;;
81
82  -build | --build | --buil | --bui | --bu)
83    ac_prev=build ;;
84  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
85    build="$ac_optarg" ;;
86
87  -cache-file | --cache-file | --cache-fil | --cache-fi \
88  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
89    ac_prev=cache_file ;;
90  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
91  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
92    cache_file="$ac_optarg" ;;
93
94  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
95    ac_prev=datadir ;;
96  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
97  | --da=*)
98    datadir="$ac_optarg" ;;
99
100  -disable-* | --disable-*)
101    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
102    # Reject names that are not valid shell variable names.
103    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
104      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
105    fi
106    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
107    eval "enable_${ac_feature}=no" ;;
108
109  -enable-* | --enable-*)
110    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
111    # Reject names that are not valid shell variable names.
112    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
113      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
114    fi
115    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
116    case "$ac_option" in
117      *=*) ;;
118      *) ac_optarg=yes ;;
119    esac
120    eval "enable_${ac_feature}='$ac_optarg'" ;;
121
122  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
123  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
124  | --exec | --exe | --ex)
125    ac_prev=exec_prefix ;;
126  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
127  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
128  | --exec=* | --exe=* | --ex=*)
129    exec_prefix="$ac_optarg" ;;
130
131  -gas | --gas | --ga | --g)
132    # Obsolete; use --with-gas.
133    with_gas=yes ;;
134
135  -help | --help | --hel | --he)
136    # Omit some internal or obsolete options to make the list less imposing.
137    # This message is too long to be a string in the A/UX 3.1 sh.
138    cat << EOF
139Usage: configure [options] [host]
140Options: [defaults in brackets after descriptions]
141Configuration:
142  --cache-file=FILE       cache test results in FILE
143  --help                  print this message
144  --no-create             do not create output files
145  --quiet, --silent       do not print \`checking...' messages
146  --version               print the version of autoconf that created configure
147Directory and file names:
148  --prefix=PREFIX         install architecture-independent files in PREFIX
149                          [$ac_default_prefix]
150  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
151                          [same as prefix]
152  --bindir=DIR            user executables in DIR [EPREFIX/bin]
153  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
154  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
155  --datadir=DIR           read-only architecture-independent data in DIR
156                          [PREFIX/share]
157  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
158  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
159                          [PREFIX/com]
160  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
161  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
162  --includedir=DIR        C header files in DIR [PREFIX/include]
163  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
164  --infodir=DIR           info documentation in DIR [PREFIX/info]
165  --mandir=DIR            man documentation in DIR [PREFIX/man]
166  --srcdir=DIR            find the sources in DIR [configure dir or ..]
167  --program-prefix=PREFIX prepend PREFIX to installed program names
168  --program-suffix=SUFFIX append SUFFIX to installed program names
169  --program-transform-name=PROGRAM
170                          run sed PROGRAM on installed program names
171EOF
172    cat << EOF
173Host type:
174  --build=BUILD           configure for building on BUILD [BUILD=HOST]
175  --host=HOST             configure for HOST [guessed]
176  --target=TARGET         configure for TARGET [TARGET=HOST]
177Features and packages:
178  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
179  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
180  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
181  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
182  --x-includes=DIR        X include files are in DIR
183  --x-libraries=DIR       X library files are in DIR
184EOF
185    if test -n "$ac_help"; then
186      echo "--enable and --with options recognized:$ac_help"
187    fi
188    exit 0 ;;
189
190  -host | --host | --hos | --ho)
191    ac_prev=host ;;
192  -host=* | --host=* | --hos=* | --ho=*)
193    host="$ac_optarg" ;;
194
195  -includedir | --includedir | --includedi | --included | --include \
196  | --includ | --inclu | --incl | --inc)
197    ac_prev=includedir ;;
198  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
199  | --includ=* | --inclu=* | --incl=* | --inc=*)
200    includedir="$ac_optarg" ;;
201
202  -infodir | --infodir | --infodi | --infod | --info | --inf)
203    ac_prev=infodir ;;
204  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
205    infodir="$ac_optarg" ;;
206
207  -libdir | --libdir | --libdi | --libd)
208    ac_prev=libdir ;;
209  -libdir=* | --libdir=* | --libdi=* | --libd=*)
210    libdir="$ac_optarg" ;;
211
212  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
213  | --libexe | --libex | --libe)
214    ac_prev=libexecdir ;;
215  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
216  | --libexe=* | --libex=* | --libe=*)
217    libexecdir="$ac_optarg" ;;
218
219  -localstatedir | --localstatedir | --localstatedi | --localstated \
220  | --localstate | --localstat | --localsta | --localst \
221  | --locals | --local | --loca | --loc | --lo)
222    ac_prev=localstatedir ;;
223  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
224  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
225  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
226    localstatedir="$ac_optarg" ;;
227
228  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
229    ac_prev=mandir ;;
230  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
231    mandir="$ac_optarg" ;;
232
233  -nfp | --nfp | --nf)
234    # Obsolete; use --without-fp.
235    with_fp=no ;;
236
237  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
238  | --no-cr | --no-c)
239    no_create=yes ;;
240
241  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
242  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
243    no_recursion=yes ;;
244
245  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
246  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
247  | --oldin | --oldi | --old | --ol | --o)
248    ac_prev=oldincludedir ;;
249  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
250  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
251  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
252    oldincludedir="$ac_optarg" ;;
253
254  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
255    ac_prev=prefix ;;
256  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
257    prefix="$ac_optarg" ;;
258
259  -program-prefix | --program-prefix | --program-prefi | --program-pref \
260  | --program-pre | --program-pr | --program-p)
261    ac_prev=program_prefix ;;
262  -program-prefix=* | --program-prefix=* | --program-prefi=* \
263  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
264    program_prefix="$ac_optarg" ;;
265
266  -program-suffix | --program-suffix | --program-suffi | --program-suff \
267  | --program-suf | --program-su | --program-s)
268    ac_prev=program_suffix ;;
269  -program-suffix=* | --program-suffix=* | --program-suffi=* \
270  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
271    program_suffix="$ac_optarg" ;;
272
273  -program-transform-name | --program-transform-name \
274  | --program-transform-nam | --program-transform-na \
275  | --program-transform-n | --program-transform- \
276  | --program-transform | --program-transfor \
277  | --program-transfo | --program-transf \
278  | --program-trans | --program-tran \
279  | --progr-tra | --program-tr | --program-t)
280    ac_prev=program_transform_name ;;
281  -program-transform-name=* | --program-transform-name=* \
282  | --program-transform-nam=* | --program-transform-na=* \
283  | --program-transform-n=* | --program-transform-=* \
284  | --program-transform=* | --program-transfor=* \
285  | --program-transfo=* | --program-transf=* \
286  | --program-trans=* | --program-tran=* \
287  | --progr-tra=* | --program-tr=* | --program-t=*)
288    program_transform_name="$ac_optarg" ;;
289
290  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
291  | -silent | --silent | --silen | --sile | --sil)
292    silent=yes ;;
293
294  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
295    ac_prev=sbindir ;;
296  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
297  | --sbi=* | --sb=*)
298    sbindir="$ac_optarg" ;;
299
300  -sharedstatedir | --sharedstatedir | --sharedstatedi \
301  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
302  | --sharedst | --shareds | --shared | --share | --shar \
303  | --sha | --sh)
304    ac_prev=sharedstatedir ;;
305  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
306  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
307  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
308  | --sha=* | --sh=*)
309    sharedstatedir="$ac_optarg" ;;
310
311  -site | --site | --sit)
312    ac_prev=site ;;
313  -site=* | --site=* | --sit=*)
314    site="$ac_optarg" ;;
315
316  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
317    ac_prev=srcdir ;;
318  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
319    srcdir="$ac_optarg" ;;
320
321  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
322  | --syscon | --sysco | --sysc | --sys | --sy)
323    ac_prev=sysconfdir ;;
324  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
325  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
326    sysconfdir="$ac_optarg" ;;
327
328  -target | --target | --targe | --targ | --tar | --ta | --t)
329    ac_prev=target ;;
330  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
331    target="$ac_optarg" ;;
332
333  -v | -verbose | --verbose | --verbos | --verbo | --verb)
334    verbose=yes ;;
335
336  -version | --version | --versio | --versi | --vers)
337    echo "configure generated by autoconf version 2.12"
338    exit 0 ;;
339
340  -with-* | --with-*)
341    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
342    # Reject names that are not valid shell variable names.
343    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
344      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
345    fi
346    ac_package=`echo $ac_package| sed 's/-/_/g'`
347    case "$ac_option" in
348      *=*) ;;
349      *) ac_optarg=yes ;;
350    esac
351    eval "with_${ac_package}='$ac_optarg'" ;;
352
353  -without-* | --without-*)
354    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
355    # Reject names that are not valid shell variable names.
356    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
357      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
358    fi
359    ac_package=`echo $ac_package| sed 's/-/_/g'`
360    eval "with_${ac_package}=no" ;;
361
362  --x)
363    # Obsolete; use --with-x.
364    with_x=yes ;;
365
366  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
367  | --x-incl | --x-inc | --x-in | --x-i)
368    ac_prev=x_includes ;;
369  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
370  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
371    x_includes="$ac_optarg" ;;
372
373  -x-libraries | --x-libraries | --x-librarie | --x-librari \
374  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
375    ac_prev=x_libraries ;;
376  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
377  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
378    x_libraries="$ac_optarg" ;;
379
380  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
381    ;;
382
383  *)
384    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
385      echo "configure: warning: $ac_option: invalid host type" 1>&2
386    fi
387    if test "x$nonopt" != xNONE; then
388      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
389    fi
390    nonopt="$ac_option"
391    ;;
392
393  esac
394done
395
396if test -n "$ac_prev"; then
397  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
398fi
399
400trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
401
402# File descriptor usage:
403# 0 standard input
404# 1 file creation
405# 2 errors and warnings
406# 3 some systems may open it to /dev/tty
407# 4 used on the Kubota Titan
408# 6 checking for... messages and results
409# 5 compiler messages saved in config.log
410if test "$silent" = yes; then
411  exec 6>/dev/null
412else
413  exec 6>&1
414fi
415exec 5>./config.log
416
417echo "\
418This file contains any messages produced by compilers while
419running configure, to aid debugging if configure makes a mistake.
420" 1>&5
421
422# Strip out --no-create and --no-recursion so they do not pile up.
423# Also quote any args containing shell metacharacters.
424ac_configure_args=
425for ac_arg
426do
427  case "$ac_arg" in
428  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
429  | --no-cr | --no-c) ;;
430  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
431  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
432  *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
433  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
434  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
435  esac
436done
437
438# NLS nuisances.
439# Only set these to C if already set.  These must not be set unconditionally
440# because not all systems understand e.g. LANG=C (notably SCO).
441# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
442# Non-C LC_CTYPE values break the ctype check.
443if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
444if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
445if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
446if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
447
448# confdefs.h avoids OS command line length limits that DEFS can exceed.
449rm -rf conftest* confdefs.h
450# AIX cpp loses on an empty file, so make sure it contains at least a newline.
451echo > confdefs.h
452
453# A filename unique to this package, relative to the directory that
454# configure is in, which we can look for to find out if srcdir is correct.
455ac_unique_file=jwindow.c
456
457# Find the source files, if location was not specified.
458if test -z "$srcdir"; then
459  ac_srcdir_defaulted=yes
460  # Try the directory containing this script, then its parent.
461  ac_prog=$0
462  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
463  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
464  srcdir=$ac_confdir
465  if test ! -r $srcdir/$ac_unique_file; then
466    srcdir=..
467  fi
468else
469  ac_srcdir_defaulted=no
470fi
471if test ! -r $srcdir/$ac_unique_file; then
472  if test "$ac_srcdir_defaulted" = yes; then
473    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
474  else
475    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
476  fi
477fi
478srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
479
480# Prefer explicitly selected file to automatically selected ones.
481if test -z "$CONFIG_SITE"; then
482  if test "x$prefix" != xNONE; then
483    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
484  else
485    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
486  fi
487fi
488for ac_site_file in $CONFIG_SITE; do
489  if test -r "$ac_site_file"; then
490    echo "loading site script $ac_site_file"
491    . "$ac_site_file"
492  fi
493done
494
495if test -r "$cache_file"; then
496  echo "loading cache $cache_file"
497  . $cache_file
498else
499  echo "creating cache $cache_file"
500  > $cache_file
501fi
502
503ac_ext=c
504# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
505ac_cpp='$CPP $CPPFLAGS'
506ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
507ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
508cross_compiling=$ac_cv_prog_cc_cross
509
510if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
511  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
512  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
513    ac_n= ac_c='
514' ac_t='        '
515  else
516    ac_n=-n ac_c= ac_t=
517  fi
518else
519  ac_n= ac_c='\c' ac_t=
520fi
521
522
523ac_aux_dir=
524for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
525  if test -f $ac_dir/install-sh; then
526    ac_aux_dir=$ac_dir
527    ac_install_sh="$ac_aux_dir/install-sh -c"
528    break
529  elif test -f $ac_dir/install.sh; then
530    ac_aux_dir=$ac_dir
531    ac_install_sh="$ac_aux_dir/install.sh -c"
532    break
533  fi
534done
535if test -z "$ac_aux_dir"; then
536  { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
537fi
538ac_config_guess=$ac_aux_dir/config.guess
539ac_config_sub=$ac_aux_dir/config.sub
540ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
541
542# Find a good install program.  We prefer a C program (faster),
543# so one script is as good as another.  But avoid the broken or
544# incompatible versions:
545# SysV /etc/install, /usr/sbin/install
546# SunOS /usr/etc/install
547# IRIX /sbin/install
548# AIX /bin/install
549# AFS /usr/afsws/bin/install, which mishandles nonexistent args
550# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
551# ./install, which can be erroneously created by make from ./install.sh.
552echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
553echo "configure:554: checking for a BSD compatible install" >&5
554if test -z "$INSTALL"; then
555if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
556  echo $ac_n "(cached) $ac_c" 1>&6
557else
558    IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
559  for ac_dir in $PATH; do
560    # Account for people who put trailing slashes in PATH elements.
561    case "$ac_dir/" in
562    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
563    *)
564      # OSF1 and SCO ODT 3.0 have their own names for install.
565      for ac_prog in ginstall installbsd scoinst install; do
566        if test -f $ac_dir/$ac_prog; then
567          if test $ac_prog = install &&
568            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
569            # AIX install.  It has an incompatible calling convention.
570            # OSF/1 installbsd also uses dspmsg, but is usable.
571            :
572          else
573            ac_cv_path_install="$ac_dir/$ac_prog -c"
574            break 2
575          fi
576        fi
577      done
578      ;;
579    esac
580  done
581  IFS="$ac_save_IFS"
582
583fi
584  if test "${ac_cv_path_install+set}" = set; then
585    INSTALL="$ac_cv_path_install"
586  else
587    # As a last resort, use the slow shell script.  We don't cache a
588    # path for INSTALL within a source directory, because that will
589    # break other packages using the cache if that directory is
590    # removed, or if the path is relative.
591    INSTALL="$ac_install_sh"
592  fi
593fi
594echo "$ac_t""$INSTALL" 1>&6
595
596# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
597# It thinks the first close brace ends the variable substitution.
598test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
599
600test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
601
602
603test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
604
605
606PACKAGE=imlib
607
608VERSION=2.0
609
610if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
611  { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
612fi
613cat >> confdefs.h <<EOF
614#define PACKAGE "$PACKAGE"
615EOF
616
617cat >> confdefs.h <<EOF
618#define VERSION "$VERSION"
619EOF
620
621echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
622echo "configure:623: checking whether build environment is sane" >&5
623# Just in case
624sleep 1
625echo timestamp > conftestfile
626# Do `set' in a subshell so we don't clobber the current shell's
627# arguments.  Must try -L first in case configure is actually a
628# symlink; some systems play weird games with the mod time of symlinks
629# (eg FreeBSD returns the mod time of the symlink's containing
630# directory).
631if (
632   set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
633   if test "" = "X"; then
634      # -L didn't work.
635      set X `ls -t $srcdir/configure conftestfile`
636   fi
637   test "$2" = conftestfile
638   )
639then
640   # Ok.
641   :
642else
643   echo "configure: warning: newly created file is older than distributed files!
644Check your system clock" 1>&2
645fi
646rm -f conftest*
647echo "$ac_t""yes" 1>&6
648if test "$program_transform_name" = s,x,x,; then
649  program_transform_name=
650else
651  # Double any \ or $.  echo might interpret backslashes.
652  cat <<\EOF_SED > conftestsed
653s,\\,\\\\,g; s,\$,$$,g
654EOF_SED
655  program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
656  rm -f conftestsed
657fi
658test "$program_prefix" != NONE &&
659  program_transform_name="s,^,${program_prefix},; $program_transform_name"
660# Use a double $ so make ignores it.
661test "$program_suffix" != NONE &&
662  program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
663
664# sed with no file args requires a program.
665test "$program_transform_name" = "" && program_transform_name="s,x,x,"
666
667missing_dir=`cd $ac_aux_dir && pwd`
668echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
669echo "configure:670: checking for working aclocal" >&5
670# Run test in a subshell; some versions of sh will print an error if
671# an executable is not found, even if stderr is redirected.
672# Redirect stdin to placate older versions of autoconf.  Sigh.
673if (aclocal --version) < /dev/null > /dev/null 2>&1; then
674   ACLOCAL=aclocal
675   echo "$ac_t""found" 1>&6
676else
677   ACLOCAL="$missing_dir/missing aclocal"
678   echo "$ac_t""missing" 1>&6
679fi
680
681echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
682echo "configure:683: checking for working autoconf" >&5
683# Run test in a subshell; some versions of sh will print an error if
684# an executable is not found, even if stderr is redirected.
685# Redirect stdin to placate older versions of autoconf.  Sigh.
686if (autoconf --version) < /dev/null > /dev/null 2>&1; then
687   AUTOCONF=autoconf
688   echo "$ac_t""found" 1>&6
689else
690   AUTOCONF="$missing_dir/missing autoconf"
691   echo "$ac_t""missing" 1>&6
692fi
693
694echo $ac_n "checking for working automake""... $ac_c" 1>&6
695echo "configure:696: checking for working automake" >&5
696# Run test in a subshell; some versions of sh will print an error if
697# an executable is not found, even if stderr is redirected.
698# Redirect stdin to placate older versions of autoconf.  Sigh.
699if (automake --version) < /dev/null > /dev/null 2>&1; then
700   AUTOMAKE=automake
701   echo "$ac_t""found" 1>&6
702else
703   AUTOMAKE="$missing_dir/missing automake"
704   echo "$ac_t""missing" 1>&6
705fi
706
707echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
708echo "configure:709: checking for working autoheader" >&5
709# Run test in a subshell; some versions of sh will print an error if
710# an executable is not found, even if stderr is redirected.
711# Redirect stdin to placate older versions of autoconf.  Sigh.
712if (autoheader --version) < /dev/null > /dev/null 2>&1; then
713   AUTOHEADER=autoheader
714   echo "$ac_t""found" 1>&6
715else
716   AUTOHEADER="$missing_dir/missing autoheader"
717   echo "$ac_t""missing" 1>&6
718fi
719
720echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
721echo "configure:722: checking for working makeinfo" >&5
722# Run test in a subshell; some versions of sh will print an error if
723# an executable is not found, even if stderr is redirected.
724# Redirect stdin to placate older versions of autoconf.  Sigh.
725if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
726   MAKEINFO=makeinfo
727   echo "$ac_t""found" 1>&6
728else
729   MAKEINFO="$missing_dir/missing makeinfo"
730   echo "$ac_t""missing" 1>&6
731fi
732
733echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
734echo "configure:735: checking whether ${MAKE-make} sets \${MAKE}" >&5
735set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
736if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
737  echo $ac_n "(cached) $ac_c" 1>&6
738else
739  cat > conftestmake <<\EOF
740all:
741        @echo 'ac_maketemp="${MAKE}"'
742EOF
743# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
744eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
745if test -n "$ac_maketemp"; then
746  eval ac_cv_prog_make_${ac_make}_set=yes
747else
748  eval ac_cv_prog_make_${ac_make}_set=no
749fi
750rm -f conftestmake
751fi
752if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
753  echo "$ac_t""yes" 1>&6
754  SET_MAKE=
755else
756  echo "$ac_t""no" 1>&6
757  SET_MAKE="MAKE=${MAKE-make}"
758fi
759
760# Extract the first word of "gcc", so it can be a program name with args.
761set dummy gcc; ac_word=$2
762echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
763echo "configure:764: checking for $ac_word" >&5
764if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
765  echo $ac_n "(cached) $ac_c" 1>&6
766else
767  if test -n "$CC"; then
768  ac_cv_prog_CC="$CC" # Let the user override the test.
769else
770  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
771  for ac_dir in $PATH; do
772    test -z "$ac_dir" && ac_dir=.
773    if test -f $ac_dir/$ac_word; then
774      ac_cv_prog_CC="gcc"
775      break
776    fi
777  done
778  IFS="$ac_save_ifs"
779fi
780fi
781CC="$ac_cv_prog_CC"
782if test -n "$CC"; then
783  echo "$ac_t""$CC" 1>&6
784else
785  echo "$ac_t""no" 1>&6
786fi
787
788if test -z "$CC"; then
789  # Extract the first word of "cc", so it can be a program name with args.
790set dummy cc; ac_word=$2
791echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
792echo "configure:793: checking for $ac_word" >&5
793if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
794  echo $ac_n "(cached) $ac_c" 1>&6
795else
796  if test -n "$CC"; then
797  ac_cv_prog_CC="$CC" # Let the user override the test.
798else
799  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
800  ac_prog_rejected=no
801  for ac_dir in $PATH; do
802    test -z "$ac_dir" && ac_dir=.
803    if test -f $ac_dir/$ac_word; then
804      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
805        ac_prog_rejected=yes
806        continue
807      fi
808      ac_cv_prog_CC="cc"
809      break
810    fi
811  done
812  IFS="$ac_save_ifs"
813if test $ac_prog_rejected = yes; then
814  # We found a bogon in the path, so make sure we never use it.
815  set dummy $ac_cv_prog_CC
816  shift
817  if test $# -gt 0; then
818    # We chose a different compiler from the bogus one.
819    # However, it has the same basename, so the bogon will be chosen
820    # first if we set CC to just the basename; use the full file name.
821    shift
822    set dummy "$ac_dir/$ac_word" "$@"
823    shift
824    ac_cv_prog_CC="$@"
825  fi
826fi
827fi
828fi
829CC="$ac_cv_prog_CC"
830if test -n "$CC"; then
831  echo "$ac_t""$CC" 1>&6
832else
833  echo "$ac_t""no" 1>&6
834fi
835
836  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
837fi
838
839echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
840echo "configure:841: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
841
842ac_ext=c
843# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
844ac_cpp='$CPP $CPPFLAGS'
845ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
846ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
847cross_compiling=$ac_cv_prog_cc_cross
848
849cat > conftest.$ac_ext <<EOF
850#line 851 "configure"
851#include "confdefs.h"
852main(){return(0);}
853EOF
854if { (eval echo configure:855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
855  ac_cv_prog_cc_works=yes
856  # If we can't run a trivial program, we are probably using a cross compiler.
857  if (./conftest; exit) 2>/dev/null; then
858    ac_cv_prog_cc_cross=no
859  else
860    ac_cv_prog_cc_cross=yes
861  fi
862else
863  echo "configure: failed program was:" >&5
864  cat conftest.$ac_ext >&5
865  ac_cv_prog_cc_works=no
866fi
867rm -fr conftest*
868
869echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
870if test $ac_cv_prog_cc_works = no; then
871  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
872fi
873echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
874echo "configure:875: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
875echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
876cross_compiling=$ac_cv_prog_cc_cross
877
878echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
879echo "configure:880: checking whether we are using GNU C" >&5
880if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
881  echo $ac_n "(cached) $ac_c" 1>&6
882else
883  cat > conftest.c <<EOF
884#ifdef __GNUC__
885  yes;
886#endif
887EOF
888if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:889: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
889  ac_cv_prog_gcc=yes
890else
891  ac_cv_prog_gcc=no
892fi
893fi
894
895echo "$ac_t""$ac_cv_prog_gcc" 1>&6
896
897if test $ac_cv_prog_gcc = yes; then
898  GCC=yes
899  ac_test_CFLAGS="${CFLAGS+set}"
900  ac_save_CFLAGS="$CFLAGS"
901  CFLAGS=
902  echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
903echo "configure:904: checking whether ${CC-cc} accepts -g" >&5
904if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
905  echo $ac_n "(cached) $ac_c" 1>&6
906else
907  echo 'void f(){}' > conftest.c
908if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
909  ac_cv_prog_cc_g=yes
910else
911  ac_cv_prog_cc_g=no
912fi
913rm -f conftest*
914
915fi
916
917echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
918  if test "$ac_test_CFLAGS" = set; then
919    CFLAGS="$ac_save_CFLAGS"
920  elif test $ac_cv_prog_cc_g = yes; then
921    CFLAGS="-g -O2"
922  else
923    CFLAGS="-O2"
924  fi
925else
926  GCC=
927  test "${CFLAGS+set}" = set || CFLAGS="-g"
928fi
929
930echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
931echo "configure:932: checking how to run the C preprocessor" >&5
932# On Suns, sometimes $CPP names a directory.
933if test -n "$CPP" && test -d "$CPP"; then
934  CPP=
935fi
936if test -z "$CPP"; then
937if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
938  echo $ac_n "(cached) $ac_c" 1>&6
939else
940    # This must be in double quotes, not single quotes, because CPP may get
941  # substituted into the Makefile and "${CC-cc}" will confuse make.
942  CPP="${CC-cc} -E"
943  # On the NeXT, cc -E runs the code through the compiler's parser,
944  # not just through cpp.
945  cat > conftest.$ac_ext <<EOF
946#line 947 "configure"
947#include "confdefs.h"
948#include <assert.h>
949Syntax Error
950EOF
951ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
952{ (eval echo configure:953: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
953ac_err=`grep -v '^ *+' conftest.out`
954if test -z "$ac_err"; then
955  :
956else
957  echo "$ac_err" >&5
958  echo "configure: failed program was:" >&5
959  cat conftest.$ac_ext >&5
960  rm -rf conftest*
961  CPP="${CC-cc} -E -traditional-cpp"
962  cat > conftest.$ac_ext <<EOF
963#line 964 "configure"
964#include "confdefs.h"
965#include <assert.h>
966Syntax Error
967EOF
968ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
969{ (eval echo configure:970: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
970ac_err=`grep -v '^ *+' conftest.out`
971if test -z "$ac_err"; then
972  :
973else
974  echo "$ac_err" >&5
975  echo "configure: failed program was:" >&5
976  cat conftest.$ac_ext >&5
977  rm -rf conftest*
978  CPP=/lib/cpp
979fi
980rm -f conftest*
981fi
982rm -f conftest*
983  ac_cv_prog_CPP="$CPP"
984fi
985  CPP="$ac_cv_prog_CPP"
986else
987  ac_cv_prog_CPP="$CPP"
988fi
989echo "$ac_t""$CPP" 1>&6
990
991for ac_prog in $CCC c++ g++ gcc CC cxx cc++
992do
993# Extract the first word of "$ac_prog", so it can be a program name with args.
994set dummy $ac_prog; ac_word=$2
995echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
996echo "configure:997: checking for $ac_word" >&5
997if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
998  echo $ac_n "(cached) $ac_c" 1>&6
999else
1000  if test -n "$CXX"; then
1001  ac_cv_prog_CXX="$CXX" # Let the user override the test.
1002else
1003  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1004  for ac_dir in $PATH; do
1005    test -z "$ac_dir" && ac_dir=.
1006    if test -f $ac_dir/$ac_word; then
1007      ac_cv_prog_CXX="$ac_prog"
1008      break
1009    fi
1010  done
1011  IFS="$ac_save_ifs"
1012fi
1013fi
1014CXX="$ac_cv_prog_CXX"
1015if test -n "$CXX"; then
1016  echo "$ac_t""$CXX" 1>&6
1017else
1018  echo "$ac_t""no" 1>&6
1019fi
1020
1021test -n "$CXX" && break
1022done
1023test -n "$CXX" || CXX="gcc"
1024
1025
1026echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1027echo "configure:1028: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
1028
1029ac_ext=C
1030# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1031ac_cpp='$CXXCPP $CPPFLAGS'
1032ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1033ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1034cross_compiling=$ac_cv_prog_cxx_cross
1035
1036cat > conftest.$ac_ext <<EOF
1037#line 1038 "configure"
1038#include "confdefs.h"
1039main(){return(0);}
1040EOF
1041if { (eval echo configure:1042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1042  ac_cv_prog_cxx_works=yes
1043  # If we can't run a trivial program, we are probably using a cross compiler.
1044  if (./conftest; exit) 2>/dev/null; then
1045    ac_cv_prog_cxx_cross=no
1046  else
1047    ac_cv_prog_cxx_cross=yes
1048  fi
1049else
1050  echo "configure: failed program was:" >&5
1051  cat conftest.$ac_ext >&5
1052  ac_cv_prog_cxx_works=no
1053fi
1054rm -fr conftest*
1055ac_ext=c
1056# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1057ac_cpp='$CPP $CPPFLAGS'
1058ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1059ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1060cross_compiling=$ac_cv_prog_cc_cross
1061
1062echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
1063if test $ac_cv_prog_cxx_works = no; then
1064  { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
1065fi
1066echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1067echo "configure:1068: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
1068echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
1069cross_compiling=$ac_cv_prog_cxx_cross
1070
1071echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
1072echo "configure:1073: checking whether we are using GNU C++" >&5
1073if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
1074  echo $ac_n "(cached) $ac_c" 1>&6
1075else
1076  cat > conftest.C <<EOF
1077#ifdef __GNUC__
1078  yes;
1079#endif
1080EOF
1081if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1082: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1082  ac_cv_prog_gxx=yes
1083else
1084  ac_cv_prog_gxx=no
1085fi
1086fi
1087
1088echo "$ac_t""$ac_cv_prog_gxx" 1>&6
1089
1090if test $ac_cv_prog_gxx = yes; then
1091  GXX=yes
1092  ac_test_CXXFLAGS="${CXXFLAGS+set}"
1093  ac_save_CXXFLAGS="$CXXFLAGS"
1094  CXXFLAGS=
1095  echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
1096echo "configure:1097: checking whether ${CXX-g++} accepts -g" >&5
1097if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
1098  echo $ac_n "(cached) $ac_c" 1>&6
1099else
1100  echo 'void f(){}' > conftest.cc
1101if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
1102  ac_cv_prog_cxx_g=yes
1103else
1104  ac_cv_prog_cxx_g=no
1105fi
1106rm -f conftest*
1107
1108fi
1109
1110echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
1111  if test "$ac_test_CXXFLAGS" = set; then
1112    CXXFLAGS="$ac_save_CXXFLAGS"
1113  elif test $ac_cv_prog_cxx_g = yes; then
1114    CXXFLAGS="-g -O2"
1115  else
1116    CXXFLAGS="-O2"
1117  fi
1118else
1119  GXX=
1120  test "${CXXFLAGS+set}" = set || CXXFLAGS="-g"
1121fi
1122
1123# Extract the first word of "ranlib", so it can be a program name with args.
1124set dummy ranlib; ac_word=$2
1125echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1126echo "configure:1127: checking for $ac_word" >&5
1127if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1128  echo $ac_n "(cached) $ac_c" 1>&6
1129else
1130  if test -n "$RANLIB"; then
1131  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1132else
1133  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1134  for ac_dir in $PATH; do
1135    test -z "$ac_dir" && ac_dir=.
1136    if test -f $ac_dir/$ac_word; then
1137      ac_cv_prog_RANLIB="ranlib"
1138      break
1139    fi
1140  done
1141  IFS="$ac_save_ifs"
1142  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1143fi
1144fi
1145RANLIB="$ac_cv_prog_RANLIB"
1146if test -n "$RANLIB"; then
1147  echo "$ac_t""$RANLIB" 1>&6
1148else
1149  echo "$ac_t""no" 1>&6
1150fi
1151
1152
1153# Make sure we can run config.sub.
1154if $ac_config_sub sun4 >/dev/null 2>&1; then :
1155else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1156fi
1157
1158echo $ac_n "checking host system type""... $ac_c" 1>&6
1159echo "configure:1160: checking host system type" >&5
1160
1161host_alias=$host
1162case "$host_alias" in
1163NONE)
1164  case $nonopt in
1165  NONE)
1166    if host_alias=`$ac_config_guess`; then :
1167    else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1168    fi ;;
1169  *) host_alias=$nonopt ;;
1170  esac ;;
1171esac
1172
1173host=`$ac_config_sub $host_alias`
1174host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1175host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1176host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1177echo "$ac_t""$host" 1>&6
1178
1179
1180# If we find X, set shell vars x_includes and x_libraries to the
1181# paths, otherwise set no_x=yes.
1182# Uses ac_ vars as temps to allow command line to override cache and checks.
1183# --without-x overrides everything else, but does not touch the cache.
1184echo $ac_n "checking for X""... $ac_c" 1>&6
1185echo "configure:1186: checking for X" >&5
1186
1187# Check whether --with-x or --without-x was given.
1188if test "${with_x+set}" = set; then
1189  withval="$with_x"
1190  :
1191fi
1192
1193# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
1194if test "x$with_x" = xno; then
1195  # The user explicitly disabled X.
1196  have_x=disabled
1197else
1198  if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
1199    # Both variables are already set.
1200    have_x=yes
1201  else
1202if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
1203  echo $ac_n "(cached) $ac_c" 1>&6
1204else
1205  # One or both of the vars are not set, and there is no cached value.
1206ac_x_includes=NO ac_x_libraries=NO
1207rm -fr conftestdir
1208if mkdir conftestdir; then
1209  cd conftestdir
1210  # Make sure to not put "make" in the Imakefile rules, since we grep it out.
1211  cat > Imakefile <<'EOF'
1212acfindx:
1213        @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
1214EOF
1215  if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
1216    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1217    eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
1218    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
1219    for ac_extension in a so sl; do
1220      if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
1221        test -f $ac_im_libdir/libX11.$ac_extension; then
1222        ac_im_usrlibdir=$ac_im_libdir; break
1223      fi
1224    done
1225    # Screen out bogus values from the imake configuration.  They are
1226    # bogus both because they are the default anyway, and because
1227    # using them would break gcc on systems where it needs fixed includes.
1228    case "$ac_im_incroot" in
1229        /usr/include) ;;
1230        *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
1231    esac
1232    case "$ac_im_usrlibdir" in
1233        /usr/lib | /lib) ;;
1234        *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
1235    esac
1236  fi
1237  cd ..
1238  rm -fr conftestdir
1239fi
1240
1241if test "$ac_x_includes" = NO; then
1242  # Guess where to find include files, by looking for this one X11 .h file.
1243  test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
1244
1245  # First, try using that file with no special directory specified.
1246cat > conftest.$ac_ext <<EOF
1247#line 1248 "configure"
1248#include "confdefs.h"
1249#include <$x_direct_test_include>
1250EOF
1251ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1252{ (eval echo configure:1253: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1253ac_err=`grep -v '^ *+' conftest.out`
1254if test -z "$ac_err"; then
1255  rm -rf conftest*
1256  # We can compile using X headers with no special include directory.
1257ac_x_includes=
1258else
1259  echo "$ac_err" >&5
1260  echo "configure: failed program was:" >&5
1261  cat conftest.$ac_ext >&5
1262  rm -rf conftest*
1263  # Look for the header file in a standard set of common directories.
1264# Check X11 before X11Rn because it is often a symlink to the current release.
1265  for ac_dir in               \
1266    /usr/X11/include          \
1267    /usr/X11R6/include        \
1268    /usr/X11R5/include        \
1269    /usr/X11R4/include        \
1270                              \
1271    /usr/include/X11          \
1272    /usr/include/X11R6        \
1273    /usr/include/X11R5        \
1274    /usr/include/X11R4        \
1275                              \
1276    /usr/local/X11/include    \
1277    /usr/local/X11R6/include  \
1278    /usr/local/X11R5/include  \
1279    /usr/local/X11R4/include  \
1280                              \
1281    /usr/local/include/X11    \
1282    /usr/local/include/X11R6  \
1283    /usr/local/include/X11R5  \
1284    /usr/local/include/X11R4  \
1285                              \
1286    /usr/X386/include         \
1287    /usr/x386/include         \
1288    /usr/XFree86/include/X11  \
1289                              \
1290    /usr/include              \
1291    /usr/local/include        \
1292    /usr/unsupported/include  \
1293    /usr/athena/include       \
1294    /usr/local/x11r5/include  \
1295    /usr/lpp/Xamples/include  \
1296                              \
1297    /usr/openwin/include      \
1298    /usr/openwin/share/include \
1299    ; \
1300  do
1301    if test -r "$ac_dir/$x_direct_test_include"; then
1302      ac_x_includes=$ac_dir
1303      break
1304    fi
1305  done
1306fi
1307rm -f conftest*
1308fi # $ac_x_includes = NO
1309
1310if test "$ac_x_libraries" = NO; then
1311  # Check for the libraries.
1312
1313  test -z "$x_direct_test_library" && x_direct_test_library=Xt
1314  test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
1315
1316  # See if we find them without any special options.
1317  # Don't add to $LIBS permanently.
1318  ac_save_LIBS="$LIBS"
1319  LIBS="-l$x_direct_test_library $LIBS"
1320cat > conftest.$ac_ext <<EOF
1321#line 1322 "configure"
1322#include "confdefs.h"
1323
1324int main() {
1325${x_direct_test_function}()
1326; return 0; }
1327EOF
1328if { (eval echo configure:1329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1329  rm -rf conftest*
1330  LIBS="$ac_save_LIBS"
1331# We can link X programs with no special library path.
1332ac_x_libraries=
1333else
1334  echo "configure: failed program was:" >&5
1335  cat conftest.$ac_ext >&5
1336  rm -rf conftest*
1337  LIBS="$ac_save_LIBS"
1338# First see if replacing the include by lib works.
1339# Check X11 before X11Rn because it is often a symlink to the current release.
1340for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
1341    /usr/X11/lib          \
1342    /usr/X11R6/lib        \
1343    /usr/X11R5/lib        \
1344    /usr/X11R4/lib        \
1345                          \
1346    /usr/lib/X11          \
1347    /usr/lib/X11R6        \
1348    /usr/lib/X11R5        \
1349    /usr/lib/X11R4        \
1350                          \
1351    /usr/local/X11/lib    \
1352    /usr/local/X11R6/lib  \
1353    /usr/local/X11R5/lib  \
1354    /usr/local/X11R4/lib  \
1355                          \
1356    /usr/local/lib/X11    \
1357    /usr/local/lib/X11R6  \
1358    /usr/local/lib/X11R5  \
1359    /usr/local/lib/X11R4  \
1360                          \
1361    /usr/X386/lib         \
1362    /usr/x386/lib         \
1363    /usr/XFree86/lib/X11  \
1364                          \
1365    /usr/lib              \
1366    /usr/local/lib        \
1367    /usr/unsupported/lib  \
1368    /usr/athena/lib       \
1369    /usr/local/x11r5/lib  \
1370    /usr/lpp/Xamples/lib  \
1371    /lib/usr/lib/X11      \
1372                          \
1373    /usr/openwin/lib      \
1374    /usr/openwin/share/lib \
1375    ; \
1376do
1377  for ac_extension in a so sl; do
1378    if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
1379      ac_x_libraries=$ac_dir
1380      break 2
1381    fi
1382  done
1383done
1384fi
1385rm -f conftest*
1386fi # $ac_x_libraries = NO
1387
1388if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
1389  # Didn't find X anywhere.  Cache the known absence of X.
1390  ac_cv_have_x="have_x=no"
1391else
1392  # Record where we found X for the cache.
1393  ac_cv_have_x="have_x=yes \
1394                ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
1395fi
1396fi
1397  fi
1398  eval "$ac_cv_have_x"
1399fi # $with_x != no
1400
1401if test "$have_x" != yes; then
1402  echo "$ac_t""$have_x" 1>&6
1403  no_x=yes
1404else
1405  # If each of the values was on the command line, it overrides each guess.
1406  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
1407  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
1408  # Update the cache value to reflect the command line values.
1409  ac_cv_have_x="have_x=yes \
1410                ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
1411  echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
1412fi
1413
1414if test "$no_x" = yes; then
1415  # Not all programs may use this symbol, but it does not hurt to define it.
1416  cat >> confdefs.h <<\EOF
1417#define X_DISPLAY_MISSING 1
1418EOF
1419
1420  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
1421else
1422  if test -n "$x_includes"; then
1423    X_CFLAGS="$X_CFLAGS -I$x_includes"
1424  fi
1425
1426  # It would also be nice to do this for all -L options, not just this one.
1427  if test -n "$x_libraries"; then
1428    X_LIBS="$X_LIBS -L$x_libraries"
1429    # For Solaris; some versions of Sun CC require a space after -R and
1430    # others require no space.  Words are not sufficient . . . .
1431    case "`(uname -sr) 2>/dev/null`" in
1432    "SunOS 5"*)
1433      echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
1434echo "configure:1435: checking whether -R must be followed by a space" >&5
1435      ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
1436      cat > conftest.$ac_ext <<EOF
1437#line 1438 "configure"
1438#include "confdefs.h"
1439
1440int main() {
1441
1442; return 0; }
1443EOF
1444if { (eval echo configure:1445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1445  rm -rf conftest*
1446  ac_R_nospace=yes
1447else
1448  echo "configure: failed program was:" >&5
1449  cat conftest.$ac_ext >&5
1450  rm -rf conftest*
1451  ac_R_nospace=no
1452fi
1453rm -f conftest*
1454      if test $ac_R_nospace = yes; then
1455        echo "$ac_t""no" 1>&6
1456        X_LIBS="$X_LIBS -R$x_libraries"
1457      else
1458        LIBS="$ac_xsave_LIBS -R $x_libraries"
1459        cat > conftest.$ac_ext <<EOF
1460#line 1461 "configure"
1461#include "confdefs.h"
1462
1463int main() {
1464
1465; return 0; }
1466EOF
1467if { (eval echo configure:1468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1468  rm -rf conftest*
1469  ac_R_space=yes
1470else
1471  echo "configure: failed program was:" >&5
1472  cat conftest.$ac_ext >&5
1473  rm -rf conftest*
1474  ac_R_space=no
1475fi
1476rm -f conftest*
1477        if test $ac_R_space = yes; then
1478          echo "$ac_t""yes" 1>&6
1479          X_LIBS="$X_LIBS -R $x_libraries"
1480        else
1481          echo "$ac_t""neither works" 1>&6
1482        fi
1483      fi
1484      LIBS="$ac_xsave_LIBS"
1485    esac
1486  fi
1487
1488  # Check for system-dependent libraries X programs must link with.
1489  # Do this before checking for the system-independent R6 libraries
1490  # (-lICE), since we may need -lsocket or whatever for X linking.
1491
1492  if test "$ISC" = yes; then
1493    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
1494  else
1495    # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
1496    # libraries were built with DECnet support.  And karl@cs.umb.edu says
1497    # the Alpha needs dnet_stub (dnet does not exist).
1498    echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
1499echo "configure:1500: checking for dnet_ntoa in -ldnet" >&5
1500ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
1501if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1502  echo $ac_n "(cached) $ac_c" 1>&6
1503else
1504  ac_save_LIBS="$LIBS"
1505LIBS="-ldnet  $LIBS"
1506cat > conftest.$ac_ext <<EOF
1507#line 1508 "configure"
1508#include "confdefs.h"
1509/* Override any gcc2 internal prototype to avoid an error.  */
1510/* We use char because int might match the return type of a gcc2
1511    builtin and then its argument prototype would still apply.  */
1512char dnet_ntoa();
1513
1514int main() {
1515dnet_ntoa()
1516; return 0; }
1517EOF
1518if { (eval echo configure:1519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1519  rm -rf conftest*
1520  eval "ac_cv_lib_$ac_lib_var=yes"
1521else
1522  echo "configure: failed program was:" >&5
1523  cat conftest.$ac_ext >&5
1524  rm -rf conftest*
1525  eval "ac_cv_lib_$ac_lib_var=no"
1526fi
1527rm -f conftest*
1528LIBS="$ac_save_LIBS"
1529
1530fi
1531if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1532  echo "$ac_t""yes" 1>&6
1533  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
1534else
1535  echo "$ac_t""no" 1>&6
1536fi
1537
1538    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
1539      echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
1540echo "configure:1541: checking for dnet_ntoa in -ldnet_stub" >&5
1541ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
1542if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1543  echo $ac_n "(cached) $ac_c" 1>&6
1544else
1545  ac_save_LIBS="$LIBS"
1546LIBS="-ldnet_stub  $LIBS"
1547cat > conftest.$ac_ext <<EOF
1548#line 1549 "configure"
1549#include "confdefs.h"
1550/* Override any gcc2 internal prototype to avoid an error.  */
1551/* We use char because int might match the return type of a gcc2
1552    builtin and then its argument prototype would still apply.  */
1553char dnet_ntoa();
1554
1555int main() {
1556dnet_ntoa()
1557; return 0; }
1558EOF
1559if { (eval echo configure:1560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1560  rm -rf conftest*
1561  eval "ac_cv_lib_$ac_lib_var=yes"
1562else
1563  echo "configure: failed program was:" >&5
1564  cat conftest.$ac_ext >&5
1565  rm -rf conftest*
1566  eval "ac_cv_lib_$ac_lib_var=no"
1567fi
1568rm -f conftest*
1569LIBS="$ac_save_LIBS"
1570
1571fi
1572if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1573  echo "$ac_t""yes" 1>&6
1574  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
1575else
1576  echo "$ac_t""no" 1>&6
1577fi
1578
1579    fi
1580
1581    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
1582    # to get the SysV transport functions.
1583    # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
1584    # needs -lnsl.
1585    # The nsl library prevents programs from opening the X display
1586    # on Irix 5.2, according to dickey@clark.net.
1587    echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
1588echo "configure:1589: checking for gethostbyname" >&5
1589if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
1590  echo $ac_n "(cached) $ac_c" 1>&6
1591else
1592  cat > conftest.$ac_ext <<EOF
1593#line 1594 "configure"
1594#include "confdefs.h"
1595/* System header to define __stub macros and hopefully few prototypes,
1596    which can conflict with char gethostbyname(); below.  */
1597#include <assert.h>
1598/* Override any gcc2 internal prototype to avoid an error.  */
1599/* We use char because int might match the return type of a gcc2
1600    builtin and then its argument prototype would still apply.  */
1601char gethostbyname();
1602
1603int main() {
1604
1605/* The GNU C library defines this for functions which it implements
1606    to always fail with ENOSYS.  Some functions are actually named
1607    something starting with __ and the normal name is an alias.  */
1608#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
1609choke me
1610#else
1611gethostbyname();
1612#endif
1613
1614; return 0; }
1615EOF
1616if { (eval echo configure:1617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1617  rm -rf conftest*
1618  eval "ac_cv_func_gethostbyname=yes"
1619else
1620  echo "configure: failed program was:" >&5
1621  cat conftest.$ac_ext >&5
1622  rm -rf conftest*
1623  eval "ac_cv_func_gethostbyname=no"
1624fi
1625rm -f conftest*
1626fi
1627
1628if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
1629  echo "$ac_t""yes" 1>&6
1630  :
1631else
1632  echo "$ac_t""no" 1>&6
1633fi
1634
1635    if test $ac_cv_func_gethostbyname = no; then
1636      echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
1637echo "configure:1638: checking for gethostbyname in -lnsl" >&5
1638ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
1639if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1640  echo $ac_n "(cached) $ac_c" 1>&6
1641else
1642  ac_save_LIBS="$LIBS"
1643LIBS="-lnsl  $LIBS"
1644cat > conftest.$ac_ext <<EOF
1645#line 1646 "configure"
1646#include "confdefs.h"
1647/* Override any gcc2 internal prototype to avoid an error.  */
1648/* We use char because int might match the return type of a gcc2
1649    builtin and then its argument prototype would still apply.  */
1650char gethostbyname();
1651
1652int main() {
1653gethostbyname()
1654; return 0; }
1655EOF
1656if { (eval echo configure:1657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1657  rm -rf conftest*
1658  eval "ac_cv_lib_$ac_lib_var=yes"
1659else
1660  echo "configure: failed program was:" >&5
1661  cat conftest.$ac_ext >&5
1662  rm -rf conftest*
1663  eval "ac_cv_lib_$ac_lib_var=no"
1664fi
1665rm -f conftest*
1666LIBS="$ac_save_LIBS"
1667
1668fi
1669if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1670  echo "$ac_t""yes" 1>&6
1671  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
1672else
1673  echo "$ac_t""no" 1>&6
1674fi
1675
1676    fi
1677
1678    # lieder@skyler.mavd.honeywell.com says without -lsocket,
1679    # socket/setsockopt and other routines are undefined under SCO ODT
1680    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
1681    # on later versions), says simon@lia.di.epfl.ch: it contains
1682    # gethostby* variants that don't use the nameserver (or something).
1683    # -lsocket must be given before -lnsl if both are needed.
1684    # We assume that if connect needs -lnsl, so does gethostbyname.
1685    echo $ac_n "checking for connect""... $ac_c" 1>&6
1686echo "configure:1687: checking for connect" >&5
1687if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
1688  echo $ac_n "(cached) $ac_c" 1>&6
1689else
1690  cat > conftest.$ac_ext <<EOF
1691#line 1692 "configure"
1692#include "confdefs.h"
1693/* System header to define __stub macros and hopefully few prototypes,
1694    which can conflict with char connect(); below.  */
1695#include <assert.h>
1696/* Override any gcc2 internal prototype to avoid an error.  */
1697/* We use char because int might match the return type of a gcc2
1698    builtin and then its argument prototype would still apply.  */
1699char connect();
1700
1701int main() {
1702
1703/* The GNU C library defines this for functions which it implements
1704    to always fail with ENOSYS.  Some functions are actually named
1705    something starting with __ and the normal name is an alias.  */
1706#if defined (__stub_connect) || defined (__stub___connect)
1707choke me
1708#else
1709connect();
1710#endif
1711
1712; return 0; }
1713EOF
1714if { (eval echo configure:1715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1715  rm -rf conftest*
1716  eval "ac_cv_func_connect=yes"
1717else
1718  echo "configure: failed program was:" >&5
1719  cat conftest.$ac_ext >&5
1720  rm -rf conftest*
1721  eval "ac_cv_func_connect=no"
1722fi
1723rm -f conftest*
1724fi
1725
1726if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
1727  echo "$ac_t""yes" 1>&6
1728  :
1729else
1730  echo "$ac_t""no" 1>&6
1731fi
1732
1733    if test $ac_cv_func_connect = no; then
1734      echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
1735echo "configure:1736: checking for connect in -lsocket" >&5
1736ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
1737if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1738  echo $ac_n "(cached) $ac_c" 1>&6
1739else
1740  ac_save_LIBS="$LIBS"
1741LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
1742cat > conftest.$ac_ext <<EOF
1743#line 1744 "configure"
1744#include "confdefs.h"
1745/* Override any gcc2 internal prototype to avoid an error.  */
1746/* We use char because int might match the return type of a gcc2
1747    builtin and then its argument prototype would still apply.  */
1748char connect();
1749
1750int main() {
1751connect()
1752; return 0; }
1753EOF
1754if { (eval echo configure:1755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1755  rm -rf conftest*
1756  eval "ac_cv_lib_$ac_lib_var=yes"
1757else
1758  echo "configure: failed program was:" >&5
1759  cat conftest.$ac_ext >&5
1760  rm -rf conftest*
1761  eval "ac_cv_lib_$ac_lib_var=no"
1762fi
1763rm -f conftest*
1764LIBS="$ac_save_LIBS"
1765
1766fi
1767if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1768  echo "$ac_t""yes" 1>&6
1769  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
1770else
1771  echo "$ac_t""no" 1>&6
1772fi
1773
1774    fi
1775
1776    # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
1777    echo $ac_n "checking for remove""... $ac_c" 1>&6
1778echo "configure:1779: checking for remove" >&5
1779if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
1780  echo $ac_n "(cached) $ac_c" 1>&6
1781else
1782  cat > conftest.$ac_ext <<EOF
1783#line 1784 "configure"
1784#include "confdefs.h"
1785/* System header to define __stub macros and hopefully few prototypes,
1786    which can conflict with char remove(); below.  */
1787#include <assert.h>
1788/* Override any gcc2 internal prototype to avoid an error.  */
1789/* We use char because int might match the return type of a gcc2
1790    builtin and then its argument prototype would still apply.  */
1791char remove();
1792
1793int main() {
1794
1795/* The GNU C library defines this for functions which it implements
1796    to always fail with ENOSYS.  Some functions are actually named
1797    something starting with __ and the normal name is an alias.  */
1798#if defined (__stub_remove) || defined (__stub___remove)
1799choke me
1800#else
1801remove();
1802#endif
1803
1804; return 0; }
1805EOF
1806if { (eval echo configure:1807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1807  rm -rf conftest*
1808  eval "ac_cv_func_remove=yes"
1809else
1810  echo "configure: failed program was:" >&5
1811  cat conftest.$ac_ext >&5
1812  rm -rf conftest*
1813  eval "ac_cv_func_remove=no"
1814fi
1815rm -f conftest*
1816fi
1817
1818if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
1819  echo "$ac_t""yes" 1>&6
1820  :
1821else
1822  echo "$ac_t""no" 1>&6
1823fi
1824
1825    if test $ac_cv_func_remove = no; then
1826      echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
1827echo "configure:1828: checking for remove in -lposix" >&5
1828ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
1829if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1830  echo $ac_n "(cached) $ac_c" 1>&6
1831else
1832  ac_save_LIBS="$LIBS"
1833LIBS="-lposix  $LIBS"
1834cat > conftest.$ac_ext <<EOF
1835#line 1836 "configure"
1836#include "confdefs.h"
1837/* Override any gcc2 internal prototype to avoid an error.  */
1838/* We use char because int might match the return type of a gcc2
1839    builtin and then its argument prototype would still apply.  */
1840char remove();
1841
1842int main() {
1843remove()
1844; return 0; }
1845EOF
1846if { (eval echo configure:1847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1847  rm -rf conftest*
1848  eval "ac_cv_lib_$ac_lib_var=yes"
1849else
1850  echo "configure: failed program was:" >&5
1851  cat conftest.$ac_ext >&5
1852  rm -rf conftest*
1853  eval "ac_cv_lib_$ac_lib_var=no"
1854fi
1855rm -f conftest*
1856LIBS="$ac_save_LIBS"
1857
1858fi
1859if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1860  echo "$ac_t""yes" 1>&6
1861  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
1862else
1863  echo "$ac_t""no" 1>&6
1864fi
1865
1866    fi
1867
1868    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
1869    echo $ac_n "checking for shmat""... $ac_c" 1>&6
1870echo "configure:1871: checking for shmat" >&5
1871if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
1872  echo $ac_n "(cached) $ac_c" 1>&6
1873else
1874  cat > conftest.$ac_ext <<EOF
1875#line 1876 "configure"
1876#include "confdefs.h"
1877/* System header to define __stub macros and hopefully few prototypes,
1878    which can conflict with char shmat(); below.  */
1879#include <assert.h>
1880/* Override any gcc2 internal prototype to avoid an error.  */
1881/* We use char because int might match the return type of a gcc2
1882    builtin and then its argument prototype would still apply.  */
1883char shmat();
1884
1885int main() {
1886
1887/* The GNU C library defines this for functions which it implements
1888    to always fail with ENOSYS.  Some functions are actually named
1889    something starting with __ and the normal name is an alias.  */
1890#if defined (__stub_shmat) || defined (__stub___shmat)
1891choke me
1892#else
1893shmat();
1894#endif
1895
1896; return 0; }
1897EOF
1898if { (eval echo configure:1899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1899  rm -rf conftest*
1900  eval "ac_cv_func_shmat=yes"
1901else
1902  echo "configure: failed program was:" >&5
1903  cat conftest.$ac_ext >&5
1904  rm -rf conftest*
1905  eval "ac_cv_func_shmat=no"
1906fi
1907rm -f conftest*
1908fi
1909
1910if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
1911  echo "$ac_t""yes" 1>&6
1912  :
1913else
1914  echo "$ac_t""no" 1>&6
1915fi
1916
1917    if test $ac_cv_func_shmat = no; then
1918      echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
1919echo "configure:1920: checking for shmat in -lipc" >&5
1920ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
1921if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1922  echo $ac_n "(cached) $ac_c" 1>&6
1923else
1924  ac_save_LIBS="$LIBS"
1925LIBS="-lipc  $LIBS"
1926cat > conftest.$ac_ext <<EOF
1927#line 1928 "configure"
1928#include "confdefs.h"
1929/* Override any gcc2 internal prototype to avoid an error.  */
1930/* We use char because int might match the return type of a gcc2
1931    builtin and then its argument prototype would still apply.  */
1932char shmat();
1933
1934int main() {
1935shmat()
1936; return 0; }
1937EOF
1938if { (eval echo configure:1939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1939  rm -rf conftest*
1940  eval "ac_cv_lib_$ac_lib_var=yes"
1941else
1942  echo "configure: failed program was:" >&5
1943  cat conftest.$ac_ext >&5
1944  rm -rf conftest*
1945  eval "ac_cv_lib_$ac_lib_var=no"
1946fi
1947rm -f conftest*
1948LIBS="$ac_save_LIBS"
1949
1950fi
1951if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1952  echo "$ac_t""yes" 1>&6
1953  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
1954else
1955  echo "$ac_t""no" 1>&6
1956fi
1957
1958    fi
1959  fi
1960
1961  # Check for libraries that X11R6 Xt/Xaw programs need.
1962  ac_save_LDFLAGS="$LDFLAGS"
1963  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
1964  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
1965  # check for ICE first), but we must link in the order -lSM -lICE or
1966  # we get undefined symbols.  So assume we have SM if we have ICE.
1967  # These have to be linked with before -lX11, unlike the other
1968  # libraries we check for below, so use a different variable.
1969  #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
1970  echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
1971echo "configure:1972: checking for IceConnectionNumber in -lICE" >&5
1972ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
1973if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1974  echo $ac_n "(cached) $ac_c" 1>&6
1975else
1976  ac_save_LIBS="$LIBS"
1977LIBS="-lICE  $LIBS"
1978cat > conftest.$ac_ext <<EOF
1979#line 1980 "configure"
1980#include "confdefs.h"
1981/* Override any gcc2 internal prototype to avoid an error.  */
1982/* We use char because int might match the return type of a gcc2
1983    builtin and then its argument prototype would still apply.  */
1984char IceConnectionNumber();
1985
1986int main() {
1987IceConnectionNumber()
1988; return 0; }
1989EOF
1990if { (eval echo configure:1991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1991  rm -rf conftest*
1992  eval "ac_cv_lib_$ac_lib_var=yes"
1993else
1994  echo "configure: failed program was:" >&5
1995  cat conftest.$ac_ext >&5
1996  rm -rf conftest*
1997  eval "ac_cv_lib_$ac_lib_var=no"
1998fi
1999rm -f conftest*
2000LIBS="$ac_save_LIBS"
2001
2002fi
2003if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2004  echo "$ac_t""yes" 1>&6
2005  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
2006else
2007  echo "$ac_t""no" 1>&6
2008fi
2009
2010  LDFLAGS="$ac_save_LDFLAGS"
2011
2012fi
2013
2014
2015# Do we have X shared memory support?
2016echo $ac_n "checking for XShmAttach in -lXext""... $ac_c" 1>&6
2017echo "configure:2018: checking for XShmAttach in -lXext" >&5
2018ac_lib_var=`echo Xext'_'XShmAttach | sed 'y%./+-%__p_%'`
2019if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2020  echo $ac_n "(cached) $ac_c" 1>&6
2021else
2022  ac_save_LIBS="$LIBS"
2023LIBS="-lXext $X_LIBS -lX11 $LIBS"
2024cat > conftest.$ac_ext <<EOF
2025#line 2026 "configure"
2026#include "confdefs.h"
2027/* Override any gcc2 internal prototype to avoid an error.  */
2028/* We use char because int might match the return type of a gcc2
2029    builtin and then its argument prototype would still apply.  */
2030char XShmAttach();
2031
2032int main() {
2033XShmAttach()
2034; return 0; }
2035EOF
2036if { (eval echo configure:2037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2037  rm -rf conftest*
2038  eval "ac_cv_lib_$ac_lib_var=yes"
2039else
2040  echo "configure: failed program was:" >&5
2041  cat conftest.$ac_ext >&5
2042  rm -rf conftest*
2043  eval "ac_cv_lib_$ac_lib_var=no"
2044fi
2045rm -f conftest*
2046LIBS="$ac_save_LIBS"
2047
2048fi
2049if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2050  echo "$ac_t""yes" 1>&6
2051  :
2052else
2053  echo "$ac_t""no" 1>&6
2054
2055echo $ac_n "checking for XShmAttach in -lXextSam""... $ac_c" 1>&6
2056echo "configure:2057: checking for XShmAttach in -lXextSam" >&5
2057ac_lib_var=`echo XextSam'_'XShmAttach | sed 'y%./+-%__p_%'`
2058if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2059  echo $ac_n "(cached) $ac_c" 1>&6
2060else
2061  ac_save_LIBS="$LIBS"
2062LIBS="-lXextSam $X_LIBS -lX11 -lXext $LIBS"
2063cat > conftest.$ac_ext <<EOF
2064#line 2065 "configure"
2065#include "confdefs.h"
2066/* Override any gcc2 internal prototype to avoid an error.  */
2067/* We use char because int might match the return type of a gcc2
2068    builtin and then its argument prototype would still apply.  */
2069char XShmAttach();
2070
2071int main() {
2072XShmAttach()
2073; return 0; }
2074EOF
2075if { (eval echo configure:2076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2076  rm -rf conftest*
2077  eval "ac_cv_lib_$ac_lib_var=yes"
2078else
2079  echo "configure: failed program was:" >&5
2080  cat conftest.$ac_ext >&5
2081  rm -rf conftest*
2082  eval "ac_cv_lib_$ac_lib_var=no"
2083fi
2084rm -f conftest*
2085LIBS="$ac_save_LIBS"
2086
2087fi
2088if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2089  echo "$ac_t""yes" 1>&6
2090  :
2091else
2092  echo "$ac_t""no" 1>&6
2093cat >> confdefs.h <<\EOF
2094#define NO_XSHM 1
2095EOF
2096
2097fi
2098
2099
2100fi
2101
2102
2103JOYSTICK=port/unix/joystick.o
2104SOUND=port/unix/sound.o
2105TIMING=port/unix/timing.o
2106LIBSVGA=
2107case ${host} in
2108  *-*-linux*)
2109        JOYSTICK=port/linux/joystick.o
2110        SOUND=port/sgi/sound.o
2111        ac_safe=`echo "vga.h" | sed 'y%./+-%__p_%'`
2112echo $ac_n "checking for vga.h""... $ac_c" 1>&6
2113echo "configure:2114: checking for vga.h" >&5
2114if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2115  echo $ac_n "(cached) $ac_c" 1>&6
2116else
2117  cat > conftest.$ac_ext <<EOF
2118#line 2119 "configure"
2119#include "confdefs.h"
2120#include <vga.h>
2121EOF
2122ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2123{ (eval echo configure:2124: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2124ac_err=`grep -v '^ *+' conftest.out`
2125if test -z "$ac_err"; then
2126  rm -rf conftest*
2127  eval "ac_cv_header_$ac_safe=yes"
2128else
2129  echo "$ac_err" >&5
2130  echo "configure: failed program was:" >&5
2131  cat conftest.$ac_ext >&5
2132  rm -rf conftest*
2133  eval "ac_cv_header_$ac_safe=no"
2134fi
2135rm -f conftest*
2136fi
2137if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2138  echo "$ac_t""yes" 1>&6
2139  LIBSVGA=libsvgawin.a
2140else
2141  echo "$ac_t""no" 1>&6
2142fi
2143
2144        ;;
2145  mips-sgi-irix*)
2146        SOUND=port/sgi/sound.o
2147        TIMING=port/sgi/timing.o
2148        ;;
2149  powerpc-*-aix4*)
2150        SOUND=port/aix/sound.o
2151        ;;
2152  *)
2153        ;;
2154esac
2155
2156
2157
2158
2159
2160for ac_func in atexit on_exit
2161do
2162echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2163echo "configure:2164: checking for $ac_func" >&5
2164if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2165  echo $ac_n "(cached) $ac_c" 1>&6
2166else
2167  cat > conftest.$ac_ext <<EOF
2168#line 2169 "configure"
2169#include "confdefs.h"
2170/* System header to define __stub macros and hopefully few prototypes,
2171    which can conflict with char $ac_func(); below.  */
2172#include <assert.h>
2173/* Override any gcc2 internal prototype to avoid an error.  */
2174/* We use char because int might match the return type of a gcc2
2175    builtin and then its argument prototype would still apply.  */
2176char $ac_func();
2177
2178int main() {
2179
2180/* The GNU C library defines this for functions which it implements
2181    to always fail with ENOSYS.  Some functions are actually named
2182    something starting with __ and the normal name is an alias.  */
2183#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2184choke me
2185#else
2186$ac_func();
2187#endif
2188
2189; return 0; }
2190EOF
2191if { (eval echo configure:2192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2192  rm -rf conftest*
2193  eval "ac_cv_func_$ac_func=yes"
2194else
2195  echo "configure: failed program was:" >&5
2196  cat conftest.$ac_ext >&5
2197  rm -rf conftest*
2198  eval "ac_cv_func_$ac_func=no"
2199fi
2200rm -f conftest*
2201fi
2202
2203if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2204  echo "$ac_t""yes" 1>&6
2205    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2206  cat >> confdefs.h <<EOF
2207#define $ac_tr_func 1
2208EOF
2209 break
2210else
2211  echo "$ac_t""no" 1>&6
2212fi
2213done
2214
2215echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
2216echo "configure:2217: checking whether byte ordering is bigendian" >&5
2217if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
2218  echo $ac_n "(cached) $ac_c" 1>&6
2219else
2220  ac_cv_c_bigendian=unknown
2221# See if we have a good endian.h.
2222cat > conftest.$ac_ext <<EOF
2223#line 2224 "configure"
2224#include "confdefs.h"
2225#include <endian.h>
2226EOF
2227ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2228{ (eval echo configure:2229: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2229ac_err=`grep -v '^ *+' conftest.out`
2230if test -z "$ac_err"; then
2231  rm -rf conftest*
2232  cat > conftest.$ac_ext <<EOF
2233#line 2234 "configure"
2234#include "confdefs.h"
2235#include <endian.h>
2236int main() {
2237
2238#if !__BYTE_ORDER || !__BIG_ENDIAN
2239  bogus endian macros
2240#endif
2241; return 0; }
2242EOF
2243if { (eval echo configure:2244: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2244  rm -rf conftest*
2245  cat > conftest.$ac_ext <<EOF
2246#line 2247 "configure"
2247#include "confdefs.h"
2248#include <endian.h>
2249int main() {
2250
2251#if __BYTE_ORDER != __BIG_ENDIAN
2252 not big endian
2253#endif
2254; return 0; }
2255EOF
2256if { (eval echo configure:2257: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2257  rm -rf conftest*
2258  ac_cv_c_bigendian=yes
2259else
2260  echo "configure: failed program was:" >&5
2261  cat conftest.$ac_ext >&5
2262  rm -rf conftest*
2263  ac_cv_c_bigendian=no
2264fi
2265rm -f conftest*
2266else
2267  echo "configure: failed program was:" >&5
2268  cat conftest.$ac_ext >&5
2269fi
2270rm -f conftest*
2271else
2272  echo "$ac_err" >&5
2273  echo "configure: failed program was:" >&5
2274  cat conftest.$ac_ext >&5
2275fi
2276rm -f conftest*
2277if test $ac_cv_c_bigendian = unknown; then
2278# See if sys/param.h defines the BYTE_ORDER macro.
2279cat > conftest.$ac_ext <<EOF
2280#line 2281 "configure"
2281#include "confdefs.h"
2282#include <sys/types.h>
2283#include <sys/param.h>
2284int main() {
2285
2286#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
2287 bogus endian macros
2288#endif
2289; return 0; }
2290EOF
2291if { (eval echo configure:2292: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2292  rm -rf conftest*
2293  # It does; now see whether it defined to BIG_ENDIAN or not.
2294cat > conftest.$ac_ext <<EOF
2295#line 2296 "configure"
2296#include "confdefs.h"
2297#include <sys/types.h>
2298#include <sys/param.h>
2299int main() {
2300
2301#if BYTE_ORDER != BIG_ENDIAN
2302 not big endian
2303#endif
2304; return 0; }
2305EOF
2306if { (eval echo configure:2307: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2307  rm -rf conftest*
2308  ac_cv_c_bigendian=yes
2309else
2310  echo "configure: failed program was:" >&5
2311  cat conftest.$ac_ext >&5
2312  rm -rf conftest*
2313  ac_cv_c_bigendian=no
2314fi
2315rm -f conftest*
2316else
2317  echo "configure: failed program was:" >&5
2318  cat conftest.$ac_ext >&5
2319fi
2320rm -f conftest*
2321fi
2322if test $ac_cv_c_bigendian = unknown; then
2323if test "$cross_compiling" = yes; then
2324    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2325else
2326  cat > conftest.$ac_ext <<EOF
2327#line 2328 "configure"
2328#include "confdefs.h"
2329main () {
2330  /* Are we little or big endian?  From Harbison&Steele.  */
2331  union
2332  {
2333    long l;
2334    char c[sizeof (long)];
2335  } u;
2336  u.l = 1;
2337  exit (u.c[sizeof (long) - 1] == 1);
2338}
2339EOF
2340if { (eval echo configure:2341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2341then
2342  ac_cv_c_bigendian=no
2343else
2344  echo "configure: failed program was:" >&5
2345  cat conftest.$ac_ext >&5
2346  rm -fr conftest*
2347  ac_cv_c_bigendian=yes
2348fi
2349rm -fr conftest*
2350fi
2351
2352fi
2353fi
2354
2355echo "$ac_t""$ac_cv_c_bigendian" 1>&6
2356if test $ac_cv_c_bigendian = yes; then
2357  cat >> confdefs.h <<\EOF
2358#define WORDS_BIGENDIAN 1
2359EOF
2360
2361fi
2362
2363
2364
2365ac_ext=C
2366# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2367ac_cpp='$CXXCPP $CPPFLAGS'
2368ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2369ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2370cross_compiling=$ac_cv_prog_cxx_cross
2371
2372ab_flags=
2373for ab_flag in -fno-exceptions -fno-rtti; do
2374
2375echo $ac_n "checking whether ${CXX} supports the $ab_flag flag""... $ac_c" 1>&6
2376echo "configure:2377: checking whether ${CXX} supports the $ab_flag flag" >&5
2377ab_flag_var=`echo $ab_flag | sed 'y%./+-%__p_%'`
2378if eval "test \"`echo '$''{'ab_cv_flag_$ab_flag_var'+set}'`\" = set"; then
2379  echo $ac_n "(cached) $ac_c" 1>&6
2380else
2381 
2382
2383ab_save_flags="$CXXFLAGS"
2384CXXFLAGS="$CXXFLAGS $ab_flag"
2385cat > conftest.$ac_ext <<EOF
2386#line 2387 "configure"
2387#include "confdefs.h"
2388
2389int main() {
2390int a;
2391; return 0; }
2392EOF
2393if { (eval echo configure:2394: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2394  rm -rf conftest*
2395  eval "ab_cv_flag_$ab_flag_var=yes"
2396else
2397  echo "configure: failed program was:" >&5
2398  cat conftest.$ac_ext >&5
2399  rm -rf conftest*
2400  eval "ab_cv_flag_$ab_flag_var=no"
2401fi
2402rm -f conftest*
2403CXXFLAGS="$ab_save_flags"
2404
2405fi
2406
2407if eval "test \"`echo '$ab_cv_flag_'$ab_flag_var`\" = yes"; then
2408  echo "$ac_t""yes" 1>&6
2409  ab_flags="$ab_flags $ab_flag"
2410else
2411  echo "$ac_t""no" 1>&6
2412fi
2413
2414
2415ADDCXXFLAGS="$ab_flags"
2416
2417done
2418
2419ac_ext=c
2420# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2421ac_cpp='$CPP $CPPFLAGS'
2422ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2423ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2424cross_compiling=$ac_cv_prog_cc_cross
2425
2426
2427mkdir -p port/unix port/x11 port/svga port/linux port/sgi port/aix
2428
2429trap '' 1 2 15
2430cat > confcache <<\EOF
2431# This file is a shell script that caches the results of configure
2432# tests run on this system so they can be shared between configure
2433# scripts and configure runs.  It is not useful on other systems.
2434# If it contains results you don't want to keep, you may remove or edit it.
2435#
2436# By default, configure uses ./config.cache as the cache file,
2437# creating it if it does not exist already.  You can give configure
2438# the --cache-file=FILE option to use a different cache file; that is
2439# what configure does when it calls configure scripts in
2440# subdirectories, so they share the cache.
2441# Giving --cache-file=/dev/null disables caching, for debugging configure.
2442# config.status only pays attention to the cache file if you give it the
2443# --recheck option to rerun configure.
2444#
2445EOF
2446# The following way of writing the cache mishandles newlines in values,
2447# but we know of no workaround that is simple, portable, and efficient.
2448# So, don't put newlines in cache variables' values.
2449# Ultrix sh set writes to stderr and can't be redirected directly,
2450# and sets the high bit in the cache file unless we assign to the vars.
2451(set) 2>&1 |
2452  case `(ac_space=' '; set) 2>&1` in
2453  *ac_space=\ *)
2454    # `set' does not quote correctly, so add quotes (double-quote substitution
2455    # turns \\\\ into \\, and sed turns \\ into \).
2456    sed -n \
2457      -e "s/'/'\\\\''/g" \
2458      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2459    ;;
2460  *)
2461    # `set' quotes correctly as required by POSIX, so do not add quotes.
2462    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2463    ;;
2464  esac >> confcache
2465if cmp -s $cache_file confcache; then
2466  :
2467else
2468  if test -w $cache_file; then
2469    echo "updating cache $cache_file"
2470    cat confcache > $cache_file
2471  else
2472    echo "not updating unwritable cache $cache_file"
2473  fi
2474fi
2475rm -f confcache
2476
2477trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2478
2479test "x$prefix" = xNONE && prefix=$ac_default_prefix
2480# Let make expand exec_prefix.
2481test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2482
2483# Any assignment to VPATH causes Sun make to only execute
2484# the first set of double-colon rules, so remove it if not needed.
2485# If there is a colon in the path, we need to keep it.
2486if test "x$srcdir" = x.; then
2487  ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
2488fi
2489
2490trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2491
2492# Transform confdefs.h into DEFS.
2493# Protect against shell expansion while executing Makefile rules.
2494# Protect against Makefile macro expansion.
2495cat > conftest.defs <<\EOF
2496s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
2497s%[     `~#$^&*(){}\\|;'"<>?]%\\&%g
2498s%\[%\\&%g
2499s%\]%\\&%g
2500s%\$%$$%g
2501EOF
2502DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
2503rm -f conftest.defs
2504
2505
2506# Without the "./", some shells look in PATH for config.status.
2507: ${CONFIG_STATUS=./config.status}
2508
2509echo creating $CONFIG_STATUS
2510rm -f $CONFIG_STATUS
2511cat > $CONFIG_STATUS <<EOF
2512#! /bin/sh
2513# Generated automatically by configure.
2514# Run this file to recreate the current configuration.
2515# This directory was configured as follows,
2516# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2517#
2518# $0 $ac_configure_args
2519#
2520# Compiler output produced by configure, useful for debugging
2521# configure, is in ./config.log if it exists.
2522
2523ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2524for ac_option
2525do
2526  case "\$ac_option" in
2527  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2528    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2529    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2530  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2531    echo "$CONFIG_STATUS generated by autoconf version 2.12"
2532    exit 0 ;;
2533  -help | --help | --hel | --he | --h)
2534    echo "\$ac_cs_usage"; exit 0 ;;
2535  *) echo "\$ac_cs_usage"; exit 1 ;;
2536  esac
2537done
2538
2539ac_given_srcdir=$srcdir
2540ac_given_INSTALL="$INSTALL"
2541
2542trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2543EOF
2544cat >> $CONFIG_STATUS <<EOF
2545
2546# Protect against being on the right side of a sed subst in config.status.
2547sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2548 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2549$ac_vpsub
2550$extrasub
2551s%@CFLAGS@%$CFLAGS%g
2552s%@CPPFLAGS@%$CPPFLAGS%g
2553s%@CXXFLAGS@%$CXXFLAGS%g
2554s%@DEFS@%$DEFS%g
2555s%@LDFLAGS@%$LDFLAGS%g
2556s%@LIBS@%$LIBS%g
2557s%@exec_prefix@%$exec_prefix%g
2558s%@prefix@%$prefix%g
2559s%@program_transform_name@%$program_transform_name%g
2560s%@bindir@%$bindir%g
2561s%@sbindir@%$sbindir%g
2562s%@libexecdir@%$libexecdir%g
2563s%@datadir@%$datadir%g
2564s%@sysconfdir@%$sysconfdir%g
2565s%@sharedstatedir@%$sharedstatedir%g
2566s%@localstatedir@%$localstatedir%g
2567s%@libdir@%$libdir%g
2568s%@includedir@%$includedir%g
2569s%@oldincludedir@%$oldincludedir%g
2570s%@infodir@%$infodir%g
2571s%@mandir@%$mandir%g
2572s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
2573s%@INSTALL_DATA@%$INSTALL_DATA%g
2574s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
2575s%@PACKAGE@%$PACKAGE%g
2576s%@VERSION@%$VERSION%g
2577s%@ACLOCAL@%$ACLOCAL%g
2578s%@AUTOCONF@%$AUTOCONF%g
2579s%@AUTOMAKE@%$AUTOMAKE%g
2580s%@AUTOHEADER@%$AUTOHEADER%g
2581s%@MAKEINFO@%$MAKEINFO%g
2582s%@SET_MAKE@%$SET_MAKE%g
2583s%@CC@%$CC%g
2584s%@CPP@%$CPP%g
2585s%@CXX@%$CXX%g
2586s%@RANLIB@%$RANLIB%g
2587s%@host@%$host%g
2588s%@host_alias@%$host_alias%g
2589s%@host_cpu@%$host_cpu%g
2590s%@host_vendor@%$host_vendor%g
2591s%@host_os@%$host_os%g
2592s%@X_CFLAGS@%$X_CFLAGS%g
2593s%@X_PRE_LIBS@%$X_PRE_LIBS%g
2594s%@X_LIBS@%$X_LIBS%g
2595s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
2596s%@JOYSTICK@%$JOYSTICK%g
2597s%@SOUND@%$SOUND%g
2598s%@TIMING@%$TIMING%g
2599s%@LIBSVGA@%$LIBSVGA%g
2600s%@ADDCXXFLAGS@%$ADDCXXFLAGS%g
2601
2602CEOF
2603EOF
2604
2605cat >> $CONFIG_STATUS <<\EOF
2606
2607# Split the substitutions into bite-sized pieces for seds with
2608# small command number limits, like on Digital OSF/1 and HP-UX.
2609ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
2610ac_file=1 # Number of current file.
2611ac_beg=1 # First line for current file.
2612ac_end=$ac_max_sed_cmds # Line after last line for current file.
2613ac_more_lines=:
2614ac_sed_cmds=""
2615while $ac_more_lines; do
2616  if test $ac_beg -gt 1; then
2617    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
2618  else
2619    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
2620  fi
2621  if test ! -s conftest.s$ac_file; then
2622    ac_more_lines=false
2623    rm -f conftest.s$ac_file
2624  else
2625    if test -z "$ac_sed_cmds"; then
2626      ac_sed_cmds="sed -f conftest.s$ac_file"
2627    else
2628      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
2629    fi
2630    ac_file=`expr $ac_file + 1`
2631    ac_beg=$ac_end
2632    ac_end=`expr $ac_end + $ac_max_sed_cmds`
2633  fi
2634done
2635if test -z "$ac_sed_cmds"; then
2636  ac_sed_cmds=cat
2637fi
2638EOF
2639
2640cat >> $CONFIG_STATUS <<EOF
2641
2642CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
2643EOF
2644cat >> $CONFIG_STATUS <<\EOF
2645for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2646  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2647  case "$ac_file" in
2648  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2649       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2650  *) ac_file_in="${ac_file}.in" ;;
2651  esac
2652
2653  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
2654
2655  # Remove last slash and all that follows it.  Not all systems have dirname.
2656  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2657  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2658    # The file is in a subdirectory.
2659    test ! -d "$ac_dir" && mkdir "$ac_dir"
2660    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2661    # A "../" for each directory in $ac_dir_suffix.
2662    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2663  else
2664    ac_dir_suffix= ac_dots=
2665  fi
2666
2667  case "$ac_given_srcdir" in
2668  .)  srcdir=.
2669      if test -z "$ac_dots"; then top_srcdir=.
2670      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2671  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2672  *) # Relative path.
2673    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2674    top_srcdir="$ac_dots$ac_given_srcdir" ;;
2675  esac
2676
2677  case "$ac_given_INSTALL" in
2678  [/$]*) INSTALL="$ac_given_INSTALL" ;;
2679  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2680  esac
2681
2682  echo creating "$ac_file"
2683  rm -f "$ac_file"
2684  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2685  case "$ac_file" in
2686  *Makefile*) ac_comsub="1i\\
2687# $configure_input" ;;
2688  *) ac_comsub= ;;
2689  esac
2690
2691  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2692  sed -e "$ac_comsub
2693s%@configure_input@%$configure_input%g
2694s%@srcdir@%$srcdir%g
2695s%@top_srcdir@%$top_srcdir%g
2696s%@INSTALL@%$INSTALL%g
2697" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
2698fi; done
2699rm -f conftest.s*
2700
2701EOF
2702cat >> $CONFIG_STATUS <<EOF
2703
2704EOF
2705cat >> $CONFIG_STATUS <<\EOF
2706
2707exit 0
2708EOF
2709chmod +x $CONFIG_STATUS
2710rm -fr confdefs* $ac_clean_files
2711test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2712
Note: See TracBrowser for help on using the repository browser.