]> git.sesse.net Git - vlc/blob - configure
Accept SDL 1.1.5 or later.
[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   --disable-sdl           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 = {0,0};
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 #include <stdlib.h>
2202 #include <sys/stat.h>
2203
2204 #ifdef HAVE_UNISTD_H
2205 # include <unistd.h>
2206 #endif
2207
2208 /* This mess was copied from the GNU getpagesize.h.  */
2209 #ifndef HAVE_GETPAGESIZE
2210
2211 /* Assume that all systems that can run configure have sys/param.h.  */
2212 # ifndef HAVE_SYS_PARAM_H
2213 #  define HAVE_SYS_PARAM_H 1
2214 # endif
2215
2216 # ifdef _SC_PAGESIZE
2217 #  define getpagesize() sysconf(_SC_PAGESIZE)
2218 # else /* no _SC_PAGESIZE */
2219 #  ifdef HAVE_SYS_PARAM_H
2220 #   include <sys/param.h>
2221 #   ifdef EXEC_PAGESIZE
2222 #    define getpagesize() EXEC_PAGESIZE
2223 #   else /* no EXEC_PAGESIZE */
2224 #    ifdef NBPG
2225 #     define getpagesize() NBPG * CLSIZE
2226 #     ifndef CLSIZE
2227 #      define CLSIZE 1
2228 #     endif /* no CLSIZE */
2229 #    else /* no NBPG */
2230 #     ifdef NBPC
2231 #      define getpagesize() NBPC
2232 #     else /* no NBPC */
2233 #      ifdef PAGESIZE
2234 #       define getpagesize() PAGESIZE
2235 #      endif /* PAGESIZE */
2236 #     endif /* no NBPC */
2237 #    endif /* no NBPG */
2238 #   endif /* no EXEC_PAGESIZE */
2239 #  else /* no HAVE_SYS_PARAM_H */
2240 #   define getpagesize() 8192   /* punt totally */
2241 #  endif /* no HAVE_SYS_PARAM_H */
2242 # endif /* no _SC_PAGESIZE */
2243
2244 #endif /* no HAVE_GETPAGESIZE */
2245
2246 #ifdef __cplusplus
2247 extern "C" { void *malloc(unsigned); }
2248 #else
2249 char *malloc();
2250 #endif
2251
2252 int
2253 main()
2254 {
2255         char *data, *data2, *data3;
2256         int i, pagesize;
2257         int fd;
2258
2259         pagesize = getpagesize();
2260
2261         /*
2262          * First, make a file with some known garbage in it.
2263          */
2264         data = (char*)malloc(pagesize);
2265         if (!data)
2266                 exit(1);
2267         for (i = 0; i < pagesize; ++i)
2268                 *(data + i) = rand();
2269         umask(0);
2270         fd = creat("conftestmmap", 0600);
2271         if (fd < 0)
2272                 exit(1);
2273         if (write(fd, data, pagesize) != pagesize)
2274                 exit(1);
2275         close(fd);
2276
2277         /*
2278          * Next, try to mmap the file at a fixed address which
2279          * already has something else allocated at it.  If we can,
2280          * also make sure that we see the same garbage.
2281          */
2282         fd = open("conftestmmap", O_RDWR);
2283         if (fd < 0)
2284                 exit(1);
2285         data2 = (char*)malloc(2 * pagesize);
2286         if (!data2)
2287                 exit(1);
2288         data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
2289         if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
2290             MAP_PRIVATE | MAP_FIXED, fd, 0L))
2291                 exit(1);
2292         for (i = 0; i < pagesize; ++i)
2293                 if (*(data + i) != *(data2 + i))
2294                         exit(1);
2295
2296         /*
2297          * Finally, make sure that changes to the mapped area
2298          * do not percolate back to the file as seen by read().
2299          * (This is a bug on some variants of i386 svr4.0.)
2300          */
2301         for (i = 0; i < pagesize; ++i)
2302                 *(data2 + i) = *(data2 + i) + 1;
2303         data3 = (char*)malloc(pagesize);
2304         if (!data3)
2305                 exit(1);
2306         if (read(fd, data3, pagesize) != pagesize)
2307                 exit(1);
2308         for (i = 0; i < pagesize; ++i)
2309                 if (*(data + i) != *(data3 + i))
2310                         exit(1);
2311         close(fd);
2312         unlink("conftestmmap");
2313         exit(0);
2314 }
2315
2316 EOF
2317 if { (eval echo configure:2318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2318 then
2319   ac_cv_func_mmap_fixed_mapped=yes
2320 else
2321   echo "configure: failed program was:" >&5
2322   cat conftest.$ac_ext >&5
2323   rm -fr conftest*
2324   ac_cv_func_mmap_fixed_mapped=no
2325 fi
2326 rm -fr conftest*
2327 fi
2328
2329 fi
2330
2331 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
2332 if test $ac_cv_func_mmap_fixed_mapped = yes; then
2333   cat >> confdefs.h <<\EOF
2334 #define HAVE_MMAP 1
2335 EOF
2336
2337 fi
2338
2339 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
2340 echo "configure:2341: checking return type of signal handlers" >&5
2341 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2342   echo $ac_n "(cached) $ac_c" 1>&6
2343 else
2344   cat > conftest.$ac_ext <<EOF
2345 #line 2346 "configure"
2346 #include "confdefs.h"
2347 #include <sys/types.h>
2348 #include <signal.h>
2349 #ifdef signal
2350 #undef signal
2351 #endif
2352 #ifdef __cplusplus
2353 extern "C" void (*signal (int, void (*)(int)))(int);
2354 #else
2355 void (*signal ()) ();
2356 #endif
2357
2358 int main() {
2359 int i;
2360 ; return 0; }
2361 EOF
2362 if { (eval echo configure:2363: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2363   rm -rf conftest*
2364   ac_cv_type_signal=void
2365 else
2366   echo "configure: failed program was:" >&5
2367   cat conftest.$ac_ext >&5
2368   rm -rf conftest*
2369   ac_cv_type_signal=int
2370 fi
2371 rm -f conftest*
2372 fi
2373
2374 echo "$ac_t""$ac_cv_type_signal" 1>&6
2375 cat >> confdefs.h <<EOF
2376 #define RETSIGTYPE $ac_cv_type_signal
2377 EOF
2378
2379
2380 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
2381 echo "configure:2382: checking for dlopen in -ldl" >&5
2382 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
2383 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2384   echo $ac_n "(cached) $ac_c" 1>&6
2385 else
2386   ac_save_LIBS="$LIBS"
2387 LIBS="-ldl  $LIBS"
2388 cat > conftest.$ac_ext <<EOF
2389 #line 2390 "configure"
2390 #include "confdefs.h"
2391 /* Override any gcc2 internal prototype to avoid an error.  */
2392 /* We use char because int might match the return type of a gcc2
2393     builtin and then its argument prototype would still apply.  */
2394 char dlopen();
2395
2396 int main() {
2397 dlopen()
2398 ; return 0; }
2399 EOF
2400 if { (eval echo configure:2401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2401   rm -rf conftest*
2402   eval "ac_cv_lib_$ac_lib_var=yes"
2403 else
2404   echo "configure: failed program was:" >&5
2405   cat conftest.$ac_ext >&5
2406   rm -rf conftest*
2407   eval "ac_cv_lib_$ac_lib_var=no"
2408 fi
2409 rm -f conftest*
2410 LIBS="$ac_save_LIBS"
2411
2412 fi
2413 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2414   echo "$ac_t""yes" 1>&6
2415   LIB="${LIB} -ldl"
2416 else
2417   echo "$ac_t""no" 1>&6
2418 fi
2419
2420 echo $ac_n "checking for pow in -lm""... $ac_c" 1>&6
2421 echo "configure:2422: checking for pow in -lm" >&5
2422 ac_lib_var=`echo m'_'pow | sed 'y%./+-%__p_%'`
2423 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2424   echo $ac_n "(cached) $ac_c" 1>&6
2425 else
2426   ac_save_LIBS="$LIBS"
2427 LIBS="-lm  $LIBS"
2428 cat > conftest.$ac_ext <<EOF
2429 #line 2430 "configure"
2430 #include "confdefs.h"
2431 /* Override any gcc2 internal prototype to avoid an error.  */
2432 /* We use char because int might match the return type of a gcc2
2433     builtin and then its argument prototype would still apply.  */
2434 char pow();
2435
2436 int main() {
2437 pow()
2438 ; return 0; }
2439 EOF
2440 if { (eval echo configure:2441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2441   rm -rf conftest*
2442   eval "ac_cv_lib_$ac_lib_var=yes"
2443 else
2444   echo "configure: failed program was:" >&5
2445   cat conftest.$ac_ext >&5
2446   rm -rf conftest*
2447   eval "ac_cv_lib_$ac_lib_var=no"
2448 fi
2449 rm -f conftest*
2450 LIBS="$ac_save_LIBS"
2451
2452 fi
2453 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2454   echo "$ac_t""yes" 1>&6
2455   LIB_YUV="${LIB_YUV} -lm"
2456 else
2457   echo "$ac_t""no" 1>&6
2458 fi
2459
2460
2461 CPPFLAGS="${CPPFLAGS} -I/usr/local/include"
2462 CFLAGS="${CFLAGS} -I/usr/local/include"
2463
2464 PTHREAD_LIBS=error
2465 echo $ac_n "checking for pthread_attr_init in -lpthread""... $ac_c" 1>&6
2466 echo "configure:2467: checking for pthread_attr_init in -lpthread" >&5
2467 ac_lib_var=`echo pthread'_'pthread_attr_init | sed 'y%./+-%__p_%'`
2468 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2469   echo $ac_n "(cached) $ac_c" 1>&6
2470 else
2471   ac_save_LIBS="$LIBS"
2472 LIBS="-lpthread  $LIBS"
2473 cat > conftest.$ac_ext <<EOF
2474 #line 2475 "configure"
2475 #include "confdefs.h"
2476 /* Override any gcc2 internal prototype to avoid an error.  */
2477 /* We use char because int might match the return type of a gcc2
2478     builtin and then its argument prototype would still apply.  */
2479 char pthread_attr_init();
2480
2481 int main() {
2482 pthread_attr_init()
2483 ; return 0; }
2484 EOF
2485 if { (eval echo configure:2486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2486   rm -rf conftest*
2487   eval "ac_cv_lib_$ac_lib_var=yes"
2488 else
2489   echo "configure: failed program was:" >&5
2490   cat conftest.$ac_ext >&5
2491   rm -rf conftest*
2492   eval "ac_cv_lib_$ac_lib_var=no"
2493 fi
2494 rm -f conftest*
2495 LIBS="$ac_save_LIBS"
2496
2497 fi
2498 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2499   echo "$ac_t""yes" 1>&6
2500   THREAD_LIB="-lpthread"
2501 else
2502   echo "$ac_t""no" 1>&6
2503 fi
2504
2505 if test "x${THREAD_LIB}" = xerror; then
2506   echo $ac_n "checking for pthread_attr_init in -lpthreads""... $ac_c" 1>&6
2507 echo "configure:2508: checking for pthread_attr_init in -lpthreads" >&5
2508 ac_lib_var=`echo pthreads'_'pthread_attr_init | sed 'y%./+-%__p_%'`
2509 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2510   echo $ac_n "(cached) $ac_c" 1>&6
2511 else
2512   ac_save_LIBS="$LIBS"
2513 LIBS="-lpthreads  $LIBS"
2514 cat > conftest.$ac_ext <<EOF
2515 #line 2516 "configure"
2516 #include "confdefs.h"
2517 /* Override any gcc2 internal prototype to avoid an error.  */
2518 /* We use char because int might match the return type of a gcc2
2519     builtin and then its argument prototype would still apply.  */
2520 char pthread_attr_init();
2521
2522 int main() {
2523 pthread_attr_init()
2524 ; return 0; }
2525 EOF
2526 if { (eval echo configure:2527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2527   rm -rf conftest*
2528   eval "ac_cv_lib_$ac_lib_var=yes"
2529 else
2530   echo "configure: failed program was:" >&5
2531   cat conftest.$ac_ext >&5
2532   rm -rf conftest*
2533   eval "ac_cv_lib_$ac_lib_var=no"
2534 fi
2535 rm -f conftest*
2536 LIBS="$ac_save_LIBS"
2537
2538 fi
2539 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2540   echo "$ac_t""yes" 1>&6
2541   THREAD_LIB="-lpthreads"
2542 else
2543   echo "$ac_t""no" 1>&6
2544 fi
2545
2546 fi
2547 if test "x${THREAD_LIB}" = xerror; then
2548   echo $ac_n "checking for pthread_attr_init in -lc_r""... $ac_c" 1>&6
2549 echo "configure:2550: checking for pthread_attr_init in -lc_r" >&5
2550 ac_lib_var=`echo c_r'_'pthread_attr_init | sed 'y%./+-%__p_%'`
2551 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2552   echo $ac_n "(cached) $ac_c" 1>&6
2553 else
2554   ac_save_LIBS="$LIBS"
2555 LIBS="-lc_r  $LIBS"
2556 cat > conftest.$ac_ext <<EOF
2557 #line 2558 "configure"
2558 #include "confdefs.h"
2559 /* Override any gcc2 internal prototype to avoid an error.  */
2560 /* We use char because int might match the return type of a gcc2
2561     builtin and then its argument prototype would still apply.  */
2562 char pthread_attr_init();
2563
2564 int main() {
2565 pthread_attr_init()
2566 ; return 0; }
2567 EOF
2568 if { (eval echo configure:2569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2569   rm -rf conftest*
2570   eval "ac_cv_lib_$ac_lib_var=yes"
2571 else
2572   echo "configure: failed program was:" >&5
2573   cat conftest.$ac_ext >&5
2574   rm -rf conftest*
2575   eval "ac_cv_lib_$ac_lib_var=no"
2576 fi
2577 rm -f conftest*
2578 LIBS="$ac_save_LIBS"
2579
2580 fi
2581 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2582   echo "$ac_t""yes" 1>&6
2583   THREAD_LIB="-lc_r"
2584 else
2585   echo "$ac_t""no" 1>&6
2586 fi
2587
2588 fi
2589 if test "x${THREAD_LIB}" = xerror; then
2590   THREAD_LIBS=""
2591   echo $ac_n "checking for pthread_attr_init""... $ac_c" 1>&6
2592 echo "configure:2593: checking for pthread_attr_init" >&5
2593 if eval "test \"`echo '$''{'ac_cv_func_pthread_attr_init'+set}'`\" = set"; then
2594   echo $ac_n "(cached) $ac_c" 1>&6
2595 else
2596   cat > conftest.$ac_ext <<EOF
2597 #line 2598 "configure"
2598 #include "confdefs.h"
2599 /* System header to define __stub macros and hopefully few prototypes,
2600     which can conflict with char pthread_attr_init(); below.  */
2601 #include <assert.h>
2602 /* Override any gcc2 internal prototype to avoid an error.  */
2603 /* We use char because int might match the return type of a gcc2
2604     builtin and then its argument prototype would still apply.  */
2605 char pthread_attr_init();
2606
2607 int main() {
2608
2609 /* The GNU C library defines this for functions which it implements
2610     to always fail with ENOSYS.  Some functions are actually named
2611     something starting with __ and the normal name is an alias.  */
2612 #if defined (__stub_pthread_attr_init) || defined (__stub___pthread_attr_init)
2613 choke me
2614 #else
2615 pthread_attr_init();
2616 #endif
2617
2618 ; return 0; }
2619 EOF
2620 if { (eval echo configure:2621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2621   rm -rf conftest*
2622   eval "ac_cv_func_pthread_attr_init=yes"
2623 else
2624   echo "configure: failed program was:" >&5
2625   cat conftest.$ac_ext >&5
2626   rm -rf conftest*
2627   eval "ac_cv_func_pthread_attr_init=no"
2628 fi
2629 rm -f conftest*
2630 fi
2631
2632 if eval "test \"`echo '$ac_cv_func_'pthread_attr_init`\" = yes"; then
2633   echo "$ac_t""yes" 1>&6
2634   :
2635 else
2636   echo "$ac_t""no" 1>&6
2637 fi
2638
2639 fi
2640
2641 cat > conftest.$ac_ext <<EOF
2642 #line 2643 "configure"
2643 #include "confdefs.h"
2644 #include <pthread.h>
2645 EOF
2646 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2647   egrep "pthread_cond_t" >/dev/null 2>&1; then
2648   rm -rf conftest*
2649   
2650   cat >> confdefs.h <<\EOF
2651 #define PTHREAD_COND_T_IN_PTHREAD_H 1
2652 EOF
2653
2654 fi
2655 rm -f conftest*
2656
2657 cat > conftest.$ac_ext <<EOF
2658 #line 2659 "configure"
2659 #include "confdefs.h"
2660 #include <strings.h>
2661 EOF
2662 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2663   egrep "strncasecmp" >/dev/null 2>&1; then
2664   rm -rf conftest*
2665   
2666   cat >> confdefs.h <<\EOF
2667 #define STRNCASECMP_IN_STRINGS_H 1
2668 EOF
2669
2670 fi
2671 rm -f conftest*
2672
2673
2674 for ac_hdr in stddef.h getopt.h strings.h
2675 do
2676 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2677 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2678 echo "configure:2679: checking for $ac_hdr" >&5
2679 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2680   echo $ac_n "(cached) $ac_c" 1>&6
2681 else
2682   cat > conftest.$ac_ext <<EOF
2683 #line 2684 "configure"
2684 #include "confdefs.h"
2685 #include <$ac_hdr>
2686 EOF
2687 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2688 { (eval echo configure:2689: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2689 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2690 if test -z "$ac_err"; then
2691   rm -rf conftest*
2692   eval "ac_cv_header_$ac_safe=yes"
2693 else
2694   echo "$ac_err" >&5
2695   echo "configure: failed program was:" >&5
2696   cat conftest.$ac_ext >&5
2697   rm -rf conftest*
2698   eval "ac_cv_header_$ac_safe=no"
2699 fi
2700 rm -f conftest*
2701 fi
2702 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2703   echo "$ac_t""yes" 1>&6
2704     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2705   cat >> confdefs.h <<EOF
2706 #define $ac_tr_hdr 1
2707 EOF
2708  
2709 else
2710   echo "$ac_t""no" 1>&6
2711 fi
2712 done
2713
2714 for ac_hdr in sys/sockio.h fcntl.h sys/time.h unistd.h
2715 do
2716 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2717 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2718 echo "configure:2719: checking for $ac_hdr" >&5
2719 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2720   echo $ac_n "(cached) $ac_c" 1>&6
2721 else
2722   cat > conftest.$ac_ext <<EOF
2723 #line 2724 "configure"
2724 #include "confdefs.h"
2725 #include <$ac_hdr>
2726 EOF
2727 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2728 { (eval echo configure:2729: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2729 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2730 if test -z "$ac_err"; then
2731   rm -rf conftest*
2732   eval "ac_cv_header_$ac_safe=yes"
2733 else
2734   echo "$ac_err" >&5
2735   echo "configure: failed program was:" >&5
2736   cat conftest.$ac_ext >&5
2737   rm -rf conftest*
2738   eval "ac_cv_header_$ac_safe=no"
2739 fi
2740 rm -f conftest*
2741 fi
2742 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2743   echo "$ac_t""yes" 1>&6
2744     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2745   cat >> confdefs.h <<EOF
2746 #define $ac_tr_hdr 1
2747 EOF
2748  
2749 else
2750   echo "$ac_t""no" 1>&6
2751 fi
2752 done
2753
2754 for ac_hdr in sys/soundcard.h machine/soundcard.h
2755 do
2756 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2757 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2758 echo "configure:2759: checking for $ac_hdr" >&5
2759 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2760   echo $ac_n "(cached) $ac_c" 1>&6
2761 else
2762   cat > conftest.$ac_ext <<EOF
2763 #line 2764 "configure"
2764 #include "confdefs.h"
2765 #include <$ac_hdr>
2766 EOF
2767 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2768 { (eval echo configure:2769: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2769 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2770 if test -z "$ac_err"; then
2771   rm -rf conftest*
2772   eval "ac_cv_header_$ac_safe=yes"
2773 else
2774   echo "$ac_err" >&5
2775   echo "configure: failed program was:" >&5
2776   cat conftest.$ac_ext >&5
2777   rm -rf conftest*
2778   eval "ac_cv_header_$ac_safe=no"
2779 fi
2780 rm -f conftest*
2781 fi
2782 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2783   echo "$ac_t""yes" 1>&6
2784     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2785   cat >> confdefs.h <<EOF
2786 #define $ac_tr_hdr 1
2787 EOF
2788  
2789 else
2790   echo "$ac_t""no" 1>&6
2791 fi
2792 done
2793
2794 for ac_hdr in dlfcn.h image.h
2795 do
2796 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2797 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2798 echo "configure:2799: checking for $ac_hdr" >&5
2799 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2800   echo $ac_n "(cached) $ac_c" 1>&6
2801 else
2802   cat > conftest.$ac_ext <<EOF
2803 #line 2804 "configure"
2804 #include "confdefs.h"
2805 #include <$ac_hdr>
2806 EOF
2807 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2808 { (eval echo configure:2809: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2809 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2810 if test -z "$ac_err"; then
2811   rm -rf conftest*
2812   eval "ac_cv_header_$ac_safe=yes"
2813 else
2814   echo "$ac_err" >&5
2815   echo "configure: failed program was:" >&5
2816   cat conftest.$ac_ext >&5
2817   rm -rf conftest*
2818   eval "ac_cv_header_$ac_safe=no"
2819 fi
2820 rm -f conftest*
2821 fi
2822 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2823   echo "$ac_t""yes" 1>&6
2824     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2825   cat >> confdefs.h <<EOF
2826 #define $ac_tr_hdr 1
2827 EOF
2828  
2829 else
2830   echo "$ac_t""no" 1>&6
2831 fi
2832 done
2833
2834 for ac_hdr in arpa/inet.h net/if.h netinet/in.h sys/socket.h
2835 do
2836 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2837 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2838 echo "configure:2839: checking for $ac_hdr" >&5
2839 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2840   echo $ac_n "(cached) $ac_c" 1>&6
2841 else
2842   cat > conftest.$ac_ext <<EOF
2843 #line 2844 "configure"
2844 #include "confdefs.h"
2845 #include <$ac_hdr>
2846 EOF
2847 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2848 { (eval echo configure:2849: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2849 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2850 if test -z "$ac_err"; then
2851   rm -rf conftest*
2852   eval "ac_cv_header_$ac_safe=yes"
2853 else
2854   echo "$ac_err" >&5
2855   echo "configure: failed program was:" >&5
2856   cat conftest.$ac_ext >&5
2857   rm -rf conftest*
2858   eval "ac_cv_header_$ac_safe=no"
2859 fi
2860 rm -f conftest*
2861 fi
2862 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2863   echo "$ac_t""yes" 1>&6
2864     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2865   cat >> confdefs.h <<EOF
2866 #define $ac_tr_hdr 1
2867 EOF
2868  
2869 else
2870   echo "$ac_t""no" 1>&6
2871 fi
2872 done
2873
2874 for ac_hdr in machine/param.h
2875 do
2876 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2877 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2878 echo "configure:2879: checking for $ac_hdr" >&5
2879 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2880   echo $ac_n "(cached) $ac_c" 1>&6
2881 else
2882   cat > conftest.$ac_ext <<EOF
2883 #line 2884 "configure"
2884 #include "confdefs.h"
2885 #include <$ac_hdr>
2886 EOF
2887 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2888 { (eval echo configure:2889: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2889 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2890 if test -z "$ac_err"; then
2891   rm -rf conftest*
2892   eval "ac_cv_header_$ac_safe=yes"
2893 else
2894   echo "$ac_err" >&5
2895   echo "configure: failed program was:" >&5
2896   cat conftest.$ac_ext >&5
2897   rm -rf conftest*
2898   eval "ac_cv_header_$ac_safe=no"
2899 fi
2900 rm -f conftest*
2901 fi
2902 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2903   echo "$ac_t""yes" 1>&6
2904     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2905   cat >> confdefs.h <<EOF
2906 #define $ac_tr_hdr 1
2907 EOF
2908  
2909 else
2910   echo "$ac_t""no" 1>&6
2911 fi
2912 done
2913
2914
2915 for ac_hdr in cthreads.h pthread.h kernel/scheduler.h kernel/OS.h
2916 do
2917 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2918 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2919 echo "configure:2920: checking for $ac_hdr" >&5
2920 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2921   echo $ac_n "(cached) $ac_c" 1>&6
2922 else
2923   cat > conftest.$ac_ext <<EOF
2924 #line 2925 "configure"
2925 #include "confdefs.h"
2926 #include <$ac_hdr>
2927 EOF
2928 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2929 { (eval echo configure:2930: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2930 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2931 if test -z "$ac_err"; then
2932   rm -rf conftest*
2933   eval "ac_cv_header_$ac_safe=yes"
2934 else
2935   echo "$ac_err" >&5
2936   echo "configure: failed program was:" >&5
2937   cat conftest.$ac_ext >&5
2938   rm -rf conftest*
2939   eval "ac_cv_header_$ac_safe=no"
2940 fi
2941 rm -f conftest*
2942 fi
2943 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2944   echo "$ac_t""yes" 1>&6
2945     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2946   cat >> confdefs.h <<EOF
2947 #define $ac_tr_hdr 1
2948 EOF
2949  
2950 else
2951   echo "$ac_t""no" 1>&6
2952 fi
2953 done
2954
2955
2956 CFLAGS="${save_CFLAGS} -Wall -Werror"
2957 echo $ac_n "checking for ntohl in sys/param.h""... $ac_c" 1>&6
2958 echo "configure:2959: checking for ntohl in sys/param.h" >&5
2959 cat > conftest.$ac_ext <<EOF
2960 #line 2961 "configure"
2961 #include "confdefs.h"
2962 #include <sys/param.h>
2963 void foo() { int meuh; ntohl(meuh); }
2964 int main() {
2965
2966 ; return 0; }
2967 EOF
2968 if { (eval echo configure:2969: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2969   rm -rf conftest*
2970   cat >> confdefs.h <<\EOF
2971 #define NTOHL_IN_SYS_PARAM_H 1
2972 EOF
2973
2974  echo "$ac_t""yes" 1>&6
2975 else
2976   echo "configure: failed program was:" >&5
2977   cat conftest.$ac_ext >&5
2978   rm -rf conftest*
2979   echo "$ac_t""no" 1>&6
2980 fi
2981 rm -f conftest*
2982
2983 CFLAGS="${save_CFLAGS} -finline-limit=12"
2984 echo $ac_n "checking if \$CC accepts -finline-limit""... $ac_c" 1>&6
2985 echo "configure:2986: checking if \$CC accepts -finline-limit" >&5
2986 cat > conftest.$ac_ext <<EOF
2987 #line 2988 "configure"
2988 #include "confdefs.h"
2989
2990 int main() {
2991
2992 ; return 0; }
2993 EOF
2994 if { (eval echo configure:2995: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2995   rm -rf conftest*
2996   save_CFLAGS="${save_CFLAGS} -finline-limit=31337"; echo "$ac_t""yes" 1>&6
2997 else
2998   echo "configure: failed program was:" >&5
2999   cat conftest.$ac_ext >&5
3000   rm -rf conftest*
3001   echo "$ac_t""no" 1>&6
3002 fi
3003 rm -f conftest*
3004
3005 CFLAGS="${save_CFLAGS} -bundle -undefined suppress"
3006 echo $ac_n "checking if \$CC compiles plugins with -bundle -undefined suppress""... $ac_c" 1>&6
3007 echo "configure:3008: checking if \$CC compiles plugins with -bundle -undefined suppress" >&5
3008 cat > conftest.$ac_ext <<EOF
3009 #line 3010 "configure"
3010 #include "confdefs.h"
3011
3012 int main() {
3013
3014 ; return 0; }
3015 EOF
3016 if { (eval echo configure:3017: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3017   rm -rf conftest*
3018   PLCFLAGS="${PLCFLAGS} -bundle -undefined suppress"; echo "$ac_t""yes" 1>&6
3019 else
3020   echo "configure: failed program was:" >&5
3021   cat conftest.$ac_ext >&5
3022   rm -rf conftest*
3023   echo "$ac_t""no" 1>&6
3024 fi
3025 rm -f conftest*
3026
3027 CFLAGS="${save_CFLAGS} -shared"
3028 echo $ac_n "checking if \$CC compiles plugins with -shared""... $ac_c" 1>&6
3029 echo "configure:3030: checking if \$CC compiles plugins with -shared" >&5
3030 cat > conftest.$ac_ext <<EOF
3031 #line 3032 "configure"
3032 #include "confdefs.h"
3033
3034 int main() {
3035
3036 ; return 0; }
3037 EOF
3038 if { (eval echo configure:3039: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3039   rm -rf conftest*
3040   PLCFLAGS="${PLCFLAGS} -shared"; echo "$ac_t""yes" 1>&6
3041 else
3042   echo "configure: failed program was:" >&5
3043   cat conftest.$ac_ext >&5
3044   rm -rf conftest*
3045   echo "$ac_t""no" 1>&6
3046 fi
3047 rm -f conftest*
3048
3049 CFLAGS="${save_CFLAGS}"
3050
3051 echo $ac_n "checking for boolean_t in sys/types.h""... $ac_c" 1>&6
3052 echo "configure:3053: checking for boolean_t in sys/types.h" >&5
3053 cat > conftest.$ac_ext <<EOF
3054 #line 3055 "configure"
3055 #include "confdefs.h"
3056 #include <sys/types.h>
3057 void quux() { boolean_t foo; }
3058 int main() {
3059
3060 ; return 0; }
3061 EOF
3062 if { (eval echo configure:3063: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3063   rm -rf conftest*
3064   cat >> confdefs.h <<\EOF
3065 #define BOOLEAN_T_IN_SYS_TYPES_H 1
3066 EOF
3067
3068  echo "$ac_t""yes" 1>&6
3069 else
3070   echo "configure: failed program was:" >&5
3071   cat conftest.$ac_ext >&5
3072   rm -rf conftest*
3073   echo "$ac_t""no" 1>&6
3074 fi
3075 rm -f conftest*
3076 echo $ac_n "checking for boolean_t in pthread.h""... $ac_c" 1>&6
3077 echo "configure:3078: checking for boolean_t in pthread.h" >&5
3078 cat > conftest.$ac_ext <<EOF
3079 #line 3080 "configure"
3080 #include "confdefs.h"
3081 #include <pthread.h>
3082 void quux() { boolean_t foo; }
3083 int main() {
3084
3085 ; return 0; }
3086 EOF
3087 if { (eval echo configure:3088: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3088   rm -rf conftest*
3089   cat >> confdefs.h <<\EOF
3090 #define BOOLEAN_T_IN_PTHREAD_H 1
3091 EOF
3092
3093  echo "$ac_t""yes" 1>&6
3094 else
3095   echo "configure: failed program was:" >&5
3096   cat conftest.$ac_ext >&5
3097   rm -rf conftest*
3098   echo "$ac_t""no" 1>&6
3099 fi
3100 rm -f conftest*
3101
3102 echo $ac_n "checking for working const""... $ac_c" 1>&6
3103 echo "configure:3104: checking for working const" >&5
3104 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
3105   echo $ac_n "(cached) $ac_c" 1>&6
3106 else
3107   cat > conftest.$ac_ext <<EOF
3108 #line 3109 "configure"
3109 #include "confdefs.h"
3110
3111 int main() {
3112
3113 /* Ultrix mips cc rejects this.  */
3114 typedef int charset[2]; const charset x = {0,0};
3115 /* SunOS 4.1.1 cc rejects this.  */
3116 char const *const *ccp;
3117 char **p;
3118 /* NEC SVR4.0.2 mips cc rejects this.  */
3119 struct point {int x, y;};
3120 static struct point const zero = {0,0};
3121 /* AIX XL C 1.02.0.0 rejects this.
3122    It does not let you subtract one const X* pointer from another in an arm
3123    of an if-expression whose if-part is not a constant expression */
3124 const char *g = "string";
3125 ccp = &g + (g ? g-g : 0);
3126 /* HPUX 7.0 cc rejects these. */
3127 ++ccp;
3128 p = (char**) ccp;
3129 ccp = (char const *const *) p;
3130 { /* SCO 3.2v4 cc rejects this.  */
3131   char *t;
3132   char const *s = 0 ? (char *) 0 : (char const *) 0;
3133
3134   *t++ = 0;
3135 }
3136 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
3137   int x[] = {25, 17};
3138   const int *foo = &x[0];
3139   ++foo;
3140 }
3141 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3142   typedef const int *iptr;
3143   iptr p = 0;
3144   ++p;
3145 }
3146 { /* AIX XL C 1.02.0.0 rejects this saying
3147      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3148   struct s { int j; const int *ap[3]; };
3149   struct s *b; b->j = 5;
3150 }
3151 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3152   const int foo = 10;
3153 }
3154
3155 ; return 0; }
3156 EOF
3157 if { (eval echo configure:3158: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3158   rm -rf conftest*
3159   ac_cv_c_const=yes
3160 else
3161   echo "configure: failed program was:" >&5
3162   cat conftest.$ac_ext >&5
3163   rm -rf conftest*
3164   ac_cv_c_const=no
3165 fi
3166 rm -f conftest*
3167 fi
3168
3169 echo "$ac_t""$ac_cv_c_const" 1>&6
3170 if test $ac_cv_c_const = no; then
3171   cat >> confdefs.h <<\EOF
3172 #define const 
3173 EOF
3174
3175 fi
3176
3177 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3178 echo "configure:3179: checking for ANSI C header files" >&5
3179 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
3180   echo $ac_n "(cached) $ac_c" 1>&6
3181 else
3182   cat > conftest.$ac_ext <<EOF
3183 #line 3184 "configure"
3184 #include "confdefs.h"
3185 #include <stdlib.h>
3186 #include <stdarg.h>
3187 #include <string.h>
3188 #include <float.h>
3189 EOF
3190 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3191 { (eval echo configure:3192: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3192 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3193 if test -z "$ac_err"; then
3194   rm -rf conftest*
3195   ac_cv_header_stdc=yes
3196 else
3197   echo "$ac_err" >&5
3198   echo "configure: failed program was:" >&5
3199   cat conftest.$ac_ext >&5
3200   rm -rf conftest*
3201   ac_cv_header_stdc=no
3202 fi
3203 rm -f conftest*
3204
3205 if test $ac_cv_header_stdc = yes; then
3206   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3207 cat > conftest.$ac_ext <<EOF
3208 #line 3209 "configure"
3209 #include "confdefs.h"
3210 #include <string.h>
3211 EOF
3212 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3213   egrep "memchr" >/dev/null 2>&1; then
3214   :
3215 else
3216   rm -rf conftest*
3217   ac_cv_header_stdc=no
3218 fi
3219 rm -f conftest*
3220
3221 fi
3222
3223 if test $ac_cv_header_stdc = yes; then
3224   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3225 cat > conftest.$ac_ext <<EOF
3226 #line 3227 "configure"
3227 #include "confdefs.h"
3228 #include <stdlib.h>
3229 EOF
3230 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3231   egrep "free" >/dev/null 2>&1; then
3232   :
3233 else
3234   rm -rf conftest*
3235   ac_cv_header_stdc=no
3236 fi
3237 rm -f conftest*
3238
3239 fi
3240
3241 if test $ac_cv_header_stdc = yes; then
3242   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3243 if test "$cross_compiling" = yes; then
3244   :
3245 else
3246   cat > conftest.$ac_ext <<EOF
3247 #line 3248 "configure"
3248 #include "confdefs.h"
3249 #include <ctype.h>
3250 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3251 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3252 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3253 int main () { int i; for (i = 0; i < 256; i++)
3254 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3255 exit (0); }
3256
3257 EOF
3258 if { (eval echo configure:3259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3259 then
3260   :
3261 else
3262   echo "configure: failed program was:" >&5
3263   cat conftest.$ac_ext >&5
3264   rm -fr conftest*
3265   ac_cv_header_stdc=no
3266 fi
3267 rm -fr conftest*
3268 fi
3269
3270 fi
3271 fi
3272
3273 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3274 if test $ac_cv_header_stdc = yes; then
3275   cat >> confdefs.h <<\EOF
3276 #define STDC_HEADERS 1
3277 EOF
3278
3279 fi
3280
3281 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3282 echo "configure:3283: checking for size_t" >&5
3283 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
3284   echo $ac_n "(cached) $ac_c" 1>&6
3285 else
3286   cat > conftest.$ac_ext <<EOF
3287 #line 3288 "configure"
3288 #include "confdefs.h"
3289 #include <sys/types.h>
3290 #if STDC_HEADERS
3291 #include <stdlib.h>
3292 #include <stddef.h>
3293 #endif
3294 EOF
3295 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3296   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3297   rm -rf conftest*
3298   ac_cv_type_size_t=yes
3299 else
3300   rm -rf conftest*
3301   ac_cv_type_size_t=no
3302 fi
3303 rm -f conftest*
3304
3305 fi
3306 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3307 if test $ac_cv_type_size_t = no; then
3308   cat >> confdefs.h <<\EOF
3309 #define size_t unsigned
3310 EOF
3311
3312 fi
3313
3314 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3315 echo "configure:3316: checking whether time.h and sys/time.h may both be included" >&5
3316 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
3317   echo $ac_n "(cached) $ac_c" 1>&6
3318 else
3319   cat > conftest.$ac_ext <<EOF
3320 #line 3321 "configure"
3321 #include "confdefs.h"
3322 #include <sys/types.h>
3323 #include <sys/time.h>
3324 #include <time.h>
3325 int main() {
3326 struct tm *tp;
3327 ; return 0; }
3328 EOF
3329 if { (eval echo configure:3330: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3330   rm -rf conftest*
3331   ac_cv_header_time=yes
3332 else
3333   echo "configure: failed program was:" >&5
3334   cat conftest.$ac_ext >&5
3335   rm -rf conftest*
3336   ac_cv_header_time=no
3337 fi
3338 rm -f conftest*
3339 fi
3340
3341 echo "$ac_t""$ac_cv_header_time" 1>&6
3342 if test $ac_cv_header_time = yes; then
3343   cat >> confdefs.h <<\EOF
3344 #define TIME_WITH_SYS_TIME 1
3345 EOF
3346
3347 fi
3348
3349
3350 ARCH=${host_cpu}
3351
3352 BUILTINS="${BUILTINS} es ps ts yuv idct idctclassic motion imdct downmix"
3353 PLUGINS="${PLUGINS}"
3354
3355 MMX_MODULES="yuvmmx idctmmx motionmmx"
3356 MMXEXT_MODULES="idctmmxext motionmmxext imdct3dn imdctsse downmix3dn downmixsse"
3357
3358 echo $ac_n "checking if \$CC groks MMX inline assembly""... $ac_c" 1>&6
3359 echo "configure:3360: checking if \$CC groks MMX inline assembly" >&5
3360 cat > conftest.$ac_ext <<EOF
3361 #line 3362 "configure"
3362 #include "confdefs.h"
3363 void quux(){void *p;asm("packuswb %%mm1,%%mm2"::"r"(p));}
3364 int main() {
3365
3366 ; return 0; }
3367 EOF
3368 if { (eval echo configure:3369: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3369   rm -rf conftest*
3370   ACCEL_MODULES="${ACCEL_MODULES} ${MMX_MODULES}"
3371   echo "$ac_t""yes" 1>&6
3372 else
3373   echo "configure: failed program was:" >&5
3374   cat conftest.$ac_ext >&5
3375   rm -rf conftest*
3376   echo "$ac_t""no" 1>&6
3377 fi
3378 rm -f conftest*
3379
3380 echo $ac_n "checking if \$CC groks MMX EXT or SSE inline assembly""... $ac_c" 1>&6
3381 echo "configure:3382: checking if \$CC groks MMX EXT or SSE inline assembly" >&5
3382 cat > conftest.$ac_ext <<EOF
3383 #line 3384 "configure"
3384 #include "confdefs.h"
3385 void quux(){void *p;asm("maskmovq %%mm1,%%mm2"::"r"(p));}
3386 int main() {
3387
3388 ; return 0; }
3389 EOF
3390 if { (eval echo configure:3391: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3391   rm -rf conftest*
3392   ACCEL_MODULES="${ACCEL_MODULES} ${MMXEXT_MODULES}"
3393   echo "$ac_t""yes" 1>&6
3394 else
3395   echo "configure: failed program was:" >&5
3396   cat conftest.$ac_ext >&5
3397   rm -rf conftest*
3398   echo "$ac_t""no" 1>&6
3399 fi
3400 rm -f conftest*
3401
3402
3403 for ac_hdr in winioctl.h
3404 do
3405 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3406 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3407 echo "configure:3408: checking for $ac_hdr" >&5
3408 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3409   echo $ac_n "(cached) $ac_c" 1>&6
3410 else
3411   cat > conftest.$ac_ext <<EOF
3412 #line 3413 "configure"
3413 #include "confdefs.h"
3414 #include <$ac_hdr>
3415 EOF
3416 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3417 { (eval echo configure:3418: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3418 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3419 if test -z "$ac_err"; then
3420   rm -rf conftest*
3421   eval "ac_cv_header_$ac_safe=yes"
3422 else
3423   echo "$ac_err" >&5
3424   echo "configure: failed program was:" >&5
3425   cat conftest.$ac_ext >&5
3426   rm -rf conftest*
3427   eval "ac_cv_header_$ac_safe=no"
3428 fi
3429 rm -f conftest*
3430 fi
3431 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3432   echo "$ac_t""yes" 1>&6
3433     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3434   cat >> confdefs.h <<EOF
3435 #define $ac_tr_hdr 1
3436 EOF
3437  
3438   LIBDVDCSS=1
3439
3440 else
3441   echo "$ac_t""no" 1>&6
3442 fi
3443 done
3444
3445
3446 for ac_hdr in sys/ioctl.h
3447 do
3448 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3449 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3450 echo "configure:3451: checking for $ac_hdr" >&5
3451 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3452   echo $ac_n "(cached) $ac_c" 1>&6
3453 else
3454   cat > conftest.$ac_ext <<EOF
3455 #line 3456 "configure"
3456 #include "confdefs.h"
3457 #include <$ac_hdr>
3458 EOF
3459 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3460 { (eval echo configure:3461: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3461 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3462 if test -z "$ac_err"; then
3463   rm -rf conftest*
3464   eval "ac_cv_header_$ac_safe=yes"
3465 else
3466   echo "$ac_err" >&5
3467   echo "configure: failed program was:" >&5
3468   cat conftest.$ac_ext >&5
3469   rm -rf conftest*
3470   eval "ac_cv_header_$ac_safe=no"
3471 fi
3472 rm -f conftest*
3473 fi
3474 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3475   echo "$ac_t""yes" 1>&6
3476     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3477   cat >> confdefs.h <<EOF
3478 #define $ac_tr_hdr 1
3479 EOF
3480  
3481   LIBDVDCSS=1
3482   for ac_hdr in sys/cdio.h sys/dvdio.h linux/cdrom.h
3483 do
3484 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3485 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3486 echo "configure:3487: checking for $ac_hdr" >&5
3487 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3488   echo $ac_n "(cached) $ac_c" 1>&6
3489 else
3490   cat > conftest.$ac_ext <<EOF
3491 #line 3492 "configure"
3492 #include "confdefs.h"
3493 #include <$ac_hdr>
3494 EOF
3495 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3496 { (eval echo configure:3497: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3497 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3498 if test -z "$ac_err"; then
3499   rm -rf conftest*
3500   eval "ac_cv_header_$ac_safe=yes"
3501 else
3502   echo "$ac_err" >&5
3503   echo "configure: failed program was:" >&5
3504   cat conftest.$ac_ext >&5
3505   rm -rf conftest*
3506   eval "ac_cv_header_$ac_safe=no"
3507 fi
3508 rm -f conftest*
3509 fi
3510 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3511   echo "$ac_t""yes" 1>&6
3512     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3513   cat >> confdefs.h <<EOF
3514 #define $ac_tr_hdr 1
3515 EOF
3516  
3517 else
3518   echo "$ac_t""no" 1>&6
3519 fi
3520 done
3521
3522   BSD_DVD_STRUCT=0
3523         cat > conftest.$ac_ext <<EOF
3524 #line 3525 "configure"
3525 #include "confdefs.h"
3526 #include <sys/dvdio.h>
3527 EOF
3528 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3529   egrep "dvd_struct" >/dev/null 2>&1; then
3530   rm -rf conftest*
3531   
3532     cat >> confdefs.h <<\EOF
3533 #define DVD_STRUCT_IN_SYS_DVDIO_H 1
3534 EOF
3535
3536     BSD_DVD_STRUCT=1
3537   
3538 fi
3539 rm -f conftest*
3540
3541         cat > conftest.$ac_ext <<EOF
3542 #line 3543 "configure"
3543 #include "confdefs.h"
3544 #include <sys/cdio.h>
3545 EOF
3546 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3547   egrep "dvd_struct" >/dev/null 2>&1; then
3548   rm -rf conftest*
3549   
3550     cat >> confdefs.h <<\EOF
3551 #define DVD_STRUCT_IN_SYS_CDIO_H 1
3552 EOF
3553
3554     BSD_DVD_STRUCT=1
3555   
3556 fi
3557 rm -f conftest*
3558
3559   if test x$BSD_DVD_STRUCT = x1; then
3560     cat >> confdefs.h <<\EOF
3561 #define HAVE_BSD_DVD_STRUCT 1
3562 EOF
3563
3564   fi
3565         cat > conftest.$ac_ext <<EOF
3566 #line 3567 "configure"
3567 #include "confdefs.h"
3568 #include <linux/cdrom.h>
3569 EOF
3570 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3571   egrep "dvd_struct" >/dev/null 2>&1; then
3572   rm -rf conftest*
3573   
3574     cat >> confdefs.h <<\EOF
3575 #define DVD_STRUCT_IN_LINUX_CDROM_H 1
3576 EOF
3577
3578   
3579 fi
3580 rm -f conftest*
3581
3582
3583 else
3584   echo "$ac_t""no" 1>&6
3585 fi
3586 done
3587
3588
3589 case ${host_os} in
3590   darwin*)
3591     SYS=darwin
3592     ;;
3593   *)
3594     SYS=${host_os}
3595     ;;
3596 esac
3597
3598 # Check whether --enable-ppro or --disable-ppro was given.
3599 if test "${enable_ppro+set}" = set; then
3600   enableval="$enable_ppro"
3601    if test x$enableval = xyes; then ARCH="${ARCH} ppro"; fi 
3602 else
3603    if test x${host_cpu} = xi686; then ARCH="${ARCH} ppro"; fi 
3604 fi
3605
3606
3607 # Check whether --enable-mmx or --disable-mmx was given.
3608 if test "${enable_mmx+set}" = set; then
3609   enableval="$enable_mmx"
3610    if test x$enableval = xyes; then ARCH="${ARCH} mmx";
3611   BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi 
3612 else
3613    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";
3614   BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi 
3615 fi
3616
3617
3618 # Check whether --enable-altivec or --disable-altivec was given.
3619 if test "${enable_altivec+set}" = set; then
3620   enableval="$enable_altivec"
3621    if test x$enableval = xyes; then ARCH="${ARCH} altivec";
3622     BUILTINS="${BUILTINS} idctaltivec"
3623     LIB_IDCTALTIVEC="-framework vecLib"
3624   fi 
3625 fi
3626
3627 #[ if test -d /System/Library/Frameworks/vecLib.framework; then ARCH="${ARCH} altivec"; PLUGINS="${PLUGINS} idctaltivec"; fi ])
3628
3629 # Check whether --enable-debug or --disable-debug was given.
3630 if test "${enable_debug+set}" = set; then
3631   enableval="$enable_debug"
3632    if test x$enableval = xyes; then DEBUG=1; fi 
3633 fi
3634
3635
3636 # Check whether --enable-stats or --disable-stats was given.
3637 if test "${enable_stats+set}" = set; then
3638   enableval="$enable_stats"
3639    if test x$enableval = xyes; then STATS=1; fi 
3640 fi
3641
3642
3643 # Check whether --enable-trace or --disable-trace was given.
3644 if test "${enable_trace+set}" = set; then
3645   enableval="$enable_trace"
3646    if test x$enableval = xyes; then TRACE=1; fi 
3647 fi
3648
3649
3650 # Check whether --enable-profiling or --disable-profiling was given.
3651 if test "${enable_profiling+set}" = set; then
3652   enableval="$enable_profiling"
3653    if test x$enableval = xyes; then PROFILING=1; fi 
3654 fi
3655
3656
3657 # Check whether --enable-optimizations or --disable-optimizations was given.
3658 if test "${enable_optimizations+set}" = set; then
3659   enableval="$enable_optimizations"
3660    if test x$enableval = xno; then OPTIMS=0; fi 
3661 else
3662    OPTIMS=1 
3663 fi
3664
3665
3666 # Check whether --enable-pth or --disable-pth was given.
3667 if test "${enable_pth+set}" = set; then
3668   enableval="$enable_pth"
3669    if test x$enableval = xyes; then
3670     echo $ac_n "checking for pth_init in -lpth""... $ac_c" 1>&6
3671 echo "configure:3672: checking for pth_init in -lpth" >&5
3672 ac_lib_var=`echo pth'_'pth_init | sed 'y%./+-%__p_%'`
3673 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3674   echo $ac_n "(cached) $ac_c" 1>&6
3675 else
3676   ac_save_LIBS="$LIBS"
3677 LIBS="-lpth  $LIBS"
3678 cat > conftest.$ac_ext <<EOF
3679 #line 3680 "configure"
3680 #include "confdefs.h"
3681 /* Override any gcc2 internal prototype to avoid an error.  */
3682 /* We use char because int might match the return type of a gcc2
3683     builtin and then its argument prototype would still apply.  */
3684 char pth_init();
3685
3686 int main() {
3687 pth_init()
3688 ; return 0; }
3689 EOF
3690 if { (eval echo configure:3691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3691   rm -rf conftest*
3692   eval "ac_cv_lib_$ac_lib_var=yes"
3693 else
3694   echo "configure: failed program was:" >&5
3695   cat conftest.$ac_ext >&5
3696   rm -rf conftest*
3697   eval "ac_cv_lib_$ac_lib_var=no"
3698 fi
3699 rm -f conftest*
3700 LIBS="$ac_save_LIBS"
3701
3702 fi
3703 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3704   echo "$ac_t""yes" 1>&6
3705     ac_tr_lib=HAVE_LIB`echo pth | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3706     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3707   cat >> confdefs.h <<EOF
3708 #define $ac_tr_lib 1
3709 EOF
3710
3711   LIBS="-lpth $LIBS"
3712
3713 else
3714   echo "$ac_t""no" 1>&6
3715 fi
3716
3717     cat > conftest.$ac_ext <<EOF
3718 #line 3719 "configure"
3719 #include "confdefs.h"
3720 #include <pth.h>
3721 EOF
3722 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3723   egrep "pth_init" >/dev/null 2>&1; then
3724   rm -rf conftest*
3725   
3726       cat >> confdefs.h <<\EOF
3727 #define PTH_INIT_IN_PTH_H 1
3728 EOF
3729
3730     THREAD_LIB="-lpth"
3731     fi
3732 fi
3733 rm -f conftest*
3734
3735
3736 fi
3737
3738
3739 LIB="${LIB} ${THREAD_LIB}"
3740
3741 # Check whether --enable-css or --disable-css was given.
3742 if test "${enable_css+set}" = set; then
3743   enableval="$enable_css"
3744    if test x$enableval = xyes; then CSS=1; else CSS=0; fi 
3745 else
3746    CSS=1; 
3747 fi
3748
3749 if test x${CSS} = x1; then cat >> confdefs.h <<\EOF
3750 #define HAVE_CSS 1
3751 EOF
3752  fi
3753
3754 for ac_hdr in videolan/dvdcss.h
3755 do
3756 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3757 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3758 echo "configure:3759: checking for $ac_hdr" >&5
3759 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3760   echo $ac_n "(cached) $ac_c" 1>&6
3761 else
3762   cat > conftest.$ac_ext <<EOF
3763 #line 3764 "configure"
3764 #include "confdefs.h"
3765 #include <$ac_hdr>
3766 EOF
3767 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3768 { (eval echo configure:3769: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3769 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3770 if test -z "$ac_err"; then
3771   rm -rf conftest*
3772   eval "ac_cv_header_$ac_safe=yes"
3773 else
3774   echo "$ac_err" >&5
3775   echo "configure: failed program was:" >&5
3776   cat conftest.$ac_ext >&5
3777   rm -rf conftest*
3778   eval "ac_cv_header_$ac_safe=no"
3779 fi
3780 rm -f conftest*
3781 fi
3782 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3783   echo "$ac_t""yes" 1>&6
3784     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3785   cat >> confdefs.h <<EOF
3786 #define $ac_tr_hdr 1
3787 EOF
3788  
3789   # installed libdvdcss
3790   BUILTINS="${BUILTINS} dvd"
3791   LIB_DVD="${LIB_DVD} -ldvdcss"
3792 else
3793   echo "$ac_t""no" 1>&6
3794 if test x${LIBDVDCSS} = x1; then
3795     # local libdvdcss
3796     LOCAL_LIBDVDCSS=1
3797     BUILTINS="${BUILTINS} dvd"
3798     CFLAGS_DVD="${CFLAGS_DVD} -I../../extras/libdvdcss"
3799   fi
3800 fi
3801 done
3802
3803
3804 # Check whether --enable-dummy or --disable-dummy was given.
3805 if test "${enable_dummy+set}" = set; then
3806   enableval="$enable_dummy"
3807   :
3808 fi
3809
3810 if test x$enable_dummy != xno; then
3811   BUILTINS="${BUILTINS} dummy"; fi
3812
3813 # Check whether --enable-null or --disable-null was given.
3814 if test "${enable_null+set}" = set; then
3815   enableval="$enable_null"
3816   :
3817 fi
3818
3819 if test x$enable_null != xno; then
3820   BUILTINS="${BUILTINS} null"; fi
3821
3822 # Check whether --enable-rc or --disable-rc was given.
3823 if test "${enable_rc+set}" = set; then
3824   enableval="$enable_rc"
3825   :
3826 fi
3827
3828 if test x$enable_rc != xno; then
3829   BUILTINS="${BUILTINS} rc"; fi
3830
3831 if test x$SYS = xbeos; then
3832     BUILTINS="${BUILTINS} beos"
3833     LIB_BEOS="-lbe -lgame -lroot -ltracker"
3834     PLCFLAGS="${PLCFLAGS} -nostart"
3835
3836 else
3837
3838 # Check whether --enable-dsp or --disable-dsp was given.
3839 if test "${enable_dsp+set}" = set; then
3840   enableval="$enable_dsp"
3841   :
3842 fi
3843
3844 if test x$enable_dsp != xno; then
3845   if test -c /dev/dsp; then
3846     PLUGINS="${PLUGINS} dsp"
3847   fi
3848 fi
3849
3850 # Check whether --enable-esd or --disable-esd was given.
3851 if test "${enable_esd+set}" = set; then
3852   enableval="$enable_esd"
3853   if test x$enable_esd = xyes; then
3854      # Extract the first word of "esd-config", so it can be a program name with args.
3855 set dummy esd-config; ac_word=$2
3856 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3857 echo "configure:3858: checking for $ac_word" >&5
3858 if eval "test \"`echo '$''{'ac_cv_path_ESD_CONFIG'+set}'`\" = set"; then
3859   echo $ac_n "(cached) $ac_c" 1>&6
3860 else
3861   case "$ESD_CONFIG" in
3862   /*)
3863   ac_cv_path_ESD_CONFIG="$ESD_CONFIG" # Let the user override the test with a path.
3864   ;;
3865   ?:/*)                  
3866   ac_cv_path_ESD_CONFIG="$ESD_CONFIG" # Let the user override the test with a dos path.
3867   ;;
3868   *)
3869   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3870   ac_dummy="$PATH"
3871   for ac_dir in $ac_dummy; do 
3872     test -z "$ac_dir" && ac_dir=.
3873     if test -f $ac_dir/$ac_word; then
3874       ac_cv_path_ESD_CONFIG="$ac_dir/$ac_word"
3875       break
3876     fi
3877   done
3878   IFS="$ac_save_ifs"
3879   test -z "$ac_cv_path_ESD_CONFIG" && ac_cv_path_ESD_CONFIG="no"
3880   ;;
3881 esac
3882 fi
3883 ESD_CONFIG="$ac_cv_path_ESD_CONFIG"
3884 if test -n "$ESD_CONFIG"; then
3885   echo "$ac_t""$ESD_CONFIG" 1>&6
3886 else
3887   echo "$ac_t""no" 1>&6
3888 fi
3889
3890      if test x${ESD_CONFIG} != xno; then
3891        PLUGINS="${PLUGINS} esd"
3892        LIB_ESD="`${ESD_CONFIG} --libs`"
3893      fi
3894    fi
3895 fi
3896
3897
3898 # Check whether --enable-darwin or --disable-darwin was given.
3899 if test "${enable_darwin+set}" = set; then
3900   enableval="$enable_darwin"
3901   if test x$enable_darwin = xyes; then
3902      PLUGINS="${PLUGINS} darwin"
3903      LIB_DARWIN="-framework CoreAudio"
3904    fi
3905 fi
3906
3907
3908 # Check whether --enable-macosx or --disable-macosx was given.
3909 if test "${enable_macosx+set}" = set; then
3910   enableval="$enable_macosx"
3911   if test x$enable_macosx = xyes; then
3912      BUILTINS="${BUILTINS} macosx"
3913      LIB_MACOSX="-framework CoreAudio -framework Carbon -framework AGL"
3914      LIB_TS="${LIB_TS} -framework AGL -framework Carbon"
3915      LIB_SDL="${LIB_SDL} -framework AGL -framework Carbon"
3916    fi
3917 else
3918   for ac_hdr in Carbon/Carbon.h
3919 do
3920 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3921 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3922 echo "configure:3923: checking for $ac_hdr" >&5
3923 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3924   echo $ac_n "(cached) $ac_c" 1>&6
3925 else
3926   cat > conftest.$ac_ext <<EOF
3927 #line 3928 "configure"
3928 #include "confdefs.h"
3929 #include <$ac_hdr>
3930 EOF
3931 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3932 { (eval echo configure:3933: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3933 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3934 if test -z "$ac_err"; then
3935   rm -rf conftest*
3936   eval "ac_cv_header_$ac_safe=yes"
3937 else
3938   echo "$ac_err" >&5
3939   echo "configure: failed program was:" >&5
3940   cat conftest.$ac_ext >&5
3941   rm -rf conftest*
3942   eval "ac_cv_header_$ac_safe=no"
3943 fi
3944 rm -f conftest*
3945 fi
3946 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3947   echo "$ac_t""yes" 1>&6
3948     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3949   cat >> confdefs.h <<EOF
3950 #define $ac_tr_hdr 1
3951 EOF
3952  BUILTINS="${BUILTINS} macosx"
3953      LIB_MACOSX="-framework CoreAudio -framework Carbon -framework AGL"
3954      LIB_TS="${LIB_TS} -framework AGL -framework Carbon"
3955      LIB_SDL="${LIB_SDL} -framework AGL -framework Carbon"
3956    
3957 else
3958   echo "$ac_t""no" 1>&6
3959 fi
3960 done
3961
3962 fi
3963
3964
3965 # Check whether --enable-qnx or --disable-qnx was given.
3966 if test "${enable_qnx+set}" = set; then
3967   enableval="$enable_qnx"
3968   :
3969 fi
3970
3971     if test x$enable_qnx != xno; then
3972       for ac_hdr in Ph.h
3973 do
3974 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3975 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3976 echo "configure:3977: checking for $ac_hdr" >&5
3977 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3978   echo $ac_n "(cached) $ac_c" 1>&6
3979 else
3980   cat > conftest.$ac_ext <<EOF
3981 #line 3982 "configure"
3982 #include "confdefs.h"
3983 #include <$ac_hdr>
3984 EOF
3985 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3986 { (eval echo configure:3987: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3987 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3988 if test -z "$ac_err"; then
3989   rm -rf conftest*
3990   eval "ac_cv_header_$ac_safe=yes"
3991 else
3992   echo "$ac_err" >&5
3993   echo "configure: failed program was:" >&5
3994   cat conftest.$ac_ext >&5
3995   rm -rf conftest*
3996   eval "ac_cv_header_$ac_safe=no"
3997 fi
3998 rm -f conftest*
3999 fi
4000 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4001   echo "$ac_t""yes" 1>&6
4002     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4003   cat >> confdefs.h <<EOF
4004 #define $ac_tr_hdr 1
4005 EOF
4006  
4007         PLUGINS="${PLUGINS} qnx"
4008         LIB_QNX="-lasound -lph"
4009       
4010 else
4011   echo "$ac_t""no" 1>&6
4012 fi
4013 done
4014
4015     fi
4016
4017 # Check whether --enable-fb or --disable-fb was given.
4018 if test "${enable_fb+set}" = set; then
4019   enableval="$enable_fb"
4020   if test x$enable_fb = xyes; then PLUGINS="${PLUGINS} fb"; fi
4021 fi
4022
4023
4024 # Check whether --with-ggi or --without-ggi was given.
4025 if test "${with_ggi+set}" = set; then
4026   withval="$with_ggi"
4027    if test "x$withval" != "xno";
4028     then
4029       PLUGINS="${PLUGINS} ggi";
4030       if test "x$withval" != "xyes";
4031       then
4032         LIB_GGI="-l"$withval
4033       else
4034         LIB_GGI="-lggi"
4035       fi
4036     fi 
4037 fi
4038
4039
4040 # Check whether --enable-sdl or --disable-sdl was given.
4041 if test "${enable_sdl+set}" = set; then
4042   enableval="$enable_sdl"
4043   :
4044 fi
4045
4046 if test "x$withval" != "xno";
4047 then
4048   cat >> confdefs.h <<\EOF
4049 #define HAVE_SDL_SDL_H 0
4050 EOF
4051
4052   cat >> confdefs.h <<\EOF
4053 #define HAVE_SDL11_SDL_H 0
4054 EOF
4055
4056   cat >> confdefs.h <<\EOF
4057 #define HAVE_SDL12_SDL_H 0
4058 EOF
4059
4060   # Extract the first word of "sdl-config", so it can be a program name with args.
4061 set dummy sdl-config; ac_word=$2
4062 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4063 echo "configure:4064: checking for $ac_word" >&5
4064 if eval "test \"`echo '$''{'ac_cv_path_SDL_CONFIG'+set}'`\" = set"; then
4065   echo $ac_n "(cached) $ac_c" 1>&6
4066 else
4067   case "$SDL_CONFIG" in
4068   /*)
4069   ac_cv_path_SDL_CONFIG="$SDL_CONFIG" # Let the user override the test with a path.
4070   ;;
4071   ?:/*)                  
4072   ac_cv_path_SDL_CONFIG="$SDL_CONFIG" # Let the user override the test with a dos path.
4073   ;;
4074   *)
4075   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4076   ac_dummy="$PATH"
4077   for ac_dir in $ac_dummy; do 
4078     test -z "$ac_dir" && ac_dir=.
4079     if test -f $ac_dir/$ac_word; then
4080       ac_cv_path_SDL_CONFIG="$ac_dir/$ac_word"
4081       break
4082     fi
4083   done
4084   IFS="$ac_save_ifs"
4085   test -z "$ac_cv_path_SDL_CONFIG" && ac_cv_path_SDL_CONFIG="no"
4086   ;;
4087 esac
4088 fi
4089 SDL_CONFIG="$ac_cv_path_SDL_CONFIG"
4090 if test -n "$SDL_CONFIG"; then
4091   echo "$ac_t""$SDL_CONFIG" 1>&6
4092 else
4093   echo "$ac_t""no" 1>&6
4094 fi
4095
4096   SDL_HEADER="SDL/SDL.h"
4097   if test x${SDL_CONFIG} = xno; then
4098     # Extract the first word of "sdl11-config", so it can be a program name with args.
4099 set dummy sdl11-config; ac_word=$2
4100 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4101 echo "configure:4102: checking for $ac_word" >&5
4102 if eval "test \"`echo '$''{'ac_cv_path_SDL_CONFIG'+set}'`\" = set"; then
4103   echo $ac_n "(cached) $ac_c" 1>&6
4104 else
4105   case "$SDL_CONFIG" in
4106   /*)
4107   ac_cv_path_SDL_CONFIG="$SDL_CONFIG" # Let the user override the test with a path.
4108   ;;
4109   ?:/*)                  
4110   ac_cv_path_SDL_CONFIG="$SDL_CONFIG" # Let the user override the test with a dos path.
4111   ;;
4112   *)
4113   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4114   ac_dummy="$PATH"
4115   for ac_dir in $ac_dummy; do 
4116     test -z "$ac_dir" && ac_dir=.
4117     if test -f $ac_dir/$ac_word; then
4118       ac_cv_path_SDL_CONFIG="$ac_dir/$ac_word"
4119       break
4120     fi
4121   done
4122   IFS="$ac_save_ifs"
4123   test -z "$ac_cv_path_SDL_CONFIG" && ac_cv_path_SDL_CONFIG="no"
4124   ;;
4125 esac
4126 fi
4127 SDL_CONFIG="$ac_cv_path_SDL_CONFIG"
4128 if test -n "$SDL_CONFIG"; then
4129   echo "$ac_t""$SDL_CONFIG" 1>&6
4130 else
4131   echo "$ac_t""no" 1>&6
4132 fi
4133
4134     SDL_HEADER="SDL11/SDL.h"
4135   fi
4136   if test x${SDL_CONFIG} = xno; then
4137     # Extract the first word of "sdl12-config", so it can be a program name with args.
4138 set dummy sdl12-config; ac_word=$2
4139 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4140 echo "configure:4141: checking for $ac_word" >&5
4141 if eval "test \"`echo '$''{'ac_cv_path_SDL_CONFIG'+set}'`\" = set"; then
4142   echo $ac_n "(cached) $ac_c" 1>&6
4143 else
4144   case "$SDL_CONFIG" in
4145   /*)
4146   ac_cv_path_SDL_CONFIG="$SDL_CONFIG" # Let the user override the test with a path.
4147   ;;
4148   ?:/*)                  
4149   ac_cv_path_SDL_CONFIG="$SDL_CONFIG" # Let the user override the test with a dos path.
4150   ;;
4151   *)
4152   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4153   ac_dummy="$PATH"
4154   for ac_dir in $ac_dummy; do 
4155     test -z "$ac_dir" && ac_dir=.
4156     if test -f $ac_dir/$ac_word; then
4157       ac_cv_path_SDL_CONFIG="$ac_dir/$ac_word"
4158       break
4159     fi
4160   done
4161   IFS="$ac_save_ifs"
4162   test -z "$ac_cv_path_SDL_CONFIG" && ac_cv_path_SDL_CONFIG="no"
4163   ;;
4164 esac
4165 fi
4166 SDL_CONFIG="$ac_cv_path_SDL_CONFIG"
4167 if test -n "$SDL_CONFIG"; then
4168   echo "$ac_t""$SDL_CONFIG" 1>&6
4169 else
4170   echo "$ac_t""no" 1>&6
4171 fi
4172
4173     SDL_HEADER="SDL12/SDL.h"
4174   fi
4175   if test x${SDL_CONFIG} != xno; then
4176     for ac_hdr in $SDL_HEADER
4177 do
4178 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4179 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4180 echo "configure:4181: checking for $ac_hdr" >&5
4181 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4182   echo $ac_n "(cached) $ac_c" 1>&6
4183 else
4184   cat > conftest.$ac_ext <<EOF
4185 #line 4186 "configure"
4186 #include "confdefs.h"
4187 #include <$ac_hdr>
4188 EOF
4189 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4190 { (eval echo configure:4191: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4191 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4192 if test -z "$ac_err"; then
4193   rm -rf conftest*
4194   eval "ac_cv_header_$ac_safe=yes"
4195 else
4196   echo "$ac_err" >&5
4197   echo "configure: failed program was:" >&5
4198   cat conftest.$ac_ext >&5
4199   rm -rf conftest*
4200   eval "ac_cv_header_$ac_safe=no"
4201 fi
4202 rm -f conftest*
4203 fi
4204 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4205   echo "$ac_t""yes" 1>&6
4206     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4207   cat >> confdefs.h <<EOF
4208 #define $ac_tr_hdr 1
4209 EOF
4210  
4211 else
4212   echo "$ac_t""no" 1>&6
4213 echo "The development package for SDL is not installed. Please install it"
4214           echo "and try again."
4215           exit 
4216 fi
4217 done
4218
4219     if expr 1.1.5 \> $($SDL_CONFIG --version); then
4220       echo "You need SDL version 1.1.5 or later."
4221       exit
4222     fi
4223     PLUGINS="${PLUGINS} sdl"
4224     CFLAGS_SDL="`${SDL_CONFIG} --cflags`"
4225     LIB_SDL="`${SDL_CONFIG} --libs | sed 's,-rdynamic,,'`"
4226   elif test "x$withval" =  "xyes"; then
4227     echo "I couldn't find the SDL package. You can download libSDL from"
4228     echo "http://www.libsdl.org/."
4229     exit
4230   fi
4231 fi
4232
4233 # Check whether --with-directx or --without-directx was given.
4234 if test "${with_directx+set}" = set; then
4235   withval="$with_directx"
4236    if test "x$withval" != "xno";
4237     then
4238       PLUGINS="${PLUGINS} directx";
4239       if test "x$withval" != "xyes";
4240       then
4241         LIB_DIRECTX="${LIB_DIRECTX} -L"$withval"/lib -lgdi32 -ldxguid"
4242         INCLUDE="${INCLUDE} -I"$withval"/include"
4243       else
4244         for ac_hdr in directx.h
4245 do
4246 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4247 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4248 echo "configure:4249: checking for $ac_hdr" >&5
4249 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4250   echo $ac_n "(cached) $ac_c" 1>&6
4251 else
4252   cat > conftest.$ac_ext <<EOF
4253 #line 4254 "configure"
4254 #include "confdefs.h"
4255 #include <$ac_hdr>
4256 EOF
4257 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4258 { (eval echo configure:4259: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4259 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4260 if test -z "$ac_err"; then
4261   rm -rf conftest*
4262   eval "ac_cv_header_$ac_safe=yes"
4263 else
4264   echo "$ac_err" >&5
4265   echo "configure: failed program was:" >&5
4266   cat conftest.$ac_ext >&5
4267   rm -rf conftest*
4268   eval "ac_cv_header_$ac_safe=no"
4269 fi
4270 rm -f conftest*
4271 fi
4272 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4273   echo "$ac_t""yes" 1>&6
4274     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4275   cat >> confdefs.h <<EOF
4276 #define $ac_tr_hdr 1
4277 EOF
4278  
4279 else
4280   echo "$ac_t""no" 1>&6
4281 echo "Cannot find DirectX headers !"; exit
4282 fi
4283 done
4284
4285         LIB_DIRECTX="${LIB_DIRECTX} -L/usr/lib -lgdi32 -ldxguid"
4286       fi
4287     fi 
4288 fi
4289
4290     if test "x$withval" = "x";
4291     then
4292       for ac_hdr in directx.h
4293 do
4294 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4295 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4296 echo "configure:4297: checking for $ac_hdr" >&5
4297 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4298   echo $ac_n "(cached) $ac_c" 1>&6
4299 else
4300   cat > conftest.$ac_ext <<EOF
4301 #line 4302 "configure"
4302 #include "confdefs.h"
4303 #include <$ac_hdr>
4304 EOF
4305 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4306 { (eval echo configure:4307: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4307 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4308 if test -z "$ac_err"; then
4309   rm -rf conftest*
4310   eval "ac_cv_header_$ac_safe=yes"
4311 else
4312   echo "$ac_err" >&5
4313   echo "configure: failed program was:" >&5
4314   cat conftest.$ac_ext >&5
4315   rm -rf conftest*
4316   eval "ac_cv_header_$ac_safe=no"
4317 fi
4318 rm -f conftest*
4319 fi
4320 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4321   echo "$ac_t""yes" 1>&6
4322     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4323   cat >> confdefs.h <<EOF
4324 #define $ac_tr_hdr 1
4325 EOF
4326  PLUGINS="${PLUGINS} directx"
4327        LIB_DIRECTX="${LIB_DIRECTX} -L/usr/lib -lgdi32 -ldxguid"
4328 else
4329   echo "$ac_t""no" 1>&6
4330 fi
4331 done
4332
4333     fi
4334
4335 # Check whether --with-glide or --without-glide was given.
4336 if test "${with_glide+set}" = set; then
4337   withval="$with_glide"
4338    if test "x$withval" != "xno";
4339     then
4340       PLUGINS="${PLUGINS} glide";
4341       if test "x$withval" != "xyes";
4342       then
4343         LIB_GLIDE="-l"$withval" -lm"
4344       else
4345         LIB_GLIDE="-lglide2x -lm"
4346       fi
4347     fi 
4348 fi
4349
4350
4351 # Check whether --enable-ncurses or --disable-ncurses was given.
4352 if test "${enable_ncurses+set}" = set; then
4353   enableval="$enable_ncurses"
4354   if test x$enable_ncurses = xyes; then
4355      PLUGINS="${PLUGINS} ncurses"
4356      LIB_NCURSES="-lncurses"
4357    fi
4358 fi
4359
4360
4361 # Check whether --enable-qt or --disable-qt was given.
4362 if test "${enable_qt+set}" = set; then
4363   enableval="$enable_qt"
4364   if test x$enable_qt = xyes; then
4365      PLUGINS="${PLUGINS} qt"
4366      ALIASES="${ALIASES} qvlc"
4367      LIB_QT="-lqt -L${QTDIR}/lib"
4368      if test -x ${QTDIR}/bin/moc ;
4369      then
4370        MOC=${QTDIR}/bin/moc
4371      else
4372        MOC=moc
4373      fi
4374    fi
4375 fi
4376
4377
4378 # Check whether --enable-kde or --disable-kde was given.
4379 if test "${enable_kde+set}" = set; then
4380   enableval="$enable_kde"
4381   if test x$enable_kde = xyes; then
4382      PLUGINS="${PLUGINS} kde";
4383      ALIASES="${ALIASES} kvlc";
4384      LIB_KDE="-lkfile"
4385    fi
4386 fi
4387
4388
4389 # Check whether --enable-gnome or --disable-gnome was given.
4390 if test "${enable_gnome+set}" = set; then
4391   enableval="$enable_gnome"
4392   if test x$enable_gnome = xyes; then
4393      PLUGINS="${PLUGINS} gnome"
4394      ALIASES="${ALIASES} gnome-vlc"
4395      LIB_GNOME="`gnome-config --libs gnomeui | sed 's,-rdynamic,,'`"
4396    fi
4397 fi
4398
4399
4400 # Check whether --enable-gtk or --disable-gtk was given.
4401 if test "${enable_gtk+set}" = set; then
4402   enableval="$enable_gtk"
4403   :
4404 fi
4405
4406 if test x$enable_gtk != xno; then
4407   # Extract the first word of "gtk-config", so it can be a program name with args.
4408 set dummy gtk-config; ac_word=$2
4409 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4410 echo "configure:4411: checking for $ac_word" >&5
4411 if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then
4412   echo $ac_n "(cached) $ac_c" 1>&6
4413 else
4414   case "$GTK_CONFIG" in
4415   /*)
4416   ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a path.
4417   ;;
4418   ?:/*)                  
4419   ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a dos path.
4420   ;;
4421   *)
4422   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4423   ac_dummy="$PATH"
4424   for ac_dir in $ac_dummy; do 
4425     test -z "$ac_dir" && ac_dir=.
4426     if test -f $ac_dir/$ac_word; then
4427       ac_cv_path_GTK_CONFIG="$ac_dir/$ac_word"
4428       break
4429     fi
4430   done
4431   IFS="$ac_save_ifs"
4432   test -z "$ac_cv_path_GTK_CONFIG" && ac_cv_path_GTK_CONFIG="no"
4433   ;;
4434 esac
4435 fi
4436 GTK_CONFIG="$ac_cv_path_GTK_CONFIG"
4437 if test -n "$GTK_CONFIG"; then
4438   echo "$ac_t""$GTK_CONFIG" 1>&6
4439 else
4440   echo "$ac_t""no" 1>&6
4441 fi
4442
4443   if test x${GTK_CONFIG} != xno; then
4444     PLUGINS="${PLUGINS} gtk"
4445     ALIASES="${ALIASES} gvlc"
4446     CFLAGS_GTK="`${GTK_CONFIG} --cflags gtk`"
4447     LIB_GTK="`${GTK_CONFIG} --libs gtk | sed 's,-rdynamic,,'`"
4448   fi
4449 fi
4450
4451 # Check whether --enable-x11 or --disable-x11 was given.
4452 if test "${enable_x11+set}" = set; then
4453   enableval="$enable_x11"
4454   :
4455 fi
4456
4457 if test x$enable_x11 != xno; then
4458   if test x$x_includes = xNONE; then
4459     x_includes=/usr/X11R6/include
4460   fi
4461   if test x$x_libraries = xNONE; then
4462     x_libraries=/usr/X11R6/lib
4463   fi
4464   saved_CPPFLAGS=$CPPFLAGS
4465   CPPFLAGS="$CPPFLAGS -I$x_includes"
4466   for ac_hdr in X11/Xlib.h
4467 do
4468 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4469 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4470 echo "configure:4471: checking for $ac_hdr" >&5
4471 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4472   echo $ac_n "(cached) $ac_c" 1>&6
4473 else
4474   cat > conftest.$ac_ext <<EOF
4475 #line 4476 "configure"
4476 #include "confdefs.h"
4477 #include <$ac_hdr>
4478 EOF
4479 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4480 { (eval echo configure:4481: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4481 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4482 if test -z "$ac_err"; then
4483   rm -rf conftest*
4484   eval "ac_cv_header_$ac_safe=yes"
4485 else
4486   echo "$ac_err" >&5
4487   echo "configure: failed program was:" >&5
4488   cat conftest.$ac_ext >&5
4489   rm -rf conftest*
4490   eval "ac_cv_header_$ac_safe=no"
4491 fi
4492 rm -f conftest*
4493 fi
4494 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4495   echo "$ac_t""yes" 1>&6
4496     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4497   cat >> confdefs.h <<EOF
4498 #define $ac_tr_hdr 1
4499 EOF
4500  
4501     PLUGINS="${PLUGINS} x11"
4502     LIB_X11="-L$x_libraries -lX11 -lXext"
4503     CFLAGS_X11="-I$x_includes"
4504   
4505   CPPFLAGS=$saved_CPPFLAGS
4506 else
4507   echo "$ac_t""no" 1>&6
4508 fi
4509 done
4510
4511 fi
4512
4513 # Check whether --enable-xvideo or --disable-xvideo was given.
4514 if test "${enable_xvideo+set}" = set; then
4515   enableval="$enable_xvideo"
4516   :
4517 fi
4518
4519 if test x$enable_xvideo != xno; then
4520   if test x$x_includes = xNONE; then
4521     x_includes=/usr/X11R6/include
4522   fi
4523   if test x$x_libraries = xNONE; then
4524     x_libraries=/usr/X11R6/lib
4525   fi
4526   saved_CPPFLAGS=$CPPFLAGS
4527   CPPFLAGS="$CPPFLAGS -I$x_includes"
4528   for ac_hdr in X11/extensions/Xv.h
4529 do
4530 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4531 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4532 echo "configure:4533: checking for $ac_hdr" >&5
4533 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4534   echo $ac_n "(cached) $ac_c" 1>&6
4535 else
4536   cat > conftest.$ac_ext <<EOF
4537 #line 4538 "configure"
4538 #include "confdefs.h"
4539 #include <$ac_hdr>
4540 EOF
4541 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4542 { (eval echo configure:4543: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4543 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4544 if test -z "$ac_err"; then
4545   rm -rf conftest*
4546   eval "ac_cv_header_$ac_safe=yes"
4547 else
4548   echo "$ac_err" >&5
4549   echo "configure: failed program was:" >&5
4550   cat conftest.$ac_ext >&5
4551   rm -rf conftest*
4552   eval "ac_cv_header_$ac_safe=no"
4553 fi
4554 rm -f conftest*
4555 fi
4556 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4557   echo "$ac_t""yes" 1>&6
4558     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4559   cat >> confdefs.h <<EOF
4560 #define $ac_tr_hdr 1
4561 EOF
4562  
4563     PLUGINS="${PLUGINS} xvideo"
4564     LIB_XVIDEO="-L$x_libraries -lX11 -lXext -lXv"
4565     CFLAGS_X11="-I$x_includes"
4566   
4567   CPPFLAGS=$saved_CPPFLAGS
4568 else
4569   echo "$ac_t""no" 1>&6
4570 fi
4571 done
4572
4573 fi
4574
4575 # Check whether --enable-alsa or --disable-alsa was given.
4576 if test "${enable_alsa+set}" = set; then
4577   enableval="$enable_alsa"
4578   if test x$enable_alsa = xyes; then ac_safe=`echo "sys/asoundlib.h" | sed 'y%./+-%__p_%'`
4579 echo $ac_n "checking for sys/asoundlib.h""... $ac_c" 1>&6
4580 echo "configure:4581: checking for sys/asoundlib.h" >&5
4581 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4582   echo $ac_n "(cached) $ac_c" 1>&6
4583 else
4584   cat > conftest.$ac_ext <<EOF
4585 #line 4586 "configure"
4586 #include "confdefs.h"
4587 #include <sys/asoundlib.h>
4588 EOF
4589 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4590 { (eval echo configure:4591: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4591 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4592 if test -z "$ac_err"; then
4593   rm -rf conftest*
4594   eval "ac_cv_header_$ac_safe=yes"
4595 else
4596   echo "$ac_err" >&5
4597   echo "configure: failed program was:" >&5
4598   cat conftest.$ac_ext >&5
4599   rm -rf conftest*
4600   eval "ac_cv_header_$ac_safe=no"
4601 fi
4602 rm -f conftest*
4603 fi
4604 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4605   echo "$ac_t""yes" 1>&6
4606   echo $ac_n "checking for main in -lasound""... $ac_c" 1>&6
4607 echo "configure:4608: checking for main in -lasound" >&5
4608 ac_lib_var=`echo asound'_'main | sed 'y%./+-%__p_%'`
4609 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4610   echo $ac_n "(cached) $ac_c" 1>&6
4611 else
4612   ac_save_LIBS="$LIBS"
4613 LIBS="-lasound  $LIBS"
4614 cat > conftest.$ac_ext <<EOF
4615 #line 4616 "configure"
4616 #include "confdefs.h"
4617
4618 int main() {
4619 main()
4620 ; return 0; }
4621 EOF
4622 if { (eval echo configure:4623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4623   rm -rf conftest*
4624   eval "ac_cv_lib_$ac_lib_var=yes"
4625 else
4626   echo "configure: failed program was:" >&5
4627   cat conftest.$ac_ext >&5
4628   rm -rf conftest*
4629   eval "ac_cv_lib_$ac_lib_var=no"
4630 fi
4631 rm -f conftest*
4632 LIBS="$ac_save_LIBS"
4633
4634 fi
4635 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4636   echo "$ac_t""yes" 1>&6
4637   have_alsa="true"
4638 else
4639   echo "$ac_t""no" 1>&6
4640 have_alsa="false"
4641 fi
4642
4643 else
4644   echo "$ac_t""no" 1>&6
4645 have_alsa="false"
4646 fi
4647  if test x$have_alsa = xtrue; then
4648      PLUGINS="${PLUGINS} alsa"
4649      LIB_ALSA="-lasound"
4650    fi; fi
4651 fi
4652
4653
4654 fi
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707 trap '' 1 2 15
4708 cat > confcache <<\EOF
4709 # This file is a shell script that caches the results of configure
4710 # tests run on this system so they can be shared between configure
4711 # scripts and configure runs.  It is not useful on other systems.
4712 # If it contains results you don't want to keep, you may remove or edit it.
4713 #
4714 # By default, configure uses ./config.cache as the cache file,
4715 # creating it if it does not exist already.  You can give configure
4716 # the --cache-file=FILE option to use a different cache file; that is
4717 # what configure does when it calls configure scripts in
4718 # subdirectories, so they share the cache.
4719 # Giving --cache-file=/dev/null disables caching, for debugging configure.
4720 # config.status only pays attention to the cache file if you give it the
4721 # --recheck option to rerun configure.
4722 #
4723 EOF
4724 # The following way of writing the cache mishandles newlines in values,
4725 # but we know of no workaround that is simple, portable, and efficient.
4726 # So, don't put newlines in cache variables' values.
4727 # Ultrix sh set writes to stderr and can't be redirected directly,
4728 # and sets the high bit in the cache file unless we assign to the vars.
4729 (set) 2>&1 |
4730   case `(ac_space=' '; set | grep ac_space) 2>&1` in
4731   *ac_space=\ *)
4732     # `set' does not quote correctly, so add quotes (double-quote substitution
4733     # turns \\\\ into \\, and sed turns \\ into \).
4734     sed -n \
4735       -e "s/'/'\\\\''/g" \
4736       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
4737     ;;
4738   *)
4739     # `set' quotes correctly as required by POSIX, so do not add quotes.
4740     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
4741     ;;
4742   esac >> confcache
4743 if cmp -s $cache_file confcache; then
4744   :
4745 else
4746   if test -w $cache_file; then
4747     echo "updating cache $cache_file"
4748     cat confcache > $cache_file
4749   else
4750     echo "not updating unwritable cache $cache_file"
4751   fi
4752 fi
4753 rm -f confcache
4754
4755 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
4756
4757 test "x$prefix" = xNONE && prefix=$ac_default_prefix
4758 # Let make expand exec_prefix.
4759 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4760
4761 # Any assignment to VPATH causes Sun make to only execute
4762 # the first set of double-colon rules, so remove it if not needed.
4763 # If there is a colon in the path, we need to keep it.
4764 if test "x$srcdir" = x.; then
4765   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
4766 fi
4767
4768 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
4769
4770 DEFS=-DHAVE_CONFIG_H
4771
4772 # Without the "./", some shells look in PATH for config.status.
4773 : ${CONFIG_STATUS=./config.status}
4774
4775 echo creating $CONFIG_STATUS
4776 rm -f $CONFIG_STATUS
4777 cat > $CONFIG_STATUS <<EOF
4778 #! /bin/sh
4779 # Generated automatically by configure.
4780 # Run this file to recreate the current configuration.
4781 # This directory was configured as follows,
4782 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4783 #
4784 # $0 $ac_configure_args
4785 #
4786 # Compiler output produced by configure, useful for debugging
4787 # configure, is in ./config.log if it exists.
4788
4789 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
4790 for ac_option
4791 do
4792   case "\$ac_option" in
4793   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
4794     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
4795     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
4796   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
4797     echo "$CONFIG_STATUS generated by autoconf version 2.13"
4798     exit 0 ;;
4799   -help | --help | --hel | --he | --h)
4800     echo "\$ac_cs_usage"; exit 0 ;;
4801   *) echo "\$ac_cs_usage"; exit 1 ;;
4802   esac
4803 done
4804
4805 ac_given_srcdir=$srcdir
4806 ac_given_INSTALL="$INSTALL"
4807
4808 trap 'rm -fr `echo "Makefile.opts include/config.h include/defs.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
4809 EOF
4810 cat >> $CONFIG_STATUS <<EOF
4811
4812 # Protect against being on the right side of a sed subst in config.status.
4813 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
4814  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
4815 $ac_vpsub
4816 $extrasub
4817 s%@SHELL@%$SHELL%g
4818 s%@CFLAGS@%$CFLAGS%g
4819 s%@CPPFLAGS@%$CPPFLAGS%g
4820 s%@CXXFLAGS@%$CXXFLAGS%g
4821 s%@FFLAGS@%$FFLAGS%g
4822 s%@DEFS@%$DEFS%g
4823 s%@LDFLAGS@%$LDFLAGS%g
4824 s%@LIBS@%$LIBS%g
4825 s%@exec_prefix@%$exec_prefix%g
4826 s%@prefix@%$prefix%g
4827 s%@program_transform_name@%$program_transform_name%g
4828 s%@bindir@%$bindir%g
4829 s%@sbindir@%$sbindir%g
4830 s%@libexecdir@%$libexecdir%g
4831 s%@datadir@%$datadir%g
4832 s%@sysconfdir@%$sysconfdir%g
4833 s%@sharedstatedir@%$sharedstatedir%g
4834 s%@localstatedir@%$localstatedir%g
4835 s%@libdir@%$libdir%g
4836 s%@includedir@%$includedir%g
4837 s%@oldincludedir@%$oldincludedir%g
4838 s%@infodir@%$infodir%g
4839 s%@mandir@%$mandir%g
4840 s%@host@%$host%g
4841 s%@host_alias@%$host_alias%g
4842 s%@host_cpu@%$host_cpu%g
4843 s%@host_vendor@%$host_vendor%g
4844 s%@host_os@%$host_os%g
4845 s%@VLC_VERSION@%$VLC_VERSION%g
4846 s%@LIBDVDCSS_VERSION@%$LIBDVDCSS_VERSION%g
4847 s%@VLC_CODENAME@%$VLC_CODENAME%g
4848 s%@SET_MAKE@%$SET_MAKE%g
4849 s%@CC@%$CC%g
4850 s%@CPP@%$CPP%g
4851 s%@RANLIB@%$RANLIB%g
4852 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
4853 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
4854 s%@INSTALL_DATA@%$INSTALL_DATA%g
4855 s%@GETOPT@%$GETOPT%g
4856 s%@ESD_CONFIG@%$ESD_CONFIG%g
4857 s%@SDL_CONFIG@%$SDL_CONFIG%g
4858 s%@GTK_CONFIG@%$GTK_CONFIG%g
4859 s%@SYS@%$SYS%g
4860 s%@ARCH@%$ARCH%g
4861 s%@PLUGINS@%$PLUGINS%g
4862 s%@BUILTINS@%$BUILTINS%g
4863 s%@ALIASES@%$ALIASES%g
4864 s%@DEFINE@%$DEFINE%g
4865 s%@INCLUDE@%$INCLUDE%g
4866 s%@DEBUG@%$DEBUG%g
4867 s%@STATS@%$STATS%g
4868 s%@ASM@%$ASM%g
4869 s%@TRACE@%$TRACE%g
4870 s%@PROFILING@%$PROFILING%g
4871 s%@OPTIMS@%$OPTIMS%g
4872 s%@CSS@%$CSS%g
4873 s%@MOC@%$MOC%g
4874 s%@WINDRES@%$WINDRES%g
4875 s%@LCFLAGS@%$LCFLAGS%g
4876 s%@PLCFLAGS@%$PLCFLAGS%g
4877 s%@LIB@%$LIB%g
4878 s%@LIB_ALSA@%$LIB_ALSA%g
4879 s%@LIB_BEOS@%$LIB_BEOS%g
4880 s%@LIB_DARWIN@%$LIB_DARWIN%g
4881 s%@LIB_DVD@%$LIB_DVD%g
4882 s%@LIB_ESD@%$LIB_ESD%g
4883 s%@LIB_GGI@%$LIB_GGI%g
4884 s%@LIB_GLIDE@%$LIB_GLIDE%g
4885 s%@LIB_GNOME@%$LIB_GNOME%g
4886 s%@LIB_GTK@%$LIB_GTK%g
4887 s%@LIB_IDCTALTIVEC@%$LIB_IDCTALTIVEC%g
4888 s%@LIB_KDE@%$LIB_KDE%g
4889 s%@LIB_MACOSX@%$LIB_MACOSX%g
4890 s%@LIB_QNX@%$LIB_QNX%g
4891 s%@LIB_NCURSES@%$LIB_NCURSES%g
4892 s%@LIB_QT@%$LIB_QT%g
4893 s%@LIB_TS@%$LIB_TS%g
4894 s%@LIB_SDL@%$LIB_SDL%g
4895 s%@LIB_DIRECTX@%$LIB_DIRECTX%g
4896 s%@LIB_X11@%$LIB_X11%g
4897 s%@LIB_XVIDEO@%$LIB_XVIDEO%g
4898 s%@LIB_YUV@%$LIB_YUV%g
4899 s%@CFLAGS_VLC@%$CFLAGS_VLC%g
4900 s%@CFLAGS_DVD@%$CFLAGS_DVD%g
4901 s%@CFLAGS_GTK@%$CFLAGS_GTK%g
4902 s%@CFLAGS_SDL@%$CFLAGS_SDL%g
4903 s%@CFLAGS_X11@%$CFLAGS_X11%g
4904 s%@LOCAL_LIBDVDCSS@%$LOCAL_LIBDVDCSS%g
4905
4906 CEOF
4907 EOF
4908
4909 cat >> $CONFIG_STATUS <<\EOF
4910
4911 # Split the substitutions into bite-sized pieces for seds with
4912 # small command number limits, like on Digital OSF/1 and HP-UX.
4913 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
4914 ac_file=1 # Number of current file.
4915 ac_beg=1 # First line for current file.
4916 ac_end=$ac_max_sed_cmds # Line after last line for current file.
4917 ac_more_lines=:
4918 ac_sed_cmds=""
4919 while $ac_more_lines; do
4920   if test $ac_beg -gt 1; then
4921     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
4922   else
4923     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
4924   fi
4925   if test ! -s conftest.s$ac_file; then
4926     ac_more_lines=false
4927     rm -f conftest.s$ac_file
4928   else
4929     if test -z "$ac_sed_cmds"; then
4930       ac_sed_cmds="sed -f conftest.s$ac_file"
4931     else
4932       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
4933     fi
4934     ac_file=`expr $ac_file + 1`
4935     ac_beg=$ac_end
4936     ac_end=`expr $ac_end + $ac_max_sed_cmds`
4937   fi
4938 done
4939 if test -z "$ac_sed_cmds"; then
4940   ac_sed_cmds=cat
4941 fi
4942 EOF
4943
4944 cat >> $CONFIG_STATUS <<EOF
4945
4946 CONFIG_FILES=\${CONFIG_FILES-"Makefile.opts include/config.h"}
4947 EOF
4948 cat >> $CONFIG_STATUS <<\EOF
4949 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
4950   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4951   case "$ac_file" in
4952   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4953        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4954   *) ac_file_in="${ac_file}.in" ;;
4955   esac
4956
4957   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
4958
4959   # Remove last slash and all that follows it.  Not all systems have dirname.
4960   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4961   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4962     # The file is in a subdirectory.
4963     test ! -d "$ac_dir" && mkdir "$ac_dir"
4964     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
4965     # A "../" for each directory in $ac_dir_suffix.
4966     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
4967   else
4968     ac_dir_suffix= ac_dots=
4969   fi
4970
4971   case "$ac_given_srcdir" in
4972   .)  srcdir=.
4973       if test -z "$ac_dots"; then top_srcdir=.
4974       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
4975   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
4976   *) # Relative path.
4977     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
4978     top_srcdir="$ac_dots$ac_given_srcdir" ;;
4979   esac
4980
4981   case "$ac_given_INSTALL" in
4982   [/$]*) INSTALL="$ac_given_INSTALL" ;;
4983   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
4984   esac
4985
4986   echo creating "$ac_file"
4987   rm -f "$ac_file"
4988   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
4989   case "$ac_file" in
4990   *Makefile*) ac_comsub="1i\\
4991 # $configure_input" ;;
4992   *) ac_comsub= ;;
4993   esac
4994
4995   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4996   sed -e "$ac_comsub
4997 s%@configure_input@%$configure_input%g
4998 s%@srcdir@%$srcdir%g
4999 s%@top_srcdir@%$top_srcdir%g
5000 s%@INSTALL@%$INSTALL%g
5001 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
5002 fi; done
5003 rm -f conftest.s*
5004
5005 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
5006 # NAME is the cpp macro being defined and VALUE is the value it is being given.
5007 #
5008 # ac_d sets the value in "#define NAME VALUE" lines.
5009 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
5010 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
5011 ac_dC='\3'
5012 ac_dD='%g'
5013 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
5014 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
5015 ac_uB='\([      ]\)%\1#\2define\3'
5016 ac_uC=' '
5017 ac_uD='\4%g'
5018 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
5019 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
5020 ac_eB='$%\1#\2define\3'
5021 ac_eC=' '
5022 ac_eD='%g'
5023
5024 if test "${CONFIG_HEADERS+set}" != set; then
5025 EOF
5026 cat >> $CONFIG_STATUS <<EOF
5027   CONFIG_HEADERS="include/defs.h"
5028 EOF
5029 cat >> $CONFIG_STATUS <<\EOF
5030 fi
5031 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
5032   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5033   case "$ac_file" in
5034   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5035        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5036   *) ac_file_in="${ac_file}.in" ;;
5037   esac
5038
5039   echo creating $ac_file
5040
5041   rm -f conftest.frag conftest.in conftest.out
5042   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5043   cat $ac_file_inputs > conftest.in
5044
5045 EOF
5046
5047 # Transform confdefs.h into a sed script conftest.vals that substitutes
5048 # the proper values into config.h.in to produce config.h.  And first:
5049 # Protect against being on the right side of a sed subst in config.status.
5050 # Protect against being in an unquoted here document in config.status.
5051 rm -f conftest.vals
5052 cat > conftest.hdr <<\EOF
5053 s/[\\&%]/\\&/g
5054 s%[\\$`]%\\&%g
5055 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
5056 s%ac_d%ac_u%gp
5057 s%ac_u%ac_e%gp
5058 EOF
5059 sed -n -f conftest.hdr confdefs.h > conftest.vals
5060 rm -f conftest.hdr
5061
5062 # This sed command replaces #undef with comments.  This is necessary, for
5063 # example, in the case of _POSIX_SOURCE, which is predefined and required
5064 # on some systems where configure will not decide to define it.
5065 cat >> conftest.vals <<\EOF
5066 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
5067 EOF
5068
5069 # Break up conftest.vals because some shells have a limit on
5070 # the size of here documents, and old seds have small limits too.
5071
5072 rm -f conftest.tail
5073 while :
5074 do
5075   ac_lines=`grep -c . conftest.vals`
5076   # grep -c gives empty output for an empty file on some AIX systems.
5077   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
5078   # Write a limited-size here document to conftest.frag.
5079   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
5080   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
5081   echo 'CEOF
5082   sed -f conftest.frag conftest.in > conftest.out
5083   rm -f conftest.in
5084   mv conftest.out conftest.in
5085 ' >> $CONFIG_STATUS
5086   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
5087   rm -f conftest.vals
5088   mv conftest.tail conftest.vals
5089 done
5090 rm -f conftest.vals
5091
5092 cat >> $CONFIG_STATUS <<\EOF
5093   rm -f conftest.frag conftest.h
5094   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
5095   cat conftest.in >> conftest.h
5096   rm -f conftest.in
5097   if cmp -s $ac_file conftest.h 2>/dev/null; then
5098     echo "$ac_file is unchanged"
5099     rm -f conftest.h
5100   else
5101     # Remove last slash and all that follows it.  Not all systems have dirname.
5102       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5103       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5104       # The file is in a subdirectory.
5105       test ! -d "$ac_dir" && mkdir "$ac_dir"
5106     fi
5107     rm -f $ac_file
5108     mv conftest.h $ac_file
5109   fi
5110 fi; done
5111
5112 EOF
5113 cat >> $CONFIG_STATUS <<EOF
5114
5115 EOF
5116 cat >> $CONFIG_STATUS <<\EOF
5117
5118 exit 0
5119 EOF
5120 chmod +x $CONFIG_STATUS
5121 rm -fr confdefs* $ac_clean_files
5122 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
5123
5124
5125 echo "
5126 global configuration
5127 --------------------
5128 system                : ${SYS}
5129 architecture          : ${ARCH}
5130 optimizations         : ${OPTIMS}
5131 inline assembly       : ${ASM}
5132
5133 vlc configuration
5134 -----------------
5135 vlc version           : ${VLC_VERSION}
5136 debug mode            : ${DEBUG}
5137 statistics            : ${STATS}
5138 trace mode            : ${TRACE}
5139 profiling             : ${PROFILING}
5140 need builtin getopt   : ${GETOPT}
5141 built-in modules      :${BUILTINS}
5142 plugin modules        :${PLUGINS}
5143 vlc aliases           :${ALIASES}
5144
5145 libdvdcss configuration
5146 -----------------------
5147 CSS decryption        : ${CSS}
5148
5149 You may now tune Makefile.opts at your convenience. To build vlc, type
5150 \`make vlc'. To build libdvdcss only, type \`make libdvdcss'."
5151