Backport of sqrt() domain fix to mainline.
[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 cflags_save="$CFLAGS"
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 # because AC_PROG_CC likes to set -g 
861 CFLAGS="$cflags_save"
862
863 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
864 echo "configure:865: checking how to run the C preprocessor" >&5
865 # On Suns, sometimes $CPP names a directory.
866 if test -n "$CPP" && test -d "$CPP"; then
867   CPP=
868 fi
869 if test -z "$CPP"; then
870 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
871   echo $ac_n "(cached) $ac_c" 1>&6
872 else
873     # This must be in double quotes, not single quotes, because CPP may get
874   # substituted into the Makefile and "${CC-cc}" will confuse make.
875   CPP="${CC-cc} -E"
876   # On the NeXT, cc -E runs the code through the compiler's parser,
877   # not just through cpp.
878   cat > conftest.$ac_ext <<EOF
879 #line 880 "configure"
880 #include "confdefs.h"
881 #include <assert.h>
882 Syntax Error
883 EOF
884 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
885 { (eval echo configure:886: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
886 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
887 if test -z "$ac_err"; then
888   :
889 else
890   echo "$ac_err" >&5
891   echo "configure: failed program was:" >&5
892   cat conftest.$ac_ext >&5
893   rm -rf conftest*
894   CPP="${CC-cc} -E -traditional-cpp"
895   cat > conftest.$ac_ext <<EOF
896 #line 897 "configure"
897 #include "confdefs.h"
898 #include <assert.h>
899 Syntax Error
900 EOF
901 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
902 { (eval echo configure:903: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
903 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
904 if test -z "$ac_err"; then
905   :
906 else
907   echo "$ac_err" >&5
908   echo "configure: failed program was:" >&5
909   cat conftest.$ac_ext >&5
910   rm -rf conftest*
911   CPP="${CC-cc} -nologo -E"
912   cat > conftest.$ac_ext <<EOF
913 #line 914 "configure"
914 #include "confdefs.h"
915 #include <assert.h>
916 Syntax Error
917 EOF
918 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
919 { (eval echo configure:920: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
920 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
921 if test -z "$ac_err"; then
922   :
923 else
924   echo "$ac_err" >&5
925   echo "configure: failed program was:" >&5
926   cat conftest.$ac_ext >&5
927   rm -rf conftest*
928   CPP=/lib/cpp
929 fi
930 rm -f conftest*
931 fi
932 rm -f conftest*
933 fi
934 rm -f conftest*
935   ac_cv_prog_CPP="$CPP"
936 fi
937   CPP="$ac_cv_prog_CPP"
938 else
939   ac_cv_prog_CPP="$CPP"
940 fi
941 echo "$ac_t""$CPP" 1>&6
942
943 # Extract the first word of "ranlib", so it can be a program name with args.
944 set dummy ranlib; ac_word=$2
945 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
946 echo "configure:947: checking for $ac_word" >&5
947 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
948   echo $ac_n "(cached) $ac_c" 1>&6
949 else
950   if test -n "$RANLIB"; then
951   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
952 else
953   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
954   ac_dummy="$PATH"
955   for ac_dir in $ac_dummy; do
956     test -z "$ac_dir" && ac_dir=.
957     if test -f $ac_dir/$ac_word; then
958       ac_cv_prog_RANLIB="ranlib"
959       break
960     fi
961   done
962   IFS="$ac_save_ifs"
963   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
964 fi
965 fi
966 RANLIB="$ac_cv_prog_RANLIB"
967 if test -n "$RANLIB"; then
968   echo "$ac_t""$RANLIB" 1>&6
969 else
970   echo "$ac_t""no" 1>&6
971 fi
972
973 # Extract the first word of "ar", so it can be a program name with args.
974 set dummy ar; ac_word=$2
975 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
976 echo "configure:977: checking for $ac_word" >&5
977 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
978   echo $ac_n "(cached) $ac_c" 1>&6
979 else
980   if test -n "$AR"; then
981   ac_cv_prog_AR="$AR" # Let the user override the test.
982 else
983   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
984   ac_dummy="$PATH"
985   for ac_dir in $ac_dummy; do
986     test -z "$ac_dir" && ac_dir=.
987     if test -f $ac_dir/$ac_word; then
988       ac_cv_prog_AR="ar"
989       break
990     fi
991   done
992   IFS="$ac_save_ifs"
993 fi
994 fi
995 AR="$ac_cv_prog_AR"
996 if test -n "$AR"; then
997   echo "$ac_t""$AR" 1>&6
998 else
999   echo "$ac_t""no" 1>&6
1000 fi
1001
1002 # Extract the first word of "install", so it can be a program name with args.
1003 set dummy install; ac_word=$2
1004 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1005 echo "configure:1006: checking for $ac_word" >&5
1006 if eval "test \"`echo '$''{'ac_cv_prog_INSTALL'+set}'`\" = set"; then
1007   echo $ac_n "(cached) $ac_c" 1>&6
1008 else
1009   if test -n "$INSTALL"; then
1010   ac_cv_prog_INSTALL="$INSTALL" # Let the user override the test.
1011 else
1012   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1013   ac_dummy="$PATH"
1014   for ac_dir in $ac_dummy; do
1015     test -z "$ac_dir" && ac_dir=.
1016     if test -f $ac_dir/$ac_word; then
1017       ac_cv_prog_INSTALL="install"
1018       break
1019     fi
1020   done
1021   IFS="$ac_save_ifs"
1022 fi
1023 fi
1024 INSTALL="$ac_cv_prog_INSTALL"
1025 if test -n "$INSTALL"; then
1026   echo "$ac_t""$INSTALL" 1>&6
1027 else
1028   echo "$ac_t""no" 1>&6
1029 fi
1030
1031
1032 #not everyone uses libm (eg, BeOS)
1033 #AC_CHECK_LIB(m, cos, LIBS="-lm"; AC_DEFINE(HAVE_LIBM), LIBS="")
1034 # We no longer use config.h
1035 echo $ac_n "checking for cos in -lm""... $ac_c" 1>&6
1036 echo "configure:1037: checking for cos in -lm" >&5
1037 ac_lib_var=`echo m'_'cos | sed 'y%./+-%__p_%'`
1038 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1039   echo $ac_n "(cached) $ac_c" 1>&6
1040 else
1041   ac_save_LIBS="$LIBS"
1042 LIBS="-lm  $LIBS"
1043 cat > conftest.$ac_ext <<EOF
1044 #line 1045 "configure"
1045 #include "confdefs.h"
1046 /* Override any gcc2 internal prototype to avoid an error.  */
1047 /* We use char because int might match the return type of a gcc2
1048     builtin and then its argument prototype would still apply.  */
1049 char cos();
1050
1051 int main() {
1052 cos()
1053 ; return 0; }
1054 EOF
1055 if { (eval echo configure:1056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1056   rm -rf conftest*
1057   eval "ac_cv_lib_$ac_lib_var=yes"
1058 else
1059   echo "configure: failed program was:" >&5
1060   cat conftest.$ac_ext >&5
1061   rm -rf conftest*
1062   eval "ac_cv_lib_$ac_lib_var=no"
1063 fi
1064 rm -f conftest*
1065 LIBS="$ac_save_LIBS"
1066
1067 fi
1068 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1069   echo "$ac_t""yes" 1>&6
1070   LIBS="-lm"
1071 else
1072   echo "$ac_t""no" 1>&6
1073 LIBS=""
1074 fi
1075
1076
1077 if test -z "$GCC"; then
1078         case $host in 
1079         *-*-irix*)
1080                 DEBUG="-g -signed" 
1081                 OPT="-O2 -w -signed"
1082                 PROFILE="-p -g3 -O2 -signed" ;;
1083         sparc-sun-solaris*)
1084                 DEBUG="-v -g"
1085                 OPT="-xO4 -fast -w -fsimple -native -xcg92"
1086                 PROFILE="-v -xpg -g -xO4 -fast -native -fsimple -xcg92 -Dsuncc" ;;
1087         *)
1088                 DEBUG="-g"
1089                 OPT="-O"
1090                 PROFILE="-g -p" ;;
1091         esac
1092 else
1093
1094         case $host in 
1095         *86-*-linux*)
1096                 DEBUG="-g -Wall -D_REENTRANT -D__NO_MATH_INLINES -fsigned-char"
1097                 OPT="-O20 -ffast-math -D_REENTRANT -fsigned-char"
1098                 PROFILE="-pg -g -O20 -ffast-math -D_REENTRANT -fsigned-char"
1099                 
1100                 # glibc < 2.1.3 has a serious FP bug in the math inline header
1101                 # that will cripple Vorbis.  Look to see if the magic FP stack
1102                 # clobber is missing in the mathinline header, thus indicating
1103                 # the buggy version
1104
1105                 cat > conftest.$ac_ext <<EOF
1106 #line 1107 "configure"
1107 #include "confdefs.h"
1108
1109                                 #define __LIBC_INTERNAL_MATH_INLINES 1
1110                                 #define __OPTIMIZE__
1111                                 #include <math.h>
1112                                 
1113 EOF
1114 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1115   egrep "log10.*fldlg2.*fxch" >/dev/null 2>&1; then
1116   rm -rf conftest*
1117   bad=maybe
1118 else
1119   rm -rf conftest*
1120   bad=no
1121 fi
1122 rm -f conftest*
1123
1124                 if test ${bad} = "maybe" ;then
1125                       cat > conftest.$ac_ext <<EOF
1126 #line 1127 "configure"
1127 #include "confdefs.h"
1128
1129                                         #define __LIBC_INTERNAL_MATH_INLINES 1
1130                                         #define __OPTIMIZE__
1131                                         #include <math.h>
1132                                         
1133 EOF
1134 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1135   egrep "log10.*fldlg2.*fxch.*st\([0123456789]*\)" >/dev/null 2>&1; then
1136   rm -rf conftest*
1137   bad=no
1138 else
1139   rm -rf conftest*
1140   bad=yes
1141 fi
1142 rm -f conftest*
1143
1144                 fi
1145                 if test ${bad} = "yes" ;then
1146  echo "configure: warning:                                                         " 1>&2
1147  echo "configure: warning: ********************************************************" 1>&2
1148  echo "configure: warning: * The glibc headers on this machine have a serious bug *" 1>&2
1149  echo "configure: warning: * in /usr/include/bits/mathinline.h  This bug affects  *" 1>&2
1150  echo "configure: warning: * all floating point code, not just Ogg, built on this *" 1>&2
1151  echo "configure: warning: * machine.  Upgrading to glibc 2.1.3 is strongly urged *" 1>&2
1152  echo "configure: warning: * to correct the problem.  Note that upgrading glibc   *" 1>&2
1153  echo "configure: warning: * will not fix any previously built programs; this is  *" 1>&2
1154  echo "configure: warning: * a compile-time time bug.                             *" 1>&2
1155  echo "configure: warning: * To work around the problem for this build of Ogg,    *" 1>&2
1156  echo "configure: warning: * autoconf is disabling all math inlining.  This will  *" 1>&2
1157  echo "configure: warning: * hurt Ogg performace but is necessary for an Ogg that *" 1>&2
1158  echo "configure: warning: * will actually work.  Once glibc is upgraded, rerun   *" 1>&2
1159  echo "configure: warning: * configure and make to build with inlining.           *" 1>&2
1160  echo "configure: warning: ********************************************************" 1>&2
1161  echo "configure: warning:                                                         " 1>&2
1162
1163                 OPT=${OPT}" -D__NO_MATH_INLINES"
1164                 PROFILE=${PROFILE}" -D__NO_MATH_INLINES"
1165                 fi;;
1166         *-*-linux*)
1167                 DEBUG="-g -Wall -D_REENTRANT -D__NO_MATH_INLINES -fsigned-char"
1168                 OPT="-O20 -ffast-math -D_REENTRANT -fsigned-char"
1169                 PROFILE="-pg -g -O20 -ffast-math -D_REENTRANT -fsigned-char";;
1170         sparc-sun-*)
1171                 DEBUG="-g -Wall -D__NO_MATH_INLINES -fsigned-char -mv8"
1172                 OPT="-O20 -ffast-math -D__NO_MATH_INLINES -fsigned-char -mv8"
1173                 PROFILE="-pg -g -O20 -D__NO_MATH_INLINES -fsigned-char -mv8" ;;
1174         *)
1175                 DEBUG="-g -Wall -D__NO_MATH_INLINES -fsigned-char"
1176                 OPT="-O20 -D__NO_MATH_INLINES -fsigned-char"
1177                 PROFILE="-O20 -g -pg -D__NO_MATH_INLINES -fsigned-char" ;;
1178         esac
1179 fi
1180
1181 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1182 echo "configure:1183: checking for ANSI C header files" >&5
1183 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1184   echo $ac_n "(cached) $ac_c" 1>&6
1185 else
1186   cat > conftest.$ac_ext <<EOF
1187 #line 1188 "configure"
1188 #include "confdefs.h"
1189 #include <stdlib.h>
1190 #include <stdarg.h>
1191 #include <string.h>
1192 #include <float.h>
1193 EOF
1194 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1195 { (eval echo configure:1196: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1196 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1197 if test -z "$ac_err"; then
1198   rm -rf conftest*
1199   ac_cv_header_stdc=yes
1200 else
1201   echo "$ac_err" >&5
1202   echo "configure: failed program was:" >&5
1203   cat conftest.$ac_ext >&5
1204   rm -rf conftest*
1205   ac_cv_header_stdc=no
1206 fi
1207 rm -f conftest*
1208
1209 if test $ac_cv_header_stdc = yes; then
1210   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1211 cat > conftest.$ac_ext <<EOF
1212 #line 1213 "configure"
1213 #include "confdefs.h"
1214 #include <string.h>
1215 EOF
1216 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1217   egrep "memchr" >/dev/null 2>&1; then
1218   :
1219 else
1220   rm -rf conftest*
1221   ac_cv_header_stdc=no
1222 fi
1223 rm -f conftest*
1224
1225 fi
1226
1227 if test $ac_cv_header_stdc = yes; then
1228   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1229 cat > conftest.$ac_ext <<EOF
1230 #line 1231 "configure"
1231 #include "confdefs.h"
1232 #include <stdlib.h>
1233 EOF
1234 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1235   egrep "free" >/dev/null 2>&1; then
1236   :
1237 else
1238   rm -rf conftest*
1239   ac_cv_header_stdc=no
1240 fi
1241 rm -f conftest*
1242
1243 fi
1244
1245 if test $ac_cv_header_stdc = yes; then
1246   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1247 if test "$cross_compiling" = yes; then
1248   :
1249 else
1250   cat > conftest.$ac_ext <<EOF
1251 #line 1252 "configure"
1252 #include "confdefs.h"
1253 #include <ctype.h>
1254 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1255 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1256 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1257 int main () { int i; for (i = 0; i < 256; i++)
1258 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1259 exit (0); }
1260
1261 EOF
1262 if { (eval echo configure:1263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1263 then
1264   :
1265 else
1266   echo "configure: failed program was:" >&5
1267   cat conftest.$ac_ext >&5
1268   rm -fr conftest*
1269   ac_cv_header_stdc=no
1270 fi
1271 rm -fr conftest*
1272 fi
1273
1274 fi
1275 fi
1276
1277 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1278 if test $ac_cv_header_stdc = yes; then
1279   cat >> confdefs.h <<\EOF
1280 #define STDC_HEADERS 1
1281 EOF
1282
1283 fi
1284
1285
1286
1287 #AC_CHECK_LIB(pthread, pthread_create, 
1288 #       pthread_lib="-lpthread"; AC_DEFINE(HAVE_LIBPTHREAD), :)
1289 # We no longer use config.h
1290 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
1291 echo "configure:1292: checking for pthread_create in -lpthread" >&5
1292 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
1293 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1294   echo $ac_n "(cached) $ac_c" 1>&6
1295 else
1296   ac_save_LIBS="$LIBS"
1297 LIBS="-lpthread  $LIBS"
1298 cat > conftest.$ac_ext <<EOF
1299 #line 1300 "configure"
1300 #include "confdefs.h"
1301 /* Override any gcc2 internal prototype to avoid an error.  */
1302 /* We use char because int might match the return type of a gcc2
1303     builtin and then its argument prototype would still apply.  */
1304 char pthread_create();
1305
1306 int main() {
1307 pthread_create()
1308 ; return 0; }
1309 EOF
1310 if { (eval echo configure:1311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1311   rm -rf conftest*
1312   eval "ac_cv_lib_$ac_lib_var=yes"
1313 else
1314   echo "configure: failed program was:" >&5
1315   cat conftest.$ac_ext >&5
1316   rm -rf conftest*
1317   eval "ac_cv_lib_$ac_lib_var=no"
1318 fi
1319 rm -f conftest*
1320 LIBS="$ac_save_LIBS"
1321
1322 fi
1323 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1324   echo "$ac_t""yes" 1>&6
1325   pthread_lib="-lpthread"
1326 else
1327   echo "$ac_t""no" 1>&6
1328 :
1329 fi
1330
1331
1332 #dnl Linuxthreads require you to define _REENTRANT in all threaded
1333 #dnl code.  Bogus, bogus...
1334 #
1335 #if test -n "$pthread_lib"; then
1336 #       case $host in 
1337 #       i?86-*-linux*)
1338 #               AC_DEFINE(_REENTRANT)
1339 #               ;;
1340 #       esac
1341 #fi
1342 # We no longer use config.h
1343
1344 #if test -n "$x_libraries"; then
1345 #       XOGG="yes"
1346 #
1347 #       dnl If we find libgtk installed, great; otherwise assume we have
1348 #       dnl to build it ourselves.
1349 #
1350 #       AC_CHECK_LIB(gtk, gtk_main, :, LIBGTKDIR="libgtk", $X_LIBS -lglib -lgdk -lX11 -lXext -lm)
1351 #
1352 #       dnl libpthread is required for xogg.
1353 #
1354 #       if test -z "$pthread_lib"; then XOGG=""; fi
1355 #
1356 #       dnl If we don't have libgtk installed, and we don't have a libgtk 
1357 #       dnl  subdirectory to build the library ourself, we can't build xogg.
1358 #
1359 #       if test -n "$LIBGTKDIR" -a ! -d "$LIBGTKDIR"; then
1360 #               XOGG=""
1361 #               LIBGTKDIR=""
1362 #       fi
1363 #fi
1364
1365
1366 dummy="__noconf"
1367
1368 #if test -d "$LIBGTKDIR"; then
1369 #       enable_shared="no"; export enable_shared
1370 #       dummy="libgtk"
1371 #       AC_CONFIG_SUBDIRS("$dummy")
1372 #       X_LIBS="-L${srcdir}/libgtk/gtk/.libs -L${srcdir}/libgtk/gdk/.libs -L${srcdir}/libgtk/glib/.libs $X_LIBS"
1373 #fi
1374
1375 # check macro modified from Jon Shiring's to compensate for autoconf's lagging
1376 # behind the times on type madness
1377
1378 echo $ac_n "checking for int16_t""... $ac_c" 1>&6
1379 echo "configure:1380: checking for int16_t" >&5
1380 if eval "test \"`echo '$''{'has_int16_t'+set}'`\" = set"; then
1381   echo $ac_n "(cached) $ac_c" 1>&6
1382 else
1383   if test "$cross_compiling" = yes; then
1384   has_int16_t=no
1385
1386 else
1387   cat > conftest.$ac_ext <<EOF
1388 #line 1389 "configure"
1389 #include "confdefs.h"
1390
1391 #ifdef __BEOS__
1392 #include <inttypes.h>
1393 #endif
1394 #include <sys/types.h>
1395 int16_t foo;
1396 int main() {return 0;}
1397
1398 EOF
1399 if { (eval echo configure:1400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1400 then
1401   has_int16_t=yes
1402 else
1403   echo "configure: failed program was:" >&5
1404   cat conftest.$ac_ext >&5
1405   rm -fr conftest*
1406   has_int16_t=no
1407 fi
1408 rm -fr conftest*
1409 fi
1410
1411 fi
1412
1413 echo "$ac_t""$has_int16_t" 1>&6
1414
1415 echo $ac_n "checking for int32_t""... $ac_c" 1>&6
1416 echo "configure:1417: checking for int32_t" >&5
1417 if eval "test \"`echo '$''{'has_int32_t'+set}'`\" = set"; then
1418   echo $ac_n "(cached) $ac_c" 1>&6
1419 else
1420   if test "$cross_compiling" = yes; then
1421   has_int32_t=no
1422
1423 else
1424   cat > conftest.$ac_ext <<EOF
1425 #line 1426 "configure"
1426 #include "confdefs.h"
1427
1428 #ifdef __BEOS__
1429 #include <inttypes.h>
1430 #endif
1431 #include <sys/types.h>
1432 int32_t foo;
1433 int main() {return 0;}
1434
1435 EOF
1436 if { (eval echo configure:1437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1437 then
1438   has_int32_t=yes
1439 else
1440   echo "configure: failed program was:" >&5
1441   cat conftest.$ac_ext >&5
1442   rm -fr conftest*
1443   has_int32_t=no
1444 fi
1445 rm -fr conftest*
1446 fi
1447
1448 fi
1449
1450 echo "$ac_t""$has_int32_t" 1>&6
1451
1452 echo $ac_n "checking for uint32_t""... $ac_c" 1>&6
1453 echo "configure:1454: checking for uint32_t" >&5
1454 if eval "test \"`echo '$''{'has_uint32_t'+set}'`\" = set"; then
1455   echo $ac_n "(cached) $ac_c" 1>&6
1456 else
1457   if test "$cross_compiling" = yes; then
1458   has_uint32_t=no
1459
1460 else
1461   cat > conftest.$ac_ext <<EOF
1462 #line 1463 "configure"
1463 #include "confdefs.h"
1464
1465 #ifdef __BEOS__
1466 #include <inttypes.h>
1467 #endif
1468 #include <sys/types.h>
1469 uint32_t foo;
1470 int main() {return 0;}
1471
1472 EOF
1473 if { (eval echo configure:1474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1474 then
1475   has_uint32_t=yes
1476 else
1477   echo "configure: failed program was:" >&5
1478   cat conftest.$ac_ext >&5
1479   rm -fr conftest*
1480   has_uint32_t=no
1481 fi
1482 rm -fr conftest*
1483 fi
1484
1485 fi
1486
1487 echo "$ac_t""$has_uint32_t" 1>&6
1488
1489 echo $ac_n "checking for u_int32_t""... $ac_c" 1>&6
1490 echo "configure:1491: checking for u_int32_t" >&5
1491 if eval "test \"`echo '$''{'has_u_int32_t'+set}'`\" = set"; then
1492   echo $ac_n "(cached) $ac_c" 1>&6
1493 else
1494   if test "$cross_compiling" = yes; then
1495   has_u_int32_t=no
1496
1497 else
1498   cat > conftest.$ac_ext <<EOF
1499 #line 1500 "configure"
1500 #include "confdefs.h"
1501
1502 #ifdef __BEOS__
1503 #include <inttypes.h>
1504 #endif
1505 #include <sys/types.h>
1506 u_int32_t foo;
1507 int main() {return 0;}
1508
1509 EOF
1510 if { (eval echo configure:1511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1511 then
1512   has_u_int32_t=yes
1513 else
1514   echo "configure: failed program was:" >&5
1515   cat conftest.$ac_ext >&5
1516   rm -fr conftest*
1517   has_u_int32_t=no
1518 fi
1519 rm -fr conftest*
1520 fi
1521
1522 fi
1523
1524 echo "$ac_t""$has_u_int32_t" 1>&6
1525
1526 echo $ac_n "checking for int64_t""... $ac_c" 1>&6
1527 echo "configure:1528: checking for int64_t" >&5
1528 if eval "test \"`echo '$''{'has_int64_t'+set}'`\" = set"; then
1529   echo $ac_n "(cached) $ac_c" 1>&6
1530 else
1531   if test "$cross_compiling" = yes; then
1532   has_int64_t=no
1533
1534 else
1535   cat > conftest.$ac_ext <<EOF
1536 #line 1537 "configure"
1537 #include "confdefs.h"
1538
1539 #ifdef __BEOS__
1540 #include <inttypes.h>
1541 #endif
1542 #include <sys/types.h>
1543 int64_t foo;
1544 int main() {return 0;}
1545
1546 EOF
1547 if { (eval echo configure:1548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1548 then
1549   has_int64_t=yes
1550 else
1551   echo "configure: failed program was:" >&5
1552   cat conftest.$ac_ext >&5
1553   rm -fr conftest*
1554   has_int64_t=no
1555 fi
1556 rm -fr conftest*
1557 fi
1558
1559 fi
1560
1561 echo "$ac_t""$has_int64_t" 1>&6
1562
1563 echo $ac_n "checking size of short""... $ac_c" 1>&6
1564 echo "configure:1565: checking size of short" >&5
1565 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
1566   echo $ac_n "(cached) $ac_c" 1>&6
1567 else
1568   if test "$cross_compiling" = yes; then
1569     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1570 else
1571   cat > conftest.$ac_ext <<EOF
1572 #line 1573 "configure"
1573 #include "confdefs.h"
1574 #include <stdio.h>
1575 main()
1576 {
1577   FILE *f=fopen("conftestval", "w");
1578   if (!f) exit(1);
1579   fprintf(f, "%d\n", sizeof(short));
1580   exit(0);
1581 }
1582 EOF
1583 if { (eval echo configure:1584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1584 then
1585   ac_cv_sizeof_short=`cat conftestval`
1586 else
1587   echo "configure: failed program was:" >&5
1588   cat conftest.$ac_ext >&5
1589   rm -fr conftest*
1590   ac_cv_sizeof_short=0
1591 fi
1592 rm -fr conftest*
1593 fi
1594
1595 fi
1596 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
1597 cat >> confdefs.h <<EOF
1598 #define SIZEOF_SHORT $ac_cv_sizeof_short
1599 EOF
1600
1601
1602 echo $ac_n "checking size of int""... $ac_c" 1>&6
1603 echo "configure:1604: checking size of int" >&5
1604 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
1605   echo $ac_n "(cached) $ac_c" 1>&6
1606 else
1607   if test "$cross_compiling" = yes; then
1608     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1609 else
1610   cat > conftest.$ac_ext <<EOF
1611 #line 1612 "configure"
1612 #include "confdefs.h"
1613 #include <stdio.h>
1614 main()
1615 {
1616   FILE *f=fopen("conftestval", "w");
1617   if (!f) exit(1);
1618   fprintf(f, "%d\n", sizeof(int));
1619   exit(0);
1620 }
1621 EOF
1622 if { (eval echo configure:1623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1623 then
1624   ac_cv_sizeof_int=`cat conftestval`
1625 else
1626   echo "configure: failed program was:" >&5
1627   cat conftest.$ac_ext >&5
1628   rm -fr conftest*
1629   ac_cv_sizeof_int=0
1630 fi
1631 rm -fr conftest*
1632 fi
1633
1634 fi
1635 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
1636 cat >> confdefs.h <<EOF
1637 #define SIZEOF_INT $ac_cv_sizeof_int
1638 EOF
1639
1640
1641 echo $ac_n "checking size of long""... $ac_c" 1>&6
1642 echo "configure:1643: checking size of long" >&5
1643 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
1644   echo $ac_n "(cached) $ac_c" 1>&6
1645 else
1646   if test "$cross_compiling" = yes; then
1647     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1648 else
1649   cat > conftest.$ac_ext <<EOF
1650 #line 1651 "configure"
1651 #include "confdefs.h"
1652 #include <stdio.h>
1653 main()
1654 {
1655   FILE *f=fopen("conftestval", "w");
1656   if (!f) exit(1);
1657   fprintf(f, "%d\n", sizeof(long));
1658   exit(0);
1659 }
1660 EOF
1661 if { (eval echo configure:1662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1662 then
1663   ac_cv_sizeof_long=`cat conftestval`
1664 else
1665   echo "configure: failed program was:" >&5
1666   cat conftest.$ac_ext >&5
1667   rm -fr conftest*
1668   ac_cv_sizeof_long=0
1669 fi
1670 rm -fr conftest*
1671 fi
1672
1673 fi
1674 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
1675 cat >> confdefs.h <<EOF
1676 #define SIZEOF_LONG $ac_cv_sizeof_long
1677 EOF
1678
1679
1680 echo $ac_n "checking size of long long""... $ac_c" 1>&6
1681 echo "configure:1682: checking size of long long" >&5
1682 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
1683   echo $ac_n "(cached) $ac_c" 1>&6
1684 else
1685   if test "$cross_compiling" = yes; then
1686     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1687 else
1688   cat > conftest.$ac_ext <<EOF
1689 #line 1690 "configure"
1690 #include "confdefs.h"
1691 #include <stdio.h>
1692 main()
1693 {
1694   FILE *f=fopen("conftestval", "w");
1695   if (!f) exit(1);
1696   fprintf(f, "%d\n", sizeof(long long));
1697   exit(0);
1698 }
1699 EOF
1700 if { (eval echo configure:1701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1701 then
1702   ac_cv_sizeof_long_long=`cat conftestval`
1703 else
1704   echo "configure: failed program was:" >&5
1705   cat conftest.$ac_ext >&5
1706   rm -fr conftest*
1707   ac_cv_sizeof_long_long=0
1708 fi
1709 rm -fr conftest*
1710 fi
1711
1712 fi
1713 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
1714 cat >> confdefs.h <<EOF
1715 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
1716 EOF
1717
1718
1719
1720
1721 if test x$has_int16_t = "xyes" ; then
1722         SIZE16="int16_t"
1723 else
1724         case 2 in
1725                 $ac_cv_sizeof_short) SIZE16="short";;
1726                 $ac_cv_sizeof_int) SIZE16="int";;
1727         esac
1728 fi
1729
1730 if test x$has_int32_t = "xyes" ; then
1731         SIZE32="int32_t"
1732 else
1733         case 4 in
1734                 $ac_cv_sizeof_short) SIZE32="short";;
1735                 $ac_cv_sizeof_int) SIZE32="int";;
1736                 $ac_cv_sizeof_long) SIZE32="long";;
1737         esac
1738 fi
1739
1740 if test x$has_uint32_t = "xyes" ; then
1741         USIZE32="uint32_t"
1742 else
1743         if test x$has_u_int32_t = "xyes" ; then
1744                 USIZE32="u_int32_t"
1745         else
1746                 case 4 in
1747                         $ac_cv_sizeof_short) USIZE32="unsigned short";;
1748                         $ac_cv_sizeof_int) USIZE32="unsigned int";;
1749                         $ac_cv_sizeof_long) USIZE32="unsigned long";;
1750                 esac
1751         fi
1752 fi
1753
1754 if test x$has_int64_t = "xyes" ; then
1755         SIZE64="int64_t"
1756 else
1757 case 8 in
1758         $ac_cv_sizeof_int) SIZE64="int";;
1759         $ac_cv_sizeof_long) SIZE64="long";;
1760         $ac_cv_sizeof_long_long) SIZE64="long long";;
1761 esac
1762 fi
1763
1764 if test -z "$SIZE16"; then
1765         { echo "configure: error: No 16 bit type found on this platform!" 1>&2; exit 1; }
1766 fi
1767 if test -z "$SIZE32"; then
1768         { echo "configure: error: No 32 bit type found on this platform!" 1>&2; exit 1; }
1769 fi
1770 if test -z "$USIZE32"; then
1771         { echo "configure: error: No unsigned 32 bit type found on this platform!" 1>&2; exit 1; }
1772 fi
1773 if test -z "$SIZE64"; then
1774         echo "configure: warning: No 64 bit type found on this platform!" 1>&2
1775 fi
1776         
1777 #AC_CHECK_HEADER(alloca.h,AC_DEFINE(USE_ALLOCA_H),:)
1778 #AC_CHECK_HEADER(memory.h,AC_DEFINE(USE_MEMORY_H),:)
1779 # We no longer use config.h
1780 ac_safe=`echo "alloca.h" | sed 'y%./+-%__p_%'`
1781 echo $ac_n "checking for alloca.h""... $ac_c" 1>&6
1782 echo "configure:1783: checking for alloca.h" >&5
1783 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1784   echo $ac_n "(cached) $ac_c" 1>&6
1785 else
1786   cat > conftest.$ac_ext <<EOF
1787 #line 1788 "configure"
1788 #include "confdefs.h"
1789 #include <alloca.h>
1790 EOF
1791 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1792 { (eval echo configure:1793: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1793 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1794 if test -z "$ac_err"; then
1795   rm -rf conftest*
1796   eval "ac_cv_header_$ac_safe=yes"
1797 else
1798   echo "$ac_err" >&5
1799   echo "configure: failed program was:" >&5
1800   cat conftest.$ac_ext >&5
1801   rm -rf conftest*
1802   eval "ac_cv_header_$ac_safe=no"
1803 fi
1804 rm -f conftest*
1805 fi
1806 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1807   echo "$ac_t""yes" 1>&6
1808   CFLAGS="$CFLAGS -DUSE_ALLOCA_H"
1809 else
1810   echo "$ac_t""no" 1>&6
1811 :
1812 fi
1813
1814 ac_safe=`echo "memory.h" | sed 'y%./+-%__p_%'`
1815 echo $ac_n "checking for memory.h""... $ac_c" 1>&6
1816 echo "configure:1817: checking for memory.h" >&5
1817 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1818   echo $ac_n "(cached) $ac_c" 1>&6
1819 else
1820   cat > conftest.$ac_ext <<EOF
1821 #line 1822 "configure"
1822 #include "confdefs.h"
1823 #include <memory.h>
1824 EOF
1825 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1826 { (eval echo configure:1827: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1827 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1828 if test -z "$ac_err"; then
1829   rm -rf conftest*
1830   eval "ac_cv_header_$ac_safe=yes"
1831 else
1832   echo "$ac_err" >&5
1833   echo "configure: failed program was:" >&5
1834   cat conftest.$ac_ext >&5
1835   rm -rf conftest*
1836   eval "ac_cv_header_$ac_safe=no"
1837 fi
1838 rm -f conftest*
1839 fi
1840 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1841   echo "$ac_t""yes" 1>&6
1842   CFLAGS="$CFLAGS -DUSE_MEMORY_H"
1843 else
1844   echo "$ac_t""no" 1>&6
1845 :
1846 fi
1847
1848
1849 echo $ac_n "checking for working const""... $ac_c" 1>&6
1850 echo "configure:1851: checking for working const" >&5
1851 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1852   echo $ac_n "(cached) $ac_c" 1>&6
1853 else
1854   cat > conftest.$ac_ext <<EOF
1855 #line 1856 "configure"
1856 #include "confdefs.h"
1857
1858 int main() {
1859
1860 /* Ultrix mips cc rejects this.  */
1861 typedef int charset[2]; const charset x;
1862 /* SunOS 4.1.1 cc rejects this.  */
1863 char const *const *ccp;
1864 char **p;
1865 /* NEC SVR4.0.2 mips cc rejects this.  */
1866 struct point {int x, y;};
1867 static struct point const zero = {0,0};
1868 /* AIX XL C 1.02.0.0 rejects this.
1869    It does not let you subtract one const X* pointer from another in an arm
1870    of an if-expression whose if-part is not a constant expression */
1871 const char *g = "string";
1872 ccp = &g + (g ? g-g : 0);
1873 /* HPUX 7.0 cc rejects these. */
1874 ++ccp;
1875 p = (char**) ccp;
1876 ccp = (char const *const *) p;
1877 { /* SCO 3.2v4 cc rejects this.  */
1878   char *t;
1879   char const *s = 0 ? (char *) 0 : (char const *) 0;
1880
1881   *t++ = 0;
1882 }
1883 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
1884   int x[] = {25, 17};
1885   const int *foo = &x[0];
1886   ++foo;
1887 }
1888 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1889   typedef const int *iptr;
1890   iptr p = 0;
1891   ++p;
1892 }
1893 { /* AIX XL C 1.02.0.0 rejects this saying
1894      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1895   struct s { int j; const int *ap[3]; };
1896   struct s *b; b->j = 5;
1897 }
1898 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1899   const int foo = 10;
1900 }
1901
1902 ; return 0; }
1903 EOF
1904 if { (eval echo configure:1905: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1905   rm -rf conftest*
1906   ac_cv_c_const=yes
1907 else
1908   echo "configure: failed program was:" >&5
1909   cat conftest.$ac_ext >&5
1910   rm -rf conftest*
1911   ac_cv_c_const=no
1912 fi
1913 rm -f conftest*
1914 fi
1915
1916 echo "$ac_t""$ac_cv_c_const" 1>&6
1917 if test $ac_cv_c_const = no; then
1918   cat >> confdefs.h <<\EOF
1919 #define const 
1920 EOF
1921
1922 fi
1923
1924 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
1925 echo "configure:1926: checking whether time.h and sys/time.h may both be included" >&5
1926 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1927   echo $ac_n "(cached) $ac_c" 1>&6
1928 else
1929   cat > conftest.$ac_ext <<EOF
1930 #line 1931 "configure"
1931 #include "confdefs.h"
1932 #include <sys/types.h>
1933 #include <sys/time.h>
1934 #include <time.h>
1935 int main() {
1936 struct tm *tp;
1937 ; return 0; }
1938 EOF
1939 if { (eval echo configure:1940: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1940   rm -rf conftest*
1941   ac_cv_header_time=yes
1942 else
1943   echo "configure: failed program was:" >&5
1944   cat conftest.$ac_ext >&5
1945   rm -rf conftest*
1946   ac_cv_header_time=no
1947 fi
1948 rm -f conftest*
1949 fi
1950
1951 echo "$ac_t""$ac_cv_header_time" 1>&6
1952 if test $ac_cv_header_time = yes; then
1953   cat >> confdefs.h <<\EOF
1954 #define TIME_WITH_SYS_TIME 1
1955 EOF
1956
1957 fi
1958
1959 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
1960 echo "configure:1961: checking whether struct tm is in sys/time.h or time.h" >&5
1961 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
1962   echo $ac_n "(cached) $ac_c" 1>&6
1963 else
1964   cat > conftest.$ac_ext <<EOF
1965 #line 1966 "configure"
1966 #include "confdefs.h"
1967 #include <sys/types.h>
1968 #include <time.h>
1969 int main() {
1970 struct tm *tp; tp->tm_sec;
1971 ; return 0; }
1972 EOF
1973 if { (eval echo configure:1974: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1974   rm -rf conftest*
1975   ac_cv_struct_tm=time.h
1976 else
1977   echo "configure: failed program was:" >&5
1978   cat conftest.$ac_ext >&5
1979   rm -rf conftest*
1980   ac_cv_struct_tm=sys/time.h
1981 fi
1982 rm -f conftest*
1983 fi
1984
1985 echo "$ac_t""$ac_cv_struct_tm" 1>&6
1986 if test $ac_cv_struct_tm = sys/time.h; then
1987   cat >> confdefs.h <<\EOF
1988 #define TM_IN_SYS_TIME 1
1989 EOF
1990
1991 fi
1992
1993
1994 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1995 echo "configure:1996: checking whether ${MAKE-make} sets \${MAKE}" >&5
1996 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1997 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1998   echo $ac_n "(cached) $ac_c" 1>&6
1999 else
2000   cat > conftestmake <<\EOF
2001 all:
2002         @echo 'ac_maketemp="${MAKE}"'
2003 EOF
2004 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2005 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
2006 if test -n "$ac_maketemp"; then
2007   eval ac_cv_prog_make_${ac_make}_set=yes
2008 else
2009   eval ac_cv_prog_make_${ac_make}_set=no
2010 fi
2011 rm -f conftestmake
2012 fi
2013 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
2014   echo "$ac_t""yes" 1>&6
2015   SET_MAKE=
2016 else
2017   echo "$ac_t""no" 1>&6
2018   SET_MAKE="MAKE=${MAKE-make}"
2019 fi
2020
2021 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
2022 echo "configure:2023: checking for 8-bit clean memcmp" >&5
2023 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
2024   echo $ac_n "(cached) $ac_c" 1>&6
2025 else
2026   if test "$cross_compiling" = yes; then
2027   ac_cv_func_memcmp_clean=no
2028 else
2029   cat > conftest.$ac_ext <<EOF
2030 #line 2031 "configure"
2031 #include "confdefs.h"
2032
2033 main()
2034 {
2035   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
2036   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
2037 }
2038
2039 EOF
2040 if { (eval echo configure:2041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2041 then
2042   ac_cv_func_memcmp_clean=yes
2043 else
2044   echo "configure: failed program was:" >&5
2045   cat conftest.$ac_ext >&5
2046   rm -fr conftest*
2047   ac_cv_func_memcmp_clean=no
2048 fi
2049 rm -fr conftest*
2050 fi
2051
2052 fi
2053
2054 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
2055 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
2056
2057 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
2058 echo "configure:2059: checking return type of signal handlers" >&5
2059 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2060   echo $ac_n "(cached) $ac_c" 1>&6
2061 else
2062   cat > conftest.$ac_ext <<EOF
2063 #line 2064 "configure"
2064 #include "confdefs.h"
2065 #include <sys/types.h>
2066 #include <signal.h>
2067 #ifdef signal
2068 #undef signal
2069 #endif
2070 #ifdef __cplusplus
2071 extern "C" void (*signal (int, void (*)(int)))(int);
2072 #else
2073 void (*signal ()) ();
2074 #endif
2075
2076 int main() {
2077 int i;
2078 ; return 0; }
2079 EOF
2080 if { (eval echo configure:2081: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2081   rm -rf conftest*
2082   ac_cv_type_signal=void
2083 else
2084   echo "configure: failed program was:" >&5
2085   cat conftest.$ac_ext >&5
2086   rm -rf conftest*
2087   ac_cv_type_signal=int
2088 fi
2089 rm -f conftest*
2090 fi
2091
2092 echo "$ac_t""$ac_cv_type_signal" 1>&6
2093 cat >> confdefs.h <<EOF
2094 #define RETSIGTYPE $ac_cv_type_signal
2095 EOF
2096
2097
2098 for ac_func in gettimeofday select strcspn strerror strspn sigaction
2099 do
2100 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2101 echo "configure:2102: checking for $ac_func" >&5
2102 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2103   echo $ac_n "(cached) $ac_c" 1>&6
2104 else
2105   cat > conftest.$ac_ext <<EOF
2106 #line 2107 "configure"
2107 #include "confdefs.h"
2108 /* System header to define __stub macros and hopefully few prototypes,
2109     which can conflict with char $ac_func(); below.  */
2110 #include <assert.h>
2111 /* Override any gcc2 internal prototype to avoid an error.  */
2112 /* We use char because int might match the return type of a gcc2
2113     builtin and then its argument prototype would still apply.  */
2114 char $ac_func();
2115
2116 int main() {
2117
2118 /* The GNU C library defines this for functions which it implements
2119     to always fail with ENOSYS.  Some functions are actually named
2120     something starting with __ and the normal name is an alias.  */
2121 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2122 choke me
2123 #else
2124 $ac_func();
2125 #endif
2126
2127 ; return 0; }
2128 EOF
2129 if { (eval echo configure:2130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2130   rm -rf conftest*
2131   eval "ac_cv_func_$ac_func=yes"
2132 else
2133   echo "configure: failed program was:" >&5
2134   cat conftest.$ac_ext >&5
2135   rm -rf conftest*
2136   eval "ac_cv_func_$ac_func=no"
2137 fi
2138 rm -f conftest*
2139 fi
2140
2141 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2142   echo "$ac_t""yes" 1>&6
2143     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2144   cat >> confdefs.h <<EOF
2145 #define $ac_tr_func 1
2146 EOF
2147  
2148 else
2149   echo "$ac_t""no" 1>&6
2150 fi
2151 done
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164 #AC_SUBST(XOGG)
2165 #AC_SUBST(LIBGTKDIR)
2166
2167
2168 subdirs="vorbis-tools/libao"
2169
2170
2171 trap '' 1 2 15
2172 cat > confcache <<\EOF
2173 # This file is a shell script that caches the results of configure
2174 # tests run on this system so they can be shared between configure
2175 # scripts and configure runs.  It is not useful on other systems.
2176 # If it contains results you don't want to keep, you may remove or edit it.
2177 #
2178 # By default, configure uses ./config.cache as the cache file,
2179 # creating it if it does not exist already.  You can give configure
2180 # the --cache-file=FILE option to use a different cache file; that is
2181 # what configure does when it calls configure scripts in
2182 # subdirectories, so they share the cache.
2183 # Giving --cache-file=/dev/null disables caching, for debugging configure.
2184 # config.status only pays attention to the cache file if you give it the
2185 # --recheck option to rerun configure.
2186 #
2187 EOF
2188 # The following way of writing the cache mishandles newlines in values,
2189 # but we know of no workaround that is simple, portable, and efficient.
2190 # So, don't put newlines in cache variables' values.
2191 # Ultrix sh set writes to stderr and can't be redirected directly,
2192 # and sets the high bit in the cache file unless we assign to the vars.
2193 (set) 2>&1 |
2194   case `(ac_space=' '; set | grep ac_space) 2>&1` in
2195   *ac_space=\ *)
2196     # `set' does not quote correctly, so add quotes (double-quote substitution
2197     # turns \\\\ into \\, and sed turns \\ into \).
2198     sed -n \
2199       -e "s/'/'\\\\''/g" \
2200       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2201     ;;
2202   *)
2203     # `set' quotes correctly as required by POSIX, so do not add quotes.
2204     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2205     ;;
2206   esac >> confcache
2207 if cmp -s $cache_file confcache; then
2208   :
2209 else
2210   if test -w $cache_file; then
2211     echo "updating cache $cache_file"
2212     cat confcache > $cache_file
2213   else
2214     echo "not updating unwritable cache $cache_file"
2215   fi
2216 fi
2217 rm -f confcache
2218
2219 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2220
2221 test "x$prefix" = xNONE && prefix=$ac_default_prefix
2222 # Let make expand exec_prefix.
2223 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2224
2225 # Any assignment to VPATH causes Sun make to only execute
2226 # the first set of double-colon rules, so remove it if not needed.
2227 # If there is a colon in the path, we need to keep it.
2228 if test "x$srcdir" = x.; then
2229   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
2230 fi
2231
2232 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2233
2234 # Transform confdefs.h into DEFS.
2235 # Protect against shell expansion while executing Makefile rules.
2236 # Protect against Makefile macro expansion.
2237 cat > conftest.defs <<\EOF
2238 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
2239 s%[     `~#$^&*(){}\\|;'"<>?]%\\&%g
2240 s%\[%\\&%g
2241 s%\]%\\&%g
2242 s%\$%$$%g
2243 EOF
2244 DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
2245 rm -f conftest.defs
2246
2247
2248 # Without the "./", some shells look in PATH for config.status.
2249 : ${CONFIG_STATUS=./config.status}
2250
2251 echo creating $CONFIG_STATUS
2252 rm -f $CONFIG_STATUS
2253 cat > $CONFIG_STATUS <<EOF
2254 #! /bin/sh
2255 # Generated automatically by configure.
2256 # Run this file to recreate the current configuration.
2257 # This directory was configured as follows,
2258 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2259 #
2260 # $0 $ac_configure_args
2261 #
2262 # Compiler output produced by configure, useful for debugging
2263 # configure, is in ./config.log if it exists.
2264
2265 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2266 for ac_option
2267 do
2268   case "\$ac_option" in
2269   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2270     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2271     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2272   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2273     echo "$CONFIG_STATUS generated by autoconf version 2.13"
2274     exit 0 ;;
2275   -help | --help | --hel | --he | --h)
2276     echo "\$ac_cs_usage"; exit 0 ;;
2277   *) echo "\$ac_cs_usage"; exit 1 ;;
2278   esac
2279 done
2280
2281 ac_given_srcdir=$srcdir
2282
2283 trap 'rm -fr `echo "Makefile lib/Makefile examples/Makefile include/vorbis/os_types.h\
2284         vorbis-tools/Makefile\
2285         vq/Makefile huff/Makefile cmdline/Makefile xmms/Makefile kmpg/Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2286 EOF
2287 cat >> $CONFIG_STATUS <<EOF
2288
2289 # Protect against being on the right side of a sed subst in config.status.
2290 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2291  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2292 $ac_vpsub
2293 $extrasub
2294 s%@SHELL@%$SHELL%g
2295 s%@CFLAGS@%$CFLAGS%g
2296 s%@CPPFLAGS@%$CPPFLAGS%g
2297 s%@CXXFLAGS@%$CXXFLAGS%g
2298 s%@FFLAGS@%$FFLAGS%g
2299 s%@DEFS@%$DEFS%g
2300 s%@LDFLAGS@%$LDFLAGS%g
2301 s%@LIBS@%$LIBS%g
2302 s%@exec_prefix@%$exec_prefix%g
2303 s%@prefix@%$prefix%g
2304 s%@program_transform_name@%$program_transform_name%g
2305 s%@bindir@%$bindir%g
2306 s%@sbindir@%$sbindir%g
2307 s%@libexecdir@%$libexecdir%g
2308 s%@datadir@%$datadir%g
2309 s%@sysconfdir@%$sysconfdir%g
2310 s%@sharedstatedir@%$sharedstatedir%g
2311 s%@localstatedir@%$localstatedir%g
2312 s%@libdir@%$libdir%g
2313 s%@includedir@%$includedir%g
2314 s%@oldincludedir@%$oldincludedir%g
2315 s%@infodir@%$infodir%g
2316 s%@mandir@%$mandir%g
2317 s%@host@%$host%g
2318 s%@host_alias@%$host_alias%g
2319 s%@host_cpu@%$host_cpu%g
2320 s%@host_vendor@%$host_vendor%g
2321 s%@host_os@%$host_os%g
2322 s%@CC@%$CC%g
2323 s%@CPP@%$CPP%g
2324 s%@RANLIB@%$RANLIB%g
2325 s%@AR@%$AR%g
2326 s%@INSTALL@%$INSTALL%g
2327 s%@SET_MAKE@%$SET_MAKE%g
2328 s%@LIBOBJS@%$LIBOBJS%g
2329 s%@SIZE16@%$SIZE16%g
2330 s%@SIZE32@%$SIZE32%g
2331 s%@USIZE32@%$USIZE32%g
2332 s%@SIZE64@%$SIZE64%g
2333 s%@OPT@%$OPT%g
2334 s%@DEBUG@%$DEBUG%g
2335 s%@PROFILE@%$PROFILE%g
2336 s%@pthread_lib@%$pthread_lib%g
2337 s%@subdirs@%$subdirs%g
2338
2339 CEOF
2340 EOF
2341
2342 cat >> $CONFIG_STATUS <<\EOF
2343
2344 # Split the substitutions into bite-sized pieces for seds with
2345 # small command number limits, like on Digital OSF/1 and HP-UX.
2346 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
2347 ac_file=1 # Number of current file.
2348 ac_beg=1 # First line for current file.
2349 ac_end=$ac_max_sed_cmds # Line after last line for current file.
2350 ac_more_lines=:
2351 ac_sed_cmds=""
2352 while $ac_more_lines; do
2353   if test $ac_beg -gt 1; then
2354     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
2355   else
2356     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
2357   fi
2358   if test ! -s conftest.s$ac_file; then
2359     ac_more_lines=false
2360     rm -f conftest.s$ac_file
2361   else
2362     if test -z "$ac_sed_cmds"; then
2363       ac_sed_cmds="sed -f conftest.s$ac_file"
2364     else
2365       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
2366     fi
2367     ac_file=`expr $ac_file + 1`
2368     ac_beg=$ac_end
2369     ac_end=`expr $ac_end + $ac_max_sed_cmds`
2370   fi
2371 done
2372 if test -z "$ac_sed_cmds"; then
2373   ac_sed_cmds=cat
2374 fi
2375 EOF
2376
2377 cat >> $CONFIG_STATUS <<EOF
2378
2379 CONFIG_FILES=\${CONFIG_FILES-"Makefile lib/Makefile examples/Makefile include/vorbis/os_types.h\
2380         vorbis-tools/Makefile\
2381         vq/Makefile huff/Makefile cmdline/Makefile xmms/Makefile kmpg/Makefile"}
2382 EOF
2383 cat >> $CONFIG_STATUS <<\EOF
2384 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2385   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2386   case "$ac_file" in
2387   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2388        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2389   *) ac_file_in="${ac_file}.in" ;;
2390   esac
2391
2392   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
2393
2394   # Remove last slash and all that follows it.  Not all systems have dirname.
2395   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2396   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2397     # The file is in a subdirectory.
2398     test ! -d "$ac_dir" && mkdir "$ac_dir"
2399     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2400     # A "../" for each directory in $ac_dir_suffix.
2401     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2402   else
2403     ac_dir_suffix= ac_dots=
2404   fi
2405
2406   case "$ac_given_srcdir" in
2407   .)  srcdir=.
2408       if test -z "$ac_dots"; then top_srcdir=.
2409       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2410   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2411   *) # Relative path.
2412     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2413     top_srcdir="$ac_dots$ac_given_srcdir" ;;
2414   esac
2415
2416
2417   echo creating "$ac_file"
2418   rm -f "$ac_file"
2419   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2420   case "$ac_file" in
2421   *Makefile*) ac_comsub="1i\\
2422 # $configure_input" ;;
2423   *) ac_comsub= ;;
2424   esac
2425
2426   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2427   sed -e "$ac_comsub
2428 s%@configure_input@%$configure_input%g
2429 s%@srcdir@%$srcdir%g
2430 s%@top_srcdir@%$top_srcdir%g
2431 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
2432 fi; done
2433 rm -f conftest.s*
2434
2435 EOF
2436 cat >> $CONFIG_STATUS <<EOF
2437
2438 EOF
2439 cat >> $CONFIG_STATUS <<\EOF
2440
2441 exit 0
2442 EOF
2443 chmod +x $CONFIG_STATUS
2444 rm -fr confdefs* $ac_clean_files
2445 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2446
2447 if test "$no_recursion" != yes; then
2448
2449   # Remove --cache-file and --srcdir arguments so they do not pile up.
2450   ac_sub_configure_args=
2451   ac_prev=
2452   for ac_arg in $ac_configure_args; do
2453     if test -n "$ac_prev"; then
2454       ac_prev=
2455       continue
2456     fi
2457     case "$ac_arg" in
2458     -cache-file | --cache-file | --cache-fil | --cache-fi \
2459     | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
2460       ac_prev=cache_file ;;
2461     -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
2462     | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
2463       ;;
2464     -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
2465       ac_prev=srcdir ;;
2466     -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
2467       ;;
2468     *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
2469     esac
2470   done
2471
2472   for ac_config_dir in vorbis-tools/libao; do
2473
2474     # Do not complain, so a configure script can configure whichever
2475     # parts of a large source tree are present.
2476     if test ! -d $srcdir/$ac_config_dir; then
2477       continue
2478     fi
2479
2480     echo configuring in $ac_config_dir
2481
2482     case "$srcdir" in
2483     .) ;;
2484     *)
2485       if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
2486       else
2487         { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
2488       fi
2489       ;;
2490     esac
2491
2492     ac_popdir=`pwd`
2493     cd $ac_config_dir
2494
2495       # A "../" for each directory in /$ac_config_dir.
2496       ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
2497
2498     case "$srcdir" in
2499     .) # No --srcdir option.  We are building in place.
2500       ac_sub_srcdir=$srcdir ;;
2501     /*) # Absolute path.
2502       ac_sub_srcdir=$srcdir/$ac_config_dir ;;
2503     *) # Relative path.
2504       ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
2505     esac
2506
2507     # Check for guested configure; otherwise get Cygnus style configure.
2508     if test -f $ac_sub_srcdir/configure; then
2509       ac_sub_configure=$ac_sub_srcdir/configure
2510     elif test -f $ac_sub_srcdir/configure.in; then
2511       ac_sub_configure=$ac_configure
2512     else
2513       echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
2514       ac_sub_configure=
2515     fi
2516
2517     # The recursion is here.
2518     if test -n "$ac_sub_configure"; then
2519
2520       # Make the cache file name correct relative to the subdirectory.
2521       case "$cache_file" in
2522       /*) ac_sub_cache_file=$cache_file ;;
2523       *) # Relative path.
2524         ac_sub_cache_file="$ac_dots$cache_file" ;;
2525       esac
2526
2527       echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
2528       # The eval makes quoting arguments work.
2529       if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
2530       then :
2531       else
2532         { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
2533       fi
2534     fi
2535
2536     cd $ac_popdir
2537   done
2538 fi
2539
2540