]> git.sesse.net Git - vlc/blob - configure
* aRts audio output courtesy of Emmanuel Blindauer <manu@agat.net>.
[vlc] / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_help="$ac_help
15   --with-words=endianness Set endianness (big or little)"
16 ac_help="$ac_help
17   --with-tuning=[arch]    Enable special tuning for an architecture
18                           (default i686 on IA-32 and 750 on PPC)"
19 ac_help="$ac_help
20   --enable-release        Activate extra optimizations (default disabled)"
21 ac_help="$ac_help
22   --disable-mmx           Disable MMX optimizations (default enabled for x86)"
23 ac_help="$ac_help
24   --disable-altivec       Disable altivec optimizations (default enabled on PPC)"
25 ac_help="$ac_help
26   --enable-debug          Enable debug mode (default disabled)"
27 ac_help="$ac_help
28   --enable-trace          Enable trace mode (default disabled)"
29 ac_help="$ac_help
30   --enable-gprof          Enable gprof profiling (default disabled)"
31 ac_help="$ac_help
32   --enable-cprof          Enable cprof profiling (default disabled)"
33 ac_help="$ac_help
34   --disable-optimizations Disable compiler optimizations (default enabled)"
35 ac_help="$ac_help
36   --enable-pth            Enable GNU Pth support (default disabled)"
37 ac_help="$ac_help
38   --with-dvdcss[=name]    way to use libdvdcss, either 'yes' or 'no',
39                           or 'local-static', 'local-shared', or a path to
40                           another libdvdcss such as '/usr/local'
41                           (default 'local-static')"
42 ac_help="$ac_help
43   --enable-vcd            VCD support for Linux (default enabled)"
44 ac_help="$ac_help
45   --disable-dummy         dummy module (default enabled)"
46 ac_help="$ac_help
47   --disable-null          Null module (default enabled)"
48 ac_help="$ac_help
49   --disable-rc            rc module (default enabled)"
50 ac_help="$ac_help
51   --disable-dsp           Linux /dev/dsp support (default enabled)"
52 ac_help="$ac_help
53   --enable-esd            Esound library support (default disabled)"
54 ac_help="$ac_help
55   --enable-arts           aRts sound server (default disabled)"
56 ac_help="$ac_help
57   --enable-darwin         Darwin sound support (default enabled on MacOS X)"
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=[name] Windows DirectX support (default enabled)"
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 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="yuvmmx idctmmx motionmmx"
3755 MMXEXT_MODULES="idctmmxext motionmmxext"
3756 THREEDNOW_MODULES="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 HAVE_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 HAVE_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 HAVE_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 HAVE_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   bsdi*)
4040     SYS=bsdi
4041     ;;
4042   darwin*)
4043     SYS=darwin
4044     ;;
4045   *mingw32*)
4046     SYS=mingw32
4047     ;;
4048   *)
4049     SYS=${target_os}
4050     ;;
4051 esac
4052
4053 if test $SYS = mingw32; then
4054 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
4055 set dummy ${ac_tool_prefix}windres; ac_word=$2
4056 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4057 echo "configure:4058: checking for $ac_word" >&5
4058 if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
4059   echo $ac_n "(cached) $ac_c" 1>&6
4060 else
4061   if test -n "$WINDRES"; then
4062   ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
4063 else
4064   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4065   ac_dummy="$PATH"
4066   for ac_dir in $ac_dummy; do
4067     test -z "$ac_dir" && ac_dir=.
4068     if test -f $ac_dir/$ac_word; then
4069       ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
4070       break
4071     fi
4072   done
4073   IFS="$ac_save_ifs"
4074 fi
4075 fi
4076 WINDRES="$ac_cv_prog_WINDRES"
4077 if test -n "$WINDRES"; then
4078   echo "$ac_t""$WINDRES" 1>&6
4079 else
4080   echo "$ac_t""no" 1>&6
4081 fi
4082
4083
4084 if test -z "$ac_cv_prog_WINDRES"; then
4085 if test -n "$ac_tool_prefix"; then
4086   # Extract the first word of "windres", so it can be a program name with args.
4087 set dummy windres; ac_word=$2
4088 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4089 echo "configure:4090: checking for $ac_word" >&5
4090 if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
4091   echo $ac_n "(cached) $ac_c" 1>&6
4092 else
4093   if test -n "$WINDRES"; then
4094   ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
4095 else
4096   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4097   ac_dummy="$PATH"
4098   for ac_dir in $ac_dummy; do
4099     test -z "$ac_dir" && ac_dir=.
4100     if test -f $ac_dir/$ac_word; then
4101       ac_cv_prog_WINDRES="windres"
4102       break
4103     fi
4104   done
4105   IFS="$ac_save_ifs"
4106   test -z "$ac_cv_prog_WINDRES" && ac_cv_prog_WINDRES=":"
4107 fi
4108 fi
4109 WINDRES="$ac_cv_prog_WINDRES"
4110 if test -n "$WINDRES"; then
4111   echo "$ac_t""$WINDRES" 1>&6
4112 else
4113   echo "$ac_t""no" 1>&6
4114 fi
4115
4116 else
4117   WINDRES=":"
4118 fi
4119 fi
4120
4121 fi
4122
4123
4124 CAN_BUILD_LIBDVDCSS=0
4125
4126 for ac_hdr in winioctl.h
4127 do
4128 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4129 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4130 echo "configure:4131: checking for $ac_hdr" >&5
4131 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4132   echo $ac_n "(cached) $ac_c" 1>&6
4133 else
4134   cat > conftest.$ac_ext <<EOF
4135 #line 4136 "configure"
4136 #include "confdefs.h"
4137 #include <$ac_hdr>
4138 EOF
4139 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4140 { (eval echo configure:4141: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4141 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4142 if test -z "$ac_err"; then
4143   rm -rf conftest*
4144   eval "ac_cv_header_$ac_safe=yes"
4145 else
4146   echo "$ac_err" >&5
4147   echo "configure: failed program was:" >&5
4148   cat conftest.$ac_ext >&5
4149   rm -rf conftest*
4150   eval "ac_cv_header_$ac_safe=no"
4151 fi
4152 rm -f conftest*
4153 fi
4154 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4155   echo "$ac_t""yes" 1>&6
4156     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4157   cat >> confdefs.h <<EOF
4158 #define $ac_tr_hdr 1
4159 EOF
4160  
4161   CAN_BUILD_LIBDVDCSS="${HAVE_LIBDVDCSS}"
4162
4163 else
4164   echo "$ac_t""no" 1>&6
4165 fi
4166 done
4167
4168
4169 for ac_hdr in sys/ioctl.h
4170 do
4171 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4172 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4173 echo "configure:4174: checking for $ac_hdr" >&5
4174 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4175   echo $ac_n "(cached) $ac_c" 1>&6
4176 else
4177   cat > conftest.$ac_ext <<EOF
4178 #line 4179 "configure"
4179 #include "confdefs.h"
4180 #include <$ac_hdr>
4181 EOF
4182 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4183 { (eval echo configure:4184: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4184 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4185 if test -z "$ac_err"; then
4186   rm -rf conftest*
4187   eval "ac_cv_header_$ac_safe=yes"
4188 else
4189   echo "$ac_err" >&5
4190   echo "configure: failed program was:" >&5
4191   cat conftest.$ac_ext >&5
4192   rm -rf conftest*
4193   eval "ac_cv_header_$ac_safe=no"
4194 fi
4195 rm -f conftest*
4196 fi
4197 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4198   echo "$ac_t""yes" 1>&6
4199     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4200   cat >> confdefs.h <<EOF
4201 #define $ac_tr_hdr 1
4202 EOF
4203  
4204   CAN_BUILD_LIBDVDCSS="${HAVE_LIBDVDCSS}"
4205   for ac_hdr in sys/cdio.h sys/dvdio.h linux/cdrom.h dvd.h
4206 do
4207 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4208 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4209 echo "configure:4210: checking for $ac_hdr" >&5
4210 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4211   echo $ac_n "(cached) $ac_c" 1>&6
4212 else
4213   cat > conftest.$ac_ext <<EOF
4214 #line 4215 "configure"
4215 #include "confdefs.h"
4216 #include <$ac_hdr>
4217 EOF
4218 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4219 { (eval echo configure:4220: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4220 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4221 if test -z "$ac_err"; then
4222   rm -rf conftest*
4223   eval "ac_cv_header_$ac_safe=yes"
4224 else
4225   echo "$ac_err" >&5
4226   echo "configure: failed program was:" >&5
4227   cat conftest.$ac_ext >&5
4228   rm -rf conftest*
4229   eval "ac_cv_header_$ac_safe=no"
4230 fi
4231 rm -f conftest*
4232 fi
4233 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4234   echo "$ac_t""yes" 1>&6
4235     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4236   cat >> confdefs.h <<EOF
4237 #define $ac_tr_hdr 1
4238 EOF
4239  
4240 else
4241   echo "$ac_t""no" 1>&6
4242 fi
4243 done
4244
4245   BSD_DVD_STRUCT=0
4246   LINUX_DVD_STRUCT=0
4247   OPENBSD_DVD_STRUCT=0
4248         cat > conftest.$ac_ext <<EOF
4249 #line 4250 "configure"
4250 #include "confdefs.h"
4251 #include <sys/cdio.h>
4252 EOF
4253 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4254   egrep "dvd_struct" >/dev/null 2>&1; then
4255   rm -rf conftest*
4256   
4257     cat >> confdefs.h <<\EOF
4258 #define DVD_STRUCT_IN_SYS_CDIO_H 1
4259 EOF
4260
4261     cat > conftest.$ac_ext <<EOF
4262 #line 4263 "configure"
4263 #include "confdefs.h"
4264 #include <sys/cdio.h>
4265 EOF
4266 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4267   egrep "struct dvd_struct" >/dev/null 2>&1; then
4268   rm -rf conftest*
4269   
4270                     BSD_DVD_STRUCT=1
4271 else
4272   rm -rf conftest*
4273   LINUX_DVD_STRUCT=1; OPENBSD_DVD_STRUCT=1
4274 fi
4275 rm -f conftest*
4276
4277   
4278 fi
4279 rm -f conftest*
4280
4281         cat > conftest.$ac_ext <<EOF
4282 #line 4283 "configure"
4283 #include "confdefs.h"
4284 #include <sys/dvdio.h>
4285 EOF
4286 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4287   egrep "dvd_struct" >/dev/null 2>&1; then
4288   rm -rf conftest*
4289   
4290     cat >> confdefs.h <<\EOF
4291 #define DVD_STRUCT_IN_SYS_DVDIO_H 1
4292 EOF
4293
4294     cat > conftest.$ac_ext <<EOF
4295 #line 4296 "configure"
4296 #include "confdefs.h"
4297 #include <sys/dvdio.h>
4298 EOF
4299 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4300   egrep "struct dvd_struct" >/dev/null 2>&1; then
4301   rm -rf conftest*
4302   
4303                     BSD_DVD_STRUCT=1
4304 else
4305   rm -rf conftest*
4306   LINUX_DVD_STRUCT=1
4307 fi
4308 rm -f conftest*
4309
4310   
4311 fi
4312 rm -f conftest*
4313
4314         cat > conftest.$ac_ext <<EOF
4315 #line 4316 "configure"
4316 #include "confdefs.h"
4317 #include <linux/cdrom.h>
4318 EOF
4319 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4320   egrep "dvd_struct" >/dev/null 2>&1; then
4321   rm -rf conftest*
4322   
4323     cat >> confdefs.h <<\EOF
4324 #define DVD_STRUCT_IN_LINUX_CDROM_H 1
4325 EOF
4326
4327     LINUX_DVD_STRUCT=1
4328   
4329 fi
4330 rm -f conftest*
4331
4332         NEED_BSDI_LIBDVD=0
4333   cat > conftest.$ac_ext <<EOF
4334 #line 4335 "configure"
4335 #include "confdefs.h"
4336 #include <dvd.h>
4337 EOF
4338 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4339   egrep "dvd_struct" >/dev/null 2>&1; then
4340   rm -rf conftest*
4341   
4342     cat >> confdefs.h <<\EOF
4343 #define DVD_STRUCT_IN_DVD_H 1
4344 EOF
4345
4346     LIB_LIBDVDCSS="${LIB_LIBDVDCSS} -ldvd"
4347     LINUX_DVD_STRUCT=1
4348   
4349 else
4350   rm -rf conftest*
4351   
4352                 for ac_hdr in /sys/dev/scsi/scsi_ioctl.h
4353 do
4354 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4355 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4356 echo "configure:4357: checking for $ac_hdr" >&5
4357 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4358   echo $ac_n "(cached) $ac_c" 1>&6
4359 else
4360   cat > conftest.$ac_ext <<EOF
4361 #line 4362 "configure"
4362 #include "confdefs.h"
4363 #include <$ac_hdr>
4364 EOF
4365 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4366 { (eval echo configure:4367: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4367 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4368 if test -z "$ac_err"; then
4369   rm -rf conftest*
4370   eval "ac_cv_header_$ac_safe=yes"
4371 else
4372   echo "$ac_err" >&5
4373   echo "configure: failed program was:" >&5
4374   cat conftest.$ac_ext >&5
4375   rm -rf conftest*
4376   eval "ac_cv_header_$ac_safe=no"
4377 fi
4378 rm -f conftest*
4379 fi
4380 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4381   echo "$ac_t""yes" 1>&6
4382     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4383   cat >> confdefs.h <<EOF
4384 #define $ac_tr_hdr 1
4385 EOF
4386  
4387       NEED_BSDI_LIBDVD=1
4388       cat >> confdefs.h <<\EOF
4389 #define DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H 1
4390 EOF
4391
4392       OBJ_LIBDVDCSS="${OBJ_LIBDVDCSS} bsdi_dvdioctl.o"
4393       LINUX_DVD_STRUCT=1
4394     
4395 else
4396   echo "$ac_t""no" 1>&6
4397 fi
4398 done
4399
4400   
4401 fi
4402 rm -f conftest*
4403
4404         ac_safe=`echo "sys/scsi/scsi_types.h" | sed 'y%./+-%__p_%'`
4405 echo $ac_n "checking for sys/scsi/scsi_types.h""... $ac_c" 1>&6
4406 echo "configure:4407: checking for sys/scsi/scsi_types.h" >&5
4407 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4408   echo $ac_n "(cached) $ac_c" 1>&6
4409 else
4410   cat > conftest.$ac_ext <<EOF
4411 #line 4412 "configure"
4412 #include "confdefs.h"
4413 #include <sys/scsi/scsi_types.h>
4414 EOF
4415 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4416 { (eval echo configure:4417: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4417 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4418 if test -z "$ac_err"; then
4419   rm -rf conftest*
4420   eval "ac_cv_header_$ac_safe=yes"
4421 else
4422   echo "$ac_err" >&5
4423   echo "configure: failed program was:" >&5
4424   cat conftest.$ac_ext >&5
4425   rm -rf conftest*
4426   eval "ac_cv_header_$ac_safe=no"
4427 fi
4428 rm -f conftest*
4429 fi
4430 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4431   echo "$ac_t""yes" 1>&6
4432   
4433     ac_safe=`echo "sys/scsi/impl/uscsi.h" | sed 'y%./+-%__p_%'`
4434 echo $ac_n "checking for sys/scsi/impl/uscsi.h""... $ac_c" 1>&6
4435 echo "configure:4436: checking for sys/scsi/impl/uscsi.h" >&5
4436 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4437   echo $ac_n "(cached) $ac_c" 1>&6
4438 else
4439   cat > conftest.$ac_ext <<EOF
4440 #line 4441 "configure"
4441 #include "confdefs.h"
4442 #include <sys/scsi/impl/uscsi.h>
4443 EOF
4444 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4445 { (eval echo configure:4446: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4446 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4447 if test -z "$ac_err"; then
4448   rm -rf conftest*
4449   eval "ac_cv_header_$ac_safe=yes"
4450 else
4451   echo "$ac_err" >&5
4452   echo "configure: failed program was:" >&5
4453   cat conftest.$ac_ext >&5
4454   rm -rf conftest*
4455   eval "ac_cv_header_$ac_safe=no"
4456 fi
4457 rm -f conftest*
4458 fi
4459 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4460   echo "$ac_t""yes" 1>&6
4461   
4462       cat >> confdefs.h <<\EOF
4463 #define SOLARIS_USCSI 1
4464 EOF
4465
4466     
4467 else
4468   echo "$ac_t""no" 1>&6
4469 fi
4470
4471   
4472 else
4473   echo "$ac_t""no" 1>&6
4474 fi
4475
4476         if test x$LINUX_DVD_STRUCT = x1; then
4477     cat >> confdefs.h <<\EOF
4478 #define HAVE_LINUX_DVD_STRUCT 1
4479 EOF
4480
4481     if test x$OPENBSD_DVD_STRUCT = x1; then
4482       cat >> confdefs.h <<\EOF
4483 #define HAVE_OPENBSD_DVD_STRUCT 1
4484 EOF
4485
4486     fi
4487   else
4488     if test x$BSD_DVD_STRUCT = x1; then
4489       cat >> confdefs.h <<\EOF
4490 #define HAVE_BSD_DVD_STRUCT 1
4491 EOF
4492
4493     fi
4494   fi
4495
4496 else
4497   echo "$ac_t""no" 1>&6
4498 fi
4499 done
4500
4501
4502 # Check whether --with-tuning or --without-tuning was given.
4503 if test "${with_tuning+set}" = set; then
4504   withval="$with_tuning"
4505   :
4506 fi
4507
4508 if test "x$withval" != "x"; then
4509     TUNING=$withval
4510 else
4511     if test x${target_cpu} = xi686 -o x${target_cpu} = xi586 -o x${target_cpu} = xi486 -o x${target_cpu} = xi386; then TUNING="pentiumpro"
4512     else
4513         if test x${target_cpu} = xpowerpc; then TUNING="750"; fi
4514     fi
4515 fi
4516
4517 # Check whether --enable-release or --disable-release was given.
4518 if test "${enable_release+set}" = set; then
4519   enableval="$enable_release"
4520    if test x$enableval = xyes; then RELEASE=1; fi 
4521 else
4522    VLC_VERSION="${VLC_VERSION}_`date +%Y-%m-%d`";
4523   LIBDVDCSS_VERSION="${LIBDVDCSS_VERSION}_`date +%Y-%m-%d`"; 
4524 fi
4525
4526
4527 # Check whether --enable-mmx or --disable-mmx was given.
4528 if test "${enable_mmx+set}" = set; then
4529   enableval="$enable_mmx"
4530    if test x$enableval = xyes; then ARCH="${ARCH} mmx";
4531     BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi 
4532 else
4533    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";
4534     BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi 
4535 fi
4536
4537
4538 # Check whether --enable-altivec or --disable-altivec was given.
4539 if test "${enable_altivec+set}" = set; then
4540   enableval="$enable_altivec"
4541    if test x$enableval = xyes; then ARCH="${ARCH} altivec";
4542     BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi 
4543 else
4544    if test x${target_cpu} = xpowerpc; then ARCH="${ARCH} altivec";
4545     BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi 
4546 fi
4547
4548
4549 DEBUG=0
4550 # Check whether --enable-debug or --disable-debug was given.
4551 if test "${enable_debug+set}" = set; then
4552   enableval="$enable_debug"
4553    if test x$enableval = xyes; then DEBUG=1; fi 
4554 fi
4555
4556
4557 TRACE=0
4558 # Check whether --enable-trace or --disable-trace was given.
4559 if test "${enable_trace+set}" = set; then
4560   enableval="$enable_trace"
4561    if test x$enableval = xyes; then TRACE=1; fi 
4562 fi
4563
4564
4565 GPROF=0
4566 # Check whether --enable-gprof or --disable-gprof was given.
4567 if test "${enable_gprof+set}" = set; then
4568   enableval="$enable_gprof"
4569    if test x$enableval = xyes; then GPROF=1; fi 
4570 fi
4571
4572
4573 CPROF=0
4574 # Check whether --enable-cprof or --disable-cprof was given.
4575 if test "${enable_cprof+set}" = set; then
4576   enableval="$enable_cprof"
4577    if test x$enableval = xyes;
4578   then
4579     LIB="${LIB} -lcprof"
4580     CPROF=1
4581   fi
4582
4583 fi
4584
4585
4586 # Check whether --enable-optimizations or --disable-optimizations was given.
4587 if test "${enable_optimizations+set}" = set; then
4588   enableval="$enable_optimizations"
4589    if test x$enableval = xno; then OPTIMS=0; fi 
4590 else
4591    OPTIMS=1 
4592 fi
4593
4594
4595 # Check whether --enable-pth or --disable-pth was given.
4596 if test "${enable_pth+set}" = set; then
4597   enableval="$enable_pth"
4598    if test x$enableval = xyes; then
4599     echo $ac_n "checking for pth_init in -lpth""... $ac_c" 1>&6
4600 echo "configure:4601: checking for pth_init in -lpth" >&5
4601 ac_lib_var=`echo pth'_'pth_init | sed 'y%./+-%__p_%'`
4602 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4603   echo $ac_n "(cached) $ac_c" 1>&6
4604 else
4605   ac_save_LIBS="$LIBS"
4606 LIBS="-lpth  $LIBS"
4607 cat > conftest.$ac_ext <<EOF
4608 #line 4609 "configure"
4609 #include "confdefs.h"
4610 /* Override any gcc2 internal prototype to avoid an error.  */
4611 /* We use char because int might match the return type of a gcc2
4612     builtin and then its argument prototype would still apply.  */
4613 char pth_init();
4614
4615 int main() {
4616 pth_init()
4617 ; return 0; }
4618 EOF
4619 if { (eval echo configure:4620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4620   rm -rf conftest*
4621   eval "ac_cv_lib_$ac_lib_var=yes"
4622 else
4623   echo "configure: failed program was:" >&5
4624   cat conftest.$ac_ext >&5
4625   rm -rf conftest*
4626   eval "ac_cv_lib_$ac_lib_var=no"
4627 fi
4628 rm -f conftest*
4629 LIBS="$ac_save_LIBS"
4630
4631 fi
4632 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4633   echo "$ac_t""yes" 1>&6
4634     ac_tr_lib=HAVE_LIB`echo pth | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4635     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4636   cat >> confdefs.h <<EOF
4637 #define $ac_tr_lib 1
4638 EOF
4639
4640   LIBS="-lpth $LIBS"
4641
4642 else
4643   echo "$ac_t""no" 1>&6
4644 fi
4645
4646     cat > conftest.$ac_ext <<EOF
4647 #line 4648 "configure"
4648 #include "confdefs.h"
4649 #include <pth.h>
4650 EOF
4651 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4652   egrep "pth_init" >/dev/null 2>&1; then
4653   rm -rf conftest*
4654   
4655       cat >> confdefs.h <<\EOF
4656 #define PTH_INIT_IN_PTH_H 1
4657 EOF
4658
4659     THREAD_LIB="-lpth"
4660     fi
4661 fi
4662 rm -f conftest*
4663
4664
4665 fi
4666
4667
4668 LIB="${LIB} ${THREAD_LIB}"
4669
4670 NEED_LIBDVDCSS=0
4671 STATIC_LIBDVDCSS=0
4672 DUMMY_LIBDVDCSS=0
4673 # Check whether --with-dvdcss or --without-dvdcss was given.
4674 if test "${with_dvdcss+set}" = set; then
4675   withval="$with_dvdcss"
4676    case "x${withval}" in
4677     xlocal-static|xyes)
4678       # local libdvdcss, statically linked
4679       if test x${CAN_BUILD_LIBDVDCSS} = x1
4680       then
4681         NEED_LIBDVDCSS=1
4682         STATIC_LIBDVDCSS=1
4683         BUILTINS="${BUILTINS} dvd"
4684         CFLAGS_DVD="${CFLAGS_DVD} -I../../extras/libdvdcss"
4685         LIB_DVD="${LIB_DVD} lib/libdvdcss.a ${LIB_LIBDVDCSS}"
4686         LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} ../../lib/libdvdcss.a ${LIB_LIBDVDCSS}"
4687       fi
4688     ;;
4689     xlocal-shared)
4690       # local libdvdcss, dynamically linked
4691       if test x${CAN_BUILD_LIBDVDCSS} = x1
4692       then
4693         NEED_LIBDVDCSS=1
4694         BUILTINS="${BUILTINS} dvd"
4695         CFLAGS_DVD="${CFLAGS_DVD} -I../../extras/libdvdcss"
4696         LIB_DVD="${LIB_DVD} -Llib -ldvdcss"
4697         LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} -L../../lib -ldvdcss"
4698       fi
4699     ;;
4700     xno)
4701       # don't use libdvdcss at all, build a DVD module that can dlopen() it
4702       DUMMY_LIBDVDCSS=1
4703       BUILTINS="${BUILTINS} dvd"
4704       OBJ_DVD="${OBJ_DVD} dummy_dvdcss.o"
4705       CFLAGS_DVD="${CFLAGS_DVD} -DGOD_DAMN_DMCA"
4706       CFLAGS_DVD="${CFLAGS_DVD} -DLIBDVDCSS_VERSION=\"${LIBDVDCSS_VERSION}\""
4707       LIB_DVD="${LIB_DVD} -ldl"
4708       LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} -ldl"
4709     ;;
4710     *)
4711       # existing libdvdcss
4712       BUILTINS="${BUILTINS} dvd"
4713       if test "x$withval" != "xyes"
4714       then
4715         LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} -L"$withval"/lib"
4716         CFLAGS_DVD="${CFLAGS_DVD} -I"$withval"/include"
4717       fi
4718       LIB_DVD="${LIB_DVD} -ldvdcss"
4719       LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} -ldvdcss"
4720     esac 
4721 else
4722   # user didn't decide, we choose to use local libdvdcss and link statically
4723   # if libdvdcss is in the archive, or to use the dummy replacement otherwise.
4724    if test x${CAN_BUILD_LIBDVDCSS} = x1
4725     then
4726       NEED_LIBDVDCSS=1
4727       STATIC_LIBDVDCSS=1
4728       BUILTINS="${BUILTINS} dvd"
4729       CFLAGS_DVD="${CFLAGS_DVD} -I../../extras/libdvdcss"
4730       LIB_DVD="${LIB_DVD} lib/libdvdcss.a ${LIB_LIBDVDCSS}"
4731       LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} ../../lib/libdvdcss.a ${LIB_LIBDVDCSS}"
4732     else
4733       # XXX: no check for libdl is done, don't try this at home !
4734       DUMMY_LIBDVDCSS=1
4735       BUILTINS="${BUILTINS} dvd"
4736       OBJ_DVD="${OBJ_DVD} dummy_dvdcss.o"
4737       CFLAGS_DVD="${CFLAGS_DVD} -DGOD_DAMN_DMCA"
4738       LIB_DVD="${LIB_DVD} -ldl"
4739       LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} -ldl"
4740     fi 
4741 fi
4742
4743
4744 # Check whether --enable-vcd or --disable-vcd was given.
4745 if test "${enable_vcd+set}" = set; then
4746   enableval="$enable_vcd"
4747   :
4748 fi
4749
4750
4751 if test x$enable_vcd != xno
4752 then
4753   cat > conftest.$ac_ext <<EOF
4754 #line 4755 "configure"
4755 #include "confdefs.h"
4756 #include <linux/cdrom.h>
4757 EOF
4758 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4759   egrep "cdrom_msf0" >/dev/null 2>&1; then
4760   rm -rf conftest*
4761   
4762     BUILTINS="${BUILTINS} vcd"
4763   
4764 fi
4765 rm -f conftest*
4766
4767 fi
4768
4769 if test x$enable_vcd != xno -a "${SYS}" = "bsdi"
4770 then
4771   BUILTINS="${BUILTINS} vcd"
4772 fi
4773
4774 # Check whether --enable-dummy or --disable-dummy was given.
4775 if test "${enable_dummy+set}" = set; then
4776   enableval="$enable_dummy"
4777   :
4778 fi
4779
4780
4781 if test x$enable_dummy != xno
4782 then
4783   BUILTINS="${BUILTINS} dummy"
4784 fi
4785
4786 # Check whether --enable-null or --disable-null was given.
4787 if test "${enable_null+set}" = set; then
4788   enableval="$enable_null"
4789   :
4790 fi
4791
4792
4793 if test x$enable_null != xno
4794 then
4795   BUILTINS="${BUILTINS} null"
4796 fi
4797
4798 # Check whether --enable-rc or --disable-rc was given.
4799 if test "${enable_rc+set}" = set; then
4800   enableval="$enable_rc"
4801   :
4802 fi
4803
4804
4805 if test x$enable_rc != xno
4806 then
4807   BUILTINS="${BUILTINS} rc"
4808 fi
4809
4810 if test x$SYS = xbeos
4811 then
4812     BUILTINS="${BUILTINS} beos"
4813     LIB_BEOS="-lbe -lgame -lroot -ltracker"
4814     PLCFLAGS="${PLCFLAGS} -nostart"
4815
4816 else
4817
4818 # Check whether --enable-dsp or --disable-dsp was given.
4819 if test "${enable_dsp+set}" = set; then
4820   enableval="$enable_dsp"
4821   :
4822 fi
4823
4824
4825 if test x$enable_dsp != xno &&
4826   (test $SYS != mingw32 || test x$enable_dsp = xyes)
4827 then
4828   if test -c /dev/dsp
4829   then
4830     PLUGINS="${PLUGINS} dsp"
4831   fi
4832 fi
4833
4834 # Check whether --enable-esd or --disable-esd was given.
4835 if test "${enable_esd+set}" = set; then
4836   enableval="$enable_esd"
4837   if test x$enable_esd = xyes
4838    then
4839      # Extract the first word of "esd-config", so it can be a program name with args.
4840 set dummy esd-config; ac_word=$2
4841 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4842 echo "configure:4843: checking for $ac_word" >&5
4843 if eval "test \"`echo '$''{'ac_cv_path_ESD_CONFIG'+set}'`\" = set"; then
4844   echo $ac_n "(cached) $ac_c" 1>&6
4845 else
4846   case "$ESD_CONFIG" in
4847   /*)
4848   ac_cv_path_ESD_CONFIG="$ESD_CONFIG" # Let the user override the test with a path.
4849   ;;
4850   ?:/*)                  
4851   ac_cv_path_ESD_CONFIG="$ESD_CONFIG" # Let the user override the test with a dos path.
4852   ;;
4853   *)
4854   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4855   ac_dummy="$PATH"
4856   for ac_dir in $ac_dummy; do 
4857     test -z "$ac_dir" && ac_dir=.
4858     if test -f $ac_dir/$ac_word; then
4859       ac_cv_path_ESD_CONFIG="$ac_dir/$ac_word"
4860       break
4861     fi
4862   done
4863   IFS="$ac_save_ifs"
4864   test -z "$ac_cv_path_ESD_CONFIG" && ac_cv_path_ESD_CONFIG="no"
4865   ;;
4866 esac
4867 fi
4868 ESD_CONFIG="$ac_cv_path_ESD_CONFIG"
4869 if test -n "$ESD_CONFIG"; then
4870   echo "$ac_t""$ESD_CONFIG" 1>&6
4871 else
4872   echo "$ac_t""no" 1>&6
4873 fi
4874
4875      if test x${ESD_CONFIG} != xno
4876      then
4877        PLUGINS="${PLUGINS} esd"
4878        CFLAGS_ESD="`${ESD_CONFIG} --cflags`"
4879        LIB_ESD="`${ESD_CONFIG} --libs`"
4880      fi
4881    fi
4882 fi
4883
4884
4885 # Check whether --enable-arts or --disable-arts was given.
4886 if test "${enable_arts+set}" = set; then
4887   enableval="$enable_arts"
4888   if test x$enable_arts = xyes
4889    then
4890      # Extract the first word of "artsc-config", so it can be a program name with args.
4891 set dummy artsc-config; ac_word=$2
4892 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4893 echo "configure:4894: checking for $ac_word" >&5
4894 if eval "test \"`echo '$''{'ac_cv_path_ARTS_CONFIG'+set}'`\" = set"; then
4895   echo $ac_n "(cached) $ac_c" 1>&6
4896 else
4897   case "$ARTS_CONFIG" in
4898   /*)
4899   ac_cv_path_ARTS_CONFIG="$ARTS_CONFIG" # Let the user override the test with a path.
4900   ;;
4901   ?:/*)                  
4902   ac_cv_path_ARTS_CONFIG="$ARTS_CONFIG" # Let the user override the test with a dos path.
4903   ;;
4904   *)
4905   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4906   ac_dummy="$PATH"
4907   for ac_dir in $ac_dummy; do 
4908     test -z "$ac_dir" && ac_dir=.
4909     if test -f $ac_dir/$ac_word; then
4910       ac_cv_path_ARTS_CONFIG="$ac_dir/$ac_word"
4911       break
4912     fi
4913   done
4914   IFS="$ac_save_ifs"
4915   test -z "$ac_cv_path_ARTS_CONFIG" && ac_cv_path_ARTS_CONFIG="no"
4916   ;;
4917 esac
4918 fi
4919 ARTS_CONFIG="$ac_cv_path_ARTS_CONFIG"
4920 if test -n "$ARTS_CONFIG"; then
4921   echo "$ac_t""$ARTS_CONFIG" 1>&6
4922 else
4923   echo "$ac_t""no" 1>&6
4924 fi
4925
4926      if test x${ARTS_CONFIG} != xno
4927      then
4928        PLUGINS="${PLUGINS} arts"
4929        CFLAGS_ARTS="`${ARTS_CONFIG} --cflags`"
4930        LIB_ARTS="`${ARTS_CONFIG} --libs `"
4931      fi
4932    fi
4933 fi
4934
4935
4936 # Check whether --enable-darwin or --disable-darwin was given.
4937 if test "${enable_darwin+set}" = set; then
4938   enableval="$enable_darwin"
4939   if test x$enable_darwin = xyes; then
4940      PLUGINS="${PLUGINS} darwin"
4941      LIB_DARWIN="-framework CoreAudio"
4942    fi
4943 fi
4944
4945
4946 # Check whether --enable-macosx or --disable-macosx was given.
4947 if test "${enable_macosx+set}" = set; then
4948   enableval="$enable_macosx"
4949   if test x$enable_macosx = xyes
4950    then
4951      BUILTINS="${BUILTINS} macosx"
4952      LIB_MACOSX="-framework CoreAudio -framework Cocoa -framework AGL -framework QuickTime"
4953      LIB="${LIB} -ObjC"
4954    fi
4955 else
4956   for ac_hdr in Cocoa/Cocoa.h
4957 do
4958 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4959 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4960 echo "configure:4961: checking for $ac_hdr" >&5
4961 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4962   echo $ac_n "(cached) $ac_c" 1>&6
4963 else
4964   cat > conftest.$ac_ext <<EOF
4965 #line 4966 "configure"
4966 #include "confdefs.h"
4967 #include <$ac_hdr>
4968 EOF
4969 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4970 { (eval echo configure:4971: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4971 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4972 if test -z "$ac_err"; then
4973   rm -rf conftest*
4974   eval "ac_cv_header_$ac_safe=yes"
4975 else
4976   echo "$ac_err" >&5
4977   echo "configure: failed program was:" >&5
4978   cat conftest.$ac_ext >&5
4979   rm -rf conftest*
4980   eval "ac_cv_header_$ac_safe=no"
4981 fi
4982 rm -f conftest*
4983 fi
4984 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4985   echo "$ac_t""yes" 1>&6
4986     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4987   cat >> confdefs.h <<EOF
4988 #define $ac_tr_hdr 1
4989 EOF
4990  BUILTINS="${BUILTINS} macosx"
4991      LIB_MACOSX="-framework CoreAudio -framework Cocoa -framework AGL -framework QuickTime"
4992      LIB="${LIB} -ObjC"
4993    
4994 else
4995   echo "$ac_t""no" 1>&6
4996 fi
4997 done
4998
4999 fi
5000
5001
5002 # Check whether --enable-qnx or --disable-qnx was given.
5003 if test "${enable_qnx+set}" = set; then
5004   enableval="$enable_qnx"
5005   :
5006 fi
5007
5008     if test x$enable_qnx != xno
5009     then
5010       for ac_hdr in Ph.h
5011 do
5012 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5013 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5014 echo "configure:5015: checking for $ac_hdr" >&5
5015 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5016   echo $ac_n "(cached) $ac_c" 1>&6
5017 else
5018   cat > conftest.$ac_ext <<EOF
5019 #line 5020 "configure"
5020 #include "confdefs.h"
5021 #include <$ac_hdr>
5022 EOF
5023 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5024 { (eval echo configure:5025: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5025 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5026 if test -z "$ac_err"; then
5027   rm -rf conftest*
5028   eval "ac_cv_header_$ac_safe=yes"
5029 else
5030   echo "$ac_err" >&5
5031   echo "configure: failed program was:" >&5
5032   cat conftest.$ac_ext >&5
5033   rm -rf conftest*
5034   eval "ac_cv_header_$ac_safe=no"
5035 fi
5036 rm -f conftest*
5037 fi
5038 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5039   echo "$ac_t""yes" 1>&6
5040     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5041   cat >> confdefs.h <<EOF
5042 #define $ac_tr_hdr 1
5043 EOF
5044  
5045         PLUGINS="${PLUGINS} qnx"
5046         LIB_QNX="-lasound -lph"
5047       
5048 else
5049   echo "$ac_t""no" 1>&6
5050 fi
5051 done
5052
5053     fi
5054
5055 # Check whether --enable-fb or --disable-fb was given.
5056 if test "${enable_fb+set}" = set; then
5057   enableval="$enable_fb"
5058    if test x$enable_fb = xyes
5059     then
5060       PLUGINS="${PLUGINS} fb"
5061     fi 
5062 fi
5063
5064
5065 # Check whether --with-ggi or --without-ggi was given.
5066 if test "${with_ggi+set}" = set; then
5067   withval="$with_ggi"
5068    if test "x$withval" != "xno"
5069     then
5070       PLUGINS="${PLUGINS} ggi"
5071       if test "x$withval" != "xyes"
5072       then
5073         LIB_GGI="-l"$withval
5074       else
5075         LIB_GGI="-lggi"
5076       fi
5077     fi 
5078 fi
5079
5080
5081 # Check whether --enable-sdl or --disable-sdl was given.
5082 if test "${enable_sdl+set}" = set; then
5083   enableval="$enable_sdl"
5084   :
5085 fi
5086
5087 if test "x$enable_sdl" != "xno"
5088 then
5089   SDL_PATH=$PATH
5090   # Check whether --with-sdl-config-path or --without-sdl-config-path was given.
5091 if test "${with_sdl_config_path+set}" = set; then
5092   withval="$with_sdl_config_path"
5093    if test "x$withval" != "xno"
5094       then
5095         SDL_PATH=$withval:$PATH
5096       fi 
5097 fi
5098
5099   # Extract the first word of "sdl12-config", so it can be a program name with args.
5100 set dummy sdl12-config; ac_word=$2
5101 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5102 echo "configure:5103: checking for $ac_word" >&5
5103 if eval "test \"`echo '$''{'ac_cv_path_SDL12_CONFIG'+set}'`\" = set"; then
5104   echo $ac_n "(cached) $ac_c" 1>&6
5105 else
5106   case "$SDL12_CONFIG" in
5107   /*)
5108   ac_cv_path_SDL12_CONFIG="$SDL12_CONFIG" # Let the user override the test with a path.
5109   ;;
5110   ?:/*)                  
5111   ac_cv_path_SDL12_CONFIG="$SDL12_CONFIG" # Let the user override the test with a dos path.
5112   ;;
5113   *)
5114   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5115   ac_dummy="$SDL_PATH"
5116   for ac_dir in $ac_dummy; do 
5117     test -z "$ac_dir" && ac_dir=.
5118     if test -f $ac_dir/$ac_word; then
5119       ac_cv_path_SDL12_CONFIG="$ac_dir/$ac_word"
5120       break
5121     fi
5122   done
5123   IFS="$ac_save_ifs"
5124   test -z "$ac_cv_path_SDL12_CONFIG" && ac_cv_path_SDL12_CONFIG="no"
5125   ;;
5126 esac
5127 fi
5128 SDL12_CONFIG="$ac_cv_path_SDL12_CONFIG"
5129 if test -n "$SDL12_CONFIG"; then
5130   echo "$ac_t""$SDL12_CONFIG" 1>&6
5131 else
5132   echo "$ac_t""no" 1>&6
5133 fi
5134
5135   SDL_CONFIG=${SDL12_CONFIG}
5136   SDL_HEADER="SDL12/SDL.h"
5137   if test x${SDL_CONFIG} = xno
5138   then
5139     # Extract the first word of "sdl11-config", so it can be a program name with args.
5140 set dummy sdl11-config; ac_word=$2
5141 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5142 echo "configure:5143: checking for $ac_word" >&5
5143 if eval "test \"`echo '$''{'ac_cv_path_SDL11_CONFIG'+set}'`\" = set"; then
5144   echo $ac_n "(cached) $ac_c" 1>&6
5145 else
5146   case "$SDL11_CONFIG" in
5147   /*)
5148   ac_cv_path_SDL11_CONFIG="$SDL11_CONFIG" # Let the user override the test with a path.
5149   ;;
5150   ?:/*)                  
5151   ac_cv_path_SDL11_CONFIG="$SDL11_CONFIG" # Let the user override the test with a dos path.
5152   ;;
5153   *)
5154   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5155   ac_dummy="$SDL_PATH"
5156   for ac_dir in $ac_dummy; do 
5157     test -z "$ac_dir" && ac_dir=.
5158     if test -f $ac_dir/$ac_word; then
5159       ac_cv_path_SDL11_CONFIG="$ac_dir/$ac_word"
5160       break
5161     fi
5162   done
5163   IFS="$ac_save_ifs"
5164   test -z "$ac_cv_path_SDL11_CONFIG" && ac_cv_path_SDL11_CONFIG="no"
5165   ;;
5166 esac
5167 fi
5168 SDL11_CONFIG="$ac_cv_path_SDL11_CONFIG"
5169 if test -n "$SDL11_CONFIG"; then
5170   echo "$ac_t""$SDL11_CONFIG" 1>&6
5171 else
5172   echo "$ac_t""no" 1>&6
5173 fi
5174
5175     SDL_CONFIG=${SDL11_CONFIG}
5176     SDL_HEADER="SDL11/SDL.h"
5177   fi
5178   if test x${SDL_CONFIG} = xno
5179   then
5180     # Extract the first word of "sdl-config", so it can be a program name with args.
5181 set dummy sdl-config; ac_word=$2
5182 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5183 echo "configure:5184: checking for $ac_word" >&5
5184 if eval "test \"`echo '$''{'ac_cv_path_SDL_CONFIG'+set}'`\" = set"; then
5185   echo $ac_n "(cached) $ac_c" 1>&6
5186 else
5187   case "$SDL_CONFIG" in
5188   /*)
5189   ac_cv_path_SDL_CONFIG="$SDL_CONFIG" # Let the user override the test with a path.
5190   ;;
5191   ?:/*)                  
5192   ac_cv_path_SDL_CONFIG="$SDL_CONFIG" # Let the user override the test with a dos path.
5193   ;;
5194   *)
5195   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5196   ac_dummy="$SDL_PATH"
5197   for ac_dir in $ac_dummy; do 
5198     test -z "$ac_dir" && ac_dir=.
5199     if test -f $ac_dir/$ac_word; then
5200       ac_cv_path_SDL_CONFIG="$ac_dir/$ac_word"
5201       break
5202     fi
5203   done
5204   IFS="$ac_save_ifs"
5205   test -z "$ac_cv_path_SDL_CONFIG" && ac_cv_path_SDL_CONFIG="no"
5206   ;;
5207 esac
5208 fi
5209 SDL_CONFIG="$ac_cv_path_SDL_CONFIG"
5210 if test -n "$SDL_CONFIG"; then
5211   echo "$ac_t""$SDL_CONFIG" 1>&6
5212 else
5213   echo "$ac_t""no" 1>&6
5214 fi
5215
5216     SDL_HEADER="SDL/SDL.h"
5217   fi
5218   if test x${SDL_CONFIG} != xno
5219   then
5220     PLUGINS="${PLUGINS} sdl"
5221     CFLAGS_SDL="`${SDL_CONFIG} --cflags`"
5222     LIB_SDL="`${SDL_CONFIG} --libs | sed 's,-rdynamic,,'`"
5223     save_CPPFLAGS=$CPPFLAGS
5224     CPPFLAGS="$CPPFLAGS $CFLAGS_SDL"
5225     for ac_hdr in ${SDL_HEADER}
5226 do
5227 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5228 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5229 echo "configure:5230: checking for $ac_hdr" >&5
5230 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5231   echo $ac_n "(cached) $ac_c" 1>&6
5232 else
5233   cat > conftest.$ac_ext <<EOF
5234 #line 5235 "configure"
5235 #include "confdefs.h"
5236 #include <$ac_hdr>
5237 EOF
5238 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5239 { (eval echo configure:5240: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5240 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5241 if test -z "$ac_err"; then
5242   rm -rf conftest*
5243   eval "ac_cv_header_$ac_safe=yes"
5244 else
5245   echo "$ac_err" >&5
5246   echo "configure: failed program was:" >&5
5247   cat conftest.$ac_ext >&5
5248   rm -rf conftest*
5249   eval "ac_cv_header_$ac_safe=no"
5250 fi
5251 rm -f conftest*
5252 fi
5253 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5254   echo "$ac_t""yes" 1>&6
5255     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5256   cat >> confdefs.h <<EOF
5257 #define $ac_tr_hdr 1
5258 EOF
5259  cat >> confdefs.h <<EOF
5260 #define SDL_INCLUDE_FILE <${SDL_HEADER}>
5261 EOF
5262
5263 else
5264   echo "$ac_t""no" 1>&6
5265 { echo "configure: error: The development package for SDL is not installed. 
5266 Please install it and try again. Alternatively you can also configure with 
5267 --disable-sdl." 1>&2; exit 1; }
5268       
5269 fi
5270 done
5271
5272     CPPFLAGS=$save_CPPFLAGS
5273     if expr 1.1.5 \> `$SDL_CONFIG --version` >/dev/null
5274     then
5275       { echo "configure: error: The development package for SDL is not installed.
5276 Please install it and try again. Alternatively you can also configure with
5277 --disable-sdl." 1>&2; exit 1; }
5278     fi
5279   elif test "x$enable_sdl" =  "xyes"
5280   then
5281     { echo "configure: error: I couldn't find the SDL package. You can download libSDL
5282 from http://www.libsdl.org/, or configure with --disable-sdl. Have a nice day.
5283     " 1>&2; exit 1; }
5284   fi
5285 fi
5286
5287 # Check whether --enable-directx or --disable-directx was given.
5288 if test "${enable_directx+set}" = set; then
5289   enableval="$enable_directx"
5290    if test "x$enableval" != "xno"
5291     then
5292       PLUGINS="${PLUGINS} directx"
5293       if test "x$enableval" = "xyes"
5294       then
5295         # Check whether --with-directx or --without-directx was given.
5296 if test "${with_directx+set}" = set; then
5297   withval="$with_directx"
5298   :
5299 fi
5300
5301         if test "x$withval" = "x"
5302         then
5303           for ac_hdr in directx.h
5304 do
5305 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5306 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5307 echo "configure:5308: checking for $ac_hdr" >&5
5308 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5309   echo $ac_n "(cached) $ac_c" 1>&6
5310 else
5311   cat > conftest.$ac_ext <<EOF
5312 #line 5313 "configure"
5313 #include "confdefs.h"
5314 #include <$ac_hdr>
5315 EOF
5316 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5317 { (eval echo configure:5318: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5318 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5319 if test -z "$ac_err"; then
5320   rm -rf conftest*
5321   eval "ac_cv_header_$ac_safe=yes"
5322 else
5323   echo "$ac_err" >&5
5324   echo "configure: failed program was:" >&5
5325   cat conftest.$ac_ext >&5
5326   rm -rf conftest*
5327   eval "ac_cv_header_$ac_safe=no"
5328 fi
5329 rm -f conftest*
5330 fi
5331 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5332   echo "$ac_t""yes" 1>&6
5333     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5334   cat >> confdefs.h <<EOF
5335 #define $ac_tr_hdr 1
5336 EOF
5337  LIB_DIRECTX="-lgdi32 -ldxguid"
5338 else
5339   echo "$ac_t""no" 1>&6
5340 { echo "configure: error: Cannot find DirectX headers !" 1>&2; exit 1; }
5341 fi
5342 done
5343
5344         else
5345         LIB_DIRECTX="${LIB_DIRECTX} -L"$withval"/lib -lgdi32 -ldxguid"
5346         INCLUDE="${INCLUDE} -I"$withval"/include"
5347         fi
5348       else
5349         echo $ac_n "checking for directX headers in ${enableval}""... $ac_c" 1>&6
5350 echo "configure:5351: checking for directX headers in ${enableval}" >&5
5351         if test -f ${enableval}/include/directx.h
5352         then
5353           LIB_DIRECTX="-L${enableval}/lib -lgdi32 -ldxguid"
5354           INCLUDE="${INCLUDE} -I${enableval}/include"
5355           echo "$ac_t""yes" 1>&6
5356         else
5357           echo "$ac_t""no" 1>&6
5358           { echo "configure: error: Cannot find ${enableval}/include/directx.h!" 1>&2; exit 1; }
5359         fi
5360       fi
5361     fi 
5362 else
5363    if test $SYS = mingw32
5364     then
5365       for ac_hdr in directx.h
5366 do
5367 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5368 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5369 echo "configure:5370: checking for $ac_hdr" >&5
5370 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5371   echo $ac_n "(cached) $ac_c" 1>&6
5372 else
5373   cat > conftest.$ac_ext <<EOF
5374 #line 5375 "configure"
5375 #include "confdefs.h"
5376 #include <$ac_hdr>
5377 EOF
5378 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5379 { (eval echo configure:5380: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5380 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5381 if test -z "$ac_err"; then
5382   rm -rf conftest*
5383   eval "ac_cv_header_$ac_safe=yes"
5384 else
5385   echo "$ac_err" >&5
5386   echo "configure: failed program was:" >&5
5387   cat conftest.$ac_ext >&5
5388   rm -rf conftest*
5389   eval "ac_cv_header_$ac_safe=no"
5390 fi
5391 rm -f conftest*
5392 fi
5393 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5394   echo "$ac_t""yes" 1>&6
5395     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5396   cat >> confdefs.h <<EOF
5397 #define $ac_tr_hdr 1
5398 EOF
5399   PLUGINS="${PLUGINS} directx"
5400         LIB_DIRECTX="-lgdi32 -ldxguid" 
5401 else
5402   echo "$ac_t""no" 1>&6
5403 echo "Cannot find DirectX headers !" 
5404 fi
5405 done
5406
5407     fi 
5408 fi
5409
5410
5411 # Check whether --with-glide or --without-glide was given.
5412 if test "${with_glide+set}" = set; then
5413   withval="$with_glide"
5414    if test "x$withval" != "xno"
5415     then
5416       PLUGINS="${PLUGINS} glide"
5417       if test "x$withval" != "xyes"
5418       then
5419         LIB_GLIDE="-l"$withval" -lm"
5420       else
5421         LIB_GLIDE="-lglide2x -lm"
5422       fi
5423     fi 
5424 fi
5425
5426
5427 # Check whether --enable-ncurses or --disable-ncurses was given.
5428 if test "${enable_ncurses+set}" = set; then
5429   enableval="$enable_ncurses"
5430   if test x$enable_ncurses = xyes; then
5431      PLUGINS="${PLUGINS} ncurses"
5432      LIB_NCURSES="-lncurses"
5433    fi
5434 fi
5435
5436
5437 # Check whether --enable-qt or --disable-qt was given.
5438 if test "${enable_qt+set}" = set; then
5439   enableval="$enable_qt"
5440   if test x$enable_qt = xyes; then
5441      PLUGINS="${PLUGINS} qt"
5442      ALIASES="${ALIASES} qvlc"
5443      LIB_QT="-lqt -L${QTDIR}/lib"
5444      if test -x ${QTDIR}/bin/moc
5445      then
5446        MOC=${QTDIR}/bin/moc
5447      else
5448        MOC=moc
5449      fi
5450    fi
5451 fi
5452
5453
5454 # Check whether --enable-kde or --disable-kde was given.
5455 if test "${enable_kde+set}" = set; then
5456   enableval="$enable_kde"
5457   if test x$enable_kde = xyes; then
5458      PLUGINS="${PLUGINS} kde"
5459      ALIASES="${ALIASES} kvlc"
5460      LIB_KDE="-L${KDEDIR}/lib -lkfile"
5461      if test -x ${QTDIR}/bin/moc
5462      then
5463        MOC=${QTDIR}/bin/moc
5464      else
5465        MOC=moc
5466      fi
5467    fi
5468 fi
5469
5470
5471 # Check whether --enable-gnome or --disable-gnome was given.
5472 if test "${enable_gnome+set}" = set; then
5473   enableval="$enable_gnome"
5474   if test x$enable_gnome = xyes; then
5475     # look for gnome-config
5476     # Extract the first word of "gnome-config", so it can be a program name with args.
5477 set dummy gnome-config; ac_word=$2
5478 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5479 echo "configure:5480: checking for $ac_word" >&5
5480 if eval "test \"`echo '$''{'ac_cv_path_GNOME_CONFIG'+set}'`\" = set"; then
5481   echo $ac_n "(cached) $ac_c" 1>&6
5482 else
5483   case "$GNOME_CONFIG" in
5484   /*)
5485   ac_cv_path_GNOME_CONFIG="$GNOME_CONFIG" # Let the user override the test with a path.
5486   ;;
5487   ?:/*)                  
5488   ac_cv_path_GNOME_CONFIG="$GNOME_CONFIG" # Let the user override the test with a dos path.
5489   ;;
5490   *)
5491   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5492   ac_dummy="$PATH"
5493   for ac_dir in $ac_dummy; do 
5494     test -z "$ac_dir" && ac_dir=.
5495     if test -f $ac_dir/$ac_word; then
5496       ac_cv_path_GNOME_CONFIG="$ac_dir/$ac_word"
5497       break
5498     fi
5499   done
5500   IFS="$ac_save_ifs"
5501   test -z "$ac_cv_path_GNOME_CONFIG" && ac_cv_path_GNOME_CONFIG="no"
5502   ;;
5503 esac
5504 fi
5505 GNOME_CONFIG="$ac_cv_path_GNOME_CONFIG"
5506 if test -n "$GNOME_CONFIG"; then
5507   echo "$ac_t""$GNOME_CONFIG" 1>&6
5508 else
5509   echo "$ac_t""no" 1>&6
5510 fi
5511
5512     if test -x ${GNOME_CONFIG}
5513     then
5514        CFLAGS_GNOME="`${GNOME_CONFIG} --cflags gnomeui`"
5515        LIB_GNOME="`${GNOME_CONFIG} --libs gnomeui | sed 's,-rdynamic,,'`"
5516     fi
5517     # now look for the gnome.h header
5518     saved_CPPFLAGS=$CPPFLAGS
5519     CPPFLAGS="$CPPFLAGS $CFLAGS_GNOME"
5520     for ac_hdr in gnome.h
5521 do
5522 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5523 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5524 echo "configure:5525: checking for $ac_hdr" >&5
5525 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5526   echo $ac_n "(cached) $ac_c" 1>&6
5527 else
5528   cat > conftest.$ac_ext <<EOF
5529 #line 5530 "configure"
5530 #include "confdefs.h"
5531 #include <$ac_hdr>
5532 EOF
5533 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5534 { (eval echo configure:5535: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5535 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5536 if test -z "$ac_err"; then
5537   rm -rf conftest*
5538   eval "ac_cv_header_$ac_safe=yes"
5539 else
5540   echo "$ac_err" >&5
5541   echo "configure: failed program was:" >&5
5542   cat conftest.$ac_ext >&5
5543   rm -rf conftest*
5544   eval "ac_cv_header_$ac_safe=no"
5545 fi
5546 rm -f conftest*
5547 fi
5548 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5549   echo "$ac_t""yes" 1>&6
5550     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5551   cat >> confdefs.h <<EOF
5552 #define $ac_tr_hdr 1
5553 EOF
5554  
5555       PLUGINS="${PLUGINS} gnome"
5556       ALIASES="${ALIASES} gnome-vlc"
5557      
5558 else
5559   echo "$ac_t""no" 1>&6
5560 { echo "configure: error: Can't find gnome headers. Please install the gnome
5561 developement librairie or remove the --enable-gnome option" 1>&2; exit 1; }
5562      
5563 fi
5564 done
5565
5566   
5567     CPPFLAGS=$saved_CPPFLAGS
5568   fi
5569 fi
5570
5571
5572 # Check whether --enable-gtk or --disable-gtk was given.
5573 if test "${enable_gtk+set}" = set; then
5574   enableval="$enable_gtk"
5575   :
5576 fi
5577
5578 if test x$enable_gtk != xno
5579 then
5580   GTK_PATH=$PATH
5581   # Check whether --with-gtk-config-path or --without-gtk-config-path was given.
5582 if test "${with_gtk_config_path+set}" = set; then
5583   withval="$with_gtk_config_path"
5584    if test "x$withval" != "xno"
5585       then
5586         GTK_PATH=$withval:$PATH
5587       fi 
5588 fi
5589
5590   # look for gtk-config
5591   # Extract the first word of "gtk-config", so it can be a program name with args.
5592 set dummy gtk-config; ac_word=$2
5593 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5594 echo "configure:5595: checking for $ac_word" >&5
5595 if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then
5596   echo $ac_n "(cached) $ac_c" 1>&6
5597 else
5598   case "$GTK_CONFIG" in
5599   /*)
5600   ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a path.
5601   ;;
5602   ?:/*)                  
5603   ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a dos path.
5604   ;;
5605   *)
5606   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5607   ac_dummy="$GTK_PATH"
5608   for ac_dir in $ac_dummy; do 
5609     test -z "$ac_dir" && ac_dir=.
5610     if test -f $ac_dir/$ac_word; then
5611       ac_cv_path_GTK_CONFIG="$ac_dir/$ac_word"
5612       break
5613     fi
5614   done
5615   IFS="$ac_save_ifs"
5616   test -z "$ac_cv_path_GTK_CONFIG" && ac_cv_path_GTK_CONFIG="no"
5617   ;;
5618 esac
5619 fi
5620 GTK_CONFIG="$ac_cv_path_GTK_CONFIG"
5621 if test -n "$GTK_CONFIG"; then
5622   echo "$ac_t""$GTK_CONFIG" 1>&6
5623 else
5624   echo "$ac_t""no" 1>&6
5625 fi
5626
5627   if test -x ${GTK_CONFIG}
5628   then
5629     CFLAGS_GTK="`${GTK_CONFIG} --cflags gtk`"
5630     LIB_GTK="`${GTK_CONFIG} --libs gtk | sed 's,-rdynamic,,'`"
5631   fi
5632   # now look for the gtk.h header
5633   saved_CPPFLAGS=$CPPFLAGS
5634   CPPFLAGS="$CPPFLAGS $CFLAGS_GTK"
5635   for ac_hdr in gtk/gtk.h
5636 do
5637 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5638 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5639 echo "configure:5640: checking for $ac_hdr" >&5
5640 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5641   echo $ac_n "(cached) $ac_c" 1>&6
5642 else
5643   cat > conftest.$ac_ext <<EOF
5644 #line 5645 "configure"
5645 #include "confdefs.h"
5646 #include <$ac_hdr>
5647 EOF
5648 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5649 { (eval echo configure:5650: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5650 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5651 if test -z "$ac_err"; then
5652   rm -rf conftest*
5653   eval "ac_cv_header_$ac_safe=yes"
5654 else
5655   echo "$ac_err" >&5
5656   echo "configure: failed program was:" >&5
5657   cat conftest.$ac_ext >&5
5658   rm -rf conftest*
5659   eval "ac_cv_header_$ac_safe=no"
5660 fi
5661 rm -f conftest*
5662 fi
5663 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5664   echo "$ac_t""yes" 1>&6
5665     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5666   cat >> confdefs.h <<EOF
5667 #define $ac_tr_hdr 1
5668 EOF
5669  
5670     PLUGINS="${PLUGINS} gtk"
5671     ALIASES="${ALIASES} gvlc"
5672   
5673 else
5674   echo "$ac_t""no" 1>&6
5675 fi
5676 done
5677
5678   CPPFLAGS=$saved_CPPFLAGS
5679 fi
5680
5681 # Check whether --enable-x11 or --disable-x11 was given.
5682 if test "${enable_x11+set}" = set; then
5683   enableval="$enable_x11"
5684   :
5685 fi
5686
5687 if test x$enable_x11 != xno &&
5688   (test $SYS != mingw32 || test x$enable_x11 = xyes); then
5689   if test x$x_includes = xNONE; then
5690     x_includes=/usr/X11R6/include
5691   fi
5692   if test x$x_libraries = xNONE; then
5693     x_libraries=/usr/X11R6/lib
5694   fi
5695   saved_CPPFLAGS=$CPPFLAGS
5696   CPPFLAGS="$CPPFLAGS -I$x_includes"
5697   for ac_hdr in X11/Xlib.h
5698 do
5699 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5700 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5701 echo "configure:5702: checking for $ac_hdr" >&5
5702 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5703   echo $ac_n "(cached) $ac_c" 1>&6
5704 else
5705   cat > conftest.$ac_ext <<EOF
5706 #line 5707 "configure"
5707 #include "confdefs.h"
5708 #include <$ac_hdr>
5709 EOF
5710 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5711 { (eval echo configure:5712: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5712 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5713 if test -z "$ac_err"; then
5714   rm -rf conftest*
5715   eval "ac_cv_header_$ac_safe=yes"
5716 else
5717   echo "$ac_err" >&5
5718   echo "configure: failed program was:" >&5
5719   cat conftest.$ac_ext >&5
5720   rm -rf conftest*
5721   eval "ac_cv_header_$ac_safe=no"
5722 fi
5723 rm -f conftest*
5724 fi
5725 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5726   echo "$ac_t""yes" 1>&6
5727     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5728   cat >> confdefs.h <<EOF
5729 #define $ac_tr_hdr 1
5730 EOF
5731  
5732     PLUGINS="${PLUGINS} x11"
5733     LIB_X11="-L$x_libraries -lX11 -lXext"
5734     CFLAGS_X11="-I$x_includes"
5735   
5736   CPPFLAGS=$saved_CPPFLAGS
5737 else
5738   echo "$ac_t""no" 1>&6
5739 fi
5740 done
5741
5742 fi
5743
5744 # Check whether --enable-xvideo or --disable-xvideo was given.
5745 if test "${enable_xvideo+set}" = set; then
5746   enableval="$enable_xvideo"
5747   :
5748 fi
5749
5750 if test x$enable_xvideo != xno &&
5751   (test $SYS != mingw32 || test x$enable_xvideo = xyes); then
5752   if test x$x_includes = xNONE; then
5753     x_includes=/usr/X11R6/include
5754   fi
5755   if test x$x_libraries = xNONE; then
5756     x_libraries=/usr/X11R6/lib
5757   fi
5758   saved_CPPFLAGS=$CPPFLAGS
5759   CPPFLAGS="$CPPFLAGS -I$x_includes"
5760   for ac_hdr in X11/extensions/Xv.h
5761 do
5762 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5763 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5764 echo "configure:5765: checking for $ac_hdr" >&5
5765 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5766   echo $ac_n "(cached) $ac_c" 1>&6
5767 else
5768   cat > conftest.$ac_ext <<EOF
5769 #line 5770 "configure"
5770 #include "confdefs.h"
5771 #include <$ac_hdr>
5772 EOF
5773 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5774 { (eval echo configure:5775: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5775 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5776 if test -z "$ac_err"; then
5777   rm -rf conftest*
5778   eval "ac_cv_header_$ac_safe=yes"
5779 else
5780   echo "$ac_err" >&5
5781   echo "configure: failed program was:" >&5
5782   cat conftest.$ac_ext >&5
5783   rm -rf conftest*
5784   eval "ac_cv_header_$ac_safe=no"
5785 fi
5786 rm -f conftest*
5787 fi
5788 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5789   echo "$ac_t""yes" 1>&6
5790     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5791   cat >> confdefs.h <<EOF
5792 #define $ac_tr_hdr 1
5793 EOF
5794  
5795     BUILTINS="${BUILTINS} xvideo"
5796     LIB_XVIDEO="-L$x_libraries -lX11 -lXext -lXv"
5797     CFLAGS_X11="-I$x_includes"
5798   
5799   CPPFLAGS=$saved_CPPFLAGS
5800 else
5801   echo "$ac_t""no" 1>&6
5802 fi
5803 done
5804
5805 fi
5806
5807 # Check whether --enable-alsa or --disable-alsa was given.
5808 if test "${enable_alsa+set}" = set; then
5809   enableval="$enable_alsa"
5810   if test x$enable_alsa = xyes
5811    then
5812      ac_safe=`echo "sys/asoundlib.h" | sed 'y%./+-%__p_%'`
5813 echo $ac_n "checking for sys/asoundlib.h""... $ac_c" 1>&6
5814 echo "configure:5815: checking for sys/asoundlib.h" >&5
5815 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5816   echo $ac_n "(cached) $ac_c" 1>&6
5817 else
5818   cat > conftest.$ac_ext <<EOF
5819 #line 5820 "configure"
5820 #include "confdefs.h"
5821 #include <sys/asoundlib.h>
5822 EOF
5823 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5824 { (eval echo configure:5825: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5825 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5826 if test -z "$ac_err"; then
5827   rm -rf conftest*
5828   eval "ac_cv_header_$ac_safe=yes"
5829 else
5830   echo "$ac_err" >&5
5831   echo "configure: failed program was:" >&5
5832   cat conftest.$ac_ext >&5
5833   rm -rf conftest*
5834   eval "ac_cv_header_$ac_safe=no"
5835 fi
5836 rm -f conftest*
5837 fi
5838 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5839   echo "$ac_t""yes" 1>&6
5840   echo $ac_n "checking for main in -lasound""... $ac_c" 1>&6
5841 echo "configure:5842: checking for main in -lasound" >&5
5842 ac_lib_var=`echo asound'_'main | sed 'y%./+-%__p_%'`
5843 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5844   echo $ac_n "(cached) $ac_c" 1>&6
5845 else
5846   ac_save_LIBS="$LIBS"
5847 LIBS="-lasound  $LIBS"
5848 cat > conftest.$ac_ext <<EOF
5849 #line 5850 "configure"
5850 #include "confdefs.h"
5851
5852 int main() {
5853 main()
5854 ; return 0; }
5855 EOF
5856 if { (eval echo configure:5857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5857   rm -rf conftest*
5858   eval "ac_cv_lib_$ac_lib_var=yes"
5859 else
5860   echo "configure: failed program was:" >&5
5861   cat conftest.$ac_ext >&5
5862   rm -rf conftest*
5863   eval "ac_cv_lib_$ac_lib_var=no"
5864 fi
5865 rm -f conftest*
5866 LIBS="$ac_save_LIBS"
5867
5868 fi
5869 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5870   echo "$ac_t""yes" 1>&6
5871   have_alsa="true"
5872 else
5873   echo "$ac_t""no" 1>&6
5874 have_alsa="false"
5875 fi
5876
5877 else
5878   echo "$ac_t""no" 1>&6
5879 have_alsa="false"
5880 fi
5881
5882      if test x$have_alsa = xtrue
5883      then
5884        PLUGINS="${PLUGINS} alsa"
5885        LIB_ALSA="-lasound"
5886      fi
5887    fi
5888 fi
5889
5890
5891 fi
5892
5893 # Check whether --enable-plugins or --disable-plugins was given.
5894 if test "${enable_plugins+set}" = set; then
5895   enableval="$enable_plugins"
5896   if test x$enable_plugins = xno
5897    then
5898      BUILTINS="${BUILTINS} ${PLUGINS}"
5899      PLUGINS=
5900    fi
5901 fi
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969 trap '' 1 2 15
5970 cat > confcache <<\EOF
5971 # This file is a shell script that caches the results of configure
5972 # tests run on this system so they can be shared between configure
5973 # scripts and configure runs.  It is not useful on other systems.
5974 # If it contains results you don't want to keep, you may remove or edit it.
5975 #
5976 # By default, configure uses ./config.cache as the cache file,
5977 # creating it if it does not exist already.  You can give configure
5978 # the --cache-file=FILE option to use a different cache file; that is
5979 # what configure does when it calls configure scripts in
5980 # subdirectories, so they share the cache.
5981 # Giving --cache-file=/dev/null disables caching, for debugging configure.
5982 # config.status only pays attention to the cache file if you give it the
5983 # --recheck option to rerun configure.
5984 #
5985 EOF
5986 # The following way of writing the cache mishandles newlines in values,
5987 # but we know of no workaround that is simple, portable, and efficient.
5988 # So, don't put newlines in cache variables' values.
5989 # Ultrix sh set writes to stderr and can't be redirected directly,
5990 # and sets the high bit in the cache file unless we assign to the vars.
5991 (set) 2>&1 |
5992   case `(ac_space=' '; set | grep ac_space) 2>&1` in
5993   *ac_space=\ *)
5994     # `set' does not quote correctly, so add quotes (double-quote substitution
5995     # turns \\\\ into \\, and sed turns \\ into \).
5996     sed -n \
5997       -e "s/'/'\\\\''/g" \
5998       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
5999     ;;
6000   *)
6001     # `set' quotes correctly as required by POSIX, so do not add quotes.
6002     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
6003     ;;
6004   esac >> confcache
6005 if cmp -s $cache_file confcache; then
6006   :
6007 else
6008   if test -w $cache_file; then
6009     echo "updating cache $cache_file"
6010     cat confcache > $cache_file
6011   else
6012     echo "not updating unwritable cache $cache_file"
6013   fi
6014 fi
6015 rm -f confcache
6016
6017 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
6018
6019 test "x$prefix" = xNONE && prefix=$ac_default_prefix
6020 # Let make expand exec_prefix.
6021 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6022
6023 # Any assignment to VPATH causes Sun make to only execute
6024 # the first set of double-colon rules, so remove it if not needed.
6025 # If there is a colon in the path, we need to keep it.
6026 if test "x$srcdir" = x.; then
6027   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
6028 fi
6029
6030 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
6031
6032 DEFS=-DHAVE_CONFIG_H
6033
6034 # Without the "./", some shells look in PATH for config.status.
6035 : ${CONFIG_STATUS=./config.status}
6036
6037 echo creating $CONFIG_STATUS
6038 rm -f $CONFIG_STATUS
6039 cat > $CONFIG_STATUS <<EOF
6040 #! /bin/sh
6041 # Generated automatically by configure.
6042 # Run this file to recreate the current configuration.
6043 # This directory was configured as follows,
6044 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
6045 #
6046 # $0 $ac_configure_args
6047 #
6048 # Compiler output produced by configure, useful for debugging
6049 # configure, is in ./config.log if it exists.
6050
6051 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
6052 for ac_option
6053 do
6054   case "\$ac_option" in
6055   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
6056     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
6057     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
6058   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
6059     echo "$CONFIG_STATUS generated by autoconf version 2.13"
6060     exit 0 ;;
6061   -help | --help | --hel | --he | --h)
6062     echo "\$ac_cs_usage"; exit 0 ;;
6063   *) echo "\$ac_cs_usage"; exit 1 ;;
6064   esac
6065 done
6066
6067 ac_given_srcdir=$srcdir
6068 ac_given_INSTALL="$INSTALL"
6069
6070 trap 'rm -fr `echo "Makefile.opts include/config.h include/defs.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
6071 EOF
6072 cat >> $CONFIG_STATUS <<EOF
6073
6074 # Protect against being on the right side of a sed subst in config.status.
6075 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
6076  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
6077 $ac_vpsub
6078 $extrasub
6079 s%@SHELL@%$SHELL%g
6080 s%@CFLAGS@%$CFLAGS%g
6081 s%@CPPFLAGS@%$CPPFLAGS%g
6082 s%@CXXFLAGS@%$CXXFLAGS%g
6083 s%@FFLAGS@%$FFLAGS%g
6084 s%@DEFS@%$DEFS%g
6085 s%@LDFLAGS@%$LDFLAGS%g
6086 s%@LIBS@%$LIBS%g
6087 s%@exec_prefix@%$exec_prefix%g
6088 s%@prefix@%$prefix%g
6089 s%@program_transform_name@%$program_transform_name%g
6090 s%@bindir@%$bindir%g
6091 s%@sbindir@%$sbindir%g
6092 s%@libexecdir@%$libexecdir%g
6093 s%@datadir@%$datadir%g
6094 s%@sysconfdir@%$sysconfdir%g
6095 s%@sharedstatedir@%$sharedstatedir%g
6096 s%@localstatedir@%$localstatedir%g
6097 s%@libdir@%$libdir%g
6098 s%@includedir@%$includedir%g
6099 s%@oldincludedir@%$oldincludedir%g
6100 s%@infodir@%$infodir%g
6101 s%@mandir@%$mandir%g
6102 s%@host@%$host%g
6103 s%@host_alias@%$host_alias%g
6104 s%@host_cpu@%$host_cpu%g
6105 s%@host_vendor@%$host_vendor%g
6106 s%@host_os@%$host_os%g
6107 s%@target@%$target%g
6108 s%@target_alias@%$target_alias%g
6109 s%@target_cpu@%$target_cpu%g
6110 s%@target_vendor@%$target_vendor%g
6111 s%@target_os@%$target_os%g
6112 s%@build@%$build%g
6113 s%@build_alias@%$build_alias%g
6114 s%@build_cpu@%$build_cpu%g
6115 s%@build_vendor@%$build_vendor%g
6116 s%@build_os@%$build_os%g
6117 s%@VLC_VERSION@%$VLC_VERSION%g
6118 s%@VLC_CODENAME@%$VLC_CODENAME%g
6119 s%@LIBDVDCSS_VERSION@%$LIBDVDCSS_VERSION%g
6120 s%@SET_MAKE@%$SET_MAKE%g
6121 s%@CC@%$CC%g
6122 s%@CPP@%$CPP%g
6123 s%@RANLIB@%$RANLIB%g
6124 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
6125 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
6126 s%@INSTALL_DATA@%$INSTALL_DATA%g
6127 s%@WINDRES@%$WINDRES%g
6128 s%@ESD_CONFIG@%$ESD_CONFIG%g
6129 s%@ARTS_CONFIG@%$ARTS_CONFIG%g
6130 s%@SDL12_CONFIG@%$SDL12_CONFIG%g
6131 s%@SDL11_CONFIG@%$SDL11_CONFIG%g
6132 s%@SDL_CONFIG@%$SDL_CONFIG%g
6133 s%@GNOME_CONFIG@%$GNOME_CONFIG%g
6134 s%@GTK_CONFIG@%$GTK_CONFIG%g
6135 s%@SYS@%$SYS%g
6136 s%@ARCH@%$ARCH%g
6137 s%@PLUGINS@%$PLUGINS%g
6138 s%@BUILTINS@%$BUILTINS%g
6139 s%@ALIASES@%$ALIASES%g
6140 s%@DEFINE@%$DEFINE%g
6141 s%@INCLUDE@%$INCLUDE%g
6142 s%@DEBUG@%$DEBUG%g
6143 s%@ASM@%$ASM%g
6144 s%@TRACE@%$TRACE%g
6145 s%@CPROF@%$CPROF%g
6146 s%@GPROF@%$GPROF%g
6147 s%@OPTIMS@%$OPTIMS%g
6148 s%@TUNING@%$TUNING%g
6149 s%@RELEASE@%$RELEASE%g
6150 s%@NEED_GETOPT@%$NEED_GETOPT%g
6151 s%@MOC@%$MOC%g
6152 s%@LCFLAGS@%$LCFLAGS%g
6153 s%@PLCFLAGS@%$PLCFLAGS%g
6154 s%@SOFLAGS@%$SOFLAGS%g
6155 s%@LIB@%$LIB%g
6156 s%@LIB_ALSA@%$LIB_ALSA%g
6157 s%@LIB_ALTIVEC@%$LIB_ALTIVEC%g
6158 s%@LIB_ARTS@%$LIB_ARTS%g
6159 s%@LIB_BEOS@%$LIB_BEOS%g
6160 s%@LIB_DARWIN@%$LIB_DARWIN%g
6161 s%@LIB_DVD@%$LIB_DVD%g
6162 s%@LIB_DVD_PLUGIN@%$LIB_DVD_PLUGIN%g
6163 s%@LIB_ESD@%$LIB_ESD%g
6164 s%@LIB_GGI@%$LIB_GGI%g
6165 s%@LIB_GLIDE@%$LIB_GLIDE%g
6166 s%@LIB_GNOME@%$LIB_GNOME%g
6167 s%@LIB_GTK@%$LIB_GTK%g
6168 s%@LIB_LIBDVDCSS@%$LIB_LIBDVDCSS%g
6169 s%@LIB_KDE@%$LIB_KDE%g
6170 s%@LIB_MACOSX@%$LIB_MACOSX%g
6171 s%@LIB_QNX@%$LIB_QNX%g
6172 s%@LIB_NCURSES@%$LIB_NCURSES%g
6173 s%@LIB_QT@%$LIB_QT%g
6174 s%@LIB_TS@%$LIB_TS%g
6175 s%@LIB_SDL@%$LIB_SDL%g
6176 s%@LIB_DIRECTX@%$LIB_DIRECTX%g
6177 s%@LIB_X11@%$LIB_X11%g
6178 s%@LIB_XVIDEO@%$LIB_XVIDEO%g
6179 s%@LIB_YUV@%$LIB_YUV%g
6180 s%@CFLAGS_VLC@%$CFLAGS_VLC%g
6181 s%@CFLAGS_ALTIVEC@%$CFLAGS_ALTIVEC%g
6182 s%@CFLAGS_DVD@%$CFLAGS_DVD%g
6183 s%@CFLAGS_LIBDVDCSS@%$CFLAGS_LIBDVDCSS%g
6184 s%@CFLAGS_ARTS@%$CFLAGS_ARTS%g
6185 s%@CFLAGS_ESD@%$CFLAGS_ESD%g
6186 s%@CFLAGS_GTK@%$CFLAGS_GTK%g
6187 s%@CFLAGS_SDL@%$CFLAGS_SDL%g
6188 s%@CFLAGS_X11@%$CFLAGS_X11%g
6189 s%@OBJ_DVD@%$OBJ_DVD%g
6190 s%@OBJ_LIBDVDCSS@%$OBJ_LIBDVDCSS%g
6191 s%@NEED_LIBDVDCSS@%$NEED_LIBDVDCSS%g
6192
6193 CEOF
6194 EOF
6195
6196 cat >> $CONFIG_STATUS <<\EOF
6197
6198 # Split the substitutions into bite-sized pieces for seds with
6199 # small command number limits, like on Digital OSF/1 and HP-UX.
6200 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
6201 ac_file=1 # Number of current file.
6202 ac_beg=1 # First line for current file.
6203 ac_end=$ac_max_sed_cmds # Line after last line for current file.
6204 ac_more_lines=:
6205 ac_sed_cmds=""
6206 while $ac_more_lines; do
6207   if test $ac_beg -gt 1; then
6208     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
6209   else
6210     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
6211   fi
6212   if test ! -s conftest.s$ac_file; then
6213     ac_more_lines=false
6214     rm -f conftest.s$ac_file
6215   else
6216     if test -z "$ac_sed_cmds"; then
6217       ac_sed_cmds="sed -f conftest.s$ac_file"
6218     else
6219       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
6220     fi
6221     ac_file=`expr $ac_file + 1`
6222     ac_beg=$ac_end
6223     ac_end=`expr $ac_end + $ac_max_sed_cmds`
6224   fi
6225 done
6226 if test -z "$ac_sed_cmds"; then
6227   ac_sed_cmds=cat
6228 fi
6229 EOF
6230
6231 cat >> $CONFIG_STATUS <<EOF
6232
6233 CONFIG_FILES=\${CONFIG_FILES-"Makefile.opts include/config.h"}
6234 EOF
6235 cat >> $CONFIG_STATUS <<\EOF
6236 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
6237   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
6238   case "$ac_file" in
6239   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
6240        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6241   *) ac_file_in="${ac_file}.in" ;;
6242   esac
6243
6244   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
6245
6246   # Remove last slash and all that follows it.  Not all systems have dirname.
6247   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6248   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6249     # The file is in a subdirectory.
6250     test ! -d "$ac_dir" && mkdir "$ac_dir"
6251     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
6252     # A "../" for each directory in $ac_dir_suffix.
6253     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
6254   else
6255     ac_dir_suffix= ac_dots=
6256   fi
6257
6258   case "$ac_given_srcdir" in
6259   .)  srcdir=.
6260       if test -z "$ac_dots"; then top_srcdir=.
6261       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
6262   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
6263   *) # Relative path.
6264     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
6265     top_srcdir="$ac_dots$ac_given_srcdir" ;;
6266   esac
6267
6268   case "$ac_given_INSTALL" in
6269   [/$]*) INSTALL="$ac_given_INSTALL" ;;
6270   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
6271   esac
6272
6273   echo creating "$ac_file"
6274   rm -f "$ac_file"
6275   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
6276   case "$ac_file" in
6277   *Makefile*) ac_comsub="1i\\
6278 # $configure_input" ;;
6279   *) ac_comsub= ;;
6280   esac
6281
6282   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
6283   sed -e "$ac_comsub
6284 s%@configure_input@%$configure_input%g
6285 s%@srcdir@%$srcdir%g
6286 s%@top_srcdir@%$top_srcdir%g
6287 s%@INSTALL@%$INSTALL%g
6288 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
6289 fi; done
6290 rm -f conftest.s*
6291
6292 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
6293 # NAME is the cpp macro being defined and VALUE is the value it is being given.
6294 #
6295 # ac_d sets the value in "#define NAME VALUE" lines.
6296 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
6297 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
6298 ac_dC='\3'
6299 ac_dD='%g'
6300 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
6301 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
6302 ac_uB='\([      ]\)%\1#\2define\3'
6303 ac_uC=' '
6304 ac_uD='\4%g'
6305 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
6306 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
6307 ac_eB='$%\1#\2define\3'
6308 ac_eC=' '
6309 ac_eD='%g'
6310
6311 if test "${CONFIG_HEADERS+set}" != set; then
6312 EOF
6313 cat >> $CONFIG_STATUS <<EOF
6314   CONFIG_HEADERS="include/defs.h"
6315 EOF
6316 cat >> $CONFIG_STATUS <<\EOF
6317 fi
6318 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
6319   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
6320   case "$ac_file" in
6321   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
6322        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6323   *) ac_file_in="${ac_file}.in" ;;
6324   esac
6325
6326   echo creating $ac_file
6327
6328   rm -f conftest.frag conftest.in conftest.out
6329   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
6330   cat $ac_file_inputs > conftest.in
6331
6332 EOF
6333
6334 # Transform confdefs.h into a sed script conftest.vals that substitutes
6335 # the proper values into config.h.in to produce config.h.  And first:
6336 # Protect against being on the right side of a sed subst in config.status.
6337 # Protect against being in an unquoted here document in config.status.
6338 rm -f conftest.vals
6339 cat > conftest.hdr <<\EOF
6340 s/[\\&%]/\\&/g
6341 s%[\\$`]%\\&%g
6342 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
6343 s%ac_d%ac_u%gp
6344 s%ac_u%ac_e%gp
6345 EOF
6346 sed -n -f conftest.hdr confdefs.h > conftest.vals
6347 rm -f conftest.hdr
6348
6349 # This sed command replaces #undef with comments.  This is necessary, for
6350 # example, in the case of _POSIX_SOURCE, which is predefined and required
6351 # on some systems where configure will not decide to define it.
6352 cat >> conftest.vals <<\EOF
6353 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
6354 EOF
6355
6356 # Break up conftest.vals because some shells have a limit on
6357 # the size of here documents, and old seds have small limits too.
6358
6359 rm -f conftest.tail
6360 while :
6361 do
6362   ac_lines=`grep -c . conftest.vals`
6363   # grep -c gives empty output for an empty file on some AIX systems.
6364   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
6365   # Write a limited-size here document to conftest.frag.
6366   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
6367   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
6368   echo 'CEOF
6369   sed -f conftest.frag conftest.in > conftest.out
6370   rm -f conftest.in
6371   mv conftest.out conftest.in
6372 ' >> $CONFIG_STATUS
6373   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
6374   rm -f conftest.vals
6375   mv conftest.tail conftest.vals
6376 done
6377 rm -f conftest.vals
6378
6379 cat >> $CONFIG_STATUS <<\EOF
6380   rm -f conftest.frag conftest.h
6381   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
6382   cat conftest.in >> conftest.h
6383   rm -f conftest.in
6384   if cmp -s $ac_file conftest.h 2>/dev/null; then
6385     echo "$ac_file is unchanged"
6386     rm -f conftest.h
6387   else
6388     # Remove last slash and all that follows it.  Not all systems have dirname.
6389       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6390       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6391       # The file is in a subdirectory.
6392       test ! -d "$ac_dir" && mkdir "$ac_dir"
6393     fi
6394     rm -f $ac_file
6395     mv conftest.h $ac_file
6396   fi
6397 fi; done
6398
6399 EOF
6400 cat >> $CONFIG_STATUS <<EOF
6401
6402 EOF
6403 cat >> $CONFIG_STATUS <<\EOF
6404
6405 exit 0
6406 EOF
6407 chmod +x $CONFIG_STATUS
6408 rm -fr confdefs* $ac_clean_files
6409 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
6410
6411
6412 echo "
6413 global configuration
6414 --------------------
6415 system                : ${SYS}
6416 architecture          : ${ARCH}
6417 optimizations         : ${OPTIMS}
6418 tuning:               : ${TUNING}
6419 release:              : ${RELEASE}"
6420
6421 if test x${HAVE_VLC} = x1
6422 then
6423   echo "
6424 vlc configuration
6425 -----------------
6426 vlc version           : ${VLC_VERSION}
6427 debug mode            : ${DEBUG}
6428 trace mode            : ${TRACE}
6429 cprof/gprof support   : ${CPROF}/${GPROF}
6430 need builtin getopt   : ${NEED_GETOPT}
6431 built-in modules      :${BUILTINS}
6432 plug-in modules       :${PLUGINS}
6433 vlc aliases           :${ALIASES}"
6434 fi
6435
6436 echo "
6437 libdvdcss configuration
6438 -----------------------
6439 can be built          : ${CAN_BUILD_LIBDVDCSS}
6440 will be built         : ${NEED_LIBDVDCSS}"
6441 if test x${NEED_LIBDVDCSS} = x1
6442 then
6443   echo "need BSDI libdvd      : ${NEED_BSDI_LIBDVD}"
6444   echo "link statically       : ${STATIC_LIBDVDCSS}"
6445 else
6446   echo "use dummy replacement : ${DUMMY_LIBDVDCSS}"
6447 fi
6448
6449 echo "
6450 You may now tune Makefile.opts at your convenience, for instance to choose
6451 which modules get compiled as plugins.
6452 "
6453 if test x${HAVE_VLC} = x1
6454 then
6455   echo "To build vlc and its plugins, type \`make vlc'."
6456 fi
6457 if test x${HAVE_LIBDVDCSS} = x1
6458 then
6459   echo "To build libdvdcss only, type \`make libdvdcss'."
6460 fi
6461 echo ""
6462