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