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