]> git.sesse.net Git - vlc/blob - configure
* Borrowed MPlayer's fast memcpy() routines. Best is autodetected, choose
[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
2380 /* This mess was copied from the GNU getpagesize.h.  */
2381 #ifndef HAVE_GETPAGESIZE
2382 # ifdef HAVE_UNISTD_H
2383 #  include <unistd.h>
2384 # endif
2385
2386 /* Assume that all systems that can run configure have sys/param.h.  */
2387 # ifndef HAVE_SYS_PARAM_H
2388 #  define HAVE_SYS_PARAM_H 1
2389 # endif
2390
2391 # ifdef _SC_PAGESIZE
2392 #  define getpagesize() sysconf(_SC_PAGESIZE)
2393 # else /* no _SC_PAGESIZE */
2394 #  ifdef HAVE_SYS_PARAM_H
2395 #   include <sys/param.h>
2396 #   ifdef EXEC_PAGESIZE
2397 #    define getpagesize() EXEC_PAGESIZE
2398 #   else /* no EXEC_PAGESIZE */
2399 #    ifdef NBPG
2400 #     define getpagesize() NBPG * CLSIZE
2401 #     ifndef CLSIZE
2402 #      define CLSIZE 1
2403 #     endif /* no CLSIZE */
2404 #    else /* no NBPG */
2405 #     ifdef NBPC
2406 #      define getpagesize() NBPC
2407 #     else /* no NBPC */
2408 #      ifdef PAGESIZE
2409 #       define getpagesize() PAGESIZE
2410 #      endif /* PAGESIZE */
2411 #     endif /* no NBPC */
2412 #    endif /* no NBPG */
2413 #   endif /* no EXEC_PAGESIZE */
2414 #  else /* no HAVE_SYS_PARAM_H */
2415 #   define getpagesize() 8192   /* punt totally */
2416 #  endif /* no HAVE_SYS_PARAM_H */
2417 # endif /* no _SC_PAGESIZE */
2418
2419 #endif /* no HAVE_GETPAGESIZE */
2420
2421 #ifdef __cplusplus
2422 extern "C" { void *malloc(unsigned); }
2423 #else
2424 char *malloc();
2425 #endif
2426
2427 int
2428 main()
2429 {
2430         char *data, *data2, *data3;
2431         int i, pagesize;
2432         int fd;
2433
2434         pagesize = getpagesize();
2435
2436         /*
2437          * First, make a file with some known garbage in it.
2438          */
2439         data = malloc(pagesize);
2440         if (!data)
2441                 exit(1);
2442         for (i = 0; i < pagesize; ++i)
2443                 *(data + i) = rand();
2444         umask(0);
2445         fd = creat("conftestmmap", 0600);
2446         if (fd < 0)
2447                 exit(1);
2448         if (write(fd, data, pagesize) != pagesize)
2449                 exit(1);
2450         close(fd);
2451
2452         /*
2453          * Next, try to mmap the file at a fixed address which
2454          * already has something else allocated at it.  If we can,
2455          * also make sure that we see the same garbage.
2456          */
2457         fd = open("conftestmmap", O_RDWR);
2458         if (fd < 0)
2459                 exit(1);
2460         data2 = malloc(2 * pagesize);
2461         if (!data2)
2462                 exit(1);
2463         data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
2464         if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
2465             MAP_PRIVATE | MAP_FIXED, fd, 0L))
2466                 exit(1);
2467         for (i = 0; i < pagesize; ++i)
2468                 if (*(data + i) != *(data2 + i))
2469                         exit(1);
2470
2471         /*
2472          * Finally, make sure that changes to the mapped area
2473          * do not percolate back to the file as seen by read().
2474          * (This is a bug on some variants of i386 svr4.0.)
2475          */
2476         for (i = 0; i < pagesize; ++i)
2477                 *(data2 + i) = *(data2 + i) + 1;
2478         data3 = malloc(pagesize);
2479         if (!data3)
2480                 exit(1);
2481         if (read(fd, data3, pagesize) != pagesize)
2482                 exit(1);
2483         for (i = 0; i < pagesize; ++i)
2484                 if (*(data + i) != *(data3 + i))
2485                         exit(1);
2486         close(fd);
2487         unlink("conftestmmap");
2488         exit(0);
2489 }
2490
2491 EOF
2492 if { (eval echo configure:2493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2493 then
2494   ac_cv_func_mmap_fixed_mapped=yes
2495 else
2496   echo "configure: failed program was:" >&5
2497   cat conftest.$ac_ext >&5
2498   rm -fr conftest*
2499   ac_cv_func_mmap_fixed_mapped=no
2500 fi
2501 rm -fr conftest*
2502 fi
2503
2504 fi
2505
2506 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
2507 if test $ac_cv_func_mmap_fixed_mapped = yes; then
2508   cat >> confdefs.h <<\EOF
2509 #define HAVE_MMAP 1
2510 EOF
2511
2512 fi
2513
2514 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
2515 echo "configure:2516: checking return type of signal handlers" >&5
2516 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2517   echo $ac_n "(cached) $ac_c" 1>&6
2518 else
2519   cat > conftest.$ac_ext <<EOF
2520 #line 2521 "configure"
2521 #include "confdefs.h"
2522 #include <sys/types.h>
2523 #include <signal.h>
2524 #ifdef signal
2525 #undef signal
2526 #endif
2527 #ifdef __cplusplus
2528 extern "C" void (*signal (int, void (*)(int)))(int);
2529 #else
2530 void (*signal ()) ();
2531 #endif
2532
2533 int main() {
2534 int i;
2535 ; return 0; }
2536 EOF
2537 if { (eval echo configure:2538: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2538   rm -rf conftest*
2539   ac_cv_type_signal=void
2540 else
2541   echo "configure: failed program was:" >&5
2542   cat conftest.$ac_ext >&5
2543   rm -rf conftest*
2544   ac_cv_type_signal=int
2545 fi
2546 rm -f conftest*
2547 fi
2548
2549 echo "$ac_t""$ac_cv_type_signal" 1>&6
2550 cat >> confdefs.h <<EOF
2551 #define RETSIGTYPE $ac_cv_type_signal
2552 EOF
2553
2554
2555 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
2556 echo "configure:2557: checking for dlopen in -ldl" >&5
2557 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
2558 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2559   echo $ac_n "(cached) $ac_c" 1>&6
2560 else
2561   ac_save_LIBS="$LIBS"
2562 LIBS="-ldl  $LIBS"
2563 cat > conftest.$ac_ext <<EOF
2564 #line 2565 "configure"
2565 #include "confdefs.h"
2566 /* Override any gcc2 internal prototype to avoid an error.  */
2567 /* We use char because int might match the return type of a gcc2
2568     builtin and then its argument prototype would still apply.  */
2569 char dlopen();
2570
2571 int main() {
2572 dlopen()
2573 ; return 0; }
2574 EOF
2575 if { (eval echo configure:2576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2576   rm -rf conftest*
2577   eval "ac_cv_lib_$ac_lib_var=yes"
2578 else
2579   echo "configure: failed program was:" >&5
2580   cat conftest.$ac_ext >&5
2581   rm -rf conftest*
2582   eval "ac_cv_lib_$ac_lib_var=no"
2583 fi
2584 rm -f conftest*
2585 LIBS="$ac_save_LIBS"
2586
2587 fi
2588 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2589   echo "$ac_t""yes" 1>&6
2590   LIB="${LIB} -ldl"
2591 else
2592   echo "$ac_t""no" 1>&6
2593 fi
2594
2595 echo $ac_n "checking for pow in -lm""... $ac_c" 1>&6
2596 echo "configure:2597: checking for pow in -lm" >&5
2597 ac_lib_var=`echo m'_'pow | sed 'y%./+-%__p_%'`
2598 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2599   echo $ac_n "(cached) $ac_c" 1>&6
2600 else
2601   ac_save_LIBS="$LIBS"
2602 LIBS="-lm  $LIBS"
2603 cat > conftest.$ac_ext <<EOF
2604 #line 2605 "configure"
2605 #include "confdefs.h"
2606 /* Override any gcc2 internal prototype to avoid an error.  */
2607 /* We use char because int might match the return type of a gcc2
2608     builtin and then its argument prototype would still apply.  */
2609 char pow();
2610
2611 int main() {
2612 pow()
2613 ; return 0; }
2614 EOF
2615 if { (eval echo configure:2616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2616   rm -rf conftest*
2617   eval "ac_cv_lib_$ac_lib_var=yes"
2618 else
2619   echo "configure: failed program was:" >&5
2620   cat conftest.$ac_ext >&5
2621   rm -rf conftest*
2622   eval "ac_cv_lib_$ac_lib_var=no"
2623 fi
2624 rm -f conftest*
2625 LIBS="$ac_save_LIBS"
2626
2627 fi
2628 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2629   echo "$ac_t""yes" 1>&6
2630   LIB_YUV="${LIB_YUV} -lm"
2631 else
2632   echo "$ac_t""no" 1>&6
2633 fi
2634
2635
2636 THREAD_LIB=error
2637 if test "x${THREAD_LIB}" = xerror; then
2638   echo $ac_n "checking for pthread_attr_init in -lpthread""... $ac_c" 1>&6
2639 echo "configure:2640: checking for pthread_attr_init in -lpthread" >&5
2640 ac_lib_var=`echo pthread'_'pthread_attr_init | sed 'y%./+-%__p_%'`
2641 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2642   echo $ac_n "(cached) $ac_c" 1>&6
2643 else
2644   ac_save_LIBS="$LIBS"
2645 LIBS="-lpthread  $LIBS"
2646 cat > conftest.$ac_ext <<EOF
2647 #line 2648 "configure"
2648 #include "confdefs.h"
2649 /* Override any gcc2 internal prototype to avoid an error.  */
2650 /* We use char because int might match the return type of a gcc2
2651     builtin and then its argument prototype would still apply.  */
2652 char pthread_attr_init();
2653
2654 int main() {
2655 pthread_attr_init()
2656 ; return 0; }
2657 EOF
2658 if { (eval echo configure:2659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2659   rm -rf conftest*
2660   eval "ac_cv_lib_$ac_lib_var=yes"
2661 else
2662   echo "configure: failed program was:" >&5
2663   cat conftest.$ac_ext >&5
2664   rm -rf conftest*
2665   eval "ac_cv_lib_$ac_lib_var=no"
2666 fi
2667 rm -f conftest*
2668 LIBS="$ac_save_LIBS"
2669
2670 fi
2671 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2672   echo "$ac_t""yes" 1>&6
2673   THREAD_LIB="-lpthread"
2674 else
2675   echo "$ac_t""no" 1>&6
2676 fi
2677
2678 fi
2679 if test "x${THREAD_LIB}" = xerror; then
2680   echo $ac_n "checking for pthread_attr_init in -lpthreads""... $ac_c" 1>&6
2681 echo "configure:2682: checking for pthread_attr_init in -lpthreads" >&5
2682 ac_lib_var=`echo pthreads'_'pthread_attr_init | sed 'y%./+-%__p_%'`
2683 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2684   echo $ac_n "(cached) $ac_c" 1>&6
2685 else
2686   ac_save_LIBS="$LIBS"
2687 LIBS="-lpthreads  $LIBS"
2688 cat > conftest.$ac_ext <<EOF
2689 #line 2690 "configure"
2690 #include "confdefs.h"
2691 /* Override any gcc2 internal prototype to avoid an error.  */
2692 /* We use char because int might match the return type of a gcc2
2693     builtin and then its argument prototype would still apply.  */
2694 char pthread_attr_init();
2695
2696 int main() {
2697 pthread_attr_init()
2698 ; return 0; }
2699 EOF
2700 if { (eval echo configure:2701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2701   rm -rf conftest*
2702   eval "ac_cv_lib_$ac_lib_var=yes"
2703 else
2704   echo "configure: failed program was:" >&5
2705   cat conftest.$ac_ext >&5
2706   rm -rf conftest*
2707   eval "ac_cv_lib_$ac_lib_var=no"
2708 fi
2709 rm -f conftest*
2710 LIBS="$ac_save_LIBS"
2711
2712 fi
2713 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2714   echo "$ac_t""yes" 1>&6
2715   THREAD_LIB="-lpthreads"
2716 else
2717   echo "$ac_t""no" 1>&6
2718 fi
2719
2720 fi
2721 if test "x${THREAD_LIB}" = xerror; then
2722   echo $ac_n "checking for pthread_attr_init in -lc_r""... $ac_c" 1>&6
2723 echo "configure:2724: checking for pthread_attr_init in -lc_r" >&5
2724 ac_lib_var=`echo c_r'_'pthread_attr_init | sed 'y%./+-%__p_%'`
2725 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2726   echo $ac_n "(cached) $ac_c" 1>&6
2727 else
2728   ac_save_LIBS="$LIBS"
2729 LIBS="-lc_r  $LIBS"
2730 cat > conftest.$ac_ext <<EOF
2731 #line 2732 "configure"
2732 #include "confdefs.h"
2733 /* Override any gcc2 internal prototype to avoid an error.  */
2734 /* We use char because int might match the return type of a gcc2
2735     builtin and then its argument prototype would still apply.  */
2736 char pthread_attr_init();
2737
2738 int main() {
2739 pthread_attr_init()
2740 ; return 0; }
2741 EOF
2742 if { (eval echo configure:2743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2743   rm -rf conftest*
2744   eval "ac_cv_lib_$ac_lib_var=yes"
2745 else
2746   echo "configure: failed program was:" >&5
2747   cat conftest.$ac_ext >&5
2748   rm -rf conftest*
2749   eval "ac_cv_lib_$ac_lib_var=no"
2750 fi
2751 rm -f conftest*
2752 LIBS="$ac_save_LIBS"
2753
2754 fi
2755 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2756   echo "$ac_t""yes" 1>&6
2757   THREAD_LIB="-lc_r"
2758 else
2759   echo "$ac_t""no" 1>&6
2760 fi
2761
2762 fi
2763 if test "x${THREAD_LIB}" = xerror; then
2764   echo $ac_n "checking for pthread_attr_init""... $ac_c" 1>&6
2765 echo "configure:2766: checking for pthread_attr_init" >&5
2766 if eval "test \"`echo '$''{'ac_cv_func_pthread_attr_init'+set}'`\" = set"; then
2767   echo $ac_n "(cached) $ac_c" 1>&6
2768 else
2769   cat > conftest.$ac_ext <<EOF
2770 #line 2771 "configure"
2771 #include "confdefs.h"
2772 /* System header to define __stub macros and hopefully few prototypes,
2773     which can conflict with char pthread_attr_init(); below.  */
2774 #include <assert.h>
2775 /* Override any gcc2 internal prototype to avoid an error.  */
2776 /* We use char because int might match the return type of a gcc2
2777     builtin and then its argument prototype would still apply.  */
2778 char pthread_attr_init();
2779
2780 int main() {
2781
2782 /* The GNU C library defines this for functions which it implements
2783     to always fail with ENOSYS.  Some functions are actually named
2784     something starting with __ and the normal name is an alias.  */
2785 #if defined (__stub_pthread_attr_init) || defined (__stub___pthread_attr_init)
2786 choke me
2787 #else
2788 pthread_attr_init();
2789 #endif
2790
2791 ; return 0; }
2792 EOF
2793 if { (eval echo configure:2794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2794   rm -rf conftest*
2795   eval "ac_cv_func_pthread_attr_init=yes"
2796 else
2797   echo "configure: failed program was:" >&5
2798   cat conftest.$ac_ext >&5
2799   rm -rf conftest*
2800   eval "ac_cv_func_pthread_attr_init=no"
2801 fi
2802 rm -f conftest*
2803 fi
2804
2805 if eval "test \"`echo '$ac_cv_func_'pthread_attr_init`\" = yes"; then
2806   echo "$ac_t""yes" 1>&6
2807   :
2808 else
2809   echo "$ac_t""no" 1>&6
2810 fi
2811
2812   THREAD_LIB=""
2813 fi
2814
2815 echo $ac_n "checking for cthread_fork in -lthreads""... $ac_c" 1>&6
2816 echo "configure:2817: checking for cthread_fork in -lthreads" >&5
2817 ac_lib_var=`echo threads'_'cthread_fork | sed 'y%./+-%__p_%'`
2818 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2819   echo $ac_n "(cached) $ac_c" 1>&6
2820 else
2821   ac_save_LIBS="$LIBS"
2822 LIBS="-lthreads  $LIBS"
2823 cat > conftest.$ac_ext <<EOF
2824 #line 2825 "configure"
2825 #include "confdefs.h"
2826 /* Override any gcc2 internal prototype to avoid an error.  */
2827 /* We use char because int might match the return type of a gcc2
2828     builtin and then its argument prototype would still apply.  */
2829 char cthread_fork();
2830
2831 int main() {
2832 cthread_fork()
2833 ; return 0; }
2834 EOF
2835 if { (eval echo configure:2836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2836   rm -rf conftest*
2837   eval "ac_cv_lib_$ac_lib_var=yes"
2838 else
2839   echo "configure: failed program was:" >&5
2840   cat conftest.$ac_ext >&5
2841   rm -rf conftest*
2842   eval "ac_cv_lib_$ac_lib_var=no"
2843 fi
2844 rm -f conftest*
2845 LIBS="$ac_save_LIBS"
2846
2847 fi
2848 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2849   echo "$ac_t""yes" 1>&6
2850   THREAD_LIB="-lthreads"
2851 else
2852   echo "$ac_t""no" 1>&6
2853 fi
2854
2855
2856 cat > conftest.$ac_ext <<EOF
2857 #line 2858 "configure"
2858 #include "confdefs.h"
2859 #include <pthread.h>
2860 EOF
2861 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2862   egrep "pthread_cond_t" >/dev/null 2>&1; then
2863   rm -rf conftest*
2864   
2865   cat >> confdefs.h <<\EOF
2866 #define PTHREAD_COND_T_IN_PTHREAD_H 1
2867 EOF
2868
2869 fi
2870 rm -f conftest*
2871
2872 cat > conftest.$ac_ext <<EOF
2873 #line 2874 "configure"
2874 #include "confdefs.h"
2875 #include <strings.h>
2876 EOF
2877 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2878   egrep "strncasecmp" >/dev/null 2>&1; then
2879   rm -rf conftest*
2880   
2881   cat >> confdefs.h <<\EOF
2882 #define STRNCASECMP_IN_STRINGS_H 1
2883 EOF
2884
2885 fi
2886 rm -f conftest*
2887
2888
2889 for ac_hdr in stddef.h getopt.h strings.h
2890 do
2891 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2892 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2893 echo "configure:2894: checking for $ac_hdr" >&5
2894 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2895   echo $ac_n "(cached) $ac_c" 1>&6
2896 else
2897   cat > conftest.$ac_ext <<EOF
2898 #line 2899 "configure"
2899 #include "confdefs.h"
2900 #include <$ac_hdr>
2901 EOF
2902 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2903 { (eval echo configure:2904: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2904 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2905 if test -z "$ac_err"; then
2906   rm -rf conftest*
2907   eval "ac_cv_header_$ac_safe=yes"
2908 else
2909   echo "$ac_err" >&5
2910   echo "configure: failed program was:" >&5
2911   cat conftest.$ac_ext >&5
2912   rm -rf conftest*
2913   eval "ac_cv_header_$ac_safe=no"
2914 fi
2915 rm -f conftest*
2916 fi
2917 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2918   echo "$ac_t""yes" 1>&6
2919     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2920   cat >> confdefs.h <<EOF
2921 #define $ac_tr_hdr 1
2922 EOF
2923  
2924 else
2925   echo "$ac_t""no" 1>&6
2926 fi
2927 done
2928
2929 for ac_hdr in sys/sockio.h fcntl.h sys/time.h sys/times.h
2930 do
2931 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2932 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2933 echo "configure:2934: checking for $ac_hdr" >&5
2934 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2935   echo $ac_n "(cached) $ac_c" 1>&6
2936 else
2937   cat > conftest.$ac_ext <<EOF
2938 #line 2939 "configure"
2939 #include "confdefs.h"
2940 #include <$ac_hdr>
2941 EOF
2942 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2943 { (eval echo configure:2944: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2944 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2945 if test -z "$ac_err"; then
2946   rm -rf conftest*
2947   eval "ac_cv_header_$ac_safe=yes"
2948 else
2949   echo "$ac_err" >&5
2950   echo "configure: failed program was:" >&5
2951   cat conftest.$ac_ext >&5
2952   rm -rf conftest*
2953   eval "ac_cv_header_$ac_safe=no"
2954 fi
2955 rm -f conftest*
2956 fi
2957 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2958   echo "$ac_t""yes" 1>&6
2959     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2960   cat >> confdefs.h <<EOF
2961 #define $ac_tr_hdr 1
2962 EOF
2963  
2964 else
2965   echo "$ac_t""no" 1>&6
2966 fi
2967 done
2968
2969 for ac_hdr in sys/soundcard.h machine/soundcard.h
2970 do
2971 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2972 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2973 echo "configure:2974: checking for $ac_hdr" >&5
2974 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2975   echo $ac_n "(cached) $ac_c" 1>&6
2976 else
2977   cat > conftest.$ac_ext <<EOF
2978 #line 2979 "configure"
2979 #include "confdefs.h"
2980 #include <$ac_hdr>
2981 EOF
2982 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2983 { (eval echo configure:2984: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2984 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2985 if test -z "$ac_err"; then
2986   rm -rf conftest*
2987   eval "ac_cv_header_$ac_safe=yes"
2988 else
2989   echo "$ac_err" >&5
2990   echo "configure: failed program was:" >&5
2991   cat conftest.$ac_ext >&5
2992   rm -rf conftest*
2993   eval "ac_cv_header_$ac_safe=no"
2994 fi
2995 rm -f conftest*
2996 fi
2997 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2998   echo "$ac_t""yes" 1>&6
2999     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3000   cat >> confdefs.h <<EOF
3001 #define $ac_tr_hdr 1
3002 EOF
3003  
3004 else
3005   echo "$ac_t""no" 1>&6
3006 fi
3007 done
3008
3009 for ac_hdr in dlfcn.h image.h
3010 do
3011 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3012 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3013 echo "configure:3014: checking for $ac_hdr" >&5
3014 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3015   echo $ac_n "(cached) $ac_c" 1>&6
3016 else
3017   cat > conftest.$ac_ext <<EOF
3018 #line 3019 "configure"
3019 #include "confdefs.h"
3020 #include <$ac_hdr>
3021 EOF
3022 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3023 { (eval echo configure:3024: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3024 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3025 if test -z "$ac_err"; then
3026   rm -rf conftest*
3027   eval "ac_cv_header_$ac_safe=yes"
3028 else
3029   echo "$ac_err" >&5
3030   echo "configure: failed program was:" >&5
3031   cat conftest.$ac_ext >&5
3032   rm -rf conftest*
3033   eval "ac_cv_header_$ac_safe=no"
3034 fi
3035 rm -f conftest*
3036 fi
3037 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3038   echo "$ac_t""yes" 1>&6
3039     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3040   cat >> confdefs.h <<EOF
3041 #define $ac_tr_hdr 1
3042 EOF
3043  
3044 else
3045   echo "$ac_t""no" 1>&6
3046 fi
3047 done
3048
3049 for ac_hdr in arpa/inet.h net/if.h netinet/in.h sys/socket.h
3050 do
3051 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3052 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3053 echo "configure:3054: checking for $ac_hdr" >&5
3054 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3055   echo $ac_n "(cached) $ac_c" 1>&6
3056 else
3057   cat > conftest.$ac_ext <<EOF
3058 #line 3059 "configure"
3059 #include "confdefs.h"
3060 #include <$ac_hdr>
3061 EOF
3062 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3063 { (eval echo configure:3064: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3064 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3065 if test -z "$ac_err"; then
3066   rm -rf conftest*
3067   eval "ac_cv_header_$ac_safe=yes"
3068 else
3069   echo "$ac_err" >&5
3070   echo "configure: failed program was:" >&5
3071   cat conftest.$ac_ext >&5
3072   rm -rf conftest*
3073   eval "ac_cv_header_$ac_safe=no"
3074 fi
3075 rm -f conftest*
3076 fi
3077 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3078   echo "$ac_t""yes" 1>&6
3079     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3080   cat >> confdefs.h <<EOF
3081 #define $ac_tr_hdr 1
3082 EOF
3083  
3084 else
3085   echo "$ac_t""no" 1>&6
3086 fi
3087 done
3088
3089 for ac_hdr in machine/param.h
3090 do
3091 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3092 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3093 echo "configure:3094: checking for $ac_hdr" >&5
3094 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3095   echo $ac_n "(cached) $ac_c" 1>&6
3096 else
3097   cat > conftest.$ac_ext <<EOF
3098 #line 3099 "configure"
3099 #include "confdefs.h"
3100 #include <$ac_hdr>
3101 EOF
3102 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3103 { (eval echo configure:3104: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3104 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3105 if test -z "$ac_err"; then
3106   rm -rf conftest*
3107   eval "ac_cv_header_$ac_safe=yes"
3108 else
3109   echo "$ac_err" >&5
3110   echo "configure: failed program was:" >&5
3111   cat conftest.$ac_ext >&5
3112   rm -rf conftest*
3113   eval "ac_cv_header_$ac_safe=no"
3114 fi
3115 rm -f conftest*
3116 fi
3117 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3118   echo "$ac_t""yes" 1>&6
3119     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3120   cat >> confdefs.h <<EOF
3121 #define $ac_tr_hdr 1
3122 EOF
3123  
3124 else
3125   echo "$ac_t""no" 1>&6
3126 fi
3127 done
3128
3129
3130 for ac_hdr in cthreads.h pthread.h kernel/scheduler.h kernel/OS.h
3131 do
3132 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3133 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3134 echo "configure:3135: checking for $ac_hdr" >&5
3135 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3136   echo $ac_n "(cached) $ac_c" 1>&6
3137 else
3138   cat > conftest.$ac_ext <<EOF
3139 #line 3140 "configure"
3140 #include "confdefs.h"
3141 #include <$ac_hdr>
3142 EOF
3143 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3144 { (eval echo configure:3145: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3145 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3146 if test -z "$ac_err"; then
3147   rm -rf conftest*
3148   eval "ac_cv_header_$ac_safe=yes"
3149 else
3150   echo "$ac_err" >&5
3151   echo "configure: failed program was:" >&5
3152   cat conftest.$ac_ext >&5
3153   rm -rf conftest*
3154   eval "ac_cv_header_$ac_safe=no"
3155 fi
3156 rm -f conftest*
3157 fi
3158 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3159   echo "$ac_t""yes" 1>&6
3160     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3161   cat >> confdefs.h <<EOF
3162 #define $ac_tr_hdr 1
3163 EOF
3164  
3165 else
3166   echo "$ac_t""no" 1>&6
3167 fi
3168 done
3169
3170
3171 echo $ac_n "checking for ntohl in sys/param.h""... $ac_c" 1>&6
3172 echo "configure:3173: checking for ntohl in sys/param.h" >&5
3173 if eval "test \"`echo '$''{'ac_cv_c_ntohl_sys_param_h'+set}'`\" = set"; then
3174   echo $ac_n "(cached) $ac_c" 1>&6
3175 else
3176   CFLAGS="${save_CFLAGS} -Wall -Werror"
3177      cat > conftest.$ac_ext <<EOF
3178 #line 3179 "configure"
3179 #include "confdefs.h"
3180 #include <sys/param.h>
3181 int main() {
3182 void foo() { int meuh; ntohl(meuh); }
3183 ; return 0; }
3184 EOF
3185 if { (eval echo configure:3186: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3186   rm -rf conftest*
3187   ac_cv_c_ntohl_sys_param_h=yes
3188 else
3189   echo "configure: failed program was:" >&5
3190   cat conftest.$ac_ext >&5
3191   rm -rf conftest*
3192   ac_cv_c_ntohl_sys_param_h=no
3193 fi
3194 rm -f conftest*
3195 fi
3196
3197 echo "$ac_t""$ac_cv_c_ntohl_sys_param_h" 1>&6
3198 if test x"$ac_cv_c_ntohl_sys_param_h" != x"no"; then
3199     cat >> confdefs.h <<\EOF
3200 #define NTOHL_IN_SYS_PARAM_H 1
3201 EOF
3202
3203 fi
3204
3205 echo $ac_n "checking if \$CC accepts -finline-limit""... $ac_c" 1>&6
3206 echo "configure:3207: checking if \$CC accepts -finline-limit" >&5
3207 if eval "test \"`echo '$''{'ac_cv_c_inline_limit'+set}'`\" = set"; then
3208   echo $ac_n "(cached) $ac_c" 1>&6
3209 else
3210   CFLAGS="${save_CFLAGS} -finline-limit-30000"
3211      cat > conftest.$ac_ext <<EOF
3212 #line 3213 "configure"
3213 #include "confdefs.h"
3214
3215 int main() {
3216
3217 ; return 0; }
3218 EOF
3219 if { (eval echo configure:3220: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3220   rm -rf conftest*
3221   ac_cv_c_inline_limit=yes
3222 else
3223   echo "configure: failed program was:" >&5
3224   cat conftest.$ac_ext >&5
3225   rm -rf conftest*
3226   ac_cv_c_inline_limit=no
3227 fi
3228 rm -f conftest*
3229 fi
3230
3231 echo "$ac_t""$ac_cv_c_inline_limit" 1>&6
3232 if test x"$ac_cv_c_inline_limit" != x"no"; then
3233     save_CFLAGS="${save_CFLAGS} -finline-limit-30000"
3234 fi
3235
3236 echo $ac_n "checking if \$CC accepts -bundle -undefined error""... $ac_c" 1>&6
3237 echo "configure:3238: checking if \$CC accepts -bundle -undefined error" >&5
3238 if eval "test \"`echo '$''{'ac_cv_ld_darwin'+set}'`\" = set"; then
3239   echo $ac_n "(cached) $ac_c" 1>&6
3240 else
3241   CFLAGS="${save_CFLAGS} -bundle -undefined error"
3242      cat > conftest.$ac_ext <<EOF
3243 #line 3244 "configure"
3244 #include "confdefs.h"
3245
3246 int main() {
3247
3248 ; return 0; }
3249 EOF
3250 if { (eval echo configure:3251: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3251   rm -rf conftest*
3252   ac_cv_ld_darwin=yes
3253 else
3254   echo "configure: failed program was:" >&5
3255   cat conftest.$ac_ext >&5
3256   rm -rf conftest*
3257   ac_cv_ld_darwin=no
3258 fi
3259 rm -f conftest*
3260 fi
3261
3262 echo "$ac_t""$ac_cv_ld_darwin" 1>&6
3263 if test x"$ac_cv_ld_darwin" != x"no"; then
3264     PLCFLAGS="${PLCFLAGS} -bundle -undefined error"
3265 fi
3266
3267 echo $ac_n "checking if \$CC accepts -shared""... $ac_c" 1>&6
3268 echo "configure:3269: checking if \$CC accepts -shared" >&5
3269 if eval "test \"`echo '$''{'ac_cv_ld_plugins'+set}'`\" = set"; then
3270   echo $ac_n "(cached) $ac_c" 1>&6
3271 else
3272   CFLAGS="${save_CFLAGS} -shared"
3273      cat > conftest.$ac_ext <<EOF
3274 #line 3275 "configure"
3275 #include "confdefs.h"
3276
3277 int main() {
3278
3279 ; return 0; }
3280 EOF
3281 if { (eval echo configure:3282: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3282   rm -rf conftest*
3283   ac_cv_ld_plugins=yes
3284 else
3285   echo "configure: failed program was:" >&5
3286   cat conftest.$ac_ext >&5
3287   rm -rf conftest*
3288   ac_cv_ld_plugins=no
3289 fi
3290 rm -f conftest*
3291 fi
3292
3293 echo "$ac_t""$ac_cv_ld_plugins" 1>&6
3294 if test x"$ac_cv_ld_plugins" != x"no"; then
3295     PLCFLAGS="${PLCFLAGS} -shared"
3296 fi
3297         
3298 if test x"${SOFLAGS}" = x; then
3299     echo $ac_n "checking for soname setting""... $ac_c" 1>&6
3300 echo "configure:3301: checking for soname setting" >&5
3301 if eval "test \"`echo '$''{'ac_cv_ld_soname'+set}'`\" = set"; then
3302   echo $ac_n "(cached) $ac_c" 1>&6
3303 else
3304   
3305         # Standard
3306         try_SOFLAGS="-Wl,-soname -Wl,"
3307         LDFLAGS="${save_LDFLAGS} ${try_SOFLAGS}foo.so.0"
3308         cat > conftest.$ac_ext <<EOF
3309 #line 3310 "configure"
3310 #include "confdefs.h"
3311
3312 int main() {
3313
3314 ; return 0; }
3315 EOF
3316 if { (eval echo configure:3317: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3317   rm -rf conftest*
3318   ac_cv_ld_soname="${try_SOFLAGS}"
3319 else
3320   echo "configure: failed program was:" >&5
3321   cat conftest.$ac_ext >&5
3322   rm -rf conftest*
3323   
3324             # SunOS
3325             try_SOFLAGS="-Wl,-h -Wl,"
3326             LDFLAGS="${save_LDFLAGS} ${try_SOFLAGS}foo.so.0"
3327             cat > conftest.$ac_ext <<EOF
3328 #line 3329 "configure"
3329 #include "confdefs.h"
3330
3331 int main() {
3332
3333 ; return 0; }
3334 EOF
3335 if { (eval echo configure:3336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3336   rm -rf conftest*
3337   ac_cv_ld_soname="${try_SOFLAGS}"
3338 else
3339   echo "configure: failed program was:" >&5
3340   cat conftest.$ac_ext >&5
3341   rm -rf conftest*
3342   ac_cv_ld_soname=none
3343 fi
3344 rm -f conftest*
3345         
3346 fi
3347 rm -f conftest*
3348 fi
3349
3350 echo "$ac_t""$ac_cv_ld_soname" 1>&6
3351     if test x"$ac_cv_ld_soname" != x"none"; then
3352         SOFLAGS=$ac_cv_ld_soname
3353     else
3354         echo "
3355 ------------
3356 Your system doesn't seem to have support for dynamic linking. You may
3357 have problems using libdvdcss.
3358 ------------
3359 "
3360     fi
3361 fi
3362
3363 echo $ac_n "checking __attribute__ ((aligned ())) support""... $ac_c" 1>&6
3364 echo "configure:3365: checking __attribute__ ((aligned ())) support" >&5
3365 if eval "test \"`echo '$''{'ac_cv_c_attribute_aligned'+set}'`\" = set"; then
3366   echo $ac_n "(cached) $ac_c" 1>&6
3367 else
3368   ac_cv_c_attribute_aligned=0
3369         CFLAGS="${save_CFLAGS} -Werror"
3370     for ac_cv_c_attr_align_try in 2 4 8 16 32 64; do
3371         cat > conftest.$ac_ext <<EOF
3372 #line 3373 "configure"
3373 #include "confdefs.h"
3374
3375 int main() {
3376 static char c __attribute__ ((aligned($ac_cv_c_attr_align_try))) = 0; return c;
3377 ; return 0; }
3378 EOF
3379 if { (eval echo configure:3380: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3380   rm -rf conftest*
3381   ac_cv_c_attribute_aligned=$ac_cv_c_attr_align_try
3382 else
3383   echo "configure: failed program was:" >&5
3384   cat conftest.$ac_ext >&5
3385 fi
3386 rm -f conftest*
3387     done
3388 fi
3389
3390 echo "$ac_t""$ac_cv_c_attribute_aligned" 1>&6
3391 if test x"$ac_cv_c_attribute_aligned" != x"0"; then
3392     cat >> confdefs.h <<EOF
3393 #define ATTRIBUTE_ALIGNED_MAX $ac_cv_c_attribute_aligned
3394 EOF
3395
3396 fi
3397
3398 CFLAGS="${save_CFLAGS}"
3399 LDFLAGS="${save_LDFLAGS}"
3400
3401 echo $ac_n "checking for boolean_t in sys/types.h""... $ac_c" 1>&6
3402 echo "configure:3403: checking for boolean_t in sys/types.h" >&5
3403 if eval "test \"`echo '$''{'ac_cv_c_boolean_t_sys_types_h'+set}'`\" = set"; then
3404   echo $ac_n "(cached) $ac_c" 1>&6
3405 else
3406   cat > conftest.$ac_ext <<EOF
3407 #line 3408 "configure"
3408 #include "confdefs.h"
3409 #include <sys/types.h>
3410 int main() {
3411 boolean_t foo;
3412 ; return 0; }
3413 EOF
3414 if { (eval echo configure:3415: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3415   rm -rf conftest*
3416   ac_cv_c_boolean_t_sys_types_h=yes
3417 else
3418   echo "configure: failed program was:" >&5
3419   cat conftest.$ac_ext >&5
3420   rm -rf conftest*
3421   ac_cv_c_boolean_t_sys_types_h=no
3422 fi
3423 rm -f conftest*
3424 fi
3425
3426 echo "$ac_t""$ac_cv_c_boolean_t_sys_types_h" 1>&6
3427 if test x"$ac_cv_c_boolean_t_sys_types_h" != x"no"; then
3428     cat >> confdefs.h <<\EOF
3429 #define BOOLEAN_T_IN_SYS_TYPES_H 1
3430 EOF
3431
3432 fi
3433
3434 echo $ac_n "checking for boolean_t in pthread.h""... $ac_c" 1>&6
3435 echo "configure:3436: checking for boolean_t in pthread.h" >&5
3436 if eval "test \"`echo '$''{'ac_cv_c_boolean_t_pthread_h'+set}'`\" = set"; then
3437   echo $ac_n "(cached) $ac_c" 1>&6
3438 else
3439   cat > conftest.$ac_ext <<EOF
3440 #line 3441 "configure"
3441 #include "confdefs.h"
3442 #include <pthread.h>
3443 int main() {
3444 boolean_t foo;
3445 ; return 0; }
3446 EOF
3447 if { (eval echo configure:3448: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3448   rm -rf conftest*
3449   ac_cv_c_boolean_t_pthread_h=yes
3450 else
3451   echo "configure: failed program was:" >&5
3452   cat conftest.$ac_ext >&5
3453   rm -rf conftest*
3454   ac_cv_c_boolean_t_pthread_h=no
3455 fi
3456 rm -f conftest*
3457 fi
3458
3459 echo "$ac_t""$ac_cv_c_boolean_t_pthread_h" 1>&6
3460 if test x"$ac_cv_c_boolean_t_pthread_h" != x"no"; then
3461     cat >> confdefs.h <<\EOF
3462 #define BOOLEAN_T_IN_PTHREAD_H 1
3463 EOF
3464
3465 fi
3466
3467 echo $ac_n "checking for boolean_t in cthreads.h""... $ac_c" 1>&6
3468 echo "configure:3469: checking for boolean_t in cthreads.h" >&5
3469 if eval "test \"`echo '$''{'ac_cv_c_boolean_t_cthreads_h'+set}'`\" = set"; then
3470   echo $ac_n "(cached) $ac_c" 1>&6
3471 else
3472   cat > conftest.$ac_ext <<EOF
3473 #line 3474 "configure"
3474 #include "confdefs.h"
3475 #include <cthreads.h>
3476 int main() {
3477 boolean_t foo;
3478 ; return 0; }
3479 EOF
3480 if { (eval echo configure:3481: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3481   rm -rf conftest*
3482   ac_cv_c_boolean_t_cthreads_h=yes
3483 else
3484   echo "configure: failed program was:" >&5
3485   cat conftest.$ac_ext >&5
3486   rm -rf conftest*
3487   ac_cv_c_boolean_t_cthreads_h=no
3488 fi
3489 rm -f conftest*
3490 fi
3491
3492 echo "$ac_t""$ac_cv_c_boolean_t_cthreads_h" 1>&6
3493 if test x"$ac_cv_c_boolean_t_cthreads_h" != x"no"; then
3494     cat >> confdefs.h <<\EOF
3495 #define BOOLEAN_T_IN_CTHREADS_H 1
3496 EOF
3497
3498 fi
3499
3500 echo $ac_n "checking for working const""... $ac_c" 1>&6
3501 echo "configure:3502: checking for working const" >&5
3502 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
3503   echo $ac_n "(cached) $ac_c" 1>&6
3504 else
3505   cat > conftest.$ac_ext <<EOF
3506 #line 3507 "configure"
3507 #include "confdefs.h"
3508
3509 int main() {
3510
3511 /* Ultrix mips cc rejects this.  */
3512 typedef int charset[2]; const charset x;
3513 /* SunOS 4.1.1 cc rejects this.  */
3514 char const *const *ccp;
3515 char **p;
3516 /* NEC SVR4.0.2 mips cc rejects this.  */
3517 struct point {int x, y;};
3518 static struct point const zero = {0,0};
3519 /* AIX XL C 1.02.0.0 rejects this.
3520    It does not let you subtract one const X* pointer from another in an arm
3521    of an if-expression whose if-part is not a constant expression */
3522 const char *g = "string";
3523 ccp = &g + (g ? g-g : 0);
3524 /* HPUX 7.0 cc rejects these. */
3525 ++ccp;
3526 p = (char**) ccp;
3527 ccp = (char const *const *) p;
3528 { /* SCO 3.2v4 cc rejects this.  */
3529   char *t;
3530   char const *s = 0 ? (char *) 0 : (char const *) 0;
3531
3532   *t++ = 0;
3533 }
3534 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
3535   int x[] = {25, 17};
3536   const int *foo = &x[0];
3537   ++foo;
3538 }
3539 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3540   typedef const int *iptr;
3541   iptr p = 0;
3542   ++p;
3543 }
3544 { /* AIX XL C 1.02.0.0 rejects this saying
3545      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3546   struct s { int j; const int *ap[3]; };
3547   struct s *b; b->j = 5;
3548 }
3549 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3550   const int foo = 10;
3551 }
3552
3553 ; return 0; }
3554 EOF
3555 if { (eval echo configure:3556: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3556   rm -rf conftest*
3557   ac_cv_c_const=yes
3558 else
3559   echo "configure: failed program was:" >&5
3560   cat conftest.$ac_ext >&5
3561   rm -rf conftest*
3562   ac_cv_c_const=no
3563 fi
3564 rm -f conftest*
3565 fi
3566
3567 echo "$ac_t""$ac_cv_c_const" 1>&6
3568 if test $ac_cv_c_const = no; then
3569   cat >> confdefs.h <<\EOF
3570 #define const 
3571 EOF
3572
3573 fi
3574
3575 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3576 echo "configure:3577: checking for ANSI C header files" >&5
3577 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
3578   echo $ac_n "(cached) $ac_c" 1>&6
3579 else
3580   cat > conftest.$ac_ext <<EOF
3581 #line 3582 "configure"
3582 #include "confdefs.h"
3583 #include <stdlib.h>
3584 #include <stdarg.h>
3585 #include <string.h>
3586 #include <float.h>
3587 EOF
3588 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3589 { (eval echo configure:3590: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3590 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3591 if test -z "$ac_err"; then
3592   rm -rf conftest*
3593   ac_cv_header_stdc=yes
3594 else
3595   echo "$ac_err" >&5
3596   echo "configure: failed program was:" >&5
3597   cat conftest.$ac_ext >&5
3598   rm -rf conftest*
3599   ac_cv_header_stdc=no
3600 fi
3601 rm -f conftest*
3602
3603 if test $ac_cv_header_stdc = yes; then
3604   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3605 cat > conftest.$ac_ext <<EOF
3606 #line 3607 "configure"
3607 #include "confdefs.h"
3608 #include <string.h>
3609 EOF
3610 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3611   egrep "memchr" >/dev/null 2>&1; then
3612   :
3613 else
3614   rm -rf conftest*
3615   ac_cv_header_stdc=no
3616 fi
3617 rm -f conftest*
3618
3619 fi
3620
3621 if test $ac_cv_header_stdc = yes; then
3622   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3623 cat > conftest.$ac_ext <<EOF
3624 #line 3625 "configure"
3625 #include "confdefs.h"
3626 #include <stdlib.h>
3627 EOF
3628 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3629   egrep "free" >/dev/null 2>&1; then
3630   :
3631 else
3632   rm -rf conftest*
3633   ac_cv_header_stdc=no
3634 fi
3635 rm -f conftest*
3636
3637 fi
3638
3639 if test $ac_cv_header_stdc = yes; then
3640   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3641 if test "$cross_compiling" = yes; then
3642   :
3643 else
3644   cat > conftest.$ac_ext <<EOF
3645 #line 3646 "configure"
3646 #include "confdefs.h"
3647 #include <ctype.h>
3648 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3649 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3650 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3651 int main () { int i; for (i = 0; i < 256; i++)
3652 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3653 exit (0); }
3654
3655 EOF
3656 if { (eval echo configure:3657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3657 then
3658   :
3659 else
3660   echo "configure: failed program was:" >&5
3661   cat conftest.$ac_ext >&5
3662   rm -fr conftest*
3663   ac_cv_header_stdc=no
3664 fi
3665 rm -fr conftest*
3666 fi
3667
3668 fi
3669 fi
3670
3671 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3672 if test $ac_cv_header_stdc = yes; then
3673   cat >> confdefs.h <<\EOF
3674 #define STDC_HEADERS 1
3675 EOF
3676
3677 fi
3678
3679 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3680 echo "configure:3681: checking for size_t" >&5
3681 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
3682   echo $ac_n "(cached) $ac_c" 1>&6
3683 else
3684   cat > conftest.$ac_ext <<EOF
3685 #line 3686 "configure"
3686 #include "confdefs.h"
3687 #include <sys/types.h>
3688 #if STDC_HEADERS
3689 #include <stdlib.h>
3690 #include <stddef.h>
3691 #endif
3692 EOF
3693 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3694   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3695   rm -rf conftest*
3696   ac_cv_type_size_t=yes
3697 else
3698   rm -rf conftest*
3699   ac_cv_type_size_t=no
3700 fi
3701 rm -f conftest*
3702
3703 fi
3704 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3705 if test $ac_cv_type_size_t = no; then
3706   cat >> confdefs.h <<\EOF
3707 #define size_t unsigned
3708 EOF
3709
3710 fi
3711
3712 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3713 echo "configure:3714: checking whether time.h and sys/time.h may both be included" >&5
3714 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
3715   echo $ac_n "(cached) $ac_c" 1>&6
3716 else
3717   cat > conftest.$ac_ext <<EOF
3718 #line 3719 "configure"
3719 #include "confdefs.h"
3720 #include <sys/types.h>
3721 #include <sys/time.h>
3722 #include <time.h>
3723 int main() {
3724 struct tm *tp;
3725 ; return 0; }
3726 EOF
3727 if { (eval echo configure:3728: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3728   rm -rf conftest*
3729   ac_cv_header_time=yes
3730 else
3731   echo "configure: failed program was:" >&5
3732   cat conftest.$ac_ext >&5
3733   rm -rf conftest*
3734   ac_cv_header_time=no
3735 fi
3736 rm -f conftest*
3737 fi
3738
3739 echo "$ac_t""$ac_cv_header_time" 1>&6
3740 if test $ac_cv_header_time = yes; then
3741   cat >> confdefs.h <<\EOF
3742 #define TIME_WITH_SYS_TIME 1
3743 EOF
3744
3745 fi
3746
3747
3748
3749 ARCH=${target_cpu}
3750
3751 BUILTINS="${BUILTINS} es ps ts memcpy yuv idct idctclassic motion imdct downmix mpeg_adec lpcm_adec ac3_adec mpeg_vdec"
3752 PLUGINS="${PLUGINS} ac3_spdif spu_dec"
3753
3754 MMX_MODULES="memcpymmx yuvmmx idctmmx motionmmx"
3755 MMXEXT_MODULES="memcpymmxext idctmmxext motionmmxext"
3756 THREEDNOW_MODULES="memcpy3dn imdct3dn downmix3dn"
3757 SSE_MODULES="imdctsse downmixsse"
3758 ALTIVEC_MODULES="idctaltivec motionaltivec"
3759
3760 echo $ac_n "checking if \$CC groks MMX inline assembly""... $ac_c" 1>&6
3761 echo "configure:3762: checking if \$CC groks MMX inline assembly" >&5
3762 if eval "test \"`echo '$''{'ac_cv_mmx_inline'+set}'`\" = set"; then
3763   echo $ac_n "(cached) $ac_c" 1>&6
3764 else
3765   cat > conftest.$ac_ext <<EOF
3766 #line 3767 "configure"
3767 #include "confdefs.h"
3768
3769 int main() {
3770 void *p;asm volatile("packuswb %%mm1,%%mm2"::"r"(p));
3771 ; return 0; }
3772 EOF
3773 if { (eval echo configure:3774: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3774   rm -rf conftest*
3775   ac_cv_mmx_inline=yes
3776 else
3777   echo "configure: failed program was:" >&5
3778   cat conftest.$ac_ext >&5
3779   rm -rf conftest*
3780   ac_cv_mmx_inline=no
3781 fi
3782 rm -f conftest*
3783 fi
3784
3785 echo "$ac_t""$ac_cv_mmx_inline" 1>&6
3786 if test x"$ac_cv_mmx_inline" != x"no"; then
3787   ACCEL_MODULES="${ACCEL_MODULES} ${MMX_MODULES}"
3788 fi
3789
3790 echo $ac_n "checking if \$CC groks MMX EXT inline assembly""... $ac_c" 1>&6
3791 echo "configure:3792: checking if \$CC groks MMX EXT inline assembly" >&5
3792 if eval "test \"`echo '$''{'ac_cv_mmxext_inline'+set}'`\" = set"; then
3793   echo $ac_n "(cached) $ac_c" 1>&6
3794 else
3795   cat > conftest.$ac_ext <<EOF
3796 #line 3797 "configure"
3797 #include "confdefs.h"
3798
3799 int main() {
3800 void *p;asm volatile("maskmovq %%mm1,%%mm2"::"r"(p));
3801 ; return 0; }
3802 EOF
3803 if { (eval echo configure:3804: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3804   rm -rf conftest*
3805   ac_cv_mmxext_inline=yes
3806 else
3807   echo "configure: failed program was:" >&5
3808   cat conftest.$ac_ext >&5
3809   rm -rf conftest*
3810   ac_cv_mmxext_inline=no
3811 fi
3812 rm -f conftest*
3813 fi
3814
3815 echo "$ac_t""$ac_cv_mmxext_inline" 1>&6
3816 if test x"$ac_cv_mmxext_inline" != x"no"; then
3817   ACCEL_MODULES="${ACCEL_MODULES} ${MMXEXT_MODULES}"
3818 fi
3819
3820 echo $ac_n "checking if \$CC groks 3D Now! inline assembly""... $ac_c" 1>&6
3821 echo "configure:3822: checking if \$CC groks 3D Now! inline assembly" >&5
3822 if eval "test \"`echo '$''{'ac_cv_3dnow_inline'+set}'`\" = set"; then
3823   echo $ac_n "(cached) $ac_c" 1>&6
3824 else
3825   cat > conftest.$ac_ext <<EOF
3826 #line 3827 "configure"
3827 #include "confdefs.h"
3828
3829 int main() {
3830 void *p;asm volatile("pfadd %%mm1,%%mm2"::"r"(p));
3831 ; return 0; }
3832 EOF
3833 if { (eval echo configure:3834: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3834   rm -rf conftest*
3835   ac_cv_3dnow_inline=yes
3836 else
3837   echo "configure: failed program was:" >&5
3838   cat conftest.$ac_ext >&5
3839   rm -rf conftest*
3840   ac_cv_3dnow_inline=no
3841 fi
3842 rm -f conftest*
3843 fi
3844
3845 echo "$ac_t""$ac_cv_3dnow_inline" 1>&6
3846 if test x"$ac_cv_3dnow_inline" != x"no"; then
3847   cat >> confdefs.h <<\EOF
3848 #define CAN_COMPILE_3DNOW 1
3849 EOF
3850
3851   ACCEL_MODULES="${ACCEL_MODULES} ${THREEDNOW_MODULES}"
3852 fi
3853
3854 echo $ac_n "checking if \$CC groks SSE inline assembly""... $ac_c" 1>&6
3855 echo "configure:3856: checking if \$CC groks SSE inline assembly" >&5
3856 if eval "test \"`echo '$''{'ac_cv_sse_inline'+set}'`\" = set"; then
3857   echo $ac_n "(cached) $ac_c" 1>&6
3858 else
3859   cat > conftest.$ac_ext <<EOF
3860 #line 3861 "configure"
3861 #include "confdefs.h"
3862
3863 int main() {
3864 void *p;asm volatile("xorps %%xmm1,%%xmm2"::"r"(p));
3865 ; return 0; }
3866 EOF
3867 if { (eval echo configure:3868: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3868   rm -rf conftest*
3869   ac_cv_sse_inline=yes
3870 else
3871   echo "configure: failed program was:" >&5
3872   cat conftest.$ac_ext >&5
3873   rm -rf conftest*
3874   ac_cv_sse_inline=no
3875 fi
3876 rm -f conftest*
3877 fi
3878
3879 echo "$ac_t""$ac_cv_sse_inline" 1>&6
3880 if test x"$ac_cv_sse_inline" != x"no"; then
3881   cat >> confdefs.h <<\EOF
3882 #define CAN_COMPILE_SSE 1
3883 EOF
3884
3885   ACCEL_MODULES="${ACCEL_MODULES} ${SSE_MODULES}"
3886 fi
3887
3888 echo $ac_n "checking if \$CC groks Altivec inline assembly""... $ac_c" 1>&6
3889 echo "configure:3890: checking if \$CC groks Altivec inline assembly" >&5
3890 if eval "test \"`echo '$''{'ac_cv_altivec_inline'+set}'`\" = set"; then
3891   echo $ac_n "(cached) $ac_c" 1>&6
3892 else
3893   cat > conftest.$ac_ext <<EOF
3894 #line 3895 "configure"
3895 #include "confdefs.h"
3896
3897 int main() {
3898 asm volatile("vperm 0,1,2,3");
3899 ; return 0; }
3900 EOF
3901 if { (eval echo configure:3902: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3902   rm -rf conftest*
3903   ac_cv_altivec_inline=yes
3904 else
3905   echo "configure: failed program was:" >&5
3906   cat conftest.$ac_ext >&5
3907   rm -rf conftest*
3908   save_CFLAGS=$CFLAGS
3909           CFLAGS="$CFLAGS -Wa,-m7400"
3910           cat > conftest.$ac_ext <<EOF
3911 #line 3912 "configure"
3912 #include "confdefs.h"
3913
3914 int main() {
3915 asm volatile("vperm 0,1,2,3");
3916 ; return 0; }
3917 EOF
3918 if { (eval echo configure:3919: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3919   rm -rf conftest*
3920   ac_cv_altivec_inline=yes; CFLAGS_ALTIVEC="-Wa,-m7400"
3921 else
3922   echo "configure: failed program was:" >&5
3923   cat conftest.$ac_ext >&5
3924   rm -rf conftest*
3925   ac_cv_altivec_inline=no
3926 fi
3927 rm -f conftest*
3928           CFLAGS=$save_CFLAGS
3929          
3930 fi
3931 rm -f conftest*
3932 fi
3933
3934 echo "$ac_t""$ac_cv_altivec_inline" 1>&6
3935 if test x"$ac_cv_altivec_inline" != x"no"; then
3936   cat >> confdefs.h <<\EOF
3937 #define CAN_COMPILE_ALTIVEC 1
3938 EOF
3939
3940   ACCEL_MODULES="${ACCEL_MODULES} ${ALTIVEC_MODULES}"
3941 fi
3942
3943 echo $ac_n "checking if \$CC groks Altivec C extensions""... $ac_c" 1>&6
3944 echo "configure:3945: checking if \$CC groks Altivec C extensions" >&5
3945 if eval "test \"`echo '$''{'ac_cv_c_altivec'+set}'`\" = set"; then
3946   echo $ac_n "(cached) $ac_c" 1>&6
3947 else
3948   save_CFLAGS=$CFLAGS
3949      CFLAGS="$CFLAGS -faltivec"
3950      # Darwin test
3951      cat > conftest.$ac_ext <<EOF
3952 #line 3953 "configure"
3953 #include "confdefs.h"
3954
3955 int main() {
3956 vec_mtvscr((vector unsigned int)(0));
3957 ; return 0; }
3958 EOF
3959 if { (eval echo configure:3960: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3960   rm -rf conftest*
3961   ac_cv_c_altivec=-faltivec
3962 else
3963   echo "configure: failed program was:" >&5
3964   cat conftest.$ac_ext >&5
3965   rm -rf conftest*
3966   
3967         # Linux/PPC test
3968         CFLAGS="$save_CFLAGS $CFLAGS_ALTIVEC -fvec"
3969         cat > conftest.$ac_ext <<EOF
3970 #line 3971 "configure"
3971 #include "confdefs.h"
3972
3973 int main() {
3974 vec_mtvscr((vector unsigned int)(0));
3975 ; return 0; }
3976 EOF
3977 if { (eval echo configure:3978: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3978   rm -rf conftest*
3979   ac_cv_c_altivec="-fvec"
3980 else
3981   echo "configure: failed program was:" >&5
3982   cat conftest.$ac_ext >&5
3983   rm -rf conftest*
3984   ac_cv_c_altivec=no
3985 fi
3986 rm -f conftest*
3987         
3988 fi
3989 rm -f conftest*
3990      CFLAGS=$save_CFLAGS
3991     
3992 fi
3993
3994 echo "$ac_t""$ac_cv_c_altivec" 1>&6
3995 if test x"$ac_cv_c_altivec" != x"no"; then
3996   cat >> confdefs.h <<\EOF
3997 #define CAN_COMPILE_C_ALTIVEC 1
3998 EOF
3999
4000   CFLAGS_ALTIVEC="$CFLAGS_ALTIVEC $ac_cv_c_altivec"
4001   ACCEL_MODULES="${ACCEL_MODULES} ${ALTIVEC_MODULES}"
4002 fi
4003
4004 echo $ac_n "checking if linker needs -framework vecLib""... $ac_c" 1>&6
4005 echo "configure:4006: checking if linker needs -framework vecLib" >&5
4006 if eval "test \"`echo '$''{'ac_cv_ld_altivec'+set}'`\" = set"; then
4007   echo $ac_n "(cached) $ac_c" 1>&6
4008 else
4009   save_LDFLAGS=$LDFLAGS
4010      LDFLAGS="$LDFLAGS -framework vecLib"
4011      cat > conftest.$ac_ext <<EOF
4012 #line 4013 "configure"
4013 #include "confdefs.h"
4014
4015 int main() {
4016
4017 ; return 0; }
4018 EOF
4019 if { (eval echo configure:4020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4020   rm -rf conftest*
4021   ac_cv_ld_altivec=yes
4022 else
4023   echo "configure: failed program was:" >&5
4024   cat conftest.$ac_ext >&5
4025   rm -rf conftest*
4026   ac_cv_ld_altivec=no
4027 fi
4028 rm -f conftest*
4029      LDFLAGS=$save_LDFLAGS
4030     
4031 fi
4032
4033 echo "$ac_t""$ac_cv_ld_altivec" 1>&6
4034 if test x"$ac_cv_ld_altivec" != x"no"; then
4035   LIB_ALTIVEC="-framework vecLib"
4036 fi
4037
4038 case ${target_os} in
4039   linux*)
4040     SYS=linux
4041         ;;
4042   bsdi*)
4043     SYS=bsdi
4044     ;;
4045   darwin*)
4046     SYS=darwin
4047     ;;
4048   *mingw32*)
4049     SYS=mingw32
4050     ;;
4051   *)
4052     SYS=${target_os}
4053     ;;
4054 esac
4055
4056 if test $SYS = mingw32; then
4057 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
4058 set dummy ${ac_tool_prefix}windres; ac_word=$2
4059 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4060 echo "configure:4061: checking for $ac_word" >&5
4061 if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
4062   echo $ac_n "(cached) $ac_c" 1>&6
4063 else
4064   if test -n "$WINDRES"; then
4065   ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
4066 else
4067   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4068   ac_dummy="$PATH"
4069   for ac_dir in $ac_dummy; do
4070     test -z "$ac_dir" && ac_dir=.
4071     if test -f $ac_dir/$ac_word; then
4072       ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
4073       break
4074     fi
4075   done
4076   IFS="$ac_save_ifs"
4077 fi
4078 fi
4079 WINDRES="$ac_cv_prog_WINDRES"
4080 if test -n "$WINDRES"; then
4081   echo "$ac_t""$WINDRES" 1>&6
4082 else
4083   echo "$ac_t""no" 1>&6
4084 fi
4085
4086
4087 if test -z "$ac_cv_prog_WINDRES"; then
4088 if test -n "$ac_tool_prefix"; then
4089   # Extract the first word of "windres", so it can be a program name with args.
4090 set dummy windres; ac_word=$2
4091 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4092 echo "configure:4093: checking for $ac_word" >&5
4093 if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
4094   echo $ac_n "(cached) $ac_c" 1>&6
4095 else
4096   if test -n "$WINDRES"; then
4097   ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
4098 else
4099   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4100   ac_dummy="$PATH"
4101   for ac_dir in $ac_dummy; do
4102     test -z "$ac_dir" && ac_dir=.
4103     if test -f $ac_dir/$ac_word; then
4104       ac_cv_prog_WINDRES="windres"
4105       break
4106     fi
4107   done
4108   IFS="$ac_save_ifs"
4109   test -z "$ac_cv_prog_WINDRES" && ac_cv_prog_WINDRES=":"
4110 fi
4111 fi
4112 WINDRES="$ac_cv_prog_WINDRES"
4113 if test -n "$WINDRES"; then
4114   echo "$ac_t""$WINDRES" 1>&6
4115 else
4116   echo "$ac_t""no" 1>&6
4117 fi
4118
4119 else
4120   WINDRES=":"
4121 fi
4122 fi
4123
4124 LIB_TS="-lws2_32"
4125 LIB_RC="-lws2_32"
4126 fi
4127
4128
4129 CAN_BUILD_LIBDVDCSS=0
4130
4131 for ac_hdr in winioctl.h
4132 do
4133 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4134 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4135 echo "configure:4136: checking for $ac_hdr" >&5
4136 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4137   echo $ac_n "(cached) $ac_c" 1>&6
4138 else
4139   cat > conftest.$ac_ext <<EOF
4140 #line 4141 "configure"
4141 #include "confdefs.h"
4142 #include <$ac_hdr>
4143 EOF
4144 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4145 { (eval echo configure:4146: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4146 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4147 if test -z "$ac_err"; then
4148   rm -rf conftest*
4149   eval "ac_cv_header_$ac_safe=yes"
4150 else
4151   echo "$ac_err" >&5
4152   echo "configure: failed program was:" >&5
4153   cat conftest.$ac_ext >&5
4154   rm -rf conftest*
4155   eval "ac_cv_header_$ac_safe=no"
4156 fi
4157 rm -f conftest*
4158 fi
4159 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4160   echo "$ac_t""yes" 1>&6
4161     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4162   cat >> confdefs.h <<EOF
4163 #define $ac_tr_hdr 1
4164 EOF
4165  
4166   CAN_BUILD_LIBDVDCSS="${HAVE_LIBDVDCSS}"
4167
4168 else
4169   echo "$ac_t""no" 1>&6
4170 fi
4171 done
4172
4173
4174 for ac_hdr in sys/ioctl.h
4175 do
4176 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4177 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4178 echo "configure:4179: checking for $ac_hdr" >&5
4179 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4180   echo $ac_n "(cached) $ac_c" 1>&6
4181 else
4182   cat > conftest.$ac_ext <<EOF
4183 #line 4184 "configure"
4184 #include "confdefs.h"
4185 #include <$ac_hdr>
4186 EOF
4187 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4188 { (eval echo configure:4189: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4189 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4190 if test -z "$ac_err"; then
4191   rm -rf conftest*
4192   eval "ac_cv_header_$ac_safe=yes"
4193 else
4194   echo "$ac_err" >&5
4195   echo "configure: failed program was:" >&5
4196   cat conftest.$ac_ext >&5
4197   rm -rf conftest*
4198   eval "ac_cv_header_$ac_safe=no"
4199 fi
4200 rm -f conftest*
4201 fi
4202 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4203   echo "$ac_t""yes" 1>&6
4204     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4205   cat >> confdefs.h <<EOF
4206 #define $ac_tr_hdr 1
4207 EOF
4208  
4209   CAN_BUILD_LIBDVDCSS="${HAVE_LIBDVDCSS}"
4210   for ac_hdr in sys/cdio.h sys/dvdio.h linux/cdrom.h dvd.h
4211 do
4212 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4213 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4214 echo "configure:4215: checking for $ac_hdr" >&5
4215 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4216   echo $ac_n "(cached) $ac_c" 1>&6
4217 else
4218   cat > conftest.$ac_ext <<EOF
4219 #line 4220 "configure"
4220 #include "confdefs.h"
4221 #include <$ac_hdr>
4222 EOF
4223 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4224 { (eval echo configure:4225: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4225 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4226 if test -z "$ac_err"; then
4227   rm -rf conftest*
4228   eval "ac_cv_header_$ac_safe=yes"
4229 else
4230   echo "$ac_err" >&5
4231   echo "configure: failed program was:" >&5
4232   cat conftest.$ac_ext >&5
4233   rm -rf conftest*
4234   eval "ac_cv_header_$ac_safe=no"
4235 fi
4236 rm -f conftest*
4237 fi
4238 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4239   echo "$ac_t""yes" 1>&6
4240     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4241   cat >> confdefs.h <<EOF
4242 #define $ac_tr_hdr 1
4243 EOF
4244  
4245 else
4246   echo "$ac_t""no" 1>&6
4247 fi
4248 done
4249
4250   BSD_DVD_STRUCT=0
4251   LINUX_DVD_STRUCT=0
4252   OPENBSD_DVD_STRUCT=0
4253         cat > conftest.$ac_ext <<EOF
4254 #line 4255 "configure"
4255 #include "confdefs.h"
4256 #include <sys/cdio.h>
4257 EOF
4258 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4259   egrep "dvd_struct" >/dev/null 2>&1; then
4260   rm -rf conftest*
4261   
4262     cat >> confdefs.h <<\EOF
4263 #define DVD_STRUCT_IN_SYS_CDIO_H 1
4264 EOF
4265
4266     cat > conftest.$ac_ext <<EOF
4267 #line 4268 "configure"
4268 #include "confdefs.h"
4269 #include <sys/cdio.h>
4270 EOF
4271 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4272   egrep "struct dvd_struct" >/dev/null 2>&1; then
4273   rm -rf conftest*
4274   
4275                     BSD_DVD_STRUCT=1
4276 else
4277   rm -rf conftest*
4278   LINUX_DVD_STRUCT=1; OPENBSD_DVD_STRUCT=1
4279 fi
4280 rm -f conftest*
4281
4282   
4283 fi
4284 rm -f conftest*
4285
4286         cat > conftest.$ac_ext <<EOF
4287 #line 4288 "configure"
4288 #include "confdefs.h"
4289 #include <sys/dvdio.h>
4290 EOF
4291 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4292   egrep "dvd_struct" >/dev/null 2>&1; then
4293   rm -rf conftest*
4294   
4295     cat >> confdefs.h <<\EOF
4296 #define DVD_STRUCT_IN_SYS_DVDIO_H 1
4297 EOF
4298
4299     cat > conftest.$ac_ext <<EOF
4300 #line 4301 "configure"
4301 #include "confdefs.h"
4302 #include <sys/dvdio.h>
4303 EOF
4304 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4305   egrep "struct dvd_struct" >/dev/null 2>&1; then
4306   rm -rf conftest*
4307   
4308                     BSD_DVD_STRUCT=1
4309 else
4310   rm -rf conftest*
4311   LINUX_DVD_STRUCT=1
4312 fi
4313 rm -f conftest*
4314
4315   
4316 fi
4317 rm -f conftest*
4318
4319         cat > conftest.$ac_ext <<EOF
4320 #line 4321 "configure"
4321 #include "confdefs.h"
4322 #include <linux/cdrom.h>
4323 EOF
4324 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4325   egrep "dvd_struct" >/dev/null 2>&1; then
4326   rm -rf conftest*
4327   
4328     cat >> confdefs.h <<\EOF
4329 #define DVD_STRUCT_IN_LINUX_CDROM_H 1
4330 EOF
4331
4332     LINUX_DVD_STRUCT=1
4333   
4334 fi
4335 rm -f conftest*
4336
4337         NEED_BSDI_LIBDVD=0
4338   cat > conftest.$ac_ext <<EOF
4339 #line 4340 "configure"
4340 #include "confdefs.h"
4341 #include <dvd.h>
4342 EOF
4343 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4344   egrep "dvd_struct" >/dev/null 2>&1; then
4345   rm -rf conftest*
4346   
4347     cat >> confdefs.h <<\EOF
4348 #define DVD_STRUCT_IN_DVD_H 1
4349 EOF
4350
4351     LIB_LIBDVDCSS="${LIB_LIBDVDCSS} -ldvd"
4352     LINUX_DVD_STRUCT=1
4353   
4354 else
4355   rm -rf conftest*
4356   
4357                 for ac_hdr in /sys/dev/scsi/scsi_ioctl.h
4358 do
4359 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4360 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4361 echo "configure:4362: checking for $ac_hdr" >&5
4362 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4363   echo $ac_n "(cached) $ac_c" 1>&6
4364 else
4365   cat > conftest.$ac_ext <<EOF
4366 #line 4367 "configure"
4367 #include "confdefs.h"
4368 #include <$ac_hdr>
4369 EOF
4370 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4371 { (eval echo configure:4372: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4372 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4373 if test -z "$ac_err"; then
4374   rm -rf conftest*
4375   eval "ac_cv_header_$ac_safe=yes"
4376 else
4377   echo "$ac_err" >&5
4378   echo "configure: failed program was:" >&5
4379   cat conftest.$ac_ext >&5
4380   rm -rf conftest*
4381   eval "ac_cv_header_$ac_safe=no"
4382 fi
4383 rm -f conftest*
4384 fi
4385 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4386   echo "$ac_t""yes" 1>&6
4387     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4388   cat >> confdefs.h <<EOF
4389 #define $ac_tr_hdr 1
4390 EOF
4391  
4392       NEED_BSDI_LIBDVD=1
4393       cat >> confdefs.h <<\EOF
4394 #define DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H 1
4395 EOF
4396
4397       OBJ_LIBDVDCSS="${OBJ_LIBDVDCSS} bsdi_dvdioctl.o"
4398       LINUX_DVD_STRUCT=1
4399     
4400 else
4401   echo "$ac_t""no" 1>&6
4402 fi
4403 done
4404
4405   
4406 fi
4407 rm -f conftest*
4408
4409         ac_safe=`echo "sys/scsi/scsi_types.h" | sed 'y%./+-%__p_%'`
4410 echo $ac_n "checking for sys/scsi/scsi_types.h""... $ac_c" 1>&6
4411 echo "configure:4412: checking for sys/scsi/scsi_types.h" >&5
4412 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4413   echo $ac_n "(cached) $ac_c" 1>&6
4414 else
4415   cat > conftest.$ac_ext <<EOF
4416 #line 4417 "configure"
4417 #include "confdefs.h"
4418 #include <sys/scsi/scsi_types.h>
4419 EOF
4420 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4421 { (eval echo configure:4422: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4422 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4423 if test -z "$ac_err"; then
4424   rm -rf conftest*
4425   eval "ac_cv_header_$ac_safe=yes"
4426 else
4427   echo "$ac_err" >&5
4428   echo "configure: failed program was:" >&5
4429   cat conftest.$ac_ext >&5
4430   rm -rf conftest*
4431   eval "ac_cv_header_$ac_safe=no"
4432 fi
4433 rm -f conftest*
4434 fi
4435 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4436   echo "$ac_t""yes" 1>&6
4437   
4438     ac_safe=`echo "sys/scsi/impl/uscsi.h" | sed 'y%./+-%__p_%'`
4439 echo $ac_n "checking for sys/scsi/impl/uscsi.h""... $ac_c" 1>&6
4440 echo "configure:4441: checking for sys/scsi/impl/uscsi.h" >&5
4441 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4442   echo $ac_n "(cached) $ac_c" 1>&6
4443 else
4444   cat > conftest.$ac_ext <<EOF
4445 #line 4446 "configure"
4446 #include "confdefs.h"
4447 #include <sys/scsi/impl/uscsi.h>
4448 EOF
4449 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4450 { (eval echo configure:4451: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4451 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4452 if test -z "$ac_err"; then
4453   rm -rf conftest*
4454   eval "ac_cv_header_$ac_safe=yes"
4455 else
4456   echo "$ac_err" >&5
4457   echo "configure: failed program was:" >&5
4458   cat conftest.$ac_ext >&5
4459   rm -rf conftest*
4460   eval "ac_cv_header_$ac_safe=no"
4461 fi
4462 rm -f conftest*
4463 fi
4464 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4465   echo "$ac_t""yes" 1>&6
4466   
4467       cat >> confdefs.h <<\EOF
4468 #define SOLARIS_USCSI 1
4469 EOF
4470
4471     
4472 else
4473   echo "$ac_t""no" 1>&6
4474 fi
4475
4476   
4477 else
4478   echo "$ac_t""no" 1>&6
4479 fi
4480
4481         if test x$LINUX_DVD_STRUCT = x1; then
4482     cat >> confdefs.h <<\EOF
4483 #define HAVE_LINUX_DVD_STRUCT 1
4484 EOF
4485
4486     if test x$OPENBSD_DVD_STRUCT = x1; then
4487       cat >> confdefs.h <<\EOF
4488 #define HAVE_OPENBSD_DVD_STRUCT 1
4489 EOF
4490
4491     fi
4492   else
4493     if test x$BSD_DVD_STRUCT = x1; then
4494       cat >> confdefs.h <<\EOF
4495 #define HAVE_BSD_DVD_STRUCT 1
4496 EOF
4497
4498     fi
4499   fi
4500
4501 else
4502   echo "$ac_t""no" 1>&6
4503 fi
4504 done
4505
4506
4507 # Check whether --with-tuning or --without-tuning was given.
4508 if test "${with_tuning+set}" = set; then
4509   withval="$with_tuning"
4510   :
4511 fi
4512
4513 if test "x$withval" != "x"; then
4514     TUNING=$withval
4515 else
4516     if test x${target_cpu} = xi686 -o x${target_cpu} = xi586 -o x${target_cpu} = xi486 -o x${target_cpu} = xi386; then TUNING="pentiumpro"
4517     else
4518         if test x${target_cpu} = xpowerpc; then TUNING="750"; fi
4519     fi
4520 fi
4521
4522 # Check whether --enable-release or --disable-release was given.
4523 if test "${enable_release+set}" = set; then
4524   enableval="$enable_release"
4525    if test x$enableval = xyes; then RELEASE=1; fi 
4526 else
4527    VLC_VERSION="${VLC_VERSION}_`date +%Y-%m-%d`";
4528   LIBDVDCSS_VERSION="${LIBDVDCSS_VERSION}_`date +%Y-%m-%d`"; 
4529 fi
4530
4531
4532 # Check whether --enable-mmx or --disable-mmx was given.
4533 if test "${enable_mmx+set}" = set; then
4534   enableval="$enable_mmx"
4535    if test x$enableval = xyes; then ARCH="${ARCH} mmx";
4536     BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi 
4537 else
4538    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";
4539     BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi 
4540 fi
4541
4542
4543 # Check whether --enable-altivec or --disable-altivec was given.
4544 if test "${enable_altivec+set}" = set; then
4545   enableval="$enable_altivec"
4546    if test x$enableval = xyes; then ARCH="${ARCH} altivec";
4547     BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi 
4548 else
4549    if test x${target_cpu} = xpowerpc; then ARCH="${ARCH} altivec";
4550     BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi 
4551 fi
4552
4553
4554 DEBUG=0
4555 # Check whether --enable-debug or --disable-debug was given.
4556 if test "${enable_debug+set}" = set; then
4557   enableval="$enable_debug"
4558    if test x$enableval = xyes; then DEBUG=1; fi 
4559 fi
4560
4561
4562 TRACE=0
4563 # Check whether --enable-trace or --disable-trace was given.
4564 if test "${enable_trace+set}" = set; then
4565   enableval="$enable_trace"
4566    if test x$enableval = xyes; then TRACE=1; fi 
4567 fi
4568
4569
4570 GPROF=0
4571 # Check whether --enable-gprof or --disable-gprof was given.
4572 if test "${enable_gprof+set}" = set; then
4573   enableval="$enable_gprof"
4574    if test x$enableval = xyes; then GPROF=1; fi 
4575 fi
4576
4577
4578 CPROF=0
4579 # Check whether --enable-cprof or --disable-cprof was given.
4580 if test "${enable_cprof+set}" = set; then
4581   enableval="$enable_cprof"
4582    if test x$enableval = xyes;
4583   then
4584     LIB="${LIB} -lcprof"
4585     CPROF=1
4586   fi
4587
4588 fi
4589
4590
4591 # Check whether --enable-optimizations or --disable-optimizations was given.
4592 if test "${enable_optimizations+set}" = set; then
4593   enableval="$enable_optimizations"
4594    if test x$enableval = xno; then OPTIMS=0; fi 
4595 else
4596    OPTIMS=1 
4597 fi
4598
4599
4600 # Check whether --enable-pth or --disable-pth was given.
4601 if test "${enable_pth+set}" = set; then
4602   enableval="$enable_pth"
4603    if test x$enableval = xyes; then
4604     echo $ac_n "checking for pth_init in -lpth""... $ac_c" 1>&6
4605 echo "configure:4606: checking for pth_init in -lpth" >&5
4606 ac_lib_var=`echo pth'_'pth_init | sed 'y%./+-%__p_%'`
4607 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4608   echo $ac_n "(cached) $ac_c" 1>&6
4609 else
4610   ac_save_LIBS="$LIBS"
4611 LIBS="-lpth  $LIBS"
4612 cat > conftest.$ac_ext <<EOF
4613 #line 4614 "configure"
4614 #include "confdefs.h"
4615 /* Override any gcc2 internal prototype to avoid an error.  */
4616 /* We use char because int might match the return type of a gcc2
4617     builtin and then its argument prototype would still apply.  */
4618 char pth_init();
4619
4620 int main() {
4621 pth_init()
4622 ; return 0; }
4623 EOF
4624 if { (eval echo configure:4625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4625   rm -rf conftest*
4626   eval "ac_cv_lib_$ac_lib_var=yes"
4627 else
4628   echo "configure: failed program was:" >&5
4629   cat conftest.$ac_ext >&5
4630   rm -rf conftest*
4631   eval "ac_cv_lib_$ac_lib_var=no"
4632 fi
4633 rm -f conftest*
4634 LIBS="$ac_save_LIBS"
4635
4636 fi
4637 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4638   echo "$ac_t""yes" 1>&6
4639     ac_tr_lib=HAVE_LIB`echo pth | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4640     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4641   cat >> confdefs.h <<EOF
4642 #define $ac_tr_lib 1
4643 EOF
4644
4645   LIBS="-lpth $LIBS"
4646
4647 else
4648   echo "$ac_t""no" 1>&6
4649 fi
4650
4651     cat > conftest.$ac_ext <<EOF
4652 #line 4653 "configure"
4653 #include "confdefs.h"
4654 #include <pth.h>
4655 EOF
4656 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4657   egrep "pth_init" >/dev/null 2>&1; then
4658   rm -rf conftest*
4659   
4660       cat >> confdefs.h <<\EOF
4661 #define PTH_INIT_IN_PTH_H 1
4662 EOF
4663
4664     THREAD_LIB="-lpth"
4665     fi
4666 fi
4667 rm -f conftest*
4668
4669
4670 fi
4671
4672
4673 LIB="${LIB} ${THREAD_LIB}"
4674
4675 NEED_LIBDVDCSS=0
4676 STATIC_LIBDVDCSS=0
4677 DUMMY_LIBDVDCSS=0
4678 # Check whether --with-dvdcss or --without-dvdcss was given.
4679 if test "${with_dvdcss+set}" = set; then
4680   withval="$with_dvdcss"
4681    case "x${withval}" in
4682     xlocal-static|xyes)
4683       # local libdvdcss, statically linked
4684       if test x${CAN_BUILD_LIBDVDCSS} = x1
4685       then
4686         NEED_LIBDVDCSS=1
4687         STATIC_LIBDVDCSS=1
4688         BUILTINS="${BUILTINS} dvd"
4689         CFLAGS_DVD="${CFLAGS_DVD} -I../../extras/libdvdcss"
4690         LIB_DVD="${LIB_DVD} lib/libdvdcss.a ${LIB_LIBDVDCSS}"
4691         LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} ../../lib/libdvdcss.a ${LIB_LIBDVDCSS}"
4692       fi
4693     ;;
4694     xlocal-shared)
4695       # local libdvdcss, dynamically linked
4696       if test x${CAN_BUILD_LIBDVDCSS} = x1
4697       then
4698         NEED_LIBDVDCSS=1
4699         BUILTINS="${BUILTINS} dvd"
4700         CFLAGS_DVD="${CFLAGS_DVD} -I../../extras/libdvdcss"
4701         LIB_DVD="${LIB_DVD} -Llib -ldvdcss"
4702         LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} -L../../lib -ldvdcss"
4703       fi
4704     ;;
4705     xno)
4706       # don't use libdvdcss at all, build a DVD module that can dlopen() it
4707       DUMMY_LIBDVDCSS=1
4708       BUILTINS="${BUILTINS} dvd"
4709       OBJ_DVD="${OBJ_DVD} dummy_dvdcss.o"
4710       CFLAGS_DVD="${CFLAGS_DVD} -DGOD_DAMN_DMCA"
4711       CFLAGS_DVD="${CFLAGS_DVD} -DLIBDVDCSS_VERSION=\"${LIBDVDCSS_VERSION}\""
4712       LIB_DVD="${LIB_DVD} -ldl"
4713       LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} -ldl"
4714     ;;
4715     *)
4716       # existing libdvdcss
4717       BUILTINS="${BUILTINS} dvd"
4718       if test "x$withval" != "xyes"
4719       then
4720         LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} -L"$withval"/lib"
4721         CFLAGS_DVD="${CFLAGS_DVD} -I"$withval"/include"
4722       fi
4723       LIB_DVD="${LIB_DVD} -ldvdcss"
4724       LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} -ldvdcss"
4725     esac 
4726 else
4727   # user didn't decide, we choose to use local libdvdcss and link statically
4728   # if libdvdcss is in the archive, or to use the dummy replacement otherwise.
4729    if test x${CAN_BUILD_LIBDVDCSS} = x1
4730     then
4731       NEED_LIBDVDCSS=1
4732       STATIC_LIBDVDCSS=1
4733       BUILTINS="${BUILTINS} dvd"
4734       CFLAGS_DVD="${CFLAGS_DVD} -I../../extras/libdvdcss"
4735       LIB_DVD="${LIB_DVD} lib/libdvdcss.a ${LIB_LIBDVDCSS}"
4736       LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} ../../lib/libdvdcss.a ${LIB_LIBDVDCSS}"
4737     else
4738       # XXX: no check for libdl is done, don't try this at home !
4739       DUMMY_LIBDVDCSS=1
4740       BUILTINS="${BUILTINS} dvd"
4741       OBJ_DVD="${OBJ_DVD} dummy_dvdcss.o"
4742       CFLAGS_DVD="${CFLAGS_DVD} -DGOD_DAMN_DMCA"
4743       LIB_DVD="${LIB_DVD} -ldl"
4744       LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} -ldl"
4745     fi 
4746 fi
4747
4748
4749 # Check whether --enable-dvdread or --disable-dvdread was given.
4750 if test "${enable_dvdread+set}" = set; then
4751   enableval="$enable_dvdread"
4752    if test x$enableval = xyes
4753   then
4754     NEED_LIBDVDCSS=1
4755     STATIC_LIBDVDCSS=1
4756     BUILTINS="${BUILTINS} dvdread" 
4757     CFLAGS_DVDREAD="${CFLAGS_DVDREAD} -I../../extras/libdvdread"
4758     LIB_DVDREAD="${LIB_DVDREAD} lib/libdvdread.a lib/libdvdcss.a"
4759   fi 
4760 fi
4761
4762
4763 # Check whether --enable-vcd or --disable-vcd was given.
4764 if test "${enable_vcd+set}" = set; then
4765   enableval="$enable_vcd"
4766   :
4767 fi
4768
4769
4770 if test x$enable_vcd != xno
4771 then
4772   cat > conftest.$ac_ext <<EOF
4773 #line 4774 "configure"
4774 #include "confdefs.h"
4775 #include <linux/cdrom.h>
4776 EOF
4777 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4778   egrep "cdrom_msf0" >/dev/null 2>&1; then
4779   rm -rf conftest*
4780   
4781     BUILTINS="${BUILTINS} vcd"
4782   
4783 fi
4784 rm -f conftest*
4785
4786 fi
4787
4788 if test x$enable_vcd != xno -a "${SYS}" = "bsdi"
4789 then
4790   BUILTINS="${BUILTINS} vcd"
4791 fi
4792
4793 # Check whether --enable-dummy or --disable-dummy was given.
4794 if test "${enable_dummy+set}" = set; then
4795   enableval="$enable_dummy"
4796   :
4797 fi
4798
4799
4800 if test x$enable_dummy != xno
4801 then
4802   BUILTINS="${BUILTINS} dummy"
4803 fi
4804
4805 # Check whether --enable-null or --disable-null was given.
4806 if test "${enable_null+set}" = set; then
4807   enableval="$enable_null"
4808   :
4809 fi
4810
4811
4812 if test x$enable_null != xno
4813 then
4814   BUILTINS="${BUILTINS} null"
4815 fi
4816
4817 # Check whether --enable-rc or --disable-rc was given.
4818 if test "${enable_rc+set}" = set; then
4819   enableval="$enable_rc"
4820   :
4821 fi
4822
4823
4824 if test x$enable_rc != xno
4825 then
4826   BUILTINS="${BUILTINS} rc"
4827 fi
4828
4829 if test x$SYS = xbeos
4830 then
4831     BUILTINS="${BUILTINS} beos"
4832     LIB_BEOS="-lbe -lgame -lroot -ltracker"
4833     PLCFLAGS="${PLCFLAGS} -nostart"
4834
4835 else
4836
4837 # Check whether --enable-dsp or --disable-dsp was given.
4838 if test "${enable_dsp+set}" = set; then
4839   enableval="$enable_dsp"
4840   :
4841 fi
4842
4843
4844 if test x$enable_dsp != xno &&
4845   (test $SYS != mingw32 || test x$enable_dsp = xyes)
4846 then
4847   if test -c /dev/dsp
4848   then
4849     PLUGINS="${PLUGINS} dsp"
4850   fi
4851 fi
4852
4853 # Check whether --enable-esd or --disable-esd was given.
4854 if test "${enable_esd+set}" = set; then
4855   enableval="$enable_esd"
4856   if test x$enable_esd = xyes
4857    then
4858      # Extract the first word of "esd-config", so it can be a program name with args.
4859 set dummy esd-config; ac_word=$2
4860 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4861 echo "configure:4862: checking for $ac_word" >&5
4862 if eval "test \"`echo '$''{'ac_cv_path_ESD_CONFIG'+set}'`\" = set"; then
4863   echo $ac_n "(cached) $ac_c" 1>&6
4864 else
4865   case "$ESD_CONFIG" in
4866   /*)
4867   ac_cv_path_ESD_CONFIG="$ESD_CONFIG" # Let the user override the test with a path.
4868   ;;
4869   ?:/*)                  
4870   ac_cv_path_ESD_CONFIG="$ESD_CONFIG" # Let the user override the test with a dos path.
4871   ;;
4872   *)
4873   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4874   ac_dummy="$PATH"
4875   for ac_dir in $ac_dummy; do 
4876     test -z "$ac_dir" && ac_dir=.
4877     if test -f $ac_dir/$ac_word; then
4878       ac_cv_path_ESD_CONFIG="$ac_dir/$ac_word"
4879       break
4880     fi
4881   done
4882   IFS="$ac_save_ifs"
4883   test -z "$ac_cv_path_ESD_CONFIG" && ac_cv_path_ESD_CONFIG="no"
4884   ;;
4885 esac
4886 fi
4887 ESD_CONFIG="$ac_cv_path_ESD_CONFIG"
4888 if test -n "$ESD_CONFIG"; then
4889   echo "$ac_t""$ESD_CONFIG" 1>&6
4890 else
4891   echo "$ac_t""no" 1>&6
4892 fi
4893
4894      if test x${ESD_CONFIG} != xno
4895      then
4896        PLUGINS="${PLUGINS} esd"
4897        CFLAGS_ESD="`${ESD_CONFIG} --cflags`"
4898        LIB_ESD="`${ESD_CONFIG} --libs`"
4899      fi
4900    fi
4901 fi
4902
4903
4904 # Check whether --enable-arts or --disable-arts was given.
4905 if test "${enable_arts+set}" = set; then
4906   enableval="$enable_arts"
4907   if test x$enable_arts = xyes
4908    then
4909      # Extract the first word of "artsc-config", so it can be a program name with args.
4910 set dummy artsc-config; ac_word=$2
4911 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4912 echo "configure:4913: checking for $ac_word" >&5
4913 if eval "test \"`echo '$''{'ac_cv_path_ARTS_CONFIG'+set}'`\" = set"; then
4914   echo $ac_n "(cached) $ac_c" 1>&6
4915 else
4916   case "$ARTS_CONFIG" in
4917   /*)
4918   ac_cv_path_ARTS_CONFIG="$ARTS_CONFIG" # Let the user override the test with a path.
4919   ;;
4920   ?:/*)                  
4921   ac_cv_path_ARTS_CONFIG="$ARTS_CONFIG" # Let the user override the test with a dos path.
4922   ;;
4923   *)
4924   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4925   ac_dummy="$PATH"
4926   for ac_dir in $ac_dummy; do 
4927     test -z "$ac_dir" && ac_dir=.
4928     if test -f $ac_dir/$ac_word; then
4929       ac_cv_path_ARTS_CONFIG="$ac_dir/$ac_word"
4930       break
4931     fi
4932   done
4933   IFS="$ac_save_ifs"
4934   test -z "$ac_cv_path_ARTS_CONFIG" && ac_cv_path_ARTS_CONFIG="no"
4935   ;;
4936 esac
4937 fi
4938 ARTS_CONFIG="$ac_cv_path_ARTS_CONFIG"
4939 if test -n "$ARTS_CONFIG"; then
4940   echo "$ac_t""$ARTS_CONFIG" 1>&6
4941 else
4942   echo "$ac_t""no" 1>&6
4943 fi
4944
4945      if test x${ARTS_CONFIG} != xno
4946      then
4947        PLUGINS="${PLUGINS} arts"
4948        CFLAGS_ARTS="`${ARTS_CONFIG} --cflags`"
4949        LIB_ARTS="`${ARTS_CONFIG} --libs `"
4950      fi
4951    fi
4952 fi
4953
4954
4955 # Check whether --enable-macosx or --disable-macosx was given.
4956 if test "${enable_macosx+set}" = set; then
4957   enableval="$enable_macosx"
4958   if test x$enable_macosx = xyes
4959    then
4960      BUILTINS="${BUILTINS} macosx"
4961      LIB_MACOSX="-framework CoreAudio -framework Cocoa -framework AGL -framework QuickTime"
4962      LIB="${LIB} -ObjC"
4963    fi
4964 else
4965   for ac_hdr in Cocoa/Cocoa.h
4966 do
4967 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4968 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4969 echo "configure:4970: checking for $ac_hdr" >&5
4970 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4971   echo $ac_n "(cached) $ac_c" 1>&6
4972 else
4973   cat > conftest.$ac_ext <<EOF
4974 #line 4975 "configure"
4975 #include "confdefs.h"
4976 #include <$ac_hdr>
4977 EOF
4978 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4979 { (eval echo configure:4980: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4980 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4981 if test -z "$ac_err"; then
4982   rm -rf conftest*
4983   eval "ac_cv_header_$ac_safe=yes"
4984 else
4985   echo "$ac_err" >&5
4986   echo "configure: failed program was:" >&5
4987   cat conftest.$ac_ext >&5
4988   rm -rf conftest*
4989   eval "ac_cv_header_$ac_safe=no"
4990 fi
4991 rm -f conftest*
4992 fi
4993 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4994   echo "$ac_t""yes" 1>&6
4995     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4996   cat >> confdefs.h <<EOF
4997 #define $ac_tr_hdr 1
4998 EOF
4999  BUILTINS="${BUILTINS} macosx"
5000      LIB_MACOSX="-framework CoreAudio -framework Cocoa -framework AGL -framework QuickTime"
5001      LIB="${LIB} -ObjC"
5002    
5003 else
5004   echo "$ac_t""no" 1>&6
5005 fi
5006 done
5007
5008 fi
5009
5010
5011 # Check whether --enable-qnx or --disable-qnx was given.
5012 if test "${enable_qnx+set}" = set; then
5013   enableval="$enable_qnx"
5014   :
5015 fi
5016
5017     if test x$enable_qnx != xno
5018     then
5019       for ac_hdr in Ph.h
5020 do
5021 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5022 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5023 echo "configure:5024: checking for $ac_hdr" >&5
5024 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5025   echo $ac_n "(cached) $ac_c" 1>&6
5026 else
5027   cat > conftest.$ac_ext <<EOF
5028 #line 5029 "configure"
5029 #include "confdefs.h"
5030 #include <$ac_hdr>
5031 EOF
5032 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5033 { (eval echo configure:5034: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5034 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5035 if test -z "$ac_err"; then
5036   rm -rf conftest*
5037   eval "ac_cv_header_$ac_safe=yes"
5038 else
5039   echo "$ac_err" >&5
5040   echo "configure: failed program was:" >&5
5041   cat conftest.$ac_ext >&5
5042   rm -rf conftest*
5043   eval "ac_cv_header_$ac_safe=no"
5044 fi
5045 rm -f conftest*
5046 fi
5047 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5048   echo "$ac_t""yes" 1>&6
5049     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5050   cat >> confdefs.h <<EOF
5051 #define $ac_tr_hdr 1
5052 EOF
5053  
5054         PLUGINS="${PLUGINS} qnx"
5055         LIB_QNX="-lasound -lph"
5056       
5057 else
5058   echo "$ac_t""no" 1>&6
5059 fi
5060 done
5061
5062     fi
5063
5064 # Check whether --enable-fb or --disable-fb was given.
5065 if test "${enable_fb+set}" = set; then
5066   enableval="$enable_fb"
5067    if test x$enable_fb = xyes
5068     then
5069       PLUGINS="${PLUGINS} fb"
5070     fi 
5071 fi
5072
5073
5074 # Check whether --with-ggi or --without-ggi was given.
5075 if test "${with_ggi+set}" = set; then
5076   withval="$with_ggi"
5077    if test "x$withval" != "xno"
5078     then
5079       PLUGINS="${PLUGINS} ggi"
5080       if test "x$withval" != "xyes"
5081       then
5082         LIB_GGI="-l"$withval
5083       else
5084         LIB_GGI="-lggi"
5085       fi
5086     fi 
5087 fi
5088
5089
5090 # Check whether --enable-sdl or --disable-sdl was given.
5091 if test "${enable_sdl+set}" = set; then
5092   enableval="$enable_sdl"
5093   :
5094 fi
5095
5096 if test "x$enable_sdl" != "xno"
5097 then
5098   SDL_PATH=$PATH
5099   # Check whether --with-sdl-config-path or --without-sdl-config-path was given.
5100 if test "${with_sdl_config_path+set}" = set; then
5101   withval="$with_sdl_config_path"
5102    if test "x$withval" != "xno"
5103       then
5104         SDL_PATH=$withval:$PATH
5105       fi 
5106 fi
5107
5108   # Extract the first word of "sdl12-config", so it can be a program name with args.
5109 set dummy sdl12-config; ac_word=$2
5110 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5111 echo "configure:5112: checking for $ac_word" >&5
5112 if eval "test \"`echo '$''{'ac_cv_path_SDL12_CONFIG'+set}'`\" = set"; then
5113   echo $ac_n "(cached) $ac_c" 1>&6
5114 else
5115   case "$SDL12_CONFIG" in
5116   /*)
5117   ac_cv_path_SDL12_CONFIG="$SDL12_CONFIG" # Let the user override the test with a path.
5118   ;;
5119   ?:/*)                  
5120   ac_cv_path_SDL12_CONFIG="$SDL12_CONFIG" # Let the user override the test with a dos path.
5121   ;;
5122   *)
5123   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5124   ac_dummy="$SDL_PATH"
5125   for ac_dir in $ac_dummy; do 
5126     test -z "$ac_dir" && ac_dir=.
5127     if test -f $ac_dir/$ac_word; then
5128       ac_cv_path_SDL12_CONFIG="$ac_dir/$ac_word"
5129       break
5130     fi
5131   done
5132   IFS="$ac_save_ifs"
5133   test -z "$ac_cv_path_SDL12_CONFIG" && ac_cv_path_SDL12_CONFIG="no"
5134   ;;
5135 esac
5136 fi
5137 SDL12_CONFIG="$ac_cv_path_SDL12_CONFIG"
5138 if test -n "$SDL12_CONFIG"; then
5139   echo "$ac_t""$SDL12_CONFIG" 1>&6
5140 else
5141   echo "$ac_t""no" 1>&6
5142 fi
5143
5144   SDL_CONFIG=${SDL12_CONFIG}
5145   SDL_HEADER="SDL12/SDL.h"
5146   if test x${SDL_CONFIG} = xno
5147   then
5148     # Extract the first word of "sdl11-config", so it can be a program name with args.
5149 set dummy sdl11-config; ac_word=$2
5150 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5151 echo "configure:5152: checking for $ac_word" >&5
5152 if eval "test \"`echo '$''{'ac_cv_path_SDL11_CONFIG'+set}'`\" = set"; then
5153   echo $ac_n "(cached) $ac_c" 1>&6
5154 else
5155   case "$SDL11_CONFIG" in
5156   /*)
5157   ac_cv_path_SDL11_CONFIG="$SDL11_CONFIG" # Let the user override the test with a path.
5158   ;;
5159   ?:/*)                  
5160   ac_cv_path_SDL11_CONFIG="$SDL11_CONFIG" # Let the user override the test with a dos path.
5161   ;;
5162   *)
5163   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5164   ac_dummy="$SDL_PATH"
5165   for ac_dir in $ac_dummy; do 
5166     test -z "$ac_dir" && ac_dir=.
5167     if test -f $ac_dir/$ac_word; then
5168       ac_cv_path_SDL11_CONFIG="$ac_dir/$ac_word"
5169       break
5170     fi
5171   done
5172   IFS="$ac_save_ifs"
5173   test -z "$ac_cv_path_SDL11_CONFIG" && ac_cv_path_SDL11_CONFIG="no"
5174   ;;
5175 esac
5176 fi
5177 SDL11_CONFIG="$ac_cv_path_SDL11_CONFIG"
5178 if test -n "$SDL11_CONFIG"; then
5179   echo "$ac_t""$SDL11_CONFIG" 1>&6
5180 else
5181   echo "$ac_t""no" 1>&6
5182 fi
5183
5184     SDL_CONFIG=${SDL11_CONFIG}
5185     SDL_HEADER="SDL11/SDL.h"
5186   fi
5187   if test x${SDL_CONFIG} = xno
5188   then
5189     # Extract the first word of "sdl-config", so it can be a program name with args.
5190 set dummy sdl-config; ac_word=$2
5191 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5192 echo "configure:5193: checking for $ac_word" >&5
5193 if eval "test \"`echo '$''{'ac_cv_path_SDL_CONFIG'+set}'`\" = set"; then
5194   echo $ac_n "(cached) $ac_c" 1>&6
5195 else
5196   case "$SDL_CONFIG" in
5197   /*)
5198   ac_cv_path_SDL_CONFIG="$SDL_CONFIG" # Let the user override the test with a path.
5199   ;;
5200   ?:/*)                  
5201   ac_cv_path_SDL_CONFIG="$SDL_CONFIG" # Let the user override the test with a dos path.
5202   ;;
5203   *)
5204   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5205   ac_dummy="$SDL_PATH"
5206   for ac_dir in $ac_dummy; do 
5207     test -z "$ac_dir" && ac_dir=.
5208     if test -f $ac_dir/$ac_word; then
5209       ac_cv_path_SDL_CONFIG="$ac_dir/$ac_word"
5210       break
5211     fi
5212   done
5213   IFS="$ac_save_ifs"
5214   test -z "$ac_cv_path_SDL_CONFIG" && ac_cv_path_SDL_CONFIG="no"
5215   ;;
5216 esac
5217 fi
5218 SDL_CONFIG="$ac_cv_path_SDL_CONFIG"
5219 if test -n "$SDL_CONFIG"; then
5220   echo "$ac_t""$SDL_CONFIG" 1>&6
5221 else
5222   echo "$ac_t""no" 1>&6
5223 fi
5224
5225     SDL_HEADER="SDL/SDL.h"
5226   fi
5227   if test x${SDL_CONFIG} != xno
5228   then
5229     PLUGINS="${PLUGINS} sdl"
5230     CFLAGS_SDL="`${SDL_CONFIG} --cflags`"
5231     LIB_SDL="`${SDL_CONFIG} --libs | sed 's,-rdynamic,,'`"
5232     save_CPPFLAGS=$CPPFLAGS
5233     CPPFLAGS="$CPPFLAGS $CFLAGS_SDL"
5234     for ac_hdr in ${SDL_HEADER}
5235 do
5236 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5237 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5238 echo "configure:5239: checking for $ac_hdr" >&5
5239 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5240   echo $ac_n "(cached) $ac_c" 1>&6
5241 else
5242   cat > conftest.$ac_ext <<EOF
5243 #line 5244 "configure"
5244 #include "confdefs.h"
5245 #include <$ac_hdr>
5246 EOF
5247 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5248 { (eval echo configure:5249: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5249 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5250 if test -z "$ac_err"; then
5251   rm -rf conftest*
5252   eval "ac_cv_header_$ac_safe=yes"
5253 else
5254   echo "$ac_err" >&5
5255   echo "configure: failed program was:" >&5
5256   cat conftest.$ac_ext >&5
5257   rm -rf conftest*
5258   eval "ac_cv_header_$ac_safe=no"
5259 fi
5260 rm -f conftest*
5261 fi
5262 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5263   echo "$ac_t""yes" 1>&6
5264     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5265   cat >> confdefs.h <<EOF
5266 #define $ac_tr_hdr 1
5267 EOF
5268  cat >> confdefs.h <<EOF
5269 #define SDL_INCLUDE_FILE <${SDL_HEADER}>
5270 EOF
5271
5272 else
5273   echo "$ac_t""no" 1>&6
5274 { echo "configure: error: The development package for SDL is not installed. 
5275 Please install it and try again. Alternatively you can also configure with 
5276 --disable-sdl." 1>&2; exit 1; }
5277       
5278 fi
5279 done
5280
5281     CPPFLAGS=$save_CPPFLAGS
5282     if expr 1.1.5 \> `$SDL_CONFIG --version` >/dev/null
5283     then
5284       { echo "configure: error: The development package for SDL is not installed.
5285 Please install it and try again. Alternatively you can also configure with
5286 --disable-sdl." 1>&2; exit 1; }
5287     fi
5288   elif test "x$enable_sdl" =  "xyes"
5289   then
5290     { echo "configure: error: I couldn't find the SDL package. You can download libSDL
5291 from http://www.libsdl.org/, or configure with --disable-sdl. Have a nice day.
5292     " 1>&2; exit 1; }
5293   fi
5294 fi
5295
5296 # Check whether --enable-directx or --disable-directx was given.
5297 if test "${enable_directx+set}" = set; then
5298   enableval="$enable_directx"
5299   :
5300 fi
5301
5302 if test "x$enableval" != "xno"
5303 then
5304   if test $SYS = mingw32
5305   then
5306     # Check whether --with-directx-path or --without-directx-path was given.
5307 if test "${with_directx_path+set}" = set; then
5308   withval="$with_directx_path"
5309   :
5310 fi
5311
5312     if test "x$with_directx_path" = "x"
5313     then
5314       for ac_hdr in directx.h
5315 do
5316 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5317 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5318 echo "configure:5319: checking for $ac_hdr" >&5
5319 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5320   echo $ac_n "(cached) $ac_c" 1>&6
5321 else
5322   cat > conftest.$ac_ext <<EOF
5323 #line 5324 "configure"
5324 #include "confdefs.h"
5325 #include <$ac_hdr>
5326 EOF
5327 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5328 { (eval echo configure:5329: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5329 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5330 if test -z "$ac_err"; then
5331   rm -rf conftest*
5332   eval "ac_cv_header_$ac_safe=yes"
5333 else
5334   echo "$ac_err" >&5
5335   echo "configure: failed program was:" >&5
5336   cat conftest.$ac_ext >&5
5337   rm -rf conftest*
5338   eval "ac_cv_header_$ac_safe=no"
5339 fi
5340 rm -f conftest*
5341 fi
5342 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5343   echo "$ac_t""yes" 1>&6
5344     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5345   cat >> confdefs.h <<EOF
5346 #define $ac_tr_hdr 1
5347 EOF
5348   PLUGINS="${PLUGINS} directx"
5349         LIB_DIRECTX="-lgdi32 -ldxguid" 
5350 else
5351   echo "$ac_t""no" 1>&6
5352 fi
5353 done
5354
5355     else
5356       echo $ac_n "checking for directX headers in ${withval}""... $ac_c" 1>&6
5357 echo "configure:5358: checking for directX headers in ${withval}" >&5
5358       if test -f ${withval}/include/directx.h
5359       then
5360         PLUGINS="${PLUGINS} directx"
5361         LIB_DIRECTX="-L${withval}/lib -lgdi32 -ldxguid"
5362         INCLUDE="${INCLUDE} -I${withval}/include"
5363         echo "$ac_t""yes" 1>&6
5364       else
5365         echo "$ac_t""no" 1>&6
5366         { echo "configure: error: Cannot find ${withval}/include/directx.h!" 1>&2; exit 1; }
5367       fi
5368     fi
5369   fi
5370 fi
5371
5372 # Check whether --with-glide or --without-glide was given.
5373 if test "${with_glide+set}" = set; then
5374   withval="$with_glide"
5375    if test "x$withval" != "xno"
5376     then
5377       PLUGINS="${PLUGINS} glide"
5378       if test "x$withval" != "xyes"
5379       then
5380         LIB_GLIDE="-l"$withval" -lm"
5381       else
5382         LIB_GLIDE="-lglide2x -lm"
5383       fi
5384     fi 
5385 fi
5386
5387
5388 # Check whether --enable-ncurses or --disable-ncurses was given.
5389 if test "${enable_ncurses+set}" = set; then
5390   enableval="$enable_ncurses"
5391   if test x$enable_ncurses = xyes; then
5392      PLUGINS="${PLUGINS} ncurses"
5393      LIB_NCURSES="-lncurses"
5394    fi
5395 fi
5396
5397
5398 # Check whether --enable-qt or --disable-qt was given.
5399 if test "${enable_qt+set}" = set; then
5400   enableval="$enable_qt"
5401   if test x$enable_qt = xyes; then
5402      PLUGINS="${PLUGINS} qt"
5403      ALIASES="${ALIASES} qvlc"
5404      LIB_QT="-lqt -L${QTDIR}/lib"
5405      if test -x ${QTDIR}/bin/moc
5406      then
5407        MOC=${QTDIR}/bin/moc
5408      else
5409        MOC=moc
5410      fi
5411    fi
5412 fi
5413
5414
5415 # Check whether --enable-kde or --disable-kde was given.
5416 if test "${enable_kde+set}" = set; then
5417   enableval="$enable_kde"
5418   if test x$enable_kde = xyes; then
5419      PLUGINS="${PLUGINS} kde"
5420      ALIASES="${ALIASES} kvlc"
5421      LIB_KDE="-L${KDEDIR}/lib -lkfile"
5422      if test -x ${QTDIR}/bin/moc
5423      then
5424        MOC=${QTDIR}/bin/moc
5425      else
5426        MOC=moc
5427      fi
5428    fi
5429 fi
5430
5431
5432 # Check whether --enable-gnome or --disable-gnome was given.
5433 if test "${enable_gnome+set}" = set; then
5434   enableval="$enable_gnome"
5435   if test x$enable_gnome = xyes; then
5436     # look for gnome-config
5437     # Extract the first word of "gnome-config", so it can be a program name with args.
5438 set dummy gnome-config; ac_word=$2
5439 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5440 echo "configure:5441: checking for $ac_word" >&5
5441 if eval "test \"`echo '$''{'ac_cv_path_GNOME_CONFIG'+set}'`\" = set"; then
5442   echo $ac_n "(cached) $ac_c" 1>&6
5443 else
5444   case "$GNOME_CONFIG" in
5445   /*)
5446   ac_cv_path_GNOME_CONFIG="$GNOME_CONFIG" # Let the user override the test with a path.
5447   ;;
5448   ?:/*)                  
5449   ac_cv_path_GNOME_CONFIG="$GNOME_CONFIG" # Let the user override the test with a dos path.
5450   ;;
5451   *)
5452   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5453   ac_dummy="$PATH"
5454   for ac_dir in $ac_dummy; do 
5455     test -z "$ac_dir" && ac_dir=.
5456     if test -f $ac_dir/$ac_word; then
5457       ac_cv_path_GNOME_CONFIG="$ac_dir/$ac_word"
5458       break
5459     fi
5460   done
5461   IFS="$ac_save_ifs"
5462   test -z "$ac_cv_path_GNOME_CONFIG" && ac_cv_path_GNOME_CONFIG="no"
5463   ;;
5464 esac
5465 fi
5466 GNOME_CONFIG="$ac_cv_path_GNOME_CONFIG"
5467 if test -n "$GNOME_CONFIG"; then
5468   echo "$ac_t""$GNOME_CONFIG" 1>&6
5469 else
5470   echo "$ac_t""no" 1>&6
5471 fi
5472
5473     if test -x ${GNOME_CONFIG}
5474     then
5475        CFLAGS_GNOME="`${GNOME_CONFIG} --cflags gnomeui`"
5476        LIB_GNOME="`${GNOME_CONFIG} --libs gnomeui | sed 's,-rdynamic,,'`"
5477     fi
5478     # now look for the gnome.h header
5479     saved_CPPFLAGS=$CPPFLAGS
5480     CPPFLAGS="$CPPFLAGS $CFLAGS_GNOME"
5481     for ac_hdr in gnome.h
5482 do
5483 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5484 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5485 echo "configure:5486: checking for $ac_hdr" >&5
5486 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5487   echo $ac_n "(cached) $ac_c" 1>&6
5488 else
5489   cat > conftest.$ac_ext <<EOF
5490 #line 5491 "configure"
5491 #include "confdefs.h"
5492 #include <$ac_hdr>
5493 EOF
5494 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5495 { (eval echo configure:5496: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5496 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5497 if test -z "$ac_err"; then
5498   rm -rf conftest*
5499   eval "ac_cv_header_$ac_safe=yes"
5500 else
5501   echo "$ac_err" >&5
5502   echo "configure: failed program was:" >&5
5503   cat conftest.$ac_ext >&5
5504   rm -rf conftest*
5505   eval "ac_cv_header_$ac_safe=no"
5506 fi
5507 rm -f conftest*
5508 fi
5509 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5510   echo "$ac_t""yes" 1>&6
5511     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5512   cat >> confdefs.h <<EOF
5513 #define $ac_tr_hdr 1
5514 EOF
5515  
5516       PLUGINS="${PLUGINS} gnome"
5517       ALIASES="${ALIASES} gnome-vlc"
5518      
5519 else
5520   echo "$ac_t""no" 1>&6
5521 { echo "configure: error: Can't find gnome headers. Please install the gnome
5522 developement librairie or remove the --enable-gnome option" 1>&2; exit 1; }
5523      
5524 fi
5525 done
5526
5527   
5528     CPPFLAGS=$saved_CPPFLAGS
5529   fi
5530 fi
5531
5532
5533 # Check whether --enable-gtk or --disable-gtk was given.
5534 if test "${enable_gtk+set}" = set; then
5535   enableval="$enable_gtk"
5536   :
5537 fi
5538
5539 if test x$enable_gtk != xno
5540 then
5541   GTK_PATH=$PATH
5542   # Check whether --with-gtk-config-path or --without-gtk-config-path was given.
5543 if test "${with_gtk_config_path+set}" = set; then
5544   withval="$with_gtk_config_path"
5545    if test "x$withval" != "xno"
5546       then
5547         GTK_PATH=$withval:$PATH
5548       fi 
5549 fi
5550
5551   # look for gtk-config
5552   # Extract the first word of "gtk-config", so it can be a program name with args.
5553 set dummy gtk-config; ac_word=$2
5554 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5555 echo "configure:5556: checking for $ac_word" >&5
5556 if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then
5557   echo $ac_n "(cached) $ac_c" 1>&6
5558 else
5559   case "$GTK_CONFIG" in
5560   /*)
5561   ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a path.
5562   ;;
5563   ?:/*)                  
5564   ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a dos path.
5565   ;;
5566   *)
5567   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5568   ac_dummy="$GTK_PATH"
5569   for ac_dir in $ac_dummy; do 
5570     test -z "$ac_dir" && ac_dir=.
5571     if test -f $ac_dir/$ac_word; then
5572       ac_cv_path_GTK_CONFIG="$ac_dir/$ac_word"
5573       break
5574     fi
5575   done
5576   IFS="$ac_save_ifs"
5577   test -z "$ac_cv_path_GTK_CONFIG" && ac_cv_path_GTK_CONFIG="no"
5578   ;;
5579 esac
5580 fi
5581 GTK_CONFIG="$ac_cv_path_GTK_CONFIG"
5582 if test -n "$GTK_CONFIG"; then
5583   echo "$ac_t""$GTK_CONFIG" 1>&6
5584 else
5585   echo "$ac_t""no" 1>&6
5586 fi
5587
5588   if test -x ${GTK_CONFIG}
5589   then
5590     CFLAGS_GTK="`${GTK_CONFIG} --cflags gtk`"
5591     LIB_GTK="`${GTK_CONFIG} --libs gtk | sed 's,-rdynamic,,'`"
5592   fi
5593   # now look for the gtk.h header
5594   saved_CPPFLAGS=$CPPFLAGS
5595   CPPFLAGS="$CPPFLAGS $CFLAGS_GTK"
5596   for ac_hdr in gtk/gtk.h glib.h gdk/gdk.h
5597 do
5598 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5599 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5600 echo "configure:5601: checking for $ac_hdr" >&5
5601 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5602   echo $ac_n "(cached) $ac_c" 1>&6
5603 else
5604   cat > conftest.$ac_ext <<EOF
5605 #line 5606 "configure"
5606 #include "confdefs.h"
5607 #include <$ac_hdr>
5608 EOF
5609 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5610 { (eval echo configure:5611: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5611 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5612 if test -z "$ac_err"; then
5613   rm -rf conftest*
5614   eval "ac_cv_header_$ac_safe=yes"
5615 else
5616   echo "$ac_err" >&5
5617   echo "configure: failed program was:" >&5
5618   cat conftest.$ac_ext >&5
5619   rm -rf conftest*
5620   eval "ac_cv_header_$ac_safe=no"
5621 fi
5622 rm -f conftest*
5623 fi
5624 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5625   echo "$ac_t""yes" 1>&6
5626     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5627   cat >> confdefs.h <<EOF
5628 #define $ac_tr_hdr 1
5629 EOF
5630  
5631     PLUGINS="${PLUGINS} gtk"
5632     ALIASES="${ALIASES} gvlc"
5633   
5634 else
5635   echo "$ac_t""no" 1>&6
5636 fi
5637 done
5638
5639   CPPFLAGS=$saved_CPPFLAGS
5640 fi
5641
5642 # Check whether --enable-x11 or --disable-x11 was given.
5643 if test "${enable_x11+set}" = set; then
5644   enableval="$enable_x11"
5645   :
5646 fi
5647
5648 if test x$enable_x11 != xno &&
5649   (test $SYS != mingw32 || test x$enable_x11 = xyes); then
5650   if test x$x_includes = xNONE; then
5651     x_includes=/usr/X11R6/include
5652   fi
5653   if test x$x_libraries = xNONE; then
5654     x_libraries=/usr/X11R6/lib
5655   fi
5656   saved_CPPFLAGS=$CPPFLAGS
5657   CPPFLAGS="$CPPFLAGS -I$x_includes"
5658   for ac_hdr in X11/Xlib.h
5659 do
5660 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5661 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5662 echo "configure:5663: checking for $ac_hdr" >&5
5663 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5664   echo $ac_n "(cached) $ac_c" 1>&6
5665 else
5666   cat > conftest.$ac_ext <<EOF
5667 #line 5668 "configure"
5668 #include "confdefs.h"
5669 #include <$ac_hdr>
5670 EOF
5671 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5672 { (eval echo configure:5673: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5673 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5674 if test -z "$ac_err"; then
5675   rm -rf conftest*
5676   eval "ac_cv_header_$ac_safe=yes"
5677 else
5678   echo "$ac_err" >&5
5679   echo "configure: failed program was:" >&5
5680   cat conftest.$ac_ext >&5
5681   rm -rf conftest*
5682   eval "ac_cv_header_$ac_safe=no"
5683 fi
5684 rm -f conftest*
5685 fi
5686 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5687   echo "$ac_t""yes" 1>&6
5688     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5689   cat >> confdefs.h <<EOF
5690 #define $ac_tr_hdr 1
5691 EOF
5692  
5693     PLUGINS="${PLUGINS} x11"
5694     LIB_X11="-L$x_libraries -lX11 -lXext"
5695     CFLAGS_X11="-I$x_includes"
5696   
5697   CPPFLAGS=$saved_CPPFLAGS
5698 else
5699   echo "$ac_t""no" 1>&6
5700 fi
5701 done
5702
5703 fi
5704
5705 # Check whether --enable-xvideo or --disable-xvideo was given.
5706 if test "${enable_xvideo+set}" = set; then
5707   enableval="$enable_xvideo"
5708   :
5709 fi
5710
5711 if test x$enable_xvideo != xno &&
5712   (test $SYS != mingw32 || test x$enable_xvideo = xyes); then
5713   if test x$x_includes = xNONE; then
5714     x_includes=/usr/X11R6/include
5715   fi
5716   if test x$x_libraries = xNONE; then
5717     x_libraries=/usr/X11R6/lib
5718   fi
5719   saved_CPPFLAGS=$CPPFLAGS
5720   CPPFLAGS="$CPPFLAGS -I$x_includes"
5721   for ac_hdr in X11/extensions/Xv.h
5722 do
5723 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5724 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5725 echo "configure:5726: checking for $ac_hdr" >&5
5726 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5727   echo $ac_n "(cached) $ac_c" 1>&6
5728 else
5729   cat > conftest.$ac_ext <<EOF
5730 #line 5731 "configure"
5731 #include "confdefs.h"
5732 #include <$ac_hdr>
5733 EOF
5734 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5735 { (eval echo configure:5736: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5736 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5737 if test -z "$ac_err"; then
5738   rm -rf conftest*
5739   eval "ac_cv_header_$ac_safe=yes"
5740 else
5741   echo "$ac_err" >&5
5742   echo "configure: failed program was:" >&5
5743   cat conftest.$ac_ext >&5
5744   rm -rf conftest*
5745   eval "ac_cv_header_$ac_safe=no"
5746 fi
5747 rm -f conftest*
5748 fi
5749 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5750   echo "$ac_t""yes" 1>&6
5751     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5752   cat >> confdefs.h <<EOF
5753 #define $ac_tr_hdr 1
5754 EOF
5755  
5756     BUILTINS="${BUILTINS} xvideo"
5757     LIB_XVIDEO="-L$x_libraries -lX11 -lXext -lXv"
5758     CFLAGS_X11="-I$x_includes"
5759   
5760   CPPFLAGS=$saved_CPPFLAGS
5761 else
5762   echo "$ac_t""no" 1>&6
5763 fi
5764 done
5765
5766 fi
5767
5768 # Check whether --enable-alsa or --disable-alsa was given.
5769 if test "${enable_alsa+set}" = set; then
5770   enableval="$enable_alsa"
5771   if test x$enable_alsa = xyes
5772    then
5773      ac_safe=`echo "alsa/asoundlib.h" | sed 'y%./+-%__p_%'`
5774 echo $ac_n "checking for alsa/asoundlib.h""... $ac_c" 1>&6
5775 echo "configure:5776: checking for alsa/asoundlib.h" >&5
5776 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5777   echo $ac_n "(cached) $ac_c" 1>&6
5778 else
5779   cat > conftest.$ac_ext <<EOF
5780 #line 5781 "configure"
5781 #include "confdefs.h"
5782 #include <alsa/asoundlib.h>
5783 EOF
5784 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5785 { (eval echo configure:5786: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5786 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5787 if test -z "$ac_err"; then
5788   rm -rf conftest*
5789   eval "ac_cv_header_$ac_safe=yes"
5790 else
5791   echo "$ac_err" >&5
5792   echo "configure: failed program was:" >&5
5793   cat conftest.$ac_ext >&5
5794   rm -rf conftest*
5795   eval "ac_cv_header_$ac_safe=no"
5796 fi
5797 rm -f conftest*
5798 fi
5799 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5800   echo "$ac_t""yes" 1>&6
5801   echo $ac_n "checking for main in -lasound""... $ac_c" 1>&6
5802 echo "configure:5803: checking for main in -lasound" >&5
5803 ac_lib_var=`echo asound'_'main | sed 'y%./+-%__p_%'`
5804 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5805   echo $ac_n "(cached) $ac_c" 1>&6
5806 else
5807   ac_save_LIBS="$LIBS"
5808 LIBS="-lasound  $LIBS"
5809 cat > conftest.$ac_ext <<EOF
5810 #line 5811 "configure"
5811 #include "confdefs.h"
5812
5813 int main() {
5814 main()
5815 ; return 0; }
5816 EOF
5817 if { (eval echo configure:5818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5818   rm -rf conftest*
5819   eval "ac_cv_lib_$ac_lib_var=yes"
5820 else
5821   echo "configure: failed program was:" >&5
5822   cat conftest.$ac_ext >&5
5823   rm -rf conftest*
5824   eval "ac_cv_lib_$ac_lib_var=no"
5825 fi
5826 rm -f conftest*
5827 LIBS="$ac_save_LIBS"
5828
5829 fi
5830 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5831   echo "$ac_t""yes" 1>&6
5832   have_alsa="true"
5833 else
5834   echo "$ac_t""no" 1>&6
5835 have_alsa="false"
5836 fi
5837
5838 else
5839   echo "$ac_t""no" 1>&6
5840 have_alsa="false"
5841 fi
5842
5843      if test x$have_alsa = xtrue
5844      then
5845        PLUGINS="${PLUGINS} alsa"
5846        LIB_ALSA="-lasound"
5847      fi
5848    fi
5849 fi
5850
5851
5852 fi
5853
5854 # Check whether --enable-plugins or --disable-plugins was given.
5855 if test "${enable_plugins+set}" = set; then
5856   enableval="$enable_plugins"
5857   if test x$enable_plugins = xno
5858    then
5859      BUILTINS="${BUILTINS} ${PLUGINS}"
5860      PLUGINS=
5861    fi
5862 fi
5863
5864
5865
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 trap '' 1 2 15
5935 cat > confcache <<\EOF
5936 # This file is a shell script that caches the results of configure
5937 # tests run on this system so they can be shared between configure
5938 # scripts and configure runs.  It is not useful on other systems.
5939 # If it contains results you don't want to keep, you may remove or edit it.
5940 #
5941 # By default, configure uses ./config.cache as the cache file,
5942 # creating it if it does not exist already.  You can give configure
5943 # the --cache-file=FILE option to use a different cache file; that is
5944 # what configure does when it calls configure scripts in
5945 # subdirectories, so they share the cache.
5946 # Giving --cache-file=/dev/null disables caching, for debugging configure.
5947 # config.status only pays attention to the cache file if you give it the
5948 # --recheck option to rerun configure.
5949 #
5950 EOF
5951 # The following way of writing the cache mishandles newlines in values,
5952 # but we know of no workaround that is simple, portable, and efficient.
5953 # So, don't put newlines in cache variables' values.
5954 # Ultrix sh set writes to stderr and can't be redirected directly,
5955 # and sets the high bit in the cache file unless we assign to the vars.
5956 (set) 2>&1 |
5957   case `(ac_space=' '; set | grep ac_space) 2>&1` in
5958   *ac_space=\ *)
5959     # `set' does not quote correctly, so add quotes (double-quote substitution
5960     # turns \\\\ into \\, and sed turns \\ into \).
5961     sed -n \
5962       -e "s/'/'\\\\''/g" \
5963       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
5964     ;;
5965   *)
5966     # `set' quotes correctly as required by POSIX, so do not add quotes.
5967     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
5968     ;;
5969   esac >> confcache
5970 if cmp -s $cache_file confcache; then
5971   :
5972 else
5973   if test -w $cache_file; then
5974     echo "updating cache $cache_file"
5975     cat confcache > $cache_file
5976   else
5977     echo "not updating unwritable cache $cache_file"
5978   fi
5979 fi
5980 rm -f confcache
5981
5982 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
5983
5984 test "x$prefix" = xNONE && prefix=$ac_default_prefix
5985 # Let make expand exec_prefix.
5986 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5987
5988 # Any assignment to VPATH causes Sun make to only execute
5989 # the first set of double-colon rules, so remove it if not needed.
5990 # If there is a colon in the path, we need to keep it.
5991 if test "x$srcdir" = x.; then
5992   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
5993 fi
5994
5995 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
5996
5997 DEFS=-DHAVE_CONFIG_H
5998
5999 # Without the "./", some shells look in PATH for config.status.
6000 : ${CONFIG_STATUS=./config.status}
6001
6002 echo creating $CONFIG_STATUS
6003 rm -f $CONFIG_STATUS
6004 cat > $CONFIG_STATUS <<EOF
6005 #! /bin/sh
6006 # Generated automatically by configure.
6007 # Run this file to recreate the current configuration.
6008 # This directory was configured as follows,
6009 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
6010 #
6011 # $0 $ac_configure_args
6012 #
6013 # Compiler output produced by configure, useful for debugging
6014 # configure, is in ./config.log if it exists.
6015
6016 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
6017 for ac_option
6018 do
6019   case "\$ac_option" in
6020   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
6021     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
6022     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
6023   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
6024     echo "$CONFIG_STATUS generated by autoconf version 2.13"
6025     exit 0 ;;
6026   -help | --help | --hel | --he | --h)
6027     echo "\$ac_cs_usage"; exit 0 ;;
6028   *) echo "\$ac_cs_usage"; exit 1 ;;
6029   esac
6030 done
6031
6032 ac_given_srcdir=$srcdir
6033 ac_given_INSTALL="$INSTALL"
6034
6035 trap 'rm -fr `echo "Makefile.opts include/config.h include/defs.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
6036 EOF
6037 cat >> $CONFIG_STATUS <<EOF
6038
6039 # Protect against being on the right side of a sed subst in config.status.
6040 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
6041  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
6042 $ac_vpsub
6043 $extrasub
6044 s%@SHELL@%$SHELL%g
6045 s%@CFLAGS@%$CFLAGS%g
6046 s%@CPPFLAGS@%$CPPFLAGS%g
6047 s%@CXXFLAGS@%$CXXFLAGS%g
6048 s%@FFLAGS@%$FFLAGS%g
6049 s%@DEFS@%$DEFS%g
6050 s%@LDFLAGS@%$LDFLAGS%g
6051 s%@LIBS@%$LIBS%g
6052 s%@exec_prefix@%$exec_prefix%g
6053 s%@prefix@%$prefix%g
6054 s%@program_transform_name@%$program_transform_name%g
6055 s%@bindir@%$bindir%g
6056 s%@sbindir@%$sbindir%g
6057 s%@libexecdir@%$libexecdir%g
6058 s%@datadir@%$datadir%g
6059 s%@sysconfdir@%$sysconfdir%g
6060 s%@sharedstatedir@%$sharedstatedir%g
6061 s%@localstatedir@%$localstatedir%g
6062 s%@libdir@%$libdir%g
6063 s%@includedir@%$includedir%g
6064 s%@oldincludedir@%$oldincludedir%g
6065 s%@infodir@%$infodir%g
6066 s%@mandir@%$mandir%g
6067 s%@host@%$host%g
6068 s%@host_alias@%$host_alias%g
6069 s%@host_cpu@%$host_cpu%g
6070 s%@host_vendor@%$host_vendor%g
6071 s%@host_os@%$host_os%g
6072 s%@target@%$target%g
6073 s%@target_alias@%$target_alias%g
6074 s%@target_cpu@%$target_cpu%g
6075 s%@target_vendor@%$target_vendor%g
6076 s%@target_os@%$target_os%g
6077 s%@build@%$build%g
6078 s%@build_alias@%$build_alias%g
6079 s%@build_cpu@%$build_cpu%g
6080 s%@build_vendor@%$build_vendor%g
6081 s%@build_os@%$build_os%g
6082 s%@VLC_VERSION@%$VLC_VERSION%g
6083 s%@VLC_CODENAME@%$VLC_CODENAME%g
6084 s%@LIBDVDCSS_VERSION@%$LIBDVDCSS_VERSION%g
6085 s%@SET_MAKE@%$SET_MAKE%g
6086 s%@CC@%$CC%g
6087 s%@CPP@%$CPP%g
6088 s%@RANLIB@%$RANLIB%g
6089 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
6090 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
6091 s%@INSTALL_DATA@%$INSTALL_DATA%g
6092 s%@WINDRES@%$WINDRES%g
6093 s%@ESD_CONFIG@%$ESD_CONFIG%g
6094 s%@ARTS_CONFIG@%$ARTS_CONFIG%g
6095 s%@SDL12_CONFIG@%$SDL12_CONFIG%g
6096 s%@SDL11_CONFIG@%$SDL11_CONFIG%g
6097 s%@SDL_CONFIG@%$SDL_CONFIG%g
6098 s%@GNOME_CONFIG@%$GNOME_CONFIG%g
6099 s%@GTK_CONFIG@%$GTK_CONFIG%g
6100 s%@SYS@%$SYS%g
6101 s%@ARCH@%$ARCH%g
6102 s%@PLUGINS@%$PLUGINS%g
6103 s%@BUILTINS@%$BUILTINS%g
6104 s%@ALIASES@%$ALIASES%g
6105 s%@DEFINE@%$DEFINE%g
6106 s%@INCLUDE@%$INCLUDE%g
6107 s%@DEBUG@%$DEBUG%g
6108 s%@ASM@%$ASM%g
6109 s%@TRACE@%$TRACE%g
6110 s%@CPROF@%$CPROF%g
6111 s%@GPROF@%$GPROF%g
6112 s%@OPTIMS@%$OPTIMS%g
6113 s%@TUNING@%$TUNING%g
6114 s%@RELEASE@%$RELEASE%g
6115 s%@NEED_GETOPT@%$NEED_GETOPT%g
6116 s%@MOC@%$MOC%g
6117 s%@LCFLAGS@%$LCFLAGS%g
6118 s%@PLCFLAGS@%$PLCFLAGS%g
6119 s%@SOFLAGS@%$SOFLAGS%g
6120 s%@LIB@%$LIB%g
6121 s%@LIB_ALSA@%$LIB_ALSA%g
6122 s%@LIB_ALTIVEC@%$LIB_ALTIVEC%g
6123 s%@LIB_ARTS@%$LIB_ARTS%g
6124 s%@LIB_BEOS@%$LIB_BEOS%g
6125 s%@LIB_DARWIN@%$LIB_DARWIN%g
6126 s%@LIB_DIRECTX@%$LIB_DIRECTX%g
6127 s%@LIB_DVD@%$LIB_DVD%g
6128 s%@LIB_DVD_PLUGIN@%$LIB_DVD_PLUGIN%g
6129 s%@LIB_DVDREAD@%$LIB_DVDREAD%g
6130 s%@LIB_DVDREAD_PLUGIN@%$LIB_DVDREAD_PLUGIN%g
6131 s%@LIB_ESD@%$LIB_ESD%g
6132 s%@LIB_GGI@%$LIB_GGI%g
6133 s%@LIB_GLIDE@%$LIB_GLIDE%g
6134 s%@LIB_GNOME@%$LIB_GNOME%g
6135 s%@LIB_GTK@%$LIB_GTK%g
6136 s%@LIB_KDE@%$LIB_KDE%g
6137 s%@LIB_LIBDVDCSS@%$LIB_LIBDVDCSS%g
6138 s%@LIB_MACOSX@%$LIB_MACOSX%g
6139 s%@LIB_NCURSES@%$LIB_NCURSES%g
6140 s%@LIB_QNX@%$LIB_QNX%g
6141 s%@LIB_QT@%$LIB_QT%g
6142 s%@LIB_RC@%$LIB_RC%g
6143 s%@LIB_SDL@%$LIB_SDL%g
6144 s%@LIB_TS@%$LIB_TS%g
6145 s%@LIB_X11@%$LIB_X11%g
6146 s%@LIB_XVIDEO@%$LIB_XVIDEO%g
6147 s%@LIB_YUV@%$LIB_YUV%g
6148 s%@CFLAGS_VLC@%$CFLAGS_VLC%g
6149 s%@CFLAGS_ALTIVEC@%$CFLAGS_ALTIVEC%g
6150 s%@CFLAGS_DVD@%$CFLAGS_DVD%g
6151 s%@CFLAGS_DVDREAD@%$CFLAGS_DVDREAD%g
6152 s%@CFLAGS_LIBDVDCSS@%$CFLAGS_LIBDVDCSS%g
6153 s%@CFLAGS_ARTS@%$CFLAGS_ARTS%g
6154 s%@CFLAGS_ESD@%$CFLAGS_ESD%g
6155 s%@CFLAGS_GTK@%$CFLAGS_GTK%g
6156 s%@CFLAGS_SDL@%$CFLAGS_SDL%g
6157 s%@CFLAGS_X11@%$CFLAGS_X11%g
6158 s%@OBJ_DVD@%$OBJ_DVD%g
6159 s%@OBJ_LIBDVDCSS@%$OBJ_LIBDVDCSS%g
6160 s%@NEED_LIBDVDCSS@%$NEED_LIBDVDCSS%g
6161
6162 CEOF
6163 EOF
6164
6165 cat >> $CONFIG_STATUS <<\EOF
6166
6167 # Split the substitutions into bite-sized pieces for seds with
6168 # small command number limits, like on Digital OSF/1 and HP-UX.
6169 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
6170 ac_file=1 # Number of current file.
6171 ac_beg=1 # First line for current file.
6172 ac_end=$ac_max_sed_cmds # Line after last line for current file.
6173 ac_more_lines=:
6174 ac_sed_cmds=""
6175 while $ac_more_lines; do
6176   if test $ac_beg -gt 1; then
6177     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
6178   else
6179     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
6180   fi
6181   if test ! -s conftest.s$ac_file; then
6182     ac_more_lines=false
6183     rm -f conftest.s$ac_file
6184   else
6185     if test -z "$ac_sed_cmds"; then
6186       ac_sed_cmds="sed -f conftest.s$ac_file"
6187     else
6188       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
6189     fi
6190     ac_file=`expr $ac_file + 1`
6191     ac_beg=$ac_end
6192     ac_end=`expr $ac_end + $ac_max_sed_cmds`
6193   fi
6194 done
6195 if test -z "$ac_sed_cmds"; then
6196   ac_sed_cmds=cat
6197 fi
6198 EOF
6199
6200 cat >> $CONFIG_STATUS <<EOF
6201
6202 CONFIG_FILES=\${CONFIG_FILES-"Makefile.opts include/config.h"}
6203 EOF
6204 cat >> $CONFIG_STATUS <<\EOF
6205 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
6206   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
6207   case "$ac_file" in
6208   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
6209        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6210   *) ac_file_in="${ac_file}.in" ;;
6211   esac
6212
6213   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
6214
6215   # Remove last slash and all that follows it.  Not all systems have dirname.
6216   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6217   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6218     # The file is in a subdirectory.
6219     test ! -d "$ac_dir" && mkdir "$ac_dir"
6220     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
6221     # A "../" for each directory in $ac_dir_suffix.
6222     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
6223   else
6224     ac_dir_suffix= ac_dots=
6225   fi
6226
6227   case "$ac_given_srcdir" in
6228   .)  srcdir=.
6229       if test -z "$ac_dots"; then top_srcdir=.
6230       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
6231   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
6232   *) # Relative path.
6233     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
6234     top_srcdir="$ac_dots$ac_given_srcdir" ;;
6235   esac
6236
6237   case "$ac_given_INSTALL" in
6238   [/$]*) INSTALL="$ac_given_INSTALL" ;;
6239   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
6240   esac
6241
6242   echo creating "$ac_file"
6243   rm -f "$ac_file"
6244   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
6245   case "$ac_file" in
6246   *Makefile*) ac_comsub="1i\\
6247 # $configure_input" ;;
6248   *) ac_comsub= ;;
6249   esac
6250
6251   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
6252   sed -e "$ac_comsub
6253 s%@configure_input@%$configure_input%g
6254 s%@srcdir@%$srcdir%g
6255 s%@top_srcdir@%$top_srcdir%g
6256 s%@INSTALL@%$INSTALL%g
6257 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
6258 fi; done
6259 rm -f conftest.s*
6260
6261 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
6262 # NAME is the cpp macro being defined and VALUE is the value it is being given.
6263 #
6264 # ac_d sets the value in "#define NAME VALUE" lines.
6265 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
6266 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
6267 ac_dC='\3'
6268 ac_dD='%g'
6269 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
6270 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
6271 ac_uB='\([      ]\)%\1#\2define\3'
6272 ac_uC=' '
6273 ac_uD='\4%g'
6274 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
6275 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
6276 ac_eB='$%\1#\2define\3'
6277 ac_eC=' '
6278 ac_eD='%g'
6279
6280 if test "${CONFIG_HEADERS+set}" != set; then
6281 EOF
6282 cat >> $CONFIG_STATUS <<EOF
6283   CONFIG_HEADERS="include/defs.h"
6284 EOF
6285 cat >> $CONFIG_STATUS <<\EOF
6286 fi
6287 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
6288   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
6289   case "$ac_file" in
6290   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
6291        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6292   *) ac_file_in="${ac_file}.in" ;;
6293   esac
6294
6295   echo creating $ac_file
6296
6297   rm -f conftest.frag conftest.in conftest.out
6298   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
6299   cat $ac_file_inputs > conftest.in
6300
6301 EOF
6302
6303 # Transform confdefs.h into a sed script conftest.vals that substitutes
6304 # the proper values into config.h.in to produce config.h.  And first:
6305 # Protect against being on the right side of a sed subst in config.status.
6306 # Protect against being in an unquoted here document in config.status.
6307 rm -f conftest.vals
6308 cat > conftest.hdr <<\EOF
6309 s/[\\&%]/\\&/g
6310 s%[\\$`]%\\&%g
6311 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
6312 s%ac_d%ac_u%gp
6313 s%ac_u%ac_e%gp
6314 EOF
6315 sed -n -f conftest.hdr confdefs.h > conftest.vals
6316 rm -f conftest.hdr
6317
6318 # This sed command replaces #undef with comments.  This is necessary, for
6319 # example, in the case of _POSIX_SOURCE, which is predefined and required
6320 # on some systems where configure will not decide to define it.
6321 cat >> conftest.vals <<\EOF
6322 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
6323 EOF
6324
6325 # Break up conftest.vals because some shells have a limit on
6326 # the size of here documents, and old seds have small limits too.
6327
6328 rm -f conftest.tail
6329 while :
6330 do
6331   ac_lines=`grep -c . conftest.vals`
6332   # grep -c gives empty output for an empty file on some AIX systems.
6333   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
6334   # Write a limited-size here document to conftest.frag.
6335   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
6336   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
6337   echo 'CEOF
6338   sed -f conftest.frag conftest.in > conftest.out
6339   rm -f conftest.in
6340   mv conftest.out conftest.in
6341 ' >> $CONFIG_STATUS
6342   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
6343   rm -f conftest.vals
6344   mv conftest.tail conftest.vals
6345 done
6346 rm -f conftest.vals
6347
6348 cat >> $CONFIG_STATUS <<\EOF
6349   rm -f conftest.frag conftest.h
6350   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
6351   cat conftest.in >> conftest.h
6352   rm -f conftest.in
6353   if cmp -s $ac_file conftest.h 2>/dev/null; then
6354     echo "$ac_file is unchanged"
6355     rm -f conftest.h
6356   else
6357     # Remove last slash and all that follows it.  Not all systems have dirname.
6358       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6359       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6360       # The file is in a subdirectory.
6361       test ! -d "$ac_dir" && mkdir "$ac_dir"
6362     fi
6363     rm -f $ac_file
6364     mv conftest.h $ac_file
6365   fi
6366 fi; done
6367
6368 EOF
6369 cat >> $CONFIG_STATUS <<EOF
6370
6371 EOF
6372 cat >> $CONFIG_STATUS <<\EOF
6373
6374 exit 0
6375 EOF
6376 chmod +x $CONFIG_STATUS
6377 rm -fr confdefs* $ac_clean_files
6378 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
6379
6380
6381 echo "
6382 global configuration
6383 --------------------
6384 system                : ${SYS}
6385 architecture          : ${ARCH}
6386 optimizations         : ${OPTIMS}
6387 tuning:               : ${TUNING}
6388 release:              : ${RELEASE}"
6389
6390 if test x${HAVE_VLC} = x1
6391 then
6392   echo "
6393 vlc configuration
6394 -----------------
6395 vlc version           : ${VLC_VERSION}
6396 debug mode            : ${DEBUG}
6397 trace mode            : ${TRACE}
6398 cprof/gprof support   : ${CPROF}/${GPROF}
6399 need builtin getopt   : ${NEED_GETOPT}
6400 built-in modules      :${BUILTINS}
6401 plug-in modules       :${PLUGINS}
6402 vlc aliases           :${ALIASES}"
6403 fi
6404
6405 echo "
6406 libdvdcss configuration
6407 -----------------------
6408 can be built          : ${CAN_BUILD_LIBDVDCSS}
6409 will be built         : ${NEED_LIBDVDCSS}"
6410 if test x${NEED_LIBDVDCSS} = x1
6411 then
6412   echo "need BSDI libdvd      : ${NEED_BSDI_LIBDVD}"
6413   echo "link statically       : ${STATIC_LIBDVDCSS}"
6414 else
6415   echo "use dummy replacement : ${DUMMY_LIBDVDCSS}"
6416 fi
6417
6418 echo "
6419 You may now tune Makefile.opts at your convenience, for instance to choose
6420 which modules get compiled as plugins.
6421 "
6422 if test x${HAVE_VLC} = x1
6423 then
6424   echo "To build vlc and its plugins, type \`make vlc'."
6425 fi
6426 if test x${HAVE_LIBDVDCSS} = x1
6427 then
6428   echo "To build libdvdcss only, type \`make libdvdcss'."
6429 fi
6430 echo ""
6431