]> git.sesse.net Git - vlc/blob - configure
* Fixed crashes on exit in the directx plugin
[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-libiconv-prefix=DIR  search for libiconv in DIR/include and DIR/lib"
16 ac_help="$ac_help
17   --disable-nls           do not use Native Language Support"
18 ac_help="$ac_help
19   --with-included-gettext use the GNU gettext library included here"
20 ac_help="$ac_help
21   --with-words=endianness Set endianness (big or little)"
22 ac_help="$ac_help
23   --with-tuning=[arch]    Enable special tuning for an architecture
24                           (default i686 on IA-32 and 750 on PPC)"
25 ac_help="$ac_help
26   --enable-release        Activate extra optimizations (default disabled)"
27 ac_help="$ac_help
28   --disable-altivec       Disable altivec optimizations (default enabled on PPC)"
29 ac_help="$ac_help
30   --enable-debug          Enable debug mode (default disabled)"
31 ac_help="$ac_help
32   --enable-trace          Enable trace mode (default disabled)"
33 ac_help="$ac_help
34   --enable-gprof          Enable gprof profiling (default disabled)"
35 ac_help="$ac_help
36   --enable-cprof          Enable cprof profiling (default disabled)"
37 ac_help="$ac_help
38   --disable-optimizations Disable compiler optimizations (default enabled)"
39 ac_help="$ac_help
40   --enable-pth            Enable GNU Pth support (default disabled)"
41 ac_help="$ac_help
42   --with-dvdcss[=name]    way to use libdvdcss, either 'yes' or 'no',
43                           or 'local-static', 'local-shared', or a path to
44                           another libdvdcss such as '/usr/local'
45                           (default 'local-static')"
46 ac_help="$ac_help
47   --enable-dvdread          Enable dvdread support (default disabled)"
48 ac_help="$ac_help
49   --enable-vcd            VCD support for Linux (default enabled)"
50 ac_help="$ac_help
51   --disable-dummy         dummy module (default enabled)"
52 ac_help="$ac_help
53   --disable-null          Null module (default enabled)"
54 ac_help="$ac_help
55   --disable-rc            Remote Control module (default enabled)"
56 ac_help="$ac_help
57   --with-mad[=PATH]       libmad module (default disabled)"
58 ac_help="$ac_help
59   --disable-dsp           Linux /dev/dsp support (default enabled)"
60 ac_help="$ac_help
61   --enable-esd            Esound library support (default disabled)"
62 ac_help="$ac_help
63   --enable-arts           aRts sound server (default disabled)"
64 ac_help="$ac_help
65   --enable-macosx         MacOS X support (default enabled on MacOS X)"
66 ac_help="$ac_help
67   --disable-qnx           QNX RTOS support (default enabled on QNX RTOS)"
68 ac_help="$ac_help
69   --enable-fb             Linux framebuffer support (default disabled)"
70 ac_help="$ac_help
71   --enable-mga            Linux kernel Matrox support (default disabled)"
72 ac_help="$ac_help
73   --with-ggi[=name]       GGI support (default disabled)"
74 ac_help="$ac_help
75   --disable-sdl           SDL support (default enabled)"
76 ac_help="$ac_help
77   --with-sdl-config-path=path sdl-config path (default search in \$PATH)"
78 ac_help="$ac_help
79   --disable-directx       Windows DirectX support (default enabled on WIN32)"
80 ac_help="$ac_help
81   --with-directx-path=path Windows DirectX headers and libraries"
82 ac_help="$ac_help
83   --enable-win32          Windows DirectX support (default disabled)"
84 ac_help="$ac_help
85   --with-glide[=name]     Glide (3dfx) support (default disabled)"
86 ac_help="$ac_help
87   --enable-ncurses        ncurses interface support (default disabled)"
88 ac_help="$ac_help
89   --enable-qt             Qt interface support (default disabled)"
90 ac_help="$ac_help
91   --enable-kde            KDE interface support (default disabled)"
92 ac_help="$ac_help
93   --enable-gnome          Gnome interface support (default disabled)"
94 ac_help="$ac_help
95   --disable-gtk           Gtk+ support (default enabled)"
96 ac_help="$ac_help
97   --with-gtk-config-path=path gtk-config path (default search in \$PATH)"
98 ac_help="$ac_help
99   --disable-x11           X11 support (default enabled)"
100 ac_help="$ac_help
101   --disable-xvideo        XVideo support (default enabled)"
102 ac_help="$ac_help
103   --enable-alsa           Alsa sound drivers support (Only for linux)
104                           (default disabled)"
105 ac_help="$ac_help
106   --disable-plugins       Make all plug-ins built-in (default plug-ins enabled)"
107 ac_help="$ac_help
108   --with-dll-path=path    Path to Win32 DLLs (default search in \$PWD)"
109
110 # Initialize some variables set by options.
111 # The variables have the same names as the options, with
112 # dashes changed to underlines.
113 build=NONE
114 cache_file=./config.cache
115 exec_prefix=NONE
116 host=NONE
117 no_create=
118 nonopt=NONE
119 no_recursion=
120 prefix=NONE
121 program_prefix=NONE
122 program_suffix=NONE
123 program_transform_name=s,x,x,
124 silent=
125 site=
126 srcdir=
127 target=NONE
128 verbose=
129 x_includes=NONE
130 x_libraries=NONE
131 bindir='${exec_prefix}/bin'
132 sbindir='${exec_prefix}/sbin'
133 libexecdir='${exec_prefix}/libexec'
134 datadir='${prefix}/share'
135 sysconfdir='${prefix}/etc'
136 sharedstatedir='${prefix}/com'
137 localstatedir='${prefix}/var'
138 libdir='${exec_prefix}/lib'
139 includedir='${prefix}/include'
140 oldincludedir='/usr/include'
141 infodir='${prefix}/info'
142 mandir='${prefix}/man'
143
144 # Initialize some other variables.
145 subdirs=
146 MFLAGS= MAKEFLAGS=
147 SHELL=${CONFIG_SHELL-/bin/sh}
148 # Maximum number of lines to put in a shell here document.
149 ac_max_here_lines=12
150
151 ac_prev=
152 for ac_option
153 do
154
155   # If the previous option needs an argument, assign it.
156   if test -n "$ac_prev"; then
157     eval "$ac_prev=\$ac_option"
158     ac_prev=
159     continue
160   fi
161
162   case "$ac_option" in
163   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
164   *) ac_optarg= ;;
165   esac
166
167   # Accept the important Cygnus configure options, so we can diagnose typos.
168
169   case "$ac_option" in
170
171   -bindir | --bindir | --bindi | --bind | --bin | --bi)
172     ac_prev=bindir ;;
173   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
174     bindir="$ac_optarg" ;;
175
176   -build | --build | --buil | --bui | --bu)
177     ac_prev=build ;;
178   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
179     build="$ac_optarg" ;;
180
181   -cache-file | --cache-file | --cache-fil | --cache-fi \
182   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
183     ac_prev=cache_file ;;
184   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
185   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
186     cache_file="$ac_optarg" ;;
187
188   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
189     ac_prev=datadir ;;
190   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
191   | --da=*)
192     datadir="$ac_optarg" ;;
193
194   -disable-* | --disable-*)
195     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
196     # Reject names that are not valid shell variable names.
197     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
198       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
199     fi
200     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
201     eval "enable_${ac_feature}=no" ;;
202
203   -enable-* | --enable-*)
204     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
205     # Reject names that are not valid shell variable names.
206     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
207       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
208     fi
209     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
210     case "$ac_option" in
211       *=*) ;;
212       *) ac_optarg=yes ;;
213     esac
214     eval "enable_${ac_feature}='$ac_optarg'" ;;
215
216   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
217   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
218   | --exec | --exe | --ex)
219     ac_prev=exec_prefix ;;
220   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
221   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
222   | --exec=* | --exe=* | --ex=*)
223     exec_prefix="$ac_optarg" ;;
224
225   -gas | --gas | --ga | --g)
226     # Obsolete; use --with-gas.
227     with_gas=yes ;;
228
229   -help | --help | --hel | --he)
230     # Omit some internal or obsolete options to make the list less imposing.
231     # This message is too long to be a string in the A/UX 3.1 sh.
232     cat << EOF
233 Usage: configure [options] [host]
234 Options: [defaults in brackets after descriptions]
235 Configuration:
236   --cache-file=FILE       cache test results in FILE
237   --help                  print this message
238   --no-create             do not create output files
239   --quiet, --silent       do not print \`checking...' messages
240   --version               print the version of autoconf that created configure
241 Directory and file names:
242   --prefix=PREFIX         install architecture-independent files in PREFIX
243                           [$ac_default_prefix]
244   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
245                           [same as prefix]
246   --bindir=DIR            user executables in DIR [EPREFIX/bin]
247   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
248   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
249   --datadir=DIR           read-only architecture-independent data in DIR
250                           [PREFIX/share]
251   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
252   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
253                           [PREFIX/com]
254   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
255   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
256   --includedir=DIR        C header files in DIR [PREFIX/include]
257   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
258   --infodir=DIR           info documentation in DIR [PREFIX/info]
259   --mandir=DIR            man documentation in DIR [PREFIX/man]
260   --srcdir=DIR            find the sources in DIR [configure dir or ..]
261   --program-prefix=PREFIX prepend PREFIX to installed program names
262   --program-suffix=SUFFIX append SUFFIX to installed program names
263   --program-transform-name=PROGRAM
264                           run sed PROGRAM on installed program names
265 EOF
266     cat << EOF
267 Host type:
268   --build=BUILD           configure for building on BUILD [BUILD=HOST]
269   --host=HOST             configure for HOST [guessed]
270   --target=TARGET         configure for TARGET [TARGET=HOST]
271 Features and packages:
272   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
273   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
274   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
275   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
276   --x-includes=DIR        X include files are in DIR
277   --x-libraries=DIR       X library files are in DIR
278 EOF
279     if test -n "$ac_help"; then
280       echo "--enable and --with options recognized:$ac_help"
281     fi
282     exit 0 ;;
283
284   -host | --host | --hos | --ho)
285     ac_prev=host ;;
286   -host=* | --host=* | --hos=* | --ho=*)
287     host="$ac_optarg" ;;
288
289   -includedir | --includedir | --includedi | --included | --include \
290   | --includ | --inclu | --incl | --inc)
291     ac_prev=includedir ;;
292   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
293   | --includ=* | --inclu=* | --incl=* | --inc=*)
294     includedir="$ac_optarg" ;;
295
296   -infodir | --infodir | --infodi | --infod | --info | --inf)
297     ac_prev=infodir ;;
298   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
299     infodir="$ac_optarg" ;;
300
301   -libdir | --libdir | --libdi | --libd)
302     ac_prev=libdir ;;
303   -libdir=* | --libdir=* | --libdi=* | --libd=*)
304     libdir="$ac_optarg" ;;
305
306   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
307   | --libexe | --libex | --libe)
308     ac_prev=libexecdir ;;
309   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
310   | --libexe=* | --libex=* | --libe=*)
311     libexecdir="$ac_optarg" ;;
312
313   -localstatedir | --localstatedir | --localstatedi | --localstated \
314   | --localstate | --localstat | --localsta | --localst \
315   | --locals | --local | --loca | --loc | --lo)
316     ac_prev=localstatedir ;;
317   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
318   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
319   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
320     localstatedir="$ac_optarg" ;;
321
322   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
323     ac_prev=mandir ;;
324   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
325     mandir="$ac_optarg" ;;
326
327   -nfp | --nfp | --nf)
328     # Obsolete; use --without-fp.
329     with_fp=no ;;
330
331   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
332   | --no-cr | --no-c)
333     no_create=yes ;;
334
335   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
336   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
337     no_recursion=yes ;;
338
339   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
340   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
341   | --oldin | --oldi | --old | --ol | --o)
342     ac_prev=oldincludedir ;;
343   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
344   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
345   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
346     oldincludedir="$ac_optarg" ;;
347
348   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
349     ac_prev=prefix ;;
350   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
351     prefix="$ac_optarg" ;;
352
353   -program-prefix | --program-prefix | --program-prefi | --program-pref \
354   | --program-pre | --program-pr | --program-p)
355     ac_prev=program_prefix ;;
356   -program-prefix=* | --program-prefix=* | --program-prefi=* \
357   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
358     program_prefix="$ac_optarg" ;;
359
360   -program-suffix | --program-suffix | --program-suffi | --program-suff \
361   | --program-suf | --program-su | --program-s)
362     ac_prev=program_suffix ;;
363   -program-suffix=* | --program-suffix=* | --program-suffi=* \
364   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
365     program_suffix="$ac_optarg" ;;
366
367   -program-transform-name | --program-transform-name \
368   | --program-transform-nam | --program-transform-na \
369   | --program-transform-n | --program-transform- \
370   | --program-transform | --program-transfor \
371   | --program-transfo | --program-transf \
372   | --program-trans | --program-tran \
373   | --progr-tra | --program-tr | --program-t)
374     ac_prev=program_transform_name ;;
375   -program-transform-name=* | --program-transform-name=* \
376   | --program-transform-nam=* | --program-transform-na=* \
377   | --program-transform-n=* | --program-transform-=* \
378   | --program-transform=* | --program-transfor=* \
379   | --program-transfo=* | --program-transf=* \
380   | --program-trans=* | --program-tran=* \
381   | --progr-tra=* | --program-tr=* | --program-t=*)
382     program_transform_name="$ac_optarg" ;;
383
384   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
385   | -silent | --silent | --silen | --sile | --sil)
386     silent=yes ;;
387
388   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
389     ac_prev=sbindir ;;
390   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
391   | --sbi=* | --sb=*)
392     sbindir="$ac_optarg" ;;
393
394   -sharedstatedir | --sharedstatedir | --sharedstatedi \
395   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
396   | --sharedst | --shareds | --shared | --share | --shar \
397   | --sha | --sh)
398     ac_prev=sharedstatedir ;;
399   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
400   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
401   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
402   | --sha=* | --sh=*)
403     sharedstatedir="$ac_optarg" ;;
404
405   -site | --site | --sit)
406     ac_prev=site ;;
407   -site=* | --site=* | --sit=*)
408     site="$ac_optarg" ;;
409
410   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
411     ac_prev=srcdir ;;
412   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
413     srcdir="$ac_optarg" ;;
414
415   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
416   | --syscon | --sysco | --sysc | --sys | --sy)
417     ac_prev=sysconfdir ;;
418   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
419   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
420     sysconfdir="$ac_optarg" ;;
421
422   -target | --target | --targe | --targ | --tar | --ta | --t)
423     ac_prev=target ;;
424   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
425     target="$ac_optarg" ;;
426
427   -v | -verbose | --verbose | --verbos | --verbo | --verb)
428     verbose=yes ;;
429
430   -version | --version | --versio | --versi | --vers)
431     echo "configure generated by autoconf version 2.13"
432     exit 0 ;;
433
434   -with-* | --with-*)
435     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
436     # Reject names that are not valid shell variable names.
437     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
438       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
439     fi
440     ac_package=`echo $ac_package| sed 's/-/_/g'`
441     case "$ac_option" in
442       *=*) ;;
443       *) ac_optarg=yes ;;
444     esac
445     eval "with_${ac_package}='$ac_optarg'" ;;
446
447   -without-* | --without-*)
448     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
449     # Reject names that are not valid shell variable names.
450     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
451       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
452     fi
453     ac_package=`echo $ac_package| sed 's/-/_/g'`
454     eval "with_${ac_package}=no" ;;
455
456   --x)
457     # Obsolete; use --with-x.
458     with_x=yes ;;
459
460   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
461   | --x-incl | --x-inc | --x-in | --x-i)
462     ac_prev=x_includes ;;
463   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
464   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
465     x_includes="$ac_optarg" ;;
466
467   -x-libraries | --x-libraries | --x-librarie | --x-librari \
468   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
469     ac_prev=x_libraries ;;
470   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
471   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
472     x_libraries="$ac_optarg" ;;
473
474   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
475     ;;
476
477   *)
478     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
479       echo "configure: warning: $ac_option: invalid host type" 1>&2
480     fi
481     if test "x$nonopt" != xNONE; then
482       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
483     fi
484     nonopt="$ac_option"
485     ;;
486
487   esac
488 done
489
490 if test -n "$ac_prev"; then
491   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
492 fi
493
494 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
495
496 # File descriptor usage:
497 # 0 standard input
498 # 1 file creation
499 # 2 errors and warnings
500 # 3 some systems may open it to /dev/tty
501 # 4 used on the Kubota Titan
502 # 6 checking for... messages and results
503 # 5 compiler messages saved in config.log
504 if test "$silent" = yes; then
505   exec 6>/dev/null
506 else
507   exec 6>&1
508 fi
509 exec 5>./config.log
510
511 echo "\
512 This file contains any messages produced by compilers while
513 running configure, to aid debugging if configure makes a mistake.
514 " 1>&5
515
516 # Strip out --no-create and --no-recursion so they do not pile up.
517 # Also quote any args containing shell metacharacters.
518 ac_configure_args=
519 for ac_arg
520 do
521   case "$ac_arg" in
522   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
523   | --no-cr | --no-c) ;;
524   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
525   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
526   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
527   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
528   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
529   esac
530 done
531
532 # NLS nuisances.
533 # Only set these to C if already set.  These must not be set unconditionally
534 # because not all systems understand e.g. LANG=C (notably SCO).
535 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
536 # Non-C LC_CTYPE values break the ctype check.
537 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
538 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
539 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
540 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
541
542 # confdefs.h avoids OS command line length limits that DEFS can exceed.
543 rm -rf conftest* confdefs.h
544 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
545 echo > confdefs.h
546
547 # A filename unique to this package, relative to the directory that
548 # configure is in, which we can look for to find out if srcdir is correct.
549 ac_unique_file=include/main.h
550
551 # Find the source files, if location was not specified.
552 if test -z "$srcdir"; then
553   ac_srcdir_defaulted=yes
554   # Try the directory containing this script, then its parent.
555   ac_prog=$0
556   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
557   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
558   srcdir=$ac_confdir
559   if test ! -r $srcdir/$ac_unique_file; then
560     srcdir=..
561   fi
562 else
563   ac_srcdir_defaulted=no
564 fi
565 if test ! -r $srcdir/$ac_unique_file; then
566   if test "$ac_srcdir_defaulted" = yes; then
567     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
568   else
569     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
570   fi
571 fi
572 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
573
574 # Prefer explicitly selected file to automatically selected ones.
575 if test -z "$CONFIG_SITE"; then
576   if test "x$prefix" != xNONE; then
577     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
578   else
579     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
580   fi
581 fi
582 for ac_site_file in $CONFIG_SITE; do
583   if test -r "$ac_site_file"; then
584     echo "loading site script $ac_site_file"
585     . "$ac_site_file"
586   fi
587 done
588
589 if test -r "$cache_file"; then
590   echo "loading cache $cache_file"
591   . $cache_file
592 else
593   echo "creating cache $cache_file"
594   > $cache_file
595 fi
596
597 ac_ext=c
598 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
599 ac_cpp='$CPP $CPPFLAGS'
600 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
601 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
602 cross_compiling=$ac_cv_prog_cc_cross
603
604 ac_exeext=
605 ac_objext=o
606 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
607   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
608   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
609     ac_n= ac_c='
610 ' ac_t='        '
611   else
612     ac_n=-n ac_c= ac_t=
613   fi
614 else
615   ac_n= ac_c='\c' ac_t=
616 fi
617
618
619
620
621 ac_aux_dir=
622 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
623   if test -f $ac_dir/install-sh; then
624     ac_aux_dir=$ac_dir
625     ac_install_sh="$ac_aux_dir/install-sh -c"
626     break
627   elif test -f $ac_dir/install.sh; then
628     ac_aux_dir=$ac_dir
629     ac_install_sh="$ac_aux_dir/install.sh -c"
630     break
631   fi
632 done
633 if test -z "$ac_aux_dir"; then
634   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
635 fi
636 ac_config_guess=$ac_aux_dir/config.guess
637 ac_config_sub=$ac_aux_dir/config.sub
638 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
639
640
641 # Do some error checking and defaulting for the host and target type.
642 # The inputs are:
643 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
644 #
645 # The rules are:
646 # 1. You are not allowed to specify --host, --target, and nonopt at the
647 #    same time.
648 # 2. Host defaults to nonopt.
649 # 3. If nonopt is not specified, then host defaults to the current host,
650 #    as determined by config.guess.
651 # 4. Target and build default to nonopt.
652 # 5. If nonopt is not specified, then target and build default to host.
653
654 # The aliases save the names the user supplied, while $host etc.
655 # will get canonicalized.
656 case $host---$target---$nonopt in
657 NONE---*---* | *---NONE---* | *---*---NONE) ;;
658 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
659 esac
660
661
662 # Make sure we can run config.sub.
663 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
664 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
665 fi
666
667 echo $ac_n "checking host system type""... $ac_c" 1>&6
668 echo "configure:669: checking host system type" >&5
669
670 host_alias=$host
671 case "$host_alias" in
672 NONE)
673   case $nonopt in
674   NONE)
675     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
676     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
677     fi ;;
678   *) host_alias=$nonopt ;;
679   esac ;;
680 esac
681
682 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
683 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
684 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
685 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
686 echo "$ac_t""$host" 1>&6
687
688 echo $ac_n "checking target system type""... $ac_c" 1>&6
689 echo "configure:690: checking target system type" >&5
690
691 target_alias=$target
692 case "$target_alias" in
693 NONE)
694   case $nonopt in
695   NONE) target_alias=$host_alias ;;
696   *) target_alias=$nonopt ;;
697   esac ;;
698 esac
699
700 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
701 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
702 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
703 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
704 echo "$ac_t""$target" 1>&6
705
706 echo $ac_n "checking build system type""... $ac_c" 1>&6
707 echo "configure:708: checking build system type" >&5
708
709 build_alias=$build
710 case "$build_alias" in
711 NONE)
712   case $nonopt in
713   NONE) build_alias=$host_alias ;;
714   *) build_alias=$nonopt ;;
715   esac ;;
716 esac
717
718 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
719 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
720 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
721 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
722 echo "$ac_t""$build" 1>&6
723
724 test "$host_alias" != "$target_alias" &&
725   test "$program_prefix$program_suffix$program_transform_name" = \
726     NONENONEs,x,x, &&
727   program_prefix=${target_alias}-
728
729
730 HAVE_VLC=0
731 if test -r src/interface/main.c; then
732   HAVE_VLC=1
733   VLC_VERSION="0.2.92-dev"
734   VLC_CODENAME=Ourumov
735 fi
736
737 HAVE_LIBDVDCSS=0
738 if test -r extras/libdvdcss/libdvdcss.c; then
739   HAVE_LIBDVDCSS=1
740   LIBDVDCSS_VERSION="1.0.1-dev"
741   
742   if test -r extras/libdvdcss/csskeys.h; then
743     cat >> confdefs.h <<\EOF
744 #define HAVE_CSSKEYS 1
745 EOF
746
747   fi
748 fi
749
750 save_CFLAGS="${CFLAGS}"
751 save_LDFLAGS="${LDFLAGS}"
752
753 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
754 echo "configure:755: checking whether ${MAKE-make} sets \${MAKE}" >&5
755 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
756 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
757   echo $ac_n "(cached) $ac_c" 1>&6
758 else
759   cat > conftestmake <<\EOF
760 all:
761         @echo 'ac_maketemp="${MAKE}"'
762 EOF
763 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
764 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
765 if test -n "$ac_maketemp"; then
766   eval ac_cv_prog_make_${ac_make}_set=yes
767 else
768   eval ac_cv_prog_make_${ac_make}_set=no
769 fi
770 rm -f conftestmake
771 fi
772 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
773   echo "$ac_t""yes" 1>&6
774   SET_MAKE=
775 else
776   echo "$ac_t""no" 1>&6
777   SET_MAKE="MAKE=${MAKE-make}"
778 fi
779
780 # Extract the first word of "gcc", so it can be a program name with args.
781 set dummy gcc; ac_word=$2
782 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
783 echo "configure:784: checking for $ac_word" >&5
784 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
785   echo $ac_n "(cached) $ac_c" 1>&6
786 else
787   if test -n "$CC"; then
788   ac_cv_prog_CC="$CC" # Let the user override the test.
789 else
790   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
791   ac_dummy="$PATH"
792   for ac_dir in $ac_dummy; do
793     test -z "$ac_dir" && ac_dir=.
794     if test -f $ac_dir/$ac_word; then
795       ac_cv_prog_CC="gcc"
796       break
797     fi
798   done
799   IFS="$ac_save_ifs"
800 fi
801 fi
802 CC="$ac_cv_prog_CC"
803 if test -n "$CC"; then
804   echo "$ac_t""$CC" 1>&6
805 else
806   echo "$ac_t""no" 1>&6
807 fi
808
809 if test -z "$CC"; then
810   # Extract the first word of "cc", so it can be a program name with args.
811 set dummy cc; ac_word=$2
812 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
813 echo "configure:814: checking for $ac_word" >&5
814 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
815   echo $ac_n "(cached) $ac_c" 1>&6
816 else
817   if test -n "$CC"; then
818   ac_cv_prog_CC="$CC" # Let the user override the test.
819 else
820   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
821   ac_prog_rejected=no
822   ac_dummy="$PATH"
823   for ac_dir in $ac_dummy; do
824     test -z "$ac_dir" && ac_dir=.
825     if test -f $ac_dir/$ac_word; then
826       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
827         ac_prog_rejected=yes
828         continue
829       fi
830       ac_cv_prog_CC="cc"
831       break
832     fi
833   done
834   IFS="$ac_save_ifs"
835 if test $ac_prog_rejected = yes; then
836   # We found a bogon in the path, so make sure we never use it.
837   set dummy $ac_cv_prog_CC
838   shift
839   if test $# -gt 0; then
840     # We chose a different compiler from the bogus one.
841     # However, it has the same basename, so the bogon will be chosen
842     # first if we set CC to just the basename; use the full file name.
843     shift
844     set dummy "$ac_dir/$ac_word" "$@"
845     shift
846     ac_cv_prog_CC="$@"
847   fi
848 fi
849 fi
850 fi
851 CC="$ac_cv_prog_CC"
852 if test -n "$CC"; then
853   echo "$ac_t""$CC" 1>&6
854 else
855   echo "$ac_t""no" 1>&6
856 fi
857
858   if test -z "$CC"; then
859     case "`uname -s`" in
860     *win32* | *WIN32*)
861       # Extract the first word of "cl", so it can be a program name with args.
862 set dummy cl; ac_word=$2
863 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
864 echo "configure:865: checking for $ac_word" >&5
865 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
866   echo $ac_n "(cached) $ac_c" 1>&6
867 else
868   if test -n "$CC"; then
869   ac_cv_prog_CC="$CC" # Let the user override the test.
870 else
871   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
872   ac_dummy="$PATH"
873   for ac_dir in $ac_dummy; do
874     test -z "$ac_dir" && ac_dir=.
875     if test -f $ac_dir/$ac_word; then
876       ac_cv_prog_CC="cl"
877       break
878     fi
879   done
880   IFS="$ac_save_ifs"
881 fi
882 fi
883 CC="$ac_cv_prog_CC"
884 if test -n "$CC"; then
885   echo "$ac_t""$CC" 1>&6
886 else
887   echo "$ac_t""no" 1>&6
888 fi
889  ;;
890     esac
891   fi
892   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
893 fi
894
895 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
896 echo "configure:897: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
897
898 ac_ext=c
899 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
900 ac_cpp='$CPP $CPPFLAGS'
901 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
902 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
903 cross_compiling=$ac_cv_prog_cc_cross
904
905 cat > conftest.$ac_ext << EOF
906
907 #line 908 "configure"
908 #include "confdefs.h"
909
910 main(){return(0);}
911 EOF
912 if { (eval echo configure:913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
913   ac_cv_prog_cc_works=yes
914   # If we can't run a trivial program, we are probably using a cross compiler.
915   if (./conftest; exit) 2>/dev/null; then
916     ac_cv_prog_cc_cross=no
917   else
918     ac_cv_prog_cc_cross=yes
919   fi
920 else
921   echo "configure: failed program was:" >&5
922   cat conftest.$ac_ext >&5
923   ac_cv_prog_cc_works=no
924 fi
925 rm -fr conftest*
926 ac_ext=c
927 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
928 ac_cpp='$CPP $CPPFLAGS'
929 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
930 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
931 cross_compiling=$ac_cv_prog_cc_cross
932
933 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
934 if test $ac_cv_prog_cc_works = no; then
935   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
936 fi
937 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
938 echo "configure:939: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
939 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
940 cross_compiling=$ac_cv_prog_cc_cross
941
942 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
943 echo "configure:944: checking whether we are using GNU C" >&5
944 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
945   echo $ac_n "(cached) $ac_c" 1>&6
946 else
947   cat > conftest.c <<EOF
948 #ifdef __GNUC__
949   yes;
950 #endif
951 EOF
952 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:953: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
953   ac_cv_prog_gcc=yes
954 else
955   ac_cv_prog_gcc=no
956 fi
957 fi
958
959 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
960
961 if test $ac_cv_prog_gcc = yes; then
962   GCC=yes
963 else
964   GCC=
965 fi
966
967 ac_test_CFLAGS="${CFLAGS+set}"
968 ac_save_CFLAGS="$CFLAGS"
969 CFLAGS=
970 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
971 echo "configure:972: checking whether ${CC-cc} accepts -g" >&5
972 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
973   echo $ac_n "(cached) $ac_c" 1>&6
974 else
975   echo 'void f(){}' > conftest.c
976 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
977   ac_cv_prog_cc_g=yes
978 else
979   ac_cv_prog_cc_g=no
980 fi
981 rm -f conftest*
982
983 fi
984
985 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
986 if test "$ac_test_CFLAGS" = set; then
987   CFLAGS="$ac_save_CFLAGS"
988 elif test $ac_cv_prog_cc_g = yes; then
989   if test "$GCC" = yes; then
990     CFLAGS="-g -O2"
991   else
992     CFLAGS="-g"
993   fi
994 else
995   if test "$GCC" = yes; then
996     CFLAGS="-O2"
997   else
998     CFLAGS=
999   fi
1000 fi
1001
1002 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1003 echo "configure:1004: checking how to run the C preprocessor" >&5
1004 # On Suns, sometimes $CPP names a directory.
1005 if test -n "$CPP" && test -d "$CPP"; then
1006   CPP=
1007 fi
1008 if test -z "$CPP"; then
1009 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1010   echo $ac_n "(cached) $ac_c" 1>&6
1011 else
1012     # This must be in double quotes, not single quotes, because CPP may get
1013   # substituted into the Makefile and "${CC-cc}" will confuse make.
1014   CPP="${CC-cc} -E"
1015   # On the NeXT, cc -E runs the code through the compiler's parser,
1016   # not just through cpp.
1017   cat > conftest.$ac_ext <<EOF
1018 #line 1019 "configure"
1019 #include "confdefs.h"
1020 #include <assert.h>
1021 Syntax Error
1022 EOF
1023 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1024 { (eval echo configure:1025: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1025 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1026 if test -z "$ac_err"; then
1027   :
1028 else
1029   echo "$ac_err" >&5
1030   echo "configure: failed program was:" >&5
1031   cat conftest.$ac_ext >&5
1032   rm -rf conftest*
1033   CPP="${CC-cc} -E -traditional-cpp"
1034   cat > conftest.$ac_ext <<EOF
1035 #line 1036 "configure"
1036 #include "confdefs.h"
1037 #include <assert.h>
1038 Syntax Error
1039 EOF
1040 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1041 { (eval echo configure:1042: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1042 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1043 if test -z "$ac_err"; then
1044   :
1045 else
1046   echo "$ac_err" >&5
1047   echo "configure: failed program was:" >&5
1048   cat conftest.$ac_ext >&5
1049   rm -rf conftest*
1050   CPP="${CC-cc} -nologo -E"
1051   cat > conftest.$ac_ext <<EOF
1052 #line 1053 "configure"
1053 #include "confdefs.h"
1054 #include <assert.h>
1055 Syntax Error
1056 EOF
1057 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1058 { (eval echo configure:1059: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1059 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1060 if test -z "$ac_err"; then
1061   :
1062 else
1063   echo "$ac_err" >&5
1064   echo "configure: failed program was:" >&5
1065   cat conftest.$ac_ext >&5
1066   rm -rf conftest*
1067   CPP=/lib/cpp
1068 fi
1069 rm -f conftest*
1070 fi
1071 rm -f conftest*
1072 fi
1073 rm -f conftest*
1074   ac_cv_prog_CPP="$CPP"
1075 fi
1076   CPP="$ac_cv_prog_CPP"
1077 else
1078   ac_cv_prog_CPP="$CPP"
1079 fi
1080 echo "$ac_t""$CPP" 1>&6
1081
1082
1083 if test $host != $build; then
1084   ac_tool_prefix=${host_alias}-
1085 else
1086   ac_tool_prefix=
1087 fi
1088
1089 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
1090 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
1091 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1092 echo "configure:1093: checking for $ac_word" >&5
1093 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1094   echo $ac_n "(cached) $ac_c" 1>&6
1095 else
1096   if test -n "$RANLIB"; then
1097   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1098 else
1099   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1100   ac_dummy="$PATH"
1101   for ac_dir in $ac_dummy; do
1102     test -z "$ac_dir" && ac_dir=.
1103     if test -f $ac_dir/$ac_word; then
1104       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
1105       break
1106     fi
1107   done
1108   IFS="$ac_save_ifs"
1109 fi
1110 fi
1111 RANLIB="$ac_cv_prog_RANLIB"
1112 if test -n "$RANLIB"; then
1113   echo "$ac_t""$RANLIB" 1>&6
1114 else
1115   echo "$ac_t""no" 1>&6
1116 fi
1117
1118
1119 if test -z "$ac_cv_prog_RANLIB"; then
1120 if test -n "$ac_tool_prefix"; then
1121   # Extract the first word of "ranlib", so it can be a program name with args.
1122 set dummy ranlib; ac_word=$2
1123 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1124 echo "configure:1125: checking for $ac_word" >&5
1125 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1126   echo $ac_n "(cached) $ac_c" 1>&6
1127 else
1128   if test -n "$RANLIB"; then
1129   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1130 else
1131   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1132   ac_dummy="$PATH"
1133   for ac_dir in $ac_dummy; do
1134     test -z "$ac_dir" && ac_dir=.
1135     if test -f $ac_dir/$ac_word; then
1136       ac_cv_prog_RANLIB="ranlib"
1137       break
1138     fi
1139   done
1140   IFS="$ac_save_ifs"
1141   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1142 fi
1143 fi
1144 RANLIB="$ac_cv_prog_RANLIB"
1145 if test -n "$RANLIB"; then
1146   echo "$ac_t""$RANLIB" 1>&6
1147 else
1148   echo "$ac_t""no" 1>&6
1149 fi
1150
1151 else
1152   RANLIB=":"
1153 fi
1154 fi
1155
1156
1157 ALL_LINGUAS="de fr ru"
1158
1159 cat >> confdefs.h <<EOF
1160 #define PACKAGE "vlc"
1161 EOF
1162
1163 cat >> confdefs.h <<EOF
1164 #define VERSION "$VLC_VERSION"
1165 EOF
1166
1167 # Extract the first word of "ranlib", so it can be a program name with args.
1168 set dummy ranlib; ac_word=$2
1169 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1170 echo "configure:1171: checking for $ac_word" >&5
1171 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1172   echo $ac_n "(cached) $ac_c" 1>&6
1173 else
1174   if test -n "$RANLIB"; then
1175   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1176 else
1177   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1178   ac_dummy="$PATH"
1179   for ac_dir in $ac_dummy; do
1180     test -z "$ac_dir" && ac_dir=.
1181     if test -f $ac_dir/$ac_word; then
1182       ac_cv_prog_RANLIB="ranlib"
1183       break
1184     fi
1185   done
1186   IFS="$ac_save_ifs"
1187   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1188 fi
1189 fi
1190 RANLIB="$ac_cv_prog_RANLIB"
1191 if test -n "$RANLIB"; then
1192   echo "$ac_t""$RANLIB" 1>&6
1193 else
1194   echo "$ac_t""no" 1>&6
1195 fi
1196
1197
1198         echo $ac_n "checking for strerror in -lcposix""... $ac_c" 1>&6
1199 echo "configure:1200: checking for strerror in -lcposix" >&5
1200 ac_lib_var=`echo cposix'_'strerror | sed 'y%./+-%__p_%'`
1201 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1202   echo $ac_n "(cached) $ac_c" 1>&6
1203 else
1204   ac_save_LIBS="$LIBS"
1205 LIBS="-lcposix  $LIBS"
1206 cat > conftest.$ac_ext <<EOF
1207 #line 1208 "configure"
1208 #include "confdefs.h"
1209 /* Override any gcc2 internal prototype to avoid an error.  */
1210 /* We use char because int might match the return type of a gcc2
1211     builtin and then its argument prototype would still apply.  */
1212 char strerror();
1213
1214 int main() {
1215 strerror()
1216 ; return 0; }
1217 EOF
1218 if { (eval echo configure:1219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1219   rm -rf conftest*
1220   eval "ac_cv_lib_$ac_lib_var=yes"
1221 else
1222   echo "configure: failed program was:" >&5
1223   cat conftest.$ac_ext >&5
1224   rm -rf conftest*
1225   eval "ac_cv_lib_$ac_lib_var=no"
1226 fi
1227 rm -f conftest*
1228 LIBS="$ac_save_LIBS"
1229
1230 fi
1231 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1232   echo "$ac_t""yes" 1>&6
1233   LIBS="$LIBS -lcposix"
1234 else
1235   echo "$ac_t""no" 1>&6
1236 fi
1237
1238   
1239
1240 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1241 echo "configure:1242: checking for ANSI C header files" >&5
1242 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1243   echo $ac_n "(cached) $ac_c" 1>&6
1244 else
1245   cat > conftest.$ac_ext <<EOF
1246 #line 1247 "configure"
1247 #include "confdefs.h"
1248 #include <stdlib.h>
1249 #include <stdarg.h>
1250 #include <string.h>
1251 #include <float.h>
1252 EOF
1253 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1254 { (eval echo configure:1255: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1255 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1256 if test -z "$ac_err"; then
1257   rm -rf conftest*
1258   ac_cv_header_stdc=yes
1259 else
1260   echo "$ac_err" >&5
1261   echo "configure: failed program was:" >&5
1262   cat conftest.$ac_ext >&5
1263   rm -rf conftest*
1264   ac_cv_header_stdc=no
1265 fi
1266 rm -f conftest*
1267
1268 if test $ac_cv_header_stdc = yes; then
1269   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1270 cat > conftest.$ac_ext <<EOF
1271 #line 1272 "configure"
1272 #include "confdefs.h"
1273 #include <string.h>
1274 EOF
1275 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1276   egrep "memchr" >/dev/null 2>&1; then
1277   :
1278 else
1279   rm -rf conftest*
1280   ac_cv_header_stdc=no
1281 fi
1282 rm -f conftest*
1283
1284 fi
1285
1286 if test $ac_cv_header_stdc = yes; then
1287   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1288 cat > conftest.$ac_ext <<EOF
1289 #line 1290 "configure"
1290 #include "confdefs.h"
1291 #include <stdlib.h>
1292 EOF
1293 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1294   egrep "free" >/dev/null 2>&1; then
1295   :
1296 else
1297   rm -rf conftest*
1298   ac_cv_header_stdc=no
1299 fi
1300 rm -f conftest*
1301
1302 fi
1303
1304 if test $ac_cv_header_stdc = yes; then
1305   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1306 if test "$cross_compiling" = yes; then
1307   :
1308 else
1309   cat > conftest.$ac_ext <<EOF
1310 #line 1311 "configure"
1311 #include "confdefs.h"
1312 #include <ctype.h>
1313 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1314 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1315 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1316 int main () { int i; for (i = 0; i < 256; i++)
1317 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1318 exit (0); }
1319
1320 EOF
1321 if { (eval echo configure:1322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1322 then
1323   :
1324 else
1325   echo "configure: failed program was:" >&5
1326   cat conftest.$ac_ext >&5
1327   rm -fr conftest*
1328   ac_cv_header_stdc=no
1329 fi
1330 rm -fr conftest*
1331 fi
1332
1333 fi
1334 fi
1335
1336 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1337 if test $ac_cv_header_stdc = yes; then
1338   cat >> confdefs.h <<\EOF
1339 #define STDC_HEADERS 1
1340 EOF
1341
1342 fi
1343
1344 echo $ac_n "checking for working const""... $ac_c" 1>&6
1345 echo "configure:1346: checking for working const" >&5
1346 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1347   echo $ac_n "(cached) $ac_c" 1>&6
1348 else
1349   cat > conftest.$ac_ext <<EOF
1350 #line 1351 "configure"
1351 #include "confdefs.h"
1352
1353 int main() {
1354
1355 /* Ultrix mips cc rejects this.  */
1356 typedef int charset[2]; const charset x;
1357 /* SunOS 4.1.1 cc rejects this.  */
1358 char const *const *ccp;
1359 char **p;
1360 /* NEC SVR4.0.2 mips cc rejects this.  */
1361 struct point {int x, y;};
1362 static struct point const zero = {0,0};
1363 /* AIX XL C 1.02.0.0 rejects this.
1364    It does not let you subtract one const X* pointer from another in an arm
1365    of an if-expression whose if-part is not a constant expression */
1366 const char *g = "string";
1367 ccp = &g + (g ? g-g : 0);
1368 /* HPUX 7.0 cc rejects these. */
1369 ++ccp;
1370 p = (char**) ccp;
1371 ccp = (char const *const *) p;
1372 { /* SCO 3.2v4 cc rejects this.  */
1373   char *t;
1374   char const *s = 0 ? (char *) 0 : (char const *) 0;
1375
1376   *t++ = 0;
1377 }
1378 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
1379   int x[] = {25, 17};
1380   const int *foo = &x[0];
1381   ++foo;
1382 }
1383 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1384   typedef const int *iptr;
1385   iptr p = 0;
1386   ++p;
1387 }
1388 { /* AIX XL C 1.02.0.0 rejects this saying
1389      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1390   struct s { int j; const int *ap[3]; };
1391   struct s *b; b->j = 5;
1392 }
1393 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1394   const int foo = 10;
1395 }
1396
1397 ; return 0; }
1398 EOF
1399 if { (eval echo configure:1400: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1400   rm -rf conftest*
1401   ac_cv_c_const=yes
1402 else
1403   echo "configure: failed program was:" >&5
1404   cat conftest.$ac_ext >&5
1405   rm -rf conftest*
1406   ac_cv_c_const=no
1407 fi
1408 rm -f conftest*
1409 fi
1410
1411 echo "$ac_t""$ac_cv_c_const" 1>&6
1412 if test $ac_cv_c_const = no; then
1413   cat >> confdefs.h <<\EOF
1414 #define const 
1415 EOF
1416
1417 fi
1418
1419 echo $ac_n "checking for inline""... $ac_c" 1>&6
1420 echo "configure:1421: checking for inline" >&5
1421 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1422   echo $ac_n "(cached) $ac_c" 1>&6
1423 else
1424   ac_cv_c_inline=no
1425 for ac_kw in inline __inline__ __inline; do
1426   cat > conftest.$ac_ext <<EOF
1427 #line 1428 "configure"
1428 #include "confdefs.h"
1429
1430 int main() {
1431 } $ac_kw foo() {
1432 ; return 0; }
1433 EOF
1434 if { (eval echo configure:1435: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1435   rm -rf conftest*
1436   ac_cv_c_inline=$ac_kw; break
1437 else
1438   echo "configure: failed program was:" >&5
1439   cat conftest.$ac_ext >&5
1440 fi
1441 rm -f conftest*
1442 done
1443
1444 fi
1445
1446 echo "$ac_t""$ac_cv_c_inline" 1>&6
1447 case "$ac_cv_c_inline" in
1448   inline | yes) ;;
1449   no) cat >> confdefs.h <<\EOF
1450 #define inline 
1451 EOF
1452  ;;
1453   *)  cat >> confdefs.h <<EOF
1454 #define inline $ac_cv_c_inline
1455 EOF
1456  ;;
1457 esac
1458
1459 echo $ac_n "checking for off_t""... $ac_c" 1>&6
1460 echo "configure:1461: checking for off_t" >&5
1461 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
1462   echo $ac_n "(cached) $ac_c" 1>&6
1463 else
1464   cat > conftest.$ac_ext <<EOF
1465 #line 1466 "configure"
1466 #include "confdefs.h"
1467 #include <sys/types.h>
1468 #if STDC_HEADERS
1469 #include <stdlib.h>
1470 #include <stddef.h>
1471 #endif
1472 EOF
1473 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1474   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1475   rm -rf conftest*
1476   ac_cv_type_off_t=yes
1477 else
1478   rm -rf conftest*
1479   ac_cv_type_off_t=no
1480 fi
1481 rm -f conftest*
1482
1483 fi
1484 echo "$ac_t""$ac_cv_type_off_t" 1>&6
1485 if test $ac_cv_type_off_t = no; then
1486   cat >> confdefs.h <<\EOF
1487 #define off_t long
1488 EOF
1489
1490 fi
1491
1492 echo $ac_n "checking for size_t""... $ac_c" 1>&6
1493 echo "configure:1494: checking for size_t" >&5
1494 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1495   echo $ac_n "(cached) $ac_c" 1>&6
1496 else
1497   cat > conftest.$ac_ext <<EOF
1498 #line 1499 "configure"
1499 #include "confdefs.h"
1500 #include <sys/types.h>
1501 #if STDC_HEADERS
1502 #include <stdlib.h>
1503 #include <stddef.h>
1504 #endif
1505 EOF
1506 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1507   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1508   rm -rf conftest*
1509   ac_cv_type_size_t=yes
1510 else
1511   rm -rf conftest*
1512   ac_cv_type_size_t=no
1513 fi
1514 rm -f conftest*
1515
1516 fi
1517 echo "$ac_t""$ac_cv_type_size_t" 1>&6
1518 if test $ac_cv_type_size_t = no; then
1519   cat >> confdefs.h <<\EOF
1520 #define size_t unsigned
1521 EOF
1522
1523 fi
1524
1525 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
1526 # for constant arguments.  Useless!
1527 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
1528 echo "configure:1529: checking for working alloca.h" >&5
1529 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
1530   echo $ac_n "(cached) $ac_c" 1>&6
1531 else
1532   cat > conftest.$ac_ext <<EOF
1533 #line 1534 "configure"
1534 #include "confdefs.h"
1535 #include <alloca.h>
1536 int main() {
1537 char *p = alloca(2 * sizeof(int));
1538 ; return 0; }
1539 EOF
1540 if { (eval echo configure:1541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1541   rm -rf conftest*
1542   ac_cv_header_alloca_h=yes
1543 else
1544   echo "configure: failed program was:" >&5
1545   cat conftest.$ac_ext >&5
1546   rm -rf conftest*
1547   ac_cv_header_alloca_h=no
1548 fi
1549 rm -f conftest*
1550 fi
1551
1552 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
1553 if test $ac_cv_header_alloca_h = yes; then
1554   cat >> confdefs.h <<\EOF
1555 #define HAVE_ALLOCA_H 1
1556 EOF
1557
1558 fi
1559
1560 echo $ac_n "checking for alloca""... $ac_c" 1>&6
1561 echo "configure:1562: checking for alloca" >&5
1562 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
1563   echo $ac_n "(cached) $ac_c" 1>&6
1564 else
1565   cat > conftest.$ac_ext <<EOF
1566 #line 1567 "configure"
1567 #include "confdefs.h"
1568
1569 #ifdef __GNUC__
1570 # define alloca __builtin_alloca
1571 #else
1572 # ifdef _MSC_VER
1573 #  include <malloc.h>
1574 #  define alloca _alloca
1575 # else
1576 #  if HAVE_ALLOCA_H
1577 #   include <alloca.h>
1578 #  else
1579 #   ifdef _AIX
1580  #pragma alloca
1581 #   else
1582 #    ifndef alloca /* predefined by HP cc +Olibcalls */
1583 char *alloca ();
1584 #    endif
1585 #   endif
1586 #  endif
1587 # endif
1588 #endif
1589
1590 int main() {
1591 char *p = (char *) alloca(1);
1592 ; return 0; }
1593 EOF
1594 if { (eval echo configure:1595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1595   rm -rf conftest*
1596   ac_cv_func_alloca_works=yes
1597 else
1598   echo "configure: failed program was:" >&5
1599   cat conftest.$ac_ext >&5
1600   rm -rf conftest*
1601   ac_cv_func_alloca_works=no
1602 fi
1603 rm -f conftest*
1604 fi
1605
1606 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
1607 if test $ac_cv_func_alloca_works = yes; then
1608   cat >> confdefs.h <<\EOF
1609 #define HAVE_ALLOCA 1
1610 EOF
1611
1612 fi
1613
1614 if test $ac_cv_func_alloca_works = no; then
1615   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
1616   # that cause trouble.  Some versions do not even contain alloca or
1617   # contain a buggy version.  If you still want to use their alloca,
1618   # use ar to extract alloca.o from them instead of compiling alloca.c.
1619   ALLOCA=alloca.${ac_objext}
1620   cat >> confdefs.h <<\EOF
1621 #define C_ALLOCA 1
1622 EOF
1623
1624
1625 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
1626 echo "configure:1627: checking whether alloca needs Cray hooks" >&5
1627 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
1628   echo $ac_n "(cached) $ac_c" 1>&6
1629 else
1630   cat > conftest.$ac_ext <<EOF
1631 #line 1632 "configure"
1632 #include "confdefs.h"
1633 #if defined(CRAY) && ! defined(CRAY2)
1634 webecray
1635 #else
1636 wenotbecray
1637 #endif
1638
1639 EOF
1640 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1641   egrep "webecray" >/dev/null 2>&1; then
1642   rm -rf conftest*
1643   ac_cv_os_cray=yes
1644 else
1645   rm -rf conftest*
1646   ac_cv_os_cray=no
1647 fi
1648 rm -f conftest*
1649
1650 fi
1651
1652 echo "$ac_t""$ac_cv_os_cray" 1>&6
1653 if test $ac_cv_os_cray = yes; then
1654 for ac_func in _getb67 GETB67 getb67; do
1655   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1656 echo "configure:1657: checking for $ac_func" >&5
1657 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1658   echo $ac_n "(cached) $ac_c" 1>&6
1659 else
1660   cat > conftest.$ac_ext <<EOF
1661 #line 1662 "configure"
1662 #include "confdefs.h"
1663 /* System header to define __stub macros and hopefully few prototypes,
1664     which can conflict with char $ac_func(); below.  */
1665 #include <assert.h>
1666 /* Override any gcc2 internal prototype to avoid an error.  */
1667 /* We use char because int might match the return type of a gcc2
1668     builtin and then its argument prototype would still apply.  */
1669 char $ac_func();
1670
1671 int main() {
1672
1673 /* The GNU C library defines this for functions which it implements
1674     to always fail with ENOSYS.  Some functions are actually named
1675     something starting with __ and the normal name is an alias.  */
1676 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1677 choke me
1678 #else
1679 $ac_func();
1680 #endif
1681
1682 ; return 0; }
1683 EOF
1684 if { (eval echo configure:1685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1685   rm -rf conftest*
1686   eval "ac_cv_func_$ac_func=yes"
1687 else
1688   echo "configure: failed program was:" >&5
1689   cat conftest.$ac_ext >&5
1690   rm -rf conftest*
1691   eval "ac_cv_func_$ac_func=no"
1692 fi
1693 rm -f conftest*
1694 fi
1695
1696 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1697   echo "$ac_t""yes" 1>&6
1698   cat >> confdefs.h <<EOF
1699 #define CRAY_STACKSEG_END $ac_func
1700 EOF
1701
1702   break
1703 else
1704   echo "$ac_t""no" 1>&6
1705 fi
1706
1707 done
1708 fi
1709
1710 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
1711 echo "configure:1712: checking stack direction for C alloca" >&5
1712 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
1713   echo $ac_n "(cached) $ac_c" 1>&6
1714 else
1715   if test "$cross_compiling" = yes; then
1716   ac_cv_c_stack_direction=0
1717 else
1718   cat > conftest.$ac_ext <<EOF
1719 #line 1720 "configure"
1720 #include "confdefs.h"
1721 find_stack_direction ()
1722 {
1723   static char *addr = 0;
1724   auto char dummy;
1725   if (addr == 0)
1726     {
1727       addr = &dummy;
1728       return find_stack_direction ();
1729     }
1730   else
1731     return (&dummy > addr) ? 1 : -1;
1732 }
1733 main ()
1734 {
1735   exit (find_stack_direction() < 0);
1736 }
1737 EOF
1738 if { (eval echo configure:1739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1739 then
1740   ac_cv_c_stack_direction=1
1741 else
1742   echo "configure: failed program was:" >&5
1743   cat conftest.$ac_ext >&5
1744   rm -fr conftest*
1745   ac_cv_c_stack_direction=-1
1746 fi
1747 rm -fr conftest*
1748 fi
1749
1750 fi
1751
1752 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
1753 cat >> confdefs.h <<EOF
1754 #define STACK_DIRECTION $ac_cv_c_stack_direction
1755 EOF
1756
1757 fi
1758
1759 for ac_hdr in unistd.h
1760 do
1761 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1762 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1763 echo "configure:1764: checking for $ac_hdr" >&5
1764 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1765   echo $ac_n "(cached) $ac_c" 1>&6
1766 else
1767   cat > conftest.$ac_ext <<EOF
1768 #line 1769 "configure"
1769 #include "confdefs.h"
1770 #include <$ac_hdr>
1771 EOF
1772 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1773 { (eval echo configure:1774: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1774 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1775 if test -z "$ac_err"; then
1776   rm -rf conftest*
1777   eval "ac_cv_header_$ac_safe=yes"
1778 else
1779   echo "$ac_err" >&5
1780   echo "configure: failed program was:" >&5
1781   cat conftest.$ac_ext >&5
1782   rm -rf conftest*
1783   eval "ac_cv_header_$ac_safe=no"
1784 fi
1785 rm -f conftest*
1786 fi
1787 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1788   echo "$ac_t""yes" 1>&6
1789     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1790   cat >> confdefs.h <<EOF
1791 #define $ac_tr_hdr 1
1792 EOF
1793  
1794 else
1795   echo "$ac_t""no" 1>&6
1796 fi
1797 done
1798
1799 for ac_func in getpagesize
1800 do
1801 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1802 echo "configure:1803: checking for $ac_func" >&5
1803 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1804   echo $ac_n "(cached) $ac_c" 1>&6
1805 else
1806   cat > conftest.$ac_ext <<EOF
1807 #line 1808 "configure"
1808 #include "confdefs.h"
1809 /* System header to define __stub macros and hopefully few prototypes,
1810     which can conflict with char $ac_func(); below.  */
1811 #include <assert.h>
1812 /* Override any gcc2 internal prototype to avoid an error.  */
1813 /* We use char because int might match the return type of a gcc2
1814     builtin and then its argument prototype would still apply.  */
1815 char $ac_func();
1816
1817 int main() {
1818
1819 /* The GNU C library defines this for functions which it implements
1820     to always fail with ENOSYS.  Some functions are actually named
1821     something starting with __ and the normal name is an alias.  */
1822 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1823 choke me
1824 #else
1825 $ac_func();
1826 #endif
1827
1828 ; return 0; }
1829 EOF
1830 if { (eval echo configure:1831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1831   rm -rf conftest*
1832   eval "ac_cv_func_$ac_func=yes"
1833 else
1834   echo "configure: failed program was:" >&5
1835   cat conftest.$ac_ext >&5
1836   rm -rf conftest*
1837   eval "ac_cv_func_$ac_func=no"
1838 fi
1839 rm -f conftest*
1840 fi
1841
1842 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1843   echo "$ac_t""yes" 1>&6
1844     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1845   cat >> confdefs.h <<EOF
1846 #define $ac_tr_func 1
1847 EOF
1848  
1849 else
1850   echo "$ac_t""no" 1>&6
1851 fi
1852 done
1853
1854 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
1855 echo "configure:1856: checking for working mmap" >&5
1856 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
1857   echo $ac_n "(cached) $ac_c" 1>&6
1858 else
1859   if test "$cross_compiling" = yes; then
1860   ac_cv_func_mmap_fixed_mapped=no
1861 else
1862   cat > conftest.$ac_ext <<EOF
1863 #line 1864 "configure"
1864 #include "confdefs.h"
1865
1866 /* Thanks to Mike Haertel and Jim Avera for this test.
1867    Here is a matrix of mmap possibilities:
1868         mmap private not fixed
1869         mmap private fixed at somewhere currently unmapped
1870         mmap private fixed at somewhere already mapped
1871         mmap shared not fixed
1872         mmap shared fixed at somewhere currently unmapped
1873         mmap shared fixed at somewhere already mapped
1874    For private mappings, we should verify that changes cannot be read()
1875    back from the file, nor mmap's back from the file at a different
1876    address.  (There have been systems where private was not correctly
1877    implemented like the infamous i386 svr4.0, and systems where the
1878    VM page cache was not coherent with the filesystem buffer cache
1879    like early versions of FreeBSD and possibly contemporary NetBSD.)
1880    For shared mappings, we should conversely verify that changes get
1881    propogated back to all the places they're supposed to be.
1882
1883    Grep wants private fixed already mapped.
1884    The main things grep needs to know about mmap are:
1885    * does it exist and is it safe to write into the mmap'd area
1886    * how to use it (BSD variants)  */
1887 #include <sys/types.h>
1888 #include <fcntl.h>
1889 #include <sys/mman.h>
1890
1891 /* This mess was copied from the GNU getpagesize.h.  */
1892 #ifndef HAVE_GETPAGESIZE
1893 # ifdef HAVE_UNISTD_H
1894 #  include <unistd.h>
1895 # endif
1896
1897 /* Assume that all systems that can run configure have sys/param.h.  */
1898 # ifndef HAVE_SYS_PARAM_H
1899 #  define HAVE_SYS_PARAM_H 1
1900 # endif
1901
1902 # ifdef _SC_PAGESIZE
1903 #  define getpagesize() sysconf(_SC_PAGESIZE)
1904 # else /* no _SC_PAGESIZE */
1905 #  ifdef HAVE_SYS_PARAM_H
1906 #   include <sys/param.h>
1907 #   ifdef EXEC_PAGESIZE
1908 #    define getpagesize() EXEC_PAGESIZE
1909 #   else /* no EXEC_PAGESIZE */
1910 #    ifdef NBPG
1911 #     define getpagesize() NBPG * CLSIZE
1912 #     ifndef CLSIZE
1913 #      define CLSIZE 1
1914 #     endif /* no CLSIZE */
1915 #    else /* no NBPG */
1916 #     ifdef NBPC
1917 #      define getpagesize() NBPC
1918 #     else /* no NBPC */
1919 #      ifdef PAGESIZE
1920 #       define getpagesize() PAGESIZE
1921 #      endif /* PAGESIZE */
1922 #     endif /* no NBPC */
1923 #    endif /* no NBPG */
1924 #   endif /* no EXEC_PAGESIZE */
1925 #  else /* no HAVE_SYS_PARAM_H */
1926 #   define getpagesize() 8192   /* punt totally */
1927 #  endif /* no HAVE_SYS_PARAM_H */
1928 # endif /* no _SC_PAGESIZE */
1929
1930 #endif /* no HAVE_GETPAGESIZE */
1931
1932 #ifdef __cplusplus
1933 extern "C" { void *malloc(unsigned); }
1934 #else
1935 char *malloc();
1936 #endif
1937
1938 int
1939 main()
1940 {
1941         char *data, *data2, *data3;
1942         int i, pagesize;
1943         int fd;
1944
1945         pagesize = getpagesize();
1946
1947         /*
1948          * First, make a file with some known garbage in it.
1949          */
1950         data = malloc(pagesize);
1951         if (!data)
1952                 exit(1);
1953         for (i = 0; i < pagesize; ++i)
1954                 *(data + i) = rand();
1955         umask(0);
1956         fd = creat("conftestmmap", 0600);
1957         if (fd < 0)
1958                 exit(1);
1959         if (write(fd, data, pagesize) != pagesize)
1960                 exit(1);
1961         close(fd);
1962
1963         /*
1964          * Next, try to mmap the file at a fixed address which
1965          * already has something else allocated at it.  If we can,
1966          * also make sure that we see the same garbage.
1967          */
1968         fd = open("conftestmmap", O_RDWR);
1969         if (fd < 0)
1970                 exit(1);
1971         data2 = malloc(2 * pagesize);
1972         if (!data2)
1973                 exit(1);
1974         data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
1975         if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
1976             MAP_PRIVATE | MAP_FIXED, fd, 0L))
1977                 exit(1);
1978         for (i = 0; i < pagesize; ++i)
1979                 if (*(data + i) != *(data2 + i))
1980                         exit(1);
1981
1982         /*
1983          * Finally, make sure that changes to the mapped area
1984          * do not percolate back to the file as seen by read().
1985          * (This is a bug on some variants of i386 svr4.0.)
1986          */
1987         for (i = 0; i < pagesize; ++i)
1988                 *(data2 + i) = *(data2 + i) + 1;
1989         data3 = malloc(pagesize);
1990         if (!data3)
1991                 exit(1);
1992         if (read(fd, data3, pagesize) != pagesize)
1993                 exit(1);
1994         for (i = 0; i < pagesize; ++i)
1995                 if (*(data + i) != *(data3 + i))
1996                         exit(1);
1997         close(fd);
1998         unlink("conftestmmap");
1999         exit(0);
2000 }
2001
2002 EOF
2003 if { (eval echo configure:2004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2004 then
2005   ac_cv_func_mmap_fixed_mapped=yes
2006 else
2007   echo "configure: failed program was:" >&5
2008   cat conftest.$ac_ext >&5
2009   rm -fr conftest*
2010   ac_cv_func_mmap_fixed_mapped=no
2011 fi
2012 rm -fr conftest*
2013 fi
2014
2015 fi
2016
2017 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
2018 if test $ac_cv_func_mmap_fixed_mapped = yes; then
2019   cat >> confdefs.h <<\EOF
2020 #define HAVE_MMAP 1
2021 EOF
2022
2023 fi
2024
2025
2026     echo $ac_n "checking whether we are using the GNU C Library 2.1 or newer""... $ac_c" 1>&6
2027 echo "configure:2028: checking whether we are using the GNU C Library 2.1 or newer" >&5
2028 if eval "test \"`echo '$''{'ac_cv_gnu_library_2_1'+set}'`\" = set"; then
2029   echo $ac_n "(cached) $ac_c" 1>&6
2030 else
2031   cat > conftest.$ac_ext <<EOF
2032 #line 2033 "configure"
2033 #include "confdefs.h"
2034
2035 #include <features.h>
2036 #ifdef __GNU_LIBRARY__
2037  #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
2038   Lucky GNU user
2039  #endif
2040 #endif
2041         
2042 EOF
2043 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2044   egrep "Lucky GNU user" >/dev/null 2>&1; then
2045   rm -rf conftest*
2046   ac_cv_gnu_library_2_1=yes
2047 else
2048   rm -rf conftest*
2049   ac_cv_gnu_library_2_1=no
2050 fi
2051 rm -f conftest*
2052
2053       
2054     
2055 fi
2056
2057 echo "$ac_t""$ac_cv_gnu_library_2_1" 1>&6
2058     
2059     GLIBC21="$ac_cv_gnu_library_2_1"
2060   
2061
2062                                     
2063    for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
2064 stdlib.h string.h unistd.h sys/param.h
2065 do
2066 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2067 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2068 echo "configure:2069: checking for $ac_hdr" >&5
2069 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2070   echo $ac_n "(cached) $ac_c" 1>&6
2071 else
2072   cat > conftest.$ac_ext <<EOF
2073 #line 2074 "configure"
2074 #include "confdefs.h"
2075 #include <$ac_hdr>
2076 EOF
2077 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2078 { (eval echo configure:2079: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2079 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2080 if test -z "$ac_err"; then
2081   rm -rf conftest*
2082   eval "ac_cv_header_$ac_safe=yes"
2083 else
2084   echo "$ac_err" >&5
2085   echo "configure: failed program was:" >&5
2086   cat conftest.$ac_ext >&5
2087   rm -rf conftest*
2088   eval "ac_cv_header_$ac_safe=no"
2089 fi
2090 rm -f conftest*
2091 fi
2092 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2093   echo "$ac_t""yes" 1>&6
2094     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2095   cat >> confdefs.h <<EOF
2096 #define $ac_tr_hdr 1
2097 EOF
2098  
2099 else
2100   echo "$ac_t""no" 1>&6
2101 fi
2102 done
2103
2104    for ac_func in feof_unlocked fgets_unlocked getcwd getegid geteuid \
2105 getgid getuid mempcpy munmap putenv setenv setlocale stpcpy strchr strcasecmp \
2106 strdup strtoul tsearch __argz_count __argz_stringify __argz_next
2107 do
2108 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2109 echo "configure:2110: checking for $ac_func" >&5
2110 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2111   echo $ac_n "(cached) $ac_c" 1>&6
2112 else
2113   cat > conftest.$ac_ext <<EOF
2114 #line 2115 "configure"
2115 #include "confdefs.h"
2116 /* System header to define __stub macros and hopefully few prototypes,
2117     which can conflict with char $ac_func(); below.  */
2118 #include <assert.h>
2119 /* Override any gcc2 internal prototype to avoid an error.  */
2120 /* We use char because int might match the return type of a gcc2
2121     builtin and then its argument prototype would still apply.  */
2122 char $ac_func();
2123
2124 int main() {
2125
2126 /* The GNU C library defines this for functions which it implements
2127     to always fail with ENOSYS.  Some functions are actually named
2128     something starting with __ and the normal name is an alias.  */
2129 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2130 choke me
2131 #else
2132 $ac_func();
2133 #endif
2134
2135 ; return 0; }
2136 EOF
2137 if { (eval echo configure:2138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2138   rm -rf conftest*
2139   eval "ac_cv_func_$ac_func=yes"
2140 else
2141   echo "configure: failed program was:" >&5
2142   cat conftest.$ac_ext >&5
2143   rm -rf conftest*
2144   eval "ac_cv_func_$ac_func=no"
2145 fi
2146 rm -f conftest*
2147 fi
2148
2149 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2150   echo "$ac_t""yes" 1>&6
2151     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2152   cat >> confdefs.h <<EOF
2153 #define $ac_tr_func 1
2154 EOF
2155  
2156 else
2157   echo "$ac_t""no" 1>&6
2158 fi
2159 done
2160
2161
2162    
2163     
2164   # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
2165 if test "${with_libiconv_prefix+set}" = set; then
2166   withval="$with_libiconv_prefix"
2167   
2168     for dir in `echo "$withval" | tr : ' '`; do
2169       if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
2170       if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
2171     done
2172    
2173 fi
2174
2175
2176   echo $ac_n "checking for iconv""... $ac_c" 1>&6
2177 echo "configure:2178: checking for iconv" >&5
2178 if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
2179   echo $ac_n "(cached) $ac_c" 1>&6
2180 else
2181   
2182     am_cv_func_iconv="no, consider installing GNU libiconv"
2183     am_cv_lib_iconv=no
2184     cat > conftest.$ac_ext <<EOF
2185 #line 2186 "configure"
2186 #include "confdefs.h"
2187 #include <stdlib.h>
2188 #include <iconv.h>
2189 int main() {
2190 iconv_t cd = iconv_open("","");
2191        iconv(cd,NULL,NULL,NULL,NULL);
2192        iconv_close(cd);
2193 ; return 0; }
2194 EOF
2195 if { (eval echo configure:2196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2196   rm -rf conftest*
2197   am_cv_func_iconv=yes
2198 else
2199   echo "configure: failed program was:" >&5
2200   cat conftest.$ac_ext >&5
2201 fi
2202 rm -f conftest*
2203     if test "$am_cv_func_iconv" != yes; then
2204       am_save_LIBS="$LIBS"
2205       LIBS="$LIBS -liconv"
2206       cat > conftest.$ac_ext <<EOF
2207 #line 2208 "configure"
2208 #include "confdefs.h"
2209 #include <stdlib.h>
2210 #include <iconv.h>
2211 int main() {
2212 iconv_t cd = iconv_open("","");
2213          iconv(cd,NULL,NULL,NULL,NULL);
2214          iconv_close(cd);
2215 ; return 0; }
2216 EOF
2217 if { (eval echo configure:2218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2218   rm -rf conftest*
2219   am_cv_lib_iconv=yes
2220         am_cv_func_iconv=yes
2221 else
2222   echo "configure: failed program was:" >&5
2223   cat conftest.$ac_ext >&5
2224 fi
2225 rm -f conftest*
2226       LIBS="$am_save_LIBS"
2227     fi
2228   
2229 fi
2230
2231 echo "$ac_t""$am_cv_func_iconv" 1>&6
2232   if test "$am_cv_func_iconv" = yes; then
2233     cat >> confdefs.h <<\EOF
2234 #define HAVE_ICONV 1
2235 EOF
2236
2237     echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
2238 echo "configure:2239: checking for iconv declaration" >&5
2239     if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
2240   echo $ac_n "(cached) $ac_c" 1>&6
2241 else
2242   
2243       cat > conftest.$ac_ext <<EOF
2244 #line 2245 "configure"
2245 #include "confdefs.h"
2246
2247 #include <stdlib.h>
2248 #include <iconv.h>
2249 extern
2250 #ifdef __cplusplus
2251 "C"
2252 #endif
2253 #if defined(__STDC__) || defined(__cplusplus)
2254 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
2255 #else
2256 size_t iconv();
2257 #endif
2258
2259 int main() {
2260
2261 ; return 0; }
2262 EOF
2263 if { (eval echo configure:2264: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2264   rm -rf conftest*
2265   am_cv_proto_iconv_arg1=""
2266 else
2267   echo "configure: failed program was:" >&5
2268   cat conftest.$ac_ext >&5
2269   rm -rf conftest*
2270   am_cv_proto_iconv_arg1="const"
2271 fi
2272 rm -f conftest*
2273       am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"
2274 fi
2275
2276     am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
2277     echo "$ac_t""${ac_t:-
2278          }$am_cv_proto_iconv" 1>&6
2279     cat >> confdefs.h <<EOF
2280 #define ICONV_CONST $am_cv_proto_iconv_arg1
2281 EOF
2282
2283   fi
2284   LIBICONV=
2285   if test "$am_cv_lib_iconv" = yes; then
2286     LIBICONV="-liconv"
2287   fi
2288   
2289
2290    
2291   echo $ac_n "checking for nl_langinfo and CODESET""... $ac_c" 1>&6
2292 echo "configure:2293: checking for nl_langinfo and CODESET" >&5
2293 if eval "test \"`echo '$''{'am_cv_langinfo_codeset'+set}'`\" = set"; then
2294   echo $ac_n "(cached) $ac_c" 1>&6
2295 else
2296   cat > conftest.$ac_ext <<EOF
2297 #line 2298 "configure"
2298 #include "confdefs.h"
2299 #include <langinfo.h>
2300 int main() {
2301 char* cs = nl_langinfo(CODESET);
2302 ; return 0; }
2303 EOF
2304 if { (eval echo configure:2305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2305   rm -rf conftest*
2306   am_cv_langinfo_codeset=yes
2307 else
2308   echo "configure: failed program was:" >&5
2309   cat conftest.$ac_ext >&5
2310   rm -rf conftest*
2311   am_cv_langinfo_codeset=no
2312 fi
2313 rm -f conftest*
2314     
2315 fi
2316
2317 echo "$ac_t""$am_cv_langinfo_codeset" 1>&6
2318   if test $am_cv_langinfo_codeset = yes; then
2319     cat >> confdefs.h <<\EOF
2320 #define HAVE_LANGINFO_CODESET 1
2321 EOF
2322
2323   fi
2324
2325    if test $ac_cv_header_locale_h = yes; then
2326     echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
2327 echo "configure:2328: checking for LC_MESSAGES" >&5
2328 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
2329   echo $ac_n "(cached) $ac_c" 1>&6
2330 else
2331   cat > conftest.$ac_ext <<EOF
2332 #line 2333 "configure"
2333 #include "confdefs.h"
2334 #include <locale.h>
2335 int main() {
2336 return LC_MESSAGES
2337 ; return 0; }
2338 EOF
2339 if { (eval echo configure:2340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2340   rm -rf conftest*
2341   am_cv_val_LC_MESSAGES=yes
2342 else
2343   echo "configure: failed program was:" >&5
2344   cat conftest.$ac_ext >&5
2345   rm -rf conftest*
2346   am_cv_val_LC_MESSAGES=no
2347 fi
2348 rm -f conftest*
2349 fi
2350
2351 echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
2352     if test $am_cv_val_LC_MESSAGES = yes; then
2353       cat >> confdefs.h <<\EOF
2354 #define HAVE_LC_MESSAGES 1
2355 EOF
2356
2357     fi
2358   fi
2359    echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
2360 echo "configure:2361: checking whether NLS is requested" >&5
2361         # Check whether --enable-nls or --disable-nls was given.
2362 if test "${enable_nls+set}" = set; then
2363   enableval="$enable_nls"
2364   USE_NLS=$enableval
2365 else
2366   USE_NLS=yes
2367 fi
2368
2369     echo "$ac_t""$USE_NLS" 1>&6
2370     
2371
2372     BUILD_INCLUDED_LIBINTL=no
2373     USE_INCLUDED_LIBINTL=no
2374     INTLLIBS=
2375
2376         if test "$USE_NLS" = "yes"; then
2377       cat >> confdefs.h <<\EOF
2378 #define ENABLE_NLS 1
2379 EOF
2380
2381       echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
2382 echo "configure:2383: checking whether included gettext is requested" >&5
2383       # Check whether --with-included-gettext or --without-included-gettext was given.
2384 if test "${with_included_gettext+set}" = set; then
2385   withval="$with_included_gettext"
2386   nls_cv_force_use_gnu_gettext=$withval
2387 else
2388   nls_cv_force_use_gnu_gettext=no
2389 fi
2390
2391       echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
2392
2393       nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
2394       if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
2395                                 CATOBJEXT=NONE
2396
2397                 
2398         
2399
2400         ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
2401 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
2402 echo "configure:2403: checking for libintl.h" >&5
2403 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2404   echo $ac_n "(cached) $ac_c" 1>&6
2405 else
2406   cat > conftest.$ac_ext <<EOF
2407 #line 2408 "configure"
2408 #include "confdefs.h"
2409 #include <libintl.h>
2410 EOF
2411 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2412 { (eval echo configure:2413: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2413 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2414 if test -z "$ac_err"; then
2415   rm -rf conftest*
2416   eval "ac_cv_header_$ac_safe=yes"
2417 else
2418   echo "$ac_err" >&5
2419   echo "configure: failed program was:" >&5
2420   cat conftest.$ac_ext >&5
2421   rm -rf conftest*
2422   eval "ac_cv_header_$ac_safe=no"
2423 fi
2424 rm -f conftest*
2425 fi
2426 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2427   echo "$ac_t""yes" 1>&6
2428   echo $ac_n "checking for GNU gettext in libc""... $ac_c" 1>&6
2429 echo "configure:2430: checking for GNU gettext in libc" >&5
2430 if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libc'+set}'`\" = set"; then
2431   echo $ac_n "(cached) $ac_c" 1>&6
2432 else
2433   cat > conftest.$ac_ext <<EOF
2434 #line 2435 "configure"
2435 #include "confdefs.h"
2436 #include <libintl.h>
2437 extern int _nl_msg_cat_cntr;
2438 int main() {
2439 bindtextdomain ("", "");
2440 return (int) gettext ("") + _nl_msg_cat_cntr
2441 ; return 0; }
2442 EOF
2443 if { (eval echo configure:2444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2444   rm -rf conftest*
2445   gt_cv_func_gnugettext1_libc=yes
2446 else
2447   echo "configure: failed program was:" >&5
2448   cat conftest.$ac_ext >&5
2449   rm -rf conftest*
2450   gt_cv_func_gnugettext1_libc=no
2451 fi
2452 rm -f conftest*
2453 fi
2454
2455 echo "$ac_t""$gt_cv_func_gnugettext1_libc" 1>&6
2456
2457            if test "$gt_cv_func_gnugettext1_libc" != "yes"; then
2458              echo $ac_n "checking for GNU gettext in libintl""... $ac_c" 1>&6
2459 echo "configure:2460: checking for GNU gettext in libintl" >&5
2460 if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libintl'+set}'`\" = set"; then
2461   echo $ac_n "(cached) $ac_c" 1>&6
2462 else
2463   gt_save_LIBS="$LIBS"
2464                 LIBS="$LIBS -lintl $LIBICONV"
2465                 cat > conftest.$ac_ext <<EOF
2466 #line 2467 "configure"
2467 #include "confdefs.h"
2468 #include <libintl.h>
2469 extern int _nl_msg_cat_cntr;
2470 int main() {
2471 bindtextdomain ("", "");
2472 return (int) gettext ("") + _nl_msg_cat_cntr
2473 ; return 0; }
2474 EOF
2475 if { (eval echo configure:2476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2476   rm -rf conftest*
2477   gt_cv_func_gnugettext1_libintl=yes
2478 else
2479   echo "configure: failed program was:" >&5
2480   cat conftest.$ac_ext >&5
2481   rm -rf conftest*
2482   gt_cv_func_gnugettext1_libintl=no
2483 fi
2484 rm -f conftest*
2485                 LIBS="$gt_save_LIBS"
2486 fi
2487
2488 echo "$ac_t""$gt_cv_func_gnugettext1_libintl" 1>&6
2489            fi
2490
2491                                            if test "$gt_cv_func_gnugettext1_libc" = "yes" \
2492               || { test "$gt_cv_func_gnugettext1_libintl" = "yes" \
2493                    && test "$PACKAGE" != gettext; }; then
2494              cat >> confdefs.h <<\EOF
2495 #define HAVE_GETTEXT 1
2496 EOF
2497
2498
2499              if test "$gt_cv_func_gnugettext1_libintl" = "yes"; then
2500                                        INTLLIBS="-lintl $LIBICONV"
2501              fi
2502
2503              gt_save_LIBS="$LIBS"
2504              LIBS="$LIBS $INTLLIBS"
2505              for ac_func in dcgettext
2506 do
2507 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2508 echo "configure:2509: checking for $ac_func" >&5
2509 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2510   echo $ac_n "(cached) $ac_c" 1>&6
2511 else
2512   cat > conftest.$ac_ext <<EOF
2513 #line 2514 "configure"
2514 #include "confdefs.h"
2515 /* System header to define __stub macros and hopefully few prototypes,
2516     which can conflict with char $ac_func(); below.  */
2517 #include <assert.h>
2518 /* Override any gcc2 internal prototype to avoid an error.  */
2519 /* We use char because int might match the return type of a gcc2
2520     builtin and then its argument prototype would still apply.  */
2521 char $ac_func();
2522
2523 int main() {
2524
2525 /* The GNU C library defines this for functions which it implements
2526     to always fail with ENOSYS.  Some functions are actually named
2527     something starting with __ and the normal name is an alias.  */
2528 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2529 choke me
2530 #else
2531 $ac_func();
2532 #endif
2533
2534 ; return 0; }
2535 EOF
2536 if { (eval echo configure:2537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2537   rm -rf conftest*
2538   eval "ac_cv_func_$ac_func=yes"
2539 else
2540   echo "configure: failed program was:" >&5
2541   cat conftest.$ac_ext >&5
2542   rm -rf conftest*
2543   eval "ac_cv_func_$ac_func=no"
2544 fi
2545 rm -f conftest*
2546 fi
2547
2548 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2549   echo "$ac_t""yes" 1>&6
2550     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2551   cat >> confdefs.h <<EOF
2552 #define $ac_tr_func 1
2553 EOF
2554  
2555 else
2556   echo "$ac_t""no" 1>&6
2557 fi
2558 done
2559
2560              LIBS="$gt_save_LIBS"
2561
2562                      # Extract the first word of "msgfmt", so it can be a program name with args.
2563 set dummy msgfmt; ac_word=$2
2564 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2565 echo "configure:2566: checking for $ac_word" >&5
2566 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2567   echo $ac_n "(cached) $ac_c" 1>&6
2568 else
2569   case "$MSGFMT" in
2570   /*)
2571   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2572   ;;
2573   *)
2574   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2575   for ac_dir in $PATH; do
2576     test -z "$ac_dir" && ac_dir=.
2577     if test -f $ac_dir/$ac_word; then
2578       if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1; then
2579         ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2580         break
2581       fi
2582     fi
2583   done
2584   IFS="$ac_save_ifs"
2585   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
2586   ;;
2587 esac
2588 fi
2589 MSGFMT="$ac_cv_path_MSGFMT"
2590 if test "$MSGFMT" != ":"; then
2591   echo "$ac_t""$MSGFMT" 1>&6
2592 else
2593   echo "$ac_t""no" 1>&6
2594 fi
2595
2596              # Extract the first word of "gmsgfmt", so it can be a program name with args.
2597 set dummy gmsgfmt; ac_word=$2
2598 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2599 echo "configure:2600: checking for $ac_word" >&5
2600 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2601   echo $ac_n "(cached) $ac_c" 1>&6
2602 else
2603   case "$GMSGFMT" in
2604   /*)
2605   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2606   ;;
2607   ?:/*)                  
2608   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2609   ;;
2610   *)
2611   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2612   ac_dummy="$PATH"
2613   for ac_dir in $ac_dummy; do 
2614     test -z "$ac_dir" && ac_dir=.
2615     if test -f $ac_dir/$ac_word; then
2616       ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2617       break
2618     fi
2619   done
2620   IFS="$ac_save_ifs"
2621   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2622   ;;
2623 esac
2624 fi
2625 GMSGFMT="$ac_cv_path_GMSGFMT"
2626 if test -n "$GMSGFMT"; then
2627   echo "$ac_t""$GMSGFMT" 1>&6
2628 else
2629   echo "$ac_t""no" 1>&6
2630 fi
2631
2632
2633                      # Extract the first word of "xgettext", so it can be a program name with args.
2634 set dummy xgettext; ac_word=$2
2635 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2636 echo "configure:2637: checking for $ac_word" >&5
2637 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2638   echo $ac_n "(cached) $ac_c" 1>&6
2639 else
2640   case "$XGETTEXT" in
2641   /*)
2642   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2643   ;;
2644   *)
2645   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2646   for ac_dir in $PATH; do
2647     test -z "$ac_dir" && ac_dir=.
2648     if test -f $ac_dir/$ac_word; then
2649       if $ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1; then
2650         ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2651         break
2652       fi
2653     fi
2654   done
2655   IFS="$ac_save_ifs"
2656   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2657   ;;
2658 esac
2659 fi
2660 XGETTEXT="$ac_cv_path_XGETTEXT"
2661 if test "$XGETTEXT" != ":"; then
2662   echo "$ac_t""$XGETTEXT" 1>&6
2663 else
2664   echo "$ac_t""no" 1>&6
2665 fi
2666
2667
2668              CATOBJEXT=.gmo
2669            fi
2670         
2671 else
2672   echo "$ac_t""no" 1>&6
2673 fi
2674
2675
2676         if test "$CATOBJEXT" = "NONE"; then
2677                           nls_cv_use_gnu_gettext=yes
2678         fi
2679       fi
2680
2681       if test "$nls_cv_use_gnu_gettext" = "yes"; then
2682                 INTLOBJS="\$(GETTOBJS)"
2683         # Extract the first word of "msgfmt", so it can be a program name with args.
2684 set dummy msgfmt; ac_word=$2
2685 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2686 echo "configure:2687: checking for $ac_word" >&5
2687 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2688   echo $ac_n "(cached) $ac_c" 1>&6
2689 else
2690   case "$MSGFMT" in
2691   /*)
2692   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2693   ;;
2694   *)
2695   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2696   for ac_dir in $PATH; do
2697     test -z "$ac_dir" && ac_dir=.
2698     if test -f $ac_dir/$ac_word; then
2699       if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1; then
2700         ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2701         break
2702       fi
2703     fi
2704   done
2705   IFS="$ac_save_ifs"
2706   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
2707   ;;
2708 esac
2709 fi
2710 MSGFMT="$ac_cv_path_MSGFMT"
2711 if test "$MSGFMT" != ":"; then
2712   echo "$ac_t""$MSGFMT" 1>&6
2713 else
2714   echo "$ac_t""no" 1>&6
2715 fi
2716
2717         # Extract the first word of "gmsgfmt", so it can be a program name with args.
2718 set dummy gmsgfmt; ac_word=$2
2719 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2720 echo "configure:2721: checking for $ac_word" >&5
2721 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2722   echo $ac_n "(cached) $ac_c" 1>&6
2723 else
2724   case "$GMSGFMT" in
2725   /*)
2726   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2727   ;;
2728   ?:/*)                  
2729   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2730   ;;
2731   *)
2732   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2733   ac_dummy="$PATH"
2734   for ac_dir in $ac_dummy; do 
2735     test -z "$ac_dir" && ac_dir=.
2736     if test -f $ac_dir/$ac_word; then
2737       ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2738       break
2739     fi
2740   done
2741   IFS="$ac_save_ifs"
2742   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2743   ;;
2744 esac
2745 fi
2746 GMSGFMT="$ac_cv_path_GMSGFMT"
2747 if test -n "$GMSGFMT"; then
2748   echo "$ac_t""$GMSGFMT" 1>&6
2749 else
2750   echo "$ac_t""no" 1>&6
2751 fi
2752
2753         # Extract the first word of "xgettext", so it can be a program name with args.
2754 set dummy xgettext; ac_word=$2
2755 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2756 echo "configure:2757: checking for $ac_word" >&5
2757 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2758   echo $ac_n "(cached) $ac_c" 1>&6
2759 else
2760   case "$XGETTEXT" in
2761   /*)
2762   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2763   ;;
2764   *)
2765   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2766   for ac_dir in $PATH; do
2767     test -z "$ac_dir" && ac_dir=.
2768     if test -f $ac_dir/$ac_word; then
2769       if $ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1; then
2770         ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2771         break
2772       fi
2773     fi
2774   done
2775   IFS="$ac_save_ifs"
2776   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2777   ;;
2778 esac
2779 fi
2780 XGETTEXT="$ac_cv_path_XGETTEXT"
2781 if test "$XGETTEXT" != ":"; then
2782   echo "$ac_t""$XGETTEXT" 1>&6
2783 else
2784   echo "$ac_t""no" 1>&6
2785 fi
2786
2787         
2788         BUILD_INCLUDED_LIBINTL=yes
2789         USE_INCLUDED_LIBINTL=yes
2790         CATOBJEXT=.gmo
2791         INTLLIBS="\$(top_builddir)/intl/libintl.a $LIBICONV"
2792         LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
2793       fi
2794
2795                   if test "$GMSGFMT" != ":"; then
2796                         if $GMSGFMT --statistics /dev/null >/dev/null 2>&1; then
2797           : ;
2798         else
2799           echo "$ac_t""found msgfmt program is not GNU msgfmt; ignore it" 1>&6
2800           GMSGFMT=":"
2801         fi
2802       fi
2803
2804                   if test "$XGETTEXT" != ":"; then
2805                         if $XGETTEXT --omit-header /dev/null >/dev/null 2>&1; then
2806           : ;
2807         else
2808           echo "$ac_t""found xgettext program is not GNU xgettext; ignore it" 1>&6
2809           XGETTEXT=":"
2810         fi
2811       fi
2812
2813             POSUB=po
2814     fi
2815     
2816
2817
2818             if test "$PACKAGE" = gettext; then
2819       BUILD_INCLUDED_LIBINTL=yes
2820     fi
2821
2822                                             for ac_prog in bison
2823 do
2824 # Extract the first word of "$ac_prog", so it can be a program name with args.
2825 set dummy $ac_prog; ac_word=$2
2826 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2827 echo "configure:2828: checking for $ac_word" >&5
2828 if eval "test \"`echo '$''{'ac_cv_prog_INTLBISON'+set}'`\" = set"; then
2829   echo $ac_n "(cached) $ac_c" 1>&6
2830 else
2831   if test -n "$INTLBISON"; then
2832   ac_cv_prog_INTLBISON="$INTLBISON" # Let the user override the test.
2833 else
2834   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2835   ac_dummy="$PATH"
2836   for ac_dir in $ac_dummy; do
2837     test -z "$ac_dir" && ac_dir=.
2838     if test -f $ac_dir/$ac_word; then
2839       ac_cv_prog_INTLBISON="$ac_prog"
2840       break
2841     fi
2842   done
2843   IFS="$ac_save_ifs"
2844 fi
2845 fi
2846 INTLBISON="$ac_cv_prog_INTLBISON"
2847 if test -n "$INTLBISON"; then
2848   echo "$ac_t""$INTLBISON" 1>&6
2849 else
2850   echo "$ac_t""no" 1>&6
2851 fi
2852
2853 test -n "$INTLBISON" && break
2854 done
2855
2856     if test -z "$INTLBISON"; then
2857       ac_verc_fail=yes
2858     else
2859             echo $ac_n "checking version of bison""... $ac_c" 1>&6
2860 echo "configure:2861: checking version of bison" >&5
2861       ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
2862       case $ac_prog_version in
2863         '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
2864         1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
2865            ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
2866         *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
2867       esac
2868       echo "$ac_t""$ac_prog_version" 1>&6
2869     fi
2870     if test $ac_verc_fail = yes; then
2871       INTLBISON=:
2872     fi
2873
2874                 for lang in $ALL_LINGUAS; do
2875       GMOFILES="$GMOFILES $lang.gmo"
2876       POFILES="$POFILES $lang.po"
2877     done
2878
2879         
2880     
2881     
2882     
2883     
2884     
2885     
2886     
2887     
2888
2889         nls_cv_header_intl=
2890     nls_cv_header_libgt=
2891
2892         DATADIRNAME=share
2893     
2894
2895         INSTOBJEXT=.mo
2896     
2897
2898         GENCAT=gencat
2899     
2900   
2901
2902    if test "x$CATOBJEXT" != "x"; then
2903      if test "x$ALL_LINGUAS" = "x"; then
2904        LINGUAS=
2905      else
2906        echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
2907 echo "configure:2908: checking for catalogs to be installed" >&5
2908        NEW_LINGUAS=
2909        for presentlang in $ALL_LINGUAS; do
2910          useit=no
2911          for desiredlang in ${LINGUAS-$ALL_LINGUAS}; do
2912            # Use the presentlang catalog if desiredlang is
2913            #   a. equal to presentlang, or
2914            #   b. a variant of presentlang (because in this case,
2915            #      presentlang can be used as a fallback for messages
2916            #      which are not translated in the desiredlang catalog).
2917            case "$desiredlang" in
2918              "$presentlang"*) useit=yes;;
2919            esac
2920          done
2921          if test $useit = yes; then
2922            NEW_LINGUAS="$NEW_LINGUAS $presentlang"
2923          fi
2924        done
2925        LINGUAS=$NEW_LINGUAS
2926        echo "$ac_t""$LINGUAS" 1>&6
2927      fi
2928
2929           if test -n "$LINGUAS"; then
2930        for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
2931      fi
2932    fi
2933
2934             MKINSTALLDIRS=
2935    if test -n "$ac_aux_dir"; then
2936      MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
2937    fi
2938    if test -z "$MKINSTALLDIRS"; then
2939      MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
2940    fi
2941    
2942
2943       INTL_LIBTOOL_SUFFIX_PREFIX=
2944    
2945   
2946
2947 # Find a good install program.  We prefer a C program (faster),
2948 # so one script is as good as another.  But avoid the broken or
2949 # incompatible versions:
2950 # SysV /etc/install, /usr/sbin/install
2951 # SunOS /usr/etc/install
2952 # IRIX /sbin/install
2953 # AIX /bin/install
2954 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2955 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2956 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2957 # ./install, which can be erroneously created by make from ./install.sh.
2958 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2959 echo "configure:2960: checking for a BSD compatible install" >&5
2960 if test -z "$INSTALL"; then
2961 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
2962   echo $ac_n "(cached) $ac_c" 1>&6
2963 else
2964     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
2965   for ac_dir in $PATH; do
2966     # Account for people who put trailing slashes in PATH elements.
2967     case "$ac_dir/" in
2968     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2969     *)
2970       # OSF1 and SCO ODT 3.0 have their own names for install.
2971       # Don't use installbsd from OSF since it installs stuff as root
2972       # by default.
2973       for ac_prog in ginstall scoinst install; do
2974         if test -f $ac_dir/$ac_prog; then
2975           if test $ac_prog = install &&
2976             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2977             # AIX install.  It has an incompatible calling convention.
2978             :
2979           else
2980             ac_cv_path_install="$ac_dir/$ac_prog -c"
2981             break 2
2982           fi
2983         fi
2984       done
2985       ;;
2986     esac
2987   done
2988   IFS="$ac_save_IFS"
2989
2990 fi
2991   if test "${ac_cv_path_install+set}" = set; then
2992     INSTALL="$ac_cv_path_install"
2993   else
2994     # As a last resort, use the slow shell script.  We don't cache a
2995     # path for INSTALL within a source directory, because that will
2996     # break other packages using the cache if that directory is
2997     # removed, or if the path is relative.
2998     INSTALL="$ac_install_sh"
2999   fi
3000 fi
3001 echo "$ac_t""$INSTALL" 1>&6
3002
3003 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3004 # It thinks the first close brace ends the variable substitution.
3005 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3006
3007 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3008
3009 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3010
3011
3012 # Check whether --with-words or --without-words was given.
3013 if test "${with_words+set}" = set; then
3014   withval="$with_words"
3015   :
3016 fi
3017
3018   case "x$withval" in
3019     xbig)
3020       ac_cv_c_bigendian=yes
3021       ;;
3022     xlittle)
3023       ac_cv_c_bigendian=no
3024       ;;
3025     *)
3026                   ac_cv_c_bigendian=unknown
3027       echo $ac_n "checking what the byte order looks to be""... $ac_c" 1>&6
3028 echo "configure:3029: checking what the byte order looks to be" >&5
3029         cat >conftest.c <<EOF
3030         short am[] = { 0x4249, 0x4765, 0x6e44, 0x6961, 0x6e53, 0x7953, 0 };
3031         short ai[] = { 0x694c, 0x5454, 0x656c, 0x6e45, 0x6944, 0x6e61, 0 };
3032         void _a(void) { char*s = (char*)am; s = (char *)ai; }
3033         short ei[] = { 0x89D3, 0xe3e3, 0x8593, 0x95c5, 0x89c4, 0x9581, 0 };
3034         short em[] = { 0xc2c9, 0xc785, 0x95c4, 0x8981, 0x95e2, 0xa8e2, 0 };
3035         void _e(void) { char*s = (char*)em; s = (char*)ei; }
3036         int main(void) { _a(); _e(); return 0; }
3037 EOF
3038       
3039       if test -f conftest.c
3040       then 
3041         if ${CC-cc} conftest.c -o conftest.o >config.log 2>&1 \
3042             && test -f conftest.o
3043         then
3044           if test `grep -l BIGenDianSyS conftest.o`
3045           then
3046             echo "$ac_t"""big endian"" 1>&6
3047             ac_cv_c_bigendian=yes
3048           fi
3049           if test `grep -l LiTTleEnDian conftest.o`
3050           then
3051             echo "$ac_t"""little endian"" 1>&6
3052             ac_cv_c_bigendian=no
3053           fi
3054         fi
3055       fi
3056       if test $ac_cv_c_bigendian = xunknown
3057       then
3058         { echo "configure: error: Could not guess endianness, please use --with-words" 1>&2; exit 1; }
3059       fi
3060             if test $ac_cv_c_bigendian = yes
3061       then
3062         cat >> confdefs.h <<\EOF
3063 #define WORDS_BIGENDIAN 1
3064 EOF
3065       fi
3066       ;;
3067   esac
3068
3069 for ac_func in gettimeofday select strerror strtod strtol isatty
3070 do
3071 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3072 echo "configure:3073: checking for $ac_func" >&5
3073 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3074   echo $ac_n "(cached) $ac_c" 1>&6
3075 else
3076   cat > conftest.$ac_ext <<EOF
3077 #line 3078 "configure"
3078 #include "confdefs.h"
3079 /* System header to define __stub macros and hopefully few prototypes,
3080     which can conflict with char $ac_func(); below.  */
3081 #include <assert.h>
3082 /* Override any gcc2 internal prototype to avoid an error.  */
3083 /* We use char because int might match the return type of a gcc2
3084     builtin and then its argument prototype would still apply.  */
3085 char $ac_func();
3086
3087 int main() {
3088
3089 /* The GNU C library defines this for functions which it implements
3090     to always fail with ENOSYS.  Some functions are actually named
3091     something starting with __ and the normal name is an alias.  */
3092 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3093 choke me
3094 #else
3095 $ac_func();
3096 #endif
3097
3098 ; return 0; }
3099 EOF
3100 if { (eval echo configure:3101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3101   rm -rf conftest*
3102   eval "ac_cv_func_$ac_func=yes"
3103 else
3104   echo "configure: failed program was:" >&5
3105   cat conftest.$ac_ext >&5
3106   rm -rf conftest*
3107   eval "ac_cv_func_$ac_func=no"
3108 fi
3109 rm -f conftest*
3110 fi
3111
3112 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3113   echo "$ac_t""yes" 1>&6
3114     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3115   cat >> confdefs.h <<EOF
3116 #define $ac_tr_func 1
3117 EOF
3118  
3119 else
3120   echo "$ac_t""no" 1>&6
3121 fi
3122 done
3123
3124 echo $ac_n "checking for connect""... $ac_c" 1>&6
3125 echo "configure:3126: checking for connect" >&5
3126 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
3127   echo $ac_n "(cached) $ac_c" 1>&6
3128 else
3129   cat > conftest.$ac_ext <<EOF
3130 #line 3131 "configure"
3131 #include "confdefs.h"
3132 /* System header to define __stub macros and hopefully few prototypes,
3133     which can conflict with char connect(); below.  */
3134 #include <assert.h>
3135 /* Override any gcc2 internal prototype to avoid an error.  */
3136 /* We use char because int might match the return type of a gcc2
3137     builtin and then its argument prototype would still apply.  */
3138 char connect();
3139
3140 int main() {
3141
3142 /* The GNU C library defines this for functions which it implements
3143     to always fail with ENOSYS.  Some functions are actually named
3144     something starting with __ and the normal name is an alias.  */
3145 #if defined (__stub_connect) || defined (__stub___connect)
3146 choke me
3147 #else
3148 connect();
3149 #endif
3150
3151 ; return 0; }
3152 EOF
3153 if { (eval echo configure:3154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3154   rm -rf conftest*
3155   eval "ac_cv_func_connect=yes"
3156 else
3157   echo "configure: failed program was:" >&5
3158   cat conftest.$ac_ext >&5
3159   rm -rf conftest*
3160   eval "ac_cv_func_connect=no"
3161 fi
3162 rm -f conftest*
3163 fi
3164
3165 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
3166   echo "$ac_t""yes" 1>&6
3167   :
3168 else
3169   echo "$ac_t""no" 1>&6
3170
3171   echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
3172 echo "configure:3173: checking for connect in -lsocket" >&5
3173 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
3174 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3175   echo $ac_n "(cached) $ac_c" 1>&6
3176 else
3177   ac_save_LIBS="$LIBS"
3178 LIBS="-lsocket  $LIBS"
3179 cat > conftest.$ac_ext <<EOF
3180 #line 3181 "configure"
3181 #include "confdefs.h"
3182 /* Override any gcc2 internal prototype to avoid an error.  */
3183 /* We use char because int might match the return type of a gcc2
3184     builtin and then its argument prototype would still apply.  */
3185 char connect();
3186
3187 int main() {
3188 connect()
3189 ; return 0; }
3190 EOF
3191 if { (eval echo configure:3192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3192   rm -rf conftest*
3193   eval "ac_cv_lib_$ac_lib_var=yes"
3194 else
3195   echo "configure: failed program was:" >&5
3196   cat conftest.$ac_ext >&5
3197   rm -rf conftest*
3198   eval "ac_cv_lib_$ac_lib_var=no"
3199 fi
3200 rm -f conftest*
3201 LIBS="$ac_save_LIBS"
3202
3203 fi
3204 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3205   echo "$ac_t""yes" 1>&6
3206   LIB="${LIB} -lsocket"
3207 else
3208   echo "$ac_t""no" 1>&6
3209 fi
3210
3211
3212 fi
3213
3214 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
3215 echo "configure:3216: checking for gethostbyname" >&5
3216 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
3217   echo $ac_n "(cached) $ac_c" 1>&6
3218 else
3219   cat > conftest.$ac_ext <<EOF
3220 #line 3221 "configure"
3221 #include "confdefs.h"
3222 /* System header to define __stub macros and hopefully few prototypes,
3223     which can conflict with char gethostbyname(); below.  */
3224 #include <assert.h>
3225 /* Override any gcc2 internal prototype to avoid an error.  */
3226 /* We use char because int might match the return type of a gcc2
3227     builtin and then its argument prototype would still apply.  */
3228 char gethostbyname();
3229
3230 int main() {
3231
3232 /* The GNU C library defines this for functions which it implements
3233     to always fail with ENOSYS.  Some functions are actually named
3234     something starting with __ and the normal name is an alias.  */
3235 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
3236 choke me
3237 #else
3238 gethostbyname();
3239 #endif
3240
3241 ; return 0; }
3242 EOF
3243 if { (eval echo configure:3244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3244   rm -rf conftest*
3245   eval "ac_cv_func_gethostbyname=yes"
3246 else
3247   echo "configure: failed program was:" >&5
3248   cat conftest.$ac_ext >&5
3249   rm -rf conftest*
3250   eval "ac_cv_func_gethostbyname=no"
3251 fi
3252 rm -f conftest*
3253 fi
3254
3255 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
3256   echo "$ac_t""yes" 1>&6
3257   :
3258 else
3259   echo "$ac_t""no" 1>&6
3260
3261   echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
3262 echo "configure:3263: checking for gethostbyname in -lnsl" >&5
3263 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
3264 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3265   echo $ac_n "(cached) $ac_c" 1>&6
3266 else
3267   ac_save_LIBS="$LIBS"
3268 LIBS="-lnsl  $LIBS"
3269 cat > conftest.$ac_ext <<EOF
3270 #line 3271 "configure"
3271 #include "confdefs.h"
3272 /* Override any gcc2 internal prototype to avoid an error.  */
3273 /* We use char because int might match the return type of a gcc2
3274     builtin and then its argument prototype would still apply.  */
3275 char gethostbyname();
3276
3277 int main() {
3278 gethostbyname()
3279 ; return 0; }
3280 EOF
3281 if { (eval echo configure:3282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3282   rm -rf conftest*
3283   eval "ac_cv_lib_$ac_lib_var=yes"
3284 else
3285   echo "configure: failed program was:" >&5
3286   cat conftest.$ac_ext >&5
3287   rm -rf conftest*
3288   eval "ac_cv_lib_$ac_lib_var=no"
3289 fi
3290 rm -f conftest*
3291 LIBS="$ac_save_LIBS"
3292
3293 fi
3294 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3295   echo "$ac_t""yes" 1>&6
3296   LIB="${LIB} -lnsl"
3297 else
3298   echo "$ac_t""no" 1>&6
3299 fi
3300
3301
3302 fi
3303
3304 echo $ac_n "checking for nanosleep""... $ac_c" 1>&6
3305 echo "configure:3306: checking for nanosleep" >&5
3306 if eval "test \"`echo '$''{'ac_cv_func_nanosleep'+set}'`\" = set"; then
3307   echo $ac_n "(cached) $ac_c" 1>&6
3308 else
3309   cat > conftest.$ac_ext <<EOF
3310 #line 3311 "configure"
3311 #include "confdefs.h"
3312 /* System header to define __stub macros and hopefully few prototypes,
3313     which can conflict with char nanosleep(); below.  */
3314 #include <assert.h>
3315 /* Override any gcc2 internal prototype to avoid an error.  */
3316 /* We use char because int might match the return type of a gcc2
3317     builtin and then its argument prototype would still apply.  */
3318 char nanosleep();
3319
3320 int main() {
3321
3322 /* The GNU C library defines this for functions which it implements
3323     to always fail with ENOSYS.  Some functions are actually named
3324     something starting with __ and the normal name is an alias.  */
3325 #if defined (__stub_nanosleep) || defined (__stub___nanosleep)
3326 choke me
3327 #else
3328 nanosleep();
3329 #endif
3330
3331 ; return 0; }
3332 EOF
3333 if { (eval echo configure:3334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3334   rm -rf conftest*
3335   eval "ac_cv_func_nanosleep=yes"
3336 else
3337   echo "configure: failed program was:" >&5
3338   cat conftest.$ac_ext >&5
3339   rm -rf conftest*
3340   eval "ac_cv_func_nanosleep=no"
3341 fi
3342 rm -f conftest*
3343 fi
3344
3345 if eval "test \"`echo '$ac_cv_func_'nanosleep`\" = yes"; then
3346   echo "$ac_t""yes" 1>&6
3347   :
3348 else
3349   echo "$ac_t""no" 1>&6
3350
3351   echo $ac_n "checking for nanosleep in -lrt""... $ac_c" 1>&6
3352 echo "configure:3353: checking for nanosleep in -lrt" >&5
3353 ac_lib_var=`echo rt'_'nanosleep | sed 'y%./+-%__p_%'`
3354 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3355   echo $ac_n "(cached) $ac_c" 1>&6
3356 else
3357   ac_save_LIBS="$LIBS"
3358 LIBS="-lrt  $LIBS"
3359 cat > conftest.$ac_ext <<EOF
3360 #line 3361 "configure"
3361 #include "confdefs.h"
3362 /* Override any gcc2 internal prototype to avoid an error.  */
3363 /* We use char because int might match the return type of a gcc2
3364     builtin and then its argument prototype would still apply.  */
3365 char nanosleep();
3366
3367 int main() {
3368 nanosleep()
3369 ; return 0; }
3370 EOF
3371 if { (eval echo configure:3372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3372   rm -rf conftest*
3373   eval "ac_cv_lib_$ac_lib_var=yes"
3374 else
3375   echo "configure: failed program was:" >&5
3376   cat conftest.$ac_ext >&5
3377   rm -rf conftest*
3378   eval "ac_cv_lib_$ac_lib_var=no"
3379 fi
3380 rm -f conftest*
3381 LIBS="$ac_save_LIBS"
3382
3383 fi
3384 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3385   echo "$ac_t""yes" 1>&6
3386   LIB="${LIB} -lrt"
3387 else
3388   echo "$ac_t""no" 1>&6
3389
3390     echo $ac_n "checking for nanosleep in -lposix4""... $ac_c" 1>&6
3391 echo "configure:3392: checking for nanosleep in -lposix4" >&5
3392 ac_lib_var=`echo posix4'_'nanosleep | sed 'y%./+-%__p_%'`
3393 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3394   echo $ac_n "(cached) $ac_c" 1>&6
3395 else
3396   ac_save_LIBS="$LIBS"
3397 LIBS="-lposix4  $LIBS"
3398 cat > conftest.$ac_ext <<EOF
3399 #line 3400 "configure"
3400 #include "confdefs.h"
3401 /* Override any gcc2 internal prototype to avoid an error.  */
3402 /* We use char because int might match the return type of a gcc2
3403     builtin and then its argument prototype would still apply.  */
3404 char nanosleep();
3405
3406 int main() {
3407 nanosleep()
3408 ; return 0; }
3409 EOF
3410 if { (eval echo configure:3411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3411   rm -rf conftest*
3412   eval "ac_cv_lib_$ac_lib_var=yes"
3413 else
3414   echo "configure: failed program was:" >&5
3415   cat conftest.$ac_ext >&5
3416   rm -rf conftest*
3417   eval "ac_cv_lib_$ac_lib_var=no"
3418 fi
3419 rm -f conftest*
3420 LIBS="$ac_save_LIBS"
3421
3422 fi
3423 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3424   echo "$ac_t""yes" 1>&6
3425   LIB="${LIB} -lposix4"
3426 else
3427   echo "$ac_t""no" 1>&6
3428 fi
3429
3430   
3431 fi
3432
3433
3434 fi
3435
3436 for ac_func in usleep
3437 do
3438 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3439 echo "configure:3440: checking for $ac_func" >&5
3440 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3441   echo $ac_n "(cached) $ac_c" 1>&6
3442 else
3443   cat > conftest.$ac_ext <<EOF
3444 #line 3445 "configure"
3445 #include "confdefs.h"
3446 /* System header to define __stub macros and hopefully few prototypes,
3447     which can conflict with char $ac_func(); below.  */
3448 #include <assert.h>
3449 /* Override any gcc2 internal prototype to avoid an error.  */
3450 /* We use char because int might match the return type of a gcc2
3451     builtin and then its argument prototype would still apply.  */
3452 char $ac_func();
3453
3454 int main() {
3455
3456 /* The GNU C library defines this for functions which it implements
3457     to always fail with ENOSYS.  Some functions are actually named
3458     something starting with __ and the normal name is an alias.  */
3459 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3460 choke me
3461 #else
3462 $ac_func();
3463 #endif
3464
3465 ; return 0; }
3466 EOF
3467 if { (eval echo configure:3468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3468   rm -rf conftest*
3469   eval "ac_cv_func_$ac_func=yes"
3470 else
3471   echo "configure: failed program was:" >&5
3472   cat conftest.$ac_ext >&5
3473   rm -rf conftest*
3474   eval "ac_cv_func_$ac_func=no"
3475 fi
3476 rm -f conftest*
3477 fi
3478
3479 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3480   echo "$ac_t""yes" 1>&6
3481     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3482   cat >> confdefs.h <<EOF
3483 #define $ac_tr_func 1
3484 EOF
3485  
3486 else
3487   echo "$ac_t""no" 1>&6
3488 fi
3489 done
3490
3491 echo $ac_n "checking for inet_aton""... $ac_c" 1>&6
3492 echo "configure:3493: checking for inet_aton" >&5
3493 if eval "test \"`echo '$''{'ac_cv_func_inet_aton'+set}'`\" = set"; then
3494   echo $ac_n "(cached) $ac_c" 1>&6
3495 else
3496   cat > conftest.$ac_ext <<EOF
3497 #line 3498 "configure"
3498 #include "confdefs.h"
3499 /* System header to define __stub macros and hopefully few prototypes,
3500     which can conflict with char inet_aton(); below.  */
3501 #include <assert.h>
3502 /* Override any gcc2 internal prototype to avoid an error.  */
3503 /* We use char because int might match the return type of a gcc2
3504     builtin and then its argument prototype would still apply.  */
3505 char inet_aton();
3506
3507 int main() {
3508
3509 /* The GNU C library defines this for functions which it implements
3510     to always fail with ENOSYS.  Some functions are actually named
3511     something starting with __ and the normal name is an alias.  */
3512 #if defined (__stub_inet_aton) || defined (__stub___inet_aton)
3513 choke me
3514 #else
3515 inet_aton();
3516 #endif
3517
3518 ; return 0; }
3519 EOF
3520 if { (eval echo configure:3521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3521   rm -rf conftest*
3522   eval "ac_cv_func_inet_aton=yes"
3523 else
3524   echo "configure: failed program was:" >&5
3525   cat conftest.$ac_ext >&5
3526   rm -rf conftest*
3527   eval "ac_cv_func_inet_aton=no"
3528 fi
3529 rm -f conftest*
3530 fi
3531
3532 if eval "test \"`echo '$ac_cv_func_'inet_aton`\" = yes"; then
3533   echo "$ac_t""yes" 1>&6
3534   :
3535 else
3536   echo "$ac_t""no" 1>&6
3537
3538   echo $ac_n "checking for inet_aton in -lresolv""... $ac_c" 1>&6
3539 echo "configure:3540: checking for inet_aton in -lresolv" >&5
3540 ac_lib_var=`echo resolv'_'inet_aton | sed 'y%./+-%__p_%'`
3541 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3542   echo $ac_n "(cached) $ac_c" 1>&6
3543 else
3544   ac_save_LIBS="$LIBS"
3545 LIBS="-lresolv  $LIBS"
3546 cat > conftest.$ac_ext <<EOF
3547 #line 3548 "configure"
3548 #include "confdefs.h"
3549 /* Override any gcc2 internal prototype to avoid an error.  */
3550 /* We use char because int might match the return type of a gcc2
3551     builtin and then its argument prototype would still apply.  */
3552 char inet_aton();
3553
3554 int main() {
3555 inet_aton()
3556 ; return 0; }
3557 EOF
3558 if { (eval echo configure:3559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3559   rm -rf conftest*
3560   eval "ac_cv_lib_$ac_lib_var=yes"
3561 else
3562   echo "configure: failed program was:" >&5
3563   cat conftest.$ac_ext >&5
3564   rm -rf conftest*
3565   eval "ac_cv_lib_$ac_lib_var=no"
3566 fi
3567 rm -f conftest*
3568 LIBS="$ac_save_LIBS"
3569
3570 fi
3571 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3572   echo "$ac_t""yes" 1>&6
3573   LIB="${LIB} -lresolv"
3574 else
3575   echo "$ac_t""no" 1>&6
3576 fi
3577
3578
3579 fi
3580
3581 for ac_func in vasprintf
3582 do
3583 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3584 echo "configure:3585: checking for $ac_func" >&5
3585 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3586   echo $ac_n "(cached) $ac_c" 1>&6
3587 else
3588   cat > conftest.$ac_ext <<EOF
3589 #line 3590 "configure"
3590 #include "confdefs.h"
3591 /* System header to define __stub macros and hopefully few prototypes,
3592     which can conflict with char $ac_func(); below.  */
3593 #include <assert.h>
3594 /* Override any gcc2 internal prototype to avoid an error.  */
3595 /* We use char because int might match the return type of a gcc2
3596     builtin and then its argument prototype would still apply.  */
3597 char $ac_func();
3598
3599 int main() {
3600
3601 /* The GNU C library defines this for functions which it implements
3602     to always fail with ENOSYS.  Some functions are actually named
3603     something starting with __ and the normal name is an alias.  */
3604 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3605 choke me
3606 #else
3607 $ac_func();
3608 #endif
3609
3610 ; return 0; }
3611 EOF
3612 if { (eval echo configure:3613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3613   rm -rf conftest*
3614   eval "ac_cv_func_$ac_func=yes"
3615 else
3616   echo "configure: failed program was:" >&5
3617   cat conftest.$ac_ext >&5
3618   rm -rf conftest*
3619   eval "ac_cv_func_$ac_func=no"
3620 fi
3621 rm -f conftest*
3622 fi
3623
3624 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3625   echo "$ac_t""yes" 1>&6
3626     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3627   cat >> confdefs.h <<EOF
3628 #define $ac_tr_func 1
3629 EOF
3630  
3631 else
3632   echo "$ac_t""no" 1>&6
3633 fi
3634 done
3635
3636 for ac_func in swab
3637 do
3638 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3639 echo "configure:3640: checking for $ac_func" >&5
3640 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3641   echo $ac_n "(cached) $ac_c" 1>&6
3642 else
3643   cat > conftest.$ac_ext <<EOF
3644 #line 3645 "configure"
3645 #include "confdefs.h"
3646 /* System header to define __stub macros and hopefully few prototypes,
3647     which can conflict with char $ac_func(); below.  */
3648 #include <assert.h>
3649 /* Override any gcc2 internal prototype to avoid an error.  */
3650 /* We use char because int might match the return type of a gcc2
3651     builtin and then its argument prototype would still apply.  */
3652 char $ac_func();
3653
3654 int main() {
3655
3656 /* The GNU C library defines this for functions which it implements
3657     to always fail with ENOSYS.  Some functions are actually named
3658     something starting with __ and the normal name is an alias.  */
3659 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3660 choke me
3661 #else
3662 $ac_func();
3663 #endif
3664
3665 ; return 0; }
3666 EOF
3667 if { (eval echo configure:3668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3668   rm -rf conftest*
3669   eval "ac_cv_func_$ac_func=yes"
3670 else
3671   echo "configure: failed program was:" >&5
3672   cat conftest.$ac_ext >&5
3673   rm -rf conftest*
3674   eval "ac_cv_func_$ac_func=no"
3675 fi
3676 rm -f conftest*
3677 fi
3678
3679 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3680   echo "$ac_t""yes" 1>&6
3681     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3682   cat >> confdefs.h <<EOF
3683 #define $ac_tr_func 1
3684 EOF
3685  
3686 else
3687   echo "$ac_t""no" 1>&6
3688 fi
3689 done
3690
3691 for ac_func in memalign valloc
3692 do
3693 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3694 echo "configure:3695: checking for $ac_func" >&5
3695 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3696   echo $ac_n "(cached) $ac_c" 1>&6
3697 else
3698   cat > conftest.$ac_ext <<EOF
3699 #line 3700 "configure"
3700 #include "confdefs.h"
3701 /* System header to define __stub macros and hopefully few prototypes,
3702     which can conflict with char $ac_func(); below.  */
3703 #include <assert.h>
3704 /* Override any gcc2 internal prototype to avoid an error.  */
3705 /* We use char because int might match the return type of a gcc2
3706     builtin and then its argument prototype would still apply.  */
3707 char $ac_func();
3708
3709 int main() {
3710
3711 /* The GNU C library defines this for functions which it implements
3712     to always fail with ENOSYS.  Some functions are actually named
3713     something starting with __ and the normal name is an alias.  */
3714 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3715 choke me
3716 #else
3717 $ac_func();
3718 #endif
3719
3720 ; return 0; }
3721 EOF
3722 if { (eval echo configure:3723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3723   rm -rf conftest*
3724   eval "ac_cv_func_$ac_func=yes"
3725 else
3726   echo "configure: failed program was:" >&5
3727   cat conftest.$ac_ext >&5
3728   rm -rf conftest*
3729   eval "ac_cv_func_$ac_func=no"
3730 fi
3731 rm -f conftest*
3732 fi
3733
3734 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3735   echo "$ac_t""yes" 1>&6
3736     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3737   cat >> confdefs.h <<EOF
3738 #define $ac_tr_func 1
3739 EOF
3740  
3741 else
3742   echo "$ac_t""no" 1>&6
3743 fi
3744 done
3745
3746
3747 for ac_func in sigrelse
3748 do
3749 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3750 echo "configure:3751: checking for $ac_func" >&5
3751 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3752   echo $ac_n "(cached) $ac_c" 1>&6
3753 else
3754   cat > conftest.$ac_ext <<EOF
3755 #line 3756 "configure"
3756 #include "confdefs.h"
3757 /* System header to define __stub macros and hopefully few prototypes,
3758     which can conflict with char $ac_func(); below.  */
3759 #include <assert.h>
3760 /* Override any gcc2 internal prototype to avoid an error.  */
3761 /* We use char because int might match the return type of a gcc2
3762     builtin and then its argument prototype would still apply.  */
3763 char $ac_func();
3764
3765 int main() {
3766
3767 /* The GNU C library defines this for functions which it implements
3768     to always fail with ENOSYS.  Some functions are actually named
3769     something starting with __ and the normal name is an alias.  */
3770 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3771 choke me
3772 #else
3773 $ac_func();
3774 #endif
3775
3776 ; return 0; }
3777 EOF
3778 if { (eval echo configure:3779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3779   rm -rf conftest*
3780   eval "ac_cv_func_$ac_func=yes"
3781 else
3782   echo "configure: failed program was:" >&5
3783   cat conftest.$ac_ext >&5
3784   rm -rf conftest*
3785   eval "ac_cv_func_$ac_func=no"
3786 fi
3787 rm -f conftest*
3788 fi
3789
3790 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3791   echo "$ac_t""yes" 1>&6
3792     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3793   cat >> confdefs.h <<EOF
3794 #define $ac_tr_func 1
3795 EOF
3796  
3797 else
3798   echo "$ac_t""no" 1>&6
3799 fi
3800 done
3801
3802
3803 NEED_GETOPT=0
3804 echo $ac_n "checking for getopt_long""... $ac_c" 1>&6
3805 echo "configure:3806: checking for getopt_long" >&5
3806 if eval "test \"`echo '$''{'ac_cv_func_getopt_long'+set}'`\" = set"; then
3807   echo $ac_n "(cached) $ac_c" 1>&6
3808 else
3809   cat > conftest.$ac_ext <<EOF
3810 #line 3811 "configure"
3811 #include "confdefs.h"
3812 /* System header to define __stub macros and hopefully few prototypes,
3813     which can conflict with char getopt_long(); below.  */
3814 #include <assert.h>
3815 /* Override any gcc2 internal prototype to avoid an error.  */
3816 /* We use char because int might match the return type of a gcc2
3817     builtin and then its argument prototype would still apply.  */
3818 char getopt_long();
3819
3820 int main() {
3821
3822 /* The GNU C library defines this for functions which it implements
3823     to always fail with ENOSYS.  Some functions are actually named
3824     something starting with __ and the normal name is an alias.  */
3825 #if defined (__stub_getopt_long) || defined (__stub___getopt_long)
3826 choke me
3827 #else
3828 getopt_long();
3829 #endif
3830
3831 ; return 0; }
3832 EOF
3833 if { (eval echo configure:3834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3834   rm -rf conftest*
3835   eval "ac_cv_func_getopt_long=yes"
3836 else
3837   echo "configure: failed program was:" >&5
3838   cat conftest.$ac_ext >&5
3839   rm -rf conftest*
3840   eval "ac_cv_func_getopt_long=no"
3841 fi
3842 rm -f conftest*
3843 fi
3844
3845 if eval "test \"`echo '$ac_cv_func_'getopt_long`\" = yes"; then
3846   echo "$ac_t""yes" 1>&6
3847   cat >> confdefs.h <<\EOF
3848 #define HAVE_GETOPT_LONG 1
3849 EOF
3850
3851 else
3852   echo "$ac_t""no" 1>&6
3853  # FreeBSD has a gnugetopt library for this:
3854   echo $ac_n "checking for getopt_long in -lgnugetopt""... $ac_c" 1>&6
3855 echo "configure:3856: checking for getopt_long in -lgnugetopt" >&5
3856 ac_lib_var=`echo gnugetopt'_'getopt_long | sed 'y%./+-%__p_%'`
3857 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3858   echo $ac_n "(cached) $ac_c" 1>&6
3859 else
3860   ac_save_LIBS="$LIBS"
3861 LIBS="-lgnugetopt  $LIBS"
3862 cat > conftest.$ac_ext <<EOF
3863 #line 3864 "configure"
3864 #include "confdefs.h"
3865 /* Override any gcc2 internal prototype to avoid an error.  */
3866 /* We use char because int might match the return type of a gcc2
3867     builtin and then its argument prototype would still apply.  */
3868 char getopt_long();
3869
3870 int main() {
3871 getopt_long()
3872 ; return 0; }
3873 EOF
3874 if { (eval echo configure:3875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3875   rm -rf conftest*
3876   eval "ac_cv_lib_$ac_lib_var=yes"
3877 else
3878   echo "configure: failed program was:" >&5
3879   cat conftest.$ac_ext >&5
3880   rm -rf conftest*
3881   eval "ac_cv_lib_$ac_lib_var=no"
3882 fi
3883 rm -f conftest*
3884 LIBS="$ac_save_LIBS"
3885
3886 fi
3887 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3888   echo "$ac_t""yes" 1>&6
3889   cat >> confdefs.h <<\EOF
3890 #define HAVE_GETOPT_LONG 1
3891 EOF
3892  LIB="${LIB} -lgnugetopt"
3893 else
3894   echo "$ac_t""no" 1>&6
3895 NEED_GETOPT=1
3896 fi
3897
3898 fi
3899
3900
3901 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3902 echo "configure:3903: checking return type of signal handlers" >&5
3903 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
3904   echo $ac_n "(cached) $ac_c" 1>&6
3905 else
3906   cat > conftest.$ac_ext <<EOF
3907 #line 3908 "configure"
3908 #include "confdefs.h"
3909 #include <sys/types.h>
3910 #include <signal.h>
3911 #ifdef signal
3912 #undef signal
3913 #endif
3914 #ifdef __cplusplus
3915 extern "C" void (*signal (int, void (*)(int)))(int);
3916 #else
3917 void (*signal ()) ();
3918 #endif
3919
3920 int main() {
3921 int i;
3922 ; return 0; }
3923 EOF
3924 if { (eval echo configure:3925: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3925   rm -rf conftest*
3926   ac_cv_type_signal=void
3927 else
3928   echo "configure: failed program was:" >&5
3929   cat conftest.$ac_ext >&5
3930   rm -rf conftest*
3931   ac_cv_type_signal=int
3932 fi
3933 rm -f conftest*
3934 fi
3935
3936 echo "$ac_t""$ac_cv_type_signal" 1>&6
3937 cat >> confdefs.h <<EOF
3938 #define RETSIGTYPE $ac_cv_type_signal
3939 EOF
3940
3941
3942 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
3943 echo "configure:3944: checking for dlopen in -ldl" >&5
3944 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
3945 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3946   echo $ac_n "(cached) $ac_c" 1>&6
3947 else
3948   ac_save_LIBS="$LIBS"
3949 LIBS="-ldl  $LIBS"
3950 cat > conftest.$ac_ext <<EOF
3951 #line 3952 "configure"
3952 #include "confdefs.h"
3953 /* Override any gcc2 internal prototype to avoid an error.  */
3954 /* We use char because int might match the return type of a gcc2
3955     builtin and then its argument prototype would still apply.  */
3956 char dlopen();
3957
3958 int main() {
3959 dlopen()
3960 ; return 0; }
3961 EOF
3962 if { (eval echo configure:3963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3963   rm -rf conftest*
3964   eval "ac_cv_lib_$ac_lib_var=yes"
3965 else
3966   echo "configure: failed program was:" >&5
3967   cat conftest.$ac_ext >&5
3968   rm -rf conftest*
3969   eval "ac_cv_lib_$ac_lib_var=no"
3970 fi
3971 rm -f conftest*
3972 LIBS="$ac_save_LIBS"
3973
3974 fi
3975 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3976   echo "$ac_t""yes" 1>&6
3977   LIB="${LIB} -ldl"
3978 else
3979   echo "$ac_t""no" 1>&6
3980 fi
3981
3982 echo $ac_n "checking for cos in -lm""... $ac_c" 1>&6
3983 echo "configure:3984: checking for cos in -lm" >&5
3984 ac_lib_var=`echo m'_'cos | sed 'y%./+-%__p_%'`
3985 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3986   echo $ac_n "(cached) $ac_c" 1>&6
3987 else
3988   ac_save_LIBS="$LIBS"
3989 LIBS="-lm  $LIBS"
3990 cat > conftest.$ac_ext <<EOF
3991 #line 3992 "configure"
3992 #include "confdefs.h"
3993 /* Override any gcc2 internal prototype to avoid an error.  */
3994 /* We use char because int might match the return type of a gcc2
3995     builtin and then its argument prototype would still apply.  */
3996 char cos();
3997
3998 int main() {
3999 cos()
4000 ; return 0; }
4001 EOF
4002 if { (eval echo configure:4003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4003   rm -rf conftest*
4004   eval "ac_cv_lib_$ac_lib_var=yes"
4005 else
4006   echo "configure: failed program was:" >&5
4007   cat conftest.$ac_ext >&5
4008   rm -rf conftest*
4009   eval "ac_cv_lib_$ac_lib_var=no"
4010 fi
4011 rm -f conftest*
4012 LIBS="$ac_save_LIBS"
4013
4014 fi
4015 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4016   echo "$ac_t""yes" 1>&6
4017   LIB_IMDCT="${LIB_IMDCT} -lm"
4018   LIB_FILTER_DISTORT="${LIB_FILTER_DISTORT} -lm"
4019 else
4020   echo "$ac_t""no" 1>&6
4021 fi
4022
4023 echo $ac_n "checking for pow in -lm""... $ac_c" 1>&6
4024 echo "configure:4025: checking for pow in -lm" >&5
4025 ac_lib_var=`echo m'_'pow | sed 'y%./+-%__p_%'`
4026 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4027   echo $ac_n "(cached) $ac_c" 1>&6
4028 else
4029   ac_save_LIBS="$LIBS"
4030 LIBS="-lm  $LIBS"
4031 cat > conftest.$ac_ext <<EOF
4032 #line 4033 "configure"
4033 #include "confdefs.h"
4034 /* Override any gcc2 internal prototype to avoid an error.  */
4035 /* We use char because int might match the return type of a gcc2
4036     builtin and then its argument prototype would still apply.  */
4037 char pow();
4038
4039 int main() {
4040 pow()
4041 ; return 0; }
4042 EOF
4043 if { (eval echo configure:4044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4044   rm -rf conftest*
4045   eval "ac_cv_lib_$ac_lib_var=yes"
4046 else
4047   echo "configure: failed program was:" >&5
4048   cat conftest.$ac_ext >&5
4049   rm -rf conftest*
4050   eval "ac_cv_lib_$ac_lib_var=no"
4051 fi
4052 rm -f conftest*
4053 LIBS="$ac_save_LIBS"
4054
4055 fi
4056 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4057   echo "$ac_t""yes" 1>&6
4058   LIB_IMDCT="${LIB_IMDCT} -lm"
4059   LIB_IMDCT3DN="${LIB_IMDCT3DN} -lm"
4060   LIB_IMDCTSSE="${LIB_IMDCTSSE} -lm"
4061
4062 else
4063   echo "$ac_t""no" 1>&6
4064 fi
4065
4066
4067 THREAD_LIB=error
4068 if test "x${THREAD_LIB}" = xerror; then
4069   echo $ac_n "checking for pthread_attr_init in -lpthread""... $ac_c" 1>&6
4070 echo "configure:4071: checking for pthread_attr_init in -lpthread" >&5
4071 ac_lib_var=`echo pthread'_'pthread_attr_init | sed 'y%./+-%__p_%'`
4072 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4073   echo $ac_n "(cached) $ac_c" 1>&6
4074 else
4075   ac_save_LIBS="$LIBS"
4076 LIBS="-lpthread  $LIBS"
4077 cat > conftest.$ac_ext <<EOF
4078 #line 4079 "configure"
4079 #include "confdefs.h"
4080 /* Override any gcc2 internal prototype to avoid an error.  */
4081 /* We use char because int might match the return type of a gcc2
4082     builtin and then its argument prototype would still apply.  */
4083 char pthread_attr_init();
4084
4085 int main() {
4086 pthread_attr_init()
4087 ; return 0; }
4088 EOF
4089 if { (eval echo configure:4090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4090   rm -rf conftest*
4091   eval "ac_cv_lib_$ac_lib_var=yes"
4092 else
4093   echo "configure: failed program was:" >&5
4094   cat conftest.$ac_ext >&5
4095   rm -rf conftest*
4096   eval "ac_cv_lib_$ac_lib_var=no"
4097 fi
4098 rm -f conftest*
4099 LIBS="$ac_save_LIBS"
4100
4101 fi
4102 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4103   echo "$ac_t""yes" 1>&6
4104   THREAD_LIB="-lpthread"
4105 else
4106   echo "$ac_t""no" 1>&6
4107 fi
4108
4109 fi
4110 if test "x${THREAD_LIB}" = xerror; then
4111   echo $ac_n "checking for pthread_attr_init in -lpthreads""... $ac_c" 1>&6
4112 echo "configure:4113: checking for pthread_attr_init in -lpthreads" >&5
4113 ac_lib_var=`echo pthreads'_'pthread_attr_init | sed 'y%./+-%__p_%'`
4114 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4115   echo $ac_n "(cached) $ac_c" 1>&6
4116 else
4117   ac_save_LIBS="$LIBS"
4118 LIBS="-lpthreads  $LIBS"
4119 cat > conftest.$ac_ext <<EOF
4120 #line 4121 "configure"
4121 #include "confdefs.h"
4122 /* Override any gcc2 internal prototype to avoid an error.  */
4123 /* We use char because int might match the return type of a gcc2
4124     builtin and then its argument prototype would still apply.  */
4125 char pthread_attr_init();
4126
4127 int main() {
4128 pthread_attr_init()
4129 ; return 0; }
4130 EOF
4131 if { (eval echo configure:4132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4132   rm -rf conftest*
4133   eval "ac_cv_lib_$ac_lib_var=yes"
4134 else
4135   echo "configure: failed program was:" >&5
4136   cat conftest.$ac_ext >&5
4137   rm -rf conftest*
4138   eval "ac_cv_lib_$ac_lib_var=no"
4139 fi
4140 rm -f conftest*
4141 LIBS="$ac_save_LIBS"
4142
4143 fi
4144 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4145   echo "$ac_t""yes" 1>&6
4146   THREAD_LIB="-lpthreads"
4147 else
4148   echo "$ac_t""no" 1>&6
4149 fi
4150
4151 fi
4152 if test "x${THREAD_LIB}" = xerror; then
4153   echo $ac_n "checking for pthread_attr_init in -lc_r""... $ac_c" 1>&6
4154 echo "configure:4155: checking for pthread_attr_init in -lc_r" >&5
4155 ac_lib_var=`echo c_r'_'pthread_attr_init | sed 'y%./+-%__p_%'`
4156 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4157   echo $ac_n "(cached) $ac_c" 1>&6
4158 else
4159   ac_save_LIBS="$LIBS"
4160 LIBS="-lc_r  $LIBS"
4161 cat > conftest.$ac_ext <<EOF
4162 #line 4163 "configure"
4163 #include "confdefs.h"
4164 /* Override any gcc2 internal prototype to avoid an error.  */
4165 /* We use char because int might match the return type of a gcc2
4166     builtin and then its argument prototype would still apply.  */
4167 char pthread_attr_init();
4168
4169 int main() {
4170 pthread_attr_init()
4171 ; return 0; }
4172 EOF
4173 if { (eval echo configure:4174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4174   rm -rf conftest*
4175   eval "ac_cv_lib_$ac_lib_var=yes"
4176 else
4177   echo "configure: failed program was:" >&5
4178   cat conftest.$ac_ext >&5
4179   rm -rf conftest*
4180   eval "ac_cv_lib_$ac_lib_var=no"
4181 fi
4182 rm -f conftest*
4183 LIBS="$ac_save_LIBS"
4184
4185 fi
4186 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4187   echo "$ac_t""yes" 1>&6
4188   THREAD_LIB="-lc_r"
4189 else
4190   echo "$ac_t""no" 1>&6
4191 fi
4192
4193 fi
4194 if test "x${THREAD_LIB}" = xerror; then
4195   echo $ac_n "checking for pthread_attr_init""... $ac_c" 1>&6
4196 echo "configure:4197: checking for pthread_attr_init" >&5
4197 if eval "test \"`echo '$''{'ac_cv_func_pthread_attr_init'+set}'`\" = set"; then
4198   echo $ac_n "(cached) $ac_c" 1>&6
4199 else
4200   cat > conftest.$ac_ext <<EOF
4201 #line 4202 "configure"
4202 #include "confdefs.h"
4203 /* System header to define __stub macros and hopefully few prototypes,
4204     which can conflict with char pthread_attr_init(); below.  */
4205 #include <assert.h>
4206 /* Override any gcc2 internal prototype to avoid an error.  */
4207 /* We use char because int might match the return type of a gcc2
4208     builtin and then its argument prototype would still apply.  */
4209 char pthread_attr_init();
4210
4211 int main() {
4212
4213 /* The GNU C library defines this for functions which it implements
4214     to always fail with ENOSYS.  Some functions are actually named
4215     something starting with __ and the normal name is an alias.  */
4216 #if defined (__stub_pthread_attr_init) || defined (__stub___pthread_attr_init)
4217 choke me
4218 #else
4219 pthread_attr_init();
4220 #endif
4221
4222 ; return 0; }
4223 EOF
4224 if { (eval echo configure:4225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4225   rm -rf conftest*
4226   eval "ac_cv_func_pthread_attr_init=yes"
4227 else
4228   echo "configure: failed program was:" >&5
4229   cat conftest.$ac_ext >&5
4230   rm -rf conftest*
4231   eval "ac_cv_func_pthread_attr_init=no"
4232 fi
4233 rm -f conftest*
4234 fi
4235
4236 if eval "test \"`echo '$ac_cv_func_'pthread_attr_init`\" = yes"; then
4237   echo "$ac_t""yes" 1>&6
4238   :
4239 else
4240   echo "$ac_t""no" 1>&6
4241 fi
4242
4243   THREAD_LIB=""
4244 fi
4245
4246 echo $ac_n "checking for cthread_fork in -lthreads""... $ac_c" 1>&6
4247 echo "configure:4248: checking for cthread_fork in -lthreads" >&5
4248 ac_lib_var=`echo threads'_'cthread_fork | sed 'y%./+-%__p_%'`
4249 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4250   echo $ac_n "(cached) $ac_c" 1>&6
4251 else
4252   ac_save_LIBS="$LIBS"
4253 LIBS="-lthreads  $LIBS"
4254 cat > conftest.$ac_ext <<EOF
4255 #line 4256 "configure"
4256 #include "confdefs.h"
4257 /* Override any gcc2 internal prototype to avoid an error.  */
4258 /* We use char because int might match the return type of a gcc2
4259     builtin and then its argument prototype would still apply.  */
4260 char cthread_fork();
4261
4262 int main() {
4263 cthread_fork()
4264 ; return 0; }
4265 EOF
4266 if { (eval echo configure:4267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4267   rm -rf conftest*
4268   eval "ac_cv_lib_$ac_lib_var=yes"
4269 else
4270   echo "configure: failed program was:" >&5
4271   cat conftest.$ac_ext >&5
4272   rm -rf conftest*
4273   eval "ac_cv_lib_$ac_lib_var=no"
4274 fi
4275 rm -f conftest*
4276 LIBS="$ac_save_LIBS"
4277
4278 fi
4279 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4280   echo "$ac_t""yes" 1>&6
4281   THREAD_LIB="-lthreads"
4282 else
4283   echo "$ac_t""no" 1>&6
4284 fi
4285
4286
4287 cat > conftest.$ac_ext <<EOF
4288 #line 4289 "configure"
4289 #include "confdefs.h"
4290 #include <pthread.h>
4291 EOF
4292 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4293   egrep "pthread_cond_t" >/dev/null 2>&1; then
4294   rm -rf conftest*
4295   
4296   cat >> confdefs.h <<\EOF
4297 #define PTHREAD_COND_T_IN_PTHREAD_H 1
4298 EOF
4299
4300 fi
4301 rm -f conftest*
4302
4303 cat > conftest.$ac_ext <<EOF
4304 #line 4305 "configure"
4305 #include "confdefs.h"
4306 #include <strings.h>
4307 EOF
4308 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4309   egrep "strncasecmp" >/dev/null 2>&1; then
4310   rm -rf conftest*
4311   
4312   cat >> confdefs.h <<\EOF
4313 #define STRNCASECMP_IN_STRINGS_H 1
4314 EOF
4315
4316 fi
4317 rm -f conftest*
4318
4319
4320 for ac_hdr in getopt.h strings.h
4321 do
4322 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4323 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4324 echo "configure:4325: checking for $ac_hdr" >&5
4325 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4326   echo $ac_n "(cached) $ac_c" 1>&6
4327 else
4328   cat > conftest.$ac_ext <<EOF
4329 #line 4330 "configure"
4330 #include "confdefs.h"
4331 #include <$ac_hdr>
4332 EOF
4333 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4334 { (eval echo configure:4335: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4335 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4336 if test -z "$ac_err"; then
4337   rm -rf conftest*
4338   eval "ac_cv_header_$ac_safe=yes"
4339 else
4340   echo "$ac_err" >&5
4341   echo "configure: failed program was:" >&5
4342   cat conftest.$ac_ext >&5
4343   rm -rf conftest*
4344   eval "ac_cv_header_$ac_safe=no"
4345 fi
4346 rm -f conftest*
4347 fi
4348 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4349   echo "$ac_t""yes" 1>&6
4350     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4351   cat >> confdefs.h <<EOF
4352 #define $ac_tr_hdr 1
4353 EOF
4354  
4355 else
4356   echo "$ac_t""no" 1>&6
4357 fi
4358 done
4359
4360 for ac_hdr in sys/sockio.h fcntl.h sys/time.h sys/times.h
4361 do
4362 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4363 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4364 echo "configure:4365: checking for $ac_hdr" >&5
4365 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4366   echo $ac_n "(cached) $ac_c" 1>&6
4367 else
4368   cat > conftest.$ac_ext <<EOF
4369 #line 4370 "configure"
4370 #include "confdefs.h"
4371 #include <$ac_hdr>
4372 EOF
4373 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4374 { (eval echo configure:4375: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4375 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4376 if test -z "$ac_err"; then
4377   rm -rf conftest*
4378   eval "ac_cv_header_$ac_safe=yes"
4379 else
4380   echo "$ac_err" >&5
4381   echo "configure: failed program was:" >&5
4382   cat conftest.$ac_ext >&5
4383   rm -rf conftest*
4384   eval "ac_cv_header_$ac_safe=no"
4385 fi
4386 rm -f conftest*
4387 fi
4388 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4389   echo "$ac_t""yes" 1>&6
4390     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4391   cat >> confdefs.h <<EOF
4392 #define $ac_tr_hdr 1
4393 EOF
4394  
4395 else
4396   echo "$ac_t""no" 1>&6
4397 fi
4398 done
4399
4400 for ac_hdr in sys/soundcard.h machine/soundcard.h
4401 do
4402 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4403 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4404 echo "configure:4405: checking for $ac_hdr" >&5
4405 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4406   echo $ac_n "(cached) $ac_c" 1>&6
4407 else
4408   cat > conftest.$ac_ext <<EOF
4409 #line 4410 "configure"
4410 #include "confdefs.h"
4411 #include <$ac_hdr>
4412 EOF
4413 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4414 { (eval echo configure:4415: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4415 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4416 if test -z "$ac_err"; then
4417   rm -rf conftest*
4418   eval "ac_cv_header_$ac_safe=yes"
4419 else
4420   echo "$ac_err" >&5
4421   echo "configure: failed program was:" >&5
4422   cat conftest.$ac_ext >&5
4423   rm -rf conftest*
4424   eval "ac_cv_header_$ac_safe=no"
4425 fi
4426 rm -f conftest*
4427 fi
4428 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4429   echo "$ac_t""yes" 1>&6
4430     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4431   cat >> confdefs.h <<EOF
4432 #define $ac_tr_hdr 1
4433 EOF
4434  
4435 else
4436   echo "$ac_t""no" 1>&6
4437 fi
4438 done
4439
4440 for ac_hdr in dlfcn.h image.h
4441 do
4442 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4443 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4444 echo "configure:4445: checking for $ac_hdr" >&5
4445 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4446   echo $ac_n "(cached) $ac_c" 1>&6
4447 else
4448   cat > conftest.$ac_ext <<EOF
4449 #line 4450 "configure"
4450 #include "confdefs.h"
4451 #include <$ac_hdr>
4452 EOF
4453 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4454 { (eval echo configure:4455: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4455 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4456 if test -z "$ac_err"; then
4457   rm -rf conftest*
4458   eval "ac_cv_header_$ac_safe=yes"
4459 else
4460   echo "$ac_err" >&5
4461   echo "configure: failed program was:" >&5
4462   cat conftest.$ac_ext >&5
4463   rm -rf conftest*
4464   eval "ac_cv_header_$ac_safe=no"
4465 fi
4466 rm -f conftest*
4467 fi
4468 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4469   echo "$ac_t""yes" 1>&6
4470     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4471   cat >> confdefs.h <<EOF
4472 #define $ac_tr_hdr 1
4473 EOF
4474  
4475 else
4476   echo "$ac_t""no" 1>&6
4477 fi
4478 done
4479
4480 for ac_hdr in arpa/inet.h net/if.h netinet/in.h sys/socket.h
4481 do
4482 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4483 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4484 echo "configure:4485: checking for $ac_hdr" >&5
4485 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4486   echo $ac_n "(cached) $ac_c" 1>&6
4487 else
4488   cat > conftest.$ac_ext <<EOF
4489 #line 4490 "configure"
4490 #include "confdefs.h"
4491 #include <$ac_hdr>
4492 EOF
4493 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4494 { (eval echo configure:4495: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4495 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4496 if test -z "$ac_err"; then
4497   rm -rf conftest*
4498   eval "ac_cv_header_$ac_safe=yes"
4499 else
4500   echo "$ac_err" >&5
4501   echo "configure: failed program was:" >&5
4502   cat conftest.$ac_ext >&5
4503   rm -rf conftest*
4504   eval "ac_cv_header_$ac_safe=no"
4505 fi
4506 rm -f conftest*
4507 fi
4508 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4509   echo "$ac_t""yes" 1>&6
4510     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4511   cat >> confdefs.h <<EOF
4512 #define $ac_tr_hdr 1
4513 EOF
4514  
4515 else
4516   echo "$ac_t""no" 1>&6
4517 fi
4518 done
4519
4520 for ac_hdr in machine/param.h
4521 do
4522 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4523 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4524 echo "configure:4525: checking for $ac_hdr" >&5
4525 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4526   echo $ac_n "(cached) $ac_c" 1>&6
4527 else
4528   cat > conftest.$ac_ext <<EOF
4529 #line 4530 "configure"
4530 #include "confdefs.h"
4531 #include <$ac_hdr>
4532 EOF
4533 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4534 { (eval echo configure:4535: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4535 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4536 if test -z "$ac_err"; then
4537   rm -rf conftest*
4538   eval "ac_cv_header_$ac_safe=yes"
4539 else
4540   echo "$ac_err" >&5
4541   echo "configure: failed program was:" >&5
4542   cat conftest.$ac_ext >&5
4543   rm -rf conftest*
4544   eval "ac_cv_header_$ac_safe=no"
4545 fi
4546 rm -f conftest*
4547 fi
4548 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4549   echo "$ac_t""yes" 1>&6
4550     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4551   cat >> confdefs.h <<EOF
4552 #define $ac_tr_hdr 1
4553 EOF
4554  
4555 else
4556   echo "$ac_t""no" 1>&6
4557 fi
4558 done
4559
4560
4561 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
4562 echo "configure:4563: checking whether time.h and sys/time.h may both be included" >&5
4563 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
4564   echo $ac_n "(cached) $ac_c" 1>&6
4565 else
4566   cat > conftest.$ac_ext <<EOF
4567 #line 4568 "configure"
4568 #include "confdefs.h"
4569 #include <sys/types.h>
4570 #include <sys/time.h>
4571 #include <time.h>
4572 int main() {
4573 struct tm *tp;
4574 ; return 0; }
4575 EOF
4576 if { (eval echo configure:4577: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4577   rm -rf conftest*
4578   ac_cv_header_time=yes
4579 else
4580   echo "configure: failed program was:" >&5
4581   cat conftest.$ac_ext >&5
4582   rm -rf conftest*
4583   ac_cv_header_time=no
4584 fi
4585 rm -f conftest*
4586 fi
4587
4588 echo "$ac_t""$ac_cv_header_time" 1>&6
4589 if test $ac_cv_header_time = yes; then
4590   cat >> confdefs.h <<\EOF
4591 #define TIME_WITH_SYS_TIME 1
4592 EOF
4593
4594 fi
4595
4596
4597 for ac_hdr in cthreads.h pthread.h kernel/scheduler.h kernel/OS.h
4598 do
4599 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4600 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4601 echo "configure:4602: checking for $ac_hdr" >&5
4602 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4603   echo $ac_n "(cached) $ac_c" 1>&6
4604 else
4605   cat > conftest.$ac_ext <<EOF
4606 #line 4607 "configure"
4607 #include "confdefs.h"
4608 #include <$ac_hdr>
4609 EOF
4610 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4611 { (eval echo configure:4612: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4612 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4613 if test -z "$ac_err"; then
4614   rm -rf conftest*
4615   eval "ac_cv_header_$ac_safe=yes"
4616 else
4617   echo "$ac_err" >&5
4618   echo "configure: failed program was:" >&5
4619   cat conftest.$ac_ext >&5
4620   rm -rf conftest*
4621   eval "ac_cv_header_$ac_safe=no"
4622 fi
4623 rm -f conftest*
4624 fi
4625 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4626   echo "$ac_t""yes" 1>&6
4627     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4628   cat >> confdefs.h <<EOF
4629 #define $ac_tr_hdr 1
4630 EOF
4631  
4632 else
4633   echo "$ac_t""no" 1>&6
4634 fi
4635 done
4636
4637
4638 echo $ac_n "checking for ntohl in sys/param.h""... $ac_c" 1>&6
4639 echo "configure:4640: checking for ntohl in sys/param.h" >&5
4640 if eval "test \"`echo '$''{'ac_cv_c_ntohl_sys_param_h'+set}'`\" = set"; then
4641   echo $ac_n "(cached) $ac_c" 1>&6
4642 else
4643   CFLAGS="${save_CFLAGS} -Wall -Werror"
4644      cat > conftest.$ac_ext <<EOF
4645 #line 4646 "configure"
4646 #include "confdefs.h"
4647 #include <sys/param.h>
4648 int main() {
4649 void foo() { int meuh; ntohl(meuh); }
4650 ; return 0; }
4651 EOF
4652 if { (eval echo configure:4653: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4653   rm -rf conftest*
4654   ac_cv_c_ntohl_sys_param_h=yes
4655 else
4656   echo "configure: failed program was:" >&5
4657   cat conftest.$ac_ext >&5
4658   rm -rf conftest*
4659   ac_cv_c_ntohl_sys_param_h=no
4660 fi
4661 rm -f conftest*
4662 fi
4663
4664 echo "$ac_t""$ac_cv_c_ntohl_sys_param_h" 1>&6
4665 if test x"$ac_cv_c_ntohl_sys_param_h" != x"no"; then
4666     cat >> confdefs.h <<\EOF
4667 #define NTOHL_IN_SYS_PARAM_H 1
4668 EOF
4669
4670 fi
4671
4672 echo $ac_n "checking if \$CC accepts -finline-limit""... $ac_c" 1>&6
4673 echo "configure:4674: checking if \$CC accepts -finline-limit" >&5
4674 if eval "test \"`echo '$''{'ac_cv_c_inline_limit'+set}'`\" = set"; then
4675   echo $ac_n "(cached) $ac_c" 1>&6
4676 else
4677   CFLAGS="${save_CFLAGS} -finline-limit-30000"
4678      cat > conftest.$ac_ext <<EOF
4679 #line 4680 "configure"
4680 #include "confdefs.h"
4681
4682 int main() {
4683
4684 ; return 0; }
4685 EOF
4686 if { (eval echo configure:4687: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4687   rm -rf conftest*
4688   ac_cv_c_inline_limit=yes
4689 else
4690   echo "configure: failed program was:" >&5
4691   cat conftest.$ac_ext >&5
4692   rm -rf conftest*
4693   ac_cv_c_inline_limit=no
4694 fi
4695 rm -f conftest*
4696 fi
4697
4698 echo "$ac_t""$ac_cv_c_inline_limit" 1>&6
4699 if test x"$ac_cv_c_inline_limit" != x"no"; then
4700     save_CFLAGS="${save_CFLAGS} -finline-limit-30000"
4701 fi
4702
4703 echo $ac_n "checking if \$CC accepts -Wall -Winline""... $ac_c" 1>&6
4704 echo "configure:4705: checking if \$CC accepts -Wall -Winline" >&5
4705 if eval "test \"`echo '$''{'ac_cv_c_Wall_Winline'+set}'`\" = set"; then
4706   echo $ac_n "(cached) $ac_c" 1>&6
4707 else
4708   CFLAGS="${save_CFLAGS} -Wall -Winline"
4709      cat > conftest.$ac_ext <<EOF
4710 #line 4711 "configure"
4711 #include "confdefs.h"
4712
4713 int main() {
4714
4715 ; return 0; }
4716 EOF
4717 if { (eval echo configure:4718: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4718   rm -rf conftest*
4719   ac_cv_c_Wall_Winline=yes
4720 else
4721   echo "configure: failed program was:" >&5
4722   cat conftest.$ac_ext >&5
4723   rm -rf conftest*
4724   ac_cv_c_Wall_Winline=no
4725 fi
4726 rm -f conftest*
4727 fi
4728
4729 echo "$ac_t""$ac_cv_c_Wall_Winline" 1>&6
4730 if test x"$ac_cv_c_Wall_Winline" != x"no"; then
4731     save_CFLAGS="${save_CFLAGS} -Wall -Winline"
4732 else
4733     echo $ac_n "checking if \$CC accepts -wall -winline""... $ac_c" 1>&6
4734 echo "configure:4735: checking if \$CC accepts -wall -winline" >&5
4735 if eval "test \"`echo '$''{'ac_cv_c_wall_winline'+set}'`\" = set"; then
4736   echo $ac_n "(cached) $ac_c" 1>&6
4737 else
4738   CFLAGS="${save_CFLAGS} -wall -winline"
4739          cat > conftest.$ac_ext <<EOF
4740 #line 4741 "configure"
4741 #include "confdefs.h"
4742
4743 int main() {
4744
4745 ; return 0; }
4746 EOF
4747 if { (eval echo configure:4748: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4748   rm -rf conftest*
4749   ac_cv_c_wall_winline=yes
4750 else
4751   echo "configure: failed program was:" >&5
4752   cat conftest.$ac_ext >&5
4753   rm -rf conftest*
4754   ac_cv_c_wall_winline=no
4755 fi
4756 rm -f conftest*
4757 fi
4758
4759 echo "$ac_t""$ac_cv_c_wall_winline" 1>&6
4760     if test x"$ac_cv_c_wall_winline" != x"no"; then
4761         save_CFLAGS="${save_CFLAGS} -wall -winline"
4762     fi
4763 fi
4764
4765 echo $ac_n "checking if \$CC accepts -pipe""... $ac_c" 1>&6
4766 echo "configure:4767: checking if \$CC accepts -pipe" >&5
4767 if eval "test \"`echo '$''{'ac_cv_c_pipe'+set}'`\" = set"; then
4768   echo $ac_n "(cached) $ac_c" 1>&6
4769 else
4770   CFLAGS="${save_CFLAGS} -pipe"
4771      cat > conftest.$ac_ext <<EOF
4772 #line 4773 "configure"
4773 #include "confdefs.h"
4774
4775 int main() {
4776
4777 ; return 0; }
4778 EOF
4779 if { (eval echo configure:4780: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4780   rm -rf conftest*
4781   ac_cv_c_pipe=yes
4782 else
4783   echo "configure: failed program was:" >&5
4784   cat conftest.$ac_ext >&5
4785   rm -rf conftest*
4786   ac_cv_c_pipe=no
4787 fi
4788 rm -f conftest*
4789 fi
4790
4791 echo "$ac_t""$ac_cv_c_pipe" 1>&6
4792 if test x"$ac_cv_c_pipe" != x"no"; then
4793     save_CFLAGS="${save_CFLAGS} -pipe"
4794 fi
4795
4796 echo $ac_n "checking if \$CC accepts -O3""... $ac_c" 1>&6
4797 echo "configure:4798: checking if \$CC accepts -O3" >&5
4798 if eval "test \"`echo '$''{'ac_cv_c_o3'+set}'`\" = set"; then
4799   echo $ac_n "(cached) $ac_c" 1>&6
4800 else
4801   CFLAGS="${save_CFLAGS} -O3"
4802      cat > conftest.$ac_ext <<EOF
4803 #line 4804 "configure"
4804 #include "confdefs.h"
4805
4806 int main() {
4807
4808 ; return 0; }
4809 EOF
4810 if { (eval echo configure:4811: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4811   rm -rf conftest*
4812   ac_cv_c_o3=yes
4813 else
4814   echo "configure: failed program was:" >&5
4815   cat conftest.$ac_ext >&5
4816   rm -rf conftest*
4817   ac_cv_c_o3=no
4818 fi
4819 rm -f conftest*
4820 fi
4821
4822 echo "$ac_t""$ac_cv_c_o3" 1>&6
4823 if test x"$ac_cv_c_o3" != x"no"; then
4824     CFLAGS_OPTIM="${CFLAGS_OPTIM} -O3"
4825 else
4826     echo $ac_n "checking if \$CC accepts -O2""... $ac_c" 1>&6
4827 echo "configure:4828: checking if \$CC accepts -O2" >&5
4828 if eval "test \"`echo '$''{'ac_cv_c_o2'+set}'`\" = set"; then
4829   echo $ac_n "(cached) $ac_c" 1>&6
4830 else
4831   CFLAGS="${save_CFLAGS} -O2"
4832          cat > conftest.$ac_ext <<EOF
4833 #line 4834 "configure"
4834 #include "confdefs.h"
4835
4836 int main() {
4837
4838 ; return 0; }
4839 EOF
4840 if { (eval echo configure:4841: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4841   rm -rf conftest*
4842   ac_cv_c_o2=yes
4843 else
4844   echo "configure: failed program was:" >&5
4845   cat conftest.$ac_ext >&5
4846   rm -rf conftest*
4847   ac_cv_c_o2=no
4848 fi
4849 rm -f conftest*
4850 fi
4851
4852 echo "$ac_t""$ac_cv_c_o2" 1>&6
4853     if test x"$ac_cv_c_o2" != x"no"; then
4854         CFLAGS_OPTIM="${CFLAGS_OPTIM} -O2"
4855     else
4856         echo $ac_n "checking if \$CC accepts -O""... $ac_c" 1>&6
4857 echo "configure:4858: checking if \$CC accepts -O" >&5
4858 if eval "test \"`echo '$''{'ac_cv_c_o'+set}'`\" = set"; then
4859   echo $ac_n "(cached) $ac_c" 1>&6
4860 else
4861   CFLAGS="${save_CFLAGS} -O"
4862              cat > conftest.$ac_ext <<EOF
4863 #line 4864 "configure"
4864 #include "confdefs.h"
4865
4866 int main() {
4867
4868 ; return 0; }
4869 EOF
4870 if { (eval echo configure:4871: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4871   rm -rf conftest*
4872   ac_cv_c_o=yes
4873 else
4874   echo "configure: failed program was:" >&5
4875   cat conftest.$ac_ext >&5
4876   rm -rf conftest*
4877   ac_cv_c_o=no
4878 fi
4879 rm -f conftest*
4880 fi
4881
4882 echo "$ac_t""$ac_cv_c_o" 1>&6
4883         if test x"$ac_cv_c_o" != x"no"; then
4884             CFLAGS_OPTIM="${CFLAGS_OPTIM} -O"
4885         fi
4886     fi
4887 fi
4888
4889 echo $ac_n "checking if \$CC accepts -ffast-math""... $ac_c" 1>&6
4890 echo "configure:4891: checking if \$CC accepts -ffast-math" >&5
4891 if eval "test \"`echo '$''{'ac_cv_c_fast_math'+set}'`\" = set"; then
4892   echo $ac_n "(cached) $ac_c" 1>&6
4893 else
4894   CFLAGS="${save_CFLAGS} -ffast-math"
4895      cat > conftest.$ac_ext <<EOF
4896 #line 4897 "configure"
4897 #include "confdefs.h"
4898
4899 int main() {
4900
4901 ; return 0; }
4902 EOF
4903 if { (eval echo configure:4904: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4904   rm -rf conftest*
4905   ac_cv_c_fast_math=yes
4906 else
4907   echo "configure: failed program was:" >&5
4908   cat conftest.$ac_ext >&5
4909   rm -rf conftest*
4910   ac_cv_c_fast_math=no
4911 fi
4912 rm -f conftest*
4913 fi
4914
4915 echo "$ac_t""$ac_cv_c_fast_math" 1>&6
4916 if test x"$ac_cv_c_fast_math" != x"no"; then
4917     CFLAGS_OPTIM="${CFLAGS_OPTIM} -ffast-math"
4918 fi
4919
4920 echo $ac_n "checking if \$CC accepts -funroll-loops""... $ac_c" 1>&6
4921 echo "configure:4922: checking if \$CC accepts -funroll-loops" >&5
4922 if eval "test \"`echo '$''{'ac_cv_c_unroll_loops'+set}'`\" = set"; then
4923   echo $ac_n "(cached) $ac_c" 1>&6
4924 else
4925   CFLAGS="${save_CFLAGS} -funroll-loops"
4926      cat > conftest.$ac_ext <<EOF
4927 #line 4928 "configure"
4928 #include "confdefs.h"
4929
4930 int main() {
4931
4932 ; return 0; }
4933 EOF
4934 if { (eval echo configure:4935: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4935   rm -rf conftest*
4936   ac_cv_c_unroll_loops=yes
4937 else
4938   echo "configure: failed program was:" >&5
4939   cat conftest.$ac_ext >&5
4940   rm -rf conftest*
4941   ac_cv_c_unroll_loops=no
4942 fi
4943 rm -f conftest*
4944 fi
4945
4946 echo "$ac_t""$ac_cv_c_unroll_loops" 1>&6
4947 if test x"$ac_cv_c_unroll_loops" != x"no"; then
4948     CFLAGS_OPTIM="${CFLAGS_OPTIM} -funroll-loops"
4949 fi
4950
4951 echo $ac_n "checking if \$CC accepts -fomit-frame-pointer""... $ac_c" 1>&6
4952 echo "configure:4953: checking if \$CC accepts -fomit-frame-pointer" >&5
4953 if eval "test \"`echo '$''{'ac_cv_c_omit_frame_pointer'+set}'`\" = set"; then
4954   echo $ac_n "(cached) $ac_c" 1>&6
4955 else
4956   CFLAGS="${save_CFLAGS} -fomit-frame-pointer"
4957      cat > conftest.$ac_ext <<EOF
4958 #line 4959 "configure"
4959 #include "confdefs.h"
4960
4961 int main() {
4962
4963 ; return 0; }
4964 EOF
4965 if { (eval echo configure:4966: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4966   rm -rf conftest*
4967   ac_cv_c_omit_frame_pointer=yes
4968 else
4969   echo "configure: failed program was:" >&5
4970   cat conftest.$ac_ext >&5
4971   rm -rf conftest*
4972   ac_cv_c_omit_frame_pointer=no
4973 fi
4974 rm -f conftest*
4975 fi
4976
4977 echo "$ac_t""$ac_cv_c_omit_frame_pointer" 1>&6
4978 if test x"$ac_cv_c_omit_frame_pointer" != x"no"; then
4979     CFLAGS_OPTIM_NODEBUG="${CFLAGS_OPTIM_NODEBUG} -fomit-frame-pointer"
4980 fi
4981
4982 echo $ac_n "checking if \$CC accepts -bundle -undefined error""... $ac_c" 1>&6
4983 echo "configure:4984: checking if \$CC accepts -bundle -undefined error" >&5
4984 if eval "test \"`echo '$''{'ac_cv_ld_darwin'+set}'`\" = set"; then
4985   echo $ac_n "(cached) $ac_c" 1>&6
4986 else
4987   CFLAGS="${save_CFLAGS} -bundle -undefined error"
4988      cat > conftest.$ac_ext <<EOF
4989 #line 4990 "configure"
4990 #include "confdefs.h"
4991
4992 int main() {
4993
4994 ; return 0; }
4995 EOF
4996 if { (eval echo configure:4997: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4997   rm -rf conftest*
4998   ac_cv_ld_darwin=yes
4999 else
5000   echo "configure: failed program was:" >&5
5001   cat conftest.$ac_ext >&5
5002   rm -rf conftest*
5003   ac_cv_ld_darwin=no
5004 fi
5005 rm -f conftest*
5006 fi
5007
5008 echo "$ac_t""$ac_cv_ld_darwin" 1>&6
5009 if test x"$ac_cv_ld_darwin" != x"no"; then
5010     PLDFLAGS="${PLDFLAGS} -bundle -undefined error"
5011 fi
5012
5013 echo $ac_n "checking if \$CC accepts -shared""... $ac_c" 1>&6
5014 echo "configure:5015: checking if \$CC accepts -shared" >&5
5015 if eval "test \"`echo '$''{'ac_cv_ld_plugins'+set}'`\" = set"; then
5016   echo $ac_n "(cached) $ac_c" 1>&6
5017 else
5018   CFLAGS="${save_CFLAGS} -shared"
5019      cat > conftest.$ac_ext <<EOF
5020 #line 5021 "configure"
5021 #include "confdefs.h"
5022
5023 int main() {
5024
5025 ; return 0; }
5026 EOF
5027 if { (eval echo configure:5028: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5028   rm -rf conftest*
5029   ac_cv_ld_plugins=yes
5030 else
5031   echo "configure: failed program was:" >&5
5032   cat conftest.$ac_ext >&5
5033   rm -rf conftest*
5034   ac_cv_ld_plugins=no
5035 fi
5036 rm -f conftest*
5037 fi
5038
5039 echo "$ac_t""$ac_cv_ld_plugins" 1>&6
5040 if test x"$ac_cv_ld_plugins" != x"no"; then
5041     PLDFLAGS="${PLDFLAGS} -shared"
5042 fi
5043         
5044 if test x"${SOFLAGS}" = x; then
5045     echo $ac_n "checking for soname setting""... $ac_c" 1>&6
5046 echo "configure:5047: checking for soname setting" >&5
5047 if eval "test \"`echo '$''{'ac_cv_ld_soname'+set}'`\" = set"; then
5048   echo $ac_n "(cached) $ac_c" 1>&6
5049 else
5050   
5051         # Standard
5052         try_SOFLAGS="-Wl,-soname -Wl,"
5053         LDFLAGS="${save_LDFLAGS} ${try_SOFLAGS}foo.so.0"
5054         cat > conftest.$ac_ext <<EOF
5055 #line 5056 "configure"
5056 #include "confdefs.h"
5057
5058 int main() {
5059
5060 ; return 0; }
5061 EOF
5062 if { (eval echo configure:5063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5063   rm -rf conftest*
5064   ac_cv_ld_soname="${try_SOFLAGS}"
5065 else
5066   echo "configure: failed program was:" >&5
5067   cat conftest.$ac_ext >&5
5068   rm -rf conftest*
5069   
5070             # SunOS
5071             try_SOFLAGS="-Wl,-h -Wl,"
5072             LDFLAGS="${save_LDFLAGS} ${try_SOFLAGS}foo.so.0"
5073             cat > conftest.$ac_ext <<EOF
5074 #line 5075 "configure"
5075 #include "confdefs.h"
5076
5077 int main() {
5078
5079 ; return 0; }
5080 EOF
5081 if { (eval echo configure:5082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5082   rm -rf conftest*
5083   ac_cv_ld_soname="${try_SOFLAGS}"
5084 else
5085   echo "configure: failed program was:" >&5
5086   cat conftest.$ac_ext >&5
5087   rm -rf conftest*
5088   ac_cv_ld_soname=none
5089 fi
5090 rm -f conftest*
5091         
5092 fi
5093 rm -f conftest*
5094 fi
5095
5096 echo "$ac_t""$ac_cv_ld_soname" 1>&6
5097     if test x"$ac_cv_ld_soname" != x"none"; then
5098         SOFLAGS=$ac_cv_ld_soname
5099     else
5100         echo "
5101 ------------
5102 Your system doesn't seem to have support for dynamic linking. You may
5103 have problems using libdvdcss.
5104 ------------
5105 "
5106     fi
5107 fi
5108
5109 echo $ac_n "checking __attribute__ ((aligned ())) support""... $ac_c" 1>&6
5110 echo "configure:5111: checking __attribute__ ((aligned ())) support" >&5
5111 if eval "test \"`echo '$''{'ac_cv_c_attribute_aligned'+set}'`\" = set"; then
5112   echo $ac_n "(cached) $ac_c" 1>&6
5113 else
5114   ac_cv_c_attribute_aligned=0
5115         CFLAGS="${save_CFLAGS} -Werror"
5116     for ac_cv_c_attr_align_try in 2 4 8 16 32 64; do
5117         cat > conftest.$ac_ext <<EOF
5118 #line 5119 "configure"
5119 #include "confdefs.h"
5120
5121 int main() {
5122 static char c __attribute__ ((aligned($ac_cv_c_attr_align_try))) = 0; return c;
5123 ; return 0; }
5124 EOF
5125 if { (eval echo configure:5126: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5126   rm -rf conftest*
5127   ac_cv_c_attribute_aligned=$ac_cv_c_attr_align_try
5128 else
5129   echo "configure: failed program was:" >&5
5130   cat conftest.$ac_ext >&5
5131 fi
5132 rm -f conftest*
5133     done
5134 fi
5135
5136 echo "$ac_t""$ac_cv_c_attribute_aligned" 1>&6
5137 if test x"$ac_cv_c_attribute_aligned" != x"0"; then
5138     cat >> confdefs.h <<EOF
5139 #define ATTRIBUTE_ALIGNED_MAX $ac_cv_c_attribute_aligned
5140 EOF
5141
5142 fi
5143
5144 CFLAGS="${save_CFLAGS}"
5145 LDFLAGS="${save_LDFLAGS}"
5146
5147 echo $ac_n "checking for boolean_t in sys/types.h""... $ac_c" 1>&6
5148 echo "configure:5149: checking for boolean_t in sys/types.h" >&5
5149 if eval "test \"`echo '$''{'ac_cv_c_boolean_t_sys_types_h'+set}'`\" = set"; then
5150   echo $ac_n "(cached) $ac_c" 1>&6
5151 else
5152   cat > conftest.$ac_ext <<EOF
5153 #line 5154 "configure"
5154 #include "confdefs.h"
5155 #include <sys/types.h>
5156 int main() {
5157 boolean_t foo;
5158 ; return 0; }
5159 EOF
5160 if { (eval echo configure:5161: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5161   rm -rf conftest*
5162   ac_cv_c_boolean_t_sys_types_h=yes
5163 else
5164   echo "configure: failed program was:" >&5
5165   cat conftest.$ac_ext >&5
5166   rm -rf conftest*
5167   ac_cv_c_boolean_t_sys_types_h=no
5168 fi
5169 rm -f conftest*
5170 fi
5171
5172 echo "$ac_t""$ac_cv_c_boolean_t_sys_types_h" 1>&6
5173 if test x"$ac_cv_c_boolean_t_sys_types_h" != x"no"; then
5174     cat >> confdefs.h <<\EOF
5175 #define BOOLEAN_T_IN_SYS_TYPES_H 1
5176 EOF
5177
5178 fi
5179
5180 echo $ac_n "checking for boolean_t in pthread.h""... $ac_c" 1>&6
5181 echo "configure:5182: checking for boolean_t in pthread.h" >&5
5182 if eval "test \"`echo '$''{'ac_cv_c_boolean_t_pthread_h'+set}'`\" = set"; then
5183   echo $ac_n "(cached) $ac_c" 1>&6
5184 else
5185   cat > conftest.$ac_ext <<EOF
5186 #line 5187 "configure"
5187 #include "confdefs.h"
5188 #include <pthread.h>
5189 int main() {
5190 boolean_t foo;
5191 ; return 0; }
5192 EOF
5193 if { (eval echo configure:5194: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5194   rm -rf conftest*
5195   ac_cv_c_boolean_t_pthread_h=yes
5196 else
5197   echo "configure: failed program was:" >&5
5198   cat conftest.$ac_ext >&5
5199   rm -rf conftest*
5200   ac_cv_c_boolean_t_pthread_h=no
5201 fi
5202 rm -f conftest*
5203 fi
5204
5205 echo "$ac_t""$ac_cv_c_boolean_t_pthread_h" 1>&6
5206 if test x"$ac_cv_c_boolean_t_pthread_h" != x"no"; then
5207     cat >> confdefs.h <<\EOF
5208 #define BOOLEAN_T_IN_PTHREAD_H 1
5209 EOF
5210
5211 fi
5212
5213 echo $ac_n "checking for boolean_t in cthreads.h""... $ac_c" 1>&6
5214 echo "configure:5215: checking for boolean_t in cthreads.h" >&5
5215 if eval "test \"`echo '$''{'ac_cv_c_boolean_t_cthreads_h'+set}'`\" = set"; then
5216   echo $ac_n "(cached) $ac_c" 1>&6
5217 else
5218   cat > conftest.$ac_ext <<EOF
5219 #line 5220 "configure"
5220 #include "confdefs.h"
5221 #include <cthreads.h>
5222 int main() {
5223 boolean_t foo;
5224 ; return 0; }
5225 EOF
5226 if { (eval echo configure:5227: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5227   rm -rf conftest*
5228   ac_cv_c_boolean_t_cthreads_h=yes
5229 else
5230   echo "configure: failed program was:" >&5
5231   cat conftest.$ac_ext >&5
5232   rm -rf conftest*
5233   ac_cv_c_boolean_t_cthreads_h=no
5234 fi
5235 rm -f conftest*
5236 fi
5237
5238 echo "$ac_t""$ac_cv_c_boolean_t_cthreads_h" 1>&6
5239 if test x"$ac_cv_c_boolean_t_cthreads_h" != x"no"; then
5240     cat >> confdefs.h <<\EOF
5241 #define BOOLEAN_T_IN_CTHREADS_H 1
5242 EOF
5243
5244 fi
5245
5246 case x"${target_cpu}" in
5247   x)
5248     ARCH=unknown
5249     ;;
5250   *)
5251     ARCH=${target_cpu}
5252     ;;
5253 esac
5254
5255 BUILTINS="${BUILTINS} mpeg_es mpeg_ps mpeg_ts memcpy idct idctclassic motion imdct downmix chroma_i420_rgb chroma_i420_yuy2 chroma_i422_yuy2 chroma_i420_ymga mpeg_adec ac3_adec mpeg_vdec"
5256 PLUGINS="${PLUGINS} lpcm_adec ac3_spdif spudec filter_deinterlace filter_invert filter_wall filter_transform filter_distort"
5257
5258 MMX_MODULES="memcpymmx idctmmx motionmmx chroma_i420_rgb_mmx chroma_i420_yuy2_mmx chroma_i422_yuy2_mmx chroma_i420_ymga_mmx"
5259 MMXEXT_MODULES="memcpymmxext idctmmxext motionmmxext"
5260 THREEDNOW_MODULES="memcpy3dn imdct3dn downmix3dn"
5261 SSE_MODULES="imdctsse downmixsse"
5262 ALTIVEC_MODULES="idctaltivec motionaltivec"
5263
5264 echo $ac_n "checking if \$CC groks MMX inline assembly""... $ac_c" 1>&6
5265 echo "configure:5266: checking if \$CC groks MMX inline assembly" >&5
5266 if eval "test \"`echo '$''{'ac_cv_mmx_inline'+set}'`\" = set"; then
5267   echo $ac_n "(cached) $ac_c" 1>&6
5268 else
5269   cat > conftest.$ac_ext <<EOF
5270 #line 5271 "configure"
5271 #include "confdefs.h"
5272
5273 int main() {
5274 void *p;asm volatile("packuswb %%mm1,%%mm2"::"r"(p));
5275 ; return 0; }
5276 EOF
5277 if { (eval echo configure:5278: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5278   rm -rf conftest*
5279   ac_cv_mmx_inline=yes
5280 else
5281   echo "configure: failed program was:" >&5
5282   cat conftest.$ac_ext >&5
5283   rm -rf conftest*
5284   ac_cv_mmx_inline=no
5285 fi
5286 rm -f conftest*
5287 fi
5288
5289 echo "$ac_t""$ac_cv_mmx_inline" 1>&6
5290 if test x"$ac_cv_mmx_inline" != x"no"; then
5291   ACCEL_MODULES="${ACCEL_MODULES} ${MMX_MODULES}"
5292 fi
5293
5294 echo $ac_n "checking if \$CC groks MMX EXT inline assembly""... $ac_c" 1>&6
5295 echo "configure:5296: checking if \$CC groks MMX EXT inline assembly" >&5
5296 if eval "test \"`echo '$''{'ac_cv_mmxext_inline'+set}'`\" = set"; then
5297   echo $ac_n "(cached) $ac_c" 1>&6
5298 else
5299   cat > conftest.$ac_ext <<EOF
5300 #line 5301 "configure"
5301 #include "confdefs.h"
5302
5303 int main() {
5304 void *p;asm volatile("maskmovq %%mm1,%%mm2"::"r"(p));
5305 ; return 0; }
5306 EOF
5307 if { (eval echo configure:5308: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5308   rm -rf conftest*
5309   ac_cv_mmxext_inline=yes
5310 else
5311   echo "configure: failed program was:" >&5
5312   cat conftest.$ac_ext >&5
5313   rm -rf conftest*
5314   ac_cv_mmxext_inline=no
5315 fi
5316 rm -f conftest*
5317 fi
5318
5319 echo "$ac_t""$ac_cv_mmxext_inline" 1>&6
5320 if test x"$ac_cv_mmxext_inline" != x"no"; then
5321   ACCEL_MODULES="${ACCEL_MODULES} ${MMXEXT_MODULES}"
5322 fi
5323
5324 echo $ac_n "checking if \$CC groks 3D Now! inline assembly""... $ac_c" 1>&6
5325 echo "configure:5326: checking if \$CC groks 3D Now! inline assembly" >&5
5326 if eval "test \"`echo '$''{'ac_cv_3dnow_inline'+set}'`\" = set"; then
5327   echo $ac_n "(cached) $ac_c" 1>&6
5328 else
5329   cat > conftest.$ac_ext <<EOF
5330 #line 5331 "configure"
5331 #include "confdefs.h"
5332
5333 int main() {
5334 void *p;asm volatile("pfadd %%mm1,%%mm2"::"r"(p));
5335 ; return 0; }
5336 EOF
5337 if { (eval echo configure:5338: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5338   rm -rf conftest*
5339   ac_cv_3dnow_inline=yes
5340 else
5341   echo "configure: failed program was:" >&5
5342   cat conftest.$ac_ext >&5
5343   rm -rf conftest*
5344   ac_cv_3dnow_inline=no
5345 fi
5346 rm -f conftest*
5347 fi
5348
5349 echo "$ac_t""$ac_cv_3dnow_inline" 1>&6
5350 if test x"$ac_cv_3dnow_inline" != x"no"; then
5351   cat >> confdefs.h <<\EOF
5352 #define CAN_COMPILE_3DNOW 1
5353 EOF
5354
5355   ACCEL_MODULES="${ACCEL_MODULES} ${THREEDNOW_MODULES}"
5356 fi
5357
5358 echo $ac_n "checking if \$CC groks SSE inline assembly""... $ac_c" 1>&6
5359 echo "configure:5360: checking if \$CC groks SSE inline assembly" >&5
5360 if eval "test \"`echo '$''{'ac_cv_sse_inline'+set}'`\" = set"; then
5361   echo $ac_n "(cached) $ac_c" 1>&6
5362 else
5363   cat > conftest.$ac_ext <<EOF
5364 #line 5365 "configure"
5365 #include "confdefs.h"
5366
5367 int main() {
5368 void *p;asm volatile("xorps %%xmm1,%%xmm2"::"r"(p));
5369 ; return 0; }
5370 EOF
5371 if { (eval echo configure:5372: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5372   rm -rf conftest*
5373   ac_cv_sse_inline=yes
5374 else
5375   echo "configure: failed program was:" >&5
5376   cat conftest.$ac_ext >&5
5377   rm -rf conftest*
5378   ac_cv_sse_inline=no
5379 fi
5380 rm -f conftest*
5381 fi
5382
5383 echo "$ac_t""$ac_cv_sse_inline" 1>&6
5384 if test x"$ac_cv_sse_inline" != x"no"; then
5385   cat >> confdefs.h <<\EOF
5386 #define CAN_COMPILE_SSE 1
5387 EOF
5388
5389   ACCEL_MODULES="${ACCEL_MODULES} ${SSE_MODULES}"
5390 fi
5391
5392 echo $ac_n "checking if \$CC groks Altivec inline assembly""... $ac_c" 1>&6
5393 echo "configure:5394: checking if \$CC groks Altivec inline assembly" >&5
5394 if eval "test \"`echo '$''{'ac_cv_altivec_inline'+set}'`\" = set"; then
5395   echo $ac_n "(cached) $ac_c" 1>&6
5396 else
5397   cat > conftest.$ac_ext <<EOF
5398 #line 5399 "configure"
5399 #include "confdefs.h"
5400
5401 int main() {
5402 asm volatile("vperm 0,1,2,3");
5403 ; return 0; }
5404 EOF
5405 if { (eval echo configure:5406: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5406   rm -rf conftest*
5407   ac_cv_altivec_inline=yes
5408 else
5409   echo "configure: failed program was:" >&5
5410   cat conftest.$ac_ext >&5
5411   rm -rf conftest*
5412   save_CFLAGS=$CFLAGS
5413           CFLAGS="$CFLAGS -Wa,-m7400"
5414           cat > conftest.$ac_ext <<EOF
5415 #line 5416 "configure"
5416 #include "confdefs.h"
5417
5418 int main() {
5419 asm volatile("vperm 0,1,2,3");
5420 ; return 0; }
5421 EOF
5422 if { (eval echo configure:5423: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5423   rm -rf conftest*
5424   ac_cv_altivec_inline="-Wa,-m7400"
5425 else
5426   echo "configure: failed program was:" >&5
5427   cat conftest.$ac_ext >&5
5428   rm -rf conftest*
5429   ac_cv_altivec_inline=no
5430 fi
5431 rm -f conftest*
5432           CFLAGS=$save_CFLAGS
5433          
5434 fi
5435 rm -f conftest*
5436 fi
5437
5438 echo "$ac_t""$ac_cv_altivec_inline" 1>&6
5439 if test x"$ac_cv_altivec_inline" != x"no"; then
5440   cat >> confdefs.h <<\EOF
5441 #define CAN_COMPILE_ALTIVEC 1
5442 EOF
5443
5444   if test x"$ac_cv_altivec_inline" != x"yes"; then
5445     CFLAGS_IDCTALTIVEC="$CFLAGS_IDCTALTIVEC $ac_cv_altivec_inline"
5446     CFLAGS_MOTIONALTIVEC="$CFLAGS_MOTIONALTIVEC $ac_cv_altivec_inline"
5447     CFLAGS_VLC="$CFLAGS_VLC $ac_cv_altivec_inline"
5448   fi
5449   ACCEL_MODULES="${ACCEL_MODULES} ${ALTIVEC_MODULES}"
5450 fi
5451
5452 echo $ac_n "checking if \$CC groks Altivec C extensions""... $ac_c" 1>&6
5453 echo "configure:5454: checking if \$CC groks Altivec C extensions" >&5
5454 if eval "test \"`echo '$''{'ac_cv_c_altivec'+set}'`\" = set"; then
5455   echo $ac_n "(cached) $ac_c" 1>&6
5456 else
5457   save_CFLAGS=$CFLAGS
5458      CFLAGS="$CFLAGS -faltivec"
5459      # Darwin test
5460      cat > conftest.$ac_ext <<EOF
5461 #line 5462 "configure"
5462 #include "confdefs.h"
5463
5464 int main() {
5465 vec_mtvscr((vector unsigned int)(0));
5466 ; return 0; }
5467 EOF
5468 if { (eval echo configure:5469: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5469   rm -rf conftest*
5470   ac_cv_c_altivec=-faltivec
5471 else
5472   echo "configure: failed program was:" >&5
5473   cat conftest.$ac_ext >&5
5474   rm -rf conftest*
5475   
5476         # Linux/PPC test
5477         CFLAGS="$save_CFLAGS $CFLAGS_IDCTALTIVEC -fvec"
5478         cat > conftest.$ac_ext <<EOF
5479 #line 5480 "configure"
5480 #include "confdefs.h"
5481
5482 int main() {
5483 vec_mtvscr((vector unsigned int)(0));
5484 ; return 0; }
5485 EOF
5486 if { (eval echo configure:5487: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5487   rm -rf conftest*
5488   ac_cv_c_altivec="-fvec"
5489 else
5490   echo "configure: failed program was:" >&5
5491   cat conftest.$ac_ext >&5
5492   rm -rf conftest*
5493   ac_cv_c_altivec=no
5494 fi
5495 rm -f conftest*
5496         
5497 fi
5498 rm -f conftest*
5499      CFLAGS=$save_CFLAGS
5500     
5501 fi
5502
5503 echo "$ac_t""$ac_cv_c_altivec" 1>&6
5504 if test x"$ac_cv_c_altivec" != x"no"; then
5505   cat >> confdefs.h <<\EOF
5506 #define CAN_COMPILE_C_ALTIVEC 1
5507 EOF
5508
5509   CFLAGS_IDCTALTIVEC="$CFLAGS_IDCTALTIVEC $ac_cv_c_altivec"
5510   CFLAGS_MOTIONALTIVEC="$CFLAGS_MOTIONALTIVEC $ac_cv_c_altivec"
5511   CFLAGS_VLC="$CFLAGS_VLC $ac_cv_c_altivec"
5512   ACCEL_MODULES="${ACCEL_MODULES} ${ALTIVEC_MODULES}"
5513 fi
5514
5515 echo $ac_n "checking if linker needs -framework vecLib""... $ac_c" 1>&6
5516 echo "configure:5517: checking if linker needs -framework vecLib" >&5
5517 if eval "test \"`echo '$''{'ac_cv_ld_altivec'+set}'`\" = set"; then
5518   echo $ac_n "(cached) $ac_c" 1>&6
5519 else
5520   save_LDFLAGS=$LDFLAGS
5521      LDFLAGS="$LDFLAGS -framework vecLib"
5522      cat > conftest.$ac_ext <<EOF
5523 #line 5524 "configure"
5524 #include "confdefs.h"
5525
5526 int main() {
5527
5528 ; return 0; }
5529 EOF
5530 if { (eval echo configure:5531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5531   rm -rf conftest*
5532   ac_cv_ld_altivec=yes
5533 else
5534   echo "configure: failed program was:" >&5
5535   cat conftest.$ac_ext >&5
5536   rm -rf conftest*
5537   ac_cv_ld_altivec=no
5538 fi
5539 rm -f conftest*
5540      LDFLAGS=$save_LDFLAGS
5541     
5542 fi
5543
5544 echo "$ac_t""$ac_cv_ld_altivec" 1>&6
5545 if test x"$ac_cv_ld_altivec" != x"no"; then
5546   LIB_IDCTALTIVEC="${LIB_IDCTALTIVEC} -framework vecLib"
5547   LIB_MOTIONALTIVEC="${LIB_MOTIONALTIVEC} -framework vecLib"
5548   LIB="${LIB} -framework vecLib"
5549 fi
5550
5551 case x"${target_os}" in
5552   x)
5553     SYS=unknown
5554     ;;
5555   xlinux*)
5556     SYS=linux
5557     ;;
5558   xbsdi*)
5559     SYS=bsdi
5560     ;;
5561   xdarwin*)
5562     SYS=darwin
5563     ;;
5564   x*mingw32*)
5565     SYS=mingw32
5566     # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
5567 set dummy ${ac_tool_prefix}windres; ac_word=$2
5568 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5569 echo "configure:5570: checking for $ac_word" >&5
5570 if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
5571   echo $ac_n "(cached) $ac_c" 1>&6
5572 else
5573   if test -n "$WINDRES"; then
5574   ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
5575 else
5576   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5577   ac_dummy="$PATH"
5578   for ac_dir in $ac_dummy; do
5579     test -z "$ac_dir" && ac_dir=.
5580     if test -f $ac_dir/$ac_word; then
5581       ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
5582       break
5583     fi
5584   done
5585   IFS="$ac_save_ifs"
5586 fi
5587 fi
5588 WINDRES="$ac_cv_prog_WINDRES"
5589 if test -n "$WINDRES"; then
5590   echo "$ac_t""$WINDRES" 1>&6
5591 else
5592   echo "$ac_t""no" 1>&6
5593 fi
5594
5595
5596 if test -z "$ac_cv_prog_WINDRES"; then
5597 if test -n "$ac_tool_prefix"; then
5598   # Extract the first word of "windres", so it can be a program name with args.
5599 set dummy windres; ac_word=$2
5600 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5601 echo "configure:5602: checking for $ac_word" >&5
5602 if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
5603   echo $ac_n "(cached) $ac_c" 1>&6
5604 else
5605   if test -n "$WINDRES"; then
5606   ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
5607 else
5608   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5609   ac_dummy="$PATH"
5610   for ac_dir in $ac_dummy; do
5611     test -z "$ac_dir" && ac_dir=.
5612     if test -f $ac_dir/$ac_word; then
5613       ac_cv_prog_WINDRES="windres"
5614       break
5615     fi
5616   done
5617   IFS="$ac_save_ifs"
5618   test -z "$ac_cv_prog_WINDRES" && ac_cv_prog_WINDRES=":"
5619 fi
5620 fi
5621 WINDRES="$ac_cv_prog_WINDRES"
5622 if test -n "$WINDRES"; then
5623   echo "$ac_t""$WINDRES" 1>&6
5624 else
5625   echo "$ac_t""no" 1>&6
5626 fi
5627
5628 else
5629   WINDRES=":"
5630 fi
5631 fi
5632
5633     LIB_MPEG_TS="${LIB_MPEG_TS} -lws2_32"
5634     LIB_RC="${LIB_RC} -lws2_32"
5635     ;;
5636   x*nto*)
5637     SYS=nto
5638     LIB_X11="${LIB_X11} -lsocket"
5639     LIB_XVIDEO="${LIB_XVIDEO} -lsocket"
5640     ;;
5641   xbeos)
5642     SYS=beos
5643     LIB="${LIB} -lbe"
5644     LIB_BEOS="${LIB_BEOS} -lbe -lgame -lroot -ltracker"
5645     PLDFLAGS="${PLDFLAGS} -nostart"
5646     ;;
5647   x*)
5648     SYS=${target_os}
5649     ;;
5650 esac
5651
5652 case $SYS in
5653   mingw32)
5654     DVD_DEVICE="E:"
5655     VCD_DEVICE="E:"
5656     ;;
5657   *)
5658     DVD_DEVICE="/dev/dvd"
5659     VCD_DEVICE="/dev/cdrom"
5660     ;;
5661 esac
5662
5663 cat >> confdefs.h <<EOF
5664 #define DVD_DEVICE "$DVD_DEVICE"
5665 EOF
5666
5667 cat >> confdefs.h <<EOF
5668 #define VCD_DEVICE "$VCD_DEVICE"
5669 EOF
5670
5671
5672
5673
5674 CAN_BUILD_LIBDVDCSS=0
5675
5676 for ac_hdr in winioctl.h
5677 do
5678 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5679 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5680 echo "configure:5681: checking for $ac_hdr" >&5
5681 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5682   echo $ac_n "(cached) $ac_c" 1>&6
5683 else
5684   cat > conftest.$ac_ext <<EOF
5685 #line 5686 "configure"
5686 #include "confdefs.h"
5687 #include <$ac_hdr>
5688 EOF
5689 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5690 { (eval echo configure:5691: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5691 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5692 if test -z "$ac_err"; then
5693   rm -rf conftest*
5694   eval "ac_cv_header_$ac_safe=yes"
5695 else
5696   echo "$ac_err" >&5
5697   echo "configure: failed program was:" >&5
5698   cat conftest.$ac_ext >&5
5699   rm -rf conftest*
5700   eval "ac_cv_header_$ac_safe=no"
5701 fi
5702 rm -f conftest*
5703 fi
5704 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5705   echo "$ac_t""yes" 1>&6
5706     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5707   cat >> confdefs.h <<EOF
5708 #define $ac_tr_hdr 1
5709 EOF
5710  
5711   CAN_BUILD_LIBDVDCSS="${HAVE_LIBDVDCSS}"
5712
5713 else
5714   echo "$ac_t""no" 1>&6
5715 fi
5716 done
5717
5718
5719 for ac_hdr in sys/ioctl.h
5720 do
5721 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5722 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5723 echo "configure:5724: checking for $ac_hdr" >&5
5724 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5725   echo $ac_n "(cached) $ac_c" 1>&6
5726 else
5727   cat > conftest.$ac_ext <<EOF
5728 #line 5729 "configure"
5729 #include "confdefs.h"
5730 #include <$ac_hdr>
5731 EOF
5732 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5733 { (eval echo configure:5734: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5734 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5735 if test -z "$ac_err"; then
5736   rm -rf conftest*
5737   eval "ac_cv_header_$ac_safe=yes"
5738 else
5739   echo "$ac_err" >&5
5740   echo "configure: failed program was:" >&5
5741   cat conftest.$ac_ext >&5
5742   rm -rf conftest*
5743   eval "ac_cv_header_$ac_safe=no"
5744 fi
5745 rm -f conftest*
5746 fi
5747 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5748   echo "$ac_t""yes" 1>&6
5749     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5750   cat >> confdefs.h <<EOF
5751 #define $ac_tr_hdr 1
5752 EOF
5753  
5754   CAN_BUILD_LIBDVDCSS="${HAVE_LIBDVDCSS}"
5755   for ac_hdr in sys/cdio.h sys/dvdio.h linux/cdrom.h dvd.h
5756 do
5757 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5758 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5759 echo "configure:5760: checking for $ac_hdr" >&5
5760 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5761   echo $ac_n "(cached) $ac_c" 1>&6
5762 else
5763   cat > conftest.$ac_ext <<EOF
5764 #line 5765 "configure"
5765 #include "confdefs.h"
5766 #include <$ac_hdr>
5767 EOF
5768 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5769 { (eval echo configure:5770: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5770 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5771 if test -z "$ac_err"; then
5772   rm -rf conftest*
5773   eval "ac_cv_header_$ac_safe=yes"
5774 else
5775   echo "$ac_err" >&5
5776   echo "configure: failed program was:" >&5
5777   cat conftest.$ac_ext >&5
5778   rm -rf conftest*
5779   eval "ac_cv_header_$ac_safe=no"
5780 fi
5781 rm -f conftest*
5782 fi
5783 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5784   echo "$ac_t""yes" 1>&6
5785     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5786   cat >> confdefs.h <<EOF
5787 #define $ac_tr_hdr 1
5788 EOF
5789  
5790 else
5791   echo "$ac_t""no" 1>&6
5792 fi
5793 done
5794
5795   BSD_DVD_STRUCT=0
5796   LINUX_DVD_STRUCT=0
5797   OPENBSD_DVD_STRUCT=0
5798         cat > conftest.$ac_ext <<EOF
5799 #line 5800 "configure"
5800 #include "confdefs.h"
5801 #include <sys/cdio.h>
5802 EOF
5803 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5804   egrep "dvd_struct" >/dev/null 2>&1; then
5805   rm -rf conftest*
5806   
5807     cat >> confdefs.h <<\EOF
5808 #define DVD_STRUCT_IN_SYS_CDIO_H 1
5809 EOF
5810
5811     cat > conftest.$ac_ext <<EOF
5812 #line 5813 "configure"
5813 #include "confdefs.h"
5814 #include <sys/cdio.h>
5815 EOF
5816 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5817   egrep "struct dvd_struct" >/dev/null 2>&1; then
5818   rm -rf conftest*
5819   
5820                     BSD_DVD_STRUCT=1
5821 else
5822   rm -rf conftest*
5823   LINUX_DVD_STRUCT=1; OPENBSD_DVD_STRUCT=1
5824 fi
5825 rm -f conftest*
5826
5827   
5828 fi
5829 rm -f conftest*
5830
5831         cat > conftest.$ac_ext <<EOF
5832 #line 5833 "configure"
5833 #include "confdefs.h"
5834 #include <sys/dvdio.h>
5835 EOF
5836 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5837   egrep "dvd_struct" >/dev/null 2>&1; then
5838   rm -rf conftest*
5839   
5840     cat >> confdefs.h <<\EOF
5841 #define DVD_STRUCT_IN_SYS_DVDIO_H 1
5842 EOF
5843
5844     cat > conftest.$ac_ext <<EOF
5845 #line 5846 "configure"
5846 #include "confdefs.h"
5847 #include <sys/dvdio.h>
5848 EOF
5849 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5850   egrep "struct dvd_struct" >/dev/null 2>&1; then
5851   rm -rf conftest*
5852   
5853                     BSD_DVD_STRUCT=1
5854 else
5855   rm -rf conftest*
5856   LINUX_DVD_STRUCT=1
5857 fi
5858 rm -f conftest*
5859
5860   
5861 fi
5862 rm -f conftest*
5863
5864         cat > conftest.$ac_ext <<EOF
5865 #line 5866 "configure"
5866 #include "confdefs.h"
5867 #include <linux/cdrom.h>
5868 EOF
5869 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5870   egrep "dvd_struct" >/dev/null 2>&1; then
5871   rm -rf conftest*
5872   
5873     cat >> confdefs.h <<\EOF
5874 #define DVD_STRUCT_IN_LINUX_CDROM_H 1
5875 EOF
5876
5877     LINUX_DVD_STRUCT=1
5878   
5879 fi
5880 rm -f conftest*
5881
5882         NEED_BSDI_LIBDVD=0
5883   cat > conftest.$ac_ext <<EOF
5884 #line 5885 "configure"
5885 #include "confdefs.h"
5886 #include <dvd.h>
5887 EOF
5888 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5889   egrep "dvd_struct" >/dev/null 2>&1; then
5890   rm -rf conftest*
5891   
5892     cat >> confdefs.h <<\EOF
5893 #define DVD_STRUCT_IN_DVD_H 1
5894 EOF
5895
5896     LIB_LIBDVDCSS="${LIB_LIBDVDCSS} -ldvd"
5897     LINUX_DVD_STRUCT=1
5898   
5899 else
5900   rm -rf conftest*
5901   
5902                 for ac_hdr in /sys/dev/scsi/scsi_ioctl.h
5903 do
5904 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5905 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5906 echo "configure:5907: checking for $ac_hdr" >&5
5907 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5908   echo $ac_n "(cached) $ac_c" 1>&6
5909 else
5910   cat > conftest.$ac_ext <<EOF
5911 #line 5912 "configure"
5912 #include "confdefs.h"
5913 #include <$ac_hdr>
5914 EOF
5915 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5916 { (eval echo configure:5917: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5917 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5918 if test -z "$ac_err"; then
5919   rm -rf conftest*
5920   eval "ac_cv_header_$ac_safe=yes"
5921 else
5922   echo "$ac_err" >&5
5923   echo "configure: failed program was:" >&5
5924   cat conftest.$ac_ext >&5
5925   rm -rf conftest*
5926   eval "ac_cv_header_$ac_safe=no"
5927 fi
5928 rm -f conftest*
5929 fi
5930 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5931   echo "$ac_t""yes" 1>&6
5932     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5933   cat >> confdefs.h <<EOF
5934 #define $ac_tr_hdr 1
5935 EOF
5936  
5937       NEED_BSDI_LIBDVD=1
5938       cat >> confdefs.h <<\EOF
5939 #define DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H 1
5940 EOF
5941
5942       SRC_DVDCSS_EXTRA="${SRC_DVDCSS_EXTRA} bsdi_dvdioctl.c"
5943       LINUX_DVD_STRUCT=1
5944     
5945 else
5946   echo "$ac_t""no" 1>&6
5947 fi
5948 done
5949
5950   
5951 fi
5952 rm -f conftest*
5953
5954         ac_safe=`echo "sys/scsi/scsi_types.h" | sed 'y%./+-%__p_%'`
5955 echo $ac_n "checking for sys/scsi/scsi_types.h""... $ac_c" 1>&6
5956 echo "configure:5957: checking for sys/scsi/scsi_types.h" >&5
5957 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5958   echo $ac_n "(cached) $ac_c" 1>&6
5959 else
5960   cat > conftest.$ac_ext <<EOF
5961 #line 5962 "configure"
5962 #include "confdefs.h"
5963 #include <sys/scsi/scsi_types.h>
5964 EOF
5965 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5966 { (eval echo configure:5967: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5967 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5968 if test -z "$ac_err"; then
5969   rm -rf conftest*
5970   eval "ac_cv_header_$ac_safe=yes"
5971 else
5972   echo "$ac_err" >&5
5973   echo "configure: failed program was:" >&5
5974   cat conftest.$ac_ext >&5
5975   rm -rf conftest*
5976   eval "ac_cv_header_$ac_safe=no"
5977 fi
5978 rm -f conftest*
5979 fi
5980 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5981   echo "$ac_t""yes" 1>&6
5982   
5983     ac_safe=`echo "sys/scsi/impl/uscsi.h" | sed 'y%./+-%__p_%'`
5984 echo $ac_n "checking for sys/scsi/impl/uscsi.h""... $ac_c" 1>&6
5985 echo "configure:5986: checking for sys/scsi/impl/uscsi.h" >&5
5986 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5987   echo $ac_n "(cached) $ac_c" 1>&6
5988 else
5989   cat > conftest.$ac_ext <<EOF
5990 #line 5991 "configure"
5991 #include "confdefs.h"
5992 #include <sys/scsi/impl/uscsi.h>
5993 EOF
5994 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5995 { (eval echo configure:5996: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5996 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5997 if test -z "$ac_err"; then
5998   rm -rf conftest*
5999   eval "ac_cv_header_$ac_safe=yes"
6000 else
6001   echo "$ac_err" >&5
6002   echo "configure: failed program was:" >&5
6003   cat conftest.$ac_ext >&5
6004   rm -rf conftest*
6005   eval "ac_cv_header_$ac_safe=no"
6006 fi
6007 rm -f conftest*
6008 fi
6009 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6010   echo "$ac_t""yes" 1>&6
6011   
6012       cat >> confdefs.h <<\EOF
6013 #define SOLARIS_USCSI 1
6014 EOF
6015
6016     
6017 else
6018   echo "$ac_t""no" 1>&6
6019 fi
6020
6021   
6022 else
6023   echo "$ac_t""no" 1>&6
6024 fi
6025
6026         ac_safe=`echo "sys/scsi.h" | sed 'y%./+-%__p_%'`
6027 echo $ac_n "checking for sys/scsi.h""... $ac_c" 1>&6
6028 echo "configure:6029: checking for sys/scsi.h" >&5
6029 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6030   echo $ac_n "(cached) $ac_c" 1>&6
6031 else
6032   cat > conftest.$ac_ext <<EOF
6033 #line 6034 "configure"
6034 #include "confdefs.h"
6035 #include <sys/scsi.h>
6036 EOF
6037 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6038 { (eval echo configure:6039: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6039 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6040 if test -z "$ac_err"; then
6041   rm -rf conftest*
6042   eval "ac_cv_header_$ac_safe=yes"
6043 else
6044   echo "$ac_err" >&5
6045   echo "configure: failed program was:" >&5
6046   cat conftest.$ac_ext >&5
6047   rm -rf conftest*
6048   eval "ac_cv_header_$ac_safe=no"
6049 fi
6050 rm -f conftest*
6051 fi
6052 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6053   echo "$ac_t""yes" 1>&6
6054   
6055     cat > conftest.$ac_ext <<EOF
6056 #line 6057 "configure"
6057 #include "confdefs.h"
6058 #include <sys/scsi.h>
6059 EOF
6060 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6061   egrep "sctl_io" >/dev/null 2>&1; then
6062   rm -rf conftest*
6063   
6064       cat >> confdefs.h <<\EOF
6065 #define HPUX_SCTL_IO 1
6066 EOF
6067
6068     
6069 fi
6070 rm -f conftest*
6071
6072   
6073 else
6074   echo "$ac_t""no" 1>&6
6075 fi
6076
6077         if test x$LINUX_DVD_STRUCT = x1; then
6078     cat >> confdefs.h <<\EOF
6079 #define HAVE_LINUX_DVD_STRUCT 1
6080 EOF
6081
6082     if test x$OPENBSD_DVD_STRUCT = x1; then
6083       cat >> confdefs.h <<\EOF
6084 #define HAVE_OPENBSD_DVD_STRUCT 1
6085 EOF
6086
6087     fi
6088   else
6089     if test x$BSD_DVD_STRUCT = x1; then
6090       cat >> confdefs.h <<\EOF
6091 #define HAVE_BSD_DVD_STRUCT 1
6092 EOF
6093
6094     fi
6095   fi
6096
6097 else
6098   echo "$ac_t""no" 1>&6
6099 fi
6100 done
6101
6102
6103 # Check whether --with-tuning or --without-tuning was given.
6104 if test "${with_tuning+set}" = set; then
6105   withval="$with_tuning"
6106   :
6107 fi
6108
6109 if test "x$withval" != "x"; then
6110     TUNING=$withval
6111 else
6112     if test x${target_cpu} = xi686 -o x${target_cpu} = xi586 -o x${target_cpu} = xi486 -o x${target_cpu} = xi386; then TUNING="pentiumpro"
6113     else
6114         if test x${target_cpu} = xpowerpc; then TUNING="750"; fi
6115     fi
6116 fi
6117
6118 # Check whether --enable-release or --disable-release was given.
6119 if test "${enable_release+set}" = set; then
6120   enableval="$enable_release"
6121    if test x$enableval = xyes; then RELEASE=1; fi 
6122 else
6123    VLC_VERSION="${VLC_VERSION}_`date +%Y-%m-%d`";
6124   LIBDVDCSS_VERSION="${LIBDVDCSS_VERSION}_`date +%Y-%m-%d`"; 
6125 fi
6126
6127
6128 if test x${target_cpu} = xi686 -o x${target_cpu} = xi586 -o x${target_cpu} = xx86 -o x${target_cpu} = xi386
6129 then
6130     ARCH="${ARCH} mmx"
6131     BUILTINS="${BUILTINS} ${ACCEL_MODULES}"
6132 fi
6133
6134 # Check whether --enable-altivec or --disable-altivec was given.
6135 if test "${enable_altivec+set}" = set; then
6136   enableval="$enable_altivec"
6137    if test x$enableval = xyes; then ARCH="${ARCH} altivec";
6138     BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi 
6139 else
6140    if test x${target_cpu} = xpowerpc; then ARCH="${ARCH} altivec";
6141     BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi 
6142 fi
6143
6144
6145 DEBUG=0
6146 # Check whether --enable-debug or --disable-debug was given.
6147 if test "${enable_debug+set}" = set; then
6148   enableval="$enable_debug"
6149    if test x$enableval = xyes; then DEBUG=1; fi 
6150 fi
6151
6152
6153 TRACE=0
6154 # Check whether --enable-trace or --disable-trace was given.
6155 if test "${enable_trace+set}" = set; then
6156   enableval="$enable_trace"
6157    if test x$enableval = xyes; then TRACE=1; fi 
6158 fi
6159
6160
6161 GPROF=0
6162 # Check whether --enable-gprof or --disable-gprof was given.
6163 if test "${enable_gprof+set}" = set; then
6164   enableval="$enable_gprof"
6165    if test x$enableval = xyes; then GPROF=1; fi 
6166 fi
6167
6168
6169 CPROF=0
6170 # Check whether --enable-cprof or --disable-cprof was given.
6171 if test "${enable_cprof+set}" = set; then
6172   enableval="$enable_cprof"
6173    if test x$enableval = xyes;
6174   then
6175     LIB="${LIB} -lcprof"
6176     CPROF=1
6177   fi
6178
6179 fi
6180
6181
6182 # Check whether --enable-optimizations or --disable-optimizations was given.
6183 if test "${enable_optimizations+set}" = set; then
6184   enableval="$enable_optimizations"
6185    if test x$enableval = xno; then OPTIMS=0; fi 
6186 else
6187    OPTIMS=1 
6188 fi
6189
6190
6191 # Check whether --enable-pth or --disable-pth was given.
6192 if test "${enable_pth+set}" = set; then
6193   enableval="$enable_pth"
6194    if test x$enableval = xyes; then
6195     echo $ac_n "checking for pth_init in -lpth""... $ac_c" 1>&6
6196 echo "configure:6197: checking for pth_init in -lpth" >&5
6197 ac_lib_var=`echo pth'_'pth_init | sed 'y%./+-%__p_%'`
6198 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6199   echo $ac_n "(cached) $ac_c" 1>&6
6200 else
6201   ac_save_LIBS="$LIBS"
6202 LIBS="-lpth  $LIBS"
6203 cat > conftest.$ac_ext <<EOF
6204 #line 6205 "configure"
6205 #include "confdefs.h"
6206 /* Override any gcc2 internal prototype to avoid an error.  */
6207 /* We use char because int might match the return type of a gcc2
6208     builtin and then its argument prototype would still apply.  */
6209 char pth_init();
6210
6211 int main() {
6212 pth_init()
6213 ; return 0; }
6214 EOF
6215 if { (eval echo configure:6216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6216   rm -rf conftest*
6217   eval "ac_cv_lib_$ac_lib_var=yes"
6218 else
6219   echo "configure: failed program was:" >&5
6220   cat conftest.$ac_ext >&5
6221   rm -rf conftest*
6222   eval "ac_cv_lib_$ac_lib_var=no"
6223 fi
6224 rm -f conftest*
6225 LIBS="$ac_save_LIBS"
6226
6227 fi
6228 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6229   echo "$ac_t""yes" 1>&6
6230     ac_tr_lib=HAVE_LIB`echo pth | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6231     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6232   cat >> confdefs.h <<EOF
6233 #define $ac_tr_lib 1
6234 EOF
6235
6236   LIBS="-lpth $LIBS"
6237
6238 else
6239   echo "$ac_t""no" 1>&6
6240 fi
6241
6242     cat > conftest.$ac_ext <<EOF
6243 #line 6244 "configure"
6244 #include "confdefs.h"
6245 #include <pth.h>
6246 EOF
6247 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6248   egrep "pth_init" >/dev/null 2>&1; then
6249   rm -rf conftest*
6250   
6251       cat >> confdefs.h <<\EOF
6252 #define PTH_INIT_IN_PTH_H 1
6253 EOF
6254
6255     THREAD_LIB="-lpth"
6256     fi
6257 fi
6258 rm -f conftest*
6259
6260
6261 fi
6262
6263
6264 LIB="${LIB} ${THREAD_LIB}"
6265
6266 NEED_LIBDVDCSS=0
6267 STATIC_LIBDVDCSS=0
6268 DUMMY_LIBDVDCSS=0
6269 # Check whether --with-dvdcss or --without-dvdcss was given.
6270 if test "${with_dvdcss+set}" = set; then
6271   withval="$with_dvdcss"
6272    case "x${withval}" in
6273     xlocal-static|xyes)
6274       # local libdvdcss, statically linked
6275       if test x${CAN_BUILD_LIBDVDCSS} = x1
6276       then
6277         NEED_LIBDVDCSS=1
6278         STATIC_LIBDVDCSS=1
6279         BUILTINS="${BUILTINS} dvd"
6280         CFLAGS_DVD="${CFLAGS_DVD} -I../../extras/libdvdcss"
6281         LIB_DVD="${LIB_DVD} lib/libdvdcss.a ${LIB_LIBDVDCSS}"
6282         LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} ../../lib/libdvdcss.a ${LIB_LIBDVDCSS}"
6283         LIB_DVDREAD_PLUGIN="${LIB_DVDREAD_PLUGIN} ../../lib/libdvdcss.a ${LIB_LIBDVDCSS}"
6284       fi
6285     ;;
6286     xlocal-shared)
6287       # local libdvdcss, dynamically linked
6288       if test x${CAN_BUILD_LIBDVDCSS} = x1
6289       then
6290         NEED_LIBDVDCSS=1
6291         BUILTINS="${BUILTINS} dvd"
6292         CFLAGS_DVD="${CFLAGS_DVD} -I../../extras/libdvdcss"
6293         LIB_DVD="${LIB_DVD} -Llib -ldvdcss"
6294         LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} -L../../lib -ldvdcss"
6295         LIB_DVDREAD_PLUGIN="${LIB_DVDREAD_PLUGIN} -L../../lib -ldvdcss"
6296       fi
6297     ;;
6298     xno)
6299       # don't use libdvdcss at all, build a DVD module that can dlopen() it
6300       DUMMY_LIBDVDCSS=1
6301       BUILTINS="${BUILTINS} dvd"
6302       SRC_DVD_EXTRA="${SRC_DVD_EXTRA} dummy_dvdcss.c"
6303       CFLAGS_DVD="${CFLAGS_DVD} -DGOD_DAMN_DMCA"
6304       CFLAGS_DVD="${CFLAGS_DVD} -DLIBDVDCSS_VERSION=\"${LIBDVDCSS_VERSION}\""
6305       LIB_DVD="${LIB_DVD} -ldl"
6306       LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} -ldl"
6307       LIB_DVDREAD_PLUGIN="${LIB_DVDREAD_PLUGIN} -ldl"
6308     ;;
6309     *)
6310       # existing libdvdcss
6311       BUILTINS="${BUILTINS} dvd"
6312       if test "x$withval" != "xyes"
6313       then
6314         LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} -L"$withval"/lib"
6315         LIB_DVDREAD_PLUGIN="${LIB_DVDREAD_PLUGIN} -L"$withval"/lib"
6316         CFLAGS_DVD="${CFLAGS_DVD} -I"$withval"/include"
6317       fi
6318       LIB_DVD="${LIB_DVD} -ldvdcss"
6319       LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} -ldvdcss"
6320       LIB_DVDREAD_PLUGIN="${LIB_DVDREAD_PLUGIN} -ldvdcss"
6321     esac 
6322 else
6323   # user didn't decide, we choose to use local libdvdcss and link statically
6324   # if libdvdcss is in the archive, or to use the dummy replacement otherwise.
6325    if test x${CAN_BUILD_LIBDVDCSS} = x1
6326     then
6327       NEED_LIBDVDCSS=1
6328       STATIC_LIBDVDCSS=1
6329       BUILTINS="${BUILTINS} dvd"
6330       CFLAGS_DVD="${CFLAGS_DVD} -I../../extras/libdvdcss"
6331       LIB_DVD="${LIB_DVD} lib/libdvdcss.a ${LIB_LIBDVDCSS}"
6332       LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} ../../lib/libdvdcss.a ${LIB_LIBDVDCSS}"
6333       LIB_DVDREAD_PLUGIN="${LIB_DVDREAD_PLUGIN} ../../lib/libdvdcss.a ${LIB_LIBDVDCSS}"
6334     else
6335       # XXX: no check for libdl is done, don't try this at home !
6336       DUMMY_LIBDVDCSS=1
6337       BUILTINS="${BUILTINS} dvd"
6338       SRC_DVD_EXTRA="${SRC_DVD_EXTRA} dummy_dvdcss.c"
6339       CFLAGS_DVD="${CFLAGS_DVD} -DGOD_DAMN_DMCA"
6340       LIB_DVD="${LIB_DVD} -ldl"
6341       LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} -ldl"
6342       LIB_DVDREAD_PLUGIN="${LIB_DVDREAD_PLUGIN} -ldl"
6343     fi 
6344 fi
6345
6346
6347 # Check whether --enable-dvdread or --disable-dvdread was given.
6348 if test "${enable_dvdread+set}" = set; then
6349   enableval="$enable_dvdread"
6350    if test x$enableval = xyes
6351   then
6352     NEED_LIBDVDCSS=1
6353     STATIC_LIBDVDCSS=1
6354     BUILTINS="${BUILTINS} dvdread" 
6355     CFLAGS_DVDREAD="${CFLAGS_DVDREAD} -I../../extras/libdvdread"
6356     LIB_DVDREAD="${LIB_DVDREAD} lib/libdvdread.a lib/libdvdcss.a"
6357   fi 
6358 fi
6359
6360
6361 # Check whether --enable-vcd or --disable-vcd was given.
6362 if test "${enable_vcd+set}" = set; then
6363   enableval="$enable_vcd"
6364   :
6365 fi
6366
6367
6368 if test x$enable_vcd != xno
6369 then
6370   cat > conftest.$ac_ext <<EOF
6371 #line 6372 "configure"
6372 #include "confdefs.h"
6373 #include <linux/cdrom.h>
6374 EOF
6375 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6376   egrep "cdrom_msf0" >/dev/null 2>&1; then
6377   rm -rf conftest*
6378   
6379     BUILTINS="${BUILTINS} vcd"
6380   
6381 fi
6382 rm -f conftest*
6383
6384 fi
6385
6386 if test x$enable_vcd != xno -a "${SYS}" = "bsdi"
6387 then
6388   BUILTINS="${BUILTINS} vcd"
6389 fi
6390
6391 # Check whether --enable-dummy or --disable-dummy was given.
6392 if test "${enable_dummy+set}" = set; then
6393   enableval="$enable_dummy"
6394   :
6395 fi
6396
6397
6398 if test x$enable_dummy != xno
6399 then
6400   BUILTINS="${BUILTINS} dummy"
6401 fi
6402
6403 # Check whether --enable-null or --disable-null was given.
6404 if test "${enable_null+set}" = set; then
6405   enableval="$enable_null"
6406   :
6407 fi
6408
6409
6410 if test x$enable_null != xno
6411 then
6412   BUILTINS="${BUILTINS} null"
6413 fi
6414
6415 # Check whether --enable-rc or --disable-rc was given.
6416 if test "${enable_rc+set}" = set; then
6417   enableval="$enable_rc"
6418   :
6419 fi
6420
6421
6422 if test x$enable_rc != xno
6423 then
6424   BUILTINS="${BUILTINS} rc"
6425 fi
6426
6427 # Check whether --with-mad or --without-mad was given.
6428 if test "${with_mad+set}" = set; then
6429   withval="$with_mad"
6430    if test "x$with_val" != "xno"; then
6431       if test -n $with_val; then
6432         CFLAGS_MAD="${CFLAGS_MAD} -I$with_val/include"
6433         LIB_MAD="${LIB_MAD} -L$with_val/lib -lmad"
6434       else
6435         LIB_MAD="${LIB_MAD} -lmad"
6436       fi
6437       save_CFLAGS=$CFLAGS
6438       save_LDFLAGS=$LDFLAGS
6439       CFLAGS="$CFLAGS $CFLAGS_MAD"
6440       LDFLAGS="$LDFLAGS $LIB_MAD"
6441       for ac_hdr in mad.h
6442 do
6443 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6444 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6445 echo "configure:6446: checking for $ac_hdr" >&5
6446 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6447   echo $ac_n "(cached) $ac_c" 1>&6
6448 else
6449   cat > conftest.$ac_ext <<EOF
6450 #line 6451 "configure"
6451 #include "confdefs.h"
6452 #include <$ac_hdr>
6453 EOF
6454 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6455 { (eval echo configure:6456: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6456 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6457 if test -z "$ac_err"; then
6458   rm -rf conftest*
6459   eval "ac_cv_header_$ac_safe=yes"
6460 else
6461   echo "$ac_err" >&5
6462   echo "configure: failed program was:" >&5
6463   cat conftest.$ac_ext >&5
6464   rm -rf conftest*
6465   eval "ac_cv_header_$ac_safe=no"
6466 fi
6467 rm -f conftest*
6468 fi
6469 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6470   echo "$ac_t""yes" 1>&6
6471     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6472   cat >> confdefs.h <<EOF
6473 #define $ac_tr_hdr 1
6474 EOF
6475  
6476 else
6477   echo "$ac_t""no" 1>&6
6478 echo "Cannot find development headers for libmad..."
6479         exit 1
6480       
6481 fi
6482 done
6483
6484       echo $ac_n "checking for mad_bit_init in -lmad""... $ac_c" 1>&6
6485 echo "configure:6486: checking for mad_bit_init in -lmad" >&5
6486 ac_lib_var=`echo mad'_'mad_bit_init | sed 'y%./+-%__p_%'`
6487 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6488   echo $ac_n "(cached) $ac_c" 1>&6
6489 else
6490   ac_save_LIBS="$LIBS"
6491 LIBS="-lmad  $LIBS"
6492 cat > conftest.$ac_ext <<EOF
6493 #line 6494 "configure"
6494 #include "confdefs.h"
6495 /* Override any gcc2 internal prototype to avoid an error.  */
6496 /* We use char because int might match the return type of a gcc2
6497     builtin and then its argument prototype would still apply.  */
6498 char mad_bit_init();
6499
6500 int main() {
6501 mad_bit_init()
6502 ; return 0; }
6503 EOF
6504 if { (eval echo configure:6505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6505   rm -rf conftest*
6506   eval "ac_cv_lib_$ac_lib_var=yes"
6507 else
6508   echo "configure: failed program was:" >&5
6509   cat conftest.$ac_ext >&5
6510   rm -rf conftest*
6511   eval "ac_cv_lib_$ac_lib_var=no"
6512 fi
6513 rm -f conftest*
6514 LIBS="$ac_save_LIBS"
6515
6516 fi
6517 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6518   echo "$ac_t""yes" 1>&6
6519     ac_tr_lib=HAVE_LIB`echo mad | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6520     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6521   cat >> confdefs.h <<EOF
6522 #define $ac_tr_lib 1
6523 EOF
6524
6525   LIBS="-lmad $LIBS"
6526
6527 else
6528   echo "$ac_t""no" 1>&6
6529  echo "Cannot find libmad library..."
6530         exit 1
6531       
6532 fi
6533
6534       CFLAGS=$save_CFLAGS
6535       LDFLAGS=$save_LDFLAGS
6536       PLUGINS="${PLUGINS} mad"
6537     fi 
6538 fi
6539
6540
6541 if test x$SYS = xbeos
6542 then
6543     BUILTINS="${BUILTINS} beos"
6544
6545 else
6546
6547 # Check whether --enable-dsp or --disable-dsp was given.
6548 if test "${enable_dsp+set}" = set; then
6549   enableval="$enable_dsp"
6550   :
6551 fi
6552
6553
6554 if test x$enable_dsp != xno &&
6555   (test $SYS != mingw32 || test x$enable_dsp = xyes)
6556 then
6557   if test -c /dev/dsp
6558   then
6559     PLUGINS="${PLUGINS} dsp"
6560   fi
6561 fi
6562
6563 # Check whether --enable-esd or --disable-esd was given.
6564 if test "${enable_esd+set}" = set; then
6565   enableval="$enable_esd"
6566   if test x$enable_esd = xyes
6567    then
6568      # Extract the first word of "esd-config", so it can be a program name with args.
6569 set dummy esd-config; ac_word=$2
6570 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6571 echo "configure:6572: checking for $ac_word" >&5
6572 if eval "test \"`echo '$''{'ac_cv_path_ESD_CONFIG'+set}'`\" = set"; then
6573   echo $ac_n "(cached) $ac_c" 1>&6
6574 else
6575   case "$ESD_CONFIG" in
6576   /*)
6577   ac_cv_path_ESD_CONFIG="$ESD_CONFIG" # Let the user override the test with a path.
6578   ;;
6579   ?:/*)                  
6580   ac_cv_path_ESD_CONFIG="$ESD_CONFIG" # Let the user override the test with a dos path.
6581   ;;
6582   *)
6583   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
6584   ac_dummy="$PATH"
6585   for ac_dir in $ac_dummy; do 
6586     test -z "$ac_dir" && ac_dir=.
6587     if test -f $ac_dir/$ac_word; then
6588       ac_cv_path_ESD_CONFIG="$ac_dir/$ac_word"
6589       break
6590     fi
6591   done
6592   IFS="$ac_save_ifs"
6593   test -z "$ac_cv_path_ESD_CONFIG" && ac_cv_path_ESD_CONFIG="no"
6594   ;;
6595 esac
6596 fi
6597 ESD_CONFIG="$ac_cv_path_ESD_CONFIG"
6598 if test -n "$ESD_CONFIG"; then
6599   echo "$ac_t""$ESD_CONFIG" 1>&6
6600 else
6601   echo "$ac_t""no" 1>&6
6602 fi
6603
6604      if test x${ESD_CONFIG} != xno
6605      then
6606        PLUGINS="${PLUGINS} esd"
6607        CFLAGS_ESD="${CFLAGS_ESD} `${ESD_CONFIG} --cflags`"
6608        LIB_ESD="${LIB_ESD} `${ESD_CONFIG} --libs`"
6609      fi
6610    fi
6611 fi
6612
6613
6614 # Check whether --enable-arts or --disable-arts was given.
6615 if test "${enable_arts+set}" = set; then
6616   enableval="$enable_arts"
6617   if test x$enable_arts = xyes
6618    then
6619      # Extract the first word of "artsc-config", so it can be a program name with args.
6620 set dummy artsc-config; ac_word=$2
6621 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6622 echo "configure:6623: checking for $ac_word" >&5
6623 if eval "test \"`echo '$''{'ac_cv_path_ARTS_CONFIG'+set}'`\" = set"; then
6624   echo $ac_n "(cached) $ac_c" 1>&6
6625 else
6626   case "$ARTS_CONFIG" in
6627   /*)
6628   ac_cv_path_ARTS_CONFIG="$ARTS_CONFIG" # Let the user override the test with a path.
6629   ;;
6630   ?:/*)                  
6631   ac_cv_path_ARTS_CONFIG="$ARTS_CONFIG" # Let the user override the test with a dos path.
6632   ;;
6633   *)
6634   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
6635   ac_dummy="$PATH"
6636   for ac_dir in $ac_dummy; do 
6637     test -z "$ac_dir" && ac_dir=.
6638     if test -f $ac_dir/$ac_word; then
6639       ac_cv_path_ARTS_CONFIG="$ac_dir/$ac_word"
6640       break
6641     fi
6642   done
6643   IFS="$ac_save_ifs"
6644   test -z "$ac_cv_path_ARTS_CONFIG" && ac_cv_path_ARTS_CONFIG="no"
6645   ;;
6646 esac
6647 fi
6648 ARTS_CONFIG="$ac_cv_path_ARTS_CONFIG"
6649 if test -n "$ARTS_CONFIG"; then
6650   echo "$ac_t""$ARTS_CONFIG" 1>&6
6651 else
6652   echo "$ac_t""no" 1>&6
6653 fi
6654
6655      if test x${ARTS_CONFIG} != xno
6656      then
6657        PLUGINS="${PLUGINS} arts"
6658        CFLAGS_ARTS="${CFLAGS_ARTS} `${ARTS_CONFIG} --cflags`"
6659        LIB_ARTS="${LIB_ARTS} `${ARTS_CONFIG} --libs `"
6660      fi
6661    fi
6662 fi
6663
6664
6665 # Check whether --enable-macosx or --disable-macosx was given.
6666 if test "${enable_macosx+set}" = set; then
6667   enableval="$enable_macosx"
6668   if test x$enable_macosx = xyes
6669    then
6670      BUILTINS="${BUILTINS} macosx"
6671      LIB_MACOSX="${LIB_MACOSX} -framework CoreAudio -framework Cocoa -framework AGL -framework QuickTime -lobjc"
6672      CFLAGS_MACOSX="${CFLAGS_MACOSX} -ObjC"
6673      LIB="${LIB} -ObjC"
6674    fi
6675 else
6676   for ac_hdr in Cocoa/Cocoa.h
6677 do
6678 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6679 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6680 echo "configure:6681: checking for $ac_hdr" >&5
6681 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6682   echo $ac_n "(cached) $ac_c" 1>&6
6683 else
6684   cat > conftest.$ac_ext <<EOF
6685 #line 6686 "configure"
6686 #include "confdefs.h"
6687 #include <$ac_hdr>
6688 EOF
6689 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6690 { (eval echo configure:6691: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6691 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6692 if test -z "$ac_err"; then
6693   rm -rf conftest*
6694   eval "ac_cv_header_$ac_safe=yes"
6695 else
6696   echo "$ac_err" >&5
6697   echo "configure: failed program was:" >&5
6698   cat conftest.$ac_ext >&5
6699   rm -rf conftest*
6700   eval "ac_cv_header_$ac_safe=no"
6701 fi
6702 rm -f conftest*
6703 fi
6704 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6705   echo "$ac_t""yes" 1>&6
6706     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6707   cat >> confdefs.h <<EOF
6708 #define $ac_tr_hdr 1
6709 EOF
6710  BUILTINS="${BUILTINS} macosx"
6711      LIB_MACOSX="${LIB_MACOSX} -framework CoreAudio -framework Cocoa -framework AGL -framework QuickTime -lobjc"
6712      CFLAGS_MACOSX="${CFLAGS_MACOSX} -ObjC"
6713      LIB="${LIB} -ObjC"
6714    
6715 else
6716   echo "$ac_t""no" 1>&6
6717 fi
6718 done
6719
6720 fi
6721
6722
6723 # Check whether --enable-qnx or --disable-qnx was given.
6724 if test "${enable_qnx+set}" = set; then
6725   enableval="$enable_qnx"
6726   :
6727 fi
6728
6729     if test x$enable_qnx != xno
6730     then
6731       for ac_hdr in Ph.h
6732 do
6733 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6734 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6735 echo "configure:6736: checking for $ac_hdr" >&5
6736 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6737   echo $ac_n "(cached) $ac_c" 1>&6
6738 else
6739   cat > conftest.$ac_ext <<EOF
6740 #line 6741 "configure"
6741 #include "confdefs.h"
6742 #include <$ac_hdr>
6743 EOF
6744 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6745 { (eval echo configure:6746: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6746 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6747 if test -z "$ac_err"; then
6748   rm -rf conftest*
6749   eval "ac_cv_header_$ac_safe=yes"
6750 else
6751   echo "$ac_err" >&5
6752   echo "configure: failed program was:" >&5
6753   cat conftest.$ac_ext >&5
6754   rm -rf conftest*
6755   eval "ac_cv_header_$ac_safe=no"
6756 fi
6757 rm -f conftest*
6758 fi
6759 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6760   echo "$ac_t""yes" 1>&6
6761     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6762   cat >> confdefs.h <<EOF
6763 #define $ac_tr_hdr 1
6764 EOF
6765  
6766         PLUGINS="${PLUGINS} qnx"
6767         LIB_QNX="${LIB_QNX} -lasound -lph"
6768       
6769 else
6770   echo "$ac_t""no" 1>&6
6771 fi
6772 done
6773
6774     fi
6775
6776 # Check whether --enable-fb or --disable-fb was given.
6777 if test "${enable_fb+set}" = set; then
6778   enableval="$enable_fb"
6779    if test x$enable_fb = xyes
6780     then
6781       PLUGINS="${PLUGINS} fb"
6782     fi 
6783 fi
6784
6785
6786 # Check whether --enable-mga or --disable-mga was given.
6787 if test "${enable_mga+set}" = set; then
6788   enableval="$enable_mga"
6789    if test x$enable_mga = xyes
6790     then
6791       PLUGINS="${PLUGINS} mga xmga"
6792     fi 
6793 fi
6794
6795
6796 # Check whether --with-ggi or --without-ggi was given.
6797 if test "${with_ggi+set}" = set; then
6798   withval="$with_ggi"
6799    if test "x$withval" != "xno"
6800     then
6801       PLUGINS="${PLUGINS} ggi"
6802       if test "x$withval" != "xyes"
6803       then
6804         LIB_GGI="${LIB_GGI} -l$withval"
6805       else
6806         LIB_GGI="${LIB_GGI} -lggi"
6807       fi
6808     fi 
6809 fi
6810
6811
6812 # Check whether --enable-sdl or --disable-sdl was given.
6813 if test "${enable_sdl+set}" = set; then
6814   enableval="$enable_sdl"
6815   :
6816 fi
6817
6818 if test "x$enable_sdl" != "xno"
6819 then
6820   SDL_PATH=$PATH
6821   # Check whether --with-sdl-config-path or --without-sdl-config-path was given.
6822 if test "${with_sdl_config_path+set}" = set; then
6823   withval="$with_sdl_config_path"
6824    if test "x$withval" != "xno"
6825       then
6826         SDL_PATH=$withval:$PATH
6827       fi 
6828 fi
6829
6830   # Extract the first word of "sdl12-config", so it can be a program name with args.
6831 set dummy sdl12-config; ac_word=$2
6832 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6833 echo "configure:6834: checking for $ac_word" >&5
6834 if eval "test \"`echo '$''{'ac_cv_path_SDL12_CONFIG'+set}'`\" = set"; then
6835   echo $ac_n "(cached) $ac_c" 1>&6
6836 else
6837   case "$SDL12_CONFIG" in
6838   /*)
6839   ac_cv_path_SDL12_CONFIG="$SDL12_CONFIG" # Let the user override the test with a path.
6840   ;;
6841   ?:/*)                  
6842   ac_cv_path_SDL12_CONFIG="$SDL12_CONFIG" # Let the user override the test with a dos path.
6843   ;;
6844   *)
6845   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
6846   ac_dummy="$SDL_PATH"
6847   for ac_dir in $ac_dummy; do 
6848     test -z "$ac_dir" && ac_dir=.
6849     if test -f $ac_dir/$ac_word; then
6850       ac_cv_path_SDL12_CONFIG="$ac_dir/$ac_word"
6851       break
6852     fi
6853   done
6854   IFS="$ac_save_ifs"
6855   test -z "$ac_cv_path_SDL12_CONFIG" && ac_cv_path_SDL12_CONFIG="no"
6856   ;;
6857 esac
6858 fi
6859 SDL12_CONFIG="$ac_cv_path_SDL12_CONFIG"
6860 if test -n "$SDL12_CONFIG"; then
6861   echo "$ac_t""$SDL12_CONFIG" 1>&6
6862 else
6863   echo "$ac_t""no" 1>&6
6864 fi
6865
6866   SDL_CONFIG=${SDL12_CONFIG}
6867   SDL_HEADER="SDL12/SDL.h"
6868   if test x${SDL_CONFIG} = xno
6869   then
6870     # Extract the first word of "sdl11-config", so it can be a program name with args.
6871 set dummy sdl11-config; ac_word=$2
6872 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6873 echo "configure:6874: checking for $ac_word" >&5
6874 if eval "test \"`echo '$''{'ac_cv_path_SDL11_CONFIG'+set}'`\" = set"; then
6875   echo $ac_n "(cached) $ac_c" 1>&6
6876 else
6877   case "$SDL11_CONFIG" in
6878   /*)
6879   ac_cv_path_SDL11_CONFIG="$SDL11_CONFIG" # Let the user override the test with a path.
6880   ;;
6881   ?:/*)                  
6882   ac_cv_path_SDL11_CONFIG="$SDL11_CONFIG" # Let the user override the test with a dos path.
6883   ;;
6884   *)
6885   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
6886   ac_dummy="$SDL_PATH"
6887   for ac_dir in $ac_dummy; do 
6888     test -z "$ac_dir" && ac_dir=.
6889     if test -f $ac_dir/$ac_word; then
6890       ac_cv_path_SDL11_CONFIG="$ac_dir/$ac_word"
6891       break
6892     fi
6893   done
6894   IFS="$ac_save_ifs"
6895   test -z "$ac_cv_path_SDL11_CONFIG" && ac_cv_path_SDL11_CONFIG="no"
6896   ;;
6897 esac
6898 fi
6899 SDL11_CONFIG="$ac_cv_path_SDL11_CONFIG"
6900 if test -n "$SDL11_CONFIG"; then
6901   echo "$ac_t""$SDL11_CONFIG" 1>&6
6902 else
6903   echo "$ac_t""no" 1>&6
6904 fi
6905
6906     SDL_CONFIG=${SDL11_CONFIG}
6907     SDL_HEADER="SDL11/SDL.h"
6908   fi
6909   if test x${SDL_CONFIG} = xno
6910   then
6911     # Extract the first word of "sdl-config", so it can be a program name with args.
6912 set dummy sdl-config; ac_word=$2
6913 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6914 echo "configure:6915: checking for $ac_word" >&5
6915 if eval "test \"`echo '$''{'ac_cv_path_SDL_CONFIG'+set}'`\" = set"; then
6916   echo $ac_n "(cached) $ac_c" 1>&6
6917 else
6918   case "$SDL_CONFIG" in
6919   /*)
6920   ac_cv_path_SDL_CONFIG="$SDL_CONFIG" # Let the user override the test with a path.
6921   ;;
6922   ?:/*)                  
6923   ac_cv_path_SDL_CONFIG="$SDL_CONFIG" # Let the user override the test with a dos path.
6924   ;;
6925   *)
6926   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
6927   ac_dummy="$SDL_PATH"
6928   for ac_dir in $ac_dummy; do 
6929     test -z "$ac_dir" && ac_dir=.
6930     if test -f $ac_dir/$ac_word; then
6931       ac_cv_path_SDL_CONFIG="$ac_dir/$ac_word"
6932       break
6933     fi
6934   done
6935   IFS="$ac_save_ifs"
6936   test -z "$ac_cv_path_SDL_CONFIG" && ac_cv_path_SDL_CONFIG="no"
6937   ;;
6938 esac
6939 fi
6940 SDL_CONFIG="$ac_cv_path_SDL_CONFIG"
6941 if test -n "$SDL_CONFIG"; then
6942   echo "$ac_t""$SDL_CONFIG" 1>&6
6943 else
6944   echo "$ac_t""no" 1>&6
6945 fi
6946
6947     SDL_HEADER="SDL/SDL.h"
6948   fi
6949   if test x${SDL_CONFIG} != xno
6950   then
6951     PLUGINS="${PLUGINS} sdl"
6952     CFLAGS_SDL="${CFLAGS_SDL} `${SDL_CONFIG} --cflags`"
6953     LIB_SDL="${LIB_SDL} `${SDL_CONFIG} --libs | sed 's,-rdynamic,,'`"
6954     save_CPPFLAGS=$CPPFLAGS
6955     CPPFLAGS="$CPPFLAGS $CFLAGS_SDL"
6956     for ac_hdr in ${SDL_HEADER}
6957 do
6958 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6959 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6960 echo "configure:6961: checking for $ac_hdr" >&5
6961 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6962   echo $ac_n "(cached) $ac_c" 1>&6
6963 else
6964   cat > conftest.$ac_ext <<EOF
6965 #line 6966 "configure"
6966 #include "confdefs.h"
6967 #include <$ac_hdr>
6968 EOF
6969 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6970 { (eval echo configure:6971: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6971 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6972 if test -z "$ac_err"; then
6973   rm -rf conftest*
6974   eval "ac_cv_header_$ac_safe=yes"
6975 else
6976   echo "$ac_err" >&5
6977   echo "configure: failed program was:" >&5
6978   cat conftest.$ac_ext >&5
6979   rm -rf conftest*
6980   eval "ac_cv_header_$ac_safe=no"
6981 fi
6982 rm -f conftest*
6983 fi
6984 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6985   echo "$ac_t""yes" 1>&6
6986     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6987   cat >> confdefs.h <<EOF
6988 #define $ac_tr_hdr 1
6989 EOF
6990  cat >> confdefs.h <<EOF
6991 #define SDL_INCLUDE_FILE <${SDL_HEADER}>
6992 EOF
6993
6994 else
6995   echo "$ac_t""no" 1>&6
6996 { echo "configure: error: The development package for SDL is not installed. 
6997 Please install it and try again. Alternatively you can also configure with 
6998 --disable-sdl." 1>&2; exit 1; }
6999       
7000 fi
7001 done
7002
7003     CPPFLAGS=$save_CPPFLAGS
7004     if expr 1.1.5 \> `$SDL_CONFIG --version` >/dev/null
7005     then
7006       { echo "configure: error: The development package for SDL is not installed.
7007 Please install it and try again. Alternatively you can also configure with
7008 --disable-sdl." 1>&2; exit 1; }
7009     fi
7010   elif test "x$enable_sdl" =  "xyes"
7011   then
7012     { echo "configure: error: I couldn't find the SDL package. You can download libSDL
7013 from http://www.libsdl.org/, or configure with --disable-sdl. Have a nice day.
7014     " 1>&2; exit 1; }
7015   fi
7016 fi
7017
7018 # Check whether --enable-directx or --disable-directx was given.
7019 if test "${enable_directx+set}" = set; then
7020   enableval="$enable_directx"
7021   :
7022 fi
7023
7024 if test "x$enableval" != "xno"
7025 then
7026   if test $SYS = mingw32
7027   then
7028     # Check whether --with-directx-path or --without-directx-path was given.
7029 if test "${with_directx_path+set}" = set; then
7030   withval="$with_directx_path"
7031   :
7032 fi
7033
7034     if test "x$with_directx_path" = "x"
7035     then
7036       for ac_hdr in directx.h
7037 do
7038 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7039 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7040 echo "configure:7041: checking for $ac_hdr" >&5
7041 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7042   echo $ac_n "(cached) $ac_c" 1>&6
7043 else
7044   cat > conftest.$ac_ext <<EOF
7045 #line 7046 "configure"
7046 #include "confdefs.h"
7047 #include <$ac_hdr>
7048 EOF
7049 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7050 { (eval echo configure:7051: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7051 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7052 if test -z "$ac_err"; then
7053   rm -rf conftest*
7054   eval "ac_cv_header_$ac_safe=yes"
7055 else
7056   echo "$ac_err" >&5
7057   echo "configure: failed program was:" >&5
7058   cat conftest.$ac_ext >&5
7059   rm -rf conftest*
7060   eval "ac_cv_header_$ac_safe=no"
7061 fi
7062 rm -f conftest*
7063 fi
7064 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7065   echo "$ac_t""yes" 1>&6
7066     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7067   cat >> confdefs.h <<EOF
7068 #define $ac_tr_hdr 1
7069 EOF
7070   PLUGINS="${PLUGINS} directx"
7071         LIB_DIRECTX="${LIB_DIRECTX} -lgdi32" 
7072 else
7073   echo "$ac_t""no" 1>&6
7074 fi
7075 done
7076
7077     else
7078       echo $ac_n "checking for directX headers in ${withval}""... $ac_c" 1>&6
7079 echo "configure:7080: checking for directX headers in ${withval}" >&5
7080       if test -f ${withval}/include/directx.h
7081       then
7082         PLUGINS="${PLUGINS} directx"
7083         LIB_DIRECTX="${LIB_DIRECTX} -L${withval}/lib -lgdi32"
7084         INCLUDE="${INCLUDE} -I${withval}/include"
7085         echo "$ac_t""yes" 1>&6
7086       else
7087         echo "$ac_t""no" 1>&6
7088         { echo "configure: error: Cannot find ${withval}/include/directx.h!" 1>&2; exit 1; }
7089       fi
7090     fi
7091   fi
7092 fi
7093
7094 # Check whether --enable-win32 or --disable-win32 was given.
7095 if test "${enable_win32+set}" = set; then
7096   enableval="$enable_win32"
7097    if test "x$enableval" != "xno"
7098     then
7099       PLUGINS="${PLUGINS} win32"
7100     fi 
7101 fi
7102
7103
7104 # Check whether --with-glide or --without-glide was given.
7105 if test "${with_glide+set}" = set; then
7106   withval="$with_glide"
7107    if test "x$withval" != "xno"
7108     then
7109       PLUGINS="${PLUGINS} glide"
7110       if test "x$withval" != "xyes"
7111       then
7112         LIB_GLIDE="${LIB_GLIDE} -l$withval -lm"
7113       else
7114         LIB_GLIDE="${LIB_GLIDE} -lglide2x -lm"
7115       fi
7116       CFLAGS_GLIDE="${CFLAGS_GLIDE} -I/usr/include/glide"
7117     fi 
7118 fi
7119
7120
7121 # Check whether --enable-ncurses or --disable-ncurses was given.
7122 if test "${enable_ncurses+set}" = set; then
7123   enableval="$enable_ncurses"
7124   if test x$enable_ncurses = xyes; then
7125      PLUGINS="${PLUGINS} ncurses"
7126      LIB_NCURSES="${LIB_NCURSES} -lncurses"
7127    fi
7128 fi
7129
7130
7131 # Check whether --enable-qt or --disable-qt was given.
7132 if test "${enable_qt+set}" = set; then
7133   enableval="$enable_qt"
7134   if test x$enable_qt = xyes; then
7135      PLUGINS="${PLUGINS} qt"
7136      ALIASES="${ALIASES} qvlc"
7137      LIB_QT="${LIB_QT} -lqt -L${QTDIR}/lib"
7138      CFLAGS_QT="${CFLAGS_QT} -I/usr/include/qt -I${QTDIR}/include"
7139      if test -x ${QTDIR}/bin/moc
7140      then
7141        MOC=${QTDIR}/bin/moc
7142      else
7143        MOC=moc
7144      fi
7145    fi
7146 fi
7147
7148
7149 # Check whether --enable-kde or --disable-kde was given.
7150 if test "${enable_kde+set}" = set; then
7151   enableval="$enable_kde"
7152   if test x$enable_kde = xyes; then
7153      PLUGINS="${PLUGINS} kde"
7154      ALIASES="${ALIASES} kvlc"
7155      LIB_KDE="${LIB_KDE} -L${KDEDIR}/lib -lkfile"
7156      CFLAGS_KDE="${CFLAGS_KDE} -I/usr/include/kde -I/usr/include/qt"
7157      CFLAGS_KDE="${CFLAGS_KDE} -I${KDEDIR}/include -I${QTDIR}/include"
7158      if test -x ${QTDIR}/bin/moc
7159      then
7160        MOC=${QTDIR}/bin/moc
7161      else
7162        MOC=moc
7163      fi
7164    fi
7165 fi
7166
7167
7168 # Check whether --enable-gnome or --disable-gnome was given.
7169 if test "${enable_gnome+set}" = set; then
7170   enableval="$enable_gnome"
7171   if test x$enable_gnome = xyes; then
7172     # look for gnome-config
7173     # Extract the first word of "gnome-config", so it can be a program name with args.
7174 set dummy gnome-config; ac_word=$2
7175 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7176 echo "configure:7177: checking for $ac_word" >&5
7177 if eval "test \"`echo '$''{'ac_cv_path_GNOME_CONFIG'+set}'`\" = set"; then
7178   echo $ac_n "(cached) $ac_c" 1>&6
7179 else
7180   case "$GNOME_CONFIG" in
7181   /*)
7182   ac_cv_path_GNOME_CONFIG="$GNOME_CONFIG" # Let the user override the test with a path.
7183   ;;
7184   ?:/*)                  
7185   ac_cv_path_GNOME_CONFIG="$GNOME_CONFIG" # Let the user override the test with a dos path.
7186   ;;
7187   *)
7188   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7189   ac_dummy="$PATH"
7190   for ac_dir in $ac_dummy; do 
7191     test -z "$ac_dir" && ac_dir=.
7192     if test -f $ac_dir/$ac_word; then
7193       ac_cv_path_GNOME_CONFIG="$ac_dir/$ac_word"
7194       break
7195     fi
7196   done
7197   IFS="$ac_save_ifs"
7198   test -z "$ac_cv_path_GNOME_CONFIG" && ac_cv_path_GNOME_CONFIG="no"
7199   ;;
7200 esac
7201 fi
7202 GNOME_CONFIG="$ac_cv_path_GNOME_CONFIG"
7203 if test -n "$GNOME_CONFIG"; then
7204   echo "$ac_t""$GNOME_CONFIG" 1>&6
7205 else
7206   echo "$ac_t""no" 1>&6
7207 fi
7208
7209     if test -x ${GNOME_CONFIG}
7210     then
7211        CFLAGS_GNOME="${CFLAGS_GNOME} `${GNOME_CONFIG} --cflags gtk gnomeui`"
7212        LIB_GNOME="${LIB_GNOME} `${GNOME_CONFIG} --libs gnomeui | sed 's,-rdynamic,,'`"
7213     fi
7214     # now look for the gnome.h header
7215     saved_CPPFLAGS=$CPPFLAGS
7216     CPPFLAGS="$CPPFLAGS $CFLAGS_GNOME"
7217     for ac_hdr in gnome.h
7218 do
7219 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7220 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7221 echo "configure:7222: checking for $ac_hdr" >&5
7222 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7223   echo $ac_n "(cached) $ac_c" 1>&6
7224 else
7225   cat > conftest.$ac_ext <<EOF
7226 #line 7227 "configure"
7227 #include "confdefs.h"
7228 #include <$ac_hdr>
7229 EOF
7230 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7231 { (eval echo configure:7232: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7232 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7233 if test -z "$ac_err"; then
7234   rm -rf conftest*
7235   eval "ac_cv_header_$ac_safe=yes"
7236 else
7237   echo "$ac_err" >&5
7238   echo "configure: failed program was:" >&5
7239   cat conftest.$ac_ext >&5
7240   rm -rf conftest*
7241   eval "ac_cv_header_$ac_safe=no"
7242 fi
7243 rm -f conftest*
7244 fi
7245 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7246   echo "$ac_t""yes" 1>&6
7247     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7248   cat >> confdefs.h <<EOF
7249 #define $ac_tr_hdr 1
7250 EOF
7251  
7252       PLUGINS="${PLUGINS} gnome"
7253       ALIASES="${ALIASES} gnome-vlc"
7254      
7255 else
7256   echo "$ac_t""no" 1>&6
7257 { echo "configure: error: Can't find gnome headers. Please install the gnome
7258 developement librairie or remove the --enable-gnome option" 1>&2; exit 1; }
7259      
7260 fi
7261 done
7262
7263   
7264     CPPFLAGS=$saved_CPPFLAGS
7265   fi
7266 fi
7267
7268
7269 # Check whether --enable-gtk or --disable-gtk was given.
7270 if test "${enable_gtk+set}" = set; then
7271   enableval="$enable_gtk"
7272   :
7273 fi
7274
7275 if test x$enable_gtk != xno
7276 then
7277   GTK_PATH=$PATH
7278   # Check whether --with-gtk-config-path or --without-gtk-config-path was given.
7279 if test "${with_gtk_config_path+set}" = set; then
7280   withval="$with_gtk_config_path"
7281    if test "x$withval" != "xno"
7282       then
7283         GTK_PATH=$withval:$PATH
7284       fi 
7285 fi
7286
7287   # look for gtk-config
7288   # Extract the first word of "gtk-config", so it can be a program name with args.
7289 set dummy gtk-config; ac_word=$2
7290 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7291 echo "configure:7292: checking for $ac_word" >&5
7292 if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then
7293   echo $ac_n "(cached) $ac_c" 1>&6
7294 else
7295   case "$GTK_CONFIG" in
7296   /*)
7297   ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a path.
7298   ;;
7299   ?:/*)                  
7300   ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a dos path.
7301   ;;
7302   *)
7303   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7304   ac_dummy="$GTK_PATH"
7305   for ac_dir in $ac_dummy; do 
7306     test -z "$ac_dir" && ac_dir=.
7307     if test -f $ac_dir/$ac_word; then
7308       ac_cv_path_GTK_CONFIG="$ac_dir/$ac_word"
7309       break
7310     fi
7311   done
7312   IFS="$ac_save_ifs"
7313   test -z "$ac_cv_path_GTK_CONFIG" && ac_cv_path_GTK_CONFIG="no"
7314   ;;
7315 esac
7316 fi
7317 GTK_CONFIG="$ac_cv_path_GTK_CONFIG"
7318 if test -n "$GTK_CONFIG"; then
7319   echo "$ac_t""$GTK_CONFIG" 1>&6
7320 else
7321   echo "$ac_t""no" 1>&6
7322 fi
7323
7324   if test -x ${GTK_CONFIG}
7325   then
7326     if expr 1.2.0 \> `$GTK_CONFIG --version` >/dev/null
7327     then
7328       { echo "configure: error: Your development package for Gtk+ is too old, you need at least version 1.2.0. Please upgrade and try again. Alternatively you can also configure with --disable-gtk." 1>&2; exit 1; }
7329     fi
7330     CFLAGS_GTK="${CFLAGS_GTK} `${GTK_CONFIG} --cflags gtk`"
7331     LIB_GTK="${LIB_GTK} `${GTK_CONFIG} --libs gtk | sed 's,-rdynamic,,'`"
7332   fi
7333   # now look for the gtk.h header
7334   saved_CPPFLAGS=$CPPFLAGS
7335   CPPFLAGS="$CPPFLAGS $CFLAGS_GTK"
7336   ac_cv_gtk_headers=yes
7337   for ac_hdr in gtk/gtk.h glib.h gdk/gdk.h
7338 do
7339 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7340 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7341 echo "configure:7342: checking for $ac_hdr" >&5
7342 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7343   echo $ac_n "(cached) $ac_c" 1>&6
7344 else
7345   cat > conftest.$ac_ext <<EOF
7346 #line 7347 "configure"
7347 #include "confdefs.h"
7348 #include <$ac_hdr>
7349 EOF
7350 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7351 { (eval echo configure:7352: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7352 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7353 if test -z "$ac_err"; then
7354   rm -rf conftest*
7355   eval "ac_cv_header_$ac_safe=yes"
7356 else
7357   echo "$ac_err" >&5
7358   echo "configure: failed program was:" >&5
7359   cat conftest.$ac_ext >&5
7360   rm -rf conftest*
7361   eval "ac_cv_header_$ac_safe=no"
7362 fi
7363 rm -f conftest*
7364 fi
7365 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7366   echo "$ac_t""yes" 1>&6
7367     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7368   cat >> confdefs.h <<EOF
7369 #define $ac_tr_hdr 1
7370 EOF
7371  
7372 else
7373   echo "$ac_t""no" 1>&6
7374 ac_cv_gtk_headers=no
7375     echo "Cannot find gtk development headers."
7376   
7377 fi
7378 done
7379
7380   if test "x$ac_cv_gtk_headers" = xyes
7381   then
7382     PLUGINS="${PLUGINS} gtk"
7383     ALIASES="${ALIASES} gvlc"
7384   fi
7385   CPPFLAGS=$saved_CPPFLAGS
7386 fi
7387
7388 # Check whether --enable-x11 or --disable-x11 was given.
7389 if test "${enable_x11+set}" = set; then
7390   enableval="$enable_x11"
7391   :
7392 fi
7393
7394 if test x$enable_x11 != xno &&
7395   (test $SYS != mingw32 || test x$enable_x11 = xyes); then
7396   if test x$x_includes = xNONE; then
7397     x_includes=/usr/X11R6/include
7398   fi
7399   if test x$x_libraries = xNONE; then
7400     x_libraries=/usr/X11R6/lib
7401   fi
7402   saved_CPPFLAGS=$CPPFLAGS
7403   CPPFLAGS="$CPPFLAGS -I$x_includes"
7404   for ac_hdr in X11/Xlib.h
7405 do
7406 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7407 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7408 echo "configure:7409: checking for $ac_hdr" >&5
7409 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7410   echo $ac_n "(cached) $ac_c" 1>&6
7411 else
7412   cat > conftest.$ac_ext <<EOF
7413 #line 7414 "configure"
7414 #include "confdefs.h"
7415 #include <$ac_hdr>
7416 EOF
7417 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7418 { (eval echo configure:7419: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7419 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7420 if test -z "$ac_err"; then
7421   rm -rf conftest*
7422   eval "ac_cv_header_$ac_safe=yes"
7423 else
7424   echo "$ac_err" >&5
7425   echo "configure: failed program was:" >&5
7426   cat conftest.$ac_ext >&5
7427   rm -rf conftest*
7428   eval "ac_cv_header_$ac_safe=no"
7429 fi
7430 rm -f conftest*
7431 fi
7432 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7433   echo "$ac_t""yes" 1>&6
7434     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7435   cat >> confdefs.h <<EOF
7436 #define $ac_tr_hdr 1
7437 EOF
7438  
7439     PLUGINS="${PLUGINS} x11"
7440     LIB_X11="${LIB_X11} -L$x_libraries -lX11 -lXext"
7441     CFLAGS_X11="${CFLAGS_X11} -I$x_includes"
7442   
7443   CPPFLAGS=$saved_CPPFLAGS
7444 else
7445   echo "$ac_t""no" 1>&6
7446 fi
7447 done
7448
7449 fi
7450
7451 # Check whether --enable-xvideo or --disable-xvideo was given.
7452 if test "${enable_xvideo+set}" = set; then
7453   enableval="$enable_xvideo"
7454   :
7455 fi
7456
7457 if test x$enable_xvideo != xno &&
7458   (test $SYS != mingw32 || test x$enable_xvideo = xyes); then
7459   if test x$x_includes = xNONE; then
7460     x_includes=/usr/X11R6/include
7461   fi
7462   if test x$x_libraries = xNONE; then
7463     x_libraries=/usr/X11R6/lib
7464   fi
7465   saved_CPPFLAGS=$CPPFLAGS
7466   CPPFLAGS="$CPPFLAGS -I$x_includes"
7467   for ac_hdr in X11/extensions/Xv.h
7468 do
7469 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7470 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7471 echo "configure:7472: checking for $ac_hdr" >&5
7472 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7473   echo $ac_n "(cached) $ac_c" 1>&6
7474 else
7475   cat > conftest.$ac_ext <<EOF
7476 #line 7477 "configure"
7477 #include "confdefs.h"
7478 #include <$ac_hdr>
7479 EOF
7480 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7481 { (eval echo configure:7482: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7482 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7483 if test -z "$ac_err"; then
7484   rm -rf conftest*
7485   eval "ac_cv_header_$ac_safe=yes"
7486 else
7487   echo "$ac_err" >&5
7488   echo "configure: failed program was:" >&5
7489   cat conftest.$ac_ext >&5
7490   rm -rf conftest*
7491   eval "ac_cv_header_$ac_safe=no"
7492 fi
7493 rm -f conftest*
7494 fi
7495 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7496   echo "$ac_t""yes" 1>&6
7497     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7498   cat >> confdefs.h <<EOF
7499 #define $ac_tr_hdr 1
7500 EOF
7501  
7502     saved_CFLAGS=$CFLAGS
7503     CFLAGS="$CFLAGS -L$x_libraries -lX11 -lXext"
7504     echo $ac_n "checking for XvSetPortAttribute in -lXv_pic""... $ac_c" 1>&6
7505 echo "configure:7506: checking for XvSetPortAttribute in -lXv_pic" >&5
7506 ac_lib_var=`echo Xv_pic'_'XvSetPortAttribute | sed 'y%./+-%__p_%'`
7507 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7508   echo $ac_n "(cached) $ac_c" 1>&6
7509 else
7510   ac_save_LIBS="$LIBS"
7511 LIBS="-lXv_pic  $LIBS"
7512 cat > conftest.$ac_ext <<EOF
7513 #line 7514 "configure"
7514 #include "confdefs.h"
7515 /* Override any gcc2 internal prototype to avoid an error.  */
7516 /* We use char because int might match the return type of a gcc2
7517     builtin and then its argument prototype would still apply.  */
7518 char XvSetPortAttribute();
7519
7520 int main() {
7521 XvSetPortAttribute()
7522 ; return 0; }
7523 EOF
7524 if { (eval echo configure:7525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7525   rm -rf conftest*
7526   eval "ac_cv_lib_$ac_lib_var=yes"
7527 else
7528   echo "configure: failed program was:" >&5
7529   cat conftest.$ac_ext >&5
7530   rm -rf conftest*
7531   eval "ac_cv_lib_$ac_lib_var=no"
7532 fi
7533 rm -f conftest*
7534 LIBS="$ac_save_LIBS"
7535
7536 fi
7537 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7538   echo "$ac_t""yes" 1>&6
7539   # We have Xv_pic, that's good, we can build an xvideo.so plugin !
7540       PLUGINS="${PLUGINS} xvideo"
7541       LIB_XVIDEO="${LIB_XVIDEO} -L$x_libraries -lX11 -lXext -lXv_pic"
7542       CFLAGS_XVIDEO="${CFLAGS_XVIDEO} -I$x_includes"
7543 else
7544   echo "$ac_t""no" 1>&6
7545 # We don't have Xv_pic, let's make xvideo.a as builtin
7546       BUILTINS="${BUILTINS} xvideo"
7547       LIB_XVIDEO="${LIB_XVIDEO} -L$x_libraries -lX11 -lXext -lXv"
7548       CFLAGS_XVIDEO="${CFLAGS_XVIDEO} -I$x_includes"
7549 fi
7550
7551     CFLAGS=$saved_CFLAGS
7552   
7553   CPPFLAGS=$saved_CPPFLAGS
7554 else
7555   echo "$ac_t""no" 1>&6
7556 fi
7557 done
7558
7559 fi
7560
7561 # Check whether --enable-alsa or --disable-alsa was given.
7562 if test "${enable_alsa+set}" = set; then
7563   enableval="$enable_alsa"
7564   if test x$enable_alsa = xyes
7565    then
7566      ac_safe=`echo "alsa/asoundlib.h" | sed 'y%./+-%__p_%'`
7567 echo $ac_n "checking for alsa/asoundlib.h""... $ac_c" 1>&6
7568 echo "configure:7569: checking for alsa/asoundlib.h" >&5
7569 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7570   echo $ac_n "(cached) $ac_c" 1>&6
7571 else
7572   cat > conftest.$ac_ext <<EOF
7573 #line 7574 "configure"
7574 #include "confdefs.h"
7575 #include <alsa/asoundlib.h>
7576 EOF
7577 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7578 { (eval echo configure:7579: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7579 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7580 if test -z "$ac_err"; then
7581   rm -rf conftest*
7582   eval "ac_cv_header_$ac_safe=yes"
7583 else
7584   echo "$ac_err" >&5
7585   echo "configure: failed program was:" >&5
7586   cat conftest.$ac_ext >&5
7587   rm -rf conftest*
7588   eval "ac_cv_header_$ac_safe=no"
7589 fi
7590 rm -f conftest*
7591 fi
7592 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7593   echo "$ac_t""yes" 1>&6
7594   echo $ac_n "checking for main in -lasound""... $ac_c" 1>&6
7595 echo "configure:7596: checking for main in -lasound" >&5
7596 ac_lib_var=`echo asound'_'main | sed 'y%./+-%__p_%'`
7597 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7598   echo $ac_n "(cached) $ac_c" 1>&6
7599 else
7600   ac_save_LIBS="$LIBS"
7601 LIBS="-lasound  $LIBS"
7602 cat > conftest.$ac_ext <<EOF
7603 #line 7604 "configure"
7604 #include "confdefs.h"
7605
7606 int main() {
7607 main()
7608 ; return 0; }
7609 EOF
7610 if { (eval echo configure:7611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7611   rm -rf conftest*
7612   eval "ac_cv_lib_$ac_lib_var=yes"
7613 else
7614   echo "configure: failed program was:" >&5
7615   cat conftest.$ac_ext >&5
7616   rm -rf conftest*
7617   eval "ac_cv_lib_$ac_lib_var=no"
7618 fi
7619 rm -f conftest*
7620 LIBS="$ac_save_LIBS"
7621
7622 fi
7623 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7624   echo "$ac_t""yes" 1>&6
7625   have_alsa="true"
7626 else
7627   echo "$ac_t""no" 1>&6
7628 have_alsa="false"
7629 fi
7630
7631 else
7632   echo "$ac_t""no" 1>&6
7633 have_alsa="false"
7634 fi
7635
7636      if test x$have_alsa = xtrue
7637      then
7638        PLUGINS="${PLUGINS} alsa"
7639        LIB_ALSA="${LIB_ALSA} -lasound -lm -ldl"
7640      fi
7641    fi
7642 fi
7643
7644
7645 fi
7646
7647 # Check whether --enable-plugins or --disable-plugins was given.
7648 if test "${enable_plugins+set}" = set; then
7649   enableval="$enable_plugins"
7650   if test x$enable_plugins = xno
7651    then
7652      BUILTINS="${BUILTINS} ${PLUGINS}"
7653      PLUGINS=
7654    fi
7655 fi
7656
7657
7658 DLL_PATH=.
7659 # Check whether --with-dll-path or --without-dll-path was given.
7660 if test "${with_dll_path+set}" = set; then
7661   withval="$with_dll_path"
7662    if test "x$withval" != "xno"
7663     then
7664       DLL_PATH=$withval
7665     fi 
7666 fi
7667
7668
7669 cat >> confdefs.h <<EOF
7670 #define VERSION_MESSAGE "vlc $VLC_VERSION $VLC_CODENAME Copyright 1996-2001 VideoLAN\n"
7671 EOF
7672
7673 cat >> confdefs.h <<EOF
7674 #define COPYRIGHT_MESSAGE "VideoLAN Client - version $VLC_VERSION $VLC_CODENAME - (c) 1996-2002 VideoLAN"
7675 EOF
7676
7677
7678 VLC_SYMBOL="`echo ${VLC_VERSION} | tr .- __`"
7679 cat >> confdefs.h <<EOF
7680 #define MODULE_SUFFIX "__MODULE_$VLC_SYMBOL"
7681 EOF
7682
7683 cat >> confdefs.h <<EOF
7684 #define MODULE_SYMBOL $VLC_SYMBOL
7685 EOF
7686
7687
7688 DATA_PATH="${ac_tool_prefix}/share/videolan"
7689
7690 PLUGIN_PATH="${ac_tool_prefix}/share/videolan"
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
7756
7757
7758
7759
7760
7761
7762
7763
7764
7765
7766
7767
7768
7769
7770
7771
7772
7773
7774
7775
7776
7777
7778
7779
7780
7781
7782 trap '' 1 2 15
7783 cat > confcache <<\EOF
7784 # This file is a shell script that caches the results of configure
7785 # tests run on this system so they can be shared between configure
7786 # scripts and configure runs.  It is not useful on other systems.
7787 # If it contains results you don't want to keep, you may remove or edit it.
7788 #
7789 # By default, configure uses ./config.cache as the cache file,
7790 # creating it if it does not exist already.  You can give configure
7791 # the --cache-file=FILE option to use a different cache file; that is
7792 # what configure does when it calls configure scripts in
7793 # subdirectories, so they share the cache.
7794 # Giving --cache-file=/dev/null disables caching, for debugging configure.
7795 # config.status only pays attention to the cache file if you give it the
7796 # --recheck option to rerun configure.
7797 #
7798 EOF
7799 # The following way of writing the cache mishandles newlines in values,
7800 # but we know of no workaround that is simple, portable, and efficient.
7801 # So, don't put newlines in cache variables' values.
7802 # Ultrix sh set writes to stderr and can't be redirected directly,
7803 # and sets the high bit in the cache file unless we assign to the vars.
7804 (set) 2>&1 |
7805   case `(ac_space=' '; set | grep ac_space) 2>&1` in
7806   *ac_space=\ *)
7807     # `set' does not quote correctly, so add quotes (double-quote substitution
7808     # turns \\\\ into \\, and sed turns \\ into \).
7809     sed -n \
7810       -e "s/'/'\\\\''/g" \
7811       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
7812     ;;
7813   *)
7814     # `set' quotes correctly as required by POSIX, so do not add quotes.
7815     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
7816     ;;
7817   esac >> confcache
7818 if cmp -s $cache_file confcache; then
7819   :
7820 else
7821   if test -w $cache_file; then
7822     echo "updating cache $cache_file"
7823     cat confcache > $cache_file
7824   else
7825     echo "not updating unwritable cache $cache_file"
7826   fi
7827 fi
7828 rm -f confcache
7829
7830 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
7831
7832 test "x$prefix" = xNONE && prefix=$ac_default_prefix
7833 # Let make expand exec_prefix.
7834 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7835
7836 # Any assignment to VPATH causes Sun make to only execute
7837 # the first set of double-colon rules, so remove it if not needed.
7838 # If there is a colon in the path, we need to keep it.
7839 if test "x$srcdir" = x.; then
7840   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
7841 fi
7842
7843 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
7844
7845 DEFS=-DHAVE_CONFIG_H
7846
7847 # Without the "./", some shells look in PATH for config.status.
7848 : ${CONFIG_STATUS=./config.status}
7849
7850 echo creating $CONFIG_STATUS
7851 rm -f $CONFIG_STATUS
7852 cat > $CONFIG_STATUS <<EOF
7853 #! /bin/sh
7854 # Generated automatically by configure.
7855 # Run this file to recreate the current configuration.
7856 # This directory was configured as follows,
7857 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7858 #
7859 # $0 $ac_configure_args
7860 #
7861 # Compiler output produced by configure, useful for debugging
7862 # configure, is in ./config.log if it exists.
7863
7864 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
7865 for ac_option
7866 do
7867   case "\$ac_option" in
7868   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
7869     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
7870     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
7871   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
7872     echo "$CONFIG_STATUS generated by autoconf version 2.13"
7873     exit 0 ;;
7874   -help | --help | --hel | --he | --h)
7875     echo "\$ac_cs_usage"; exit 0 ;;
7876   *) echo "\$ac_cs_usage"; exit 1 ;;
7877   esac
7878 done
7879
7880 ac_given_srcdir=$srcdir
7881 ac_given_INSTALL="$INSTALL"
7882
7883 trap 'rm -fr `echo "Makefile.opts po/Makefile.in include/defs.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
7884 EOF
7885 cat >> $CONFIG_STATUS <<EOF
7886
7887 # Protect against being on the right side of a sed subst in config.status.
7888 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
7889  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
7890 $ac_vpsub
7891 $extrasub
7892 s%@SHELL@%$SHELL%g
7893 s%@CFLAGS@%$CFLAGS%g
7894 s%@CPPFLAGS@%$CPPFLAGS%g
7895 s%@CXXFLAGS@%$CXXFLAGS%g
7896 s%@FFLAGS@%$FFLAGS%g
7897 s%@DEFS@%$DEFS%g
7898 s%@LDFLAGS@%$LDFLAGS%g
7899 s%@LIBS@%$LIBS%g
7900 s%@exec_prefix@%$exec_prefix%g
7901 s%@prefix@%$prefix%g
7902 s%@program_transform_name@%$program_transform_name%g
7903 s%@bindir@%$bindir%g
7904 s%@sbindir@%$sbindir%g
7905 s%@libexecdir@%$libexecdir%g
7906 s%@datadir@%$datadir%g
7907 s%@sysconfdir@%$sysconfdir%g
7908 s%@sharedstatedir@%$sharedstatedir%g
7909 s%@localstatedir@%$localstatedir%g
7910 s%@libdir@%$libdir%g
7911 s%@includedir@%$includedir%g
7912 s%@oldincludedir@%$oldincludedir%g
7913 s%@infodir@%$infodir%g
7914 s%@mandir@%$mandir%g
7915 s%@host@%$host%g
7916 s%@host_alias@%$host_alias%g
7917 s%@host_cpu@%$host_cpu%g
7918 s%@host_vendor@%$host_vendor%g
7919 s%@host_os@%$host_os%g
7920 s%@target@%$target%g
7921 s%@target_alias@%$target_alias%g
7922 s%@target_cpu@%$target_cpu%g
7923 s%@target_vendor@%$target_vendor%g
7924 s%@target_os@%$target_os%g
7925 s%@build@%$build%g
7926 s%@build_alias@%$build_alias%g
7927 s%@build_cpu@%$build_cpu%g
7928 s%@build_vendor@%$build_vendor%g
7929 s%@build_os@%$build_os%g
7930 s%@LIBDVDCSS_VERSION@%$LIBDVDCSS_VERSION%g
7931 s%@SET_MAKE@%$SET_MAKE%g
7932 s%@CC@%$CC%g
7933 s%@CPP@%$CPP%g
7934 s%@RANLIB@%$RANLIB%g
7935 s%@ALLOCA@%$ALLOCA%g
7936 s%@GLIBC21@%$GLIBC21%g
7937 s%@LIBICONV@%$LIBICONV%g
7938 s%@USE_NLS@%$USE_NLS%g
7939 s%@MSGFMT@%$MSGFMT%g
7940 s%@GMSGFMT@%$GMSGFMT%g
7941 s%@XGETTEXT@%$XGETTEXT%g
7942 s%@INTLBISON@%$INTLBISON%g
7943 s%@BUILD_INCLUDED_LIBINTL@%$BUILD_INCLUDED_LIBINTL%g
7944 s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
7945 s%@CATALOGS@%$CATALOGS%g
7946 s%@CATOBJEXT@%$CATOBJEXT%g
7947 s%@GMOFILES@%$GMOFILES%g
7948 s%@INTLLIBS@%$INTLLIBS%g
7949 s%@INTLOBJS@%$INTLOBJS%g
7950 s%@POFILES@%$POFILES%g
7951 s%@POSUB@%$POSUB%g
7952 s%@DATADIRNAME@%$DATADIRNAME%g
7953 s%@INSTOBJEXT@%$INSTOBJEXT%g
7954 s%@GENCAT@%$GENCAT%g
7955 s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
7956 s%@INTL_LIBTOOL_SUFFIX_PREFIX@%$INTL_LIBTOOL_SUFFIX_PREFIX%g
7957 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
7958 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
7959 s%@INSTALL_DATA@%$INSTALL_DATA%g
7960 s%@WINDRES@%$WINDRES%g
7961 s%@ESD_CONFIG@%$ESD_CONFIG%g
7962 s%@ARTS_CONFIG@%$ARTS_CONFIG%g
7963 s%@SDL12_CONFIG@%$SDL12_CONFIG%g
7964 s%@SDL11_CONFIG@%$SDL11_CONFIG%g
7965 s%@SDL_CONFIG@%$SDL_CONFIG%g
7966 s%@GNOME_CONFIG@%$GNOME_CONFIG%g
7967 s%@GTK_CONFIG@%$GTK_CONFIG%g
7968 s%@DATA_PATH@%$DATA_PATH%g
7969 s%@PLUGIN_PATH@%$PLUGIN_PATH%g
7970 s%@SYS@%$SYS%g
7971 s%@ARCH@%$ARCH%g
7972 s%@PLUGINS@%$PLUGINS%g
7973 s%@BUILTINS@%$BUILTINS%g
7974 s%@ALIASES@%$ALIASES%g
7975 s%@INCLUDE@%$INCLUDE%g
7976 s%@DEBUG@%$DEBUG%g
7977 s%@ASM@%$ASM%g
7978 s%@TRACE@%$TRACE%g
7979 s%@CPROF@%$CPROF%g
7980 s%@GPROF@%$GPROF%g
7981 s%@OPTIMS@%$OPTIMS%g
7982 s%@TUNING@%$TUNING%g
7983 s%@RELEASE@%$RELEASE%g
7984 s%@MOC@%$MOC%g
7985 s%@DLL_PATH@%$DLL_PATH%g
7986 s%@PACKAGE@%$PACKAGE%g
7987 s%@VERSION@%$VERSION%g
7988 s%@VCD_DEVICE@%$VCD_DEVICE%g
7989 s%@DVD_DEVICE@%$DVD_DEVICE%g
7990 s%@PLDFLAGS@%$PLDFLAGS%g
7991 s%@SOFLAGS@%$SOFLAGS%g
7992 s%@LIB@%$LIB%g
7993 s%@LIB_ALSA@%$LIB_ALSA%g
7994 s%@LIB_ARTS@%$LIB_ARTS%g
7995 s%@LIB_BEOS@%$LIB_BEOS%g
7996 s%@LIB_DARWIN@%$LIB_DARWIN%g
7997 s%@LIB_DIRECTX@%$LIB_DIRECTX%g
7998 s%@LIB_DVD@%$LIB_DVD%g
7999 s%@LIB_DVD_PLUGIN@%$LIB_DVD_PLUGIN%g
8000 s%@LIB_DVDREAD@%$LIB_DVDREAD%g
8001 s%@LIB_DVDREAD_PLUGIN@%$LIB_DVDREAD_PLUGIN%g
8002 s%@LIB_ESD@%$LIB_ESD%g
8003 s%@LIB_FILTER_DISTORT@%$LIB_FILTER_DISTORT%g
8004 s%@LIB_GGI@%$LIB_GGI%g
8005 s%@LIB_GLIDE@%$LIB_GLIDE%g
8006 s%@LIB_GNOME@%$LIB_GNOME%g
8007 s%@LIB_GTK@%$LIB_GTK%g
8008 s%@LIB_IDCTALTIVEC@%$LIB_IDCTALTIVEC%g
8009 s%@LIB_IMDCT@%$LIB_IMDCT%g
8010 s%@LIB_IMDCT3DN@%$LIB_IMDCT3DN%g
8011 s%@LIB_IMDCTSSE@%$LIB_IMDCTSSE%g
8012 s%@LIB_KDE@%$LIB_KDE%g
8013 s%@LIB_LIBDVDCSS@%$LIB_LIBDVDCSS%g
8014 s%@LIB_MACOSX@%$LIB_MACOSX%g
8015 s%@LIB_MAD@%$LIB_MAD%g
8016 s%@LIB_MOTIONALTIVEC@%$LIB_MOTIONALTIVEC%g
8017 s%@LIB_MPEG_TS@%$LIB_MPEG_TS%g
8018 s%@LIB_NCURSES@%$LIB_NCURSES%g
8019 s%@LIB_QNX@%$LIB_QNX%g
8020 s%@LIB_QT@%$LIB_QT%g
8021 s%@LIB_RC@%$LIB_RC%g
8022 s%@LIB_SDL@%$LIB_SDL%g
8023 s%@LIB_WIN32@%$LIB_WIN32%g
8024 s%@LIB_X11@%$LIB_X11%g
8025 s%@LIB_XVIDEO@%$LIB_XVIDEO%g
8026 s%@CFLAGS_VLC@%$CFLAGS_VLC%g
8027 s%@CFLAGS_ARTS@%$CFLAGS_ARTS%g
8028 s%@CFLAGS_DVD@%$CFLAGS_DVD%g
8029 s%@CFLAGS_DVDREAD@%$CFLAGS_DVDREAD%g
8030 s%@CFLAGS_ESD@%$CFLAGS_ESD%g
8031 s%@CFLAGS_GLIDE@%$CFLAGS_GLIDE%g
8032 s%@CFLAGS_GNOME@%$CFLAGS_GNOME%g
8033 s%@CFLAGS_GTK@%$CFLAGS_GTK%g
8034 s%@CFLAGS_KDE@%$CFLAGS_KDE%g
8035 s%@CFLAGS_IDCTALTIVEC@%$CFLAGS_IDCTALTIVEC%g
8036 s%@CFLAGS_LIBDVDCSS@%$CFLAGS_LIBDVDCSS%g
8037 s%@CFLAGS_MACOSX@%$CFLAGS_MACOSX%g
8038 s%@CFLAGS_MAD@%$CFLAGS_MAD%g
8039 s%@CFLAGS_MOTIONALTIVEC@%$CFLAGS_MOTIONALTIVEC%g
8040 s%@CFLAGS_OPTIM@%$CFLAGS_OPTIM%g
8041 s%@CFLAGS_OPTIM_NODEBUG@%$CFLAGS_OPTIM_NODEBUG%g
8042 s%@CFLAGS_QT@%$CFLAGS_QT%g
8043 s%@CFLAGS_SDL@%$CFLAGS_SDL%g
8044 s%@CFLAGS_WIN32@%$CFLAGS_WIN32%g
8045 s%@CFLAGS_X11@%$CFLAGS_X11%g
8046 s%@CFLAGS_XVIDEO@%$CFLAGS_XVIDEO%g
8047 s%@SRC_DVD_EXTRA@%$SRC_DVD_EXTRA%g
8048 s%@SRC_DVDCSS_EXTRA@%$SRC_DVDCSS_EXTRA%g
8049 s%@NEED_GETOPT@%$NEED_GETOPT%g
8050 s%@NEED_LIBDVDCSS@%$NEED_LIBDVDCSS%g
8051
8052 CEOF
8053 EOF
8054
8055 cat >> $CONFIG_STATUS <<\EOF
8056
8057 # Split the substitutions into bite-sized pieces for seds with
8058 # small command number limits, like on Digital OSF/1 and HP-UX.
8059 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
8060 ac_file=1 # Number of current file.
8061 ac_beg=1 # First line for current file.
8062 ac_end=$ac_max_sed_cmds # Line after last line for current file.
8063 ac_more_lines=:
8064 ac_sed_cmds=""
8065 while $ac_more_lines; do
8066   if test $ac_beg -gt 1; then
8067     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
8068   else
8069     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
8070   fi
8071   if test ! -s conftest.s$ac_file; then
8072     ac_more_lines=false
8073     rm -f conftest.s$ac_file
8074   else
8075     if test -z "$ac_sed_cmds"; then
8076       ac_sed_cmds="sed -f conftest.s$ac_file"
8077     else
8078       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
8079     fi
8080     ac_file=`expr $ac_file + 1`
8081     ac_beg=$ac_end
8082     ac_end=`expr $ac_end + $ac_max_sed_cmds`
8083   fi
8084 done
8085 if test -z "$ac_sed_cmds"; then
8086   ac_sed_cmds=cat
8087 fi
8088 EOF
8089
8090 cat >> $CONFIG_STATUS <<EOF
8091
8092 CONFIG_FILES=\${CONFIG_FILES-"Makefile.opts po/Makefile.in"}
8093 EOF
8094 cat >> $CONFIG_STATUS <<\EOF
8095 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
8096   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
8097   case "$ac_file" in
8098   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
8099        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
8100   *) ac_file_in="${ac_file}.in" ;;
8101   esac
8102
8103   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
8104
8105   # Remove last slash and all that follows it.  Not all systems have dirname.
8106   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
8107   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
8108     # The file is in a subdirectory.
8109     test ! -d "$ac_dir" && mkdir "$ac_dir"
8110     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
8111     # A "../" for each directory in $ac_dir_suffix.
8112     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
8113   else
8114     ac_dir_suffix= ac_dots=
8115   fi
8116
8117   case "$ac_given_srcdir" in
8118   .)  srcdir=.
8119       if test -z "$ac_dots"; then top_srcdir=.
8120       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
8121   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
8122   *) # Relative path.
8123     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
8124     top_srcdir="$ac_dots$ac_given_srcdir" ;;
8125   esac
8126
8127   case "$ac_given_INSTALL" in
8128   [/$]*) INSTALL="$ac_given_INSTALL" ;;
8129   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
8130   esac
8131
8132   echo creating "$ac_file"
8133   rm -f "$ac_file"
8134   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
8135   case "$ac_file" in
8136   *Makefile*) ac_comsub="1i\\
8137 # $configure_input" ;;
8138   *) ac_comsub= ;;
8139   esac
8140
8141   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
8142   sed -e "$ac_comsub
8143 s%@configure_input@%$configure_input%g
8144 s%@srcdir@%$srcdir%g
8145 s%@top_srcdir@%$top_srcdir%g
8146 s%@INSTALL@%$INSTALL%g
8147 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
8148 fi; done
8149 rm -f conftest.s*
8150
8151 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
8152 # NAME is the cpp macro being defined and VALUE is the value it is being given.
8153 #
8154 # ac_d sets the value in "#define NAME VALUE" lines.
8155 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
8156 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
8157 ac_dC='\3'
8158 ac_dD='%g'
8159 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
8160 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
8161 ac_uB='\([      ]\)%\1#\2define\3'
8162 ac_uC=' '
8163 ac_uD='\4%g'
8164 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
8165 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
8166 ac_eB='$%\1#\2define\3'
8167 ac_eC=' '
8168 ac_eD='%g'
8169
8170 if test "${CONFIG_HEADERS+set}" != set; then
8171 EOF
8172 cat >> $CONFIG_STATUS <<EOF
8173   CONFIG_HEADERS="include/defs.h"
8174 EOF
8175 cat >> $CONFIG_STATUS <<\EOF
8176 fi
8177 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
8178   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
8179   case "$ac_file" in
8180   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
8181        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
8182   *) ac_file_in="${ac_file}.in" ;;
8183   esac
8184
8185   echo creating $ac_file
8186
8187   rm -f conftest.frag conftest.in conftest.out
8188   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
8189   cat $ac_file_inputs > conftest.in
8190
8191 EOF
8192
8193 # Transform confdefs.h into a sed script conftest.vals that substitutes
8194 # the proper values into config.h.in to produce config.h.  And first:
8195 # Protect against being on the right side of a sed subst in config.status.
8196 # Protect against being in an unquoted here document in config.status.
8197 rm -f conftest.vals
8198 cat > conftest.hdr <<\EOF
8199 s/[\\&%]/\\&/g
8200 s%[\\$`]%\\&%g
8201 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
8202 s%ac_d%ac_u%gp
8203 s%ac_u%ac_e%gp
8204 EOF
8205 sed -n -f conftest.hdr confdefs.h > conftest.vals
8206 rm -f conftest.hdr
8207
8208 # This sed command replaces #undef with comments.  This is necessary, for
8209 # example, in the case of _POSIX_SOURCE, which is predefined and required
8210 # on some systems where configure will not decide to define it.
8211 cat >> conftest.vals <<\EOF
8212 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
8213 EOF
8214
8215 # Break up conftest.vals because some shells have a limit on
8216 # the size of here documents, and old seds have small limits too.
8217
8218 rm -f conftest.tail
8219 while :
8220 do
8221   ac_lines=`grep -c . conftest.vals`
8222   # grep -c gives empty output for an empty file on some AIX systems.
8223   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
8224   # Write a limited-size here document to conftest.frag.
8225   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
8226   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
8227   echo 'CEOF
8228   sed -f conftest.frag conftest.in > conftest.out
8229   rm -f conftest.in
8230   mv conftest.out conftest.in
8231 ' >> $CONFIG_STATUS
8232   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
8233   rm -f conftest.vals
8234   mv conftest.tail conftest.vals
8235 done
8236 rm -f conftest.vals
8237
8238 cat >> $CONFIG_STATUS <<\EOF
8239   rm -f conftest.frag conftest.h
8240   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
8241   cat conftest.in >> conftest.h
8242   rm -f conftest.in
8243   if cmp -s $ac_file conftest.h 2>/dev/null; then
8244     echo "$ac_file is unchanged"
8245     rm -f conftest.h
8246   else
8247     # Remove last slash and all that follows it.  Not all systems have dirname.
8248       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
8249       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
8250       # The file is in a subdirectory.
8251       test ! -d "$ac_dir" && mkdir "$ac_dir"
8252     fi
8253     rm -f $ac_file
8254     mv conftest.h $ac_file
8255   fi
8256 fi; done
8257
8258 EOF
8259 cat >> $CONFIG_STATUS <<EOF
8260
8261
8262 EOF
8263 cat >> $CONFIG_STATUS <<\EOF
8264 for ac_file in $CONFIG_FILES; do
8265         # Support "outfile[:infile[:infile...]]"
8266         case "$ac_file" in
8267           *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
8268         esac
8269         # PO directories have a Makefile.in generated from Makefile.in.in.
8270         case "$ac_file" in */Makefile.in)
8271           # Adjust a relative srcdir.
8272           ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
8273           ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
8274           ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
8275           # In autoconf-2.13 it is called $ac_given_srcdir.
8276           # In autoconf-2.50 it is called $srcdir.
8277           test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
8278           case "$ac_given_srcdir" in
8279             .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
8280             /*) top_srcdir="$ac_given_srcdir" ;;
8281             *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
8282           esac
8283           if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
8284             rm -f "$ac_dir/POTFILES"
8285             test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
8286             sed -e "/^#/d" -e "/^[      ]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," -e "\$s/\(.*\) \\\\/\1/" < "$ac_given_srcdir/$ac_dir/POTFILES.in" > "$ac_dir/POTFILES"
8287             test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
8288             sed -e "/POTFILES =/r $ac_dir/POTFILES" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
8289           fi
8290           ;;
8291         esac
8292       done
8293
8294 exit 0
8295 EOF
8296 chmod +x $CONFIG_STATUS
8297 rm -fr confdefs* $ac_clean_files
8298 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
8299
8300
8301 echo "
8302 global configuration
8303 --------------------
8304 system                : ${SYS}
8305 architecture          : ${ARCH}
8306 optimizations         : ${OPTIMS}
8307 tuning:               : ${TUNING}
8308 release:              : ${RELEASE}"
8309
8310 if test x${HAVE_VLC} = x1
8311 then
8312   echo "
8313 vlc configuration
8314 -----------------
8315 vlc version           : ${VLC_VERSION}
8316 debug mode            : ${DEBUG}
8317 trace mode            : ${TRACE}
8318 cprof/gprof support   : ${CPROF}/${GPROF}
8319 need builtin getopt   : ${NEED_GETOPT}
8320 built-in modules      :${BUILTINS}
8321 plug-in modules       :${PLUGINS}
8322 vlc aliases           :${ALIASES}"
8323 fi
8324
8325 echo "
8326 libdvdcss configuration
8327 -----------------------
8328 can be built          : ${CAN_BUILD_LIBDVDCSS}
8329 will be built         : ${NEED_LIBDVDCSS}"
8330 if test x${NEED_LIBDVDCSS} = x1
8331 then
8332   echo "need BSDI libdvd      : ${NEED_BSDI_LIBDVD}"
8333   echo "link statically       : ${STATIC_LIBDVDCSS}"
8334 else
8335   echo "use dummy replacement : ${DUMMY_LIBDVDCSS}"
8336 fi
8337
8338 echo "
8339 You may now tune Makefile.opts at your convenience, for instance to choose
8340 which modules get compiled as plugins.
8341 "
8342 if test x${HAVE_VLC} = x1
8343 then
8344   echo "To build vlc and its plugins, type \`make vlc plugins'."
8345 fi
8346 if test x${HAVE_LIBDVDCSS} = x1
8347 then
8348   echo "To build libdvdcss only, type \`make libdvdcss'."
8349 fi
8350 echo ""
8351