]> git.sesse.net Git - vlc/blob - configure
50fa9337652fbdad2dff516cfd67b406f2b859a9
[vlc] / 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 ac_help="$ac_help
15   --disable-ppro          Disable PentiumPro optimizations (default enabled for x86)"
16 ac_help="$ac_help
17   --disable-mmx           Disable MMX optimizations (default enabled for x86)"
18 ac_help="$ac_help
19   --enable-debug          Enable debug mode (default disabled)"
20 ac_help="$ac_help
21   --enable-stats          Enable printing of statistics (default disabled)"
22 ac_help="$ac_help
23   --disable-optimizations Disable compiler optimizations (default enabled)"
24 ac_help="$ac_help
25   --disable-dummy         dummy audio and video support (default enabled)"
26 ac_help="$ac_help
27   --disable-dsp           Linux /dev/dsp support (default enabled)"
28 ac_help="$ac_help
29   --enable-esd            Esound library support (default disabled)"
30 ac_help="$ac_help
31   --enable-fb             Linux framebuffer support (default disabled)"
32 ac_help="$ac_help
33   --with-ggi[=name]       GGI support (default disabled)"
34 ac_help="$ac_help
35   --with-sdl[=name]       SDL support (default disabled)"
36 ac_help="$ac_help
37   --with-glide[=name]     Glide (3dfx) support (default disabled)"
38 ac_help="$ac_help
39   --enable-null           Null plugin (default disabled)"
40 ac_help="$ac_help
41   --enable-gnome          Gnome support (default disabled)"
42 ac_help="$ac_help
43   --disable-x11           X11 support (default enabled)"
44 ac_help="$ac_help
45   --enable-alsa           Alsa sound drivers support (Only for linux) (default disabled)"
46
47 # Initialize some variables set by options.
48 # The variables have the same names as the options, with
49 # dashes changed to underlines.
50 build=NONE
51 cache_file=./config.cache
52 exec_prefix=NONE
53 host=NONE
54 no_create=
55 nonopt=NONE
56 no_recursion=
57 prefix=NONE
58 program_prefix=NONE
59 program_suffix=NONE
60 program_transform_name=s,x,x,
61 silent=
62 site=
63 srcdir=
64 target=NONE
65 verbose=
66 x_includes=NONE
67 x_libraries=NONE
68 bindir='${exec_prefix}/bin'
69 sbindir='${exec_prefix}/sbin'
70 libexecdir='${exec_prefix}/libexec'
71 datadir='${prefix}/share'
72 sysconfdir='${prefix}/etc'
73 sharedstatedir='${prefix}/com'
74 localstatedir='${prefix}/var'
75 libdir='${exec_prefix}/lib'
76 includedir='${prefix}/include'
77 oldincludedir='/usr/include'
78 infodir='${prefix}/info'
79 mandir='${prefix}/man'
80
81 # Initialize some other variables.
82 subdirs=
83 MFLAGS= MAKEFLAGS=
84 SHELL=${CONFIG_SHELL-/bin/sh}
85 # Maximum number of lines to put in a shell here document.
86 ac_max_here_lines=12
87
88 ac_prev=
89 for ac_option
90 do
91
92   # If the previous option needs an argument, assign it.
93   if test -n "$ac_prev"; then
94     eval "$ac_prev=\$ac_option"
95     ac_prev=
96     continue
97   fi
98
99   case "$ac_option" in
100   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
101   *) ac_optarg= ;;
102   esac
103
104   # Accept the important Cygnus configure options, so we can diagnose typos.
105
106   case "$ac_option" in
107
108   -bindir | --bindir | --bindi | --bind | --bin | --bi)
109     ac_prev=bindir ;;
110   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
111     bindir="$ac_optarg" ;;
112
113   -build | --build | --buil | --bui | --bu)
114     ac_prev=build ;;
115   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
116     build="$ac_optarg" ;;
117
118   -cache-file | --cache-file | --cache-fil | --cache-fi \
119   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
120     ac_prev=cache_file ;;
121   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
122   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
123     cache_file="$ac_optarg" ;;
124
125   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
126     ac_prev=datadir ;;
127   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
128   | --da=*)
129     datadir="$ac_optarg" ;;
130
131   -disable-* | --disable-*)
132     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
133     # Reject names that are not valid shell variable names.
134     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
135       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
136     fi
137     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
138     eval "enable_${ac_feature}=no" ;;
139
140   -enable-* | --enable-*)
141     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
142     # Reject names that are not valid shell variable names.
143     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
144       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
145     fi
146     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
147     case "$ac_option" in
148       *=*) ;;
149       *) ac_optarg=yes ;;
150     esac
151     eval "enable_${ac_feature}='$ac_optarg'" ;;
152
153   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
154   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
155   | --exec | --exe | --ex)
156     ac_prev=exec_prefix ;;
157   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
158   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
159   | --exec=* | --exe=* | --ex=*)
160     exec_prefix="$ac_optarg" ;;
161
162   -gas | --gas | --ga | --g)
163     # Obsolete; use --with-gas.
164     with_gas=yes ;;
165
166   -help | --help | --hel | --he)
167     # Omit some internal or obsolete options to make the list less imposing.
168     # This message is too long to be a string in the A/UX 3.1 sh.
169     cat << EOF
170 Usage: configure [options] [host]
171 Options: [defaults in brackets after descriptions]
172 Configuration:
173   --cache-file=FILE       cache test results in FILE
174   --help                  print this message
175   --no-create             do not create output files
176   --quiet, --silent       do not print \`checking...' messages
177   --version               print the version of autoconf that created configure
178 Directory and file names:
179   --prefix=PREFIX         install architecture-independent files in PREFIX
180                           [$ac_default_prefix]
181   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
182                           [same as prefix]
183   --bindir=DIR            user executables in DIR [EPREFIX/bin]
184   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
185   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
186   --datadir=DIR           read-only architecture-independent data in DIR
187                           [PREFIX/share]
188   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
189   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
190                           [PREFIX/com]
191   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
192   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
193   --includedir=DIR        C header files in DIR [PREFIX/include]
194   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
195   --infodir=DIR           info documentation in DIR [PREFIX/info]
196   --mandir=DIR            man documentation in DIR [PREFIX/man]
197   --srcdir=DIR            find the sources in DIR [configure dir or ..]
198   --program-prefix=PREFIX prepend PREFIX to installed program names
199   --program-suffix=SUFFIX append SUFFIX to installed program names
200   --program-transform-name=PROGRAM
201                           run sed PROGRAM on installed program names
202 EOF
203     cat << EOF
204 Host type:
205   --build=BUILD           configure for building on BUILD [BUILD=HOST]
206   --host=HOST             configure for HOST [guessed]
207   --target=TARGET         configure for TARGET [TARGET=HOST]
208 Features and packages:
209   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
210   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
211   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
212   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
213   --x-includes=DIR        X include files are in DIR
214   --x-libraries=DIR       X library files are in DIR
215 EOF
216     if test -n "$ac_help"; then
217       echo "--enable and --with options recognized:$ac_help"
218     fi
219     exit 0 ;;
220
221   -host | --host | --hos | --ho)
222     ac_prev=host ;;
223   -host=* | --host=* | --hos=* | --ho=*)
224     host="$ac_optarg" ;;
225
226   -includedir | --includedir | --includedi | --included | --include \
227   | --includ | --inclu | --incl | --inc)
228     ac_prev=includedir ;;
229   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
230   | --includ=* | --inclu=* | --incl=* | --inc=*)
231     includedir="$ac_optarg" ;;
232
233   -infodir | --infodir | --infodi | --infod | --info | --inf)
234     ac_prev=infodir ;;
235   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
236     infodir="$ac_optarg" ;;
237
238   -libdir | --libdir | --libdi | --libd)
239     ac_prev=libdir ;;
240   -libdir=* | --libdir=* | --libdi=* | --libd=*)
241     libdir="$ac_optarg" ;;
242
243   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
244   | --libexe | --libex | --libe)
245     ac_prev=libexecdir ;;
246   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
247   | --libexe=* | --libex=* | --libe=*)
248     libexecdir="$ac_optarg" ;;
249
250   -localstatedir | --localstatedir | --localstatedi | --localstated \
251   | --localstate | --localstat | --localsta | --localst \
252   | --locals | --local | --loca | --loc | --lo)
253     ac_prev=localstatedir ;;
254   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
255   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
256   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
257     localstatedir="$ac_optarg" ;;
258
259   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
260     ac_prev=mandir ;;
261   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
262     mandir="$ac_optarg" ;;
263
264   -nfp | --nfp | --nf)
265     # Obsolete; use --without-fp.
266     with_fp=no ;;
267
268   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
269   | --no-cr | --no-c)
270     no_create=yes ;;
271
272   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
273   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
274     no_recursion=yes ;;
275
276   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
277   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
278   | --oldin | --oldi | --old | --ol | --o)
279     ac_prev=oldincludedir ;;
280   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
281   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
282   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
283     oldincludedir="$ac_optarg" ;;
284
285   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
286     ac_prev=prefix ;;
287   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
288     prefix="$ac_optarg" ;;
289
290   -program-prefix | --program-prefix | --program-prefi | --program-pref \
291   | --program-pre | --program-pr | --program-p)
292     ac_prev=program_prefix ;;
293   -program-prefix=* | --program-prefix=* | --program-prefi=* \
294   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
295     program_prefix="$ac_optarg" ;;
296
297   -program-suffix | --program-suffix | --program-suffi | --program-suff \
298   | --program-suf | --program-su | --program-s)
299     ac_prev=program_suffix ;;
300   -program-suffix=* | --program-suffix=* | --program-suffi=* \
301   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
302     program_suffix="$ac_optarg" ;;
303
304   -program-transform-name | --program-transform-name \
305   | --program-transform-nam | --program-transform-na \
306   | --program-transform-n | --program-transform- \
307   | --program-transform | --program-transfor \
308   | --program-transfo | --program-transf \
309   | --program-trans | --program-tran \
310   | --progr-tra | --program-tr | --program-t)
311     ac_prev=program_transform_name ;;
312   -program-transform-name=* | --program-transform-name=* \
313   | --program-transform-nam=* | --program-transform-na=* \
314   | --program-transform-n=* | --program-transform-=* \
315   | --program-transform=* | --program-transfor=* \
316   | --program-transfo=* | --program-transf=* \
317   | --program-trans=* | --program-tran=* \
318   | --progr-tra=* | --program-tr=* | --program-t=*)
319     program_transform_name="$ac_optarg" ;;
320
321   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
322   | -silent | --silent | --silen | --sile | --sil)
323     silent=yes ;;
324
325   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
326     ac_prev=sbindir ;;
327   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
328   | --sbi=* | --sb=*)
329     sbindir="$ac_optarg" ;;
330
331   -sharedstatedir | --sharedstatedir | --sharedstatedi \
332   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
333   | --sharedst | --shareds | --shared | --share | --shar \
334   | --sha | --sh)
335     ac_prev=sharedstatedir ;;
336   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
337   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
338   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
339   | --sha=* | --sh=*)
340     sharedstatedir="$ac_optarg" ;;
341
342   -site | --site | --sit)
343     ac_prev=site ;;
344   -site=* | --site=* | --sit=*)
345     site="$ac_optarg" ;;
346
347   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
348     ac_prev=srcdir ;;
349   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
350     srcdir="$ac_optarg" ;;
351
352   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
353   | --syscon | --sysco | --sysc | --sys | --sy)
354     ac_prev=sysconfdir ;;
355   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
356   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
357     sysconfdir="$ac_optarg" ;;
358
359   -target | --target | --targe | --targ | --tar | --ta | --t)
360     ac_prev=target ;;
361   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
362     target="$ac_optarg" ;;
363
364   -v | -verbose | --verbose | --verbos | --verbo | --verb)
365     verbose=yes ;;
366
367   -version | --version | --versio | --versi | --vers)
368     echo "configure generated by autoconf version 2.13"
369     exit 0 ;;
370
371   -with-* | --with-*)
372     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
373     # Reject names that are not valid shell variable names.
374     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
375       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
376     fi
377     ac_package=`echo $ac_package| sed 's/-/_/g'`
378     case "$ac_option" in
379       *=*) ;;
380       *) ac_optarg=yes ;;
381     esac
382     eval "with_${ac_package}='$ac_optarg'" ;;
383
384   -without-* | --without-*)
385     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
386     # Reject names that are not valid shell variable names.
387     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
388       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
389     fi
390     ac_package=`echo $ac_package| sed 's/-/_/g'`
391     eval "with_${ac_package}=no" ;;
392
393   --x)
394     # Obsolete; use --with-x.
395     with_x=yes ;;
396
397   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
398   | --x-incl | --x-inc | --x-in | --x-i)
399     ac_prev=x_includes ;;
400   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
401   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
402     x_includes="$ac_optarg" ;;
403
404   -x-libraries | --x-libraries | --x-librarie | --x-librari \
405   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
406     ac_prev=x_libraries ;;
407   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
408   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
409     x_libraries="$ac_optarg" ;;
410
411   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
412     ;;
413
414   *)
415     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
416       echo "configure: warning: $ac_option: invalid host type" 1>&2
417     fi
418     if test "x$nonopt" != xNONE; then
419       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
420     fi
421     nonopt="$ac_option"
422     ;;
423
424   esac
425 done
426
427 if test -n "$ac_prev"; then
428   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
429 fi
430
431 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
432
433 # File descriptor usage:
434 # 0 standard input
435 # 1 file creation
436 # 2 errors and warnings
437 # 3 some systems may open it to /dev/tty
438 # 4 used on the Kubota Titan
439 # 6 checking for... messages and results
440 # 5 compiler messages saved in config.log
441 if test "$silent" = yes; then
442   exec 6>/dev/null
443 else
444   exec 6>&1
445 fi
446 exec 5>./config.log
447
448 echo "\
449 This file contains any messages produced by compilers while
450 running configure, to aid debugging if configure makes a mistake.
451 " 1>&5
452
453 # Strip out --no-create and --no-recursion so they do not pile up.
454 # Also quote any args containing shell metacharacters.
455 ac_configure_args=
456 for ac_arg
457 do
458   case "$ac_arg" in
459   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
460   | --no-cr | --no-c) ;;
461   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
462   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
463   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
464   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
465   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
466   esac
467 done
468
469 # NLS nuisances.
470 # Only set these to C if already set.  These must not be set unconditionally
471 # because not all systems understand e.g. LANG=C (notably SCO).
472 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
473 # Non-C LC_CTYPE values break the ctype check.
474 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
475 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
476 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
477 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
478
479 # confdefs.h avoids OS command line length limits that DEFS can exceed.
480 rm -rf conftest* confdefs.h
481 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
482 echo > confdefs.h
483
484 # A filename unique to this package, relative to the directory that
485 # configure is in, which we can look for to find out if srcdir is correct.
486 ac_unique_file=src/interface/main.c
487
488 # Find the source files, if location was not specified.
489 if test -z "$srcdir"; then
490   ac_srcdir_defaulted=yes
491   # Try the directory containing this script, then its parent.
492   ac_prog=$0
493   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
494   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
495   srcdir=$ac_confdir
496   if test ! -r $srcdir/$ac_unique_file; then
497     srcdir=..
498   fi
499 else
500   ac_srcdir_defaulted=no
501 fi
502 if test ! -r $srcdir/$ac_unique_file; then
503   if test "$ac_srcdir_defaulted" = yes; then
504     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
505   else
506     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
507   fi
508 fi
509 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
510
511 # Prefer explicitly selected file to automatically selected ones.
512 if test -z "$CONFIG_SITE"; then
513   if test "x$prefix" != xNONE; then
514     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
515   else
516     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
517   fi
518 fi
519 for ac_site_file in $CONFIG_SITE; do
520   if test -r "$ac_site_file"; then
521     echo "loading site script $ac_site_file"
522     . "$ac_site_file"
523   fi
524 done
525
526 if test -r "$cache_file"; then
527   echo "loading cache $cache_file"
528   . $cache_file
529 else
530   echo "creating cache $cache_file"
531   > $cache_file
532 fi
533
534 ac_ext=c
535 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
536 ac_cpp='$CPP $CPPFLAGS'
537 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
538 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
539 cross_compiling=$ac_cv_prog_cc_cross
540
541 ac_exeext=
542 ac_objext=o
543 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
544   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
545   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
546     ac_n= ac_c='
547 ' ac_t='        '
548   else
549     ac_n=-n ac_c= ac_t=
550   fi
551 else
552   ac_n= ac_c='\c' ac_t=
553 fi
554
555
556
557
558 ac_aux_dir=
559 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
560   if test -f $ac_dir/install-sh; then
561     ac_aux_dir=$ac_dir
562     ac_install_sh="$ac_aux_dir/install-sh -c"
563     break
564   elif test -f $ac_dir/install.sh; then
565     ac_aux_dir=$ac_dir
566     ac_install_sh="$ac_aux_dir/install.sh -c"
567     break
568   fi
569 done
570 if test -z "$ac_aux_dir"; then
571   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
572 fi
573 ac_config_guess=$ac_aux_dir/config.guess
574 ac_config_sub=$ac_aux_dir/config.sub
575 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
576
577
578 # Make sure we can run config.sub.
579 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
580 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
581 fi
582
583 echo $ac_n "checking host system type""... $ac_c" 1>&6
584 echo "configure:585: checking host system type" >&5
585
586 host_alias=$host
587 case "$host_alias" in
588 NONE)
589   case $nonopt in
590   NONE)
591     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
592     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
593     fi ;;
594   *) host_alias=$nonopt ;;
595   esac ;;
596 esac
597
598 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
599 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
600 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
601 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
602 echo "$ac_t""$host" 1>&6
603
604
605 VLC_VERSION=0.1.99i
606
607 VLC_CODENAME=Onatopp
608
609
610 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
611 echo "configure:612: checking whether ${MAKE-make} sets \${MAKE}" >&5
612 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
613 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
614   echo $ac_n "(cached) $ac_c" 1>&6
615 else
616   cat > conftestmake <<\EOF
617 all:
618         @echo 'ac_maketemp="${MAKE}"'
619 EOF
620 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
621 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
622 if test -n "$ac_maketemp"; then
623   eval ac_cv_prog_make_${ac_make}_set=yes
624 else
625   eval ac_cv_prog_make_${ac_make}_set=no
626 fi
627 rm -f conftestmake
628 fi
629 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
630   echo "$ac_t""yes" 1>&6
631   SET_MAKE=
632 else
633   echo "$ac_t""no" 1>&6
634   SET_MAKE="MAKE=${MAKE-make}"
635 fi
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 if test -z "$CPP"; then
862   echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
863 echo "configure:864: checking how to run the C preprocessor" >&5
864 # On Suns, sometimes $CPP names a directory.
865 if test -n "$CPP" && test -d "$CPP"; then
866   CPP=
867 fi
868 if test -z "$CPP"; then
869 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
870   echo $ac_n "(cached) $ac_c" 1>&6
871 else
872     # This must be in double quotes, not single quotes, because CPP may get
873   # substituted into the Makefile and "${CC-cc}" will confuse make.
874   CPP="${CC-cc} -E"
875   # On the NeXT, cc -E runs the code through the compiler's parser,
876   # not just through cpp.
877   cat > conftest.$ac_ext <<EOF
878 #line 879 "configure"
879 #include "confdefs.h"
880 #include <assert.h>
881 Syntax Error
882 EOF
883 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
884 { (eval echo configure:885: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
885 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
886 if test -z "$ac_err"; then
887   :
888 else
889   echo "$ac_err" >&5
890   echo "configure: failed program was:" >&5
891   cat conftest.$ac_ext >&5
892   rm -rf conftest*
893   CPP="${CC-cc} -E -traditional-cpp"
894   cat > conftest.$ac_ext <<EOF
895 #line 896 "configure"
896 #include "confdefs.h"
897 #include <assert.h>
898 Syntax Error
899 EOF
900 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
901 { (eval echo configure:902: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
902 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
903 if test -z "$ac_err"; then
904   :
905 else
906   echo "$ac_err" >&5
907   echo "configure: failed program was:" >&5
908   cat conftest.$ac_ext >&5
909   rm -rf conftest*
910   CPP="${CC-cc} -nologo -E"
911   cat > conftest.$ac_ext <<EOF
912 #line 913 "configure"
913 #include "confdefs.h"
914 #include <assert.h>
915 Syntax Error
916 EOF
917 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
918 { (eval echo configure:919: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
919 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
920 if test -z "$ac_err"; then
921   :
922 else
923   echo "$ac_err" >&5
924   echo "configure: failed program was:" >&5
925   cat conftest.$ac_ext >&5
926   rm -rf conftest*
927   CPP=/lib/cpp
928 fi
929 rm -f conftest*
930 fi
931 rm -f conftest*
932 fi
933 rm -f conftest*
934   ac_cv_prog_CPP="$CPP"
935 fi
936   CPP="$ac_cv_prog_CPP"
937 else
938   ac_cv_prog_CPP="$CPP"
939 fi
940 echo "$ac_t""$CPP" 1>&6
941
942 fi
943
944 # Find a good install program.  We prefer a C program (faster),
945 # so one script is as good as another.  But avoid the broken or
946 # incompatible versions:
947 # SysV /etc/install, /usr/sbin/install
948 # SunOS /usr/etc/install
949 # IRIX /sbin/install
950 # AIX /bin/install
951 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
952 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
953 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
954 # ./install, which can be erroneously created by make from ./install.sh.
955 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
956 echo "configure:957: checking for a BSD compatible install" >&5
957 if test -z "$INSTALL"; then
958 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
959   echo $ac_n "(cached) $ac_c" 1>&6
960 else
961     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
962   for ac_dir in $PATH; do
963     # Account for people who put trailing slashes in PATH elements.
964     case "$ac_dir/" in
965     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
966     *)
967       # OSF1 and SCO ODT 3.0 have their own names for install.
968       # Don't use installbsd from OSF since it installs stuff as root
969       # by default.
970       for ac_prog in ginstall scoinst install; do
971         if test -f $ac_dir/$ac_prog; then
972           if test $ac_prog = install &&
973             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
974             # AIX install.  It has an incompatible calling convention.
975             :
976           else
977             ac_cv_path_install="$ac_dir/$ac_prog -c"
978             break 2
979           fi
980         fi
981       done
982       ;;
983     esac
984   done
985   IFS="$ac_save_IFS"
986
987 fi
988   if test "${ac_cv_path_install+set}" = set; then
989     INSTALL="$ac_cv_path_install"
990   else
991     # As a last resort, use the slow shell script.  We don't cache a
992     # path for INSTALL within a source directory, because that will
993     # break other packages using the cache if that directory is
994     # removed, or if the path is relative.
995     INSTALL="$ac_install_sh"
996   fi
997 fi
998 echo "$ac_t""$INSTALL" 1>&6
999
1000 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1001 # It thinks the first close brace ends the variable substitution.
1002 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1003
1004 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1005
1006 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1007
1008
1009 echo $ac_n "checking for working const""... $ac_c" 1>&6
1010 echo "configure:1011: checking for working const" >&5
1011 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1012   echo $ac_n "(cached) $ac_c" 1>&6
1013 else
1014   cat > conftest.$ac_ext <<EOF
1015 #line 1016 "configure"
1016 #include "confdefs.h"
1017
1018 int main() {
1019
1020 /* Ultrix mips cc rejects this.  */
1021 typedef int charset[2]; const charset x = {0,0};
1022 /* SunOS 4.1.1 cc rejects this.  */
1023 char const *const *ccp;
1024 char **p;
1025 /* NEC SVR4.0.2 mips cc rejects this.  */
1026 struct point {int x, y;};
1027 static struct point const zero = {0,0};
1028 /* AIX XL C 1.02.0.0 rejects this.
1029    It does not let you subtract one const X* pointer from another in an arm
1030    of an if-expression whose if-part is not a constant expression */
1031 const char *g = "string";
1032 ccp = &g + (g ? g-g : 0);
1033 /* HPUX 7.0 cc rejects these. */
1034 ++ccp;
1035 p = (char**) ccp;
1036 ccp = (char const *const *) p;
1037 { /* SCO 3.2v4 cc rejects this.  */
1038   char *t;
1039   char const *s = 0 ? (char *) 0 : (char const *) 0;
1040
1041   *t++ = 0;
1042 }
1043 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
1044   int x[] = {25, 17};
1045   const int *foo = &x[0];
1046   ++foo;
1047 }
1048 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1049   typedef const int *iptr;
1050   iptr p = 0;
1051   ++p;
1052 }
1053 { /* AIX XL C 1.02.0.0 rejects this saying
1054      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1055   struct s { int j; const int *ap[3]; };
1056   struct s *b; b->j = 5;
1057 }
1058 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1059   const int foo = 10;
1060 }
1061
1062 ; return 0; }
1063 EOF
1064 if { (eval echo configure:1065: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1065   rm -rf conftest*
1066   ac_cv_c_const=yes
1067 else
1068   echo "configure: failed program was:" >&5
1069   cat conftest.$ac_ext >&5
1070   rm -rf conftest*
1071   ac_cv_c_const=no
1072 fi
1073 rm -f conftest*
1074 fi
1075
1076 echo "$ac_t""$ac_cv_c_const" 1>&6
1077 if test $ac_cv_c_const = no; then
1078   cat >> confdefs.h <<\EOF
1079 #define const 
1080 EOF
1081
1082 fi
1083
1084 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
1085 echo "configure:1086: checking whether byte ordering is bigendian" >&5
1086 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
1087   echo $ac_n "(cached) $ac_c" 1>&6
1088 else
1089   ac_cv_c_bigendian=unknown
1090 # See if sys/param.h defines the BYTE_ORDER macro.
1091 cat > conftest.$ac_ext <<EOF
1092 #line 1093 "configure"
1093 #include "confdefs.h"
1094 #include <sys/types.h>
1095 #include <sys/param.h>
1096 int main() {
1097
1098 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
1099  bogus endian macros
1100 #endif
1101 ; return 0; }
1102 EOF
1103 if { (eval echo configure:1104: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1104   rm -rf conftest*
1105   # It does; now see whether it defined to BIG_ENDIAN or not.
1106 cat > conftest.$ac_ext <<EOF
1107 #line 1108 "configure"
1108 #include "confdefs.h"
1109 #include <sys/types.h>
1110 #include <sys/param.h>
1111 int main() {
1112
1113 #if BYTE_ORDER != BIG_ENDIAN
1114  not big endian
1115 #endif
1116 ; return 0; }
1117 EOF
1118 if { (eval echo configure:1119: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1119   rm -rf conftest*
1120   ac_cv_c_bigendian=yes
1121 else
1122   echo "configure: failed program was:" >&5
1123   cat conftest.$ac_ext >&5
1124   rm -rf conftest*
1125   ac_cv_c_bigendian=no
1126 fi
1127 rm -f conftest*
1128 else
1129   echo "configure: failed program was:" >&5
1130   cat conftest.$ac_ext >&5
1131 fi
1132 rm -f conftest*
1133 if test $ac_cv_c_bigendian = unknown; then
1134 if test "$cross_compiling" = yes; then
1135     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1136 else
1137   cat > conftest.$ac_ext <<EOF
1138 #line 1139 "configure"
1139 #include "confdefs.h"
1140 main () {
1141   /* Are we little or big endian?  From Harbison&Steele.  */
1142   union
1143   {
1144     long l;
1145     char c[sizeof (long)];
1146   } u;
1147   u.l = 1;
1148   exit (u.c[sizeof (long) - 1] == 1);
1149 }
1150 EOF
1151 if { (eval echo configure:1152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1152 then
1153   ac_cv_c_bigendian=no
1154 else
1155   echo "configure: failed program was:" >&5
1156   cat conftest.$ac_ext >&5
1157   rm -fr conftest*
1158   ac_cv_c_bigendian=yes
1159 fi
1160 rm -fr conftest*
1161 fi
1162
1163 fi
1164 fi
1165
1166 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
1167 if test $ac_cv_c_bigendian = yes; then
1168   cat >> confdefs.h <<\EOF
1169 #define WORDS_BIGENDIAN 1
1170 EOF
1171
1172 fi
1173
1174
1175 for ac_func in gettimeofday select strerror strtod strtol
1176 do
1177 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1178 echo "configure:1179: checking for $ac_func" >&5
1179 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1180   echo $ac_n "(cached) $ac_c" 1>&6
1181 else
1182   cat > conftest.$ac_ext <<EOF
1183 #line 1184 "configure"
1184 #include "confdefs.h"
1185 /* System header to define __stub macros and hopefully few prototypes,
1186     which can conflict with char $ac_func(); below.  */
1187 #include <assert.h>
1188 /* Override any gcc2 internal prototype to avoid an error.  */
1189 /* We use char because int might match the return type of a gcc2
1190     builtin and then its argument prototype would still apply.  */
1191 char $ac_func();
1192
1193 int main() {
1194
1195 /* The GNU C library defines this for functions which it implements
1196     to always fail with ENOSYS.  Some functions are actually named
1197     something starting with __ and the normal name is an alias.  */
1198 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1199 choke me
1200 #else
1201 $ac_func();
1202 #endif
1203
1204 ; return 0; }
1205 EOF
1206 if { (eval echo configure:1207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1207   rm -rf conftest*
1208   eval "ac_cv_func_$ac_func=yes"
1209 else
1210   echo "configure: failed program was:" >&5
1211   cat conftest.$ac_ext >&5
1212   rm -rf conftest*
1213   eval "ac_cv_func_$ac_func=no"
1214 fi
1215 rm -f conftest*
1216 fi
1217
1218 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1219   echo "$ac_t""yes" 1>&6
1220     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1221   cat >> confdefs.h <<EOF
1222 #define $ac_tr_func 1
1223 EOF
1224  
1225 else
1226   echo "$ac_t""no" 1>&6
1227 fi
1228 done
1229
1230 for ac_func in setenv putenv
1231 do
1232 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1233 echo "configure:1234: checking for $ac_func" >&5
1234 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1235   echo $ac_n "(cached) $ac_c" 1>&6
1236 else
1237   cat > conftest.$ac_ext <<EOF
1238 #line 1239 "configure"
1239 #include "confdefs.h"
1240 /* System header to define __stub macros and hopefully few prototypes,
1241     which can conflict with char $ac_func(); below.  */
1242 #include <assert.h>
1243 /* Override any gcc2 internal prototype to avoid an error.  */
1244 /* We use char because int might match the return type of a gcc2
1245     builtin and then its argument prototype would still apply.  */
1246 char $ac_func();
1247
1248 int main() {
1249
1250 /* The GNU C library defines this for functions which it implements
1251     to always fail with ENOSYS.  Some functions are actually named
1252     something starting with __ and the normal name is an alias.  */
1253 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1254 choke me
1255 #else
1256 $ac_func();
1257 #endif
1258
1259 ; return 0; }
1260 EOF
1261 if { (eval echo configure:1262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1262   rm -rf conftest*
1263   eval "ac_cv_func_$ac_func=yes"
1264 else
1265   echo "configure: failed program was:" >&5
1266   cat conftest.$ac_ext >&5
1267   rm -rf conftest*
1268   eval "ac_cv_func_$ac_func=no"
1269 fi
1270 rm -f conftest*
1271 fi
1272
1273 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1274   echo "$ac_t""yes" 1>&6
1275     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1276   cat >> confdefs.h <<EOF
1277 #define $ac_tr_func 1
1278 EOF
1279  
1280 else
1281   echo "$ac_t""no" 1>&6
1282 fi
1283 done
1284
1285 echo $ac_n "checking for connect""... $ac_c" 1>&6
1286 echo "configure:1287: checking for connect" >&5
1287 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
1288   echo $ac_n "(cached) $ac_c" 1>&6
1289 else
1290   cat > conftest.$ac_ext <<EOF
1291 #line 1292 "configure"
1292 #include "confdefs.h"
1293 /* System header to define __stub macros and hopefully few prototypes,
1294     which can conflict with char connect(); below.  */
1295 #include <assert.h>
1296 /* Override any gcc2 internal prototype to avoid an error.  */
1297 /* We use char because int might match the return type of a gcc2
1298     builtin and then its argument prototype would still apply.  */
1299 char connect();
1300
1301 int main() {
1302
1303 /* The GNU C library defines this for functions which it implements
1304     to always fail with ENOSYS.  Some functions are actually named
1305     something starting with __ and the normal name is an alias.  */
1306 #if defined (__stub_connect) || defined (__stub___connect)
1307 choke me
1308 #else
1309 connect();
1310 #endif
1311
1312 ; return 0; }
1313 EOF
1314 if { (eval echo configure:1315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1315   rm -rf conftest*
1316   eval "ac_cv_func_connect=yes"
1317 else
1318   echo "configure: failed program was:" >&5
1319   cat conftest.$ac_ext >&5
1320   rm -rf conftest*
1321   eval "ac_cv_func_connect=no"
1322 fi
1323 rm -f conftest*
1324 fi
1325
1326 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
1327   echo "$ac_t""yes" 1>&6
1328   :
1329 else
1330   echo "$ac_t""no" 1>&6
1331 echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
1332 echo "configure:1333: checking for connect in -lsocket" >&5
1333 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
1334 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1335   echo $ac_n "(cached) $ac_c" 1>&6
1336 else
1337   ac_save_LIBS="$LIBS"
1338 LIBS="-lsocket  $LIBS"
1339 cat > conftest.$ac_ext <<EOF
1340 #line 1341 "configure"
1341 #include "confdefs.h"
1342 /* Override any gcc2 internal prototype to avoid an error.  */
1343 /* We use char because int might match the return type of a gcc2
1344     builtin and then its argument prototype would still apply.  */
1345 char connect();
1346
1347 int main() {
1348 connect()
1349 ; return 0; }
1350 EOF
1351 if { (eval echo configure:1352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1352   rm -rf conftest*
1353   eval "ac_cv_lib_$ac_lib_var=yes"
1354 else
1355   echo "configure: failed program was:" >&5
1356   cat conftest.$ac_ext >&5
1357   rm -rf conftest*
1358   eval "ac_cv_lib_$ac_lib_var=no"
1359 fi
1360 rm -f conftest*
1361 LIBS="$ac_save_LIBS"
1362
1363 fi
1364 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1365   echo "$ac_t""yes" 1>&6
1366     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1367     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1368   cat >> confdefs.h <<EOF
1369 #define $ac_tr_lib 1
1370 EOF
1371
1372   LIBS="-lsocket $LIBS"
1373
1374 else
1375   echo "$ac_t""no" 1>&6
1376 fi
1377
1378 fi
1379
1380 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
1381 echo "configure:1382: checking for gethostbyname" >&5
1382 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
1383   echo $ac_n "(cached) $ac_c" 1>&6
1384 else
1385   cat > conftest.$ac_ext <<EOF
1386 #line 1387 "configure"
1387 #include "confdefs.h"
1388 /* System header to define __stub macros and hopefully few prototypes,
1389     which can conflict with char gethostbyname(); below.  */
1390 #include <assert.h>
1391 /* Override any gcc2 internal prototype to avoid an error.  */
1392 /* We use char because int might match the return type of a gcc2
1393     builtin and then its argument prototype would still apply.  */
1394 char gethostbyname();
1395
1396 int main() {
1397
1398 /* The GNU C library defines this for functions which it implements
1399     to always fail with ENOSYS.  Some functions are actually named
1400     something starting with __ and the normal name is an alias.  */
1401 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
1402 choke me
1403 #else
1404 gethostbyname();
1405 #endif
1406
1407 ; return 0; }
1408 EOF
1409 if { (eval echo configure:1410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1410   rm -rf conftest*
1411   eval "ac_cv_func_gethostbyname=yes"
1412 else
1413   echo "configure: failed program was:" >&5
1414   cat conftest.$ac_ext >&5
1415   rm -rf conftest*
1416   eval "ac_cv_func_gethostbyname=no"
1417 fi
1418 rm -f conftest*
1419 fi
1420
1421 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
1422   echo "$ac_t""yes" 1>&6
1423   :
1424 else
1425   echo "$ac_t""no" 1>&6
1426 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
1427 echo "configure:1428: checking for gethostbyname in -lnsl" >&5
1428 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
1429 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1430   echo $ac_n "(cached) $ac_c" 1>&6
1431 else
1432   ac_save_LIBS="$LIBS"
1433 LIBS="-lnsl  $LIBS"
1434 cat > conftest.$ac_ext <<EOF
1435 #line 1436 "configure"
1436 #include "confdefs.h"
1437 /* Override any gcc2 internal prototype to avoid an error.  */
1438 /* We use char because int might match the return type of a gcc2
1439     builtin and then its argument prototype would still apply.  */
1440 char gethostbyname();
1441
1442 int main() {
1443 gethostbyname()
1444 ; return 0; }
1445 EOF
1446 if { (eval echo configure:1447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1447   rm -rf conftest*
1448   eval "ac_cv_lib_$ac_lib_var=yes"
1449 else
1450   echo "configure: failed program was:" >&5
1451   cat conftest.$ac_ext >&5
1452   rm -rf conftest*
1453   eval "ac_cv_lib_$ac_lib_var=no"
1454 fi
1455 rm -f conftest*
1456 LIBS="$ac_save_LIBS"
1457
1458 fi
1459 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1460   echo "$ac_t""yes" 1>&6
1461     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1462     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1463   cat >> confdefs.h <<EOF
1464 #define $ac_tr_lib 1
1465 EOF
1466
1467   LIBS="-lnsl $LIBS"
1468
1469 else
1470   echo "$ac_t""no" 1>&6
1471 fi
1472
1473 fi
1474
1475 echo $ac_n "checking for nanosleep""... $ac_c" 1>&6
1476 echo "configure:1477: checking for nanosleep" >&5
1477 if eval "test \"`echo '$''{'ac_cv_func_nanosleep'+set}'`\" = set"; then
1478   echo $ac_n "(cached) $ac_c" 1>&6
1479 else
1480   cat > conftest.$ac_ext <<EOF
1481 #line 1482 "configure"
1482 #include "confdefs.h"
1483 /* System header to define __stub macros and hopefully few prototypes,
1484     which can conflict with char nanosleep(); below.  */
1485 #include <assert.h>
1486 /* Override any gcc2 internal prototype to avoid an error.  */
1487 /* We use char because int might match the return type of a gcc2
1488     builtin and then its argument prototype would still apply.  */
1489 char nanosleep();
1490
1491 int main() {
1492
1493 /* The GNU C library defines this for functions which it implements
1494     to always fail with ENOSYS.  Some functions are actually named
1495     something starting with __ and the normal name is an alias.  */
1496 #if defined (__stub_nanosleep) || defined (__stub___nanosleep)
1497 choke me
1498 #else
1499 nanosleep();
1500 #endif
1501
1502 ; return 0; }
1503 EOF
1504 if { (eval echo configure:1505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1505   rm -rf conftest*
1506   eval "ac_cv_func_nanosleep=yes"
1507 else
1508   echo "configure: failed program was:" >&5
1509   cat conftest.$ac_ext >&5
1510   rm -rf conftest*
1511   eval "ac_cv_func_nanosleep=no"
1512 fi
1513 rm -f conftest*
1514 fi
1515
1516 if eval "test \"`echo '$ac_cv_func_'nanosleep`\" = yes"; then
1517   echo "$ac_t""yes" 1>&6
1518   :
1519 else
1520   echo "$ac_t""no" 1>&6
1521 echo $ac_n "checking for nanosleep in -lrt""... $ac_c" 1>&6
1522 echo "configure:1523: checking for nanosleep in -lrt" >&5
1523 ac_lib_var=`echo rt'_'nanosleep | sed 'y%./+-%__p_%'`
1524 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1525   echo $ac_n "(cached) $ac_c" 1>&6
1526 else
1527   ac_save_LIBS="$LIBS"
1528 LIBS="-lrt  $LIBS"
1529 cat > conftest.$ac_ext <<EOF
1530 #line 1531 "configure"
1531 #include "confdefs.h"
1532 /* Override any gcc2 internal prototype to avoid an error.  */
1533 /* We use char because int might match the return type of a gcc2
1534     builtin and then its argument prototype would still apply.  */
1535 char nanosleep();
1536
1537 int main() {
1538 nanosleep()
1539 ; return 0; }
1540 EOF
1541 if { (eval echo configure:1542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1542   rm -rf conftest*
1543   eval "ac_cv_lib_$ac_lib_var=yes"
1544 else
1545   echo "configure: failed program was:" >&5
1546   cat conftest.$ac_ext >&5
1547   rm -rf conftest*
1548   eval "ac_cv_lib_$ac_lib_var=no"
1549 fi
1550 rm -f conftest*
1551 LIBS="$ac_save_LIBS"
1552
1553 fi
1554 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1555   echo "$ac_t""yes" 1>&6
1556     ac_tr_lib=HAVE_LIB`echo rt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1557     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1558   cat >> confdefs.h <<EOF
1559 #define $ac_tr_lib 1
1560 EOF
1561
1562   LIBS="-lrt $LIBS"
1563
1564 else
1565   echo "$ac_t""no" 1>&6
1566 echo $ac_n "checking for nanosleep in -lposix4""... $ac_c" 1>&6
1567 echo "configure:1568: checking for nanosleep in -lposix4" >&5
1568 ac_lib_var=`echo posix4'_'nanosleep | sed 'y%./+-%__p_%'`
1569 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1570   echo $ac_n "(cached) $ac_c" 1>&6
1571 else
1572   ac_save_LIBS="$LIBS"
1573 LIBS="-lposix4  $LIBS"
1574 cat > conftest.$ac_ext <<EOF
1575 #line 1576 "configure"
1576 #include "confdefs.h"
1577 /* Override any gcc2 internal prototype to avoid an error.  */
1578 /* We use char because int might match the return type of a gcc2
1579     builtin and then its argument prototype would still apply.  */
1580 char nanosleep();
1581
1582 int main() {
1583 nanosleep()
1584 ; return 0; }
1585 EOF
1586 if { (eval echo configure:1587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1587   rm -rf conftest*
1588   eval "ac_cv_lib_$ac_lib_var=yes"
1589 else
1590   echo "configure: failed program was:" >&5
1591   cat conftest.$ac_ext >&5
1592   rm -rf conftest*
1593   eval "ac_cv_lib_$ac_lib_var=no"
1594 fi
1595 rm -f conftest*
1596 LIBS="$ac_save_LIBS"
1597
1598 fi
1599 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1600   echo "$ac_t""yes" 1>&6
1601     ac_tr_lib=HAVE_LIB`echo posix4 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1602     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1603   cat >> confdefs.h <<EOF
1604 #define $ac_tr_lib 1
1605 EOF
1606
1607   LIBS="-lposix4 $LIBS"
1608
1609 else
1610   echo "$ac_t""no" 1>&6
1611 fi
1612
1613 fi
1614
1615 fi
1616
1617 for ac_func in usleep
1618 do
1619 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1620 echo "configure:1621: checking for $ac_func" >&5
1621 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1622   echo $ac_n "(cached) $ac_c" 1>&6
1623 else
1624   cat > conftest.$ac_ext <<EOF
1625 #line 1626 "configure"
1626 #include "confdefs.h"
1627 /* System header to define __stub macros and hopefully few prototypes,
1628     which can conflict with char $ac_func(); below.  */
1629 #include <assert.h>
1630 /* Override any gcc2 internal prototype to avoid an error.  */
1631 /* We use char because int might match the return type of a gcc2
1632     builtin and then its argument prototype would still apply.  */
1633 char $ac_func();
1634
1635 int main() {
1636
1637 /* The GNU C library defines this for functions which it implements
1638     to always fail with ENOSYS.  Some functions are actually named
1639     something starting with __ and the normal name is an alias.  */
1640 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1641 choke me
1642 #else
1643 $ac_func();
1644 #endif
1645
1646 ; return 0; }
1647 EOF
1648 if { (eval echo configure:1649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1649   rm -rf conftest*
1650   eval "ac_cv_func_$ac_func=yes"
1651 else
1652   echo "configure: failed program was:" >&5
1653   cat conftest.$ac_ext >&5
1654   rm -rf conftest*
1655   eval "ac_cv_func_$ac_func=no"
1656 fi
1657 rm -f conftest*
1658 fi
1659
1660 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1661   echo "$ac_t""yes" 1>&6
1662     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1663   cat >> confdefs.h <<EOF
1664 #define $ac_tr_func 1
1665 EOF
1666  
1667 else
1668   echo "$ac_t""no" 1>&6
1669 fi
1670 done
1671
1672 echo $ac_n "checking for inet_aton""... $ac_c" 1>&6
1673 echo "configure:1674: checking for inet_aton" >&5
1674 if eval "test \"`echo '$''{'ac_cv_func_inet_aton'+set}'`\" = set"; then
1675   echo $ac_n "(cached) $ac_c" 1>&6
1676 else
1677   cat > conftest.$ac_ext <<EOF
1678 #line 1679 "configure"
1679 #include "confdefs.h"
1680 /* System header to define __stub macros and hopefully few prototypes,
1681     which can conflict with char inet_aton(); below.  */
1682 #include <assert.h>
1683 /* Override any gcc2 internal prototype to avoid an error.  */
1684 /* We use char because int might match the return type of a gcc2
1685     builtin and then its argument prototype would still apply.  */
1686 char inet_aton();
1687
1688 int main() {
1689
1690 /* The GNU C library defines this for functions which it implements
1691     to always fail with ENOSYS.  Some functions are actually named
1692     something starting with __ and the normal name is an alias.  */
1693 #if defined (__stub_inet_aton) || defined (__stub___inet_aton)
1694 choke me
1695 #else
1696 inet_aton();
1697 #endif
1698
1699 ; return 0; }
1700 EOF
1701 if { (eval echo configure:1702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1702   rm -rf conftest*
1703   eval "ac_cv_func_inet_aton=yes"
1704 else
1705   echo "configure: failed program was:" >&5
1706   cat conftest.$ac_ext >&5
1707   rm -rf conftest*
1708   eval "ac_cv_func_inet_aton=no"
1709 fi
1710 rm -f conftest*
1711 fi
1712
1713 if eval "test \"`echo '$ac_cv_func_'inet_aton`\" = yes"; then
1714   echo "$ac_t""yes" 1>&6
1715   :
1716 else
1717   echo "$ac_t""no" 1>&6
1718 echo $ac_n "checking for inet_aton in -lresolv""... $ac_c" 1>&6
1719 echo "configure:1720: checking for inet_aton in -lresolv" >&5
1720 ac_lib_var=`echo resolv'_'inet_aton | sed 'y%./+-%__p_%'`
1721 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1722   echo $ac_n "(cached) $ac_c" 1>&6
1723 else
1724   ac_save_LIBS="$LIBS"
1725 LIBS="-lresolv  $LIBS"
1726 cat > conftest.$ac_ext <<EOF
1727 #line 1728 "configure"
1728 #include "confdefs.h"
1729 /* Override any gcc2 internal prototype to avoid an error.  */
1730 /* We use char because int might match the return type of a gcc2
1731     builtin and then its argument prototype would still apply.  */
1732 char inet_aton();
1733
1734 int main() {
1735 inet_aton()
1736 ; return 0; }
1737 EOF
1738 if { (eval echo configure:1739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1739   rm -rf conftest*
1740   eval "ac_cv_lib_$ac_lib_var=yes"
1741 else
1742   echo "configure: failed program was:" >&5
1743   cat conftest.$ac_ext >&5
1744   rm -rf conftest*
1745   eval "ac_cv_lib_$ac_lib_var=no"
1746 fi
1747 rm -f conftest*
1748 LIBS="$ac_save_LIBS"
1749
1750 fi
1751 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1752   echo "$ac_t""yes" 1>&6
1753     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1754     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1755   cat >> confdefs.h <<EOF
1756 #define $ac_tr_lib 1
1757 EOF
1758
1759   LIBS="-lresolv $LIBS"
1760
1761 else
1762   echo "$ac_t""no" 1>&6
1763 fi
1764
1765 fi
1766
1767 for ac_hdr in unistd.h
1768 do
1769 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1770 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1771 echo "configure:1772: checking for $ac_hdr" >&5
1772 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1773   echo $ac_n "(cached) $ac_c" 1>&6
1774 else
1775   cat > conftest.$ac_ext <<EOF
1776 #line 1777 "configure"
1777 #include "confdefs.h"
1778 #include <$ac_hdr>
1779 EOF
1780 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1781 { (eval echo configure:1782: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1782 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1783 if test -z "$ac_err"; then
1784   rm -rf conftest*
1785   eval "ac_cv_header_$ac_safe=yes"
1786 else
1787   echo "$ac_err" >&5
1788   echo "configure: failed program was:" >&5
1789   cat conftest.$ac_ext >&5
1790   rm -rf conftest*
1791   eval "ac_cv_header_$ac_safe=no"
1792 fi
1793 rm -f conftest*
1794 fi
1795 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1796   echo "$ac_t""yes" 1>&6
1797     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1798   cat >> confdefs.h <<EOF
1799 #define $ac_tr_hdr 1
1800 EOF
1801  
1802 else
1803   echo "$ac_t""no" 1>&6
1804 fi
1805 done
1806
1807 for ac_func in getpagesize
1808 do
1809 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1810 echo "configure:1811: checking for $ac_func" >&5
1811 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1812   echo $ac_n "(cached) $ac_c" 1>&6
1813 else
1814   cat > conftest.$ac_ext <<EOF
1815 #line 1816 "configure"
1816 #include "confdefs.h"
1817 /* System header to define __stub macros and hopefully few prototypes,
1818     which can conflict with char $ac_func(); below.  */
1819 #include <assert.h>
1820 /* Override any gcc2 internal prototype to avoid an error.  */
1821 /* We use char because int might match the return type of a gcc2
1822     builtin and then its argument prototype would still apply.  */
1823 char $ac_func();
1824
1825 int main() {
1826
1827 /* The GNU C library defines this for functions which it implements
1828     to always fail with ENOSYS.  Some functions are actually named
1829     something starting with __ and the normal name is an alias.  */
1830 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1831 choke me
1832 #else
1833 $ac_func();
1834 #endif
1835
1836 ; return 0; }
1837 EOF
1838 if { (eval echo configure:1839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1839   rm -rf conftest*
1840   eval "ac_cv_func_$ac_func=yes"
1841 else
1842   echo "configure: failed program was:" >&5
1843   cat conftest.$ac_ext >&5
1844   rm -rf conftest*
1845   eval "ac_cv_func_$ac_func=no"
1846 fi
1847 rm -f conftest*
1848 fi
1849
1850 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1851   echo "$ac_t""yes" 1>&6
1852     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1853   cat >> confdefs.h <<EOF
1854 #define $ac_tr_func 1
1855 EOF
1856  
1857 else
1858   echo "$ac_t""no" 1>&6
1859 fi
1860 done
1861
1862 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
1863 echo "configure:1864: checking for working mmap" >&5
1864 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
1865   echo $ac_n "(cached) $ac_c" 1>&6
1866 else
1867   if test "$cross_compiling" = yes; then
1868   ac_cv_func_mmap_fixed_mapped=no
1869 else
1870   cat > conftest.$ac_ext <<EOF
1871 #line 1872 "configure"
1872 #include "confdefs.h"
1873
1874 /* Thanks to Mike Haertel and Jim Avera for this test.
1875    Here is a matrix of mmap possibilities:
1876         mmap private not fixed
1877         mmap private fixed at somewhere currently unmapped
1878         mmap private fixed at somewhere already mapped
1879         mmap shared not fixed
1880         mmap shared fixed at somewhere currently unmapped
1881         mmap shared fixed at somewhere already mapped
1882    For private mappings, we should verify that changes cannot be read()
1883    back from the file, nor mmap's back from the file at a different
1884    address.  (There have been systems where private was not correctly
1885    implemented like the infamous i386 svr4.0, and systems where the
1886    VM page cache was not coherent with the filesystem buffer cache
1887    like early versions of FreeBSD and possibly contemporary NetBSD.)
1888    For shared mappings, we should conversely verify that changes get
1889    propogated back to all the places they're supposed to be.
1890
1891    Grep wants private fixed already mapped.
1892    The main things grep needs to know about mmap are:
1893    * does it exist and is it safe to write into the mmap'd area
1894    * how to use it (BSD variants)  */
1895 #include <sys/types.h>
1896 #include <fcntl.h>
1897 #include <sys/mman.h>
1898 #include <stdlib.h>
1899 #include <sys/stat.h>
1900
1901 #ifdef HAVE_UNISTD_H
1902 # include <unistd.h>
1903 #endif
1904
1905 /* This mess was copied from the GNU getpagesize.h.  */
1906 #ifndef HAVE_GETPAGESIZE
1907
1908 /* Assume that all systems that can run configure have sys/param.h.  */
1909 # ifndef HAVE_SYS_PARAM_H
1910 #  define HAVE_SYS_PARAM_H 1
1911 # endif
1912
1913 # ifdef _SC_PAGESIZE
1914 #  define getpagesize() sysconf(_SC_PAGESIZE)
1915 # else /* no _SC_PAGESIZE */
1916 #  ifdef HAVE_SYS_PARAM_H
1917 #   include <sys/param.h>
1918 #   ifdef EXEC_PAGESIZE
1919 #    define getpagesize() EXEC_PAGESIZE
1920 #   else /* no EXEC_PAGESIZE */
1921 #    ifdef NBPG
1922 #     define getpagesize() NBPG * CLSIZE
1923 #     ifndef CLSIZE
1924 #      define CLSIZE 1
1925 #     endif /* no CLSIZE */
1926 #    else /* no NBPG */
1927 #     ifdef NBPC
1928 #      define getpagesize() NBPC
1929 #     else /* no NBPC */
1930 #      ifdef PAGESIZE
1931 #       define getpagesize() PAGESIZE
1932 #      endif /* PAGESIZE */
1933 #     endif /* no NBPC */
1934 #    endif /* no NBPG */
1935 #   endif /* no EXEC_PAGESIZE */
1936 #  else /* no HAVE_SYS_PARAM_H */
1937 #   define getpagesize() 8192   /* punt totally */
1938 #  endif /* no HAVE_SYS_PARAM_H */
1939 # endif /* no _SC_PAGESIZE */
1940
1941 #endif /* no HAVE_GETPAGESIZE */
1942
1943 #ifdef __cplusplus
1944 extern "C" { void *malloc(unsigned); }
1945 #else
1946 char *malloc();
1947 #endif
1948
1949 int
1950 main()
1951 {
1952         char *data, *data2, *data3;
1953         int i, pagesize;
1954         int fd;
1955
1956         pagesize = getpagesize();
1957
1958         /*
1959          * First, make a file with some known garbage in it.
1960          */
1961         data = (char*)malloc(pagesize);
1962         if (!data)
1963                 exit(1);
1964         for (i = 0; i < pagesize; ++i)
1965                 *(data + i) = rand();
1966         umask(0);
1967         fd = creat("conftestmmap", 0600);
1968         if (fd < 0)
1969                 exit(1);
1970         if (write(fd, data, pagesize) != pagesize)
1971                 exit(1);
1972         close(fd);
1973
1974         /*
1975          * Next, try to mmap the file at a fixed address which
1976          * already has something else allocated at it.  If we can,
1977          * also make sure that we see the same garbage.
1978          */
1979         fd = open("conftestmmap", O_RDWR);
1980         if (fd < 0)
1981                 exit(1);
1982         data2 = (char*)malloc(2 * pagesize);
1983         if (!data2)
1984                 exit(1);
1985         data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
1986         if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
1987             MAP_PRIVATE | MAP_FIXED, fd, 0L))
1988                 exit(1);
1989         for (i = 0; i < pagesize; ++i)
1990                 if (*(data + i) != *(data2 + i))
1991                         exit(1);
1992
1993         /*
1994          * Finally, make sure that changes to the mapped area
1995          * do not percolate back to the file as seen by read().
1996          * (This is a bug on some variants of i386 svr4.0.)
1997          */
1998         for (i = 0; i < pagesize; ++i)
1999                 *(data2 + i) = *(data2 + i) + 1;
2000         data3 = (char*)malloc(pagesize);
2001         if (!data3)
2002                 exit(1);
2003         if (read(fd, data3, pagesize) != pagesize)
2004                 exit(1);
2005         for (i = 0; i < pagesize; ++i)
2006                 if (*(data + i) != *(data3 + i))
2007                         exit(1);
2008         close(fd);
2009         unlink("conftestmmap");
2010         exit(0);
2011 }
2012
2013 EOF
2014 if { (eval echo configure:2015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2015 then
2016   ac_cv_func_mmap_fixed_mapped=yes
2017 else
2018   echo "configure: failed program was:" >&5
2019   cat conftest.$ac_ext >&5
2020   rm -fr conftest*
2021   ac_cv_func_mmap_fixed_mapped=no
2022 fi
2023 rm -fr conftest*
2024 fi
2025
2026 fi
2027
2028 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
2029 if test $ac_cv_func_mmap_fixed_mapped = yes; then
2030   cat >> confdefs.h <<\EOF
2031 #define HAVE_MMAP 1
2032 EOF
2033
2034 fi
2035
2036 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
2037 echo "configure:2038: checking for vprintf" >&5
2038 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
2039   echo $ac_n "(cached) $ac_c" 1>&6
2040 else
2041   cat > conftest.$ac_ext <<EOF
2042 #line 2043 "configure"
2043 #include "confdefs.h"
2044 /* System header to define __stub macros and hopefully few prototypes,
2045     which can conflict with char vprintf(); below.  */
2046 #include <assert.h>
2047 /* Override any gcc2 internal prototype to avoid an error.  */
2048 /* We use char because int might match the return type of a gcc2
2049     builtin and then its argument prototype would still apply.  */
2050 char vprintf();
2051
2052 int main() {
2053
2054 /* The GNU C library defines this for functions which it implements
2055     to always fail with ENOSYS.  Some functions are actually named
2056     something starting with __ and the normal name is an alias.  */
2057 #if defined (__stub_vprintf) || defined (__stub___vprintf)
2058 choke me
2059 #else
2060 vprintf();
2061 #endif
2062
2063 ; return 0; }
2064 EOF
2065 if { (eval echo configure:2066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2066   rm -rf conftest*
2067   eval "ac_cv_func_vprintf=yes"
2068 else
2069   echo "configure: failed program was:" >&5
2070   cat conftest.$ac_ext >&5
2071   rm -rf conftest*
2072   eval "ac_cv_func_vprintf=no"
2073 fi
2074 rm -f conftest*
2075 fi
2076
2077 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
2078   echo "$ac_t""yes" 1>&6
2079   cat >> confdefs.h <<\EOF
2080 #define HAVE_VPRINTF 1
2081 EOF
2082
2083 else
2084   echo "$ac_t""no" 1>&6
2085 fi
2086
2087 if test "$ac_cv_func_vprintf" != yes; then
2088 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
2089 echo "configure:2090: checking for _doprnt" >&5
2090 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
2091   echo $ac_n "(cached) $ac_c" 1>&6
2092 else
2093   cat > conftest.$ac_ext <<EOF
2094 #line 2095 "configure"
2095 #include "confdefs.h"
2096 /* System header to define __stub macros and hopefully few prototypes,
2097     which can conflict with char _doprnt(); below.  */
2098 #include <assert.h>
2099 /* Override any gcc2 internal prototype to avoid an error.  */
2100 /* We use char because int might match the return type of a gcc2
2101     builtin and then its argument prototype would still apply.  */
2102 char _doprnt();
2103
2104 int main() {
2105
2106 /* The GNU C library defines this for functions which it implements
2107     to always fail with ENOSYS.  Some functions are actually named
2108     something starting with __ and the normal name is an alias.  */
2109 #if defined (__stub__doprnt) || defined (__stub____doprnt)
2110 choke me
2111 #else
2112 _doprnt();
2113 #endif
2114
2115 ; return 0; }
2116 EOF
2117 if { (eval echo configure:2118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2118   rm -rf conftest*
2119   eval "ac_cv_func__doprnt=yes"
2120 else
2121   echo "configure: failed program was:" >&5
2122   cat conftest.$ac_ext >&5
2123   rm -rf conftest*
2124   eval "ac_cv_func__doprnt=no"
2125 fi
2126 rm -f conftest*
2127 fi
2128
2129 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
2130   echo "$ac_t""yes" 1>&6
2131   cat >> confdefs.h <<\EOF
2132 #define HAVE_DOPRNT 1
2133 EOF
2134
2135 else
2136   echo "$ac_t""no" 1>&6
2137 fi
2138
2139 fi
2140
2141 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
2142 echo "configure:2143: checking return type of signal handlers" >&5
2143 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2144   echo $ac_n "(cached) $ac_c" 1>&6
2145 else
2146   cat > conftest.$ac_ext <<EOF
2147 #line 2148 "configure"
2148 #include "confdefs.h"
2149 #include <sys/types.h>
2150 #include <signal.h>
2151 #ifdef signal
2152 #undef signal
2153 #endif
2154 #ifdef __cplusplus
2155 extern "C" void (*signal (int, void (*)(int)))(int);
2156 #else
2157 void (*signal ()) ();
2158 #endif
2159
2160 int main() {
2161 int i;
2162 ; return 0; }
2163 EOF
2164 if { (eval echo configure:2165: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2165   rm -rf conftest*
2166   ac_cv_type_signal=void
2167 else
2168   echo "configure: failed program was:" >&5
2169   cat conftest.$ac_ext >&5
2170   rm -rf conftest*
2171   ac_cv_type_signal=int
2172 fi
2173 rm -f conftest*
2174 fi
2175
2176 echo "$ac_t""$ac_cv_type_signal" 1>&6
2177 cat >> confdefs.h <<EOF
2178 #define RETSIGTYPE $ac_cv_type_signal
2179 EOF
2180
2181
2182 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
2183 echo "configure:2184: checking for dlopen in -ldl" >&5
2184 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
2185 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2186   echo $ac_n "(cached) $ac_c" 1>&6
2187 else
2188   ac_save_LIBS="$LIBS"
2189 LIBS="-ldl  $LIBS"
2190 cat > conftest.$ac_ext <<EOF
2191 #line 2192 "configure"
2192 #include "confdefs.h"
2193 /* Override any gcc2 internal prototype to avoid an error.  */
2194 /* We use char because int might match the return type of a gcc2
2195     builtin and then its argument prototype would still apply.  */
2196 char dlopen();
2197
2198 int main() {
2199 dlopen()
2200 ; return 0; }
2201 EOF
2202 if { (eval echo configure:2203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2203   rm -rf conftest*
2204   eval "ac_cv_lib_$ac_lib_var=yes"
2205 else
2206   echo "configure: failed program was:" >&5
2207   cat conftest.$ac_ext >&5
2208   rm -rf conftest*
2209   eval "ac_cv_lib_$ac_lib_var=no"
2210 fi
2211 rm -f conftest*
2212 LIBS="$ac_save_LIBS"
2213
2214 fi
2215 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2216   echo "$ac_t""yes" 1>&6
2217     ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2218     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2219   cat >> confdefs.h <<EOF
2220 #define $ac_tr_lib 1
2221 EOF
2222
2223   LIBS="-ldl $LIBS"
2224
2225 else
2226   echo "$ac_t""no" 1>&6
2227 fi
2228
2229 echo $ac_n "checking for optarg in -lgnugetopt""... $ac_c" 1>&6
2230 echo "configure:2231: checking for optarg in -lgnugetopt" >&5
2231 ac_lib_var=`echo gnugetopt'_'optarg | sed 'y%./+-%__p_%'`
2232 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2233   echo $ac_n "(cached) $ac_c" 1>&6
2234 else
2235   ac_save_LIBS="$LIBS"
2236 LIBS="-lgnugetopt  $LIBS"
2237 cat > conftest.$ac_ext <<EOF
2238 #line 2239 "configure"
2239 #include "confdefs.h"
2240 /* Override any gcc2 internal prototype to avoid an error.  */
2241 /* We use char because int might match the return type of a gcc2
2242     builtin and then its argument prototype would still apply.  */
2243 char optarg();
2244
2245 int main() {
2246 optarg()
2247 ; return 0; }
2248 EOF
2249 if { (eval echo configure:2250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2250   rm -rf conftest*
2251   eval "ac_cv_lib_$ac_lib_var=yes"
2252 else
2253   echo "configure: failed program was:" >&5
2254   cat conftest.$ac_ext >&5
2255   rm -rf conftest*
2256   eval "ac_cv_lib_$ac_lib_var=no"
2257 fi
2258 rm -f conftest*
2259 LIBS="$ac_save_LIBS"
2260
2261 fi
2262 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2263   echo "$ac_t""yes" 1>&6
2264     ac_tr_lib=HAVE_LIB`echo gnugetopt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2265     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2266   cat >> confdefs.h <<EOF
2267 #define $ac_tr_lib 1
2268 EOF
2269
2270   LIBS="-lgnugetopt $LIBS"
2271
2272 else
2273   echo "$ac_t""no" 1>&6
2274 fi
2275
2276 echo $ac_n "checking for _ in -lbe""... $ac_c" 1>&6
2277 echo "configure:2278: checking for _ in -lbe" >&5
2278 ac_lib_var=`echo be'_'_ | sed 'y%./+-%__p_%'`
2279 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2280   echo $ac_n "(cached) $ac_c" 1>&6
2281 else
2282   ac_save_LIBS="$LIBS"
2283 LIBS="-lbe  $LIBS"
2284 cat > conftest.$ac_ext <<EOF
2285 #line 2286 "configure"
2286 #include "confdefs.h"
2287 /* Override any gcc2 internal prototype to avoid an error.  */
2288 /* We use char because int might match the return type of a gcc2
2289     builtin and then its argument prototype would still apply.  */
2290 char _();
2291
2292 int main() {
2293 _()
2294 ; return 0; }
2295 EOF
2296 if { (eval echo configure:2297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2297   rm -rf conftest*
2298   eval "ac_cv_lib_$ac_lib_var=yes"
2299 else
2300   echo "configure: failed program was:" >&5
2301   cat conftest.$ac_ext >&5
2302   rm -rf conftest*
2303   eval "ac_cv_lib_$ac_lib_var=no"
2304 fi
2305 rm -f conftest*
2306 LIBS="$ac_save_LIBS"
2307
2308 fi
2309 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2310   echo "$ac_t""yes" 1>&6
2311     ac_tr_lib=HAVE_LIB`echo be | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2312     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2313   cat >> confdefs.h <<EOF
2314 #define $ac_tr_lib 1
2315 EOF
2316
2317   LIBS="-lbe $LIBS"
2318
2319 else
2320   echo "$ac_t""no" 1>&6
2321 fi
2322
2323 echo $ac_n "checking for _ in -lgame""... $ac_c" 1>&6
2324 echo "configure:2325: checking for _ in -lgame" >&5
2325 ac_lib_var=`echo game'_'_ | sed 'y%./+-%__p_%'`
2326 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2327   echo $ac_n "(cached) $ac_c" 1>&6
2328 else
2329   ac_save_LIBS="$LIBS"
2330 LIBS="-lgame  $LIBS"
2331 cat > conftest.$ac_ext <<EOF
2332 #line 2333 "configure"
2333 #include "confdefs.h"
2334 /* Override any gcc2 internal prototype to avoid an error.  */
2335 /* We use char because int might match the return type of a gcc2
2336     builtin and then its argument prototype would still apply.  */
2337 char _();
2338
2339 int main() {
2340 _()
2341 ; return 0; }
2342 EOF
2343 if { (eval echo configure:2344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2344   rm -rf conftest*
2345   eval "ac_cv_lib_$ac_lib_var=yes"
2346 else
2347   echo "configure: failed program was:" >&5
2348   cat conftest.$ac_ext >&5
2349   rm -rf conftest*
2350   eval "ac_cv_lib_$ac_lib_var=no"
2351 fi
2352 rm -f conftest*
2353 LIBS="$ac_save_LIBS"
2354
2355 fi
2356 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2357   echo "$ac_t""yes" 1>&6
2358     ac_tr_lib=HAVE_LIB`echo game | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2359     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2360   cat >> confdefs.h <<EOF
2361 #define $ac_tr_lib 1
2362 EOF
2363
2364   LIBS="-lgame $LIBS"
2365
2366 else
2367   echo "$ac_t""no" 1>&6
2368 fi
2369
2370 echo $ac_n "checking for _ in -lroot""... $ac_c" 1>&6
2371 echo "configure:2372: checking for _ in -lroot" >&5
2372 ac_lib_var=`echo root'_'_ | sed 'y%./+-%__p_%'`
2373 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2374   echo $ac_n "(cached) $ac_c" 1>&6
2375 else
2376   ac_save_LIBS="$LIBS"
2377 LIBS="-lroot  $LIBS"
2378 cat > conftest.$ac_ext <<EOF
2379 #line 2380 "configure"
2380 #include "confdefs.h"
2381 /* Override any gcc2 internal prototype to avoid an error.  */
2382 /* We use char because int might match the return type of a gcc2
2383     builtin and then its argument prototype would still apply.  */
2384 char _();
2385
2386 int main() {
2387 _()
2388 ; return 0; }
2389 EOF
2390 if { (eval echo configure:2391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2391   rm -rf conftest*
2392   eval "ac_cv_lib_$ac_lib_var=yes"
2393 else
2394   echo "configure: failed program was:" >&5
2395   cat conftest.$ac_ext >&5
2396   rm -rf conftest*
2397   eval "ac_cv_lib_$ac_lib_var=no"
2398 fi
2399 rm -f conftest*
2400 LIBS="$ac_save_LIBS"
2401
2402 fi
2403 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2404   echo "$ac_t""yes" 1>&6
2405     ac_tr_lib=HAVE_LIB`echo root | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2406     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2407   cat >> confdefs.h <<EOF
2408 #define $ac_tr_lib 1
2409 EOF
2410
2411   LIBS="-lroot $LIBS"
2412
2413 else
2414   echo "$ac_t""no" 1>&6
2415 fi
2416
2417 echo $ac_n "checking for powl in -lm""... $ac_c" 1>&6
2418 echo "configure:2419: checking for powl in -lm" >&5
2419 ac_lib_var=`echo m'_'powl | sed 'y%./+-%__p_%'`
2420 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2421   echo $ac_n "(cached) $ac_c" 1>&6
2422 else
2423   ac_save_LIBS="$LIBS"
2424 LIBS="-lm  $LIBS"
2425 cat > conftest.$ac_ext <<EOF
2426 #line 2427 "configure"
2427 #include "confdefs.h"
2428 /* Override any gcc2 internal prototype to avoid an error.  */
2429 /* We use char because int might match the return type of a gcc2
2430     builtin and then its argument prototype would still apply.  */
2431 char powl();
2432
2433 int main() {
2434 powl()
2435 ; return 0; }
2436 EOF
2437 if { (eval echo configure:2438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2438   rm -rf conftest*
2439   eval "ac_cv_lib_$ac_lib_var=yes"
2440 else
2441   echo "configure: failed program was:" >&5
2442   cat conftest.$ac_ext >&5
2443   rm -rf conftest*
2444   eval "ac_cv_lib_$ac_lib_var=no"
2445 fi
2446 rm -f conftest*
2447 LIBS="$ac_save_LIBS"
2448
2449 fi
2450 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2451   echo "$ac_t""yes" 1>&6
2452     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2453     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2454   cat >> confdefs.h <<EOF
2455 #define $ac_tr_lib 1
2456 EOF
2457
2458   LIBS="-lm $LIBS"
2459
2460 else
2461   echo "$ac_t""no" 1>&6
2462 fi
2463
2464 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
2465 echo "configure:2466: checking for pthread_create in -lpthread" >&5
2466 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
2467 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2468   echo $ac_n "(cached) $ac_c" 1>&6
2469 else
2470   ac_save_LIBS="$LIBS"
2471 LIBS="-lpthread  $LIBS"
2472 cat > conftest.$ac_ext <<EOF
2473 #line 2474 "configure"
2474 #include "confdefs.h"
2475 /* Override any gcc2 internal prototype to avoid an error.  */
2476 /* We use char because int might match the return type of a gcc2
2477     builtin and then its argument prototype would still apply.  */
2478 char pthread_create();
2479
2480 int main() {
2481 pthread_create()
2482 ; return 0; }
2483 EOF
2484 if { (eval echo configure:2485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2485   rm -rf conftest*
2486   eval "ac_cv_lib_$ac_lib_var=yes"
2487 else
2488   echo "configure: failed program was:" >&5
2489   cat conftest.$ac_ext >&5
2490   rm -rf conftest*
2491   eval "ac_cv_lib_$ac_lib_var=no"
2492 fi
2493 rm -f conftest*
2494 LIBS="$ac_save_LIBS"
2495
2496 fi
2497 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2498   echo "$ac_t""yes" 1>&6
2499     ac_tr_lib=HAVE_LIB`echo pthread | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2500     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2501   cat >> confdefs.h <<EOF
2502 #define $ac_tr_lib 1
2503 EOF
2504
2505   LIBS="-lpthread $LIBS"
2506
2507 else
2508   echo "$ac_t""no" 1>&6
2509 fi
2510
2511 echo $ac_n "checking for thread_create in -lthreads""... $ac_c" 1>&6
2512 echo "configure:2513: checking for thread_create in -lthreads" >&5
2513 ac_lib_var=`echo threads'_'thread_create | sed 'y%./+-%__p_%'`
2514 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2515   echo $ac_n "(cached) $ac_c" 1>&6
2516 else
2517   ac_save_LIBS="$LIBS"
2518 LIBS="-lthreads  $LIBS"
2519 cat > conftest.$ac_ext <<EOF
2520 #line 2521 "configure"
2521 #include "confdefs.h"
2522 /* Override any gcc2 internal prototype to avoid an error.  */
2523 /* We use char because int might match the return type of a gcc2
2524     builtin and then its argument prototype would still apply.  */
2525 char thread_create();
2526
2527 int main() {
2528 thread_create()
2529 ; return 0; }
2530 EOF
2531 if { (eval echo configure:2532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2532   rm -rf conftest*
2533   eval "ac_cv_lib_$ac_lib_var=yes"
2534 else
2535   echo "configure: failed program was:" >&5
2536   cat conftest.$ac_ext >&5
2537   rm -rf conftest*
2538   eval "ac_cv_lib_$ac_lib_var=no"
2539 fi
2540 rm -f conftest*
2541 LIBS="$ac_save_LIBS"
2542
2543 fi
2544 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2545   echo "$ac_t""yes" 1>&6
2546     ac_tr_lib=HAVE_LIB`echo threads | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2547     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2548   cat >> confdefs.h <<EOF
2549 #define $ac_tr_lib 1
2550 EOF
2551
2552   LIBS="-lthreads $LIBS"
2553
2554 else
2555   echo "$ac_t""no" 1>&6
2556 fi
2557
2558
2559 echo $ac_n "checking for getopt_long""... $ac_c" 1>&6
2560 echo "configure:2561: checking for getopt_long" >&5
2561 if eval "test \"`echo '$''{'ac_cv_func_getopt_long'+set}'`\" = set"; then
2562   echo $ac_n "(cached) $ac_c" 1>&6
2563 else
2564   cat > conftest.$ac_ext <<EOF
2565 #line 2566 "configure"
2566 #include "confdefs.h"
2567 /* System header to define __stub macros and hopefully few prototypes,
2568     which can conflict with char getopt_long(); below.  */
2569 #include <assert.h>
2570 /* Override any gcc2 internal prototype to avoid an error.  */
2571 /* We use char because int might match the return type of a gcc2
2572     builtin and then its argument prototype would still apply.  */
2573 char getopt_long();
2574
2575 int main() {
2576
2577 /* The GNU C library defines this for functions which it implements
2578     to always fail with ENOSYS.  Some functions are actually named
2579     something starting with __ and the normal name is an alias.  */
2580 #if defined (__stub_getopt_long) || defined (__stub___getopt_long)
2581 choke me
2582 #else
2583 getopt_long();
2584 #endif
2585
2586 ; return 0; }
2587 EOF
2588 if { (eval echo configure:2589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2589   rm -rf conftest*
2590   eval "ac_cv_func_getopt_long=yes"
2591 else
2592   echo "configure: failed program was:" >&5
2593   cat conftest.$ac_ext >&5
2594   rm -rf conftest*
2595   eval "ac_cv_func_getopt_long=no"
2596 fi
2597 rm -f conftest*
2598 fi
2599
2600 if eval "test \"`echo '$ac_cv_func_'getopt_long`\" = yes"; then
2601   echo "$ac_t""yes" 1>&6
2602   :
2603 else
2604   echo "$ac_t""no" 1>&6
2605 LIBOBJS="$LIBOBJS getopt.o getopt1.o"
2606 fi
2607
2608
2609
2610 CPPFLAGS="${CPPFLAGS} -I/usr/local/include"
2611 for ac_hdr in stddef.h
2612 do
2613 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2614 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2615 echo "configure:2616: checking for $ac_hdr" >&5
2616 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2617   echo $ac_n "(cached) $ac_c" 1>&6
2618 else
2619   cat > conftest.$ac_ext <<EOF
2620 #line 2621 "configure"
2621 #include "confdefs.h"
2622 #include <$ac_hdr>
2623 EOF
2624 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2625 { (eval echo configure:2626: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2626 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2627 if test -z "$ac_err"; then
2628   rm -rf conftest*
2629   eval "ac_cv_header_$ac_safe=yes"
2630 else
2631   echo "$ac_err" >&5
2632   echo "configure: failed program was:" >&5
2633   cat conftest.$ac_ext >&5
2634   rm -rf conftest*
2635   eval "ac_cv_header_$ac_safe=no"
2636 fi
2637 rm -f conftest*
2638 fi
2639 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2640   echo "$ac_t""yes" 1>&6
2641     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2642   cat >> confdefs.h <<EOF
2643 #define $ac_tr_hdr 1
2644 EOF
2645  
2646 else
2647   echo "$ac_t""no" 1>&6
2648 fi
2649 done
2650
2651 for ac_hdr in getopt.h
2652 do
2653 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2654 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2655 echo "configure:2656: checking for $ac_hdr" >&5
2656 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2657   echo $ac_n "(cached) $ac_c" 1>&6
2658 else
2659   cat > conftest.$ac_ext <<EOF
2660 #line 2661 "configure"
2661 #include "confdefs.h"
2662 #include <$ac_hdr>
2663 EOF
2664 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2665 { (eval echo configure:2666: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2666 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2667 if test -z "$ac_err"; then
2668   rm -rf conftest*
2669   eval "ac_cv_header_$ac_safe=yes"
2670 else
2671   echo "$ac_err" >&5
2672   echo "configure: failed program was:" >&5
2673   cat conftest.$ac_ext >&5
2674   rm -rf conftest*
2675   eval "ac_cv_header_$ac_safe=no"
2676 fi
2677 rm -f conftest*
2678 fi
2679 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2680   echo "$ac_t""yes" 1>&6
2681     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2682   cat >> confdefs.h <<EOF
2683 #define $ac_tr_hdr 1
2684 EOF
2685  
2686 else
2687   echo "$ac_t""no" 1>&6
2688 fi
2689 done
2690
2691 for ac_hdr in sys/sockio.h
2692 do
2693 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2694 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2695 echo "configure:2696: checking for $ac_hdr" >&5
2696 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2697   echo $ac_n "(cached) $ac_c" 1>&6
2698 else
2699   cat > conftest.$ac_ext <<EOF
2700 #line 2701 "configure"
2701 #include "confdefs.h"
2702 #include <$ac_hdr>
2703 EOF
2704 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2705 { (eval echo configure:2706: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2706 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2707 if test -z "$ac_err"; then
2708   rm -rf conftest*
2709   eval "ac_cv_header_$ac_safe=yes"
2710 else
2711   echo "$ac_err" >&5
2712   echo "configure: failed program was:" >&5
2713   cat conftest.$ac_ext >&5
2714   rm -rf conftest*
2715   eval "ac_cv_header_$ac_safe=no"
2716 fi
2717 rm -f conftest*
2718 fi
2719 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2720   echo "$ac_t""yes" 1>&6
2721     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2722   cat >> confdefs.h <<EOF
2723 #define $ac_tr_hdr 1
2724 EOF
2725  
2726 else
2727   echo "$ac_t""no" 1>&6
2728 fi
2729 done
2730
2731 for ac_hdr in fcntl.h sys/ioctl.h sys/time.h unistd.h
2732 do
2733 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2734 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2735 echo "configure:2736: checking for $ac_hdr" >&5
2736 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2737   echo $ac_n "(cached) $ac_c" 1>&6
2738 else
2739   cat > conftest.$ac_ext <<EOF
2740 #line 2741 "configure"
2741 #include "confdefs.h"
2742 #include <$ac_hdr>
2743 EOF
2744 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2745 { (eval echo configure:2746: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2746 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2747 if test -z "$ac_err"; then
2748   rm -rf conftest*
2749   eval "ac_cv_header_$ac_safe=yes"
2750 else
2751   echo "$ac_err" >&5
2752   echo "configure: failed program was:" >&5
2753   cat conftest.$ac_ext >&5
2754   rm -rf conftest*
2755   eval "ac_cv_header_$ac_safe=no"
2756 fi
2757 rm -f conftest*
2758 fi
2759 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2760   echo "$ac_t""yes" 1>&6
2761     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2762   cat >> confdefs.h <<EOF
2763 #define $ac_tr_hdr 1
2764 EOF
2765  
2766 else
2767   echo "$ac_t""no" 1>&6
2768 fi
2769 done
2770
2771 for ac_hdr in sys/soundcard.h machine/soundcard.h
2772 do
2773 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2774 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2775 echo "configure:2776: checking for $ac_hdr" >&5
2776 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2777   echo $ac_n "(cached) $ac_c" 1>&6
2778 else
2779   cat > conftest.$ac_ext <<EOF
2780 #line 2781 "configure"
2781 #include "confdefs.h"
2782 #include <$ac_hdr>
2783 EOF
2784 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2785 { (eval echo configure:2786: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2786 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2787 if test -z "$ac_err"; then
2788   rm -rf conftest*
2789   eval "ac_cv_header_$ac_safe=yes"
2790 else
2791   echo "$ac_err" >&5
2792   echo "configure: failed program was:" >&5
2793   cat conftest.$ac_ext >&5
2794   rm -rf conftest*
2795   eval "ac_cv_header_$ac_safe=no"
2796 fi
2797 rm -f conftest*
2798 fi
2799 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2800   echo "$ac_t""yes" 1>&6
2801     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2802   cat >> confdefs.h <<EOF
2803 #define $ac_tr_hdr 1
2804 EOF
2805  
2806 else
2807   echo "$ac_t""no" 1>&6
2808 fi
2809 done
2810
2811 for ac_hdr in dlfcn.h image.h
2812 do
2813 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2814 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2815 echo "configure:2816: checking for $ac_hdr" >&5
2816 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2817   echo $ac_n "(cached) $ac_c" 1>&6
2818 else
2819   cat > conftest.$ac_ext <<EOF
2820 #line 2821 "configure"
2821 #include "confdefs.h"
2822 #include <$ac_hdr>
2823 EOF
2824 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2825 { (eval echo configure:2826: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2826 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2827 if test -z "$ac_err"; then
2828   rm -rf conftest*
2829   eval "ac_cv_header_$ac_safe=yes"
2830 else
2831   echo "$ac_err" >&5
2832   echo "configure: failed program was:" >&5
2833   cat conftest.$ac_ext >&5
2834   rm -rf conftest*
2835   eval "ac_cv_header_$ac_safe=no"
2836 fi
2837 rm -f conftest*
2838 fi
2839 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2840   echo "$ac_t""yes" 1>&6
2841     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2842   cat >> confdefs.h <<EOF
2843 #define $ac_tr_hdr 1
2844 EOF
2845  
2846 else
2847   echo "$ac_t""no" 1>&6
2848 fi
2849 done
2850
2851 for ac_hdr in arpa/inet.h net/if.h netinet/in.h sys/socket.h
2852 do
2853 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2854 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2855 echo "configure:2856: checking for $ac_hdr" >&5
2856 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2857   echo $ac_n "(cached) $ac_c" 1>&6
2858 else
2859   cat > conftest.$ac_ext <<EOF
2860 #line 2861 "configure"
2861 #include "confdefs.h"
2862 #include <$ac_hdr>
2863 EOF
2864 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2865 { (eval echo configure:2866: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2866 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2867 if test -z "$ac_err"; then
2868   rm -rf conftest*
2869   eval "ac_cv_header_$ac_safe=yes"
2870 else
2871   echo "$ac_err" >&5
2872   echo "configure: failed program was:" >&5
2873   cat conftest.$ac_ext >&5
2874   rm -rf conftest*
2875   eval "ac_cv_header_$ac_safe=no"
2876 fi
2877 rm -f conftest*
2878 fi
2879 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2880   echo "$ac_t""yes" 1>&6
2881     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2882   cat >> confdefs.h <<EOF
2883 #define $ac_tr_hdr 1
2884 EOF
2885  
2886 else
2887   echo "$ac_t""no" 1>&6
2888 fi
2889 done
2890
2891 for ac_hdr in machine/param.h
2892 do
2893 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2894 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2895 echo "configure:2896: checking for $ac_hdr" >&5
2896 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2897   echo $ac_n "(cached) $ac_c" 1>&6
2898 else
2899   cat > conftest.$ac_ext <<EOF
2900 #line 2901 "configure"
2901 #include "confdefs.h"
2902 #include <$ac_hdr>
2903 EOF
2904 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2905 { (eval echo configure:2906: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2906 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2907 if test -z "$ac_err"; then
2908   rm -rf conftest*
2909   eval "ac_cv_header_$ac_safe=yes"
2910 else
2911   echo "$ac_err" >&5
2912   echo "configure: failed program was:" >&5
2913   cat conftest.$ac_ext >&5
2914   rm -rf conftest*
2915   eval "ac_cv_header_$ac_safe=no"
2916 fi
2917 rm -f conftest*
2918 fi
2919 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2920   echo "$ac_t""yes" 1>&6
2921     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2922   cat >> confdefs.h <<EOF
2923 #define $ac_tr_hdr 1
2924 EOF
2925  
2926 else
2927   echo "$ac_t""no" 1>&6
2928 fi
2929 done
2930
2931
2932 for ac_hdr in cthreads.h pthread.h kernel/scheduler.h kernel/OS.h
2933 do
2934 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2935 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2936 echo "configure:2937: checking for $ac_hdr" >&5
2937 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2938   echo $ac_n "(cached) $ac_c" 1>&6
2939 else
2940   cat > conftest.$ac_ext <<EOF
2941 #line 2942 "configure"
2942 #include "confdefs.h"
2943 #include <$ac_hdr>
2944 EOF
2945 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2946 { (eval echo configure:2947: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2947 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2948 if test -z "$ac_err"; then
2949   rm -rf conftest*
2950   eval "ac_cv_header_$ac_safe=yes"
2951 else
2952   echo "$ac_err" >&5
2953   echo "configure: failed program was:" >&5
2954   cat conftest.$ac_ext >&5
2955   rm -rf conftest*
2956   eval "ac_cv_header_$ac_safe=no"
2957 fi
2958 rm -f conftest*
2959 fi
2960 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2961   echo "$ac_t""yes" 1>&6
2962     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2963   cat >> confdefs.h <<EOF
2964 #define $ac_tr_hdr 1
2965 EOF
2966  
2967 else
2968   echo "$ac_t""no" 1>&6
2969 fi
2970 done
2971
2972
2973 save_CFLAGS=$CFLAGS
2974 CFLAGS="${CFLAGS} -Wall -Werror"
2975 echo $ac_n "checking for ntohl in sys/param.h""... $ac_c" 1>&6
2976 echo "configure:2977: checking for ntohl in sys/param.h" >&5
2977 cat > conftest.$ac_ext <<EOF
2978 #line 2979 "configure"
2979 #include "confdefs.h"
2980 #include <sys/param.h>
2981 void foo() { int meuh; ntohl(meuh); }
2982 int main() {
2983
2984 ; return 0; }
2985 EOF
2986 if { (eval echo configure:2987: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2987   rm -rf conftest*
2988   cat >> confdefs.h <<\EOF
2989 #define NTOHL_IN_SYS_PARAM_H 1
2990 EOF
2991
2992  echo "$ac_t""yes" 1>&6
2993 else
2994   echo "configure: failed program was:" >&5
2995   cat conftest.$ac_ext >&5
2996   rm -rf conftest*
2997   echo "$ac_t""no" 1>&6
2998 fi
2999 rm -f conftest*
3000 CFLAGS=$save_CFLAGS
3001
3002 echo $ac_n "checking for working const""... $ac_c" 1>&6
3003 echo "configure:3004: checking for working const" >&5
3004 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
3005   echo $ac_n "(cached) $ac_c" 1>&6
3006 else
3007   cat > conftest.$ac_ext <<EOF
3008 #line 3009 "configure"
3009 #include "confdefs.h"
3010
3011 int main() {
3012
3013 /* Ultrix mips cc rejects this.  */
3014 typedef int charset[2]; const charset x = {0,0};
3015 /* SunOS 4.1.1 cc rejects this.  */
3016 char const *const *ccp;
3017 char **p;
3018 /* NEC SVR4.0.2 mips cc rejects this.  */
3019 struct point {int x, y;};
3020 static struct point const zero = {0,0};
3021 /* AIX XL C 1.02.0.0 rejects this.
3022    It does not let you subtract one const X* pointer from another in an arm
3023    of an if-expression whose if-part is not a constant expression */
3024 const char *g = "string";
3025 ccp = &g + (g ? g-g : 0);
3026 /* HPUX 7.0 cc rejects these. */
3027 ++ccp;
3028 p = (char**) ccp;
3029 ccp = (char const *const *) p;
3030 { /* SCO 3.2v4 cc rejects this.  */
3031   char *t;
3032   char const *s = 0 ? (char *) 0 : (char const *) 0;
3033
3034   *t++ = 0;
3035 }
3036 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
3037   int x[] = {25, 17};
3038   const int *foo = &x[0];
3039   ++foo;
3040 }
3041 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3042   typedef const int *iptr;
3043   iptr p = 0;
3044   ++p;
3045 }
3046 { /* AIX XL C 1.02.0.0 rejects this saying
3047      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3048   struct s { int j; const int *ap[3]; };
3049   struct s *b; b->j = 5;
3050 }
3051 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3052   const int foo = 10;
3053 }
3054
3055 ; return 0; }
3056 EOF
3057 if { (eval echo configure:3058: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3058   rm -rf conftest*
3059   ac_cv_c_const=yes
3060 else
3061   echo "configure: failed program was:" >&5
3062   cat conftest.$ac_ext >&5
3063   rm -rf conftest*
3064   ac_cv_c_const=no
3065 fi
3066 rm -f conftest*
3067 fi
3068
3069 echo "$ac_t""$ac_cv_c_const" 1>&6
3070 if test $ac_cv_c_const = no; then
3071   cat >> confdefs.h <<\EOF
3072 #define const 
3073 EOF
3074
3075 fi
3076
3077 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3078 echo "configure:3079: checking for ANSI C header files" >&5
3079 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
3080   echo $ac_n "(cached) $ac_c" 1>&6
3081 else
3082   cat > conftest.$ac_ext <<EOF
3083 #line 3084 "configure"
3084 #include "confdefs.h"
3085 #include <stdlib.h>
3086 #include <stdarg.h>
3087 #include <string.h>
3088 #include <float.h>
3089 EOF
3090 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3091 { (eval echo configure:3092: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3092 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3093 if test -z "$ac_err"; then
3094   rm -rf conftest*
3095   ac_cv_header_stdc=yes
3096 else
3097   echo "$ac_err" >&5
3098   echo "configure: failed program was:" >&5
3099   cat conftest.$ac_ext >&5
3100   rm -rf conftest*
3101   ac_cv_header_stdc=no
3102 fi
3103 rm -f conftest*
3104
3105 if test $ac_cv_header_stdc = yes; then
3106   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3107 cat > conftest.$ac_ext <<EOF
3108 #line 3109 "configure"
3109 #include "confdefs.h"
3110 #include <string.h>
3111 EOF
3112 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3113   egrep "memchr" >/dev/null 2>&1; then
3114   :
3115 else
3116   rm -rf conftest*
3117   ac_cv_header_stdc=no
3118 fi
3119 rm -f conftest*
3120
3121 fi
3122
3123 if test $ac_cv_header_stdc = yes; then
3124   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3125 cat > conftest.$ac_ext <<EOF
3126 #line 3127 "configure"
3127 #include "confdefs.h"
3128 #include <stdlib.h>
3129 EOF
3130 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3131   egrep "free" >/dev/null 2>&1; then
3132   :
3133 else
3134   rm -rf conftest*
3135   ac_cv_header_stdc=no
3136 fi
3137 rm -f conftest*
3138
3139 fi
3140
3141 if test $ac_cv_header_stdc = yes; then
3142   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3143 if test "$cross_compiling" = yes; then
3144   :
3145 else
3146   cat > conftest.$ac_ext <<EOF
3147 #line 3148 "configure"
3148 #include "confdefs.h"
3149 #include <ctype.h>
3150 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3151 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3152 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3153 int main () { int i; for (i = 0; i < 256; i++)
3154 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3155 exit (0); }
3156
3157 EOF
3158 if { (eval echo configure:3159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3159 then
3160   :
3161 else
3162   echo "configure: failed program was:" >&5
3163   cat conftest.$ac_ext >&5
3164   rm -fr conftest*
3165   ac_cv_header_stdc=no
3166 fi
3167 rm -fr conftest*
3168 fi
3169
3170 fi
3171 fi
3172
3173 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3174 if test $ac_cv_header_stdc = yes; then
3175   cat >> confdefs.h <<\EOF
3176 #define STDC_HEADERS 1
3177 EOF
3178
3179 fi
3180
3181 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3182 echo "configure:3183: checking for size_t" >&5
3183 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
3184   echo $ac_n "(cached) $ac_c" 1>&6
3185 else
3186   cat > conftest.$ac_ext <<EOF
3187 #line 3188 "configure"
3188 #include "confdefs.h"
3189 #include <sys/types.h>
3190 #if STDC_HEADERS
3191 #include <stdlib.h>
3192 #include <stddef.h>
3193 #endif
3194 EOF
3195 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3196   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3197   rm -rf conftest*
3198   ac_cv_type_size_t=yes
3199 else
3200   rm -rf conftest*
3201   ac_cv_type_size_t=no
3202 fi
3203 rm -f conftest*
3204
3205 fi
3206 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3207 if test $ac_cv_type_size_t = no; then
3208   cat >> confdefs.h <<\EOF
3209 #define size_t unsigned
3210 EOF
3211
3212 fi
3213
3214 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3215 echo "configure:3216: checking whether time.h and sys/time.h may both be included" >&5
3216 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
3217   echo $ac_n "(cached) $ac_c" 1>&6
3218 else
3219   cat > conftest.$ac_ext <<EOF
3220 #line 3221 "configure"
3221 #include "confdefs.h"
3222 #include <sys/types.h>
3223 #include <sys/time.h>
3224 #include <time.h>
3225 int main() {
3226 struct tm *tp;
3227 ; return 0; }
3228 EOF
3229 if { (eval echo configure:3230: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3230   rm -rf conftest*
3231   ac_cv_header_time=yes
3232 else
3233   echo "configure: failed program was:" >&5
3234   cat conftest.$ac_ext >&5
3235   rm -rf conftest*
3236   ac_cv_header_time=no
3237 fi
3238 rm -f conftest*
3239 fi
3240
3241 echo "$ac_t""$ac_cv_header_time" 1>&6
3242 if test $ac_cv_header_time = yes; then
3243   cat >> confdefs.h <<\EOF
3244 #define TIME_WITH_SYS_TIME 1
3245 EOF
3246
3247 fi
3248
3249
3250 PLUGINS=${PLUGINS}"yuv ";
3251
3252 ARCH=${host_cpu}
3253 # Check whether --enable-ppro or --disable-ppro was given.
3254 if test "${enable_ppro+set}" = set; then
3255   enableval="$enable_ppro"
3256    if test x$enableval = xyes; then ARCH=${ARCH}" ppro"; fi 
3257 else
3258    if test x${host_cpu} = xi686; then ARCH=${ARCH}" ppro"; fi 
3259 fi
3260
3261 # Check whether --enable-mmx or --disable-mmx was given.
3262 if test "${enable_mmx+set}" = set; then
3263   enableval="$enable_mmx"
3264    if test x$enableval = xyes; then ARCH=${ARCH}" mmx"; PLUGINS=${PLUGINS}"yuvmmx "; fi 
3265 else
3266    if test x${host_cpu} = xi686 -o x${host_cpu} = xi586; then ARCH=${ARCH}" mmx"; PLUGINS=${PLUGINS}"yuvmmx "; fi 
3267 fi
3268
3269 # Check whether --enable-debug or --disable-debug was given.
3270 if test "${enable_debug+set}" = set; then
3271   enableval="$enable_debug"
3272    if test x$enableval = xyes; then DEBUG=1; fi 
3273 fi
3274
3275 # Check whether --enable-stats or --disable-stats was given.
3276 if test "${enable_stats+set}" = set; then
3277   enableval="$enable_stats"
3278    if test x$enableval = xyes; then STATS=1; fi 
3279 fi
3280
3281 # Check whether --enable-optimizations or --disable-optimizations was given.
3282 if test "${enable_optimizations+set}" = set; then
3283   enableval="$enable_optimizations"
3284    if test x$enableval = xno; then OPTIMS=0; fi 
3285 else
3286    OPTIMS=1 
3287 fi
3288
3289
3290 SYS=${host_os}
3291
3292 # special cases
3293 if test x$host_os = xbeos; then
3294     PLUGINS=${PLUGINS}"dummy beos "
3295
3296 else
3297
3298 # Check whether --enable-dummy or --disable-dummy was given.
3299 if test "${enable_dummy+set}" = set; then
3300   enableval="$enable_dummy"
3301   :
3302 fi
3303
3304 if test x$enable_dummy != xno; then PLUGINS=${PLUGINS}"dummy "; fi
3305 # Check whether --enable-dsp or --disable-dsp was given.
3306 if test "${enable_dsp+set}" = set; then
3307   enableval="$enable_dsp"
3308   :
3309 fi
3310
3311 if test x$enable_dsp != xno; then PLUGINS=${PLUGINS}"dsp "; fi
3312 # Check whether --enable-esd or --disable-esd was given.
3313 if test "${enable_esd+set}" = set; then
3314   enableval="$enable_esd"
3315   if test x$enable_esd = xyes; then PLUGINS=${PLUGINS}"esd "; fi
3316 fi
3317
3318 # Check whether --enable-fb or --disable-fb was given.
3319 if test "${enable_fb+set}" = set; then
3320   enableval="$enable_fb"
3321   if test x$enable_fb = xyes; then PLUGINS=${PLUGINS}"fb "; ALIASES=${ALIASES}"fbvlc "; fi
3322 fi
3323
3324 # Check whether --with-ggi or --without-ggi was given.
3325 if test "${with_ggi+set}" = set; then
3326   withval="$with_ggi"
3327    PLUGINS=${PLUGINS}"ggi ";
3328     if test "x$withval" != "xyes";
3329     then
3330       LIB_GGI="-l"$withval
3331     else
3332       LIB_GGI="-lggi"
3333     fi 
3334 fi
3335
3336 # Check whether --with-sdl or --without-sdl was given.
3337 if test "${with_sdl+set}" = set; then
3338   withval="$with_sdl"
3339    PLUGINS=${PLUGINS}"sdl ";
3340     if test "x$withval" != "xyes";
3341     then
3342       LIB_SDL="-l"$withval
3343     else
3344       LIB_SDL="-lSDL"
3345     fi 
3346 fi
3347
3348 # Check whether --with-glide or --without-glide was given.
3349 if test "${with_glide+set}" = set; then
3350   withval="$with_glide"
3351    PLUGINS=${PLUGINS}"glide ";
3352     if test "x$withval" != "xyes";
3353     then
3354       LIB_GLIDE="-l"$withval
3355     else
3356       LIB_GLIDE="-lglide2x"
3357     fi 
3358 fi
3359
3360 # Check whether --enable-null or --disable-null was given.
3361 if test "${enable_null+set}" = set; then
3362   enableval="$enable_null"
3363   if test x$enable_null = xyes; then PLUGINS=${PLUGINS}"null "; fi
3364 fi
3365
3366 # Check whether --enable-gnome or --disable-gnome was given.
3367 if test "${enable_gnome+set}" = set; then
3368   enableval="$enable_gnome"
3369   if test x$enable_gnome = xyes; then PLUGINS=${PLUGINS}"gnome "; ALIASES=${ALIASES}"gvlc "; fi
3370 fi
3371
3372 # Check whether --enable-x11 or --disable-x11 was given.
3373 if test "${enable_x11+set}" = set; then
3374   enableval="$enable_x11"
3375   :
3376 fi
3377
3378 if test x$enable_x11 != xno; then PLUGINS=${PLUGINS}"x11 "; fi
3379 # Check whether --enable-alsa or --disable-alsa was given.
3380 if test "${enable_alsa+set}" = set; then
3381   enableval="$enable_alsa"
3382   if test x$enable_alsa = xyes; then ac_safe=`echo "sys/asoundlib.h" | sed 'y%./+-%__p_%'`
3383 echo $ac_n "checking for sys/asoundlib.h""... $ac_c" 1>&6
3384 echo "configure:3385: checking for sys/asoundlib.h" >&5
3385 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3386   echo $ac_n "(cached) $ac_c" 1>&6
3387 else
3388   cat > conftest.$ac_ext <<EOF
3389 #line 3390 "configure"
3390 #include "confdefs.h"
3391 #include <sys/asoundlib.h>
3392 EOF
3393 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3394 { (eval echo configure:3395: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3395 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3396 if test -z "$ac_err"; then
3397   rm -rf conftest*
3398   eval "ac_cv_header_$ac_safe=yes"
3399 else
3400   echo "$ac_err" >&5
3401   echo "configure: failed program was:" >&5
3402   cat conftest.$ac_ext >&5
3403   rm -rf conftest*
3404   eval "ac_cv_header_$ac_safe=no"
3405 fi
3406 rm -f conftest*
3407 fi
3408 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3409   echo "$ac_t""yes" 1>&6
3410   echo $ac_n "checking for main in -lasound""... $ac_c" 1>&6
3411 echo "configure:3412: checking for main in -lasound" >&5
3412 ac_lib_var=`echo asound'_'main | sed 'y%./+-%__p_%'`
3413 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3414   echo $ac_n "(cached) $ac_c" 1>&6
3415 else
3416   ac_save_LIBS="$LIBS"
3417 LIBS="-lasound  $LIBS"
3418 cat > conftest.$ac_ext <<EOF
3419 #line 3420 "configure"
3420 #include "confdefs.h"
3421
3422 int main() {
3423 main()
3424 ; return 0; }
3425 EOF
3426 if { (eval echo configure:3427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3427   rm -rf conftest*
3428   eval "ac_cv_lib_$ac_lib_var=yes"
3429 else
3430   echo "configure: failed program was:" >&5
3431   cat conftest.$ac_ext >&5
3432   rm -rf conftest*
3433   eval "ac_cv_lib_$ac_lib_var=no"
3434 fi
3435 rm -f conftest*
3436 LIBS="$ac_save_LIBS"
3437
3438 fi
3439 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3440   echo "$ac_t""yes" 1>&6
3441   have_alsa="true"
3442 else
3443   echo "$ac_t""no" 1>&6
3444 have_alsa="false"
3445 fi
3446
3447 else
3448   echo "$ac_t""no" 1>&6
3449 have_alsa="false"
3450 fi
3451  if test $have_alsa = true; then PLUGINS=${PLUGINS}"alsa "; fi; fi
3452 fi
3453
3454
3455 fi
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468 trap '' 1 2 15
3469 cat > confcache <<\EOF
3470 # This file is a shell script that caches the results of configure
3471 # tests run on this system so they can be shared between configure
3472 # scripts and configure runs.  It is not useful on other systems.
3473 # If it contains results you don't want to keep, you may remove or edit it.
3474 #
3475 # By default, configure uses ./config.cache as the cache file,
3476 # creating it if it does not exist already.  You can give configure
3477 # the --cache-file=FILE option to use a different cache file; that is
3478 # what configure does when it calls configure scripts in
3479 # subdirectories, so they share the cache.
3480 # Giving --cache-file=/dev/null disables caching, for debugging configure.
3481 # config.status only pays attention to the cache file if you give it the
3482 # --recheck option to rerun configure.
3483 #
3484 EOF
3485 # The following way of writing the cache mishandles newlines in values,
3486 # but we know of no workaround that is simple, portable, and efficient.
3487 # So, don't put newlines in cache variables' values.
3488 # Ultrix sh set writes to stderr and can't be redirected directly,
3489 # and sets the high bit in the cache file unless we assign to the vars.
3490 (set) 2>&1 |
3491   case `(ac_space=' '; set | grep ac_space) 2>&1` in
3492   *ac_space=\ *)
3493     # `set' does not quote correctly, so add quotes (double-quote substitution
3494     # turns \\\\ into \\, and sed turns \\ into \).
3495     sed -n \
3496       -e "s/'/'\\\\''/g" \
3497       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
3498     ;;
3499   *)
3500     # `set' quotes correctly as required by POSIX, so do not add quotes.
3501     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
3502     ;;
3503   esac >> confcache
3504 if cmp -s $cache_file confcache; then
3505   :
3506 else
3507   if test -w $cache_file; then
3508     echo "updating cache $cache_file"
3509     cat confcache > $cache_file
3510   else
3511     echo "not updating unwritable cache $cache_file"
3512   fi
3513 fi
3514 rm -f confcache
3515
3516 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
3517
3518 test "x$prefix" = xNONE && prefix=$ac_default_prefix
3519 # Let make expand exec_prefix.
3520 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
3521
3522 # Any assignment to VPATH causes Sun make to only execute
3523 # the first set of double-colon rules, so remove it if not needed.
3524 # If there is a colon in the path, we need to keep it.
3525 if test "x$srcdir" = x.; then
3526   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
3527 fi
3528
3529 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
3530
3531 DEFS=-DHAVE_CONFIG_H
3532
3533 # Without the "./", some shells look in PATH for config.status.
3534 : ${CONFIG_STATUS=./config.status}
3535
3536 echo creating $CONFIG_STATUS
3537 rm -f $CONFIG_STATUS
3538 cat > $CONFIG_STATUS <<EOF
3539 #! /bin/sh
3540 # Generated automatically by configure.
3541 # Run this file to recreate the current configuration.
3542 # This directory was configured as follows,
3543 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3544 #
3545 # $0 $ac_configure_args
3546 #
3547 # Compiler output produced by configure, useful for debugging
3548 # configure, is in ./config.log if it exists.
3549
3550 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
3551 for ac_option
3552 do
3553   case "\$ac_option" in
3554   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
3555     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
3556     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
3557   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
3558     echo "$CONFIG_STATUS generated by autoconf version 2.13"
3559     exit 0 ;;
3560   -help | --help | --hel | --he | --h)
3561     echo "\$ac_cs_usage"; exit 0 ;;
3562   *) echo "\$ac_cs_usage"; exit 1 ;;
3563   esac
3564 done
3565
3566 ac_given_srcdir=$srcdir
3567 ac_given_INSTALL="$INSTALL"
3568
3569 trap 'rm -fr `echo "Makefile include/config.h include/defs.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
3570 EOF
3571 cat >> $CONFIG_STATUS <<EOF
3572
3573 # Protect against being on the right side of a sed subst in config.status.
3574 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
3575  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
3576 $ac_vpsub
3577 $extrasub
3578 s%@SHELL@%$SHELL%g
3579 s%@CFLAGS@%$CFLAGS%g
3580 s%@CPPFLAGS@%$CPPFLAGS%g
3581 s%@CXXFLAGS@%$CXXFLAGS%g
3582 s%@FFLAGS@%$FFLAGS%g
3583 s%@DEFS@%$DEFS%g
3584 s%@LDFLAGS@%$LDFLAGS%g
3585 s%@LIBS@%$LIBS%g
3586 s%@exec_prefix@%$exec_prefix%g
3587 s%@prefix@%$prefix%g
3588 s%@program_transform_name@%$program_transform_name%g
3589 s%@bindir@%$bindir%g
3590 s%@sbindir@%$sbindir%g
3591 s%@libexecdir@%$libexecdir%g
3592 s%@datadir@%$datadir%g
3593 s%@sysconfdir@%$sysconfdir%g
3594 s%@sharedstatedir@%$sharedstatedir%g
3595 s%@localstatedir@%$localstatedir%g
3596 s%@libdir@%$libdir%g
3597 s%@includedir@%$includedir%g
3598 s%@oldincludedir@%$oldincludedir%g
3599 s%@infodir@%$infodir%g
3600 s%@mandir@%$mandir%g
3601 s%@host@%$host%g
3602 s%@host_alias@%$host_alias%g
3603 s%@host_cpu@%$host_cpu%g
3604 s%@host_vendor@%$host_vendor%g
3605 s%@host_os@%$host_os%g
3606 s%@VLC_VERSION@%$VLC_VERSION%g
3607 s%@VLC_CODENAME@%$VLC_CODENAME%g
3608 s%@SET_MAKE@%$SET_MAKE%g
3609 s%@CC@%$CC%g
3610 s%@CPP@%$CPP%g
3611 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
3612 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
3613 s%@INSTALL_DATA@%$INSTALL_DATA%g
3614 s%@LIBOBJS@%$LIBOBJS%g
3615 s%@SYS@%$SYS%g
3616 s%@ARCH@%$ARCH%g
3617 s%@PLUGINS@%$PLUGINS%g
3618 s%@ALIASES@%$ALIASES%g
3619 s%@DEBUG@%$DEBUG%g
3620 s%@STATS@%$STATS%g
3621 s%@OPTIMS@%$OPTIMS%g
3622 s%@LIB_SDL@%$LIB_SDL%g
3623 s%@LIB_GLIDE@%$LIB_GLIDE%g
3624 s%@LIB_GGI@%$LIB_GGI%g
3625
3626 CEOF
3627 EOF
3628
3629 cat >> $CONFIG_STATUS <<\EOF
3630
3631 # Split the substitutions into bite-sized pieces for seds with
3632 # small command number limits, like on Digital OSF/1 and HP-UX.
3633 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
3634 ac_file=1 # Number of current file.
3635 ac_beg=1 # First line for current file.
3636 ac_end=$ac_max_sed_cmds # Line after last line for current file.
3637 ac_more_lines=:
3638 ac_sed_cmds=""
3639 while $ac_more_lines; do
3640   if test $ac_beg -gt 1; then
3641     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
3642   else
3643     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
3644   fi
3645   if test ! -s conftest.s$ac_file; then
3646     ac_more_lines=false
3647     rm -f conftest.s$ac_file
3648   else
3649     if test -z "$ac_sed_cmds"; then
3650       ac_sed_cmds="sed -f conftest.s$ac_file"
3651     else
3652       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
3653     fi
3654     ac_file=`expr $ac_file + 1`
3655     ac_beg=$ac_end
3656     ac_end=`expr $ac_end + $ac_max_sed_cmds`
3657   fi
3658 done
3659 if test -z "$ac_sed_cmds"; then
3660   ac_sed_cmds=cat
3661 fi
3662 EOF
3663
3664 cat >> $CONFIG_STATUS <<EOF
3665
3666 CONFIG_FILES=\${CONFIG_FILES-"Makefile include/config.h"}
3667 EOF
3668 cat >> $CONFIG_STATUS <<\EOF
3669 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
3670   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3671   case "$ac_file" in
3672   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3673        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3674   *) ac_file_in="${ac_file}.in" ;;
3675   esac
3676
3677   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
3678
3679   # Remove last slash and all that follows it.  Not all systems have dirname.
3680   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3681   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3682     # The file is in a subdirectory.
3683     test ! -d "$ac_dir" && mkdir "$ac_dir"
3684     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
3685     # A "../" for each directory in $ac_dir_suffix.
3686     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
3687   else
3688     ac_dir_suffix= ac_dots=
3689   fi
3690
3691   case "$ac_given_srcdir" in
3692   .)  srcdir=.
3693       if test -z "$ac_dots"; then top_srcdir=.
3694       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
3695   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
3696   *) # Relative path.
3697     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
3698     top_srcdir="$ac_dots$ac_given_srcdir" ;;
3699   esac
3700
3701   case "$ac_given_INSTALL" in
3702   [/$]*) INSTALL="$ac_given_INSTALL" ;;
3703   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3704   esac
3705
3706   echo creating "$ac_file"
3707   rm -f "$ac_file"
3708   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
3709   case "$ac_file" in
3710   *Makefile*) ac_comsub="1i\\
3711 # $configure_input" ;;
3712   *) ac_comsub= ;;
3713   esac
3714
3715   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3716   sed -e "$ac_comsub
3717 s%@configure_input@%$configure_input%g
3718 s%@srcdir@%$srcdir%g
3719 s%@top_srcdir@%$top_srcdir%g
3720 s%@INSTALL@%$INSTALL%g
3721 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
3722 fi; done
3723 rm -f conftest.s*
3724
3725 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
3726 # NAME is the cpp macro being defined and VALUE is the value it is being given.
3727 #
3728 # ac_d sets the value in "#define NAME VALUE" lines.
3729 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
3730 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
3731 ac_dC='\3'
3732 ac_dD='%g'
3733 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
3734 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
3735 ac_uB='\([      ]\)%\1#\2define\3'
3736 ac_uC=' '
3737 ac_uD='\4%g'
3738 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
3739 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
3740 ac_eB='$%\1#\2define\3'
3741 ac_eC=' '
3742 ac_eD='%g'
3743
3744 if test "${CONFIG_HEADERS+set}" != set; then
3745 EOF
3746 cat >> $CONFIG_STATUS <<EOF
3747   CONFIG_HEADERS="include/defs.h"
3748 EOF
3749 cat >> $CONFIG_STATUS <<\EOF
3750 fi
3751 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
3752   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3753   case "$ac_file" in
3754   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3755        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3756   *) ac_file_in="${ac_file}.in" ;;
3757   esac
3758
3759   echo creating $ac_file
3760
3761   rm -f conftest.frag conftest.in conftest.out
3762   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3763   cat $ac_file_inputs > conftest.in
3764
3765 EOF
3766
3767 # Transform confdefs.h into a sed script conftest.vals that substitutes
3768 # the proper values into config.h.in to produce config.h.  And first:
3769 # Protect against being on the right side of a sed subst in config.status.
3770 # Protect against being in an unquoted here document in config.status.
3771 rm -f conftest.vals
3772 cat > conftest.hdr <<\EOF
3773 s/[\\&%]/\\&/g
3774 s%[\\$`]%\\&%g
3775 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
3776 s%ac_d%ac_u%gp
3777 s%ac_u%ac_e%gp
3778 EOF
3779 sed -n -f conftest.hdr confdefs.h > conftest.vals
3780 rm -f conftest.hdr
3781
3782 # This sed command replaces #undef with comments.  This is necessary, for
3783 # example, in the case of _POSIX_SOURCE, which is predefined and required
3784 # on some systems where configure will not decide to define it.
3785 cat >> conftest.vals <<\EOF
3786 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
3787 EOF
3788
3789 # Break up conftest.vals because some shells have a limit on
3790 # the size of here documents, and old seds have small limits too.
3791
3792 rm -f conftest.tail
3793 while :
3794 do
3795   ac_lines=`grep -c . conftest.vals`
3796   # grep -c gives empty output for an empty file on some AIX systems.
3797   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
3798   # Write a limited-size here document to conftest.frag.
3799   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
3800   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
3801   echo 'CEOF
3802   sed -f conftest.frag conftest.in > conftest.out
3803   rm -f conftest.in
3804   mv conftest.out conftest.in
3805 ' >> $CONFIG_STATUS
3806   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
3807   rm -f conftest.vals
3808   mv conftest.tail conftest.vals
3809 done
3810 rm -f conftest.vals
3811
3812 cat >> $CONFIG_STATUS <<\EOF
3813   rm -f conftest.frag conftest.h
3814   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
3815   cat conftest.in >> conftest.h
3816   rm -f conftest.in
3817   if cmp -s $ac_file conftest.h 2>/dev/null; then
3818     echo "$ac_file is unchanged"
3819     rm -f conftest.h
3820   else
3821     # Remove last slash and all that follows it.  Not all systems have dirname.
3822       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3823       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3824       # The file is in a subdirectory.
3825       test ! -d "$ac_dir" && mkdir "$ac_dir"
3826     fi
3827     rm -f $ac_file
3828     mv conftest.h $ac_file
3829   fi
3830 fi; done
3831
3832 EOF
3833 cat >> $CONFIG_STATUS <<EOF
3834
3835 EOF
3836 cat >> $CONFIG_STATUS <<\EOF
3837
3838 exit 0
3839 EOF
3840 chmod +x $CONFIG_STATUS
3841 rm -fr confdefs* $ac_clean_files
3842 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
3843
3844
3845 echo "
3846 vlc configuration
3847 -----------------
3848 vlc version           : ${VLC_VERSION}
3849 system                : ${SYS}
3850 architecture          : ${ARCH}
3851 debug mode            : ${DEBUG}
3852 statistics            : ${STATS}
3853 optimizations         : ${OPTIMS}
3854 plugins               : ${PLUGINS}
3855 vlc aliases           : ${ALIASES}
3856 "
3857