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