Autoconf changes to better handle -lm config, alloca.h and memory.h for BeOS, IRIX...
[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.13 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14
15 # Initialize some variables set by options.
16 # The variables have the same names as the options, with
17 # dashes changed to underlines.
18 build=NONE
19 cache_file=./config.cache
20 exec_prefix=NONE
21 host=NONE
22 no_create=
23 nonopt=NONE
24 no_recursion=
25 prefix=NONE
26 program_prefix=NONE
27 program_suffix=NONE
28 program_transform_name=s,x,x,
29 silent=
30 site=
31 srcdir=
32 target=NONE
33 verbose=
34 x_includes=NONE
35 x_libraries=NONE
36 bindir='${exec_prefix}/bin'
37 sbindir='${exec_prefix}/sbin'
38 libexecdir='${exec_prefix}/libexec'
39 datadir='${prefix}/share'
40 sysconfdir='${prefix}/etc'
41 sharedstatedir='${prefix}/com'
42 localstatedir='${prefix}/var'
43 libdir='${exec_prefix}/lib'
44 includedir='${prefix}/include'
45 oldincludedir='/usr/include'
46 infodir='${prefix}/info'
47 mandir='${prefix}/man'
48
49 # Initialize some other variables.
50 subdirs=
51 MFLAGS= MAKEFLAGS=
52 SHELL=${CONFIG_SHELL-/bin/sh}
53 # Maximum number of lines to put in a shell here document.
54 ac_max_here_lines=12
55
56 ac_prev=
57 for ac_option
58 do
59
60   # If the previous option needs an argument, assign it.
61   if test -n "$ac_prev"; then
62     eval "$ac_prev=\$ac_option"
63     ac_prev=
64     continue
65   fi
66
67   case "$ac_option" in
68   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
69   *) ac_optarg= ;;
70   esac
71
72   # Accept the important Cygnus configure options, so we can diagnose typos.
73
74   case "$ac_option" in
75
76   -bindir | --bindir | --bindi | --bind | --bin | --bi)
77     ac_prev=bindir ;;
78   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
79     bindir="$ac_optarg" ;;
80
81   -build | --build | --buil | --bui | --bu)
82     ac_prev=build ;;
83   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
84     build="$ac_optarg" ;;
85
86   -cache-file | --cache-file | --cache-fil | --cache-fi \
87   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
88     ac_prev=cache_file ;;
89   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
90   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
91     cache_file="$ac_optarg" ;;
92
93   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
94     ac_prev=datadir ;;
95   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
96   | --da=*)
97     datadir="$ac_optarg" ;;
98
99   -disable-* | --disable-*)
100     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
101     # Reject names that are not valid shell variable names.
102     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
103       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
104     fi
105     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
106     eval "enable_${ac_feature}=no" ;;
107
108   -enable-* | --enable-*)
109     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
110     # Reject names that are not valid shell variable names.
111     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
112       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
113     fi
114     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
115     case "$ac_option" in
116       *=*) ;;
117       *) ac_optarg=yes ;;
118     esac
119     eval "enable_${ac_feature}='$ac_optarg'" ;;
120
121   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
122   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
123   | --exec | --exe | --ex)
124     ac_prev=exec_prefix ;;
125   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
126   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
127   | --exec=* | --exe=* | --ex=*)
128     exec_prefix="$ac_optarg" ;;
129
130   -gas | --gas | --ga | --g)
131     # Obsolete; use --with-gas.
132     with_gas=yes ;;
133
134   -help | --help | --hel | --he)
135     # Omit some internal or obsolete options to make the list less imposing.
136     # This message is too long to be a string in the A/UX 3.1 sh.
137     cat << EOF
138 Usage: configure [options] [host]
139 Options: [defaults in brackets after descriptions]
140 Configuration:
141   --cache-file=FILE       cache test results in FILE
142   --help                  print this message
143   --no-create             do not create output files
144   --quiet, --silent       do not print \`checking...' messages
145   --version               print the version of autoconf that created configure
146 Directory and file names:
147   --prefix=PREFIX         install architecture-independent files in PREFIX
148                           [$ac_default_prefix]
149   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
150                           [same as prefix]
151   --bindir=DIR            user executables in DIR [EPREFIX/bin]
152   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
153   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
154   --datadir=DIR           read-only architecture-independent data in DIR
155                           [PREFIX/share]
156   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
157   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
158                           [PREFIX/com]
159   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
160   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
161   --includedir=DIR        C header files in DIR [PREFIX/include]
162   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
163   --infodir=DIR           info documentation in DIR [PREFIX/info]
164   --mandir=DIR            man documentation in DIR [PREFIX/man]
165   --srcdir=DIR            find the sources in DIR [configure dir or ..]
166   --program-prefix=PREFIX prepend PREFIX to installed program names
167   --program-suffix=SUFFIX append SUFFIX to installed program names
168   --program-transform-name=PROGRAM
169                           run sed PROGRAM on installed program names
170 EOF
171     cat << EOF
172 Host type:
173   --build=BUILD           configure for building on BUILD [BUILD=HOST]
174   --host=HOST             configure for HOST [guessed]
175   --target=TARGET         configure for TARGET [TARGET=HOST]
176 Features and packages:
177   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
178   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
179   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
180   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
181   --x-includes=DIR        X include files are in DIR
182   --x-libraries=DIR       X library files are in DIR
183 EOF
184     if test -n "$ac_help"; then
185       echo "--enable and --with options recognized:$ac_help"
186     fi
187     exit 0 ;;
188
189   -host | --host | --hos | --ho)
190     ac_prev=host ;;
191   -host=* | --host=* | --hos=* | --ho=*)
192     host="$ac_optarg" ;;
193
194   -includedir | --includedir | --includedi | --included | --include \
195   | --includ | --inclu | --incl | --inc)
196     ac_prev=includedir ;;
197   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
198   | --includ=* | --inclu=* | --incl=* | --inc=*)
199     includedir="$ac_optarg" ;;
200
201   -infodir | --infodir | --infodi | --infod | --info | --inf)
202     ac_prev=infodir ;;
203   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
204     infodir="$ac_optarg" ;;
205
206   -libdir | --libdir | --libdi | --libd)
207     ac_prev=libdir ;;
208   -libdir=* | --libdir=* | --libdi=* | --libd=*)
209     libdir="$ac_optarg" ;;
210
211   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
212   | --libexe | --libex | --libe)
213     ac_prev=libexecdir ;;
214   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
215   | --libexe=* | --libex=* | --libe=*)
216     libexecdir="$ac_optarg" ;;
217
218   -localstatedir | --localstatedir | --localstatedi | --localstated \
219   | --localstate | --localstat | --localsta | --localst \
220   | --locals | --local | --loca | --loc | --lo)
221     ac_prev=localstatedir ;;
222   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
223   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
224   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
225     localstatedir="$ac_optarg" ;;
226
227   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
228     ac_prev=mandir ;;
229   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
230     mandir="$ac_optarg" ;;
231
232   -nfp | --nfp | --nf)
233     # Obsolete; use --without-fp.
234     with_fp=no ;;
235
236   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
237   | --no-cr | --no-c)
238     no_create=yes ;;
239
240   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
241   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
242     no_recursion=yes ;;
243
244   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
245   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
246   | --oldin | --oldi | --old | --ol | --o)
247     ac_prev=oldincludedir ;;
248   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
249   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
250   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
251     oldincludedir="$ac_optarg" ;;
252
253   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
254     ac_prev=prefix ;;
255   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
256     prefix="$ac_optarg" ;;
257
258   -program-prefix | --program-prefix | --program-prefi | --program-pref \
259   | --program-pre | --program-pr | --program-p)
260     ac_prev=program_prefix ;;
261   -program-prefix=* | --program-prefix=* | --program-prefi=* \
262   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
263     program_prefix="$ac_optarg" ;;
264
265   -program-suffix | --program-suffix | --program-suffi | --program-suff \
266   | --program-suf | --program-su | --program-s)
267     ac_prev=program_suffix ;;
268   -program-suffix=* | --program-suffix=* | --program-suffi=* \
269   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
270     program_suffix="$ac_optarg" ;;
271
272   -program-transform-name | --program-transform-name \
273   | --program-transform-nam | --program-transform-na \
274   | --program-transform-n | --program-transform- \
275   | --program-transform | --program-transfor \
276   | --program-transfo | --program-transf \
277   | --program-trans | --program-tran \
278   | --progr-tra | --program-tr | --program-t)
279     ac_prev=program_transform_name ;;
280   -program-transform-name=* | --program-transform-name=* \
281   | --program-transform-nam=* | --program-transform-na=* \
282   | --program-transform-n=* | --program-transform-=* \
283   | --program-transform=* | --program-transfor=* \
284   | --program-transfo=* | --program-transf=* \
285   | --program-trans=* | --program-tran=* \
286   | --progr-tra=* | --program-tr=* | --program-t=*)
287     program_transform_name="$ac_optarg" ;;
288
289   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
290   | -silent | --silent | --silen | --sile | --sil)
291     silent=yes ;;
292
293   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
294     ac_prev=sbindir ;;
295   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
296   | --sbi=* | --sb=*)
297     sbindir="$ac_optarg" ;;
298
299   -sharedstatedir | --sharedstatedir | --sharedstatedi \
300   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
301   | --sharedst | --shareds | --shared | --share | --shar \
302   | --sha | --sh)
303     ac_prev=sharedstatedir ;;
304   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
305   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
306   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
307   | --sha=* | --sh=*)
308     sharedstatedir="$ac_optarg" ;;
309
310   -site | --site | --sit)
311     ac_prev=site ;;
312   -site=* | --site=* | --sit=*)
313     site="$ac_optarg" ;;
314
315   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
316     ac_prev=srcdir ;;
317   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
318     srcdir="$ac_optarg" ;;
319
320   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
321   | --syscon | --sysco | --sysc | --sys | --sy)
322     ac_prev=sysconfdir ;;
323   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
324   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
325     sysconfdir="$ac_optarg" ;;
326
327   -target | --target | --targe | --targ | --tar | --ta | --t)
328     ac_prev=target ;;
329   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
330     target="$ac_optarg" ;;
331
332   -v | -verbose | --verbose | --verbos | --verbo | --verb)
333     verbose=yes ;;
334
335   -version | --version | --versio | --versi | --vers)
336     echo "configure generated by autoconf version 2.13"
337     exit 0 ;;
338
339   -with-* | --with-*)
340     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
341     # Reject names that are not valid shell variable names.
342     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
343       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
344     fi
345     ac_package=`echo $ac_package| sed 's/-/_/g'`
346     case "$ac_option" in
347       *=*) ;;
348       *) ac_optarg=yes ;;
349     esac
350     eval "with_${ac_package}='$ac_optarg'" ;;
351
352   -without-* | --without-*)
353     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
354     # Reject names that are not valid shell variable names.
355     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
356       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
357     fi
358     ac_package=`echo $ac_package| sed 's/-/_/g'`
359     eval "with_${ac_package}=no" ;;
360
361   --x)
362     # Obsolete; use --with-x.
363     with_x=yes ;;
364
365   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
366   | --x-incl | --x-inc | --x-in | --x-i)
367     ac_prev=x_includes ;;
368   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
369   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
370     x_includes="$ac_optarg" ;;
371
372   -x-libraries | --x-libraries | --x-librarie | --x-librari \
373   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
374     ac_prev=x_libraries ;;
375   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
376   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
377     x_libraries="$ac_optarg" ;;
378
379   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
380     ;;
381
382   *)
383     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
384       echo "configure: warning: $ac_option: invalid host type" 1>&2
385     fi
386     if test "x$nonopt" != xNONE; then
387       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
388     fi
389     nonopt="$ac_option"
390     ;;
391
392   esac
393 done
394
395 if test -n "$ac_prev"; then
396   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
397 fi
398
399 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
400
401 # File descriptor usage:
402 # 0 standard input
403 # 1 file creation
404 # 2 errors and warnings
405 # 3 some systems may open it to /dev/tty
406 # 4 used on the Kubota Titan
407 # 6 checking for... messages and results
408 # 5 compiler messages saved in config.log
409 if test "$silent" = yes; then
410   exec 6>/dev/null
411 else
412   exec 6>&1
413 fi
414 exec 5>./config.log
415
416 echo "\
417 This file contains any messages produced by compilers while
418 running configure, to aid debugging if configure makes a mistake.
419 " 1>&5
420
421 # Strip out --no-create and --no-recursion so they do not pile up.
422 # Also quote any args containing shell metacharacters.
423 ac_configure_args=
424 for ac_arg
425 do
426   case "$ac_arg" in
427   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
428   | --no-cr | --no-c) ;;
429   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
430   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
431   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
432   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
433   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
434   esac
435 done
436
437 # NLS nuisances.
438 # Only set these to C if already set.  These must not be set unconditionally
439 # because not all systems understand e.g. LANG=C (notably SCO).
440 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
441 # Non-C LC_CTYPE values break the ctype check.
442 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
443 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
444 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
445 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
446
447 # confdefs.h avoids OS command line length limits that DEFS can exceed.
448 rm -rf conftest* confdefs.h
449 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
450 echo > confdefs.h
451
452 # A filename unique to this package, relative to the directory that
453 # configure is in, which we can look for to find out if srcdir is correct.
454 ac_unique_file=lib/mdct.c
455
456 # Find the source files, if location was not specified.
457 if test -z "$srcdir"; then
458   ac_srcdir_defaulted=yes
459   # Try the directory containing this script, then its parent.
460   ac_prog=$0
461   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
462   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
463   srcdir=$ac_confdir
464   if test ! -r $srcdir/$ac_unique_file; then
465     srcdir=..
466   fi
467 else
468   ac_srcdir_defaulted=no
469 fi
470 if test ! -r $srcdir/$ac_unique_file; then
471   if test "$ac_srcdir_defaulted" = yes; then
472     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
473   else
474     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
475   fi
476 fi
477 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
478
479 # Prefer explicitly selected file to automatically selected ones.
480 if test -z "$CONFIG_SITE"; then
481   if test "x$prefix" != xNONE; then
482     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
483   else
484     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
485   fi
486 fi
487 for ac_site_file in $CONFIG_SITE; do
488   if test -r "$ac_site_file"; then
489     echo "loading site script $ac_site_file"
490     . "$ac_site_file"
491   fi
492 done
493
494 if test -r "$cache_file"; then
495   echo "loading cache $cache_file"
496   . $cache_file
497 else
498   echo "creating cache $cache_file"
499   > $cache_file
500 fi
501
502 ac_ext=c
503 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
504 ac_cpp='$CPP $CPPFLAGS'
505 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
506 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
507 cross_compiling=$ac_cv_prog_cc_cross
508
509 ac_exeext=
510 ac_objext=o
511 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
512   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
513   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
514     ac_n= ac_c='
515 ' ac_t='        '
516   else
517     ac_n=-n ac_c= ac_t=
518   fi
519 else
520   ac_n= ac_c='\c' ac_t=
521 fi
522
523
524 #AC_CONFIG_HEADER(config.h)
525
526 cp configure.guess config.guess
527 cp configure.sub config.sub
528
529 ac_aux_dir=
530 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
531   if test -f $ac_dir/install-sh; then
532     ac_aux_dir=$ac_dir
533     ac_install_sh="$ac_aux_dir/install-sh -c"
534     break
535   elif test -f $ac_dir/install.sh; then
536     ac_aux_dir=$ac_dir
537     ac_install_sh="$ac_aux_dir/install.sh -c"
538     break
539   fi
540 done
541 if test -z "$ac_aux_dir"; then
542   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
543 fi
544 ac_config_guess=$ac_aux_dir/config.guess
545 ac_config_sub=$ac_aux_dir/config.sub
546 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
547
548
549 # Make sure we can run config.sub.
550 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
551 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
552 fi
553
554 echo $ac_n "checking host system type""... $ac_c" 1>&6
555 echo "configure:556: checking host system type" >&5
556
557 host_alias=$host
558 case "$host_alias" in
559 NONE)
560   case $nonopt in
561   NONE)
562     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
563     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
564     fi ;;
565   *) host_alias=$nonopt ;;
566   esac ;;
567 esac
568
569 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
570 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
571 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
572 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
573 echo "$ac_t""$host" 1>&6
574
575
576 case $host in 
577         *-*-irix*)
578                 if test -z "$CC"; then
579                         CC=cc
580                 fi
581                 echo $ac_n "checking for ALwritesamps in -laudio""... $ac_c" 1>&6
582 echo "configure:583: checking for ALwritesamps in -laudio" >&5
583 ac_lib_var=`echo audio'_'ALwritesamps | sed 'y%./+-%__p_%'`
584 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
585   echo $ac_n "(cached) $ac_c" 1>&6
586 else
587   ac_save_LIBS="$LIBS"
588 LIBS="-laudio  $LIBS"
589 cat > conftest.$ac_ext <<EOF
590 #line 591 "configure"
591 #include "confdefs.h"
592 /* Override any gcc2 internal prototype to avoid an error.  */
593 /* We use char because int might match the return type of a gcc2
594     builtin and then its argument prototype would still apply.  */
595 char ALwritesamps();
596
597 int main() {
598 ALwritesamps()
599 ; return 0; }
600 EOF
601 if { (eval echo configure:602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
602   rm -rf conftest*
603   eval "ac_cv_lib_$ac_lib_var=yes"
604 else
605   echo "configure: failed program was:" >&5
606   cat conftest.$ac_ext >&5
607   rm -rf conftest*
608   eval "ac_cv_lib_$ac_lib_var=no"
609 fi
610 rm -f conftest*
611 LIBS="$ac_save_LIBS"
612
613 fi
614 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
615   echo "$ac_t""yes" 1>&6
616     ac_tr_lib=HAVE_LIB`echo audio | sed -e 's/[^a-zA-Z0-9_]/_/g' \
617     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
618   cat >> confdefs.h <<EOF
619 #define $ac_tr_lib 1
620 EOF
621
622   LIBS="-laudio $LIBS"
623
624 else
625   echo "$ac_t""no" 1>&6
626 fi
627
628         ;;
629 # BeOS does not use -lm
630 #       *-*-beos)
631 #               LIBS=""
632 #       ;;
633 # added better check below
634
635 esac
636
637 if test -z "$CC"; then
638         # Extract the first word of "gcc", so it can be a program name with args.
639 set dummy gcc; ac_word=$2
640 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
641 echo "configure:642: checking for $ac_word" >&5
642 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
643   echo $ac_n "(cached) $ac_c" 1>&6
644 else
645   if test -n "$CC"; then
646   ac_cv_prog_CC="$CC" # Let the user override the test.
647 else
648   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
649   ac_dummy="$PATH"
650   for ac_dir in $ac_dummy; do
651     test -z "$ac_dir" && ac_dir=.
652     if test -f $ac_dir/$ac_word; then
653       ac_cv_prog_CC="gcc"
654       break
655     fi
656   done
657   IFS="$ac_save_ifs"
658 fi
659 fi
660 CC="$ac_cv_prog_CC"
661 if test -n "$CC"; then
662   echo "$ac_t""$CC" 1>&6
663 else
664   echo "$ac_t""no" 1>&6
665 fi
666
667 if test -z "$CC"; then
668   # Extract the first word of "cc", so it can be a program name with args.
669 set dummy cc; ac_word=$2
670 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
671 echo "configure:672: checking for $ac_word" >&5
672 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
673   echo $ac_n "(cached) $ac_c" 1>&6
674 else
675   if test -n "$CC"; then
676   ac_cv_prog_CC="$CC" # Let the user override the test.
677 else
678   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
679   ac_prog_rejected=no
680   ac_dummy="$PATH"
681   for ac_dir in $ac_dummy; do
682     test -z "$ac_dir" && ac_dir=.
683     if test -f $ac_dir/$ac_word; then
684       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
685         ac_prog_rejected=yes
686         continue
687       fi
688       ac_cv_prog_CC="cc"
689       break
690     fi
691   done
692   IFS="$ac_save_ifs"
693 if test $ac_prog_rejected = yes; then
694   # We found a bogon in the path, so make sure we never use it.
695   set dummy $ac_cv_prog_CC
696   shift
697   if test $# -gt 0; then
698     # We chose a different compiler from the bogus one.
699     # However, it has the same basename, so the bogon will be chosen
700     # first if we set CC to just the basename; use the full file name.
701     shift
702     set dummy "$ac_dir/$ac_word" "$@"
703     shift
704     ac_cv_prog_CC="$@"
705   fi
706 fi
707 fi
708 fi
709 CC="$ac_cv_prog_CC"
710 if test -n "$CC"; then
711   echo "$ac_t""$CC" 1>&6
712 else
713   echo "$ac_t""no" 1>&6
714 fi
715
716   if test -z "$CC"; then
717     case "`uname -s`" in
718     *win32* | *WIN32*)
719       # Extract the first word of "cl", so it can be a program name with args.
720 set dummy cl; ac_word=$2
721 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
722 echo "configure:723: checking for $ac_word" >&5
723 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
724   echo $ac_n "(cached) $ac_c" 1>&6
725 else
726   if test -n "$CC"; then
727   ac_cv_prog_CC="$CC" # Let the user override the test.
728 else
729   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
730   ac_dummy="$PATH"
731   for ac_dir in $ac_dummy; do
732     test -z "$ac_dir" && ac_dir=.
733     if test -f $ac_dir/$ac_word; then
734       ac_cv_prog_CC="cl"
735       break
736     fi
737   done
738   IFS="$ac_save_ifs"
739 fi
740 fi
741 CC="$ac_cv_prog_CC"
742 if test -n "$CC"; then
743   echo "$ac_t""$CC" 1>&6
744 else
745   echo "$ac_t""no" 1>&6
746 fi
747  ;;
748     esac
749   fi
750   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
751 fi
752
753 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
754 echo "configure:755: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
755
756 ac_ext=c
757 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
758 ac_cpp='$CPP $CPPFLAGS'
759 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
760 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
761 cross_compiling=$ac_cv_prog_cc_cross
762
763 cat > conftest.$ac_ext << EOF
764
765 #line 766 "configure"
766 #include "confdefs.h"
767
768 main(){return(0);}
769 EOF
770 if { (eval echo configure:771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
771   ac_cv_prog_cc_works=yes
772   # If we can't run a trivial program, we are probably using a cross compiler.
773   if (./conftest; exit) 2>/dev/null; then
774     ac_cv_prog_cc_cross=no
775   else
776     ac_cv_prog_cc_cross=yes
777   fi
778 else
779   echo "configure: failed program was:" >&5
780   cat conftest.$ac_ext >&5
781   ac_cv_prog_cc_works=no
782 fi
783 rm -fr conftest*
784 ac_ext=c
785 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
786 ac_cpp='$CPP $CPPFLAGS'
787 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
788 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
789 cross_compiling=$ac_cv_prog_cc_cross
790
791 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
792 if test $ac_cv_prog_cc_works = no; then
793   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
794 fi
795 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
796 echo "configure:797: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
797 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
798 cross_compiling=$ac_cv_prog_cc_cross
799
800 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
801 echo "configure:802: checking whether we are using GNU C" >&5
802 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
803   echo $ac_n "(cached) $ac_c" 1>&6
804 else
805   cat > conftest.c <<EOF
806 #ifdef __GNUC__
807   yes;
808 #endif
809 EOF
810 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:811: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
811   ac_cv_prog_gcc=yes
812 else
813   ac_cv_prog_gcc=no
814 fi
815 fi
816
817 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
818
819 if test $ac_cv_prog_gcc = yes; then
820   GCC=yes
821 else
822   GCC=
823 fi
824
825 ac_test_CFLAGS="${CFLAGS+set}"
826 ac_save_CFLAGS="$CFLAGS"
827 CFLAGS=
828 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
829 echo "configure:830: checking whether ${CC-cc} accepts -g" >&5
830 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
831   echo $ac_n "(cached) $ac_c" 1>&6
832 else
833   echo 'void f(){}' > conftest.c
834 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
835   ac_cv_prog_cc_g=yes
836 else
837   ac_cv_prog_cc_g=no
838 fi
839 rm -f conftest*
840
841 fi
842
843 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
844 if test "$ac_test_CFLAGS" = set; then
845   CFLAGS="$ac_save_CFLAGS"
846 elif test $ac_cv_prog_cc_g = yes; then
847   if test "$GCC" = yes; then
848     CFLAGS="-g -O2"
849   else
850     CFLAGS="-g"
851   fi
852 else
853   if test "$GCC" = yes; then
854     CFLAGS="-O2"
855   else
856     CFLAGS=
857   fi
858 fi
859         
860 fi
861 # Extract the first word of "ranlib", so it can be a program name with args.
862 set dummy ranlib; ac_word=$2
863 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
864 echo "configure:865: checking for $ac_word" >&5
865 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
866   echo $ac_n "(cached) $ac_c" 1>&6
867 else
868   if test -n "$RANLIB"; then
869   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
870 else
871   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
872   ac_dummy="$PATH"
873   for ac_dir in $ac_dummy; do
874     test -z "$ac_dir" && ac_dir=.
875     if test -f $ac_dir/$ac_word; then
876       ac_cv_prog_RANLIB="ranlib"
877       break
878     fi
879   done
880   IFS="$ac_save_ifs"
881   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
882 fi
883 fi
884 RANLIB="$ac_cv_prog_RANLIB"
885 if test -n "$RANLIB"; then
886   echo "$ac_t""$RANLIB" 1>&6
887 else
888   echo "$ac_t""no" 1>&6
889 fi
890
891 # Extract the first word of "ar", so it can be a program name with args.
892 set dummy ar; ac_word=$2
893 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
894 echo "configure:895: checking for $ac_word" >&5
895 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
896   echo $ac_n "(cached) $ac_c" 1>&6
897 else
898   if test -n "$AR"; then
899   ac_cv_prog_AR="$AR" # Let the user override the test.
900 else
901   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
902   ac_dummy="$PATH"
903   for ac_dir in $ac_dummy; do
904     test -z "$ac_dir" && ac_dir=.
905     if test -f $ac_dir/$ac_word; then
906       ac_cv_prog_AR="ar"
907       break
908     fi
909   done
910   IFS="$ac_save_ifs"
911 fi
912 fi
913 AR="$ac_cv_prog_AR"
914 if test -n "$AR"; then
915   echo "$ac_t""$AR" 1>&6
916 else
917   echo "$ac_t""no" 1>&6
918 fi
919
920 # Extract the first word of "install", so it can be a program name with args.
921 set dummy install; ac_word=$2
922 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
923 echo "configure:924: checking for $ac_word" >&5
924 if eval "test \"`echo '$''{'ac_cv_prog_INSTALL'+set}'`\" = set"; then
925   echo $ac_n "(cached) $ac_c" 1>&6
926 else
927   if test -n "$INSTALL"; then
928   ac_cv_prog_INSTALL="$INSTALL" # Let the user override the test.
929 else
930   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
931   ac_dummy="$PATH"
932   for ac_dir in $ac_dummy; do
933     test -z "$ac_dir" && ac_dir=.
934     if test -f $ac_dir/$ac_word; then
935       ac_cv_prog_INSTALL="install"
936       break
937     fi
938   done
939   IFS="$ac_save_ifs"
940 fi
941 fi
942 INSTALL="$ac_cv_prog_INSTALL"
943 if test -n "$INSTALL"; then
944   echo "$ac_t""$INSTALL" 1>&6
945 else
946   echo "$ac_t""no" 1>&6
947 fi
948
949
950 #not everyone uses libm (eg, BeOS)
951 #AC_CHECK_LIB(m, cos, LIBS="-lm"; AC_DEFINE(HAVE_LIBM), LIBS="")
952 # We no longer use config.h
953 echo $ac_n "checking for cos in -lm""... $ac_c" 1>&6
954 echo "configure:955: checking for cos in -lm" >&5
955 ac_lib_var=`echo m'_'cos | sed 'y%./+-%__p_%'`
956 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
957   echo $ac_n "(cached) $ac_c" 1>&6
958 else
959   ac_save_LIBS="$LIBS"
960 LIBS="-lm  $LIBS"
961 cat > conftest.$ac_ext <<EOF
962 #line 963 "configure"
963 #include "confdefs.h"
964 /* Override any gcc2 internal prototype to avoid an error.  */
965 /* We use char because int might match the return type of a gcc2
966     builtin and then its argument prototype would still apply.  */
967 char cos();
968
969 int main() {
970 cos()
971 ; return 0; }
972 EOF
973 if { (eval echo configure:974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
974   rm -rf conftest*
975   eval "ac_cv_lib_$ac_lib_var=yes"
976 else
977   echo "configure: failed program was:" >&5
978   cat conftest.$ac_ext >&5
979   rm -rf conftest*
980   eval "ac_cv_lib_$ac_lib_var=no"
981 fi
982 rm -f conftest*
983 LIBS="$ac_save_LIBS"
984
985 fi
986 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
987   echo "$ac_t""yes" 1>&6
988   LIBS="-lm"
989 else
990   echo "$ac_t""no" 1>&6
991 LIBS=""
992 fi
993
994
995 if test -z "$GCC"; then
996         case $host in 
997         *-*-irix*)
998                 DEBUG="-g" 
999                 OPT="-O2 -w"
1000                 PROFILE="-p -g3 -O2" ;;
1001         sparc-sun-solaris*)
1002                 DEBUG="-v -g"
1003                 OPT="-xO4 -fast -w -fsingle -fsimple -native -xcg92"
1004                 PROFILE="-v -xpg -g -xO4 -fast -fsingle -native -fsimple -xcg92 -Dsuncc" ;;
1005         *)
1006                 DEBUG="-g"
1007                 OPT="-O"
1008                 PROFILE="-g -p" ;;
1009         esac
1010 else
1011
1012 # -D__NO_MATH_INLINES avoids some serious FP assembly related bugs in
1013 # glibc 2.0/2.1
1014
1015         case $host in 
1016         *-*-linux*)
1017                 DEBUG="-g -Wall -D_REENTRANT -D__NO_MATH_INLINES -fsigned-char"
1018                 OPT="-O20 -ffast-math -D_REENTRANT -fsigned-char"
1019                 PROFILE="-pg -g -O20 -ffast-math -D_REENTRANT -fsigned-char";;
1020         sparc-sun-*)
1021                 DEBUG="-g -Wall -D__NO_MATH_INLINES -fsigned-char -mv8"
1022                 OPT="-O20 -ffast-math -D__NO_MATH_INLINES -fsigned-char -mv8"
1023                 PROFILE="-pg -g -O20 -D__NO_MATH_INLINES -fsigned-char -mv8" ;;
1024         *)
1025                 DEBUG="-g -Wall -D__NO_MATH_INLINES -fsigned-char"
1026                 OPT="-O20 -D__NO_MATH_INLINES -fsigned-char"
1027                 PROFILE="-O20 -g -pg -D__NO_MATH_INLINES -fsigned-char" ;;
1028         esac
1029 fi
1030
1031 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1032 echo "configure:1033: checking how to run the C preprocessor" >&5
1033 # On Suns, sometimes $CPP names a directory.
1034 if test -n "$CPP" && test -d "$CPP"; then
1035   CPP=
1036 fi
1037 if test -z "$CPP"; then
1038 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1039   echo $ac_n "(cached) $ac_c" 1>&6
1040 else
1041     # This must be in double quotes, not single quotes, because CPP may get
1042   # substituted into the Makefile and "${CC-cc}" will confuse make.
1043   CPP="${CC-cc} -E"
1044   # On the NeXT, cc -E runs the code through the compiler's parser,
1045   # not just through cpp.
1046   cat > conftest.$ac_ext <<EOF
1047 #line 1048 "configure"
1048 #include "confdefs.h"
1049 #include <assert.h>
1050 Syntax Error
1051 EOF
1052 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1053 { (eval echo configure:1054: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1054 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1055 if test -z "$ac_err"; then
1056   :
1057 else
1058   echo "$ac_err" >&5
1059   echo "configure: failed program was:" >&5
1060   cat conftest.$ac_ext >&5
1061   rm -rf conftest*
1062   CPP="${CC-cc} -E -traditional-cpp"
1063   cat > conftest.$ac_ext <<EOF
1064 #line 1065 "configure"
1065 #include "confdefs.h"
1066 #include <assert.h>
1067 Syntax Error
1068 EOF
1069 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1070 { (eval echo configure:1071: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1071 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1072 if test -z "$ac_err"; then
1073   :
1074 else
1075   echo "$ac_err" >&5
1076   echo "configure: failed program was:" >&5
1077   cat conftest.$ac_ext >&5
1078   rm -rf conftest*
1079   CPP="${CC-cc} -nologo -E"
1080   cat > conftest.$ac_ext <<EOF
1081 #line 1082 "configure"
1082 #include "confdefs.h"
1083 #include <assert.h>
1084 Syntax Error
1085 EOF
1086 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1087 { (eval echo configure:1088: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1088 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1089 if test -z "$ac_err"; then
1090   :
1091 else
1092   echo "$ac_err" >&5
1093   echo "configure: failed program was:" >&5
1094   cat conftest.$ac_ext >&5
1095   rm -rf conftest*
1096   CPP=/lib/cpp
1097 fi
1098 rm -f conftest*
1099 fi
1100 rm -f conftest*
1101 fi
1102 rm -f conftest*
1103   ac_cv_prog_CPP="$CPP"
1104 fi
1105   CPP="$ac_cv_prog_CPP"
1106 else
1107   ac_cv_prog_CPP="$CPP"
1108 fi
1109 echo "$ac_t""$CPP" 1>&6
1110
1111 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1112 echo "configure:1113: checking for ANSI C header files" >&5
1113 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1114   echo $ac_n "(cached) $ac_c" 1>&6
1115 else
1116   cat > conftest.$ac_ext <<EOF
1117 #line 1118 "configure"
1118 #include "confdefs.h"
1119 #include <stdlib.h>
1120 #include <stdarg.h>
1121 #include <string.h>
1122 #include <float.h>
1123 EOF
1124 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1125 { (eval echo configure:1126: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1126 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1127 if test -z "$ac_err"; then
1128   rm -rf conftest*
1129   ac_cv_header_stdc=yes
1130 else
1131   echo "$ac_err" >&5
1132   echo "configure: failed program was:" >&5
1133   cat conftest.$ac_ext >&5
1134   rm -rf conftest*
1135   ac_cv_header_stdc=no
1136 fi
1137 rm -f conftest*
1138
1139 if test $ac_cv_header_stdc = yes; then
1140   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1141 cat > conftest.$ac_ext <<EOF
1142 #line 1143 "configure"
1143 #include "confdefs.h"
1144 #include <string.h>
1145 EOF
1146 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1147   egrep "memchr" >/dev/null 2>&1; then
1148   :
1149 else
1150   rm -rf conftest*
1151   ac_cv_header_stdc=no
1152 fi
1153 rm -f conftest*
1154
1155 fi
1156
1157 if test $ac_cv_header_stdc = yes; then
1158   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1159 cat > conftest.$ac_ext <<EOF
1160 #line 1161 "configure"
1161 #include "confdefs.h"
1162 #include <stdlib.h>
1163 EOF
1164 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1165   egrep "free" >/dev/null 2>&1; then
1166   :
1167 else
1168   rm -rf conftest*
1169   ac_cv_header_stdc=no
1170 fi
1171 rm -f conftest*
1172
1173 fi
1174
1175 if test $ac_cv_header_stdc = yes; then
1176   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1177 if test "$cross_compiling" = yes; then
1178   :
1179 else
1180   cat > conftest.$ac_ext <<EOF
1181 #line 1182 "configure"
1182 #include "confdefs.h"
1183 #include <ctype.h>
1184 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1185 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1186 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1187 int main () { int i; for (i = 0; i < 256; i++)
1188 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1189 exit (0); }
1190
1191 EOF
1192 if { (eval echo configure:1193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1193 then
1194   :
1195 else
1196   echo "configure: failed program was:" >&5
1197   cat conftest.$ac_ext >&5
1198   rm -fr conftest*
1199   ac_cv_header_stdc=no
1200 fi
1201 rm -fr conftest*
1202 fi
1203
1204 fi
1205 fi
1206
1207 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1208 if test $ac_cv_header_stdc = yes; then
1209   cat >> confdefs.h <<\EOF
1210 #define STDC_HEADERS 1
1211 EOF
1212
1213 fi
1214
1215
1216 CFLAGS=""
1217
1218
1219 #AC_CHECK_LIB(pthread, pthread_create, 
1220 #       pthread_lib="-lpthread"; AC_DEFINE(HAVE_LIBPTHREAD), :)
1221 # We no longer use config.h
1222 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
1223 echo "configure:1224: checking for pthread_create in -lpthread" >&5
1224 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
1225 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1226   echo $ac_n "(cached) $ac_c" 1>&6
1227 else
1228   ac_save_LIBS="$LIBS"
1229 LIBS="-lpthread  $LIBS"
1230 cat > conftest.$ac_ext <<EOF
1231 #line 1232 "configure"
1232 #include "confdefs.h"
1233 /* Override any gcc2 internal prototype to avoid an error.  */
1234 /* We use char because int might match the return type of a gcc2
1235     builtin and then its argument prototype would still apply.  */
1236 char pthread_create();
1237
1238 int main() {
1239 pthread_create()
1240 ; return 0; }
1241 EOF
1242 if { (eval echo configure:1243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1243   rm -rf conftest*
1244   eval "ac_cv_lib_$ac_lib_var=yes"
1245 else
1246   echo "configure: failed program was:" >&5
1247   cat conftest.$ac_ext >&5
1248   rm -rf conftest*
1249   eval "ac_cv_lib_$ac_lib_var=no"
1250 fi
1251 rm -f conftest*
1252 LIBS="$ac_save_LIBS"
1253
1254 fi
1255 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1256   echo "$ac_t""yes" 1>&6
1257   pthread_lib="-lpthread"
1258 else
1259   echo "$ac_t""no" 1>&6
1260 :
1261 fi
1262
1263
1264 #dnl Linuxthreads require you to define _REENTRANT in all threaded
1265 #dnl code.  Bogus, bogus...
1266 #
1267 #if test -n "$pthread_lib"; then
1268 #       case $host in 
1269 #       i?86-*-linux*)
1270 #               AC_DEFINE(_REENTRANT)
1271 #               ;;
1272 #       esac
1273 #fi
1274 # We no longer use config.h
1275
1276 #if test -n "$x_libraries"; then
1277 #       XOGG="yes"
1278 #
1279 #       dnl If we find libgtk installed, great; otherwise assume we have
1280 #       dnl to build it ourselves.
1281 #
1282 #       AC_CHECK_LIB(gtk, gtk_main, :, LIBGTKDIR="libgtk", $X_LIBS -lglib -lgdk -lX11 -lXext -lm)
1283 #
1284 #       dnl libpthread is required for xogg.
1285 #
1286 #       if test -z "$pthread_lib"; then XOGG=""; fi
1287 #
1288 #       dnl If we don't have libgtk installed, and we don't have a libgtk 
1289 #       dnl  subdirectory to build the library ourself, we can't build xogg.
1290 #
1291 #       if test -n "$LIBGTKDIR" -a ! -d "$LIBGTKDIR"; then
1292 #               XOGG=""
1293 #               LIBGTKDIR=""
1294 #       fi
1295 #fi
1296
1297
1298 dummy="__noconf"
1299
1300 #if test -d "$LIBGTKDIR"; then
1301 #       enable_shared="no"; export enable_shared
1302 #       dummy="libgtk"
1303 #       AC_CONFIG_SUBDIRS("$dummy")
1304 #       X_LIBS="-L${srcdir}/libgtk/gtk/.libs -L${srcdir}/libgtk/gdk/.libs -L${srcdir}/libgtk/glib/.libs $X_LIBS"
1305 #fi
1306
1307 echo $ac_n "checking size of short""... $ac_c" 1>&6
1308 echo "configure:1309: checking size of short" >&5
1309 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
1310   echo $ac_n "(cached) $ac_c" 1>&6
1311 else
1312   if test "$cross_compiling" = yes; then
1313     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1314 else
1315   cat > conftest.$ac_ext <<EOF
1316 #line 1317 "configure"
1317 #include "confdefs.h"
1318 #include <stdio.h>
1319 main()
1320 {
1321   FILE *f=fopen("conftestval", "w");
1322   if (!f) exit(1);
1323   fprintf(f, "%d\n", sizeof(short));
1324   exit(0);
1325 }
1326 EOF
1327 if { (eval echo configure:1328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1328 then
1329   ac_cv_sizeof_short=`cat conftestval`
1330 else
1331   echo "configure: failed program was:" >&5
1332   cat conftest.$ac_ext >&5
1333   rm -fr conftest*
1334   ac_cv_sizeof_short=0
1335 fi
1336 rm -fr conftest*
1337 fi
1338
1339 fi
1340 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
1341 cat >> confdefs.h <<EOF
1342 #define SIZEOF_SHORT $ac_cv_sizeof_short
1343 EOF
1344
1345
1346 echo $ac_n "checking size of int""... $ac_c" 1>&6
1347 echo "configure:1348: checking size of int" >&5
1348 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
1349   echo $ac_n "(cached) $ac_c" 1>&6
1350 else
1351   if test "$cross_compiling" = yes; then
1352     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1353 else
1354   cat > conftest.$ac_ext <<EOF
1355 #line 1356 "configure"
1356 #include "confdefs.h"
1357 #include <stdio.h>
1358 main()
1359 {
1360   FILE *f=fopen("conftestval", "w");
1361   if (!f) exit(1);
1362   fprintf(f, "%d\n", sizeof(int));
1363   exit(0);
1364 }
1365 EOF
1366 if { (eval echo configure:1367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1367 then
1368   ac_cv_sizeof_int=`cat conftestval`
1369 else
1370   echo "configure: failed program was:" >&5
1371   cat conftest.$ac_ext >&5
1372   rm -fr conftest*
1373   ac_cv_sizeof_int=0
1374 fi
1375 rm -fr conftest*
1376 fi
1377
1378 fi
1379 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
1380 cat >> confdefs.h <<EOF
1381 #define SIZEOF_INT $ac_cv_sizeof_int
1382 EOF
1383
1384
1385 echo $ac_n "checking size of long""... $ac_c" 1>&6
1386 echo "configure:1387: checking size of long" >&5
1387 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
1388   echo $ac_n "(cached) $ac_c" 1>&6
1389 else
1390   if test "$cross_compiling" = yes; then
1391     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1392 else
1393   cat > conftest.$ac_ext <<EOF
1394 #line 1395 "configure"
1395 #include "confdefs.h"
1396 #include <stdio.h>
1397 main()
1398 {
1399   FILE *f=fopen("conftestval", "w");
1400   if (!f) exit(1);
1401   fprintf(f, "%d\n", sizeof(long));
1402   exit(0);
1403 }
1404 EOF
1405 if { (eval echo configure:1406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1406 then
1407   ac_cv_sizeof_long=`cat conftestval`
1408 else
1409   echo "configure: failed program was:" >&5
1410   cat conftest.$ac_ext >&5
1411   rm -fr conftest*
1412   ac_cv_sizeof_long=0
1413 fi
1414 rm -fr conftest*
1415 fi
1416
1417 fi
1418 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
1419 cat >> confdefs.h <<EOF
1420 #define SIZEOF_LONG $ac_cv_sizeof_long
1421 EOF
1422
1423
1424 echo $ac_n "checking size of long long""... $ac_c" 1>&6
1425 echo "configure:1426: checking size of long long" >&5
1426 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
1427   echo $ac_n "(cached) $ac_c" 1>&6
1428 else
1429   if test "$cross_compiling" = yes; then
1430     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1431 else
1432   cat > conftest.$ac_ext <<EOF
1433 #line 1434 "configure"
1434 #include "confdefs.h"
1435 #include <stdio.h>
1436 main()
1437 {
1438   FILE *f=fopen("conftestval", "w");
1439   if (!f) exit(1);
1440   fprintf(f, "%d\n", sizeof(long long));
1441   exit(0);
1442 }
1443 EOF
1444 if { (eval echo configure:1445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1445 then
1446   ac_cv_sizeof_long_long=`cat conftestval`
1447 else
1448   echo "configure: failed program was:" >&5
1449   cat conftest.$ac_ext >&5
1450   rm -fr conftest*
1451   ac_cv_sizeof_long_long=0
1452 fi
1453 rm -fr conftest*
1454 fi
1455
1456 fi
1457 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
1458 cat >> confdefs.h <<EOF
1459 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
1460 EOF
1461
1462
1463
1464 case 2 in
1465         $ac_cv_sizeof_short) SIZE16="short";;
1466         $ac_cv_sizeof_int) SIZE16="int";;
1467 esac
1468
1469 case 4 in
1470         $ac_cv_sizeof_short) SIZE32="short";;
1471         $ac_cv_sizeof_int) SIZE32="int";;
1472         $ac_cv_sizeof_long) SIZE32="long";;
1473 esac
1474
1475 case 8 in
1476         $ac_cv_sizeof_int) SIZE64="int";;
1477         $ac_cv_sizeof_long) SIZE64="long";;
1478         $ac_cv_sizeof_long_long) SIZE64="long long";;
1479 esac
1480
1481 if test -z "$SIZE16"; then
1482         { echo "configure: error: No 16 bit type found on this platform!" 1>&2; exit 1; }
1483 fi
1484 if test -z "$SIZE32"; then
1485         { echo "configure: error: No 32 bit type found on this platform!" 1>&2; exit 1; }
1486 fi
1487 if test -z "$SIZE64"; then
1488         echo "configure: warning: No 64 bit type found on this platform!" 1>&2
1489 fi
1490         
1491 #AC_CHECK_HEADER(alloca.h,AC_DEFINE(USE_ALLOCA_H),:)
1492 #AC_CHECK_HEADER(memory.h,AC_DEFINE(USE_MEMORY_H),:)
1493 # We no longer use config.h
1494 ac_safe=`echo "alloca.h" | sed 'y%./+-%__p_%'`
1495 echo $ac_n "checking for alloca.h""... $ac_c" 1>&6
1496 echo "configure:1497: checking for alloca.h" >&5
1497 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1498   echo $ac_n "(cached) $ac_c" 1>&6
1499 else
1500   cat > conftest.$ac_ext <<EOF
1501 #line 1502 "configure"
1502 #include "confdefs.h"
1503 #include <alloca.h>
1504 EOF
1505 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1506 { (eval echo configure:1507: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1507 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1508 if test -z "$ac_err"; then
1509   rm -rf conftest*
1510   eval "ac_cv_header_$ac_safe=yes"
1511 else
1512   echo "$ac_err" >&5
1513   echo "configure: failed program was:" >&5
1514   cat conftest.$ac_ext >&5
1515   rm -rf conftest*
1516   eval "ac_cv_header_$ac_safe=no"
1517 fi
1518 rm -f conftest*
1519 fi
1520 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1521   echo "$ac_t""yes" 1>&6
1522   CFLAGS="$CFLAGS -DUSE_ALLOCA_H"
1523 else
1524   echo "$ac_t""no" 1>&6
1525 :
1526 fi
1527
1528 ac_safe=`echo "memory.h" | sed 'y%./+-%__p_%'`
1529 echo $ac_n "checking for memory.h""... $ac_c" 1>&6
1530 echo "configure:1531: checking for memory.h" >&5
1531 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1532   echo $ac_n "(cached) $ac_c" 1>&6
1533 else
1534   cat > conftest.$ac_ext <<EOF
1535 #line 1536 "configure"
1536 #include "confdefs.h"
1537 #include <memory.h>
1538 EOF
1539 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1540 { (eval echo configure:1541: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1541 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1542 if test -z "$ac_err"; then
1543   rm -rf conftest*
1544   eval "ac_cv_header_$ac_safe=yes"
1545 else
1546   echo "$ac_err" >&5
1547   echo "configure: failed program was:" >&5
1548   cat conftest.$ac_ext >&5
1549   rm -rf conftest*
1550   eval "ac_cv_header_$ac_safe=no"
1551 fi
1552 rm -f conftest*
1553 fi
1554 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1555   echo "$ac_t""yes" 1>&6
1556   CFLAGS="$CFLAGS -DUSE_MEMORY_H"
1557 else
1558   echo "$ac_t""no" 1>&6
1559 :
1560 fi
1561
1562
1563 echo $ac_n "checking for working const""... $ac_c" 1>&6
1564 echo "configure:1565: checking for working const" >&5
1565 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1566   echo $ac_n "(cached) $ac_c" 1>&6
1567 else
1568   cat > conftest.$ac_ext <<EOF
1569 #line 1570 "configure"
1570 #include "confdefs.h"
1571
1572 int main() {
1573
1574 /* Ultrix mips cc rejects this.  */
1575 typedef int charset[2]; const charset x;
1576 /* SunOS 4.1.1 cc rejects this.  */
1577 char const *const *ccp;
1578 char **p;
1579 /* NEC SVR4.0.2 mips cc rejects this.  */
1580 struct point {int x, y;};
1581 static struct point const zero = {0,0};
1582 /* AIX XL C 1.02.0.0 rejects this.
1583    It does not let you subtract one const X* pointer from another in an arm
1584    of an if-expression whose if-part is not a constant expression */
1585 const char *g = "string";
1586 ccp = &g + (g ? g-g : 0);
1587 /* HPUX 7.0 cc rejects these. */
1588 ++ccp;
1589 p = (char**) ccp;
1590 ccp = (char const *const *) p;
1591 { /* SCO 3.2v4 cc rejects this.  */
1592   char *t;
1593   char const *s = 0 ? (char *) 0 : (char const *) 0;
1594
1595   *t++ = 0;
1596 }
1597 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
1598   int x[] = {25, 17};
1599   const int *foo = &x[0];
1600   ++foo;
1601 }
1602 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1603   typedef const int *iptr;
1604   iptr p = 0;
1605   ++p;
1606 }
1607 { /* AIX XL C 1.02.0.0 rejects this saying
1608      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1609   struct s { int j; const int *ap[3]; };
1610   struct s *b; b->j = 5;
1611 }
1612 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1613   const int foo = 10;
1614 }
1615
1616 ; return 0; }
1617 EOF
1618 if { (eval echo configure:1619: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1619   rm -rf conftest*
1620   ac_cv_c_const=yes
1621 else
1622   echo "configure: failed program was:" >&5
1623   cat conftest.$ac_ext >&5
1624   rm -rf conftest*
1625   ac_cv_c_const=no
1626 fi
1627 rm -f conftest*
1628 fi
1629
1630 echo "$ac_t""$ac_cv_c_const" 1>&6
1631 if test $ac_cv_c_const = no; then
1632   cat >> confdefs.h <<\EOF
1633 #define const 
1634 EOF
1635
1636 fi
1637
1638 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
1639 echo "configure:1640: checking whether time.h and sys/time.h may both be included" >&5
1640 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1641   echo $ac_n "(cached) $ac_c" 1>&6
1642 else
1643   cat > conftest.$ac_ext <<EOF
1644 #line 1645 "configure"
1645 #include "confdefs.h"
1646 #include <sys/types.h>
1647 #include <sys/time.h>
1648 #include <time.h>
1649 int main() {
1650 struct tm *tp;
1651 ; return 0; }
1652 EOF
1653 if { (eval echo configure:1654: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1654   rm -rf conftest*
1655   ac_cv_header_time=yes
1656 else
1657   echo "configure: failed program was:" >&5
1658   cat conftest.$ac_ext >&5
1659   rm -rf conftest*
1660   ac_cv_header_time=no
1661 fi
1662 rm -f conftest*
1663 fi
1664
1665 echo "$ac_t""$ac_cv_header_time" 1>&6
1666 if test $ac_cv_header_time = yes; then
1667   cat >> confdefs.h <<\EOF
1668 #define TIME_WITH_SYS_TIME 1
1669 EOF
1670
1671 fi
1672
1673 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
1674 echo "configure:1675: checking whether struct tm is in sys/time.h or time.h" >&5
1675 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
1676   echo $ac_n "(cached) $ac_c" 1>&6
1677 else
1678   cat > conftest.$ac_ext <<EOF
1679 #line 1680 "configure"
1680 #include "confdefs.h"
1681 #include <sys/types.h>
1682 #include <time.h>
1683 int main() {
1684 struct tm *tp; tp->tm_sec;
1685 ; return 0; }
1686 EOF
1687 if { (eval echo configure:1688: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1688   rm -rf conftest*
1689   ac_cv_struct_tm=time.h
1690 else
1691   echo "configure: failed program was:" >&5
1692   cat conftest.$ac_ext >&5
1693   rm -rf conftest*
1694   ac_cv_struct_tm=sys/time.h
1695 fi
1696 rm -f conftest*
1697 fi
1698
1699 echo "$ac_t""$ac_cv_struct_tm" 1>&6
1700 if test $ac_cv_struct_tm = sys/time.h; then
1701   cat >> confdefs.h <<\EOF
1702 #define TM_IN_SYS_TIME 1
1703 EOF
1704
1705 fi
1706
1707
1708 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1709 echo "configure:1710: checking whether ${MAKE-make} sets \${MAKE}" >&5
1710 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1711 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1712   echo $ac_n "(cached) $ac_c" 1>&6
1713 else
1714   cat > conftestmake <<\EOF
1715 all:
1716         @echo 'ac_maketemp="${MAKE}"'
1717 EOF
1718 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1719 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1720 if test -n "$ac_maketemp"; then
1721   eval ac_cv_prog_make_${ac_make}_set=yes
1722 else
1723   eval ac_cv_prog_make_${ac_make}_set=no
1724 fi
1725 rm -f conftestmake
1726 fi
1727 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1728   echo "$ac_t""yes" 1>&6
1729   SET_MAKE=
1730 else
1731   echo "$ac_t""no" 1>&6
1732   SET_MAKE="MAKE=${MAKE-make}"
1733 fi
1734
1735 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
1736 echo "configure:1737: checking for 8-bit clean memcmp" >&5
1737 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
1738   echo $ac_n "(cached) $ac_c" 1>&6
1739 else
1740   if test "$cross_compiling" = yes; then
1741   ac_cv_func_memcmp_clean=no
1742 else
1743   cat > conftest.$ac_ext <<EOF
1744 #line 1745 "configure"
1745 #include "confdefs.h"
1746
1747 main()
1748 {
1749   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
1750   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
1751 }
1752
1753 EOF
1754 if { (eval echo configure:1755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1755 then
1756   ac_cv_func_memcmp_clean=yes
1757 else
1758   echo "configure: failed program was:" >&5
1759   cat conftest.$ac_ext >&5
1760   rm -fr conftest*
1761   ac_cv_func_memcmp_clean=no
1762 fi
1763 rm -fr conftest*
1764 fi
1765
1766 fi
1767
1768 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
1769 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
1770
1771 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
1772 echo "configure:1773: checking return type of signal handlers" >&5
1773 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
1774   echo $ac_n "(cached) $ac_c" 1>&6
1775 else
1776   cat > conftest.$ac_ext <<EOF
1777 #line 1778 "configure"
1778 #include "confdefs.h"
1779 #include <sys/types.h>
1780 #include <signal.h>
1781 #ifdef signal
1782 #undef signal
1783 #endif
1784 #ifdef __cplusplus
1785 extern "C" void (*signal (int, void (*)(int)))(int);
1786 #else
1787 void (*signal ()) ();
1788 #endif
1789
1790 int main() {
1791 int i;
1792 ; return 0; }
1793 EOF
1794 if { (eval echo configure:1795: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1795   rm -rf conftest*
1796   ac_cv_type_signal=void
1797 else
1798   echo "configure: failed program was:" >&5
1799   cat conftest.$ac_ext >&5
1800   rm -rf conftest*
1801   ac_cv_type_signal=int
1802 fi
1803 rm -f conftest*
1804 fi
1805
1806 echo "$ac_t""$ac_cv_type_signal" 1>&6
1807 cat >> confdefs.h <<EOF
1808 #define RETSIGTYPE $ac_cv_type_signal
1809 EOF
1810
1811
1812 for ac_func in gettimeofday select strcspn strerror strspn sigaction
1813 do
1814 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1815 echo "configure:1816: checking for $ac_func" >&5
1816 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1817   echo $ac_n "(cached) $ac_c" 1>&6
1818 else
1819   cat > conftest.$ac_ext <<EOF
1820 #line 1821 "configure"
1821 #include "confdefs.h"
1822 /* System header to define __stub macros and hopefully few prototypes,
1823     which can conflict with char $ac_func(); below.  */
1824 #include <assert.h>
1825 /* Override any gcc2 internal prototype to avoid an error.  */
1826 /* We use char because int might match the return type of a gcc2
1827     builtin and then its argument prototype would still apply.  */
1828 char $ac_func();
1829
1830 int main() {
1831
1832 /* The GNU C library defines this for functions which it implements
1833     to always fail with ENOSYS.  Some functions are actually named
1834     something starting with __ and the normal name is an alias.  */
1835 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1836 choke me
1837 #else
1838 $ac_func();
1839 #endif
1840
1841 ; return 0; }
1842 EOF
1843 if { (eval echo configure:1844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1844   rm -rf conftest*
1845   eval "ac_cv_func_$ac_func=yes"
1846 else
1847   echo "configure: failed program was:" >&5
1848   cat conftest.$ac_ext >&5
1849   rm -rf conftest*
1850   eval "ac_cv_func_$ac_func=no"
1851 fi
1852 rm -f conftest*
1853 fi
1854
1855 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1856   echo "$ac_t""yes" 1>&6
1857     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1858   cat >> confdefs.h <<EOF
1859 #define $ac_tr_func 1
1860 EOF
1861  
1862 else
1863   echo "$ac_t""no" 1>&6
1864 fi
1865 done
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877 #AC_SUBST(XOGG)
1878 #AC_SUBST(LIBGTKDIR)
1879
1880
1881 trap '' 1 2 15
1882 cat > confcache <<\EOF
1883 # This file is a shell script that caches the results of configure
1884 # tests run on this system so they can be shared between configure
1885 # scripts and configure runs.  It is not useful on other systems.
1886 # If it contains results you don't want to keep, you may remove or edit it.
1887 #
1888 # By default, configure uses ./config.cache as the cache file,
1889 # creating it if it does not exist already.  You can give configure
1890 # the --cache-file=FILE option to use a different cache file; that is
1891 # what configure does when it calls configure scripts in
1892 # subdirectories, so they share the cache.
1893 # Giving --cache-file=/dev/null disables caching, for debugging configure.
1894 # config.status only pays attention to the cache file if you give it the
1895 # --recheck option to rerun configure.
1896 #
1897 EOF
1898 # The following way of writing the cache mishandles newlines in values,
1899 # but we know of no workaround that is simple, portable, and efficient.
1900 # So, don't put newlines in cache variables' values.
1901 # Ultrix sh set writes to stderr and can't be redirected directly,
1902 # and sets the high bit in the cache file unless we assign to the vars.
1903 (set) 2>&1 |
1904   case `(ac_space=' '; set | grep ac_space) 2>&1` in
1905   *ac_space=\ *)
1906     # `set' does not quote correctly, so add quotes (double-quote substitution
1907     # turns \\\\ into \\, and sed turns \\ into \).
1908     sed -n \
1909       -e "s/'/'\\\\''/g" \
1910       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
1911     ;;
1912   *)
1913     # `set' quotes correctly as required by POSIX, so do not add quotes.
1914     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
1915     ;;
1916   esac >> confcache
1917 if cmp -s $cache_file confcache; then
1918   :
1919 else
1920   if test -w $cache_file; then
1921     echo "updating cache $cache_file"
1922     cat confcache > $cache_file
1923   else
1924     echo "not updating unwritable cache $cache_file"
1925   fi
1926 fi
1927 rm -f confcache
1928
1929 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
1930
1931 test "x$prefix" = xNONE && prefix=$ac_default_prefix
1932 # Let make expand exec_prefix.
1933 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
1934
1935 # Any assignment to VPATH causes Sun make to only execute
1936 # the first set of double-colon rules, so remove it if not needed.
1937 # If there is a colon in the path, we need to keep it.
1938 if test "x$srcdir" = x.; then
1939   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
1940 fi
1941
1942 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
1943
1944 # Transform confdefs.h into DEFS.
1945 # Protect against shell expansion while executing Makefile rules.
1946 # Protect against Makefile macro expansion.
1947 cat > conftest.defs <<\EOF
1948 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
1949 s%[     `~#$^&*(){}\\|;'"<>?]%\\&%g
1950 s%\[%\\&%g
1951 s%\]%\\&%g
1952 s%\$%$$%g
1953 EOF
1954 DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
1955 rm -f conftest.defs
1956
1957
1958 # Without the "./", some shells look in PATH for config.status.
1959 : ${CONFIG_STATUS=./config.status}
1960
1961 echo creating $CONFIG_STATUS
1962 rm -f $CONFIG_STATUS
1963 cat > $CONFIG_STATUS <<EOF
1964 #! /bin/sh
1965 # Generated automatically by configure.
1966 # Run this file to recreate the current configuration.
1967 # This directory was configured as follows,
1968 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1969 #
1970 # $0 $ac_configure_args
1971 #
1972 # Compiler output produced by configure, useful for debugging
1973 # configure, is in ./config.log if it exists.
1974
1975 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
1976 for ac_option
1977 do
1978   case "\$ac_option" in
1979   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
1980     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
1981     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
1982   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
1983     echo "$CONFIG_STATUS generated by autoconf version 2.13"
1984     exit 0 ;;
1985   -help | --help | --hel | --he | --h)
1986     echo "\$ac_cs_usage"; exit 0 ;;
1987   *) echo "\$ac_cs_usage"; exit 1 ;;
1988   esac
1989 done
1990
1991 ac_given_srcdir=$srcdir
1992
1993 trap 'rm -fr `echo "Makefile lib/Makefile examples/Makefile vorbis-tools/Makefile\
1994         vq/Makefile huff/Makefile cmdline/Makefile xmms/Makefile kmpg/Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
1995 EOF
1996 cat >> $CONFIG_STATUS <<EOF
1997
1998 # Protect against being on the right side of a sed subst in config.status.
1999 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2000  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2001 $ac_vpsub
2002 $extrasub
2003 s%@SHELL@%$SHELL%g
2004 s%@CFLAGS@%$CFLAGS%g
2005 s%@CPPFLAGS@%$CPPFLAGS%g
2006 s%@CXXFLAGS@%$CXXFLAGS%g
2007 s%@FFLAGS@%$FFLAGS%g
2008 s%@DEFS@%$DEFS%g
2009 s%@LDFLAGS@%$LDFLAGS%g
2010 s%@LIBS@%$LIBS%g
2011 s%@exec_prefix@%$exec_prefix%g
2012 s%@prefix@%$prefix%g
2013 s%@program_transform_name@%$program_transform_name%g
2014 s%@bindir@%$bindir%g
2015 s%@sbindir@%$sbindir%g
2016 s%@libexecdir@%$libexecdir%g
2017 s%@datadir@%$datadir%g
2018 s%@sysconfdir@%$sysconfdir%g
2019 s%@sharedstatedir@%$sharedstatedir%g
2020 s%@localstatedir@%$localstatedir%g
2021 s%@libdir@%$libdir%g
2022 s%@includedir@%$includedir%g
2023 s%@oldincludedir@%$oldincludedir%g
2024 s%@infodir@%$infodir%g
2025 s%@mandir@%$mandir%g
2026 s%@host@%$host%g
2027 s%@host_alias@%$host_alias%g
2028 s%@host_cpu@%$host_cpu%g
2029 s%@host_vendor@%$host_vendor%g
2030 s%@host_os@%$host_os%g
2031 s%@CC@%$CC%g
2032 s%@RANLIB@%$RANLIB%g
2033 s%@AR@%$AR%g
2034 s%@INSTALL@%$INSTALL%g
2035 s%@CPP@%$CPP%g
2036 s%@SET_MAKE@%$SET_MAKE%g
2037 s%@LIBOBJS@%$LIBOBJS%g
2038 s%@SIZE16@%$SIZE16%g
2039 s%@SIZE32@%$SIZE32%g
2040 s%@SIZE64@%$SIZE64%g
2041 s%@OPT@%$OPT%g
2042 s%@DEBUG@%$DEBUG%g
2043 s%@PROFILE@%$PROFILE%g
2044 s%@pthread_lib@%$pthread_lib%g
2045
2046 CEOF
2047 EOF
2048
2049 cat >> $CONFIG_STATUS <<\EOF
2050
2051 # Split the substitutions into bite-sized pieces for seds with
2052 # small command number limits, like on Digital OSF/1 and HP-UX.
2053 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
2054 ac_file=1 # Number of current file.
2055 ac_beg=1 # First line for current file.
2056 ac_end=$ac_max_sed_cmds # Line after last line for current file.
2057 ac_more_lines=:
2058 ac_sed_cmds=""
2059 while $ac_more_lines; do
2060   if test $ac_beg -gt 1; then
2061     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
2062   else
2063     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
2064   fi
2065   if test ! -s conftest.s$ac_file; then
2066     ac_more_lines=false
2067     rm -f conftest.s$ac_file
2068   else
2069     if test -z "$ac_sed_cmds"; then
2070       ac_sed_cmds="sed -f conftest.s$ac_file"
2071     else
2072       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
2073     fi
2074     ac_file=`expr $ac_file + 1`
2075     ac_beg=$ac_end
2076     ac_end=`expr $ac_end + $ac_max_sed_cmds`
2077   fi
2078 done
2079 if test -z "$ac_sed_cmds"; then
2080   ac_sed_cmds=cat
2081 fi
2082 EOF
2083
2084 cat >> $CONFIG_STATUS <<EOF
2085
2086 CONFIG_FILES=\${CONFIG_FILES-"Makefile lib/Makefile examples/Makefile vorbis-tools/Makefile\
2087         vq/Makefile huff/Makefile cmdline/Makefile xmms/Makefile kmpg/Makefile"}
2088 EOF
2089 cat >> $CONFIG_STATUS <<\EOF
2090 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2091   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2092   case "$ac_file" in
2093   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2094        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2095   *) ac_file_in="${ac_file}.in" ;;
2096   esac
2097
2098   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
2099
2100   # Remove last slash and all that follows it.  Not all systems have dirname.
2101   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2102   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2103     # The file is in a subdirectory.
2104     test ! -d "$ac_dir" && mkdir "$ac_dir"
2105     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2106     # A "../" for each directory in $ac_dir_suffix.
2107     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2108   else
2109     ac_dir_suffix= ac_dots=
2110   fi
2111
2112   case "$ac_given_srcdir" in
2113   .)  srcdir=.
2114       if test -z "$ac_dots"; then top_srcdir=.
2115       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2116   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2117   *) # Relative path.
2118     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2119     top_srcdir="$ac_dots$ac_given_srcdir" ;;
2120   esac
2121
2122
2123   echo creating "$ac_file"
2124   rm -f "$ac_file"
2125   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2126   case "$ac_file" in
2127   *Makefile*) ac_comsub="1i\\
2128 # $configure_input" ;;
2129   *) ac_comsub= ;;
2130   esac
2131
2132   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2133   sed -e "$ac_comsub
2134 s%@configure_input@%$configure_input%g
2135 s%@srcdir@%$srcdir%g
2136 s%@top_srcdir@%$top_srcdir%g
2137 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
2138 fi; done
2139 rm -f conftest.s*
2140
2141 EOF
2142 cat >> $CONFIG_STATUS <<EOF
2143
2144 EOF
2145 cat >> $CONFIG_STATUS <<\EOF
2146
2147 exit 0
2148 EOF
2149 chmod +x $CONFIG_STATUS
2150 rm -fr confdefs* $ac_clean_files
2151 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2152
2153