root/rat/trunk/configure @ 3000

Revision 3000, 117.2 KB (checked in by ucacoxh, 14 years ago)

- Test for broken X11 headers. Not sure if we should do something gross like

cat broken headers through a sed script that fixes them in local versions.
Certainly sed script works as I've tried it. It's just disgusting.

  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
Line 
1#! /bin/sh
2
3# Guess values for system-dependent variables and create Makefiles.
4# Generated automatically using autoconf version 2.13
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-sun-audio=DIR    specify Sun audio support home"
16ac_help="$ac_help
17  --with-osprey=DIR       specify Osprey (Sunvideo Plus PCI) support home"
18ac_help="$ac_help
19  --with-x                use the X Window System"
20ac_help="$ac_help
21  --with-tcl=DIR          specify location of Tcl installation"
22ac_help="$ac_help
23  --with-tk=DIR          specify location of Tk installation"
24ac_help="$ac_help
25  --with-common=DIR       specify location of UCL's common library"
26ac_help="$ac_help
27  --enable-profile        enable profiling"
28ac_help="$ac_help
29  --enable-bounds         enable bounds checking"
30ac_help="$ac_help
31  --enable-debug          enable debug messages and code"
32ac_help="$ac_help
33  --enable-debug-mem      enable memory debugging code"
34
35# Initialize some variables set by options.
36# The variables have the same names as the options, with
37# dashes changed to underlines.
38build=NONE
39cache_file=./config.cache
40exec_prefix=NONE
41host=NONE
42no_create=
43nonopt=NONE
44no_recursion=
45prefix=NONE
46program_prefix=NONE
47program_suffix=NONE
48program_transform_name=s,x,x,
49silent=
50site=
51srcdir=
52target=NONE
53verbose=
54x_includes=NONE
55x_libraries=NONE
56bindir='${exec_prefix}/bin'
57sbindir='${exec_prefix}/sbin'
58libexecdir='${exec_prefix}/libexec'
59datadir='${prefix}/share'
60sysconfdir='${prefix}/etc'
61sharedstatedir='${prefix}/com'
62localstatedir='${prefix}/var'
63libdir='${exec_prefix}/lib'
64includedir='${prefix}/include'
65oldincludedir='/usr/include'
66infodir='${prefix}/info'
67mandir='${prefix}/man'
68
69# Initialize some other variables.
70subdirs=
71MFLAGS= MAKEFLAGS=
72SHELL=${CONFIG_SHELL-/bin/sh}
73# Maximum number of lines to put in a shell here document.
74ac_max_here_lines=12
75
76ac_prev=
77for ac_option
78do
79
80  # If the previous option needs an argument, assign it.
81  if test -n "$ac_prev"; then
82    eval "$ac_prev=\$ac_option"
83    ac_prev=
84    continue
85  fi
86
87  case "$ac_option" in
88  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
89  *) ac_optarg= ;;
90  esac
91
92  # Accept the important Cygnus configure options, so we can diagnose typos.
93
94  case "$ac_option" in
95
96  -bindir | --bindir | --bindi | --bind | --bin | --bi)
97    ac_prev=bindir ;;
98  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
99    bindir="$ac_optarg" ;;
100
101  -build | --build | --buil | --bui | --bu)
102    ac_prev=build ;;
103  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
104    build="$ac_optarg" ;;
105
106  -cache-file | --cache-file | --cache-fil | --cache-fi \
107  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
108    ac_prev=cache_file ;;
109  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
110  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
111    cache_file="$ac_optarg" ;;
112
113  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
114    ac_prev=datadir ;;
115  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
116  | --da=*)
117    datadir="$ac_optarg" ;;
118
119  -disable-* | --disable-*)
120    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
121    # Reject names that are not valid shell variable names.
122    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
123      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
124    fi
125    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
126    eval "enable_${ac_feature}=no" ;;
127
128  -enable-* | --enable-*)
129    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
130    # Reject names that are not valid shell variable names.
131    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
132      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
133    fi
134    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
135    case "$ac_option" in
136      *=*) ;;
137      *) ac_optarg=yes ;;
138    esac
139    eval "enable_${ac_feature}='$ac_optarg'" ;;
140
141  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
142  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
143  | --exec | --exe | --ex)
144    ac_prev=exec_prefix ;;
145  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
146  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
147  | --exec=* | --exe=* | --ex=*)
148    exec_prefix="$ac_optarg" ;;
149
150  -gas | --gas | --ga | --g)
151    # Obsolete; use --with-gas.
152    with_gas=yes ;;
153
154  -help | --help | --hel | --he)
155    # Omit some internal or obsolete options to make the list less imposing.
156    # This message is too long to be a string in the A/UX 3.1 sh.
157    cat << EOF
158Usage: configure [options] [host]
159Options: [defaults in brackets after descriptions]
160Configuration:
161  --cache-file=FILE       cache test results in FILE
162  --help                  print this message
163  --no-create             do not create output files
164  --quiet, --silent       do not print \`checking...' messages
165  --version               print the version of autoconf that created configure
166Directory and file names:
167  --prefix=PREFIX         install architecture-independent files in PREFIX
168                          [$ac_default_prefix]
169  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
170                          [same as prefix]
171  --bindir=DIR            user executables in DIR [EPREFIX/bin]
172  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
173  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
174  --datadir=DIR           read-only architecture-independent data in DIR
175                          [PREFIX/share]
176  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
177  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
178                          [PREFIX/com]
179  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
180  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
181  --includedir=DIR        C header files in DIR [PREFIX/include]
182  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
183  --infodir=DIR           info documentation in DIR [PREFIX/info]
184  --mandir=DIR            man documentation in DIR [PREFIX/man]
185  --srcdir=DIR            find the sources in DIR [configure dir or ..]
186  --program-prefix=PREFIX prepend PREFIX to installed program names
187  --program-suffix=SUFFIX append SUFFIX to installed program names
188  --program-transform-name=PROGRAM
189                          run sed PROGRAM on installed program names
190EOF
191    cat << EOF
192Host type:
193  --build=BUILD           configure for building on BUILD [BUILD=HOST]
194  --host=HOST             configure for HOST [guessed]
195  --target=TARGET         configure for TARGET [TARGET=HOST]
196Features and packages:
197  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
198  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
199  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
200  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
201  --x-includes=DIR        X include files are in DIR
202  --x-libraries=DIR       X library files are in DIR
203EOF
204    if test -n "$ac_help"; then
205      echo "--enable and --with options recognized:$ac_help"
206    fi
207    exit 0 ;;
208
209  -host | --host | --hos | --ho)
210    ac_prev=host ;;
211  -host=* | --host=* | --hos=* | --ho=*)
212    host="$ac_optarg" ;;
213
214  -includedir | --includedir | --includedi | --included | --include \
215  | --includ | --inclu | --incl | --inc)
216    ac_prev=includedir ;;
217  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
218  | --includ=* | --inclu=* | --incl=* | --inc=*)
219    includedir="$ac_optarg" ;;
220
221  -infodir | --infodir | --infodi | --infod | --info | --inf)
222    ac_prev=infodir ;;
223  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
224    infodir="$ac_optarg" ;;
225
226  -libdir | --libdir | --libdi | --libd)
227    ac_prev=libdir ;;
228  -libdir=* | --libdir=* | --libdi=* | --libd=*)
229    libdir="$ac_optarg" ;;
230
231  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
232  | --libexe | --libex | --libe)
233    ac_prev=libexecdir ;;
234  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
235  | --libexe=* | --libex=* | --libe=*)
236    libexecdir="$ac_optarg" ;;
237
238  -localstatedir | --localstatedir | --localstatedi | --localstated \
239  | --localstate | --localstat | --localsta | --localst \
240  | --locals | --local | --loca | --loc | --lo)
241    ac_prev=localstatedir ;;
242  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
243  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
244  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
245    localstatedir="$ac_optarg" ;;
246
247  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
248    ac_prev=mandir ;;
249  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
250    mandir="$ac_optarg" ;;
251
252  -nfp | --nfp | --nf)
253    # Obsolete; use --without-fp.
254    with_fp=no ;;
255
256  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
257  | --no-cr | --no-c)
258    no_create=yes ;;
259
260  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
261  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
262    no_recursion=yes ;;
263
264  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
265  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
266  | --oldin | --oldi | --old | --ol | --o)
267    ac_prev=oldincludedir ;;
268  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
269  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
270  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
271    oldincludedir="$ac_optarg" ;;
272
273  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
274    ac_prev=prefix ;;
275  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
276    prefix="$ac_optarg" ;;
277
278  -program-prefix | --program-prefix | --program-prefi | --program-pref \
279  | --program-pre | --program-pr | --program-p)
280    ac_prev=program_prefix ;;
281  -program-prefix=* | --program-prefix=* | --program-prefi=* \
282  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
283    program_prefix="$ac_optarg" ;;
284
285  -program-suffix | --program-suffix | --program-suffi | --program-suff \
286  | --program-suf | --program-su | --program-s)
287    ac_prev=program_suffix ;;
288  -program-suffix=* | --program-suffix=* | --program-suffi=* \
289  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
290    program_suffix="$ac_optarg" ;;
291
292  -program-transform-name | --program-transform-name \
293  | --program-transform-nam | --program-transform-na \
294  | --program-transform-n | --program-transform- \
295  | --program-transform | --program-transfor \
296  | --program-transfo | --program-transf \
297  | --program-trans | --program-tran \
298  | --progr-tra | --program-tr | --program-t)
299    ac_prev=program_transform_name ;;
300  -program-transform-name=* | --program-transform-name=* \
301  | --program-transform-nam=* | --program-transform-na=* \
302  | --program-transform-n=* | --program-transform-=* \
303  | --program-transform=* | --program-transfor=* \
304  | --program-transfo=* | --program-transf=* \
305  | --program-trans=* | --program-tran=* \
306  | --progr-tra=* | --program-tr=* | --program-t=*)
307    program_transform_name="$ac_optarg" ;;
308
309  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
310  | -silent | --silent | --silen | --sile | --sil)
311    silent=yes ;;
312
313  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
314    ac_prev=sbindir ;;
315  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
316  | --sbi=* | --sb=*)
317    sbindir="$ac_optarg" ;;
318
319  -sharedstatedir | --sharedstatedir | --sharedstatedi \
320  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
321  | --sharedst | --shareds | --shared | --share | --shar \
322  | --sha | --sh)
323    ac_prev=sharedstatedir ;;
324  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
325  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
326  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
327  | --sha=* | --sh=*)
328    sharedstatedir="$ac_optarg" ;;
329
330  -site | --site | --sit)
331    ac_prev=site ;;
332  -site=* | --site=* | --sit=*)
333    site="$ac_optarg" ;;
334
335  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
336    ac_prev=srcdir ;;
337  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
338    srcdir="$ac_optarg" ;;
339
340  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
341  | --syscon | --sysco | --sysc | --sys | --sy)
342    ac_prev=sysconfdir ;;
343  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
344  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
345    sysconfdir="$ac_optarg" ;;
346
347  -target | --target | --targe | --targ | --tar | --ta | --t)
348    ac_prev=target ;;
349  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
350    target="$ac_optarg" ;;
351
352  -v | -verbose | --verbose | --verbos | --verbo | --verb)
353    verbose=yes ;;
354
355  -version | --version | --versio | --versi | --vers)
356    echo "configure generated by autoconf version 2.13"
357    exit 0 ;;
358
359  -with-* | --with-*)
360    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
361    # Reject names that are not valid shell variable names.
362    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
363      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
364    fi
365    ac_package=`echo $ac_package| sed 's/-/_/g'`
366    case "$ac_option" in
367      *=*) ;;
368      *) ac_optarg=yes ;;
369    esac
370    eval "with_${ac_package}='$ac_optarg'" ;;
371
372  -without-* | --without-*)
373    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
374    # Reject names that are not valid shell variable names.
375    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
376      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
377    fi
378    ac_package=`echo $ac_package| sed 's/-/_/g'`
379    eval "with_${ac_package}=no" ;;
380
381  --x)
382    # Obsolete; use --with-x.
383    with_x=yes ;;
384
385  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
386  | --x-incl | --x-inc | --x-in | --x-i)
387    ac_prev=x_includes ;;
388  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
389  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
390    x_includes="$ac_optarg" ;;
391
392  -x-libraries | --x-libraries | --x-librarie | --x-librari \
393  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
394    ac_prev=x_libraries ;;
395  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
396  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
397    x_libraries="$ac_optarg" ;;
398
399  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
400    ;;
401
402  *)
403    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
404      echo "configure: warning: $ac_option: invalid host type" 1>&2
405    fi
406    if test "x$nonopt" != xNONE; then
407      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
408    fi
409    nonopt="$ac_option"
410    ;;
411
412  esac
413done
414
415if test -n "$ac_prev"; then
416  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
417fi
418
419trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
420
421# File descriptor usage:
422# 0 standard input
423# 1 file creation
424# 2 errors and warnings
425# 3 some systems may open it to /dev/tty
426# 4 used on the Kubota Titan
427# 6 checking for... messages and results
428# 5 compiler messages saved in config.log
429if test "$silent" = yes; then
430  exec 6>/dev/null
431else
432  exec 6>&1
433fi
434exec 5>./config.log
435
436echo "\
437This file contains any messages produced by compilers while
438running configure, to aid debugging if configure makes a mistake.
439" 1>&5
440
441# Strip out --no-create and --no-recursion so they do not pile up.
442# Also quote any args containing shell metacharacters.
443ac_configure_args=
444for ac_arg
445do
446  case "$ac_arg" in
447  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
448  | --no-cr | --no-c) ;;
449  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
450  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
451  *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
452  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
453  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
454  esac
455done
456
457# NLS nuisances.
458# Only set these to C if already set.  These must not be set unconditionally
459# because not all systems understand e.g. LANG=C (notably SCO).
460# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
461# Non-C LC_CTYPE values break the ctype check.
462if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
463if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
464if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
465if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
466
467# confdefs.h avoids OS command line length limits that DEFS can exceed.
468rm -rf conftest* confdefs.h
469# AIX cpp loses on an empty file, so make sure it contains at least a newline.
470echo > confdefs.h
471
472# A filename unique to this package, relative to the directory that
473# configure is in, which we can look for to find out if srcdir is correct.
474ac_unique_file=converter.c
475
476# Find the source files, if location was not specified.
477if test -z "$srcdir"; then
478  ac_srcdir_defaulted=yes
479  # Try the directory containing this script, then its parent.
480  ac_prog=$0
481  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
482  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
483  srcdir=$ac_confdir
484  if test ! -r $srcdir/$ac_unique_file; then
485    srcdir=..
486  fi
487else
488  ac_srcdir_defaulted=no
489fi
490if test ! -r $srcdir/$ac_unique_file; then
491  if test "$ac_srcdir_defaulted" = yes; then
492    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
493  else
494    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
495  fi
496fi
497srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
498
499# Prefer explicitly selected file to automatically selected ones.
500if test -z "$CONFIG_SITE"; then
501  if test "x$prefix" != xNONE; then
502    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
503  else
504    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
505  fi
506fi
507for ac_site_file in $CONFIG_SITE; do
508  if test -r "$ac_site_file"; then
509    echo "loading site script $ac_site_file"
510    . "$ac_site_file"
511  fi
512done
513
514if test -r "$cache_file"; then
515  echo "loading cache $cache_file"
516  . $cache_file
517else
518  echo "creating cache $cache_file"
519  > $cache_file
520fi
521
522ac_ext=c
523# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
524ac_cpp='$CPP $CPPFLAGS'
525ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
526ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
527cross_compiling=$ac_cv_prog_cc_cross
528
529ac_exeext=
530ac_objext=o
531if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
532  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
533  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
534    ac_n= ac_c='
535' ac_t='        '
536  else
537    ac_n=-n ac_c= ac_t=
538  fi
539else
540  ac_n= ac_c='\c' ac_t=
541fi
542
543
544
545ac_aux_dir=
546for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
547  if test -f $ac_dir/install-sh; then
548    ac_aux_dir=$ac_dir
549    ac_install_sh="$ac_aux_dir/install-sh -c"
550    break
551  elif test -f $ac_dir/install.sh; then
552    ac_aux_dir=$ac_dir
553    ac_install_sh="$ac_aux_dir/install.sh -c"
554    break
555  fi
556done
557if test -z "$ac_aux_dir"; then
558  { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
559fi
560ac_config_guess=$ac_aux_dir/config.guess
561ac_config_sub=$ac_aux_dir/config.sub
562ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
563
564
565# Do some error checking and defaulting for the host and target type.
566# The inputs are:
567#    configure --host=HOST --target=TARGET --build=BUILD NONOPT
568#
569# The rules are:
570# 1. You are not allowed to specify --host, --target, and nonopt at the
571#    same time.
572# 2. Host defaults to nonopt.
573# 3. If nonopt is not specified, then host defaults to the current host,
574#    as determined by config.guess.
575# 4. Target and build default to nonopt.
576# 5. If nonopt is not specified, then target and build default to host.
577
578# The aliases save the names the user supplied, while $host etc.
579# will get canonicalized.
580case $host---$target---$nonopt in
581NONE---*---* | *---NONE---* | *---*---NONE) ;;
582*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
583esac
584
585
586# Make sure we can run config.sub.
587if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
588else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
589fi
590
591echo $ac_n "checking host system type""... $ac_c" 1>&6
592echo "configure:593: checking host system type" >&5
593
594host_alias=$host
595case "$host_alias" in
596NONE)
597  case $nonopt in
598  NONE)
599    if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
600    else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
601    fi ;;
602  *) host_alias=$nonopt ;;
603  esac ;;
604esac
605
606host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
607host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
608host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
609host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
610echo "$ac_t""$host" 1>&6
611
612echo $ac_n "checking target system type""... $ac_c" 1>&6
613echo "configure:614: checking target system type" >&5
614
615target_alias=$target
616case "$target_alias" in
617NONE)
618  case $nonopt in
619  NONE) target_alias=$host_alias ;;
620  *) target_alias=$nonopt ;;
621  esac ;;
622esac
623
624target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
625target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
626target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
627target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
628echo "$ac_t""$target" 1>&6
629
630echo $ac_n "checking build system type""... $ac_c" 1>&6
631echo "configure:632: checking build system type" >&5
632
633build_alias=$build
634case "$build_alias" in
635NONE)
636  case $nonopt in
637  NONE) build_alias=$host_alias ;;
638  *) build_alias=$nonopt ;;
639  esac ;;
640esac
641
642build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
643build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
644build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
645build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
646echo "$ac_t""$build" 1>&6
647
648test "$host_alias" != "$target_alias" &&
649  test "$program_prefix$program_suffix$program_transform_name" = \
650    NONENONEs,x,x, &&
651  program_prefix=${target_alias}-
652
653
654# Extract the first word of "gcc", so it can be a program name with args.
655set dummy gcc; ac_word=$2
656echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
657echo "configure:658: checking for $ac_word" >&5
658if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
659  echo $ac_n "(cached) $ac_c" 1>&6
660else
661  if test -n "$CC"; then
662  ac_cv_prog_CC="$CC" # Let the user override the test.
663else
664  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
665  ac_dummy="$PATH"
666  for ac_dir in $ac_dummy; do
667    test -z "$ac_dir" && ac_dir=.
668    if test -f $ac_dir/$ac_word; then
669      ac_cv_prog_CC="gcc"
670      break
671    fi
672  done
673  IFS="$ac_save_ifs"
674fi
675fi
676CC="$ac_cv_prog_CC"
677if test -n "$CC"; then
678  echo "$ac_t""$CC" 1>&6
679else
680  echo "$ac_t""no" 1>&6
681fi
682
683if test -z "$CC"; then
684  # Extract the first word of "cc", so it can be a program name with args.
685set dummy cc; ac_word=$2
686echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
687echo "configure:688: checking for $ac_word" >&5
688if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
689  echo $ac_n "(cached) $ac_c" 1>&6
690else
691  if test -n "$CC"; then
692  ac_cv_prog_CC="$CC" # Let the user override the test.
693else
694  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
695  ac_prog_rejected=no
696  ac_dummy="$PATH"
697  for ac_dir in $ac_dummy; do
698    test -z "$ac_dir" && ac_dir=.
699    if test -f $ac_dir/$ac_word; then
700      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
701        ac_prog_rejected=yes
702        continue
703      fi
704      ac_cv_prog_CC="cc"
705      break
706    fi
707  done
708  IFS="$ac_save_ifs"
709if test $ac_prog_rejected = yes; then
710  # We found a bogon in the path, so make sure we never use it.
711  set dummy $ac_cv_prog_CC
712  shift
713  if test $# -gt 0; then
714    # We chose a different compiler from the bogus one.
715    # However, it has the same basename, so the bogon will be chosen
716    # first if we set CC to just the basename; use the full file name.
717    shift
718    set dummy "$ac_dir/$ac_word" "$@"
719    shift
720    ac_cv_prog_CC="$@"
721  fi
722fi
723fi
724fi
725CC="$ac_cv_prog_CC"
726if test -n "$CC"; then
727  echo "$ac_t""$CC" 1>&6
728else
729  echo "$ac_t""no" 1>&6
730fi
731
732  if test -z "$CC"; then
733    case "`uname -s`" in
734    *win32* | *WIN32*)
735      # Extract the first word of "cl", so it can be a program name with args.
736set dummy cl; ac_word=$2
737echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
738echo "configure:739: checking for $ac_word" >&5
739if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
740  echo $ac_n "(cached) $ac_c" 1>&6
741else
742  if test -n "$CC"; then
743  ac_cv_prog_CC="$CC" # Let the user override the test.
744else
745  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
746  ac_dummy="$PATH"
747  for ac_dir in $ac_dummy; do
748    test -z "$ac_dir" && ac_dir=.
749    if test -f $ac_dir/$ac_word; then
750      ac_cv_prog_CC="cl"
751      break
752    fi
753  done
754  IFS="$ac_save_ifs"
755fi
756fi
757CC="$ac_cv_prog_CC"
758if test -n "$CC"; then
759  echo "$ac_t""$CC" 1>&6
760else
761  echo "$ac_t""no" 1>&6
762fi
763 ;;
764    esac
765  fi
766  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
767fi
768
769echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
770echo "configure:771: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
771
772ac_ext=c
773# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
774ac_cpp='$CPP $CPPFLAGS'
775ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
776ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
777cross_compiling=$ac_cv_prog_cc_cross
778
779cat > conftest.$ac_ext << EOF
780
781#line 782 "configure"
782#include "confdefs.h"
783
784main(){return(0);}
785EOF
786if { (eval echo configure:787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
787  ac_cv_prog_cc_works=yes
788  # If we can't run a trivial program, we are probably using a cross compiler.
789  if (./conftest; exit) 2>/dev/null; then
790    ac_cv_prog_cc_cross=no
791  else
792    ac_cv_prog_cc_cross=yes
793  fi
794else
795  echo "configure: failed program was:" >&5
796  cat conftest.$ac_ext >&5
797  ac_cv_prog_cc_works=no
798fi
799rm -fr conftest*
800ac_ext=c
801# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
802ac_cpp='$CPP $CPPFLAGS'
803ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
804ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
805cross_compiling=$ac_cv_prog_cc_cross
806
807echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
808if test $ac_cv_prog_cc_works = no; then
809  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
810fi
811echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
812echo "configure:813: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
813echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
814cross_compiling=$ac_cv_prog_cc_cross
815
816echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
817echo "configure:818: checking whether we are using GNU C" >&5
818if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
819  echo $ac_n "(cached) $ac_c" 1>&6
820else
821  cat > conftest.c <<EOF
822#ifdef __GNUC__
823  yes;
824#endif
825EOF
826if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:827: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
827  ac_cv_prog_gcc=yes
828else
829  ac_cv_prog_gcc=no
830fi
831fi
832
833echo "$ac_t""$ac_cv_prog_gcc" 1>&6
834
835if test $ac_cv_prog_gcc = yes; then
836  GCC=yes
837else
838  GCC=
839fi
840
841ac_test_CFLAGS="${CFLAGS+set}"
842ac_save_CFLAGS="$CFLAGS"
843CFLAGS=
844echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
845echo "configure:846: checking whether ${CC-cc} accepts -g" >&5
846if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
847  echo $ac_n "(cached) $ac_c" 1>&6
848else
849  echo 'void f(){}' > conftest.c
850if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
851  ac_cv_prog_cc_g=yes
852else
853  ac_cv_prog_cc_g=no
854fi
855rm -f conftest*
856
857fi
858
859echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
860if test "$ac_test_CFLAGS" = set; then
861  CFLAGS="$ac_save_CFLAGS"
862elif test $ac_cv_prog_cc_g = yes; then
863  if test "$GCC" = yes; then
864    CFLAGS="-g -O2"
865  else
866    CFLAGS="-g"
867  fi
868else
869  if test "$GCC" = yes; then
870    CFLAGS="-O2"
871  else
872    CFLAGS=
873  fi
874fi
875
876echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
877echo "configure:878: checking how to run the C preprocessor" >&5
878# On Suns, sometimes $CPP names a directory.
879if test -n "$CPP" && test -d "$CPP"; then
880  CPP=
881fi
882if test -z "$CPP"; then
883if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
884  echo $ac_n "(cached) $ac_c" 1>&6
885else
886    # This must be in double quotes, not single quotes, because CPP may get
887  # substituted into the Makefile and "${CC-cc}" will confuse make.
888  CPP="${CC-cc} -E"
889  # On the NeXT, cc -E runs the code through the compiler's parser,
890  # not just through cpp.
891  cat > conftest.$ac_ext <<EOF
892#line 893 "configure"
893#include "confdefs.h"
894#include <assert.h>
895Syntax Error
896EOF
897ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
898{ (eval echo configure:899: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
899ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
900if test -z "$ac_err"; then
901  :
902else
903  echo "$ac_err" >&5
904  echo "configure: failed program was:" >&5
905  cat conftest.$ac_ext >&5
906  rm -rf conftest*
907  CPP="${CC-cc} -E -traditional-cpp"
908  cat > conftest.$ac_ext <<EOF
909#line 910 "configure"
910#include "confdefs.h"
911#include <assert.h>
912Syntax Error
913EOF
914ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
915{ (eval echo configure:916: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
916ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
917if test -z "$ac_err"; then
918  :
919else
920  echo "$ac_err" >&5
921  echo "configure: failed program was:" >&5
922  cat conftest.$ac_ext >&5
923  rm -rf conftest*
924  CPP="${CC-cc} -nologo -E"
925  cat > conftest.$ac_ext <<EOF
926#line 927 "configure"
927#include "confdefs.h"
928#include <assert.h>
929Syntax Error
930EOF
931ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
932{ (eval echo configure:933: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
933ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
934if test -z "$ac_err"; then
935  :
936else
937  echo "$ac_err" >&5
938  echo "configure: failed program was:" >&5
939  cat conftest.$ac_ext >&5
940  rm -rf conftest*
941  CPP=/lib/cpp
942fi
943rm -f conftest*
944fi
945rm -f conftest*
946fi
947rm -f conftest*
948  ac_cv_prog_CPP="$CPP"
949fi
950  CPP="$ac_cv_prog_CPP"
951else
952  ac_cv_prog_CPP="$CPP"
953fi
954echo "$ac_t""$CPP" 1>&6
955
956# Extract the first word of "ranlib", so it can be a program name with args.
957set dummy ranlib; ac_word=$2
958echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
959echo "configure:960: checking for $ac_word" >&5
960if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
961  echo $ac_n "(cached) $ac_c" 1>&6
962else
963  if test -n "$RANLIB"; then
964  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
965else
966  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
967  ac_dummy="$PATH"
968  for ac_dir in $ac_dummy; do
969    test -z "$ac_dir" && ac_dir=.
970    if test -f $ac_dir/$ac_word; then
971      ac_cv_prog_RANLIB="ranlib"
972      break
973    fi
974  done
975  IFS="$ac_save_ifs"
976  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
977fi
978fi
979RANLIB="$ac_cv_prog_RANLIB"
980if test -n "$RANLIB"; then
981  echo "$ac_t""$RANLIB" 1>&6
982else
983  echo "$ac_t""no" 1>&6
984fi
985
986
987echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
988echo "configure:989: checking for ANSI C header files" >&5
989if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
990  echo $ac_n "(cached) $ac_c" 1>&6
991else
992  cat > conftest.$ac_ext <<EOF
993#line 994 "configure"
994#include "confdefs.h"
995#include <stdlib.h>
996#include <stdarg.h>
997#include <string.h>
998#include <float.h>
999EOF
1000ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1001{ (eval echo configure:1002: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1002ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1003if test -z "$ac_err"; then
1004  rm -rf conftest*
1005  ac_cv_header_stdc=yes
1006else
1007  echo "$ac_err" >&5
1008  echo "configure: failed program was:" >&5
1009  cat conftest.$ac_ext >&5
1010  rm -rf conftest*
1011  ac_cv_header_stdc=no
1012fi
1013rm -f conftest*
1014
1015if test $ac_cv_header_stdc = yes; then
1016  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1017cat > conftest.$ac_ext <<EOF
1018#line 1019 "configure"
1019#include "confdefs.h"
1020#include <string.h>
1021EOF
1022if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1023  egrep "memchr" >/dev/null 2>&1; then
1024  :
1025else
1026  rm -rf conftest*
1027  ac_cv_header_stdc=no
1028fi
1029rm -f conftest*
1030
1031fi
1032
1033if test $ac_cv_header_stdc = yes; then
1034  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1035cat > conftest.$ac_ext <<EOF
1036#line 1037 "configure"
1037#include "confdefs.h"
1038#include <stdlib.h>
1039EOF
1040if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1041  egrep "free" >/dev/null 2>&1; then
1042  :
1043else
1044  rm -rf conftest*
1045  ac_cv_header_stdc=no
1046fi
1047rm -f conftest*
1048
1049fi
1050
1051if test $ac_cv_header_stdc = yes; then
1052  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1053if test "$cross_compiling" = yes; then
1054  :
1055else
1056  cat > conftest.$ac_ext <<EOF
1057#line 1058 "configure"
1058#include "confdefs.h"
1059#include <ctype.h>
1060#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1061#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1062#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1063int main () { int i; for (i = 0; i < 256; i++)
1064if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1065exit (0); }
1066
1067EOF
1068if { (eval echo configure:1069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1069then
1070  :
1071else
1072  echo "configure: failed program was:" >&5
1073  cat conftest.$ac_ext >&5
1074  rm -fr conftest*
1075  ac_cv_header_stdc=no
1076fi
1077rm -fr conftest*
1078fi
1079
1080fi
1081fi
1082
1083echo "$ac_t""$ac_cv_header_stdc" 1>&6
1084if test $ac_cv_header_stdc = yes; then
1085  cat >> confdefs.h <<\EOF
1086#define STDC_HEADERS 1
1087EOF
1088
1089fi
1090
1091echo $ac_n "checking for working const""... $ac_c" 1>&6
1092echo "configure:1093: checking for working const" >&5
1093if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1094  echo $ac_n "(cached) $ac_c" 1>&6
1095else
1096  cat > conftest.$ac_ext <<EOF
1097#line 1098 "configure"
1098#include "confdefs.h"
1099
1100int main() {
1101
1102/* Ultrix mips cc rejects this.  */
1103typedef int charset[2]; const charset x;
1104/* SunOS 4.1.1 cc rejects this.  */
1105char const *const *ccp;
1106char **p;
1107/* NEC SVR4.0.2 mips cc rejects this.  */
1108struct point {int x, y;};
1109static struct point const zero = {0,0};
1110/* AIX XL C 1.02.0.0 rejects this.
1111   It does not let you subtract one const X* pointer from another in an arm
1112   of an if-expression whose if-part is not a constant expression */
1113const char *g = "string";
1114ccp = &g + (g ? g-g : 0);
1115/* HPUX 7.0 cc rejects these. */
1116++ccp;
1117p = (char**) ccp;
1118ccp = (char const *const *) p;
1119{ /* SCO 3.2v4 cc rejects this.  */
1120  char *t;
1121  char const *s = 0 ? (char *) 0 : (char const *) 0;
1122
1123  *t++ = 0;
1124}
1125{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
1126  int x[] = {25, 17};
1127  const int *foo = &x[0];
1128  ++foo;
1129}
1130{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1131  typedef const int *iptr;
1132  iptr p = 0;
1133  ++p;
1134}
1135{ /* AIX XL C 1.02.0.0 rejects this saying
1136     "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1137  struct s { int j; const int *ap[3]; };
1138  struct s *b; b->j = 5;
1139}
1140{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1141  const int foo = 10;
1142}
1143
1144; return 0; }
1145EOF
1146if { (eval echo configure:1147: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1147  rm -rf conftest*
1148  ac_cv_c_const=yes
1149else
1150  echo "configure: failed program was:" >&5
1151  cat conftest.$ac_ext >&5
1152  rm -rf conftest*
1153  ac_cv_c_const=no
1154fi
1155rm -f conftest*
1156fi
1157
1158echo "$ac_t""$ac_cv_c_const" 1>&6
1159if test $ac_cv_c_const = no; then
1160  cat >> confdefs.h <<\EOF
1161#define const
1162EOF
1163
1164fi
1165
1166echo $ac_n "checking for size_t""... $ac_c" 1>&6
1167echo "configure:1168: checking for size_t" >&5
1168if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1169  echo $ac_n "(cached) $ac_c" 1>&6
1170else
1171  cat > conftest.$ac_ext <<EOF
1172#line 1173 "configure"
1173#include "confdefs.h"
1174#include <sys/types.h>
1175#if STDC_HEADERS
1176#include <stdlib.h>
1177#include <stddef.h>
1178#endif
1179EOF
1180if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1181  egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1182  rm -rf conftest*
1183  ac_cv_type_size_t=yes
1184else
1185  rm -rf conftest*
1186  ac_cv_type_size_t=no
1187fi
1188rm -f conftest*
1189
1190fi
1191echo "$ac_t""$ac_cv_type_size_t" 1>&6
1192if test $ac_cv_type_size_t = no; then
1193  cat >> confdefs.h <<\EOF
1194#define size_t unsigned
1195EOF
1196
1197fi
1198
1199
1200VERSION=`cat VERSION`
1201
1202
1203OSTYPE=$host_os
1204
1205
1206# The following two macros cause autoconf to complain.
1207echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
1208echo "configure:1209: checking whether byte ordering is bigendian" >&5
1209if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
1210  echo $ac_n "(cached) $ac_c" 1>&6
1211else
1212  ac_cv_c_bigendian=unknown
1213# See if sys/param.h defines the BYTE_ORDER macro.
1214cat > conftest.$ac_ext <<EOF
1215#line 1216 "configure"
1216#include "confdefs.h"
1217#include <sys/types.h>
1218#include <sys/param.h>
1219int main() {
1220
1221#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
1222 bogus endian macros
1223#endif
1224; return 0; }
1225EOF
1226if { (eval echo configure:1227: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1227  rm -rf conftest*
1228  # It does; now see whether it defined to BIG_ENDIAN or not.
1229cat > conftest.$ac_ext <<EOF
1230#line 1231 "configure"
1231#include "confdefs.h"
1232#include <sys/types.h>
1233#include <sys/param.h>
1234int main() {
1235
1236#if BYTE_ORDER != BIG_ENDIAN
1237 not big endian
1238#endif
1239; return 0; }
1240EOF
1241if { (eval echo configure:1242: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1242  rm -rf conftest*
1243  ac_cv_c_bigendian=yes
1244else
1245  echo "configure: failed program was:" >&5
1246  cat conftest.$ac_ext >&5
1247  rm -rf conftest*
1248  ac_cv_c_bigendian=no
1249fi
1250rm -f conftest*
1251else
1252  echo "configure: failed program was:" >&5
1253  cat conftest.$ac_ext >&5
1254fi
1255rm -f conftest*
1256if test $ac_cv_c_bigendian = unknown; then
1257if test "$cross_compiling" = yes; then
1258    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1259else
1260  cat > conftest.$ac_ext <<EOF
1261#line 1262 "configure"
1262#include "confdefs.h"
1263main () {
1264  /* Are we little or big endian?  From Harbison&Steele.  */
1265  union
1266  {
1267    long l;
1268    char c[sizeof (long)];
1269  } u;
1270  u.l = 1;
1271  exit (u.c[sizeof (long) - 1] == 1);
1272}
1273EOF
1274if { (eval echo configure:1275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1275then
1276  ac_cv_c_bigendian=no
1277else
1278  echo "configure: failed program was:" >&5
1279  cat conftest.$ac_ext >&5
1280  rm -fr conftest*
1281  ac_cv_c_bigendian=yes
1282fi
1283rm -fr conftest*
1284fi
1285
1286fi
1287fi
1288
1289echo "$ac_t""$ac_cv_c_bigendian" 1>&6
1290if test $ac_cv_c_bigendian = yes; then
1291  cat >> confdefs.h <<\EOF
1292#define WORDS_BIGENDIAN 1
1293EOF
1294
1295fi
1296
1297echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
1298echo "configure:1299: checking whether char is unsigned" >&5
1299if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
1300  echo $ac_n "(cached) $ac_c" 1>&6
1301else
1302  if test "$GCC" = yes; then
1303  # GCC predefines this symbol on systems where it applies.
1304cat > conftest.$ac_ext <<EOF
1305#line 1306 "configure"
1306#include "confdefs.h"
1307#ifdef __CHAR_UNSIGNED__
1308  yes
1309#endif
1310
1311EOF
1312if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1313  egrep "yes" >/dev/null 2>&1; then
1314  rm -rf conftest*
1315  ac_cv_c_char_unsigned=yes
1316else
1317  rm -rf conftest*
1318  ac_cv_c_char_unsigned=no
1319fi
1320rm -f conftest*
1321
1322else
1323if test "$cross_compiling" = yes; then
1324    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1325else
1326  cat > conftest.$ac_ext <<EOF
1327#line 1328 "configure"
1328#include "confdefs.h"
1329/* volatile prevents gcc2 from optimizing the test away on sparcs.  */
1330#if !defined(__STDC__) || __STDC__ != 1
1331#define volatile
1332#endif
1333main() {
1334  volatile char c = 255; exit(c < 0);
1335}
1336EOF
1337if { (eval echo configure:1338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1338then
1339  ac_cv_c_char_unsigned=yes
1340else
1341  echo "configure: failed program was:" >&5
1342  cat conftest.$ac_ext >&5
1343  rm -fr conftest*
1344  ac_cv_c_char_unsigned=no
1345fi
1346rm -fr conftest*
1347fi
1348
1349fi
1350fi
1351
1352echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
1353if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
1354  cat >> confdefs.h <<\EOF
1355#define __CHAR_UNSIGNED__ 1
1356EOF
1357
1358fi
1359
1360
1361#------------------------------------------------------------------------------
1362# GCC-specific warning flags:  Set these early so all tests use arguments that
1363# application build will.  X11 header broken check is not valid without the
1364# GCC options.
1365#------------------------------------------------------------------------------
1366if test "$GCC" = yes
1367then
1368        CFLAGS="$CFLAGS -W -Wall -Wbad-function-cast -Wmissing-prototypes -Werror"
1369        if test -f .devel
1370        then
1371                CFLAGS="$CFLAGS -Werror"
1372        fi
1373fi
1374
1375# Check for various headers                                                 
1376for ac_hdr in stdint.h inttypes.h stropts.h sys/filio.h malloc.h bstring.h
1377do
1378ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1379echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1380echo "configure:1381: checking for $ac_hdr" >&5
1381if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1382  echo $ac_n "(cached) $ac_c" 1>&6
1383else
1384  cat > conftest.$ac_ext <<EOF
1385#line 1386 "configure"
1386#include "confdefs.h"
1387#include <$ac_hdr>
1388EOF
1389ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1390{ (eval echo configure:1391: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1391ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1392if test -z "$ac_err"; then
1393  rm -rf conftest*
1394  eval "ac_cv_header_$ac_safe=yes"
1395else
1396  echo "$ac_err" >&5
1397  echo "configure: failed program was:" >&5
1398  cat conftest.$ac_ext >&5
1399  rm -rf conftest*
1400  eval "ac_cv_header_$ac_safe=no"
1401fi
1402rm -f conftest*
1403fi
1404if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1405  echo "$ac_t""yes" 1>&6
1406    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1407  cat >> confdefs.h <<EOF
1408#define $ac_tr_hdr 1
1409EOF
1410 
1411else
1412  echo "$ac_t""no" 1>&6
1413fi
1414done
1415
1416for ac_hdr in sys/sockio.h
1417do
1418ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1419echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1420echo "configure:1421: checking for $ac_hdr" >&5
1421if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1422  echo $ac_n "(cached) $ac_c" 1>&6
1423else
1424  cat > conftest.$ac_ext <<EOF
1425#line 1426 "configure"
1426#include "confdefs.h"
1427#include <$ac_hdr>
1428EOF
1429ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1430{ (eval echo configure:1431: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1431ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1432if test -z "$ac_err"; then
1433  rm -rf conftest*
1434  eval "ac_cv_header_$ac_safe=yes"
1435else
1436  echo "$ac_err" >&5
1437  echo "configure: failed program was:" >&5
1438  cat conftest.$ac_ext >&5
1439  rm -rf conftest*
1440  eval "ac_cv_header_$ac_safe=no"
1441fi
1442rm -f conftest*
1443fi
1444if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1445  echo "$ac_t""yes" 1>&6
1446    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1447  cat >> confdefs.h <<EOF
1448#define $ac_tr_hdr 1
1449EOF
1450 
1451else
1452  echo "$ac_t""no" 1>&6
1453fi
1454done
1455
1456
1457# Check for missing declarations
1458echo $ac_n "checking for kill declaration""... $ac_c" 1>&6
1459echo "configure:1460: checking for kill declaration" >&5
1460cat > conftest.$ac_ext <<EOF
1461#line 1462 "configure"
1462#include "confdefs.h"
1463#include <signal.h>
1464EOF
1465if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1466  egrep "kill" >/dev/null 2>&1; then
1467  rm -rf conftest*
1468  echo "$ac_t""present" 1>&6
1469else
1470  rm -rf conftest*
1471 
1472        echo "$ac_t""missing" 1>&6
1473        cat >> confdefs.h <<\EOF
1474#define KILL_NOT_DECLARED 1
1475EOF
1476
1477
1478fi
1479rm -f conftest*
1480
1481echo $ac_n "checking for gettimeofday declaration""... $ac_c" 1>&6
1482echo "configure:1483: checking for gettimeofday declaration" >&5
1483cat > conftest.$ac_ext <<EOF
1484#line 1485 "configure"
1485#include "confdefs.h"
1486#include <sys/time.h>
1487EOF
1488if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1489  egrep "gettimeofday" >/dev/null 2>&1; then
1490  rm -rf conftest*
1491  echo "$ac_t""present" 1>&6
1492else
1493  rm -rf conftest*
1494 
1495    echo "$ac_t""missing" 1>&6
1496    cat >> confdefs.h <<\EOF
1497#define GETTOD_NOT_DECLARED 1
1498EOF
1499
1500
1501fi
1502rm -f conftest*
1503
1504
1505# Check for libraries                                                       
1506
1507echo $ac_n "checking for library containing socket""... $ac_c" 1>&6
1508echo "configure:1509: checking for library containing socket" >&5
1509if eval "test \"`echo '$''{'ac_cv_search_socket'+set}'`\" = set"; then
1510  echo $ac_n "(cached) $ac_c" 1>&6
1511else
1512  ac_func_search_save_LIBS="$LIBS"
1513ac_cv_search_socket="no"
1514cat > conftest.$ac_ext <<EOF
1515#line 1516 "configure"
1516#include "confdefs.h"
1517/* Override any gcc2 internal prototype to avoid an error.  */
1518/* We use char because int might match the return type of a gcc2
1519    builtin and then its argument prototype would still apply.  */
1520char socket();
1521
1522int main() {
1523socket()
1524; return 0; }
1525EOF
1526if { (eval echo configure:1527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1527  rm -rf conftest*
1528  ac_cv_search_socket="none required"
1529else
1530  echo "configure: failed program was:" >&5
1531  cat conftest.$ac_ext >&5
1532fi
1533rm -f conftest*
1534test "$ac_cv_search_socket" = "no" && for i in socket; do
1535LIBS="-l$i  $ac_func_search_save_LIBS"
1536cat > conftest.$ac_ext <<EOF
1537#line 1538 "configure"
1538#include "confdefs.h"
1539/* Override any gcc2 internal prototype to avoid an error.  */
1540/* We use char because int might match the return type of a gcc2
1541    builtin and then its argument prototype would still apply.  */
1542char socket();
1543
1544int main() {
1545socket()
1546; return 0; }
1547EOF
1548if { (eval echo configure:1549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1549  rm -rf conftest*
1550  ac_cv_search_socket="-l$i"
1551break
1552else
1553  echo "configure: failed program was:" >&5
1554  cat conftest.$ac_ext >&5
1555fi
1556rm -f conftest*
1557done
1558LIBS="$ac_func_search_save_LIBS"
1559fi
1560
1561echo "$ac_t""$ac_cv_search_socket" 1>&6
1562if test "$ac_cv_search_socket" != "no"; then
1563  test "$ac_cv_search_socket" = "none required" || LIBS="$ac_cv_search_socket $LIBS"
1564 
1565else :
1566 
1567fi
1568
1569echo $ac_n "checking for library containing inet_addr""... $ac_c" 1>&6
1570echo "configure:1571: checking for library containing inet_addr" >&5
1571if eval "test \"`echo '$''{'ac_cv_search_inet_addr'+set}'`\" = set"; then
1572  echo $ac_n "(cached) $ac_c" 1>&6
1573else
1574  ac_func_search_save_LIBS="$LIBS"
1575ac_cv_search_inet_addr="no"
1576cat > conftest.$ac_ext <<EOF
1577#line 1578 "configure"
1578#include "confdefs.h"
1579/* Override any gcc2 internal prototype to avoid an error.  */
1580/* We use char because int might match the return type of a gcc2
1581    builtin and then its argument prototype would still apply.  */
1582char inet_addr();
1583
1584int main() {
1585inet_addr()
1586; return 0; }
1587EOF
1588if { (eval echo configure:1589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1589  rm -rf conftest*
1590  ac_cv_search_inet_addr="none required"
1591else
1592  echo "configure: failed program was:" >&5
1593  cat conftest.$ac_ext >&5
1594fi
1595rm -f conftest*
1596test "$ac_cv_search_inet_addr" = "no" && for i in nsl; do
1597LIBS="-l$i  $ac_func_search_save_LIBS"
1598cat > conftest.$ac_ext <<EOF
1599#line 1600 "configure"
1600#include "confdefs.h"
1601/* Override any gcc2 internal prototype to avoid an error.  */
1602/* We use char because int might match the return type of a gcc2
1603    builtin and then its argument prototype would still apply.  */
1604char inet_addr();
1605
1606int main() {
1607inet_addr()
1608; return 0; }
1609EOF
1610if { (eval echo configure:1611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1611  rm -rf conftest*
1612  ac_cv_search_inet_addr="-l$i"
1613break
1614else
1615  echo "configure: failed program was:" >&5
1616  cat conftest.$ac_ext >&5
1617fi
1618rm -f conftest*
1619done
1620LIBS="$ac_func_search_save_LIBS"
1621fi
1622
1623echo "$ac_t""$ac_cv_search_inet_addr" 1>&6
1624if test "$ac_cv_search_inet_addr" != "no"; then
1625  test "$ac_cv_search_inet_addr" = "none required" || LIBS="$ac_cv_search_inet_addr $LIBS"
1626 
1627else :
1628 
1629fi
1630
1631echo $ac_n "checking for library containing dlopen""... $ac_c" 1>&6
1632echo "configure:1633: checking for library containing dlopen" >&5
1633if eval "test \"`echo '$''{'ac_cv_search_dlopen'+set}'`\" = set"; then
1634  echo $ac_n "(cached) $ac_c" 1>&6
1635else
1636  ac_func_search_save_LIBS="$LIBS"
1637ac_cv_search_dlopen="no"
1638cat > conftest.$ac_ext <<EOF
1639#line 1640 "configure"
1640#include "confdefs.h"
1641/* Override any gcc2 internal prototype to avoid an error.  */
1642/* We use char because int might match the return type of a gcc2
1643    builtin and then its argument prototype would still apply.  */
1644char dlopen();
1645
1646int main() {
1647dlopen()
1648; return 0; }
1649EOF
1650if { (eval echo configure:1651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1651  rm -rf conftest*
1652  ac_cv_search_dlopen="none required"
1653else
1654  echo "configure: failed program was:" >&5
1655  cat conftest.$ac_ext >&5
1656fi
1657rm -f conftest*
1658test "$ac_cv_search_dlopen" = "no" && for i in dl; do
1659LIBS="-l$i  $ac_func_search_save_LIBS"
1660cat > conftest.$ac_ext <<EOF
1661#line 1662 "configure"
1662#include "confdefs.h"
1663/* Override any gcc2 internal prototype to avoid an error.  */
1664/* We use char because int might match the return type of a gcc2
1665    builtin and then its argument prototype would still apply.  */
1666char dlopen();
1667
1668int main() {
1669dlopen()
1670; return 0; }
1671EOF
1672if { (eval echo configure:1673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1673  rm -rf conftest*
1674  ac_cv_search_dlopen="-l$i"
1675break
1676else
1677  echo "configure: failed program was:" >&5
1678  cat conftest.$ac_ext >&5
1679fi
1680rm -f conftest*
1681done
1682LIBS="$ac_func_search_save_LIBS"
1683fi
1684
1685echo "$ac_t""$ac_cv_search_dlopen" 1>&6
1686if test "$ac_cv_search_dlopen" != "no"; then
1687  test "$ac_cv_search_dlopen" = "none required" || LIBS="$ac_cv_search_dlopen $LIBS"
1688 
1689else :
1690 
1691fi
1692
1693echo $ac_n "checking for sin""... $ac_c" 1>&6
1694echo "configure:1695: checking for sin" >&5
1695if eval "test \"`echo '$''{'ac_cv_func_sin'+set}'`\" = set"; then
1696  echo $ac_n "(cached) $ac_c" 1>&6
1697else
1698  cat > conftest.$ac_ext <<EOF
1699#line 1700 "configure"
1700#include "confdefs.h"
1701/* System header to define __stub macros and hopefully few prototypes,
1702    which can conflict with char sin(); below.  */
1703#include <assert.h>
1704/* Override any gcc2 internal prototype to avoid an error.  */
1705/* We use char because int might match the return type of a gcc2
1706    builtin and then its argument prototype would still apply.  */
1707char sin();
1708
1709int main() {
1710
1711/* The GNU C library defines this for functions which it implements
1712    to always fail with ENOSYS.  Some functions are actually named
1713    something starting with __ and the normal name is an alias.  */
1714#if defined (__stub_sin) || defined (__stub___sin)
1715choke me
1716#else
1717sin();
1718#endif
1719
1720; return 0; }
1721EOF
1722if { (eval echo configure:1723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1723  rm -rf conftest*
1724  eval "ac_cv_func_sin=yes"
1725else
1726  echo "configure: failed program was:" >&5
1727  cat conftest.$ac_ext >&5
1728  rm -rf conftest*
1729  eval "ac_cv_func_sin=no"
1730fi
1731rm -f conftest*
1732fi
1733
1734if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then
1735  echo "$ac_t""yes" 1>&6
1736  MATHLIBS=""
1737else
1738  echo "$ac_t""no" 1>&6
1739MATHLIBS="-lm"
1740fi
1741
1742echo $ac_n "checking for main in -lieee""... $ac_c" 1>&6
1743echo "configure:1744: checking for main in -lieee" >&5
1744ac_lib_var=`echo ieee'_'main | sed 'y%./+-%__p_%'`
1745if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1746  echo $ac_n "(cached) $ac_c" 1>&6
1747else
1748  ac_save_LIBS="$LIBS"
1749LIBS="-lieee  $LIBS"
1750cat > conftest.$ac_ext <<EOF
1751#line 1752 "configure"
1752#include "confdefs.h"
1753
1754int main() {
1755main()
1756; return 0; }
1757EOF
1758if { (eval echo configure:1759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1759  rm -rf conftest*
1760  eval "ac_cv_lib_$ac_lib_var=yes"
1761else
1762  echo "configure: failed program was:" >&5
1763  cat conftest.$ac_ext >&5
1764  rm -rf conftest*
1765  eval "ac_cv_lib_$ac_lib_var=no"
1766fi
1767rm -f conftest*
1768LIBS="$ac_save_LIBS"
1769
1770fi
1771if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1772  echo "$ac_t""yes" 1>&6
1773  MATHLIBS="-lieee $MATHLIBS"
1774else
1775  echo "$ac_t""no" 1>&6
1776fi
1777
1778
1779
1780# Check for standard size types.  The defaults are only valid on some systems
1781# so we hope that <inttypes.h> exists when they're wrong.                   
1782
1783echo $ac_n "checking for int8_t""... $ac_c" 1>&6
1784echo "configure:1785: checking for int8_t" >&5
1785if eval "test \"`echo '$''{'ac_cv_type_int8_t'+set}'`\" = set"; then
1786  echo $ac_n "(cached) $ac_c" 1>&6
1787else
1788  cat > conftest.$ac_ext <<EOF
1789#line 1790 "configure"
1790#include "confdefs.h"
1791#include <sys/types.h>
1792#if STDC_HEADERS
1793#include <stdlib.h>
1794#include <stddef.h>
1795#endif
1796EOF
1797if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1798  egrep "(^|[^a-zA-Z_0-9])int8_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1799  rm -rf conftest*
1800  ac_cv_type_int8_t=yes
1801else
1802  rm -rf conftest*
1803  ac_cv_type_int8_t=no
1804fi
1805rm -f conftest*
1806
1807fi
1808echo "$ac_t""$ac_cv_type_int8_t" 1>&6
1809if test $ac_cv_type_int8_t = no; then
1810  cat >> confdefs.h <<\EOF
1811#define int8_t signed char
1812EOF
1813
1814fi
1815
1816echo $ac_n "checking for int16_t""... $ac_c" 1>&6
1817echo "configure:1818: checking for int16_t" >&5
1818if eval "test \"`echo '$''{'ac_cv_type_int16_t'+set}'`\" = set"; then
1819  echo $ac_n "(cached) $ac_c" 1>&6
1820else
1821  cat > conftest.$ac_ext <<EOF
1822#line 1823 "configure"
1823#include "confdefs.h"
1824#include <sys/types.h>
1825#if STDC_HEADERS
1826#include <stdlib.h>
1827#include <stddef.h>
1828#endif
1829EOF
1830if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1831  egrep "(^|[^a-zA-Z_0-9])int16_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1832  rm -rf conftest*
1833  ac_cv_type_int16_t=yes
1834else
1835  rm -rf conftest*
1836  ac_cv_type_int16_t=no
1837fi
1838rm -f conftest*
1839
1840fi
1841echo "$ac_t""$ac_cv_type_int16_t" 1>&6
1842if test $ac_cv_type_int16_t = no; then
1843  cat >> confdefs.h <<\EOF
1844#define int16_t short
1845EOF
1846
1847fi
1848
1849echo $ac_n "checking for int32_t""... $ac_c" 1>&6
1850echo "configure:1851: checking for int32_t" >&5
1851if eval "test \"`echo '$''{'ac_cv_type_int32_t'+set}'`\" = set"; then
1852  echo $ac_n "(cached) $ac_c" 1>&6
1853else
1854  cat > conftest.$ac_ext <<EOF
1855#line 1856 "configure"
1856#include "confdefs.h"
1857#include <sys/types.h>
1858#if STDC_HEADERS
1859#include <stdlib.h>
1860#include <stddef.h>
1861#endif
1862EOF
1863if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1864  egrep "(^|[^a-zA-Z_0-9])int32_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1865  rm -rf conftest*
1866  ac_cv_type_int32_t=yes
1867else
1868  rm -rf conftest*
1869  ac_cv_type_int32_t=no
1870fi
1871rm -f conftest*
1872
1873fi
1874echo "$ac_t""$ac_cv_type_int32_t" 1>&6
1875if test $ac_cv_type_int32_t = no; then
1876  cat >> confdefs.h <<\EOF
1877#define int32_t long
1878EOF
1879
1880fi
1881
1882echo $ac_n "checking for int64_t""... $ac_c" 1>&6
1883echo "configure:1884: checking for int64_t" >&5
1884if eval "test \"`echo '$''{'ac_cv_type_int64_t'+set}'`\" = set"; then
1885  echo $ac_n "(cached) $ac_c" 1>&6
1886else
1887  cat > conftest.$ac_ext <<EOF
1888#line 1889 "configure"
1889#include "confdefs.h"
1890#include <sys/types.h>
1891#if STDC_HEADERS
1892#include <stdlib.h>
1893#include <stddef.h>
1894#endif
1895EOF
1896if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1897  egrep "(^|[^a-zA-Z_0-9])int64_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1898  rm -rf conftest*
1899  ac_cv_type_int64_t=yes
1900else
1901  rm -rf conftest*
1902  ac_cv_type_int64_t=no
1903fi
1904rm -f conftest*
1905
1906fi
1907echo "$ac_t""$ac_cv_type_int64_t" 1>&6
1908if test $ac_cv_type_int64_t = no; then
1909  cat >> confdefs.h <<\EOF
1910#define int64_t long long
1911EOF
1912
1913fi
1914
1915
1916# Some systems have these in <stdint.h>, just to be difficult...
1917echo $ac_n "checking for uint8_t in <stdint.h>""... $ac_c" 1>&6
1918echo "configure:1919: checking for uint8_t in <stdint.h>" >&5
1919if eval "test \"`echo '$''{'ucl_cv_uint8_t_in_stdint_h'+set}'`\" = set"; then
1920  echo $ac_n "(cached) $ac_c" 1>&6
1921else
1922  cat > conftest.$ac_ext <<EOF
1923#line 1924 "configure"
1924#include "confdefs.h"
1925#include <stdint.h>
1926EOF
1927if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1928  egrep "uint8_t" >/dev/null 2>&1; then
1929  rm -rf conftest*
1930  ucl_cv_uint8_t_in_stdint_h=yes
1931else
1932  rm -rf conftest*
1933  ucl_cv_uint8_t_in_stdint_h=no
1934fi
1935rm -f conftest*
1936
1937fi
1938
1939echo "$ac_t""$ucl_cv_uint8_t_in_stdint_h" 1>&6
1940if test $ucl_cv_uint8_t_in_stdint_h = "no"
1941then
1942         echo $ac_n "checking for uint8_t""... $ac_c" 1>&6
1943echo "configure:1944: checking for uint8_t" >&5
1944if eval "test \"`echo '$''{'ac_cv_type_uint8_t'+set}'`\" = set"; then
1945  echo $ac_n "(cached) $ac_c" 1>&6
1946else
1947  cat > conftest.$ac_ext <<EOF
1948#line 1949 "configure"
1949#include "confdefs.h"
1950#include <sys/types.h>
1951#if STDC_HEADERS
1952#include <stdlib.h>
1953#include <stddef.h>
1954#endif
1955EOF
1956if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1957  egrep "(^|[^a-zA-Z_0-9])uint8_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1958  rm -rf conftest*
1959  ac_cv_type_uint8_t=yes
1960else
1961  rm -rf conftest*
1962  ac_cv_type_uint8_t=no
1963fi
1964rm -f conftest*
1965
1966fi
1967echo "$ac_t""$ac_cv_type_uint8_t" 1>&6
1968if test $ac_cv_type_uint8_t = no; then
1969  cat >> confdefs.h <<\EOF
1970#define uint8_t unsigned char
1971EOF
1972
1973fi
1974
1975fi
1976
1977echo $ac_n "checking for uint16_t in <stdint.h>""... $ac_c" 1>&6
1978echo "configure:1979: checking for uint16_t in <stdint.h>" >&5
1979if eval "test \"`echo '$''{'ucl_cv_uint16_t_in_stdint_h'+set}'`\" = set"; then
1980  echo $ac_n "(cached) $ac_c" 1>&6
1981else
1982  cat > conftest.$ac_ext <<EOF
1983#line 1984 "configure"
1984#include "confdefs.h"
1985#include <stdint.h>
1986EOF
1987if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1988  egrep "uint16_t" >/dev/null 2>&1; then
1989  rm -rf conftest*
1990  ucl_cv_uint16_t_in_stdint_h=yes
1991else
1992  rm -rf conftest*
1993  ucl_cv_uint16_t_in_stdint_h=no
1994fi
1995rm -f conftest*
1996
1997fi
1998
1999echo "$ac_t""$ucl_cv_uint16_t_in_stdint_h" 1>&6
2000if test $ucl_cv_uint16_t_in_stdint_h = "no"
2001then
2002         echo $ac_n "checking for uint16_t""... $ac_c" 1>&6
2003echo "configure:2004: checking for uint16_t" >&5
2004if eval "test \"`echo '$''{'ac_cv_type_uint16_t'+set}'`\" = set"; then
2005  echo $ac_n "(cached) $ac_c" 1>&6
2006else
2007  cat > conftest.$ac_ext <<EOF
2008#line 2009 "configure"
2009#include "confdefs.h"
2010#include <sys/types.h>
2011#if STDC_HEADERS
2012#include <stdlib.h>
2013#include <stddef.h>
2014#endif
2015EOF
2016if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2017  egrep "(^|[^a-zA-Z_0-9])uint16_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2018  rm -rf conftest*
2019  ac_cv_type_uint16_t=yes
2020else
2021  rm -rf conftest*
2022  ac_cv_type_uint16_t=no
2023fi
2024rm -f conftest*
2025
2026fi
2027echo "$ac_t""$ac_cv_type_uint16_t" 1>&6
2028if test $ac_cv_type_uint16_t = no; then
2029  cat >> confdefs.h <<\EOF
2030#define uint16_t unsigned short
2031EOF
2032
2033fi
2034
2035fi
2036
2037echo $ac_n "checking for uint32_t in <stdint.h>""... $ac_c" 1>&6
2038echo "configure:2039: checking for uint32_t in <stdint.h>" >&5
2039if eval "test \"`echo '$''{'ucl_cv_uint32_t_in_stdint_h'+set}'`\" = set"; then
2040  echo $ac_n "(cached) $ac_c" 1>&6
2041else
2042  cat > conftest.$ac_ext <<EOF
2043#line 2044 "configure"
2044#include "confdefs.h"
2045#include <stdint.h>
2046EOF
2047if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2048  egrep "uint32_t" >/dev/null 2>&1; then
2049  rm -rf conftest*
2050  ucl_cv_uint32_t_in_stdint_h=yes
2051else
2052  rm -rf conftest*
2053  ucl_cv_uint32_t_in_stdint_h=no
2054fi
2055rm -f conftest*
2056
2057fi
2058
2059echo "$ac_t""$ucl_cv_uint32_t_in_stdint_h" 1>&6
2060if test $ucl_cv_uint32_t_in_stdint_h = "no"
2061then
2062         echo $ac_n "checking for uint32_t""... $ac_c" 1>&6
2063echo "configure:2064: checking for uint32_t" >&5
2064if eval "test \"`echo '$''{'ac_cv_type_uint32_t'+set}'`\" = set"; then
2065  echo $ac_n "(cached) $ac_c" 1>&6
2066else
2067  cat > conftest.$ac_ext <<EOF
2068#line 2069 "configure"
2069#include "confdefs.h"
2070#include <sys/types.h>
2071#if STDC_HEADERS
2072#include <stdlib.h>
2073#include <stddef.h>
2074#endif
2075EOF
2076if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2077  egrep "(^|[^a-zA-Z_0-9])uint32_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2078  rm -rf conftest*
2079  ac_cv_type_uint32_t=yes
2080else
2081  rm -rf conftest*
2082  ac_cv_type_uint32_t=no
2083fi
2084rm -f conftest*
2085
2086fi
2087echo "$ac_t""$ac_cv_type_uint32_t" 1>&6
2088if test $ac_cv_type_uint32_t = no; then
2089  cat >> confdefs.h <<\EOF
2090#define uint32_t unsigned int
2091EOF
2092
2093fi
2094
2095fi
2096
2097#
2098# The (?which?) library does not work with unsigned characters.
2099# Force the compiler to use signed chars.
2100if test $ac_cv_c_char_unsigned = yes
2101then
2102        if test "$GCC" = yes
2103        then
2104                CFLAGS="$CFLAGS -fsigned-char"
2105        else
2106                case "$host_os" in
2107                # I don't know when "-signed" was added to IRIX CC
2108                # so err on the side of using it.
2109                irix*)  CFLAGS="$CFLAGS -signed"
2110                        ;;
2111                # need e.g. --force-signed-chars=-signed
2112                *)      { echo "configure: error: I don't know how to force signed chars" 1>&2; exit 1; }
2113                        ;;
2114                esac
2115        fi
2116fi
2117#  __CHAR_UNSIGNED__ will be defined; hope this is OK.
2118
2119# Check for missing functions                                               
2120EXTRA_OBJ=
2121echo $ac_n "checking for usleep""... $ac_c" 1>&6
2122echo "configure:2123: checking for usleep" >&5
2123if eval "test \"`echo '$''{'ac_cv_func_usleep'+set}'`\" = set"; then
2124  echo $ac_n "(cached) $ac_c" 1>&6
2125else
2126  cat > conftest.$ac_ext <<EOF
2127#line 2128 "configure"
2128#include "confdefs.h"
2129/* System header to define __stub macros and hopefully few prototypes,
2130    which can conflict with char usleep(); below.  */
2131#include <assert.h>
2132/* Override any gcc2 internal prototype to avoid an error.  */
2133/* We use char because int might match the return type of a gcc2
2134    builtin and then its argument prototype would still apply.  */
2135char usleep();
2136
2137int main() {
2138
2139/* The GNU C library defines this for functions which it implements
2140    to always fail with ENOSYS.  Some functions are actually named
2141    something starting with __ and the normal name is an alias.  */
2142#if defined (__stub_usleep) || defined (__stub___usleep)
2143choke me
2144#else
2145usleep();
2146#endif
2147
2148; return 0; }
2149EOF
2150if { (eval echo configure:2151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2151  rm -rf conftest*
2152  eval "ac_cv_func_usleep=yes"
2153else
2154  echo "configure: failed program was:" >&5
2155  cat conftest.$ac_ext >&5
2156  rm -rf conftest*
2157  eval "ac_cv_func_usleep=no"
2158fi
2159rm -f conftest*
2160fi
2161
2162if eval "test \"`echo '$ac_cv_func_'usleep`\" = yes"; then
2163  echo "$ac_t""yes" 1>&6
2164  :
2165else
2166  echo "$ac_t""no" 1>&6
2167EXTRAOBJ="$EXTRA_OBJ usleep.o"
2168         cat >> confdefs.h <<\EOF
2169#define NEED_USLEEP 1
2170EOF
2171
2172fi
2173
2174
2175
2176
2177# Audio device selection,  derived from host type.  Could be smart and probe
2178# what's there...                                                           
2179
2180AU_INC=
2181AU_LIB=
2182AU_OBJ=
2183
2184case "$target" in
2185*solaris*)
2186        SUNAUDIOHOME="/usr/demo/SOUND"
2187        O1KHOME="/opt/SUNWo1kp"
2188        # Check whether --with-sun-audio or --without-sun-audio was given.
2189if test "${with_sun_audio+set}" = set; then
2190  withval="$with_sun_audio"
2191  SUNAUDIOHOME=$withval
2192fi
2193
2194        AU_INC="$AU_INC -I$SUNAUDIOHOME/include"
2195        AU_OBJ="$AU_OBJ auddev_sparc.o"
2196        cat >> confdefs.h <<\EOF
2197#define HAVE_SPARC_AUDIO 1
2198EOF
2199
2200        # Check whether --with-osprey-audio or --without-osprey-audio was given.
2201if test "${with_osprey_audio+set}" = set; then
2202  withval="$with_osprey_audio"
2203  O1KHOME=$withval
2204fi
2205
2206        ac_safe=`echo "$O1KHOME/include/oti_audio_device.h" | sed 'y%./+-%__p_%'`
2207echo $ac_n "checking for $O1KHOME/include/oti_audio_device.h""... $ac_c" 1>&6
2208echo "configure:2209: checking for $O1KHOME/include/oti_audio_device.h" >&5
2209if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2210  echo $ac_n "(cached) $ac_c" 1>&6
2211else
2212  cat > conftest.$ac_ext <<EOF
2213#line 2214 "configure"
2214#include "confdefs.h"
2215#include <$O1KHOME/include/oti_audio_device.h>
2216EOF
2217ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2218{ (eval echo configure:2219: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2219ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2220if test -z "$ac_err"; then
2221  rm -rf conftest*
2222  eval "ac_cv_header_$ac_safe=yes"
2223else
2224  echo "$ac_err" >&5
2225  echo "configure: failed program was:" >&5
2226  cat conftest.$ac_ext >&5
2227  rm -rf conftest*
2228  eval "ac_cv_header_$ac_safe=no"
2229fi
2230rm -f conftest*
2231fi
2232if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2233  echo "$ac_t""yes" 1>&6
2234  AU_INC="$AU_INC -I$O1KHOME/include"
2235                 AU_OBJ="$AU_OBJ auddev_osprey.o"
2236                 cat >> confdefs.h <<\EOF
2237#define HAVE_OSPREY_AUDIO 1
2238EOF
2239
2240else
2241  echo "$ac_t""no" 1>&6
2242fi
2243
2244        ;;
2245*linux*)
2246        AU_OBJ="$AU_OBJ auddev_oss.o"
2247        AU_INC="/usr/include/sys"
2248        cat >> confdefs.h <<\EOF
2249#define HAVE_OSS_AUDIO 1
2250EOF
2251
2252        ;;
2253*freebsd*)
2254        # PC Speaker device on FreeBSD
2255        for ac_hdr in machine/pcaudioio.h
2256do
2257ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2258echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2259echo "configure:2260: checking for $ac_hdr" >&5
2260if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2261  echo $ac_n "(cached) $ac_c" 1>&6
2262else
2263  cat > conftest.$ac_ext <<EOF
2264#line 2265 "configure"
2265#include "confdefs.h"
2266#include <$ac_hdr>
2267EOF
2268ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2269{ (eval echo configure:2270: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2270ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2271if test -z "$ac_err"; then
2272  rm -rf conftest*
2273  eval "ac_cv_header_$ac_safe=yes"
2274else
2275  echo "$ac_err" >&5
2276  echo "configure: failed program was:" >&5
2277  cat conftest.$ac_ext >&5
2278  rm -rf conftest*
2279  eval "ac_cv_header_$ac_safe=no"
2280fi
2281rm -f conftest*
2282fi
2283if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2284  echo "$ac_t""yes" 1>&6
2285    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2286  cat >> confdefs.h <<EOF
2287#define $ac_tr_hdr 1
2288EOF
2289 
2290else
2291  echo "$ac_t""no" 1>&6
2292fi
2293done
2294
2295        # Luigi's driver
2296        AU_OBJ="$AU_OBJ auddev_luigi.o"
2297        cat >> confdefs.h <<\EOF
2298#define HAVE_LUIGI_AUDIO 1
2299EOF
2300
2301        ;;
2302*netbsd*)
2303        AU_OBJ="$AUDIOBJ auddev_netbsd.o"
2304        cat >> confdefs.h <<\EOF
2305#define HAVE_NETBSD_AUDIO 1
2306EOF
2307
2308        ;;
2309*irix*)
2310        AU_LIB="$AU_LIB -laudio"
2311        AU_OBJ="$AU_OBJ auddev_sgi.o"
2312        cat >> confdefs.h <<\EOF
2313#define HAVE_SGI_AUDIO 1
2314EOF
2315
2316        ;;
2317*hpux*)
2318        AU_LIB="$AU_LIB -lAlib"
2319        AU_OBJ="$AU_OBJ auddev_hpux_raw.o"
2320        cat >> confdefs.h <<\EOF
2321#define HAVE_HP_AUDIO 1
2322EOF
2323
2324        ;;
2325esac
2326
2327
2328
2329
2330
2331# X
2332# If we find X, set shell vars x_includes and x_libraries to the
2333# paths, otherwise set no_x=yes.
2334# Uses ac_ vars as temps to allow command line to override cache and checks.
2335# --without-x overrides everything else, but does not touch the cache.
2336echo $ac_n "checking for X""... $ac_c" 1>&6
2337echo "configure:2338: checking for X" >&5
2338
2339# Check whether --with-x or --without-x was given.
2340if test "${with_x+set}" = set; then
2341  withval="$with_x"
2342  :
2343fi
2344
2345# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
2346if test "x$with_x" = xno; then
2347  # The user explicitly disabled X.
2348  have_x=disabled
2349else
2350  if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
2351    # Both variables are already set.
2352    have_x=yes
2353  else
2354if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
2355  echo $ac_n "(cached) $ac_c" 1>&6
2356else
2357  # One or both of the vars are not set, and there is no cached value.
2358ac_x_includes=NO ac_x_libraries=NO
2359rm -fr conftestdir
2360if mkdir conftestdir; then
2361  cd conftestdir
2362  # Make sure to not put "make" in the Imakefile rules, since we grep it out.
2363  cat > Imakefile <<'EOF'
2364acfindx:
2365        @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
2366EOF
2367  if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
2368    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2369    eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
2370    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
2371    for ac_extension in a so sl; do
2372      if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
2373        test -f $ac_im_libdir/libX11.$ac_extension; then
2374        ac_im_usrlibdir=$ac_im_libdir; break
2375      fi
2376    done
2377    # Screen out bogus values from the imake configuration.  They are
2378    # bogus both because they are the default anyway, and because
2379    # using them would break gcc on systems where it needs fixed includes.
2380    case "$ac_im_incroot" in
2381        /usr/include) ;;
2382        *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
2383    esac
2384    case "$ac_im_usrlibdir" in
2385        /usr/lib | /lib) ;;
2386        *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
2387    esac
2388  fi
2389  cd ..
2390  rm -fr conftestdir
2391fi
2392
2393if test "$ac_x_includes" = NO; then
2394  # Guess where to find include files, by looking for this one X11 .h file.
2395  test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
2396
2397  # First, try using that file with no special directory specified.
2398cat > conftest.$ac_ext <<EOF
2399#line 2400 "configure"
2400#include "confdefs.h"
2401#include <$x_direct_test_include>
2402EOF
2403ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2404{ (eval echo configure:2405: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2405ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2406if test -z "$ac_err"; then
2407  rm -rf conftest*
2408  # We can compile using X headers with no special include directory.
2409ac_x_includes=
2410else
2411  echo "$ac_err" >&5
2412  echo "configure: failed program was:" >&5
2413  cat conftest.$ac_ext >&5
2414  rm -rf conftest*
2415  # Look for the header file in a standard set of common directories.
2416# Check X11 before X11Rn because it is often a symlink to the current release.
2417  for ac_dir in               \
2418    /usr/X11/include          \
2419    /usr/X11R6/include        \
2420    /usr/X11R5/include        \
2421    /usr/X11R4/include        \
2422                              \
2423    /usr/include/X11          \
2424    /usr/include/X11R6        \
2425    /usr/include/X11R5        \
2426    /usr/include/X11R4        \
2427                              \
2428    /usr/local/X11/include    \
2429    /usr/local/X11R6/include  \
2430    /usr/local/X11R5/include  \
2431    /usr/local/X11R4/include  \
2432                              \
2433    /usr/local/include/X11    \
2434    /usr/local/include/X11R6  \
2435    /usr/local/include/X11R5  \
2436    /usr/local/include/X11R4  \
2437                              \
2438    /usr/X386/include         \
2439    /usr/x386/include         \
2440    /usr/XFree86/include/X11  \
2441                              \
2442    /usr/include              \
2443    /usr/local/include        \
2444    /usr/unsupported/include  \
2445    /usr/athena/include       \
2446    /usr/local/x11r5/include  \
2447    /usr/lpp/Xamples/include  \
2448                              \
2449    /usr/openwin/include      \
2450    /usr/openwin/share/include \
2451    ; \
2452  do
2453    if test -r "$ac_dir/$x_direct_test_include"; then
2454      ac_x_includes=$ac_dir
2455      break
2456    fi
2457  done
2458fi
2459rm -f conftest*
2460fi # $ac_x_includes = NO
2461
2462if test "$ac_x_libraries" = NO; then
2463  # Check for the libraries.
2464
2465  test -z "$x_direct_test_library" && x_direct_test_library=Xt
2466  test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
2467
2468  # See if we find them without any special options.
2469  # Don't add to $LIBS permanently.
2470  ac_save_LIBS="$LIBS"
2471  LIBS="-l$x_direct_test_library $LIBS"
2472cat > conftest.$ac_ext <<EOF
2473#line 2474 "configure"
2474#include "confdefs.h"
2475
2476int main() {
2477${x_direct_test_function}()
2478; return 0; }
2479EOF
2480if { (eval echo configure:2481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2481  rm -rf conftest*
2482  LIBS="$ac_save_LIBS"
2483# We can link X programs with no special library path.
2484ac_x_libraries=
2485else
2486  echo "configure: failed program was:" >&5
2487  cat conftest.$ac_ext >&5
2488  rm -rf conftest*
2489  LIBS="$ac_save_LIBS"
2490# First see if replacing the include by lib works.
2491# Check X11 before X11Rn because it is often a symlink to the current release.
2492for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
2493    /usr/X11/lib          \
2494    /usr/X11R6/lib        \
2495    /usr/X11R5/lib        \
2496    /usr/X11R4/lib        \
2497                          \
2498    /usr/lib/X11          \
2499    /usr/lib/X11R6        \
2500    /usr/lib/X11R5        \
2501    /usr/lib/X11R4        \
2502                          \
2503    /usr/local/X11/lib    \
2504    /usr/local/X11R6/lib  \
2505    /usr/local/X11R5/lib  \
2506    /usr/local/X11R4/lib  \
2507                          \
2508    /usr/local/lib/X11    \
2509    /usr/local/lib/X11R6  \
2510    /usr/local/lib/X11R5  \
2511    /usr/local/lib/X11R4  \
2512                          \
2513    /usr/X386/lib         \
2514    /usr/x386/lib         \
2515    /usr/XFree86/lib/X11  \
2516                          \
2517    /usr/lib              \
2518    /usr/local/lib        \
2519    /usr/unsupported/lib  \
2520    /usr/athena/lib       \
2521    /usr/local/x11r5/lib  \
2522    /usr/lpp/Xamples/lib  \
2523    /lib/usr/lib/X11      \
2524                          \
2525    /usr/openwin/lib      \
2526    /usr/openwin/share/lib \
2527    ; \
2528do
2529  for ac_extension in a so sl; do
2530    if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
2531      ac_x_libraries=$ac_dir
2532      break 2
2533    fi
2534  done
2535done
2536fi
2537rm -f conftest*
2538fi # $ac_x_libraries = NO
2539
2540if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
2541  # Didn't find X anywhere.  Cache the known absence of X.
2542  ac_cv_have_x="have_x=no"
2543else
2544  # Record where we found X for the cache.
2545  ac_cv_have_x="have_x=yes \
2546                ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
2547fi
2548fi
2549  fi
2550  eval "$ac_cv_have_x"
2551fi # $with_x != no
2552
2553if test "$have_x" != yes; then
2554  echo "$ac_t""$have_x" 1>&6
2555  no_x=yes
2556else
2557  # If each of the values was on the command line, it overrides each guess.
2558  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
2559  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
2560  # Update the cache value to reflect the command line values.
2561  ac_cv_have_x="have_x=yes \
2562                ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
2563  echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
2564fi
2565
2566if test "$no_x" = yes; then
2567  # Not all programs may use this symbol, but it does not hurt to define it.
2568  cat >> confdefs.h <<\EOF
2569#define X_DISPLAY_MISSING 1
2570EOF
2571
2572  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
2573else
2574  if test -n "$x_includes"; then
2575    X_CFLAGS="$X_CFLAGS -I$x_includes"
2576  fi
2577
2578  # It would also be nice to do this for all -L options, not just this one.
2579  if test -n "$x_libraries"; then
2580    X_LIBS="$X_LIBS -L$x_libraries"
2581    # For Solaris; some versions of Sun CC require a space after -R and
2582    # others require no space.  Words are not sufficient . . . .
2583    case "`(uname -sr) 2>/dev/null`" in
2584    "SunOS 5"*)
2585      echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
2586echo "configure:2587: checking whether -R must be followed by a space" >&5
2587      ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
2588      cat > conftest.$ac_ext <<EOF
2589#line 2590 "configure"
2590#include "confdefs.h"
2591
2592int main() {
2593
2594; return 0; }
2595EOF
2596if { (eval echo configure:2597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2597  rm -rf conftest*
2598  ac_R_nospace=yes
2599else
2600  echo "configure: failed program was:" >&5
2601  cat conftest.$ac_ext >&5
2602  rm -rf conftest*
2603  ac_R_nospace=no
2604fi
2605rm -f conftest*
2606      if test $ac_R_nospace = yes; then
2607        echo "$ac_t""no" 1>&6
2608        X_LIBS="$X_LIBS -R$x_libraries"
2609      else
2610        LIBS="$ac_xsave_LIBS -R $x_libraries"
2611        cat > conftest.$ac_ext <<EOF
2612#line 2613 "configure"
2613#include "confdefs.h"
2614
2615int main() {
2616
2617; return 0; }
2618EOF
2619if { (eval echo configure:2620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2620  rm -rf conftest*
2621  ac_R_space=yes
2622else
2623  echo "configure: failed program was:" >&5
2624  cat conftest.$ac_ext >&5
2625  rm -rf conftest*
2626  ac_R_space=no
2627fi
2628rm -f conftest*
2629        if test $ac_R_space = yes; then
2630          echo "$ac_t""yes" 1>&6
2631          X_LIBS="$X_LIBS -R $x_libraries"
2632        else
2633          echo "$ac_t""neither works" 1>&6
2634        fi
2635      fi
2636      LIBS="$ac_xsave_LIBS"
2637    esac
2638  fi
2639
2640  # Check for system-dependent libraries X programs must link with.
2641  # Do this before checking for the system-independent R6 libraries
2642  # (-lICE), since we may need -lsocket or whatever for X linking.
2643
2644  if test "$ISC" = yes; then
2645    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
2646  else
2647    # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
2648    # libraries were built with DECnet support.  And karl@cs.umb.edu says
2649    # the Alpha needs dnet_stub (dnet does not exist).
2650    echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
2651echo "configure:2652: checking for dnet_ntoa in -ldnet" >&5
2652ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
2653if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2654  echo $ac_n "(cached) $ac_c" 1>&6
2655else
2656  ac_save_LIBS="$LIBS"
2657LIBS="-ldnet  $LIBS"
2658cat > conftest.$ac_ext <<EOF
2659#line 2660 "configure"
2660#include "confdefs.h"
2661/* Override any gcc2 internal prototype to avoid an error.  */
2662/* We use char because int might match the return type of a gcc2
2663    builtin and then its argument prototype would still apply.  */
2664char dnet_ntoa();
2665
2666int main() {
2667dnet_ntoa()
2668; return 0; }
2669EOF
2670if { (eval echo configure:2671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2671  rm -rf conftest*
2672  eval "ac_cv_lib_$ac_lib_var=yes"
2673else
2674  echo "configure: failed program was:" >&5
2675  cat conftest.$ac_ext >&5
2676  rm -rf conftest*
2677  eval "ac_cv_lib_$ac_lib_var=no"
2678fi
2679rm -f conftest*
2680LIBS="$ac_save_LIBS"
2681
2682fi
2683if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2684  echo "$ac_t""yes" 1>&6
2685  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
2686else
2687  echo "$ac_t""no" 1>&6
2688fi
2689
2690    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
2691      echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
2692echo "configure:2693: checking for dnet_ntoa in -ldnet_stub" >&5
2693ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
2694if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2695  echo $ac_n "(cached) $ac_c" 1>&6
2696else
2697  ac_save_LIBS="$LIBS"
2698LIBS="-ldnet_stub  $LIBS"
2699cat > conftest.$ac_ext <<EOF
2700#line 2701 "configure"
2701#include "confdefs.h"
2702/* Override any gcc2 internal prototype to avoid an error.  */
2703/* We use char because int might match the return type of a gcc2
2704    builtin and then its argument prototype would still apply.  */
2705char dnet_ntoa();
2706
2707int main() {
2708dnet_ntoa()
2709; return 0; }
2710EOF
2711if { (eval echo configure:2712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2712  rm -rf conftest*
2713  eval "ac_cv_lib_$ac_lib_var=yes"
2714else
2715  echo "configure: failed program was:" >&5
2716  cat conftest.$ac_ext >&5
2717  rm -rf conftest*
2718  eval "ac_cv_lib_$ac_lib_var=no"
2719fi
2720rm -f conftest*
2721LIBS="$ac_save_LIBS"
2722
2723fi
2724if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2725  echo "$ac_t""yes" 1>&6
2726  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
2727else
2728  echo "$ac_t""no" 1>&6
2729fi
2730
2731    fi
2732
2733    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
2734    # to get the SysV transport functions.
2735    # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
2736    # needs -lnsl.
2737    # The nsl library prevents programs from opening the X display
2738    # on Irix 5.2, according to dickey@clark.net.
2739    echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
2740echo "configure:2741: checking for gethostbyname" >&5
2741if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
2742  echo $ac_n "(cached) $ac_c" 1>&6
2743else
2744  cat > conftest.$ac_ext <<EOF
2745#line 2746 "configure"
2746#include "confdefs.h"
2747/* System header to define __stub macros and hopefully few prototypes,
2748    which can conflict with char gethostbyname(); below.  */
2749#include <assert.h>
2750/* Override any gcc2 internal prototype to avoid an error.  */
2751/* We use char because int might match the return type of a gcc2
2752    builtin and then its argument prototype would still apply.  */
2753char gethostbyname();
2754
2755int main() {
2756
2757/* The GNU C library defines this for functions which it implements
2758    to always fail with ENOSYS.  Some functions are actually named
2759    something starting with __ and the normal name is an alias.  */
2760#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
2761choke me
2762#else
2763gethostbyname();
2764#endif
2765
2766; return 0; }
2767EOF
2768if { (eval echo configure:2769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2769  rm -rf conftest*
2770  eval "ac_cv_func_gethostbyname=yes"
2771else
2772  echo "configure: failed program was:" >&5
2773  cat conftest.$ac_ext >&5
2774  rm -rf conftest*
2775  eval "ac_cv_func_gethostbyname=no"
2776fi
2777rm -f conftest*
2778fi
2779
2780if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
2781  echo "$ac_t""yes" 1>&6
2782  :
2783else
2784  echo "$ac_t""no" 1>&6
2785fi
2786
2787    if test $ac_cv_func_gethostbyname = no; then
2788      echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
2789echo "configure:2790: checking for gethostbyname in -lnsl" >&5
2790ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
2791if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2792  echo $ac_n "(cached) $ac_c" 1>&6
2793else
2794  ac_save_LIBS="$LIBS"
2795LIBS="-lnsl  $LIBS"
2796cat > conftest.$ac_ext <<EOF
2797#line 2798 "configure"
2798#include "confdefs.h"
2799/* Override any gcc2 internal prototype to avoid an error.  */
2800/* We use char because int might match the return type of a gcc2
2801    builtin and then its argument prototype would still apply.  */
2802char gethostbyname();
2803
2804int main() {
2805gethostbyname()
2806; return 0; }
2807EOF
2808if { (eval echo configure:2809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2809  rm -rf conftest*
2810  eval "ac_cv_lib_$ac_lib_var=yes"
2811else
2812  echo "configure: failed program was:" >&5
2813  cat conftest.$ac_ext >&5
2814  rm -rf conftest*
2815  eval "ac_cv_lib_$ac_lib_var=no"
2816fi
2817rm -f conftest*
2818LIBS="$ac_save_LIBS"
2819
2820fi
2821if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2822  echo "$ac_t""yes" 1>&6
2823  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
2824else
2825  echo "$ac_t""no" 1>&6
2826fi
2827
2828    fi
2829
2830    # lieder@skyler.mavd.honeywell.com says without -lsocket,
2831    # socket/setsockopt and other routines are undefined under SCO ODT
2832    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
2833    # on later versions), says simon@lia.di.epfl.ch: it contains
2834    # gethostby* variants that don't use the nameserver (or something).
2835    # -lsocket must be given before -lnsl if both are needed.
2836    # We assume that if connect needs -lnsl, so does gethostbyname.
2837    echo $ac_n "checking for connect""... $ac_c" 1>&6
2838echo "configure:2839: checking for connect" >&5
2839if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
2840  echo $ac_n "(cached) $ac_c" 1>&6
2841else
2842  cat > conftest.$ac_ext <<EOF
2843#line 2844 "configure"
2844#include "confdefs.h"
2845/* System header to define __stub macros and hopefully few prototypes,
2846    which can conflict with char connect(); below.  */
2847#include <assert.h>
2848/* Override any gcc2 internal prototype to avoid an error.  */
2849/* We use char because int might match the return type of a gcc2
2850    builtin and then its argument prototype would still apply.  */
2851char connect();
2852
2853int main() {
2854
2855/* The GNU C library defines this for functions which it implements
2856    to always fail with ENOSYS.  Some functions are actually named
2857    something starting with __ and the normal name is an alias.  */
2858#if defined (__stub_connect) || defined (__stub___connect)
2859choke me
2860#else
2861connect();
2862#endif
2863
2864; return 0; }
2865EOF
2866if { (eval echo configure:2867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2867  rm -rf conftest*
2868  eval "ac_cv_func_connect=yes"
2869else
2870  echo "configure: failed program was:" >&5
2871  cat conftest.$ac_ext >&5
2872  rm -rf conftest*
2873  eval "ac_cv_func_connect=no"
2874fi
2875rm -f conftest*
2876fi
2877
2878if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
2879  echo "$ac_t""yes" 1>&6
2880  :
2881else
2882  echo "$ac_t""no" 1>&6
2883fi
2884
2885    if test $ac_cv_func_connect = no; then
2886      echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
2887echo "configure:2888: checking for connect in -lsocket" >&5
2888ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
2889if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2890  echo $ac_n "(cached) $ac_c" 1>&6
2891else
2892  ac_save_LIBS="$LIBS"
2893LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
2894cat > conftest.$ac_ext <<EOF
2895#line 2896 "configure"
2896#include "confdefs.h"
2897/* Override any gcc2 internal prototype to avoid an error.  */
2898/* We use char because int might match the return type of a gcc2
2899    builtin and then its argument prototype would still apply.  */
2900char connect();
2901
2902int main() {
2903connect()
2904; return 0; }
2905EOF
2906if { (eval echo configure:2907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2907  rm -rf conftest*
2908  eval "ac_cv_lib_$ac_lib_var=yes"
2909else
2910  echo "configure: failed program was:" >&5
2911  cat conftest.$ac_ext >&5
2912  rm -rf conftest*
2913  eval "ac_cv_lib_$ac_lib_var=no"
2914fi
2915rm -f conftest*
2916LIBS="$ac_save_LIBS"
2917
2918fi
2919if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2920  echo "$ac_t""yes" 1>&6
2921  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
2922else
2923  echo "$ac_t""no" 1>&6
2924fi
2925
2926    fi
2927
2928    # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
2929    echo $ac_n "checking for remove""... $ac_c" 1>&6
2930echo "configure:2931: checking for remove" >&5
2931if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
2932  echo $ac_n "(cached) $ac_c" 1>&6
2933else
2934  cat > conftest.$ac_ext <<EOF
2935#line 2936 "configure"
2936#include "confdefs.h"
2937/* System header to define __stub macros and hopefully few prototypes,
2938    which can conflict with char remove(); below.  */
2939#include <assert.h>
2940/* Override any gcc2 internal prototype to avoid an error.  */
2941/* We use char because int might match the return type of a gcc2
2942    builtin and then its argument prototype would still apply.  */
2943char remove();
2944
2945int main() {
2946
2947/* The GNU C library defines this for functions which it implements
2948    to always fail with ENOSYS.  Some functions are actually named
2949    something starting with __ and the normal name is an alias.  */
2950#if defined (__stub_remove) || defined (__stub___remove)
2951choke me
2952#else
2953remove();
2954#endif
2955
2956; return 0; }
2957EOF
2958if { (eval echo configure:2959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2959  rm -rf conftest*
2960  eval "ac_cv_func_remove=yes"
2961else
2962  echo "configure: failed program was:" >&5
2963  cat conftest.$ac_ext >&5
2964  rm -rf conftest*
2965  eval "ac_cv_func_remove=no"
2966fi
2967rm -f conftest*
2968fi
2969
2970if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
2971  echo "$ac_t""yes" 1>&6
2972  :
2973else
2974  echo "$ac_t""no" 1>&6
2975fi
2976
2977    if test $ac_cv_func_remove = no; then
2978      echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
2979echo "configure:2980: checking for remove in -lposix" >&5
2980ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
2981if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2982  echo $ac_n "(cached) $ac_c" 1>&6
2983else
2984  ac_save_LIBS="$LIBS"
2985LIBS="-lposix  $LIBS"
2986cat > conftest.$ac_ext <<EOF
2987#line 2988 "configure"
2988#include "confdefs.h"
2989/* Override any gcc2 internal prototype to avoid an error.  */
2990/* We use char because int might match the return type of a gcc2
2991    builtin and then its argument prototype would still apply.  */
2992char remove();
2993
2994int main() {
2995remove()
2996; return 0; }
2997EOF
2998if { (eval echo configure:2999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2999  rm -rf conftest*
3000  eval "ac_cv_lib_$ac_lib_var=yes"
3001else
3002  echo "configure: failed program was:" >&5
3003  cat conftest.$ac_ext >&5
3004  rm -rf conftest*
3005  eval "ac_cv_lib_$ac_lib_var=no"
3006fi
3007rm -f conftest*
3008LIBS="$ac_save_LIBS"
3009
3010fi
3011if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3012  echo "$ac_t""yes" 1>&6
3013  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
3014else
3015  echo "$ac_t""no" 1>&6
3016fi
3017
3018    fi
3019
3020    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
3021    echo $ac_n "checking for shmat""... $ac_c" 1>&6
3022echo "configure:3023: checking for shmat" >&5
3023if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
3024  echo $ac_n "(cached) $ac_c" 1>&6
3025else
3026  cat > conftest.$ac_ext <<EOF
3027#line 3028 "configure"
3028#include "confdefs.h"
3029/* System header to define __stub macros and hopefully few prototypes,
3030    which can conflict with char shmat(); below.  */
3031#include <assert.h>
3032/* Override any gcc2 internal prototype to avoid an error.  */
3033/* We use char because int might match the return type of a gcc2
3034    builtin and then its argument prototype would still apply.  */
3035char shmat();
3036
3037int main() {
3038
3039/* The GNU C library defines this for functions which it implements
3040    to always fail with ENOSYS.  Some functions are actually named
3041    something starting with __ and the normal name is an alias.  */
3042#if defined (__stub_shmat) || defined (__stub___shmat)
3043choke me
3044#else
3045shmat();
3046#endif
3047
3048; return 0; }
3049EOF
3050if { (eval echo configure:3051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3051  rm -rf conftest*
3052  eval "ac_cv_func_shmat=yes"
3053else
3054  echo "configure: failed program was:" >&5
3055  cat conftest.$ac_ext >&5
3056  rm -rf conftest*
3057  eval "ac_cv_func_shmat=no"
3058fi
3059rm -f conftest*
3060fi
3061
3062if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
3063  echo "$ac_t""yes" 1>&6
3064  :
3065else
3066  echo "$ac_t""no" 1>&6
3067fi
3068
3069    if test $ac_cv_func_shmat = no; then
3070      echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
3071echo "configure:3072: checking for shmat in -lipc" >&5
3072ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
3073if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3074  echo $ac_n "(cached) $ac_c" 1>&6
3075else
3076  ac_save_LIBS="$LIBS"
3077LIBS="-lipc  $LIBS"
3078cat > conftest.$ac_ext <<EOF
3079#line 3080 "configure"
3080#include "confdefs.h"
3081/* Override any gcc2 internal prototype to avoid an error.  */
3082/* We use char because int might match the return type of a gcc2
3083    builtin and then its argument prototype would still apply.  */
3084char shmat();
3085
3086int main() {
3087shmat()
3088; return 0; }
3089EOF
3090if { (eval echo configure:3091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3091  rm -rf conftest*
3092  eval "ac_cv_lib_$ac_lib_var=yes"
3093else
3094  echo "configure: failed program was:" >&5
3095  cat conftest.$ac_ext >&5
3096  rm -rf conftest*
3097  eval "ac_cv_lib_$ac_lib_var=no"
3098fi
3099rm -f conftest*
3100LIBS="$ac_save_LIBS"
3101
3102fi
3103if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3104  echo "$ac_t""yes" 1>&6
3105  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
3106else
3107  echo "$ac_t""no" 1>&6
3108fi
3109
3110    fi
3111  fi
3112
3113  # Check for libraries that X11R6 Xt/Xaw programs need.
3114  ac_save_LDFLAGS="$LDFLAGS"
3115  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
3116  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
3117  # check for ICE first), but we must link in the order -lSM -lICE or
3118  # we get undefined symbols.  So assume we have SM if we have ICE.
3119  # These have to be linked with before -lX11, unlike the other
3120  # libraries we check for below, so use a different variable.
3121  #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
3122  echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
3123echo "configure:3124: checking for IceConnectionNumber in -lICE" >&5
3124ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
3125if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3126  echo $ac_n "(cached) $ac_c" 1>&6
3127else
3128  ac_save_LIBS="$LIBS"
3129LIBS="-lICE $X_EXTRA_LIBS $LIBS"
3130cat > conftest.$ac_ext <<EOF
3131#line 3132 "configure"
3132#include "confdefs.h"
3133/* Override any gcc2 internal prototype to avoid an error.  */
3134/* We use char because int might match the return type of a gcc2
3135    builtin and then its argument prototype would still apply.  */
3136char IceConnectionNumber();
3137
3138int main() {
3139IceConnectionNumber()
3140; return 0; }
3141EOF
3142if { (eval echo configure:3143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3143  rm -rf conftest*
3144  eval "ac_cv_lib_$ac_lib_var=yes"
3145else
3146  echo "configure: failed program was:" >&5
3147  cat conftest.$ac_ext >&5
3148  rm -rf conftest*
3149  eval "ac_cv_lib_$ac_lib_var=no"
3150fi
3151rm -f conftest*
3152LIBS="$ac_save_LIBS"
3153
3154fi
3155if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3156  echo "$ac_t""yes" 1>&6
3157  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
3158else
3159  echo "$ac_t""no" 1>&6
3160fi
3161
3162  LDFLAGS="$ac_save_LDFLAGS"
3163
3164fi
3165
3166
3167
3168
3169
3170
3171#------------------------------------------------------------------------------
3172# Check if X headers are broken.  GCC 2.95 and up reject headers that don't
3173# have omit types, X11 headers have implicit int declarations on some systems
3174# (e.g. Solaris).
3175#------------------------------------------------------------------------------
3176echo $ac_n "checking broken X11 headers""... $ac_c" 1>&6
3177echo "configure:3178: checking broken X11 headers" >&5
3178SAVED_CFLAGS=$CFLAGS
3179CFLAGS="$X_CFLAGS $CFLAGS"
3180cat > conftest.$ac_ext <<EOF
3181#line 3182 "configure"
3182#include "confdefs.h"
3183#include <X11/Xlib.h>
3184#include <X11/Xutil.h>
3185int main() {
3186return 0
3187; return 0; }
3188EOF
3189if { (eval echo configure:3190: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3190  rm -rf conftest*
3191  echo "$ac_t""no" 1>&6
3192else
3193  echo "configure: failed program was:" >&5
3194  cat conftest.$ac_ext >&5
3195  rm -rf conftest*
3196  echo "$ac_t""yes" 1>&6
3197fi
3198rm -f conftest*
3199CFLAGS=$SAVED_CFLAGS
3200
3201# TCL/TK
3202#------------------------------------------------------------------------------# We could be dealing with a source installation or a full installation.
3203# Expect a source installation to have headers in TCL8_HOME/generic and libs in
3204# TCL8_HOME/unix.  A full installation should have headers in
3205# ROOT/include/tcl8.0 or ROOT/include.  Libraries should be in ROOT/lib
3206#------------------------------------------------------------------------------
3207PARENT=`echo $PWD | sed -e 's%/[^/]*$%%'`
3208TCL_INC=${PARENT}/tcl-8.0
3209TCL_LIB=${PARENT}/tcl-8.0
3210
3211# Check whether --with-tcl or --without-tcl was given.
3212if test "${with_tcl+set}" = set; then
3213  withval="$with_tcl"
3214   TCL_INC=$withval
3215          TCL_LIB=$withval
3216fi
3217
3218
3219# Depending on config expect tcl.h to be tcl source dir or include path
3220for i in $TCL_INC/generic $TCL_INC/include/tcl8.0 $TCL_INC/include $TCL_INC
3221do
3222        if test -d $i ; then
3223                TCL_INC=$i
3224                break
3225        fi
3226done
3227
3228ac_safe=`echo "${TCL_INC}/tcl.h" | sed 'y%./+-%__p_%'`
3229echo $ac_n "checking for ${TCL_INC}/tcl.h""... $ac_c" 1>&6
3230echo "configure:3231: checking for ${TCL_INC}/tcl.h" >&5
3231if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3232  echo $ac_n "(cached) $ac_c" 1>&6
3233else
3234  cat > conftest.$ac_ext <<EOF
3235#line 3236 "configure"
3236#include "confdefs.h"
3237#include <${TCL_INC}/tcl.h>
3238EOF
3239ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3240{ (eval echo configure:3241: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3241ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3242if test -z "$ac_err"; then
3243  rm -rf conftest*
3244  eval "ac_cv_header_$ac_safe=yes"
3245else
3246  echo "$ac_err" >&5
3247  echo "configure: failed program was:" >&5
3248  cat conftest.$ac_ext >&5
3249  rm -rf conftest*
3250  eval "ac_cv_header_$ac_safe=no"
3251fi
3252rm -f conftest*
3253fi
3254if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3255  echo "$ac_t""yes" 1>&6
3256  TCL_INC=-I${TCL_INC}
3257else
3258  echo "$ac_t""no" 1>&6
3259TCL_INC=no
3260fi
3261
3262
3263if test "$TCL_INC" = no
3264then
3265        echo "Could not find tcl.h.  One of the following halted progress:"
3266        echo "   (a) Tcl is not installed."
3267        echo "   (b) Tcl's location was mis-specified, or not specified (--with-tcl=DIR)."
3268        echo "   (c) this script failed to see it (please inform rat-trap@cs.ucl.ac.uk)."
3269        exit
3270fi
3271
3272# Guess most probable tcl lib location
3273for i in $TCL_LIB/unix $TCL_LIB/lib $TCL_LIB
3274do
3275        if test -d $i ; then
3276                TCL_LIB=$i
3277                break
3278        fi
3279done
3280
3281SAVED_LIBS=$LIBS
3282LIBS=""
3283FOUND_TCL_LIB=no
3284
3285echo $ac_n "checking for library containing Tcl_Init""... $ac_c" 1>&6
3286echo "configure:3287: checking for library containing Tcl_Init" >&5
3287if eval "test \"`echo '$''{'ac_cv_search_Tcl_Init'+set}'`\" = set"; then
3288  echo $ac_n "(cached) $ac_c" 1>&6
3289else
3290  ac_func_search_save_LIBS="$LIBS"
3291ac_cv_search_Tcl_Init="no"
3292cat > conftest.$ac_ext <<EOF
3293#line 3294 "configure"
3294#include "confdefs.h"
3295/* Override any gcc2 internal prototype to avoid an error.  */
3296/* We use char because int might match the return type of a gcc2
3297    builtin and then its argument prototype would still apply.  */
3298char Tcl_Init();
3299
3300int main() {
3301Tcl_Init()
3302; return 0; }
3303EOF
3304if { (eval echo configure:3305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3305  rm -rf conftest*
3306  ac_cv_search_Tcl_Init="none required"
3307else
3308  echo "configure: failed program was:" >&5
3309  cat conftest.$ac_ext >&5
3310fi
3311rm -f conftest*
3312test "$ac_cv_search_Tcl_Init" = "no" && for i in tcl8.0 tcl80; do
3313LIBS="-l$i -L${TCL_LIB} ${SAVED_LIBS} -lm $ac_func_search_save_LIBS"
3314cat > conftest.$ac_ext <<EOF
3315#line 3316 "configure"
3316#include "confdefs.h"
3317/* Override any gcc2 internal prototype to avoid an error.  */
3318/* We use char because int might match the return type of a gcc2
3319    builtin and then its argument prototype would still apply.  */
3320char Tcl_Init();
3321
3322int main() {
3323Tcl_Init()
3324; return 0; }
3325EOF
3326if { (eval echo configure:3327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3327  rm -rf conftest*
3328  ac_cv_search_Tcl_Init="-l$i"
3329break
3330else
3331  echo "configure: failed program was:" >&5
3332  cat conftest.$ac_ext >&5
3333fi
3334rm -f conftest*
3335done
3336LIBS="$ac_func_search_save_LIBS"
3337fi
3338
3339echo "$ac_t""$ac_cv_search_Tcl_Init" 1>&6
3340if test "$ac_cv_search_Tcl_Init" != "no"; then
3341  test "$ac_cv_search_Tcl_Init" = "none required" || LIBS="$ac_cv_search_Tcl_Init $LIBS"
3342  FOUND_TCL_LIB=yes
3343else :
3344 
3345fi
3346TCL_LIB="-L${TCL_LIB} $LIBS"
3347LIBS=$SAVED_LIBS
3348
3349if test $FOUND_TCL_LIB = no
3350then
3351        echo "Could not find Tcl library.  One of the following halted progess:"
3352        echo "   (a) Tcl is not installed."
3353        echo "   (b) Library is not built or not in expected location (--with-tcl=DIR)."
3354        echo "   (c) this script failed to see it (please inform rat-trap@cs.ucl.ac.uk)."
3355        exit
3356fi
3357
3358TK_INC=${PARENT}/tk-8.0
3359TK_LIB=${PARENT}/tk-8.0
3360
3361# Check whether --with-tk or --without-tk was given.
3362if test "${with_tk+set}" = set; then
3363  withval="$with_tk"
3364   TK_INC=$withval
3365          TK_LIB=$withval
3366fi
3367
3368
3369# Depending on config expect tk.h to be tk source dir or include path
3370# AC_CHECK_HEADER(S) are totally inadequate since it is necessary to
3371# include tcl.h, Xlib.h, Xutil.h before tk.h.
3372FOUND_TK_INC=0
3373for i in $TK_INC/generic $TK_INC/include/tk8.0 $TK_INC/include $TK_INC
3374do
3375        echo $ac_n "checking for $i/tk.h""... $ac_c" 1>&6
3376echo "configure:3377: checking for $i/tk.h" >&5
3377        if test -r $i/tk.h ; then
3378                TK_INC=-I$i
3379                FOUND_TK_INC=1
3380                echo "$ac_t""yes" 1>&6
3381                break
3382        fi
3383        echo "$ac_t""no" 1>&6
3384done
3385
3386if test $FOUND_TK_INC = 0 ; then
3387        echo "Could not find tk.h.  One of the following halted progress:"
3388        echo "   (a) Tk is not installed."
3389        echo "   (b) Tk's location was mis-specified, or not specified (--with-tk=DIR)."
3390        echo "   (c) this script failed to see it (please inform rat-trap@cs.ucl.ac.uk)."
3391        exit
3392fi
3393
3394# Guess most probable tk lib location
3395for i in $TK_LIB/unix $TK_LIB/lib $TK_LIB
3396do
3397        if test -d $i ; then
3398                TK_LIB=$i
3399                break
3400        fi
3401done
3402
3403SAVED_LIBS=$LIBS
3404LIBS=""
3405FOUND_TK_LIB=no
3406
3407echo $ac_n "checking for library containing Tk_Init""... $ac_c" 1>&6
3408echo "configure:3409: checking for library containing Tk_Init" >&5
3409if eval "test \"`echo '$''{'ac_cv_search_Tk_Init'+set}'`\" = set"; then
3410  echo $ac_n "(cached) $ac_c" 1>&6
3411else
3412  ac_func_search_save_LIBS="$LIBS"
3413ac_cv_search_Tk_Init="no"
3414cat > conftest.$ac_ext <<EOF
3415#line 3416 "configure"
3416#include "confdefs.h"
3417/* Override any gcc2 internal prototype to avoid an error.  */
3418/* We use char because int might match the return type of a gcc2
3419    builtin and then its argument prototype would still apply.  */
3420char Tk_Init();
3421
3422int main() {
3423Tk_Init()
3424; return 0; }
3425EOF
3426if { (eval echo configure:3427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3427  rm -rf conftest*
3428  ac_cv_search_Tk_Init="none required"
3429else
3430  echo "configure: failed program was:" >&5
3431  cat conftest.$ac_ext >&5
3432fi
3433rm -f conftest*
3434test "$ac_cv_search_Tk_Init" = "no" && for i in tk8.0 tk80; do
3435LIBS="-l$i -L${TK_LIB} ${TCL_LIB} $X_LIBS $X_PRE_LIBS  -lXext -lX11 $X_EXTRA_LIBS ${SAVED_LIBS} -lm $ac_func_search_save_LIBS"
3436cat > conftest.$ac_ext <<EOF
3437#line 3438 "configure"
3438#include "confdefs.h"
3439/* Override any gcc2 internal prototype to avoid an error.  */
3440/* We use char because int might match the return type of a gcc2
3441    builtin and then its argument prototype would still apply.  */
3442char Tk_Init();
3443
3444int main() {
3445Tk_Init()
3446; return 0; }
3447EOF
3448if { (eval echo configure:3449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3449  rm -rf conftest*
3450  ac_cv_search_Tk_Init="-l$i"
3451break
3452else
3453  echo "configure: failed program was:" >&5
3454  cat conftest.$ac_ext >&5
3455fi
3456rm -f conftest*
3457done
3458LIBS="$ac_func_search_save_LIBS"
3459fi
3460
3461echo "$ac_t""$ac_cv_search_Tk_Init" 1>&6
3462if test "$ac_cv_search_Tk_Init" != "no"; then
3463  test "$ac_cv_search_Tk_Init" = "none required" || LIBS="$ac_cv_search_Tk_Init $LIBS"
3464  FOUND_TK_LIB=yes
3465else :
3466 
3467fi
3468TK_LIB="-L${TK_LIB} $LIBS"
3469LIBS=$SAVED_LIBS
3470
3471if test $FOUND_TK_LIB = no
3472then
3473        echo "Could not find Tk library.  One of the following halted progess:"
3474        echo "   (a) Tk is not installed."
3475        echo "   (b) Library is not built or not in expected location (--with-tk=DIR)."
3476        echo "   (c) this script failed to see it (please inform rat-trap@cs.ucl.ac.uk)."
3477        exit
3478fi
3479
3480
3481
3482
3483
3484
3485# XXX Add check for common
3486
3487COMMON_INC=${PARENT}/common
3488COMMON_LIB=${PARENT}/common
3489
3490# Check whether --with-common or --without-common was given.
3491if test "${with_common+set}" = set; then
3492  withval="$with_common"
3493   COMMON_INC=$withval
3494          COMMON_LIB=$withval
3495fi
3496
3497
3498FOUND_COMMON_H=no
3499for h in ${COMMON_INC} ${COMMON_INC}/include
3500do
3501ac_safe=`echo "$h/mbus.h" | sed 'y%./+-%__p_%'`
3502echo $ac_n "checking for $h/mbus.h""... $ac_c" 1>&6
3503echo "configure:3504: checking for $h/mbus.h" >&5
3504if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3505  echo $ac_n "(cached) $ac_c" 1>&6
3506else
3507  cat > conftest.$ac_ext <<EOF
3508#line 3509 "configure"
3509#include "confdefs.h"
3510#include <$h/mbus.h>
3511EOF
3512ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3513{ (eval echo configure:3514: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3514ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3515if test -z "$ac_err"; then
3516  rm -rf conftest*
3517  eval "ac_cv_header_$ac_safe=yes"
3518else
3519  echo "$ac_err" >&5
3520  echo "configure: failed program was:" >&5
3521  cat conftest.$ac_ext >&5
3522  rm -rf conftest*
3523  eval "ac_cv_header_$ac_safe=no"
3524fi
3525rm -f conftest*
3526fi
3527if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3528  echo "$ac_t""yes" 1>&6
3529 
3530                COMMON_INC="-I${h}"
3531                FOUND_COMMON_H=yes
3532                break
3533       
3534else
3535  echo "$ac_t""no" 1>&6
3536fi
3537
3538done
3539
3540if test $FOUND_COMMON_H = no
3541then
3542        echo "Could not find mbus.h from UCL's common library.  Maybe:"
3543        echo "   (a) common library is not installed."
3544        echo "   (b) common library's locations was mis/not specified (--with-common=DIR)."
3545        echo "   (c) this script failed to see it (please inform rat-trap@cs.ucl.ac.uk)."
3546        exit
3547fi
3548
3549# Check if installed it on it's own...
3550if test ! -d ${COMMON_LIB}
3551then
3552        COMMON_LIB=${COMMON_LIB}/lib
3553fi
3554
3555echo $ac_n "checking for mbus_init in -lcommon""... $ac_c" 1>&6
3556echo "configure:3557: checking for mbus_init in -lcommon" >&5
3557ac_lib_var=`echo common'_'mbus_init | sed 'y%./+-%__p_%'`
3558if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3559  echo $ac_n "(cached) $ac_c" 1>&6
3560else
3561  ac_save_LIBS="$LIBS"
3562LIBS="-lcommon -L${COMMON_LIB} $LIBS"
3563cat > conftest.$ac_ext <<EOF
3564#line 3565 "configure"
3565#include "confdefs.h"
3566/* Override any gcc2 internal prototype to avoid an error.  */
3567/* We use char because int might match the return type of a gcc2
3568    builtin and then its argument prototype would still apply.  */
3569char mbus_init();
3570
3571int main() {
3572mbus_init()
3573; return 0; }
3574EOF
3575if { (eval echo configure:3576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3576  rm -rf conftest*
3577  eval "ac_cv_lib_$ac_lib_var=yes"
3578else
3579  echo "configure: failed program was:" >&5
3580  cat conftest.$ac_ext >&5
3581  rm -rf conftest*
3582  eval "ac_cv_lib_$ac_lib_var=no"
3583fi
3584rm -f conftest*
3585LIBS="$ac_save_LIBS"
3586
3587fi
3588if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3589  echo "$ac_t""yes" 1>&6
3590 
3591                EXTERNAL_DEP="${EXTERNAL_DEP} ${COMMON_LIB}/libcommon.a"
3592                COMMON_LIB="-L${COMMON_LIB} -lcommon"
3593       
3594else
3595  echo "$ac_t""no" 1>&6
3596
3597                echo "Could not find UCL Common library.  One of the following halted progess:"
3598                echo "   (a) Common Library is not installed."
3599                echo "   (b) Library is not built or not in expected location (--with-common=DIR)."
3600                echo "   (c) this script failed to see it (please inform rat-trap@cs.ucl.ac.uk)."
3601                exit
3602       
3603fi
3604
3605
3606
3607
3608
3609
3610# Enable options
3611# Check whether --enable-profile or --disable-profile was given.
3612if test "${enable_profile+set}" = set; then
3613  enableval="$enable_profile"
3614  if test $enableval = yes
3615        then
3616                if test "$GCC" = yes
3617                then
3618                        CFLAGS="$CFLAGS -pg"
3619                else
3620                        { echo "configure: error: Don't know how to enable profiling for $CC" 1>&2; exit 1; }
3621                fi
3622        fi
3623fi
3624
3625# Check whether --enable-bounds or --disable-bounds was given.
3626if test "${enable_bounds+set}" = set; then
3627  enableval="$enable_bounds"
3628  if test $enableval = yes
3629        then
3630                if test "$GCC" = yes
3631                then
3632                        CFLAGS="$CFLAGS -fbounds-checking"
3633                        LIBS="$LIBS -lcheck"
3634                else
3635                        { echo "configure: error: Don't know how to enable profiling for $CC" 1>&2; exit 1; }
3636                fi
3637        fi
3638fi
3639
3640# Check whether --enable-debug or --disable-debug was given.
3641if test "${enable_debug+set}" = set; then
3642  enableval="$enable_debug"
3643  if test $enableval = yes
3644        then
3645                cat >> confdefs.h <<\EOF
3646#define DEBUG 1
3647EOF
3648
3649        fi
3650fi
3651
3652# Check whether --enable-debug-mem or --disable-debug-mem was given.
3653if test "${enable_debug_mem+set}" = set; then
3654  enableval="$enable_debug_mem"
3655  if test $enableval = yes
3656        then
3657                cat >> confdefs.h <<\EOF
3658#define DEBUG_MEM 1
3659EOF
3660
3661        fi
3662fi
3663
3664
3665
3666# GSM flag checks
3667#-----------------------------------------------------------------------------
3668# Check if Signed arithmetic shift right (SASR).  If SASR then -1 >> 1 == 1.
3669# Return value from test program of zero indicates success.
3670#-----------------------------------------------------------------------------
3671echo $ac_n "checking signed arithmetic shift right""... $ac_c" 1>&6
3672echo "configure:3673: checking signed arithmetic shift right" >&5
3673if eval "test \"`echo '$''{'gsm_cv_sasr'+set}'`\" = set"; then
3674  echo $ac_n "(cached) $ac_c" 1>&6
3675else
3676  if test "$cross_compiling" = yes; then
3677    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3678else
3679  cat > conftest.$ac_ext <<EOF
3680#line 3681 "configure"
3681#include "confdefs.h"
3682int main() { return (-1 >> 1) != -1;}
3683EOF
3684if { (eval echo configure:3685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3685then
3686  gsm_cv_sasr=yes
3687else
3688  echo "configure: failed program was:" >&5
3689  cat conftest.$ac_ext >&5
3690  rm -fr conftest*
3691  gsm_cv_sasr=no
3692fi
3693rm -fr conftest*
3694fi
3695
3696fi
3697
3698echo "$ac_t""$gsm_cv_sasr" 1>&6
3699if test $gsm_cv_sasr = yes ; then
3700        cat >> confdefs.h <<\EOF
3701#define SASR 1
3702EOF
3703
3704fi
3705#-----------------------------------------------------------------------------
3706# GSM Options, almost certainly not sensible on all platforms, performance
3707# tests in a configure script ?
3708#-----------------------------------------------------------------------------
3709cat >> confdefs.h <<\EOF
3710#define FAST 1
3711EOF
3712
3713cat >> confdefs.h <<\EOF
3714#define USE_FLOAT_MUL 1
3715EOF
3716
3717
3718
3719
3720trap '' 1 2 15
3721cat > confcache <<\EOF
3722# This file is a shell script that caches the results of configure
3723# tests run on this system so they can be shared between configure
3724# scripts and configure runs.  It is not useful on other systems.
3725# If it contains results you don't want to keep, you may remove or edit it.
3726#
3727# By default, configure uses ./config.cache as the cache file,
3728# creating it if it does not exist already.  You can give configure
3729# the --cache-file=FILE option to use a different cache file; that is
3730# what configure does when it calls configure scripts in
3731# subdirectories, so they share the cache.
3732# Giving --cache-file=/dev/null disables caching, for debugging configure.
3733# config.status only pays attention to the cache file if you give it the
3734# --recheck option to rerun configure.
3735#
3736EOF
3737# The following way of writing the cache mishandles newlines in values,
3738# but we know of no workaround that is simple, portable, and efficient.
3739# So, don't put newlines in cache variables' values.
3740# Ultrix sh set writes to stderr and can't be redirected directly,
3741# and sets the high bit in the cache file unless we assign to the vars.
3742(set) 2>&1 |
3743  case `(ac_space=' '; set | grep ac_space) 2>&1` in
3744  *ac_space=\ *)
3745    # `set' does not quote correctly, so add quotes (double-quote substitution
3746    # turns \\\\ into \\, and sed turns \\ into \).
3747    sed -n \
3748      -e "s/'/'\\\\''/g" \
3749      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
3750    ;;
3751  *)
3752    # `set' quotes correctly as required by POSIX, so do not add quotes.
3753    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
3754    ;;
3755  esac >> confcache
3756if cmp -s $cache_file confcache; then
3757  :
3758else
3759  if test -w $cache_file; then
3760    echo "updating cache $cache_file"
3761    cat confcache > $cache_file
3762  else
3763    echo "not updating unwritable cache $cache_file"
3764  fi
3765fi
3766rm -f confcache
3767
3768trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
3769
3770test "x$prefix" = xNONE && prefix=$ac_default_prefix
3771# Let make expand exec_prefix.
3772test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
3773
3774# Any assignment to VPATH causes Sun make to only execute
3775# the first set of double-colon rules, so remove it if not needed.
3776# If there is a colon in the path, we need to keep it.
3777if test "x$srcdir" = x.; then
3778  ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
3779fi
3780
3781trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
3782
3783DEFS=-DHAVE_CONFIG_H
3784
3785# Without the "./", some shells look in PATH for config.status.
3786: ${CONFIG_STATUS=./config.status}
3787
3788echo creating $CONFIG_STATUS
3789rm -f $CONFIG_STATUS
3790cat > $CONFIG_STATUS <<EOF
3791#! /bin/sh
3792# Generated automatically by configure.
3793# Run this file to recreate the current configuration.
3794# This directory was configured as follows,
3795# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3796#
3797# $0 $ac_configure_args
3798#
3799# Compiler output produced by configure, useful for debugging
3800# configure, is in ./config.log if it exists.
3801
3802ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
3803for ac_option
3804do
3805  case "\$ac_option" in
3806  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
3807    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
3808    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
3809  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
3810    echo "$CONFIG_STATUS generated by autoconf version 2.13"
3811    exit 0 ;;
3812  -help | --help | --hel | --he | --h)
3813    echo "\$ac_cs_usage"; exit 0 ;;
3814  *) echo "\$ac_cs_usage"; exit 1 ;;
3815  esac
3816done
3817
3818ac_given_srcdir=$srcdir
3819
3820trap 'rm -fr `echo "Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
3821EOF
3822cat >> $CONFIG_STATUS <<EOF
3823
3824# Protect against being on the right side of a sed subst in config.status.
3825sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
3826 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
3827$ac_vpsub
3828$extrasub
3829s%@SHELL@%$SHELL%g
3830s%@CFLAGS@%$CFLAGS%g
3831s%@CPPFLAGS@%$CPPFLAGS%g
3832s%@CXXFLAGS@%$CXXFLAGS%g
3833s%@FFLAGS@%$FFLAGS%g
3834s%@DEFS@%$DEFS%g
3835s%@LDFLAGS@%$LDFLAGS%g
3836s%@LIBS@%$LIBS%g
3837s%@exec_prefix@%$exec_prefix%g
3838s%@prefix@%$prefix%g
3839s%@program_transform_name@%$program_transform_name%g
3840s%@bindir@%$bindir%g
3841s%@sbindir@%$sbindir%g
3842s%@libexecdir@%$libexecdir%g
3843s%@datadir@%$datadir%g
3844s%@sysconfdir@%$sysconfdir%g
3845s%@sharedstatedir@%$sharedstatedir%g
3846s%@localstatedir@%$localstatedir%g
3847s%@libdir@%$libdir%g
3848s%@includedir@%$includedir%g
3849s%@oldincludedir@%$oldincludedir%g
3850s%@infodir@%$infodir%g
3851s%@mandir@%$mandir%g
3852s%@host@%$host%g
3853s%@host_alias@%$host_alias%g
3854s%@host_cpu@%$host_cpu%g
3855s%@host_vendor@%$host_vendor%g
3856s%@host_os@%$host_os%g
3857s%@target@%$target%g
3858s%@target_alias@%$target_alias%g
3859s%@target_cpu@%$target_cpu%g
3860s%@target_vendor@%$target_vendor%g
3861s%@target_os@%$target_os%g
3862s%@build@%$build%g
3863s%@build_alias@%$build_alias%g
3864s%@build_cpu@%$build_cpu%g
3865s%@build_vendor@%$build_vendor%g
3866s%@build_os@%$build_os%g
3867s%@CC@%$CC%g
3868s%@CPP@%$CPP%g
3869s%@RANLIB@%$RANLIB%g
3870s%@VERSION@%$VERSION%g
3871s%@OSTYPE@%$OSTYPE%g
3872s%@MATHLIBS@%$MATHLIBS%g
3873s%@EXTRA_OBJ@%$EXTRA_OBJ%g
3874s%@AU_OBJ@%$AU_OBJ%g
3875s%@AU_INC@%$AU_INC%g
3876s%@AU_LIB@%$AU_LIB%g
3877s%@X_CFLAGS@%$X_CFLAGS%g
3878s%@X_PRE_LIBS@%$X_PRE_LIBS%g
3879s%@X_LIBS@%$X_LIBS%g
3880s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
3881s%@TCL_INC@%$TCL_INC%g
3882s%@TCL_LIB@%$TCL_LIB%g
3883s%@TK_INC@%$TK_INC%g
3884s%@TK_LIB@%$TK_LIB%g
3885s%@COMMON_INC@%$COMMON_INC%g
3886s%@COMMON_LIB@%$COMMON_LIB%g
3887s%@EXTERNAL_DEP@%$EXTERNAL_DEP%g
3888
3889CEOF
3890EOF
3891
3892cat >> $CONFIG_STATUS <<\EOF
3893
3894# Split the substitutions into bite-sized pieces for seds with
3895# small command number limits, like on Digital OSF/1 and HP-UX.
3896ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
3897ac_file=1 # Number of current file.
3898ac_beg=1 # First line for current file.
3899ac_end=$ac_max_sed_cmds # Line after last line for current file.
3900ac_more_lines=:
3901ac_sed_cmds=""
3902while $ac_more_lines; do
3903  if test $ac_beg -gt 1; then
3904    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
3905  else
3906    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
3907  fi
3908  if test ! -s conftest.s$ac_file; then
3909    ac_more_lines=false
3910    rm -f conftest.s$ac_file
3911  else
3912    if test -z "$ac_sed_cmds"; then
3913      ac_sed_cmds="sed -f conftest.s$ac_file"
3914    else
3915      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
3916    fi
3917    ac_file=`expr $ac_file + 1`
3918    ac_beg=$ac_end
3919    ac_end=`expr $ac_end + $ac_max_sed_cmds`
3920  fi
3921done
3922if test -z "$ac_sed_cmds"; then
3923  ac_sed_cmds=cat
3924fi
3925EOF
3926
3927cat >> $CONFIG_STATUS <<EOF
3928
3929CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
3930EOF
3931cat >> $CONFIG_STATUS <<\EOF
3932for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
3933  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3934  case "$ac_file" in
3935  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3936       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3937  *) ac_file_in="${ac_file}.in" ;;
3938  esac
3939
3940  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
3941
3942  # Remove last slash and all that follows it.  Not all systems have dirname.
3943  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3944  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3945    # The file is in a subdirectory.
3946    test ! -d "$ac_dir" && mkdir "$ac_dir"
3947    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
3948    # A "../" for each directory in $ac_dir_suffix.
3949    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
3950  else
3951    ac_dir_suffix= ac_dots=
3952  fi
3953
3954  case "$ac_given_srcdir" in
3955  .)  srcdir=.
3956      if test -z "$ac_dots"; then top_srcdir=.
3957      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
3958  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
3959  *) # Relative path.
3960    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
3961    top_srcdir="$ac_dots$ac_given_srcdir" ;;
3962  esac
3963
3964
3965  echo creating "$ac_file"
3966  rm -f "$ac_file"
3967  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
3968  case "$ac_file" in
3969  *Makefile*) ac_comsub="1i\\
3970# $configure_input" ;;
3971  *) ac_comsub= ;;
3972  esac
3973
3974  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3975  sed -e "$ac_comsub
3976s%@configure_input@%$configure_input%g
3977s%@srcdir@%$srcdir%g
3978s%@top_srcdir@%$top_srcdir%g
3979" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
3980fi; done
3981rm -f conftest.s*
3982
3983# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
3984# NAME is the cpp macro being defined and VALUE is the value it is being given.
3985#
3986# ac_d sets the value in "#define NAME VALUE" lines.
3987ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
3988ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
3989ac_dC='\3'
3990ac_dD='%g'
3991# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
3992ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
3993ac_uB='\([      ]\)%\1#\2define\3'
3994ac_uC=' '
3995ac_uD='\4%g'
3996# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
3997ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
3998ac_eB='$%\1#\2define\3'
3999ac_eC=' '
4000ac_eD='%g'
4001
4002if test "${CONFIG_HEADERS+set}" != set; then
4003EOF
4004cat >> $CONFIG_STATUS <<EOF
4005  CONFIG_HEADERS="config.h"
4006EOF
4007cat >> $CONFIG_STATUS <<\EOF
4008fi
4009for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
4010  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4011  case "$ac_file" in
4012  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4013       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4014  *) ac_file_in="${ac_file}.in" ;;
4015  esac
4016
4017  echo creating $ac_file
4018
4019  rm -f conftest.frag conftest.in conftest.out
4020  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4021  cat $ac_file_inputs > conftest.in
4022
4023EOF
4024
4025# Transform confdefs.h into a sed script conftest.vals that substitutes
4026# the proper values into config.h.in to produce config.h.  And first:
4027# Protect against being on the right side of a sed subst in config.status.
4028# Protect against being in an unquoted here document in config.status.
4029rm -f conftest.vals
4030cat > conftest.hdr <<\EOF
4031s/[\\&%]/\\&/g
4032s%[\\$`]%\\&%g
4033s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
4034s%ac_d%ac_u%gp
4035s%ac_u%ac_e%gp
4036EOF
4037sed -n -f conftest.hdr confdefs.h > conftest.vals
4038rm -f conftest.hdr
4039
4040# This sed command replaces #undef with comments.  This is necessary, for
4041# example, in the case of _POSIX_SOURCE, which is predefined and required
4042# on some systems where configure will not decide to define it.
4043cat >> conftest.vals <<\EOF
4044s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
4045EOF
4046
4047# Break up conftest.vals because some shells have a limit on
4048# the size of here documents, and old seds have small limits too.
4049
4050rm -f conftest.tail
4051while :
4052do
4053  ac_lines=`grep -c . conftest.vals`
4054  # grep -c gives empty output for an empty file on some AIX systems.
4055  if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
4056  # Write a limited-size here document to conftest.frag.
4057  echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
4058  sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
4059  echo 'CEOF
4060  sed -f conftest.frag conftest.in > conftest.out
4061  rm -f conftest.in
4062  mv conftest.out conftest.in
4063' >> $CONFIG_STATUS
4064  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
4065  rm -f conftest.vals
4066  mv conftest.tail conftest.vals
4067done
4068rm -f conftest.vals
4069
4070cat >> $CONFIG_STATUS <<\EOF
4071  rm -f conftest.frag conftest.h
4072  echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
4073  cat conftest.in >> conftest.h
4074  rm -f conftest.in
4075  if cmp -s $ac_file conftest.h 2>/dev/null; then
4076    echo "$ac_file is unchanged"
4077    rm -f conftest.h
4078  else
4079    # Remove last slash and all that follows it.  Not all systems have dirname.
4080      ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4081      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4082      # The file is in a subdirectory.
4083      test ! -d "$ac_dir" && mkdir "$ac_dir"
4084    fi
4085    rm -f $ac_file
4086    mv conftest.h $ac_file
4087  fi
4088fi; done
4089
4090EOF
4091cat >> $CONFIG_STATUS <<EOF
4092
4093EOF
4094cat >> $CONFIG_STATUS <<\EOF
4095
4096exit 0
4097EOF
4098chmod +x $CONFIG_STATUS
4099rm -fr confdefs* $ac_clean_files
4100test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
4101
4102
Note: See TracBrowser for help on using the browser.