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