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