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