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