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