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