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