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