]> git.sesse.net Git - vlc/blob - configure
* Added a make uninstall rule.
[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]    way to use libdvdcss, either local-static, local-shared or a path to another libdvdcss such as /usr/local (default local-static)"
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.81
638
639 LIBDVDCSS_VERSION=0.0.2
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    case "x${withval}" in
3750     xlocal-static|xyes)
3751       # local libdvdcss, statically linked
3752       if test x${CAN_BUILD_LIBDVDCSS} = x1
3753       then
3754         LOCAL_LIBDVDCSS=1
3755         STATIC_LIBDVDCSS=1
3756         BUILTINS="${BUILTINS} dvd"
3757         CFLAGS_DVD="${CFLAGS_DVD} -I../../extras/libdvdcss"
3758         LIB_DVD="${LIB_DVD} lib/libdvdcss.a"
3759         LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} ../../lib/libdvdcss.a"
3760       fi
3761     ;;
3762     xlocal-shared)
3763       # local libdvdcss, dynamically linked
3764       if test x${CAN_BUILD_LIBDVDCSS} = x1
3765       then
3766         LOCAL_LIBDVDCSS=1
3767         BUILTINS="${BUILTINS} dvd"
3768         CFLAGS_DVD="${CFLAGS_DVD} -I../../extras/libdvdcss"
3769         LIB_DVD="${LIB_DVD} -Llib -ldvdcss"
3770         LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} -L../../lib -ldvdcss"
3771       fi
3772     ;;
3773     *)
3774       # existing libdvdcss
3775       BUILTINS="${BUILTINS} dvd"
3776       if test "x$withval" != "xyes"
3777       then
3778         LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} -L"$withval"/lib"
3779         CFLAGS_DVD="${CFLAGS_DVD} -I"$withval"/include"
3780       fi
3781       LIB_DVD="${LIB_DVD} -ldvdcss"
3782       LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} -ldvdcss"
3783     esac 
3784 else
3785   # user didn't decide, we choose to use local libdvdcss and link statically
3786    if test x${CAN_BUILD_LIBDVDCSS} = x1
3787     then
3788       LOCAL_LIBDVDCSS=1
3789       STATIC_LIBDVDCSS=1
3790       BUILTINS="${BUILTINS} dvd"
3791       CFLAGS_DVD="${CFLAGS_DVD} -I../../extras/libdvdcss"
3792       LIB_DVD="${LIB_DVD} lib/libdvdcss.a"
3793       LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} ../../lib/libdvdcss.a"
3794     fi 
3795 fi
3796
3797
3798 CSS=0
3799 # Check whether --enable-css or --disable-css was given.
3800 if test "${enable_css+set}" = set; then
3801   enableval="$enable_css"
3802    if test x$enableval = xyes
3803     then
3804       CSS=1
3805     fi 
3806 else
3807    CSS=1; 
3808 fi
3809
3810
3811 if test x${CSS} = x1
3812 then
3813   cat >> confdefs.h <<\EOF
3814 #define HAVE_CSS 1
3815 EOF
3816
3817 fi
3818
3819 # Check whether --enable-dummy or --disable-dummy was given.
3820 if test "${enable_dummy+set}" = set; then
3821   enableval="$enable_dummy"
3822   :
3823 fi
3824
3825
3826 if test x$enable_dummy != xno
3827 then
3828   BUILTINS="${BUILTINS} dummy"
3829 fi
3830
3831 # Check whether --enable-null or --disable-null was given.
3832 if test "${enable_null+set}" = set; then
3833   enableval="$enable_null"
3834   :
3835 fi
3836
3837
3838 if test x$enable_null != xno
3839 then
3840   BUILTINS="${BUILTINS} null"
3841 fi
3842
3843 # Check whether --enable-rc or --disable-rc was given.
3844 if test "${enable_rc+set}" = set; then
3845   enableval="$enable_rc"
3846   :
3847 fi
3848
3849
3850 if test x$enable_rc != xno
3851 then
3852   BUILTINS="${BUILTINS} rc"
3853 fi
3854
3855 if test x$SYS = xbeos
3856 then
3857     BUILTINS="${BUILTINS} beos"
3858     LIB_BEOS="-lbe -lgame -lroot -ltracker"
3859     PLCFLAGS="${PLCFLAGS} -nostart"
3860
3861 else
3862
3863 # Check whether --enable-dsp or --disable-dsp was given.
3864 if test "${enable_dsp+set}" = set; then
3865   enableval="$enable_dsp"
3866   :
3867 fi
3868
3869
3870 if test x$enable_dsp != xno
3871 then
3872   if test -c /dev/dsp
3873   then
3874     PLUGINS="${PLUGINS} dsp"
3875   fi
3876 fi
3877
3878 # Check whether --enable-esd or --disable-esd was given.
3879 if test "${enable_esd+set}" = set; then
3880   enableval="$enable_esd"
3881   if test x$enable_esd = xyes
3882    then
3883      # Extract the first word of "esd-config", so it can be a program name with args.
3884 set dummy esd-config; ac_word=$2
3885 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3886 echo "configure:3887: checking for $ac_word" >&5
3887 if eval "test \"`echo '$''{'ac_cv_path_ESD_CONFIG'+set}'`\" = set"; then
3888   echo $ac_n "(cached) $ac_c" 1>&6
3889 else
3890   case "$ESD_CONFIG" in
3891   /*)
3892   ac_cv_path_ESD_CONFIG="$ESD_CONFIG" # Let the user override the test with a path.
3893   ;;
3894   ?:/*)                  
3895   ac_cv_path_ESD_CONFIG="$ESD_CONFIG" # Let the user override the test with a dos path.
3896   ;;
3897   *)
3898   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3899   ac_dummy="$PATH"
3900   for ac_dir in $ac_dummy; do 
3901     test -z "$ac_dir" && ac_dir=.
3902     if test -f $ac_dir/$ac_word; then
3903       ac_cv_path_ESD_CONFIG="$ac_dir/$ac_word"
3904       break
3905     fi
3906   done
3907   IFS="$ac_save_ifs"
3908   test -z "$ac_cv_path_ESD_CONFIG" && ac_cv_path_ESD_CONFIG="no"
3909   ;;
3910 esac
3911 fi
3912 ESD_CONFIG="$ac_cv_path_ESD_CONFIG"
3913 if test -n "$ESD_CONFIG"; then
3914   echo "$ac_t""$ESD_CONFIG" 1>&6
3915 else
3916   echo "$ac_t""no" 1>&6
3917 fi
3918
3919      if test x${ESD_CONFIG} != xno
3920      then
3921        PLUGINS="${PLUGINS} esd"
3922        LIB_ESD="`${ESD_CONFIG} --libs`"
3923      fi
3924    fi
3925 fi
3926
3927
3928 # Check whether --enable-darwin or --disable-darwin was given.
3929 if test "${enable_darwin+set}" = set; then
3930   enableval="$enable_darwin"
3931   if test x$enable_darwin = xyes; then
3932      PLUGINS="${PLUGINS} darwin"
3933      LIB_DARWIN="-framework CoreAudio"
3934    fi
3935 fi
3936
3937
3938 # Check whether --enable-macosx or --disable-macosx was given.
3939 if test "${enable_macosx+set}" = set; then
3940   enableval="$enable_macosx"
3941   if test x$enable_macosx = xyes
3942    then
3943      BUILTINS="${BUILTINS} macosx"
3944      LIB_MACOSX="-framework CoreAudio -framework Carbon -framework AGL"
3945      LIB_TS="${LIB_TS} -framework AGL -framework Carbon"
3946      LIB_SDL="${LIB_SDL} -framework AGL -framework Carbon"
3947    fi
3948 else
3949   for ac_hdr in Carbon/Carbon.h
3950 do
3951 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3952 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3953 echo "configure:3954: checking for $ac_hdr" >&5
3954 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3955   echo $ac_n "(cached) $ac_c" 1>&6
3956 else
3957   cat > conftest.$ac_ext <<EOF
3958 #line 3959 "configure"
3959 #include "confdefs.h"
3960 #include <$ac_hdr>
3961 EOF
3962 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3963 { (eval echo configure:3964: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3964 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3965 if test -z "$ac_err"; then
3966   rm -rf conftest*
3967   eval "ac_cv_header_$ac_safe=yes"
3968 else
3969   echo "$ac_err" >&5
3970   echo "configure: failed program was:" >&5
3971   cat conftest.$ac_ext >&5
3972   rm -rf conftest*
3973   eval "ac_cv_header_$ac_safe=no"
3974 fi
3975 rm -f conftest*
3976 fi
3977 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3978   echo "$ac_t""yes" 1>&6
3979     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3980   cat >> confdefs.h <<EOF
3981 #define $ac_tr_hdr 1
3982 EOF
3983  BUILTINS="${BUILTINS} macosx"
3984      LIB_MACOSX="-framework CoreAudio -framework Carbon -framework AGL"
3985      LIB_TS="${LIB_TS} -framework AGL -framework Carbon"
3986      LIB_SDL="${LIB_SDL} -framework AGL -framework Carbon"
3987    
3988 else
3989   echo "$ac_t""no" 1>&6
3990 fi
3991 done
3992
3993 fi
3994
3995
3996 # Check whether --enable-qnx or --disable-qnx was given.
3997 if test "${enable_qnx+set}" = set; then
3998   enableval="$enable_qnx"
3999   :
4000 fi
4001
4002     if test x$enable_qnx != xno
4003     then
4004       for ac_hdr in Ph.h
4005 do
4006 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4007 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4008 echo "configure:4009: checking for $ac_hdr" >&5
4009 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4010   echo $ac_n "(cached) $ac_c" 1>&6
4011 else
4012   cat > conftest.$ac_ext <<EOF
4013 #line 4014 "configure"
4014 #include "confdefs.h"
4015 #include <$ac_hdr>
4016 EOF
4017 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4018 { (eval echo configure:4019: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4019 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4020 if test -z "$ac_err"; then
4021   rm -rf conftest*
4022   eval "ac_cv_header_$ac_safe=yes"
4023 else
4024   echo "$ac_err" >&5
4025   echo "configure: failed program was:" >&5
4026   cat conftest.$ac_ext >&5
4027   rm -rf conftest*
4028   eval "ac_cv_header_$ac_safe=no"
4029 fi
4030 rm -f conftest*
4031 fi
4032 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4033   echo "$ac_t""yes" 1>&6
4034     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4035   cat >> confdefs.h <<EOF
4036 #define $ac_tr_hdr 1
4037 EOF
4038  
4039         PLUGINS="${PLUGINS} qnx"
4040         LIB_QNX="-lasound -lph"
4041       
4042 else
4043   echo "$ac_t""no" 1>&6
4044 fi
4045 done
4046
4047     fi
4048
4049 # Check whether --enable-fb or --disable-fb was given.
4050 if test "${enable_fb+set}" = set; then
4051   enableval="$enable_fb"
4052   if test x$enable_fb = xyes; then PLUGINS="${PLUGINS} fb"; fi
4053 fi
4054
4055
4056 # Check whether --with-ggi or --without-ggi was given.
4057 if test "${with_ggi+set}" = set; then
4058   withval="$with_ggi"
4059    if test "x$withval" != "xno"
4060     then
4061       PLUGINS="${PLUGINS} ggi"
4062       if test "x$withval" != "xyes"
4063       then
4064         LIB_GGI="-l"$withval
4065       else
4066         LIB_GGI="-lggi"
4067       fi
4068     fi 
4069 fi
4070
4071
4072 # Check whether --enable-sdl or --disable-sdl was given.
4073 if test "${enable_sdl+set}" = set; then
4074   enableval="$enable_sdl"
4075   :
4076 fi
4077
4078 if test "x$withval" != "xno"
4079 then
4080   cat >> confdefs.h <<\EOF
4081 #define HAVE_SDL_SDL_H 0
4082 EOF
4083
4084   cat >> confdefs.h <<\EOF
4085 #define HAVE_SDL11_SDL_H 0
4086 EOF
4087
4088   cat >> confdefs.h <<\EOF
4089 #define HAVE_SDL12_SDL_H 0
4090 EOF
4091
4092   # Extract the first word of "sdl-config", so it can be a program name with args.
4093 set dummy sdl-config; ac_word=$2
4094 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4095 echo "configure:4096: checking for $ac_word" >&5
4096 if eval "test \"`echo '$''{'ac_cv_path_SDL_CONFIG'+set}'`\" = set"; then
4097   echo $ac_n "(cached) $ac_c" 1>&6
4098 else
4099   case "$SDL_CONFIG" in
4100   /*)
4101   ac_cv_path_SDL_CONFIG="$SDL_CONFIG" # Let the user override the test with a path.
4102   ;;
4103   ?:/*)                  
4104   ac_cv_path_SDL_CONFIG="$SDL_CONFIG" # Let the user override the test with a dos path.
4105   ;;
4106   *)
4107   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4108   ac_dummy="$PATH"
4109   for ac_dir in $ac_dummy; do 
4110     test -z "$ac_dir" && ac_dir=.
4111     if test -f $ac_dir/$ac_word; then
4112       ac_cv_path_SDL_CONFIG="$ac_dir/$ac_word"
4113       break
4114     fi
4115   done
4116   IFS="$ac_save_ifs"
4117   test -z "$ac_cv_path_SDL_CONFIG" && ac_cv_path_SDL_CONFIG="no"
4118   ;;
4119 esac
4120 fi
4121 SDL_CONFIG="$ac_cv_path_SDL_CONFIG"
4122 if test -n "$SDL_CONFIG"; then
4123   echo "$ac_t""$SDL_CONFIG" 1>&6
4124 else
4125   echo "$ac_t""no" 1>&6
4126 fi
4127
4128   SDL_HEADER="SDL/SDL.h"
4129   if test x${SDL_CONFIG} = xno; then
4130     # Extract the first word of "sdl11-config", so it can be a program name with args.
4131 set dummy sdl11-config; ac_word=$2
4132 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4133 echo "configure:4134: checking for $ac_word" >&5
4134 if eval "test \"`echo '$''{'ac_cv_path_SDL_CONFIG'+set}'`\" = set"; then
4135   echo $ac_n "(cached) $ac_c" 1>&6
4136 else
4137   case "$SDL_CONFIG" in
4138   /*)
4139   ac_cv_path_SDL_CONFIG="$SDL_CONFIG" # Let the user override the test with a path.
4140   ;;
4141   ?:/*)                  
4142   ac_cv_path_SDL_CONFIG="$SDL_CONFIG" # Let the user override the test with a dos path.
4143   ;;
4144   *)
4145   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4146   ac_dummy="$PATH"
4147   for ac_dir in $ac_dummy; do 
4148     test -z "$ac_dir" && ac_dir=.
4149     if test -f $ac_dir/$ac_word; then
4150       ac_cv_path_SDL_CONFIG="$ac_dir/$ac_word"
4151       break
4152     fi
4153   done
4154   IFS="$ac_save_ifs"
4155   test -z "$ac_cv_path_SDL_CONFIG" && ac_cv_path_SDL_CONFIG="no"
4156   ;;
4157 esac
4158 fi
4159 SDL_CONFIG="$ac_cv_path_SDL_CONFIG"
4160 if test -n "$SDL_CONFIG"; then
4161   echo "$ac_t""$SDL_CONFIG" 1>&6
4162 else
4163   echo "$ac_t""no" 1>&6
4164 fi
4165
4166     SDL_HEADER="SDL11/SDL.h"
4167   fi
4168   if test x${SDL_CONFIG} = xno; then
4169     # Extract the first word of "sdl12-config", so it can be a program name with args.
4170 set dummy sdl12-config; ac_word=$2
4171 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4172 echo "configure:4173: checking for $ac_word" >&5
4173 if eval "test \"`echo '$''{'ac_cv_path_SDL_CONFIG'+set}'`\" = set"; then
4174   echo $ac_n "(cached) $ac_c" 1>&6
4175 else
4176   case "$SDL_CONFIG" in
4177   /*)
4178   ac_cv_path_SDL_CONFIG="$SDL_CONFIG" # Let the user override the test with a path.
4179   ;;
4180   ?:/*)                  
4181   ac_cv_path_SDL_CONFIG="$SDL_CONFIG" # Let the user override the test with a dos path.
4182   ;;
4183   *)
4184   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4185   ac_dummy="$PATH"
4186   for ac_dir in $ac_dummy; do 
4187     test -z "$ac_dir" && ac_dir=.
4188     if test -f $ac_dir/$ac_word; then
4189       ac_cv_path_SDL_CONFIG="$ac_dir/$ac_word"
4190       break
4191     fi
4192   done
4193   IFS="$ac_save_ifs"
4194   test -z "$ac_cv_path_SDL_CONFIG" && ac_cv_path_SDL_CONFIG="no"
4195   ;;
4196 esac
4197 fi
4198 SDL_CONFIG="$ac_cv_path_SDL_CONFIG"
4199 if test -n "$SDL_CONFIG"; then
4200   echo "$ac_t""$SDL_CONFIG" 1>&6
4201 else
4202   echo "$ac_t""no" 1>&6
4203 fi
4204
4205     SDL_HEADER="SDL12/SDL.h"
4206   fi
4207   if test x${SDL_CONFIG} != xno; then
4208     for ac_hdr in $SDL_HEADER
4209 do
4210 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4211 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4212 echo "configure:4213: checking for $ac_hdr" >&5
4213 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4214   echo $ac_n "(cached) $ac_c" 1>&6
4215 else
4216   cat > conftest.$ac_ext <<EOF
4217 #line 4218 "configure"
4218 #include "confdefs.h"
4219 #include <$ac_hdr>
4220 EOF
4221 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4222 { (eval echo configure:4223: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4223 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4224 if test -z "$ac_err"; then
4225   rm -rf conftest*
4226   eval "ac_cv_header_$ac_safe=yes"
4227 else
4228   echo "$ac_err" >&5
4229   echo "configure: failed program was:" >&5
4230   cat conftest.$ac_ext >&5
4231   rm -rf conftest*
4232   eval "ac_cv_header_$ac_safe=no"
4233 fi
4234 rm -f conftest*
4235 fi
4236 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4237   echo "$ac_t""yes" 1>&6
4238     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4239   cat >> confdefs.h <<EOF
4240 #define $ac_tr_hdr 1
4241 EOF
4242  
4243 else
4244   echo "$ac_t""no" 1>&6
4245 echo "The development package for SDL is not installed. Please install it"
4246           echo "and try again."
4247           exit 
4248 fi
4249 done
4250
4251     if expr 1.1.5 \> $($SDL_CONFIG --version) >/dev/null
4252     then
4253       echo "You need SDL version 1.1.5 or later."
4254       exit
4255     fi
4256     PLUGINS="${PLUGINS} sdl"
4257     CFLAGS_SDL="`${SDL_CONFIG} --cflags`"
4258     LIB_SDL="`${SDL_CONFIG} --libs | sed 's,-rdynamic,,'`"
4259   elif test "x$withval" =  "xyes"
4260   then
4261     echo "I couldn't find the SDL package. You can download libSDL from"
4262     echo "http://www.libsdl.org/."
4263     exit
4264   fi
4265 fi
4266
4267 # Check whether --with-directx or --without-directx was given.
4268 if test "${with_directx+set}" = set; then
4269   withval="$with_directx"
4270    if test "x$withval" != "xno"
4271     then
4272       PLUGINS="${PLUGINS} directx"
4273       if test "x$withval" != "xyes"
4274       then
4275         LIB_DIRECTX="${LIB_DIRECTX} -L"$withval"/lib -lgdi32 -ldxguid"
4276         INCLUDE="${INCLUDE} -I"$withval"/include"
4277       else
4278         for ac_hdr in directx.h
4279 do
4280 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4281 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4282 echo "configure:4283: checking for $ac_hdr" >&5
4283 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4284   echo $ac_n "(cached) $ac_c" 1>&6
4285 else
4286   cat > conftest.$ac_ext <<EOF
4287 #line 4288 "configure"
4288 #include "confdefs.h"
4289 #include <$ac_hdr>
4290 EOF
4291 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4292 { (eval echo configure:4293: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4293 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4294 if test -z "$ac_err"; then
4295   rm -rf conftest*
4296   eval "ac_cv_header_$ac_safe=yes"
4297 else
4298   echo "$ac_err" >&5
4299   echo "configure: failed program was:" >&5
4300   cat conftest.$ac_ext >&5
4301   rm -rf conftest*
4302   eval "ac_cv_header_$ac_safe=no"
4303 fi
4304 rm -f conftest*
4305 fi
4306 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4307   echo "$ac_t""yes" 1>&6
4308     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4309   cat >> confdefs.h <<EOF
4310 #define $ac_tr_hdr 1
4311 EOF
4312  
4313 else
4314   echo "$ac_t""no" 1>&6
4315 echo "Cannot find DirectX headers !"; exit
4316 fi
4317 done
4318
4319         LIB_DIRECTX="${LIB_DIRECTX} -L/usr/lib -lgdi32 -ldxguid"
4320       fi
4321     fi 
4322 fi
4323
4324     if test "x$withval" = "x"
4325     then
4326       for ac_hdr in directx.h
4327 do
4328 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4329 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4330 echo "configure:4331: checking for $ac_hdr" >&5
4331 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4332   echo $ac_n "(cached) $ac_c" 1>&6
4333 else
4334   cat > conftest.$ac_ext <<EOF
4335 #line 4336 "configure"
4336 #include "confdefs.h"
4337 #include <$ac_hdr>
4338 EOF
4339 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4340 { (eval echo configure:4341: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4341 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4342 if test -z "$ac_err"; then
4343   rm -rf conftest*
4344   eval "ac_cv_header_$ac_safe=yes"
4345 else
4346   echo "$ac_err" >&5
4347   echo "configure: failed program was:" >&5
4348   cat conftest.$ac_ext >&5
4349   rm -rf conftest*
4350   eval "ac_cv_header_$ac_safe=no"
4351 fi
4352 rm -f conftest*
4353 fi
4354 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4355   echo "$ac_t""yes" 1>&6
4356     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4357   cat >> confdefs.h <<EOF
4358 #define $ac_tr_hdr 1
4359 EOF
4360  PLUGINS="${PLUGINS} directx"
4361        LIB_DIRECTX="${LIB_DIRECTX} -L/usr/lib -lgdi32 -ldxguid"
4362 else
4363   echo "$ac_t""no" 1>&6
4364 fi
4365 done
4366
4367     fi
4368
4369 # Check whether --with-glide or --without-glide was given.
4370 if test "${with_glide+set}" = set; then
4371   withval="$with_glide"
4372    if test "x$withval" != "xno"
4373     then
4374       PLUGINS="${PLUGINS} glide"
4375       if test "x$withval" != "xyes"
4376       then
4377         LIB_GLIDE="-l"$withval" -lm"
4378       else
4379         LIB_GLIDE="-lglide2x -lm"
4380       fi
4381     fi 
4382 fi
4383
4384
4385 # Check whether --enable-ncurses or --disable-ncurses was given.
4386 if test "${enable_ncurses+set}" = set; then
4387   enableval="$enable_ncurses"
4388   if test x$enable_ncurses = xyes; then
4389      PLUGINS="${PLUGINS} ncurses"
4390      LIB_NCURSES="-lncurses"
4391    fi
4392 fi
4393
4394
4395 # Check whether --enable-qt or --disable-qt was given.
4396 if test "${enable_qt+set}" = set; then
4397   enableval="$enable_qt"
4398   if test x$enable_qt = xyes; then
4399      PLUGINS="${PLUGINS} qt"
4400      ALIASES="${ALIASES} qvlc"
4401      LIB_QT="-lqt -L${QTDIR}/lib"
4402      if test -x ${QTDIR}/bin/moc
4403      then
4404        MOC=${QTDIR}/bin/moc
4405      else
4406        MOC=moc
4407      fi
4408    fi
4409 fi
4410
4411
4412 # Check whether --enable-kde or --disable-kde was given.
4413 if test "${enable_kde+set}" = set; then
4414   enableval="$enable_kde"
4415   if test x$enable_kde = xyes; then
4416      PLUGINS="${PLUGINS} kde"
4417      ALIASES="${ALIASES} kvlc"
4418      LIB_KDE="-lkfile"
4419    fi
4420 fi
4421
4422
4423 # Check whether --enable-gnome or --disable-gnome was given.
4424 if test "${enable_gnome+set}" = set; then
4425   enableval="$enable_gnome"
4426   if test x$enable_gnome = xyes; then
4427      PLUGINS="${PLUGINS} gnome"
4428      ALIASES="${ALIASES} gnome-vlc"
4429      LIB_GNOME="`gnome-config --libs gnomeui | sed 's,-rdynamic,,'`"
4430    fi
4431 fi
4432
4433
4434 # Check whether --enable-gtk or --disable-gtk was given.
4435 if test "${enable_gtk+set}" = set; then
4436   enableval="$enable_gtk"
4437   :
4438 fi
4439
4440 if test x$enable_gtk != xno; then
4441   # Extract the first word of "gtk-config", so it can be a program name with args.
4442 set dummy gtk-config; ac_word=$2
4443 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4444 echo "configure:4445: checking for $ac_word" >&5
4445 if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then
4446   echo $ac_n "(cached) $ac_c" 1>&6
4447 else
4448   case "$GTK_CONFIG" in
4449   /*)
4450   ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a path.
4451   ;;
4452   ?:/*)                  
4453   ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a dos path.
4454   ;;
4455   *)
4456   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4457   ac_dummy="$PATH"
4458   for ac_dir in $ac_dummy; do 
4459     test -z "$ac_dir" && ac_dir=.
4460     if test -f $ac_dir/$ac_word; then
4461       ac_cv_path_GTK_CONFIG="$ac_dir/$ac_word"
4462       break
4463     fi
4464   done
4465   IFS="$ac_save_ifs"
4466   test -z "$ac_cv_path_GTK_CONFIG" && ac_cv_path_GTK_CONFIG="no"
4467   ;;
4468 esac
4469 fi
4470 GTK_CONFIG="$ac_cv_path_GTK_CONFIG"
4471 if test -n "$GTK_CONFIG"; then
4472   echo "$ac_t""$GTK_CONFIG" 1>&6
4473 else
4474   echo "$ac_t""no" 1>&6
4475 fi
4476
4477   if test x${GTK_CONFIG} != xno; then
4478     PLUGINS="${PLUGINS} gtk"
4479     ALIASES="${ALIASES} gvlc"
4480     CFLAGS_GTK="`${GTK_CONFIG} --cflags gtk`"
4481     LIB_GTK="`${GTK_CONFIG} --libs gtk | sed 's,-rdynamic,,'`"
4482   fi
4483 fi
4484
4485 # Check whether --enable-x11 or --disable-x11 was given.
4486 if test "${enable_x11+set}" = set; then
4487   enableval="$enable_x11"
4488   :
4489 fi
4490
4491 if test x$enable_x11 != xno; then
4492   if test x$x_includes = xNONE; then
4493     x_includes=/usr/X11R6/include
4494   fi
4495   if test x$x_libraries = xNONE; then
4496     x_libraries=/usr/X11R6/lib
4497   fi
4498   saved_CPPFLAGS=$CPPFLAGS
4499   CPPFLAGS="$CPPFLAGS -I$x_includes"
4500   for ac_hdr in X11/Xlib.h
4501 do
4502 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4503 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4504 echo "configure:4505: checking for $ac_hdr" >&5
4505 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4506   echo $ac_n "(cached) $ac_c" 1>&6
4507 else
4508   cat > conftest.$ac_ext <<EOF
4509 #line 4510 "configure"
4510 #include "confdefs.h"
4511 #include <$ac_hdr>
4512 EOF
4513 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4514 { (eval echo configure:4515: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4515 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4516 if test -z "$ac_err"; then
4517   rm -rf conftest*
4518   eval "ac_cv_header_$ac_safe=yes"
4519 else
4520   echo "$ac_err" >&5
4521   echo "configure: failed program was:" >&5
4522   cat conftest.$ac_ext >&5
4523   rm -rf conftest*
4524   eval "ac_cv_header_$ac_safe=no"
4525 fi
4526 rm -f conftest*
4527 fi
4528 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4529   echo "$ac_t""yes" 1>&6
4530     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4531   cat >> confdefs.h <<EOF
4532 #define $ac_tr_hdr 1
4533 EOF
4534  
4535     PLUGINS="${PLUGINS} x11"
4536     LIB_X11="-L$x_libraries -lX11 -lXext"
4537     CFLAGS_X11="-I$x_includes"
4538   
4539   CPPFLAGS=$saved_CPPFLAGS
4540 else
4541   echo "$ac_t""no" 1>&6
4542 fi
4543 done
4544
4545 fi
4546
4547 # Check whether --enable-xvideo or --disable-xvideo was given.
4548 if test "${enable_xvideo+set}" = set; then
4549   enableval="$enable_xvideo"
4550   :
4551 fi
4552
4553 if test x$enable_xvideo != xno; then
4554   if test x$x_includes = xNONE; then
4555     x_includes=/usr/X11R6/include
4556   fi
4557   if test x$x_libraries = xNONE; then
4558     x_libraries=/usr/X11R6/lib
4559   fi
4560   saved_CPPFLAGS=$CPPFLAGS
4561   CPPFLAGS="$CPPFLAGS -I$x_includes"
4562   for ac_hdr in X11/extensions/Xv.h
4563 do
4564 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4565 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4566 echo "configure:4567: checking for $ac_hdr" >&5
4567 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4568   echo $ac_n "(cached) $ac_c" 1>&6
4569 else
4570   cat > conftest.$ac_ext <<EOF
4571 #line 4572 "configure"
4572 #include "confdefs.h"
4573 #include <$ac_hdr>
4574 EOF
4575 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4576 { (eval echo configure:4577: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4577 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4578 if test -z "$ac_err"; then
4579   rm -rf conftest*
4580   eval "ac_cv_header_$ac_safe=yes"
4581 else
4582   echo "$ac_err" >&5
4583   echo "configure: failed program was:" >&5
4584   cat conftest.$ac_ext >&5
4585   rm -rf conftest*
4586   eval "ac_cv_header_$ac_safe=no"
4587 fi
4588 rm -f conftest*
4589 fi
4590 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4591   echo "$ac_t""yes" 1>&6
4592     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4593   cat >> confdefs.h <<EOF
4594 #define $ac_tr_hdr 1
4595 EOF
4596  
4597     PLUGINS="${PLUGINS} xvideo"
4598     LIB_XVIDEO="-L$x_libraries -lX11 -lXext -lXv"
4599     CFLAGS_X11="-I$x_includes"
4600   
4601   CPPFLAGS=$saved_CPPFLAGS
4602 else
4603   echo "$ac_t""no" 1>&6
4604 fi
4605 done
4606
4607 fi
4608
4609 # Check whether --enable-alsa or --disable-alsa was given.
4610 if test "${enable_alsa+set}" = set; then
4611   enableval="$enable_alsa"
4612   if test x$enable_alsa = xyes
4613    then
4614      ac_safe=`echo "sys/asoundlib.h" | sed 'y%./+-%__p_%'`
4615 echo $ac_n "checking for sys/asoundlib.h""... $ac_c" 1>&6
4616 echo "configure:4617: checking for sys/asoundlib.h" >&5
4617 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4618   echo $ac_n "(cached) $ac_c" 1>&6
4619 else
4620   cat > conftest.$ac_ext <<EOF
4621 #line 4622 "configure"
4622 #include "confdefs.h"
4623 #include <sys/asoundlib.h>
4624 EOF
4625 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4626 { (eval echo configure:4627: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4627 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4628 if test -z "$ac_err"; then
4629   rm -rf conftest*
4630   eval "ac_cv_header_$ac_safe=yes"
4631 else
4632   echo "$ac_err" >&5
4633   echo "configure: failed program was:" >&5
4634   cat conftest.$ac_ext >&5
4635   rm -rf conftest*
4636   eval "ac_cv_header_$ac_safe=no"
4637 fi
4638 rm -f conftest*
4639 fi
4640 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4641   echo "$ac_t""yes" 1>&6
4642   echo $ac_n "checking for main in -lasound""... $ac_c" 1>&6
4643 echo "configure:4644: checking for main in -lasound" >&5
4644 ac_lib_var=`echo asound'_'main | sed 'y%./+-%__p_%'`
4645 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4646   echo $ac_n "(cached) $ac_c" 1>&6
4647 else
4648   ac_save_LIBS="$LIBS"
4649 LIBS="-lasound  $LIBS"
4650 cat > conftest.$ac_ext <<EOF
4651 #line 4652 "configure"
4652 #include "confdefs.h"
4653
4654 int main() {
4655 main()
4656 ; return 0; }
4657 EOF
4658 if { (eval echo configure:4659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4659   rm -rf conftest*
4660   eval "ac_cv_lib_$ac_lib_var=yes"
4661 else
4662   echo "configure: failed program was:" >&5
4663   cat conftest.$ac_ext >&5
4664   rm -rf conftest*
4665   eval "ac_cv_lib_$ac_lib_var=no"
4666 fi
4667 rm -f conftest*
4668 LIBS="$ac_save_LIBS"
4669
4670 fi
4671 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4672   echo "$ac_t""yes" 1>&6
4673   have_alsa="true"
4674 else
4675   echo "$ac_t""no" 1>&6
4676 have_alsa="false"
4677 fi
4678
4679 else
4680   echo "$ac_t""no" 1>&6
4681 have_alsa="false"
4682 fi
4683
4684      if test x$have_alsa = xtrue
4685      then
4686        PLUGINS="${PLUGINS} alsa"
4687        LIB_ALSA="-lasound"
4688      fi
4689    fi
4690 fi
4691
4692
4693 fi
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
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748 trap '' 1 2 15
4749 cat > confcache <<\EOF
4750 # This file is a shell script that caches the results of configure
4751 # tests run on this system so they can be shared between configure
4752 # scripts and configure runs.  It is not useful on other systems.
4753 # If it contains results you don't want to keep, you may remove or edit it.
4754 #
4755 # By default, configure uses ./config.cache as the cache file,
4756 # creating it if it does not exist already.  You can give configure
4757 # the --cache-file=FILE option to use a different cache file; that is
4758 # what configure does when it calls configure scripts in
4759 # subdirectories, so they share the cache.
4760 # Giving --cache-file=/dev/null disables caching, for debugging configure.
4761 # config.status only pays attention to the cache file if you give it the
4762 # --recheck option to rerun configure.
4763 #
4764 EOF
4765 # The following way of writing the cache mishandles newlines in values,
4766 # but we know of no workaround that is simple, portable, and efficient.
4767 # So, don't put newlines in cache variables' values.
4768 # Ultrix sh set writes to stderr and can't be redirected directly,
4769 # and sets the high bit in the cache file unless we assign to the vars.
4770 (set) 2>&1 |
4771   case `(ac_space=' '; set | grep ac_space) 2>&1` in
4772   *ac_space=\ *)
4773     # `set' does not quote correctly, so add quotes (double-quote substitution
4774     # turns \\\\ into \\, and sed turns \\ into \).
4775     sed -n \
4776       -e "s/'/'\\\\''/g" \
4777       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
4778     ;;
4779   *)
4780     # `set' quotes correctly as required by POSIX, so do not add quotes.
4781     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
4782     ;;
4783   esac >> confcache
4784 if cmp -s $cache_file confcache; then
4785   :
4786 else
4787   if test -w $cache_file; then
4788     echo "updating cache $cache_file"
4789     cat confcache > $cache_file
4790   else
4791     echo "not updating unwritable cache $cache_file"
4792   fi
4793 fi
4794 rm -f confcache
4795
4796 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
4797
4798 test "x$prefix" = xNONE && prefix=$ac_default_prefix
4799 # Let make expand exec_prefix.
4800 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4801
4802 # Any assignment to VPATH causes Sun make to only execute
4803 # the first set of double-colon rules, so remove it if not needed.
4804 # If there is a colon in the path, we need to keep it.
4805 if test "x$srcdir" = x.; then
4806   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
4807 fi
4808
4809 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
4810
4811 DEFS=-DHAVE_CONFIG_H
4812
4813 # Without the "./", some shells look in PATH for config.status.
4814 : ${CONFIG_STATUS=./config.status}
4815
4816 echo creating $CONFIG_STATUS
4817 rm -f $CONFIG_STATUS
4818 cat > $CONFIG_STATUS <<EOF
4819 #! /bin/sh
4820 # Generated automatically by configure.
4821 # Run this file to recreate the current configuration.
4822 # This directory was configured as follows,
4823 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4824 #
4825 # $0 $ac_configure_args
4826 #
4827 # Compiler output produced by configure, useful for debugging
4828 # configure, is in ./config.log if it exists.
4829
4830 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
4831 for ac_option
4832 do
4833   case "\$ac_option" in
4834   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
4835     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
4836     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
4837   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
4838     echo "$CONFIG_STATUS generated by autoconf version 2.13"
4839     exit 0 ;;
4840   -help | --help | --hel | --he | --h)
4841     echo "\$ac_cs_usage"; exit 0 ;;
4842   *) echo "\$ac_cs_usage"; exit 1 ;;
4843   esac
4844 done
4845
4846 ac_given_srcdir=$srcdir
4847 ac_given_INSTALL="$INSTALL"
4848
4849 trap 'rm -fr `echo "Makefile.opts include/config.h include/defs.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
4850 EOF
4851 cat >> $CONFIG_STATUS <<EOF
4852
4853 # Protect against being on the right side of a sed subst in config.status.
4854 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
4855  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
4856 $ac_vpsub
4857 $extrasub
4858 s%@SHELL@%$SHELL%g
4859 s%@CFLAGS@%$CFLAGS%g
4860 s%@CPPFLAGS@%$CPPFLAGS%g
4861 s%@CXXFLAGS@%$CXXFLAGS%g
4862 s%@FFLAGS@%$FFLAGS%g
4863 s%@DEFS@%$DEFS%g
4864 s%@LDFLAGS@%$LDFLAGS%g
4865 s%@LIBS@%$LIBS%g
4866 s%@exec_prefix@%$exec_prefix%g
4867 s%@prefix@%$prefix%g
4868 s%@program_transform_name@%$program_transform_name%g
4869 s%@bindir@%$bindir%g
4870 s%@sbindir@%$sbindir%g
4871 s%@libexecdir@%$libexecdir%g
4872 s%@datadir@%$datadir%g
4873 s%@sysconfdir@%$sysconfdir%g
4874 s%@sharedstatedir@%$sharedstatedir%g
4875 s%@localstatedir@%$localstatedir%g
4876 s%@libdir@%$libdir%g
4877 s%@includedir@%$includedir%g
4878 s%@oldincludedir@%$oldincludedir%g
4879 s%@infodir@%$infodir%g
4880 s%@mandir@%$mandir%g
4881 s%@host@%$host%g
4882 s%@host_alias@%$host_alias%g
4883 s%@host_cpu@%$host_cpu%g
4884 s%@host_vendor@%$host_vendor%g
4885 s%@host_os@%$host_os%g
4886 s%@VLC_VERSION@%$VLC_VERSION%g
4887 s%@LIBDVDCSS_VERSION@%$LIBDVDCSS_VERSION%g
4888 s%@VLC_CODENAME@%$VLC_CODENAME%g
4889 s%@SET_MAKE@%$SET_MAKE%g
4890 s%@CC@%$CC%g
4891 s%@CPP@%$CPP%g
4892 s%@RANLIB@%$RANLIB%g
4893 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
4894 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
4895 s%@INSTALL_DATA@%$INSTALL_DATA%g
4896 s%@ESD_CONFIG@%$ESD_CONFIG%g
4897 s%@SDL_CONFIG@%$SDL_CONFIG%g
4898 s%@GTK_CONFIG@%$GTK_CONFIG%g
4899 s%@SYS@%$SYS%g
4900 s%@ARCH@%$ARCH%g
4901 s%@PLUGINS@%$PLUGINS%g
4902 s%@BUILTINS@%$BUILTINS%g
4903 s%@ALIASES@%$ALIASES%g
4904 s%@DEFINE@%$DEFINE%g
4905 s%@INCLUDE@%$INCLUDE%g
4906 s%@DEBUG@%$DEBUG%g
4907 s%@STATS@%$STATS%g
4908 s%@ASM@%$ASM%g
4909 s%@TRACE@%$TRACE%g
4910 s%@PROFILING@%$PROFILING%g
4911 s%@OPTIMS@%$OPTIMS%g
4912 s%@GETOPT@%$GETOPT%g
4913 s%@CSS@%$CSS%g
4914 s%@MOC@%$MOC%g
4915 s%@WINDRES@%$WINDRES%g
4916 s%@LCFLAGS@%$LCFLAGS%g
4917 s%@PLCFLAGS@%$PLCFLAGS%g
4918 s%@LIB@%$LIB%g
4919 s%@LIB_ALSA@%$LIB_ALSA%g
4920 s%@LIB_BEOS@%$LIB_BEOS%g
4921 s%@LIB_DARWIN@%$LIB_DARWIN%g
4922 s%@LIB_DVD@%$LIB_DVD%g
4923 s%@LIB_DVD_PLUGIN@%$LIB_DVD_PLUGIN%g
4924 s%@LIB_ESD@%$LIB_ESD%g
4925 s%@LIB_GGI@%$LIB_GGI%g
4926 s%@LIB_GLIDE@%$LIB_GLIDE%g
4927 s%@LIB_GNOME@%$LIB_GNOME%g
4928 s%@LIB_GTK@%$LIB_GTK%g
4929 s%@LIB_IDCTALTIVEC@%$LIB_IDCTALTIVEC%g
4930 s%@LIB_KDE@%$LIB_KDE%g
4931 s%@LIB_MACOSX@%$LIB_MACOSX%g
4932 s%@LIB_QNX@%$LIB_QNX%g
4933 s%@LIB_NCURSES@%$LIB_NCURSES%g
4934 s%@LIB_QT@%$LIB_QT%g
4935 s%@LIB_TS@%$LIB_TS%g
4936 s%@LIB_SDL@%$LIB_SDL%g
4937 s%@LIB_DIRECTX@%$LIB_DIRECTX%g
4938 s%@LIB_X11@%$LIB_X11%g
4939 s%@LIB_XVIDEO@%$LIB_XVIDEO%g
4940 s%@LIB_YUV@%$LIB_YUV%g
4941 s%@CFLAGS_VLC@%$CFLAGS_VLC%g
4942 s%@CFLAGS_DVD@%$CFLAGS_DVD%g
4943 s%@CFLAGS_GTK@%$CFLAGS_GTK%g
4944 s%@CFLAGS_SDL@%$CFLAGS_SDL%g
4945 s%@CFLAGS_X11@%$CFLAGS_X11%g
4946 s%@LOCAL_LIBDVDCSS@%$LOCAL_LIBDVDCSS%g
4947
4948 CEOF
4949 EOF
4950
4951 cat >> $CONFIG_STATUS <<\EOF
4952
4953 # Split the substitutions into bite-sized pieces for seds with
4954 # small command number limits, like on Digital OSF/1 and HP-UX.
4955 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
4956 ac_file=1 # Number of current file.
4957 ac_beg=1 # First line for current file.
4958 ac_end=$ac_max_sed_cmds # Line after last line for current file.
4959 ac_more_lines=:
4960 ac_sed_cmds=""
4961 while $ac_more_lines; do
4962   if test $ac_beg -gt 1; then
4963     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
4964   else
4965     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
4966   fi
4967   if test ! -s conftest.s$ac_file; then
4968     ac_more_lines=false
4969     rm -f conftest.s$ac_file
4970   else
4971     if test -z "$ac_sed_cmds"; then
4972       ac_sed_cmds="sed -f conftest.s$ac_file"
4973     else
4974       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
4975     fi
4976     ac_file=`expr $ac_file + 1`
4977     ac_beg=$ac_end
4978     ac_end=`expr $ac_end + $ac_max_sed_cmds`
4979   fi
4980 done
4981 if test -z "$ac_sed_cmds"; then
4982   ac_sed_cmds=cat
4983 fi
4984 EOF
4985
4986 cat >> $CONFIG_STATUS <<EOF
4987
4988 CONFIG_FILES=\${CONFIG_FILES-"Makefile.opts include/config.h"}
4989 EOF
4990 cat >> $CONFIG_STATUS <<\EOF
4991 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
4992   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4993   case "$ac_file" in
4994   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4995        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4996   *) ac_file_in="${ac_file}.in" ;;
4997   esac
4998
4999   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
5000
5001   # Remove last slash and all that follows it.  Not all systems have dirname.
5002   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5003   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5004     # The file is in a subdirectory.
5005     test ! -d "$ac_dir" && mkdir "$ac_dir"
5006     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
5007     # A "../" for each directory in $ac_dir_suffix.
5008     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
5009   else
5010     ac_dir_suffix= ac_dots=
5011   fi
5012
5013   case "$ac_given_srcdir" in
5014   .)  srcdir=.
5015       if test -z "$ac_dots"; then top_srcdir=.
5016       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
5017   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
5018   *) # Relative path.
5019     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
5020     top_srcdir="$ac_dots$ac_given_srcdir" ;;
5021   esac
5022
5023   case "$ac_given_INSTALL" in
5024   [/$]*) INSTALL="$ac_given_INSTALL" ;;
5025   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
5026   esac
5027
5028   echo creating "$ac_file"
5029   rm -f "$ac_file"
5030   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
5031   case "$ac_file" in
5032   *Makefile*) ac_comsub="1i\\
5033 # $configure_input" ;;
5034   *) ac_comsub= ;;
5035   esac
5036
5037   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5038   sed -e "$ac_comsub
5039 s%@configure_input@%$configure_input%g
5040 s%@srcdir@%$srcdir%g
5041 s%@top_srcdir@%$top_srcdir%g
5042 s%@INSTALL@%$INSTALL%g
5043 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
5044 fi; done
5045 rm -f conftest.s*
5046
5047 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
5048 # NAME is the cpp macro being defined and VALUE is the value it is being given.
5049 #
5050 # ac_d sets the value in "#define NAME VALUE" lines.
5051 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
5052 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
5053 ac_dC='\3'
5054 ac_dD='%g'
5055 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
5056 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
5057 ac_uB='\([      ]\)%\1#\2define\3'
5058 ac_uC=' '
5059 ac_uD='\4%g'
5060 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
5061 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
5062 ac_eB='$%\1#\2define\3'
5063 ac_eC=' '
5064 ac_eD='%g'
5065
5066 if test "${CONFIG_HEADERS+set}" != set; then
5067 EOF
5068 cat >> $CONFIG_STATUS <<EOF
5069   CONFIG_HEADERS="include/defs.h"
5070 EOF
5071 cat >> $CONFIG_STATUS <<\EOF
5072 fi
5073 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
5074   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5075   case "$ac_file" in
5076   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5077        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5078   *) ac_file_in="${ac_file}.in" ;;
5079   esac
5080
5081   echo creating $ac_file
5082
5083   rm -f conftest.frag conftest.in conftest.out
5084   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5085   cat $ac_file_inputs > conftest.in
5086
5087 EOF
5088
5089 # Transform confdefs.h into a sed script conftest.vals that substitutes
5090 # the proper values into config.h.in to produce config.h.  And first:
5091 # Protect against being on the right side of a sed subst in config.status.
5092 # Protect against being in an unquoted here document in config.status.
5093 rm -f conftest.vals
5094 cat > conftest.hdr <<\EOF
5095 s/[\\&%]/\\&/g
5096 s%[\\$`]%\\&%g
5097 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
5098 s%ac_d%ac_u%gp
5099 s%ac_u%ac_e%gp
5100 EOF
5101 sed -n -f conftest.hdr confdefs.h > conftest.vals
5102 rm -f conftest.hdr
5103
5104 # This sed command replaces #undef with comments.  This is necessary, for
5105 # example, in the case of _POSIX_SOURCE, which is predefined and required
5106 # on some systems where configure will not decide to define it.
5107 cat >> conftest.vals <<\EOF
5108 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
5109 EOF
5110
5111 # Break up conftest.vals because some shells have a limit on
5112 # the size of here documents, and old seds have small limits too.
5113
5114 rm -f conftest.tail
5115 while :
5116 do
5117   ac_lines=`grep -c . conftest.vals`
5118   # grep -c gives empty output for an empty file on some AIX systems.
5119   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
5120   # Write a limited-size here document to conftest.frag.
5121   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
5122   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
5123   echo 'CEOF
5124   sed -f conftest.frag conftest.in > conftest.out
5125   rm -f conftest.in
5126   mv conftest.out conftest.in
5127 ' >> $CONFIG_STATUS
5128   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
5129   rm -f conftest.vals
5130   mv conftest.tail conftest.vals
5131 done
5132 rm -f conftest.vals
5133
5134 cat >> $CONFIG_STATUS <<\EOF
5135   rm -f conftest.frag conftest.h
5136   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
5137   cat conftest.in >> conftest.h
5138   rm -f conftest.in
5139   if cmp -s $ac_file conftest.h 2>/dev/null; then
5140     echo "$ac_file is unchanged"
5141     rm -f conftest.h
5142   else
5143     # Remove last slash and all that follows it.  Not all systems have dirname.
5144       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5145       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5146       # The file is in a subdirectory.
5147       test ! -d "$ac_dir" && mkdir "$ac_dir"
5148     fi
5149     rm -f $ac_file
5150     mv conftest.h $ac_file
5151   fi
5152 fi; done
5153
5154 EOF
5155 cat >> $CONFIG_STATUS <<EOF
5156
5157 EOF
5158 cat >> $CONFIG_STATUS <<\EOF
5159
5160 exit 0
5161 EOF
5162 chmod +x $CONFIG_STATUS
5163 rm -fr confdefs* $ac_clean_files
5164 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
5165
5166
5167 echo "
5168 global configuration
5169 --------------------
5170 system                : ${SYS}
5171 architecture          : ${ARCH}
5172 optimizations         : ${OPTIMS}
5173
5174 vlc configuration
5175 -----------------
5176 vlc version           : ${VLC_VERSION}
5177 debug mode            : ${DEBUG}
5178 statistics            : ${STATS}
5179 trace mode            : ${TRACE}
5180 profiling             : ${PROFILING}
5181 need builtin getopt   : ${GETOPT}
5182 built-in modules      :${BUILTINS}
5183 plugin modules        :${PLUGINS}
5184 vlc aliases           :${ALIASES}
5185
5186 libdvdcss configuration
5187 -----------------------
5188 need to be built      : ${LOCAL_LIBDVDCSS}"
5189
5190 if test x${LOCAL_LIBDVDCSS} = x1
5191 then
5192   echo "link statically       : ${STATIC_LIBDVDCSS}
5193 CSS decryption        : ${CSS}"
5194 fi
5195
5196 echo "
5197 You may now tune Makefile.opts at your convenience. To build vlc, type
5198 \`make vlc'. To build libdvdcss only, type \`make libdvdcss'."
5199